Bug 2035935 - [forge macros RFE] Please support git.sr.ht
Summary: [forge macros RFE] Please support git.sr.ht
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Festi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-28 17:06 UTC by Maxwell G
Modified: 2022-09-08 18:27 UTC (History)
13 users (show)

Fixed In Version: redhat-rpm-config-231-1.fc38
Clone Of:
Environment:
Last Closed: 2022-09-08 18:27:37 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)

Description Maxwell G 2021-12-28 17:06:53 UTC
Description of problem:
The forge macros do not currently support git.sr.ht. Can you please consider implementing support? I would submit a PR, but unfortunately, I'm not competent enough in lua.

Version-Release number of selected component (if applicable):
redhat-rpm-config-199-1.fc35.noarch

How reproducible:

See https://src.fedoraproject.org/fork/gotmax23/rpms/aerc/blob/rawhide/f/aerc.spec for an example. The go macros depend to the forge macros, so in order to use a source archive from git.sr.ht, it is necessary to define 8 extra macros.

```

# https://git.sr.ht/~rjarry/aerc
%global goipath         git.sr.ht/~rjarry/aerc
%global forgeurl        https://git.sr.ht/~rjarry/aerc
Version:                0.6.0
%global tag             %{version}
%global repo            aerc
%global archivename     %{repo}-%{tag}
%global archiveext      tar.gz
%global archiveurl      %{forgeurl}/archive/%{tag}.%{archiveext}
%global topdir          %{archivename}
%global extractdir      %{archivename}
%global scm             git

%forgemeta
```

As you can see, the archiveurls are generated using `%{forgeurl}/archive/REF.%{archiveext}`. `REF` can be a commit, tag, or a branch.

Thanks,
Maxwell

Comment 1 Maxwell G 2021-12-28 17:34:52 UTC
Also, please not that git.sr.ht does not strip `v` from tag names in the source archive's top-level directory. Let's take my ansible-role-pass project that's mirrored to Github and git.sr.ht as an example.

For the tag `v0.0.5`, the Github %archiveurl is `https://github.com/gotmax23/ansible-role-pass/archive/v0.0.5/ansible-role-pass-0.0.5.tar.gz` and the archive's top level directory is `ansible-role-pass-0.0.5`. On git.sr.ht,the %archiveurl is `https://git.sr.ht/~gotmax23/ansible-role-pass/archive/v0.0.5.tar.gz, but the archive's top-level directory is `ansible-role-pass-v0.0.5`.

Comment 2 Fedora Update System 2022-09-08 18:18:00 UTC
FEDORA-2022-04c56f206a has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-04c56f206a

Comment 3 Fedora Update System 2022-09-08 18:27:37 UTC
FEDORA-2022-04c56f206a has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.