The `%patchN` method of performing patches in `%prep` has long been
deprecated and should no longer be used. The form of `%patch -PN` is
preferred for maximum compatibility between all current and upcoming
EL releases.
This commit attempts to merge in custom changes on distrobuild. In
particular:
* Imports
* Package: If there are no changes, do not import. This currently
returns as an error, so may need adjusting.
* Module: Import, regardless if there is changes or not. MBS cares
more about the fact there's a commit associated with a module build.
It will not build off the same commit ID.
* Add --module-branch-names-only flag to make it so module yamls will
have a branch name rather than commit ID. This makes it easier to
work with MBS.
* Fixes
* tagless imports should use the _topdir macro, otherwise a bug may
surface where macros or other data cannot be determined, and a
cryptic error may display.
- Manual commits work properly again, and are passed to "tagless mode" for version discovery + tagging
- Fixed tagless mode issue with rpmspec warnings, only stdout is considered
- Fixed tagless mode issue where renamed folders were not properly overwritten, causing potential bad commits
-Skip G.
- Greatly simplified getVersionFromSpec function due to rpmspec usage
- Function now returns error info in case rpmspec shell command goes wrong
-Skip Grube
- Added template "macros" to allow for complex --cdn-url specifications ( {{.Name}}, {{.Branch}}, etc.)
- Added --cdn <distro> option with pre-set URL patterns to simplify use
- Kept default fallback behavior and search patterns of --cdn-url if templates are not used
- Removed "--altlookaside" option, as the above features make it redundant
- Automatic tagless: If a proper git version/imports tag isn't found, a "tagless-mode" import will be attempted automatically at run-time
- taglessmode command line option kept in case user still wants to force a tagless import
-Skip Grube
In order to build from lookahead sources, srpmproc must support the new gitlab address for centos 9 stream as well as manipulating the sources to expected format.
Resolves#2.
- Options for tagless import and new stream lookaside format added
- Git Mode now supports scanning for branch head in addition to the "normal" pulling of specific version tags
- Alternate ProcessRPM added for Tagless mode in process.go (still a WIP)
- Tagless mode converts a repo to the "traditional" format (SPECS/ + SOURCES/ + <pkg>.metadata )
- Tagless mode will build a dummy srpm to determine NVR information (rpmbuild + rpm shell commands) (will use this to tag imports in the target git)
- Limitation: Tagless imports only pull the latest head from a branch
- CentOS-Stream import branches are converted from stream-<MODULE_VERSION>-<RHEL_VERSION> to the more familiar r9s-stream-<VERSION>
- stream-style YAML is detected and converted for modules, similar to the older modulemd.src.txt files
- This new pattern is for "tagless mode" only, previous tagged imports (from git.centos.org) should not be affected
tmpfs is absolute path.
The test case of absolute path is below:
[root@rockylinux86 ~]# srpmproc --version 8 --upstream-prefix file:///root/rocky --storage-addr file:///tmp/srpmproc-cache --source-rpm sed --tmpfs-mode /root/rocky/rpms/sed
[root@rockylinux86 ~]# ls /root/rocky/rpms/sed/
r8 r8-beta r8s
The test case of relative path is below:
[root@rockylinux86 ~]# pwd
/root
[root@rockylinux86 ~]# srpmproc --version 8 --upstream-prefix file:///root/rocky --storage-addr file:///tmp/srpmproc-cache --source-rpm sed --tmpfs-mode ./rocky/rpms/sed
[root@rockylinux86 ~]# ls /root/rocky/rpms/sed/
r8 r8-beta r8s
Signed-off-by: jarod.w <wl.jarod@gmail.com>