RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES Makefile.am rpm/build/ Makefile.am rpm/ config...

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Wed 27 Jun 2007 - 11:45:16 CEST
Message-Id: <20070627094516.4F3B63484E4@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:   27-Jun-2007 11:45:16
  Branch: HEAD                             Handle: 2007062710451402

  Added files:
    rpm/misc                librpmmisc.c
  Modified files:
    rpm                     CHANGES Makefile.am configure.ac system.h
    rpm/build               Makefile.am
    rpm/lib                 Makefile.am
    rpm/misc                Makefile.am
    rpm/rpmdb               Makefile.am
    rpm/rpmio               Makefile.am
  Removed files:
    rpm/rpmio               stubs.c

  Log:
    Finally untwist the "misc" library:
    
    In the past RPM built a plain library misc/libmisc.a containing the
    hard-coded but still Autoconf/LIBOBJS based fnmatch(3) and glob(3)
    replacements only. Unfortunately, this libmisc.a was never actually
    used! Instead rpmio/stubs.c _included_ the _sources_ from misc/*.c
    dynamically based on Autoconf results and this way _more_ code than
    in misc/libmisc.a was actually built into rpmio/librpmio.la, although
    the fallback functions are actually also used for other RPM libraries.
    This convoluted approach is horribly unclean and confusing as a never
    directly used libmisc.a is built but its contents indirectly is present
    in librpmio.la, too.
    
    So, finally clean up this stuff by moving rpmio/stubs.c to
    misc/librpmmisc.c and use it to build the misc/*.[ch] stuff only into
    a new installed Libtool library misc/librpmmisc.la (instead of a plain
    uninstalled misc/libmisc.a) and link RPM against this new library,
    too. Also, remove the USE_GNU_GLOB define as RPM since a longer time
    exclusively uses the GNU versions only anyway.
    
    As a result we now have the following set of official RPM libraries
    (listed in dependency order):
    
       librpmbuild
       librpm
       librpmdb
       librpmio
       librpmmisc
    
    A rpm-config(1) and pkg-config(1) script will follow soon so RPM 5
    API based applications do not have to take care about the list of RPM
    libraries, their dependency order and their external dependencies.

  Summary:
    Revision    Changes     Path
    1.1403      +1  -0      rpm/CHANGES
    2.179       +3  -2      rpm/Makefile.am
    2.61        +2  -1      rpm/build/Makefile.am
    2.144       +0  -5      rpm/configure.ac
    2.155       +1  -0      rpm/lib/Makefile.am
    1.22        +5  -4      rpm/misc/Makefile.am
    1.1         +75 -0      rpm/misc/librpmmisc.c
    1.62        +2  -1      rpm/rpmdb/Makefile.am
    1.88        +2  -1      rpm/rpmio/Makefile.am
    1.7         +0  -78     rpm/rpmio/stubs.c
    2.66        +0  -14     rpm/system.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1402 -r1.1403 CHANGES
  --- rpm/CHANGES	27 Jun 2007 09:03:00 -0000	1.1402
  +++ rpm/CHANGES	27 Jun 2007 09:45:14 -0000	1.1403
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - rse: move misc/*.c from rpmio/stubs.c into misc/librpmmisc.c and build regular librpmmisc.la
       - rse: support building without ZLib via --without-zlib
       - rse: in rpmio for LZMA use %{__lzma} macro instead of hard-coded /usr/bin/lzma when possible
       - rse: use explicit enable/disable of Perl and Python APIs
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.178 -r2.179 Makefile.am
  --- rpm/Makefile.am	26 Jun 2007 19:21:13 -0000	2.178
  +++ rpm/Makefile.am	27 Jun 2007 09:45:14 -0000	2.179
  @@ -20,11 +20,11 @@
   
   SUBDIRS = \
   	po \
  -	misc \
   	@WITH_DB_SUBDIR@ \
   	@WITH_ZLIB_SUBDIR@ \
   	@WITH_LUA_SUBDIR@ \
   	@WITH_FILE_SUBDIR@ \
  +	misc \
   	rpmio \
   	rpmdb \
   	lib \
  @@ -47,7 +47,8 @@
   	$(top_builddir)/build/librpmbuild.la \
   	$(top_builddir)/lib/librpm.la \
   	$(top_builddir)/rpmdb/librpmdb.la \
  -	$(top_builddir)/rpmio/librpmio.la
  +	$(top_builddir)/rpmio/librpmio.la \
  +	$(top_builddir)/misc/librpmmisc.la
   
   bin_PROGRAMS = 		rpm rpmbuild
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.60 -r2.61 Makefile.am
  --- rpm/build/Makefile.am	26 Jun 2007 19:46:27 -0000	2.60
  +++ rpm/build/Makefile.am	27 Jun 2007 09:45:14 -0000	2.61
  @@ -29,7 +29,8 @@
   librpmbuild_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) $(LDFLAGS) \
   	$(top_builddir)/lib/librpm.la \
   	$(top_builddir)/rpmdb/librpmdb.la \
  -	$(top_builddir)/rpmio/librpmio.la
  +	$(top_builddir)/rpmio/librpmio.la \
  +	$(top_builddir)/misc/librpmmisc.la
   
   if HAVE_LD_VERSION_SCRIPT
   librpmbuild_la_LDFLAGS += -Wl,--version-script=$(srcdir)/librpmbuild.vers
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.143 -r2.144 configure.ac
  --- rpm/configure.ac	26 Jun 2007 20:30:28 -0000	2.143
  +++ rpm/configure.ac	27 Jun 2007 09:45:14 -0000	2.144
  @@ -505,11 +505,6 @@
       __secure_getenv regcomp ftok mkstemp setlocale getpassphrase dnl
   ])
   
  -dnl # use local GNU glibc glob(3) copy
  -AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
  -AC_LIBOBJ(glob)
  -AC_LIBOBJ(fnmatch)
  -
   dnl # check for getmntent and alternatives
   AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [
     AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have mntctl() (only aix?)]),[
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.154 -r2.155 Makefile.am
  --- rpm/lib/Makefile.am	26 Jun 2007 19:46:27 -0000	2.154
  +++ rpm/lib/Makefile.am	27 Jun 2007 09:45:15 -0000	2.155
  @@ -40,6 +40,7 @@
   librpm_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) $(LDFLAGS) \
   	$(top_builddir)/rpmdb/librpmdb.la \
   	$(top_builddir)/rpmio/librpmio.la \
  +	$(top_builddir)/misc/librpmmisc.la \
   	@WITH_SELINUX_LIB@ \
   	@LTLIBINTL@
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/misc/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.21 -r1.22 Makefile.am
  --- rpm/misc/Makefile.am	26 Jun 2007 12:57:15 -0000	1.21
  +++ rpm/misc/Makefile.am	27 Jun 2007 09:45:15 -0000	1.22
  @@ -17,9 +17,10 @@
   noinst_HEADERS = \
   	err.h		error.h		fnmatch.h	glob.h		
   
  -noinst_LIBRARIES = libmisc.a
  +usrlibdir = $(libdir)@MARK64@
  +usrlib_LTLIBRARIES = librpmmisc.la
   
  -libmisc_a_SOURCES =
  +librpmmisc_la_SOURCES = librpmmisc.c
  +librpmmisc_la_LIBADD = @ALLOCA@
  +librpmmisc_la_DEPENDENCIES = $(librpmmisc_la_LIBADD)
   
  -libmisc_a_LIBADD = @LIBOBJS@ @ALLOCA@
  -libmisc_a_DEPENDENCIES = $(libmisc_a_LIBADD)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/misc/librpmmisc.c
  ============================================================================
  $ cvs diff -u -r0 -r1.1 librpmmisc.c
  --- /dev/null	2007-06-27 11:44:00 +0200
  +++ librpmmisc.c	2007-06-27 11:45:15 +0200
  @@ -0,0 +1,75 @@
  +/**
  + * \file misc/librpmmisc.c
  + */
  +
  +#include "system.h"
  +
  +#if !defined(HAVE_BASENAME)
  +#include "basename.c"
  +#endif
  +
  +#if !defined(HAVE_GETCWD)
  +#include "getcwd.c"
  +#endif
  +
  +#if !defined(HAVE_GETWD)
  +#include "getwd.c"
  +#endif
  +
  +#if !defined(HAVE_PUTENV)
  +#include "putenv.c"
  +#endif
  +
  +#if defined(USE_GETMNTENT)
  +#include "getmntent.c"
  +#endif
  +
  +#if !defined(HAVE_REALPATH)
  +#include "realpath.c"
  +#endif
  +
  +#if !defined(HAVE_SETENV)
  +#include "setenv.c"
  +#endif
  +
  +#if !defined(HAVE_STPCPY)
  +#include "stpcpy.c"
  +#endif
  +
  +#if !defined(HAVE_STPNCPY)
  +#include "stpncpy.c"
  +#endif
  +
  +#if !defined(HAVE_STRCSPN)
  +#include "strcspn.c"
  +#endif
  +
  +#if !defined(HAVE_STRSPN)
  +#include "strdup.c"
  +#endif
  +
  +#if !defined(HAVE_STRERROR)
  +#include "error.c"
  +#endif
  +
  +#if !defined(HAVE_STRTOL)
  +#include "strtol.c"
  +#endif
  +
  +#if !defined(HAVE_STRTOUL)
  +#include "strtoul.c"
  +#endif
  +
  +#if !defined(HAVE_STRSPN)
  +#include "strspn.c"
  +#endif
  +
  +#if !defined(HAVE_STRSTR)
  +#include "strstr.c"
  +#endif
  +
  +#include "fnmatch.h"
  +#include "fnmatch.c"
  +#include "glob.h"
  +#include "glob.c"
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.61 -r1.62 Makefile.am
  --- rpm/rpmdb/Makefile.am	26 Jun 2007 19:46:27 -0000	1.61
  +++ rpm/rpmdb/Makefile.am	27 Jun 2007 09:45:15 -0000	1.62
  @@ -48,7 +48,8 @@
   	poptDB.c rpmdb.c \
   	tagname.c tagtbl.c
   librpmdb_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) \
  -	$(top_builddir)/rpmio/librpmio.la
  +	$(top_builddir)/rpmio/librpmio.la \
  +	$(top_builddir)/misc/librpmmisc.la
   librpmdb_la_LIBADD = $(DBLIBOBJS) $(libdb_la)
   librpmdb_la_DEPENDENCIES = $(DBLIBOBJS) $(libdb_la)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.87 -r1.88 Makefile.am
  --- rpm/rpmio/Makefile.am	26 Jun 2007 19:46:28 -0000	1.87
  +++ rpm/rpmio/Makefile.am	27 Jun 2007 09:45:16 -0000	1.88
  @@ -30,9 +30,10 @@
   	salsa10.c salsa20.c tiger.c \
   	rpmdav.c rpmhash.c rpmhook.c rpmio.c rpmlog.c rpmlua.c rpmmalloc.c \
   	rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c strtolocale.c \
  -	stubs.c url.c ugid.c \
  +	url.c ugid.c \
   	LzmaDecode.c
   librpmio_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION) $(LDFLAGS) \
  +    $(top_builddir)/misc/librpmmisc.la \
   	@LTLIBINTL@
   
   if HAVE_LD_VERSION_SCRIPT
  @@ .
  rm -f rpm/rpmio/stubs.c <<'@@ .'
  Index: rpm/rpmio/stubs.c
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/system.h
  ============================================================================
  $ cvs diff -u -r2.65 -r2.66 system.h
  --- rpm/system.h	21 Jun 2007 12:51:37 -0000	2.65
  +++ rpm/system.h	27 Jun 2007 09:45:14 -0000	2.66
  @@ -490,24 +490,10 @@
   
   /* ============== from misc/miscfn.h */
   
  -#if !defined(USE_GNU_GLOB) || defined(__LCLINT__)
  -#if HAVE_FNMATCH_H
  -/*@-noparams@*/
  -#include <fnmatch.h>
  -/*@=noparams@*/
  -#endif
  -
  -#if HAVE_GLOB_H || defined(__LCLINT__)
  -/*@-noparams@*/
  -#include <glob.h>
  -/*@=noparams@*/
  -#endif
  -#else
   /*@-noparams@*/
   #include "misc/glob.h"
   #include "misc/fnmatch.h"
   /*@=noparams@*/
  -#endif
   
   #if defined(__LCLINT__)
   /*@-declundef -incondefs @*/ /* LCL: missing annotation */
  @@ .
Received on Wed Jun 27 11:45:16 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.