RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES Makefile.am configure.ac macros.in

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Mon 16 Jul 2007 - 10:08:50 CEST
Message-Id: <20070716080850.ACE4F3484F3@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
  Module: rpm                              Date:   16-Jul-2007 10:08:50
  Branch: HEAD                             Handle: 2007071609085000

  Modified files:
    rpm                     CHANGES Makefile.am configure.ac macros.in

  Log:
    Do no longer hard-code the RPM database directory via %{_var}/lib/rpm
    as especially the hard-coded subdir "lib/rpm/" is a Linux only thing
    (the canonical (GNU Autoconf) path would be <localstatedir>/rpm, BTW).
    
    Instead allow one to at least set an explicit path without patching
    "macros" via Autoconf option --with-path-database, but still default to
    the old Linux-specific path for backward compatibility.

  Summary:
    Revision    Changes     Path
    1.1475      +1  -0      rpm/CHANGES
    2.189       +3  -1      rpm/Makefile.am
    2.180       +15 -0      rpm/configure.ac
    1.176       +2  -2      rpm/macros.in
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1474 -r1.1475 CHANGES
  --- rpm/CHANGES	16 Jul 2007 08:07:32 -0000	1.1474
  +++ rpm/CHANGES	16 Jul 2007 08:08:50 -0000	1.1475
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - rse: allow the path to the RPM database directory be overridden via Autoconf option --with-path-database
       - rse: drop support for internal lua/ at all to make piece with Automake (as lua/ build-env was not stand-alone)
       - jbj: no longer ship an internal copy of Lua with the RPM distribution
       - jbj: refactor rpmio.h include out of header files.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.188 -r2.189 Makefile.am
  --- rpm/Makefile.am	16 Jul 2007 08:02:36 -0000	2.188
  +++ rpm/Makefile.am	16 Jul 2007 08:08:50 -0000	2.189
  @@ -104,8 +104,10 @@
   
   pkgsrcdir = $(prefix)/src/rpm
   
  +DBPATH = @DBPATH@
  +
   install-data-local:
  -	@$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
  +	@$(mkinstalldirs) $(DESTDIR)$(DBPATH)
   	@for dir in BUILD RPMS SOURCES SPECS SRPMS ; do\
   	    $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/$$dir;\
   	done
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.179 -r2.180 configure.ac
  --- rpm/configure.ac	16 Jul 2007 08:02:36 -0000	2.179
  +++ rpm/configure.ac	16 Jul 2007 08:08:50 -0000	2.180
  @@ -1007,6 +1007,21 @@
       usrprefix=$prefix
   fi
   
  +dnl # determine RPM database directory path
  +AC_MSG_CHECKING([for RPM database directory])
  +DBPATH=`echo "${varprefix}/lib/rpm"`
  +AC_ARG_WITH(
  +    [path-database],
  +    AS_HELP_STRING([--with-path-database=ARG], [build with RPM database directory path]),
  +    [DBPATH="$withval"]
  +)
  +AC_DEFINE_UNQUOTED(
  +    [DBPATH], ["$DBPATH"],
  +    [Full path to RPM database directory]
  +)
  +AC_SUBST(DBPATH)
  +AC_MSG_RESULT([$DBPATH])
  +
   dnl # determine RPM locale directory path
   AC_MSG_CHECKING([for RPM locale directory])
   LOCALEDIR=`echo "${usrprefix}/share/locale"`
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros.in
  ============================================================================
  $ cvs diff -u -r1.175 -r1.176 macros.in
  --- rpm/macros.in	15 Jul 2007 00:48:45 -0000	1.175
  +++ rpm/macros.in	16 Jul 2007 08:08:50 -0000	1.176
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.175 2007/07/15 00:48:45 fray Exp $
  +# $Id: macros.in,v 1.176 2007/07/16 08:08:50 rse Exp $
   #
   # This is a global RPM configuration file. All changes made here will
   # be lost when the rpm package is upgraded. Any per-system configuration
  @@ -175,7 +175,7 @@
   %_buildshell		/bin/sh
   
   #	The location of the rpm database file(s).
  -%_dbpath		%{_var}/lib/rpm
  +%_dbpath		@DBPATH@
   
   #	The location of the rpm database file(s) after "rpm --rebuilddb".
   %_dbpath_rebuild	%{_dbpath}
  @@ .
Received on Mon Jul 16 10:08:50 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.