#12 Research %forgemeta macros
Opened 2 years ago by ttomecek. Modified 2 years ago

We should investigate if and how the %forgemeta macros are compatibe with our implementation of source-git:

https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_branch_example

I recall we already touched this topic but never made it actionable, this is why I'm creating this issue.

Suggested here: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/T2ONMPIEDXU4YFY7KUUKTYACZGKO7KYI/


quick example to consider

(1)
a COPR git-source<-commit spec build, from @pagure gitlab-mirrored source
(https://download.copr.fedorainfracloud.org/results/pgfed/spamassassin-milter/fedora-34-x86_64/02302308-spamassassin-milter/spamassassin-milter.spec)

    %define _spamassassin_milter_version      HEAD
    %global forgeurl0   https://pagure.io/pgnd/spamassassin-milter-UPSTREAM-MIRROR
    %define _ctag0      %{_spamassassin_milter_version}
    %global commit0     %( git ls-remote %{forgeurl0} | grep %{_ctag0} | cut -f1 )

works.

(2)
so does a COPR git-source<-branch spec build, 'direct' from gitlab
(https://download.copr.fedorainfracloud.org/results/pgfed/spamassassin-milter/fedora-34-x86_64/02302309-spamassassin-milter-TEST/spamassassin-milter-TEST.spec)

    %define _spamassassin_milter_branch       master
    %define _spamassassin_milter_shortbranch  HEAD
    %global forgeurl    https://gitlab.com/glts/spamassassin-milter
    %global branch      %{_spamassassin_milter_branch}

(3)
but a similar COPR git-source<-branch spec build, from the same @pagure gitlab-mirrored source as above, changing only

    %define _spamassassin_milter_branch       master
    %define _spamassassin_milter_shortbranch  HEAD
-   %global forgeurl    https://gitlab.com/glts/spamassassin-milter
+   %global forgeurl    https://pagure.io/pgnd/spamassassin-milter-UPSTREAM-MIRROR
    %global branch      %{_spamassassin_milter_branch}

FAILs
(https://download.copr.fedorainfracloud.org/results/pgfed/spamassassin-milter/srpm-builds/02302315/builder-live.log.gz)

stderr: warning: Downloading https://pagure.io/pgnd/spamassassin-milter-UPSTREAM-MIRROR/archive/master/pgnd-spamassassin-milter-UPSTREAM-MIRROR-master.tar.gz to /var/lib/copr-rpmbuild/results/pgnd-spamassassin-milter-UPSTREAM-MIRROR-master.tar.gz
curl: (22) The requested URL returned error: 404
error: Couldn't download https://pagure.io/pgnd/spamassassin-milter-UPSTREAM-MIRROR/archive/master/pgnd-spamassassin-milter-UPSTREAM-MIRROR-master.tar.gz

(1), (2) & (3) should all work

as should any/all forgemeta methods , with all 'supported' scm hosts -- esp github, gitlab & pagure

Login to comment on this ticket.

Metadata