I have a .spec
file:
Name: somefile
Version: 1.0.0
Release: 1%{?dist}
...
Which produces an RPM:
somefile-1.0.0-1.fc30.fc30.noarch.rpm
Why is %{dist}
applying .fc30
twice? If I remove %{dist}
then I end up with a file:
somefile-1.0.0-1.noarch.rpm
The value of %{dist}
, according to rpm is just .fc30
, as expected:
$ rpm --eval %{dist}
.fc30
UPDATE
It seems to duplicate the last part no matter what it is:
Release: 1.123
This gave me a file: somefile-1.0.0-1.123.123.noarch.rpm
.
UPDATE
This seems to be a result of the dist macro:
$ rpm --showrc | grep ' dist'
-13: dist %{?distprefix}.fc30%{?with_bootstrap:~bootstrap}
Am I using it wrong?
rpm --eval %_rpmfilename
say? Does that give you any hints? Try to follow the fields from there and expand them withrpm --eval
to see if you find which one is duplicating the last field...%{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm
_rpmfilename
? How are you building the RPM, are you usingrpmbuild -ba
directly or are you using a wrapper around it (which could be passing additional options)?rpmbuild
directly with no wrapper. I did not redefine any variables.%define
insidesomefile.spec
?