[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: redhat-rpm-config



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 23 April 2003 3:09 pm, Jeff Johnson wrote:
> On Wed, Apr 23, 2003 at 11:52:53AM -0700, Aaron Hanson wrote:
> > It seems that if /usr/lib/rpm/redhat/macros is present, it overrides
> > /usr/lib/rpm/macros. This is what I'm seeing. And the redhat glib source
> > rpm only builds with the redhat version of macros.
>
> Yes, overrides, but you claimed no (well strangely) %configure w/o
> redhat-rpm-config.

Speaking of overriding macros:

We need to add our own set of macros to rpm. Previously, this had been 
complicated, but only involved listing our macros file in one file 
%{_libdir}/rpm/rpmrc.

Now with the release of RedHat 9, we specifically look for both 
%{_libdir}/rpm/rpmrc and %{_libdir}/rpm/redhat/rpmrc. The problem now is that 
there is no sane way (even with one file) to add macros to rpm. We can't even 
assume that an additional rc file will take the form of  
%{_libdir}/rpm/%{_vendor}/rpmrc.

Is there any way planned of making it easier to add custom macros to the 
system? Maybe a system like /etc/profile.d uses where each macro in that 
directory is 'sourced' somehow by rpm?

Currently, I use a script like the following (I'd appreciate any comments):

postuninstall scriptlet (through /bin/sh):
if [ "$1" = "0" ]; then
    for i in /usr/lib/rpm/rpmrc /usr/lib/rpm/redhat/rpmrc; do
        if test -f "$i" && egrep -q '^macrofiles:.*/etc\/rpm\/macros\.custom' 
"$i"; then
            perl -p -i -e 's,(^macrofiles:.*):/etc\/rpm\/macros\.custom,$1,' 
"$i"
        fi
    done
fi

triggerin script (through /bin/sh) -- rpm, redhat-rpm-config, 
/usr/lib/rpm/rpmrc, /usr/lib/rpm/redhat/rpmrc
for i in /usr/lib/rpm/rpmrc /usr/lib/rpm/redhat/rpmrc; do
    if test -f "$i" && ! egrep -q '^macrofiles:.*/etc\/rpm\/macros\.custom' 
"$i"; then
        perl -p -i -e 's,(^macrofiles:.*$),$1:/etc\/rpm\/macros\.custom,' "$i"
    fi
done

- -- 
Sincerely,

David Walluck
<david@anti-microsoft.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+puppJB7s/tlHKVIRAm82AKCNGLP0hqKH+OuTSIFNS9k7JzEZ/gCfeIwH
HT0HcMQJx6qZdfIlGao2V2g=
=DoTf
-----END PGP SIGNATURE-----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []