View on GitHub

RPM Dist-Git Importer

Imports rpm source from dist-git to gitlab and generates a Maven pom

Overview

This tool allows the user to specify a branch in a dist-git (cgit) repository and it can import it into internal Red Hat CEE GitLab. Note that it is possible to rerun the tool against the gitlab repository to regenerate the pom

The advantages over manually cloning within the PNC UI and hand-crafting the pom file are:

Setup

This tool reuses the Bacon configuration file and so requires that you have a working Bacon setup. The only addition is for reqour:

  reqour:
    url: "https://reqour.pnc.engineering...."

You must be a member of jboss-prod so you have access to repositories created in CEE GitLab under the pnc-workspace group.

Brew access via Kerberos is also required unless you override both the Brew tag lookup to determine macros (via --macros) and the MEAD NVR lookup via --gav (or --lastMeadBuild).

This tool is tested and supported on JDK 21.

Usage

Options:

Usage: rpm-importer [-hvV] [--overwrite] [--push] [--skip-sync] --branch=<branch> [-p=<configPath>] [--profile=<profile>] [--repository=<repository>]
                    --url=<url> [--macros=<String=String>]... [--gav=<gavOverride> --originalVersion=<originalVersionOverride>]

      --branch=<branch>     Branch in git repository
      --gav, --lastMeadBuild=<gavOverride>
                            Override the value found from last-mead-build. Accepts a Maven GAV with RH version.
  -h, --help                Show this help message and exit.
      --macros=<String=String>
                            Pass in a (comma separated) set of macros to use
      --originalVersion=<originalVersionOverride>
                            Supply the original version (without the RH version)
      --overwrite           Overwrites existing pom. Dangerous!
  -p, --configPath=<configPath>
                            Path to PNC configuration folder
      --profile=<profile>   PNC Configuration profile
      --push                Pushes changes to the remote repository. Will still commit
      --repository=<repository>
                            Skips cloning and uses existing repository
      --skip-sync           Skips any syncing and only clones the repository and performs the patching
      --url=<url>           External URL to git repository
  -v, --verbose             Verbose output
  -V, --version             Print version information and exit.

Typical usage:

java -jar target/rpm-importer-parent-<version>.jar --url=https://pkgs.devel...../git/rpms/<repository> --branch=jb-eap-8.1-rhel-9

Notes: