RPM

Comment 0 for bug 633759

Revision history for this message
In , Matt Sealey (mwsealey) wrote :

I had some real trouble with xorg-x11-libs (see dependent bug) and kernel-source/kernel-$flavor overwriting files from each other and am sure plenty of other SRPMS share filenames (especially post/pre scripts named "post.sh" for example). In the default macros in /usr/lib/rpm/macros, every package is set to dump themselves into /usr/src/packages/SOURCES and /u/s/p/SPECS.

Obviously people using build/lbuild/obs don't see the problem, but in any case sometimes it is not a great idea or feasible to keep around a local repository in order to build a simple RPM package, and using only rpmbuild without too much fuss could be the quickest way.

I just had a suggestion from the kernel team who suggested I set my ~/.rpmmacros to either something like:

%_sourcedir %{_topdir}/SOURCES/%{name}-%{version}
(etc.)

or something like:

%_sourcedir /home/jeffm/src/packages/%{name}
%_specdir /home/jeffm/src/packages/%{name}
%_builddir /home/jeffm/src/packages/BUILD

It was recommended to file a bug to this effect since there is apparently a non-zero number of people aggravated by the default behaviour.

Could the default rpm behavior for source packages is to install them into a seperate directory so that kernel-* RPMs and potentially many others do not walk all over each other or perhaps can do crazy things like extract all the *.tar.bz2 in the %_sourcedir with wild abandon and not cause a problem?

NOTE: this may cause a problem when building kernel-flavor RPM packages as some Sources: are kept in the kernel-source RPM and not the kernel-flavor RPM, but this is something maybe the kernel guys can manage.