Bugzilla – Bug 157894
rpm macro %_libexecdir has a bad value
Last modified: 2007-09-03 12:28:19 UTC
According to FHS, %_libexecdir should be set to something like /usr/lib/%name. It should not contain %_libdir nor %prefix/libexec. It is not set correctly in current RPM: grep _libexecdir $(rpm -ql rpm) /usr/lib/rpm/macros:%_libexecdir %{_exec_prefix}/libexec /usr/lib/rpm/macros: --libexecdir=%{_libexecdir} \\\ /usr/lib/rpm/macros: libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\ /usr/lib/rpm/macros: %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} %* ; \ /usr/lib/rpm/noarch-linux/macros:%_libexecdir %{_libdir} /usr/lib/rpm/x86_64-linux/macros:%_libexecdir %{_libdir} /usr/share/doc/packages/rpm/manual/macros: %_libexecdir %{_exec_prefix}/libexec Currently only package namazu uses this macro. From: Thorsten Kukuk Subject: Re: [packagers] libexecdir=/usr/%_lib and *-32bit packages Date: Mon, 11 Oct 2004 13:55:42 +0200 ... The correct value for --libexecdir as defined by FHS is: --libexecdir=/usr/lib/%{name} and nothing else. There are some few exceptions because of 32bit/64bit differences, but this should really be an exception.
Stanislave Brabec> Currently only package namazu uses this macro The "namazu" package redefines it to "/srv/www/cgi-bin" though: %define _libexecdir /srv/www/cgi-bin [...] export CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \ [...] --libexecdir=%{_libexecdir} \
I doubt that FHS talks about rpm macros. You're supposed to use %_libexecdir/%name in your packages.
If I will use %_libexecdir/%name, I will break FHS, because %_libexecdir is not /usr/lib (note that /usr/%_lib is not correct). I have either to redefine the _libexecdir or use my own path.
/usr/lib doesn't work for multiarch binaries ("exec" == binaries stored here). rpm is now compatible to the other distributions, I will not change this.
/usr/lib is the only path which works with works for libexec helpers. Our baselibs never contain binaries and both 32 and 64 bit libraries must call the same helper. For example of bug while using libexecdir=%_libdir see bug 62050.