Commit graph

20 commits

Author SHA1 Message Date
ca72c7b7fc
forgeversion: make sure nothing is stored in distprefix
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2359090
2025-05-31 16:36:29 -05:00
a920e70dc2
macros: adjust forge{auto,}setup macros to reflect current practice
forgeautosetup is utilized by almost 300 packages and is generally
useful for single-source specfiles — i.e., the large majority of cases —
so there are no plans to remove it.
For non-forge packages, the default in Fedora is to use `%autosetup` so
patches are automatically applied; it makes sense to adopt the same
practice for the forge macros.
2024-10-20 22:01:28 -05:00
6be567e9c6
Add support for go.googlesource.com and tests
Fixes: rhbz#2303884
2024-08-13 16:56:46 -05:00
d8a5b8c184
macros: entirely remove the Release defined warning
This seems to cause false positives. Let's nix it completely.
2024-08-06 20:15:21 -05:00
9e9ff33b6e
forgeversion: make version set after release a warning
Let's make parsing a bit more resilient.
2024-04-07 04:09:39 +00:00
a447b944e7
lint: add missing license header 2024-03-02 18:48:03 +00:00
a5539f0b7f
Restore compatibility with RPM 4.16
I have made the decision to restore compatibility with EL 9 and pause
efforts in https://todo.sr.ht/~gotmax23/forge-srpm-macros/3 to continue
adopting new RPM 4.17+ features.

Packagers have requested the ability to use %forgeversion on EL 9, and
we need to support it for tools like Packit and Zuul CI that build SRPMs
in CentOS Stream containers to be able to adopt it.

Relates: https://todo.sr.ht/~gotmax23/forge-srpm-macros/3
2024-03-02 18:38:16 +00:00
48679d415e
add _forge_util.lua module to simplify macro lookups
We'll rely on this until we can drop support for RPM 4.16 and RHEL 9.
The function have similar behavior to the macros table in the way that
they handle undefined macros.
2024-03-02 18:38:14 +00:00
8ddd2f14aa
change %forge macro with %forgename macro
Support for specifying forge schemes for unrecognized forges was added
in 6bd567d2ea.
This changes the macro name used to define the forge scheme from
`%forge` to `%forgename` to avoid potential namespace conflicts.
6bd567d2ea was never released, so this
should not break any package in the wild.
2023-12-07 05:12:17 +00:00
bac2df0ae2
forge.lua: format forge variables table 2023-11-04 17:50:13 +00:00
6bd567d2ea
Allow specifying a custom forge scheme
Users may wish to use the forge macros with self-hosted forges. Instead
of having to hardcode every single forge mapping, this allows users to
choose a forge scheme themselves.
2023-09-07 22:50:35 +00:00
240313d3d2
forge.lua: fix indentation 2023-09-04 20:33:27 +00:00
354ce4a51e
add -b flag to %forgeversion; update test vectors
This allows using %forgeversion with a custom base version.
2023-08-18 17:54:24 +00:00
f06ccd7dff
%forgeversion: use %version0 instead of %version
See the discussion in
https://pagure.io/packaging-committee/pull-request/1295.
Note that `fedora.zalias` sets %version0 to %version if the former is
not set, but this change makes sure that %version0 is preferred if the
macros are set differently.
2023-08-18 17:52:35 +00:00
145b7fc72a
add %forgeversion to add snapshot info to Version
See the %forgeversion docstring for usage
2023-08-13 16:57:01 +00:00
ee028f92fc
forge.lua: add missing archiveext for pagure_ns_fork
Previously, the forge macros attempted to download nonexistent .tar.bz2
archives for Pagure namespace forks.
2023-08-13 07:09:28 +00:00
407f690676
forge.lua: fix syntax error for pagure_ns_fork
The configuration for Pagure namespace fork repositories had a syntax
error (missing parenthesis).
2023-08-13 07:09:28 +00:00
eef674b8b2 forge: Allow unlimited subgroups in GitLab URLs
GitLab allows one to create groups within groups up to 20 levels [1],
but we really don't need to check that. One can just take the last
part of the path and treat that as the repo, instead of assuming it's
always domain.tld/group/repo.

[1] https://docs.gitlab.com/ee/user/group/subgroups/index.html
2023-03-27 19:28:02 -05:00
916ef82bd5
add support for codeberg 2023-03-27 16:18:54 -05:00
37da5d7bf9
init 2023-03-27 14:08:22 -05:00