On Tue, Apr 09, 2024 at 05:02:00PM +0000, Zbigniew Jędrzejewski-Szmek wrote:
> On Tue, Apr 09, 2024 at 03:38:07PM +0200, Gerd Hoffmann wrote:
> > > In particular:
> > > - local builds work, I do them all the time, with 'fedpkg local' or
> > > through an srpm.
> >
> > Using rpmbuild directly needs some adaption though:
> >
> > (1) Use 'rpmautospec calculate-release' to figure what the release
> > number is.
> > (2) Pass that to rpmbuild using --define "_rpmautospec_release_number $nr".
>
> I don't use rpmbuild directly very often, but:
> fedpgk srpm
> fedpkg local
> work fine both when there are uncommitted modifications and when not.
> I actually use "fedpkg srpm && mock $options $(ls -1tr *.src.rpm|tail -n1)"
> all the time, and that also works with and without uncommitted modifications.
>
> What goes wrong if _rpmautospec_release_number is not difined?
I've hacked my build script to always set it ...
if grep -q autorelease "$SRCDIR/$specfile"; then
autorelease="$(rpmautospec calculate-release)"
autorelease="${autorelease##* }"
echo "autorelease is $autorelease ..."
else
autorelease="99"
fi
rpmbuild \
--define "_rpmautospec_release_number $autorelease" \
$more_args
... because something broke, but I don't remember what exactly it was.
Maybe just that the numbering differed from koji/copr builds.
take care,
Gerd
--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue