Re: convert everything to rpmautospec?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux