Commit Graph

156 Commits

Author SHA1 Message Date
Mustafa Gezen f2864a875a
Merge pull request #16 from dirkmueller/openela
Support the openELA "PATCHES" directory format as well
2023-11-16 18:04:50 +01:00
Dirk Müller 82271f5d9e
Support the openELA "PATCHES" directory format as well 2023-11-06 16:53:43 +01:00
Mustafa Gezen 963b5d25dd
Fix goreleaser archive name template 2023-10-06 08:13:19 +02:00
Mustafa Gezen a5f9082c15
Be compatible with latest goreleaser 2023-10-06 08:05:29 +02:00
Mustafa Gezen f2374845e3
Merge pull request #15 from nazunalika/main 2023-10-06 07:56:14 +02:00
Louis Abel 162e7cea34
continue as it's a loop 2023-09-19 17:16:08 -07:00
Louis Abel edeb0239df
Add two features and one fix
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.
2023-09-05 03:50:43 -07:00
Mustafa Gezen 40180a342b
Merge pull request #11 from skip77/manual-commits-fix
Manual commits fix
2023-03-12 03:06:01 +01:00
skip77 7f14563f93
Merge branch 'rocky-linux:main' into manual-commits-fix 2023-03-11 17:38:18 -05:00
Mustafa Gezen 6e2ed2eb23
Merge pull request #8 from skip77/main 2023-03-11 23:26:54 +01:00
Skip Grube 44725a727d
Repaired manual commits feature and added some bugfixes:
- 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.
2023-03-05 22:04:20 -05:00
Skip Grube 4f975913b4
Removed old commented line
-Skip
2023-02-28 16:23:51 -05:00
Skip Grube 3371826851
Fixed up formatting issues from rpmspec commit
-Skip G.
2023-02-28 15:25:11 -05:00
skip77 f4f2a0a9e4
Merge branch 'rocky-linux:main' into main 2023-02-27 16:32:24 -05:00
skip77 5e8ed2e521
Fix Default cdn behavior (#9)
- CDN returned as-is for processing if no template indicators are found

-Skip G.
2023-02-27 15:26:21 -05:00
Skip Grube 2eb0768f33
Switched to using rpmspec for version determination in tagless mode:
- Greatly simplified getVersionFromSpec function due to rpmspec usage
- Function now returns error info in case rpmspec shell command goes wrong

-Skip Grube
2023-02-26 22:59:24 -05:00
Mustafa Gezen 2c6d6f0b0a
Merge pull request #7 from skip77/main 2023-02-24 02:16:54 +01:00
Skip Grube 0ea6123b6e
More cleanup from feedback
- Removed extra lines
- Externalized Lookaside struct{}

-Skip Grube
2023-02-23 13:57:21 -05:00
Skip Grube 2cc3bcc3a3
Updated cdn-related commits for style and cleanup
-Skip Grube
2023-02-23 12:31:31 -05:00
Skip Grube 3237794071
Updates to add flexibility to lookasides and tagless handling:
- 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
2023-02-22 23:23:47 -05:00
Mustafa Gezen 06ffd1e507
Support ~ and % in Release 2022-11-15 15:14:59 +01:00
Mustafa Gezen 29778c7ea2
Proper NVR matching 2022-11-06 04:54:35 +01:00
Mustafa Gezen 2a2b10ba10
Formatting 2022-11-06 04:53:02 +01:00
Mustafa Gezen e859f54e5e
Supported Go version is now 1.18 2022-11-03 04:39:57 +01:00
Mustafa Gezen f3ac46447d
Stop converting v3 to v2 2022-11-03 04:36:25 +01:00
skip77 cff0cc0fbf
feature: "tagless import" feature mode (#4)
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
2022-09-27 23:32:50 -04:00
Mustafa Gezen 9b44bc6e50
Merge pull request #5 from jarod-w/main 2022-09-12 21:13:13 +02:00
jarod.w d7ed1c7a7f Fix the issue that nothing is ever written to tmpfs location when the
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>
2022-09-11 17:52:36 +08:00
Neil Hanlon 1c2091a489
Merge pull request #3 from NeilHanlon/main
Add s390x and ppc64le to builds
2022-06-03 13:57:11 -04:00
Neil Hanlon aacedb189f
Add s390x and ppc64le to builds 2022-06-03 13:56:05 -04:00
Mustafa Gezen 6df2fe1e3f Fix NVR regex 2022-05-10 16:32:31 +02:00
Mustafa Gezen e889daa21f Regex arguments should be escaped 2022-05-10 12:02:37 +02:00
Mustafa Gezen 3f4c4ad211 Fetch should conform to metadata format 2022-05-10 10:34:02 +02:00
Mustafa Gezen 6ab7f9f00a Metadata file not being found should throw an error 2022-05-10 09:35:48 +02:00
Mustafa Gezen 16ad80fdeb Support inconsistent metadata naming and case-insensitive tags 2022-05-09 19:57:43 +02:00
Mustafa Gezen 8199a79889 Add support for version/release based fetching 2022-05-05 04:25:07 +02:00
Mustafa Gezen f7017a9eac Fix NVR regex for versions with a percentage, and fix dist regex for any EL 2022-05-02 10:39:42 +02:00
Mustafa Gezen dd7fd31ebb retry fetching patch repo if the error is invalid auth method 2022-04-24 15:53:36 +02:00
Mustafa Gezen bc9d81bd8e Strict branch mode should still include module streams 2022-04-23 22:56:39 +02:00
Mustafa Gezen a84d5e5b62 fix non strict branch mode 2022-04-22 01:44:18 +02:00
Mustafa Gezen 45ad998d41 non-tmpfs mode should use memfs 2022-04-21 07:39:10 +02:00
Mustafa Gezen a97ccb698b add support for modulemd v3 2022-04-21 07:25:44 +02:00
Mustafa Gezen 61eaa8b8f8 fix tmpfs mode, replace stream mode with branch suffix and strict mode 2022-04-21 06:30:33 +02:00
Mustafa Gezen 8f55eb397f enhancement: add support for downloading from blob storage instead of http endpoint 2022-04-03 04:29:49 +02:00
Mustafa Gezen 8f00773aac fix: disabling auto align should always return one space 2022-03-28 19:55:40 +02:00
Mustafa Gezen 2fafebaee8 Add support for disabling auto align 2022-03-28 19:49:55 +02:00
Mustafa Gezen e0081b4ad9 Retry without authentication when upstream REQUIRES authentication and add support for basic auth in CLI 2022-03-25 18:54:23 +01:00
Mustafa Gezen 08aed871a3 Try the common authenticator for upstream then try without if failing 2022-03-25 18:40:09 +01:00
Mustafa Gezen 70c4c22665 Add authenticator to all Git calls (makes it possible to have private repos) 2022-03-25 17:39:50 +01:00
Mustafa Gezen 102ff0427a
enhancement: allow callers to use custom loggers 2022-01-05 15:42:49 +01:00