From d975fc66c1ef58b126202a7ec93c851dc8524c6e Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 20 Nov 2008 23:50:00 +0000 Subject: [PATCH] Introduce /usr/lib/rpm/macros.d/ (ALT#17948) --- configure.in | 2 +- platform.in | 2 +- rpm-4_0.spec | 12 ++++-------- rpmrc.in | 2 +- scripts/0common-files.req.list | 2 ++ 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/configure.in b/configure.in index 6428e69..1bd9396 100644 --- a/configure.in +++ b/configure.in @@ -943,7 +943,7 @@ AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR", [Full path to rpm system configuration directory (usually /etc/rpm)]) AC_SUBST(SYSCONFIGDIR) -MACROFILES="${RPMCONFIGDIR}/macros:${RPMCONFIGDIR}/%{_target_platform}/macros:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/macros.specspo:${SYSCONFIGDIR}/macros.db1:${SYSCONFIGDIR}/%{_target_platform}/macros:~/.rpmmacros" +MACROFILES="${RPMCONFIGDIR}/macros:${RPMCONFIGDIR}/%{_target}/macros:${RPMCONFIGDIR}/macros.d/*:${SYSCONFIGDIR}/macros.specspo:${SYSCONFIGDIR}/macros.db1:${SYSCONFIGDIR}/macros.cdb:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/%{_target}/macros:${SYSCONFIGDIR}/macros.d/*:~/.rpmmacros" AC_DEFINE_UNQUOTED(MACROFILES, "$MACROFILES", [Colon separated paths of macro files to read.]) AC_SUBST(MACROFILES) diff --git a/platform.in b/platform.in index 9740bb7..7b35d7e 100644 --- a/platform.in +++ b/platform.in @@ -260,7 +260,7 @@ @alt@ \ @alt@ export MAKEFLAGS=\"-w PAM_SO_SUFFIX=%{?_pam_so_suffix}\"\ @alt@ \ -@alt@ %{expand:%(cat @SYSCONFIGDIR@/macros.d/*.env)}\ +@alt@ %{expand:%(cat @RPMCONFIGDIR@/macros.d/*.env @SYSCONFIGDIR@/macros.d/*.env 2>/dev/null)}\ @alt@ \ @alt@ %{verbose:set -x}%{!verbose:exec > /dev/null}\ @alt@ umask 022\ diff --git a/rpm-4_0.spec b/rpm-4_0.spec index 965e7aa..478a23b 100644 --- a/rpm-4_0.spec +++ b/rpm-4_0.spec @@ -31,12 +31,10 @@ Group: System/Configuration/Packaging Url: http://www.rpm.org/ Packager: Dmitry V. Levin -# 1. ftp://ftp.rpm.org/pub/rpm/dist/ -# 2. cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel export -r rpm-4_0 rpm -# 3. ALT Linux CVS +# http://git.altlinux.org/people/ldv/packages/?p=rpm.git Source: %srcname.tar -Provides: %_sysconfdir/%name/macros.d +Provides: %_rpmlibdir/macros.d, %_sysconfdir/%name/macros.d PreReq: lib%name = %version-%release, librpmbuild = %version-%release PreReq: alt-gpgkeys, coreutils, /bin/sh @@ -271,7 +269,7 @@ chmod a-w %buildroot%_usrsrc/RPM{,/RPMS/*} #mkdir -p %buildroot%_sysconfdir/logrotate.d #install -p -m640 scripts/%name.log %buildroot%_sysconfdir/logrotate.d/%name -mkdir -p %buildroot%_sysconfdir/%name/macros.d +mkdir -p %buildroot{%_rpmlibdir/macros.d,%_sysconfdir/%name/macros.d} touch %buildroot%_sysconfdir/%name/macros cat << E_O_F > %buildroot%_sysconfdir/%name/macros.db1 %%_dbapi 1 @@ -415,6 +413,7 @@ fi #%config(noreplace,missingok) %_sysconfdir/cron.daily/%name #%config(noreplace,missingok) %_sysconfdir/logrotate.d/%name +%rpmdirattr %_rpmlibdir/macros.d %dir %_sysconfdir/%name %dir %_sysconfdir/%name/macros.d %config(noreplace,missingok) %_sysconfdir/%name/macros @@ -451,7 +450,6 @@ fi %_bindir/rpminit %_bindir/rpm*cmp -%rpmdirattr %_rpmlibdir %rpmattr %_rpmlibdir/delayed_rebuilddb %rpmattr %_rpmlibdir/pdeath_execute %rpmattr %_rpmlibdir/rpm[dikq] @@ -477,7 +475,6 @@ fi %rpmattr %_bindir/gendiff %_bindir/rpmbuild %_bindir/relative -%rpmdirattr %_rpmlibdir %_rpmlibdir/rpmt %rpmattr %_rpmlibdir/rpmb %rpmattr %_rpmlibdir/dump_ld_config @@ -532,7 +529,6 @@ fi %if_with contrib %files contrib -%rpmattr %dir %_rpmlibdir %rpmattr %_rpmlibdir/cpanflute* %rpmattr %_rpmlibdir/cross-build %rpmattr %_rpmlibdir/find-prov.pl diff --git a/rpmrc.in b/rpmrc.in index 8be5291..4e4a970 100644 --- a/rpmrc.in +++ b/rpmrc.in @@ -420,7 +420,7 @@ buildarch_compat: ia64: noarch buildarch_compat: s390: noarch buildarch_compat: s390x: noarch -macrofiles: @RPMCONFIGDIR@/macros:@RPMCONFIGDIR@/%{_target}/macros:@SYSCONFIGDIR@/macros.specspo:@SYSCONFIGDIR@/macros.db1:@SYSCONFIGDIR@/macros.cdb:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:@SYSCONFIGDIR@/macros.d/*:~/.rpmmacros +macrofiles: @RPMCONFIGDIR@/macros:@RPMCONFIGDIR@/%{_target}/macros:@RPMCONFIGDIR@/macros.d/*:@SYSCONFIGDIR@/macros.specspo:@SYSCONFIGDIR@/macros.db1:@SYSCONFIGDIR@/macros.cdb:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:@SYSCONFIGDIR@/macros.d/*:~/.rpmmacros # \endverbatim #*/ diff --git a/scripts/0common-files.req.list b/scripts/0common-files.req.list index ebc72b7..8c3f92e 100644 --- a/scripts/0common-files.req.list +++ b/scripts/0common-files.req.list @@ -23,3 +23,5 @@ /etc/tex-fonts.d tetex-core /etc/udev/rules.d udev-rules /etc/xinetd.d xinetd +/usr/lib/rpm librpm +/usr/lib/rpm/macros.d rpm