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

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

 



On 02/02/2018 02:21 AM, Tomasz Kłoczko wrote:
On 1 February 2018 at 23:42, Germano Massullo <germano.massullo@xxxxxxxxx <mailto:germano.massullo@xxxxxxxxx>> wrote:
[,..]

    you will obviously get

    error: File /home/user/rpmbuild/SOURCES/bettercap-ng-eb1a53e.tar.gz:
    No such file or directory.

    Therefore I think wiki line

    Source0:
    https://github.com/OWNER/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz

    should be changed into

    Source0:
    https://github.com/OWNER/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz

    Am I right?


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

Also, while it doesn't really help for retrieving upstream sources (except for fetching stuff from the dist-git lookaside cache), but the filenames of sources and patches are retrievable with a direct --srpm query too, eg:

$ rpmspec -q --srpm --qf "[%{PATCH}\n]" rpm.spec
rpm-4.13.90-ld-flags.patch
rpm-4.7.1-geode-i686.patch
rpm-4.12.0-rpm2cpio-hack.patch
rpm-4.9.90-no-man-dirs.patch
rpm-4.13.0-fedora-specspo.patch
rpm-4.11.x-siteconfig.patch

	- 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