[distcc] Re: crosstool and .rpm's

Ralf Corsepius corsepiu@faw.uni-ulm.de
Wed Jul 28 06:50:00 GMT 2004


On Wed, 2004-07-28 at 05:47, Dan Kegel wrote:
> Ralf Corsepius wrote:
> > ... different rpm/rpmbuild implementations (e.g. RH/FC) are not able to
> > handle installations to outside of "/" or "/usr" (e.g. "/opt").
> 
> I'm using Red Hat 9's rpmbuild to build packages that install
> to /opt.  Are you saying Fedora's rpmbuild can't handle that?
No, I am saying that RH and FC's rpmbuild have various problems in
dealing with details if not installing to /usr.

For example, "compressing man/info pages".

The responsible part in RPM is /usr/lib/rpm/redhat/brp-compress. Instead
of using %{_mandir} it examines a set of hard-coded paths:
...
for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \
        ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \
        ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man*
\
        ./usr/share/doc/*/man/man* ./usr/lib/*/man/man*
...
=> If installing manpages outside of these directories or if redefining
%_mandir in an rpm spec, man-pages will stay uncompressed.

SuSE's brp-compress behaves differently, because they install packages
to /opt (IIRC, they consider %_mandir).


Other issues raise when you might be tempted to redefine rpm's %_XXXdir
defines, because you assume rpmbuild to extend it's "internal work"
(compression, extracting debug info, dependency computation etc.) them:
E.g.:
rpm --define '_prefix /opt' --showrc | grep mandir
...
-14: _mandir    /usr/share/man
...
Unlike you'd probably expect, %_mandir is not redefined.

However, others are:

# rpm --define '_prefix /opt' --showrc | grep exec_prefix
...
-14: _bindir    %{_exec_prefix}/bin
-14: _exec_prefix       %{_prefix}
-14: _libdir    %{_exec_prefix}/%{_lib}
-14: _libexecdir        %{_exec_prefix}/libexec
-14: _sbindir   %{_exec_prefix}/sbin
...

Ralf




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list