Re: Packaging wiki: shortcoming in Github Source0 (?)

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

 



On 02/02/2018 04:51 PM, Tomasz Kłoczko wrote:
On 2 February 2018 at 08:49, Panu Matilainen <pmatilai@xxxxxxxxxx <mailto:pmatilai@xxxxxxxxxx>> wrote:
[..]

        You need to download Source0 first.
        Try:

        $ wget -P ~/rpmbuild/SOURCES $(rpmbuild -bp --define "prep
        %dump" bettercap.spec 2>&1 | awk '/SOURCEURL0/ {print $3}')


    That's a rather arcane way of getting something out of the spec, you
    might want to give 'rpmspec --parse' a try. Eg

    $ rpmspec --parse rpm.spec |awk '/Source/ {print $2}'
    http://rpm.org/releases/testing/rpm-4.14.90-git14108.tar.bz2
    <http://rpm.org/releases/testing/rpm-4.14.90-git14108.tar.bz2>


Just try to change in the spec file s/Source/SOurce/ and you will find that your onliner will fail when mine still will be working.

And case-sensitivity on matching is of course is an insurmountable problem to solve...

/me rolls eyes

Use whatever works for you, I just felt obliged to point out that there is an actually "official" rpm upstream tool for obtaining information from the spec, without relying on arcane hacks that rely on what amounts to a flaw in rpm (ability to redefine section names).

	- Panu -
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [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