#35 rpmdevtools does not understand %{!?SOURCE0:Source0
Opened 6 years ago by nim. Modified 3 years ago

I have a set of macros that automate the very repetitive setting of github source urls (basically they expand to Source0: computed-url)

They've been working perfectly so far in rpmbuild -bs and spectool -g

Because I hit a project that managed to put a release at a non-standard place, I want to give myself and other users of the macro the possibility to override this automation. Therefore I added
%{!?SOURCE0 protection around this part (do not define this if SOURCE0 is already defined)

rpmbuild understands it perfectly
spectools stops recognizing any source url :(

(I can't just stop using this macro for this spec, it does a lot of other useful stuff)

I consider this a bug in spectool, please fix it

rpmdevtools-8.10-3.fc27.noarch


Testcase macros

Just remove the %{!?SOURCE0 in line 17 of /usr/lib/rpm/macros.d/macros.forge-srpm (or change if to %{!?foo) and spectool -g starts working

golang-srpm-macros-1-93.fc28.llt.noarch.rpm

I think this is fixed with rpmdevtools 9+ / fedora 33?

Login to comment on this ticket.

Metadata