From 8c64a58df3c297852e2e4f8172b7780f6fa59707628381dbf2c3926d8e3c5eb2 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 12 Sep 2008 18:37:28 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=51 --- aloffbyone.diff | 16 - autodeps.diff | 17 +- badforsyntax.diff | 17 - brp.diff | 48 +-- build.diff | 631 ++++++++++++++++--------------------- buildsubdir.diff | 24 -- checkfilesnoinfodir.diff | 14 +- chownwarn.diff | 10 +- compress.diff | 31 -- convertdb1static.diff | 8 +- dbprivate.diff | 8 +- dbrointerruptable.diff | 12 +- debugedit-comp-dir.diff | 24 +- debugedit.diff | 38 ++- debugsource-package.diff | 104 ++---- diskspace.diff | 14 +- docdir_fmt.diff | 36 --- elfutils-0.97.diff | 20 ++ emptyfilelist.diff | 16 - erasebadreturn.diff | 16 - eraseignoresize.diff | 28 -- eraseordered.diff | 21 -- exitstatus.diff | 15 - extcond.diff | 16 +- filenonull.diff | 12 - filequery.diff | 14 - files.diff | 10 +- finddebuginfo.diff | 174 +++++----- findfplistexclude.diff | 12 +- findlang.diff | 109 +++++-- forkfailed.diff | 40 --- getcwdresult.diff | 30 -- ghost.diff | 17 - globlstat.diff | 8 +- globoffbyone.diff | 13 - initdbret.diff | 25 -- localetag.diff | 14 +- luanoreadline.diff | 32 -- luaroot.diff | 6 +- lzma-payload-2.diff | 18 +- lzma-payload.diff | 70 ++-- lzma.diff | 100 ------ macrosin.diff | 167 +++------- mimetype.diff | 22 ++ missingok.diff | 18 +- modalias.diff | 34 +- nameversioncompare.diff | 10 +- noautoreloc.diff | 14 - nodefattr.diff | 8 +- nolua.diff | 83 ----- noneon.diff | 292 ----------------- noprovides.diff | 23 -- nostdoutclose.diff | 13 - obeynodbsync.diff | 14 - openallbuttemp.diff | 55 ---- patchrpms.diff | 44 +-- payloadformat.diff | 40 --- perlprov.diff | 30 +- pgpdecodeearly.diff | 18 -- po-file-fixes.diff | 59 ---- popt-to-lib.diff | 11 +- prereqorder.diff | 21 -- probfilter.diff | 14 - pythonunicode.diff | 13 - querybuffer.diff | 43 --- rebuilddbroot.diff | 22 -- refreshtestarch.diff | 8 +- requires-ge-macro.diff | 12 +- rpm-4.4.2.3.tar.bz2 | 3 + rpm-4.4.2.tar.bz2 | 3 - rpm-debugedit-shared.diff | 11 - rpm-gcc43.diff | 20 -- rpm-python.changes | 5 + rpm-python.spec | 10 +- rpm-shorten-changelog.diff | 110 +++++-- rpm-suse_macros | 1 + rpm.changes | 14 + rpm.spec | 177 ++++------- rpmpopt.diff | 14 +- rpmqpack.diff | 24 +- rpmrc.diff | 171 +++++----- rpmrctests.diff | 77 +---- sbitcheck.diff | 105 ------ setpermsugids.diff | 20 -- showtransscripts.diff | 49 --- signature.diff | 21 -- signwriteerror.diff | 16 - spectest.diff | 19 -- sqcondmutex.diff | 119 ------- srcdefattr.diff | 68 ---- suspendlock.diff | 6 +- taggedfileindex.diff | 14 +- tagsbackport.diff | 6 +- tarwildcards.diff | 13 - testmode.diff | 134 -------- totalsizenoexclude.diff | 13 - translockroot.diff | 37 --- vercmp.diff | 31 -- verifylstatfail.diff | 17 - waitlock.diff | 16 +- weakdeps.diff | 18 +- 101 files changed, 1142 insertions(+), 3196 deletions(-) delete mode 100644 aloffbyone.diff delete mode 100644 badforsyntax.diff delete mode 100644 buildsubdir.diff delete mode 100644 compress.diff delete mode 100644 docdir_fmt.diff delete mode 100644 emptyfilelist.diff delete mode 100644 erasebadreturn.diff delete mode 100644 eraseignoresize.diff delete mode 100644 eraseordered.diff delete mode 100644 exitstatus.diff delete mode 100644 filenonull.diff delete mode 100644 filequery.diff delete mode 100644 forkfailed.diff delete mode 100644 getcwdresult.diff delete mode 100644 ghost.diff delete mode 100644 globoffbyone.diff delete mode 100644 initdbret.diff delete mode 100644 luanoreadline.diff delete mode 100644 lzma.diff create mode 100644 mimetype.diff delete mode 100644 noautoreloc.diff delete mode 100644 nolua.diff delete mode 100644 noneon.diff delete mode 100644 noprovides.diff delete mode 100644 nostdoutclose.diff delete mode 100644 obeynodbsync.diff delete mode 100644 openallbuttemp.diff delete mode 100644 payloadformat.diff delete mode 100644 pgpdecodeearly.diff delete mode 100644 po-file-fixes.diff delete mode 100644 prereqorder.diff delete mode 100644 probfilter.diff delete mode 100644 pythonunicode.diff delete mode 100644 querybuffer.diff delete mode 100644 rebuilddbroot.diff create mode 100644 rpm-4.4.2.3.tar.bz2 delete mode 100644 rpm-4.4.2.tar.bz2 delete mode 100644 rpm-debugedit-shared.diff delete mode 100644 rpm-gcc43.diff delete mode 100644 sbitcheck.diff delete mode 100644 setpermsugids.diff delete mode 100644 showtransscripts.diff delete mode 100644 signature.diff delete mode 100644 signwriteerror.diff delete mode 100644 spectest.diff delete mode 100644 sqcondmutex.diff delete mode 100644 srcdefattr.diff delete mode 100644 tarwildcards.diff delete mode 100644 testmode.diff delete mode 100644 totalsizenoexclude.diff delete mode 100644 translockroot.diff delete mode 100644 vercmp.diff delete mode 100644 verifylstatfail.diff diff --git a/aloffbyone.diff b/aloffbyone.diff deleted file mode 100644 index 080d2f9..0000000 --- a/aloffbyone.diff +++ /dev/null @@ -1,16 +0,0 @@ -Fixes an off-by-one error in rpmalAllFileSatisfiesDepend() which -could lead to a segfault. - -Already included in rpm-4.4.7 - ---- ./lib/rpmal.c.orig 2005-12-14 20:53:12.000000000 +0000 -+++ ./lib/rpmal.c 2005-12-14 20:54:28.000000000 +0000 -@@ -744,7 +744,7 @@ rpmalAllFileSatisfiesDepend(const rpmal - - /*@-branchstate@*/ /* FIX: ret is a problem */ - for (found = 0, ret = NULL; -- die <= al->dirs + al->numDirs && dieCompare(die, dieNeedle) == 0; -+ die < al->dirs + al->numDirs && dieCompare(die, dieNeedle) == 0; - die++) - { - diff --git a/autodeps.diff b/autodeps.diff index 705c883..0a791aa 100644 --- a/autodeps.diff +++ b/autodeps.diff @@ -1,7 +1,9 @@ Some (probably SUSE specific) changes to linux.prov and linux.req ---- ./autodeps/linux.prov.orig 2002-04-08 19:13:35.000000000 +0000 -+++ ./autodeps/linux.prov 2005-12-17 01:49:17.000000000 +0000 +Index: autodeps/linux.prov +=================================================================== +--- autodeps/linux.prov.orig ++++ autodeps/linux.prov @@ -2,60 +2,72 @@ # This script reads filenames from STDIN and outputs any relevant provides @@ -103,8 +105,10 @@ Some (probably SUSE specific) changes to linux.prov and linux.req + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" exit 0 ---- ./autodeps/linux.req.orig 2002-11-14 12:53:11.000000000 +0000 -+++ ./autodeps/linux.req 2005-12-17 01:50:07.000000000 +0000 +Index: autodeps/linux.req +=================================================================== +--- autodeps/linux.req.orig ++++ autodeps/linux.req @@ -19,18 +19,22 @@ fi # # --- Grab the file manifest and classify files. @@ -219,7 +223,7 @@ Some (probably SUSE specific) changes to linux.prov and linux.req /^$/ { START=0; } /^Dynamic Section:$/ { START=1; } (START==1) && /NEEDED/ { -@@ -110,7 +114,7 @@ for f in $liblist $exelist ; do +@@ -110,26 +114,37 @@ for f in $liblist $exelist ; do sub(/:/, "", $3); LIBNAME=$3; } @@ -227,8 +231,9 @@ Some (probably SUSE specific) changes to linux.prov and linux.req + (START==2) && (LIBNAME!="") && ($4!="") { print LIBNAME "(" $4 ")'$lib64'"; } +- /^[A-Za-z]/ { START=3; } ' -@@ -118,17 +122,29 @@ done | sort -u + done | sort -u # # --- Perl modules. diff --git a/badforsyntax.diff b/badforsyntax.diff deleted file mode 100644 index 8b4716b..0000000 --- a/badforsyntax.diff +++ /dev/null @@ -1,17 +0,0 @@ -This fixes a typo that caused a compiler warning [#178055]. - -Already included in rpm-4.4.7. - -Index: ./rpmdb/header_internal.c -=================================================================== ---- ./rpmdb/header_internal.c -+++ ./rpmdb/header_internal.c -@@ -22,7 +22,7 @@ char ** headerGetLangs(Header h) - if ((table = (char **)xcalloc((count+1), sizeof(char *))) == NULL) - return NULL; - -- for (i = 0, e = *s; i < count > 0; i++, e += strlen(e)+1) -+ for (i = 0, e = *s; i < count; i++, e += strlen(e)+1) - table[i] = e; - table[count] = NULL; - diff --git a/brp.diff b/brp.diff index affad08..6cfbc95 100644 --- a/brp.diff +++ b/brp.diff @@ -1,9 +1,11 @@ SUSE specific brp script patches ---- ./scripts/brp-lib64-linux.orig 2005-12-15 14:04:13.000000000 +0000 -+++ ./scripts/brp-lib64-linux 2006-01-27 19:44:16.000000000 +0000 +Index: scripts/brp-lib64-linux +=================================================================== +--- /dev/null ++++ scripts/brp-lib64-linux @@ -0,0 +1,42 @@ -+#!/bin/bash ++#!/bin/bash +# script checks wether package is 64-bit clean +# and also for a linker bug. (linker allows 64bit libs to link 32bit libs) +echo "sf@suse.de: if you find problems with this script, drop me a note" @@ -45,8 +47,10 @@ SUSE specific brp script patches + fi +done +exit 0 ---- ./scripts/brp-sparc64-linux.orig 2000-06-01 00:54:36.000000000 +0000 -+++ ./scripts/brp-sparc64-linux 2005-12-15 14:05:06.000000000 +0000 +Index: scripts/brp-sparc64-linux +=================================================================== +--- scripts/brp-sparc64-linux.orig ++++ scripts/brp-sparc64-linux @@ -6,6 +6,7 @@ fi files= LC_ALL= @@ -55,8 +59,22 @@ SUSE specific brp script patches # Move 64bit ELF objects from /lib, /usr/lib, /usr/X11R6/lib to */lib64 # directories ---- ./scripts/brp-strip-comment-note.orig 2005-05-30 06:41:52.000000000 +0000 -+++ ./scripts/brp-strip-comment-note 2005-12-15 14:06:07.000000000 +0000 +Index: scripts/brp-strip +=================================================================== +--- scripts/brp-strip.orig ++++ scripts/brp-strip +@@ -13,6 +13,7 @@ esac + for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ + grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ + grep -v ' shared object,' | \ ++ grep -v '/lib/modules/' | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do + strip -g "$f" || : + done +Index: scripts/brp-strip-comment-note +=================================================================== +--- scripts/brp-strip-comment-note.orig ++++ scripts/brp-strip-comment-note @@ -13,6 +13,8 @@ esac # for already stripped elf files in the build root for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ @@ -66,18 +84,10 @@ SUSE specific brp script patches sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do note="-R .note" if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ ---- ./scripts/brp-strip.orig 2005-05-30 06:40:24.000000000 +0000 -+++ ./scripts/brp-strip 2005-12-15 14:06:37.000000000 +0000 -@@ -13,6 +13,7 @@ esac - for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ - grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ - grep -v ' shared object,' | \ -+ grep -v '/lib/modules/' | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - strip -g "$f" || : - done ---- ./scripts/brp-symlink.orig 2005-12-15 14:06:58.000000000 +0000 -+++ ./scripts/brp-symlink 2006-01-27 19:41:58.000000000 +0000 +Index: scripts/brp-symlink +=================================================================== +--- /dev/null ++++ scripts/brp-symlink @@ -0,0 +1,182 @@ +#!/bin/sh + diff --git a/build.diff b/build.diff index 28a0758..a19cf9f 100644 --- a/build.diff +++ b/build.diff @@ -1,30 +1,19 @@ Many changes to Makefiles/autogen and the like to make it build on SUSE systems. -Index: Makefile.am -================================================================================ ---- Makefile.am -+++ Makefile.am -@@ -15,7 +15,7 @@ EXTRA_DIST = CHANGES CREDITS Doxyheader - po/*.in po/*.po po/rpm.pot \ - rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c - --SUBDIRS = intl po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts tests doc . -+SUBDIRS = intl po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ beecrypt @WITH_NEON_SUBDIR@ @WITH_LUA_SUBDIR@ rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts tests doc . - - INCLUDES = \ - -I$(top_srcdir)/build \ ---- autogen.sh +Index: autogen.sh +=================================================================== +--- autogen.sh.orig +++ autogen.sh @@ -26,12 +26,12 @@ case $libtoolize in esac esac --[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1 --[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1 +-[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1 +-[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1 -[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1 -+#[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1 -+#[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1 ++#[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1 ++#[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1 +#[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1 myopts= @@ -33,7 +22,7 @@ Index: Makefile.am export myopts="--prefix=/usr --disable-nls" export CPPFLAGS="-I${myprefix}/include" fi -@@ -43,7 +43,8 @@ if [ -d zlib ]; then +@@ -49,10 +49,11 @@ if [ -d zlib ]; then (echo "--- zlib"; cd zlib; ./autogen.sh --noconfigure "$@") fi if [ -d beecrypt ]; then @@ -42,8 +31,12 @@ Index: Makefile.am + (echo "--- beecrypt"; cd beecrypt; ./autogen.sh --without-cplusplus --without-java --without-python "$@") fi if [ -d elfutils ]; then - (echo "--- elfutils"; cd elfutils; ./autogen.sh --noconfigure "$@") -@@ -54,6 +55,7 @@ fi +- (echo "--- elfutils"; cd elfutils; ./autogen.sh --noconfigure "$@") ++ (echo "--- elfutils"; cd elfutils; ./autogen.sh "$@") + fi + if [ -d file ]; then + (echo "--- file"; cd file; ./autogen.sh --noconfigure "$@") +@@ -60,6 +61,7 @@ fi if [ -d neon ]; then (echo "--- neon"; cd neon; ./autogen.sh "$@") fi @@ -51,7 +44,7 @@ Index: Makefile.am echo "--- rpm" $libtoolize --copy --force -@@ -66,7 +68,7 @@ if [ "$1" = "--noconfigure" ]; then +@@ -72,7 +74,7 @@ if [ "$1" = "--noconfigure" ]; then exit 0; fi @@ -60,7 +53,9 @@ Index: Makefile.am if [ -d /usr/share/man ]; then mandir=/usr/share/man infodir=/usr/share/info ---- build/Makefile.am +Index: build/Makefile.am +=================================================================== +--- build/Makefile.am.orig +++ build/Makefile.am @@ -22,7 +22,7 @@ pkgincdir = $(pkgincludedir) pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h @@ -71,262 +66,13 @@ Index: Makefile.am usrlibdir = $(libdir)@MARK64@ usrlib_LTLIBRARIES = librpmbuild.la ---- configure.ac -+++ configure.ac -@@ -1,30 +1,3 @@ -- --echo " --**************************************************************************** --* * --* *** WARNING WARNING WARNING *** * --* * --* This is source code from the development branch of rpm-4.4.2. * --* * --* If you want the "production" rpm-4.3.3 code, then you should use a * --* rpm-4.3.3 src.rpm. Alternatively, if using a CVS checkout, do * --* the following: * --* * --* cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel login * --* (no password, just carriage return) * --* cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel get rpm * --* cd rpm * --* * --* Here's the rpm-4_3 branch, latest is rpm-4.3.3: * --* cvs up -r rpm-4_3 * --* * --* Here's the rpm-4_2 branch, latest is rpm-4.2.3: * --* cvs up -r rpm-4_2 * --* * --**************************************************************************** --" --sleep 10 -- - AC_PREREQ(2.59) - AC_INIT(rpm, 4.4.2, rpm-devel@lists.dulug.duke.edu) - AC_CANONICAL_TARGET -@@ -34,10 +7,9 @@ AM_CONFIG_HEADER([config.h]) - AM_INIT_AUTOMAKE([foreign]) - - dnl Set of available languages. --ALL_LINGUAS="cs da de fi fr gl is ja ko no pl pt pt_BR ro ru sk sl sr sv tr" -+ALL_LINGUAS="cs da de fi fr gl is ja ko nb pl pt pt_BR ro ru sk sl sr sv tr" - - dnl Checks for programs. --AC_PROG_CXX - AC_PROG_AWK - AC_PROG_CC - AC_PROG_CPP -@@ -310,7 +282,7 @@ WITH_ZLIB_INCLUDE= - WITH_ZLIB_LIB= - if test -d zlib ; then - WITH_ZLIB_SUBDIR=zlib -- addlib \${top_builddir}/zlib -+ # addlib \${top_builddir}/zlib - WITH_ZLIB_INCLUDE="-I\${top_srcdir}/${WITH_ZLIB_SUBDIR}" - INCPATH="$INCPATH -I\${top_srcdir}/${WITH_ZLIB_SUBDIR}" - WITH_ZLIB_LIB="\${top_builddir}/${WITH_ZLIB_SUBDIR}/libz.la" -@@ -350,9 +322,9 @@ AC_SUBST(WITH_BZIP2) - localdone= - - dirs=$prefix --if test "$cross_compiling" != "yes"; then -- dirs="$dirs /usr/local" --fi -+#if test "$cross_compiling" != "yes"; then -+# dirs="$dirs /usr/local" -+#fi - for dir in $dirs - do - case $dir in -@@ -463,7 +435,7 @@ AC_CHECK_HEADER([gelf.h], [ - AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).]) - WITH_ELFUTILS_SUBDIR=elfutils - WITH_LIBELF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libelf" -- WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf.a" -+ WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf_pic.a" - fi - ]) - AC_SUBST(WITH_ELFUTILS_SUBDIR) -@@ -504,7 +476,8 @@ AC_CHECK_HEADER([beecrypt/beecrypt.h], [ - AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the 'beecrypt' library (-lbeecrypt).]) - WITH_BEECRYPT_SUBDIR=beecrypt - WITH_BEECRYPT_INCLUDE="-I\${top_srcdir}/${WITH_BEECRYPT_SUBDIR}" -- WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la" -+ dnl WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la" -+ AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the header file.]) - fi - ]) - AC_SUBST(WITH_BEECRYPT_SUBDIR) -@@ -648,6 +621,9 @@ dnl AmigaOS and IXEmul have a fork() dum - esac - - AM_GNU_GETTEXT -+AM_GNU_GETTEXT_VERSION(0.11.2) -+MKINSTALLDIRS="\$(top_builddir)/./mkinstalldirs" -+AC_SUBST(MKINSTALLDIRS) - dnl TVM: - dnl horrible *temporary* hack to make sure that if we found gettext() in - dnl -lintl that we add -lintl *back* to $LIBS. -@@ -943,54 +919,86 @@ withval=auto - AC_ARG_WITH(python, [ --with-python build rpm python bindings ]) - - WITH_PYTHON_VERSION=$withval --if test $withval = auto ; then - -+if test "$WITH_PYTHON_VERSION" = auto ; then -+AC_MSG_CHECKING(for python 2.6) -+AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+#include -+main() { -+ exit(strncmp("2.6", PY_VERSION, 3)); -+} ]])],[withval=yes],[withval=no],[withval=yes]) -+AC_MSG_RESULT($withval) -+if test $withval = yes ; then -+ WITH_PYTHON_VERSION="2.6" -+fi -+fi -+if test "$WITH_PYTHON_VERSION" = auto ; then -+AC_MSG_CHECKING(for python 2.5) -+AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+#include -+main() { -+ exit(strncmp("2.5", PY_VERSION, 3)); -+} ]])],[withval=yes],[withval=no],[withval=yes]) -+AC_MSG_RESULT($withval) -+if test $withval = yes ; then -+ WITH_PYTHON_VERSION="2.5" -+fi -+fi -+ -+if test "$WITH_PYTHON_VERSION" = auto ; then - AC_MSG_CHECKING(for python 2.4) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - main() { - exit(strncmp("2.4", PY_VERSION, 3)); - } ]])],[withval=yes],[withval=no],[withval=yes]) -- AC_MSG_RESULT($withval) -- if test $withval = yes ; then -- WITH_PYTHON_VERSION="2.4" -- else -- -- AC_MSG_CHECKING(for python 2.3) -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ -- #include -- main() { -- exit(strncmp("2.3", PY_VERSION, 3)); -- } ]])],[withval=yes],[withval=no],[withval=yes]) -- AC_MSG_RESULT($withval) -- if test $withval = yes ; then -- WITH_PYTHON_VERSION="2.3" -- else -- -- AC_MSG_CHECKING(for python 2.2) -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ -- #include -- main() { -- exit(strncmp("2.2", PY_VERSION, 3)); -- } ]])],[withval=yes],[withval=no],[withval=yes]) -- AC_MSG_RESULT($withval) -- if test $withval = yes ; then -- WITH_PYTHON_VERSION="2.2" -- else -- -- AC_MSG_CHECKING(for python 1.5.2) -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ -- #include -- main() { -- exit(strcmp("1.5.2", PY_VERSION)); -- } ]])],[withval=yes],[withval=no],[withval=yes]) -- AC_MSG_RESULT($withval) -- if test $withval = yes ; then -- WITH_PYTHON_VERSION="1.5" -- fi -- fi -- fi -- fi -+AC_MSG_RESULT($withval) -+if test $withval = yes ; then -+ WITH_PYTHON_VERSION="2.4" -+fi -+fi -+ -+if test "$WITH_PYTHON_VERSION" = auto ; then -+AC_MSG_CHECKING(for python 2.3) -+AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+#include -+main() { -+ exit(strncmp("2.3", PY_VERSION, 3)); -+} ]])],[withval=yes],[withval=no],[withval=yes]) -+AC_MSG_RESULT($withval) -+if test $withval = yes ; then -+ WITH_PYTHON_VERSION="2.3" -+fi -+fi -+ -+if test "$WITH_PYTHON_VERSION" = auto ; then -+AC_MSG_CHECKING(for python 2.2) -+AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+#include -+main() { -+ exit(strncmp("2.2", PY_VERSION, 3)); -+} ]])],[withval=yes],[withval=no],[withval=yes]) -+AC_MSG_RESULT($withval) -+if test $withval = yes ; then -+ WITH_PYTHON_VERSION="2.2" -+fi -+fi -+ -+if test "$WITH_PYTHON_VERSION" = auto ; then -+AC_MSG_CHECKING(for python 1.5.2) -+AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+#include -+main() { -+ exit(strcmp("1.5.2", PY_VERSION)); -+} ]])],[withval=yes],[withval=no],[withval=yes]) -+AC_MSG_RESULT($withval) -+if test $withval = yes ; then -+ WITH_PYTHON_VERSION="1.5" -+fi -+fi -+ -+if test "$WITH_PYTHON_VERSION" = auto ; then -+ WITH_PYTHON_VERSION=no - fi - - if test "$WITH_PYTHON_VERSION" != no ; then -@@ -1283,6 +1291,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH="${ - mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;; - mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;; - m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;; -+parisc*|hppa*) RPMCANONCOLOR=0; RPMCANONARCH=hppa ;; - *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; - esac - case "${build_os_noversion}" in -@@ -1290,7 +1299,8 @@ mint) RPMCANONARCH=m68kmint ;; - esac - RPMCANONVENDOR="$build_vendor" - case "${build_vendor}" in --unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos) -+unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) -+ RPMCANONVENDOR=suse - test -f /etc/redhat-release && RPMCANONVENDOR=redhat - test -f /etc/pld-release && RPMCANONVENDOR=pld - test -f /etc/mandrake-release && RPMCANONVENDOR=mandrake -@@ -1372,7 +1382,7 @@ dnl XXX this causes popt to depend on zl - dnl # XXX Propagate -lucb to popt ... - dnl export LIBS INCPATH CONFIG_SITE - --AC_CONFIG_SUBDIRS(popt zlib file sqlite db3) -+AC_CONFIG_SUBDIRS(popt zlib file sqlite db3 elfutils) - - AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec - rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile ---- db3/configure +Index: db3/configure +=================================================================== +--- db3/configure.orig +++ db3/configure @@ -10,9 +10,9 @@ rm -f config.cache # XXX edit CFLAGS= ... out of invocation args ??? - ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's%--cache-file=.*$%%'`" + ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`" -CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \ - --enable-shared --enable-static --enable-rpc \ @@ -337,7 +83,9 @@ Index: Makefile.am mv Makefile Makefile.orig cat Makefile.orig | sed -e '/^install[:-]/c\ ---- file/src/Makefile.am +Index: file/src/Makefile.am +=================================================================== +--- file/src/Makefile.am.orig +++ file/src/Makefile.am @@ -26,7 +26,7 @@ libmagic_la_LDFLAGS = -version-info 1:0: @@ -348,24 +96,26 @@ Index: Makefile.am file_LDADD = libmagic.la listobjs: ---- installplatform +Index: installplatform +=================================================================== +--- installplatform.orig +++ installplatform -@@ -62,11 +62,11 @@ for SUBST in $SUBSTS ; do - sparcv9-linux) MULTILIBNO=1 ;; +@@ -68,11 +68,11 @@ for SUBST in $SUBSTS ; do sparc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-sparc64-linux; LIB=lib64; MULTILIBNO=2 ;; + sparc64v-linux) ARCH_INSTALL_PORT=${pkglibdir}/brp-sparc64-linux; LIB=lib64; MULTILIBNO=2 ;; s390-linux) MULTILIBNO=1 ;; - s390x-linux) LIB=lib64; MULTILIBNO=2 ;; + s390x-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux; LIB=lib64; MULTILIBNO=2 ;; ppc-linux) MULTILIBNO=1 ;; - ppc64-linux) LIB=lib64; MULTILIBNO=2 ;; + ppc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux; LIB=lib64; MULTILIBNO=2 ;; - i?86-linux|pentium?-linux|athlon-linux) MULTILIBNO=1 ;; + i?86-linux|pentium?-linux|athlon-linux|geode-linux) MULTILIBNO=1 ;; - x86_64-linux|amd64-linux|ia32e-linux) LIB=lib64; MULTILIBNO=2 ;; + x86_64-linux|amd64-linux|ia32e-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux; LIB=lib64; MULTILIBNO=2 ;; esac if [ -n "$MULTILIBNO" ]; then -@@ -96,6 +96,9 @@ for SUBST in $SUBSTS ; do +@@ -102,6 +102,9 @@ for SUBST in $SUBSTS ; do apple) VENDORSED='-e s,^@apple@,,' ;; @@ -374,8 +124,10 @@ Index: Makefile.am + ;; esac - cat $PLATFORM \ ---- lib/Makefile.am + CANONARCH="`echo $ARCH|sed -e "$canonarch_sed"`" +Index: lib/Makefile.am +=================================================================== +--- lib/Makefile.am.orig +++ lib/Makefile.am @@ -29,7 +29,7 @@ noinst_HEADERS = \ mylibs = librpm.la @@ -386,29 +138,9 @@ Index: Makefile.am usrlibdir = $(libdir)@MARK64@ usrlib_LTLIBRARIES = librpm.la ---- po/Makefile.in -+++ po/Makefile.in -@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po - INSTALL = /usr/bin/install -c - INSTALL_DATA = ${INSTALL} -m 644 - MKINSTALLDIRS = $(top_builddir)/./mkinstalldirs --mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac` -+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - - CC = gcc - GMSGFMT = /usr/bin/msgfmt ---- po/Makefile.in.in -+++ po/Makefile.in.in -@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ - MKINSTALLDIRS = @MKINSTALLDIRS@ --mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac` -+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - - CC = @CC@ - GMSGFMT = @GMSGFMT@ ---- popt/autogen.sh +Index: popt/autogen.sh +=================================================================== +--- popt/autogen.sh.orig +++ popt/autogen.sh @@ -28,7 +28,7 @@ fi @@ -419,46 +151,9 @@ Index: Makefile.am $srcdir/configure --prefix=/usr "$@" else $srcdir/configure "$@" ---- popt/configure.ac -+++ popt/configure.ac -@@ -1,11 +1,12 @@ - AC_INIT(popt.h) - AC_CANONICAL_SYSTEM - AC_PREREQ(2.12) --AC_CONFIG_HEADERS - AM_INIT_AUTOMAKE(popt, 1.10.2) - AM_CONFIG_HEADER(config.h) - --ALL_LINGUAS="cs da de es eu_ES fi fr gl hu id is it ja ko no pl pt pt_BR ro ru sk sl sr sv tr uk wa zh zh_CN zh_TW" -+ALL_LINGUAS="cs da de es eu_ES fi fr gl hu id is it ja ko nb pl pt pt_BR ro ru sk sl sr sv tr uk wa zh zh_CN zh_TW" -+MKINSTALLDIRS="\$(top_builddir)/./mkinstalldirs" -+AC_SUBST(MKINSTALLDIRS) - - AC_ISC_POSIX - ---- popt/po/Makefile.in -+++ popt/po/Makefile.in -@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po - INSTALL = /usr/bin/install -c - INSTALL_DATA = ${INSTALL} -m 644 - MKINSTALLDIRS = $(top_builddir)/./../mkinstalldirs --mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac` -+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - - CC = gcc - GMSGFMT = /usr/bin/msgfmt ---- popt/po/Makefile.in.in -+++ popt/po/Makefile.in.in -@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ - MKINSTALLDIRS = @MKINSTALLDIRS@ --mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac` -+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - - CC = @CC@ - GMSGFMT = @GMSGFMT@ ---- rpmdb/Makefile.am +Index: rpmdb/Makefile.am +=================================================================== +--- rpmdb/Makefile.am.orig +++ rpmdb/Makefile.am @@ -31,7 +31,7 @@ noinst_HEADERS = fprint.h header_interna pkgbindir = @RPMCONFIGDIR@ @@ -478,7 +173,9 @@ Index: Makefile.am usrlibdir = $(libdir)@MARK64@ usrlib_LTLIBRARIES = librpmdb.la ---- rpmio/Makefile.am +Index: rpmio/Makefile.am +=================================================================== +--- rpmio/Makefile.am.orig +++ rpmio/Makefile.am @@ -24,9 +24,9 @@ pkginc_HEADERS = \ rpmsq.h rpmsw.h ugid.h @@ -510,38 +207,258 @@ Index: Makefile.am done \ fi touch $@ ---- scripts/Makefile.am +Index: scripts/Makefile.am +=================================================================== +--- scripts/Makefile.am.orig +++ scripts/Makefile.am -@@ -6,6 +6,7 @@ EXTRA_DIST = \ +@@ -9,6 +9,7 @@ EXTRA_DIST = \ brp-compress brp-python-bytecompile brp-java-gcjcompile brp-redhat \ brp-strip brp-strip-comment-note \ brp-strip-shared brp-strip-static-archive brp-sparc64-linux \ + brp-lib64-linux brp-symlink \ check-files check-prereqs convertrpmrc.sh cross-build \ + check-buildroot check-rpaths check-rpaths-worker \ find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \ - cpanflute cpanflute2 Specfile.pm find-provides.perl \ -@@ -17,7 +18,8 @@ EXTRA_DIST = \ +@@ -21,7 +22,8 @@ EXTRA_DIST = \ sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \ vpkg-provides.sh vpkg-provides2.sh \ macros.perl* macros.python* \ -- macros.php* find-*.php find-php-* -+ macros.php* find-*.php find-php-* \ +- macros.php* find-*.php find-php-* mono-find* osgideps.pl ++ macros.php* find-*.php find-php-* mono-find* osgideps.pl \ + find-provides.ksyms find-requires.ksyms installprefix = $(DESTDIR) -@@ -28,6 +30,7 @@ config_SCRIPTS = \ +@@ -32,6 +34,7 @@ config_SCRIPTS = \ brp-compress brp-python-bytecompile brp-java-gcjcompile brp-redhat \ brp-strip brp-strip-comment-note \ brp-strip-shared brp-strip-static-archive brp-sparc64-linux \ + brp-lib64-linux brp-symlink \ check-files check-prereqs convertrpmrc.sh cross-build \ + check-buildroot check-rpaths check-rpaths-worker \ find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \ - cpanflute cpanflute2 Specfile.pm find-provides.perl \ -@@ -36,4 +39,5 @@ config_SCRIPTS = \ +@@ -42,4 +45,5 @@ config_SCRIPTS = \ rpmdb_loadcvt rpmdiff rpmdiff.cgi \ rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \ sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \ - vpkg-provides.sh vpkg-provides2.sh + vpkg-provides.sh vpkg-provides2.sh \ + find-provides.ksyms find-requires.ksyms +Index: configure.ac +=================================================================== +--- configure.ac.orig ++++ configure.ac +@@ -327,9 +327,9 @@ AC_SUBST(WITH_BZIP2) + localdone= + + dirs=$prefix +-if test "$cross_compiling" != "yes"; then +- dirs="$dirs /usr/local" +-fi ++#if test "$cross_compiling" != "yes"; then ++# dirs="$dirs /usr/local" ++#fi + for dir in $dirs + do + case $dir in +@@ -440,7 +440,7 @@ AC_CHECK_HEADER([gelf.h], [ + AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).]) + WITH_ELFUTILS_SUBDIR=elfutils + WITH_LIBELF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libelf" +- WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf.a" ++ WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf_pic.a" + fi + ]) + AC_SUBST(WITH_ELFUTILS_SUBDIR) +@@ -481,12 +481,13 @@ AC_CHECK_HEADER([beecrypt/beecrypt.h], [ + AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the 'beecrypt' library (-lbeecrypt).]) + WITH_BEECRYPT_SUBDIR=beecrypt + WITH_BEECRYPT_INCLUDE="-I\${top_srcdir}/${WITH_BEECRYPT_SUBDIR}" +- WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la" +- fi +- ++ dnl WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la" ++ AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the header file.]) ++ else + if test -z "${WITH_BEECRYPT_LIB}" ; then + AC_MSG_ERROR([rpm requires beecrypt]) + fi ++ fi + ]) + AC_SUBST(WITH_BEECRYPT_SUBDIR) + AC_SUBST(WITH_BEECRYPT_INCLUDE) +@@ -861,8 +862,23 @@ withval=auto + AC_ARG_WITH(python, [ --with-python build rpm python bindings ]) + + WITH_PYTHON_VERSION=$withval ++ + if test $withval = auto ; then ++AC_MSG_CHECKING(for python 2.6) ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include ++main() { ++ exit(strncmp("2.6", PY_VERSION, 3)); ++} ]])],[withval=yes],[withval=no],[withval=yes]) ++ AC_MSG_RESULT($withval) ++ if test $withval = yes ; then ++ WITH_PYTHON_VERSION="2.6" ++ else ++ withval=auto ++ fi ++fi + ++if test $withval = auto ; then + AC_MSG_CHECKING(for python 2.5) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include +@@ -873,56 +889,74 @@ main() { + if test $withval = yes ; then + WITH_PYTHON_VERSION="2.5" + else ++ withval=auto ++ fi ++fi + +- AC_MSG_CHECKING(for python 2.4) +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ +- #include +- main() { +- exit(strncmp("2.4", PY_VERSION, 3)); +- } ]])],[withval=yes],[withval=no],[withval=yes]) +- AC_MSG_RESULT($withval) +- if test $withval = yes ; then +- WITH_PYTHON_VERSION="2.4" +- else +- +- AC_MSG_CHECKING(for python 2.3) +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ +- #include +- main() { +- exit(strncmp("2.3", PY_VERSION, 3)); +- } ]])],[withval=yes],[withval=no],[withval=yes]) +- AC_MSG_RESULT($withval) +- if test $withval = yes ; then +- WITH_PYTHON_VERSION="2.3" +- else +- +- AC_MSG_CHECKING(for python 2.2) +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ +- #include +- main() { +- exit(strncmp("2.2", PY_VERSION, 3)); +- } ]])],[withval=yes],[withval=no],[withval=yes]) +- AC_MSG_RESULT($withval) +- if test $withval = yes ; then +- WITH_PYTHON_VERSION="2.2" +- else +- +- AC_MSG_CHECKING(for python 1.5.2) +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ +- #include +- main() { +- exit(strcmp("1.5.2", PY_VERSION)); +- } ]])],[withval=yes],[withval=no],[withval=yes]) +- AC_MSG_RESULT($withval) +- if test $withval = yes ; then +- WITH_PYTHON_VERSION="1.5" +- fi +- fi +- fi +- fi ++if test $withval = auto ; then ++AC_MSG_CHECKING(for python 2.4) ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include ++main() { ++ exit(strncmp("2.4", PY_VERSION, 3)); ++} ]])],[withval=yes],[withval=no],[withval=yes]) ++ AC_MSG_RESULT($withval) ++ if test $withval = yes ; then ++ WITH_PYTHON_VERSION="2.4" ++ else ++ withval=auto ++ fi ++fi ++ ++if test $withval = auto ; then ++AC_MSG_CHECKING(for python 2.3) ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include ++main() { ++ exit(strncmp("2.3", PY_VERSION, 3)); ++} ]])],[withval=yes],[withval=no],[withval=yes]) ++ AC_MSG_RESULT($withval) ++ if test $withval = yes ; then ++ WITH_PYTHON_VERSION="2.3" ++ else ++ withval=auto ++ fi ++fi ++ ++if test $withval = auto ; then ++AC_MSG_CHECKING(for python 2.2) ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include ++main() { ++ exit(strncmp("2.2", PY_VERSION, 3)); ++} ]])],[withval=yes],[withval=no],[withval=yes]) ++ AC_MSG_RESULT($withval) ++ if test $withval = yes ; then ++ WITH_PYTHON_VERSION="2.2" ++ else ++ withval=auto + fi + fi + ++if test $withval = auto ; then ++AC_MSG_CHECKING(for python 1.5.2) ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include ++main() { ++ exit(strcmp("1.5.2", PY_VERSION)); ++} ]])],[withval=yes],[withval=no],[withval=yes]) ++ AC_MSG_RESULT($withval) ++ if test $withval = yes ; then ++ WITH_PYTHON_VERSION="1.5" ++ else ++ withval=auto ++ fi ++fi ++ ++if test $withval = auto ; then ++ WITH_PYTHON_VERSION="no" ++fi ++ + if test "$WITH_PYTHON_VERSION" != no ; then + WITH_PYTHON_SUBDIR=python + WITH_PYTHON_SUBPACKAGE=1 +@@ -1218,6 +1252,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm + mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;; + mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;; + m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;; ++parisc*|hppa*) RPMCANONCOLOR=0; RPMCANONARCH=hppa ;; + sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;; + sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;; + *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; +@@ -1227,7 +1262,8 @@ mint) RPMCANONARCH=m68kmint ;; + esac + RPMCANONVENDOR="$build_vendor" + case "${build_vendor}" in +-unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos) ++unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) ++ RPMCANONVENDOR=suse + test -f /etc/redhat-release && RPMCANONVENDOR=redhat + test -f /etc/pld-release && RPMCANONVENDOR=pld + test -f /etc/mandrake-release && RPMCANONVENDOR=mandrake +@@ -1237,6 +1273,11 @@ unknown|pc|ibm|redhat|pld|mandrake|conec + test -f /etc/caos-release && RPMCANONVENDOR=caos + ;; + esac ++if test "$RPMCANONVENDOR" = suse ; then ++ RPMCANONCOLOR=0 ++ autorelocate_path='%{nil}' ++ autorelocate_dcolor='0' ++fi + RPMCANONOS="$build_os_noversion" + RPMCANONGNU="$build_os_gnu" + AC_SUBST(RPMCANONCOLOR) diff --git a/buildsubdir.diff b/buildsubdir.diff deleted file mode 100644 index fc7923b..0000000 --- a/buildsubdir.diff +++ /dev/null @@ -1,24 +0,0 @@ -Fix a typo: the macro is currently called %{buildsubdir} - ---- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000 -+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000 -@@ -1942,7 +1954,7 @@ static int processPackageFiles(Spec spec - if (*pkg->fileFile == '/') { - ffn = rpmGetPath(pkg->fileFile, NULL); - } else { -- /* XXX FIXME: add %{_buildsubdir} */ -+ /* XXX FIXME: add %{buildsubdir} */ - ffn = rpmGetPath("%{_builddir}/", - (spec->buildSubdir ? spec->buildSubdir : "") , - "/", pkg->fileFile, NULL); ---- ./build/pack.c.orig 2005-07-15 15:06:57.000000000 +0000 -+++ ./build/pack.c 2005-12-18 15:14:56.000000000 +0000 -@@ -138,7 +138,7 @@ static /*@only@*/ /*@null@*/ StringBuf a - FILE * f; - FD_t fd; - -- fn = rpmGetPath("%{_builddir}/%{?_buildsubdir:%{_buildsubdir}/}", file, NULL); -+ fn = rpmGetPath("%{_builddir}/%{?buildsubdir:%{buildsubdir}/}", file, NULL); - - fd = Fopen(fn, "r.ufdio"); - if (fn != buf) fn = _free(fn); diff --git a/checkfilesnoinfodir.diff b/checkfilesnoinfodir.diff index 48821b9..7a467db 100644 --- a/checkfilesnoinfodir.diff +++ b/checkfilesnoinfodir.diff @@ -1,15 +1,17 @@ Exclude /usr/share/info/dir from check-files. Probably only interesting for SUSE. ---- ./scripts/check-files.orig 2005-12-15 14:07:15.000000000 +0000 -+++ ./scripts/check-files 2005-12-15 14:09:34.000000000 +0000 -@@ -21,7 +21,9 @@ find $RPM_BUILD_ROOT -type f -o -type l - LC_ALL=C sort > $FILES_RPM +Index: scripts/check-files +=================================================================== +--- scripts/check-files.orig ++++ scripts/check-files +@@ -22,7 +22,9 @@ LC_ALL=C sort > $FILES_RPM - for f in `diff -d "$FILES_DISK" "$FILES_RPM" | grep "^< " | cut -c3-`; do + diff -d "$FILES_DISK" "$FILES_RPM" | grep "^< " | cut -c3- | + while read f; do - echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g" + if test "$RPM_BUILD_ROOT/usr/share/info/dir" != "$f" ; then -+ echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g" ++ echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g" + fi done diff --git a/chownwarn.diff b/chownwarn.diff index c435432..2e1100d 100644 --- a/chownwarn.diff +++ b/chownwarn.diff @@ -1,8 +1,10 @@ Warn the user if chown/fchown fails. ---- ./lib/fsm.c.orig 2005-12-14 20:08:04.000000000 +0000 -+++ ./lib/fsm.c 2005-12-16 18:19:37.000000000 +0000 -@@ -2186,6 +2191,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS +Index: lib/fsm.c +=================================================================== +--- lib/fsm.c.orig ++++ lib/fsm.c +@@ -2193,6 +2193,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS break; case FSM_CHOWN: rc = chown(fsm->path, st->st_uid, st->st_gid); @@ -13,7 +15,7 @@ Warn the user if chown/fchown fails. if (_fsm_debug && (stage & FSM_SYSCALL)) rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur, fsm->path, (int)st->st_uid, (int)st->st_gid, -@@ -2195,6 +2204,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS +@@ -2202,6 +2206,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS case FSM_LCHOWN: #if ! CHOWN_FOLLOWS_SYMLINK rc = lchown(fsm->path, st->st_uid, st->st_gid); diff --git a/compress.diff b/compress.diff deleted file mode 100644 index 82295f3..0000000 --- a/compress.diff +++ /dev/null @@ -1,31 +0,0 @@ -Fix uncompress waitpid logic to shut up the compiler [#160434] - ---- ./file/src/compress.c.orig 2006-03-24 15:37:23.000000000 +0000 -+++ ./file/src/compress.c 2006-03-24 15:42:52.000000000 +0000 -@@ -341,6 +341,7 @@ uncompressbuf(struct magic_set *ms, int - file_error(ms, errno, "cannot create pipe"); - return 0; - } -+ pid2 = (pid_t)-1; - switch ((pid1=fork())) { - case 0: /* child */ - (void) close(0); -@@ -382,7 +383,7 @@ uncompressbuf(struct magic_set *ms, int - * fork again, to avoid blocking because both - * pipes filled - */ -- switch (fork()) { -+ switch ((pid2 = fork())) { - case 0: /* child */ - (void)close(fdout[0]); - if (swrite(fdin[1], old, n) != n) { -@@ -439,7 +440,8 @@ err: - (void) close(fdin[1]); - (void) close(fdout[0]); - waitpid(pid1, NULL, 0); -- waitpid(pid2, NULL, 0); -+ if (pid2 != (pid_t)-1) -+ waitpid(pid2, NULL, 0); - return n; - } - /*@notreached@*/ diff --git a/convertdb1static.diff b/convertdb1static.diff index ad349dd..2d7a45f 100644 --- a/convertdb1static.diff +++ b/convertdb1static.diff @@ -4,7 +4,7 @@ Index: tools/Makefile.am =================================================================== --- tools/Makefile.am.orig +++ tools/Makefile.am -@@ -18,22 +18,26 @@ INCLUDES = -I. \ +@@ -18,25 +18,29 @@ INCLUDES = -I. \ EXTRA_DIST = rpminject.c rpmsort.c rpmxml.c rpmxp.c rpmxp.h hashtab.h @@ -33,4 +33,8 @@ Index: tools/Makefile.am + @WITH_LIBELF_LIB@ debugedit_SOURCES = debugedit.c hashtab.c - debugedit_LDADD = @LDFLAGS_STATIC@ \ +-#debugedit_LDADD = @LDFLAGS_STATIC@ \ ++#debugedit_LDADD = @LDFLAGS_STATIC@ + debugedit_LDADD = \ + @WITH_LIBELF_LIB@ \ + $(top_builddir)/rpmdb/librpmdb.la \ diff --git a/dbprivate.diff b/dbprivate.diff index 28aeda3..08ebadb 100644 --- a/dbprivate.diff +++ b/dbprivate.diff @@ -1,8 +1,10 @@ Always use DB_PRIVATE. Should probably be configured instead. ---- ./rpmdb/db3.c.orig 2005-03-23 18:15:28.000000000 +0000 -+++ ./rpmdb/db3.c 2006-01-27 20:08:29.000000000 +0000 -@@ -1034,6 +1050,9 @@ static int db3open(rpmdb rpmdb, rpmTag r +Index: rpmdb/db3.c +=================================================================== +--- rpmdb/db3.c.orig ++++ rpmdb/db3.c +@@ -1050,6 +1050,9 @@ static int db3open(rpmdb rpmdb, rpmTag r #endif #endif diff --git a/dbrointerruptable.diff b/dbrointerruptable.diff index 7a59346..355cfc4 100644 --- a/dbrointerruptable.diff +++ b/dbrointerruptable.diff @@ -1,9 +1,11 @@ Do not block signals if the database is opened read-only, it jst annoys the users. [#48026] ---- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000 -+++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000 -@@ -846,10 +873,12 @@ int rpmdbClose(rpmdb db) +Index: rpmdb/rpmdb.c +=================================================================== +--- rpmdb/rpmdb.c.orig ++++ rpmdb/rpmdb.c +@@ -873,10 +873,12 @@ int rpmdbClose(rpmdb db) rpmdb * prev, next; int dbix; int rc = 0; @@ -16,7 +18,7 @@ annoys the users. [#48026] (void) rpmdbUnlink(db, "rpmdbClose"); /*@-usereleased@*/ -@@ -886,12 +915,14 @@ int rpmdbClose(rpmdb db) +@@ -913,12 +915,14 @@ int rpmdbClose(rpmdb db) /*@-refcounttrans@*/ db = _free(db); /*@=refcounttrans@*/ /*@=usereleased@*/ @@ -36,7 +38,7 @@ annoys the users. [#48026] return rc; } /*@=incondefs@*/ -@@ -1021,11 +1070,13 @@ static int openDatabase(/*@null@*/ const +@@ -1050,11 +1054,13 @@ static int openDatabase(/*@null@*/ const if (db == NULL) return 1; diff --git a/debugedit-comp-dir.diff b/debugedit-comp-dir.diff index 2a56efa..60e749a 100644 --- a/debugedit-comp-dir.diff +++ b/debugedit-comp-dir.diff @@ -4,9 +4,11 @@ Include compilation directory in source file list if used. tools/debugedit.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) ---- tools/debugedit.c.orig 2007-04-08 22:55:58.000000000 +0200 -+++ tools/debugedit.c 2007-04-09 01:34:51.000000000 +0200 -@@ -488,6 +488,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +Index: tools/debugedit.c +=================================================================== +--- tools/debugedit.c.orig ++++ tools/debugedit.c +@@ -492,6 +492,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, uint_32 value, dirt_cnt; size_t comp_dir_len = strlen (comp_dir); size_t abs_file_cnt = 0, abs_dir_cnt = 0; @@ -14,15 +16,15 @@ Include compilation directory in source file list if used. if (phase != 0) return 0; -@@ -586,6 +587,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, - } - else - { +@@ -600,6 +601,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + memcpy (p, dirt[value], dir_len); + p[dir_len] = '/'; + memcpy (p + dir_len + 1, file, file_len + 1); + comp_dir_used = 1; - memcpy (s, comp_dir, comp_dir_len); - s[comp_dir_len] = '/'; - memcpy (s + comp_dir_len + 1, dirt[value], dir_len); -@@ -624,7 +626,31 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + } + canonicalize_path (s, s); + if (list_file_fd != -1) +@@ -632,7 +634,31 @@ edit_dwarf2_line (DSO *dso, uint_32 off, read_uleb128 (ptr); } ++ptr; diff --git a/debugedit.diff b/debugedit.diff index 5a3bc06..3cd43ac 100644 --- a/debugedit.diff +++ b/debugedit.diff @@ -1,7 +1,9 @@ Make debugedit build without dwarf.h. Also fixes a logic bug for ppc. ---- ./tools/debugedit.c.orig 2005-12-15 14:28:49.000000000 +0000 -+++ ./tools/debugedit.c 2006-03-17 13:01:53.000000000 +0000 +Index: tools/debugedit.c +=================================================================== +--- tools/debugedit.c.orig ++++ tools/debugedit.c @@ -34,7 +34,37 @@ #include @@ -39,14 +41,26 @@ Make debugedit build without dwarf.h. Also fixes a logic bug for ppc. +#define DW_FORM_ref_udata 0x15 +#define DW_FORM_indirect 0x16 - #include "hashtab.h" + #include -@@ -1039,7 +1069,7 @@ edit_dwarf2 (DSO *dso) - break; - case EM_PPC: - case EM_PPC64: -- if (rtype != R_PPC_ADDR32 || rtype != R_PPC_UADDR32) -+ if (rtype != R_PPC_ADDR32 && rtype != R_PPC_UADDR32) - goto fail; - break; - case EM_S390: +@@ -1346,7 +1376,6 @@ handle_build_id (DSO *dso, Elf_Data *bui + or Elf64 object, only that we are consistent in what bits feed the + hash so it comes out the same for the same file contents. */ + { +- inline void process (const void *data, size_t size); + inline void process (const void *data, size_t size) + { + memchunk chunk = { .data = (void *) data, .size = size }; +Index: tools/Makefile.am +=================================================================== +--- tools/Makefile.am.orig ++++ tools/Makefile.am +@@ -39,7 +39,7 @@ debugedit_SOURCES = debugedit.c hashtab. + #debugedit_LDADD = @LDFLAGS_STATIC@ \ + debugedit_LDADD = \ + @WITH_LIBELF_LIB@ \ +- @WITH_BEECRYPT_LIB@ \ ++ $(top_builddir)/rpmdb/librpmdb.la \ + @WITH_POPT_LIB@ + + javadeps_SOURCES = javadeps.c diff --git a/debugsource-package.diff b/debugsource-package.diff index 13b4c63..4da802b 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -8,11 +8,11 @@ build the binary. The patches moves them into a separate package -debugsource. scripts/find-debuginfo.sh | 43 ++++++++++++++++++++++++++----------------- 2 files changed, 38 insertions(+), 17 deletions(-) -Index: b/macros.in +Index: macros.in =================================================================== ---- macros.in +--- macros.in.orig +++ macros.in -@@ -179,6 +179,18 @@ Debug information is useful when develop +@@ -183,6 +183,18 @@ Debug information is useful when develop package or when debugging this package.\ %files debuginfo -f debugfiles.list\ %defattr(-,root,root)\ @@ -31,82 +31,36 @@ Index: b/macros.in %{nil} %_defaultdocdir %{_usr}/doc/packages -Index: b/scripts/find-debuginfo.sh +Index: scripts/find-debuginfo.sh =================================================================== ---- scripts/find-debuginfo.sh +--- scripts/find-debuginfo.sh.orig +++ scripts/find-debuginfo.sh -@@ -7,14 +7,16 @@ else BUILDDIR=$1 - fi - - LISTFILE=$BUILDDIR/debugfiles.list --SOURCEFILE=$BUILDDIR/debugsources.list -+LISTSOURCE=$BUILDDIR/debugsources.list - - debugdir="${RPM_BUILD_ROOT}/usr/lib/debug" -+debugsrcdir="${RPM_BUILD_ROOT}/usr/src/debug" - --echo -n > $SOURCEFILE -+[ -d "$TMPDIR" ] || TMPDIR="/tmp" -+SOURCES_TMP=`mktemp $TMPDIR/rpmXXXXXX` +@@ -172,8 +172,8 @@ set -o pipefail + strict_error=ERROR + $strict || strict_error=WARNING -# Strip ELF binaries --for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ` -+# Strip ELF binaries (and never strip static libraries here) -+for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" ` - do - case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in - *debuglink*) continue ;; -@@ -36,7 +38,8 @@ do - echo extracting debug info from $f - mode=$(stat -c %a $f) - chmod +w $f -- /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" -+ /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d $(echo ${debugsrcdir} | \ -+ sed -n -e "s#^$RPM_BUILD_ROOT##p") -l "$SOURCES_TMP" "$f" +-find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) | ++# Strip ELF binaries (and no static libraries) ++find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" | + xargs --no-run-if-empty stat -c '%h %D_%i %n' | + while read nlinks inum f; do + case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in +@@ -282,10 +282,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o - - # A binary already copied into /usr/lib/debug doesn't get stripped, - # just has its file names collected and adjusted. -@@ -75,12 +78,25 @@ done - # mv "$f" "${debugdn}" - #done + (cd "${RPM_BUILD_ROOT}/usr" + test ! -d lib/debug || find lib/debug ! -type d +- test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1 + ) | sed 's,^,/usr/,' >> "$LISTFILE" + fi -+# fixup paths, just in case ?! -+find ${debugdir} -type d -print0 | xargs -0 -r chmod 0755 -+find ${debugdir} -type f -print0 | xargs -0 -r chmod 0644 -+ -+find ${debugdir} -mindepth 1 -maxdepth 1 2>/dev/null | \ -+ sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE - --mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug --(cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug) < $SOURCEFILE -+ -+if [ -s "$SOURCES_TMP" ] ; then -+ # strip GCC built-in code from sources list -+ (cd $RPM_BUILD_DIR && LANG=C sort -z -u | grep -z -v "" | \ -+ cpio -pd0m ${debugsrcdir} ) < $SOURCES_TMP -+ # stupid cpio creates new directories in mode 0700, fixup -+ find ${debugsrcdir} -type d -print0 | xargs -0 -r chmod 0755 -+ find ${debugsrcdir} -type f -print0 | xargs -0 -r chmod 0644 ++: > "$SOURCEFILE" ++if [ -d "${RPM_BUILD_ROOT}/usr/src" ]; then ++ (cd "${RPM_BUILD_ROOT}/usr" ++ test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1 ++ ) | sed 's,^,/usr/,' >> "$SOURCEFILE" +fi - - # trying to replace dangling and/or absolute symlink --DBASE=${RPM_BUILD_ROOT}/usr/src/debug -+DBASE=${debugsrcdir} - for link in `find $DBASE -type l -printf "%P\n"` ; do - link_file=`readlink $RPM_BUILD_DIR/$link` - case $link_file in -@@ -93,12 +109,5 @@ for link in `find $DBASE -type l -printf - fi - done - --{ -- test -d ${RPM_BUILD_ROOT}/usr/lib/debug && echo /usr/lib/debug -- echo /usr/src/debug --} > $LISTFILE -- --for p in $(<$LISTFILE); do -- find $RPM_BUILD_ROOT/$p -type f -print0 | xargs -0 -r chmod 0644 -- find $RPM_BUILD_ROOT/$p -type d -print0 | xargs -0 -r chmod 0755 --done -+find ${debugsrcdir} -mindepth 1 -maxdepth 1 2>/dev/null | \ -+ sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTSOURCE ++ + # Append to $1 only the lines from stdin not already in the file. + append_uniq() + { diff --git a/diskspace.diff b/diskspace.diff index 461a851..bd0514a 100644 --- a/diskspace.diff +++ b/diskspace.diff @@ -2,19 +2,21 @@ Make the numbers reported for diskspace problems more user friendly. Probably a bad idea, as it changes the semantics. Instead, the messages should be changed. ---- ./lib/rpmts.c.orig 2005-02-13 03:12:03.000000000 +0000 -+++ ./lib/rpmts.c 2005-12-15 15:12:10.000000000 +0000 -@@ -1358,14 +1363,14 @@ void rpmtsCheckDSIProblems(const rpmts t +Index: lib/rpmts.c +=================================================================== +--- lib/rpmts.c.orig ++++ lib/rpmts.c +@@ -1358,14 +1358,14 @@ void rpmtsCheckDSIProblems(const rpmts t rpmpsAppend(ps, RPMPROB_DISKSPACE, - rpmteNEVR(te), rpmteKey(te), + rpmteNEVRA(te), rpmteKey(te), ts->filesystems[i], NULL, NULL, - (adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize); + (adj_fs_blocks(dsi->bneeded)) * dsi->bsize); } - if (dsi->iavail > 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { + if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { rpmpsAppend(ps, RPMPROB_DISKNODES, - rpmteNEVR(te), rpmteKey(te), + rpmteNEVRA(te), rpmteKey(te), ts->filesystems[i], NULL, NULL, - (adj_fs_blocks(dsi->ineeded) - dsi->iavail)); + (adj_fs_blocks(dsi->ineeded))); diff --git a/docdir_fmt.diff b/docdir_fmt.diff deleted file mode 100644 index bd82d26..0000000 --- a/docdir_fmt.diff +++ /dev/null @@ -1,36 +0,0 @@ -Add support for a new macro, %{_docdir}. It can be used to specify -the name of the directory for %doc files. -Default is "%{NAME}-%{VERSION}", SUSE uses just "%{NAME}". -rh#125514 - ---- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000 -+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000 -@@ -1006,11 +1006,23 @@ static int parseForSimple(/*@unused@*/Sp - res = 1; - } else { - /* XXX WATCHOUT: buf is an arg */ -- { const char *ddir, *n, *v; -- -- (void) headerNVR(pkg->header, &n, &v, NULL); -- -- ddir = rpmGetPath("%{_docdir}/", n, "-", v, NULL); -+ { -+ static char *_docdir_fmt= 0; -+ static int oneshot = 0; -+ const char *ddir, *fmt, *errstr; -+ if (!oneshot) { -+ _docdir_fmt = rpmExpand("%{?_docdir_fmt}", NULL); -+ if (!_docdir_fmt || !*_docdir_fmt) -+ _docdir_fmt = "%{NAME}-%{VERSION}"; -+ oneshot = 1; -+ } -+ fmt = headerSprintf(pkg->header, _docdir_fmt, rpmTagTable, rpmHeaderFormats, &errstr); -+ if (!fmt) { -+ rpmError(RPMERR_BADSPEC, _("illegal _docdir_fmt: %s\n"), errstr); -+ fl->processingFailed = 1; -+ res = 1; -+ } -+ ddir = rpmGetPath("%{_docdir}/", fmt, NULL); - strcpy(buf, ddir); - ddir = _free(ddir); - } diff --git a/elfutils-0.97.diff b/elfutils-0.97.diff index caf8519..40cefff 100644 --- a/elfutils-0.97.diff +++ b/elfutils-0.97.diff @@ -149,3 +149,23 @@ AC_PROG_RANLIB AC_PROG_YACC AM_PROG_LEX +--- elfutils-0.97/libelf/common.h.orig 2007-09-25 11:34:29.000000000 +0200 ++++ elfutils-0.97/libelf/common.h 2007-09-25 11:36:54.000000000 +0200 +@@ -78,7 +78,7 @@ + + + /* Acquire lock for the descriptor and all children. */ +-static void ++static inline void + libelf_acquire_all (Elf *elf) + { + rwlock_wrlock (elf->lock); +@@ -97,7 +97,7 @@ + } + + /* Release own lock and those of the children. */ +-static void ++static inline void + libelf_release_all (Elf *elf) + { + if (elf->kind == ELF_K_AR) diff --git a/emptyfilelist.diff b/emptyfilelist.diff deleted file mode 100644 index 95103d6..0000000 --- a/emptyfilelist.diff +++ /dev/null @@ -1,16 +0,0 @@ -Fix segfault when rpmbuild stumbles over an empty file list. -The "+ 1" is a remedy for xmalloc(0), which would return NULL. - -Index: ./build/files.c -=================================================================== ---- ./build/files.c -+++ ./build/files.c -@@ -1380,7 +1380,7 @@ static void genCpioListAndHeader(/*@part - : (int *)(fi->bnl + fi->fc); - /*@=dependenttrans@*/ - -- fi->apath = xmalloc(fi->fc * sizeof(*fi->apath) + apathlen); -+ fi->apath = xmalloc(fi->fc * sizeof(*fi->apath) + apathlen + 1); - a = (char *)(fi->apath + fi->fc); - *a = '\0'; - diff --git a/erasebadreturn.diff b/erasebadreturn.diff deleted file mode 100644 index 554c4dc..0000000 --- a/erasebadreturn.diff +++ /dev/null @@ -1,16 +0,0 @@ -Do not call rpmtsRun with an empty transaction list, it returns -1 -which messes up the numFailed counter. [#43267] - -Index: lib/rpminstall.c -=================================================================== ---- lib/rpminstall.c.orig -+++ lib/rpminstall.c -@@ -844,7 +844,7 @@ int rpmErase(rpmts ts, struct rpmInstall - } - #endif - -- if (!stopUninstall) { -+ if (numPackages && !stopUninstall) { - (void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_REVERSE)); - - /* Drop added/available package indices and dependency sets. */ diff --git a/eraseignoresize.diff b/eraseignoresize.diff deleted file mode 100644 index b384f41..0000000 --- a/eraseignoresize.diff +++ /dev/null @@ -1,28 +0,0 @@ -Allow "--ignoresize" for erase operations. - -Index: lib/rpminstall.c -=================================================================== ---- lib/rpminstall.c.orig -+++ lib/rpminstall.c -@@ -850,7 +850,7 @@ int rpmErase(rpmts ts, struct rpmInstall - /* Drop added/available package indices and dependency sets. */ - rpmtsClean(ts); - -- numPackages = rpmtsRun(ts, NULL, 0); -+ numPackages = rpmtsRun(ts, NULL, ia->probFilter & (RPMPROB_FILTER_DISKSPACE|RPMPROB_FILTER_DISKNODES)); - ps = rpmtsProblems(ts); - if (rpmpsNumProblems(ps) > 0) - rpmpsPrint(NULL, ps); -Index: rpmqv.c -=================================================================== ---- rpmqv.c.orig -+++ rpmqv.c -@@ -468,7 +468,7 @@ int main(int argc, const char ** argv) - argerror(_("--ignoreos may only be specified during package " - "installation")); - -- if (bigMode != MODE_INSTALL && -+ if (bigMode != MODE_INSTALL && bigMode != MODE_ERASE && - (ia->probFilter & (RPMPROB_FILTER_DISKSPACE|RPMPROB_FILTER_DISKNODES))) - argerror(_("--ignoresize may only be specified during package " - "installation")); diff --git a/eraseordered.diff b/eraseordered.diff deleted file mode 100644 index e7093bb..0000000 --- a/eraseordered.diff +++ /dev/null @@ -1,21 +0,0 @@ -Order packages when erasing. Not tested very well. - -Index: lib/rpminstall.c -=================================================================== ---- lib/rpminstall.c.orig -+++ lib/rpminstall.c -@@ -835,14 +835,12 @@ int rpmErase(rpmts ts, struct rpmInstall - ps = rpmpsFree(ps); - } - --#ifdef NOTYET - if (!stopUninstall && !(ia->installInterfaceFlags & INSTALL_NOORDER)) { - if (rpmtsOrder(ts)) { - numFailed += numPackages; - stopUninstall = 1; - } - } --#endif - - if (!stopUninstall) { - (void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_REVERSE)); diff --git a/exitstatus.diff b/exitstatus.diff deleted file mode 100644 index f77e0e8..0000000 --- a/exitstatus.diff +++ /dev/null @@ -1,15 +0,0 @@ -Deal with a return value of "-2" when database locking failed. - ---- ./lib/rpminstall.c.orig 2005-12-14 21:01:09.000000000 +0000 -+++ ./lib/rpminstall.c 2005-12-15 14:47:35.000000000 +0000 -@@ -599,6 +611,10 @@ if (fileURL[0] == '=') { - eiu->numFailed++; - goto exit; - /*@notreached@*/ /*@switchbreak@*/ break; -+ default: -+ eiu->numFailed++; -+ goto exit; -+ /*@notreached@*/ /*@switchbreak@*/ break; - } - - eiu->numRPMS++; diff --git a/extcond.diff b/extcond.diff index bd5055c..4dcc626 100644 --- a/extcond.diff +++ b/extcond.diff @@ -4,9 +4,11 @@ assumed to be true. This mechanism is used by the weakdeps patch to filter the "RPMSENSE_STRONG" flag. ---- ./rpmdb/header.c.orig 2005-06-06 23:33:54.000000000 +0000 -+++ ./rpmdb/header.c 2006-03-17 18:08:02.000000000 +0000 -@@ -2980,8 +2980,12 @@ static int parseExpression(headerSprintf +Index: rpmdb/header.c +=================================================================== +--- rpmdb/header.c.orig ++++ rpmdb/header.c +@@ -2984,8 +2984,12 @@ static int parseExpression(headerSprintf *endPtr = chptr; @@ -19,7 +21,7 @@ This mechanism is used by the weakdeps patch to filter the (void) findTag(hsa, token, str); return 0; -@@ -3239,6 +3243,7 @@ static char * singleSprintf(headerSprint +@@ -3226,6 +3230,7 @@ static char * singleSprintf(headerSprint int_32 type; int_32 count; sprintfToken spft; @@ -27,7 +29,7 @@ This mechanism is used by the weakdeps patch to filter the int condNumFormats; size_t need; -@@ -3270,6 +3275,18 @@ static char * singleSprintf(headerSprint +@@ -3257,6 +3262,18 @@ static char * singleSprintf(headerSprint if (token->u.cond.tag.ext || headerIsEntry(hsa->h, token->u.cond.tag.tag)) { spft = token->u.cond.ifFormat; condNumFormats = token->u.cond.numIfTokens; @@ -46,7 +48,7 @@ This mechanism is used by the weakdeps patch to filter the } else { spft = token->u.cond.elseFormat; condNumFormats = token->u.cond.numElseTokens; -@@ -3291,19 +3308,22 @@ static char * singleSprintf(headerSprint +@@ -3278,19 +3295,22 @@ static char * singleSprintf(headerSprint spft = token->u.array.format; for (i = 0; i < token->u.array.numTokens; i++, spft++) { @@ -65,7 +67,7 @@ This mechanism is used by the weakdeps patch to filter the /*@-boundswrite@*/ - if (getExtension(hsa, spft->u.tag.ext, &type, NULL, &count, - hsa->ec + spft->u.tag.extNum)) -+ if (getExtension(hsa, stag->ext, &type, NULL, &count, ++ if (getExtension(hsa, stag->ext, &type, NULL, &count, + hsa->ec + stag->extNum)) continue; /*@=boundswrite@*/ diff --git a/filenonull.diff b/filenonull.diff deleted file mode 100644 index ff1fc86..0000000 --- a/filenonull.diff +++ /dev/null @@ -1,12 +0,0 @@ -Return an error if Fileno is called with NULL instead of segfaulting. - ---- ./rpmio/rpmio.c.orig 2005-01-26 03:39:58.000000000 +0000 -+++ ./rpmio/rpmio.c 2005-12-16 17:51:19.000000000 +0000 -@@ -3094,6 +3164,7 @@ int Fileno(FD_t fd) - { - int i, rc = -1; - -+ if (fd == NULL) return -1; - if (fd->req != NULL) - rc = 123456789; /* HACK: https has no steenkin fileno. */ - else diff --git a/filequery.diff b/filequery.diff deleted file mode 100644 index e96020a..0000000 --- a/filequery.diff +++ /dev/null @@ -1,14 +0,0 @@ -Do not check package provides if there is no slash in the file path. -bugzilla [#32467], rh#125516. - ---- ./lib/query.c.orig 2004-10-26 23:29:28.000000000 +0000 -+++ ./lib/query.c 2005-12-16 18:22:19.000000000 +0000 -@@ -614,7 +637,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, - if (qva->qva_mi == NULL) { - if (access(fn, F_OK) != 0) - myerrno = errno; -- else if (!provides_checked) -+ else if (!provides_checked && strchr(fn, '/')) - qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, fn, 0); - } - diff --git a/files.diff b/files.diff index 0f7051a..d0a2ddd 100644 --- a/files.diff +++ b/files.diff @@ -1,7 +1,9 @@ ---- build/files.c 2007/03/19 11:52:22 1.103 -+++ build/files.c 2007/03/19 14:13:05 -@@ -2517,6 +2517,8 @@ - if (checkFiles(check_fileList) > 0) +Index: build/files.c +=================================================================== +--- build/files.c.orig ++++ build/files.c +@@ -2521,6 +2521,8 @@ int processBinaryFiles(Spec spec, int in + if (res == 0) res = 1; } + else diff --git a/finddebuginfo.diff b/finddebuginfo.diff index 8d72657..9d28466 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,107 +1,85 @@ ---- scripts/find-debuginfo.sh +Index: scripts/find-debuginfo.sh +=================================================================== +--- scripts/find-debuginfo.sh.orig +++ scripts/find-debuginfo.sh -@@ -14,9 +14,18 @@ - echo -n > $SOURCEFILE +@@ -173,12 +173,18 @@ strict_error=ERROR + $strict || strict_error=WARNING # Strip ELF binaries --for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ -- sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p'` -+for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ` - do -+ case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in -+ *debuglink*) continue ;; -+ *debug*) ;; -+ *gnu.version*) -+ echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!" -+ continue -+ ;; -+ *) continue ;; -+ esac -+ - dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p") - bn=$(basename $f .debug).debug +-find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \ +- \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \ +- -print | +-file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' | ++find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) | + xargs --no-run-if-empty stat -c '%h %D_%i %n' | + while read nlinks inum f; do ++ case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in ++ *debuglink*) continue ;; ++ *debug*) ;; ++ *gnu.version*) ++ echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!" ++ continue ++ ;; ++ *) continue ;; ++ esac + get_debugfn "$f" + [ -f "${debugfn}" ] && continue -@@ -25,6 +34,8 @@ - [ -f "${debugfn}" ] && continue +@@ -199,6 +205,8 @@ while read nlinks inum f; do + fi - echo extracting debug info from $f -+ mode=$(stat -c %a $f) -+ chmod +w $f - /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" + echo "extracting debug info from $f" ++ mode=$(stat -c %a "$f") ++ chmod +w "$f" + id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \ + -i -l "$SOURCEFILE" "$f") || exit + if [ -z "$id" ]; then +@@ -215,13 +223,25 @@ while read nlinks inum f; do + esac - # A binary already copied into /usr/lib/debug doesn't get stripped, -@@ -34,19 +45,63 @@ - esac + mkdir -p "${debugdn}" +- if test -w "$f"; then +- strip_to_debug "${debugfn}" "$f" +- else +- chmod u+w "$f" +- strip_to_debug "${debugfn}" "$f" +- chmod u-w "$f" +- fi ++ objcopy --only-keep-debug $f $debugfn || : ++ ( ++ shopt -s extglob ++ strip_option="--strip-all" ++ case "$f" in ++ *.ko) ++ strip_option="--strip-debug" ;; ++ *$STRIP_KEEP_SYMTAB*) ++ if test -n "$STRIP_KEEP_SYMTAB"; then ++ strip_option="--strip-debug" ++ fi ++ ;; ++ esac ++ if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then ++ strip_option= ++ fi ++ objcopy --add-gnu-debuglink=$debugfn -R .comment -R .GCC.command.line $strip_option $f ++ chmod $mode $f ++ ) || : - mkdir -p "${debugdn}" -- if test -w "$f"; then -- eu-strip -f "${debugfn}" "$f" || : -- else -- chmod u+w "$f" -- eu-strip -f "${debugfn}" "$f" || : -- chmod u-w "$f" -+ objcopy --only-keep-debug $f $debugfn || : -+ ( -+ shopt -s extglob -+ strip_option="--strip-all" -+ case "$f" in -+ *.ko) -+ strip_option="--strip-debug" -+ ;; -+ *$STRIP_KEEP_SYMTAB*) -+ if test -n "$STRIP_KEEP_SYMTAB"; then -+ strip_option="--strip-debug" -+ fi -+ ;; -+ esac -+ if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then -+ strip_option= - fi -+ objcopy --add-gnu-debuglink=$debugfn -R .comment -R .GCC.command.line $strip_option $f -+ chmod $mode $f -+ ) || : - done + if [ -n "$id" ]; then + make_id_link "$id" "$dn/$(basename $f)" +@@ -250,12 +270,14 @@ if [ -s "$SOURCEFILE" ]; then + # stupid cpio creates new directories in mode 0700, fixup + find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 | + xargs --no-run-if-empty -0 chmod a+rx ++ find "${RPM_BUILD_ROOT}/usr/src/debug" -type f -print0 | ++ xargs --no-run-if-empty -0 chmod a+r + fi -+#for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -name "*.exe.mdb" -or -name "*.dll.mdb" \) ` -+#do -+# dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p") -+# case "$dn" in -+# /usr/lib/debug/*) continue ;; -+# esac -+# debugdn="${debugdir}${dn}" -+# mkdir -p "${debugdn}" -+# mv "$f" "${debugdn}" -+#done -+ -+ - mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug --cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug) --# stupid cpio creates new directories in mode 0700, fixup --find ${RPM_BUILD_ROOT}/usr/src/debug -type d -print0 | xargs -0 chmod a+rx -+(cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug) < $SOURCEFILE + if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then + ((nout > 0)) || + test ! -d "${RPM_BUILD_ROOT}/usr/lib" || +- (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) | ++ (cd "${RPM_BUILD_ROOT}/usr/lib"; test ! -d debug || find debug -type d) | + sed 's,^,%dir /usr/lib/,' >> "$LISTFILE" --find ${RPM_BUILD_ROOT}/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE --find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE -+# trying to replace dangling and/or absolute symlink -+DBASE=${RPM_BUILD_ROOT}/usr/src/debug -+for link in `find $DBASE -type l -printf "%P\n"` ; do -+ link_file=`readlink $RPM_BUILD_DIR/$link` -+ case $link_file in -+ /*) is_abs=true ;; -+ *) is_abs= ;; -+ esac -+ if test ! -e "$DBASE/$link" -o -n "$is_abs" ; then # dangling -+ rm -f "$DBASE/$link" -+ cp "`readlink -f $RPM_BUILD_DIR/$link`" "$DBASE/$link" -+ fi -+done -+ -+{ -+ test -d ${RPM_BUILD_ROOT}/usr/lib/debug && echo /usr/lib/debug -+ echo /usr/src/debug -+} > $LISTFILE -+ -+for p in $(<$LISTFILE); do -+ find $RPM_BUILD_ROOT/$p -type f -print0 | xargs -0 -r chmod 0644 -+ find $RPM_BUILD_ROOT/$p -type d -print0 | xargs -0 -r chmod 0755 -+done + (cd "${RPM_BUILD_ROOT}/usr" diff --git a/findfplistexclude.diff b/findfplistexclude.diff index 45b185f..f37ed56 100644 --- a/findfplistexclude.diff +++ b/findfplistexclude.diff @@ -9,7 +9,7 @@ Index: lib/transaction.c =================================================================== --- lib/transaction.c.orig +++ lib/transaction.c -@@ -1745,7 +1745,7 @@ rpmMessage(RPMMESS_DEBUG, _("computing f +@@ -1758,7 +1758,7 @@ rpmMessage(RPMMESS_DEBUG, _("computing f (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0); /* Extract file info for all files in this package from the database. */ matches = xcalloc(fc, sizeof(*matches)); @@ -39,7 +39,7 @@ Index: rpmdb/rpmdb.c =================================================================== --- rpmdb/rpmdb.c.orig +++ rpmdb/rpmdb.c -@@ -2358,7 +2358,7 @@ static void rpmdbSortIterator(/*@null@*/ +@@ -2390,7 +2390,7 @@ static void rpmdbSortIterator(/*@null@*/ } /*@-bounds@*/ /* LCL: segfault */ @@ -48,7 +48,7 @@ Index: rpmdb/rpmdb.c /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/ { -@@ -2369,7 +2369,7 @@ static int rpmdbGrowIterator(/*@null@*/ +@@ -2401,7 +2401,7 @@ static int rpmdbGrowIterator(/*@null@*/ dbiIndexSet set; int rc; int xx; @@ -57,7 +57,7 @@ Index: rpmdb/rpmdb.c if (mi == NULL) return 1; -@@ -2405,6 +2405,25 @@ static int rpmdbGrowIterator(/*@null@*/ +@@ -2437,6 +2437,25 @@ static int rpmdbGrowIterator(/*@null@*/ set = NULL; (void) dbt2set(dbi, data, &set); @@ -83,7 +83,7 @@ Index: rpmdb/rpmdb.c for (i = 0; i < set->count; i++) set->recs[i].fpNum = fpNum; -@@ -3393,6 +3412,12 @@ static int skipDir(const char * dn) +@@ -3412,6 +3431,12 @@ static int skipDir(const char * dn) int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList, int numItems) { @@ -96,7 +96,7 @@ Index: rpmdb/rpmdb.c DBT * key; DBT * data; HGE_t hge = (HGE_t)headerGetEntryMinMemory; -@@ -3424,10 +3449,13 @@ key->data = (void *) fpList[i].baseName; +@@ -3443,10 +3468,13 @@ key->data = (void *) fpList[i].baseName; key->size = strlen((char *)key->data); if (key->size == 0) key->size++; /* XXX "/" fixup. */ diff --git a/findlang.diff b/findlang.diff index ed20524..0862f91 100644 --- a/findlang.diff +++ b/findlang.diff @@ -1,20 +1,22 @@ ---- scripts/find-lang.sh 2004-06-20 20:55:19.000000000 +0200 -+++ scripts/find-lang.sh 2008-03-21 18:13:21.489944000 +0100 -@@ -28,10 +28,10 @@ +Index: scripts/find-lang.sh +=================================================================== +--- scripts/find-lang.sh.orig ++++ scripts/find-lang.sh +@@ -28,10 +28,10 @@ the top of the tree containing the files PACKAGE_NAME is the %{name} of the package. This should also be the basename of the .mo files. the output is written to PACKAGE_NAME.lang unless \$3 is given in which case output is written -to \$3. -+to \$3 (note, that \$3 is appended to if given). ++to \$3 (note that \$3 is appended to if given). Additional options: - --with-gnome find GNOME help files - --with-kde find KDE help files -+ --without-gnome find GNOME help files -+ --without-kde find KDE help files ++ --without-gnome do not find GNOME help files ++ --without-kde do not find KDE help files + --with-qt find Qt translation files + --with-man find localized man pages --all-name match all package/domain names - --without-mo not find locales files - EOF -@@ -52,8 +52,8 @@ +@@ -54,8 +54,8 @@ else NAME=$1 fi shift @@ -22,32 +24,28 @@ -KDE=# +GNOME= +KDE= + QT=# + MAN=# MO= - MO_NAME=$NAME.lang - ALL_NAME=# -@@ -61,12 +61,12 @@ - - while test $# -gt 0 ; do - case "${1}" in -- --with-gnome ) -- GNOME= +@@ -73,6 +73,14 @@ while test $# -gt 0 ; do + KDE= + shift + ;; + --without-gnome ) + GNOME=# - shift - ;; -- --with-kde ) -- KDE= ++ shift ++ ;; + --without-kde ) + KDE=# ++ shift ++ ;; + --with-qt ) + QT= shift - ;; - --without-mo ) -@@ -85,26 +85,43 @@ +@@ -97,32 +105,48 @@ while test $# -gt 0 ; do esac done --find $TOP_DIR -type f|sed ' -+ +if ! test -s $MO_NAME ; then + echo "%defattr (644, root, root, 755)" > $MO_NAME +fi @@ -55,7 +53,7 @@ +MO_NAME_NEW=$MO_NAME.tmp.$$ +rm -f $MO_NAME_NEW + -+find $TOP_DIR -type f -o -type l|sed ' + find $TOP_DIR -type f -o -type l|sed ' s:'"$TOP_DIR"':: '"$ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: '"$NO_ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: @@ -89,11 +87,27 @@ s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME -+/^ *$/d' >> $MO_NAME_NEW ++/^$/d' >> $MO_NAME_NEW find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: -@@ -112,12 +129,20 @@ + '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1: + s:^\([^%].*\):: +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type f|sed ' + s:'"$TOP_DIR"':: +@@ -130,7 +154,7 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: + s:^[^%].*:: + s:%lang(C) :: +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type d|sed ' + s:'"$TOP_DIR"':: +@@ -138,9 +162,13 @@ s:'"$TOP_DIR"':: '"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: '"$ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: @@ -104,15 +118,40 @@ s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME -+/^ *$/d' >> $MO_NAME_NEW ++/^$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type f -o -type l|sed ' + s:'"$TOP_DIR"':: +@@ -148,7 +176,7 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$QT"'s:\(.*[/_]\([^/_]\+\)\.qm$\):%lang(\2) \1: + s:^[^%].*:: + s:%lang(C) :: +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type d|sed ' + s:'"$TOP_DIR"':: +@@ -156,17 +184,20 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1: + s:^\([^%].*\):: + s:%lang(C) :: +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type f -o -type l|sed ' + s:'"$TOP_DIR"':: + '"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1: + s:^\([^%].*\):: + s:%lang(C) :: +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW -if ! grep -q / $MO_NAME; then -+if ! grep -q / $MO_NAME_NEW ; then ++if ! grep -q / $MO_NAME_NEW; then echo "No translations found for ${NAME} in ${TOP_DIR}" -+ rm -f $MO_NAME_NEW ++ rm -rf $MO_NAME_NEW exit 1 -+else -+ sort -u $MO_NAME_NEW >> $MO_NAME -+ rm -f $MO_NAME_NEW fi ++sort -u $MO_NAME_NEW >> $MO_NAME ++rm -f $MO_NAME_NEW exit 0 diff --git a/forkfailed.diff b/forkfailed.diff deleted file mode 100644 index f5af4d0..0000000 --- a/forkfailed.diff +++ /dev/null @@ -1,40 +0,0 @@ -Print error message if scriptlet fork fails instead if silently -dying. [#152779] - -Index: lib/psm.c -=================================================================== ---- lib/psm.c.orig -+++ lib/psm.c -@@ -910,6 +910,12 @@ static rpmRC runScript(rpmpsm psm, Heade - } - /*@=branchstate@*/ - -+ if (psm->sq.child == (pid_t)-1) { -+ rpmError(RPMERR_FORK, _("Couldn't fork %s: %s\n"), sln, strerror(errno)); -+ rc = RPMRC_FAIL; -+ goto exit; -+ } -+ - (void) psmWait(psm); - - /* XXX filter order dependent multilib "other" arch helper error. */ -@@ -934,6 +940,7 @@ static rpmRC runScript(rpmpsm psm, Heade - } - } - -+exit: - if (freePrefixes) prefixes = hfd(prefixes, ipt); - - xx = Fclose(out); /* XXX dup'd STDOUT_FILENO */ -Index: rpmio/rpmsq.c -=================================================================== ---- rpmio/rpmsq.c.orig -+++ rpmio/rpmsq.c -@@ -407,6 +407,7 @@ fprintf(stderr, " Enable(%p): %p\n", - - pid = fork(); - if (pid < (pid_t) 0) { /* fork failed. */ -+ sq->child = (pid_t)-1; - /*@-bounds@*/ - xx = close(sq->pipes[0]); - xx = close(sq->pipes[1]); diff --git a/getcwdresult.diff b/getcwdresult.diff deleted file mode 100644 index 44b246f..0000000 --- a/getcwdresult.diff +++ /dev/null @@ -1,30 +0,0 @@ -Check getcwd return value, abort if rpm cannot determine current -directory. - ---- ./build.c.orig 2004-10-17 19:00:10.000000000 +0000 -+++ ./build.c 2005-12-19 17:52:25.000000000 +0000 -@@ -206,7 +211,10 @@ static int buildForTarget(rpmts ts, cons - directory for this run */ - - if (*arg != '/') { -- (void)getcwd(buf, BUFSIZ); -+ if (!getcwd(buf, BUFSIZ)) { -+ rpmError(RPMERR_STAT, "getcwd failed: %m\n"); -+ return 1; -+ } - strcat(buf, "/"); - strcat(buf, arg); - } else -@@ -225,7 +233,11 @@ static int buildForTarget(rpmts ts, cons - specut = urlPath(specURL, &specFile); - if (*specFile != '/') { - char *s = alloca(BUFSIZ); -- (void)getcwd(s, BUFSIZ); -+ if (!getcwd(s, BUFSIZ)) { -+ rpmError(RPMERR_STAT, "getcwd failed: %m\n"); -+ rc = 1; -+ goto exit; -+ } - strcat(s, "/"); - strcat(s, arg); - specURL = s; diff --git a/ghost.diff b/ghost.diff deleted file mode 100644 index 23bc798..0000000 --- a/ghost.diff +++ /dev/null @@ -1,17 +0,0 @@ -Fix --noghost query option. rh#103207 - -Already in rpm-4.4.7 - -Index: lib/query.c -=================================================================== ---- lib/query.c.orig -+++ lib/query.c -@@ -222,7 +222,7 @@ int showQueryPackage(QVA_t qva, rpmts ts - continue; - - /* If not querying %ghost, skip ghost files. */ -- if (!(qva->qva_fflags & RPMFILE_GHOST) && (fflags & RPMFILE_GHOST)) -+ if ((qva->qva_fflags & RPMFILE_GHOST) && (fflags & RPMFILE_GHOST)) - continue; - - /*@-boundswrite@*/ diff --git a/globlstat.diff b/globlstat.diff index e587fdd..2ab4040 100644 --- a/globlstat.diff +++ b/globlstat.diff @@ -4,9 +4,11 @@ glob code. [#129434], rh#126460 rpm-4.4.7 comes with its own glob implementation, so it doesn't need this patch (but it also doesn't hurt). ---- ./rpmio/rpmrpc.c.orig 2005-12-16 15:01:26.000000000 +0000 -+++ ./rpmio/rpmrpc.c 2006-02-13 18:55:39.000000000 +0000 -@@ -1450,7 +1462,8 @@ fprintf(stderr, "*** Glob(%s,0x%x,%p,%p) +Index: rpmio/rpmrpc.c +=================================================================== +--- rpmio/rpmrpc.c.orig ++++ rpmio/rpmrpc.c +@@ -1462,7 +1462,8 @@ fprintf(stderr, "*** Glob(%s,0x%x,%p,%p) pglob->gl_readdir = Readdir; pglob->gl_opendir = Opendir; pglob->gl_lstat = Lstat; diff --git a/globoffbyone.diff b/globoffbyone.diff deleted file mode 100644 index 3fff8cf..0000000 --- a/globoffbyone.diff +++ /dev/null @@ -1,13 +0,0 @@ -Fix off-by-one error in glob call. - ---- ./rpmio/rpmrpc.c.orig 2005-12-16 15:01:26.000000000 +0000 -+++ ./rpmio/rpmrpc.c 2006-02-13 18:55:39.000000000 +0000 -@@ -1403,7 +1415,7 @@ int Glob_pattern_p (const char * pattern - case '*': - return (1); - case '\\': -- if (quote && p[1] != '\0') -+ if (quote && *p != '\0') - p++; - continue; - diff --git a/initdbret.diff b/initdbret.diff deleted file mode 100644 index ac42891..0000000 --- a/initdbret.diff +++ /dev/null @@ -1,25 +0,0 @@ -Check rpmtsInitDB return value. Also patches rpm.c, which -actually is not used anymore. - ---- ./rpm.c.orig 2005-12-15 11:59:33.000000000 +0000 -+++ ./rpm.c 2005-12-15 11:59:53.000000000 +0000 -@@ -1119,7 +1119,7 @@ int main(int argc, const char ** argv) - break; - - case MODE_INITDB: -- rpmdbInit(rootdir, 0644); -+ ec = rpmdbInit(rootdir, 0644); - break; - - case MODE_CHECKSIG: ---- ./rpmqv.c.orig 2005-12-15 13:46:45.000000000 +0000 -+++ ./rpmqv.c 2005-12-15 13:47:37.000000000 +0000 -@@ -624,7 +624,7 @@ int main(int argc, const char ** argv) - switch (bigMode) { - #ifdef IAM_RPMDB - case MODE_INITDB: -- (void) rpmtsInitDB(ts, 0644); -+ ec = rpmtsInitDB(ts, 0644); - break; - - case MODE_REBUILDDB: diff --git a/localetag.diff b/localetag.diff index 3a2e0fa..fd6e632 100644 --- a/localetag.diff +++ b/localetag.diff @@ -3,8 +3,10 @@ Convert changelog and i18n header elements to current locale. Already in rpm-4.4.7 ---- ./lib/formats.c.orig 2005-01-26 04:46:54.000000000 +0000 -+++ ./lib/formats.c 2006-03-17 15:27:06.000000000 +0000 +Index: lib/formats.c +=================================================================== +--- lib/formats.c.orig ++++ lib/formats.c @@ -2,6 +2,7 @@ * \file lib/formats.c */ @@ -128,7 +130,7 @@ Already in rpm-4.4.7 /** * Identify type of trigger. * @param type tag type -@@ -1077,6 +1220,7 @@ static int i18nTag(Header h, int_32 tag, +@@ -1080,6 +1189,7 @@ static int i18nTag(Header h, int_32 tag, if (rc && (*data) != NULL) { *data = xstrdup(*data); @@ -136,7 +138,7 @@ Already in rpm-4.4.7 *freeData = 1; return 0; } -@@ -1088,6 +1232,56 @@ static int i18nTag(Header h, int_32 tag, +@@ -1091,6 +1201,56 @@ static int i18nTag(Header h, int_32 tag, } /** @@ -193,7 +195,7 @@ Already in rpm-4.4.7 * Retrieve summary text. * @param h header * @retval *type tag type -@@ -1127,6 +1321,20 @@ static int descriptionTag(Header h, /*@o +@@ -1130,6 +1290,20 @@ static int descriptionTag(Header h, /*@o return i18nTag(h, RPMTAG_DESCRIPTION, type, data, count, freeData); } @@ -214,7 +216,7 @@ Already in rpm-4.4.7 /** * Retrieve group text. * @param h header -@@ -1152,6 +1360,8 @@ const struct headerSprintfExtension_s rp +@@ -1155,6 +1329,8 @@ const struct headerSprintfExtension_s rp { HEADER_EXT_TAG, "RPMTAG_GROUP", { groupTag } }, { HEADER_EXT_TAG, "RPMTAG_DESCRIPTION", { descriptionTag } }, { HEADER_EXT_TAG, "RPMTAG_SUMMARY", { summaryTag } }, diff --git a/luanoreadline.diff b/luanoreadline.diff deleted file mode 100644 index 72ad014..0000000 --- a/luanoreadline.diff +++ /dev/null @@ -1,32 +0,0 @@ -Build lua without readling support. - ---- ./lua/Makefile.am.orig 2006-01-28 00:27:50.000000000 +0000 -+++ ./lua/Makefile.am 2006-01-28 00:28:25.000000000 +0000 -@@ -16,7 +16,7 @@ INCLUDES = -I$(srcdir)/include -I$(srcdi - - lua_lua_SOURCES = lua/lua.c - lua_lua_CFLAGS = -DLUA_USERCONFIG='"$(srcdir)/local/userconfig.c"' --lua_lua_LDADD = $(LDADD) -L/usr/lib -lreadline -lhistory -lncurses -+lua_lua_LDADD = $(LDADD) -lncurses - luac_luac_SOURCES = luac/luac.c luac/print.c lopcodes.c - luac_luac_CFLAGS = -DLUA_OPNAMES - ---- ./lua/local/userconfig.c.orig 2004-03-16 21:58:30.000000000 +0000 -+++ ./lua/local/userconfig.c 2006-01-28 00:34:39.000000000 +0000 -@@ -9,6 +9,8 @@ - {"rex", luaopen_rex}, \ - {"luapath", luapath}, - -+#if 0 -+ - #define lua_readline myreadline - #define lua_saveline mysaveline - -@@ -45,6 +47,7 @@ static void mysaveline (lua_State *L, co - } - } - } -+#endif - - static int luapath(lua_State *L) - { diff --git a/luaroot.diff b/luaroot.diff index 4d66cb4..ee66eac 100644 --- a/luaroot.diff +++ b/luaroot.diff @@ -2,7 +2,7 @@ Index: lib/psm.c =================================================================== --- lib/psm.c.orig +++ lib/psm.c -@@ -502,6 +502,8 @@ static rpmRC runLuaScript(rpmpsm psm, He +@@ -506,6 +506,8 @@ static rpmRC runLuaScript(rpmpsm psm, He { const rpmts ts = psm->ts; int rootFd = -1; @@ -11,7 +11,7 @@ Index: lib/psm.c const char *n, *v, *r; rpmRC rc = RPMRC_OK; int i; -@@ -511,20 +513,27 @@ static rpmRC runLuaScript(rpmpsm psm, He +@@ -515,20 +517,27 @@ static rpmRC runLuaScript(rpmpsm psm, He xx = headerNVR(h, &n, &v, &r); @@ -48,7 +48,7 @@ Index: lib/psm.c /* Create arg variable */ rpmluaPushTable(lua, "arg"); -@@ -561,14 +570,19 @@ static rpmRC runLuaScript(rpmpsm psm, He +@@ -565,14 +574,19 @@ static rpmRC runLuaScript(rpmpsm psm, He rpmluaDelVar(lua, "arg"); if (rootFd >= 0) { diff --git a/lzma-payload-2.diff b/lzma-payload-2.diff index 386b6d3..c3a4115 100644 --- a/lzma-payload-2.diff +++ b/lzma-payload-2.diff @@ -1,6 +1,8 @@ ---- rpmio/rpmio.c.orig 2008-03-18 13:29:28.000000000 +0000 -+++ rpmio/rpmio.c 2008-03-18 15:41:14.000000000 +0000 -@@ -80,6 +80,7 @@ static int inet_aton(const char *cp, str +Index: rpmio/rpmio.c +=================================================================== +--- rpmio/rpmio.c.orig ++++ rpmio/rpmio.c +@@ -84,6 +84,7 @@ static int inet_aton(const char *cp, str #define FDONLY(fd) assert(fdGetIo(fd) == fdio) #define GZDONLY(fd) assert(fdGetIo(fd) == gzdio) #define BZDONLY(fd) assert(fdGetIo(fd) == bzdio) @@ -8,7 +10,7 @@ #define UFDONLY(fd) /* assert(fdGetIo(fd) == ufdio) */ -@@ -185,6 +186,8 @@ static /*@observer@*/ const char * fdbg( +@@ -189,6 +190,8 @@ static /*@observer@*/ const char * fdbg( } else if (fps->io == bzdio) { sprintf(be, "BZD %p fdno %d", fps->fp, fps->fdno); #endif @@ -17,7 +19,7 @@ } else if (fps->io == fpio) { /*@+voidabstract@*/ sprintf(be, "%s %p(%d) fdno %d", -@@ -2629,6 +2632,348 @@ FDIO_t bzdio = /*@-compmempass@*/ &bzdio +@@ -2782,6 +2785,348 @@ FDIO_t bzdio = /*@-compmempass@*/ &bzdio /*@=moduncon@*/ #endif /* HAVE_BZLIB_H */ @@ -366,7 +368,7 @@ /* =============================================================== */ /*@observer@*/ static const char * getFdErrstr (FD_t fd) -@@ -2647,7 +2992,9 @@ static const char * getFdErrstr (FD_t fd +@@ -2800,7 +3145,9 @@ static const char * getFdErrstr (FD_t fd errstr = fd->errcookie; } else #endif /* HAVE_BZLIB_H */ @@ -377,7 +379,7 @@ { errstr = (fd->syserrno ? strerror(fd->syserrno) : ""); } -@@ -2961,6 +3308,9 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n" +@@ -3114,6 +3461,9 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n" fd = bzdFdopen(fd, zstdio); /*@=internalglobs@*/ #endif @@ -387,7 +389,7 @@ } else if (!strcmp(end, "ufdio")) { iof = ufdio; } else if (!strcmp(end, "fpio")) { -@@ -3148,6 +3498,9 @@ int Ferror(FD_t fd) +@@ -3301,6 +3651,9 @@ int Ferror(FD_t fd) ec = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0; i--; /* XXX fdio under bzdio always has fdno == -1 */ #endif diff --git a/lzma-payload.diff b/lzma-payload.diff index 2f232f0..59a77c8 100644 --- a/lzma-payload.diff +++ b/lzma-payload.diff @@ -1,6 +1,7 @@ -diff -purN build/pack.c build/pack.c ---- build/pack.c 2007-12-03 18:24:44.000000000 +0100 -+++ build/pack.c 2007-12-03 18:49:50.000000000 +0100 +Index: build/pack.c +=================================================================== +--- build/pack.c.orig ++++ build/pack.c @@ -479,6 +479,11 @@ int writeRPM(Header *hdrp, unsigned char /* Add prereq on rpm version that understands bzip2 payloads */ (void) rpmlibNeedsFeature(h, "PayloadIsBzip2", "3.0.5-1"); @@ -13,10 +14,11 @@ diff -purN build/pack.c build/pack.c strcpy(buf, rpmio_flags); buf[s - rpmio_flags] = '\0'; (void) headerAddEntry(h, RPMTAG_PAYLOADFLAGS, RPM_STRING_TYPE, buf+1, 1); -diff -purN lib/psm.c lib/psm.c ---- lib/psm.c 2007-12-03 18:24:45.000000000 +0100 -+++ lib/psm.c 2007-12-03 19:07:03.000000000 +0100 -@@ -2068,6 +2068,8 @@ psm->te->h = headerFree(psm->te->h); +Index: lib/psm.c +=================================================================== +--- lib/psm.c.orig ++++ lib/psm.c +@@ -2097,6 +2097,8 @@ psm->te->h = headerFree(psm->te->h); t = stpcpy(t, ".gzdio"); if (!strcmp(payload_compressor, "bzip2")) t = stpcpy(t, ".bzdio"); @@ -25,35 +27,36 @@ diff -purN lib/psm.c lib/psm.c rc = RPMRC_OK; } break; -diff -purN lib/rpmlibprov.c lib/rpmlibprov.c ---- lib/rpmlibprov.c 2007-12-03 18:24:45.000000000 +0100 -+++ lib/rpmlibprov.c 2007-12-03 19:14:35.000000000 +0100 -@@ -56,7 +56,10 @@ static struct rpmlibProvides_s rpmlibPro +Index: lib/rpmlibprov.c +=================================================================== +--- lib/rpmlibprov.c.orig ++++ lib/rpmlibprov.c +@@ -59,6 +59,9 @@ static struct rpmlibProvides_s rpmlibPro ( RPMSENSE_EQUAL), N_("internal support for lua scripts.") }, #endif -- { NULL, NULL, 0, NULL } + { "rpmlib(PayloadIsLzma)", "4.4.2-1", + (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), + N_("package payload can be compressed using lzma.") }, -+ { NULL, NULL, 0, NULL } + { NULL, NULL, 0, NULL } }; - void rpmShowRpmlibProvides(FILE * fp) -diff -purN macros.in macros.in ---- macros.in 2007-12-03 18:24:43.000000000 +0100 -+++ macros.in 2007-12-03 18:49:50.000000000 +0100 -@@ -321,6 +321,7 @@ package or when debugging this package.\ +Index: macros.in +=================================================================== +--- macros.in.orig ++++ macros.in +@@ -326,6 +326,7 @@ package or when debugging this package.\ # Compression type and level for source/binary package payloads. # "w9.gzdio" gzip level 9 (default). # "w9.bzdio" bzip2 level 9. +# "w5.lzdio" lzma level 5. (best compromise) # #%_source_payload w9.gzdio - #%_binary_payload w9.gzdio -diff -purN rpm2cpio.c rpm2cpio.c ---- rpm2cpio.c 2007-12-03 18:24:43.000000000 +0100 -+++ rpm2cpio.c 2007-12-03 18:49:50.000000000 +0100 + %_binary_payload w2.lzdio +Index: rpm2cpio.c +=================================================================== +--- rpm2cpio.c.orig ++++ rpm2cpio.c @@ -76,6 +76,8 @@ int main(int argc, char **argv) t = stpcpy(t, ".gzdio"); if (!strcmp(payload_compressor, "bzip2")) @@ -63,10 +66,11 @@ diff -purN rpm2cpio.c rpm2cpio.c } gzdi = Fdopen(fdi, rpmio_flags); /* XXX gzdi == fdi */ -diff -purN rpmio/rpmio.h rpmio/rpmio.h ---- rpmio/rpmio.h 2007-12-03 18:24:43.000000000 +0100 -+++ rpmio/rpmio.h 2007-12-03 19:19:56.000000000 +0100 -@@ -662,6 +662,10 @@ int ufdGetFile( /*@killref@*/ FD_t sfd, +Index: rpmio/rpmio.h +=================================================================== +--- rpmio/rpmio.h.orig ++++ rpmio/rpmio.h +@@ -669,6 +669,10 @@ int ufdGetFile( /*@killref@*/ FD_t sfd, /** */ @@ -77,8 +81,10 @@ diff -purN rpmio/rpmio.h rpmio/rpmio.h /*@observer@*/ /*@unchecked@*/ extern FDIO_t fadio; /*@=exportlocal@*/ /*@}*/ ---- scripts/rpm2cpio.sh 2002-02-04 17:53:52.000000000 +0100 -+++ scripts/rpm2cpio.sh 2007-11-30 17:28:51.000000000 +0100 +Index: scripts/rpm2cpio.sh +=================================================================== +--- scripts/rpm2cpio.sh.orig ++++ scripts/rpm2cpio.sh @@ -23,4 +23,14 @@ dl=`expr 256 \* \( 256 \* \( 256 \* $6 + hdrsize=`expr 8 + 16 \* $il + $dl` o=`expr $o + $hdrsize` @@ -95,9 +101,11 @@ diff -purN rpmio/rpmio.h rpmio/rpmio.h + *) dd if="$pkg" ibs=$o skip=1 2>/dev/null | unlzma ;; + #*) echo "Unrecognized rpm file: $pkg"; return 1 ;; +esac ---- rpmio/Makefile.am.lzma 2008-03-12 15:19:38.000000000 +0100 -+++ rpmio/Makefile.am 2008-03-12 15:19:54.000000000 +0100 -@@ -41,7 +41,7 @@ +Index: rpmio/Makefile.am +=================================================================== +--- rpmio/Makefile.am.orig ++++ rpmio/Makefile.am +@@ -41,7 +41,7 @@ librpmio_la_LDFLAGS = -release 4.4 $(LDF @WITH_MAGIC_LIB@ \ @WITH_ZLIB_LIB@ \ -lpthread diff --git a/lzma.diff b/lzma.diff deleted file mode 100644 index f4c4add..0000000 --- a/lzma.diff +++ /dev/null @@ -1,100 +0,0 @@ -Add support for lzma compressed archives. - ---- - build/parsePrep.c | 3 +++ - configure.ac | 1 + - file/src/compress.c | 3 +++ - macros.in | 1 + - rpmio/macro.c | 5 +++++ - rpmio/rpmmacro.h | 3 ++- - 6 files changed, 15 insertions(+), 1 deletion(-) - -Index: build/parsePrep.c -=================================================================== ---- build/parsePrep.c.orig 2004-11-28 21:54:53.000000000 +0100 -+++ build/parsePrep.c 2007-10-11 13:12:55.000000000 +0200 -@@ -251,6 +251,9 @@ static int checkOwners(const char * urlf - t = "%{_unzipbin} -qq"; - needtar = 0; - break; -+ case COMPRESSED_LZMA: -+ t = "%{__lzma} -dc"; -+ break; - } - zipper = rpmGetPath(t, NULL); - buf[0] = '\0'; -Index: configure.ac -=================================================================== ---- configure.ac.orig 2007-10-11 12:46:47.000000000 +0200 -+++ configure.ac 2007-10-11 12:46:48.000000000 +0200 -@@ -221,6 +221,7 @@ AC_PATH_PROG(__GPG, gpg, /usr/bin/gpg, $ - AC_PATH_PROG(__GREP, grep, /bin/grep, $MYPATH) - AC_PATH_PROG(GZIPBIN, gzip, /bin/gzip, $MYPATH) - AC_PATH_PROG(UNZIPBIN, unzip, /usr/bin/unzip, $MYPATH) -+AC_PATH_PROG(LZMABIN, lzma, /usr/bin/lzma, $MYPATH) - - AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH) - AC_MSG_CHECKING(checking whether id supports -u) -Index: file/src/compress.c -=================================================================== ---- file/src/compress.c.orig 2007-10-11 12:46:40.000000000 +0200 -+++ file/src/compress.c 2007-10-11 12:46:48.000000000 +0200 -@@ -76,6 +76,9 @@ private struct { - { "PK\3\4", 4, { "gzip", "-cdq", NULL }, 1 }, /* pkzipped, */ - /* ...only first file examined */ - { "BZh", 3, { "bzip2", "-cd", NULL }, 1 }, /* bzip2-ed */ -+ /* The first bytes of a LZMA compressed file describe some compression -+ settings and thus vary. This handles the most common case: */ -+ { "]\000\000",3, { "lzma", "-cdq", NULL }, 1 }, /* lzma-ed */ - }; - /*@=nullassign@*/ - -Index: macros.in -=================================================================== ---- macros.in.orig 2007-10-11 12:46:46.000000000 +0200 -+++ macros.in 2007-10-11 12:46:48.000000000 +0200 -@@ -48,6 +48,7 @@ - %__id @__ID@ - %__install @__INSTALL@ - %__ln_s @LN_S@ -+%__lzma @LZMABIN@ - %__make @__MAKE@ - %__mkdir @__MKDIR@ - %__mkdir_p @MKDIR_P@ -Index: rpmio/macro.c -=================================================================== ---- rpmio/macro.c.orig 2005-07-13 11:49:40.000000000 +0200 -+++ rpmio/macro.c 2007-10-11 13:11:46.000000000 +0200 -@@ -1165,6 +1165,9 @@ doFoo(MacroBuf mb, int negate, const cha - case 3: /* COMPRESSED_ZIP */ - sprintf(be, "%%_unzip %s", b); - break; -+ case 4: /* COMPRESSED_LZMA */ -+ sprintf(be, "%%_lzma -dc %s", b); -+ break; - } - b = be; - } else if (STREQ("S", f, fn)) { -@@ -2075,6 +2078,8 @@ int isCompressed(const char * file, rpmC - } else if ((magic[0] == 0120) && (magic[1] == 0113) && - (magic[2] == 0003) && (magic[3] == 0004)) { /* pkzip */ - *compressed = COMPRESSED_ZIP; -+ } else if (magic[0] == 0135 && magic[1] == 0 && magic[2] == 0) { /* lzma */ -+ *compressed = COMPRESSED_LZMA; - } else if (((magic[0] == 0037) && (magic[1] == 0213)) || /* gzip */ - ((magic[0] == 0037) && (magic[1] == 0236)) || /* old gzip */ - ((magic[0] == 0037) && (magic[1] == 0036)) || /* pack */ -Index: rpmio/rpmmacro.h -=================================================================== ---- rpmio/rpmmacro.h.orig 2004-10-20 12:19:34.000000000 +0200 -+++ rpmio/rpmmacro.h 2007-10-11 13:08:47.000000000 +0200 -@@ -172,7 +172,8 @@ typedef enum rpmCompressedMagic_e { - COMPRESSED_NOT = 0, /*!< not compressed */ - COMPRESSED_OTHER = 1, /*!< gzip can handle */ - COMPRESSED_BZIP2 = 2, /*!< bzip2 can handle */ -- COMPRESSED_ZIP = 3 /*!< unzip can handle */ -+ COMPRESSED_ZIP = 3, /*!< unzip can handle */ -+ COMPRESSED_LZMA = 4 /*!< lzma can handle */ - } rpmCompressedMagic; - - /** diff --git a/macrosin.diff b/macrosin.diff index a181192..a1fe427 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -4,7 +4,7 @@ Index: macros.in =================================================================== --- macros.in.orig +++ macros.in -@@ -166,22 +166,22 @@ +@@ -171,22 +171,22 @@ # Template for debug information sub-package. %debug_package \ @@ -33,7 +33,7 @@ Index: macros.in # The path to the gzip executable (legacy, use %{__gzip} instead). %_gzipbin %{__gzip} -@@ -218,7 +218,7 @@ package or when debugging this package.\ +@@ -223,7 +223,7 @@ package or when debugging this package.\ %_tmppath %{_var}/tmp # Path to top of build area. @@ -42,7 +42,7 @@ Index: macros.in # The path to the unzip executable (legacy, use %{__unzip} instead). %_unzipbin %{__unzip} -@@ -323,7 +323,7 @@ package or when debugging this package.\ +@@ -328,7 +328,7 @@ package or when debugging this package.\ # "w9.bzdio" bzip2 level 9. # #%_source_payload w9.gzdio @@ -51,7 +51,7 @@ Index: macros.in # The signature to use and the location of configuration files for # signing packages with PGP. -@@ -371,7 +371,7 @@ package or when debugging this package.\ +@@ -383,7 +383,7 @@ package or when debugging this package.\ # # Use internal dependency generator rather than external helpers? @@ -60,7 +60,17 @@ Index: macros.in # # Filter GLIBC_PRIVATE Provides: and Requires: -@@ -420,20 +420,22 @@ print (t)\ +@@ -426,16 +426,22 @@ print (t)\ + # Undefined, missing or %{nil} will use package content (if available). + %_verify_file_context_path %{__file_context_path} + ++# maxnum,cuttime,minnum ++# 2006/07/01 (SLES10 GA) ++%_binarychangelogtrim 0,1151704800,10 ++ + # + # Path to scripts to autogenerate package dependencies, + # # Note: Used iff _use_internal_dependency_generator is zero. #%__find_provides @RPMCONFIGDIR@/rpmdeps --provides #%__find_requires @RPMCONFIGDIR@/rpmdeps --requires @@ -75,21 +85,7 @@ Index: macros.in # # Path to scripts to autogenerate per-interpreter package dependencies, - # - # Note: Used iff _use_internal_dependency_generator is non-zero. The - # helpers are also used by @RPMCONFIGDIR@/rpmdeps {--provides|--requires}. --%__perl_provides @RPMCONFIGDIR@/perldeps.pl --provides --%__perl_requires @RPMCONFIGDIR@/perldeps.pl --requires --#%__perl_provides @RPMCONFIGDIR@/perl.prov --#%__perl_requires @RPMCONFIGDIR@/perl.req -+#%__perl_provides @RPMCONFIGDIR@/perldeps.pl --provides -+#%__perl_requires @RPMCONFIGDIR@/perldeps.pl --requires -+%__perl_provides @RPMCONFIGDIR@/perl.prov -+%__perl_requires @RPMCONFIGDIR@/perl.req - - %__python_provides @RPMCONFIGDIR@/pythondeps.sh --provides - %__python_requires @RPMCONFIGDIR@/pythondeps.sh --requires -@@ -591,15 +593,15 @@ print (t)\ +@@ -606,15 +612,15 @@ print (t)\ %_dbi_config_Packages %{_dbi_htconfig} lockdbfd # "Depends" is a per-transaction cache of known dependency resolutions. @@ -112,99 +108,7 @@ Index: macros.in # XXX legacy configuration. # Choose db interface: -@@ -658,8 +660,8 @@ print (t)\ - - # Horowitz Key Protocol server configuration - # --%_hkp_keyserver hkp://pgp.mit.edu --%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x -+#%_hkp_keyserver hkp://pgp.mit.edu -+#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x - - #============================================================================== - # ---- Transaction macros. -@@ -767,80 +769,6 @@ print (t)\ - # - # XXX Note: that there cannot be any whitespace within the string "p>q", - # and that both p and q are package names (i.e. no version/release). --# --#%_dependency_whiteout_5_2 \ --# pam>pamconfig --#%_dependency_whiteout_6_1 \ --# pilot-link-devel>pilot-link --#%_dependency_whiteout_6_2 \ --# egcs-c++>libstdc++ --%_dependency_whiteout_7_0 \ -- pango-gtkbeta-devel>pango-gtkbeta\ -- XFree86>Mesa \ -- compat-glibc>db2 \ -- compat-glibc>db1 \ -- pam>initscripts \ -- initscripts>sysklogd --%_dependency_whiteout_7_1 \ -- arts>kdelibs-sound --%_dependency_whiteout_7_2 \ -- libgnomeprint15>gnome-print \ -- nautilus>nautilus-mozilla \ -- tcl>postgresql-tcl --#%_dependency_whiteout_8_0 \ --# perl>perl-Parse-RecDescent \ --# XFree86-libs>XFree86-Mesa-libGL \ --# perl>perl-Filter \ --# perl>mrtg \ --# perl>mod_perl \ --# mysql>perl-DBD-MySQL \ --# ghostscript>gimp-print \ --# arts>kde2-compat \ --# perl-Date-Calc>perl-Bit-Vector \ --# glibc-debug>glibc-devel -- --%_dependency_whiteout_8_0 \ -- mysql>perl-DBD-MySQL \ -- perl>perl-Filter \ -- perl>mrtg \ -- perl>mod_perl \ -- perl-Date-Calc>perl-Bit-Vector \ -- --%_dependency_whiteout_fc3 \ -- coreutils>pam \ -- nautilus>nautilus-cd-burner \ -- aspell>aspell-en \ -- kernel>initscripts \ -- kernel-smp>initscripts \ -- xorg-x11-libs>xorg-x11-Mesa-libGL \ -- openldap>cyrus-sasl-md5 \ -- openldap>cyrus-sasl \ -- openjade>docbook-dtds \ -- gtk+>gdk-pixbuf \ -- xorg-x11>xinitrc \ -- gnome-python2>gnome-python2-bonobo \ -- httpd-suexec>httpd \ -- xemacs-sumo>apel-xemacs \ -- php>php-pear \ -- openoffice.org-libs>openoffice.org -- --%_dependency_whiteout \ -- libtermcap>bash \ -- modutils>vixie-cron \ -- ypbind>yp-tools \ -- ghostscript-fonts>ghostscript \ -- %{?_dependency_whiteout_fc3} \ -- %{?_dependency_whiteout_fc2} \ -- %{?_dependency_whiteout_fc1} \ -- %{?_dependency_whiteout_9} \ -- %{?_dependency_whiteout_8_0} \ -- %{?_dependency_whiteout_7_2} \ -- %{?_dependency_whiteout_7_1} \ -- %{?_dependency_whiteout_7_0} \ -- %{?_dependency_whiteout_6_2} \ -- %{?_dependency_whiteout_6_1} \ -- %{?_dependency_whiteout_5_2} \ -- %{nil} - - # - # Default headerSprintf() output format string for rpm -qa -@@ -1093,7 +1021,7 @@ print (t)\ +@@ -1038,7 +1044,7 @@ print (t)\ %_build_vendor %{_host_vendor} %_build_os %{_host_os} %_host @host@ @@ -213,10 +117,10 @@ Index: macros.in %_host_cpu @host_cpu@ %_host_vendor @host_vendor@ %_host_os @host_os@ -@@ -1250,12 +1178,191 @@ done \ +@@ -1194,6 +1200,181 @@ done \ + %perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib) %perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) - #------------------------------------------------------------------------------ +# More useful perl macros (from Raul Dias ) +# +%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!") @@ -392,20 +296,22 @@ Index: macros.in +run "\\$@"\ +EOF + -+#------------------------------------------------------------------------------ + #------------------------------------------------------------------------------ # arch macro for all Intel i?86 compatibile processors # (Note: This macro (and it's analogues) will probably be obsoleted when - # rpm can use regular expressions against target platforms in macro - # conditionals. - # - %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon -+%arm armv4l armv4b armv5l armv5b armv5tel armv5teb -+%arml armv4l armv5l armv5tel -+%armb armv4b armv5b armv5teb +@@ -1204,8 +1385,9 @@ done \ - #------------------------------------------------------------------------ - # Use in %install to generate locale specific file lists. For example, -@@ -1270,3 +1377,17 @@ done \ + #------------------------------------------------------------------------------ + # arch macro for all supported ARM processors +-%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l +- ++%arm armv3l armv4b armv4l armv4tl armv5b armv5l armv5teb armv5tel armv5tejl armv6l ++%arml armv3l armv4l armv5l armv5tel armv6l ++%armb armv4b armv5b armv5teb + + #------------------------------------------------------------------------------ + # arch macro for all supported Alpha processors +@@ -1224,3 +1406,26 @@ done \ # \endverbatim #*/ @@ -423,3 +329,12 @@ Index: macros.in +%info_del() test -x /sbin/install-info -a ! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet --delete --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \ +%{nil} + ++%service_add() %{fillup_and_insserv %{1}} ++%service_del_preun() %{stop_on_removal %{1}} ++%service_del_postun() %{restart_on_update %{1}} ++ ++%user_group_add() \ ++/usr/sbin/groupadd -o -r %{1} 2>/dev/null || :\ ++/usr/sbin/useradd -o -r -g %{1} -d %{2} -s %{3} -c %{4} %{1} 2>/dev/null || :\ ++%{nil} ++ diff --git a/mimetype.diff b/mimetype.diff new file mode 100644 index 0000000..5b4020d --- /dev/null +++ b/mimetype.diff @@ -0,0 +1,22 @@ +--- ./autodeps/linux.prov.orig 2008-09-12 16:23:17.000000000 +0000 ++++ ./autodeps/linux.prov 2008-09-12 16:37:03.000000000 +0000 +@@ -11,6 +11,7 @@ solist=($(printf "%s\n" "${filelist[@]}" + pythonlist= + tcllist= + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) ++mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) + + # + # --- Alpha does not mark 64bit dependencies +@@ -59,6 +60,11 @@ done | sort -u + printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.prov | sort -u + + # ++# --- mimetypes in .desktop files ++[ -x /usr/lib/rpm/mimetypes.prov -a -n "$mimetypelist" ] && ++ printf "%s\n" "${mimetypelist[@]}" | /usr/lib/rpm/mimetypes.prov | sort -u ++ ++# + # --- Mono exes/dlls + : ${MONO_PREFIX=/usr} + if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then diff --git a/missingok.diff b/missingok.diff index 96133c9..a4e1412 100644 --- a/missingok.diff +++ b/missingok.diff @@ -1,8 +1,10 @@ Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7. ---- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000 -+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000 -@@ -581,8 +632,13 @@ retry: +Index: lib/depends.c +=================================================================== +--- lib/depends.c.orig ++++ lib/depends.c +@@ -593,8 +593,13 @@ retry: /*@=boundsread@*/ unsatisfied: @@ -18,7 +20,7 @@ Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7. exit: /* -@@ -975,6 +1082,8 @@ static inline /*@observer@*/ const char +@@ -963,6 +968,8 @@ static inline /*@observer@*/ const char return "Requires(postun):"; if (f & RPMSENSE_SCRIPT_VERIFY) return "Requires(verify):"; @@ -27,9 +29,11 @@ Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7. if (f & RPMSENSE_FIND_REQUIRES) return "Requires(auto):"; return "Requires:"; ---- ./lib/rpmlib.h.orig 2005-12-15 14:50:30.000000000 +0000 -+++ ./lib/rpmlib.h 2006-02-03 13:22:27.000000000 +0000 -@@ -547,6 +561,7 @@ typedef enum rpmsenseFlags_e { +Index: lib/rpmlib.h +=================================================================== +--- lib/rpmlib.h.orig ++++ lib/rpmlib.h +@@ -548,6 +548,7 @@ typedef enum rpmsenseFlags_e { RPMSENSE_SCRIPT_POSTUN | \ RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_FIND_REQUIRES | \ diff --git a/modalias.diff b/modalias.diff index ccfe6b6..bba9fae 100644 --- a/modalias.diff +++ b/modalias.diff @@ -1,9 +1,22 @@ SUSE specific find-supplements, used for kernel builds -Index: ./scripts/find-supplements +Index: macros.in +=================================================================== +--- macros.in.orig ++++ macros.in +@@ -440,7 +440,7 @@ print (t)\ + %__find_requires @RPMCONFIGDIR@/find-requires %name + #%__find_conflicts ??? + #%__find_obsoletes ??? +-#%__find_supplements ??? ++%__find_supplements @RPMCONFIGDIR@/find-supplements %name + #%__find_enhances ??? + + # +Index: scripts/find-supplements =================================================================== --- /dev/null -+++ ./scripts/find-supplements ++++ scripts/find-supplements @@ -0,0 +1,14 @@ +#!/bin/bash + @@ -19,10 +32,10 @@ Index: ./scripts/find-supplements + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@" + +exit 0 -Index: ./scripts/find-supplements.ksyms +Index: scripts/find-supplements.ksyms =================================================================== --- /dev/null -+++ ./scripts/find-supplements.ksyms ++++ scripts/find-supplements.ksyms @@ -0,0 +1,56 @@ +#! /bin/sh + @@ -80,16 +93,3 @@ Index: ./scripts/find-supplements.ksyms +done \ +| sort -u \ +| combine_modaliases -Index: ./macros.in -=================================================================== ---- ./macros.in -+++ ./macros.in -@@ -424,7 +424,7 @@ print (t)\ - %__find_requires @RPMCONFIGDIR@/find-requires %name - #%__find_conflicts ??? - #%__find_obsoletes ??? --#%__find_supplements ??? -+%__find_supplements @RPMCONFIGDIR@/find-supplements %name - #%__find_enhances ??? - - # diff --git a/nameversioncompare.diff b/nameversioncompare.diff index 0bd74c4..c02343d 100644 --- a/nameversioncompare.diff +++ b/nameversioncompare.diff @@ -1,8 +1,10 @@ Also compare the name and not only the version when checking if two packages are the same. rh#104066 ---- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000 -+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000 +Index: lib/depends.c +=================================================================== +--- lib/depends.c.orig ++++ lib/depends.c @@ -124,6 +124,24 @@ static int removePackage(rpmts ts, Heade return 0; } @@ -28,7 +30,7 @@ two packages are the same. rh#104066 int rpmtsAddInstallElement(rpmts ts, Header h, fnpyKey key, int upgrade, rpmRelocation * relocs) { -@@ -303,7 +322,7 @@ addheader: +@@ -315,7 +333,7 @@ addheader: continue; /* Skip packages that contain identical NEVR. */ @@ -37,7 +39,7 @@ two packages are the same. rh#104066 continue; xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey); -@@ -354,11 +373,9 @@ addheader: +@@ -366,11 +384,9 @@ addheader: * If no obsoletes version info is available, match all names. */ if (rpmdsEVR(obsoletes) == NULL diff --git a/noautoreloc.diff b/noautoreloc.diff deleted file mode 100644 index f9efd69..0000000 --- a/noautoreloc.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- ./configure.ac.orig 2008-02-21 20:47:51.000000000 +0000 -+++ ./configure.ac 2008-02-21 20:51:38.000000000 +0000 -@@ -1300,6 +1300,11 @@ unknown|pc|ibm|redhat|pld|mandrake|conec - test -f /etc/caos-release && RPMCANONVENDOR=caos - ;; - esac -+if test "$RPMCANONVENDOR" = suse ; then -+ RPMCANONCOLOR=0 -+ autorelocate_path='%{nil}' -+ autorelocate_dcolor='0' -+fi - RPMCANONOS="$build_os_noversion" - AC_SUBST(RPMCANONCOLOR) - AC_SUBST(autorelocate_path) diff --git a/nodefattr.diff b/nodefattr.diff index 227668d..fb535db 100644 --- a/nodefattr.diff +++ b/nodefattr.diff @@ -1,9 +1,11 @@ Revert upstream patch that always uses %defattr(-,root,root). Upstream should probably use a macro instead. ---- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000 -+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000 -@@ -2000,7 +2012,9 @@ static int processPackageFiles(Spec spec +Index: build/files.c +=================================================================== +--- build/files.c.orig ++++ build/files.c +@@ -2014,7 +2014,9 @@ static int processPackageFiles(Spec spec nullAttrRec(&fl.cur_ar); nullAttrRec(&fl.def_ar); diff --git a/nolua.diff b/nolua.diff deleted file mode 100644 index 2244136..0000000 --- a/nolua.diff +++ /dev/null @@ -1,83 +0,0 @@ -Allow build without lua support. - ---- ./build/parseScript.c.orig 2005-12-16 18:34:36.000000000 +0000 -+++ ./build/parseScript.c 2005-12-16 18:36:08.000000000 +0000 -@@ -283,6 +283,7 @@ int parseScript(Spec spec, int parsePart - stripTrailingBlanksStringBuf(sb); - p = getStringBuf(sb); - -+#ifdef WITH_LUA - if (!strcmp(progArgv[0], "")) { - rpmlua lua = NULL; /* Global state. */ - if (rpmluaCheckScript(lua, p, partname) != RPMRC_OK) { -@@ -291,7 +292,9 @@ int parseScript(Spec spec, int parsePart - } - (void) rpmlibNeedsFeature(pkg->header, - "BuiltinLuaScripts", "4.2.2-1"); -- } else if (progArgv[0][0] == '<') { -+ } else -+#endif -+ if (progArgv[0][0] == '<') { - rpmError(RPMERR_BADSPEC, - _("line %d: unsupported internal script: %s\n"), - spec->lineNum, progArgv[0]); ---- ./lib/psm.c.orig 2005-12-14 18:59:10.000000000 +0000 -+++ ./lib/psm.c 2006-02-24 11:46:54.000000000 +0000 -@@ -490,6 +490,7 @@ static pid_t psmWait(rpmpsm psm) - return psm->sq.reaped; - } - -+#ifdef WITH_LUA - /** - * Run internal Lua script. - */ -@@ -572,6 +573,7 @@ static rpmRC runLuaScript(rpmpsm psm, He - - return rc; - } -+#endif - - /** - */ -@@ -637,11 +639,15 @@ static rpmRC runScript(rpmpsm psm, Heade - xx = hge(h, RPMTAG_ARCH, NULL, (void **) &a, NULL); - - if (progArgv && strcmp(progArgv[0], "") == 0) { -+#ifdef WITH_LUA - rpmMessage(RPMMESS_DEBUG, - _("%s: %s(%s-%s-%s.%s) running scriptlet.\n"), - psm->stepName, tag2sln(psm->scriptTag), n, v, r, a); - return runLuaScript(psm, h, sln, progArgc, progArgv, - script, arg1, arg2); -+#else -+ return RPMRC_FAIL; -+#endif - } - - psm->sq.reaper = 1; ---- ./lib/rpmlibprov.c.orig 2004-03-16 21:58:29.000000000 +0000 -+++ ./lib/rpmlibprov.c 2006-06-14 13:52:46.000000000 +0000 -@@ -51,9 +54,11 @@ static struct rpmlibProvides_s rpmlibPro - { "rpmlib(ConcurrentAccess)", "4.1-1", - ( RPMSENSE_EQUAL), - N_("package scriptlets may access the rpm database while installing.") }, -+#ifdef WITH_LUA - { "rpmlib(BuiltinLuaScripts)", "4.2.2-1", - ( RPMSENSE_EQUAL), - N_("internal support for lua scripts.") }, -+#endif - { NULL, NULL, 0, NULL } - }; - ---- ./lib/rpmrc.c.orig 2005-01-17 18:46:23.000000000 +0000 -+++ ./lib/rpmrc.c 2005-12-16 18:30:29.000000000 +0000 -@@ -1883,7 +1873,9 @@ int rpmReadConfigFiles(const char * file - } - - /* Force Lua state initialization */ -+#ifdef WITH_LUA - (void)rpmluaGetPrintBuffer(NULL); -+#endif - - return 0; - } diff --git a/noneon.diff b/noneon.diff deleted file mode 100644 index b1ff9ca..0000000 --- a/noneon.diff +++ /dev/null @@ -1,292 +0,0 @@ -Allow build without the neon library. Resurrects old httpOpen -code from rpm-4.1.1. -Building without neon means no webdav file uploads, though. - ---- ./rpmio/rpmdav.c.orig 2005-12-16 18:04:29.000000000 +0000 -+++ ./rpmio/rpmdav.c 2005-12-16 18:17:53.000000000 +0000 -@@ -9,6 +9,8 @@ - #include - #endif - -+#ifdef WITH_NEON -+ - #include "ne_alloc.h" - #include "ne_auth.h" - #include "ne_basic.h" -@@ -27,6 +29,8 @@ - #include "ne_string.h" - #include "ne_utils.h" - -+#endif /* WITH_NEON */ -+ - #include - - #define _RPMDAV_INTERNAL -@@ -61,6 +65,8 @@ _free(/*@only@*/ /*@null@*/ /*@out@*/ co - return NULL; - } - -+#ifdef WITH_NEON -+ - /* =============================================================== */ - static int davFree(urlinfo u) - /*@globals internalState @*/ -@@ -1370,6 +1376,8 @@ fprintf(stderr, "*** davReadlink(%s) rc - } - #endif /* NOTYET */ - -+#endif /* WITH_NEON */ -+ - /* =============================================================== */ - /*@unchecked@*/ - int avmagicdir = 0x3607113; -@@ -1494,6 +1502,8 @@ fprintf(stderr, "*** avOpendir(%s)\n", p - } - /*@=boundswrite@*/ - -+#ifdef WITH_NEON -+ - /* =============================================================== */ - /*@unchecked@*/ - int davmagicdir = 0x8440291; -@@ -1661,4 +1671,6 @@ fprintf(stderr, "*** davOpendir(%s)\n", - return (DIR *) avdir; - /*@=kepttrans@*/ - } -+ -+#endif /* WITH_NEON */ - /*@=modfilesys@*/ ---- ./rpmio/rpmio.c.orig 2005-01-26 03:39:58.000000000 +0000 -+++ ./rpmio/rpmio.c 2005-12-16 17:51:19.000000000 +0000 -@@ -371,7 +371,11 @@ static ssize_t fdRead(void * cookie, /*@ - /*@-boundswrite@*/ - /* HACK: flimsy wiring for davRead */ - if (fd->req != NULL) { -+#ifdef WITH_NEON - rc = davRead(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count)); -+#else -+ rc = -1; -+#endif - /* XXX Chunked davRead EOF. */ - if (rc == 0) - fd->bytesRemain = 0; -@@ -404,9 +408,13 @@ static ssize_t fdWrite(void * cookie, co - fdstat_enter(fd, FDSTAT_WRITE); - /*@-boundsread@*/ - /* HACK: flimsy wiring for davWrite */ -- if (fd->req != NULL) -+ if (fd->req != NULL) { -+#ifdef WITH_NEON - rc = davWrite(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count)); -- else -+#else -+ return -1; -+#endif -+ } else - rc = write(fdno, buf, (count > fd->bytesRemain ? fd->bytesRemain : count)); - /*@=boundsread@*/ - fdstat_exit(fd, FDSTAT_WRITE, rc); -@@ -455,9 +463,13 @@ static int fdClose( /*@only@*/ void * co - fdstat_enter(fd, FDSTAT_CLOSE); - /* HACK: flimsy wiring for davClose */ - /*@-branchstate@*/ -- if (fd->req != NULL) -+ if (fd->req != NULL) { -+#ifdef WITH_NEON - rc = davClose(fd); -- else -+#else -+ return -1; -+#endif -+ } else - rc = ((fdno >= 0) ? close(fdno) : -2); - /*@=branchstate@*/ - fdstat_exit(fd, FDSTAT_CLOSE, rc); -@@ -2029,6 +2041,56 @@ exit: - } - /*@=nullstate@*/ - -+#ifndef WITH_NEON -+/*@-nullstate@*/ /* FIX: u->{ctrl,data}->url undef after XurlLink. */ -+static /*@null@*/ FD_t httpOpen(const char * url, /*@unused@*/ int flags, -+ /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret) -+ /*@globals internalState @*/ -+ /*@modifies *uret, internalState @*/ -+{ -+ urlinfo u = NULL; -+ FD_t fd = NULL; -+ -+#if 0 /* XXX makeTempFile() heartburn */ -+ assert(!(flags & O_RDWR)); -+#endif -+ if (urlSplit(url, &u)) -+ goto exit; -+ -+ if (u->ctrl == NULL) -+ u->ctrl = fdNew("persist ctrl (httpOpen)"); -+ if (u->ctrl->nrefs > 2 && u->data == NULL) -+ u->data = fdNew("persist data (httpOpen)"); -+ -+ if (u->ctrl->url == NULL) -+ fd = fdLink(u->ctrl, "grab ctrl (httpOpen persist ctrl)"); -+ else if (u->data->url == NULL) -+ fd = fdLink(u->data, "grab ctrl (httpOpen persist data)"); -+ else -+ fd = fdNew("grab ctrl (httpOpen)"); -+ -+ if (fd) { -+ fdSetIo(fd, ufdio); -+ fd->ftpFileDoneNeeded = 0; -+ fd->rd_timeoutsecs = httpTimeoutSecs; -+ fd->contentLength = fd->bytesRemain = -1; -+ fd->url = urlLink(u, "url (httpOpen)"); -+ fd = fdLink(fd, "grab data (httpOpen)"); -+ fd->urlType = URL_IS_HTTP; -+ } -+ -+exit: -+/*@-boundswrite@*/ -+ if (uret) -+ *uret = u; -+/*@=boundswrite@*/ -+ /*@-refcounttrans@*/ -+ return fd; -+ /*@=refcounttrans@*/ -+} -+/*@=nullstate@*/ -+#endif -+ - static /*@null@*/ FD_t ufdOpen(const char * url, int flags, mode_t mode) - /*@globals h_errno, fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/ -@@ -2067,7 +2129,11 @@ fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o - case URL_IS_HTTPS: - case URL_IS_HTTP: - case URL_IS_HKP: -+#ifdef WITH_NEON - fd = davOpen(url, flags, mode, &u); -+#else -+ fd = httpOpen(url, flags, mode, &u); -+#endif - if (fd == NULL || u == NULL) - break; - -@@ -2075,7 +2141,11 @@ fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o - ? ((flags & O_APPEND) ? "PUT" : - ((flags & O_CREAT) ? "PUT" : "PUT")) - : "GET"); -+#ifdef WITH_NEON - u->openError = davReq(fd, cmd, path); -+#else -+ u->openError = httpReq(fd, cmd, path); -+#endif - if (u->openError < 0) { - /* XXX make sure that we can exit through ufdClose */ - fd = fdLink(fd, "error ctrl (ufdOpen HTTP)"); ---- ./rpmio/rpmrpc.c.orig 2005-12-16 15:01:26.000000000 +0000 -+++ ./rpmio/rpmrpc.c 2006-02-13 18:55:39.000000000 +0000 -@@ -93,7 +93,9 @@ int Mkdir (const char * path, mode_t mod - /*@notreached@*/ break; - case URL_IS_HTTPS: - case URL_IS_HTTP: -+#ifdef WITH_NEON - return davMkdir(path, mode); -+#endif - /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; -@@ -151,7 +153,9 @@ int Rmdir (const char * path) - /*@notreached@*/ break; - case URL_IS_HTTPS: - case URL_IS_HTTP: -+#ifdef WITH_NEON - return davRmdir(path); -+#endif - /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; -@@ -182,7 +186,9 @@ int Rename (const char * oldpath, const - switch (oldut) { - case URL_IS_HTTPS: - case URL_IS_HTTP: -+#ifdef WITH_NEON - return davRename(oldpath, newpath); -+#endif - /*@notreached@*/ break; - case URL_IS_FTP: /* XXX WRONG WRONG WRONG */ - case URL_IS_PATH: -@@ -280,7 +286,9 @@ int Unlink(const char * path) { - /*@notreached@*/ break; - case URL_IS_HTTPS: - case URL_IS_HTTP: -+#ifdef WITH_NEON - return davUnlink(path); -+#endif - /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; -@@ -1282,7 +1290,9 @@ fprintf(stderr, "*** Stat(%s,%p)\n", pat - /*@notreached@*/ break; - case URL_IS_HTTPS: - case URL_IS_HTTP: -+#ifdef WITH_NEON - return davStat(path, st); -+#endif - /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; -@@ -1311,7 +1321,9 @@ fprintf(stderr, "*** Lstat(%s,%p)\n", pa - /*@notreached@*/ break; - case URL_IS_HTTPS: - case URL_IS_HTTP: -+#ifdef WITH_NEON - return davLstat(path, st); -+#endif - /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; -@@ -1489,7 +1502,9 @@ fprintf(stderr, "*** Opendir(%s)\n", pat - /*@notreached@*/ break; - case URL_IS_HTTPS: - case URL_IS_HTTP: -+#ifdef WITH_NEON - return davOpendir(path); -+#endif - /*@notreached@*/ break; - case URL_IS_PATH: - path = lpath; -@@ -1515,8 +1530,10 @@ fprintf(stderr, "*** Readdir(%p)\n", (vo - return NULL; - if (ISAVMAGIC(dir)) - return avReaddir(dir); -+#ifdef WITH_NEON - if (ISDAVMAGIC(dir)) - return davReaddir(dir); -+#endif - return readdir(dir); - } - -@@ -1528,8 +1545,10 @@ fprintf(stderr, "*** Closedir(%p)\n", (v - return 0; - if (ISAVMAGIC(dir)) - return avClosedir(dir); -+#ifdef WITH_NEON - if (ISDAVMAGIC(dir)) - return davClosedir(dir); -+#endif - return closedir(dir); - } - ---- ./rpmio/url.c.orig 2005-12-16 15:24:25.000000000 +0000 -+++ ./rpmio/url.c 2005-12-16 17:08:21.000000000 +0000 -@@ -147,8 +147,10 @@ URLDBGREFS(0, (stderr, "--> url %p -- %d - /*@=usereleased@*/ - } - if (u->sess != NULL) { -+#ifdef WITH_NEON - /* HACK: neon include has prototype. */ - ne_session_destroy(u->sess); -+#endif - u->sess = NULL; - } - u->buf = _free(u->buf); diff --git a/noprovides.diff b/noprovides.diff deleted file mode 100644 index c8e7fb8..0000000 --- a/noprovides.diff +++ /dev/null @@ -1,23 +0,0 @@ -Revert upstream change that uses package provides when searching -for obsoleted packages. It's just too dangerous. - ---- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000 -+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000 -@@ -294,7 +313,7 @@ addheader: - - /* On upgrade, erase older packages of same color (if any). */ - -- mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, rpmteN(p), 0); -+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(p), 0); - while((oh = rpmdbNextIterator(mi)) != NULL) { - - /* Ignore colored packages not in our rainbow. */ -@@ -336,7 +355,7 @@ addheader: - if (Name[0] == '/') - mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, Name, 0); - else -- mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0); -+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0); - - xx = rpmdbPruneIterator(mi, - ts->removedPackages, ts->numRemovedPackages, 1); diff --git a/nostdoutclose.diff b/nostdoutclose.diff deleted file mode 100644 index 3810ecf..0000000 --- a/nostdoutclose.diff +++ /dev/null @@ -1,13 +0,0 @@ -Do not close stdout for scriptlets. - ---- ./lib/psm.c.orig 2005-12-14 18:59:10.000000000 +0000 -+++ ./lib/psm.c 2006-02-24 11:46:54.000000000 +0000 -@@ -829,7 +837,7 @@ static rpmRC runScript(rpmpsm psm, Heade - xx = Fclose (out); - if (sfdno > STDERR_FILENO) - xx = Fclose (scriptFd); -- else { -+ else if (Fileno(out) > STDERR_FILENO) { - /*@-usereleased@*/ - xx = Fclose(out); - /*@=usereleased@*/ diff --git a/obeynodbsync.diff b/obeynodbsync.diff deleted file mode 100644 index abd73dd..0000000 --- a/obeynodbsync.diff +++ /dev/null @@ -1,14 +0,0 @@ -Make rpmdbSync obey the no_dbsync flag - ---- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000 -+++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000 - /*@=incondefs@*/ -@@ -906,6 +937,8 @@ int rpmdbSync(rpmdb db) - int xx; - if (db->_dbi[dbix] == NULL) - continue; -+ if (db->_dbi[dbix]->dbi_no_dbsync) -+ continue; - xx = dbiSync(db->_dbi[dbix], 0); - if (xx && rc == 0) rc = xx; - } diff --git a/openallbuttemp.diff b/openallbuttemp.diff deleted file mode 100644 index 156e274..0000000 --- a/openallbuttemp.diff +++ /dev/null @@ -1,55 +0,0 @@ -Open all rpm databases before doing chroot. [#43266], [#44584] -rh#103852 - -Already in rpm-4.4.7, configurable with a macro (for whatever reason). - ---- ./lib/transaction.c.orig 2005-12-14 21:15:40.000000000 +0000 -+++ ./lib/transaction.c 2006-01-27 20:05:40.000000000 +0000 -@@ -1677,8 +1859,10 @@ rpmMessage(RPMMESS_DEBUG, _("computing % - const char * rootDir = rpmtsRootDir(ts); - xx = chdir("/"); - /*@-superuser -noeffect @*/ -- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') -+ if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') { -+ rpmdbOpenAllButTemporary(ts->rdb); - xx = chroot(rootDir); -+ } - /*@=superuser =noeffect @*/ - (void) rpmtsSetChrootDone(ts, 1); - } ---- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000 -+++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000 -@@ -811,6 +811,33 @@ int rpmdbOpenAll(rpmdb db) - return rc; - } - -+int rpmdbOpenAllButTemporary(rpmdb db) -+{ -+ int dbix; -+ int rc = 0; -+ -+ if (db == NULL) return -2; -+ -+ if (dbiTags != NULL) -+ for (dbix = 0; dbix < dbiTagsMax; dbix++) { -+ if (db->_dbi[dbix] != NULL) -+ continue; -+ /* Filter out temporary databases */ -+ switch ((dbiTags[dbix])) { -+ case RPMDBI_AVAILABLE: -+ case RPMDBI_ADDED: -+ case RPMDBI_REMOVED: -+ case RPMDBI_DEPENDS: -+ continue; -+ /*@notreached@*/ /*@switchbreak@*/ break; -+ default: -+ /*@switchbreak@*/ break; -+ } -+ (void) dbiOpen(db, dbiTags[dbix], db->db_flags); -+ } -+ return rc; -+} -+ - int rpmdbCloseDBI(rpmdb db, int rpmtag) - { - int dbix; diff --git a/patchrpms.diff b/patchrpms.diff index d40482c..5e17871 100644 --- a/patchrpms.diff +++ b/patchrpms.diff @@ -15,7 +15,7 @@ Index: lib/depends.c alKey pkgKey; /* addedPackages key */ int xx; int ec = 0; -@@ -387,6 +388,40 @@ addheader: +@@ -399,6 +400,40 @@ addheader: } obsoletes = rpmdsFree(obsoletes); @@ -56,7 +56,7 @@ Index: lib/depends.c ec = 0; exit: -@@ -644,6 +679,57 @@ exit: +@@ -656,6 +691,57 @@ exit: return rc; } @@ -114,7 +114,7 @@ Index: lib/depends.c /** * Check added requires/conflicts against against installed+added packages. * @param ts transaction set -@@ -1727,6 +1813,7 @@ int rpmtsCheck(rpmts ts) +@@ -1730,6 +1816,7 @@ int rpmtsCheck(rpmts ts) rpmteDS(p, RPMTAG_CONFLICTNAME), NULL, tscolor, 1); @@ -122,7 +122,7 @@ Index: lib/depends.c if (rc) goto exit; -@@ -1824,3 +1911,22 @@ exit: +@@ -1827,3 +1914,22 @@ exit: /*@=branchstate@*/ return rc; } @@ -208,7 +208,7 @@ Index: lib/poptQV.c case POPT_DUMP: qva->qva_flags |= QUERY_FOR_DUMPFILES | QUERY_FOR_LIST; break; -@@ -278,6 +279,8 @@ struct poptOption rpmQueryPoptTable[] = +@@ -278,6 +279,8 @@ struct poptOption rpmQueryPoptTable[] = N_("skip %%readme files"), NULL }, #endif @@ -221,9 +221,9 @@ Index: lib/query.c =================================================================== --- lib/query.c.orig +++ lib/query.c -@@ -225,6 +225,10 @@ int showQueryPackage(QVA_t qva, rpmts ts - if ((qva->qva_fflags & RPMFILE_GHOST) && (fflags & RPMFILE_GHOST)) - continue; +@@ -258,6 +258,10 @@ int showQueryPackage(QVA_t qva, rpmts ts + te = t + tx; + } + /* If querying patches, skip unpatched files. */ + if ((qva->qva_flags & QUERY_FOR_PATCHES) && (fflags & RPMFILE_UNPATCHED)) @@ -232,7 +232,7 @@ Index: lib/query.c /*@-boundswrite@*/ if (!rpmIsVerbose() && prefix) te = stpcpy(te, prefix); -@@ -362,6 +366,21 @@ void rpmDisplayQueryTags(FILE * fp) +@@ -377,6 +381,21 @@ void rpmDisplayQueryTags(FILE * fp) } } @@ -254,7 +254,7 @@ Index: lib/query.c static int rpmgiShowMatches(QVA_t qva, rpmts ts) /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ /*@modifies qva, rpmGlobalMacroContext, h_errno, internalState @*/ -@@ -376,6 +395,8 @@ static int rpmgiShowMatches(QVA_t qva, r +@@ -391,6 +410,8 @@ static int rpmgiShowMatches(QVA_t qva, r h = rpmgiHeader(gi); if (h == NULL) /* XXX perhaps stricter break instead? */ continue; @@ -263,7 +263,7 @@ Index: lib/query.c if ((rc = qva->qva_showPackage(qva, ts, h)) != 0) ec = rc; if (qva->qva_source == RPMQV_DBOFFSET) -@@ -391,6 +412,8 @@ int rpmcliShowMatches(QVA_t qva, rpmts t +@@ -406,6 +427,8 @@ int rpmcliShowMatches(QVA_t qva, rpmts t while ((h = rpmdbNextIterator(qva->qva_mi)) != NULL) { int rc; @@ -272,7 +272,7 @@ Index: lib/query.c if ((rc = qva->qva_showPackage(qva, ts, h)) != 0) ec = rc; if (qva->qva_source == RPMQV_DBOFFSET) -@@ -685,7 +708,17 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A +@@ -703,7 +726,17 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A switch (qva->qva_source) { case RPMQV_ALL: @@ -367,7 +367,7 @@ Index: lib/rpminstall.c =================================================================== --- lib/rpminstall.c.orig +++ lib/rpminstall.c -@@ -692,6 +692,11 @@ maybe_manifest: +@@ -683,6 +683,11 @@ maybe_manifest: /*@=branchstate@*/ } ps = rpmpsFree(ps); @@ -379,7 +379,7 @@ Index: lib/rpminstall.c } if (eiu->numRPMS && !(ia->installInterfaceFlags & INSTALL_NOORDER)) { -@@ -797,7 +802,7 @@ int rpmErase(rpmts ts, struct rpmInstall +@@ -789,7 +794,7 @@ int rpmErase(rpmts ts, struct rpmInstall { int notifyFlags; notifyFlags = ia->eraseInterfaceFlags | (rpmIsVerbose() ? INSTALL_LABEL : 0 ); xx = rpmtsSetNotifyCallback(ts, @@ -452,7 +452,7 @@ Index: lib/transaction.c =================================================================== --- lib/transaction.c.orig +++ lib/transaction.c -@@ -198,6 +198,11 @@ static int handleInstInstalledFiles(cons +@@ -199,6 +199,11 @@ static int handleInstInstalledFiles(cons int rConflicts; rConflicts = reportConflicts; @@ -464,7 +464,7 @@ Index: lib/transaction.c /* Resolve file conflicts to prefer Elf64 (if not forced). */ if (tscolor != 0 && FColor != 0 && FColor != oFColor) { -@@ -972,6 +977,176 @@ rpmfi rpmtsiFi(const rpmtsi tsi) +@@ -975,6 +980,176 @@ rpmfi rpmtsiFi(const rpmtsi tsi) /*@=compdef =refcounttrans =usereleased @*/ } @@ -641,7 +641,7 @@ Index: lib/transaction.c /** * This is not a generalized function to be called from outside * librpm. It is called internally by rpmtsRun() to rollback -@@ -2137,6 +2312,8 @@ assert(psm != NULL); +@@ -2154,6 +2329,8 @@ assert(psm != NULL); } psm->fi = rpmfiLink(p->fi, NULL); @@ -674,7 +674,7 @@ Index: doc/rpm.8 [\fB--filesbypkg\fR] [\fB-i,--info\fR] [\fB--last\fR] [\fB-l,--list\fR] [\fB--provides\fR] [\fB--qf,--queryformat \fIQUERYFMT\fB\fR] [\fB-R,--requires\fR] [\fB--scripts\fR] [\fB-s,--state\fR] -@@ -547,6 +549,10 @@ that will be expanded to paths that are +@@ -547,6 +549,10 @@ that will be expanded to paths that are the package manifest as additional \fIPACKAGE_FILE\fR arguments to the query. .TP @@ -696,7 +696,7 @@ Index: doc/rpm.8 \fB--changelog\fR Display change information for the package. .TP -@@ -618,7 +628,8 @@ Orders the package listing by install ti +@@ -613,7 +623,8 @@ Orders the package listing by install ti packages are at the top. .TP \fB-l, --list\fR @@ -710,7 +710,7 @@ Index: rpmpopt.in =================================================================== --- rpmpopt.in.orig +++ rpmpopt.in -@@ -76,6 +76,10 @@ rpm alias --supplements --qf \ +@@ -84,6 +84,10 @@ rpm alias --supplements --qf \ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ --POPTdesc=$"list capabilities this package supplements" @@ -721,7 +721,7 @@ Index: rpmpopt.in rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\ Version : %-27{VERSION} Vendor: %{VENDOR}\n\ Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\ -@@ -373,6 +377,10 @@ rpmq alias --supplements --qf \ +@@ -378,6 +382,10 @@ rpmq alias --supplements --qf \ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ --POPTdesc=$"list capabilities this package supplements" @@ -732,7 +732,7 @@ Index: rpmpopt.in rpmq alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\ Version : %-27{VERSION} Vendor: %{VENDOR}\n\ Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\ -@@ -488,6 +496,10 @@ rpmquery alias --supplements --qf \ +@@ -496,6 +504,10 @@ rpmquery alias --supplements --qf \ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ --POPTdesc=$"list capabilities this package supplements" diff --git a/payloadformat.diff b/payloadformat.diff deleted file mode 100644 index 821978c..0000000 --- a/payloadformat.diff +++ /dev/null @@ -1,40 +0,0 @@ -Check if the payloadformat really is "cpio", fail with an error -message if it is not. Use a different message for the "drpm" -delta-rpm format. rh#140052 - -Upstream proposes a different approach, patching the "Requires" -list, which the current deltarpm implementation can't do, because -it uses a verbatim copy of the original header. Sigh. - -I still believe that rpm should check for known formats, i.e. -now that rpm understands ustar it should insist that the format -is either "cpio" or "ustar". - ---- ./lib/rpminstall.c.orig 2005-12-14 21:01:09.000000000 +0000 -+++ ./lib/rpminstall.c 2005-12-15 14:47:35.000000000 +0000 -@@ -470,6 +470,7 @@ if (fileURL[0] == '=') { - eiu->fnp++, eiu->prevx++) - { - const char * fileName; -+ const char * payloadformat; - - rpmMessage(RPMMESS_DEBUG, "============== %s\n", *eiu->fnp); - (void) urlPath(*eiu->fnp, &fileName); -@@ -510,6 +511,17 @@ if (fileURL[0] == '=') { - /*@switchbreak@*/ break; - } - -+ payloadformat = 0; -+ if (!headerGetEntry(eiu->h, RPMTAG_PAYLOADFORMAT, NULL, (void **)&payloadformat, NULL)) -+ payloadformat = 0; -+ if (payloadformat && strcmp(payloadformat, "cpio") != 0) { -+ if (!strcmp(payloadformat, "drpm")) -+ rpmMessage(RPMMESS_ERROR, _("%s is a deltarpm, create a real rpm from it first!\n"), *eiu->fnp); -+ else -+ rpmMessage(RPMMESS_ERROR, _("%s contains no cpio payload\n"), *eiu->fnp); -+ eiu->numFailed++; *eiu->fnp = NULL; -+ continue; -+ } - eiu->isSource = headerIsEntry(eiu->h, RPMTAG_SOURCEPACKAGE); - - if (eiu->isSource) { diff --git a/perlprov.diff b/perlprov.diff index 631134c..1f08b97 100644 --- a/perlprov.diff +++ b/perlprov.diff @@ -2,20 +2,7 @@ Index: scripts/perl.prov =================================================================== --- scripts/perl.prov.orig +++ scripts/perl.prov -@@ -127,7 +127,11 @@ sub process_file { - if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) { - $package=$1; - undef $version; -- $require{$package}=undef; -+ if ($package eq 'main') { -+ undef $package; -+ } else { -+ $require{$package}=undef; -+ } - } - - # after we found the package name take the first assignment to -@@ -158,7 +162,7 @@ sub process_file { +@@ -167,7 +167,7 @@ sub process_file { $version= $1; } @@ -24,18 +11,3 @@ Index: scripts/perl.prov } # Allow someone to have a variable that defines virtual packages -Index: scripts/perldeps.pl -=================================================================== ---- scripts/perldeps.pl.orig -+++ scripts/perldeps.pl -@@ -150,6 +150,10 @@ sub add_provide { - return if(exists($self->{'provides_check'}->{$params{'-provide'}})); - - # -+ # Skip some common false positives -+ return if $params{'-provide'} eq 'main'; -+ -+ # - # Created dependency object - my $dep = new Dependency "provide", $params{-provide}; - $dep->filename($params{-filename}); diff --git a/pgpdecodeearly.diff b/pgpdecodeearly.diff deleted file mode 100644 index 60adc1b..0000000 --- a/pgpdecodeearly.diff +++ /dev/null @@ -1,18 +0,0 @@ -Also decode early for PGP sigtags, which are actually header+payload -RSA signatures. Without this patch, verification of a package -that has just a header+payload RSA signature but no header-only RSA -signature fails. - -Already in rpm-4.4.7. - ---- ./lib/rpmchecksig.c.orig 2005-12-14 20:54:39.000000000 +0000 -+++ ./lib/rpmchecksig.c 2006-03-21 18:00:22.000000000 +0000 -@@ -801,7 +805,7 @@ int rpmVerifySignatures(QVA_t qva, rpmts - sigp = rpmtsSignature(ts); - - /* XXX RSA needs the hash_algo, so decode early. */ -- if (sigtag == RPMSIGTAG_RSA) { -+ if (sigtag == RPMSIGTAG_RSA || sigtag == RPMSIGTAG_PGP) { - xx = headerGetEntry(sigh, sigtag, &sigtype, &sig, &siglen); - xx = pgpPrtPkts(sig, siglen, dig, 0); - sig = headerFreeData(sig, sigtype); diff --git a/po-file-fixes.diff b/po-file-fixes.diff deleted file mode 100644 index 43a4a86..0000000 --- a/po-file-fixes.diff +++ /dev/null @@ -1,59 +0,0 @@ ---- po/de.po -+++ po/de.po -@@ -1568,7 +1568,7 @@ - #: lib/fsm.c:1354 - #, c-format - msgid "%s directory created with perms %04o, context %s.\n" --msgstr "Verzeichnis %s mit Berechtigungen %04o erstellt, Kontext.\n" -+msgstr "Verzeichnis %s mit Berechtigungen %04o erstellt, Kontext %s.\n" - - #: lib/fsm.c:1657 - #, c-format -@@ -2038,12 +2038,12 @@ - #: lib/poptI.c:277 - #, c-format - msgid "do not execute %%preun scriptlet (if any)" --msgstr "%preun-Skriptlet nicht ausführen (wenn vorhanden)" -+msgstr "%%preun-Skriptlet nicht ausführen (wenn vorhanden)" - - #: lib/poptI.c:280 - #, c-format - msgid "do not execute %%postun scriptlet (if any)" --msgstr "%postun-Skriptlet nicht ausführen (wenn vorhanden)" -+msgstr "%%postun-Skriptlet nicht ausführen (wenn vorhanden)" - - #: lib/poptI.c:290 - msgid "do not execute any scriptlet(s) triggered by this package" -@@ -3302,7 +3302,7 @@ - #: lib/signature.c:612 - #, c-format - msgid "gpg exec failed (%d)\n" --msgstr "GPG fehlgeschlagen\n" -+msgstr "GPG fehlgeschlagen (%d)\n" - - #. GPG failed to write signature - #. Just in case -@@ -3592,12 +3592,12 @@ - #: rpmdb/db3.c:189 - #, c-format - msgid "closed db environment %s/%s\n" --msgstr "Closed DB-Umgebung %s/%s %s\n" -+msgstr "Closed DB-Umgebung %s/%s\n" - - #: rpmdb/db3.c:207 - #, c-format - msgid "removed db environment %s/%s\n" --msgstr "Removed DB-Umgebung %s/%s %s\n" -+msgstr "Removed DB-Umgebung %s/%s\n" - - #: rpmdb/db3.c:298 - #, c-format -@@ -3812,7 +3812,7 @@ - #: rpmdb/rpmdb.c:2696 - #, c-format - msgid "error(%d) setting header #%d record for %s removal\n" --msgstr "Fehler(%d) beim Markieren des Header-Eintrags #%d zur Entfernung\n" -+msgstr "Fehler(%d) beim Markieren des Header-Eintrags #%d zur Entfernung von %s\n" - - #: rpmdb/rpmdb.c:2811 - #, c-format diff --git a/popt-to-lib.diff b/popt-to-lib.diff index 6dfb6a6..65e6075 100644 --- a/popt-to-lib.diff +++ b/popt-to-lib.diff @@ -1,7 +1,8 @@ -diff -u popt/Makefile.am popt/Makefile.am ---- popt/Makefile.am +Index: popt/Makefile.am +=================================================================== +--- popt/Makefile.am.orig +++ popt/Makefile.am -@@ -18,13 +18,13 @@ +@@ -17,13 +17,13 @@ noinst_HEADERS = findme.h poptint.h syst noinst_PROGRAMS = test1 test2 test3 test1_SOURCES = test1.c test1_LDFLAGS = @@ -18,7 +19,7 @@ diff -u popt/Makefile.am popt/Makefile.am noinst_SCRIPTS = testit.sh -@@ -35,8 +35,8 @@ +@@ -34,8 +34,8 @@ TESTS = testit.sh include_HEADERS = popt.h @@ -28,4 +29,4 @@ diff -u popt/Makefile.am popt/Makefile.am +popt_LTLIBRARIES = libpopt.la libpopt_la_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c - libpopt_la_LDFLAGS = @INTLLIBS@ -version-info 8:0:7 + libpopt_la_LDFLAGS = @INTLLIBS@ diff --git a/prereqorder.diff b/prereqorder.diff deleted file mode 100644 index 1e73d91..0000000 --- a/prereqorder.diff +++ /dev/null @@ -1,21 +0,0 @@ -Backported fix. Seems to do no harm. - ---- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000 -+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000 -@@ -1294,14 +1403,12 @@ int rpmtsOrder(rpmts ts) - switch (rpmteType(p)) { - case TR_REMOVED: - /* Skip if not %preun/%postun requires or legacy prereq. */ -- if (isInstallPreReq(Flags) -- || !( isErasePreReq(Flags) || isLegacyPreReq(Flags) ) ) -+ if (!( isErasePreReq(Flags) || isLegacyPreReq(Flags) ) ) - /*@innercontinue@*/ continue; - /*@switchbreak@*/ break; - case TR_ADDED: - /* Skip if not %pre/%post requires or legacy prereq. */ -- if (isErasePreReq(Flags) -- || !( isInstallPreReq(Flags) || isLegacyPreReq(Flags) ) ) -+ if (!( isInstallPreReq(Flags) || isLegacyPreReq(Flags) ) ) - /*@innercontinue@*/ continue; - /*@switchbreak@*/ break; - } diff --git a/probfilter.diff b/probfilter.diff deleted file mode 100644 index 79eeba5..0000000 --- a/probfilter.diff +++ /dev/null @@ -1,14 +0,0 @@ -Revert rpm-4.4.2 probFilter change. - ---- ./lib/poptI.c.orig 2005-12-15 14:34:45.000000000 +0000 -+++ ./lib/poptI.c 2005-12-15 14:35:16.000000000 +0000 -@@ -16,8 +16,7 @@ extern time_t get_date(const char * p, v - /*@unchecked@*/ - struct rpmInstallArguments_s rpmIArgs = { - 0, /* transFlags */ -- /* probFilter */ -- (RPMPROB_FILTER_REPLACEOLDFILES | RPMPROB_FILTER_REPLACENEWFILES), -+ 0, /* probFilter */ - 0, /* installInterfaceFlags */ - 0, /* eraseInterfaceFlags */ - 0, /* qva_flags */ diff --git a/pythonunicode.diff b/pythonunicode.diff deleted file mode 100644 index aff230a..0000000 --- a/pythonunicode.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: python/rpmts-py.c -=================================================================== ---- python/rpmts-py.c.orig -+++ python/rpmts-py.c -@@ -1367,7 +1367,7 @@ fprintf(stderr, "*** rpmts_Match(%p) ts - - if (Key) { - /*@-branchstate@*/ -- if (PyString_Check(Key)) { -+ if (PyString_Check(Key) || PyUnicode_Check(Key)) { - key = PyString_AsString(Key); - len = PyString_Size(Key); - } else if (PyInt_Check(Key)) { diff --git a/querybuffer.diff b/querybuffer.diff deleted file mode 100644 index e3cb3bc..0000000 --- a/querybuffer.diff +++ /dev/null @@ -1,43 +0,0 @@ -fix a buffer overflow in the query function [#218983] -rh#212833 - ---- lib/query.c.orig 2006-11-24 13:24:30.000000000 +0000 -+++ lib/query.c 2006-11-24 13:43:47.000000000 +0000 -@@ -133,8 +133,10 @@ int showQueryPackage(QVA_t qva, rpmts ts - int rc = 0; /* XXX FIXME: need real return code */ - int nonewline = 0; - int i; -+ size_t tsize; - -- te = t = xmalloc(BUFSIZ); -+ tsize = BUFSIZ * 2; -+ te = t = xmalloc(tsize); - /*@-boundswrite@*/ - *te = '\0'; - /*@=boundswrite@*/ -@@ -147,8 +149,9 @@ int showQueryPackage(QVA_t qva, rpmts ts - size_t tb = (te - t); - size_t sb = strlen(str); - -- if (sb >= (BUFSIZ - tb)) { -- t = xrealloc(t, BUFSIZ+sb); -+ if (sb > 0) { -+ tsize += sb; -+ t = xrealloc(t, tsize); - te = t + tb; - } - /*@-boundswrite@*/ -@@ -261,6 +264,13 @@ int showQueryPackage(QVA_t qva, rpmts ts - } - /*@=boundswrite@*/ - -+ if (strlen(fn) + BUFSIZ > tsize) { -+ size_t tb = (te - t); -+ tsize = strlen(fn) + BUFSIZ * 2; -+ t = xrealloc(t, tsize); -+ te = t + tb; -+ } -+ - if (qva->qva_flags & QUERY_FOR_DUMPFILES) { - sprintf(te, "%s %d %d %s 0%o ", fn, (int)fsize, fmtime, fmd5, fmode); - te += strlen(te); diff --git a/rebuilddbroot.diff b/rebuilddbroot.diff deleted file mode 100644 index 88e5e13..0000000 --- a/rebuilddbroot.diff +++ /dev/null @@ -1,22 +0,0 @@ -Make rebuilddb work with the --root option. [#65993] - ---- ./rpmdb/rpmdb.c.orig 2005-02-16 03:18:19.000000000 +0000 -+++ ./rpmdb/rpmdb.c 2006-02-21 20:37:44.000000000 +0000 -@@ -3771,7 +3887,7 @@ int rpmdbRebuild(const char * prefix, rp - } - dbpath = rootdbpath = rpmGetPath(prefix, tfn, NULL); - if (!(prefix[0] == '/' && prefix[1] == '\0')) -- dbpath += strlen(prefix); -+ dbpath += strlen(prefix) - 1; - tfn = _free(tfn); - - /*@-nullpass@*/ -@@ -3794,7 +3910,7 @@ int rpmdbRebuild(const char * prefix, rp - } - newdbpath = newrootdbpath = rpmGetPath(prefix, tfn, NULL); - if (!(prefix[0] == '/' && prefix[1] == '\0')) -- newdbpath += strlen(prefix); -+ newdbpath += strlen(prefix) - 1; - tfn = _free(tfn); - - rpmMessage(RPMMESS_DEBUG, _("rebuilding database %s into %s\n"), diff --git a/refreshtestarch.diff b/refreshtestarch.diff index 161eae2..ef0ef31 100644 --- a/refreshtestarch.diff +++ b/refreshtestarch.diff @@ -1,9 +1,11 @@ Also test architecture in "refresh" test when not colored. This allows updates to different architecture possible again. ---- ./lib/psm.c.orig 2005-12-14 18:59:10.000000000 +0000 -+++ ./lib/psm.c 2006-02-24 11:46:54.000000000 +0000 -@@ -1425,15 +1441,16 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s +Index: lib/psm.c +=================================================================== +--- lib/psm.c.orig ++++ lib/psm.c +@@ -1447,15 +1447,16 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s assert(psm->mi == NULL); psm->mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(psm->te), 0); diff --git a/requires-ge-macro.diff b/requires-ge-macro.diff index a29cfd4..77464b4 100644 --- a/requires-ge-macro.diff +++ b/requires-ge-macro.diff @@ -1,10 +1,14 @@ ---- macros.in +Index: macros.in +=================================================================== +--- macros.in.orig +++ macros.in -@@ -1242,6 +1242,7 @@ +@@ -1205,7 +1205,8 @@ done \ + # %{perl_sitearch}/Image # %dir %{perl_sitearch}/auto/Image # - %requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") -+%requires_ge() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") +-%requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") ++%requires_eq() %(echo '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") ++%requires_ge() %(echo '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") %perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch) %perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib) %perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch) diff --git a/rpm-4.4.2.3.tar.bz2 b/rpm-4.4.2.3.tar.bz2 new file mode 100644 index 0000000..ff2cf1e --- /dev/null +++ b/rpm-4.4.2.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1573a7d34c6a95abe3ad3d2ce310c7d5f8873e45955875f2e03647c756012fcd +size 8525878 diff --git a/rpm-4.4.2.tar.bz2 b/rpm-4.4.2.tar.bz2 deleted file mode 100644 index 0659a80..0000000 --- a/rpm-4.4.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:abc1b6a909e904ee220e32cd0c534fe19b8ea7cb2d3e8cfe395e221773e62c8c -size 8955447 diff --git a/rpm-debugedit-shared.diff b/rpm-debugedit-shared.diff deleted file mode 100644 index 2210cd5..0000000 --- a/rpm-debugedit-shared.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- tools/Makefile.am -+++ tools/Makefile.am -@@ -40,7 +40,7 @@ convertdb1_LDADD = \ - @WITH_LIBELF_LIB@ - - debugedit_SOURCES = debugedit.c hashtab.c --debugedit_LDADD = @LDFLAGS_STATIC@ \ -+debugedit_LDADD = \ - @WITH_LIBELF_LIB@ \ - @WITH_POPT_LIB@ - diff --git a/rpm-gcc43.diff b/rpm-gcc43.diff deleted file mode 100644 index 364795a..0000000 --- a/rpm-gcc43.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- elfutils-0.97/libelf/common.h.orig 2007-09-25 11:34:29.000000000 +0200 -+++ elfutils-0.97/libelf/common.h 2007-09-25 11:36:54.000000000 +0200 -@@ -78,7 +78,7 @@ - - - /* Acquire lock for the descriptor and all children. */ --static void -+static inline void - libelf_acquire_all (Elf *elf) - { - rwlock_wrlock (elf->lock); -@@ -97,7 +97,7 @@ - } - - /* Release own lock and those of the children. */ --static void -+static inline void - libelf_release_all (Elf *elf) - { - if (elf->kind == ELF_K_AR) diff --git a/rpm-python.changes b/rpm-python.changes index f169277..436626b 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 11 15:33:52 CEST 2008 - mls@suse.de + +- update to 4.4.2.3 to get rid of >50 patches + ------------------------------------------------------------------- Sat Aug 30 21:23:38 CEST 2008 - cthiel@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 2dbeecf..eaeddb1 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,5 +1,5 @@ # -# spec file for package rpm-python (Version 4.4.2) +# spec file for package rpm-python (Version 4.4.2.3) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -23,8 +23,8 @@ BuildRequires: libbz2-devel libselinux-devel lzma-alpha-devel ncurses-devel pyt License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages -Version: 4.4.2 -Release: 278 +Version: 4.4.2.3 +Release: 2 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -51,7 +51,7 @@ Authors: %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/lib -# only installing in python/ does not work because rpm links agains +# only installing in python/ does not work because rpm links against # installed libs at install time make DESTDIR="$RPM_BUILD_ROOT" install find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm @@ -69,6 +69,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog +* Thu Sep 11 2008 mls@suse.de +- update to 4.4.2.3 to get rid of >50 patches * Sat Aug 30 2008 cthiel@suse.de - add libselinux-devel to BuildRequires * Thu Aug 07 2008 dmueller@suse.de diff --git a/rpm-shorten-changelog.diff b/rpm-shorten-changelog.diff index 840336f..9dacc09 100644 --- a/rpm-shorten-changelog.diff +++ b/rpm-shorten-changelog.diff @@ -1,38 +1,94 @@ ---- build/parseChangelog.c +Index: build/parseChangelog.c +=================================================================== +--- build/parseChangelog.c.orig +++ build/parseChangelog.c -@@ -111,10 +111,11 @@ static int dateToTimet(const char * datestr, /*@out@*/ time_t * secs) - static int addChangelog(Header h, StringBuf sb) - /*@modifies h @*/ - { -- char *s; -+ char *s, *p; - int i; - time_t time; - time_t lastTime = 0; -+ time_t cutOffTime = 1151704800; /* date -d "2006/07/01" +%s #SLES10-GA */ - char *date, *name, *text, *next; - - s = getStringBuf(sb); -@@ -167,6 +168,12 @@ static int addChangelog(Header h, StringBuf sb) +@@ -167,6 +167,11 @@ static int addChangelog(Header h, String return RPMERR_BADSPEC; } + /* workaround old suse oddity */ -+ if (*s == '-') { -+ ++s; -+ SKIPSPACE(s); ++ if (*s == '-' && s[1] == ' ') { ++ s += 2; + } + /* name */ name = s; while (*s != '\0') s++; -@@ -198,7 +212,8 @@ static int addChangelog(Header h, StringBuf sb) - *s-- = '\0'; - } - -- addChangelogEntry(h, time, name, text); -+ if (time >= cutOffTime) -+ addChangelogEntry(h, time, name, text); - s = next; - } +Index: build/pack.c +=================================================================== +--- build/pack.c.orig ++++ build/pack.c +@@ -751,6 +751,65 @@ static int_32 copyTags[] = { + 0 + }; + ++static void ++trimChangelog(Header h) ++{ ++ static int oneshot; ++ static int cuttime, minnum, maxnum; ++ int * times; ++ char ** names = 0, ** texts = 0; ++ int i, keep, count = 0; ++ ++ if (!oneshot) { ++ char *binarychangelogtrim = rpmExpand("%{?_binarychangelogtrim}", NULL); ++ oneshot = 1; ++ if (binarychangelogtrim && *binarychangelogtrim) { ++ maxnum = atoi(binarychangelogtrim); ++ binarychangelogtrim = strchr(binarychangelogtrim, ','); ++ if (binarychangelogtrim) ++ binarychangelogtrim++; ++ } ++ if (binarychangelogtrim && *binarychangelogtrim) { ++ cuttime = atoi(binarychangelogtrim); ++ binarychangelogtrim = strchr(binarychangelogtrim, ','); ++ if (binarychangelogtrim) ++ binarychangelogtrim++; ++ } ++ if (binarychangelogtrim && *binarychangelogtrim) { ++ minnum = atoi(binarychangelogtrim); ++ binarychangelogtrim = strchr(binarychangelogtrim, ','); ++ } ++ } ++ if (!cuttime && !minnum && !maxnum) { ++ return; ++ } ++ if (!headerGetEntry(h, RPMTAG_CHANGELOGTIME, NULL, (void **) ×, &count)) ++ return; ++ if ((!cuttime || count <= minnum) && (!maxnum || count <= maxnum)) { ++ return; ++ } ++ keep = count; ++ if (maxnum && keep > maxnum) ++ keep = maxnum; ++ if (cuttime) { ++ for (i = 0; i < keep; i++) { ++ if (i >= minnum && times[i] < cuttime) ++ break; ++ } ++ keep = i; ++ } ++ if (keep >= count) ++ return; ++ headerGetEntry(h, RPMTAG_CHANGELOGNAME, NULL, (void **) &names, &count); ++ headerGetEntry(h, RPMTAG_CHANGELOGTEXT, NULL, (void **) &texts, &count); ++ headerModifyEntry(h, RPMTAG_CHANGELOGTIME, RPM_INT32_TYPE, times, keep); ++ headerModifyEntry(h, RPMTAG_CHANGELOGNAME, RPM_STRING_ARRAY_TYPE, names, keep); ++ headerModifyEntry(h, RPMTAG_CHANGELOGTEXT, RPM_STRING_ARRAY_TYPE, texts, keep); ++ free(names); ++ free(texts); ++} ++ ++ + /*@-boundswrite@*/ + int packageBinaries(Spec spec) + { +@@ -760,6 +819,7 @@ int packageBinaries(Spec spec) + const char *errorString; + Package pkg; + ++ trimChangelog(spec->packages->header); + for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { + const char *fn; diff --git a/rpm-suse_macros b/rpm-suse_macros index a03c040..e20f8f7 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -231,6 +231,7 @@ SV_E='^### END INIT INFO' \ SV_KW=Default-Enabled \ SV_VALUE=`sed -n -e "/$SV_B/,/$SV_E/{/^# [^[:space:]]*$SV_KW:[[:space:]]*\\([^[:space:]]*\\).*/s//\\1/p;}" < etc/init.d/$SCRIPTNAME` \ + test "$FORCE_YES" = "1" && SV_VALUE="yes" \ test -n "$SV_VALUE" || SV_VALUE=%{-y:"yes"}%{!-y:"no"} \ INSSRV_ARRAY="$INSSRV_ARRAY $SCRIPTNAME $SV_VALUE" \ done \ diff --git a/rpm.changes b/rpm.changes index 18056b0..472c2a5 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Fri Sep 12 18:16:33 CEST 2008 - mls@suse.de + +- fix changelog cutter +- fix find-requires script +- add mimetype.diff patch from Scott Reeves + +------------------------------------------------------------------- +Thu Sep 11 15:33:52 CEST 2008 - mls@suse.de + +- update to 4.4.2.3 to get rid of >50 patches +- make changelog cutter configurable +- update rpm-suse_macros + ------------------------------------------------------------------- Fri Sep 5 16:56:23 CEST 2008 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index e794acf..1fd21b8 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,5 +1,5 @@ # -# spec file for package rpm (Version 4.4.2) +# spec file for package rpm (Version 4.4.2.3) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -26,8 +26,8 @@ Provides: rpminst PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager -Version: 4.4.2 -Release: 217 +Version: 4.4.2.3 +Release: 2 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -42,106 +42,57 @@ Patch1: elfutils-0.97.diff Patch2: beecrypt-4.1.2.diff Patch3: db.diff # quilt patches start here -Patch10: aloffbyone.diff -Patch11: badforsyntax.diff -Patch12: buildsubdir.diff -Patch13: compress.diff -Patch14: debugedit.diff -Patch15: docdir_fmt.diff -Patch16: emptyfilelist.diff -Patch17: eraseignoresize.diff -Patch18: erasebadreturn.diff -Patch19: eraseordered.diff -Patch20: exitstatus.diff -Patch21: filenonull.diff -Patch22: filequery.diff -Patch23: findfplistexclude.diff -Patch24: forkfailed.diff -Patch25: getcwdresult.diff -Patch26: ghost.diff -Patch27: globoffbyone.diff -Patch28: initdbret.diff -Patch29: localetag.diff -Patch30: luanoreadline.diff -Patch31: missingok.diff -Patch32: nameversioncompare.diff -Patch33: nostdoutclose.diff -Patch34: obeynodbsync.diff -Patch35: payloadformat.diff -Patch36: pgpdecodeearly.diff -Patch37: prereqorder.diff -Patch38: probfilter.diff -Patch39: rebuilddbroot.diff -Patch40: sbitcheck.diff -Patch41: setpermsugids.diff -Patch42: signature.diff -Patch43: signwriteerror.diff -Patch44: spectest.diff -Patch45: sqcondmutex.diff -Patch46: srcdefattr.diff -Patch47: totalsizenoexclude.diff -Patch48: translockroot.diff -Patch49: vercmp.diff -Patch50: verifylstatfail.diff -Patch51: chownwarn.diff -Patch52: dbfsync.diff -Patch53: dbrointerruptable.diff -Patch54: diskspace.diff -Patch55: extcond.diff -Patch56: globlstat.diff -Patch57: nodefattr.diff -Patch58: nolua.diff -Patch59: luaroot.diff -Patch60: noneon.diff -Patch61: noprovides.diff -Patch62: openallbuttemp.diff -Patch63: refreshtestarch.diff -Patch64: rpmrctests.diff -Patch65: suspendlock.diff -Patch66: tagsbackport.diff -Patch67: waitlock.diff -Patch68: dbprivate.diff -Patch69: legacyprereq.diff -Patch70: weakdeps.diff -Patch71: autodeps.diff -Patch72: brp.diff -Patch73: brpcombress.diff -Patch74: checkfilesnoinfodir.diff -Patch75: finddebuginfo.diff -Patch76: findksyms.diff -Patch77: findlang.diff -Patch78: macrosin.diff -Patch79: modalias.diff -Patch80: platformin.diff -Patch81: rpmpopt.diff -Patch82: rpmrc.diff -Patch83: patchrpms.diff -Patch84: taggedfileindex.diff -Patch85: rpmqpack.diff -Patch86: convertdb1static.diff -Patch87: build.diff -Patch88: modalias-kernel_module.diff -Patch89: querybuffer.diff -Patch90: testmode.diff -Patch91: po-file-fixes.diff -Patch92: files.diff -Patch93: popt-to-lib.diff -Patch94: debugedit-comp-dir.diff -Patch95: pythonunicode.diff -Patch96: tarwildcards.diff -Patch97: perlprov.diff -Patch98: showtransscripts.diff -Patch99: rpm-debugedit-shared.diff -Patch100: rpm-gcc43.diff -Patch101: lzma.diff -Patch102: rpm-shorten-changelog.diff -Patch103: noautoreloc.diff -Patch104: lzma-payload.diff -Patch105: lzma-payload-2.diff -Patch106: debugsource-package.diff -Patch107: whatrequires-doc.diff -Patch108: remove-brp-strips.diff -Patch109: requires-ge-macro.diff +Patch10: debugedit.diff +Patch11: findfplistexclude.diff +Patch12: localetag.diff +Patch13: missingok.diff +Patch14: nameversioncompare.diff +Patch15: chownwarn.diff +Patch16: dbfsync.diff +Patch17: dbrointerruptable.diff +Patch18: diskspace.diff +Patch19: extcond.diff +Patch20: globlstat.diff +Patch21: nodefattr.diff +Patch22: luaroot.diff +Patch23: refreshtestarch.diff +Patch24: rpmrctests.diff +Patch25: suspendlock.diff +Patch26: tagsbackport.diff +Patch27: waitlock.diff +Patch28: dbprivate.diff +Patch29: legacyprereq.diff +Patch30: weakdeps.diff +Patch31: autodeps.diff +Patch32: brp.diff +Patch33: brpcombress.diff +Patch34: checkfilesnoinfodir.diff +Patch35: finddebuginfo.diff +Patch36: findksyms.diff +Patch37: findlang.diff +Patch38: macrosin.diff +Patch39: modalias.diff +Patch40: platformin.diff +Patch41: rpmpopt.diff +Patch42: rpmrc.diff +Patch43: patchrpms.diff +Patch44: taggedfileindex.diff +Patch45: rpmqpack.diff +Patch46: convertdb1static.diff +Patch47: build.diff +Patch48: modalias-kernel_module.diff +Patch49: files.diff +Patch50: popt-to-lib.diff +Patch51: debugedit-comp-dir.diff +Patch52: perlprov.diff +Patch53: rpm-shorten-changelog.diff +Patch54: lzma-payload.diff +Patch55: lzma-payload-2.diff +Patch56: debugsource-package.diff +Patch57: whatrequires-doc.diff +Patch58: remove-brp-strips.diff +Patch59: requires-ge-macro.diff +Patch60: mimetype.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -210,12 +161,7 @@ rm -f rpmdb/db.h %patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39 %patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49 %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 -%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 -%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 -%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 -P 89 -%patch -P 90 -P 91 -P 92 -P 93 -P 94 -P 95 -P 96 -P 97 -P 98 -P 99 -%patch -P 100 -P 101 -P 102 -P 103 -P -P 106 -P 107 -P 108 -P 109 -%patch -P 104 -P 105 -b .lzma +%patch -P 60 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -224,7 +170,6 @@ if [ -s /etc/rpm/suse_macros ]; then cp -a /etc/rpm/suse_macros %{SOURCE4} fi cp -a %{SOURCE4} suse_macros -rename no nb po/no.* popt/po/no.* %build %{?suse_update_config:%{suse_update_config -f popt}} @@ -361,7 +306,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 445 +Release: 450 # %description -n popt @@ -384,7 +329,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 445 +Release: 450 Requires: popt = 1.7 Requires: glibc-devel @@ -419,6 +364,14 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Sep 12 2008 mls@suse.de +- fix changelog cutter +- fix find-requires script +- add mimetype.diff patch from Scott Reeves +* Thu Sep 11 2008 mls@suse.de +- update to 4.4.2.3 to get rid of >50 patches +- make changelog cutter configurable +- update rpm-suse_macros * Fri Sep 05 2008 dmueller@suse.de - strip .comment and .GCC.command.line sections from ELF binaries * Mon Aug 25 2008 prusnak@suse.cz diff --git a/rpmpopt.diff b/rpmpopt.diff index 6cbf7ba..9573bad 100644 --- a/rpmpopt.diff +++ b/rpmpopt.diff @@ -4,9 +4,9 @@ Index: rpmpopt.in =================================================================== ---- rpmpopt.in.orig 2007-05-27 16:41:29.000000000 +0200 -+++ rpmpopt.in 2007-05-27 16:42:42.000000000 +0200 -@@ -86,7 +86,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p +--- rpmpopt.in.orig ++++ rpmpopt.in +@@ -94,7 +94,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|URL?{URL : %{URL}\n}|\ Summary : %{SUMMARY}\n\ @@ -16,7 +16,7 @@ Index: rpmpopt.in --POPTdesc=$"list descriptive information from package(s)" rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ -@@ -129,12 +130,6 @@ rpm alias --fileprovide --qf '[%{FILENAM +@@ -140,12 +141,6 @@ rpm alias --fileprovide --qf '[%{FILENAM rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \ --POPTdesc=$"list file names with requires" @@ -29,7 +29,7 @@ Index: rpmpopt.in # colon separated i18n domains to use as PO catalogue lookaside for * retrieving header group/description/summary. # -@@ -201,22 +196,22 @@ rpm alias --timecheck --define '_timeche +@@ -212,22 +207,22 @@ rpm alias --timecheck --define '_timeche #rpm exec --target rpmb --target #rpm exec --short-circuit rpmb --short-circuit @@ -68,7 +68,7 @@ Index: rpmpopt.in #rpm exec -i rpmi -i #rpm exec --install rpmi --install -@@ -382,7 +377,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p +@@ -393,7 +388,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|URL?{URL : %{URL}\n}|\ Summary : %{SUMMARY}\n\ @@ -78,7 +78,7 @@ Index: rpmpopt.in --POPTdesc=$"list descriptive information from package(s)" rpmq alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ -@@ -495,7 +491,8 @@ Size : %-27{SIZE}%|LICENSE?{ +@@ -509,7 +505,8 @@ Size : %-27{SIZE}%|LICENSE?{ %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|URL?{URL : %{URL}\n}|\ Summary : %{SUMMARY}\n\ diff --git a/rpmqpack.diff b/rpmqpack.diff index 3013c3a..c7ed796 100644 --- a/rpmqpack.diff +++ b/rpmqpack.diff @@ -1,10 +1,12 @@ Provide rpmqpack, a fast way to list all installed packages are check if some package is installed. This is a hack. ---- Makefile.am +Index: Makefile.am +=================================================================== +--- Makefile.am.orig +++ Makefile.am -@@ -48,7 +48,7 @@ - bin_SCRIPTS = gendiff +@@ -41,7 +41,7 @@ rpmbin_PROGRAMS = rpm + bin_PROGRAMS = rpm2cpio pkglibdir = @RPMCONFIGDIR@ -pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq @@ -12,7 +14,7 @@ check if some package is installed. This is a hack. pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \ config.guess config.sub config.site -@@ -98,6 +98,12 @@ +@@ -93,6 +93,12 @@ rpm2cpio_SOURCES = $(top_srcdir)/rpm2cpi rpm2cpio_LDFLAGS = $(myLDFLAGS) rpm2cpio_LDADD = $(myLDADD) @LIBMISC@ @@ -25,7 +27,7 @@ check if some package is installed. This is a hack. $(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@ .PHONY: splint -@@ -147,6 +153,8 @@ +@@ -138,6 +144,8 @@ install-data-local: @LN_S@ ../lib/rpm/rpmv $(DESTDIR)$(bindir)/rpmverify rm -f $(DESTDIR)$(bindir)/rpmsign @LN_S@ ../lib/rpm/rpmk $(DESTDIR)$(bindir)/rpmsign @@ -34,7 +36,9 @@ check if some package is installed. This is a hack. rm -f $(DESTDIR)$(bindir)/rpmdb ; \ @LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \ for bf in e i u ; do \ ---- doc/Makefile.am +Index: doc/Makefile.am +=================================================================== +--- doc/Makefile.am.orig +++ doc/Makefile.am @@ -2,6 +2,6 @@ @@ -44,7 +48,9 @@ check if some package is installed. This is a hack. +man_MANS = gendiff.1 rpm.8 rpmbuild.8 rpmcache.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 rpmqpack.8 EXTRA_DIST = $(man_MANS) ---- doc/rpmqpack.8 +Index: doc/rpmqpack.8 +=================================================================== +--- /dev/null +++ doc/rpmqpack.8 @@ -0,0 +1,25 @@ +.TH RPMQPACK 8 "Mar 2002" @@ -72,7 +78,9 @@ check if some package is installed. This is a hack. + +.SH AUTHOR +Michael Schroeder ---- rpmqpack.c +Index: rpmqpack.c +=================================================================== +--- /dev/null +++ rpmqpack.c @@ -0,0 +1,59 @@ +#include diff --git a/rpmrc.diff b/rpmrc.diff index a974bf8..762df24 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -4,94 +4,68 @@ Index: rpmrc.in =================================================================== --- rpmrc.in.orig +++ rpmrc.in -@@ -15,41 +15,42 @@ +@@ -15,16 +15,16 @@ # "fat" binary with both archs, for Darwin optflags: fat -O2 -g -arch i386 -arch ppc --optflags: i386 -O2 -g -march=i386 -mcpu=i686 --optflags: i486 -O2 -g -march=i486 --optflags: i586 -O2 -g -march=i586 --optflags: i686 -O2 -g -march=i686 +-optflags: i386 -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables +-optflags: i486 -O2 -g -m32 -march=i486 -fasynchronous-unwind-tables +-optflags: i586 -O2 -g -m32 -march=i586 -fasynchronous-unwind-tables +-optflags: i686 -O2 -g -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables +-optflags: pentium3 -O2 -g -m32 -march=pentium3 -mtune=generic -fasynchronous-unwind-tables +-optflags: pentium4 -O2 -g -m32 -march=pentium4 -mtune=generic -fasynchronous-unwind-tables +-optflags: athlon -O2 -g -m32 -march=athlon -fasynchronous-unwind-tables +optflags: i386 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -+optflags: i486 -O2 -g -m32 -march=i486 ++optflags: i486 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 +optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 +optflags: i686 -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 - optflags: pentium3 -O2 -g -march=pentium3 - optflags: pentium4 -O2 -g -march=pentium4 - optflags: athlon -O2 -g -march=athlon --optflags: ia64 -O2 -g --optflags: x86_64 -O2 -g -+optflags: ia64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -+optflags: x86_64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 - optflags: amd64 -O2 -g - optflags: ia32e -O2 -g ++optflags: pentium3 -O2 -g -m32 -march=pentium3 ++optflags: pentium4 -O2 -g -m32 -march=pentium4 ++optflags: athlon -O2 -g -m32 -march=athlon + optflags: geode -Os -g -m32 -march=geode +-optflags: ia64 -O2 -g -m64 -mtune=generic +-optflags: x86_64 -O2 -g -m64 -mtune=generic ++optflags: ia64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 ++optflags: x86_64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 + optflags: amd64 -O2 -g -mtune=generic + optflags: ia32e -O2 -g -m64 -mtune=generic - optflags: alpha -O2 -g -mieee --optflags: alphaev5 -O2 -g -mieee -mcpu=ev5 --optflags: alphaev56 -O2 -g -mieee -mcpu=ev56 --optflags: alphapca56 -O2 -g -mieee -mcpu=pca56 --optflags: alphaev6 -O2 -g -mieee -mcpu=ev6 --optflags: alphaev67 -O2 -g -mieee -mcpu=ev67 -+optflags: alphaev5 -O2 -g -mieee -mtune=ev5 -+optflags: alphaev56 -O2 -g -mieee -mtune=ev56 -+optflags: alphapca56 -O2 -g -mieee -mtune=pca56 -+optflags: alphaev6 -O2 -g -mieee -mtune=ev6 -+optflags: alphaev67 -O2 -g -mieee -mtune=ev67 - - optflags: sparc -O2 -g -m32 -mtune=ultrasparc - optflags: sparcv8 -O2 -g -m32 -mtune=ultrasparc -mv8 --optflags: sparcv9 -O2 -g -m32 -mcpu=ultrasparc --optflags: sparc64 -O2 -g -m64 -mcpu=ultrasparc -+optflags: sparcv9 -O2 -g -m32 -mtune=ultrasparc -+optflags: sparc64 -O2 -g -m64 -mtune=ultrasparc +@@ -44,15 +44,16 @@ optflags: sparc64v -O2 -g -m64 -march=ni optflags: m68k -O2 -g -fomit-frame-pointer --optflags: ppc -O2 -g -fsigned-char --optflags: ppc8260 -O2 -g -fsigned-char --optflags: ppc8560 -O2 -g -fsigned-char --optflags: ppc32dy4 -O2 -g -fsigned-char --optflags: ppciseries -O2 -g -fsigned-char --optflags: ppcpseries -O2 -g -fsigned-char --optflags: ppc64 -O2 -g -fsigned-char -+optflags: ppc -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -+optflags: ppc8260 -O2 -g -+optflags: ppc8560 -O2 -g -+optflags: ppc32dy4 -O2 -g -+optflags: ppciseries -O2 -g -+optflags: ppcpseries -O2 -g -+optflags: ppc64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 +-optflags: ppc -O2 -g -m32 -fsigned-char +-optflags: ppc8260 -O2 -g -m32 -fsigned-char +-optflags: ppc8560 -O2 -g -m32 -fsigned-char +-optflags: ppc32dy4 -O2 -g -m32 -fsigned-char +-optflags: ppciseries -O2 -g -m32 -fsigned-char +-optflags: ppcpseries -O2 -g -m32 -fsigned-char +-optflags: ppc64 -O2 -g -m64 -fsigned-char ++optflags: ppc -O2 -g -m32 -fmessage-length=0 -D_FORTIFY_SOURCE=2 ++optflags: ppc8260 -O2 -g -m32 ++optflags: ppc8560 -O2 -g -m32 ++optflags: ppc32dy4 -O2 -g -m32 ++optflags: ppciseries -O2 -g -m32 ++optflags: ppcpseries -O2 -g -m32 ++optflags: ppc64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 optflags: parisc -O2 -g -mpa-risc-1-0 +optflags: hppa -O2 -g -mpa-risc-1-0 optflags: hppa1.0 -O2 -g -mpa-risc-1-0 optflags: hppa1.1 -O2 -g -mpa-risc-1-0 optflags: hppa1.2 -O2 -g -mpa-risc-1-0 -@@ -58,9 +59,9 @@ optflags: hppa2.0 -O2 -g -mpa-risc-1-0 - optflags: mips -O2 -g - optflags: mipsel -O2 -g - --optflags: armv3l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv3 --optflags: armv4b -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4 --optflags: armv4l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4 -+optflags: armv3l -O2 -g -march=armv3 -+optflags: armv4b -O2 -g -march=armv4 -+optflags: armv4l -O2 -g -march=armv4 - - optflags: atarist -O2 -g -fomit-frame-pointer - optflags: atariste -O2 -g -fomit-frame-pointer -@@ -70,8 +71,8 @@ optflags: atariclone -O2 -g -fomit-frame +@@ -77,8 +78,8 @@ optflags: atariclone -O2 -g -fomit-frame optflags: milan -O2 -g -fomit-frame-pointer optflags: hades -O2 -g -fomit-frame-pointer --optflags: s390 -O2 -g --optflags: s390x -O2 -g -+optflags: s390 -O2 -g -fmessage-length=0 -+optflags: s390x -O2 -g -fmessage-length=0 +-optflags: s390 -O2 -g -m31 +-optflags: s390x -O2 -g -m64 ++optflags: s390 -O2 -g -m31 -fmessage-length=0 ++optflags: s390x -O2 -g -m64 -fmessage-length=0 - ############################################################# - # Canonical arch names and numbers -@@ -181,16 +182,16 @@ os_canon: MacOSX: macosx 21 + optflags: sh3 -O2 -g + optflags: sh4 -O2 -g +@@ -201,17 +202,17 @@ os_canon: MacOSX: macosx 21 ############################################################# # For a given uname().machine, the default build arch @@ -103,11 +77,13 @@ Index: rpmrc.in buildarchtranslate: osfmach3_i386: i386 -buildarchtranslate: athlon: i386 +-buildarchtranslate: geode: i386 -buildarchtranslate: pentium4: i386 -buildarchtranslate: pentium3: i386 -buildarchtranslate: i686: i386 -buildarchtranslate: i586: i386 +buildarchtranslate: athlon: i586 ++buildarchtranslate: geode: i586 +buildarchtranslate: pentium4: i586 +buildarchtranslate: pentium3: i586 +buildarchtranslate: i686: i586 @@ -115,17 +91,17 @@ Index: rpmrc.in buildarchtranslate: i486: i386 buildarchtranslate: i386: i386 -@@ -217,6 +218,7 @@ buildarchtranslate: ppciseries: ppc +@@ -240,6 +241,7 @@ buildarchtranslate: ppciseries: ppc buildarchtranslate: ppcpseries: ppc buildarchtranslate: ppc64iseries: ppc64 buildarchtranslate: ppc64pseries: ppc64 +buildarchtranslate: powerpc64: ppc64 - buildarchtranslate: atarist: m68kmint - buildarchtranslate: atariste: m68kmint -@@ -235,6 +237,15 @@ buildarchtranslate: x86_64: x86_64 - buildarchtranslate: amd64: x86_64 - buildarchtranslate: ia32e: x86_64 + buildarchtranslate: armv3l: armv3l + buildarchtranslate: armv4b: armv4b +@@ -270,6 +272,15 @@ buildarchtranslate: sh3: sh3 + buildarchtranslate: sh4: sh4 + buildarchtranslate: sh4a: sh4 +buildarchtranslate: parisc: hppa +buildarchtranslate: hppa2.0: hppa @@ -139,25 +115,26 @@ Index: rpmrc.in ############################################################# # Architecture compatibility -@@ -287,10 +298,16 @@ arch_compat: mipsel: noarch - arch_compat: hppa2.0: hppa1.2 +@@ -326,12 +337,16 @@ arch_compat: hppa2.0: hppa1.2 arch_compat: hppa1.2: hppa1.1 arch_compat: hppa1.1: hppa1.0 --arch_compat: hppa1.0: parisc + arch_compat: hppa1.0: parisc +-arch_compat: parisc: noarch +arch_compat: hppa1.0: hppa -+arch_compat: hppa: parisc - arch_compat: parisc: noarch ++arch_compat: hppa: noarch +arch_compat: armv5teb: armv5b +arch_compat: armv5b: armv4b arch_compat: armv4b: noarch -+ + arch_compat: armv6l: armv5tejl + arch_compat: armv5tejl: armv5tel +-arch_compat: armv5tel: armv4tl +arch_compat: armv5tel: armv5l -+arch_compat: armv5l: armv4l ++arch_compat: armv5l: armv4tl + arch_compat: armv4tl: armv4l arch_compat: armv4l: armv3l arch_compat: armv3l: noarch - -@@ -306,9 +323,9 @@ arch_compat: i370: noarch +@@ -348,9 +363,9 @@ arch_compat: i370: noarch arch_compat: s390: noarch arch_compat: s390x: s390 noarch @@ -169,15 +146,21 @@ Index: rpmrc.in arch_compat: amd64: x86_64 athlon noarch arch_compat: ia32e: x86_64 athlon noarch -@@ -384,11 +401,16 @@ buildarch_compat: mipsel: noarch - buildarch_compat: armv3l: noarch - buildarch_compat: armv4b: noarch - buildarch_compat: armv4l: noarch -+buildarch_compat: armv5b: noarch -+buildarch_compat: armv5l: noarch -+buildarch_compat: armv5teb: noarch -+buildarch_compat: armv5tel: noarch +@@ -431,10 +446,12 @@ buildarch_compat: ppc64iseries: ppc64 + buildarch_compat: mips: noarch + buildarch_compat: mipsel: noarch ++buildarch_compat: armv5b: noarch + buildarch_compat: armv4b: noarch + buildarch_compat: armv6l: armv5tejl + buildarch_compat: armv5tejl: armv5tel +-buildarch_compat: armv5tel: armv4tl ++buildarch_compat: armv5tel: armv5l ++buildarch_compat: armv5l: armv4tl + buildarch_compat: armv4tl: armv4l + buildarch_compat: armv4l: armv3l + buildarch_compat: armv3l: noarch +@@ -442,7 +459,8 @@ buildarch_compat: armv3l: noarch buildarch_compat: hppa2.0: hppa1.2 buildarch_compat: hppa1.2: hppa1.1 buildarch_compat: hppa1.1: hppa1.0 @@ -187,9 +170,9 @@ Index: rpmrc.in buildarch_compat: parisc: noarch buildarch_compat: atarist: m68kmint noarch -@@ -408,7 +430,7 @@ buildarch_compat: x86_64: noarch - buildarch_compat: amd64: x86_64 - buildarch_compat: ia32e: x86_64 +@@ -466,7 +484,7 @@ buildarch_compat: sh3: noarch + buildarch_compat: sh4: noarch + buildarch_compat: sh4a: sh4 -macrofiles: @RPMCONFIGDIR@/macros:@RPMCONFIGDIR@/%{_target}/macros:@SYSCONFIGDIR@/macros.*:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:~/.rpmmacros +macrofiles: @RPMCONFIGDIR@/macros:@RPMCONFIGDIR@/%{_target}/macros:@RPMCONFIGDIR@/suse_macros:@SYSCONFIGDIR@/macros.*:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:~/.rpmmacros diff --git a/rpmrctests.diff b/rpmrctests.diff index d756989..9566317 100644 --- a/rpmrctests.diff +++ b/rpmrctests.diff @@ -1,8 +1,9 @@ -Patch machine detection code: always use "ppc", restore SIGILL -handler, detect transmeta. [#52713] +Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713] ---- ./lib/rpmrc.c.orig 2005-01-17 18:46:23.000000000 +0000 -+++ ./lib/rpmrc.c 2005-12-16 18:30:29.000000000 +0000 +Index: lib/rpmrc.c +=================================================================== +--- lib/rpmrc.c.orig ++++ lib/rpmrc.c @@ -2,9 +2,6 @@ #include "system.h" @@ -13,35 +14,11 @@ handler, detect transmeta. [#52713] #include /* XXX for /etc/rpm/platform contents */ -@@ -953,20 +950,38 @@ static inline int RPMClass(void) - { - int cpu; - unsigned int tfms, junk, cap, capamd; -+ struct sigaction oldsa; - -+ sigaction(SIGILL, NULL, &oldsa); - signal(SIGILL, model3); - -- if (sigsetjmp(jenv, 1)) -+ if (sigsetjmp(jenv, 1)) { -+ sigaction(SIGILL, &oldsa, NULL); - return 3; -+ } - -- if (cpuid_eax(0x000000000)==0) -+ if (cpuid_eax(0x000000000)==0) { -+ sigaction(SIGILL, &oldsa, NULL); - return 4; -+ } - - cpuid(0x00000001, &tfms, &junk, &junk, &cap); - cpuid(0x80000001, &junk, &junk, &junk, &capamd); +@@ -975,6 +972,14 @@ static inline int RPMClass(void) cpu = (tfms>>8)&15; -+ /* Check if we have a Transmeta i686-compatible CPU -+ that reports as being i586 */ -+ if(cpu == 5 ++ if (cpu == 5 + && cpuid_ecx(0)=='68xM' + && cpuid_edx(0)=='Teni' + && (cpuid_edx(1) & ((1<<8)|(1<<15))) == ((1<<8)|(1<<15))) { @@ -49,13 +26,11 @@ handler, detect transmeta. [#52713] + return 6; /* has CX8 and CMOV */ + } + -+ sigaction(SIGILL, &oldsa, NULL); -+ - if (cpu < 6) - return cpu; - -@@ -1076,15 +1091,6 @@ static int is_pentium4() + sigaction(SIGILL, &oldsa, NULL); + if (cpu < 6) +@@ -1112,15 +1117,6 @@ static int is_geode() + } #endif -#if defined(__linux__) && defined(__powerpc__) @@ -70,7 +45,7 @@ handler, detect transmeta. [#52713] /** */ static void defaultMachine(/*@out@*/ const char ** arch, -@@ -1219,6 +1225,11 @@ static void defaultMachine(/*@out@*/ con +@@ -1255,6 +1251,11 @@ static void defaultMachine(/*@out@*/ con /* big endian */ strcpy(un.machine, "mips"); # endif @@ -82,31 +57,3 @@ handler, detect transmeta. [#52713] # if defined(__hpux) && defined(_SC_CPU_VERSION) { -@@ -1326,27 +1337,6 @@ static void defaultMachine(/*@out@*/ con - } - # endif - --# if defined(__linux__) && defined(__powerpc__) -- { -- unsigned pvr = 0; -- __sighandler_t oldh = signal(SIGILL, mfspr_ill); -- if (setjmp(mfspr_jmpbuf) == 0) { -- __asm__ __volatile__ ("mfspr %0, 287" : "=r" (pvr)); -- } -- signal(SIGILL, oldh); -- -- if ( pvr ) { -- pvr >>= 16; -- if ( pvr >= 0x40) -- strcpy(un.machine, "ppcpseries"); -- else if ( (pvr == 0x36) || (pvr == 0x37) ) -- strcpy(un.machine, "ppciseries"); -- else -- strcpy(un.machine, "ppc"); -- } -- } --# endif -- - /* the uname() result goes through the arch_canon table */ - canon = lookupInCanonTable(un.machine, - tables[RPM_MACHTABLE_INSTARCH].canons, diff --git a/sbitcheck.diff b/sbitcheck.diff deleted file mode 100644 index 368e3de..0000000 --- a/sbitcheck.diff +++ /dev/null @@ -1,105 +0,0 @@ -When deleting files, drop any s-bit first, so that a malicious -user does not have access to old programs if he hard links them -to some other directory. [#50376] rh#125517 - -Already in rpm-4.4.7. - -Index: lib/cpio.h -=================================================================== ---- lib/cpio.h.orig -+++ lib/cpio.h -@@ -64,7 +64,8 @@ typedef enum cpioMapFlags_e { - CPIO_MAP_ABSOLUTE = (1 << 5), - CPIO_MAP_ADDDOT = (1 << 6), - CPIO_ALL_HARDLINKS = (1 << 7), /*!< fail if hardlinks are missing. */ -- CPIO_MAP_TYPE = (1 << 8) /*!< only for building. */ -+ CPIO_MAP_TYPE = (1 << 8), /*!< only for building. */ -+ CPIO_SBIT_CHECK = (1 << 9) - } cpioMapFlags; - - #define CPIO_NEWC_MAGIC "070701" -Index: lib/fsm.c -=================================================================== ---- lib/fsm.c.orig -+++ lib/fsm.c -@@ -2127,6 +2127,11 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS - /*@notreached@*/ break; - - case FSM_UNLINK: -+ if (fsm->mapFlags & CPIO_SBIT_CHECK) { -+ struct stat stb; -+ if (Lstat(fsm->path, &stb) == 0 && S_ISREG(stb.st_mode) && (stb.st_mode & 06000) != 0) -+ chmod(fsm->path, stb.st_mode & 0777); -+ } - rc = Unlink(fsm->path); - if (_fsm_debug && (stage & FSM_SYSCALL)) - rpmMessage(RPMMESS_DEBUG, " %8s (%s) %s\n", cur, -Index: lib/psm.c -=================================================================== ---- lib/psm.c.orig -+++ lib/psm.c -@@ -1472,7 +1472,7 @@ assert(psm->mi == NULL); - fi->striplen = (xx ? strlen(p) + 1 : 1); - } - fi->mapflags = -- CPIO_MAP_PATH | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID; -+ CPIO_MAP_PATH | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID | (fi->mapflags & CPIO_SBIT_CHECK); - - if (headerIsEntry(fi->h, RPMTAG_ORIGBASENAMES)) - rpmfiBuildFNames(fi->h, RPMTAG_ORIGBASENAMES, &fi->apath, NULL); -Index: lib/transaction.c -=================================================================== ---- lib/transaction.c.orig -+++ lib/transaction.c -@@ -187,6 +187,13 @@ static int handleInstInstalledFiles(cons - if (XFA_SKIPPING(fi->actions[fileNum])) - continue; - -+ if (!(fi->mapflags & CPIO_SBIT_CHECK)) { -+ int_16 omode = rpmfiFMode(otherFi); -+ if (S_ISREG(omode) && (omode & 06000) != 0) { -+ fi->mapflags |= CPIO_SBIT_CHECK; -+ } -+ } -+ - if (rpmfiCompare(otherFi, fi)) { - int rConflicts; - -@@ -1843,6 +1850,20 @@ rpmMessage(RPMMESS_DEBUG, _("computing f - case TR_REMOVED: - /*@switchbreak@*/ break; - } -+ /* check for s-bit files to be removed */ -+ if (rpmteType(p) == TR_REMOVED) { -+ fi = rpmfiInit(fi, 0); -+ while ((i = rpmfiNext(fi)) >= 0) { -+ int_16 mode; -+ if (XFA_SKIPPING(fi->actions[i])) -+ continue; -+ (void) rpmfiSetFX(fi, i); -+ mode = rpmfiFMode(fi); -+ if (S_ISREG(mode) && (mode & 06000) != 0) { -+ fi->mapflags |= CPIO_SBIT_CHECK; -+ } -+ } -+ } - (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), fc); - } - pi = rpmtsiFree(pi); -@@ -2088,6 +2109,7 @@ assert(psm != NULL); - { - char * fstates = fi->fstates; - fileAction * actions = fi->actions; -+ int mapflags = fi->mapflags; - rpmte savep; - - fi->fstates = NULL; -@@ -2106,6 +2128,8 @@ assert(psm != NULL); - fi->fstates = fstates; - fi->actions = _free(fi->actions); - fi->actions = actions; -+ if (mapflags & CPIO_SBIT_CHECK) -+ fi->mapflags |= CPIO_SBIT_CHECK; - p->fi = fi; - } - } diff --git a/setpermsugids.diff b/setpermsugids.diff deleted file mode 100644 index 7501f4e..0000000 --- a/setpermsugids.diff +++ /dev/null @@ -1,20 +0,0 @@ -Deal with bad lines in --setperms and --setugids. Happens for example if -a package is not installed (--pipe also captures stderr). [#52122] - ---- ./rpmpopt.in.orig 2005-02-16 19:05:36.000000000 +0000 -+++ ./rpmpopt.in 2006-03-21 17:58:43.000000000 +0000 -@@ -37,12 +37,12 @@ rpm alias --scripts --qf '\ - --POPTdesc=$"list install/erase scriptlets from package(s)" - - rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \ -- --pipe "grep -v \(none\) | sed 's/chmod .../chmod /' | sh" \ -+ --pipe "grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | sh" \ - --POPTdesc=$"set permissions of files in a package" - - rpm alias --setugids -q --qf \ - '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \ -- --pipe "(echo 'ch() { chown -- \"$1\" \"$3\";chgrp -- \"$2\" \"$3\"; }';grep -v \(none\))|sh" \ -+ --pipe "(echo 'ch() { chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\"; }';grep '^ch '|grep -v \(none\))|sh" \ - --POPTdesc=$"set user/group ownership of files in a package" - - rpm alias --conflicts --qf \ diff --git a/showtransscripts.diff b/showtransscripts.diff deleted file mode 100644 index 322c8af..0000000 --- a/showtransscripts.diff +++ /dev/null @@ -1,49 +0,0 @@ -Index: rpmpopt.in -=================================================================== ---- rpmpopt.in.orig -+++ rpmpopt.in -@@ -33,6 +33,14 @@ rpm alias --scripts --qf '\ - {%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\ - \ - %|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\ -+\ -+%|PRETRANS?{pretrans scriptlet\ -+%|PRETRANSPROG?{ (using %{PRETRANSPROG})}|:\n%{PRETRANS}\n}:\ -+{%|PRETRANSPROG?{pretrans program: %{PRETRANSPROG}\n}|}|\ -+\ -+%|POSTTRANS?{posttrans scriptlet\ -+%|POSTTRANSPROG?{ (using %{POSTTRANSPROG})}|:\n%{POSTTRANS}\n}:\ -+{%|POSTTRANSPROG?{posttrans program: %{POSTTRANSPROG}\n}|}|\ - ' \ - --POPTdesc=$"list install/erase scriptlets from package(s)" - -@@ -343,6 +351,14 @@ rpmq alias --scripts --qf '\ - {%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\ - \ - %|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\ -+\ -+%|PRETRANS?{pretrans scriptlet\ -+%|PRETRANSPROG?{ (using %{PRETRANSPROG})}|:\n%{PRETRANS}\n}:\ -+{%|PRETRANSPROG?{pretrans program: %{PRETRANSPROG}\n}|}|\ -+\ -+%|POSTTRANS?{posttrans scriptlet\ -+%|POSTTRANSPROG?{ (using %{POSTTRANSPROG})}|:\n%{POSTTRANS}\n}:\ -+{%|POSTTRANSPROG?{posttrans program: %{POSTTRANSPROG}\n}|}|\ - ' \ - --POPTdesc=$"list install/erase scriptlets from package(s)" - -@@ -462,6 +478,14 @@ rpmquery alias --scripts --qf '\ - {%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\ - \ - %|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\ -+\ -+%|PRETRANS?{pretrans scriptlet\ -+%|PRETRANSPROG?{ (using %{PRETRANSPROG})}|:\n%{PRETRANS}\n}:\ -+{%|PRETRANSPROG?{pretrans program: %{PRETRANSPROG}\n}|}|\ -+\ -+%|POSTTRANS?{posttrans scriptlet\ -+%|POSTTRANSPROG?{ (using %{POSTTRANSPROG})}|:\n%{POSTTRANS}\n}:\ -+{%|POSTTRANSPROG?{posttrans program: %{POSTTRANSPROG}\n}|}|\ - ' \ - --POPTdesc=$"list install/erase scriptlets from package(s)" - diff --git a/signature.diff b/signature.diff deleted file mode 100644 index d2de3a3..0000000 --- a/signature.diff +++ /dev/null @@ -1,21 +0,0 @@ -Backported fix. - ---- ./lib/signature.c.orig 2005-12-14 21:14:45.000000000 +0000 -+++ ./lib/signature.c 2005-12-16 18:24:53.000000000 +0000 -@@ -268,7 +268,7 @@ rpmRC rpmReadSignature(FD_t fd, Header * - - xx = headerVerifyInfo(1, dl, info, &entry->info, 1); - if (xx != -1 || -- !(entry->info.tag == RPMTAG_HEADERSIGNATURES -+ !((entry->info.tag == RPMTAG_HEADERSIGNATURES || entry->info.tag == RPMTAG_HEADERIMAGE) - && entry->info.type == RPM_BIN_TYPE - && entry->info.count == REGION_TAG_COUNT)) - { -@@ -583,6 +583,7 @@ static int makeGPGSignature(const char * - if (gpg_path && *gpg_path != '\0') - (void) dosetenv("GNUPGHOME", gpg_path, 1); - /*@=boundsread@*/ -+ (void) dosetenv("LC_ALL", "C", 1); - - unsetenv("MALLOC_CHECK_"); - cmd = rpmExpand("%{?__gpg_sign_cmd}", NULL); diff --git a/signwriteerror.diff b/signwriteerror.diff deleted file mode 100644 index 87174fb..0000000 --- a/signwriteerror.diff +++ /dev/null @@ -1,16 +0,0 @@ -Call Fflush at the end of writeing a signed package to catch out -of disk space errors. - ---- ./lib/rpmchecksig.c.orig 2005-12-14 20:54:39.000000000 +0000 -+++ ./lib/rpmchecksig.c 2006-03-21 18:00:22.000000000 +0000 -@@ -116,6 +116,10 @@ static int copyFile(FD_t *sfdp, const ch - rpmError(RPMERR_FREAD, _("%s: Fread failed: %s\n"), *sfnp, Fstrerror(*sfdp)); - goto exit; - } -+ if (Fflush(*tfdp) != 0) { -+ rpmError(RPMERR_FWRITE, _("%s: Fflush failed: %s\n"), *tfnp, -+ Fstrerror(*tfdp)); -+ } - - rc = 0; - diff --git a/spectest.diff b/spectest.diff deleted file mode 100644 index 5416193..0000000 --- a/spectest.diff +++ /dev/null @@ -1,19 +0,0 @@ -Allow characters >127 that don't fit the current locale in the -specfile (e.g. latin1 in utf-8 locale). - ---- ./build.c.orig 2004-10-17 19:00:10.000000000 +0000 -+++ ./build.c 2005-12-19 17:52:25.000000000 +0000 -@@ -87,8 +87,13 @@ static int isSpecFile(const char * specf - /*@switchbreak@*/ break; - /*@-boundsread@*/ - default: -+#if 0 - if (checking && !(isprint(*s) || isspace(*s))) return 0; - /*@switchbreak@*/ break; -+#else -+ if (checking && !(isprint(*s) || isspace(*s)) && *(unsigned char *)s < 32) return 0; -+ /*@switchbreak@*/ break; -+#endif - /*@=boundsread@*/ - } - } diff --git a/sqcondmutex.diff b/sqcondmutex.diff deleted file mode 100644 index 61fed9f..0000000 --- a/sqcondmutex.diff +++ /dev/null @@ -1,119 +0,0 @@ -Backported fix. AFAIK needed for smart. - -Index: rpmio/rpmsq.c -=================================================================== ---- rpmio/rpmsq.c.orig -+++ rpmio/rpmsq.c -@@ -218,7 +218,6 @@ fprintf(stderr, " Insert(%p): %p\n", - - sq->id = ME(); - ret = pthread_mutex_init(&sq->mutex, NULL); -- ret = pthread_cond_init(&sq->cond, NULL); - insque(elem, (prev != NULL ? prev : rpmsqQueue)); - ret = sigrelse(SIGCHLD); - } -@@ -240,8 +239,11 @@ fprintf(stderr, " Remove(%p): %p\n", - ret = sighold (SIGCHLD); - if (ret == 0) { - remque(elem); -- ret = pthread_cond_destroy(&sq->cond); -- ret = pthread_mutex_destroy(&sq->mutex); -+ -+ /* Unlock the mutex and then destroy it */ -+ if((ret = pthread_mutex_unlock(&sq->mutex)) == 0) -+ ret = pthread_mutex_destroy(&sq->mutex); -+ - sq->id = NULL; - /*@-bounds@*/ - if (sq->pipes[1]) ret = close(sq->pipes[1]); -@@ -315,11 +317,20 @@ void rpmsqAction(int signum, - sq != NULL && sq != rpmsqQueue; - sq = sq->q_forw) - { -+ int ret; -+ - if (sq->child != reaped) - /*@innercontinue@*/ continue; - sq->reaped = reaped; - sq->status = status; -- (void) pthread_cond_signal(&sq->cond); -+ -+ /* Unlock the mutex. The waiter will then be able to -+ * aquire the lock. -+ * -+ * XXX: jbj, wtd, if this fails? -+ */ -+ ret = pthread_mutex_unlock(&sq->mutex); -+ - /*@innerbreak@*/ break; - } - } -@@ -391,6 +402,7 @@ pid_t rpmsqFork(rpmsq sq) - { - pid_t pid; - int xx; -+ int nothreads = 0; /* XXX: Shouldn't this be a global? */ - - if (sq->reaper) { - xx = rpmsqInsert(sq, NULL); -@@ -405,6 +417,24 @@ fprintf(stderr, " Enable(%p): %p\n", - - xx = sighold(SIGCHLD); - -+ /* -+ * Initialize the cond var mutex. We have to aquire the lock we -+ * use for the condition before we fork. Otherwise it is possible for -+ * the child to exit, we get sigchild and the sig handler to send -+ * the condition signal before we are waiting on the condition. -+ */ -+ if (!nothreads) { -+ if(pthread_mutex_lock(&sq->mutex)) { -+ /* Yack we did not get the lock, lets just give up */ -+/*@-bounds@*/ -+ xx = close(sq->pipes[0]); -+ xx = close(sq->pipes[1]); -+ sq->pipes[0] = sq->pipes[1] = -1; -+/*@=bounds@*/ -+ goto out; -+ } -+ } -+ - pid = fork(); - if (pid < (pid_t) 0) { /* fork failed. */ - sq->child = (pid_t)-1; -@@ -463,10 +493,6 @@ static int rpmsqWaitUnregister(rpmsq sq) - /* Protect sq->reaped from handler changes. */ - ret = sighold(SIGCHLD); - -- /* Initialize the cond var mutex. */ -- if (!nothreads) -- ret = pthread_mutex_lock(&sq->mutex); -- - /* Start the child, linux often runs child before parent. */ - /*@-bounds@*/ - if (sq->pipes[0] >= 0) -@@ -487,7 +513,13 @@ static int rpmsqWaitUnregister(rpmsq sq) - ret = sigpause(SIGCHLD); - else { - xx = sigrelse(SIGCHLD); -- ret = pthread_cond_wait(&sq->cond, &sq->mutex); -+ -+ /* -+ * We start before the fork with this mutex locked; -+ * The only one that unlocks this the signal handler. -+ * So if we get the lock the child has been reaped. -+ */ -+ ret = pthread_mutex_lock(&sq->mutex); - xx = sighold(SIGCHLD); - } - } -@@ -496,9 +528,6 @@ static int rpmsqWaitUnregister(rpmsq sq) - /* Accumulate stopwatch time spent waiting, potential performance gain. */ - sq->ms_scriptlets += rpmswExit(&sq->op, -1)/1000; - -- /* Tear down cond var mutex, our child has been reaped. */ -- if (!nothreads) -- xx = pthread_mutex_unlock(&sq->mutex); - xx = sigrelse(SIGCHLD); - - #ifdef _RPMSQ_DEBUG diff --git a/srcdefattr.diff b/srcdefattr.diff deleted file mode 100644 index a2f0df6..0000000 --- a/srcdefattr.diff +++ /dev/null @@ -1,68 +0,0 @@ -Add new srcdefattr macro. Usefull for assuring that all files -in the src rpms belong to root:root [#48870] rh#125515 - ---- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000 -+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000 -@@ -2260,7 +2274,15 @@ int processSourceFiles(Spec spec) - struct FileList_s fl; - char *s, **files, **fp; - Package pkg; -+ static char *_srcdefattr; -+ static int oneshot; - -+ if (!oneshot) { -+ _srcdefattr = rpmExpand("%{?_srcdefattr}", NULL); -+ if (_srcdefattr && !*_srcdefattr) -+ _srcdefattr = _free(_srcdefattr); -+ oneshot = 1; -+ } - sourceFiles = newStringBuf(); - - /* XXX -@@ -2311,6 +2333,15 @@ int processSourceFiles(Spec spec) - - spec->sourceCpioList = NULL; - -+ /* Init the file list structure */ -+ memset(&fl, 0, sizeof(fl)); -+ if (_srcdefattr) { -+ char *a = xmalloc(strlen(_srcdefattr) + 9 + 1); -+ strcpy(a, "%defattr "); -+ strcpy(a + 9, _srcdefattr); -+ parseForAttr(a, &fl); -+ a = _free(a); -+ } - fl.fileList = xcalloc((spec->numSources + 1), sizeof(*fl.fileList)); - fl.processingFailed = 0; - fl.fileListRecsUsed = 0; -@@ -2359,8 +2390,20 @@ int processSourceFiles(Spec spec) - fl.processingFailed = 1; - } - -- flp->uname = getUname(flp->fl_uid); -- flp->gname = getGname(flp->fl_gid); -+ if (fl.def_ar.ar_fmodestr) { -+ flp->fl_mode &= S_IFMT; -+ flp->fl_mode |= fl.def_ar.ar_fmode; -+ } -+ if (fl.def_ar.ar_user) { -+ flp->uname = getUnameS(fl.def_ar.ar_user); -+ } else { -+ flp->uname = getUname(flp->fl_uid); -+ } -+ if (fl.def_ar.ar_group) { -+ flp->gname = getGnameS(fl.def_ar.ar_group); -+ } else { -+ flp->gname = getGname(flp->fl_gid); -+ } - flp->langs = xstrdup(""); - - fl.totalFileSize += flp->fl_size; -@@ -2384,6 +2427,7 @@ int processSourceFiles(Spec spec) - - sourceFiles = freeStringBuf(sourceFiles); - fl.fileList = freeFileList(fl.fileList, fl.fileListRecsUsed); -+ freeAttrRec(&fl.def_ar); - return fl.processingFailed; - } - diff --git a/suspendlock.diff b/suspendlock.diff index be5188f..06a5eac 100644 --- a/suspendlock.diff +++ b/suspendlock.diff @@ -9,7 +9,7 @@ Index: lib/psm.c =================================================================== --- lib/psm.c.orig +++ lib/psm.c -@@ -799,6 +799,8 @@ static rpmRC runScript(rpmpsm psm, Heade +@@ -813,6 +813,8 @@ static rpmRC runScript(rpmpsm psm, Heade } if (out == NULL) return RPMRC_FAIL; /* XXX can't happen */ @@ -18,7 +18,7 @@ Index: lib/psm.c /*@-branchstate@*/ xx = rpmsqFork(&psm->sq); if (psm->sq.child == 0) { -@@ -924,6 +926,8 @@ static rpmRC runScript(rpmpsm psm, Heade +@@ -933,6 +935,8 @@ static rpmRC runScript(rpmpsm psm, Heade (void) psmWait(psm); @@ -47,7 +47,7 @@ Index: lib/rpmts.h =================================================================== --- lib/rpmts.h.orig +++ lib/rpmts.h -@@ -470,6 +470,10 @@ int rpmtsRebuildDB(rpmts ts) +@@ -476,6 +476,10 @@ int rpmtsRebuildDB(rpmts ts) /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; diff --git a/taggedfileindex.diff b/taggedfileindex.diff index 693e28d..7c0fc20 100644 --- a/taggedfileindex.diff +++ b/taggedfileindex.diff @@ -6,7 +6,7 @@ Index: rpmdb/rpmdb.c =================================================================== --- rpmdb/rpmdb.c.orig +++ rpmdb/rpmdb.c -@@ -1223,6 +1223,16 @@ int rpmdbVerify(const char * prefix) +@@ -1215,6 +1215,16 @@ int rpmdbVerify(const char * prefix) return rc; } @@ -23,7 +23,7 @@ Index: rpmdb/rpmdb.c /** * Find file matches in database. * @param db rpm database -@@ -1302,6 +1312,11 @@ if (key->size == 0) key->size++; /* XXX +@@ -1294,6 +1304,11 @@ if (key->size == 0) key->size++; /* XXX if (rc == 0) (void) dbt2set(dbi, data, &allMatches); @@ -35,7 +35,7 @@ Index: rpmdb/rpmdb.c xx = dbiCclose(dbi, dbcursor, 0); dbcursor = NULL; } else -@@ -2408,7 +2423,7 @@ static void rpmdbSortIterator(/*@null@*/ +@@ -2411,7 +2426,7 @@ static void rpmdbSortIterator(/*@null@*/ } /*@-bounds@*/ /* LCL: segfault */ @@ -44,7 +44,7 @@ Index: rpmdb/rpmdb.c /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/ { -@@ -2456,10 +2471,16 @@ static int rpmdbGrowIterator(/*@null@*/ +@@ -2459,10 +2474,16 @@ static int rpmdbGrowIterator(/*@null@*/ set = NULL; (void) dbt2set(dbi, data, &set); @@ -87,7 +87,7 @@ Index: rpmdb/rpmdb.c if (_noDirTokens) expandFilelist(h); -@@ -3243,6 +3273,11 @@ data->size = 0; +@@ -3240,6 +3270,11 @@ data->size = 0; */ rec->tagNum = i; switch (dbi->dbi_rpmtag) { @@ -99,7 +99,7 @@ Index: rpmdb/rpmdb.c case RPMTAG_PUBKEYS: /*@switchbreak@*/ break; case RPMTAG_FILEMD5S: -@@ -3417,6 +3452,8 @@ if (key->size == 0) key->size++; /* XXX +@@ -3414,6 +3449,8 @@ if (key->size == 0) key->size++; /* XXX } exit: @@ -108,7 +108,7 @@ Index: rpmdb/rpmdb.c (void) unblockSignals(db, &signalMask); return ret; -@@ -3505,7 +3542,7 @@ if (key->size == 0) key->size++; /* XXX +@@ -3495,7 +3532,7 @@ if (key->size == 0) key->size++; /* XXX if (!exclude && skipDir(fpList[i].entry->dirName)) continue; diff --git a/tagsbackport.diff b/tagsbackport.diff index 69d6830..6f95695 100644 --- a/tagsbackport.diff +++ b/tagsbackport.diff @@ -4,7 +4,7 @@ Index: lib/rpmlib.h =================================================================== --- lib/rpmlib.h.orig +++ lib/rpmlib.h -@@ -447,6 +447,19 @@ typedef enum rpmTag_e { +@@ -447,7 +447,19 @@ typedef enum rpmTag_e { RPMTAG_PRIORITY = 1162, /* i extension placeholder */ RPMTAG_CVSID = 1163, /* s */ #define RPMTAG_SVNID RPMTAG_CVSID /* s */ @@ -15,7 +15,7 @@ Index: lib/rpmlib.h + RPMTAG_FLINKHDRID = 1168, /* s[] */ + RPMTAG_FLINKNEVRA = 1169, /* s[] */ + RPMTAG_PACKAGEORIGIN = 1170, /* s */ -+ RPMTAG_TRIGGERPREIN = 1171, /*!< internal */ + RPMTAG_TRIGGERPREIN = 1171, /*!< internal */ + RPMTAG_BUILDSUGGESTS = 1172, /*!< internal */ + RPMTAG_BUILDENHANCES = 1173, /*!< internal */ + RPMTAG_SCRIPTSTATES = 1174, /*!< i scriptlet exit codes */ @@ -24,7 +24,7 @@ Index: lib/rpmlib.h /*@-enummemuse@*/ RPMTAG_FIRSTFREE_TAG /*!< internal */ -@@ -530,7 +543,9 @@ typedef enum rpmsenseFlags_e { +@@ -531,7 +543,9 @@ typedef enum rpmsenseFlags_e { /*@=enummemuse@*/ RPMSENSE_KEYRING = (1 << 26), RPMSENSE_PATCHES = (1 << 27), diff --git a/tarwildcards.diff b/tarwildcards.diff deleted file mode 100644 index 6530eb6..0000000 --- a/tarwildcards.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: build.c -=================================================================== ---- build.c.orig -+++ build.c -@@ -161,7 +161,7 @@ static int buildForTarget(rpmts ts, cons - /* Try again */ - (void) pclose(fp); - -- sprintf(cmd, "%s < %s | tar xOvf - \\*.spec 2>&1 > %s", -+ sprintf(cmd, "%s < %s | tar xOvf - --wildcards \\*.spec 2>&1 > %s", - zcmds[res & 0x3], arg, tmpSpecFile); - if (!(fp = popen(cmd, "r"))) { - rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m\n")); diff --git a/testmode.diff b/testmode.diff deleted file mode 100644 index 1f97185..0000000 --- a/testmode.diff +++ /dev/null @@ -1,134 +0,0 @@ -Do not run pre/posttrans scripts in test mode - -Index: lib/transaction.c -=================================================================== ---- lib/transaction.c.orig -+++ lib/transaction.c -@@ -1747,7 +1747,7 @@ rpmMessage(RPMMESS_DEBUG, _("sanity chec - - /* Run pre-transaction scripts, but only if there are no known - * problems up to this point. */ -- if (!((rpmtsFlags(ts) & RPMTRANS_FLAG_BUILD_PROBS) -+ if (!((rpmtsFlags(ts) & (RPMTRANS_FLAG_BUILD_PROBS|RPMTRANS_FLAG_TEST)) - || (ts->probs->numProblems && - (okProbs == NULL || rpmpsTrim(ts->probs, okProbs))))) { - rpmMessage(RPMMESS_DEBUG, _("running pre-transaction scripts\n")); -@@ -2476,68 +2476,70 @@ assert(psm != NULL); - if (rollbackOnFailure && rollbackTransaction != NULL) - rollbackTransaction = rpmtsFree(rollbackTransaction); - -- rpmMessage(RPMMESS_DEBUG, _("running post-transaction scripts\n")); -- pi = rpmtsiInit(ts); -- while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) { -- int haspostscript; -+ if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)) { -+ rpmMessage(RPMMESS_DEBUG, _("running post-transaction scripts\n")); -+ pi = rpmtsiInit(ts); -+ while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) { -+ int haspostscript; - -- if ((fi = rpmtsiFi(pi)) == NULL) -- continue; /* XXX can't happen */ -+ if ((fi = rpmtsiFi(pi)) == NULL) -+ continue; /* XXX can't happen */ - -- haspostscript = (fi->posttrans != NULL ? 1 : 0); -- p->fi = rpmfiFree(p->fi); -+ haspostscript = (fi->posttrans != NULL ? 1 : 0); -+ p->fi = rpmfiFree(p->fi); - -- /* If no post-transaction script, then don't bother. */ -- if (!haspostscript) -- continue; -+ /* If no post-transaction script, then don't bother. */ -+ if (!haspostscript) -+ continue; - -- p->fd = ts->notify(p->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0, -- rpmteKey(p), ts->notifyData); -- p->h = NULL; -- if (rpmteFd(p) != NULL) { -- rpmVSFlags ovsflags = rpmtsVSFlags(ts); -- rpmVSFlags vsflags = ovsflags | RPMVSF_NEEDPAYLOAD; -- rpmRC rpmrc; -- ovsflags = rpmtsSetVSFlags(ts, vsflags); -- rpmrc = rpmReadPackageFile(ts, rpmteFd(p), -- rpmteNEVR(p), &p->h); -- vsflags = rpmtsSetVSFlags(ts, ovsflags); -- switch (rpmrc) { -- default: -- p->fd = ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, -- 0, 0, rpmteKey(p), ts->notifyData); -- p->fd = NULL; -- /*@switchbreak@*/ break; -- case RPMRC_NOTTRUSTED: -- case RPMRC_NOKEY: -- case RPMRC_OK: -- /*@switchbreak@*/ break; -+ p->fd = ts->notify(p->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0, -+ rpmteKey(p), ts->notifyData); -+ p->h = NULL; -+ if (rpmteFd(p) != NULL) { -+ rpmVSFlags ovsflags = rpmtsVSFlags(ts); -+ rpmVSFlags vsflags = ovsflags | RPMVSF_NEEDPAYLOAD; -+ rpmRC rpmrc; -+ ovsflags = rpmtsSetVSFlags(ts, vsflags); -+ rpmrc = rpmReadPackageFile(ts, rpmteFd(p), -+ rpmteNEVR(p), &p->h); -+ vsflags = rpmtsSetVSFlags(ts, ovsflags); -+ switch (rpmrc) { -+ default: -+ p->fd = ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, -+ 0, 0, rpmteKey(p), ts->notifyData); -+ p->fd = NULL; -+ /*@switchbreak@*/ break; -+ case RPMRC_NOTTRUSTED: -+ case RPMRC_NOKEY: -+ case RPMRC_OK: -+ /*@switchbreak@*/ break; -+ } - } -- } - -- if (rpmteFd(p) != NULL) { -- p->fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1); -- if (p->fi != NULL) /* XXX can't happen */ -- p->fi->te = p; -+ if (rpmteFd(p) != NULL) { -+ p->fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1); -+ if (p->fi != NULL) /* XXX can't happen */ -+ p->fi->te = p; - /*@-compdef -usereleased@*/ /* p->fi->te undefined */ -- psm = rpmpsmNew(ts, p, p->fi); -+ psm = rpmpsmNew(ts, p, p->fi); - /*@=compdef =usereleased@*/ - assert(psm != NULL); -- psm->scriptTag = RPMTAG_POSTTRANS; -- psm->progTag = RPMTAG_POSTTRANSPROG; -- xx = rpmpsmStage(psm, PSM_SCRIPT); -- psm = rpmpsmFree(psm); -+ psm->scriptTag = RPMTAG_POSTTRANS; -+ psm->progTag = RPMTAG_POSTTRANSPROG; -+ xx = rpmpsmStage(psm, PSM_SCRIPT); -+ psm = rpmpsmFree(psm); - - /*@-noeffectuncon -compdef -usereleased @*/ -- (void) ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0, -- rpmteKey(p), ts->notifyData); -+ (void) ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0, -+ rpmteKey(p), ts->notifyData); - /*@=noeffectuncon =compdef =usereleased @*/ -- p->fd = NULL; -- p->fi = rpmfiFree(p->fi); -- p->h = headerFree(p->h); -+ p->fd = NULL; -+ p->fi = rpmfiFree(p->fi); -+ p->h = headerFree(p->h); -+ } - } -+ pi = rpmtsiFree(pi); - } -- pi = rpmtsiFree(pi); - - rpmtsFreeLock(lock); - diff --git a/totalsizenoexclude.diff b/totalsizenoexclude.diff deleted file mode 100644 index 84f9509..0000000 --- a/totalsizenoexclude.diff +++ /dev/null @@ -1,13 +0,0 @@ -Do not could exlcuded files in disk space calculation. Backported. - ---- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000 -+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000 -@@ -1677,7 +1689,7 @@ static int addFile(FileList fl, const ch - } else - i = fl->fileListRecsUsed; - -- if (S_ISREG(flp->fl_mode) && i >= fl->fileListRecsUsed) -+ if (!(flp->flags & RPMFILE_EXCLUDE) && S_ISREG(flp->fl_mode) && i >= fl->fileListRecsUsed) - fl->totalFileSize += flp->fl_size; - } - diff --git a/translockroot.diff b/translockroot.diff deleted file mode 100644 index fa9bc5f..0000000 --- a/translockroot.diff +++ /dev/null @@ -1,37 +0,0 @@ -Obey --root option when calculating the directory of the -transaction lock. - -Already fixed in rpm-4.4.7. - ---- ./lib/rpmlock.c.orig 2005-12-21 14:34:27.000000000 +0000 -+++ ./lib/rpmlock.c 2005-12-21 14:42:59.000000000 +0000 -@@ -45,12 +45,18 @@ static rpmlock rpmlock_new(/*@unused@*/ - } - if (lock != NULL) { - mode_t oldmask = umask(022); -- lock->fd = open(rpmlock_path, O_RDWR|O_CREAT, 0644); -+ char *path = rpmlock_path; -+ if (rootdir && *rootdir == '/' && rootdir[1] != 0) { -+ path = xmalloc(strlen(rootdir) + strlen(rpmlock_path) + 1); -+ strcpy(path, rootdir); -+ strcat(path, rpmlock_path); -+ } -+ lock->fd = open(path, O_RDWR|O_CREAT, 0644); - (void) umask(oldmask); - - /*@-branchstate@*/ - if (lock->fd == -1) { -- lock->fd = open(rpmlock_path, O_RDONLY); -+ lock->fd = open(path, O_RDONLY); - if (lock->fd == -1) { - free(lock); - lock = NULL; -@@ -64,6 +70,8 @@ static rpmlock rpmlock_new(/*@unused@*/ - lock->openmode = RPMLOCK_WRITE | RPMLOCK_READ; - /*@=nullderef@*/ - } -+ if (path != rpmlock_path) -+ free(path); - /*@=branchstate@*/ - } - /*@-compdef@*/ diff --git a/vercmp.diff b/vercmp.diff deleted file mode 100644 index 8a2bfd8..0000000 --- a/vercmp.diff +++ /dev/null @@ -1,31 +0,0 @@ -Patch rpmvercmp corner case where it said both A < B and B < A. -Also clarifies some comments. -Patch from Peter Bowan. - ---- ./lib/rpmvercmp.c.orig 2006-02-10 16:22:02.000000000 +0000 -+++ ./lib/rpmvercmp.c 2006-02-10 16:20:49.000000000 +0000 -@@ -39,6 +39,9 @@ int rpmvercmp(const char * a, const char - while (*one && !xisalnum(*one)) one++; - while (*two && !xisalnum(*two)) two++; - -+ /* If we ran to the end of either, we are finished with the loop */ -+ if (!(*one && *two)) break; -+ - str1 = one; - str2 = two; - -@@ -64,9 +67,13 @@ int rpmvercmp(const char * a, const char - *str2 = '\0'; - /*@=boundswrite@*/ - -+ /* this cannot happen, as we previously tested to make sure that */ -+ /* the first string has a non-null segment */ -+ if (one == str1) return -1; /* arbitrary */ -+ - /* take care of the case where the two version segments are */ - /* different types: one numeric, the other alpha (i.e. empty) */ -- if (one == str1) return -1; /* arbitrary */ -+ /* numeric segments are always newer than alpha segments */ - /* XXX See patch #60884 (and details) from bugzilla #50977. */ - if (two == str2) return (isnum ? 1 : -1); - diff --git a/verifylstatfail.diff b/verifylstatfail.diff deleted file mode 100644 index 852e156..0000000 --- a/verifylstatfail.diff +++ /dev/null @@ -1,17 +0,0 @@ -Tell user the reason why the lstat failed in a verify operation. - -Index: lib/verify.c -=================================================================== ---- lib/verify.c.orig -+++ lib/verify.c -@@ -327,6 +327,10 @@ static int verifyHeader(QVA_t qva, const - (fileAttrs & RPMFILE_README) ? 'r' : ' '), - rpmfiFN(fi)); - te += strlen(te); -+ if ((verifyResult & RPMVERIFY_LSTATFAIL) != 0 && errno != ENOENT) { -+ sprintf(te, " (%s)", strerror(errno)); -+ te += strlen(te); -+ } - ec = rc; - } - } else if (verifyResult || rpmIsVerbose()) { diff --git a/waitlock.diff b/waitlock.diff index 79ae33d..0d3e932 100644 --- a/waitlock.diff +++ b/waitlock.diff @@ -1,8 +1,10 @@ Fix global (DB_PRIVATE) lock code: fix recursion counter, retry failed lock operations for up to 3 minutes. ---- ./rpmdb/db3.c.orig 2005-03-23 18:15:28.000000000 +0000 -+++ ./rpmdb/db3.c 2006-01-27 20:08:29.000000000 +0000 -@@ -759,6 +769,8 @@ assert(db != NULL); +Index: rpmdb/db3.c +=================================================================== +--- rpmdb/db3.c.orig ++++ rpmdb/db3.c +@@ -769,6 +769,8 @@ assert(db != NULL); } /*@=mustmod@*/ @@ -11,7 +13,7 @@ failed lock operations for up to 3 minutes. /*@-moduncon@*/ /* FIX: annotate db3 methods */ static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) /*@globals rpmGlobalMacroContext, h_errno, -@@ -818,6 +830,10 @@ static int db3close(/*@only@*/ dbiIndex +@@ -828,6 +830,10 @@ static int db3close(/*@only@*/ dbiIndex rpmMessage(RPMMESS_DEBUG, _("closed db index %s/%s\n"), dbhome, (dbfile ? dbfile : tagName(dbi->dbi_rpmtag))); @@ -22,7 +24,7 @@ failed lock operations for up to 3 minutes. } -@@ -1138,8 +1157,6 @@ static int db3open(rpmdb rpmdb, rpmTag r +@@ -1148,8 +1154,6 @@ static int db3open(rpmdb rpmdb, rpmTag r prDbiOpenFlags(oflags, 0), dbi->dbi_mode); if (rc == 0) { @@ -31,7 +33,7 @@ failed lock operations for up to 3 minutes. /*@-moduncon@*/ /* FIX: annotate db3 methods */ rc = db_create(&db, dbenv, dbi->dbi_cflags); /*@=moduncon@*/ -@@ -1356,6 +1373,7 @@ static int db3open(rpmdb rpmdb, rpmTag r +@@ -1366,6 +1370,7 @@ static int db3open(rpmdb rpmdb, rpmTag r if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) { rc = 1; } else { @@ -39,7 +41,7 @@ failed lock operations for up to 3 minutes. struct flock l; /*@-boundswrite@*/ memset(&l, 0, sizeof(l)); -@@ -1367,24 +1385,40 @@ static int db3open(rpmdb rpmdb, rpmTag r +@@ -1377,24 +1382,40 @@ static int db3open(rpmdb rpmdb, rpmTag r ? F_WRLCK : F_RDLCK; l.l_pid = 0; diff --git a/weakdeps.diff b/weakdeps.diff index b5ad2b6..ce52075 100644 --- a/weakdeps.diff +++ b/weakdeps.diff @@ -36,7 +36,7 @@ Index: build/parsePreamble.c { NULL, 0 } }; -@@ -692,6 +696,18 @@ static int handlePreambleTag(Spec spec, +@@ -692,6 +696,18 @@ static int handlePreambleTag(Spec spec, if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) return rc; break; @@ -74,7 +74,7 @@ Index: build/parseReqs.c =================================================================== --- build/parseReqs.c.orig +++ build/parseReqs.c -@@ -81,6 +81,14 @@ int parseRCPOT(Spec spec, Package pkg, c +@@ -85,6 +85,14 @@ int parseRCPOT(Spec spec, Package pkg, c tagflags |= RPMSENSE_ANY; h = spec->buildRestrictions; break; @@ -114,7 +114,7 @@ Index: build/rpmfc.c =================================================================== --- build/rpmfc.c.orig +++ build/rpmfc.c -@@ -1350,6 +1350,12 @@ static struct DepMsg_s depMsgs[] = { +@@ -1385,6 +1385,12 @@ static struct DepMsg_s depMsgs[] = { { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, 0, -1 }, @@ -127,7 +127,7 @@ Index: build/rpmfc.c { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } }; -@@ -1445,6 +1451,14 @@ static int rpmfcGenerateDependsHelper(co +@@ -1480,6 +1486,14 @@ static int rpmfcGenerateDependsHelper(co failnonzero = 0; tagflags = RPMSENSE_FIND_REQUIRES; /*@switchbreak@*/ break; @@ -167,7 +167,7 @@ Index: python/rpmmodule.c =================================================================== --- python/rpmmodule.c.orig +++ python/rpmmodule.c -@@ -354,7 +354,7 @@ void init_rpm(void) +@@ -433,7 +433,7 @@ void init_rpm(void) REGISTER_ENUM(RPMSENSE_RPMLIB); REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); REGISTER_ENUM(RPMSENSE_KEYRING); @@ -196,7 +196,7 @@ Index: rpmpopt.in =================================================================== --- rpmpopt.in.orig +++ rpmpopt.in -@@ -60,6 +60,22 @@ rpm alias --requires --qf \ +@@ -68,6 +68,22 @@ rpm alias --requires --qf \ --POPTdesc=$"list capabilities required by package(s)" rpm alias -R --requires @@ -219,7 +219,7 @@ Index: rpmpopt.in rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\ Version : %-27{VERSION} Vendor: %{VENDOR}\n\ Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\ -@@ -340,6 +356,22 @@ rpmq alias --requires --qf \ +@@ -351,6 +367,22 @@ rpmq alias --requires --qf \ --POPTdesc=$"list capabilities required by package(s)" rpmq alias -R --requires @@ -242,7 +242,7 @@ Index: rpmpopt.in rpmq alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\ Version : %-27{VERSION} Vendor: %{VENDOR}\n\ Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\ -@@ -438,6 +470,22 @@ rpmquery alias --requires --qf \ +@@ -452,6 +484,22 @@ rpmquery alias --requires --qf \ --POPTdesc=$"list capabilities required by package(s)" rpmquery alias -R --requires @@ -308,7 +308,7 @@ Index: lib/formats.c /** * Retrieve mounted file system paths. * @param h header -@@ -1344,6 +1376,7 @@ const struct headerSprintfExtension_s rp +@@ -1347,6 +1379,7 @@ const struct headerSprintfExtension_s rp { HEADER_EXT_FORMAT, "base64", { base64Format } }, { HEADER_EXT_FORMAT, "pgpsig", { pgpsigFormat } }, { HEADER_EXT_FORMAT, "depflags", { depflagsFormat } },