Le lundi 04 mai 2020 à 17:31 +0100, José Abílio Matos a écrit :
On Monday, 4 May 2020 16.41.26 WEST Richard Shaw wrote:
> For the longest time I at least overrode it so it wouldn't mix
everything
> together by putting the package name in the mix: rpmbuild/<pkg>/...
So did I, for the last 16 years I have in ~/.rpmmacros
%_topdir /home/jamatos/rpm/
%_rpmtopdir %{_topdir}/build/%{?name:%name}
%_sourcedir %{_rpmtopdir}
%_specdir %{_rpmtopdir}
%_rpmdir %{_rpmtopdir}
%_srcrpmdir %{_rpmtopdir}
That is broken nowadays because rpm 4.15 evaluates %{_sourcedir}
before reading the spec file that sets %{name}, rpm 4.16 will warn
loudly of the use of an unitialised variable in %{_sourcedir} (things
still work, for now) and a future rpm release will probably error not
warn on those.
warning: undefined macro(s) in %{_sourcedir}:
…/rpmbuild/SOURCES/%{name}
You may fool things for a while with the %_rpmtopdir + %{?name:%name}
but I doubt that will survive the purge long.
Regards,
--
Nicolas Mailhot