From 8e55a85d141d67f37845a4fbcfbddafc9442836cc21a93c3d7fe286663e3abdd Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 18 Dec 2006 23:17:44 +0000 Subject: [PATCH 001/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=1 --- RPM-Changes.html.tar.bz2 | 3 + aloffbyone.diff | 16 + assumeexec.diff | 27 - autodeps.diff | 52 +- badforsyntax.diff | 17 + baselibs.conf | 3 - brp.diff | 60 +- brpcombress.diff | 56 + brpcompress.diff | 96 -- build.diff | 580 +++++++++- buildidprov.diff | 62 -- buildpipe.diff | 29 - buildsubdir.diff | 24 + checkfilesnoinfodir.diff | 14 +- chownwarn.diff | 70 +- compress.diff | 31 + convertdb1static.diff | 400 +------ db-4.8.30.tar.bz2 | 3 - db.diff | 151 ++- dbfsync.diff | 58 +- dbprivate.diff | 24 +- dbrointerruptable.diff | 67 +- debugedit-canon-fix.diff | 119 -- debugedit-comp-dir.diff | 51 - debugedit.diff | 39 +- debuginfo-mono.patch | 20 - debuglink.diff | 12 - debugsource-package.diff | 57 - debugsubpkg.diff | 322 ------ diskspace.diff | 23 + disttag-macro.diff | 31 - docdir_fmt.diff | 36 + elfutils-0.97.diff | 151 +++ elfutils-0.97.tar.bz2 | 3 + emptychangelog.diff | 11 - emptyfilelist.diff | 16 + emptyprep.diff | 13 - erasebadreturn.diff | 16 + eraseignoresize.diff | 28 + eraseordered.diff | 21 + exitstatus.diff | 15 + extcond.diff | 45 +- fileattrs.diff | 85 -- filenonull.diff | 12 + filequery.diff | 14 + files.diff | 17 - finddebuginfo-absolute-links.diff | 41 - finddebuginfo.diff | 205 ++-- findfplistexclude.diff | 114 ++ findksyms.diff | 92 +- findlang.diff | 147 +-- findsupplements.diff | 75 -- firmware.diff | 37 - fontprovides.diff | 54 - forkfailed.diff | 40 + getcwdresult.diff | 30 + ghost.diff | 17 + globlstat.diff | 18 + globoffbyone.diff | 13 + headeradddb.diff | 55 - initdbret.diff | 25 + initscriptsprov.diff | 50 - langnoc.diff | 127 --- lazystatfs.diff | 50 - legacyprereq.diff | 16 + localetag.diff | 143 ++- luanoreadline.diff | 32 + luaroot.diff | 75 ++ macrosin.diff | 235 ++-- magic_and_path.diff | 23 - missingok.diff | 33 +- modalias-encode.diff | 40 - modalias-kernel_module.diff | 25 +- modalias.diff | 81 +- nameversioncompare.diff | 43 +- no_rep_autop.diff | 12 - nobuildcolor.diff | 13 - nodefattr.diff | 15 + nolua.diff | 83 ++ nomagiccheck.diff | 13 - noneon.diff | 292 +++++ noprereqdeprec.diff | 22 - nostdoutclose.diff | 13 + obeynodbsync.diff | 14 + openallbuttemp.diff | 55 + patchrpms.diff | 743 +++++++++++++ payloadformat.diff | 40 + perlprov.diff | 13 - pgpdecodeearly.diff | 18 + platformin.diff | 31 +- prereqorder.diff | 21 + probfilter.diff | 14 + pythondeps.diff | 48 - querybuffer.diff | 43 + ready | 0 rebuilddbroot.diff | 22 + refreshtestarch.diff | 31 +- remove-brp-strips.diff | 16 - remove-translations.diff | 20 - repackage-nomd5.diff | 31 - requires-ge-macro.diff | 12 - rpm-4.4.2.tar.bz2 | 3 + rpm-4.9.0.tar.bz2 | 3 - rpm-beecrypt.diff | 1726 ----------------------------- rpm-gst-provides.patch | 14 - rpm-python.changes | 55 - rpm-python.spec | 50 +- rpm-shorten-changelog.diff | 88 -- rpm-suse_macros | 403 ++++--- rpm.changes | 883 +-------------- rpm.spec | 1359 +++++++++++++++++++---- rpmconfigcheck | 8 +- rpmdb_get_open_flags.diff | 13 - rpmpopt.diff | 85 +- rpmqpack.diff | 67 +- rpmrc.diff | 135 ++- rpmrctests.diff | 83 +- rpmsort | 36 +- safemacro.diff | 21 - safeugid.diff | 213 ---- sbitcheck.diff | 105 ++ setpermsugids.diff | 20 + signature.diff | 21 + signwriteerror.diff | 16 + specfilemacro.diff | 10 - spectest.diff | 19 + sqcondmutex.diff | 119 ++ srcdefattr.diff | 68 ++ suspendlock.diff | 267 ++--- taggedfileindex.diff | 133 ++- tagsbackport.diff | 37 + totalsizenoexclude.diff | 13 + translockroot.diff | 37 + vercmp.diff | 31 + verify_p.diff | 49 - verifylstatfail.diff | 15 + waitlock.diff | 176 ++- weakdeps.diff | 382 ++++--- whatrequires-doc.diff | 14 - 139 files changed, 6470 insertions(+), 6878 deletions(-) create mode 100644 RPM-Changes.html.tar.bz2 create mode 100644 aloffbyone.diff delete mode 100644 assumeexec.diff create mode 100644 badforsyntax.diff delete mode 100644 baselibs.conf create mode 100644 brpcombress.diff delete mode 100644 brpcompress.diff delete mode 100644 buildidprov.diff delete mode 100644 buildpipe.diff create mode 100644 buildsubdir.diff create mode 100644 compress.diff delete mode 100644 db-4.8.30.tar.bz2 delete mode 100644 debugedit-canon-fix.diff delete mode 100644 debugedit-comp-dir.diff delete mode 100644 debuginfo-mono.patch delete mode 100644 debuglink.diff delete mode 100644 debugsource-package.diff delete mode 100644 debugsubpkg.diff create mode 100644 diskspace.diff delete mode 100644 disttag-macro.diff create mode 100644 docdir_fmt.diff create mode 100644 elfutils-0.97.diff create mode 100644 elfutils-0.97.tar.bz2 delete mode 100644 emptychangelog.diff create mode 100644 emptyfilelist.diff delete mode 100644 emptyprep.diff create mode 100644 erasebadreturn.diff create mode 100644 eraseignoresize.diff create mode 100644 eraseordered.diff create mode 100644 exitstatus.diff delete mode 100644 fileattrs.diff create mode 100644 filenonull.diff create mode 100644 filequery.diff delete mode 100644 files.diff delete mode 100644 finddebuginfo-absolute-links.diff create mode 100644 findfplistexclude.diff delete mode 100644 findsupplements.diff delete mode 100644 firmware.diff delete mode 100644 fontprovides.diff create mode 100644 forkfailed.diff create mode 100644 getcwdresult.diff create mode 100644 ghost.diff create mode 100644 globlstat.diff create mode 100644 globoffbyone.diff delete mode 100644 headeradddb.diff create mode 100644 initdbret.diff delete mode 100644 initscriptsprov.diff delete mode 100644 langnoc.diff delete mode 100644 lazystatfs.diff create mode 100644 legacyprereq.diff create mode 100644 luanoreadline.diff create mode 100644 luaroot.diff delete mode 100644 magic_and_path.diff delete mode 100644 modalias-encode.diff delete mode 100644 no_rep_autop.diff delete mode 100644 nobuildcolor.diff create mode 100644 nodefattr.diff create mode 100644 nolua.diff delete mode 100644 nomagiccheck.diff create mode 100644 noneon.diff delete mode 100644 noprereqdeprec.diff create mode 100644 nostdoutclose.diff create mode 100644 obeynodbsync.diff create mode 100644 openallbuttemp.diff create mode 100644 patchrpms.diff create mode 100644 payloadformat.diff delete mode 100644 perlprov.diff create mode 100644 pgpdecodeearly.diff create mode 100644 prereqorder.diff create mode 100644 probfilter.diff delete mode 100644 pythondeps.diff create mode 100644 querybuffer.diff create mode 100644 ready create mode 100644 rebuilddbroot.diff delete mode 100644 remove-brp-strips.diff delete mode 100644 remove-translations.diff delete mode 100644 repackage-nomd5.diff delete mode 100644 requires-ge-macro.diff create mode 100644 rpm-4.4.2.tar.bz2 delete mode 100644 rpm-4.9.0.tar.bz2 delete mode 100644 rpm-beecrypt.diff delete mode 100644 rpm-gst-provides.patch delete mode 100644 rpm-shorten-changelog.diff delete mode 100644 rpmdb_get_open_flags.diff delete mode 100644 safemacro.diff delete mode 100644 safeugid.diff create mode 100644 sbitcheck.diff create mode 100644 setpermsugids.diff create mode 100644 signature.diff create mode 100644 signwriteerror.diff delete mode 100644 specfilemacro.diff create mode 100644 spectest.diff create mode 100644 sqcondmutex.diff create mode 100644 srcdefattr.diff create mode 100644 tagsbackport.diff create mode 100644 totalsizenoexclude.diff create mode 100644 translockroot.diff create mode 100644 vercmp.diff delete mode 100644 verify_p.diff create mode 100644 verifylstatfail.diff delete mode 100644 whatrequires-doc.diff diff --git a/RPM-Changes.html.tar.bz2 b/RPM-Changes.html.tar.bz2 new file mode 100644 index 0000000..5cb5122 --- /dev/null +++ b/RPM-Changes.html.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b1d6954ea1c3fd4681d1419dbbae6907fac09ac9e8ea8cd33b08e930873e4c2 +size 9527 diff --git a/aloffbyone.diff b/aloffbyone.diff new file mode 100644 index 0000000..080d2f9 --- /dev/null +++ b/aloffbyone.diff @@ -0,0 +1,16 @@ +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/assumeexec.diff b/assumeexec.diff deleted file mode 100644 index d74def4..0000000 --- a/assumeexec.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- tools/elfdeps.c.orig 2011-06-03 13:12:32.000000000 +0000 -+++ tools/elfdeps.c 2011-06-03 13:17:45.000000000 +0000 -@@ -14,6 +14,7 @@ - - int filter_private = 0; - int soname_only = 0; -+int assume_exec = 0; - - typedef struct elfInfo_s { - Elf *elf; -@@ -226,7 +227,7 @@ static int processFile(const char *fn, i - ei->isElf64 = 0; - #endif - ei->isDSO = (ehdr->e_type == ET_DYN); -- ei->isExec = (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)); -+ ei->isExec = assume_exec || (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)); - - processSections(ei); - } -@@ -279,6 +280,7 @@ int main(int argc, char *argv[]) - { "requires", 'R', POPT_ARG_VAL, &requires, -1, NULL, NULL }, - { "filter-private", 0, POPT_ARG_VAL, &filter_private, -1, NULL, NULL }, - { "soname-only", 0, POPT_ARG_VAL, &soname_only, -1, NULL, NULL }, -+ { "assume-exec", 0, POPT_ARG_VAL, &assume_exec, -1, NULL, NULL }, - POPT_AUTOHELP - POPT_TABLEEND - }; diff --git a/autodeps.diff b/autodeps.diff index f8ad21f..eb8e567 100644 --- a/autodeps.diff +++ b/autodeps.diff @@ -1,6 +1,8 @@ ---- ./autodeps/linux.prov.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./autodeps/linux.prov 2011-05-11 14:27:40.000000000 +0000 -@@ -2,60 +2,72 @@ +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 +@@ -2,60 +2,71 @@ # This script reads filenames from STDIN and outputs any relevant provides # information that needs to be included in the package. @@ -91,9 +93,8 @@ +# +# --- Mono exes/dlls +: ${MONO_PREFIX=/usr} -+if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then -+ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-provides || echo "WARNING: MONO RPM PROVIDES WERE NOT GENERATED FOR THIS BUILD!!" 1>&2 -+fi ++[ -x $MONO_PREFIX/bin/mono -a -f $MONO_PREFIX/bin/mono-find-provides -a -n "$monolist" ] && ++ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-provides + +# +# --- Kernel module exported symbols @@ -101,20 +102,26 @@ + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" exit 0 ---- ./autodeps/linux.req.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./autodeps/linux.req 2011-05-11 14:28:45.000000000 +0000 -@@ -19,18 +19,21 @@ fi +--- ./autodeps/linux.req.orig 2002-11-14 12:53:11.000000000 +0000 ++++ ./autodeps/linux.req 2005-12-17 01:50:07.000000000 +0000 +@@ -19,18 +19,22 @@ fi # # --- Grab the file manifest and classify files. #filelist=`sed "s/['\"]/\\\&/g"` -filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"` --exelist=`echo $filelist | xargs -r file | grep -Ev ":.* (commands|script) " | \ +-exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \ - grep ":.*executable" | cut -d: -f1` -scriptlist=`echo $filelist | xargs -r file | \ -- grep -E ":.* (commands|script) " | cut -d: -f1` +- egrep ":.* (commands|script) " | cut -d: -f1` -liblist=`echo $filelist | xargs -r file | \ - grep ":.*shared object" | cut -d : -f1` +- +-interplist= +-perllist= +-pythonlist= +-tcllist= +#filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"` ++IFS=$'\n' +filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/')) +exelist=($(printf "%s\0" "${filelist[@]}" | xargs -0 -r file | \ + egrep -v ":.* (commands|script) " | \ @@ -123,20 +130,16 @@ + egrep ":.* (commands|script) " | cut -d: -f1)) +liblist=($(printf "%s\0" "${filelist[@]}" | xargs -0 -r file | \ + grep ":.*shared object" | cut -d : -f1)) - --interplist= --perllist= --pythonlist= --tcllist= ++ +interplist=() +perllist=() +pythonlist=() +tcllist=() -+monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) ++monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) # # --- Alpha does not mark 64bit dependencies -@@ -42,12 +45,12 @@ esac +@@ -42,12 +46,12 @@ esac if [ "$needed" -eq 0 ]; then # # --- Executable dependency sonames. @@ -154,7 +157,7 @@ gsub(/'\''"/,"\\&",$1); printf "%s'$lib64'\n", $1 } -@@ -56,12 +59,12 @@ if [ "$needed" -eq 0 ]; then +@@ -56,12 +60,12 @@ if [ "$needed" -eq 0 ]; then # # --- Library dependency sonames. @@ -172,7 +175,7 @@ gsub(/'\''"/,"\\&",$1); printf "%s'$lib64'\n", $1 } -@@ -71,30 +74,30 @@ fi +@@ -71,30 +75,30 @@ fi # # --- Script interpreters. @@ -215,7 +218,7 @@ /^$/ { START=0; } /^Dynamic Section:$/ { START=1; } (START==1) && /NEEDED/ { -@@ -111,7 +114,7 @@ for f in $liblist $exelist ; do +@@ -110,7 +114,7 @@ for f in $liblist $exelist ; do sub(/:/, "", $3); LIBNAME=$3; } @@ -224,7 +227,7 @@ print LIBNAME "(" $4 ")'$lib64'"; } ' -@@ -119,17 +122,29 @@ done | sort -u +@@ -118,17 +122,28 @@ done | sort -u # # --- Perl modules. @@ -248,9 +251,8 @@ +# +# --- Mono exes/dlls +: ${MONO_PREFIX=/usr} -+if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then -+ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-requires || echo "WARNING: MONO RPM REQUIRES WERE NOT GENERATED FOR THIS BUILD!!" 1>&2 -+fi ++[ -x $MONO_PREFIX/bin/mono -a -f $MONO_PREFIX/bin/mono-find-requires -a -n "$monolist" ] && ++ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-requires + +# +# --- Kernel module imported symbols diff --git a/badforsyntax.diff b/badforsyntax.diff new file mode 100644 index 0000000..8b4716b --- /dev/null +++ b/badforsyntax.diff @@ -0,0 +1,17 @@ +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/baselibs.conf b/baselibs.conf deleted file mode 100644 index bdc5343..0000000 --- a/baselibs.conf +++ /dev/null @@ -1,3 +0,0 @@ -rpm -arch ppc package rpm-devel -arch sparcv9 package rpm-devel diff --git a/brp.diff b/brp.diff index 27fe6b5..fdaf8c5 100644 --- a/brp.diff +++ b/brp.diff @@ -1,27 +1,9 @@ SUSE specific brp script patches ---- ./scripts/Makefile.am.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/Makefile.am 2011-05-11 14:31:45.000000000 +0000 -@@ -6,6 +6,7 @@ CLEANFILES = - - EXTRA_DIST = \ - brp-compress brp-python-bytecompile brp-java-gcjcompile \ -+ brp-lib64-linux brp-symlink \ - brp-strip brp-strip-comment-note brp-python-hardlink \ - brp-strip-shared brp-strip-static-archive \ - check-files check-prereqs \ -@@ -24,6 +25,7 @@ EXTRA_DIST = \ - - rpmconfig_SCRIPTS = \ - brp-compress brp-python-bytecompile brp-java-gcjcompile \ -+ brp-lib64-linux brp-symlink \ - brp-strip brp-strip-comment-note brp-python-hardlink \ - brp-strip-shared brp-strip-static-archive \ - check-files check-prereqs \ ---- ./scripts/brp-lib64-linux.orig 2011-05-11 14:30:08.000000000 +0000 -+++ ./scripts/brp-lib64-linux 2011-05-11 14:30:08.000000000 +0000 +--- ./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 @@ -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" @@ -63,9 +45,19 @@ SUSE specific brp script patches + fi +done +exit 0 ---- ./scripts/brp-strip-comment-note.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/brp-strip-comment-note 2011-05-11 14:30:08.000000000 +0000 -@@ -16,6 +16,8 @@ esac +--- ./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 +@@ -6,6 +6,7 @@ fi + files= + LC_ALL= + LANG= ++LC_TIME=POSIX + + # 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 +@@ -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 {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ @@ -73,20 +65,20 @@ SUSE specific brp script patches + grep -v '/lib/modules/' | \ 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 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/brp-strip 2011-05-11 14:30:08.000000000 +0000 -@@ -15,6 +15,7 @@ esac + 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" || : + strip -g "$f" || : done ---- ./scripts/brp-symlink.orig 2011-05-11 14:30:08.000000000 +0000 -+++ ./scripts/brp-symlink 2011-05-11 14:30:08.000000000 +0000 -@@ -0,0 +1,184 @@ +--- ./scripts/brp-symlink.orig 2005-12-15 14:06:58.000000000 +0000 ++++ ./scripts/brp-symlink 2006-01-27 19:41:58.000000000 +0000 +@@ -0,0 +1,182 @@ +#!/bin/sh + +# Task: go through the files in $RPM_BUILD_ROOT and @@ -182,9 +174,7 @@ SUSE specific brp script patches + echo " skip the files from packaging)" + exit 1 + ;; -+ *,/opt/kde3/share/doc*/HTML/*/common) # white listed for not existant -+ ;; -+ *,/usr/share/doc/kde/HTML/*/common) # white listed for not existant ++ *,/opt/kde3/share/doc/HTML/*/common) # white listed for not existant + ;; + *,/proc/*) # links pointing into /proc file system + ;; diff --git a/brpcombress.diff b/brpcombress.diff new file mode 100644 index 0000000..f46c29b --- /dev/null +++ b/brpcombress.diff @@ -0,0 +1,56 @@ +make brp-compress deal correctly with hardlinked man pages + +--- ./scripts/brp-compress.orig 2004-10-17 18:49:52.000000000 +0000 ++++ ./scripts/brp-compress 2005-12-15 14:03:58.000000000 +0000 +@@ -5,12 +5,38 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD + exit 0 + fi + ++LC_ALL= ++LANG= ++LC_TIME=POSIX ++ + cd $RPM_BUILD_ROOT + + # Compress man pages + COMPRESS="gzip -9 -n" + COMPRESS_EXT=.gz + ++function check_for_hard_link ++{ ++ dir=$1 ++ b=$2 ++ type=$3 ++ ++ inode=`ls -i $b | awk '{ print $1 }'` ++ others=`find $dir -type f -inum $inode` ++ for afile in $others ; do ++ [ "$afile" != "$b" ] && rm -f $afile ++ done ++ ++ case $type in ++ Z|gz) gunzip $b ;; ++ bz2) bunzip2 $b ;; ++ esac ++ ++ for afile in $others ; do ++ [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type} ++ done ++} ++ + for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ + ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ + ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ +@@ -23,9 +49,9 @@ do + [ "`basename $f`" = "dir" ] && continue + + case "$f" in +- *.Z) gunzip $f; b=`echo $f | sed -e 's/\.Z$//'`;; +- *.gz) gunzip $f; b=`echo $f | sed -e 's/\.gz$//'`;; +- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; ++ *.Z) gunzip $f || check_for_hard_link $d $f Z; b=`echo $f | sed -e 's/\.Z$//'`;; ++ *.gz) gunzip $f || check_for_hard_link $d $f gz; b=`echo $f | sed -e 's/\.gz$//'`;; ++ *.bz2) bunzip2 $f || check_for_hard_link $d $f bz2; b=`echo $f | sed -e 's/\.bz2$//'`;; + *) b=$f;; + esac + diff --git a/brpcompress.diff b/brpcompress.diff deleted file mode 100644 index 07e5174..0000000 --- a/brpcompress.diff +++ /dev/null @@ -1,96 +0,0 @@ ---- ./scripts/brp-compress.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/brp-compress 2011-05-11 14:44:21.000000000 +0000 -@@ -5,51 +5,78 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD - exit 0 - fi - -+LC_ALL= -+LANG= -+LC_TIME=POSIX -+ - cd $RPM_BUILD_ROOT - - # Compress man pages - COMPRESS="gzip -9 -n" - COMPRESS_EXT=.gz - -+function check_for_hard_link -+{ -+ dir=$1 -+ b=$2 -+ -+ inode=`ls -i $b | awk '{ print $1 }'` -+ others=`find $dir -type f -inum $inode` -+ for afile in $others ; do -+ [ "$afile" != "$b" ] && rm -f "$afile" -+ done -+ -+ case $b in -+ *.Z|*.gz) gunzip $b ;; -+ *.bz2) bunzip2 $b ;; -+ *.xz|*.lzma) unxz $b ;; -+ esac -+ -+ type=${b##*.} -+ for afile in $others ; do -+ [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type} -+ done -+} -+ - for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ - ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ - ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ - ./usr/share/doc/*/man/man* ./usr/lib/*/man/man* - do - [ -d $d ] || continue -- for f in `find $d -type f ! -name dir` -+ find $d -type f ! -name dir | while read f - do - [ -f "$f" ] || continue - - case "$f" in -- *.gz|*.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; -- *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;; -- *.xz|*.lzma) unxz -f $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; -- *) b=$f;; -+ *.gz|*.Z) gunzip "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; -+ *.bz2) bunzip2 "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.bz2$//'`;; -+ *.xz|*.lzma) unxz "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; -+ *) b="$f";; - esac - -- $COMPRESS $b /dev/null || { -+ $COMPRESS "$b" /dev/null || { - inode=`ls -i $b | awk '{ print $1 }'` - others=`find $d -type f -inum $inode` - if [ -n "$others" ]; then - for afile in $others ; do -- [ "$afile" != "$b" ] && rm -f $afile -+ [ "$afile" != "$b" ] && rm -f "$afile" - done -- $COMPRESS -f $b -+ $COMPRESS -f "$b" - for afile in $others ; do -- [ "$afile" != "$b" ] && ln $b$COMPRESS_EXT $afile$COMPRESS_EXT -+ [ "$afile" != "$b" ] && ln "$b$COMPRESS_EXT" "$afile$COMPRESS_EXT" - done - else -- $COMPRESS -f $b -+ $COMPRESS -f "$b" - fi - } - done - -- for f in `find $d -type l` -+ find $d -type l | while read f - do -- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'` -- rm -f $f -- b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'` -- ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT -+ l="`ls -l "$f" | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`" -+ rm -f "$f" -+ b="`echo "$f" | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`" -+ ln -sf "$l$COMPRESS_EXT" "$b$COMPRESS_EXT" - done - done diff --git a/build.diff b/build.diff index 65d851b..b050cfd 100644 --- a/build.diff +++ b/build.diff @@ -1,64 +1,378 @@ Many changes to Makefiles/autogen and the like to make it build on SUSE systems. ---- ./configure.ac.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./configure.ac 2011-05-11 15:18:44.000000000 +0000 -@@ -850,6 +850,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm +Index: Makefile.am +=================================================================== +--- Makefile.am.orig ++++ 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 \ +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 +-[ "`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 ++#[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1 + + myopts= +-if [ X"$@" = X -a "X`uname -s`" = "XDarwin" -a -d /opt/local ]; then ++if [ X"$*" = X -a "X`uname -s`" = "XDarwin" -a -d /opt/local ]; then + export myopts="--prefix=/usr --disable-nls" + export CPPFLAGS="-I${myprefix}/include" + fi +@@ -43,7 +43,8 @@ if [ -d zlib ]; then + (echo "--- zlib"; cd zlib; ./autogen.sh --noconfigure "$@") + fi + if [ -d beecrypt ]; then +- (echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@") ++ #(echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@") ++ (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 + if [ -d neon ]; then + (echo "--- neon"; cd neon; ./autogen.sh "$@") + fi ++(echo "--- db"; cd db/dist; libtoolize --copy --force ; cp /usr/share/aclocal/libtool.m4 aclocal/libtool.ac ; ./s_config ) + + echo "--- rpm" + $libtoolize --copy --force +@@ -66,7 +68,7 @@ if [ "$1" = "--noconfigure" ]; then + exit 0; + fi + +-if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then ++if [ X"$*" = X -a "X`uname -s`" = "XLinux" ]; then + if [ -d /usr/share/man ]; then + mandir=/usr/share/man + infodir=/usr/share/info +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 + noinst_HEADERS = buildio.h + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) ++LDFLAGS = + + usrlibdir = $(libdir)@MARK64@ + usrlib_LTLIBRARIES = librpmbuild.la +Index: configure.ac +=================================================================== +--- configure.ac.orig ++++ 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,74 @@ 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.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 +1279,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 ;; - sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;; - sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;; *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; -@@ -860,6 +861,7 @@ esac + esac + case "${build_os_noversion}" in +@@ -1290,7 +1287,7 @@ mint) RPMCANONARCH=m68kmint ;; + esac RPMCANONVENDOR="$build_vendor" case "${build_vendor}" in - unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) -+ RPMCANONVENDOR=suse +-unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos) ++unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) test -f /etc/redhat-release && RPMCANONVENDOR=redhat - test -f /etc/SuSE-release && RPMCANONVENDOR=suse test -f /etc/pld-release && RPMCANONVENDOR=pld -@@ -872,6 +874,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec + test -f /etc/mandrake-release && RPMCANONVENDOR=mandrake +@@ -1298,6 +1295,7 @@ unknown|pc|ibm|redhat|pld|mandrake|conec + test -f /etc/lvr-release && RPMCANONVENDOR=lvr + test -f /etc/yellowdog-release && RPMCANONVENDOR=yellowdog + test -f /etc/caos-release && RPMCANONVENDOR=caos ++ test -f /etc/SuSE-release -o -f /.buildenv && RPMCANONVENDOR=suse + ;; esac - RPMCANONOS="$host_os_noversion" - RPMCANONGNU="$host_os_gnu" -+if test "$RPMCANONVENDOR" = suse ; then -+ RPMCANONCOLOR=0 -+fi - AC_SUBST(RPMCANONCOLOR) - AC_SUBST(RPMCANONARCH) - AC_SUBST(RPMCANONVENDOR) ---- ./db3/configure.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./db3/configure 2011-05-11 15:18:44.000000000 +0000 + RPMCANONOS="$build_os_noversion" +@@ -1372,7 +1370,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 +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% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`" + ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's%--cache-file=.*$%%'`" -CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \ -+CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \ - --enable-shared --enable-static \ +- --enable-shared --enable-static --enable-rpc \ - --with-uniquename=_rpmdb --srcdir=$db_dist ++CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \ ++ --enable-shared --enable-static \ + --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS mv Makefile Makefile.orig cat Makefile.orig | sed -e '/^install[:-]/c\ ---- ./installplatform.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./installplatform 2011-05-11 15:18:44.000000000 +0000 -@@ -47,9 +47,9 @@ for SUBST in $SUBSTS ; do - ARCH_INSTALL_POST='%{nil}' - case "${ARCH}-${OS}" in - sparc64*-linux) LIB=lib64 ;; -- s390x-linux) LIB=lib64 ;; -- ppc64-linux|powerpc64-linux) LIB=lib64 ;; -- x86_64-linux|amd64-linux|ia32e-linux) LIB=lib64 ;; -+ s390x-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;; -+ ppc64-linux|powerpc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;; -+ x86_64-linux|amd64-linux|ia32e-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;; - *) LIB=lib;; +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: + + noinst_PROGRAMS = file + file_SOURCES = file.c +-file_LDFLAGS = -L../../zlib # -all-static ++file_LDFLAGS = # -L../../zlib # -all-static + file_LDADD = libmagic.la + + listobjs: +Index: installplatform +=================================================================== +--- installplatform.orig ++++ installplatform +@@ -62,11 +62,11 @@ for SUBST in $SUBSTS ; do + sparcv9-linux) MULTILIBNO=1 ;; + sparc64-linux) ARCH_INSTALL_POST=${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 ;; +- 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 -@@ -129,6 +129,9 @@ for SUBST in $SUBSTS ; do + if [ -n "$MULTILIBNO" ]; then +@@ -96,6 +96,9 @@ for SUBST in $SUBSTS ; do apple) VENDORSED='-e s,^@apple@,,' ;; @@ -67,4 +381,194 @@ on SUSE systems. + ;; esac - CANONARCH="`echo $ARCH|sed -e "$canonarch_sed"`" + cat $PLATFORM \ +Index: lib/Makefile.am +=================================================================== +--- lib/Makefile.am.orig ++++ lib/Makefile.am +@@ -29,7 +29,7 @@ noinst_HEADERS = \ + mylibs = librpm.la + LIBS = + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) ++LDFLAGS = + + usrlibdir = $(libdir)@MARK64@ + usrlib_LTLIBRARIES = librpm.la +Index: po/Makefile.in +=================================================================== +--- po/Makefile.in.orig ++++ 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 +Index: po/Makefile.in.in +=================================================================== +--- po/Makefile.in.in.orig ++++ 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@ +Index: popt/autogen.sh +=================================================================== +--- popt/autogen.sh.orig ++++ popt/autogen.sh +@@ -28,7 +28,7 @@ fi + + cd "$THEDIR" + +-if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then ++if [ X"$*" = X -a "X`uname -s`" = "XLinux" ]; then + $srcdir/configure --prefix=/usr "$@" + else + $srcdir/configure "$@" +Index: popt/configure.ac +=================================================================== +--- popt/configure.ac.orig ++++ 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 + +Index: popt/po/Makefile.in +=================================================================== +--- popt/po/Makefile.in.orig ++++ 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 +Index: popt/po/Makefile.in.in +=================================================================== +--- popt/po/Makefile.in.in.orig ++++ 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@ +Index: rpmdb/Makefile.am +=================================================================== +--- rpmdb/Makefile.am.orig ++++ rpmdb/Makefile.am +@@ -31,7 +31,7 @@ noinst_HEADERS = fprint.h header_interna + pkgbindir = @RPMCONFIGDIR@ + pkgbin_PROGRAMS = \ + rpmdb_archive rpmdb_checkpoint rpmdb_deadlock rpmdb_dump rpmdb_load \ +- rpmdb_printlog rpmdb_recover rpmdb_svc rpmdb_stat rpmdb_upgrade \ ++ rpmdb_printlog rpmdb_recover rpmdb_stat rpmdb_upgrade \ + rpmdb_verify + + mylibs = librpmdb.la +@@ -42,7 +42,7 @@ LIBS = + libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la + + # XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) ++LDFLAGS = + + usrlibdir = $(libdir)@MARK64@ + usrlib_LTLIBRARIES = librpmdb.la +Index: rpmio/Makefile.am +=================================================================== +--- rpmio/Makefile.am.orig ++++ rpmio/Makefile.am +@@ -24,9 +24,9 @@ pkginc_HEADERS = \ + rpmsq.h rpmsw.h ugid.h + noinst_HEADERS = rpmio_internal.h rpmlua.h rpmhook.h + +-BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs) ++BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/listobjs) + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) ++LDFLAGS = + + usrlibdir = $(libdir)@MARK64@ + usrlib_LTLIBRARIES = librpmio.la +@@ -41,14 +41,14 @@ librpmio_la_LDFLAGS = -release 4.4 $(LDF + @WITH_MAGIC_LIB@ \ + @WITH_ZLIB_LIB@ \ + -lpthread +-librpmio_la_LIBADD = # $(BEECRYPTLOBJS) +-librpmio_la_DEPENDENCIES = # .created ++librpmio_la_LIBADD = $(BEECRYPTLOBJS) ++librpmio_la_DEPENDENCIES = .created + + .created: + if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \ + ${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \ + for lo in $(BEECRYPTLOBJS); do \ +- [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \ ++ [ -f $$lo ] || sed -e "s!'!'$(top_builddir)/beecrypt/!" < $(top_builddir)/beecrypt/$$lo > $$lo ; \ + done \ + fi + touch $@ +Index: scripts/Makefile.am +=================================================================== +--- scripts/Makefile.am.orig ++++ scripts/Makefile.am +@@ -6,6 +6,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 \ + 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 = \ + 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-* \ ++ find-provides.ksyms find-requires.ksyms + + installprefix = $(DESTDIR) + +@@ -28,6 +30,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 \ + 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 = \ + 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 diff --git a/buildidprov.diff b/buildidprov.diff deleted file mode 100644 index fd5b417..0000000 --- a/buildidprov.diff +++ /dev/null @@ -1,62 +0,0 @@ -From: Jan Blunck -Subject: Let debuginfo packages provide the build-id - -This patch lets debuginfo packages provide build-id like follows: - - debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517 - -Users can therefore ask zypper to install the correct debuginfo package with: - - zypper install -C "debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517" - ---- ./autodeps/linux.prov.orig 2011-05-11 15:58:28.000000000 +0000 -+++ ./autodeps/linux.prov 2011-05-11 15:59:31.000000000 +0000 -@@ -5,6 +5,9 @@ - IFS=$'\n' - filelist=($(cat)) - -+debuginfolist=($(printf "%s\n" "${filelist[@]}" | grep "/usr/lib/debug/")) -+filelist=($(printf "%s\n" "${filelist[@]}" | grep -v "/usr/lib/debug/")) -+ - solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \ - tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \ - cut -d: -f1)) -@@ -71,6 +74,11 @@ done | sort -u - printf "%s\n" "${firmwarelist[@]}" | /usr/lib/rpm/firmware.prov | sort -u - - # -+# --- debuginfo files -+[ -x /usr/lib/rpm/debuginfo.prov -a -n "$debuginfolist" ] && -+ printf "%s\n" "${debuginfolist[@]}" | /usr/lib/rpm/debuginfo.prov | sort -u -+ -+# - # --- Mono exes/dlls - : ${MONO_PREFIX=/usr} - if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then ---- ./macros.in.orig 2011-05-11 15:59:08.000000000 +0000 -+++ ./macros.in 2011-05-11 15:59:31.000000000 +0000 -@@ -182,7 +182,8 @@ - %package debuginfo\ - Summary: Debug information for package %{name}\ - Group: Development/Debug\ --AutoReqProv: 0\ -+AutoReq: 0\ -+AutoProv: 1\ - #Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ - %description debuginfo\ - This package provides debug information for package %{name}.\ ---- ./scripts/debuginfo.prov.orig 2011-05-11 15:59:31.000000000 +0000 -+++ ./scripts/debuginfo.prov 2011-05-11 15:59:31.000000000 +0000 -@@ -0,0 +1,12 @@ -+#!/bin/sh -+ -+while read instfile ; do -+ case $instfile in -+ */usr/lib/debug/.build-id/*.debug) -+ if [ -f "$instfile" ] ; then -+ BUILDID=$(echo $instfile | sed -ne 's|.*/usr/lib/debug/.build-id/\([0-9a-f]*\)/\([0-9a-f]*\)\.debug|\1\2|p') -+ echo "debuginfo(build-id) = $BUILDID" -+ fi -+ ;; -+ esac -+done diff --git a/buildpipe.diff b/buildpipe.diff deleted file mode 100644 index 81099ed..0000000 --- a/buildpipe.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- build/rpmfc.c.orig 2011-06-06 11:27:32.000000000 +0000 -+++ build/rpmfc.c 2011-06-08 10:00:38.000000000 +0000 -@@ -165,12 +165,14 @@ static int sigpipe_init(void) - fcntl(_sigpipe[1], F_SETFD, (fcntl(_sigpipe[1], F_GETFD)|FD_CLOEXEC)); - /* XXX SIGPIPE too, but NSPR disables it already, dont mess with it */ - signal(SIGCHLD, sigpipe_handler); -+ signal(SIGPIPE, SIG_IGN); - return _sigpipe[0]; - } - - static void sigpipe_finish(void) - { - signal(SIGCHLD, SIG_DFL); -+ signal(SIGPIPE, SIG_DFL); - close(_sigpipe[0]); - close(_sigpipe[1]); - _sigpipe[0] = -1; -@@ -298,10 +300,9 @@ static StringBuf getOutputFrom(ARGV_t ar - appendStringBuf(readBuff, buf); - } - -- /* Child exited, we're done */ -+ /* Child exited, we're maybe done */ - if (FD_ISSET(sigpipe, &ibits)) { - while (read(sigpipe, buf, sizeof(buf)) > 0) {}; -- break; - } - } - diff --git a/buildsubdir.diff b/buildsubdir.diff new file mode 100644 index 0000000..fc7923b --- /dev/null +++ b/buildsubdir.diff @@ -0,0 +1,24 @@ +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 7a467db..48821b9 100644 --- a/checkfilesnoinfodir.diff +++ b/checkfilesnoinfodir.diff @@ -1,17 +1,15 @@ Exclude /usr/share/info/dir from check-files. Probably only interesting for SUSE. -Index: scripts/check-files -=================================================================== ---- scripts/check-files.orig -+++ scripts/check-files -@@ -22,7 +22,9 @@ LC_ALL=C sort > $FILES_RPM +--- ./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 - diff -d "$FILES_DISK" "$FILES_RPM" | grep "^< " | cut -c3- | - while read f; do + for f in `diff -d "$FILES_DISK" "$FILES_RPM" | grep "^< " | cut -c3-`; 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 fccaa1a..c435432 100644 --- a/chownwarn.diff +++ b/chownwarn.diff @@ -1,50 +1,26 @@ -Do not abort if chown/chmod fails but the file is already correct +Warn the user if chown/fchown fails. ---- ./lib/fsm.c.orig 2011-03-02 06:46:13.000000000 +0000 -+++ ./lib/fsm.c 2011-05-10 16:30:55.000000000 +0000 -@@ -1449,6 +1449,11 @@ static int fsmRename(FSM_t fsm) - static int fsmChown(FSM_t fsm) - { - int rc = chown(fsm->path, fsm->sb.st_uid, fsm->sb.st_gid); -+ if (rc < 0) { -+ struct stat st; -+ if (lstat(fsm->path, &st) == 0 && st.st_uid == fsm->sb.st_uid && st.st_gid == fsm->sb.st_gid) +--- ./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 + break; + case FSM_CHOWN: + rc = chown(fsm->path, st->st_uid, st->st_gid); ++ if (rc < 0 && errno == EPERM) { ++ rpmMessage(RPMMESS_WARNING, "can't chown %s (%s)\n", fsm->path, strerror(errno)); + rc = 0; -+ } - if (_fsm_debug && (FSM_CHOWN & FSM_SYSCALL)) - rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", fileStageString(FSM_CHOWN), - fsm->path, (int)fsm->sb.st_uid, (int)fsm->sb.st_gid, -@@ -1461,6 +1466,11 @@ static int fsmLChown(FSM_t fsm) - { - int rc = 0; - rc = lchown(fsm->path, fsm->sb.st_uid, fsm->sb.st_gid); -+ if (rc < 0) { -+ struct stat st; -+ if (lstat(fsm->path, &st) == 0 && st.st_uid == fsm->sb.st_uid && st.st_gid == fsm->sb.st_gid) ++ } + 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 + case FSM_LCHOWN: + #if ! CHOWN_FOLLOWS_SYMLINK + rc = lchown(fsm->path, st->st_uid, st->st_gid); ++ if (rc < 0 && errno == EPERM) { ++ rpmMessage(RPMMESS_WARNING, "can't lchown %s (%s)\n", fsm->path, strerror(errno)); + rc = 0; -+ } - if (_fsm_debug && (FSM_LCHOWN & FSM_SYSCALL)) - rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", fileStageString(FSM_LCHOWN), - fsm->path, (int)fsm->sb.st_uid, (int)fsm->sb.st_gid, -@@ -1472,6 +1482,11 @@ static int fsmLChown(FSM_t fsm) - static int fsmChmod(FSM_t fsm) - { - int rc = chmod(fsm->path, (fsm->sb.st_mode & 07777)); -+ if (rc < 0) { -+ struct stat st; -+ if (lstat(fsm->path, &st) == 0 && (st.st_mode & 07777) == (fsm->sb.st_mode & 07777)) -+ rc = 0; -+ } - if (_fsm_debug && (FSM_CHMOD & FSM_SYSCALL)) - rpmlog(RPMLOG_DEBUG, " %8s (%s, 0%04o) %s\n", fileStageString(FSM_CHMOD), - fsm->path, (unsigned)(fsm->sb.st_mode & 07777), -@@ -2033,6 +2048,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS - st->st_mtime = rpmfiFMtimeIndex(fi, fsm->ix); - rc = fsmUtime(fsm); - st->st_mtime = mtime; -+ /* utime error is not critical for directories */ -+ if (rc && S_ISDIR(st->st_mode)) -+ rc = 0; - } - #if WITH_CAP - if (!rc && !S_ISDIR(st->st_mode) && !getuid()) { ++ } + 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, diff --git a/compress.diff b/compress.diff new file mode 100644 index 0000000..82295f3 --- /dev/null +++ b/compress.diff @@ -0,0 +1,31 @@ +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 1b9e796..52caaf5 100644 --- a/convertdb1static.diff +++ b/convertdb1static.diff @@ -1,369 +1,35 @@ -Build convertdb1, too. +Build convertdb1 as static binary so that it always works. ---- ./Makefile.am.orig 2011-05-11 15:15:27.000000000 +0000 -+++ ./Makefile.am 2011-05-11 15:18:21.000000000 +0000 -@@ -174,6 +174,10 @@ bin_PROGRAMS += rpmqpack - rpmqpack_SOURCES = rpmqpack.c - rpmqpack_LDADD = lib/librpm.la +diff -ur ./tools/Makefile.am ../rpm-4.4.2.orig/tools/Makefile.am +--- ./tools/Makefile.am 2006-09-21 19:35:56.000000000 +0200 ++++ ../rpm-4.4.2.orig/tools/Makefile.am 2006-09-21 20:59:01.000000000 +0200 +@@ -18,22 +18,26 @@ -+bin_PROGRAMS += convertdb1 -+convertdb1_SOURCES = tools/convertdb1.c -+convertdb1_LDADD = lib/librpm.la -+ - rpmconfig_DATA = rpmrc - rpmrc: $(top_srcdir)/rpmrc.in - @$(SED) \ ---- tools/convertdb1.c.orig 2011-05-12 13:31:37.000000000 +0000 -+++ tools/convertdb1.c 2011-05-12 13:31:28.000000000 +0000 -@@ -0,0 +1,351 @@ -+#if defined(HAVE_CONFIG_H) -+#include "system.h" -+const char *__progname; -+#else -+#include -+#include -+#include -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+ -+#define FA_MAGIC 0x02050920 -+ -+struct faFileHeader{ -+ unsigned int magic; -+ unsigned int firstFree; -+}; -+ -+struct faHeader { -+ unsigned int size; -+ unsigned int freeNext; /* offset of the next free block, 0 if none */ -+ unsigned int freePrev; -+ unsigned int isFree; -+ -+ /* note that the u16's appear last for alignment/space reasons */ -+}; -+ -+ -+static int fadFileSize; -+ -+static ssize_t Pread(FD_t fd, void * buf, size_t count, off_t offset) { -+ if (Fseek(fd, offset, SEEK_SET) < 0) -+ return -1; -+ return Fread(buf, sizeof(char), count, fd); -+} -+ -+static FD_t fadOpen(const char * path) -+{ -+ struct faFileHeader newHdr; -+ FD_t fd; -+ struct stat stb; -+ -+ fd = Fopen(path, "r.fdio"); -+ if (!fd || Ferror(fd)) -+ return NULL; -+ -+ if (fstat(Fileno(fd), &stb)) { -+ Fclose(fd); -+ return NULL; -+ } -+ fadFileSize = stb.st_size; -+ -+ /* is this file brand new? */ -+ if (fadFileSize == 0) { -+ Fclose(fd); -+ return NULL; -+ } -+ if (Pread(fd, &newHdr, sizeof(newHdr), 0) != sizeof(newHdr)) { -+ Fclose(fd); -+ return NULL; -+ } -+ if (newHdr.magic != FA_MAGIC) { -+ Fclose(fd); -+ return NULL; -+ } -+ /*@-refcounttrans@*/ return fd /*@=refcounttrans@*/ ; -+} -+ -+static int fadNextOffset(FD_t fd, unsigned int lastOffset) -+{ -+ struct faHeader header; -+ int offset; -+ -+ offset = (lastOffset) -+ ? (lastOffset - sizeof(header)) -+ : sizeof(struct faFileHeader); -+ -+ if (offset >= fadFileSize) -+ return 0; -+ -+ if (Pread(fd, &header, sizeof(header), offset) != sizeof(header)) -+ return 0; -+ -+ if (!lastOffset && !header.isFree) -+ return (offset + sizeof(header)); -+ -+ do { -+ offset += header.size; -+ -+ if (Pread(fd, &header, sizeof(header), offset) != sizeof(header)) -+ return 0; -+ -+ if (!header.isFree) break; -+ } while (offset < fadFileSize && header.isFree); -+ -+ if (offset < fadFileSize) { -+ /* Sanity check this to make sure we're not going in loops */ -+ offset += sizeof(header); -+ -+ if (offset <= lastOffset) return -1; -+ -+ return offset; -+ } else -+ return 0; -+} -+ -+static int fadFirstOffset(FD_t fd) -+{ -+ return fadNextOffset(fd, 0); -+} -+ -+/*@-boundsread@*/ -+static int dncmp(const void * a, const void * b) -+ /*@*/ -+{ -+ const char *const * first = a; -+ const char *const * second = b; -+ return strcmp(*first, *second); -+} -+/*@=boundsread@*/ -+ -+static void compressFilelist(Header h) -+{ -+ struct rpmtd_s fileNames; -+ char ** dirNames; -+ const char ** baseNames; -+ uint32_t * dirIndexes; -+ rpm_count_t count; -+ int xx, i; -+ int dirIndex = -1; -+ -+ /* -+ * This assumes the file list is already sorted, and begins with a -+ * single '/'. That assumption isn't critical, but it makes things go -+ * a bit faster. -+ */ -+ -+ if (headerIsEntry(h, RPMTAG_DIRNAMES)) { -+ xx = headerDel(h, RPMTAG_OLDFILENAMES); -+ return; /* Already converted. */ -+ } -+ -+ if (!headerGet(h, RPMTAG_OLDFILENAMES, &fileNames, HEADERGET_MINMEM)) -+ return; -+ count = rpmtdCount(&fileNames); -+ if (count < 1) -+ return; -+ -+ dirNames = xmalloc(sizeof(*dirNames) * count); /* worst case */ -+ baseNames = xmalloc(sizeof(*dirNames) * count); -+ dirIndexes = xmalloc(sizeof(*dirIndexes) * count); -+ -+ /* HACK. Source RPM, so just do things differently */ -+ { const char *fn = rpmtdGetString(&fileNames); -+ if (fn && *fn != '/') { -+ dirIndex = 0; -+ dirNames[dirIndex] = xstrdup(""); -+ while ((i = rpmtdNext(&fileNames)) >= 0) { -+ dirIndexes[i] = dirIndex; -+ baseNames[i] = rpmtdGetString(&fileNames); -+ } -+ goto exit; -+ } -+ } -+ -+ while ((i = rpmtdNext(&fileNames)) >= 0) { -+ char ** needle; -+ char savechar; -+ char * baseName; -+ size_t len; -+ const char *filename = rpmtdGetString(&fileNames); -+ -+ if (filename == NULL) /* XXX can't happen */ -+ continue; -+ baseName = strrchr(filename, '/') + 1; -+ len = baseName - filename; -+ needle = dirNames; -+ savechar = *baseName; -+ *baseName = '\0'; -+ if (dirIndex < 0 || -+ (needle = bsearch(&filename, dirNames, dirIndex + 1, sizeof(dirNames[0]), dncmp)) == NULL) { -+ char *s = xmalloc(len + 1); -+ rstrlcpy(s, filename, len + 1); -+ dirIndexes[i] = ++dirIndex; -+ dirNames[dirIndex] = s; -+ } else -+ dirIndexes[i] = needle - dirNames; -+ -+ *baseName = savechar; -+ baseNames[i] = baseName; -+ } -+ -+exit: -+ if (count > 0) { -+ headerPutUint32(h, RPMTAG_DIRINDEXES, dirIndexes, count); -+ headerPutStringArray(h, RPMTAG_BASENAMES, baseNames, count); -+ headerPutStringArray(h, RPMTAG_DIRNAMES, -+ (const char **) dirNames, dirIndex + 1); -+ } -+ -+ rpmtdFreeData(&fileNames); -+ for (i = 0; i <= dirIndex; i++) { -+ free(dirNames[i]); -+ } -+ free(dirNames); -+ free(baseNames); -+ free(dirIndexes); -+ -+ xx = headerDel(h, RPMTAG_OLDFILENAMES); -+} -+ -+/* -+ * Up to rpm 3.0.4, packages implicitly provided their own name-version-release. -+ * Retrofit an explicit "Provides: name = epoch:version-release. -+ */ -+static void providePackageNVR(Header h) -+{ -+ const char *name; -+ char *pEVR; -+ rpmsenseFlags pFlags = RPMSENSE_EQUAL; -+ int bingo = 1; -+ struct rpmtd_s pnames; -+ rpmds hds, nvrds; -+ -+ /* Generate provides for this package name-version-release. */ -+ pEVR = headerGetEVR(h, &name); -+ if (!(name && pEVR)) -+ return; -+ -+ /* -+ * Rpm prior to 3.0.3 does not have versioned provides. -+ * If no provides at all are available, we can just add. -+ */ -+ if (!headerGet(h, RPMTAG_PROVIDENAME, &pnames, HEADERGET_MINMEM)) { -+ goto exit; -+ } -+ -+ /* -+ * Otherwise, fill in entries on legacy packages. -+ */ -+ if (!headerIsEntry(h, RPMTAG_PROVIDEVERSION)) { -+ while (rpmtdNext(&pnames) >= 0) { -+ rpmsenseFlags fdummy = RPMSENSE_ANY; -+ -+ headerPutString(h, RPMTAG_PROVIDEVERSION, ""); -+ headerPutUint32(h, RPMTAG_PROVIDEFLAGS, &fdummy, 1); -+ } -+ goto exit; -+ } -+ -+ /* see if we already have this provide */ -+ hds = rpmdsNew(h, RPMTAG_PROVIDENAME, 0); -+ nvrds = rpmdsSingle(RPMTAG_PROVIDENAME, name, pEVR, pFlags); -+ if (rpmdsFind(hds, nvrds) >= 0) { -+ bingo = 0; -+ } -+ rpmdsFree(hds); -+ rpmdsFree(nvrds); -+ -+exit: -+ if (bingo) { -+ const char *evr = pEVR; -+ headerPutString(h, RPMTAG_PROVIDENAME, name); -+ headerPutString(h, RPMTAG_PROVIDEVERSION, evr); -+ headerPutUint32(h, RPMTAG_PROVIDEFLAGS, &pFlags, 1); -+ } -+ rpmtdFreeData(&pnames); -+ free(pEVR); -+} -+/*@=bounds@*/ -+ -+static rpmdb db; -+ -+int -+main(int argc, char ** argv) -+{ -+ FD_t fd; -+ int offset; -+ Header h; -+ const char *name; -+ const char *version; -+ const char *release; -+ rpmts ts; -+ -+ if (argc != 2) -+ { -+ fprintf(stderr, "usage: %s \n", argv[0]); -+ exit(1); -+ } -+ if ((fd = fadOpen(argv[1])) == 0) -+ { -+ fprintf(stderr, "could not open %s\n", argv[1]); -+ exit(1); -+ } -+ rpmInitMacros(NULL, "/usr/lib/rpm/macros"); -+ -+ /* speed things up */ -+ (void) rpmDefineMacro(NULL, "_rpmdb_rebuild %{nil}", -1); -+ -+ ts = rpmtsCreate(); -+ -+ if (rpmtsOpenDB(ts, O_RDWR)) { -+ fprintf(stderr, "could not open rpm database\n"); -+ exit(1); -+ } -+ -+ for (offset = fadFirstOffset(fd); offset; offset = fadNextOffset(fd, offset)) -+ { -+ rpmdbMatchIterator mi; -+ -+ /* have to use lseek instead of Fseek because headerRead -+ * uses low level IO -+ */ -+ if (lseek(Fileno(fd), (off_t)offset, SEEK_SET) == -1) -+ { -+ perror("lseek"); -+ continue; -+ } -+ h = headerRead(fd, HEADER_MAGIC_NO); -+ if (!h) -+ continue; -+ compressFilelist(h); -+ providePackageNVR(h); -+ headerNVR(h, &name, &version, &release); -+ mi = rpmdbInitIterator(db, RPMTAG_NAME, name, 0); -+ rpmdbSetIteratorRE(mi, RPMTAG_VERSION, RPMMIRE_DEFAULT, version); -+ rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_DEFAULT, release); -+ if (rpmdbNextIterator(mi)) -+ { -+ printf("%s-%s-%s is already in database\n", name, version, release); -+ rpmdbFreeIterator(mi); -+ headerFree(h); -+ continue; -+ } -+ rpmdbFreeIterator(mi); -+ if (rpmtsHeaderAddDB(ts, h)) -+ { -+ fprintf(stderr, "could not add %s-%s-%s!\n", name, version, release); -+ } -+ headerFree(h); -+ } -+ Fclose(fd); -+ rpmtsCloseDB(ts); -+ rpmtsFree(ts); -+ return 0; -+} -+ + EXTRA_DIST = rpminject.c rpmsort.c rpmxml.c rpmxp.c rpmxp.h hashtab.h + +-EXTRA_PROGRAMS = debugedit convertdb1 rpminject rpmsort rpmtool rpmxml ++EXTRA_PROGRAMS = rpminject rpmsort rpmtool rpmxml + + LDADD = \ + $(top_builddir)/lib/librpm.la + +-staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@ ++staticLDFLAGS = @LDFLAGS_STATIC@ # @LDFLAGS_NPTL@ + + noinst_PROGRAMS = dumpdb + + pkgbindir = @RPMCONFIGDIR@ +-pkgbin_PROGRAMS = @WITH_LIBDWARF_DEBUGEDIT@ javadeps rpmcache rpmdeps rpmfile ++pkgbin_PROGRAMS = debugedit javadeps rpmcache rpmdeps rpmfile convertdb1 + MAGIC = $(pkgbindir)/magic + + bin_PROGRAMS = rpmgraph + + convertdb1_SOURCES = convertdb1.c ++convertdb1_LDFLAGS = $(staticLDFLAGS) ++convertdb1_LDADD = \ ++ $(top_builddir)/lib/librpm.la \ ++ @WITH_LIBELF_LIB@ + + debugedit_SOURCES = debugedit.c hashtab.c + debugedit_LDADD = @LDFLAGS_STATIC@ \ diff --git a/db-4.8.30.tar.bz2 b/db-4.8.30.tar.bz2 deleted file mode 100644 index b0fa0be..0000000 --- a/db-4.8.30.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2ba998b7451758928011878514c78b8a6f0fbfd49ebf5cc9f4269f4666414ab4 -size 19969243 diff --git a/db.diff b/db.diff index 0d389f0..121ae44 100644 --- a/db.diff +++ b/db.diff @@ -1,82 +1,111 @@ ---- db/db/db.c.orig 2010-04-12 20:25:22.000000000 +0000 -+++ db/db/db.c 2011-05-12 11:38:59.000000000 +0000 -@@ -646,6 +646,8 @@ __env_mpool(dbp, fname, flags) - MAKE_INMEM(dbp); +--- db/db/db.c.orig 2004-11-11 15:58:46.000000000 +0000 ++++ db/db/db.c 2005-12-15 16:17:45.000000000 +0000 +@@ -591,6 +591,8 @@ __db_dbenv_mpool(dbp, fname, flags) + (F_ISSET(dbp, DB_AM_NOT_DURABLE) ? DB_TXN_NOT_DURABLE : 0), + 0, dbp->pgsize)) != 0) return (ret); - } + if (LF_ISSET(DB_NOFSYNC) && mpf->mfp) + F_SET(mpf->mfp, MP_NOFSYNC); - /* - * Set the open flag. We use it to mean that the dbp has gone ---- db/db/db_iface.c.orig 2010-04-12 20:25:22.000000000 +0000 -+++ db/db/db_iface.c 2011-05-12 11:21:32.000000000 +0000 -@@ -1230,6 +1230,7 @@ __db_open_arg(dbp, txn, fname, dname, ty + return (0); + } +--- db/db/db_iface.c.orig 2004-10-16 01:31:54.000000000 +0000 ++++ db/db/db_iface.c 2005-12-15 16:17:45.000000000 +0000 +@@ -1068,7 +1068,7 @@ __db_open_arg(dbp, txn, fname, dname, ty #define OKFLAGS \ - (DB_AUTO_COMMIT | DB_CREATE | DB_EXCL | DB_FCNTL_LOCKING | \ - DB_MULTIVERSION | DB_NOMMAP | DB_NO_AUTO_COMMIT | DB_RDONLY | \ -+ DB_NOFSYNC | \ - DB_RDWRMASTER | DB_READ_UNCOMMITTED | DB_THREAD | DB_TRUNCATE) - if ((ret = __db_fchk(env, "DB->open", flags, OKFLAGS)) != 0) + (DB_AUTO_COMMIT | DB_CREATE | DB_DIRTY_READ | DB_EXCL | \ + DB_FCNTL_LOCKING | DB_NO_AUTO_COMMIT | DB_NOMMAP | DB_RDONLY | \ +- DB_RDWRMASTER | DB_THREAD | DB_TRUNCATE | DB_WRITEOPEN) ++ DB_RDWRMASTER | DB_THREAD | DB_TRUNCATE | DB_WRITEOPEN | DB_NOFSYNC) + if ((ret = __db_fchk(dbenv, "DB->open", flags, OKFLAGS)) != 0) return (ret); ---- db/dbinc/mp.h.orig 2010-04-12 20:25:22.000000000 +0000 -+++ db/dbinc/mp.h 2011-05-12 12:01:32.000000000 +0000 -@@ -467,6 +467,7 @@ struct __mpoolfile { + if (LF_ISSET(DB_EXCL) && !LF_ISSET(DB_CREATE)) +--- db/dbinc/db.in.orig 2004-10-16 01:31:54.000000000 +0000 ++++ db/dbinc/db.in 2005-12-15 16:17:45.000000000 +0000 +@@ -260,6 +260,7 @@ struct __db_dbt { + #define DB_FCNTL_LOCKING 0x0002000 /* UNDOC: fcntl(2) locking. */ + #define DB_RDWRMASTER 0x0004000 /* UNDOC: allow subdb master open R/W */ + #define DB_WRITEOPEN 0x0008000 /* UNDOC: open with write lock. */ ++#define DB_NOFSYNC 0x0010000 /* UNDOC: don't fsync */ + + /* + * Flags private to DB_ENV->txn_begin. +--- db/dbinc/mp.h.orig 2004-10-16 01:31:54.000000000 +0000 ++++ db/dbinc/mp.h 2005-12-15 16:25:56.000000000 +0000 +@@ -309,6 +309,7 @@ struct __mpoolfile { #define MP_FAKE_UOC 0x080 /* Unlink_on_close field: fake flag. */ #define MP_NOT_DURABLE 0x100 /* File is not durable. */ #define MP_TEMP 0x200 /* Backing file is a temporary. */ -+#define MP_NOFSYNC 0x400 /* Don't fsync */ ++#define MP_NOFSYNC 0x400 /* Don't fsync */ u_int32_t flags; }; ---- db/dbinc_auto/api_flags.in.orig 2011-05-12 11:40:57.000000000 +0000 -+++ db/dbinc_auto/api_flags.in 2011-05-12 11:55:10.000000000 +0000 -@@ -83,6 +83,7 @@ - #define DB_NOORDERCHK 0x00000002 - #define DB_NOPANIC 0x00000800 - #define DB_NO_AUTO_COMMIT 0x00001000 -+#define DB_NOFSYNC 0x00040000 - #define DB_ODDFILESIZE 0x00000080 - #define DB_ORDERCHKONLY 0x00000004 - #define DB_OVERWRITE 0x00001000 ---- db/dist/s_config.orig 2010-04-12 20:25:23.000000000 +0000 -+++ db/dist/s_config 2011-05-12 12:00:34.000000000 +0000 -@@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3 - . ./RELEASE - - echo "autoconf: building aclocal.m4..." --cat aclocal/*.m4 aclocal_java/*.m4 > aclocal.m4 -+cat aclocal/*.m4 aclocal_java/*.m4 > acinclude.m4 -+aclocal - - echo "autoconf: running autoheader to build config.hin..." - rm -f config.hin ---- db/mp/mp_sync.c.orig 2010-04-12 20:25:34.000000000 +0000 -+++ db/mp/mp_sync.c 2011-05-12 11:36:58.000000000 +0000 -@@ -578,7 +578,7 @@ done: /* - if (ret == 0 && required_write) { +--- db/mp/mp_sync.c.orig 2004-11-11 15:58:48.000000000 +0000 ++++ db/mp/mp_sync.c 2005-12-15 16:23:57.000000000 +0000 +@@ -553,7 +553,7 @@ done: /* + if (ret == 0 && (op == DB_SYNC_CACHE || op == DB_SYNC_FILE)) { if (dbmfp == NULL) - ret = __memp_sync_files(env); + ret = __memp_sync_files(dbenv, dbmp); - else -+ else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC)) - ret = __os_fsync(env, dbmfp->fhp); ++ else if (!dbmfp->mfp || !F_ISSET(dbmfp->mfp, MP_NOFSYNC)) + ret = __os_fsync(dbenv, dbmfp->fhp); } -@@ -665,7 +665,7 @@ __memp_sync_file(env, mfp, argp, countp, - "%s: unable to flush", (char *) - R_ADDR(dbmp->reginfo, mfp->path_off)); - } -- } else -+ } else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC)) - ret = __os_fsync(env, dbmfp->fhp); +@@ -600,7 +600,7 @@ int __memp_sync_files(dbenv, dbmp) + MUTEX_THREAD_LOCK(dbenv, dbmp->mutexp); + for (dbmfp = TAILQ_FIRST(&dbmp->dbmfq); + dbmfp != NULL; dbmfp = TAILQ_NEXT(dbmfp, q)) { +- if (dbmfp->mfp != mfp || F_ISSET(dbmfp, MP_READONLY)) ++ if (dbmfp->mfp != mfp || F_ISSET(dbmfp, MP_READONLY | MP_NOFSYNC)) + continue; + ret = __os_fsync(dbenv, dbmfp->fhp); + break; +@@ -662,6 +662,9 @@ __memp_mf_sync(dbmp, mfp) - /* -@@ -801,6 +801,8 @@ __memp_mf_sync(dbmp, mfp, locked) - COMPQUIET(hp, NULL); - env = dbmp->env; + dbenv = dbmp->dbenv; + if (F_ISSET(mfp, MP_NOFSYNC)) + return 0; ++ /* - * We need to be holding the hash lock: we're using the path name - * and __memp_nameop might try and rename the file. + * Expects caller to be holding the region lock: we're using the path + * name and __memp_nameop might try and rename the file. +--- db/dist/s_config.orig 2003-12-15 21:42:41.000000000 +0000 ++++ db/dist/s_config 2005-02-11 14:44:09.018907747 +0000 +@@ -20,14 +20,15 @@ + autoconf + + # Edit version information we couldn't pre-compute. +-(echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" && +- echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" && +- echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" && +- echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" && +- echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" && +- echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" && +- echo "w" && +- echo "q") | ed configure ++mv configure configure.old ++sed -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \ ++ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \ ++ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \ ++ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \ ++ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ ++ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \ ++< configure.old > configure ++rm -f configure.old + + rm -rf autom4te.cache + chmod 555 configure +--- db/dist/aclocal/options.ac.orig 2005-12-15 16:43:14.000000000 +0000 ++++ db/dist/aclocal/options.ac 2005-12-15 16:43:40.000000000 +0000 +@@ -277,10 +277,6 @@ fi + + # Uniquename excludes C++, Java, RPC. + if test "$db_cv_uniquename" = "yes"; then +- if test "$db_cv_rpc" = "yes"; then +- AC_MSG_ERROR( +- [--with-uniquename is not compatible with --enable-rpc]) +- fi + if test "$db_cv_cxx" = "yes"; then + AC_MSG_ERROR( + [--with-uniquename is not compatible with --enable-cxx]) diff --git a/dbfsync.diff b/dbfsync.diff index a71fb23..00da14c 100644 --- a/dbfsync.diff +++ b/dbfsync.diff @@ -1,24 +1,54 @@ Support a database-local fsync setting. Needs berkeley db patch. ---- ./lib/backend/dbconfig.c.orig 2011-01-03 13:57:41.000000000 +0000 -+++ ./lib/backend/dbconfig.c 2011-05-10 17:00:29.000000000 +0000 -@@ -58,8 +58,10 @@ static const struct poptOption rdbOption - { "mp_size", 0,POPT_ARG_INT, &staticcfg.db_cachesize, 0, - NULL, NULL }, +--- ./rpmdb/db3.c.orig 2005-03-23 18:15:28.000000000 +0000 ++++ ./rpmdb/db3.c 2006-01-27 20:08:29.000000000 +0000 +@@ -211,11 +211,13 @@ static int db_fini(dbiIndex dbi, const c + return rc; + } +#if 0 - { "nofsync", 0,POPT_ARG_NONE, &staticcfg.db_no_fsync, 0, - NULL, NULL }, + static int db3_fsync_disable(/*@unused@*/ int fd) + /*@*/ + { + return 0; + } +#endif - /* Per-dbi options */ - { "nommap", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOMMAP, -@@ -69,6 +71,8 @@ static const struct poptOption rdbOption + #if 0 + #if HAVE_LIBPTHREAD +@@ -414,6 +416,7 @@ static int db_init(dbiIndex dbi, const c + /* dbenv->set_rep_transport(???) */ + /* dbenv->set_rep_limit(???) */ + ++#if 0 + if (dbi->dbi_no_fsync) { + #if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0) || (DB_VERSION_MAJOR == 4) + xx = db_env_set_func_fsync(db3_fsync_disable); +@@ -422,6 +425,7 @@ static int db_init(dbiIndex dbi, const c + #endif + xx = cvtdberr(dbi, "db_env_set_func_fsync", xx, _debug); + } ++#endif + + if (dbi->dbi_shmkey) { + xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey); +--- ./rpmdb/dbconfig.c.orig 2004-10-16 12:50:52.000000000 +0000 ++++ ./rpmdb/dbconfig.c 2005-12-15 13:12:32.000000000 +0000 +@@ -99,6 +99,8 @@ struct poptOption rdbOptions[] = { NULL, NULL }, - { "lockdbfd", 0,POPT_ARG_NONE, &staticdbi.dbi_lockdbfd, 0, + { "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING, NULL, NULL }, -+ { "nofsync", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOFSYNC, ++ { "nofsync", 0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_NOFSYNC, + NULL, NULL }, - POPT_TABLEEND - }; + { "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE, + NULL, NULL }, +@@ -145,8 +147,6 @@ struct poptOption rdbOptions[] = { + NULL, NULL }, + { "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0, + NULL, NULL }, +- { "nofsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_fsync, 0, +- NULL, NULL }, + { "nodbsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_dbsync, 0, + NULL, NULL }, + { "lockdbfd", 0,POPT_ARG_NONE, &db3dbi.dbi_lockdbfd, 0, diff --git a/dbprivate.diff b/dbprivate.diff index 48d3912..28aeda3 100644 --- a/dbprivate.diff +++ b/dbprivate.diff @@ -1,14 +1,14 @@ -Always use DB_PRIVATE. Unfortunately no longer configurable -in the macros file. +Always use DB_PRIVATE. Should probably be configured instead. ---- lib/backend/db3.c.orig 2011-05-12 15:38:18.000000000 +0000 -+++ lib/backend/db3.c 2011-05-12 15:38:41.000000000 +0000 -@@ -119,7 +119,7 @@ static int db_init(rpmdb rdb, const char - int retry_open = 2; - struct _dbConfig * cfg = &rdb->cfg; - /* This is our setup, thou shall not have other setups before us */ -- uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB); -+ uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB|DB_PRIVATE); +--- ./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 + #endif + #endif - if (rdb->db_dbenv != NULL) { - rdb->db_opens++; ++ /* always use fcntl lock */ ++ dbi->dbi_eflags |= DB_PRIVATE; ++ + if (access(dbhome, W_OK) == -1) { + + /* dbhome is unwritable, don't attempt DB_CREATE on DB->open ... */ diff --git a/dbrointerruptable.diff b/dbrointerruptable.diff index 1fb0233..7a59346 100644 --- a/dbrointerruptable.diff +++ b/dbrointerruptable.diff @@ -1,11 +1,11 @@ -Do not block signals if the database is opened read-only, it just +Do not block signals if the database is opened read-only, it jst annoys the users. [#48026] ---- ./lib/rpmdb.c.orig 2011-02-28 09:57:27.000000000 +0000 -+++ ./lib/rpmdb.c 2011-05-10 16:58:21.000000000 +0000 -@@ -623,10 +623,12 @@ int rpmdbClose(rpmdb db) - { +--- ./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) rpmdb * prev, next; + int dbix; int rc = 0; + int dbmode; @@ -13,18 +13,13 @@ annoys the users. [#48026] goto exit; + dbmode = db->db_mode; - (void) rpmdbUnlink(db); + (void) rpmdbUnlink(db, "rpmdbClose"); - if (db->nrefs > 0) -@@ -655,11 +657,13 @@ int rpmdbClose(rpmdb db) - db = _free(db); + /*@-usereleased@*/ +@@ -886,12 +915,14 @@ int rpmdbClose(rpmdb db) + /*@-refcounttrans@*/ db = _free(db); /*@=refcounttrans@*/ + /*@=usereleased@*/ - exit: -- (void) rpmsqEnable(-SIGHUP, NULL); -- (void) rpmsqEnable(-SIGINT, NULL); -- (void) rpmsqEnable(-SIGTERM,NULL); -- (void) rpmsqEnable(-SIGQUIT,NULL); -- (void) rpmsqEnable(-SIGPIPE,NULL); + if ((dbmode & (O_RDWR|O_WRONLY)) != 0) { + (void) rpmsqEnable(-SIGHUP, NULL); + (void) rpmsqEnable(-SIGINT, NULL); @@ -32,25 +27,31 @@ annoys the users. [#48026] + (void) rpmsqEnable(-SIGQUIT,NULL); + (void) rpmsqEnable(-SIGPIPE,NULL); + } + exit: +- (void) rpmsqEnable(-SIGHUP, NULL); +- (void) rpmsqEnable(-SIGINT, NULL); +- (void) rpmsqEnable(-SIGTERM,NULL); +- (void) rpmsqEnable(-SIGQUIT,NULL); +- (void) rpmsqEnable(-SIGPIPE,NULL); return rc; } + /*@=incondefs@*/ +@@ -1021,11 +1070,13 @@ static int openDatabase(/*@null@*/ const + if (db == NULL) + return 1; -@@ -721,11 +725,13 @@ static int openDatabase(const char * pre - /* Try to ensure db home exists, error out if we cant even create */ - rc = rpmioMkpath(rpmdbHome(db), 0755, getuid(), getgid()); - if (rc == 0) { -- (void) rpmsqEnable(SIGHUP, NULL); -- (void) rpmsqEnable(SIGINT, NULL); -- (void) rpmsqEnable(SIGTERM,NULL); -- (void) rpmsqEnable(SIGQUIT,NULL); -- (void) rpmsqEnable(SIGPIPE,NULL); -+ if ((db->db_mode & (O_RDWR|O_WRONLY)) != 0) { -+ (void) rpmsqEnable(SIGHUP, NULL); -+ (void) rpmsqEnable(SIGINT, NULL); -+ (void) rpmsqEnable(SIGTERM,NULL); -+ (void) rpmsqEnable(SIGQUIT,NULL); -+ (void) rpmsqEnable(SIGPIPE,NULL); -+ } +- (void) rpmsqEnable(SIGHUP, NULL); +- (void) rpmsqEnable(SIGINT, NULL); +- (void) rpmsqEnable(SIGTERM,NULL); +- (void) rpmsqEnable(SIGQUIT,NULL); +- (void) rpmsqEnable(SIGPIPE,NULL); ++ if ((db->db_mode & (O_RDWR|O_WRONLY)) != 0) { ++ (void) rpmsqEnable(SIGHUP, NULL); ++ (void) rpmsqEnable(SIGINT, NULL); ++ (void) rpmsqEnable(SIGTERM,NULL); ++ (void) rpmsqEnable(SIGQUIT,NULL); ++ (void) rpmsqEnable(SIGPIPE,NULL); ++ } + + db->db_api = _dbapi; - /* Just the primary Packages database opened here */ - rc = (rpmdbOpenIndex(db, RPMDBI_PACKAGES, db->db_flags) != NULL) ? 0 : -2; diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff deleted file mode 100644 index f2be21b..0000000 --- a/debugedit-canon-fix.diff +++ /dev/null @@ -1,119 +0,0 @@ ---- ./tools/debugedit.c.orig 2011-05-20 11:26:04.000000000 +0000 -+++ ./tools/debugedit.c 2011-05-20 11:27:56.000000000 +0000 -@@ -158,7 +158,7 @@ strptr (DSO *dso, int sec, off_t offset) - { - if (data->d_buf - && offset >= data->d_off -- && offset < data->d_off + data->d_size) -+ && offset < data->d_off + (off_t)data->d_size) - return (const char *) data->d_buf + (offset - data->d_off); - } - } -@@ -496,9 +496,10 @@ static int - edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase) - { - unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir; -- unsigned char **dirt; -+ char **dirt; - unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size; - unsigned char *endcu, *endprol; -+ char line_base; - unsigned char opcode_base; - uint32_t value, dirt_cnt; - size_t comp_dir_len = strlen (comp_dir); -@@ -542,6 +543,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off - return 1; - } - -+ line_base = (char) (ptr[2] & 0xff); - opcode_base = ptr[4]; - ptr = dir = ptr + 4 + opcode_base; - -@@ -553,13 +555,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off - ++value; - } - -- dirt = (unsigned char **) alloca (value * sizeof (unsigned char *)); -+ dirt = (char **) alloca (value * sizeof (unsigned char *)); - dirt[0] = (unsigned char *) "."; - dirt_cnt = 1; - ptr = dir; - while (*ptr != 0) - { -- dirt[dirt_cnt++] = ptr; -+ dirt[dirt_cnt++] = (char *)ptr; - ptr = (unsigned char *) strchr ((char *)ptr, 0) + 1; - } - ptr++; -@@ -672,7 +674,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off - - if (dest_dir) - { -- unsigned char *srcptr, *buf = NULL; -+ char *srcptr, *buf = NULL; - size_t base_len = strlen (base_dir); - size_t dest_len = strlen (dest_dir); - size_t shrank = 0; -@@ -686,11 +688,14 @@ edit_dwarf2_line (DSO *dso, uint32_t off - ptr = dir; - } - else -- ptr = srcptr = dir; -+ { -+ ptr = dir; -+ srcptr = (char *)dir; -+ } - while (*srcptr != 0) - { - size_t len = strlen ((char *)srcptr) + 1; -- const unsigned char *readptr = srcptr; -+ const char *readptr = srcptr; - - char *orig = strdup ((const char *) srcptr); - -@@ -717,10 +722,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off - - if (shrank > 0) - { -- if (--shrank == 0) -+ --shrank; -+#if 0 -+ if (shrank == 0) - error (EXIT_FAILURE, 0, - "canonicalization unexpectedly shrank by one character"); - else -+#endif - { - memset (ptr, 'X', shrank); - ptr += shrank; -@@ -756,21 +764,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off - } - dirty_section (DEBUG_STR); - } -- else if (ptr != srcptr) -+ else if ((char *)ptr != srcptr) - memmove (ptr, srcptr, len); - srcptr += len; - ptr += len; -- dir = srcptr; -+ dir = (unsigned char *)srcptr; - read_uleb128 (srcptr); - read_uleb128 (srcptr); - read_uleb128 (srcptr); - if (ptr != dir) -- memmove (ptr, dir, srcptr - dir); -- ptr += srcptr - dir; -+ memmove (ptr, dir, (unsigned char *)srcptr - dir); -+ ptr += (unsigned char *)srcptr - dir; - } - *ptr = '\0'; - free (buf); - } -+ -+ ptr++; -+ /* fill the rest until the line number program starts with NOP opcode */ -+ memset(ptr, opcode_base - line_base, endprol - ptr); -+ /* don't touch the line number program */ - return 0; - } - diff --git a/debugedit-comp-dir.diff b/debugedit-comp-dir.diff deleted file mode 100644 index 288ed10..0000000 --- a/debugedit-comp-dir.diff +++ /dev/null @@ -1,51 +0,0 @@ -Include compilation directory in source file list if used. - ---- ./tools/debugedit.c.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./tools/debugedit.c 2011-05-11 15:31:31.000000000 +0000 -@@ -503,6 +503,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off - uint32_t value, dirt_cnt; - size_t comp_dir_len = strlen (comp_dir); - size_t abs_file_cnt = 0, abs_dir_cnt = 0; -+ int comp_dir_used = 0; - - if (phase != 0) - return 0; -@@ -611,6 +612,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off - memcpy (p, dirt[value], dir_len); - p[dir_len] = '/'; - memcpy (p + dir_len + 1, file, file_len + 1); -+ comp_dir_used = 1; - } - canonicalize_path (s, s); - if (list_file_fd != -1) -@@ -644,6 +646,30 @@ edit_dwarf2_line (DSO *dso, uint32_t off - } - ++ptr; - -+ if (comp_dir_used && list_file_fd != -1 -+ && (base_dir == NULL || has_prefix (comp_dir, base_dir))) -+ { -+ char *p; -+ size_t size; -+ ssize_t ret; -+ -+ size = comp_dir_len + 1; -+ p = comp_dir; -+ if (base_dir) -+ { -+ p += strlen (base_dir); -+ size -= strlen (base_dir); -+ } -+ while (size > 0) -+ { -+ ret = write (list_file_fd, p, size); -+ if (ret == -1) -+ break; -+ size -= ret; -+ p += ret; -+ } -+ } -+ - if (dest_dir) - { - unsigned char *srcptr, *buf = NULL; diff --git a/debugedit.diff b/debugedit.diff index ad9ec99..5a3bc06 100644 --- a/debugedit.diff +++ b/debugedit.diff @@ -1,26 +1,8 @@ -Make debugedit build without dwarf.h +Make debugedit build without dwarf.h. Also fixes a logic bug for ppc. ---- ./Makefile.am.orig 2010-12-22 11:17:20.000000000 +0000 -+++ ./Makefile.am 2011-05-10 16:03:49.000000000 +0000 -@@ -143,7 +143,6 @@ rpm2cpio_LDADD += @WITH_NSS_LIB@ @WITH_P - - - if LIBELF --if LIBDWARF - rpmconfig_SCRIPTS += scripts/find-debuginfo.sh - - rpmlibexec_PROGRAMS += debugedit -@@ -156,7 +155,6 @@ elfdeps_SOURCES = tools/elfdeps.c - elfdeps_LDADD = rpmio/librpmio.la - elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@ - endif --endif - - rpmlibexec_PROGRAMS += javadeps - javadeps_SOURCES = tools/javadeps.c ---- ./tools/debugedit.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./tools/debugedit.c 2011-05-10 16:03:49.000000000 +0000 -@@ -37,7 +37,37 @@ +--- ./tools/debugedit.c.orig 2005-12-15 14:28:49.000000000 +0000 ++++ ./tools/debugedit.c 2006-03-17 13:01:53.000000000 +0000 +@@ -34,7 +34,37 @@ #include #include @@ -57,5 +39,14 @@ Make debugedit build without dwarf.h +#define DW_FORM_ref_udata 0x15 +#define DW_FORM_indirect 0x16 - #include - #include + #include "hashtab.h" + +@@ -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: diff --git a/debuginfo-mono.patch b/debuginfo-mono.patch deleted file mode 100644 index d877a73..0000000 --- a/debuginfo-mono.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ./scripts/find-debuginfo.sh.orig 2011-05-11 16:10:22.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-11 16:10:48.000000000 +0000 -@@ -211,6 +211,17 @@ while read nlinks inum f; do - ;; - *) continue ;; - esac -+ # double check that we really have an ELF file, -+ # to handle monodevelop-debugger-gdb and monodevelop-debugger-mdb -+ ftype=`/usr/bin/file $f | cut -d: -f2-` -+ case $ftype in -+ *ELF*) ;; -+ *) -+ echo "$f is not an ELF file, skipping" -+ continue -+ ;; -+ esac -+ - get_debugfn "$f" - [ -f "${debugfn}" ] && continue - diff --git a/debuglink.diff b/debuglink.diff deleted file mode 100644 index 4a97043..0000000 --- a/debuglink.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- ./scripts/find-debuginfo.sh.orig 2011-05-11 15:59:44.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-11 16:10:22.000000000 +0000 -@@ -186,7 +186,8 @@ make_id_link() - get_debugfn() - { - dn=$(dirname "${1#$RPM_BUILD_ROOT}") -- bn=$(basename "$1" .debug).debug -+# Do not strip existing .debug suffixes -+ bn=$(basename "$1").debug - - debugdn=${debugdir}${dn} - debugfn=${debugdn}/${bn} diff --git a/debugsource-package.diff b/debugsource-package.diff deleted file mode 100644 index 11eae89..0000000 --- a/debugsource-package.diff +++ /dev/null @@ -1,57 +0,0 @@ -Subject: Split sources for debugging into separate -debugsource package - -At the moment the -debuginfo package also include the sources where used to -build the binary. The patches moves them into a separate package -debugsource. - ---- ./macros.in.orig 2011-05-11 15:01:39.000000000 +0000 -+++ ./macros.in 2011-05-11 15:36:05.000000000 +0000 -@@ -190,6 +190,18 @@ Debug information is useful when develop - package or when debugging this package.\ - %files debuginfo -f debugfiles.list\ - %defattr(-,root,root)\ -+\ -+%package debugsource\ -+Summary: Debug sources for package %{name}\ -+Group: Development/Debug\ -+AutoReqProv: 0\ -+Requires: %{name}-debuginfo = %{version}-%{release}\ -+%description debugsource\ -+This package provides debug sources for package %{name}.\ -+Debug sources are useful when developing applications that use this\ -+package or when debugging this package.\ -+%files debugsource -f debugsources.list\ -+%defattr(-,root,root)\ - %{nil} - - %_defaultdocdir %{_datadir}/doc/packages ---- ./scripts/find-debuginfo.sh.orig 2011-05-11 14:46:18.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-11 15:36:05.000000000 +0000 -@@ -187,8 +187,8 @@ set -o pipefail - strict_error=ERROR - $strict || strict_error=WARNING - --# Strip ELF binaries --find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort -z | -+# 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" -print0 | sort -z | - xargs --no-run-if-empty -0 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 -@@ -300,10 +300,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o - - - (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 - -+: > "$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 -+ - # Append to $1 only the lines from stdin not already in the file. - append_uniq() - { diff --git a/debugsubpkg.diff b/debugsubpkg.diff deleted file mode 100644 index 2f9157e..0000000 --- a/debugsubpkg.diff +++ /dev/null @@ -1,322 +0,0 @@ -Create a debuginfo package for each subpackage. - ---- ./build/files.c.orig 2011-05-13 15:34:01.000000000 +0000 -+++ ./build/files.c 2011-05-13 15:35:42.000000000 +0000 -@@ -20,6 +20,10 @@ - #include /* rpmDoDigest() */ - #include - -+#if HAVE_GELF_H -+#include -+#endif -+ - #include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */ - #include "rpmio/base64.h" - #include "misc/fts.h" -@@ -2105,13 +2109,237 @@ exit: - return rc; - } - -+#if HAVE_GELF_H && HAVE_LIBELF -+/* Query the build-id from the ELF file NAME and store it in the newly -+ allocated *build_id array of size *build_id_size. Returns -1 on -+ error. */ -+ -+int -+getELFBuildId (const char *name, -+ unsigned char **id, size_t *id_size) -+{ -+ int fd, i; -+ Elf *elf; -+ GElf_Ehdr ehdr; -+ Elf_Data *build_id = NULL; -+ size_t build_id_offset = 0, build_id_size = 0; -+ -+ /* Now query the build-id of the file and add the -+ corresponding links in the .build-id tree. -+ The following code is based on tools/debugedit.c. */ -+ fd = open (name, O_RDONLY); -+ if (fd < 0) -+ return -1; -+ elf = elf_begin (fd, ELF_C_READ_MMAP, NULL); -+ if (elf == NULL) -+ { -+ fprintf (stderr, "cannot open ELF file: %s", -+ elf_errmsg (-1)); -+ close (fd); -+ return -1; -+ } -+ if (elf_kind (elf) != ELF_K_ELF -+ || gelf_getehdr (elf, &ehdr) == NULL -+ || (ehdr.e_type != ET_DYN -+ && ehdr.e_type != ET_EXEC -+ && ehdr.e_type != ET_REL)) -+ { -+ elf_end (elf); -+ close (fd); -+ return -1; -+ } -+ for (i = 0; i < ehdr.e_shnum; ++i) -+ { -+ Elf_Scn *s = elf_getscn (elf, i); -+ GElf_Shdr shdr; -+ Elf_Data *data; -+ Elf32_Nhdr nh; -+ Elf_Data dst = -+ { -+ .d_version = EV_CURRENT, .d_type = ELF_T_NHDR, -+ .d_buf = &nh, .d_size = sizeof nh -+ }; -+ Elf_Data src = dst; -+ -+ gelf_getshdr (s, &shdr); -+ if (shdr.sh_type != SHT_NOTE -+ || !(shdr.sh_flags & SHF_ALLOC)) -+ continue; -+ -+ /* Look for a build-ID note here. */ -+ data = elf_rawdata (s, NULL); -+ src.d_buf = data->d_buf; -+ assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr)); -+ while (data->d_buf + data->d_size - src.d_buf > (int) sizeof nh -+ && elf32_xlatetom (&dst, &src, ehdr.e_ident[EI_DATA])) -+ { -+ Elf32_Word len = sizeof nh + nh.n_namesz; -+ len = (len + 3) & ~3; -+ -+ if (nh.n_namesz == sizeof "GNU" && nh.n_type == 3 -+ && !memcmp (src.d_buf + sizeof nh, "GNU", sizeof "GNU")) -+ { -+ build_id = data; -+ build_id_offset = src.d_buf + len - data->d_buf; -+ build_id_size = nh.n_descsz; -+ break; -+ } -+ -+ len += nh.n_descsz; -+ len = (len + 3) & ~3; -+ src.d_buf += len; -+ } -+ -+ if (build_id != NULL) -+ break; -+ } -+ -+ if (build_id == NULL) -+ return -1; -+ -+ *id = malloc (build_id_size); -+ *id_size = build_id_size; -+ memcpy (*id, build_id->d_buf + build_id_offset, build_id_size); -+ -+ elf_end (elf); -+ close (fd); -+ -+ return 0; -+} -+ -+ -+static rpmTag copyTagsForDebug[] = { -+ RPMTAG_EPOCH, -+ RPMTAG_VERSION, -+ RPMTAG_RELEASE, -+ RPMTAG_LICENSE, -+ RPMTAG_PACKAGER, -+ RPMTAG_DISTRIBUTION, -+ RPMTAG_DISTURL, -+ RPMTAG_VENDOR, -+ RPMTAG_ICON, -+ RPMTAG_URL, -+ RPMTAG_CHANGELOGTIME, -+ RPMTAG_CHANGELOGNAME, -+ RPMTAG_CHANGELOGTEXT, -+ RPMTAG_PREFIXES, -+ RPMTAG_RHNPLATFORM, -+ RPMTAG_OS, -+ RPMTAG_DISTTAG, -+ RPMTAG_CVSID, -+ RPMTAG_ARCH, -+ 0 -+}; -+ -+static void addDebuginfoPackage(rpmSpec spec, Package pkg, char *buildroot) -+{ -+ const char *a; -+ -+ elf_version(EV_CURRENT); -+ a = headerGetString(pkg->header, RPMTAG_ARCH); -+ if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0) -+ { -+ Package dbg; -+ rpmfi fi = pkg->cpioList; -+ char tmp[1024]; -+ const char *name; -+ ARGV_t files = NULL; -+ int seen_build_id = 0; -+ -+ /* Check if the current package has files with debug info -+ and record them. */ -+ fi = rpmfiInit (fi, 0); -+ while (rpmfiNext (fi) >= 0) -+ { -+ const char *base; -+ int i; -+ unsigned char *build_id; -+ size_t build_id_size = 0; -+ struct stat sbuf; -+ -+ name = rpmfiFN (fi); -+ /* Skip leading buildroot. */ -+ base = name + strlen (buildroot); -+ /* Pre-pend %buildroot/usr/lib/debug and append .debug. */ -+ snprintf (tmp, 1024, "%s/usr/lib/debug%s.debug", -+ buildroot, base); -+ /* If that file exists we have debug information for it. */ -+ if (access (tmp, F_OK) != 0) -+ continue; -+ -+ /* Append the file list preamble. */ -+ if (!files) -+ { -+ argvAdd(&files, "%defattr(-,root,root)"); -+ argvAdd(&files, "%dir /usr/lib/debug"); -+ } -+ /* Add the files main debug-info file. */ -+ snprintf (tmp, 1024, "/usr/lib/debug/%s.debug", base); -+ argvAdd(&files, tmp); -+ -+ /* Do not bother to check build-ids for symbolic links. -+ We'll handle them for the link target. */ -+ if (lstat (name, &sbuf) == -1 -+ || S_ISLNK (sbuf.st_mode)) -+ continue; -+ -+ /* Try to gather the build-id from the binary. */ -+ if (getELFBuildId (name, &build_id, &build_id_size) == -1) -+ continue; -+ -+ /* If we see build-id links for the first time add the -+ directory. */ -+ if (!seen_build_id) -+ argvAdd(&files, "%dir /usr/lib/debug/.build-id"); -+ -+ /* From the build-id construct the two links pointing back -+ to the debug information file and the binary. */ -+ snprintf (tmp, 1024, "/usr/lib/debug/.build-id/%02x/", -+ build_id[0]); -+ for (i = 1; i < build_id_size; ++i) -+ sprintf (tmp + strlen (tmp), "%02x", build_id[i]); -+ argvAdd(&files, tmp); -+ sprintf (tmp + strlen (tmp), ".debug"); -+ argvAdd(&files, tmp); -+ -+ free (build_id); -+ } -+ -+ /* If there are debuginfo files for this package add a -+ new debuginfo package. */ -+ if (files) -+ { -+ dbg = newPackage (spec); -+ headerNVR (pkg->header, &name, NULL, NULL); -+ /* Set name, summary and group. */ -+ snprintf (tmp, 1024, "%s-debuginfo", name); -+ headerPutString(dbg->header, RPMTAG_NAME, tmp); -+ snprintf (tmp, 1024, "Debug information for package %s", name); -+ headerPutString(dbg->header, RPMTAG_SUMMARY, tmp); -+ snprintf (tmp, 1024, "This package provides debug information for package %s.\n" -+ "Debug information is useful when developing applications that use this\n" -+ "package or when debugging this package.", name); -+ headerPutString(dbg->header, RPMTAG_DESCRIPTION, tmp); -+ headerPutString(dbg->header, RPMTAG_GROUP, "Development/Debug"); -+ /* Inherit other tags from parent. */ -+ headerCopyTags (pkg->header, dbg->header, copyTagsForDebug); -+ -+ /* Build up the files list. */ -+ dbg->fileList = files; -+ } -+ } -+} -+#endif -+ - rpmRC processBinaryFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags, - int installSpecialDoc, int test) - { - Package pkg; - rpmRC rc = RPMRC_OK; -+ char *buildroot; - - check_fileList = newStringBuf(); -+ buildroot = rpmGenPath(spec->rootDir, spec->buildRoot, NULL); - genSourceRpmName(spec); - - for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -@@ -2127,8 +2355,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r - rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr); - free(nvr); - -- if ((rc = processPackageFiles(spec, pkgFlags, pkg, installSpecialDoc, test)) != RPMRC_OK || -- (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) -+ if ((rc = processPackageFiles(spec, pkgFlags, pkg, installSpecialDoc, test)) != RPMRC_OK) -+ goto exit; -+#if HAVE_GELF_H && HAVE_LIBELF -+ addDebuginfoPackage(spec, pkg, buildroot); -+#endif -+ if ((rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) - goto exit; - - a = headerGetString(pkg->header, RPMTAG_ARCH); ---- ./macros.in.orig 2011-05-13 15:34:01.000000000 +0000 -+++ ./macros.in 2011-05-13 15:34:10.000000000 +0000 -@@ -179,24 +179,10 @@ - # Template for debug information sub-package. - %debug_package \ - %global __debug_package 1\ --%package debuginfo\ --Summary: Debug information for package %{name}\ --Group: Development/Debug\ --AutoReq: 0\ --AutoProv: 1\ --#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ --%description debuginfo\ --This package provides debug information for package %{name}.\ --Debug information is useful when developing applications that use this\ --package or when debugging this package.\ --%files debuginfo -f debugfiles.list\ --%defattr(-,root,root)\ --\ - %package debugsource\ - Summary: Debug sources for package %{name}\ - Group: Development/Debug\ - AutoReqProv: 0\ --Requires: %{name}-debuginfo = %{version}-%{release}\ - %description debugsource\ - This package provides debug sources for package %{name}.\ - Debug sources are useful when developing applications that use this\ ---- ./scripts/find-debuginfo.sh.orig 2011-05-13 15:34:01.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-13 15:34:10.000000000 +0000 -@@ -277,19 +277,11 @@ while read nlinks inum f; do - fi - done || exit - --# For each symlink whose target has a .debug file, --# make a .debug symlink to that file. --find $RPM_BUILD_ROOT ! -path "${debugdir}/*" -type l -print | --while read f --do -- t=$(readlink -m "$f").debug -- f=${f#$RPM_BUILD_ROOT} -- t=${t#$RPM_BUILD_ROOT} -- if [ -f "$debugdir$t" ]; then -- echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug" -- debug_link "/usr/lib/debug$t" "${f}.debug" -- fi --done -+# We used to make a .debug symlink for each symlink whose target -+# has a .debug file to that file. This is not necessary because -+# the debuglink section contains only the destination of those links. -+# Creating those links anyway results in debuginfo packages for -+# devel packages just because of the .so symlinks in them. - - if [ -s "$SOURCEFILE" ]; then - mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug" diff --git a/diskspace.diff b/diskspace.diff new file mode 100644 index 0000000..461a851 --- /dev/null +++ b/diskspace.diff @@ -0,0 +1,23 @@ +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 + rpmpsAppend(ps, RPMPROB_DISKSPACE, + rpmteNEVR(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) { + rpmpsAppend(ps, RPMPROB_DISKNODES, + rpmteNEVR(te), rpmteKey(te), + ts->filesystems[i], NULL, NULL, +- (adj_fs_blocks(dsi->ineeded) - dsi->iavail)); ++ (adj_fs_blocks(dsi->ineeded))); + } + } + ps = rpmpsFree(ps); diff --git a/disttag-macro.diff b/disttag-macro.diff deleted file mode 100644 index 795e52c..0000000 --- a/disttag-macro.diff +++ /dev/null @@ -1,31 +0,0 @@ -Hmm, SUSE doesn't use it, so what's the purpose of this patch? - ---- ./build/parsePreamble.c.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./build/parsePreamble.c 2011-05-11 15:59:08.000000000 +0000 -@@ -485,6 +485,7 @@ static struct optionalTag { - { RPMTAG_PACKAGER, "%{packager}" }, - { RPMTAG_DISTRIBUTION, "%{distribution}" }, - { RPMTAG_DISTURL, "%{disturl}" }, -+ { RPMTAG_DISTTAG, "%{disttag}" }, - { RPMTAG_BUGURL, "%{bugurl}" }, - { -1, NULL } - }; ---- ./macros.in.orig 2011-05-11 15:38:44.000000000 +0000 -+++ ./macros.in 2011-05-11 15:59:08.000000000 +0000 -@@ -279,6 +279,16 @@ package or when debugging this package.\ - # - #%bugurl - -+# Configurable distribution tag, same as Disttag: tag in a specfile. -+# The tag will be used to supply reliable information to tools like -+# rpmfind. -+# -+# Note: You should not configure with disturl (or build packages with -+# the Disttag: tag) unless you are willing to supply content in a -+# yet-to-be-determined format at the tag specified. -+# -+#%disttag -+ - # Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files - # marked as %doc should be installed. - #%_excludedocs diff --git a/docdir_fmt.diff b/docdir_fmt.diff new file mode 100644 index 0000000..bd82d26 --- /dev/null +++ b/docdir_fmt.diff @@ -0,0 +1,36 @@ +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 new file mode 100644 index 0000000..caf8519 --- /dev/null +++ b/elfutils-0.97.diff @@ -0,0 +1,151 @@ +--- elfutils-0.97/Makefile.am.orig 2004-01-18 23:24:16.000000000 +0000 ++++ elfutils-0.97/Makefile.am 2005-02-10 18:01:28.029920520 +0000 +@@ -18,9 +18,8 @@ + ## + ACLOCAL_AMFLAGS = -I m4 + +-mini_SUBDIRS = config m4 lib libelf libelf-po +-all_SUBDIRS = doc libebl libdw libcpu libasm src po tests +-SUBDIRS = $(mini_SUBDIRS) $(all_SUBDIRS) ++mini_SUBDIRS = config m4 libelf libelf-po ++SUBDIRS = $(mini_SUBDIRS) + + EXTRA_DIST = splint.rc elfutils.spec GPG-KEY NOTES COPYING.GPL + +--- elfutils-0.97/configure.ac.orig 2004-09-25 19:41:03.000000000 +0000 ++++ elfutils-0.97/configure.ac 2005-02-10 18:01:28.030920377 +0000 +@@ -130,34 +130,9 @@ + + dnl The directories with content. + +-dnl Documentation. +-AC_CONFIG_FILES([doc/Makefile]) +- +-dnl Support library. +-AC_CONFIG_FILES([lib/Makefile]) +- + dnl ELF library. + AC_CONFIG_FILES([libelf/Makefile libelf-po/Makefile.in]) + +-dnl Higher-level ELF support library. +-AC_CONFIG_FILES([libebl/Makefile]) +- +-dnl DWARF library. +-AC_CONFIG_FILES([libdw/Makefile]) +- +-dnl CPU handling library. +-AC_CONFIG_FILES([libcpu/Makefile]) +- +-dnl Assembler library. +-AC_CONFIG_FILES([libasm/Makefile]) +- +-dnl Tools. +-AC_CONFIG_FILES([src/Makefile po/Makefile.in]) +- +-dnl Test suite. +-AC_CONFIG_FILES([tests/Makefile]) +- +- + dnl Test of the config.h file. We hide all kinds of configuration magic + dnl in there. + AH_BOTTOM([ +--- elfutils-0.97/libelf-po/Makefile.in.in.orig 2004-01-18 23:51:37.000000000 +0000 ++++ elfutils-0.97/libelf-po/Makefile.in.in 2005-02-10 18:01:28.030920377 +0000 +@@ -28,7 +28,7 @@ + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + MKINSTALLDIRS = @MKINSTALLDIRS@ +-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` ++mkinstalldirs = @MKINSTALLDIRS@ + + GMSGFMT = @GMSGFMT@ + MSGFMT = @MSGFMT@ +--- elfutils-0.97/libelf/Makefile.am.orig 2004-01-23 10:38:49.000000000 +0000 ++++ elfutils-0.97/libelf/Makefile.am 2005-02-10 18:03:15.337610448 +0000 +@@ -31,15 +31,15 @@ + + LINT = splint + +-lib_LIBRARIES = libelf.a ++#lib_LIBRARIES = libelf.a + if !MUDFLAP +-noinst_LIBRARIES = libelf_pic.a +-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) ++noinst_LIBRARIES = libelf.a libelf_pic.a ++noinst_PROGRAMS = libelf.so + endif +-include_HEADERS = libelf.h gelf.h nlist.h ++#include_HEADERS = libelf.h gelf.h nlist.h + +-euincludedir = $(includedir)/elfutils +-euinclude_HEADERS = elf-knowledge.h ++#euincludedir = $(includedir)/elfutils ++#euinclude_HEADERS = elf-knowledge.h + + libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ + elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \ +@@ -96,7 +96,7 @@ + ln -fs $@ $@.$(VERSION) + + %.os: %.c %.o +- if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ ++ if $(COMPILE) -c -o $@ -fPIC -DPIC -DSHARED -MT $@ -MD -MP \ + -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ + then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ + rm -f "$(DEPDIR)/$*.Tpo"; \ +@@ -104,15 +104,15 @@ + fi + + install: install-am libelf.so +- $(mkinstalldirs) $(DESTDIR)$(libdir) +- $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so +- ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION) +- ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so ++# $(mkinstalldirs) $(DESTDIR)$(libdir) ++# $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so ++# ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION) ++# ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so + + uninstall: uninstall-am +- rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so +- rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION) +- rm -f $(DESTDIR)$(libdir)/libelf.so ++# rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so ++# rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION) ++# rm -f $(DESTDIR)$(libdir)/libelf.so + endif + + .PSEUDO: lint +--- elfutils-0.97/libelf/Makefile.in.orig 2004-09-25 19:41:08.000000000 +0000 ++++ elfutils-0.97/libelf/Makefile.in 2005-02-10 18:01:28.028920662 +0000 +@@ -731,7 +731,7 @@ + @MUDFLAP_FALSE@ ln -fs $@ $@.$(VERSION) + + @MUDFLAP_FALSE@%.os: %.c %.o +-@MUDFLAP_FALSE@ if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ ++@MUDFLAP_FALSE@ if $(COMPILE) -c -o $@ -fPIC -DPIC -DSHARED -MT $@ -MD -MP \ + @MUDFLAP_FALSE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ + @MUDFLAP_FALSE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ + @MUDFLAP_FALSE@ rm -f "$(DEPDIR)/$*.Tpo"; \ +--- elfutils-0.97/libelf/libelfP.h.orig 2003-12-25 18:43:31.000000000 +0000 ++++ elfutils-0.97/libelf/libelfP.h 2005-02-10 18:01:28.029920520 +0000 +@@ -387,7 +387,7 @@ + extern int __libelf_fill_byte attribute_hidden; + + /* Nonzero if the version was set. */ +-extern int __libelf_version_initialized attribute_hidden; ++extern int __libelf_version_initialized /* attribute_hidden */; + + + /* The libelf API does not have such a function but it is still useful. +--- elfutils-0.97/configure.ac 2006/08/14 23:04:23 1.1 ++++ elfutils-0.97/configure.ac 2006/08/14 23:06:50 +@@ -53,6 +53,8 @@ + AC_PROG_CPP + AC_PROG_GCC_TRADITIONAL + AM_GNU_GETTEXT([external]) ++MKINSTALLDIRS="\$(SHELL) \$(top_srcdir)/config/mkinstalldirs" ++AC_SUBST(MKINSTALLDIRS) + AC_PROG_RANLIB + AC_PROG_YACC + AM_PROG_LEX diff --git a/elfutils-0.97.tar.bz2 b/elfutils-0.97.tar.bz2 new file mode 100644 index 0000000..0402483 --- /dev/null +++ b/elfutils-0.97.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:105115416927f1498abecd7741af0d178a31a2bc780b3ab935b78bac48bac342 +size 216798 diff --git a/emptychangelog.diff b/emptychangelog.diff deleted file mode 100644 index cdcc15c..0000000 --- a/emptychangelog.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ./build/parseChangelog.c.orig 2011-05-23 14:19:48.000000000 +0000 -+++ ./build/parseChangelog.c 2011-05-23 14:20:36.000000000 +0000 -@@ -238,7 +238,7 @@ int parseChangelog(rpmSpec spec) - } - } - -- if (addChangelog(spec->packages->header, sb)) { -+ if (sb && addChangelog(spec->packages->header, sb)) { - goto exit; - } - res = nextPart; diff --git a/emptyfilelist.diff b/emptyfilelist.diff new file mode 100644 index 0000000..95103d6 --- /dev/null +++ b/emptyfilelist.diff @@ -0,0 +1,16 @@ +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/emptyprep.diff b/emptyprep.diff deleted file mode 100644 index 1b53278..0000000 --- a/emptyprep.diff +++ /dev/null @@ -1,13 +0,0 @@ -Do not segfault if the prep section is empty - ---- build/parsePrep.c.orig 2011-05-13 16:22:59.000000000 +0000 -+++ build/parsePrep.c 2011-05-13 16:23:41.000000000 +0000 -@@ -518,7 +518,7 @@ int parsePrep(rpmSpec spec) - } - } - -- for (ARGV_const_t lines = saveLines; *lines; lines++) { -+ for (ARGV_const_t lines = saveLines; lines && *lines; lines++) { - res = 0; - if (rstreqn(*lines, "%setup", sizeof("%setup")-1)) { - res = doSetupMacro(spec, *lines); diff --git a/erasebadreturn.diff b/erasebadreturn.diff new file mode 100644 index 0000000..554c4dc --- /dev/null +++ b/erasebadreturn.diff @@ -0,0 +1,16 @@ +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 new file mode 100644 index 0000000..b384f41 --- /dev/null +++ b/eraseignoresize.diff @@ -0,0 +1,28 @@ +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 new file mode 100644 index 0000000..e7093bb --- /dev/null +++ b/eraseordered.diff @@ -0,0 +1,21 @@ +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 new file mode 100644 index 0000000..f77e0e8 --- /dev/null +++ b/exitstatus.diff @@ -0,0 +1,15 @@ +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 32d8e81..bd5055c 100644 --- a/extcond.diff +++ b/extcond.diff @@ -4,9 +4,9 @@ assumed to be true. This mechanism is used by the weakdeps patch to filter the "RPMSENSE_STRONG" flag. ---- ./lib/headerfmt.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./lib/headerfmt.c 2011-05-10 17:06:49.000000000 +0000 -@@ -568,8 +568,12 @@ static int parseExpression(headerSprintf +--- ./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 *endPtr = chptr; @@ -19,16 +19,16 @@ This mechanism is used by the weakdeps patch to filter the (void) findTag(hsa, token, str); return 0; -@@ -657,6 +661,7 @@ static char * singleSprintf(headerSprint - int i, j, found; - rpm_count_t count, numElements; +@@ -3239,6 +3243,7 @@ static char * singleSprintf(headerSprint + int_32 type; + int_32 count; sprintfToken spft; + sprintfTag stag; int condNumFormats; size_t need; -@@ -687,6 +692,18 @@ static char * singleSprintf(headerSprint - headerIsEntry(hsa->h, token->u.cond.tag.tag)) { +@@ -3270,6 +3275,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; + if (token->u.cond.tag.fmt) { @@ -46,20 +46,33 @@ This mechanism is used by the weakdeps patch to filter the } else { spft = token->u.cond.elseFormat; condNumFormats = token->u.cond.numElseTokens; -@@ -710,10 +727,13 @@ static char * singleSprintf(headerSprint +@@ -3291,19 +3308,22 @@ static char * singleSprintf(headerSprint + spft = token->u.array.format; for (i = 0; i < token->u.array.numTokens; i++, spft++) { - rpmtd td = NULL; - if (spft->type != PTOK_TAG || +- spft->u.tag.arrayCount || - spft->u.tag.justOne) continue; + if (spft->type != PTOK_TAG && spft->type != PTOK_COND) + continue; ++ + stag = (spft->type == PTOK_COND ? &spft->u.cond.tag : &spft->u.tag); -+ if (stag->justOne) ++ if (stag->arrayCount || stag->justOne) + continue; -- if (!(td = getData(hsa, spft->u.tag.tag))) { -+ if (!(td = getData(hsa, stag->tag))) { - continue; - } - +- if (spft->u.tag.ext) { ++ if (stag->ext) { + /*@-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, ++ hsa->ec + stag->extNum)) + continue; + /*@=boundswrite@*/ + } else { + /*@-boundswrite@*/ +- if (!headerGetEntry(hsa->h, spft->u.tag.tag, &type, NULL, &count)) ++ if (!headerGetEntry(hsa->h, stag->tag, &type, NULL, &count)) + continue; + /*@=boundswrite@*/ + } diff --git a/fileattrs.diff b/fileattrs.diff deleted file mode 100644 index 155a52b..0000000 --- a/fileattrs.diff +++ /dev/null @@ -1,85 +0,0 @@ -Index: fileattrs/debuginfo.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/debuginfo.attr 2011-06-06 16:16:00.853820498 +0200 -@@ -0,0 +1,2 @@ -+%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov -+%__debuginfo_path ^/usr/lib/debug/ -Index: fileattrs/elf.attr -=================================================================== ---- fileattrs/elf.attr.orig 2011-06-06 16:15:01.591403879 +0200 -+++ fileattrs/elf.attr 2011-06-06 16:16:00.853820498 +0200 -@@ -1,4 +1,5 @@ - %__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} - %__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} --%__elf_magic ^ELF (32|64)-bit.*$ -+%__elf_magic ^ELF (32|64)-bit.*executable - %__elf_flags exeonly -+%__elf_exclude_path ^/usr/lib/debug/ -Index: fileattrs/elflib.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/elflib.attr 2011-06-06 16:16:00.854820404 +0200 -@@ -0,0 +1,4 @@ -+%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private} -+%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private} -+%__elflib_magic ^ELF (32|64)-bit.*shared object -+%__elflib_exclude_path ^/usr/lib/debug/ -Index: fileattrs/firmware.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/firmware.attr 2011-06-06 16:16:00.854820404 +0200 -@@ -0,0 +1,2 @@ -+%__firmware_provides %{_rpmconfigdir}/firmware.prov -+%__firmware_path /lib/firmware/ -Index: fileattrs/ksyms.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/ksyms.attr 2011-06-06 16:16:00.854820404 +0200 -@@ -0,0 +1,4 @@ -+%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name -+%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name -+%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name -+%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$ -Index: fileattrs/Makefile.am -=================================================================== ---- fileattrs/Makefile.am.orig 2011-06-06 16:15:01.590403974 +0200 -+++ fileattrs/Makefile.am 2011-06-06 16:16:08.852066946 +0200 -@@ -5,7 +5,8 @@ include $(top_srcdir)/rpm.am - fattrsdir = $(rpmconfigdir)/fileattrs - - fattrs_DATA = \ -- desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ -- pkgconfig.attr python.attr ocaml.attr script.attr mono.attr -+ elf.attr font.attr libtool.attr perl.attr perllib.attr \ -+ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \ -+ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr - - EXTRA_DIST = $(fattrs_DATA) -Index: fileattrs/perl.attr -=================================================================== ---- fileattrs/perl.attr.orig 2011-06-06 16:15:01.591403879 +0200 -+++ fileattrs/perl.attr 2011-06-06 16:16:00.855820310 +0200 -@@ -1,3 +1,4 @@ --%__perl_requires %{_rpmconfigdir}/perl.req -+# disabled for now -+#%__perl_requires %{_rpmconfigdir}/perl.req - %__perl_magic ^.*perl .*$ - %__perl_flags exeonly -Index: fileattrs/perllib.attr -=================================================================== ---- fileattrs/perllib.attr.orig 2011-06-06 16:15:01.591403879 +0200 -+++ fileattrs/perllib.attr 2011-06-06 16:16:00.855820310 +0200 -@@ -1,3 +1,4 @@ - %__perllib_provides %{_rpmconfigdir}/perl.prov --%__perllib_requires %{_rpmconfigdir}/perl.req -+#disabled for now -+#%__perllib_requires %{_rpmconfigdir}/perl.req - %__perllib_magic ^Perl[[:digit:]] module source.* -Index: fileattrs/sysvinit.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/sysvinit.attr 2011-06-06 16:16:00.856820216 +0200 -@@ -0,0 +1,2 @@ -+%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides -+%__sysvinit_path ^/etc/init\.d/ diff --git a/filenonull.diff b/filenonull.diff new file mode 100644 index 0000000..ff1fc86 --- /dev/null +++ b/filenonull.diff @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..e96020a --- /dev/null +++ b/filequery.diff @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index 32c6fa2..0000000 --- a/files.diff +++ /dev/null @@ -1,17 +0,0 @@ -Print "unpackaged files" section even if there was an error -in the filelist. - ---- ./build/files.c.orig 2011-05-11 15:27:11.000000000 +0000 -+++ ./build/files.c 2011-05-11 15:29:12.000000000 +0000 -@@ -2149,10 +2149,10 @@ rpmRC processBinaryFiles(rpmSpec spec, r - */ - - -+exit: - if (checkFiles(spec->buildRoot, check_fileList) > 0) { - rc = RPMRC_FAIL; - } --exit: - check_fileList = freeStringBuf(check_fileList); - - return rc; diff --git a/finddebuginfo-absolute-links.diff b/finddebuginfo-absolute-links.diff deleted file mode 100644 index 9cd08c7..0000000 --- a/finddebuginfo-absolute-links.diff +++ /dev/null @@ -1,41 +0,0 @@ -From: Jan Blunck -Subject: Do the symbolic links right in the first place - -Since brp-symlink relinks symbolic links to enforce a certain policy we should -do it right in the first place. So this patch changes find-debuginfo.sh scripts -behavior to reflect that policy. - -Signed-off-by: Jan Blunck - ---- ./scripts/find-debuginfo.sh.orig 2011-05-11 15:36:05.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-11 15:58:17.000000000 +0000 -@@ -124,7 +124,17 @@ debug_link() - local l="/usr/lib/debug$2" - local t="$1" - echo >> "$LINKSFILE" "$l $t" -- link_relative "$t" "$l" "$RPM_BUILD_ROOT" -+ -+ # this should correspond to what brp-symlink is doing -+ case $t in -+ /usr*) -+ link_relative "$t" "$l" "$RPM_BUILD_ROOT" -+ ;; -+ *) -+ mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \ -+ ln -snf "$t" "$RPM_BUILD_ROOT$l" -+ ;; -+ esac - } - - # Compare two binaries but ignore the .note.gnu.build-id section -@@ -158,8 +168,8 @@ make_id_link() - - local other=$(readlink -m "$root_idfile") - other=${other#$RPM_BUILD_ROOT} -- if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" || -- elfcmp "$root_idfile" "$RPM_BUILD_ROOT$file" ; then -+ if cmp -s "$RPM_BUILD_ROOT$other" "$RPM_BUILD_ROOT$file" || -+ elfcmp "$RPM_BUILD_ROOT$other" "$RPM_BUILD_ROOT$file" ; then - # Two copies. Maybe one has to be setuid or something. - echo >&2 "*** WARNING: identical binaries are copied, not linked:" - echo >&2 " $file" diff --git a/finddebuginfo.diff b/finddebuginfo.diff index d382d24..f53501f 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,119 +1,102 @@ ---- ./scripts/find-debuginfo.sh.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-11 14:46:18.000000000 +0000 -@@ -127,6 +127,20 @@ debug_link() - link_relative "$t" "$l" "$RPM_BUILD_ROOT" - } - -+# Compare two binaries but ignore the .note.gnu.build-id section -+elfcmp() -+{ -+ local tmp1=$(mktemp -t ${1##*/}.XXXXXX) -+ local tmp2=$(mktemp -t ${2##*/}.XXXXXX) -+ -+ objcopy -R .note.gnu.build-id -R .gnu_debuglink $1 $tmp1 -+ objcopy -R .note.gnu.build-id -R .gnu_debuglink $2 $tmp2 -+ cmp -s $tmp1 $tmp2 -+ local res=$? -+ rm -f $tmp1 $tmp2 -+ return $res -+} -+ - # Make a build-id symlink for id $1 with suffix $3 to file $2. - make_id_link() - { -@@ -145,7 +159,7 @@ make_id_link() - local other=$(readlink -m "$root_idfile") - other=${other#$RPM_BUILD_ROOT} - if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" || -- eu-elfcmp -q "$root_idfile" "$RPM_BUILD_ROOT$file" 2> /dev/null; then -+ elfcmp "$root_idfile" "$RPM_BUILD_ROOT$file" ; then - # Two copies. Maybe one has to be setuid or something. - echo >&2 "*** WARNING: identical binaries are copied, not linked:" - echo >&2 " $file" -@@ -174,12 +188,18 @@ strict_error=ERROR - $strict || strict_error=WARNING +SUSE specific find-debuginfo changes. + +--- ./scripts/find-debuginfo.sh.orig 2005-07-14 15:52:31.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2006-03-17 13:13:03.000000000 +0000 +@@ -14,9 +14,18 @@ debugdir="${RPM_BUILD_ROOT}/usr/lib/debu + echo -n > $SOURCEFILE # Strip ELF binaries --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' | --xargs --no-run-if-empty stat -c '%h %D_%i %n' | -+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort -z | -+xargs --no-run-if-empty -0 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 +-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 -@@ -200,8 +220,11 @@ while read nlinks inum f; do - fi +@@ -25,6 +34,8 @@ do + [ -f "${debugfn}" ] && continue - echo "extracting debug info from $f" -- id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \ -- -i -l "$SOURCEFILE" "$f") || exit -+ mode=$(stat -c %a "$f") -+ chmod +w "$f" -+ id=$($(DEBUGEDIT=$(which debugedit 2>/dev/null); \ -+ echo ${DEBUGEDIT:-/usr/lib/rpm/debugedit}) -b "$RPM_BUILD_DIR" \ -+ -d /usr/src/debug -i -l "$SOURCEFILE" "$f") || exit - if [ -z "$id" ]; then - echo >&2 "*** ${strict_error}: No build ID note found in $f" - $strict && exit 2 -@@ -218,13 +241,25 @@ while read nlinks inum f; do - esac + 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" - 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 -+ ) || : + # A binary already copied into /usr/lib/debug doesn't get stripped, +@@ -34,19 +45,56 @@ do + esac - if [ -n "$id" ]; then - make_id_link "$id" "$dn/$(basename $f)" -@@ -253,12 +288,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 + 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 || : ++ strip_option="--strip-all" ++ case "$f" in ++ *.ko|*.a) strip_option="--strip-debug" ;; ++ esac ++ if test -n "$STRIP_KEEP_SYMTAB" ; then ++ strip_option="--strip-debug" + fi ++ if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then ++ strip_option= ++ fi ++ objcopy --add-gnu-debuglink=$debugfn $strip_option $f || : ++ chmod $mode $f + done - 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" ++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 - (cd "${RPM_BUILD_ROOT}/usr" +-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 diff --git a/findfplistexclude.diff b/findfplistexclude.diff new file mode 100644 index 0000000..45b185f --- /dev/null +++ b/findfplistexclude.diff @@ -0,0 +1,114 @@ +Allow an "exclude" parameter for rpmdbFindFp, specifying a header +that is to be excluded in the match. Used to speed up package erase +operations. +Also fixes the skipDir problem that made rpm incorrectly delete +files even if another package still references them. +rh#140055 + +Index: lib/transaction.c +=================================================================== +--- lib/transaction.c.orig ++++ lib/transaction.c +@@ -1745,7 +1745,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)); +- if (rpmdbFindFpList(rpmtsGetRdb(ts), fi->fps, matches, fc)) { ++ if (rpmdbFindFpListExclude(rpmtsGetRdb(ts), fi->fps, matches, fc, rpmteType(p) == TR_REMOVED ? fi->record : 0)) { + ps = rpmpsFree(ps); + rpmtsFreeLock(lock); + return 1; /* XXX WTFO? */ +Index: rpmdb/fprint.h +=================================================================== +--- rpmdb/fprint.h.orig ++++ rpmdb/fprint.h +@@ -79,6 +79,12 @@ int rpmdbFindFpList(/*@null@*/ rpmdb db, + /*@modifies db, *matchList, rpmGlobalMacroContext, + fileSystem, internalState @*/; + ++int rpmdbFindFpListExclude(/*@null@*/ rpmdb db, fingerPrint * fpList, ++ /*@out@*/ dbiIndexSet * matchList, int numItems, unsigned int exclude) ++ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ ++ /*@modifies db, *matchList, rpmGlobalMacroContext, ++ fileSystem, internalState @*/; ++ + /* Be carefull with the memory... assert(*fullName == '/' || !scareMemory) */ + + /** +Index: rpmdb/rpmdb.c +=================================================================== +--- rpmdb/rpmdb.c.orig ++++ rpmdb/rpmdb.c +@@ -2358,7 +2358,7 @@ static void rpmdbSortIterator(/*@null@*/ + } + + /*@-bounds@*/ /* LCL: segfault */ +-static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum) ++static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum, unsigned int exclude) + /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ + /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/ + { +@@ -2369,7 +2369,7 @@ static int rpmdbGrowIterator(/*@null@*/ + dbiIndexSet set; + int rc; + int xx; +- int i; ++ int i, j; + + if (mi == NULL) + return 1; +@@ -2405,6 +2405,25 @@ static int rpmdbGrowIterator(/*@null@*/ + + set = NULL; + (void) dbt2set(dbi, data, &set); ++ ++ /* prune the set against exclude */ ++ for (i = j = 0; i < set->count; i++) { ++ if (exclude && set->recs[i].hdrNum == exclude) ++ continue; ++ if (i != j) ++ set->recs[j] = set->recs[i]; ++ j++; ++ } ++ if (j == 0) { ++#ifdef SQLITE_HACK ++ xx = dbiCclose(dbi, dbcursor, 0); ++ dbcursor = NULL; ++#endif ++ set = dbiFreeIndexSet(set); ++ return DB_NOTFOUND; ++ } ++ set->count = j; ++ + for (i = 0; i < set->count; i++) + set->recs[i].fpNum = fpNum; + +@@ -3393,6 +3412,12 @@ static int skipDir(const char * dn) + int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList, + int numItems) + { ++ return rpmdbFindFpListExclude(db, fpList, matchList, numItems, 0); ++} ++ ++int rpmdbFindFpListExclude(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList, ++ int numItems, unsigned int exclude) ++{ + DBT * key; + DBT * data; + HGE_t hge = (HGE_t)headerGetEntryMinMemory; +@@ -3424,10 +3449,13 @@ key->data = (void *) fpList[i].baseName; + key->size = strlen((char *)key->data); + if (key->size == 0) key->size++; /* XXX "/" fixup. */ + +- if (skipDir(fpList[i].entry->dirName)) ++ /* HACK HACK HACK: don't skip dirs while removing ++ * packages as we will loose files on conflicts. ++ * exclude is not zero when removing */ ++ if (!exclude && skipDir(fpList[i].entry->dirName)) + continue; + +- xx = rpmdbGrowIterator(mi, i); ++ xx = rpmdbGrowIterator(mi, i, exclude); + + } + diff --git a/findksyms.diff b/findksyms.diff index 786cc91..88d4f02 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -1,26 +1,10 @@ SUSE specific kernel provides/requires scripts ---- ./scripts/Makefile.am.orig 2011-05-11 14:31:45.000000000 +0000 -+++ ./scripts/Makefile.am 2011-05-11 14:46:38.000000000 +0000 -@@ -16,6 +16,7 @@ EXTRA_DIST = \ - rpmdb_loadcvt rpm.daily rpm.log rpm2cpio.sh \ - tcl.req tgpg vpkg-provides.sh \ - find-requires.php find-provides.php \ -+ find-requires.ksyms find-provides.ksyms \ - find-php-provides find-php-requires \ - mono-find-requires mono-find-provides \ - ocaml-find-requires.sh ocaml-find-provides.sh \ -@@ -32,6 +33,7 @@ rpmconfig_SCRIPTS = \ - check-buildroot check-rpaths check-rpaths-worker \ - find-lang.sh \ - perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \ -+ find-requires.ksyms find-provides.ksyms \ - mono-find-requires mono-find-provides \ - pkgconfigdeps.sh libtooldeps.sh \ - ocaml-find-requires.sh ocaml-find-provides.sh \ ---- ./scripts/find-provides.ksyms.orig 2011-05-11 14:46:38.000000000 +0000 -+++ ./scripts/find-provides.ksyms 2011-05-11 14:46:38.000000000 +0000 -@@ -0,0 +1,41 @@ +Index: scripts/find-provides.ksyms +=================================================================== +--- /dev/null ++++ scripts/find-provides.ksyms +@@ -0,0 +1,20 @@ +#! /bin/sh + +IFS=$'\n' @@ -28,43 +12,24 @@ SUSE specific kernel provides/requires scripts +case "$1" in +kernel-module-*) ;; # Fedora kernel module package names start with + # kernel-module. -+kernel*) kernel_flavor=${1#kernel-} ;; ++kernel*) is_kernel_package=1 ;; +esac + -+trap 'rm -f "$tmp"' EXIT -+tmp=$(mktemp) -+while read f; do -+ test -e "$f" || continue -+ case "$f" in -+ *.debug) -+ continue -+ ;; -+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*) -+ ;; -+ *) -+ continue -+ esac -+ unzip=false -+ case "$f" in -+ *.gz | */boot/vmlinuz*) -+ unzip=true -+ esac -+ if $unzip && gzip -cd "$f" >"$tmp"; then -+ f=$tmp -+ fi -+ flavor=$(/sbin/modinfo -F vermagic "$f") -+ flavor=${flavor%% *} -+ flavor=${flavor##*-} -+ if test -z "$flavor"; then -+ flavor=$kernel_flavor -+ fi -+ nm "$f" \ -+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" ++if ! [ -z "$is_kernel_package" ]; then ++ cat > /dev/null ++ exit 0 ++fi ++ ++for module in $(grep -E '/lib/modules/.+\.ko$'); do ++ nm "$module" \ ++ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):ksym(\2) = \1:p' +done \ +| sort -u ---- ./scripts/find-requires.ksyms.orig 2011-05-11 14:46:38.000000000 +0000 -+++ ./scripts/find-requires.ksyms 2011-05-11 14:46:38.000000000 +0000 -@@ -0,0 +1,57 @@ +Index: scripts/find-requires.ksyms +=================================================================== +--- /dev/null ++++ scripts/find-requires.ksyms +@@ -0,0 +1,58 @@ +#! /bin/bash + +IFS=$'\n' @@ -80,16 +45,18 @@ SUSE specific kernel provides/requires scripts + nm "$module" + done \ + | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):\1\t\2:p' \ -+ | sort -t $'\t' -k2 -u ++ | sort -k2 -u +} + +all_requires() { + for module in "$@"; do + set -- $(/sbin/modinfo -F vermagic "$module" | sed -e 's: .*::' -e q) -+ /sbin/modprobe --dump-modversions "$module" \ ++ if [ -e "/boot/symsets-$1.tar.gz" ]; then ++ /sbin/modprobe --dump-modversions "$module" \ + | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':' ++ fi + done \ -+ | sort -t $'\t' -k2 -u ++ | sort -k2 -u +} + +if ! [ -z "$is_kernel_package" -a -e /sbin/modinfo -a -e /sbin/modprobe ]; then @@ -100,7 +67,7 @@ SUSE specific kernel provides/requires scripts +modules=($(grep -E '/lib/modules/.+\.ko$')) +if [ ${#modules[@]} -gt 0 ]; then + symset_table=$(mktemp -t ${0##*/}.XXXXX) -+ /usr/lib/rpm/symset-table | sort -t $'\t' -k 1,1 > $symset_table ++ /usr/lib/rpm/symset-table | sort > $symset_table + + join -t $'\t' -j 1 -a 2 $symset_table <( + # Filter out requirements that we fulfill ourself. @@ -111,14 +78,13 @@ SUSE specific kernel provides/requires scripts + BEGIN { FS = "\t" ; OFS = "\t" } + { print $3 "/" $2 "/" $1 } + ' \ -+ | sort -t $'\t' -k 1,1 -u) \ ++ | sort -u) \ + | sort -u \ + | awk ' + { FS = "\t" ; OFS = "\t" } -+ { split($1, arr, "/") -+ flavor = gensub(/.*-/, "", "", arr[1]) } -+ NF == 3 { print "kernel(" flavor ":" $2 ") = " $3 ++ NF == 3 { print "kernel(" $2 ") = " $3 + next } -+ { print "ksym(" flavor ":" arr[3] ") = " arr[2] } ++ { split($1, arr, "/") ++ print "ksym(" arr[3] ") = " arr[2] } + ' +fi diff --git a/findlang.diff b/findlang.diff index 51b9ab3..235d1a8 100644 --- a/findlang.diff +++ b/findlang.diff @@ -1,20 +1,22 @@ ---- ./scripts/find-lang.sh.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/find-lang.sh 2011-05-11 14:53:34.000000000 +0000 +SUSE patches for find-lang. + +--- ./scripts/find-lang.sh.orig 2004-06-20 18:55:19.000000000 +0000 ++++ ./scripts/find-lang.sh 2005-12-19 15:22:52.000000000 +0000 @@ -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 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 ++ --without-gnome find GNOME help files ++ --without-kde find KDE help files --all-name match all package/domain names -@@ -54,8 +54,8 @@ else NAME=$1 + --without-mo not find locales files + EOF +@@ -52,8 +52,8 @@ else NAME=$1 fi shift @@ -22,54 +24,64 @@ -KDE=# +GNOME= +KDE= - QT=# - MAN=# MO= -@@ -73,6 +73,14 @@ while test $# -gt 0 ; do - KDE= - shift - ;; + MO_NAME=$NAME.lang + ALL_NAME=# +@@ -61,12 +61,12 @@ NO_ALL_NAME= + + while test $# -gt 0 ; do + case "${1}" in +- --with-gnome ) +- GNOME= + --without-gnome ) + GNOME=# -+ shift -+ ;; + shift + ;; +- --with-kde ) +- KDE= + --without-kde ) + KDE=# -+ shift -+ ;; - --with-qt ) - QT= shift -@@ -97,33 +105,40 @@ while test $# -gt 0 ; do + ;; + --without-mo ) +@@ -85,26 +85,43 @@ 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 ++ echo "%defattr (644, root, root, 755)" > $MO_NAME +fi + +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:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: --'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: -+'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3: -+'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) %doc \1\2\3: + '"$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: 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"':: ++/\/share\/locale\//d ++'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\([^/]*\)\(.*\)/LC_MESSAGES/.*\.mo$:%lang(\2) %doc \1\2\3\4: ++'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\([^/]*\)\(.*\)/LC_MESSAGES/'"$NAME"'\.mo$:%lang(\2) %doc \1\2\3\4: ++s:^\([^%].*\):: ++s:%lang(C) :: ++/^ *$/d' >> $MO_NAME_NEW find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: -'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1: +'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1: '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\):: --'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2: + '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2: -'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir \1: -+'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2: +'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir %doc \1: '"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\):: -'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) \1\2: @@ -78,77 +90,30 @@ s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME -+/^$/d' >> $MO_NAME_NEW ++/^ *$/d' >> $MO_NAME_NEW find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: - '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1: - '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1: - s:^\([^%].*\):: --/^$/d' >> $MO_NAME -+/^$/d' >> $MO_NAME_NEW - - find $TOP_DIR -type f|sed ' - s:'"$TOP_DIR"':: -@@ -131,7 +146,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 - - KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null` - if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then -@@ -143,7 +158,7 @@ s:'"$TOP_DIR"':: - '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: +@@ -112,12 +129,20 @@ 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: ++'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: ++'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: ++'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: ++'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME -+/^$/d' >> $MO_NAME_NEW - fi - - KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null` -@@ -156,7 +171,7 @@ s:'"$TOP_DIR"':: - '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: - s:^\([^%].*\):: - s:%lang(C) :: --/^$/d' >> $MO_NAME -+/^$/d' >> $MO_NAME_NEW - fi - - find $TOP_DIR -type f -o -type l|sed ' -@@ -168,7 +183,7 @@ s:'"$TOP_DIR"':: - '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: - s:^[^%].*:: - s:%lang(C) :: --/^$/d' >> $MO_NAME -+/^$/d' >> $MO_NAME_NEW - - find $TOP_DIR -type d|sed ' - s:'"$TOP_DIR"':: -@@ -176,17 +191,22 @@ 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 ++/^ *$/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 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/findsupplements.diff b/findsupplements.diff deleted file mode 100644 index 83476d0..0000000 --- a/findsupplements.diff +++ /dev/null @@ -1,75 +0,0 @@ -Add support for supplements to the internal dependency -generator. - ---- build/rpmfc.c.orig 2011-05-13 16:54:26.000000000 +0000 -+++ build/rpmfc.c 2011-05-13 17:11:20.000000000 +0000 -@@ -54,6 +54,7 @@ struct rpmfc_s { - - rpmds provides; /*!< (no. provides) package provides */ - rpmds requires; /*!< (no. requires) package requires */ -+ rpmds supplements; /*!< (no. supplements) package supplements */ - }; - - struct rpmfcTokens_s { -@@ -481,6 +482,14 @@ static int rpmfcHelper(rpmfc fc, unsigne - dsContext = RPMSENSE_FIND_REQUIRES; - tagN = RPMTAG_REQUIRENAME; - break; -+ case 'S': -+ if (fc->skipProv) -+ return 0; -+ depname = "supplements"; -+ depsp = &fc->supplements; -+ dsContext = RPMSENSE_FIND_REQUIRES|RPMSENSE_STRONG|RPMSENSE_MISSINGOK; -+ tagN = RPMTAG_ENHANCESNAME; -+ break; - } - - /* If the entire path is filtered out, there's nothing more to do */ -@@ -752,6 +761,7 @@ rpmfc rpmfcFree(rpmfc fc) - - fc->provides = rpmdsFree(fc->provides); - fc->requires = rpmdsFree(fc->requires); -+ fc->supplements = rpmdsFree(fc->supplements); - } - fc = _free(fc); - return NULL; -@@ -804,6 +814,7 @@ rpmRC rpmfcApply(rpmfc fc) - for (ARGV_t fattr = fc->fattrs[fc->ix]; fattr && *fattr; fattr++) { - xx += rpmfcHelper(fc, 'P', *fattr); - xx += rpmfcHelper(fc, 'R', *fattr); -+ xx += rpmfcHelper(fc, 'S', *fattr); - } - } - -@@ -846,6 +857,11 @@ rpmRC rpmfcApply(rpmfc fc) - dix = rpmdsFind(fc->requires, ds); - ds = rpmdsFree(ds); - break; -+ case 'S': -+ ds = rpmdsSingle(RPMTAG_ENHANCESNAME, N, EVR, Flags); -+ dix = rpmdsFind(fc->supplements, ds); -+ ds = rpmdsFree(ds); -+ break; - } - - /* XXX assertion incorrect while generating -debuginfo deps. */ -@@ -1357,6 +1373,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec - } - } - -+ /* Add Supplements: */ -+ if (fc->supplements != NULL && rpmdsCount(fc->supplements) > 0 && !fc->skipReq) { -+ rpmds pi = rpmdsInit(fc->supplements); -+ while (rpmdsNext(pi) >= 0) { -+ rpmsenseFlags flags = rpmdsFlags(pi); -+ -+ headerPutString(pkg->header, RPMTAG_ENHANCESNAME, rpmdsN(pi)); -+ headerPutString(pkg->header, RPMTAG_ENHANCESVERSION, rpmdsEVR(pi)); -+ headerPutUint32(pkg->header, RPMTAG_ENHANCESFLAGS, &flags, 1); -+ } -+ } -+ - /* Add dependency dictionary(#dependencies) */ - if (rpmtdFromArgi(&td, RPMTAG_DEPENDSDICT, fc->ddictx)) { - assert(rpmtdType(&td) == RPM_INT32_TYPE); diff --git a/firmware.diff b/firmware.diff deleted file mode 100644 index 13f7bae..0000000 --- a/firmware.diff +++ /dev/null @@ -1,37 +0,0 @@ -Index: autodeps/linux.prov -=================================================================== ---- autodeps/linux.prov.orig 2011-06-08 13:28:10.000000000 +0200 -+++ autodeps/linux.prov 2011-06-08 13:28:51.755445342 +0200 -@@ -11,6 +11,7 @@ solist=($(printf "%s\n" "${filelist[@]}" - pythonlist= - tcllist= - monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) -+firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) - - # - # --- Alpha does not mark 64bit dependencies -@@ -59,6 +60,11 @@ done | sort -u - printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.prov | sort -u - - # -+# --- firmware files -+[ -x /usr/lib/rpm/firmware.prov -a -n "$firmwarelist" ] && -+ printf "%s\n" "${firmwarelist[@]}" | /usr/lib/rpm/firmware.prov | sort -u -+ -+# - # --- Mono exes/dlls - : ${MONO_PREFIX=/usr} - if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then -Index: scripts/firmware.prov -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ scripts/firmware.prov 2011-06-08 13:28:33.117204009 +0200 -@@ -0,0 +1,8 @@ -+#!/bin/sh -+# Add firmware files in /lib/firmware into RPM provides -+ -+while read instfile ; do -+ case $instfile in -+ */lib/firmware/*) test -f "$instfile" && echo "firmware(${instfile##*/lib/firmware/})" ;; -+ esac -+done diff --git a/fontprovides.diff b/fontprovides.diff deleted file mode 100644 index a22cb85..0000000 --- a/fontprovides.diff +++ /dev/null @@ -1,54 +0,0 @@ -Index: autodeps/linux.prov -=================================================================== ---- autodeps/linux.prov.orig 2011-06-08 13:37:46.951974468 +0200 -+++ autodeps/linux.prov 2011-06-08 13:37:46.967972960 +0200 -@@ -15,6 +15,8 @@ pythonlist=($(printf "%s\n" "${filelist[ - tcllist= - monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) - firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) -+pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$')) -+fontlist=($(printf "%s\n" "${filelist[@]}" | egrep -i "/usr/share/fonts/.*\.(ttf|otf|pfa)$")) - - # - # --- Alpha does not mark 64bit dependencies -@@ -80,6 +82,16 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo - fi - - # -+# --- pkgconfig provides -+[ -x /usr/lib/rpm/pkgconfigdeps.sh -a -n "$pkgconfiglist" ] && -+ printf "%s\n" "${pkgconfiglist[@]}" | /usr/lib/rpm/pkgconfigdeps.sh -P | sort -u -+ -+# -+# --- font provides -+[ -x /usr/lib/rpm/fontconfig.prov -a -n "$fontlist" ] && -+ printf "%s\n" "${fontlist[@]}" | /usr/lib/rpm/fontconfig.prov | sort -u -+ -+# - # --- Kernel module exported symbols - [ -x /usr/lib/rpm/find-provides.ksyms ] && - printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" -Index: autodeps/linux.req -=================================================================== ---- autodeps/linux.req.orig 2011-06-08 13:37:46.951974468 +0200 -+++ autodeps/linux.req 2011-06-08 13:37:46.968972865 +0200 -@@ -34,6 +34,7 @@ perllist=() - pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) - tcllist=() - monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) -+pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$')) - - # - # --- Alpha does not mark 64bit dependencies -@@ -143,6 +144,11 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo - fi - - # -+# --- pkgconfig requires -+[ -x /usr/lib/rpm/pkgconfigdeps.sh -a -n "$pkgconfiglist" ] && -+ printf "%s\n" "${pkgconfiglist[@]}" | /usr/lib/rpm/pkgconfigdeps.sh -R | sort -u -+ -+# - # --- Kernel module imported symbols - [ -x ${0%/*}/find-requires.ksyms ] && - printf "%s\n" "${filelist[@]}" | ${0%/*}/find-requires.ksyms "$@" diff --git a/forkfailed.diff b/forkfailed.diff new file mode 100644 index 0000000..f5af4d0 --- /dev/null +++ b/forkfailed.diff @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..44b246f --- /dev/null +++ b/getcwdresult.diff @@ -0,0 +1,30 @@ +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 new file mode 100644 index 0000000..23bc798 --- /dev/null +++ b/ghost.diff @@ -0,0 +1,17 @@ +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 new file mode 100644 index 0000000..e587fdd --- /dev/null +++ b/globlstat.diff @@ -0,0 +1,18 @@ +Always use lstat in glob call to work around a change in glibc's +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) + pglob->gl_readdir = Readdir; + pglob->gl_opendir = Opendir; + pglob->gl_lstat = Lstat; +- pglob->gl_stat = Stat; ++ /* always use lstat to glob symlinks */ ++ pglob->gl_stat = Lstat; + /*@=type@*/ + flags |= GLOB_ALTDIRFUNC; + flags &= ~GLOB_TILDE; diff --git a/globoffbyone.diff b/globoffbyone.diff new file mode 100644 index 0000000..3fff8cf --- /dev/null +++ b/globoffbyone.diff @@ -0,0 +1,13 @@ +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/headeradddb.diff b/headeradddb.diff deleted file mode 100644 index af197df..0000000 --- a/headeradddb.diff +++ /dev/null @@ -1,55 +0,0 @@ -Add rpmtsHeaderAddDB and rpmtsHeaderRemoveDB so that -convertdb1 will build again. - ---- lib/rpmts.c.orig 2011-05-12 13:21:03.000000000 +0000 -+++ lib/rpmts.c 2011-05-12 13:26:25.000000000 +0000 -@@ -159,6 +159,24 @@ int rpmtsVerifyDB(rpmts ts) - return rc; - } - -+int rpmtsHeaderAddDB(rpmts ts, Header h) -+{ -+ if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT))) -+ return RPMRC_FAIL; -+ if (rpmdbAdd(rpmtsGetRdb(ts), h) != 0) -+ return RPMRC_FAIL; -+ return RPMRC_OK; -+} -+ -+int rpmtsHeaderRemoveDB(rpmts ts, unsigned int hdrNum) -+{ -+ if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT))) -+ return RPMRC_FAIL; -+ if (rpmdbRemove(rpmtsGetRdb(ts), hdrNum) != 0) -+ return RPMRC_FAIL; -+ return RPMRC_OK; -+} -+ - /* keyp might no be defined. */ - rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, - const void * keyp, size_t keylen) ---- lib/rpmts.h.orig 2011-05-12 13:21:11.000000000 +0000 -+++ lib/rpmts.h 2011-05-12 13:28:32.000000000 +0000 -@@ -264,6 +264,22 @@ int rpmtsRebuildDB(rpmts ts); - int rpmtsVerifyDB(rpmts ts); - - /** \ingroup rpmts -+ * Add a header to the database used by the transaction. -+ * @param ts transaction set -+ * @param h header to add -+ * @return 0 on success -+ */ -+int rpmtsHeaderAddDB(rpmts ts, Header h); -+ -+/** \ingroup rpmts -+ * Remove a header from the database used by the transaction. -+ * @param ts transaction set -+ * @param hdrNum index of header to remove -+ * @return 0 on success -+ */ -+int rpmtsHeaderRemoveDB(rpmts ts, unsigned int hdrNum); -+ -+/** \ingroup rpmts - * Return transaction database iterator. - * @param ts transaction set - * @param rpmtag database index tag diff --git a/initdbret.diff b/initdbret.diff new file mode 100644 index 0000000..ac42891 --- /dev/null +++ b/initdbret.diff @@ -0,0 +1,25 @@ +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/initscriptsprov.diff b/initscriptsprov.diff deleted file mode 100644 index 8a5c2f0..0000000 --- a/initscriptsprov.diff +++ /dev/null @@ -1,50 +0,0 @@ ---- ./autodeps/linux.prov.orig 2011-05-11 16:45:13.000000000 +0000 -+++ ./autodeps/linux.prov 2011-05-11 16:51:10.000000000 +0000 -@@ -107,4 +107,9 @@ fi - [ -x /usr/lib/rpm/gstreamer-provides ] && - printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/gstreamer-provides | sort -u - -+# -+# --- Provides of sysvinit scripts -+[ -x /usr/lib/rpm/sysvinitdeps.sh ] && -+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/sysvinitdeps.sh -P | sort -u -+ - exit 0 ---- ./scripts/Makefile.am.orig 2011-05-11 14:46:38.000000000 +0000 -+++ ./scripts/Makefile.am 2011-05-11 16:52:10.000000000 +0000 -@@ -22,6 +22,7 @@ EXTRA_DIST = \ - ocaml-find-requires.sh ocaml-find-provides.sh \ - pkgconfigdeps.sh libtooldeps.sh \ - fontconfig.prov desktop-file.prov script.req \ -+ sysvinitdeps.sh \ - macros.perl macros.php macros.python - - rpmconfig_SCRIPTS = \ -@@ -38,6 +39,7 @@ rpmconfig_SCRIPTS = \ - pkgconfigdeps.sh libtooldeps.sh \ - ocaml-find-requires.sh ocaml-find-provides.sh \ - fontconfig.prov desktop-file.prov script.req \ -+ sysvinitdeps.sh \ - rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg - - rpmconfig_DATA = \ ---- ./scripts/sysvinitdeps.sh.orig 2011-05-11 16:51:10.000000000 +0000 -+++ ./scripts/sysvinitdeps.sh 2011-05-11 16:54:33.000000000 +0000 -@@ -0,0 +1,17 @@ -+#!/bin/sh -+ -+[ "$1" = '-P' -o "$1" = '--provides' ] || { -+ cat > /dev/null -+ exit 0 -+} -+ -+while read file; do -+ case $file in -+ */etc/init.d/*) -+ provs=`grep '^# *Provides:' $file | sed 's,^.*:,,'` -+ for p in $provs; do -+ echo "sysvinit($p)" -+ done -+ ;; -+ esac -+done diff --git a/langnoc.diff b/langnoc.diff deleted file mode 100644 index ab99287..0000000 --- a/langnoc.diff +++ /dev/null @@ -1,127 +0,0 @@ ---- ./macros.in.orig 2011-05-11 15:59:44.000000000 +0000 -+++ ./macros.in 2011-05-11 16:45:30.000000000 +0000 -@@ -1247,6 +1247,7 @@ EOF - # %files -f %{name}.lang - # - %find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot} -+%no_lang_C --without-C - - # Commands + opts to use for retrieving remote files - # Proxy opts can be set through --httpproxy/--httpport popt aliases, ---- ./scripts/find-lang.sh.orig 2011-05-11 14:53:34.000000000 +0000 -+++ ./scripts/find-lang.sh 2011-05-11 16:45:30.000000000 +0000 -@@ -62,6 +62,8 @@ MO= - MO_NAME=$NAME.lang - ALL_NAME=# - NO_ALL_NAME= -+ONLY_C=# -+NO_C=# - - while test $# -gt 0 ; do - case "${1}" in -@@ -98,6 +100,14 @@ while test $# -gt 0 ; do - NO_ALL_NAME=# - shift - ;; -+ --with-only-C ) -+ ONLY_C= -+ shift -+ ;; -+ --without-C ) -+ NO_C= -+ shift -+ ;; - * ) - MO_NAME=${1} - shift -@@ -117,27 +127,32 @@ s:'"$TOP_DIR"':: - '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3: - '"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) %doc \1\2\3: - s:^\([^%].*\):: -+'"$ONLY_C"'/%lang(C)/!d -+'"$NO_C"'/%lang(C)/d - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - - find $TOP_DIR -type d|sed ' - s:'"$TOP_DIR"':: --'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1: -+'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%lang(C) %dir %doc \1: - '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\):: - '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2: --'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir %doc \1: -+'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%lang(C) %dir %doc \1: - '"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\):: - '"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) %doc \1\2: - s:%lang(.*) .*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*:: - s:^\([^%].*\):: -+'"$ONLY_C"'/%lang(C)/!d -+'"$NO_C"'/%lang(C)/d - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - - find $TOP_DIR -type d|sed ' - s:'"$TOP_DIR"':: --'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1: --'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1: -+'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%lang(C) %dir \1: -+'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%lang(C) %dir \1: - s:^\([^%].*\):: -+s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - - find $TOP_DIR -type f|sed ' -@@ -145,6 +160,8 @@ s:'"$TOP_DIR"':: - '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1: - '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: - s:^[^%].*:: -+'"$ONLY_C"'/%lang(C)/!d -+'"$NO_C"'/%lang(C)/d - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - -@@ -157,6 +174,8 @@ s:'"$TOP_DIR"':: - '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: - '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: - s:^\([^%].*\):: -+'"$ONLY_C"'/%lang(C)/!d -+'"$NO_C"'/%lang(C)/d - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - fi -@@ -170,6 +189,8 @@ s:'"$TOP_DIR"':: - '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: - '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: - s:^\([^%].*\):: -+'"$ONLY_C"'/%lang(C)/!d -+'"$NO_C"'/%lang(C)/d - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - fi -@@ -182,6 +203,8 @@ s:'"$TOP_DIR"':: - '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}_[a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: - '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: - s:^[^%].*:: -+'"$ONLY_C"'/%lang(C)/!d -+'"$NO_C"'/%lang(C)/d - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - -@@ -190,6 +213,8 @@ s:'"$TOP_DIR"':: - '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\):: - '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: - s:^\([^%].*\):: -+'"$ONLY_C"'/%lang(C)/!d -+'"$NO_C"'/%lang(C)/d - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - -@@ -197,6 +222,8 @@ 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:^\([^%].*\):: -+'"$ONLY_C"'/%lang(C)/!d -+'"$NO_C"'/%lang(C)/d - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - diff --git a/lazystatfs.diff b/lazystatfs.diff deleted file mode 100644 index 5869a23..0000000 --- a/lazystatfs.diff +++ /dev/null @@ -1,50 +0,0 @@ -Prefer sys/vfs.h, as statvfs stats all filesystems again ---- ./configure.ac.orig 2011-05-12 12:36:32.000000000 +0000 -+++ ./configure.ac 2011-05-12 12:36:42.000000000 +0000 -@@ -402,25 +402,25 @@ dnl - found_struct_statfs=no - - if test X$found_struct_statfs = Xno ; then --dnl Solaris 2.6+ wants to use statvfs -+dnl first try including sys/vfs.h - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #ifdef HAVE_SYS_TYPES_H - #include - #endif --#include ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h) -- AC_DEFINE(STATFS_IN_SYS_STATVFS, 1, -- [statfs in (for solaris 2.6+ systems)]) -+#include ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h) -+ AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in (for linux systems)]) - found_struct_statfs=yes],[]) - fi - - if test X$found_struct_statfs = Xno ; then --dnl first try including sys/vfs.h -+dnl Solaris 2.6+ wants to use statvfs - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #ifdef HAVE_SYS_TYPES_H - #include - #endif --#include ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h) -- AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in (for linux systems)]) -+#include ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h) -+ AC_DEFINE(STATFS_IN_SYS_STATVFS, 1, -+ [statfs in (for solaris 2.6+ systems)]) - found_struct_statfs=yes],[]) - fi - ---- ./lib/transaction.c.orig 2011-05-12 12:36:55.000000000 +0000 -+++ ./lib/transaction.c 2011-05-12 12:38:03.000000000 +0000 -@@ -114,7 +114,11 @@ static rpmDiskSpaceInfo rpmtsCreateDSI(c - dsi->bneeded = 0; - dsi->ineeded = 0; - #ifdef STATFS_HAS_F_BAVAIL -+# ifdef ST_RDONLY - dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail; -+# else -+ dsi->bavail = sfb.f_bavail; -+# endif - #else - /* FIXME: the statfs struct doesn't have a member to tell how many blocks are - * available for non-superusers. f_blocks - f_bfree is probably too big, but diff --git a/legacyprereq.diff b/legacyprereq.diff new file mode 100644 index 0000000..2f7af00 --- /dev/null +++ b/legacyprereq.diff @@ -0,0 +1,16 @@ +Keep RPMSENSE_PREREQ definition to be compatible with older +versions. Maybe not needed. + +diff -ur ./lib/rpmlib.h ../rpm-4.4.2.orig/lib/rpmlib.h +--- ./lib/rpmlib.h 2006-09-21 21:07:18.000000000 +0200 ++++ ../rpm-4.4.2.orig/lib/rpmlib.h 2006-09-21 20:59:00.000000000 +0200 +@@ -517,8 +517,7 @@ + RPMSENSE_EQUAL = (1 << 3), + RPMSENSE_PROVIDES = (1 << 4), /* only used internally by builds */ + RPMSENSE_CONFLICTS = (1 << 5), /* only used internally by builds */ +- /* bit 6 used to be RPMSENSE_PREREQ */ +-#define RPMSENSE_PREREQ RPMSENSE_ANY ++ RPMSENSE_PREREQ = (1 << 6), /*!< @todo Legacy. */ + RPMSENSE_OBSOLETES = (1 << 7), /* only used internally by builds */ + RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet. */ + RPMSENSE_SCRIPT_PRE = ((1 << 9)|RPMSENSE_PREREQ), /*!< %pre dependency. */ diff --git a/localetag.diff b/localetag.diff index c21a9cb..3a2e0fa 100644 --- a/localetag.diff +++ b/localetag.diff @@ -1,21 +1,23 @@ -Convert output to the current locale. Assumes utf8 input if the -decoding works, otherwise iso-8859-1. +Convert changelog and i18n header elements to current locale. +[#43347], rh#140050 ---- ./lib/tagexts.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./lib/tagexts.c 2011-05-10 16:05:30.000000000 +0000 +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 @@ -2,6 +2,7 @@ * \file lib/formats.c */ +#include #include "system.h" + #include "rpmio_internal.h" + #include +@@ -18,6 +19,114 @@ + /*@access pgpDig @*/ + /*@access pgpDigParams @*/ - #include -@@ -150,6 +151,114 @@ exit: - return rc; - } - -+static char * strtolocale(char *str) ++static const char * strtolocale(const char *str) +{ + wchar_t *wstr, *wp; + const unsigned char *cp; @@ -97,7 +99,7 @@ decoding works, otherwise iso-8859-1. + wstr = _free(wstr); + return str; + } -+ str = _free((char *)str); ++ str = _free(str); + memset(&ps, 0, sizeof(ps)); + ccl = cca = 0; + for (wp = wstr; ; wp++) { @@ -120,77 +122,104 @@ decoding works, otherwise iso-8859-1. + } + } + wstr = _free(wstr); -+ return (char *)cc; ++ return (const char *)cc; +} + /** - * Retrieve trigger info. - * @param h header -@@ -435,10 +544,41 @@ static int i18nTag(Header h, rpmTag tag, - #endif + * Identify type of trigger. + * @param type tag type +@@ -1077,6 +1220,7 @@ static int i18nTag(Header h, int_32 tag, - rc = headerGet(h, tag, td, HEADERGET_ALLOC); -+ if (rc && td->data) { -+ td->data = strtolocale(td->data); -+ } - return rc; + if (rc && (*data) != NULL) { + *data = xstrdup(*data); ++ *data = strtolocale(*data); + *freeData = 1; + return 0; + } +@@ -1088,6 +1232,56 @@ static int i18nTag(Header h, int_32 tag, } /** + * Retrieve text and convert to locale. + */ -+static int localeTag(Header h, rpmTag tag, rpmtd td) ++static int localeTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type, ++ /*@out@*/ const void ** data, /*@out@*/ int_32 * count, ++ /*@out@*/ int * freeData) +{ -+ int rc; -+ rc = headerGet(h, tag, td, HEADERGET_ALLOC); -+ if (!rc) -+ return 0; -+ if (td->type == RPM_STRING_TYPE) { -+ td->data = strtolocale(td->data); -+ td->count = 1; -+ } else if (td->type == RPM_STRING_ARRAY_TYPE) { -+ char **arr; -+ int i; -+ arr = xmalloc(td->count * sizeof(*arr)); -+ for (i = 0; i < td->count; i++) { -+ arr[i] = xstrdup(((char **)td->data)[i]); -+ arr[i] = strtolocale(arr[i]); -+ } -+ _free(td->data); -+ td->data = arr; -+ td->flags = RPMTD_ALLOCED | RPMTD_PTR_ALLOCED; ++ HGE_t hge = (HGE_t)headerGetEntryMinMemory; ++ rpmTagType t; ++ char **d, **d2, *dp; ++ int rc, i, l; ++ ++ rc = hge(h, tag, &t, (void **)&d, count); ++ if (!rc || d == NULL || *count == 0) { ++ *freeData = 0; ++ *data = NULL; ++ *count = 0; ++ return 1; + } -+ return rc; ++ if (type) ++ *type = t; ++ if (t == RPM_STRING_TYPE) { ++ d = (char **)xstrdup((char *)d); ++ d = (char **)strtolocale((char *)d); ++ *freeData = 1; ++ } else if (t == RPM_STRING_ARRAY_TYPE) { ++ l = 0; ++ for (i = 0; i < *count; i++) { ++ d[i] = xstrdup(d[i]); ++ d[i] = (char *)strtolocale(d[i]); ++ l += strlen(d[i]) + 1; ++ } ++ d2 = xmalloc(*count * sizeof(char *) + l); ++ dp = (char *)(d2 + *count); ++ for (i = 0; i < *count; i++) { ++ d2[i] = dp; ++ strcpy(dp, d[i]); ++ dp += strlen(dp) + 1; ++ d[i] = _free(d[i]); ++ } ++ d = _free(d); ++ d = d2; ++ *freeData = 1; ++ } else ++ *freeData = 0; ++ *data = (void **)d; ++ return 0; +} + + +/** * Retrieve summary text. * @param h header - * @retval td tag data container -@@ -460,6 +600,16 @@ static int descriptionTag(Header h, rpmt - return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags); + * @retval *type tag type +@@ -1127,6 +1321,20 @@ static int descriptionTag(Header h, /*@o + return i18nTag(h, RPMTAG_DESCRIPTION, type, data, count, freeData); } -+static int changelognameTag(Header h, rpmtd td) ++static int changelognameTag(Header h, /*@out@*/ rpmTagType * type, ++ /*@out@*/ const void ** data, /*@out@*/ int_32 * count, ++ /*@out@*/ int * freeData) +{ -+ return localeTag(h, RPMTAG_CHANGELOGNAME, td); ++ return localeTag(h, RPMTAG_CHANGELOGNAME, type, data, count, freeData); +} + -+static int changelogtextTag(Header h, rpmtd td) ++static int changelogtextTag(Header h, /*@out@*/ rpmTagType * type, ++ /*@out@*/ const void ** data, /*@out@*/ int_32 * count, ++ /*@out@*/ int * freeData) +{ -+ return localeTag(h, RPMTAG_CHANGELOGTEXT, td); ++ return localeTag(h, RPMTAG_CHANGELOGTEXT, type, data, count, freeData); +} + /** * Retrieve group text. * @param h header -@@ -677,6 +827,8 @@ static const struct headerTagFunc_s rpmH - { RPMTAG_LONGARCHIVESIZE, longarchivesizeTag }, - { RPMTAG_LONGSIZE, longsizeTag }, - { RPMTAG_LONGSIGSIZE, longsigsizeTag }, -+ { RPMTAG_CHANGELOGNAME, changelognameTag }, -+ { RPMTAG_CHANGELOGTEXT, changelogtextTag }, - { RPMTAG_DBINSTANCE, dbinstanceTag }, - { RPMTAG_EVR, evrTag }, - { RPMTAG_NVR, nvrTag }, +@@ -1152,6 +1360,8 @@ const struct headerSprintfExtension_s rp + { HEADER_EXT_TAG, "RPMTAG_GROUP", { groupTag } }, + { HEADER_EXT_TAG, "RPMTAG_DESCRIPTION", { descriptionTag } }, + { HEADER_EXT_TAG, "RPMTAG_SUMMARY", { summaryTag } }, ++ { HEADER_EXT_TAG, "RPMTAG_CHANGELOGNAME", { changelognameTag } }, ++ { HEADER_EXT_TAG, "RPMTAG_CHANGELOGTEXT", { changelogtextTag } }, + { HEADER_EXT_TAG, "RPMTAG_FILECLASS", { fileclassTag } }, + { HEADER_EXT_TAG, "RPMTAG_FILECONTEXTS", { filecontextsTag } }, + { HEADER_EXT_TAG, "RPMTAG_FILENAMES", { filenamesTag } }, diff --git a/luanoreadline.diff b/luanoreadline.diff new file mode 100644 index 0000000..72ad014 --- /dev/null +++ b/luanoreadline.diff @@ -0,0 +1,32 @@ +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 new file mode 100644 index 0000000..4d66cb4 --- /dev/null +++ b/luaroot.diff @@ -0,0 +1,75 @@ +Index: lib/psm.c +=================================================================== +--- lib/psm.c.orig ++++ lib/psm.c +@@ -502,6 +502,8 @@ static rpmRC runLuaScript(rpmpsm psm, He + { + const rpmts ts = psm->ts; + int rootFd = -1; ++ int chroot_done; ++ const char *rootDir; + const char *n, *v, *r; + rpmRC rc = RPMRC_OK; + int i; +@@ -511,20 +513,27 @@ static rpmRC runLuaScript(rpmpsm psm, He + + xx = headerNVR(h, &n, &v, &r); + +- if (!rpmtsChrootDone(ts)) { +- const char *rootDir = rpmtsRootDir(ts); +- xx = chdir("/"); ++ chroot_done = rpmtsChrootDone(ts); ++ rootDir = rpmtsRootDir(ts); ++ if (!chroot_done) { ++ if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') { ++ xx = chdir("/"); + /*@-nullpass@*/ +- rootFd = open(".", O_RDONLY, 0); ++ rootFd = open(".", O_RDONLY, 0); + /*@=nullpass@*/ +- if (rootFd >= 0) { +- /*@-superuser -noeffect @*/ +- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') ++ if (rootFd >= 0) { ++ /*@-superuser -noeffect @*/ + xx = chroot(rootDir); +- /*@=superuser =noeffect @*/ +- xx = rpmtsSetChrootDone(ts, 1); ++ /*@=superuser =noeffect @*/ ++ xx = rpmtsSetChrootDone(ts, 1); ++ } + } ++ } else { ++/*@-nullpass@*/ ++ rootFd = open(".", O_RDONLY, 0); ++/*@=nullpass@*/ + } ++ xx = chdir("/"); + + /* Create arg variable */ + rpmluaPushTable(lua, "arg"); +@@ -561,14 +570,19 @@ static rpmRC runLuaScript(rpmpsm psm, He + rpmluaDelVar(lua, "arg"); + + if (rootFd >= 0) { +- const char *rootDir = rpmtsRootDir(ts); + xx = fchdir(rootFd); + xx = close(rootFd); +- /*@-superuser -noeffect @*/ +- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') ++ if (!chroot_done) { ++ /*@-superuser -noeffect @*/ + xx = chroot("."); +- /*@=superuser =noeffect @*/ +- xx = rpmtsSetChrootDone(ts, 0); ++ /*@=superuser =noeffect @*/ ++ xx = rpmtsSetChrootDone(ts, 0); ++ } ++ } ++ if (!chroot_done) { ++ const char *currDir = rpmtsCurrDir(ts); ++ if (currDir != NULL) ++ xx = chdir(currDir); + } + + return rc; diff --git a/macrosin.diff b/macrosin.diff index 3c9fcb5..f8fb3e9 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -1,6 +1,10 @@ ---- ./macros.in.orig 2011-01-03 13:57:41.000000000 +0000 -+++ ./macros.in 2011-05-12 14:32:18.000000000 +0000 -@@ -178,22 +178,22 @@ +SUSE specific macro changes. + +Index: macros.in +=================================================================== +--- macros.in.orig ++++ macros.in +@@ -166,22 +166,22 @@ # Template for debug information sub-package. %debug_package \ @@ -12,7 +16,7 @@ Group: Development/Debug\ AutoReqProv: 0\ -%description debug\ -+#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ ++Requires: %{name} = %{version}-%{release}\ +%description debuginfo\ This package provides debug information for package %{name}.\ Debug information is useful when developing applications that use this\ @@ -23,81 +27,184 @@ -%endif\ %{nil} --%_defaultdocdir %{_datadir}/doc -+%_defaultdocdir %{_datadir}/doc/packages -+%_docdir_fmt %%{NAME} +-%_defaultdocdir %{_usr}/doc ++%_defaultdocdir %{_usr}/doc/packages ++%_docdir_fmt %%{NAME} # The path to the gzip executable (legacy, use %{__gzip} instead). %_gzipbin %{__gzip} -@@ -230,7 +230,7 @@ package or when debugging this package.\ +@@ -218,7 +218,7 @@ package or when debugging this package.\ %_tmppath %{_var}/tmp # Path to top of build area. --%_topdir %{getenv:HOME}/rpmbuild +-%_topdir %{_usrsrc}/redhat +%_topdir %{_usrsrc}/packages # The path to the unzip executable (legacy, use %{__unzip} instead). %_unzipbin %{__unzip} -@@ -333,7 +333,7 @@ package or when debugging this package.\ - # "w7.lzdio" lzma-alone level 7, lzma's default +@@ -323,7 +323,7 @@ package or when debugging this package.\ + # "w9.bzdio" bzip2 level 9. # #%_source_payload w9.gzdio -#%_binary_payload w9.gzdio -+%_binary_payload w5.lzdio ++%_binary_payload w9.bzdio - # Algorithm to use for generating file checksum digests on build. - # If not specified or 0, MD5 is used. -@@ -417,7 +417,7 @@ package or when debugging this package.\ + # 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.\ # # Use internal dependency generator rather than external helpers? -%_use_internal_dependency_generator 1 -+%_use_internal_dependency_generator 1 ++%_use_internal_dependency_generator 0 # # Filter GLIBC_PRIVATE Provides: and Requires: -@@ -463,16 +463,22 @@ print (t)\ - # Undefined, missing or %{nil} will use package content (if available). - %_verify_file_context_path %{__file_context_path} - -+# maxnum,cuttime,minnum -+# 2009/03/01 (SLES11 GA) -+%_binarychangelogtrim 0,1235862000,10 -+ - # - # Path to scripts to autogenerate package dependencies, - # +@@ -420,20 +420,22 @@ print (t)\ # Note: Used iff _use_internal_dependency_generator is zero. - #%__find_provides %{_rpmconfigdir}/rpmdeps --provides - #%__find_requires %{_rpmconfigdir}/rpmdeps --requires --%__find_provides %{_rpmconfigdir}/find-provides --%__find_requires %{_rpmconfigdir}/find-requires -+%__find_provides %{_rpmconfigdir}/find-provides %name -+%__find_requires %{_rpmconfigdir}/find-requires %name + #%__find_provides @RPMCONFIGDIR@/rpmdeps --provides + #%__find_requires @RPMCONFIGDIR@/rpmdeps --requires +-%__find_provides @RPMCONFIGDIR@/find-provides +-%__find_requires @RPMCONFIGDIR@/find-requires ++%__find_provides @RPMCONFIGDIR@/find-provides %name ++%__find_requires @RPMCONFIGDIR@/find-requires %name #%__find_conflicts ??? #%__find_obsoletes ??? +#%__find_supplements ??? +#%__find_enhances ??? - # - # Path to file attribute classifications for automatic dependency -@@ -533,12 +539,12 @@ print (t)\ # + # 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 - # Misc BDB tuning options --%__dbi_other mp_mmapsize=128Mb mp_size=64Mb -+%__dbi_other mp_mmapsize=128Mb mp_size=64Mb + %__python_provides @RPMCONFIGDIR@/pythondeps.sh --provides + %__python_requires @RPMCONFIGDIR@/pythondeps.sh --requires +@@ -591,15 +593,15 @@ print (t)\ + %_dbi_config_Packages %{_dbi_htconfig} lockdbfd --%_dbi_config %{?__dbi_other} -+%_dbi_config %{?__dbi_other} nofsync + # "Depends" is a per-transaction cache of known dependency resolutions. +-%_dbi_config_Depends %{_dbi_htconfig} temporary private ++%_dbi_config_Depends %{_dbi_htconfig} temporary private nofsync - # "Packages" should have shared/exclusive fcntl(2) lock using "lockdbfd". --%_dbi_config_Packages %{?_dbi_config} lockdbfd -+%_dbi_config_Packages %{?__dbi_other} lockdbfd +-%_dbi_config_Dirnames %{_dbi_btconfig} +-%_dbi_config_Requireversion %{_dbi_btconfig} +-%_dbi_config_Provideversion %{_dbi_btconfig} +-%_dbi_config_Installtid %{_dbi_btconfig} +-%_dbi_config_Removetid %{_dbi_btconfig} ++%_dbi_config_Dirnames %{_dbi_btconfig} nofsync ++%_dbi_config_Requireversion %{_dbi_btconfig} nofsync ++%_dbi_config_Provideversion %{_dbi_btconfig} nofsync ++%_dbi_config_Installtid %{_dbi_btconfig} nofsync ++%_dbi_config_Removetid %{_dbi_btconfig} nofsync + +-%_dbi_config %{_dbi_htconfig} ++%_dbi_config %{_dbi_htconfig} nofsync + + # 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 #============================================================================== - # ---- GPG/PGP/PGP5 signature macros. -@@ -857,7 +863,7 @@ print (t)\ + # ---- 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)\ %_build_vendor %{_host_vendor} %_build_os %{_host_os} %_host @host@ @@ -106,10 +213,10 @@ %_host_cpu @host_cpu@ %_host_vendor @host_vendor@ %_host_os @host_os@ -@@ -1020,6 +1026,181 @@ done \ - %python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))") - %python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])") +@@ -1250,12 +1178,191 @@ done \ + %perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) + #------------------------------------------------------------------------------ +# More useful perl macros (from Raul Dias ) +# +%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!") @@ -285,21 +392,20 @@ +run "\\$@"\ +EOF + - #------------------------------------------------------------------------------ ++#------------------------------------------------------------------------------ # arch macro for all Intel i?86 compatibile processors # (Note: This macro (and it's analogues) will probably be obsoleted when -@@ -1030,7 +1211,9 @@ done \ - - #------------------------------------------------------------------------------ - # arch macro for all supported ARM processors --%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l -+%arm armv3l armv4b armv4l armv4tl armv5b armv5l armv5teb armv5tel armv5tejl armv6l armv7l -+%arml armv3l armv4l armv5l armv5tel armv6l armv7l + # 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 - #------------------------------------------------------------------------------ - # arch macro for all supported Sparc processors -@@ -1070,3 +1253,26 @@ done \ + #------------------------------------------------------------------------ + # Use in %install to generate locale specific file lists. For example, +@@ -1270,3 +1377,17 @@ done \ # \endverbatim #*/ @@ -317,12 +423,3 @@ +%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/magic_and_path.diff b/magic_and_path.diff deleted file mode 100644 index de74ea7..0000000 --- a/magic_and_path.diff +++ /dev/null @@ -1,23 +0,0 @@ -Allow "magic_and_path" flag to configure that files must -match both regexpes to be sent to the dependency generator. - ---- build/rpmfc.c.orig 2011-05-16 10:46:20.000000000 +0000 -+++ build/rpmfc.c 2011-05-16 11:02:56.000000000 +0000 -@@ -630,10 +631,13 @@ static void rpmfcAttributes(rpmfc fc, co - continue; - - /* Add attributes on libmagic type & path pattern matches */ -- if (regMatch((*attr)->magic, ftype)) -- argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name); -- if (regMatch((*attr)->path, path)) -- argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name); -+ if ((*attr)->magic && (*attr)->path && hasAttr((*attr)->flags, "magic_and_path")) { -+ if (regMatch((*attr)->magic, ftype) && regMatch((*attr)->path, path)) -+ argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name); -+ } else { -+ if (regMatch((*attr)->magic, ftype) || regMatch((*attr)->path, path)) -+ argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name); -+ } - } - } - diff --git a/missingok.diff b/missingok.diff index 7647696..96133c9 100644 --- a/missingok.diff +++ b/missingok.diff @@ -1,9 +1,9 @@ -support missingok dependency bit +Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7. ---- ./lib/depends.c.orig 2011-02-15 13:10:59.000000000 +0000 -+++ ./lib/depends.c 2011-05-10 16:06:39.000000000 +0000 -@@ -448,8 +448,13 @@ retry: - } +--- ./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: + /*@=boundsread@*/ unsatisfied: - rc = 1; /* dependency is unsatisfied */ @@ -17,14 +17,23 @@ support missingok dependency bit + } exit: - return rc; ---- ./lib/rpmds.h.orig 2011-05-10 16:09:22.000000000 +0000 -+++ ./lib/rpmds.h 2011-05-10 16:08:04.000000000 +0000 -@@ -68,6 +68,7 @@ typedef rpmFlags rpmsenseFlags; + /* +@@ -975,6 +1082,8 @@ static inline /*@observer@*/ const char + return "Requires(postun):"; + if (f & RPMSENSE_SCRIPT_VERIFY) + return "Requires(verify):"; ++ if (f & RPMSENSE_MISSINGOK) ++ return "Requires(hint):"; + 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 { RPMSENSE_SCRIPT_POSTUN | \ RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_FIND_REQUIRES | \ + RPMSENSE_MISSINGOK | \ - RPMSENSE_RPMLIB | \ - RPMSENSE_KEYRING | \ - RPMSENSE_PRETRANS | \ + RPMSENSE_SCRIPT_PREP | \ + RPMSENSE_SCRIPT_BUILD | \ + RPMSENSE_SCRIPT_INSTALL | \ diff --git a/modalias-encode.diff b/modalias-encode.diff deleted file mode 100644 index c92f195..0000000 --- a/modalias-encode.diff +++ /dev/null @@ -1,40 +0,0 @@ -Module aliases (modinfo -F alias ) may contain special characters -that rpm does not allow in dependencies, such as commas. Encode those as -%XX to avoid generating broken dependencies. - -Signed-off-by: Andreas Gruenbacher - -Index: rpm-4.4.2.3/scripts/find-supplements.ksyms -=================================================================== ---- scripts/find-supplements.ksyms -+++ scripts/find-supplements.ksyms -@@ -48,6 +48,21 @@ combine_modaliases() { - print_modaliases "$class" "$variants" "$pos" - } - -+# Encode all characters other than [*:a-zA-Z0-9] in stdin as %XX. -+# (This includes the % character itself, which becomes %25.) -+hexenc() { -+ local line hex -+ -+ while read line; do -+ set -- "" "$line" -+ while [[ "$2" =~ ([*:a-zA-Z0-9]*)([^*:a-zA-Z0-9])(.*) ]]; do -+ hex=$(echo -n "${BASH_REMATCH[2]}" | hexdump -e '"%X"') -+ set -- "$1${BASH_REMATCH[1]}%$hex" "${BASH_REMATCH[3]}" -+ done -+ echo "$1$2" -+ done -+} -+ - aliases_of_filelist() { - modlist=$(mktemp) - have_module=1 -@@ -60,6 +75,7 @@ aliases_of_filelist() { - fi - have_module=0 - /sbin/modinfo -F alias "$module" \ -+ | hexenc \ - | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist - done - if ! test -s "$modlist" && test $have_module = 0; then diff --git a/modalias-kernel_module.diff b/modalias-kernel_module.diff index 524e02e..4add934 100644 --- a/modalias-kernel_module.diff +++ b/modalias-kernel_module.diff @@ -1,17 +1,15 @@ Index: scripts/find-supplements.ksyms =================================================================== ---- scripts/find-supplements.ksyms.orig +--- scripts/find-supplements.ksyms +++ scripts/find-supplements.ksyms -@@ -1,6 +1,8 @@ +@@ -1,5 +1,6 @@ #! /bin/sh -+SPECFILE=${RPMBUILD_SPECFILE:-/usr/src/packages/SOURCES/$1.spec} ++RPM_SOURCE_DIR=/usr/src/packages/SOURCES IFS=$'\n' -+PACKAGE=$1 case "$1" in - kernel-module-*) ;; # Fedora kernel module package names start with -@@ -46,11 +48,54 @@ combine_modaliases() { +@@ -46,11 +47,43 @@ combine_modaliases() { print_modaliases "$class" "$variants" "$pos" } @@ -22,23 +20,12 @@ Index: scripts/find-supplements.ksyms - | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" -done \ +aliases_of_filelist() { -+ modlist=$(mktemp) -+ have_module=1 + for module in $(grep -E '/lib/modules/.+\.ko$'); do + vermagic=$(/sbin/modinfo -F vermagic "$module") + krel=${vermagic%% *} -+ if ! test -x /sbin/modinfo; then -+ echo "ERROR: add module-init-tools to BuildRequires" >&2 -+ exit 1 -+ fi -+ have_module=0 + /sbin/modinfo -F alias "$module" \ -+ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist ++ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" + done -+ if ! test -s "$modlist" && test $have_module = 0; then -+ echo "packageand(kernel-${krel##*-}:$PACKAGE)" -+ fi -+ rm -f $modlist +} + +aliases_of_specfile_macro() { @@ -47,7 +34,7 @@ Index: scripts/find-supplements.ksyms + regex=$( + set -o noglob + set -- $(sed -ne 's:^%supplements_kernel_module[ \t]::p' \ -+ $SPECFILE) ++ $RPM_SOURCE_DIR/$1.spec) + while [ $# -ge 1 ]; do + regex=$(echo "$1" \ + | sed -e 's:[.]:\\.:g' \ diff --git a/modalias.diff b/modalias.diff index abcdefd..ccfe6b6 100644 --- a/modalias.diff +++ b/modalias.diff @@ -1,29 +1,28 @@ ---- ./macros.in.orig 2011-05-11 14:57:08.000000000 +0000 -+++ ./macros.in 2011-05-11 15:01:39.000000000 +0000 -@@ -470,14 +470,18 @@ print (t)\ - # - # Path to scripts to autogenerate package dependencies, - # -+%__set_helper_env %{lua: -+posix.setenv("RPMBUILD_SPECFILE",rpm.expand("%?_specfile")); -+posix.setenv("RPMBUILD_SOURCEDIR",rpm.expand("%?_sourcedir")); -+} - # Note: Used iff _use_internal_dependency_generator is zero. - #%__find_provides %{_rpmconfigdir}/rpmdeps --provides - #%__find_requires %{_rpmconfigdir}/rpmdeps --requires --%__find_provides %{_rpmconfigdir}/find-provides %name --%__find_requires %{_rpmconfigdir}/find-requires %name -+%__find_provides %{__set_helper_env}%{_rpmconfigdir}/find-provides %name -+%__find_requires %{__set_helper_env}%{_rpmconfigdir}/find-requires %name - #%__find_conflicts ??? - #%__find_obsoletes ??? --#%__find_supplements ??? -+%__find_supplements %{__set_helper_env}%{_rpmconfigdir}/find-supplements %name - #%__find_enhances ??? - - # ---- ./scripts/find-supplements.ksyms.orig 2011-05-11 15:01:39.000000000 +0000 -+++ ./scripts/find-supplements.ksyms 2011-05-11 15:01:39.000000000 +0000 +SUSE specific find-supplements, used for kernel builds + +Index: ./scripts/find-supplements +=================================================================== +--- /dev/null ++++ ./scripts/find-supplements +@@ -0,0 +1,14 @@ ++#!/bin/bash ++ ++# This script reads filenames from STDIN and outputs any relevant provides ++# information that needs to be included in the package. ++IFS=$'\n' ++filelist=($(cat)) ++ ++# ++# --- Kernel module hardware identifiers ++# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*) ++[ -x /usr/lib/rpm/find-supplements.ksyms ] && ++ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@" ++ ++exit 0 +Index: ./scripts/find-supplements.ksyms +=================================================================== +--- /dev/null ++++ ./scripts/find-supplements.ksyms @@ -0,0 +1,56 @@ +#! /bin/sh + @@ -81,20 +80,16 @@ +done \ +| sort -u \ +| combine_modaliases ---- ./scripts/find-supplements.orig 2011-05-11 15:01:39.000000000 +0000 -+++ ./scripts/find-supplements 2011-05-11 15:01:39.000000000 +0000 -@@ -0,0 +1,14 @@ -+#!/bin/bash -+ -+# This script reads filenames from STDIN and outputs any relevant provides -+# information that needs to be included in the package. -+IFS=$'\n' -+filelist=($(cat)) -+ -+# -+# --- Kernel module hardware identifiers -+# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*) -+[ -x /usr/lib/rpm/find-supplements.ksyms ] && -+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@" -+ -+exit 0 +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 ebede1f..0bd74c4 100644 --- a/nameversioncompare.diff +++ b/nameversioncompare.diff @@ -1,10 +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 2011-05-12 12:20:01.000000000 +0000 -+++ ./lib/depends.c 2011-05-12 12:26:25.000000000 +0000 -@@ -95,6 +95,24 @@ static rpmdbMatchIterator rpmtsPrunedIte - return mi; +--- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000 ++++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000 +@@ -124,6 +124,24 @@ static int removePackage(rpmts ts, Heade + return 0; } +static int rpmNameVersionCompare(Header first, Header second) @@ -12,23 +12,23 @@ two packages are the same. rh#104066 + const char * one, * two; + int rc; + -+ one = headerGetString(first, RPMTAG_NAME); -+ two = headerGetString(second, RPMTAG_NAME); ++ rc = headerGetEntry(first, RPMTAG_NAME, NULL, (void **) &one, NULL); ++ rc = headerGetEntry(second, RPMTAG_NAME, NULL, (void **) &two, NULL); + rc = strcmp(one, two); + if (rc) + return rc; -+ one = headerGetString(first, RPMTAG_ARCH); -+ two = headerGetString(second, RPMTAG_ARCH); ++ rc = headerGetEntry(first, RPMTAG_ARCH, NULL, (void **) &one, NULL); ++ rc = headerGetEntry(second, RPMTAG_ARCH, NULL, (void **) &two, NULL); + rc = strcmp(one, two); + if (rc) + return rc; + return rpmVersionCompare(first, second); +} + - #define skipColor(_tscolor, _color, _ocolor) \ - ((_tscolor) && (_color) && (_ocolor) && !((_color) & (_ocolor))) - -@@ -111,7 +129,7 @@ static void addUpgradeErasures(rpmts ts, + int rpmtsAddInstallElement(rpmts ts, Header h, + fnpyKey key, int upgrade, rpmRelocation * relocs) + { +@@ -303,7 +322,7 @@ addheader: continue; /* Skip packages that contain identical NEVR. */ @@ -36,13 +36,18 @@ two packages are the same. rh#104066 + if (rpmNameVersionCompare(h, oh) == 0) continue; - removePackage(ts, oh, p); -@@ -150,7 +168,7 @@ static void addObsoleteErasures(rpmts ts + xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey); +@@ -354,11 +373,9 @@ addheader: * If no obsoletes version info is available, match all names. */ if (rpmdsEVR(obsoletes) == NULL -- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { -+ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) { - char * ohNEVRA = headerGetAsString(oh, RPMTAG_NEVRA); - rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n", - rpmdsDNEVR(obsoletes)+2, ohNEVRA); +- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { ++ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) { + const char * ohNEVRA = hGetNEVRA(oh, NULL); +-#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */ +- if (rpmVersionCompare(h, oh)) +-#endif ++ if (rpmNameVersionCompare(h, oh)) + xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey); + /*@-nullptrarith@*/ + rpmMessage(RPMMESS_DEBUG, _(" Obsoletes: %s\t\terases %s\n"), diff --git a/no_rep_autop.diff b/no_rep_autop.diff deleted file mode 100644 index 4027c96..0000000 --- a/no_rep_autop.diff +++ /dev/null @@ -1,12 +0,0 @@ -It seems to be gone... - ---- lib/Makefile.am.orig 2011-05-12 12:59:42.000000000 +0000 -+++ lib/Makefile.am 2011-05-12 12:59:59.000000000 +0000 -@@ -126,7 +126,6 @@ rpmdb_printlog_LDADD = \ - $(top_builddir)/db3/fileops_autop.o \ - $(top_builddir)/db3/hash_autop.o \ - $(top_builddir)/db3/qam_autop.o \ -- $(top_builddir)/db3/rep_autop.o \ - $(top_builddir)/db3/txn_autop.o \ - $(top_builddir)/db3/util_sig.o \ - librpm.la diff --git a/nobuildcolor.diff b/nobuildcolor.diff deleted file mode 100644 index ed58d0d..0000000 --- a/nobuildcolor.diff +++ /dev/null @@ -1,13 +0,0 @@ -Disable file coloring for SUSE systems - ---- build/rpmfc.c.orig 2011-05-13 12:35:29.000000000 +0000 -+++ build/rpmfc.c 2011-05-13 13:49:37.000000000 +0000 -@@ -1312,7 +1312,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec - goto exit; - - /* Add per-file colors(#files) */ -- if (rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) { -+ if (rpmExpandNumeric("%{?_transaction_color}") != 0 && rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) { - rpm_color_t *fcolor; - assert(rpmtdType(&td) == RPM_INT32_TYPE); - /* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */ diff --git a/nodefattr.diff b/nodefattr.diff new file mode 100644 index 0000000..227668d --- /dev/null +++ b/nodefattr.diff @@ -0,0 +1,15 @@ +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 + + nullAttrRec(&fl.cur_ar); + nullAttrRec(&fl.def_ar); ++#if 0 + dupAttrRec(&root_ar, &fl.def_ar); /* XXX assume %defattr(-,root,root) */ ++#endif + + fl.defVerifyFlags = RPMVERIFY_ALL; + fl.nLangs = 0; diff --git a/nolua.diff b/nolua.diff new file mode 100644 index 0000000..2244136 --- /dev/null +++ b/nolua.diff @@ -0,0 +1,83 @@ +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/nomagiccheck.diff b/nomagiccheck.diff deleted file mode 100644 index 1ae6ccf..0000000 --- a/nomagiccheck.diff +++ /dev/null @@ -1,13 +0,0 @@ -Don't let rpm complain about a missing /etc/magic.mgc file - ---- build/rpmfc.c.orig 2011-05-13 16:33:20.000000000 +0000 -+++ build/rpmfc.c 2011-05-13 16:33:55.000000000 +0000 -@@ -896,7 +896,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t arg - { - ARGV_t fcav = NULL; - int xx; -- int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS; -+ int msflags = MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS; - magic_t ms = NULL; - rpmRC rc = RPMRC_FAIL; - diff --git a/noneon.diff b/noneon.diff new file mode 100644 index 0000000..b1ff9ca --- /dev/null +++ b/noneon.diff @@ -0,0 +1,292 @@ +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/noprereqdeprec.diff b/noprereqdeprec.diff deleted file mode 100644 index 5d38711..0000000 --- a/noprereqdeprec.diff +++ /dev/null @@ -1,22 +0,0 @@ -Not deprecated for SUSE builds. - ---- ./build/parsePreamble.c.orig 2011-05-11 15:59:08.000000000 +0000 -+++ ./build/parsePreamble.c 2011-05-11 16:35:47.000000000 +0000 -@@ -891,7 +891,7 @@ static struct PreambleRec_s const preamb - {RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")}, - {RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")}, - {RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")}, -- {RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")}, -+ {RPMTAG_PREREQ, 2, 0, LEN_AND_STR("prereq")}, - {RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")}, - {RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")}, - {RPMTAG_PREFIXES, 0, 0, LEN_AND_STR("prefixes")}, -@@ -900,7 +900,7 @@ static struct PreambleRec_s const preamb - {RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarchitectures")}, - {RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarch")}, - {RPMTAG_BUILDCONFLICTS, 0, 0, LEN_AND_STR("buildconflicts")}, -- {RPMTAG_BUILDPREREQ, 0, 1, LEN_AND_STR("buildprereq")}, -+ {RPMTAG_BUILDPREREQ, 0, 0, LEN_AND_STR("buildprereq")}, - {RPMTAG_BUILDREQUIRES, 0, 0, LEN_AND_STR("buildrequires")}, - {RPMTAG_AUTOREQPROV, 0, 0, LEN_AND_STR("autoreqprov")}, - {RPMTAG_AUTOREQ, 0, 0, LEN_AND_STR("autoreq")}, diff --git a/nostdoutclose.diff b/nostdoutclose.diff new file mode 100644 index 0000000..3810ecf --- /dev/null +++ b/nostdoutclose.diff @@ -0,0 +1,13 @@ +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 new file mode 100644 index 0000000..abd73dd --- /dev/null +++ b/obeynodbsync.diff @@ -0,0 +1,14 @@ +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 new file mode 100644 index 0000000..156e274 --- /dev/null +++ b/openallbuttemp.diff @@ -0,0 +1,55 @@ +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 new file mode 100644 index 0000000..050189d --- /dev/null +++ b/patchrpms.diff @@ -0,0 +1,743 @@ +Add support for patch rpms. Maybe not needed that much any more, +as delta rpms are more efficient and do not need so much evil +rpm patchery. +rh#103205 + +Index: lib/depends.c +=================================================================== +--- lib/depends.c.orig ++++ lib/depends.c +@@ -159,6 +159,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea + const char * os; + rpmds oldChk, newChk; + rpmds obsoletes; ++ rpmds patches; + alKey pkgKey; /* addedPackages key */ + int xx; + int ec = 0; +@@ -387,6 +388,40 @@ addheader: + } + obsoletes = rpmdsFree(obsoletes); + ++ patches = rpmdsLink(rpmteDS(p, RPMTAG_PATCHESNAME), "Patches"); ++ patches = rpmdsInit(patches); ++ if (patches != NULL) ++ while (rpmdsNext(patches) >= 0) { ++ const char * Name; ++ ++ if ((Name = rpmdsN(patches)) == NULL) ++ continue; /* XXX can't happen */ ++ ++ /* Ignore colored patches not in our rainbow. */ ++ dscolor = rpmdsColor(patches); ++ if (tscolor && dscolor && !(tscolor & dscolor)) ++ continue; ++ ++ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0); ++ ++ xx = rpmdbPruneIterator(mi, ++ ts->removedPackages, ts->numRemovedPackages, 1); ++ ++ while((oh = rpmdbNextIterator(mi)) != NULL) { ++ /* Ignore colored packages not in our rainbow. */ ++ ohcolor = hGetColor(oh); ++ if (tscolor && hcolor && ohcolor && !(hcolor & ohcolor)) ++ /*@innercontinue@*/ continue; ++ if (rpmdsEVR(patches) == NULL ++ || rpmdsNVRMatchesDep(oh, patches, _rpmds_nopromote)) { ++ if (rpmVersionCompare(h, oh)) ++ xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey); ++ } ++ } ++ mi = rpmdbFreeIterator(mi); ++ } ++ patches = rpmdsFree(patches); ++ + ec = 0; + + exit: +@@ -644,6 +679,57 @@ exit: + return rc; + } + ++static int checkPatchDeps(rpmts ts, rpmte p, int reportprobs) ++{ ++ const char * Name; ++ Header h; ++ rpmds patches; ++ rpmds this; ++ rpmdbMatchIterator mi; ++ ++ patches = rpmdsInit(rpmteDS(p, RPMTAG_PATCHESNAME)); ++ if (!patches) ++ return 0; ++ this = rpmteDS(p, RPMTAG_NAME); ++ ++ mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmdsN(this), 0); ++ while ((h = rpmdbNextIterator(mi)) != NULL) { ++ if (rpmdsNVRMatchesDep(h, this, _rpmds_nopromote)) { ++ rpmdsNotify(this, _("(patch refresh)"), 0); ++ p->hPatched = headerLink(h); ++ p->isPatchRefresh = 1; ++ mi = rpmdbFreeIterator(mi); ++ return 0; ++ } ++ } ++ mi = rpmdbFreeIterator(mi); ++ ++ while (rpmdsNext(patches) >= 0) { ++ if ((Name = rpmdsN(patches)) == NULL) ++ return 1; /* XXX can't happen */ ++ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0); ++ while ((h = rpmdbNextIterator(mi)) != NULL) { ++ if (rpmdsNVRMatchesDep(h, patches, _rpmds_nopromote)) { ++ rpmdsNotify(patches, _("(db package)"), 0); ++ p->hPatched = headerLink(h); ++ p->isPatchRefresh = 0; ++ mi = rpmdbFreeIterator(mi); ++ return 0; ++ } ++ } ++ mi = rpmdbFreeIterator(mi); ++ } ++ ++ rpmdsNotify(patches, NULL, 1); ++ if (reportprobs) { ++ patches = rpmdsInit(patches); ++ rpmdsNext(patches); ++ rpmdsProblem(ts->probs, rpmteNEVR(p), patches, NULL, 1); ++ } ++ return 0; ++} ++ ++ + /** + * Check added requires/conflicts against against installed+added packages. + * @param ts transaction set +@@ -1727,6 +1813,7 @@ int rpmtsCheck(rpmts ts) + rpmteDS(p, RPMTAG_CONFLICTNAME), + NULL, + tscolor, 1); ++ rc |= checkPatchDeps(ts, p, 1); + if (rc) + goto exit; + +@@ -1824,3 +1911,22 @@ exit: + /*@=branchstate@*/ + return rc; + } ++ ++void rpmtsPatchCheck(rpmts ts) ++{ ++ int closeatexit = 0; ++ rpmtsi pi = NULL; rpmte p; ++ ++ if (rpmtsGetRdb(ts) == NULL && ts->dbmode != -1) { ++ if ((rpmtsOpenDB(ts, ts->dbmode)) != 0) ++ return; ++ closeatexit = 1; ++ } ++ pi = rpmtsiInit(ts); ++ while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) ++ if (p->key) /* key is filename for install, zero for verify */ ++ (void)checkPatchDeps(ts, p, 0); ++ pi = rpmtsiFree(pi); ++ if (closeatexit) ++ (void)rpmtsCloseDB(ts); ++} +Index: lib/formats.c +=================================================================== +--- lib/formats.c.orig ++++ lib/formats.c +@@ -232,6 +232,8 @@ static /*@only@*/ char * fflagsFormat(in + strcat(buf, "l"); + if (anint & RPMFILE_README) + strcat(buf, "r"); ++ if (anint & RPMFILE_UNPATCHED) ++ strcat(buf, "u"); + /*@=boundswrite@*/ + + val = xmalloc(5 + padding); +Index: lib/fsm.c +=================================================================== +--- lib/fsm.c.orig ++++ lib/fsm.c +@@ -707,7 +707,7 @@ assert(rpmteType(fi->te) == TR_ADDED); + break; + + case FA_BACKUP: +- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */ ++ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */ + switch (rpmteType(fi->te)) { + case TR_ADDED: + fsm->osuffix = SUFFIX_RPMORIG; +@@ -720,13 +720,13 @@ assert(rpmteType(fi->te) == TR_ADDED); + + case FA_ALTNAME: + assert(rpmteType(fi->te) == TR_ADDED); +- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */ ++ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */ + fsm->nsuffix = SUFFIX_RPMNEW; + break; + + case FA_SAVE: + assert(rpmteType(fi->te) == TR_ADDED); +- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */ ++ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */ + fsm->osuffix = SUFFIX_RPMSAVE; + break; + case FA_ERASE: +@@ -1740,7 +1740,7 @@ int fsmStage(FSM_t fsm, fileStage stage) + } + + if (fsm->goal == FSM_PKGBUILD) { +- if (fsm->fflags & RPMFILE_GHOST) /* XXX Don't if %ghost file. */ ++ if (fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED)) /* XXX Don't if %ghost file. */ + break; + if (!S_ISDIR(st->st_mode) && st->st_nlink > 1) { + struct hardLink_s * li, * prev; +Index: lib/poptQV.c +=================================================================== +--- lib/poptQV.c.orig ++++ lib/poptQV.c +@@ -171,6 +171,7 @@ static void queryArgCallback(poptContext + case 'l': qva->qva_flags |= QUERY_FOR_LIST; break; + case 's': qva->qva_flags |= QUERY_FOR_STATE | QUERY_FOR_LIST; + break; ++ case 'P': qva->qva_flags |= QUERY_FOR_PATCHES; break; + case POPT_DUMP: qva->qva_flags |= QUERY_FOR_DUMPFILES | QUERY_FOR_LIST; + break; + +@@ -278,6 +279,8 @@ struct poptOption rpmQueryPoptTable[] = + N_("skip %%readme files"), NULL }, + #endif + ++ { "patches", 'P', 0, 0, 'P', ++ N_("list patches or patched files "), NULL }, + { "qf", '\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, 0, + POPT_QUERYFORMAT, NULL, NULL }, + { "queryformat", '\0', POPT_ARG_STRING, 0, POPT_QUERYFORMAT, +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; + ++ /* If querying patches, skip unpatched files. */ ++ if ((qva->qva_flags & QUERY_FOR_PATCHES) && (fflags & RPMFILE_UNPATCHED)) ++ continue; ++ + /*@-boundswrite@*/ + if (!rpmIsVerbose() && prefix) + te = stpcpy(te, prefix); +@@ -362,6 +366,21 @@ void rpmDisplayQueryTags(FILE * fp) + } + } + ++static int isPatch(Header h) ++{ ++ int i, requiresCount = 0; ++ const char ** requires; ++ ++ if (!headerGetEntry(h, RPMTAG_REQUIRENAME, NULL, (void **) &requires, &requiresCount)) ++ return 0; ++ for (i = 0; i < requiresCount; i++) ++ if (!strcmp("rpmlib(PatchRPMs)", requires[i])) ++ break; ++ if (requiresCount) ++ free(requires); ++ return i < requiresCount; ++} ++ + 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 + h = rpmgiHeader(gi); + if (h == NULL) /* XXX perhaps stricter break instead? */ + continue; ++ if ((qva->qva_flags & QUERY_FOR_PATCHES) != 0 && !isPatch(h)) ++ continue; + 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 + + while ((h = rpmdbNextIterator(qva->qva_mi)) != NULL) { + int rc; ++ if ((qva->qva_flags & QUERY_FOR_PATCHES) != 0 && !isPatch(h)) ++ continue; + if ((rc = qva->qva_showPackage(qva, ts, h)) != 0) + ec = rc; + if (qva->qva_source == RPMQV_DBOFFSET) +@@ -685,7 +708,15 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A + + switch (qva->qva_source) { + case RPMQV_ALL: +- qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0); ++ if ((!argv || !*argv) && (qva->qva_flags & QUERY_FOR_PATCHES) != 0) { ++ qva->qva_gi = rpmgiNew(ts, RPMTAG_REQUIRENAME, "rpmlib(PatchRPMs)", 0); ++ if (qva->qva_gi->mi == NULL) { ++ rpmError(RPMERR_QUERYINFO, _("no patch-rpm installed\n")); ++ break; ++ } ++ } else { ++ qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0); ++ } + qva->qva_rc = rpmgiSetArgs(qva->qva_gi, argv, ftsOpts, RPMGI_NONE); + + if (qva->qva_gi != NULL && (qva->qva_gi->flags & RPMGI_TSADD)) /* Load the ts with headers. */ +Index: lib/rpmcli.h +=================================================================== +--- lib/rpmcli.h.orig ++++ lib/rpmcli.h +@@ -165,7 +165,7 @@ typedef enum rpmQueryFlags_e { + QUERY_SCRIPT = (1 << 18), /*!< verify: from --noscripts */ + QUERY_DIGEST = (1 << 19), /*!< verify: from --nodigest */ + QUERY_SIGNATURE = (1 << 20), /*!< verify: from --nosignature */ +- QUERY_PATCHES = (1 << 21), /*!< verify: from --nopatches */ ++ QUERY_FOR_PATCHES = (1 << 21), /*!< verify: from --patches */ + QUERY_HDRCHK = (1 << 22), /*!< verify: from --nohdrchk */ + /*@=enummemuse@*/ + QUERY_FOR_LIST = (1 << 23), /*!< query: from --list */ +Index: lib/rpmds.c +=================================================================== +--- lib/rpmds.c.orig ++++ lib/rpmds.c +@@ -87,6 +87,10 @@ fprintf(stderr, "*** ds %p\t%s[%d]\n", d + tagEVR = RPMTAG_TRIGGERVERSION; + tagF = RPMTAG_TRIGGERFLAGS; + } else ++ if (ds->tagN == RPMTAG_PATCHESNAME) { ++ tagEVR = RPMTAG_PATCHESVERSION; ++ tagF = RPMTAG_PATCHESFLAGS; ++ } else + return NULL; + + /*@-branchstate@*/ +@@ -325,6 +329,11 @@ rpmds rpmdsNew(Header h, rpmTag tagN, in + tagEVR = RPMTAG_ENHANCESVERSION; + tagF = RPMTAG_ENHANCESFLAGS; + } else ++ if (tagN == RPMTAG_PATCHESNAME) { ++ Type = "patches"; ++ tagEVR = RPMTAG_PATCHESVERSION; ++ tagF = RPMTAG_PATCHESFLAGS; ++ } else + goto exit; + + /*@-branchstate@*/ +@@ -1127,14 +1136,28 @@ void rpmdsProblem(rpmps ps, const char * + if (DNEVR == NULL) DNEVR = "? ?N? ?OP? ?EVR?"; + /*@=branchstate@*/ + +- rpmMessage(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"), +- pkgNEVR, ds->Type, DNEVR+2); +- + switch ((unsigned)DNEVR[0]) { + case 'C': type = RPMPROB_CONFLICT; break; + default: + case 'R': type = RPMPROB_REQUIRES; break; + } ++ if (DNEVR[0] == 'p') { ++ const char *d; ++ char *dn; ++ rpmds pds = rpmdsInit(ds); ++ dn = xstrdup("p "); ++ while (rpmdsNext(pds) >= 0) { ++ d = rpmdsDNEVR(ds) + 2; ++ dn = xrealloc(dn, strlen(dn) + strlen(d) + 4); ++ if (dn[2]) ++ strcat(dn, " | "); ++ strcat(dn, d); ++ } ++ DNEVR = (const char *)dn; ++ } ++ ++ rpmMessage(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"), ++ pkgNEVR, ds->Type, DNEVR+2); + + key = (suggestedKeys ? suggestedKeys[0] : NULL); + rpmpsAppend(ps, type, pkgNEVR, key, NULL, NULL, DNEVR, adding); +Index: lib/rpminstall.c +=================================================================== +--- lib/rpminstall.c.orig ++++ lib/rpminstall.c +@@ -692,6 +692,11 @@ maybe_manifest: + /*@=branchstate@*/ + } + ps = rpmpsFree(ps); ++ } else if (eiu->numRPMS) { ++ /* needed in rpmtsOrder */ ++ rpmalMakeIndex(ts->addedPackages); ++ /* need patch references */ ++ rpmtsPatchCheck(ts); + } + + if (eiu->numRPMS && !(ia->installInterfaceFlags & INSTALL_NOORDER)) { +@@ -797,7 +802,7 @@ int rpmErase(rpmts ts, struct rpmInstall + { int notifyFlags; + notifyFlags = ia->eraseInterfaceFlags | (rpmIsVerbose() ? INSTALL_LABEL : 0 ); + xx = rpmtsSetNotifyCallback(ts, +- rpmShowProgress, (void *) ((long)notifyFlags) ++ rpmShowProgress, (void *) ((long)notifyFlags)) + } + #endif + +Index: lib/rpmlibprov.c +=================================================================== +--- lib/rpmlibprov.c.orig ++++ lib/rpmlibprov.c +@@ -33,6 +33,9 @@ static struct rpmlibProvides_s rpmlibPro + { "rpmlib(PayloadIsBzip2)", "3.0.5-1", + (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), + N_("package payload can be compressed using bzip2.") }, ++ { "rpmlib(PatchRPMs)", "3.0.6-1", ++ (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), ++ N_("understand rpms that replace a subset of files.") }, + { "rpmlib(PayloadFilesHavePrefix)", "4.0-1", + (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), + N_("package payload file(s) have \"./\" prefix.") }, +Index: lib/rpmte.c +=================================================================== +--- lib/rpmte.c.orig ++++ lib/rpmte.c +@@ -64,6 +64,7 @@ static void delTE(rpmte p) + p->NEVRA = _free(p->NEVRA); + + p->h = headerFree(p->h); ++ p->hPatched = headerFree(p->hPatched); + + /*@-boundswrite@*/ + memset(p, 0, sizeof(*p)); /* XXX trash and burn */ +@@ -183,6 +184,9 @@ static void addTE(rpmts ts, rpmte p, Hea + p->requires = rpmdsNew(h, RPMTAG_REQUIRENAME, scareMem); + p->conflicts = rpmdsNew(h, RPMTAG_CONFLICTNAME, scareMem); + p->obsoletes = rpmdsNew(h, RPMTAG_OBSOLETENAME, scareMem); ++ p->patches = rpmdsNew(h, RPMTAG_PATCHESNAME, scareMem | 2); ++ p->hPatched = NULL; ++ p->isPatchRefresh = 0; + + savep = rpmtsSetRelocateElement(ts, p); + p->fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem); +@@ -520,6 +524,9 @@ rpmds rpmteDS(rpmte te, rpmTag tag) + if (tag == RPMTAG_OBSOLETENAME) + return te->obsoletes; + else ++ if (tag == RPMTAG_PATCHESNAME) ++ return te->patches; ++ else + return NULL; + /*@=compdef =refcounttrans =retalias =retexpose =usereleased @*/ + } +Index: lib/rpmte.h +=================================================================== +--- lib/rpmte.h.orig ++++ lib/rpmte.h +@@ -115,6 +115,9 @@ struct rpmte_s { + int autorelocatex; /*!< (TR_ADDED) Auto relocation entry index. */ + /*@refcounted@*/ /*@null@*/ + FD_t fd; /*!< (TR_ADDED) Payload file descriptor. */ ++ rpmds patches; /*!< Patches: dependencies. */ ++ Header hPatched; /*!< (TR_ADDED) Header of package we patch */ ++ int isPatchRefresh; /*!< (TR_ADDED) is a patch refresh */ + + /*@-fielduse@*/ /* LCL: confused by union? */ + union { +Index: lib/transaction.c +=================================================================== +--- lib/transaction.c.orig ++++ lib/transaction.c +@@ -198,6 +198,11 @@ static int handleInstInstalledFiles(cons + int rConflicts; + + rConflicts = reportConflicts; ++ if (rConflicts && p->hPatched && p->isPatchRefresh) { ++ /* If same package (patch refresh) turn off conflicts */ ++ /* Handling of unpatched files not worth the trouble */ ++ rConflicts = 0; ++ } + /* 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) + /*@=compdef =refcounttrans =usereleased @*/ + } + ++static int_32 *dupint32(int_32 *old, int cnt) ++{ ++ int i; ++ int_32 *new = xmalloc(cnt * sizeof(int_32)); ++ for (i = 0; i < cnt; i++) ++ new[i] = old[i]; ++ return new; ++} ++ ++static void patchUnpatchedFiles(Header oldh, Header h, int isRefresh) ++{ ++ int fileCount, oldfileCount, i, j, oldidx, oldidxj; ++ const char ** baseNames, ** dirNames; ++ int_32 * dirIndexes; ++ int_32 * fileMtimes; ++ int_32 * fileSizes; ++ int_32 * fileFlags; ++ char ** fileMd5s; ++ const char ** oldbaseNames, ** olddirNames; ++ int_32 * olddirIndexes; ++ int_32 * oldfileMtimes; ++ int_32 * oldfileSizes; ++ int_32 * oldfileFlags; ++ char ** oldfileMd5s; ++ const char * name, * version, * release; ++ char * evr; ++ int_32 sense; ++ int_32 *epochp; ++ int save = 0; ++ char epoch[20]; ++ const char ** oldpatches, **oldpatchesEVR = NULL; ++ int_32 * oldpatchesFlags; ++ int oldpatchesCount; ++ ++ if (!oldh) { ++ headerRemoveEntry(h, RPMTAG_PATCHESNAME); ++ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS); ++ headerRemoveEntry(h, RPMTAG_PATCHESVERSION); ++#if 1 ++ name = "(none)"; ++ sense = 0; ++ evr = ""; ++ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, &name, 1); ++ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, &sense, 1); ++ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, &evr, 1); ++#endif ++ return; ++ } ++ if (!headerGetEntry(h, RPMTAG_BASENAMES, NULL, ++ (void **) &baseNames, &fileCount)) ++ return; ++ headerGetEntry(h, RPMTAG_DIRNAMES, NULL, ++ (void **) &dirNames, NULL); ++ headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, ++ (void **) &dirIndexes, NULL); ++ headerGetEntry(h, RPMTAG_FILESIZES, NULL, ++ (void **) &fileSizes, NULL); ++ headerGetEntry(h, RPMTAG_FILEMD5S, NULL, ++ (void **) &fileMd5s, NULL); ++ headerGetEntry(h, RPMTAG_FILEMTIMES, NULL, ++ (void **) &fileMtimes, NULL); ++ headerGetEntry(h, RPMTAG_FILEFLAGS, NULL, ++ (void **) &fileFlags, NULL); ++ ++ if (!headerGetEntry(oldh, RPMTAG_BASENAMES, NULL, ++ (void **) &oldbaseNames, &oldfileCount)) ++ return; ++ headerGetEntry(oldh, RPMTAG_DIRNAMES, NULL, ++ (void **) &olddirNames, NULL); ++ headerGetEntry(oldh, RPMTAG_DIRINDEXES, NULL, ++ (void **) &olddirIndexes, NULL); ++ headerGetEntry(oldh, RPMTAG_FILESIZES, NULL, ++ (void **) &oldfileSizes, NULL); ++ headerGetEntry(oldh, RPMTAG_FILEMD5S, NULL, ++ (void **) &oldfileMd5s, NULL); ++ headerGetEntry(oldh, RPMTAG_FILEMTIMES, NULL, ++ (void **) &oldfileMtimes, NULL); ++ headerGetEntry(oldh, RPMTAG_FILEFLAGS, NULL, ++ (void **) &oldfileFlags, NULL); ++ ++ oldidx = -1; ++ oldidxj = 0; ++ for (i = 0; i < fileCount; i++) { ++ if (!(fileFlags[i] & RPMFILE_UNPATCHED)) ++ continue; ++ if (dirIndexes[i] != oldidx) { ++ for (j = 0; j < oldfileCount; j++) ++ if (strcmp(dirNames[dirIndexes[i]], olddirNames[olddirIndexes[j]]) == 0) ++ break; ++ if (j == oldfileCount) { ++ while (i + 1 < fileCount && dirIndexes[i] == dirIndexes[i + 1]) ++ i++; ++ continue; ++ } ++ oldidx = olddirIndexes[j]; ++ oldidxj = j; ++ } ++ for (j = oldidxj; j < oldfileCount; j++) ++ if (olddirIndexes[j] == oldidx && !strcmp(baseNames[i], oldbaseNames[j])) { ++ if (!save) { ++ /* duplicate fileSizes, fileMtimes, fileFlags ++ * so we can modify them */ ++ fileSizes = dupint32(fileSizes, fileCount); ++ fileMtimes = dupint32(fileMtimes, fileCount); ++ fileFlags = dupint32(fileFlags, fileCount); ++ } ++ fileSizes[i] = oldfileSizes[j]; ++ fileMtimes[i] = oldfileMtimes[j]; ++ fileMd5s[i] = oldfileMd5s[j]; ++ fileFlags[i] = oldfileFlags[j] | RPMFILE_UNPATCHED; ++ save = 1; ++ break; ++ } ++ } ++ if (save) { ++ headerModifyEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE, ++ (void *) fileSizes, fileCount); ++ headerModifyEntry(h, RPMTAG_FILEMD5S, RPM_STRING_ARRAY_TYPE, ++ (void *) fileMd5s, fileCount); ++ headerModifyEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE, ++ (void *) fileMtimes, fileCount); ++ headerModifyEntry(h, RPMTAG_FILEFLAGS, RPM_INT32_TYPE, ++ (void *) fileFlags, fileCount); ++ free(fileSizes); ++ free(fileMtimes); ++ free(fileFlags); ++ } ++ free(baseNames); ++ free(dirNames); ++ free(fileMd5s); ++ free(oldbaseNames); ++ free(olddirNames); ++ free(oldfileMd5s); ++ ++ if (isRefresh) { ++ /* same patch installed, this is just a refresh operation */ ++ headerRemoveEntry(h, RPMTAG_PATCHESNAME); ++ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS); ++ headerRemoveEntry(h, RPMTAG_PATCHESVERSION); ++ if (headerGetEntry(oldh, RPMTAG_PATCHESNAME, NULL, (void **) &oldpatches, &oldpatchesCount) && oldpatchesCount) { ++ headerGetEntry(oldh, RPMTAG_PATCHESFLAGS, NULL, (void **) &oldpatchesFlags, &oldpatchesCount); ++ headerGetEntry(oldh, RPMTAG_PATCHESVERSION, NULL, (void **) &oldpatchesEVR, &oldpatchesCount); ++ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, oldpatches, oldpatchesCount); ++ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, oldpatchesFlags, oldpatchesCount); ++ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, oldpatchesEVR, oldpatchesCount); ++ free(oldpatches); ++ free(oldpatchesEVR); ++ } ++ return; ++ } ++ headerNVR(oldh, &name, &version, &release); ++ *epoch = 0; ++ if (headerGetEntry(h, RPMTAG_EPOCH, NULL, (void **) &epochp, NULL)) ++ sprintf(epoch, "%d:", *epochp); ++ evr = xmalloc(strlen(epoch) + strlen(version) + strlen(release) + 2); ++ strcpy(evr, epoch); ++ strcat(evr, version); ++ strcat(evr, "-"); ++ strcat(evr, release); ++ sense = RPMSENSE_EQUAL; ++ headerRemoveEntry(h, RPMTAG_PATCHESNAME); ++ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS); ++ headerRemoveEntry(h, RPMTAG_PATCHESVERSION); ++ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, &name, 1); ++ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, &sense, 1); ++ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, &evr, 1); ++ free(evr); ++} ++ ++ + /** + * 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); + } + psm->fi = rpmfiLink(p->fi, NULL); + ++ if (p->hPatched || rpmteDS(p, RPMTAG_PATCHESNAME)) ++ patchUnpatchedFiles(p->hPatched, p->fi->h, p->isPatchRefresh); + /*@-nullstate@*/ /* FIX: psm->fi may be NULL */ + if (rpmpsmStage(psm, PSM_PKGINSTALL)) { + ourrc++; +Index: doc/rpm.8 +=================================================================== +--- doc/rpm.8.orig ++++ doc/rpm.8 +@@ -68,7 +68,8 @@ rpm \- RPM Package Manager + + + [\fB\fIPACKAGE_NAME\fB\fR] [\fB-a,--all\fR] [\fB-f,--file \fIFILE\fB\fR] +- [\fB-g,--group \fIGROUP\fB\fR] {\fB-p,--package \fIPACKAGE_FILE\fB\fR] ++ [\fB-g,--group \fIGROUP\fB\fR] [\fB-p,--package \fIPACKAGE_FILE\fB\fR] ++ [\fB-P,--patches\fR] + [\fB--fileid \fIMD5\fB\fR] [\fB--hdrid \fISHA1\fB\fR] [\fB--pkgid \fIMD5\fB\fR] [\fB--tid \fITID\fB\fR] + [\fB--querybynumber \fIHDRNUM\fB\fR] [\fB--triggeredby \fIPACKAGE_NAME\fB\fR] + [\fB--whatprovides \fICAPABILITY\fB\fR] [\fB--whatrequires \fICAPABILITY\fB\fR] +@@ -77,7 +78,8 @@ rpm \- RPM Package Manager + .PP + + +- [\fB--changelog\fR] [\fB-c,--configfiles\fR] [\fB-d,--docfiles\fR] [\fB--dump\fR] ++ [\fB--basedon\fR] [\fB--changelog\fR] [\fB-c,--configfiles\fR] ++ [\fB-d,--docfiles\fR] [\fB--dump\fR] + [\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 + the package manifest as additional \fIPACKAGE_FILE\fR + arguments to the query. + .TP ++\fB-P, --patches\fP ++Limit the selected packages to patch-rpms. As a side effect, limit ++the file list to patched files. ++.TP + \fB--pkgid \fIMD5\fB\fR + Query package that contains a given package identifier, i.e. the + \fIMD5\fR digest of the combined header and +@@ -581,6 +587,10 @@ Query all packages that requires \fICAPA + .SS "PACKAGE QUERY OPTIONS:" + .PP + .TP ++\fB--basedon\fR ++Show what packages a patch-rpm is based on. A patch-rpm can only be ++installed if one of the packages it is based on is installed. ++.TP + \fB--changelog\fR + Display change information for the package. + .TP +@@ -618,7 +628,8 @@ Orders the package listing by install ti + packages are at the top. + .TP + \fB-l, --list\fR +-List files in package. ++List files in package. If the \fB\-P\fP option is also given, only ++patched files are shown. + .TP + \fB--provides\fR + List capabilities this package provides. +Index: rpmpopt.in +=================================================================== +--- rpmpopt.in.orig ++++ rpmpopt.in +@@ -76,6 +76,10 @@ rpm alias --supplements --qf \ + "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package supplements" + ++rpm alias --basedon --qf \ ++ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \ ++ --POPTdesc=$"list packages this patch-rpm is based on" ++ + 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 \ + "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package supplements" + ++rpmq alias --basedon --qf \ ++ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \ ++ --POPTdesc=$"list packages this patch-rpm is based on" ++ + 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 \ + "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package supplements" + ++rpmquery alias --basedon --qf \ ++ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \ ++ --POPTdesc=$"list packages this patch-rpm is based on" ++ + rpmquery 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\ diff --git a/payloadformat.diff b/payloadformat.diff new file mode 100644 index 0000000..821978c --- /dev/null +++ b/payloadformat.diff @@ -0,0 +1,40 @@ +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 deleted file mode 100644 index 323c180..0000000 --- a/perlprov.diff +++ /dev/null @@ -1,13 +0,0 @@ -Support a "first version wins" semantics. - ---- ./scripts/perl.prov.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/perl.prov 2011-05-11 15:32:39.000000000 +0000 -@@ -170,7 +170,7 @@ sub process_file { - - $version = $1; - } -- $require{$package} = $version; -+ $require{$package} ||= $version; - } - - # Allow someone to have a variable that defines virtual packages diff --git a/pgpdecodeearly.diff b/pgpdecodeearly.diff new file mode 100644 index 0000000..60adc1b --- /dev/null +++ b/pgpdecodeearly.diff @@ -0,0 +1,18 @@ +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/platformin.diff b/platformin.diff index 77e7828..43c96e1 100644 --- a/platformin.diff +++ b/platformin.diff @@ -1,26 +1,31 @@ -SUSE specific platform changes. +SUSE specific platform changes. The libexecdir definition is probably +wrong, LSB seems to demand "%{_exec_prefix}/lib". ---- ./platform.in.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./platform.in 2011-05-11 15:02:03.000000000 +0000 -@@ -21,7 +21,7 @@ +--- ./platform.in.orig 2005-01-26 03:39:54.000000000 +0000 ++++ ./platform.in 2006-02-17 14:18:30.000000000 +0000 +@@ -17,18 +17,18 @@ %_exec_prefix @exec_prefix@ %_bindir @bindir@ %_sbindir @sbindir@ -%_libexecdir @libexecdir@ -+%_libexecdir %{_exec_prefix}/lib - %_datarootdir @datarootdir@ ++%_libexecdir %{_libdir} %_datadir @datadir@ %_sysconfdir @sysconfdir@ -@@ -33,7 +33,7 @@ + %_sharedstatedir @sharedstatedir@ + %_localstatedir @localstatedir@ + %_lib @LIB@ +-%_libdir @LIBDIR@ ++%_libdir %{_exec_prefix}/%{_lib} + %_includedir @includedir@ %_oldincludedir @oldincludedir@ %_infodir @infodir@ %_mandir @mandir@ --%_initddir %{_sysconfdir}/rc.d/init.d -+%_initddir %{_sysconfdir}/init.d - # Deprecated misspelling, present for backwards compatibility. - %_initrddir %{_initddir} +-%_initrddir %{_sysconfdir}/rc.d/init.d ++%_initrddir %{_sysconfdir}/init.d -@@ -143,3 +143,21 @@ + %_defaultdocdir @DEFAULTDOCDIR@ + +@@ -148,3 +148,21 @@ @mandrake@%_gamesdir games @mandrake@%_gamesbindir %{_prefix}/%{_gamesdir} @mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir} @@ -31,7 +36,7 @@ SUSE specific platform changes. +@SuSE@%__chown_Rhf @__CHOWN_RHF@ +@SuSE@%__chgrp_Rhf @__CHGRP_RHF@ +@SuSE@%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root -+@SuSE@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root ++@SuSE@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@ +@SuSE@%_fixperms %{__chmod} -Rf @FIXPERMS@ +@SuSE@ +@SuSE@#--------------------------------------------------------------------- diff --git a/prereqorder.diff b/prereqorder.diff new file mode 100644 index 0000000..1e73d91 --- /dev/null +++ b/prereqorder.diff @@ -0,0 +1,21 @@ +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 new file mode 100644 index 0000000..79eeba5 --- /dev/null +++ b/probfilter.diff @@ -0,0 +1,14 @@ +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/pythondeps.diff b/pythondeps.diff deleted file mode 100644 index af85219..0000000 --- a/pythondeps.diff +++ /dev/null @@ -1,48 +0,0 @@ -Index: autodeps/linux.prov -=================================================================== ---- autodeps/linux.prov.orig 2011-06-08 13:31:39.000000000 +0200 -+++ autodeps/linux.prov 2011-06-08 13:31:39.191646314 +0200 -@@ -11,7 +11,7 @@ filelist=($(printf "%s\n" "${filelist[@] - solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \ - tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \ - cut -d: -f1)) --pythonlist= -+pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/bin/python.\..$')) - tcllist= - monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) - firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) -@@ -54,8 +54,8 @@ done | sort -u - - # - # --- Python modules. --[ -x /usr/lib/rpm/python.prov -a -n "$pythonlist" ] && -- printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.prov | sort -u -+[ -x /usr/lib/rpm/pythondeps.sh -a -n "$pythonlist" ] && -+ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/pythondeps.sh -P | sort -u - - # - # --- Tcl modules. -Index: autodeps/linux.req -=================================================================== ---- autodeps/linux.req.orig 2011-06-08 13:31:38.000000000 +0200 -+++ autodeps/linux.req 2011-06-08 13:31:39.191646314 +0200 -@@ -31,7 +31,7 @@ liblist=($(printf "%s\0" "${filelist[@]} - - interplist=() - perllist=() --pythonlist=() -+pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) - tcllist=() - monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) - -@@ -127,8 +127,8 @@ done | sort -u - - # - # --- Python modules. --[ -x /usr/lib/rpm/python.req -a -n "$pythonlist" ] && \ -- printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.req | sort -u -+[ -x /usr/lib/rpm/pythondeps.sh -a -n "$pythonlist" ] && \ -+ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/pythondeps.sh -R | sort -u - - # - # --- Tcl modules. diff --git a/querybuffer.diff b/querybuffer.diff new file mode 100644 index 0000000..e3cb3bc --- /dev/null +++ b/querybuffer.diff @@ -0,0 +1,43 @@ +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/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/rebuilddbroot.diff b/rebuilddbroot.diff new file mode 100644 index 0000000..88e5e13 --- /dev/null +++ b/rebuilddbroot.diff @@ -0,0 +1,22 @@ +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 12642dd..161eae2 100644 --- a/refreshtestarch.diff +++ b/refreshtestarch.diff @@ -1,25 +1,24 @@ Also test architecture in "refresh" test when not colored. This allows -updates to different architectures. +updates to different architecture possible again. ---- ./lib/psm.c.orig 2010-12-21 09:50:23.000000000 +0000 -+++ ./lib/psm.c 2011-05-11 12:47:13.000000000 +0000 -@@ -723,6 +723,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - - psm->scriptArg = psm->npkgs_installed + 1; +--- ./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 + assert(psm->mi == NULL); + psm->mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(psm->te), 0); + /* this must match rpmNameVersionCompare in depends.c */ - mi = rpmtsInitIterator(ts, RPMDBI_NAME, rpmteN(psm->te), 0); - xx = rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, + xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, rpmteE(psm->te)); -@@ -730,9 +731,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg + xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_VERSION, RPMMIRE_STRCMP, rpmteV(psm->te)); - xx = rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, + xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, rpmteR(psm->te)); -+ xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, -+ rpmteA(psm->te)); - if (tscolor) { -- xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, -- rpmteA(psm->te)); - xx = rpmdbSetIteratorRE(mi, RPMTAG_OS, RPMMIRE_STRCMP, +- if (tscolor) { +- xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_ARCH, RPMMIRE_STRCMP, ++ xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_ARCH, RPMMIRE_STRCMP, + rpmteA(psm->te)); ++ if (tscolor) { + xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_OS, RPMMIRE_STRCMP, rpmteO(psm->te)); } diff --git a/remove-brp-strips.diff b/remove-brp-strips.diff deleted file mode 100644 index 466a948..0000000 --- a/remove-brp-strips.diff +++ /dev/null @@ -1,16 +0,0 @@ -Subject: remove references to removed brp scripts - -Some brp-scripts are not used in openSUSE, remove references -to it - ---- ./platform.in.orig 2011-05-11 15:02:03.000000000 +0000 -+++ ./platform.in 2011-05-11 15:38:05.000000000 +0000 -@@ -55,8 +55,6 @@ - %__os_install_post \ - %{_rpmconfigdir}/brp-compress \ - %{_rpmconfigdir}/brp-strip %{__strip} \ -- %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \ -- %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \ - %{nil} - - %__spec_install_post\ diff --git a/remove-translations.diff b/remove-translations.diff deleted file mode 100644 index b7453e2..0000000 --- a/remove-translations.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- ./scripts/find-lang.sh.orig 2011-05-11 16:45:30.000000000 +0000 -+++ ./scripts/find-lang.sh 2011-05-11 16:55:14.000000000 +0000 -@@ -122,6 +122,17 @@ fi - MO_NAME_NEW=$MO_NAME.tmp.$$ - rm -f $MO_NAME_NEW - -+# remove languages we do not yet support - but give out statistics -+find $TOP_DIR/usr/share/locale/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/share/locale/'::; /^$/d' | while read dir; do -+ if ! rpm -ql filesystem | egrep -q "/usr/share/locale/$dir"$; then -+ find $TOP_DIR/usr/share/locale/$dir -name *.mo | sed 's:'"$TOP_DIR"'::' | while read file; do -+ echo -n "removing translation $file: " -+ msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null - -+ done -+ rm -rf $TOP_DIR/usr/share/locale/$dir -+ fi -+done -+ - find $TOP_DIR -type f -o -type l|sed ' - s:'"$TOP_DIR"':: - '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3: diff --git a/repackage-nomd5.diff b/repackage-nomd5.diff deleted file mode 100644 index 16e243e..0000000 --- a/repackage-nomd5.diff +++ /dev/null @@ -1,31 +0,0 @@ -Don't complain about a bad md5 sum for repackaged rpms. - ---- ./lib/psm.c.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./lib/psm.c 2011-05-11 16:32:11.000000000 +0000 -@@ -811,6 +811,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - case PSM_PROCESS: - if (psm->goal == PKG_INSTALL) { - FD_t payload = NULL; -+ rpmtransFlags oldtsflags; - - if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB) break; - -@@ -828,6 +829,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - break; - } - -+ oldtsflags = rpmtsFlags(ts); -+ if (headerIsEntry(fi->h, RPMTAG_REMOVETID)) -+ (void) rpmtsSetFlags(ts, oldtsflags | RPMTRANS_FLAG_NOMD5); - rc = fsmSetup(rpmfiFSM(fi), FSM_PKGINSTALL, ts, psm->te, fi, - payload, NULL, &psm->failedFile); - (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS), -@@ -835,6 +839,8 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST), - fdOp(payload, FDSTAT_DIGEST)); - xx = fsmTeardown(rpmfiFSM(fi)); -+ if (headerIsEntry(fi->h, RPMTAG_REMOVETID)) -+ (void) rpmtsSetFlags(ts, oldtsflags); - - saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ - xx = Fclose(payload); diff --git a/requires-ge-macro.diff b/requires-ge-macro.diff deleted file mode 100644 index 51c3e50..0000000 --- a/requires-ge-macro.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- ./macros.in.orig 2011-05-11 15:36:05.000000000 +0000 -+++ ./macros.in 2011-05-11 15:38:44.000000000 +0000 -@@ -1027,7 +1027,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_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.tar.bz2 b/rpm-4.4.2.tar.bz2 new file mode 100644 index 0000000..0659a80 --- /dev/null +++ b/rpm-4.4.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abc1b6a909e904ee220e32cd0c534fe19b8ea7cb2d3e8cfe395e221773e62c8c +size 8955447 diff --git a/rpm-4.9.0.tar.bz2 b/rpm-4.9.0.tar.bz2 deleted file mode 100644 index 5a813cd..0000000 --- a/rpm-4.9.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9af1a56b05fc2c54935062e04a3e02999110c74d00bfd5b5c5ff3a03dde61688 -size 3410799 diff --git a/rpm-beecrypt.diff b/rpm-beecrypt.diff deleted file mode 100644 index ecf9284..0000000 --- a/rpm-beecrypt.diff +++ /dev/null @@ -1,1726 +0,0 @@ ---- ./config.h.in.orig 2011-03-02 06:46:47.000000000 +0000 -+++ ./config.h.in 2011-05-10 15:54:41.000000000 +0000 -@@ -13,6 +13,9 @@ - /* Define to 1 if you have the `basename' function. */ - #undef HAVE_BASENAME - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_BEECRYPT_API_H -+ - /* Define as 1 if you bzip2 1.0 */ - #undef HAVE_BZ2_1_0 - -@@ -77,7 +80,7 @@ - /* Define as 1 if your zlib has gzseek() */ - #undef HAVE_GZSEEK - --/* Define if you have the iconv() function. */ -+/* Define if you have the iconv() function and it works. */ - #undef HAVE_ICONV - - /* Define to 1 if you have the header file. */ -@@ -224,6 +227,10 @@ - */ - #undef LT_OBJDIR - -+/* Define to the sub-directory in which libtool stores uninstalled libraries. -+ */ -+#undef LT_OBJDIR -+ - /* Define to 1 if `major', `minor', and `makedev' are declared in . - */ - #undef MAJOR_IN_MKDEV -@@ -308,6 +315,9 @@ - /* Build with acl support? */ - #undef WITH_ACL - -+/* Build with beecrypt instead of nss3 support? */ -+#undef WITH_BEECRYPT -+ - /* Build with capability support? */ - #undef WITH_CAP - ---- ./configure.ac.orig 2011-03-02 06:46:20.000000000 +0000 -+++ ./configure.ac 2011-05-10 15:54:41.000000000 +0000 -@@ -246,12 +246,43 @@ AC_CHECK_HEADERS([dwarf.h], [ - AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes]) - - #================= -+# Check for beecrypt library if requested. -+AC_ARG_WITH(beecrypt, [ --with-beecrypt build with beecrypt support ],,[with_beecrypt=yes]) -+AC_ARG_WITH(internal_beecrypt, [ --with-internal-beecrypt build with internal beecrypt library ],,[with_internal_beecrypt=yes]) -+AM_CONDITIONAL([WITH_INTERNAL_BEECRYPT],[test "$with_internal_beecrypt" = yes]) -+if test "$with_internal_beecrypt" = yes ; then -+ with_beecrypt=yes -+fi -+AM_CONDITIONAL([WITH_BEECRYPT],[test "$with_beecrypt" = yes]) -+ -+WITH_BEECRYPT_INCLUDE= -+WITH_BEECRYPT_LIB= -+if test "$with_beecrypt" = yes ; then -+ AC_DEFINE(WITH_BEECRYPT, 1, [Build with beecrypt instead of nss3 support?]) -+ if test "$with_internal_beecrypt" = yes ; then -+ WITH_BEECRYPT_INCLUDE="-I\$(top_srcdir)/beecrypt" -+ AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the header file.]) -+ else -+ AC_CHECK_LIB(beecrypt, mpfprintln, [ -+ WITH_BEECRYPT_LIB="-lbeecrypt" -+ ],[ -+ AC_MSG_ERROR([missing required library 'beecrypt']) -+ ]) -+ AC_CHECK_HEADER([beecrypt/api.h], [AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the header file.]) -+ ]) -+ fi -+fi -+AC_SUBST(WITH_BEECRYPT_LIB) -+AC_SUBST(WITH_BEECRYPT_INCLUDE) -+ -+#================= - # Check for NSS library. - # We need nss.h from NSS which needs nspr.h. Unfortunately both glibc and NSS - # have a header named nss.h... so make extra check for NSS's sechash.h - # which we use too and hopefully is slightly more unique to NSS. - WITH_NSS_INCLUDE= - WITH_NSS_LIB= -+if test "$with_beecrypt" != yes ; then - AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [ - AC_MSG_ERROR([missing required NSPR / NSS header]) - ]) -@@ -260,6 +291,7 @@ AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ - ], [ - AC_MSG_ERROR([missing required NSS library 'nss3']) - ]) -+fi - AC_SUBST(WITH_NSS_INCLUDE) - AC_SUBST(WITH_NSS_LIB) - ---- ./rpmio/Makefile.am.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./rpmio/Makefile.am 2011-05-10 15:56:13.000000000 +0000 -@@ -2,6 +2,7 @@ - - AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ - AM_CPPFLAGS += @WITH_NSS_INCLUDE@ -+AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@ - AM_CPPFLAGS += @WITH_LUA_INCLUDE@ - AM_CPPFLAGS += @WITH_POPT_INCLUDE@ - AM_CPPFLAGS += -I$(top_srcdir)/misc -@@ -18,10 +19,17 @@ librpmio_la_SOURCES = \ - rpmstring.c rpmfileutil.c \ - rpmkeyring.c - -+if WITH_BEECRYPT -+librpmio_la_SOURCES += digest_beecrypt.c -+else -+librpmio_la_SOURCES += digest_nss.c -+endif -+ - librpmio_la_LDFLAGS = -version-info 2:0:0 - librpmio_la_LIBADD = \ - ../misc/libmisc.la \ - @WITH_NSS_LIB@ \ -+ @WITH_BEECRYPT_LIB@ \ - @WITH_LUA_LIB@ \ - @WITH_BZ2_LIB@ \ - @WITH_ZLIB_LIB@ \ -@@ -30,6 +38,15 @@ librpmio_la_LIBADD = \ - @WITH_LZMA_LIB@ \ - -lpthread - -+if WITH_INTERNAL_BEECRYPT -+librpmio_la_LIBADD += $(libbeecrypt_la) -+ -+libbeecrypt_la = $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la -+ -+$(top_builddir)/beecrypt/libbeecrypt_nolibdir.la: $(top_builddir)/beecrypt/libbeecrypt.la -+ sed -e 's/libdir=.*/libdir=/' < $(top_builddir)/beecrypt/libbeecrypt.la > $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la -+endif -+ - if WITH_LUAEXT - AM_CPPFLAGS += -I$(top_srcdir)/luaext/ - librpmio_la_LIBADD += $(top_builddir)/luaext/libluaext.la ---- ./rpmio/base64.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./rpmio/base64.c 2011-05-10 15:54:41.000000000 +0000 -@@ -4,8 +4,11 @@ - #include - #include - -+#include "system.h" -+ - #include "rpmio/base64.h" - -+#ifndef WITH_BEECRYPT - - static char base64_encode_value(char value_in) - { -@@ -253,3 +256,4 @@ int main(int argc, char *argv[]) - } - #endif - -+#endif /* WITH_BEECRYPT */ ---- ./rpmio/digest.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./rpmio/digest.c 2011-05-10 16:00:19.000000000 +0000 -@@ -4,25 +4,12 @@ - - #include "system.h" - -+#include - #include "rpmio/digest.h" -+#include "rpmio/rpmio_internal.h" - - #include "debug.h" - --#ifdef SHA_DEBUG --#define DPRINTF(_a) fprintf _a --#else --#define DPRINTF(_a) --#endif -- -- --/** -- * MD5/SHA1 digest private data. -- */ --struct DIGEST_CTX_s { -- rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ -- HASHContext *hashctx; /*!< Internal NSS hash context. */ -- int algo; /*!< Used hash algorithm */ --}; - - #define DIGESTS_MAX 11 - struct rpmDigestBundle_s { -@@ -109,138 +96,3 @@ DIGEST_CTX rpmDigestBundleDupCtx(rpmDige - return dup; - } - --DIGEST_CTX --rpmDigestDup(DIGEST_CTX octx) --{ -- DIGEST_CTX nctx = NULL; -- if (octx) { -- HASHContext *hctx = HASH_Clone(octx->hashctx); -- if (hctx) { -- nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); -- nctx->hashctx = hctx; -- } -- } -- return nctx; --} -- --RPM_GNUC_PURE --static HASH_HashType getHashType(int hashalgo) --{ -- switch (hashalgo) { -- case PGPHASHALGO_MD5: -- return HASH_AlgMD5; -- break; -- case PGPHASHALGO_MD2: -- return HASH_AlgMD2; -- break; -- case PGPHASHALGO_SHA1: -- return HASH_AlgSHA1; -- break; -- case PGPHASHALGO_SHA256: -- return HASH_AlgSHA256; -- break; -- case PGPHASHALGO_SHA384: -- return HASH_AlgSHA384; -- break; -- case PGPHASHALGO_SHA512: -- return HASH_AlgSHA512; -- break; -- case PGPHASHALGO_RIPEMD160: -- case PGPHASHALGO_TIGER192: -- case PGPHASHALGO_HAVAL_5_160: -- default: -- return HASH_AlgNULL; -- break; -- } --} -- --size_t --rpmDigestLength(int hashalgo) --{ -- return HASH_ResultLen(getHashType(hashalgo)); --} -- --DIGEST_CTX --rpmDigestInit(int hashalgo, rpmDigestFlags flags) --{ -- HASH_HashType type = getHashType(hashalgo); -- HASHContext *hashctx = NULL; -- DIGEST_CTX ctx = NULL; -- -- if (type == HASH_AlgNULL || rpmInitCrypto() < 0) -- goto exit; -- -- if ((hashctx = HASH_Create(type)) != NULL) { -- ctx = xcalloc(1, sizeof(*ctx)); -- ctx->flags = flags; -- ctx->algo = hashalgo; -- ctx->hashctx = hashctx; -- HASH_Begin(ctx->hashctx); -- } -- --DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); --exit: -- return ctx; --} -- --int --rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) --{ -- size_t partlen; -- const unsigned char *ptr = data; -- -- if (ctx == NULL) -- return -1; -- --DPRINTF((stderr, "*** Update(%p,%p,%zd) hashctx %p \"%s\"\n", ctx, data, len, ctx->hashctx, ((char *)data))); -- partlen = ~(unsigned int)0xFF; -- while (len > 0) { -- if (len < partlen) { -- partlen = len; -- } -- HASH_Update(ctx->hashctx, ptr, partlen); -- ptr += partlen; -- len -= partlen; -- } -- return 0; --} -- --int --rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) --{ -- unsigned char * digest; -- unsigned int digestlen; -- -- if (ctx == NULL) -- return -1; -- digestlen = HASH_ResultLenContext(ctx->hashctx); -- digest = xmalloc(digestlen); -- --DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); --/* FIX: check rc */ -- HASH_End(ctx->hashctx, digest, (unsigned int *) &digestlen, digestlen); -- -- /* Return final digest. */ -- if (!asAscii) { -- if (lenp) *lenp = digestlen; -- if (datap) { -- *datap = digest; -- digest = NULL; -- } -- } else { -- if (lenp) *lenp = (2*digestlen) + 1; -- if (datap) { -- const uint8_t * s = (const uint8_t *) digest; -- *datap = pgpHexStr(s, digestlen); -- } -- } -- if (digest) { -- memset(digest, 0, digestlen); /* In case it's sensitive */ -- free(digest); -- } -- HASH_Destroy(ctx->hashctx); -- memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ -- free(ctx); -- return 0; --} -- ---- ./rpmio/digest.h.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./rpmio/digest.h 2011-05-10 15:54:41.000000000 +0000 -@@ -1,11 +1,6 @@ - #ifndef _RPMDIGEST_H - #define _RPMDIGEST_H - --#include --#include --#include --#include -- - #include - #include "rpmio/base64.h" - -@@ -42,8 +37,18 @@ struct pgpDig_s { - struct pgpDigParams_s pubkey; - - /* DSA/RSA parameters */ -- SECKEYPublicKey *keydata; -- SECItem *sigdata; -+ void *keydata; -+ void *sigdata; - }; - -+void pgpCleanRSADSA(pgpDig dig); -+ -+int pgpSetSigMpiRSA(pgpDig dig, int num, const uint8_t *p); -+int pgpSetPubMpiRSA(pgpDig dig, int num, const uint8_t *p); -+int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen); -+ -+int pgpSetSigMpiDSA(pgpDig dig, int num, const uint8_t *p); -+int pgpSetPubMpiDSA(pgpDig dig, int num, const uint8_t *p); -+int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen); -+ - #endif /* _RPMDIGEST_H */ ---- ./rpmio/digest_beecrypt.c.orig 2011-05-10 15:54:41.000000000 +0000 -+++ ./rpmio/digest_beecrypt.c 2011-05-10 15:54:41.000000000 +0000 -@@ -0,0 +1,493 @@ -+#include "system.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#if HAVE_BEECRYPT_API_H -+#include -+#include -+#include -+#endif -+ -+#include -+#include "rpmio/digest.h" -+#include "rpmio/rpmio_internal.h" -+ -+#include "debug.h" -+ -+/* interface to beecrpyt crypto framework */ -+ -+/**************************** init ************************************/ -+ -+int rpmInitCrypto(void) { -+ return 0; -+} -+ -+int rpmFreeCrypto(void) { -+ return 0; -+} -+ -+/**************************** helpers ************************************/ -+ -+static inline unsigned int pgpMpiBits(const uint8_t *p) -+{ -+ return ((p[0] << 8) | p[1]); -+} -+ -+static inline size_t pgpMpiLen(const uint8_t *p) -+{ -+ return (2 + ((pgpMpiBits(p)+7)>>3)); -+} -+ -+static inline char * pgpHexCvt(char *t, const byte *s, int nbytes) -+ /*@modifies *t @*/ -+{ -+ static char hex[] = "0123456789abcdef"; -+ while (nbytes-- > 0) { -+ unsigned int i; -+ i = *s++; -+ *t++ = hex[ (i >> 4) & 0xf ]; -+ *t++ = hex[ (i ) & 0xf ]; -+ } -+ *t = '\0'; -+ return t; -+} -+ -+static const char * pgpMpiHex(const byte *p) -+{ -+ static char prbuf[2048]; -+ char *t = prbuf; -+ t = pgpHexCvt(t, p+2, pgpMpiLen(p)-2); -+ return prbuf; -+} -+ -+static int pgpHexSet(int lbits, mpnumber * mpn, const byte * p) -+{ -+ unsigned int mbits = pgpMpiBits(p); -+ unsigned int nbits; -+ unsigned int nbytes; -+ char *t; -+ unsigned int ix; -+ -+ nbits = (lbits > mbits ? lbits : mbits); -+ nbytes = ((nbits + 7) >> 3); -+ t = xmalloc(2*nbytes+1); -+ ix = 2 * ((nbits - mbits) >> 3); -+ -+ if (ix > 0) memset(t, (int)'0', ix); -+ strcpy(t+ix, pgpMpiHex(p)); -+ (void) mpnsethex(mpn, t); -+ t = _free(t); -+ return 0; -+} -+ -+void pgpCleanRSADSA(pgpDig dig) -+{ -+ if (!dig) -+ return; -+ if (dig->keydata) { -+ dig->keydata= _free(dig->keydata); -+ } -+ if (dig->sigdata) { -+ dig->sigdata = _free(dig->sigdata); -+ } -+} -+ -+ -+/****************************** RSA **************************************/ -+ -+struct pgpDigSigRSA_s { -+ mpnumber c; -+}; -+ -+struct pgpDigPubRSA_s { -+ rsapk rsa_pk; -+}; -+ -+int -+pgpSetSigMpiRSA(pgpDig dig, int num, const uint8_t *p) -+{ -+ struct pgpDigSigRSA_s *sig; -+ if (num != 0) -+ return 1; -+ if (!dig->sigdata) -+ dig->sigdata = xcalloc(1, sizeof(*sig)); -+ sig = dig->sigdata; -+ if (!sig) -+ return 1; -+ (void) mpnsethex(&sig->c, pgpMpiHex(p)); -+ return 0; -+} -+ -+int -+pgpSetPubMpiRSA(pgpDig dig, int num, const uint8_t *p) -+{ -+ struct pgpDigPubRSA_s *pub; -+ -+ if (!dig->keydata) -+ dig->keydata = xcalloc(1, sizeof(*pub)); -+ pub = dig->keydata; -+ if (!pub) -+ return 1; -+ switch(num) { -+ case 0: -+ (void) mpbsethex(&pub->rsa_pk.n, pgpMpiHex(p)); -+ return 0; -+ case 1: -+ (void) mpnsethex(&pub->rsa_pk.e, pgpMpiHex(p)); -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+static inline unsigned char nibble(char c) -+{ -+ if (c >= '0' && c <= '9') -+ return (c - '0'); -+ if (c >= 'A' && c <= 'F') -+ return (c - 'A') + 10; -+ if (c >= 'a' && c <= 'f') -+ return (c - 'a') + 10; -+ return 0; -+} -+ -+int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen) -+{ -+ const char * prefix = NULL; -+ int res; -+ mpnumber rsahm; -+ struct pgpDigSigRSA_s *sig; -+ struct pgpDigPubRSA_s *pub; -+ -+ sig = dig->sigdata; -+ pub = dig->keydata; -+ if (!sig || !pub) -+ return 1; -+ -+ switch (dig->signature.hash_algo) { -+ case PGPHASHALGO_MD5: -+ prefix = "3020300c06082a864886f70d020505000410"; -+ break; -+ case PGPHASHALGO_SHA1: -+ prefix = "3021300906052b0e03021a05000414"; -+ break; -+ case PGPHASHALGO_MD2: -+ prefix = "3020300c06082a864886f70d020205000410"; -+ break; -+ case PGPHASHALGO_SHA256: -+ prefix = "3031300d060960864801650304020105000420"; -+ break; -+ case PGPHASHALGO_SHA384: -+ prefix = "3041300d060960864801650304020205000430"; -+ break; -+ case PGPHASHALGO_SHA512: -+ prefix = "3051300d060960864801650304020305000440"; -+ break; -+ /* fallthrough for unsupported / unknown types */ -+ default: -+ return 1; -+ } -+ -+ /* Generate RSA modulus parameter. */ -+ { unsigned int nbits = MP_WORDS_TO_BITS(sig->c.size); -+ unsigned int nb = (nbits + 7) >> 3; -+ byte *buf, *bp; -+ -+ if (nb < 3) -+ return 1; -+ buf = xmalloc(nb); -+ memset(buf, 0xff, nb); -+ buf[0] = 0x00; -+ buf[1] = 0x01; -+ bp = buf + nb - strlen(prefix)/2 - hashlen - 1; -+ if (bp < buf) -+ return 1; -+ *bp++ = 0; -+ for (; *prefix; prefix += 2) -+ *bp++ = (nibble(prefix[0]) << 4) | nibble(prefix[1]); -+ memcpy(bp, hash, hashlen); -+ mpnzero(&rsahm); -+ (void) mpnsetbin(&rsahm, buf, nb); -+ buf = _free(buf); -+ } -+#if HAVE_BEECRYPT_API_H -+ res = rsavrfy(&pub->rsa_pk.n, &pub->rsa_pk.e, &sig->c, &rsahm) == 1 ? 0 : 1; -+#else -+ res = rsavrfy(&pub->rsa_pk, &rsahm, &sig->c) == 1 ? 0 : 1; -+#endif -+ mpnfree(&rsahm); -+ return res; -+} -+ -+ -+/****************************** DSA **************************************/ -+ -+struct pgpDigSigDSA_s { -+ mpnumber r; -+ mpnumber s; -+}; -+ -+struct pgpDigPubDSA_s { -+ mpbarrett p; -+ mpbarrett q; -+ mpnumber g; -+ mpnumber y; -+}; -+ -+int -+pgpSetSigMpiDSA(pgpDig dig, int num, const uint8_t *p) -+{ -+ struct pgpDigSigDSA_s *sig; -+ -+ if (!dig->sigdata) -+ dig->sigdata = xcalloc(1, sizeof(*sig)); -+ sig = dig->sigdata; -+ if (!sig) -+ return 1; -+ switch(num) { -+ case 0: -+ return pgpHexSet(160, &sig->r, p); -+ case 1: -+ return pgpHexSet(160, &sig->s, p); -+ default: -+ return 1; -+ } -+} -+ -+int -+pgpSetPubMpiDSA(pgpDig dig, int num, const uint8_t *p) -+{ -+ struct pgpDigPubDSA_s *pub; -+ -+ if (!dig->keydata) -+ dig->keydata = xcalloc(1, sizeof(*pub)); -+ pub = dig->keydata; -+ if (!pub) -+ return 1; -+ switch(num) { -+ case 0: -+ mpbsethex(&pub->p, pgpMpiHex(p)); -+ return 0; -+ case 1: -+ mpbsethex(&pub->q, pgpMpiHex(p)); -+ return 0; -+ case 2: -+ mpnsethex(&pub->g, pgpMpiHex(p)); -+ return 0; -+ case 3: -+ mpnsethex(&pub->y, pgpMpiHex(p)); -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen) -+{ -+ struct pgpDigSigDSA_s *sig; -+ struct pgpDigPubDSA_s *pub; -+ mpnumber hm; -+ int res; -+ -+ sig = dig->sigdata; -+ pub = dig->keydata; -+ if (!sig || !pub) -+ return 1; -+ mpnzero(&hm); -+ mpnsetbin(&hm, hash, hashlen); -+ res = dsavrfy(&pub->p, &pub->q, &pub->g, &hm, &pub->y, &sig->r, &sig->s) == 1 ? 0 : 1; -+ mpnfree(&hm); -+ return res; -+} -+ -+/**************************** digest ************************************/ -+ -+#ifdef SHA_DEBUG -+#define DPRINTF(_a) fprintf _a -+#else -+#define DPRINTF(_a) -+#endif -+ -+/** -+ * MD5/SHA1 digest private data. -+ */ -+struct DIGEST_CTX_s { -+ rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ -+ int algo; /*!< Used hash algorithm */ -+ uint32_t datalen; /*!< No. bytes in block of plaintext data. */ -+ uint32_t paramlen; /*!< No. bytes of digest parameters. */ -+ uint32_t digestlen; /*!< No. bytes of digest. */ -+ void * param; /*!< Digest parameters. */ -+ int (*Reset) (void * param) -+ /*@modifies param @*/; /*!< Digest initialize. */ -+ int (*Update) (void * param, const byte * data, size_t size) -+ /*@modifies param @*/; /*!< Digest transform. */ -+ int (*Digest) (void * param, /*@out@*/ byte * digest) -+ /*@modifies param, digest @*/; /*!< Digest finish. */ -+}; -+ -+DIGEST_CTX -+rpmDigestDup(DIGEST_CTX octx) -+{ -+ DIGEST_CTX nctx; -+ nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); -+ nctx->param = memcpy(xcalloc(1, nctx->paramlen), octx->param, nctx->paramlen); -+ return nctx; -+} -+ -+size_t -+rpmDigestLength(int hashalgo) -+{ -+ switch (hashalgo) { -+ case PGPHASHALGO_MD5: -+ return 16; -+ case PGPHASHALGO_SHA1: -+ return 20; -+#if HAVE_BEECRYPT_API_H -+ case PGPHASHALGO_SHA256: -+ return 32; -+ case PGPHASHALGO_SHA384: -+ return 48; -+ case PGPHASHALGO_SHA512: -+ return 64; -+#endif -+ default: -+ return 0; -+ } -+} -+ -+DIGEST_CTX -+rpmDigestInit(int hashalgo, rpmDigestFlags flags) -+{ -+ DIGEST_CTX ctx = xcalloc(1, sizeof(*ctx)); -+ int xx; -+ -+ ctx->flags = flags; -+ ctx->algo = hashalgo; -+ -+ switch (hashalgo) { -+ case PGPHASHALGO_MD5: -+ ctx->digestlen = 16; -+ ctx->datalen = 64; -+ ctx->paramlen = sizeof(md5Param); -+ ctx->param = xcalloc(1, ctx->paramlen); -+ ctx->Reset = (void *) md5Reset; -+ ctx->Update = (void *) md5Update; -+ ctx->Digest = (void *) md5Digest; -+ break; -+ case PGPHASHALGO_SHA1: -+ ctx->digestlen = 20; -+ ctx->datalen = 64; -+ ctx->paramlen = sizeof(sha1Param); -+ ctx->param = xcalloc(1, ctx->paramlen); -+ ctx->Reset = (void *) sha1Reset; -+ ctx->Update = (void *) sha1Update; -+ ctx->Digest = (void *) sha1Digest; -+ break; -+#if HAVE_BEECRYPT_API_H -+ case PGPHASHALGO_SHA256: -+ ctx->digestlen = 32; -+ ctx->datalen = 64; -+ ctx->paramlen = sizeof(sha256Param); -+ ctx->param = xcalloc(1, ctx->paramlen); -+ ctx->Reset = (void *) sha256Reset; -+ ctx->Update = (void *) sha256Update; -+ ctx->Digest = (void *) sha256Digest; -+ break; -+ case PGPHASHALGO_SHA384: -+ ctx->digestlen = 48; -+ ctx->datalen = 128; -+ ctx->paramlen = sizeof(sha384Param); -+ ctx->param = xcalloc(1, ctx->paramlen); -+ ctx->Reset = (void *) sha384Reset; -+ ctx->Update = (void *) sha384Update; -+ ctx->Digest = (void *) sha384Digest; -+ break; -+ case PGPHASHALGO_SHA512: -+ ctx->digestlen = 64; -+ ctx->datalen = 128; -+ ctx->paramlen = sizeof(sha512Param); -+ ctx->param = xcalloc(1, ctx->paramlen); -+ ctx->Reset = (void *) sha512Reset; -+ ctx->Update = (void *) sha512Update; -+ ctx->Digest = (void *) sha512Digest; -+ break; -+#endif -+ case PGPHASHALGO_RIPEMD160: -+ case PGPHASHALGO_MD2: -+ case PGPHASHALGO_TIGER192: -+ case PGPHASHALGO_HAVAL_5_160: -+ default: -+ free(ctx); -+ return NULL; -+ } -+ -+ xx = (*ctx->Reset) (ctx->param); -+ -+DPRINTF((stderr, "*** Init(%x) ctx %p param %p\n", flags, ctx, ctx->param)); -+ return ctx; -+} -+ -+/* LCL: ctx->param may be modified, but ctx is abstract @*/ -+int -+rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) -+{ -+ if (ctx == NULL) -+ return -1; -+ -+DPRINTF((stderr, "*** Update(%p,%p,%d) param %p \"%s\"\n", ctx, data, len, ctx->param, ((char *)data))); -+ return (*ctx->Update) (ctx->param, data, len); -+} -+ -+int -+rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) -+{ -+ byte * digest; -+ char * t; -+ int i; -+ -+ if (ctx == NULL) -+ return -1; -+ digest = xmalloc(ctx->digestlen); -+ -+DPRINTF((stderr, "*** Final(%p,%p,%p,%d) param %p digest %p\n", ctx, datap, lenp, asAscii, ctx->param, digest)); -+ /* FIX: check rc */ -+ (void) (*ctx->Digest) (ctx->param, digest); -+ -+ /* Return final digest. */ -+ if (!asAscii) { -+ if (lenp) *lenp = ctx->digestlen; -+ if (datap) { -+ *datap = digest; -+ digest = NULL; -+ } -+ } else { -+ if (lenp) *lenp = (2*ctx->digestlen) + 1; -+ if (datap) { -+ const byte * s = (const byte *) digest; -+ static const char hex[] = "0123456789abcdef"; -+ -+ *datap = t = xmalloc((2*ctx->digestlen) + 1); -+ for (i = 0 ; i < ctx->digestlen; i++) { -+ *t++ = hex[ (unsigned)((*s >> 4) & 0x0f) ]; -+ *t++ = hex[ (unsigned)((*s++ ) & 0x0f) ]; -+ } -+ *t = '\0'; -+ } -+ } -+ if (digest) { -+ memset(digest, 0, ctx->digestlen); /* In case it's sensitive */ -+ free(digest); -+ } -+ memset(ctx->param, 0, ctx->paramlen); /* In case it's sensitive */ -+ free(ctx->param); -+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ -+ free(ctx); -+ return 0; -+} ---- ./rpmio/digest_nss.c.orig 2011-05-10 15:54:41.000000000 +0000 -+++ ./rpmio/digest_nss.c 2011-05-10 15:54:41.000000000 +0000 -@@ -0,0 +1,500 @@ -+#include -+#include -+#include -+#include -+ -+#include "system.h" -+ -+#include -+#include "rpmio/rpmio_internal.h" -+#include "rpmio/digest.h" -+ -+#include "debug.h" -+ -+/* interface to nss crypto framework */ -+ -+/**************************** init ************************************/ -+ -+static int _crypto_initialized = 0; -+static int _new_process = 1; -+ -+/* -+ * Only flag for re-initialization here, in the common case the child -+ * exec()'s something else shutting down NSS here would be waste of time. -+ */ -+static void at_forkchild(void) { -+ _new_process = 1; -+} -+ -+int rpmInitCrypto(void) { -+ int rc = 0; -+ -+ /* Lazy NSS shutdown for re-initialization after fork() */ -+ if (_new_process && _crypto_initialized) { -+ rpmFreeCrypto(); -+ } -+ -+ /* Initialize NSS if not already done */ -+ if (!_crypto_initialized) { -+ if (NSS_NoDB_Init(NULL) != SECSuccess) { -+ rc = -1; -+ } else { -+ _crypto_initialized = 1; -+ } -+ } -+ -+ /* Register one post-fork handler per process */ -+ if (_new_process) { -+ if (pthread_atfork(NULL, NULL, at_forkchild) != 0) { -+ rpmlog(RPMLOG_WARNING, _("Failed to register fork handler: %m\n")); -+ } -+ _new_process = 0; -+ } -+ return rc; -+} -+ -+int rpmInitCrypto(void) { -+ int rc = 0; -+ -+ if (!_crypto_initialized) { -+ if (NSS_NoDB_Init(NULL) != SECSuccess) { -+ rc = -1; -+ } else { -+ _crypto_initialized = 1; -+ } -+ } -+ return rc; -+} -+ -+int rpmFreeCrypto(void) -+{ -+ int rc = 0; -+ if (_crypto_initialized) { -+ rc = (NSS_Shutdown() != SECSuccess); -+ _crypto_initialized = 0; -+ } -+ return rc; -+} -+ -+/**************************** helpers ************************************/ -+ -+static SECKEYPublicKey *pgpNewPublicKey(KeyType type) -+{ -+ PRArenaPool *arena; -+ SECKEYPublicKey *key; -+ -+ arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); -+ if (arena == NULL) -+ return NULL; -+ -+ key = PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey)); -+ -+ if (key == NULL) { -+ PORT_FreeArena(arena, PR_FALSE); -+ return NULL; -+ } -+ -+ key->keyType = type; -+ key->pkcs11ID = CK_INVALID_HANDLE; -+ key->pkcs11Slot = NULL; -+ key->arena = arena; -+ return key; -+} -+ -+static SECItem *pgpMpiItem(PRArenaPool *arena, SECItem *item, const uint8_t *p) -+{ -+ size_t nbytes = pgpMpiLen(p)-2; -+ -+ if (item == NULL) { -+ if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL) -+ return item; -+ } else { -+ if (arena != NULL) -+ item->data = PORT_ArenaGrow(arena, item->data, item->len, nbytes); -+ else -+ item->data = PORT_Realloc(item->data, nbytes); -+ -+ if (item->data == NULL) { -+ if (arena == NULL) -+ SECITEM_FreeItem(item, PR_TRUE); -+ return NULL; -+ } -+ } -+ -+ memcpy(item->data, p+2, nbytes); -+ item->len = nbytes; -+ return item; -+} -+ -+static int pgpMpiSet(unsigned int lbits, -+ void *dest, const uint8_t * p, const uint8_t * pend) -+{ -+ unsigned int mbits = pgpMpiBits(p); -+ unsigned int nbits; -+ size_t nbytes; -+ char *t = dest; -+ unsigned int ix; -+ -+ if ((p + ((mbits+7) >> 3)) > pend) -+ return 1; -+ -+ if (mbits > lbits) -+ return 1; -+ -+ nbits = (lbits > mbits ? lbits : mbits); -+ nbytes = ((nbits + 7) >> 3); -+ ix = (nbits - mbits) >> 3; -+ -+ if (ix > 0) memset(t, '\0', ix); -+ memcpy(t+ix, p+2, nbytes-ix); -+ -+ return 0; -+} -+ -+void pgpCleanRSADSA(pgpDig dig) -+{ -+ if (!dig) -+ return; -+ if (dig->keydata) { -+ SECKEY_DestroyPublicKey(dig->keydata); -+ dig->keydata = NULL; -+ } -+ if (dig->sigdata) { -+ SECITEM_ZfreeItem(dig->sigdata, PR_TRUE); -+ dig->sigdata = NULL; -+ } -+} -+ -+/****************************** RSA **************************************/ -+ -+int -+pgpSetSigMpiRSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) -+{ -+ SECItem *sig; -+ -+ if (num != 0) -+ return 1; -+ sig = dig->rsasigdata; -+ sig = pgpMpiItem(NULL, sig, p); -+ dig->rsasigdata = sig; -+ if (sig == NULL) -+ return 1; -+ return 0; -+} -+ -+int -+pgpSetPubMpiRSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) -+{ -+ SECKEYPublicKey *pub; -+ -+ if (!dig->keydata) -+ dig->keydata = pgpNewPublicKey(rsaKey); -+ pub = dig->keydata; -+ if (!pub) -+ return 1; -+ switch(num) { -+ case 0: -+ pgpMpiItem(pub->arena, &pub->u.rsa.modulus, p); -+ return 0; -+ case 1: -+ pgpMpiItem(pub->arena, &pub->u.rsa.publicExponent, p); -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen) -+{ -+ SECOidTag sigalg; -+ SECItem digest; -+ SECKEYPublicKey *pub; -+ SECItem *sig; -+ SECItem *newsig = NULL; -+ size_t siglen; -+ int res; -+ -+ switch (dig->hash_algo) { -+ case PGPHASHALGO_MD5: -+ sigalg = SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION; -+ break; -+ case PGPHASHALGO_SHA1: -+ sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; -+ break; -+ case PGPHASHALGO_MD2: -+ sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION; -+ break; -+ case PGPHASHALGO_SHA256: -+ sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; -+ break; -+ case PGPHASHALGO_SHA384: -+ sigalg = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; -+ break; -+ case PGPHASHALGO_SHA512: -+ sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; -+ break; -+ /* fallthrough for unsupported / unknown types */ -+ default: -+ sigalg = SEC_OID_UNKNOWN; -+ break; -+ } -+ digest.type = siBuffer; -+ digest.data = hash; -+ digest.len = hashlen; -+ -+ pub = dig->keydata; -+ sig = dig->sigdata; -+ siglen = SECKEY_SignatureLen(dig->keydata); -+ -+ /* Zero-pad signature data up to expected size if necessary */ -+ if (siglen > sig->len) { -+ size_t pad = siglen - sig->len; -+ if ((newsig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { -+ return 1; -+ } -+ memset(newsig->data, 0, pad); -+ memcpy(newsig->data+pad, sig->data, sig->len); -+ sig = newsig; -+ } -+ -+ if (VFY_VerifyDigest(&digest, pub, sig, sigalg, NULL) == SECSuccess) -+ res = 0; -+ else -+ res = 1; -+ -+ if (newsig) { -+ SECITEM_ZfreeItem(newsig, 1); -+ } -+ return res; -+} -+ -+ -+/****************************** DSA **************************************/ -+ -+int -+pgpSetSigMpiDSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) -+{ -+ SECItem *sig, *new; -+ -+ switch(num) { -+ case 0: -+ sig = SECITEM_AllocItem(NULL, NULL, 2*DSA_SUBPRIME_LEN); -+ dig->sigdata = sig; -+ memset(sig->data, 0, 2*DSA_SUBPRIME_LEN); -+ pgpMpiSet(DSA_SUBPRIME_LEN*8, sig->data, p, pend); -+ return 0; -+ case 1: -+ sig = dig->sigdata; -+ if (!sig) -+ return 1; -+ pgpMpiSet(DSA_SUBPRIME_LEN*8, sig->data + DSA_SUBPRIME_LEN, p, pend); -+ new = SECITEM_AllocItem(NULL, NULL, 0); -+ if (!new) -+ return 1; -+ if (DSAU_EncodeDerSig(new, sig) != SECSuccess) -+ return 1; -+ SECITEM_FreeItem(sig, PR_TRUE); -+ dig->sigdata = new; -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+int -+pgpSetPubMpiDSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) -+{ -+ SECKEYPublicKey *pub; -+ -+ if (!dig->keydata) -+ dig->keydata = pgpNewPublicKey(dsaKey); -+ pub = dig->keydata; -+ if (!pub) -+ return 1; -+ switch(num) { -+ case 0: -+ pgpMpiItem(pub->arena, &pub->u.dsa.params.prime, p); -+ return 0; -+ case 1: -+ pgpMpiItem(pub->arena, &pub->u.dsa.params.subPrime, p); -+ return 0; -+ case 2: -+ pgpMpiItem(pub->arena, &pub->u.dsa.params.base, p); -+ return 0; -+ case 3: -+ pgpMpiItem(pub->arena, &pub->u.dsa.publicValue, p); -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen) -+{ -+ SECItem digest; -+ SECKEYPublicKey *pub; -+ SECItem *sig; -+ -+ sig = dig->sigdata; -+ pub = dig->keydata; -+ digest.type = siBuffer; -+ digest.data = hash; -+ digest.len = hashlen; -+ if (VFY_VerifyDigest(&digest, pub, sig, SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, NULL) == SECSuccess) -+ return 0; -+ else -+ return 1; -+} -+ -+ -+/**************************** digest ************************************/ -+ -+ -+#ifdef SHA_DEBUG -+#define DPRINTF(_a) fprintf _a -+#else -+#define DPRINTF(_a) -+#endif -+ -+ -+/** -+ * MD5/SHA1 digest private data. -+ */ -+struct DIGEST_CTX_s { -+ rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ -+ HASHContext *hashctx; /*!< Internal NSS hash context. */ -+ int algo; /*!< Used hash algorithm */ -+}; -+ -+DIGEST_CTX -+rpmDigestDup(DIGEST_CTX octx) -+{ -+ DIGEST_CTX nctx; -+ nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); -+ nctx->hashctx = HASH_Clone(octx->hashctx); -+ if (nctx->hashctx == NULL) { -+ fprintf(stderr, "HASH_Clone failed\n"); -+ exit(EXIT_FAILURE); /* FIX: callers do not bother checking error return */ -+ } -+ return nctx; -+} -+ -+RPM_GNUC_PURE -+static HASH_HashType getHashType(int hashalgo) -+{ -+ switch (hashalgo) { -+ case PGPHASHALGO_MD5: -+ return HASH_AlgMD5; -+ break; -+ case PGPHASHALGO_MD2: -+ return HASH_AlgMD2; -+ break; -+ case PGPHASHALGO_SHA1: -+ return HASH_AlgSHA1; -+ break; -+ case PGPHASHALGO_SHA256: -+ return HASH_AlgSHA256; -+ break; -+ case PGPHASHALGO_SHA384: -+ return HASH_AlgSHA384; -+ break; -+ case PGPHASHALGO_SHA512: -+ return HASH_AlgSHA512; -+ break; -+ case PGPHASHALGO_RIPEMD160: -+ case PGPHASHALGO_TIGER192: -+ case PGPHASHALGO_HAVAL_5_160: -+ default: -+ return HASH_AlgNULL; -+ break; -+ } -+} -+ -+size_t -+rpmDigestLength(int hashalgo) -+{ -+ return HASH_ResultLen(getHashType(hashalgo)); -+} -+ -+DIGEST_CTX -+rpmDigestInit(int hashalgo, rpmDigestFlags flags) -+{ -+ HASH_HashType type; -+ HASHContext *hashctx = NULL; -+ DIGEST_CTX ctx = NULL; -+ -+ if (type == HASH_AlgNULL || rpmInitCrypto() < 0) -+ return NULL; -+ -+ if ((hashctx = HASH_Create(type)) == NULL) -+ return NULL; -+ ctx = xcalloc(1, sizeof(*ctx)); -+ ctx->flags = flags; -+ ctx->algo = hashalgo; -+ ctx->hashctx = hashctx; -+ HASH_Begin(ctx->hashctx); -+ -+DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); -+ return ctx; -+} -+ -+int -+rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) -+{ -+ size_t partlen; -+ const unsigned char *ptr = data; -+ -+ if (ctx == NULL) -+ return -1; -+ -+DPRINTF((stderr, "*** Update(%p,%p,%zd) hashctx %p \"%s\"\n", ctx, data, len, ctx->hashctx, ((char *)data))); -+ partlen = ~(unsigned int)0xFF; -+ while (len > 0) { -+ if (len < partlen) { -+ partlen = len; -+ } -+ HASH_Update(ctx->hashctx, ptr, partlen); -+ ptr += partlen; -+ len -= partlen; -+ } -+ return 0; -+} -+ -+int -+rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) -+{ -+ unsigned char * digest; -+ unsigned int digestlen; -+ -+ if (ctx == NULL) -+ return -1; -+ digestlen = HASH_ResultLenContext(ctx->hashctx); -+ digest = xmalloc(digestlen); -+ -+DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); -+/* FIX: check rc */ -+ HASH_End(ctx->hashctx, digest, (unsigned int *) &digestlen, digestlen); -+ -+ /* Return final digest. */ -+ if (!asAscii) { -+ if (lenp) *lenp = digestlen; -+ if (datap) { -+ *datap = digest; -+ digest = NULL; -+ } -+ } else { -+ if (lenp) *lenp = (2*digestlen) + 1; -+ if (datap) { -+ const uint8_t * s = (const uint8_t *) digest; -+ *datap = pgpHexStr(s, digestlen); -+ } -+ } -+ if (digest) { -+ memset(digest, 0, digestlen); /* In case it's sensitive */ -+ free(digest); -+ } -+ HASH_Destroy(ctx->hashctx); -+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ -+ free(ctx); -+ return 0; -+} ---- ./rpmio/rpmpgp.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./rpmio/rpmpgp.c 2011-05-10 16:01:58.000000000 +0000 -@@ -20,9 +20,6 @@ static int _debug = 0; - - static int _print = 0; - --static int _crypto_initialized = 0; --static int _new_process = 1; -- - typedef const struct pgpValTbl_s { - int val; - char const * const str; -@@ -315,89 +312,6 @@ int pgpValTok(pgpValTbl vs, const char * - } while ((++vs)->val != -1); - return vs->val; - } --/** -- * @return 0 on success -- */ --static int pgpMpiSet(const char * pre, unsigned int lbits, -- uint8_t *dest, const uint8_t * p, const uint8_t * pend) --{ -- unsigned int mbits = pgpMpiBits(p); -- unsigned int nbits; -- size_t nbytes; -- uint8_t *t = dest; -- unsigned int ix; -- -- if ((p + ((mbits+7) >> 3)) > pend) -- return 1; -- -- if (mbits > lbits) -- return 1; -- -- nbits = (lbits > mbits ? lbits : mbits); -- nbytes = ((nbits + 7) >> 3); -- ix = (nbits - mbits) >> 3; -- --if (_debug) --fprintf(stderr, "*** mbits %u nbits %u nbytes %zu ix %u\n", mbits, nbits, nbytes, ix); -- if (ix > 0) memset(t, '\0', ix); -- memcpy(t+ix, p+2, nbytes-ix); --if (_debug) --fprintf(stderr, "*** %s %s\n", pre, pgpHexStr(dest, nbytes)); -- -- return 0; --} -- --/** -- * @return NULL on error -- */ --static SECItem *pgpMpiItem(PRArenaPool *arena, SECItem *item, const uint8_t *p) --{ -- size_t nbytes = pgpMpiLen(p)-2; -- -- if (item == NULL) { -- if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL) -- return item; -- } else { -- if (arena != NULL) -- item->data = PORT_ArenaGrow(arena, item->data, item->len, nbytes); -- else -- item->data = PORT_Realloc(item->data, nbytes); -- -- if (item->data == NULL) { -- if (arena == NULL) -- SECITEM_FreeItem(item, PR_TRUE); -- return NULL; -- } -- } -- -- memcpy(item->data, p+2, nbytes); -- item->len = nbytes; -- return item; --} --/*@=boundswrite@*/ -- --static SECKEYPublicKey *pgpNewPublicKey(KeyType type) --{ -- PRArenaPool *arena; -- SECKEYPublicKey *key; -- -- arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); -- if (arena == NULL) -- return NULL; -- -- key = PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey)); -- -- if (key == NULL) { -- PORT_FreeArena(arena, PR_FALSE); -- return NULL; -- } -- -- key->keyType = type; -- key->pkcs11ID = CK_INVALID_HANDLE; -- key->pkcs11Slot = NULL; -- key->arena = arena; -- return key; --} - - /** \ingroup rpmpgp - * Is buffer at beginning of an OpenPGP packet? -@@ -593,29 +507,16 @@ static int pgpPrtSigParams(pgpTag tag, u - { - const uint8_t * pend = h + hlen; - size_t i; -- SECItem dsaraw; -- unsigned char dsabuf[2*DSA_SUBPRIME_LEN]; - char *mpi; - -- dsaraw.type = 0; -- dsaraw.data = dsabuf; -- dsaraw.len = sizeof(dsabuf); -- - for (i = 0; p < pend; i++, p += pgpMpiLen(p)) { - if (pubkey_algo == PGPPUBKEYALGO_RSA) { - if (i >= 1) break; - if (_dig && - (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT)) - { -- switch (i) { -- case 0: /* m**d */ -- _dig->sigdata = pgpMpiItem(NULL, _dig->sigdata, p); -- if (_dig->sigdata == NULL) -- return 1; -- break; -- default: -- break; -- } -+ if (pgpSetSigMpiRSA(_dig, i, p)) -+ return 1; - } - pgpPrtStr("", pgpSigRSA[i]); - } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { -@@ -623,30 +524,8 @@ static int pgpPrtSigParams(pgpTag tag, u - if (_dig && - (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT)) - { -- int xx; -- xx = 0; -- switch (i) { -- case 0: -- memset(dsaraw.data, '\0', 2*DSA_SUBPRIME_LEN); -- /* r */ -- xx = pgpMpiSet(pgpSigDSA[i], DSA_SUBPRIME_LEN*8, dsaraw.data, p, pend); -- break; -- case 1: /* s */ -- xx = pgpMpiSet(pgpSigDSA[i], DSA_SUBPRIME_LEN*8, dsaraw.data + DSA_SUBPRIME_LEN, p, pend); -- if (_dig->sigdata != NULL) -- SECITEM_FreeItem(_dig->sigdata, PR_FALSE); -- else if ((_dig->sigdata=SECITEM_AllocItem(NULL, NULL, 0)) == NULL) { -- xx = 1; -- break; -- } -- if (DSAU_EncodeDerSig(_dig->sigdata, &dsaraw) != SECSuccess) -- xx = 1; -- break; -- default: -- xx = 1; -- break; -- } -- if (xx) return xx; -+ if (pgpSetSigMpiDSA(_dig, i, p)) -+ return 1; - } - pgpPrtStr("", pgpSigDSA[i]); - } else { -@@ -838,49 +717,11 @@ static const uint8_t * pgpPrtPubkeyParam - char * mpi; - if (pubkey_algo == PGPPUBKEYALGO_RSA) { - if (i >= 2) break; -- if (_dig) { -- if (_dig->keydata == NULL) { -- _dig->keydata = pgpNewPublicKey(rsaKey); -- if (_dig->keydata == NULL) -- break; /* error abort? */ -- } -- switch (i) { -- case 0: /* n */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.rsa.modulus, p); -- break; -- case 1: /* e */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.rsa.publicExponent, p); -- break; -- default: -- break; -- } -- } -+ pgpSetPubMpiRSA(_dig, i, p); - pgpPrtStr("", pgpPublicRSA[i]); - } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { - if (i >= 4) break; -- if (_dig) { -- if (_dig->keydata == NULL) { -- _dig->keydata = pgpNewPublicKey(dsaKey); -- if (_dig->keydata == NULL) -- break; /* error abort? */ -- } -- switch (i) { -- case 0: /* p */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.prime, p); -- break; -- case 1: /* q */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.subPrime, p); -- break; -- case 2: /* g */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.base, p); -- break; -- case 3: /* y */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.publicValue, p); -- break; -- default: -- break; -- } -- } -+ pgpSetPubMpiDSA(_dig, i, p); - pgpPrtStr("", pgpPublicDSA[i]); - } else if (pubkey_algo == PGPPUBKEYALGO_ELGAMAL_ENCRYPT) { - if (i >= 3) break; -@@ -1265,15 +1106,7 @@ void pgpCleanDig(pgpDig dig) - memset(&dig->signature, 0, sizeof(dig->signature)); - memset(&dig->pubkey, 0, sizeof(dig->pubkey)); - -- if (dig->keydata != NULL) { -- SECKEY_DestroyPublicKey(dig->keydata); -- dig->keydata = NULL; -- } -- -- if (dig->sigdata != NULL) { -- SECITEM_ZfreeItem(dig->sigdata, PR_TRUE); -- dig->sigdata = NULL; -- } -+ pgpCleanRSADSA(dig); - } - return; - } -@@ -1315,39 +1148,6 @@ int pgpPrtPkts(const uint8_t * pkts, siz - return 0; - } - --static SECOidTag getSigAlg(pgpDigParams sigp) --{ -- SECOidTag sigalg = SEC_OID_UNKNOWN; -- if (sigp->pubkey_algo == PGPPUBKEYALGO_DSA) { -- /* assume SHA1 for now, NSS doesn't have SECOID's for other types */ -- sigalg = SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST; -- } else if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { -- switch (sigp->hash_algo) { -- case PGPHASHALGO_MD5: -- sigalg = SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_MD2: -- sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_SHA1: -- sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_SHA256: -- sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_SHA384: -- sigalg = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_SHA512: -- sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; -- break; -- default: -- break; -- } -- } -- return sigalg; --} -- - char *pgpIdentItem(pgpDigParams digp) - { - char *id = NULL; -@@ -1396,30 +1196,12 @@ rpmRC pgpVerifySig(pgpDig dig, DIGEST_CT - - /* Compare leading 16 bits of digest for quick check. */ - if (hash && memcmp(hash, sigp->signhash16, 2) == 0) { -- SECItem digest = { .type = siBuffer, .data = hash, .len = hashlen }; -- SECItem *sig = dig->sigdata; -- -- /* Zero-pad RSA signature to expected size if necessary */ -- if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { -- size_t siglen = SECKEY_SignatureLen(dig->keydata); -- if (siglen > sig->len) { -- size_t pad = siglen - sig->len; -- if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { -- goto exit; -- } -- memset(sig->data, 0, pad); -- memcpy(sig->data+pad, dig->sigdata->data, dig->sigdata->len); -- } -- } -- -- /* XXX VFY_VerifyDigest() is deprecated in NSS 3.12 */ -- if (VFY_VerifyDigest(&digest, dig->keydata, sig, -- getSigAlg(sigp), NULL) == SECSuccess) { -- res = RPMRC_OK; -- } -- -- if (sig != dig->sigdata) { -- SECITEM_ZfreeItem(sig, 1); -+ if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { -+ if (!pgpVerifyRSA(dig, hash, hashlen)) -+ res = RPMRC_OK; -+ } else if (sigp->pubkey_algo == PGPPUBKEYALGO_DSA) { -+ if (!pgpVerifyDSA(dig, hash, hashlen)) -+ res = RPMRC_OK; - } - } - -@@ -1607,50 +1389,3 @@ char * pgpArmorWrap(int atype, const uns - return val; - } - --/* -- * Only flag for re-initialization here, in the common case the child -- * exec()'s something else shutting down NSS here would be waste of time. -- */ --static void at_forkchild(void) --{ -- _new_process = 1; --} -- --int rpmInitCrypto(void) { -- int rc = 0; -- -- /* Lazy NSS shutdown for re-initialization after fork() */ -- if (_new_process && _crypto_initialized) { -- rpmFreeCrypto(); -- } -- -- /* Initialize NSS if not already done */ -- if (!_crypto_initialized) { -- if (NSS_NoDB_Init(NULL) != SECSuccess) { -- rc = -1; -- } else { -- _crypto_initialized = 1; -- } -- } -- -- /* Register one post-fork handler per process */ -- if (_new_process) { -- if (pthread_atfork(NULL, NULL, at_forkchild) != 0) { -- rpmlog(RPMLOG_WARNING, _("Failed to register fork handler: %m\n")); -- } -- _new_process = 0; -- } -- return rc; --} -- --int rpmFreeCrypto(void) --{ -- int rc = 0; -- if (_crypto_initialized) { -- rc = (NSS_Shutdown() != SECSuccess); -- _crypto_initialized = 0; -- } -- return rc; --} -- -- diff --git a/rpm-gst-provides.patch b/rpm-gst-provides.patch deleted file mode 100644 index 7c4fe6c..0000000 --- a/rpm-gst-provides.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: ./autodeps/linux.prov -=================================================================== ---- ./autodeps/linux.prov -+++ ./autodeps/linux.prov -@@ -102,4 +102,9 @@ fi - [ -x /usr/lib/rpm/find-provides.ksyms ] && - printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" - -+# -+# --- GStreamer provides, codecs -+[ -x /usr/lib/rpm/gstreamer-provides ] && -+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/gstreamer-provides | sort -u -+ - exit 0 diff --git a/rpm-python.changes b/rpm-python.changes index 2c2353d..0746aa6 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,58 +1,3 @@ -------------------------------------------------------------------- -Wed Feb 23 14:01:41 CET 2011 - mls@suse.de - -- drop standard python directories from filelist [bnc#229189] - -------------------------------------------------------------------- -Fri Oct 22 15:52:32 UTC 2010 - coolo@novell.com - -- adapt second spec file to changes done to rpm.spec - -------------------------------------------------------------------- -Mon Oct 18 11:03:53 CEST 2010 - dmueller@suse.de - -- adapt buildrequires - -------------------------------------------------------------------- -Thu Feb 12 16:52:26 CET 2009 - ro@suse.de - -- adapt buildrequires - -------------------------------------------------------------------- -Wed Oct 8 11:24:22 CEST 2008 - cthiel@suse.de - -- added libelf-devel to BuildRequires to fix build - -------------------------------------------------------------------- -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 - -- add libselinux-devel to BuildRequires - -------------------------------------------------------------------- -Thu Aug 7 16:05:51 CEST 2008 - dmueller@suse.de - -- fix build against python 2.6 - -------------------------------------------------------------------- -Thu Mar 27 14:47:18 CET 2008 - coolo@suse.de - -- fix buildrequires - -------------------------------------------------------------------- -Fri May 25 16:20:53 CEST 2007 - mls@suse.de - -- fix unicode queries - -------------------------------------------------------------------- -Fri Mar 30 15:06:28 CEST 2007 - rguenther@suse.de - -- add ncurses-devel and zlib-devel BuildRequires. - ------------------------------------------------------------------- Wed Oct 18 22:59:02 CEST 2006 - mls@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 60aa95f..ef05e37 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,37 +1,27 @@ # -# spec file for package rpm-python +# spec file for package rpm-python (Version 4.4.2) # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. # -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild - Name: rpm-python -BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel libsemanage-devel lua-devel ncurses-devel popt-devel -BuildRequires: libacl-devel libcap-devel python-devel xz-devel zlib-devel -#!BuildIgnore: rpmlint-Factory -License: GPLv2+ +BuildRequires: python-devel +License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages -Version: 4.9.0 -Release: 7 +Version: 4.4.2 +Release: 76 Requires: rpm = %{version} + %py_requires Source99: rpm.spec %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} -%global with_python 1 %description The rpm-python package contains a module that permits applications @@ -54,7 +44,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 against +# only installing in python/ does not work because rpm links agains # 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 +59,22 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%{_libdir}/python*/*/* +%{_libdir}/python* -%changelog +%changelog -n rpm-python +* Wed Oct 18 2006 - mls@suse.de +- use rpm.spec for building instead of duplication everything +- delete superfluous .a and .la files [#202604] +- create .pyc and .pyo files [#205711] +* Sun Oct 15 2006 - schwab@suse.de +- Make sure config.rpath is present. +* Fri Sep 22 2006 - aj@suse.de +- Fix for python2.5. +* Thu Sep 21 2006 - lnussel@suse.de +- do not package beecrypt python bindings as libbeecrypt is not + packaged either +- fix literal %%{version} in Requires tag +* Thu Sep 21 2006 - lnussel@suse.de +- fix build with python 2.5 by overriding autodetection +* Tue Sep 19 2006 - rguenther@suse.de +- split from rpm package diff --git a/rpm-shorten-changelog.diff b/rpm-shorten-changelog.diff deleted file mode 100644 index 7090250..0000000 --- a/rpm-shorten-changelog.diff +++ /dev/null @@ -1,88 +0,0 @@ ---- ./build/pack.c.orig 2011-02-15 13:03:56.000000000 +0000 -+++ ./build/pack.c 2011-05-11 15:35:07.000000000 +0000 -@@ -671,6 +671,63 @@ static rpmRC checkPackages(char *pkgchec - return RPMRC_OK; - } - -+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); -+} -+ - rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - { - struct cpioSourceArchive_s csabuf; -@@ -680,6 +737,7 @@ rpmRC packageBinaries(rpmSpec spec, cons - Package pkg; - char *pkglist = NULL; - -+ trimChangelog(spec->packages->header); - for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { - char *fn; - ---- ./build/parseChangelog.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./build/parseChangelog.c 2011-05-11 15:33:22.000000000 +0000 -@@ -168,6 +168,11 @@ static rpmRC addChangelog(Header h, ARGV - return RPMRC_FAIL; - } - -+ /* workaround old suse oddity */ -+ if (*s == '-' && s[1] == ' ') { -+ s += 2; -+ } -+ - /* name */ - name = s; - while (*s != '\0') s++; diff --git a/rpm-suse_macros b/rpm-suse_macros index 37237e0..12d409f 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -1,5 +1,10 @@ -# need to keep this around for a while -%suse_check %{nil} +%suse_check \ + %{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\ + export RPM_BUILD_ROOT}\ + test -x /usr/sbin/Check -a $UID = 0 -o -x /usr/sbin/Check -a ! -z "$RPM_BUILD_ROOT" && {\ + echo "I call /usr/sbin/Check..."\ + /usr/sbin/Check\ + } # directories %_infodir %{_prefix}/share/info @@ -9,20 +14,35 @@ %_defaultdocdir %{_usr}/share/doc/packages # package build macros -%make_install make install DESTDIR=%{?buildroot} -%makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install -%rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/") -%rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")') -%insserv_prereq insserv sed -%fillup_prereq fillup coreutils grep diffutils -%suseconfig_fonts_prereq perl aaa_base +%makeinstall make DESTDIR=%{buildroot} install +%tcl_version %(echo 'puts [package require Tcl]' | tclsh) +%insserv_prereq insserv +%fillup_prereq fillup fileutils %install_info_prereq info -# _suse_os_install_post is defined in brp-checks-suse -%__os_install_post %{?_suse_os_install_post}%{!?_suse_os_install_post: \ +%__os_install_post \ + %{suse_check} \ /usr/lib/rpm/brp-compress \ - /usr/lib/rpm/brp-symlink \ -%{nil}} +%{nil} + +# perl_vendorarch is defined +# perl_vendorlib is defined +%perl_make_install make DESTDIR=$RPM_BUILD_ROOT install_vendor + +%perl_process_packlist(n:) \ + mkdir -p $RPM_BUILD_ROOT/var/adm/perl-modules \ + test -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod && { sed -e "s@$RPM_BUILD_ROOT@@g" < $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod > $RPM_BUILD_ROOT/var/adm/perl-modules/%{-n:%{-n*}}%{!-n:%{name}} ; } ; \ + test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT/%perl_sitearch/auto && find $RPM_BUILD_ROOT/%perl_sitearch/auto -name .packlist -print0 | xargs -0 -r perl -spi -e "s@$RPM_BUILD_ROOT@@g" ; \ + test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT/%perl_vendorarch/auto && find $RPM_BUILD_ROOT/%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r perl -spi -e "s@$RPM_BUILD_ROOT@@g" ; \ + rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \ + %nil + +# macro: %suse_update_desktop_file +# Used to add easily a category to .desktop files according to XDG +# standard. +%suse_update_desktop_file(:-:) \ + /usr/lib/rpm/suse_update_desktop_file.sh %{**} || exit 1 \ + %nil # macro: %restart_on_update() # Used to restart a service in postun section, if we are @@ -68,7 +88,6 @@ %is_plus %(if test -f /.buildenv ; then source /.buildenv ; if [[ "$BUILD_BASENAME" == *+kde ]] ; then echo 1 ; else echo 0 ; fi ; else echo 0 ; fi) -# deprecated, use %set_permissions instead %run_permissions() \ if test "$YAST_IS_RUNNING" != "instsys" ; then \ if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.permissions ; then \ @@ -83,37 +102,23 @@ if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.%{-m*} ; then \ /sbin/SuSEconfig --module %{-m*} \ else \ - echo -e "\\nWARNING: SuSEconfig or requested SuSEconfig module not present!\\n" ; \ + echo -e "\\nERROR: SuSEconfig or requested SuSEconfig module not present!\\n" ; exit 1 \ fi \ fi \ %nil -# macro: run_suseconfig_fonts -# call SuSEconfig modules necessary for font setup -# options: -# -c (the fonts are CJK fonts, also do setup which is only needed -# for CJK) -%run_suseconfig_fonts(c) \ - if test -z "$YAST_IS_RUNNING" ; then \ - if test -x /sbin/conf.d/SuSEconfig.fonts ; then \ - %run_suseconfig -m fonts \ - fi \ - %{-c:if test -x /sbin/conf.d/SuSEconfig.ghostscript-cjk ; then \ - %run_suseconfig -m ghostscript-cjk \ - fi} \ - fi \ - %nil - -%set_permissions(f:) \ - if [ -x /usr/bin/chkstat ]; then \ - /usr/bin/chkstat -n --set --system %{**} \ - fi \ - %nil - -%verify_permissions(e:f:) \ - /usr/bin/chkstat -n --warn --system %{**} 1>&2 \ +%verify_permissions(:-:) \ + if test -f /etc/sysconfig/security ; then \ + source /etc/sysconfig/security \ + fi \ + PERMFILES="/etc/permissions" \ + for PERMEXT in $PERMISSION_SECURITY ; do \ + if test -f /etc/permissions.$PERMEXT ; then \ + PERMFILES="$PERMFILES /etc/permissions.$PERMEXT" \ + fi \ + done \ + /usr/bin/chkstat -n %{**} $PERMFILES 1>&2 \ %nil - # %{suse_update_config [-fcl] [dirs...]} # -f: force, ignore timestamp # -c: no config.guess,config.sub @@ -174,9 +179,11 @@ # instead of package name) # -f (skip fillup parts) # -i (skip insserv parts) +# -s (specify START_ variable names, otherwise tr a-z A-Z is used) # -y (default start-variable value to yes) # Used only if X-UnitedLinux-Default-Enabled is not specified # in the init script +# -p (ignored for backwards compatibility) # -Y (force_yes: always activate, discard setting before update) # arguments: # [if "-n" first argument as package name] @@ -185,61 +192,110 @@ # and # name of (old) START variable (unless -s is given) # -# template for variables into /etc/sysconfig/package: -# /var/adm/fillup-templates/sysconfig.package +# template for variables into etc/sysconfig/package: +# var/adm/fillup-templates/sysconfig.package +# template for variables into etc/rc.config: +# var/adm/fillup-templates/rc.config.package %fillup_and_insserv(finpsyY) \ - %{-p:echo "-p option for fillup_and_insserv no longer supported (ever only used on SL8.0)"; exit 1;} \ - %{-s:echo "STARTVAR for fillup_and_insserv no longer supported (rc.config is gone since SL8.0)"; exit 1;} \ - test -n "$FIRST_ARG" || FIRST_ARG=$1 \ - %{-Y:FORCE_YES=1}%{!-Y:FORCE_YES=0} \ - set -- %{?*} \ - %{-n:PNAME=$1 ; shift }%{!-n:PNAME=%{name}} \ - INSSRV_ARRAY="" \ - while [ ${#*} -gt 0 ] ; do \ - SCRIPTNAME=$1 \ - shift \ - SV_B='^### BEGIN INIT INFO' \ - 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 \ - %{!-f: %{do_real_fillup}} \ - %{!-i: %{add_start_if_needed $INSSRV_ARRAY } } \ - %nil + test -n "$FIRST_ARG" || FIRST_ARG=$1 \ + %{-Y:FORCE_YES=1}%{!-Y:FORCE_YES=0} \ + REMOVED_START=no \ + set -- %{?*} \ + %{-n:PNAME=$1 ; shift }%{!-n:PNAME=%{name}} \ + INSSRV_ARRAY="" \ + while [ ${#*} -gt 0 ] ; do \ + SCRIPTNAME=$1 \ + shift \ + %{-s:STARTVAR=$1 ; shift} \ + %{!-s:STARTVAR=START_`echo $SCRIPTNAME | tr a-z.- A-Z__`} \ + SV_B='^### BEGIN INIT INFO' \ + SV_E='^### END INIT INFO' \ + SV_KW=X-UnitedLinux-Default-Enabled \ + SV_VAL=`sed -n -e "/$SV_B/,/$SV_E/{/^# $SV_KW:[[:space:]]*\\([^[:space:]]*\\).*/s//\\1/p;}" < etc/init.d/$SCRIPTNAME` \ + test -n "$SV_VAL" || SV_VAL=%{-y:"yes"}%{!-y:"no"} \ + eval $STARTVAR=$SV_VAL \ + test -n "$STARTVAR" -a -n "$SCRIPTNAME" || { \ + echo "STARTVARIABLE or SCRIPTNAME unknown" \ + exit 1 \ + } \ + INSSRV_ARRAY="$INSSRV_ARRAY $SCRIPTNAME $STARTVAR" \ + %{!-f:%{!-i:grep -q "$STARTVAR=" var/adm/fillup-templates/rc.config.$PNAME.del 2>/dev/null || \ + echo -e "#\\n# Start service $SCRIPTNAME\\n#\\n$STARTVAR=\\"${!STARTVAR}\\"\\n\\n" >> var/adm/fillup-templates/rc.config.$PNAME.del } } \ + done \ + %{!-f: %{do_real_fillup}} \ + %{!-i: %{add_start_if_needed $INSSRV_ARRAY } } # do_real_fillup: internal macro # this part really calls fillup for the appropriate files # %do_real_fillup() \ - TEMPLATE_DIR=/var/adm/fillup-templates \ + TEMPLATE_DIR=var/adm/fillup-templates \ SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME \ + RC_TEMPLATE=$TEMPLATE_DIR/rc.config.$PNAME \ SD_NAME="" \ - %{sysc_fillup} + if [ -x bin/fillup ] ; then \ + %{sysc_fillup} \ + # remove the START_ variables from the base fillup template \ + if [ -f $RC_TEMPLATE.del -a -f $RC_TEMPLATE ] ; then \ + bin/fillup -q -r -i $RC_TEMPLATE $RC_TEMPLATE.del /dev/null \ + mv $RC_TEMPLATE.new $RC_TEMPLATE \ + fi \ + if [ -f etc/rc.config ] ; then \ + %{rc_fillup} \ + # remove the deprecated START_ variables from rc.config \ + if [ -f $TEMPLATE_DIR/rc.config.$PNAME.del ] ; then \ + rm -f etc/rc.config.xtract \ + bin/fillup -q -r -i etc/rc.config $RC_TEMPLATE.del etc/rc.config.xtract \ + if [ -f etc/rc.config.xtract ] ; then \ + . etc/rc.config.xtract \ + fi \ + rm -f etc/rc.config.xtract $RC_TEMPLATE.del \ + if [ -f etc/rc.config.new ] ; then \ + cmp -s etc/rc.config.new etc/rc.config || REMOVED_START=yes \ + mv etc/rc.config.new etc/rc.config \ + fi \ + fi \ + fi \ + else \ + echo "ERROR: fillup not found. This should not happen. Please compare" \ + echo "etc/rc.config and $TEMPLATE_DIR/rc.config.$PNAME and" \ + echo "update by hand." \ + fi # add_start_if_needed: internally used by fillup_and_insserv %add_start_if_needed() \ - set -- %{?*} \ + set -- %{?*} \ while [ ${#*} -gt 0 ] ; do \ SCRIPTNAME=$1 \ - SV_VALUE=$2 \ + STARTVAR=$2 \ shift 2 \ - test -n "$SCRIPTNAME" -a -n "$SV_VALUE" || { echo "SCRIPTNAME or SV_VALUE unknown"; exit 1;} \ - if test "$FIRST_ARG" = "1" -a "$SV_VALUE" = "no" ; then \ - /sbin/insserv ${YAST_IS_RUNNING:+-f} -r /etc/init.d/$SCRIPTNAME \ - elif test "$FIRST_ARG" = "1" -o "$FORCE_YES" = "1" ; then \ - /sbin/insserv ${YAST_IS_RUNNING:+-f} /etc/init.d/$SCRIPTNAME \ + test -n "$STARTVAR" -a -n "$SCRIPTNAME" || { \ + echo "STARTVAR or SCRIPTNAME unknown" \ + exit 1 \ + } \ + if test "$FIRST_ARG" = "1" -o "$REMOVED_START" = "yes" -o "$FORCE_YES" = "1" ; then \ + if test -n "$YAST_IS_RUNNING" ; then \ + INSSERV_FORCE="-f" \ + else \ + INSSERV_FORCE="" \ + fi \ + if test "${!STARTVAR}" = "yes" -o "$FORCE_YES" = "1" ; then \ + sbin/insserv $INSSERV_FORCE etc/init.d/$SCRIPTNAME \ + else \ + sbin/insserv $INSSERV_FORCE -r etc/init.d/$SCRIPTNAME \ + fi \ fi \ done # macro: insserv_cleanup +# only here to be able to define this to nil +# for versions prior to 7.1 %insserv_cleanup() \ - /sbin/insserv /etc/init.d + sbin/insserv etc/init.d # macro: fillup_only -# do the fillup for sysconfig files +# do the fillup for sysconfig files and if needed extraction +# of older variables from rc.config and rc.config.d # template naming convention: # .../fillup-templates/sysconfig.$NAME1[-$NAME2] # NAME1: the name of the sysconfig-file @@ -252,115 +308,152 @@ # -d use a subdirectory of sysconfig # (last arg as directory name) %fillup_only(dans) \ - %{-n:PNAME=%{1}}%{!-n:PNAME=%{name}} \ - %{-s:SUBPNAME=-%{2}}%{!-s:SUBPNAME=%{-a:-%{name}}} \ - TEMPLATE_DIR=/var/adm/fillup-templates \ + %{-n:PNAME=%{1}}%{!-n:PNAME=%{name}} \ + %{-s:SUBPNAME=-%{2}}%{!-s:SUBPNAME=%{-a:-%{name}}} \ + TEMPLATE_DIR=var/adm/fillup-templates \ SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME$SUBPNAME \ + RC_TEMPLATE=$TEMPLATE_DIR/rc.config.$PNAME \ SD_NAME="" \ %{-d:%{-s:SD_NAME=%{3}/}%{!-s:SD_NAME=%{2}/}} \ - %{sysc_fillup} \ - %nil - -# internal only: sysc_fillup -%sysc_fillup() \ - if [ -x /bin/fillup ] ; then \ - if [ -f $SYSC_TEMPLATE ] ; then \ - echo "Updating /etc/sysconfig/$SD_NAME$PNAME..." \ - mkdir -p /etc/sysconfig/$SD_NAME \ - touch /etc/sysconfig/$SD_NAME$PNAME \ - /bin/fillup -q /etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE \ - fi \ + if [ -x bin/fillup ] ; then \ + %{sysc_fillup} \ + %{rc_fillup} \ else \ echo "ERROR: fillup not found. This should not happen. Please compare" \ - echo "/etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" \ + echo "etc/rc.config and $RC_TEMPLATE and" \ echo "update by hand." \ fi +# internal only: rc_fillup +%rc_fillup() \ + # maybe the fillup template for rc.config is old, make sure we do not readd stuff here \ + if [ -f $SYSC_TEMPLATE -a -f $RC_TEMPLATE ] ; then \ + bin/fillup -q -r -i $RC_TEMPLATE $SYSC_TEMPLATE /dev/null \ + mv $RC_TEMPLATE.new $RC_TEMPLATE \ + fi \ + # do the normal fillup for the rc.config variables \ + if [ -f $RC_TEMPLATE ] ; then \ + bin/fillup -q -d = etc/rc.config $RC_TEMPLATE \ + fi + +# internal only: sysc_fillup +%sysc_fillup() \ + if [ -f $SYSC_TEMPLATE ] ; then \ + echo "Updating etc/sysconfig/$SD_NAME$PNAME..." \ + if [ ! -d etc/sysconfig/$SD_NAME ] ; then \ + mkdir -p etc/sysconfig/$SD_NAME \ + fi \ + if [ -f etc/rc.config.d/$PNAME.rc.config ] ; then \ + if [ -f etc/sysconfig/$SD_NAME$PNAME ] ; then \ + bin/fillup -q etc/sysconfig/$SD_NAME$PNAME etc/rc.config.d/$PNAME.rc.config \ + rm -f etc/rc.config.d/$PNAME.rc.config \ + else \ + mv etc/rc.config.d/$PNAME.rc.config etc/sysconfig/$SD_NAME$PNAME \ + fi \ + fi \ + if [ ! -f etc/rc.config ] ; then \ + test -f etc/sysconfig/$SD_NAME$PNAME || touch etc/sysconfig/$SD_NAME$PNAME \ + bin/fillup -q etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE \ + else \ + if [ ! -f etc/sysconfig/$SD_NAME$PNAME ] ; then \ + bin/fillup -q -r -i etc/rc.config $SYSC_TEMPLATE etc/sysconfig/$SD_NAME$PNAME \ + else \ + bin/fillup -q -r -i etc/rc.config $SYSC_TEMPLATE etc/sysconfig/$SD_NAME$PNAME.tmp \ + bin/fillup -q etc/sysconfig/$SD_NAME$PNAME etc/sysconfig/$SD_NAME$PNAME.tmp \ + rm -f etc/sysconfig/$SD_NAME$PNAME.tmp \ + fi \ + if [ -f etc/rc.config.new ] ; then \ + mv etc/rc.config.new etc/rc.config \ + fi \ + fi\ + fi + # macro: rename_sysconfig_variable -# as the name says, rename a variable in the file given with -f +# as the name says, rename a variable in rc.config +# or with -f in the given file %rename_sysconfig_variable(f:) \ - %{!-f:echo "missing argument for rename_sysconfig_variable"; exit 1; }%{-f:FILE=%{-f*}} \ - if [ -f $FILE ] ; then \ - sed -i -e "s/^%{1}=/%{2}=/" $FILE \ - fi + %{!-f:FILE=etc/rc.config}%{-f:FILE=%{-f*}} \ + if [ -f $FILE ] ; then \ + sed -e "s/^%{1}=/%{2}=/" $FILE > $FILE.new \ + mv $FILE.new $FILE \ + fi + +# macro: save_rc_config_d_was_in_filelist +# only used for packages that erroneously had the rc.config.d file +# in their filelist +%save_rc_config_d_was_in_filelist(n) \ + %{-n:PNAME=%{?*}}%{!-n:PNAME=%{name}} \ + mkdir -p etc/sysconfig \ + if [ -f etc/rc.config.d/$PNAME.rc.config -a ! -f etc/sysconfig/$PNAME ] ; then \ + cp etc/rc.config.d/$PNAME.rc.config etc/sysconfig/$PNAME \ + fi # macro: remove_and_set -# remove variables from sysconfig.$NAME +# remove variables from rc.config and sysconfig.$NAME # (both if existant) and set them in the environment # for further handling in postinstall # options: -n set package name # -y default to yes if not found (otherwise no) %remove_and_set(n:y) \ - %{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \ - DEF_VAL=%{-y:"yes"}%{!-y:"no"} \ - DEL_TEMPL=/var/adm/fillup-templates/$PNAME.del \ - rm -f $DEL_TEMPL \ - for var in %{?*} ; do \ - echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \ - done \ - if [ -f /etc/sysconfig/$PNAME ] ; then \ - /bin/fillup -q -t -r -i -d "=" /etc/sysconfig/$PNAME $DEL_TEMPL /etc/sysconfig/$PNAME.deleted.$$ \ - test -f /etc/sysconfig/$PNAME.new && mv /etc/sysconfig/$PNAME.new /etc/sysconfig/$PNAME \ - fi \ - for i in $DEL_TEMPL /etc/sysconfig/$PNAME.deleted.$$ ; do \ - if [ -f $i ] ; then \ - . $i \ - rm -f $i \ - fi \ - done + %{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \ + DEF_VAL=%{-y:"yes"}%{!-y:"no"} \ + DEL_TEMPL=var/adm/fillup-templates/$PNAME.del \ + rm -f $DEL_TEMPL \ + for var in %{?*} ; do \ + echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \ + done \ + if [ -f etc/rc.config ] ; then \ + bin/fillup -q -t -r -i -d "=" etc/rc.config $DEL_TEMPL etc/rc.config.xtract \ + test -f etc/rc.config.new && mv etc/rc.config.new etc/rc.config \ + fi \ + if [ -f etc/sysconfig/$PNAME ] ; then \ + bin/fillup -q -t -r -i -d "=" etc/sysconfig/$PNAME $DEL_TEMPL etc/rc.config.xtract.too \ + test -f etc/sysconfig/$PNAME.new && mv etc/sysconfig/$PNAME.new etc/sysconfig/$PNAME \ + fi \ + for i in $DEL_TEMPL etc/rc.config.xtract etc/rc.config.xtract.too ; do \ + if [ -f $i ] ; then \ + . $i \ + rm -f $i \ + fi \ + done %insserv_force_if_yast() \ - /sbin/insserv ${YAST_IS_RUNNING:+-f} %{?*} + if test -n "$YAST_IS_RUNNING" ; then \ + INSSERV_FORCE="-f" \ + else \ + INSSERV_FORCE="" \ + fi \ + sbin/insserv $INSSERV_FORCE %{?*} %run_ldconfig /sbin/ldconfig %install_info(:-:) \ - ALL_ARGS=(%{**}) \ - NUM_ARGS=${#ALL_ARGS[@]} \ - if test -x /sbin/install-info ; then \ - if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ - /sbin/install-info "${ALL_ARGS[@]}" \ - fi \ - fi ; + ALL_ARGS=(%{**}) \ + NUM_ARGS=${#ALL_ARGS[@]} \ + if test -x sbin/install-info ; then \ + if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ + sbin/install-info "${ALL_ARGS[@]}" \ + fi \ + fi ; %install_info_delete(:-:) \ - ALL_ARGS=(%{**}) \ - NUM_ARGS=${#ALL_ARGS[@]} \ - if test -x /sbin/install-info ; then \ - if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ - /sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \ - fi ; \ - fi ; + ALL_ARGS=(%{**}) \ + NUM_ARGS=${#ALL_ARGS[@]} \ + if test -x sbin/install-info ; then \ + if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ + sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \ + fi ; \ + fi ; -# find-supplements.ksyms parses this macro directly out of the spec file: -%supplements_kernel_module() \ - %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} - -%suse_version 1140 +%suse_version 901 %sles_version 0 %ul_version 0 + %do_profiling 1 -%cflags_profile_generate -fprofile-generate -%cflags_profile_feedback -fprofile-use - -%suse_install_update_message() \ - install -D -m 644 %1 %buildroot/var/adm/update-messages/%{name}-%{version}-%{release}-%(basename %1).txt \ -%nil - -%suse_install_update_script() \ - install -D -m 755 %1 %buildroot/var/adm/update-scripts/%{name}-%{version}-%{release}-%(basename %1).txt \ -%nil - -# Template for lang sub-package. -%lang_package(n:) \ -%package %{-n:-n %{-n*}-}lang \ -Summary: Languages for package %{name} \ -Group: System/Localization \ -Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \ -Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ -Supplements: packageand(bundle-lang-other:%{-n:%{-n*}}%{!-n:%{name}}) \ -BuildArch: noarch \ -%description %{-n:-n %{-n*}-}lang \ -Provides translations to the package %{name} +%cflags_profile_generate -fprofile-arcs +%cflags_profile_feedback -fbranch-probabilities +# find-supplements.ksyms parses this macro directly out of the spec file: +%supplements_kernel_module() \ + %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} diff --git a/rpm.changes b/rpm.changes index 9426b3c..11db5f0 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,876 +1,3 @@ -------------------------------------------------------------------- -Wed Jun 8 12:02:51 CEST 2011 - mls@suse.de - -- change sigpipe fix so that the code really reads everything - from the pipe - -------------------------------------------------------------------- -Mon Jun 6 14:16:49 UTC 2011 - coolo@novell.com - -- move desktop.attr to update-desktop-files - -------------------------------------------------------------------- -Mon Jun 6 13:30:05 CEST 2011 - mls@suse.de - -- ignore SIGPIPE when writing to dependency helpers, so that - builds don't randomly abort when a helper is missing - -------------------------------------------------------------------- -Fri Jun 3 15:19:02 CEST 2011 - mls@suse.de - -- add --assume-exec option to elfdeps, so that the dependency - generator really works for libs without x-bits - -------------------------------------------------------------------- -Mon May 23 16:21:52 CEST 2011 - mls@suse.de - -- do not die if the changelog section is empty [bnc#695400] - -------------------------------------------------------------------- -Fri May 20 13:28:37 CEST 2011 - mls@suse.de - -- get rid of "unexpectedly shrank by one" error - -------------------------------------------------------------------- -Thu May 19 14:51:13 CEST 2011 - mls@suse.de - -- remove gstreamer from fileattrs -- remove unused var from magic_and_path patch - -------------------------------------------------------------------- -Thu May 19 11:59:38 CEST 2011 - mls@suse.de - -- disable perl requires generation completely - -------------------------------------------------------------------- -Wed May 18 11:34:17 CEST 2011 - mls@suse.de - -- split elflib from elf fileattrs so that libraries without - x-bits are also scanned - -------------------------------------------------------------------- -Tue May 17 10:47:00 CEST 2011 - mls@suse.de - -- allow macro undef/change while expanding the macro itself - -------------------------------------------------------------------- -Mon May 16 14:45:05 CEST 2011 - mls@suse.de - -- update to rpm-4.9.0: - * use internal dependency generator - * pluggable autodeps generators - * update to berkeleydb 4.8.30 - * fixed dependency match corner cases - * experimental collection implementation - -------------------------------------------------------------------- -Wed May 4 12:42:33 UTC 2011 - mmarek@novell.com - -- rpmsort - + Fix comparison function to match rpm (bnc#644515, thanks to - Michael Schroeder). - + Add --test option to verify result against zypper vcmp. - -------------------------------------------------------------------- -Sat Feb 19 12:39:31 CET 2011 - vuntz@opensuse.org - -- Don't call /sbin/conf.d/SuSEconfig.pango in - %run_suseconfig_fonts: it has been removed during 11.4 - development. - -------------------------------------------------------------------- -Fri Jan 14 08:58:40 UTC 2011 - coolo@novell.com - -- let %find_lang remove (with a comment) languages not supported. - Supported languages are in filesystem.rpm's file list (bnc#659001) - -------------------------------------------------------------------- -Mon Dec 20 11:50:55 CET 2010 - mls@suse.de - -- fix depflag_strong filter, all weak deps were shown as - strong (bnc#359566). - -------------------------------------------------------------------- -Thu Dec 9 16:44:10 UTC 2010 - meissner@novell.com - -- fixed two more remaining filenames with spaces issues. - -------------------------------------------------------------------- -Wed Dec 8 13:05:06 UTC 2010 - meissner@novell.com - -- handle spaces in manpage filenames (like e.g. in boost). - -------------------------------------------------------------------- -Tue Dec 7 14:33:33 UTC 2010 - coolo@novell.com - -- add script to provide sysvinit() from /etc/init.d/* - -------------------------------------------------------------------- -Fri Nov 19 16:09:20 UTC 2010 - chris@computersalat.de - -- remove perl macro stuff from suse_macros - o provided with perl /etc/rpm/macros.perl - -------------------------------------------------------------------- -Tue Nov 16 15:25:45 UTC 2010 - lnussel@suse.de - -- fix %verify_permissions to actually only warn -- introduce %set_permissions to replace %run_permissions in the future - -------------------------------------------------------------------- -Tue Nov 9 15:07:52 UTC 2010 - lnussel@suse.de - -- don't call /usr/bin/Check at all anymore. superfluous - -------------------------------------------------------------------- -Tue Nov 9 13:04:21 UTC 2010 - lnussel@suse.de - -- change %verify_permissions to use new system mode of chkstat - -------------------------------------------------------------------- -Fri Oct 29 15:03:50 CEST 2010 - mls@suse.de - -- add support --with-only-C and --without-C options to find-lang.sh, - add %no_lang_C macro to allow compatible builds [bnc#449847] - -------------------------------------------------------------------- -Mon Oct 4 17:34:52 UTC 2010 - cristian.rodriguez@opensuse.org - -- Enable libcap support so we can use the %caps macro in spec - files to set POSIX capabilities. - -------------------------------------------------------------------- -Wed Sep 8 11:35:46 CEST 2010 - ro@suse.de - -- add leading / where appropriate in rpm-suse_macros (bnc#625763) - -------------------------------------------------------------------- -Thu Sep 2 10:26:05 UTC 2010 - dimstar@opensuse.org - -- Add rpm-gst-provides.patch to allow rpm to collect provides of - gstreamer codecs. This will help pk-gstreamer-install to also - find the codecs it is looking for. - -------------------------------------------------------------------- -Thu Aug 12 17:17:49 CEST 2010 - vuntz@opensuse.org - -- Add pkgconfig-0.24.diff: starting with pkg-config 0.24, the - --print-requires command was upstreamed, but split in - --print-requires and --print-requires-private. We need both in - pkgconfigdeps.sh, though. If accepted, the patch should get - upstreamed. - -------------------------------------------------------------------- -Tue Jul 20 11:47:29 UTC 2010 - coolo@novell.com - -- make suse_version 1140 - -------------------------------------------------------------------- -Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de - -- use %_smp_mflags - -------------------------------------------------------------------- -Fri Jun 4 16:44:29 CEST 2010 - mls@suse.de - -- update changelog trim date - -------------------------------------------------------------------- -Fri Jun 4 15:00:54 CEST 2010 - mls@suse.de - -- fix sbit removal code [bnc#610941] -- sort permlist file - -------------------------------------------------------------------- -Fri Apr 9 12:00:29 CEST 2010 - mls@suse.de - -- do not load keyring if signature checking is disabled [bnc#554552] -- fix nosource/nopatch srpm tag generation - -------------------------------------------------------------------- -Thu Apr 8 17:11:08 CEST 2010 - mls@suse.de - -- backport some fixes from upstream -- add generation of python/font/pkgconfig dependencies - -------------------------------------------------------------------- -Wed Apr 7 16:59:58 CEST 2010 - mls@suse.de - -- work around spurious tar message [bnc#558475] -- fix defattr reset bug [bnc#594310] -- make 'rpmconfigcheck status' exit with 4 [bnc#592269] -- don't consider prereq deprecated for now - -------------------------------------------------------------------- -Fri Mar 26 16:29:36 CET 2010 - mls@suse.de - -- port sles11-sp1 repackage-nomd5.diff and safeugid.diff - -------------------------------------------------------------------- -Fri Mar 26 11:49:59 CET 2010 - mls@suse.de - -- update to rpm-4.8.0 - * updated python bindings - * new transaction ordering code - -------------------------------------------------------------------- -Wed Feb 24 11:57:30 CET 2010 - mls@suse.de - -- fix readLine segfault [bnc#582599] - -------------------------------------------------------------------- -Sat Dec 12 23:42:26 CET 2009 - jengelh@medozas.de - -- add baselibs.conf as a source -- add SPARC baselibs - -------------------------------------------------------------------- -Wed Nov 4 09:43:43 UTC 2009 - coolo@novell.com - -- set suse_version to 1130 - -------------------------------------------------------------------- -Wed Nov 4 08:52:48 UTC 2009 - coolo@novell.com - -- do not overwrite the default fuzz factor any longer -- change the payload compression to 5 - -------------------------------------------------------------------- -Fri Oct 23 17:56:28 CEST 2009 - mls@suse.de - -- add make_install macro definition for real - -------------------------------------------------------------------- -Tue Sep 8 02:40:55 CEST 2009 - crrodriguez@suse.de - -- make lang_package(s) Noarch - -------------------------------------------------------------------- -Fri Sep 4 11:32:33 CEST 2009 - mls@suse.de - -- do not statfs all filesystems until there is something - to report -- cherry pick default clean section patch from upstream -- add make_install macro definition - -------------------------------------------------------------------- -Wed Sep 2 17:16:37 CEST 2009 - mls@suse.de - -- allow ufdio payload -- pack db.h include file -- fix abs filelist specification [bnc#535594] -- fix query return value [bnc#527191] - -------------------------------------------------------------------- -Mon Aug 31 18:59:12 UTC 2009 - aj@suse.de - -- Fix debuginfo handling for monodevelop-debugger-gdb and - monodevelop-debugger-mdb packages (bnc#535543). - -------------------------------------------------------------------- -Wed Aug 26 14:39:44 CEST 2009 - mls@suse.de - -- set fuzz factor back to 2 for now - -------------------------------------------------------------------- -Mon Aug 24 15:06:57 CEST 2009 - mls@suse.de - -- update to rpm-4.7.1 - -------------------------------------------------------------------- -Mon Jul 27 18:02:37 CEST 2009 - rguenther@suse.de - -- add description to debuginfo packages - -------------------------------------------------------------------- -Mon Jul 27 15:46:36 CEST 2009 - rguenther@suse.de - -- do not strip .debug suffix during debug-link generation -- do not add requires based on private ELF flags [bnc#524681] -- remove requires on debuginfo from debugsource package - -------------------------------------------------------------------- -Sat Jul 25 12:04:11 CEST 2009 - rguenther@suse.de - -- fix debuginfo package generation for binaries without build-id - -------------------------------------------------------------------- -Fri Jul 24 11:39:04 CEST 2009 - rguenther@suse.de - -- revert SUSEBuildCnt patch -- fix debuginfo package generation for build root URLs with macros - -------------------------------------------------------------------- -Thu Jul 23 12:48:50 CEST 2009 - rguenther@suse.de - -- add support for SUSEBuildCnt tag - -------------------------------------------------------------------- -Thu Jul 23 11:41:54 CEST 2009 - rguenther@suse.de - -- generate debuginfo packages for each sub-package with corresponding - debug information - -------------------------------------------------------------------- -Mon Jul 13 12:50:30 CEST 2009 - coolo@novell.com - -- the correct value for libexecdir is exec_prefix/lib (as the - comment rightfully already mentioned) - -------------------------------------------------------------------- -Tue Jun 9 11:53:50 CEST 2009 - mmarek@suse.cz - -- findksyms.diff: also generate provides for kernel packages. - -------------------------------------------------------------------- -Mon Apr 6 02:09:43 CEST 2009 - ro@suse.de - -- fix typo in brp-symlink (bnc#457908) - -------------------------------------------------------------------- -Tue Mar 31 11:25:14 CEST 2009 - mmarek@suse.cz - -- findksyms.diff: don't check for /boot/symsets-*, generate ksym() - requires if not present. - -------------------------------------------------------------------- -Thu Mar 19 15:42:20 CET 2009 - ro@suse.de - -- rpm-suse_macros: suse_version to 1120 - -------------------------------------------------------------------- -Thu Feb 19 11:05:37 CET 2009 - schwab@suse.de - -- Add support for xz compressed sources. - -------------------------------------------------------------------- -Wed Feb 18 11:04:35 CET 2009 - jblunck@suse.de - -- Add debuginfo.prov helper script for build-id provides. - -------------------------------------------------------------------- -Mon Feb 16 17:10:31 CET 2009 - ro@suse.de - -- fix sort call in finddebuginfo again - -------------------------------------------------------------------- -Wed Feb 11 14:01:51 CET 2009 - coolo@suse.de - -- sort the result of find to make symlinks stable in finddebuginfo - -------------------------------------------------------------------- -Wed Feb 11 13:02:12 CET 2009 - coolo@suse.de - -- adapt to new API of xz, sticking with the old LZMA format (not XZ) - -------------------------------------------------------------------- -Mon Feb 9 14:16:52 CET 2009 - ro@suse.de - -- define disttag as optional tag with macro just like disturl - -------------------------------------------------------------------- -Thu Jan 29 10:34:22 CET 2009 - olh@suse.de - -- obsolete old -XXbit packages (bnc#437293) - -------------------------------------------------------------------- -Tue Jan 27 21:19:51 CET 2009 - agruen@suse.de - -- find-supplements.ksyms: Fix "Supplements: packageand( - kernel-$flavor:$package)" dependency (bnc#429254). - -------------------------------------------------------------------- -Mon Jan 5 15:37:07 CET 2009 - mmarek@suse.cz - -- findksyms.diff: make sure that the input files for join are - sorted properly (bnc#450714) - -------------------------------------------------------------------- -Fri Dec 19 15:26:30 CET 2008 - mls@suse.de - -- add popt-devel and rpm-devel to baselibs config (bnc#445037) - -------------------------------------------------------------------- -Thu Dec 11 17:18:49 CET 2008 - ro@suse.de - -- brp-symlink: whitelist kde4 doc path (bnc#457908) - -------------------------------------------------------------------- -Thu Dec 11 08:14:27 CET 2008 - agruen@suse.de - -- find-supplements.ksyms: Module aliases may contain special - characters that rpm does not allow in dependencies, such as - commas. Encode those as %XX to avoid generating broken - dependencies (bnc#456695). - -------------------------------------------------------------------- -Tue Dec 9 16:45:44 CET 2008 - schwab@suse.de - -- find-debuginfo.sh: Don't convert to binary. - -------------------------------------------------------------------- -Mon Dec 1 12:35:39 CET 2008 - ro@suse.de - -- add rpm to baselibs.conf (for net-snmp) -- append a "nil" after suse_install_update_script and _message - -------------------------------------------------------------------- -Fri Nov 28 15:15:10 CET 2008 - dmueller@suse.de - -- fix build -- fix stack based buffer overflow in filelist parsing (bnc#397006) -- add macros for update messages and update scripts - -------------------------------------------------------------------- -Fri Nov 28 14:46:04 CET 2008 - mls@suse.de - -- disable debug package requires for now, they cause more harm - than benefits - -------------------------------------------------------------------- -Thu Nov 27 11:37:30 CET 2008 - mls@suse.de - -- remove '-m64' from ppc64 optflags [bnc#447002] -- add _specfile macro -- set RPMBUILD_ env vars for file helpers -- make find-supplements.ksyms use RPMBUILD_SPECFILE [bnc#443815] - -------------------------------------------------------------------- -Tue Nov 25 17:10:40 CET 2008 - jblunck@suse.de - -- find-debuginfo.sh: fix for handling absolute symlinks - -------------------------------------------------------------------- -Fri Nov 21 16:30:19 CET 2008 - mls@suse.de - -- add firmware.prov provides helper - -------------------------------------------------------------------- -Fri Nov 21 14:38:57 CET 2008 - mmarek@suse.cz - -- fixed sed expression in find-provides.ksyms - -------------------------------------------------------------------- -Tue Nov 18 17:46:53 CET 2008 - jblunck@suse.de - -- find-debuginfo.sh: Create symlinks reflecting the policy from brp-symlink - -------------------------------------------------------------------- -Thu Nov 13 18:16:14 CET 2008 - agruen@suse.de - -- Fix the ksym(...) provides to also include the kernel flavor - (bnc#444698). - -------------------------------------------------------------------- -Fri Nov 7 15:03:25 CET 2008 - ro@suse.de - -- update gcc flags to current set - -------------------------------------------------------------------- -Fri Oct 31 18:59:25 CET 2008 - coolo@suse.de - -- moved suse_update_desktop_files to package update_desktop_files - -------------------------------------------------------------------- -Tue Oct 28 19:07:02 CET 2008 - jblunck@suse.de - -- debugedit: Don't emit NOPs at the end of the line number program but at the - beginning (bnc #433182 again) -- debugedit: Fix an uninitialized variable use that lead to segfaults from - time to time - -------------------------------------------------------------------- -Tue Oct 28 17:18:03 CET 2008 - mls@suse.de - -- fix fingerprint computation for gpg checksums - -------------------------------------------------------------------- -Tue Oct 21 11:22:22 CEST 2008 - jblunck@suse.de - -- debugedit: Fix debuginfo problems introduced by last patch (bnc #433182) - -------------------------------------------------------------------- -Mon Oct 20 16:16:01 CEST 2008 - mls@suse.de - -- drop static libraries and libtool archives - -------------------------------------------------------------------- -Thu Oct 2 18:30:41 CEST 2008 - vuntz@suse.de - -- support the new -t option of suse_update_desktop_file.sh in - rpm-suse_macros - -------------------------------------------------------------------- -Thu Oct 2 17:43:59 CEST 2008 - mls@suse.de - -- fix rpmrc compile options for ia64 [bnc#431345] - -------------------------------------------------------------------- -Thu Oct 2 16:19:03 CEST 2008 - jblunck@suse.de - -- debugedit: Fix some compilation warnings and the canonicalization error. - -------------------------------------------------------------------- -Tue Sep 16 01:01:30 CEST 2008 - ro@suse.de - -- fix find-debuginfo.sh and debugsource-package.diff to even - apply (directory depth) -- add hack from jblunck using home made elfcmp - -------------------------------------------------------------------- -Mon Sep 15 20:32:32 CEST 2008 - jblunck@suse.de - -- fix find-debuginfo.sh to work on filenames with spaces in - -------------------------------------------------------------------- -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 - -- strip .comment and .GCC.command.line sections from ELF binaries - -------------------------------------------------------------------- -Mon Aug 25 14:48:28 CEST 2008 - prusnak@suse.cz - -- enabled SELinux support [Fate#303662] - -------------------------------------------------------------------- -Thu Aug 21 01:49:00 CEST 2008 - ro@suse.de - -- update rpm-suse_macros - -------------------------------------------------------------------- -Wed Aug 20 12:39:53 CEST 2008 - agruen@suse.de - -- rpmconfigcheck: set Required-Stop to $null; this init script - only performs some checks when started. -- /usr/lib/python* belongs to the rpm-python package; remove from - the main rpm package. - -------------------------------------------------------------------- -Mon Jun 30 14:02:35 CEST 2008 - dmueller@suse.de - -- add a requires_ge macro as well - -------------------------------------------------------------------- -Thu Jun 26 18:40:46 CEST 2008 - schwab@suse.de - -- Fix db configure script. - -------------------------------------------------------------------- -Thu May 15 14:31:51 CEST 2008 - dmueller@suse.de - -- remove references to brp-strip-comment-note (bnc#390163) - -------------------------------------------------------------------- -Tue May 6 18:01:34 CEST 2008 - mls@suse.de - -- enable all parts of the noprovides patch again, making our rpm - compatible to rpm4 - -------------------------------------------------------------------- -Fri May 2 15:50:17 CEST 2008 - dmueller@suse.de - -- add at least one supplements prefering the right kernel flavour - if no modalias could be generated (bnc#384084) - -------------------------------------------------------------------- -Thu May 1 22:43:17 CEST 2008 - agruen@suse.de - -- For kernel modules, require "kernel(flavor:symset) = version" - instead of "kernel(symset) = version". This disambiguates - the case where several kernel flavors end up with the same - modver checksums (190163, 355628). - -------------------------------------------------------------------- -Wed Apr 16 17:57:43 CEST 2008 - jblunck@suse.de - -- Get rid of noise when no debuginfo was generated -- Never strip static libraries in find-debuginfo script - -------------------------------------------------------------------- -Thu Apr 10 12:50:33 CEST 2008 - ro@suse.de - -- added baselibs.conf file for xxbit packages - -------------------------------------------------------------------- -Thu Apr 10 12:32:46 CEST 2008 - jw@suse.de - -- added whatrequires-doc.diff - Adds a hint to the misleading --whatrequires option, pointing to - the more useful -e --test. - Motivated by a talk thread started by Hubert. - -------------------------------------------------------------------- -Wed Apr 9 23:15:48 CEST 2008 - mrueckert@suse.de - -- revert the last change as it leads to duplicated entries in the - file list - -------------------------------------------------------------------- -Wed Apr 9 21:00:30 CEST 2008 - jblunck@suse.de - -- Fix a bug in last commit that leads to /usr/src/debug not belonging - to any package. - -------------------------------------------------------------------- -Wed Apr 9 12:56:57 CEST 2008 - jblunck@suse.de - -- Put debug sources into separate -debugsource package. - -------------------------------------------------------------------- -Fri Mar 28 14:54:04 CET 2008 - coolo@suse.de - -- leave the rpm package itself with bzip payload to - avoid blocking updates from within running system - -------------------------------------------------------------------- -Thu Mar 27 14:43:24 CET 2008 - coolo@suse.de - -- switch payload default to lzma -2 -- flag GNOME docu as %doc (bnc#358838) - -------------------------------------------------------------------- -Tue Mar 18 17:12:00 CET 2008 - mls@suse.de - -- make ia32 compatible to ia64, like it was in SLES9 [bnc#367705] -- fix memory leak and endless loops in lzma code -- make rpm provide the right lzma rpmlib name - -------------------------------------------------------------------- -Tue Mar 18 13:33:25 CET 2008 - schwab@suse.de - -- Fix broken db configuration. - -------------------------------------------------------------------- -Fri Mar 14 21:54:57 CET 2008 - coolo@suse.de - -- change it to the "alone" file format used by stable - distributions of 7zip and lzma - -------------------------------------------------------------------- -Fri Mar 14 18:05:18 CET 2008 - coolo@suse.de - -- daring some more compression time to get an overall picture - -------------------------------------------------------------------- -Thu Mar 13 08:11:47 CET 2008 - coolo@suse.de - -- support lzma payload using liblzma - -------------------------------------------------------------------- -Thu Feb 21 21:58:39 CET 2008 - mls@suse.de - -- do not configure autoreloc or colors - -------------------------------------------------------------------- -Thu Jan 31 15:12:55 CET 2008 - ro@suse.de - -- brp-symlink: whitelist /opt/kde3/share/doc*/HTML/*/common - -------------------------------------------------------------------- -Mon Jan 28 16:35:46 CET 2008 - ro@suse.de - -- finddebuginfo.diff: disable debuginfo for mono at the moment - -------------------------------------------------------------------- -Mon Jan 21 12:27:18 CET 2008 - mls@suse.de - -- change vendor detection so that it works in build service, too - -------------------------------------------------------------------- -Sat Jan 19 17:14:55 CET 2008 - mls@suse.de - -- update rpm-suse_macros so that the build service can build, too - -------------------------------------------------------------------- -Thu Jan 17 19:19:09 CET 2008 - wberrier@suse.de - -- autodeps.diff - pass .config files to mono-find-requires, not mono-find-provides - -------------------------------------------------------------------- -Mon Dec 3 13:38:20 CET 2007 - dmueller@suse.de - -- list email address completely again (#344147) - -------------------------------------------------------------------- -Fri Nov 16 20:46:42 CET 2007 - dmueller@suse.de - -- shorten changelogs in binary rpms (#308569) - * saves 4.3MB for the one CD media - -------------------------------------------------------------------- -Thu Oct 11 13:37:16 CEST 2007 - schwab@suse.de - -- Add support for lzma compressed archives. - -------------------------------------------------------------------- -Sun Sep 30 18:28:23 CEST 2007 - rguenther@suse.de - -- fix build with gcc43 - -------------------------------------------------------------------- -Mon Sep 3 13:27:57 CEST 2007 - dmueller@suse.de - -- change %lang_package implementation once again - to support bundle-lang-other for only one desktop (#302270) - -------------------------------------------------------------------- -Fri Aug 31 18:41:04 CEST 2007 - dmueller@suse.de - -- implement supplements for lang_packages (#306412) - -------------------------------------------------------------------- -Fri Aug 10 16:40:10 CEST 2007 - dmueller@suse.de - -- package size reduction (#217472) - -------------------------------------------------------------------- -Wed Aug 8 23:25:56 CEST 2007 - dmueller@suse.de - -- support optional -n parameter in %lang_package -- make %lang_package export a -all provides that - can be used to resolve conflicts with the bundle - -------------------------------------------------------------------- -Thu Aug 2 15:28:09 CEST 2007 - mls@suse.de - -- let the debug_package_requires macro overwrite the - default requires in the debuginfo package - -------------------------------------------------------------------- -Tue Jul 24 13:29:10 CEST 2007 - dmueller@suse.de - -- hardcode rpm in patch name - -------------------------------------------------------------------- -Fri Jun 15 08:30:07 CEST 2007 - dmueller@suse.de - -- package size reduction (28%) - -------------------------------------------------------------------- -Sun May 27 16:43:25 CEST 2007 - schwab@suse.de - -- Remove duplicate rpmpopt alias. - -------------------------------------------------------------------- -Fri May 25 16:18:07 CEST 2007 - mls@suse.de - -- fix patch-rpm query -- do not link convertdb1 statically [#274694] -- use --wildcards option for tar [#272519] -- fix perl.prov [#255009] -- show pre/posttrans scripts in --scripts query [#253620] -- remove popt version requires [#246871] -- fix missing file error - -------------------------------------------------------------------- -Wed May 16 12:16:44 CEST 2007 - mls@suse.de - -- fix autodeps.diff mono logic - -------------------------------------------------------------------- -Mon May 14 13:47:02 CEST 2007 - coolo@suse.de - -- correctly mark KDE documentation as %doc in find-lang.sh - -------------------------------------------------------------------- -Fri May 11 14:34:35 CEST 2007 - coolo@suse.de - -- adding %lang_package to simplify seperating translations - -------------------------------------------------------------------- -Sat Apr 28 00:43:30 CEST 2007 - wberrier@suse.de - -- autodeps.diff - bnc #227362 - -Print warning if mono assembiles are found but mono-find-* fails - (solution is to make sure mono-devel is installed) - -Also include .config files when searching for mono assemblies. - (bnc #210224) - -------------------------------------------------------------------- -Tue Apr 24 17:12:47 CEST 2007 - mls@suse.de - -- enable noprovides patch again. - disable part of the patch so that rpm checks the package provides - again instead of just package name when going through the - obsoletes list. This makes rpm behaviour consistent with the - updated libzypp. [#232127] - -------------------------------------------------------------------- -Sun Apr 22 15:23:12 CEST 2007 - dmueller@suse.de - -- fix stripping of symbol table - -------------------------------------------------------------------- -Tue Apr 17 14:24:01 CEST 2007 - dmueller@suse.de - -- strip comment and gcc command line sections from the packages -- rework SYMTAB_KEEP to accept a file pattern - -------------------------------------------------------------------- -Sun Apr 8 23:22:12 CEST 2007 - schwab@suse.de - -- Include compilation directory in debuginfo file list. - -------------------------------------------------------------------- -Sat Mar 24 12:22:23 CET 2007 - ro@suse.de - -- added libbz2-devel to BuildRequires and Requires for -devel - -------------------------------------------------------------------- -Fri Mar 23 16:14:28 CET 2007 - dmueller@suse.de - -- drop custom libpopt so versioning -- move libpopt to /lib(64) for cryptsetup -- adjust installed libtool files -- Fix rpm buildrequires / devel requires - -------------------------------------------------------------------- -Thu Mar 22 16:41:44 CET 2007 - stbinner@suse.de - -- files.diff: when checking %files list also show unpackaged files - after "not found" error message [#255780] - -------------------------------------------------------------------- -Thu Mar 22 10:45:08 CET 2007 - dmueller@suse.de - -- remove strangely duplicated libpopt -- remove static popt and corresponding .la file to reduce - dependencies -- Fix various format string errors in german translation - which cause crashes - -------------------------------------------------------------------- -Mon Mar 19 16:48:22 CET 2007 - rguenther@suse.de - -- do not require build-key - -------------------------------------------------------------------- -Tue Mar 6 20:19:40 CET 2007 - rguenther@suse.de - -- adjust cflags_profile_generate and cflags_profile_feedback to - enable tree profiling - -------------------------------------------------------------------- -Fri Jan 26 16:55:15 CET 2007 - mls@suse.de - -- create /var/spool/repackage directory [#230866] -- do not run pre/posttrans scripts in test mode [#235361] - ------------------------------------------------------------------- Thu Nov 30 14:04:56 CET 2006 - mls@suse.de @@ -1265,8 +392,8 @@ Wed Sep 7 18:13:11 CEST 2005 - matz@suse.de - Make debuginfo packages require exact version of base rpm. - ------------------------------------------------------------------- + Fri Sep 2 13:07:08 CEST 2005 - mls@suse.de - backport CLOEXEC workaround [#93727] @@ -2768,7 +1895,7 @@ Mon Feb 22 15:08:09 MET 1999 - ro@suse.de - update to 2.91 - ported ma's fixes -------------------------------------------------------------------- +------------------------------------------------------------------ Wed Nov 25 19:06:11 MET 1998 - ma@suse.de - new version 2.5.5 @@ -2854,7 +1981,7 @@ Mon Oct 27 15:29:41 MET 1997 - ma@suse.de - patch: ignore errors when installing a symlink and called from YaST - de.po update -------------------------------------------------------------------- +---------------------------------------------------------------------- Thu Aug 7 17:46:48 MEST 1997 - ma@suse.de - duplicate '--nodeps' entry in rpm manpage deleted. @@ -2863,13 +1990,13 @@ Thu Aug 7 17:46:48 MEST 1997 - ma@suse.de is disabeled, unless environment variable RPM_IgnoreFailedSymlinks is set. -------------------------------------------------------------------- +---------------------------------------------------------------------- Tue Jul 15 13:24:22 MEST 1997 - ro@suse.de - added workaround to skip installing a symlink when impossible to remove an existing directory -------------------------------------------------------------------- +---------------------------------------------------------------------- Thu Jun 26 19:10:48 MEST 1997 - ma@suse.de - introducing rpm, version 2.4.1 diff --git a/rpm.spec b/rpm.spec index 32484a7..c32da45 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,127 +1,123 @@ # -# spec file for package rpm +# spec file for package rpm (Version 4.4.2) # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. # -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - +# norootforbuild Name: rpm -License: GPLv2+ +License: GNU General Public License (GPL) Group: System/Packages -BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel libsemanage-devel lua-devel ncurses-devel xz-devel zlib-devel -BuildRequires: popt-devel -BuildRequires: libacl-devel libcap-devel -#!BuildIgnore: rpmlint-Factory Provides: rpminst -PreReq: %insserv_prereq %fillup_prereq permissions -AutoReqProv: on +Requires: build-key +%define popt_version 1.7 +PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permissions +Autoreqprov: on Summary: The RPM Package Manager -Version: 4.9.0 -Release: 13 +Version: 4.4.2 +Release: 76 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 +Source3: RPM-Changes.html.tar.bz2 Source4: rpm-suse_macros Source5: rpmsort Source6: symset-table Source8: rpmconfigcheck Source9: sysconfig.services-rpm -Source10: beecrypt-4.1.2.tar.bz2 -Source11: db-4.8.30.tar.bz2 -Source12: baselibs.conf -Patch1: beecrypt-4.1.2.diff -Patch2: db.diff +Source10: elfutils-0.97.tar.bz2 +Source11: beecrypt-4.1.2.tar.bz2 +Patch1: elfutils-0.97.diff +Patch2: beecrypt-4.1.2.diff +Patch3: db.diff # quilt patches start here -Patch10: rpm-beecrypt.diff -Patch11: debugedit.diff -Patch12: localetag.diff -Patch13: missingok.diff -Patch14: nameversioncompare.diff -Patch15: chownwarn.diff -Patch16: dbfsync.diff -Patch17: dbrointerruptable.diff -Patch18: extcond.diff -Patch19: refreshtestarch.diff -Patch20: rpmrctests.diff -Patch21: waitlock.diff -Patch22: suspendlock.diff -Patch23: weakdeps.diff -Patch24: autodeps.diff -Patch25: brp.diff -Patch26: brpcompress.diff -Patch27: checkfilesnoinfodir.diff -Patch28: finddebuginfo.diff -Patch29: findksyms.diff -Patch30: findlang.diff -Patch31: macrosin.diff -Patch32: modalias.diff -Patch33: platformin.diff -Patch34: rpmpopt.diff -Patch35: rpmrc.diff -Patch36: taggedfileindex.diff -Patch37: rpmqpack.diff -Patch38: convertdb1static.diff -Patch39: build.diff -Patch40: modalias-kernel_module.diff -Patch41: files.diff -Patch42: debugedit-comp-dir.diff -Patch43: perlprov.diff -Patch44: rpm-shorten-changelog.diff -Patch45: debugsource-package.diff -Patch46: whatrequires-doc.diff -Patch47: remove-brp-strips.diff -Patch48: requires-ge-macro.diff -Patch50: debugedit-canon-fix.diff -Patch51: finddebuginfo-absolute-links.diff -Patch52: firmware.diff -Patch53: specfilemacro.diff -Patch54: modalias-encode.diff -Patch55: disttag-macro.diff -Patch56: buildidprov.diff -Patch57: debugsubpkg.diff -Patch58: debuglink.diff -Patch59: debuginfo-mono.patch -Patch60: lazystatfs.diff -Patch61: repackage-nomd5.diff -Patch62: safeugid.diff -Patch63: noprereqdeprec.diff -Patch64: pythondeps.diff -Patch65: fontprovides.diff -Patch66: rpm-gst-provides.patch -Patch67: langnoc.diff -Patch68: initscriptsprov.diff -Patch69: remove-translations.diff -Patch70: no_rep_autop.diff -Patch71: headeradddb.diff -Patch72: rpmdb_get_open_flags.diff -Patch73: verify_p.diff -Patch74: dbprivate.diff -Patch75: nobuildcolor.diff -Patch76: fileattrs.diff -Patch77: emptyprep.diff -Patch78: nomagiccheck.diff -Patch79: findsupplements.diff -Patch80: magic_and_path.diff -Patch81: safemacro.diff -Patch82: emptychangelog.diff -Patch83: assumeexec.diff -Patch84: buildpipe.diff +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 BuildRoot: %{_tmppath}/%{name}-%{version}-build # -# avoid bootstrapping problem -%define _binary_payload w9.bzdio %description RPM Package Manager is the main tool for managing the software packages @@ -140,8 +136,8 @@ Authors: Marc Ewing %package devel -Summary: Include Files and Libraries mandatory for Development -License: GPLv2+ +Summary: Include Files and Libraries mandatory for Development. +License: GNU General Public License (GPL) Group: System/Packages Requires: rpm = %{version} Requires: popt-devel @@ -163,129 +159,98 @@ Authors: %prep %setup -q -n rpm-%{version} rm -rf sqlite +rm -rf elfutils rm -rf beecrypt tar xjf %{SOURCE10} +ln -s elfutils-0.97 elfutils +# remove all OSL stuff +rm -rf elfutils/doc elfutils/libebl elfutils/libdw elfutils/libcpu elfutils/libasm elfutils/src elfutils/po elfutils/tests +rm -rf elfutils/lib/dynamicsizehash.c elfutils/lib/dynamicsizehash.h elfutils/lib/list.h elfutils/lib/xmalloc.c elfutils/lib/xstrdup.c elfutils/lib/xstrndup.c tar xjf %{SOURCE11} -ln -s db-4.8.30 db ln -s beecrypt-4.1.2 beecrypt -chmod -R u+w db/* #tar xjf %{SOURCE12} #ln -s neon-0.24.7 neon # will get linked from db3 rm -f rpmdb/db.h -%patch -P 1 -P 2 +# separate popt source +# %setup -q -D -T -a 9 +# mv popt popt.orig +# ln -s popt-%{popt_version} popt +%patch -P 1 -P 2 -P 3 %patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19 %patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 %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 +%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 60 -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 -#chmod 755 scripts/find-supplements{,.ksyms} -#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms -#chmod 755 scripts/firmware.prov -#chmod 755 scripts/debuginfo.prov +%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 -P 89 +chmod 755 scripts/find-supplements{,.ksyms} +chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} tar -xjvf %{SOURCE2} +tar -xjvf %{SOURCE3} if [ -s /etc/rpm/suse_macros ]; then cp -a /etc/rpm/suse_macros %{SOURCE4} fi cp -a %{SOURCE4} suse_macros -rm -f m4/libtool.m4 -rm -f m4/lt*.m4 +rename no nb po/no.* popt/po/no.* %build -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -ffunction-sections" -export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" +%{?suse_update_config:%{suse_update_config -f popt}} +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %ifarch alpha export CFLAGS="-g -O0 -fno-strict-aliasing" %endif -#cp -p /usr/share/gettext/config.rpath . -cp autogen.sh beecrypt -pushd beecrypt -./autogen.sh --with-pic --without-python -make %{?_smp_mflags} -popd -./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ ---libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --with-lua \ ---with-selinux --with-internal-beecrypt --with-acl --with-cap --enable-shared %{?with_python: --enable-python} +#cp popt/autogen.sh zlib +rm -rf zlib +cp /usr/share/gettext/config.rpath . +cp popt/autogen.sh beecrypt +cp popt/autogen.sh libelf +cp popt/autogen.sh elfutils +cp popt/autogen.sh file +# cp popt/autogen.sh neon +./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --with-lua --without-selinux --enable-shared rm po/de.gmo -make %{?_smp_mflags} -make convertdb1 +make %{?jobs:-j%jobs} +(cd popt; gcc -shared .libs/popt.o .libs/findme.o .libs/poptparse.o .libs/poptconfig.o .libs/popthelp.o $RPM_OPT_FLAGS -Wl,-soname -Wl,libpopt.so.1 -o .libs/libpopt.so.1.0.0) %install +rm -rf $RPM_BUILD_ROOT +mkdir $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/share/locale ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale make DESTDIR="$RPM_BUILD_ROOT" install -install -m 755 convertdb1 $RPM_BUILD_ROOT/usr/lib/rpm -install -m 644 db3/db.h $RPM_BUILD_ROOT/usr/include/rpm -# remove .la file and the static variant of libpopt -# have to remove the dependency from other .la files as well -for f in $RPM_BUILD_ROOT/%{_libdir}/*.la; do - sed -i -e "s,/%_lib/libpopt.la,-lpopt,g" $f -done +cp popt/.libs/libpopt.so.1.0.0 $RPM_BUILD_ROOT/%{_libdir} +ln -sf libpopt.so.1.0.0 $RPM_BUILD_ROOT/%{_libdir}/libpopt.so.1 mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m 755 %{SOURCE8} $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/usr/sbin ln -sf ../../etc/init.d/rpmconfigcheck $RPM_BUILD_ROOT/usr/sbin/rcrpmconfigcheck cp -a suse_macros $RPM_BUILD_ROOT/usr/lib/rpm -mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/suse -ln -s ../suse_macros $RPM_BUILD_ROOT/usr/lib/rpm/suse/macros -for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do - mkdir -p $RPM_BUILD_ROOT/usr/src/packages/$d - chmod 1777 $RPM_BUILD_ROOT/usr/src/packages/$d -done -for d in $RPM_BUILD_ROOT/usr/lib/rpm/platform/*-linux/macros ; do - dd=${d%%-linux/macros} - dd=${dd##*/} - mkdir $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd - chmod 1777 $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd -done +mv $RPM_BUILD_ROOT/usr/src/* $RPM_BUILD_ROOT/usr/src/packages mkdir -p $RPM_BUILD_ROOT/var/lib/rpm +rm -rf $RPM_BUILD_ROOT/usr/include/beecrypt $RPM_BUILD_ROOT/usr/include/libelf $RPM_BUILD_ROOT/%{_libdir}/libbeecrypt* $RPM_BUILD_ROOT/usr/lib/libelf* gzip -9 $RPM_BUILD_ROOT/%{_mandir}/man[18]/*.[18] export RPM_BUILD_ROOT %ifarch s390x [ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux %endif chmod 755 doc/manual -rm -rf doc/manual/Makefile* rm -f $RPM_BUILD_ROOT/usr/lib/rpmpopt rm -rf $RPM_BUILD_ROOT%{_mandir}/{fr,ja,ko,pl,ru,sk} rm -f $RPM_BUILD_ROOT%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates install -c -m0644 %{SOURCE9} $RPM_BUILD_ROOT/var/adm/fillup-templates/ rm -f $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute2 -find $RPM_BUILD_ROOT/usr/src/packages/* -type d | sed -e "s@$RPM_BUILD_ROOT@@" | sort > $RPM_BUILD_ROOT/usr/lib/rpm/permlist +find $RPM_BUILD_ROOT/usr/src/packages/* -type d | sed -e "s@$RPM_BUILD_ROOT@@" > $RPM_BUILD_ROOT/usr/lib/rpm/permlist install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 scripts/firmware.prov $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 scripts/debuginfo.prov $RPM_BUILD_ROOT/usr/lib/rpm rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc mkdir -p $RPM_BUILD_ROOT/etc/rpm chmod 755 $RPM_BUILD_ROOT/etc/rpm -# remove some nonsense or non-working scripts -pushd $RPM_BUILD_ROOT/usr/lib/rpm/ -for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \ - magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \ - brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \ - rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile -do - rm -f $f -done -for i in /usr/share/automake-*/*; do - if test -f "$i" && test -f "${i##*/}"; then - rm -f "${i##*/}" - fi -done -popd -gzip -9 CHANGES -rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la -sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm %clean rm -rf $RPM_BUILD_ROOT @@ -300,8 +265,6 @@ if test -s var/lib/rpm/packages.rpm ; then mv -f var/lib/rpm/packages.rpm var/lib/rpm/packages.rpm3 rm -f var/lib/rpm/conflictsindex.rpm var/lib/rpm/fileindex.rpm var/lib/rpm/groupindex.rpm var/lib/rpm/nameindex.rpm var/lib/rpm/providesindex.rpm var/lib/rpm/requiredby.rpm var/lib/rpm/triggerindex.rpm fi -# delete no longer maintained databases -rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion var/lib/rpm/Provideversion %postun %{insserv_cleanup} @@ -309,40 +272,1064 @@ rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion va %verifyscript %verify_permissions -f /usr/lib/rpm/permlist -%files -f rpm.lang +%files %defattr(-,root,root) -%doc CHANGES.gz COPYING GROUPS +%doc RPM-PGP-KEY RPM-GPG-KEY CHANGES COPYING GROUPS %doc doc/manual -%doc RPM-HOWTO RPM-Tips +%doc RPM-HOWTO RPM-Tips RPM-Changes /etc/rpm /bin/rpm /usr/bin/* /etc/init.d/rpmconfigcheck /usr/sbin/rcrpmconfigcheck /usr/lib/rpm - %{_libdir}/rpm-plugins - %{_libdir}/librpm.so.* - %{_libdir}/librpmbuild.so.* - %{_libdir}/librpmio.so.* - %{_libdir}/librpmsign.so.* + %{_libdir}/librpm*-*.so %doc %{_mandir}/man[18]/*.[18]* +#%doc %{_mandir}/*/man[18]/*.[18]* + /usr/share/locale/*/LC_MESSAGES/rpm.mo %dir /var/lib/rpm %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILD %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SPECS %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SOURCES %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SRPMS %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/RPMS -%verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILDROOT %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/RPMS/* /var/adm/fillup-templates/sysconfig.services-rpm %files devel %defattr(644,root,root,755) /usr/include/rpm + %{_libdir}/librpm*.a + %{_libdir}/librpm*.la %{_libdir}/librpm.so %{_libdir}/librpmbuild.so + %{_libdir}/librpmdb.so %{_libdir}/librpmio.so - %{_libdir}/librpmsign.so - %{_libdir}/pkgconfig/rpm.pc +%package -n popt +Summary: A C library for parsing command line parameters +License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), Other License(s), see package +Group: System/Libraries +Version: 1.7 +Release: 304 +# -%changelog +%description -n popt +Popt is a C library for parsing command line parameters. Popt was +heavily influenced by the getopt() and getopt_long() functions. It +improves on them by allowing more powerful argument expansion. Popt can +parse arbitrary argv[] style arrays and automatically set variables +based on command line arguments. Popt allows command line arguments to +be aliased via configuration files and includes utility functions for +parsing arbitrary strings into argv[] arrays using shell-like rules. + + + +Authors: +-------- + Erik Troan + +%package -n popt-devel +Summary: C Library for Parsing Command Line Parameters +License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), Other License(s), see package +Group: System/Libraries +Version: 1.7 +Release: 304 +Requires: popt = 1.7 +Requires: glibc-devel + +%description -n popt-devel +Popt is a C library for parsing command line parameters. Popt was +heavily influenced by the getopt() and getopt_long() functions, but it +improves on them by allowing more powerful argument expansion. Popt can +parse arbitrary argv[] style arrays and automatically set variables +based on command line arguments. Popt allows command line arguments to +be aliased via configuration files and includes utility functions for +parsing arbitrary strings into argv[] arrays using shell-like rules. + + + +Authors: +-------- + Erik Troan + + +%post -n popt -p /sbin/ldconfig + +%postun -n popt -p /sbin/ldconfig + +%files -n popt +%defattr(-,root,root) + %{_libdir}/libpopt.so.* + /usr/share/locale/*/LC_MESSAGES/popt.mo + +%files -n popt-devel +%defattr(644,root,root,755) + /usr/include/popt.h + %{_libdir}/libpopt.a + %{_libdir}/libpopt.la + %{_libdir}/libpopt.so +%doc %{_mandir}/man3/popt.3* + +%changelog -n rpm +* Thu Nov 30 2006 - mls@suse.de +- disable noprovides patch [#224824] +* Fri Nov 24 2006 - mls@suse.de +- fix buffer overflow in query function [#218983] +- fix off-by-two error in formatStrong [#210135] +- fix typo in (unused) beecrypt code [#219738] +- add standard buildservice macros +* Tue Nov 14 2006 - agruen@suse.de +- Add %%supplements_kernel_module macro for use in firmware and + similar packages which are related to modules in a + kernel-$flavor package: RPM then extracts the modaliases from + the specified module(s) and adds them as Supplements: + modalias(...) tags, so that the package magaer will add + such packages automatically when the respective hardware is + present. +* Wed Nov 08 2006 - agruen@suse.de +- Move the Kernel Module specific macros into the kernel-source + package. +* Fri Oct 20 2006 - agruen@suse.de +- Support the distribution-independent macros + %%kernel_module_package_buildreq, %%kernel_module_package, and + inside %%kernel_module_package, the macros %%flavors_to_build and + %%kernel_source. +* Wed Oct 18 2006 - mls@suse.de +- split up jumbo patch in 78 small patches +- fix lua directory handling [#201518] +- add /etc/rpm directory to filelist [#208762] +* Mon Oct 16 2006 - agruen@suse.de +- Fix the KMP Package spec file template so that whenever the + initrd contains a module that the KMP includes, the initrd will + be regenerated (211646). +* Sun Oct 15 2006 - schwab@suse.de +- Make sure config.rpath is present. +* Mon Oct 02 2006 - agruen@suse.de +- %%suse_kernel_module_package: Abort when trying to build for a + kernel that doesn't have an associated /boot/symsets-$krel.tar.gz + file: we cannot generate the appropriate dependencies without. +* Mon Oct 02 2006 - agruen@suse.de +- Allow kernel modules in packages even when the dependencies + between those packages and the matching kernel packages cannot + be tracked (199474). +* Sun Oct 01 2006 - agruen@suse.de +- Make find-*.ksyms more robust. +* Tue Sep 19 2006 - rguenther@suse.de +- split rpm-python to separate spec file +- remove python-devel BuildRequires +* Tue Aug 15 2006 - ro@suse.de +- workaround for gettext using MKINSTALLDIRS in configure.ac +* Wed Jun 14 2006 - mls@suse.de +- make rpmlib provide rpmlib(PatchRPMs) [#184856] +* Wed Apr 26 2006 - agruen@suse.de +- rpm-suse-kernel-module-subpackage: Use a temporary file location + that only root can write to (169378). +* Fri Apr 21 2006 - mls@suse.de +- copy suse_macros file back into source rpm +* Mon Apr 10 2006 - agruen@suse.de +- rpm-suse-kernel-module-subpackage: Arguments to -p and -f should + be relative to %%_sourcedir. +* Fri Mar 24 2006 - mls@suse.de +- fix uninitialized variable in unused file code [#160434] +* Fri Mar 24 2006 - agruen@suse.de +- %%suse_kernel_module_package: Fix -x case when multiple flavors + to include are specified. Do not build KMP packages without + modversions or kernel(...) requirements. +* Tue Mar 21 2006 - mls@suse.de +- fix PGP signature checking when there is no RSA sig +* Mon Mar 20 2006 - agruen@suse.de +- Switch from modalias(foo) to modalias(kernel-flavor:foo) + supplements to give the resolver enough information to do "the + right thing". +* Sun Mar 19 2006 - agruen@suse.de +- Allow paths relative to %%_sourcedir in + %%suse_kernel_module_package. +* Sat Mar 18 2006 - agruen@suse.de +- Clarify rpm --help texts. +* Fri Mar 17 2006 - mls@suse.de +- fix cond queries that return no result +* Fri Mar 17 2006 - mls@suse.de +- work around broken patchrpm database entries [#156347] +- add query support for suggests/recommends/enhances/supplements + [#155301] +* Sun Mar 12 2006 - agruen@suse.de +- find-supplements.ksyms: Don't generate too many Supplements; + anything that does not have a colon in it (like pci:...) is not + a modalias. +* Sat Mar 11 2006 - ro@suse.de +- find-debuginfo: only "strip-debug" for static libs, + do not use "strip-all" there +* Fri Mar 10 2006 - agruen@suse.de +- Make KMP sub-packages require kernel-$flavor instead of kernel + (mostly cosmetic). +* Fri Mar 10 2006 - dmueller@suse.de +- patch for improved debuginfo extraction (#150940) +* Thu Mar 09 2006 - agruen@suse.de +- find-scripts.diff: Add support for %%__find_enhances and + %%__find_supplements scripts (from mls@suse.de). +- modalias.diff: Add modalias(...) Supplements tags that define + the hardware that kernel module packages support (e.g., + modalias(pci:vBADOFBADdDEADBEEFsv*sd*bc*sc*i*)). +* Mon Mar 06 2006 - agruen@suse.de +- %%suse_kernel_module_package: Add a -p option for defining + additional preamble lines in sub-packages, subject to the same + macro expansion as the sub-package (-s) itself. +* Wed Mar 01 2006 - schwab@suse.de +- Fix logic error in find_debuginfo.sh [#144629]. +* Fri Feb 24 2006 - mls@suse.de +- fix cursor leak in rpmdbGrowIterator [#151953] +- print error message if scriptlet fork fails [#152779] +* Sun Feb 19 2006 - agruen@suse.de +- scripts/find-requires.ksyms: Fix bug in last find-requires.ksyms + fix. +* Sat Feb 18 2006 - ro@suse.de +- allow debuginfo packages also for noarch (for mono,java) +* Fri Feb 17 2006 - mls@suse.de +- put mono debug files in debuginfo packages [#151353] +- fix off-by-one error in glob code +- define _libexecdir to be _libdir [#136762] +- rename improves to supplements +* Thu Feb 16 2006 - agruen@suse.de +- scripts/find-requires.ksyms: Tolerate kernel modules that have + more than one vermagic info entry (it happened!). +* Mon Feb 13 2006 - agruen@suse.de +- rpm-suse-kernel-module-subpackage: + + Search for the spec file in %%_sourcedir and %%_specdir (150119). + + If no KMP subpackage exists, use the Group and Summary tags + of the main package. +* Fri Feb 10 2006 - mls@suse.de +- add back missing chunk of srcdefattr patch [#48870] +- add rpmvercmp patch from Peter Bowan +- add -m32 to ix86 optflags to make --target work [#141206] +* Sat Feb 04 2006 - agruen@suse.de +- rpm-suse-kernel-module-subpackage: Allow to specify a list of + kernel flavors to build (-x) instead of specifying an exclude + list. +* Fri Feb 03 2006 - mls@suse.de +- use RPMSENSE_STRONG instead of RPMSENSE_WEAK +- drop support for EssentialFor +* Wed Feb 01 2006 - agruen@suse.de +- rpm-suse-kernel-module-subpackage: Allow to specify a custom + %%files list for the kernel-specific sub-packages. Use the + Summary and Group tags, and the %%description section from the + KMP sub-package for the kernel-specific sub-packages. +* Tue Jan 31 2006 - agruen@suse.de +- rpm-suse-kernel-module-subpackage: Add version to additional + Provides tag. We may need this for future Obsoletes. +* Fri Jan 27 2006 - mls@suse.de +- added support for EssentialFor and Supports +- enabled support for lua scripts +* Fri Jan 27 2006 - agruen@suse.de +- rpm-suse-kernel-module-subpackage: Add "Requires: kernel". Add + -r option to override the release number. Clean up. +* Thu Jan 26 2006 - agruen@suse.de +- rpm-suse_macros: Add -v option to %%suse_kernel_module_package + to allow specifying a kernel module version different from the + main package version. Restore the %%version, %%summary, and + %%group macros of the main package at the end of + %%suse_kernel_module_package. +* Wed Jan 25 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* Tue Jan 17 2006 - agruen@suse.de +- rpm-suse_macros: Add %%suse_kernel_module_package macro for + building kernel module packages. +* Wed Jan 11 2006 - agruen@suse.de +- rpm-4.4.2.diff: find-requires.ksyms must not print "Requires:". + Remove trailing whitespace. +* Wed Dec 21 2005 - mls@suse.de +- make transaction lock --root aware +* Mon Dec 19 2005 - mls@suse.de +- don't ignore getcwd return value in build.c +* Mon Dec 19 2005 - mls@suse.de +- fix find-lang.sh script +* Sun Dec 18 2005 - mls@suse.de +- fix find-debuginfo script +* Sun Dec 18 2005 - mls@suse.de +- don't assume root:root defattr +* Sun Dec 18 2005 - agruen@suse.de +- fix wrong buildsubdir macro name +* Thu Dec 15 2005 - mls@suse.de +- update to version 4.4.2 + for now without lua, rpc, dav support +* Wed Dec 07 2005 - agruen@suse.de +- Add find-{requires,provides}.ksyms and invoke them from the + global find-{requires,provides} scripts. The scripts add + "kernel(symbol set) = version" and "kver(symbol) = version" + provides and requires to kernel module packages. +- Add symset-table script used to generate a table of known + kernel symbol sets from /boot/symsets-*.tar.gz. +- Add rpmsort script to sort a file into RPM version order. Used + in kernel scripts to sort kernel packages by version. +* Tue Nov 22 2005 - ro@suse.de +- change NO_BRP_STRIP_DEBUG to NO_DEBUGINFO_STRIP_DEBUG +- fix patchrpm code not to modify immutable header parts +* Fri Nov 18 2005 - ro@suse.de +- honor NO_BRP_STRIP_DEBUG in find-debuginfo.sh +* Sat Oct 29 2005 - mls@suse.de +- use lstat instead of stat when globbing (#129434) +- add RPMTAG_PKGID and RPMTAG_HDRID +- make python always return requires/provides/obsoletes/conflicts + as array +* Mon Oct 24 2005 - ro@suse.de +- find-requires/find-provides: fix MONO_PATH +* Thu Oct 20 2005 - ro@suse.de +- find-requires/find-provides: update mono hooks +* Wed Sep 07 2005 - matz@suse.de +- Make debuginfo packages require exact version of base rpm. +* Fri Sep 02 2005 - mls@suse.de +- backport CLOEXEC workaround [#93727] +- fix typo in man page [#114909] +* Thu Aug 25 2005 - mls@suse.de +- don't catch ignored signals [#74560] +- unblock all signals when running scripts +* Mon Aug 22 2005 - mls@suse.de +- do not try to mmap zero sized files in domd5() +* Fri Aug 12 2005 - mls@suse.de +- change -mcpu to -mtune and add -D_FORTIFY_SOURCE=2 [#104241] +* Wed Aug 03 2005 - mls@suse.de +- ignore /media when creating fdilesystem list +- allow --ignoresize when erasing packages +* Fri Jul 01 2005 - schwab@suse.de +- Fix ppc assembly syntax. +* Wed Jun 08 2005 - matz@suse.de +- add STRIP_KEEP_SYMTAB to find-debuginfo.sh +* Sat May 21 2005 - schwab@suse.de +- find-debuginfo.sh: make writable before extracting debug info, simplify. +* Thu May 19 2005 - schwab@suse.de +- Replace absolute symlinks when copying sources for debuginfo package. +* Wed Apr 06 2005 - schwab@suse.de +- Cleanup neededforbuild. +* Wed Apr 06 2005 - meissner@suse.de +- Added gettext-devel +* Tue Apr 05 2005 - bg@suse.de +- add noarch to valid hppa architectures +* Thu Mar 24 2005 - uli@suse.de +- better ARM support +* Sun Feb 20 2005 - od@suse.de +- fix debugedit for relocatable files (kernel modules) on ppc +* Fri Feb 18 2005 - mls@suse.de +- update debugedit program +* Fri Feb 18 2005 - od@suse.de +- make find-debuginfo.sh handle kernel modules +* Wed Feb 16 2005 - mls@suse.de +- fix --rebuilddb with --root [#50993] +* Fri Feb 11 2005 - mls@suse.de +- update to elfutils-0.97 [#47746], [#48471] +- update to db-4.2.52 [#44193] +- pack brp-symlink +* Fri Feb 11 2005 - ro@suse.de +- remove -fsigned-char from rpmrc (#49877) +* Sat Feb 05 2005 - schwab@suse.de +- Fix building with gcc 4. +* Fri Feb 04 2005 - mls@suse.de +- make python-2.4 work [#49990] +- fix --setguids / --setperms [#47122] +- makd gpgv4 signatures work [#42282] +- add brp-symlink [#49596] +* Fri Feb 04 2005 - ro@suse.de +- fix one regexp in find_lang change +* Thu Feb 03 2005 - ro@suse.de +- hppa may install noarch +* Wed Feb 02 2005 - schwab@suse.de +- Remove compatibility provides on ia64. +* Mon Jan 31 2005 - adrian@suse.de +- handle also ??_?? languages in %%find_lang. +* Fri Jan 28 2005 - coolo@suse.de +- let the debuginfo packages work again +* Fri Jan 21 2005 - skh@suse.de +- changed jpackage macros +* Fri Jan 21 2005 - coolo@suse.de +- use binutils for debuginfo packages +* Fri Jan 14 2005 - coolo@suse.de +- name the debug package -debuginfo to sync with redhat/fedora +* Mon Dec 13 2004 - sndirsch@suse.de +- moved chinese popt mo file to correct directory (Bug #47262) +* Fri Dec 03 2004 - mls@suse.de +- fix update of rpm with same name/version/release but different + architecture +* Thu Nov 25 2004 - ro@suse.de +- fix build with python-2.4 +* Tue Nov 16 2004 - ro@suse.de +- update permissions handling +* Tue Oct 19 2004 - ro@suse.de +- locale rename: no -> nb +* Mon Sep 27 2004 - mls@suse.de +- move TE type initializaten before the addTE call to make + relocations work [#34871, #43557] +* Fri Sep 24 2004 - mls@suse.de +- check payloadformat for "cpio", print extra deltarpm message +- don't skip directories in the fingerprint check when deleting rpms +* Thu Sep 23 2004 - mls@suse.de +- allow database read access in scripts +* Wed Sep 22 2004 - mls@suse.de +- only retry locking if errno is EAGAIN [#45704] +* Fri Sep 17 2004 - mls@suse.de +- fix isSpecfile fix +- reset SIGILL handler in RPMClass() +* Mon Sep 13 2004 - mls@suse.de +- glob.h: add workaround for invalid prototypes +* Thu Sep 09 2004 - mls@suse.de +- fix jpackage macros +- change binary payload compression to w9.bzdio +- fix localization of query results [#38474] +- delete unmaintained cpanflute scripts [#39988] +- patch isSpecfile to be less restrictive [#40328] +- wait up to 3 minutes for the package lock [#40961] +* Thu Sep 02 2004 - mls@suse.de +- add jpackage macros +* Fri Aug 06 2004 - mls@suse.de +- make it build with new automake +* Wed Jun 23 2004 - mls@suse.de +- add support for mono provides/requires autodetection. + limited to *.exe and *.dll for now. +* Sun May 23 2004 - schwab@suse.de +- Don't record timestamp in compressed manpages. +* Thu Apr 22 2004 - mls@suse.de +- add DISABLE_RESTART_ON_UPDATE and DISABLE_STOP_ON_REMOVAL + sysconfig variables +* Mon Apr 19 2004 - mls@suse.de +- go back to libpopt.so.0.0.0 +- also create and pack libpopt.so.1.0.0 for compatibility +* Wed Mar 31 2004 - uli@suse.de +- added detection of i686-capable Transmeta Crusoe that reports + as being i586 (bug #37713). This patch is necessary because YaST + (rightfully) tries to install an i686 glibc on machines with this CPU, but + RPM refuses to do so -> BOOM. This patch is safe because it only uses + cpuid functions already used earlier in RPMClass() and does not do + anything if the CPU identification string does not end in "ineTMx86". +* Wed Mar 31 2004 - ke@suse.de +- remove broken german translation file [#30665], +* Fri Mar 26 2004 - mls@suse.de +- use the system's zlib, fixes python segfault [#36810] +* Sun Mar 21 2004 - aj@suse.de +- Work around lvalue used as cast problems. +* Thu Mar 18 2004 - mls@suse.de +- convert query results to locale encoding [#28347] +- don't check provides if filename doesn't contain '/' [#32078] +- allow interrups if database is RDONLY [#33026] +- added _srcdefattr macro to set defattr for srpms [#33870] +- drop sbits from old files if installing new version [#35376] +- remove bogus entries from .la files [#36346] +- add _docdir_fmt macro to make it possible to create rpms + for other distributions +* Sat Mar 06 2004 - ro@suse.de +- readd lost patch hunk from last change: + set docdir default back to .../packages/%%name (w/o version) +* Fri Mar 05 2004 - mls@suse.de +- backport some fixes from rpm-4.2 +- match py_libdir macro definition with python +- clean and re-create buildroot in a safe way +* Sat Feb 28 2004 - schwab@suse.de +- Remove anchor from pattern in find-requires. +* Fri Feb 27 2004 - schwab@suse.de +- Silence error from find. +* Fri Feb 27 2004 - mls@suse.de +- fix definition of _initrddir +- set sysconfdir to /etc +- set localstatedir to /var +* Thu Feb 26 2004 - schwab@suse.de +- Handle more cases of filenames with spaces. +* Thu Feb 26 2004 - ro@suse.de +- some fixes in linux.prov to survive filenames with spaces +* Thu Feb 12 2004 - mls@suse.de +- fixed linux.req soname generation (#21664) +- disable nptl for now +* Mon Feb 09 2004 - kukuk@suse.de +- linux.req: Fix finding of interpreters +* Sat Feb 07 2004 - olh@suse.de +- disable redhat's uname hack for ppc +* Thu Feb 05 2004 - ro@suse.de +- linux.prov: don't block soname in versioned-requires +- linux.req: disable perl-requires, it's broken +* Tue Feb 03 2004 - schwab@suse.de +- Readd ia64 64bit provides hack. +* Tue Feb 03 2004 - kukuk@suse.de +- Remove all special find-requires scripts and use the default one +* Sat Jan 17 2004 - schwab@suse.de +- Filter out linux-gate.so. +* Thu Jan 15 2004 - schwab@suse.de +- For ia64 require 64bit symbols and provide them both with and without + 64bit. +* Tue Jan 13 2004 - adrian@suse.de +- call ldconfig +- add missing Requires in -devel packages +- add %%defattr +* Fri Jan 09 2004 - kukuk@suse.de +- Coompile with "-fno-strict-aliasing" +* Fri Nov 14 2003 - bg@suse.de +- added changes for hppa +- fix build for hppa +* Fri Oct 10 2003 - sf@suse.de +- added alias 'amd64' for 'x86_64' +* Fri Oct 10 2003 - ro@suse.de +- ignore "linux-gate.so" in ldd output (on 2.6 systems) +* Wed Oct 08 2003 - schwab@suse.de +- Add popt to prerequires for rpm. +* Tue Sep 23 2003 - mls@suse.de +- really disable rpmconfigcheck +* Sat Sep 20 2003 - kukuk@suse.de +- Don't enable rpmconfigcheck per default +* Fri Sep 19 2003 - schwab@suse.de +- Fix descriptor leak [#31450]. +* Mon Sep 15 2003 - mls@suse.de +- remove redhat options from popt (#30302) +- check name and arch to find out if two packages are the same +* Fri Sep 05 2003 - mls@suse.de +- fix rpmalMakeIndex and off by one error in rpmalAllSatisfiesDepend +* Fri Sep 05 2003 - mls@suse.de +- use mkstemp in build.c +- fix --noghost query option +* Fri Sep 05 2003 - mls@suse.de +- escape '+' in MIRE_DEFAULT iterator +- use MIRE_STRCMP when going for an exact match +- update rpmrc +* Wed Sep 03 2003 - mls@suse.de +- speed up installation by making nofsync local and setting it + for all databases but Packages +- fix database locking issue (#29407) +- don't open temporary databases in chroot case (may fix #29584) +* Mon Sep 01 2003 - schwab@suse.de +- Fix assembler routines to not clobber predicate registers. +* Fri Aug 29 2003 - mcihar@suse.cz +- rpm-python require same python version as it was built with +* Fri Aug 22 2003 - mls@suse.de +- make usage of / in post section consistent +- don't force the activation of rpmconfigcheck +* Tue Aug 05 2003 - coolo@suse.de +- give libpopt a soname > 0 as it's not compatible to the libpopt + on SL 8.2 (now that we link shared, it does matter) +* Fri Aug 01 2003 - mls@suse.de +- fix segfault in rpmdbFindByFile +* Thu Jul 31 2003 - mls@suse.de +- added directory tagging to speed up installation/updates +* Tue Jul 29 2003 - mls@suse.de +- add support for patch-rpms +- fix --root option (#28266) +- fix erase exit status (#28267) +- fix database open ignoring locks the second time +* Fri Jul 11 2003 - mls@suse.de +- add perl_vendorlib and perl_vendorarch +- integrate patches +* Tue Jul 01 2003 - coolo@suse.de +- update find-debuginfo.sh to fix permissions of copied files +- give warning on already stripped files +* Fri Jun 27 2003 - schwab@suse.de +- Fix configure scripts. +- Don't link rpm statically. +* Fri Jun 20 2003 - kukuk@suse.de +- use -fPIC, not -fpic to compile elfutils +* Thu Jun 19 2003 - ro@suse.de +- fix build (gettext and definition of mkinstalldirs) +* Mon Jun 16 2003 - kukuk@suse.de +- Don't call find on /usr/share/locale if directory does not exist. +* Sat Jun 14 2003 - coolo@suse.de +- avoid stale links in /usr/src/debug +* Fri Jun 13 2003 - mls@suse.de +- make PreReqs work again if --nodeps is used +- fix rpmconfigcheck +- apply find-debuginfo.sh patch from coolo +* Thu Jun 12 2003 - kukuk@suse.de +- Fix find-lang.sh (special /usr/share/locale handling) +* Thu Jun 12 2003 - coolo@suse.de +- enhancing find-lang.sh to take KDE/GNOME into account and label + them correctly +* Wed Jun 11 2003 - kukuk@suse.de +- Remove translated manual pages +* Fri Jun 06 2003 - mls@suse.de +- fix vendor for s390/s390x +* Thu Jun 05 2003 - mls@suse.de +- no longer build rpm static +- add --fileclass and --filecolor macros to rpmpopt +* Thu Jun 05 2003 - ro@suse.de +- remove dangling rpmpopt symlink +* Mon Jun 02 2003 - mls@suse.de +- convertdb1: call providePackageNVR to retrofit "Provide: name = EVR" + into converted headers +* Fri May 23 2003 - ro@suse.de +- fixed brp-compress to convert bzip2 man pages into gziped ones + (even if hardlinked). (#21121) (from ma) +* Fri May 16 2003 - mls@suse.de +- fixed x86_64 build +* Thu May 15 2003 - mls@suse.de +- update to rpm-4.1.1 +* Tue May 13 2003 - mls@suse.de +- don't obsolete own package when refreshing +- fix parsing of nested conditionals (again) +* Tue May 13 2003 - mls@suse.de +- created rpm-python subpackage +- fix check-files/fixowner, second try +* Mon May 12 2003 - mls@suse.de +- fix check-files to work without buildroot +* Mon May 12 2003 - mls@suse.de +- re-activate fixowner/group/perms +- allow /usr/share/info/dir in check-files +- fix 'head -n 1' in /usr/lib/rpm/find-requires +* Thu May 08 2003 - mls@suse.de +- update to rpm-4.1 +* Mon Apr 07 2003 - ro@suse.de +- fix for new head(1) syntax +* Mon Mar 10 2003 - mls@suse.de +- fix exit status if file to be installed is not a rpm package +* Fri Feb 28 2003 - mls@suse.de +- use mkstemp instead of tempnam (#24478) +* Thu Feb 20 2003 - ma@suse.de +- Work arround rpm2cpio wrongly reporting an error, if the rpm file + is read from stdin. (#16800) +* Mon Feb 17 2003 - mls@suse.de +- made rpmconfigcheck add new files to /var/log/update-messages +* Fri Feb 14 2003 - schwab@suse.de +- Save errno inside Fclose, its return value is never checked anyway. +* Fri Feb 14 2003 - pthomas@suse.de +- find-provides for elf64 systems used to omit symbol versions + if they contained the soname, fixed by find_provides_soname.diff. +* Wed Feb 12 2003 - mls@suse.de +- removed runlevels '1' and 'S' from rpmconfigcheck +* Fri Feb 07 2003 - mls@suse.de +- speed up rpmconfigcheck by just checking the old conflicts if + no rpm was installed +- rerun gpg if gpg fails with "option file created" +- set LC_ALL to C before calling gpg +* Tue Jan 28 2003 - kukuk@suse.de +- Remove wrong Provides "rpm-devel" and "rpm-python" from Provides +* Sun Jan 26 2003 - olh@suse.de +- the official arch_canon value for ppc64 is 16, not 5 +* Thu Jan 16 2003 - ma@suse.de +- update subpackage popt to 1.6.4 +* Thu Dec 19 2002 - schwab@suse.de +- Update autogen patch. +* Mon Nov 18 2002 - stepan@suse.de +- add m68k as chanonical architecture to configure.in +* Mon Nov 18 2002 - ro@suse.de +- adapt to latest autoconf +- use host instead of host_alias for %%host_alias since the latter + is not set +* Mon Nov 11 2002 - ma@suse.de +- let linux.prov list vrsion definitions in libraries/plugins without + soname. (find_provides.diff) (#21664) +* Fri Oct 25 2002 - sf@suse.de +- corrected %%_libdir-macro (rpm-3.0.6-platform.diff) +* Mon Oct 21 2002 - schwab@suse.de +- Fix read beyond EOS. +* Mon Oct 07 2002 - ro@suse.de +- fixed brp-compress script for current fileutils + (add LC_TIME=POSIX, this bug lead to broken tcl man pages) +* Wed Oct 02 2002 - mls@suse.de +- update unpatched files in patchrpms even if --nodeps is used + [Bug #20418] +* Sat Aug 24 2002 - ro@suse.de +- fix popt-devel requires +* Sun Aug 18 2002 - olh@suse.de +- adding -mminimal-toc to each package is a boring job + use it per default on ppc64 +* Thu Aug 15 2002 - kukuk@suse.de +- Add insserv PreRequires [Bug #17969] +* Mon Aug 12 2002 - bk@suse.de +- rpmrc/s390{,x}: change dummy -fomit-frame-pointer to -fsigned-char +* Sat Aug 10 2002 - schwab@suse.de +- Make ia64 arch_compat to i686. +* Sat Aug 10 2002 - kukuk@suse.de +- Fix version number of popt-devel +* Fri Aug 09 2002 - kukuk@suse.de +- Fix typo +* Fri Aug 09 2002 - kukuk@suse.de +- Fix requires of rpm-devel and popt-devel +* Fri Aug 09 2002 - ro@suse.de +- adapt automake version in configure +* Fri Jul 26 2002 - mls@suse.de +- Added perl/python macros from conectiva +* Fri Jul 26 2002 - kukuk@suse.de +- Create rpm-devel and popt-devel subpackages [Bug #17225] +* Fri Jul 26 2002 - kukuk@suse.de +- Change Requires for suse-build-key to build-key +* Thu Jul 25 2002 - mls@suse.de +- renamed rpmconfigscan to rpmconfigcheck +- fixed elf64-linux.req to ignore scripts without #! +- disabled tag check in rpmdbFindByFile, too dangerous +* Thu Jul 18 2002 - mls@suse.de +- fixed double free of header if the postinstall script failed +- return exit status when doing --initdb +* Thu Jul 11 2002 - mls@suse.de +- use "officially reserved" value of RPMFILE_UNPATCHED +- added rpmconfigcheck script to search for unresolved config + file changes +* Mon Jul 08 2002 - mls@suse.de +- new version of patchrpm diff: handle patch "freshen" operations + gracefully +- documented patchrpm options +- taggedindex diff: add directory tags to the fileindex to speed + up file conflict detection +* Tue Jul 02 2002 - ke@suse.de +- Update German program messages using translations by Christian + Kirsch. Add as Source7; drop Patch19 [# 8442]. +* Fri Jun 21 2002 - ro@suse.de +- automake is 1.6.2 +* Wed Jun 12 2002 - bk@suse.de +- ppc: fix arch for elf64.prov and elf64.req to powerpc(from olh) +- s390x: fix brp-lib64-linux to ignore */lib/ld64.so.1 in lib check +- remove obsolete x64_64 scripts, replaced by generic elf64 scripts +- rpm-3.0.6.pkg_build.diff: remove obsolete diff for sparc-linux.req +* Fri May 31 2002 - olh@suse.de +- remove ppc64 hack +* Mon May 27 2002 - bk@suse.de +- all lib64 platforms use the same brp, req and prov scripts now. +- merge mips diff to not include private flags into linux.req.suse +- merge last rpm-3.0.6-s390x-lib64.diff into rpm-3.0.6.config.diff +- add (64bit) fix for empty soname in elf64.prov from sles7-s390x +* Fri May 17 2002 - olh@suse.de +- add more ppc64 changes, add brp-ppc64-linux +- apply mips, x86_64 and s390x patches on all archs +- rpm-3.0.6.lib64.diff: merged all lib64 stuff and add SUBSTS macros + for uname->target_cpu handling on ppc64, s390 and x86_64 +* Wed May 15 2002 - ro@suse.de +- update brp-x86_64-linux +* Wed May 15 2002 - mfabian@suse.de +- fix ja.po, it contained some junk which caused mojibake on + output, especially in ja_JP.UTF-8 locale. Remove a lot + of fuzzies which had correct translations. +* Mon May 13 2002 - olh@suse.de +- do not translate ppc64 to ppc anymore +* Fri Apr 26 2002 - sf@suse.de +- fixed brp-x86_64-linux script +- added *.a-files to brp-script +- look _only_ for files or links with names *.a, *.so* +- added /opt/gnome/lib and /opt/kde/lib +* Wed Apr 24 2002 - sf@suse.de +- added script to show requires and provides with 64 bit + (like s390 and sparc64) +- rpm will now stop (on x86_64) if a 64-bit binary + (or a link to one) is found in + $RPM_BUILD_ROOT{, /usr, /usr/X11R6}/lib +* Wed Apr 24 2002 - ke@suse.de +- patch19: Fix 1 german message (3 strings) in de.po [# 8442]. +* Mon Apr 22 2002 - kukuk@suse.de +- Remove broken s390x try to fix lib64 library location +* Thu Apr 18 2002 - kukuk@suse.de +- x86_64 can also build noarch packages +* Wed Apr 17 2002 - sf@suse.de +- install i386-rpms on x86_64 +- patch65 only, if not on s390x (doesn't apply) +- patch to build with new automake (ro) +* Fri Apr 12 2002 - kukuk@suse.de +- Don't apply s390x 64bit hacks on sparc64, sparc64 has a working + libtool +* Thu Apr 11 2002 - mls@suse.de +- fixed bug in patchrpm case that prevented the reuse of + old timestamps in unpatched files in some cases +- fixed patchrpm dependency failure message +* Wed Apr 10 2002 - sf@suse.de +- added x86_64 architecture +- added --libdir to autogen.sh to copy the libs depending on + architecture (lib / lib64) +* Fri Mar 29 2002 - schwab@suse.de +- Fix for new autotools. +* Fri Mar 22 2002 - mls@suse.de +- added rpmqpack program to speed up susehelp +* Wed Mar 20 2002 - ro@suse.de +- modified config.diff for currently used optflags (#15123) +* Mon Mar 18 2002 - schwab@suse.de +- Don't lose errno. +* Mon Mar 11 2002 - mls@suse.de +- use gpg --keyring when checking keys with uid != 0 +- use hardcoded keyring path if _gpg_path is not set and uid == 0 +- removed _gpg_path from suse_macros +* Sat Mar 09 2002 - bk@suse.de +- brp-s390x-linux: merge lib64 fix: patch .la files when moving +* Fri Mar 08 2002 - ma@suse.de +- introduced x86_64 architecture in rpmrc (#14110) +* Fri Mar 08 2002 - mls@suse.de +- backported rpm4 fix to get mtime right on s390x +* Mon Feb 25 2002 - mls@suse.de +- added patchrpm support +- changed rpm -qi to include the distribution +* Thu Feb 21 2002 - schwab@suse.de +- Fix to build with new gettext. +* Mon Feb 18 2002 - ro@suse.de +- added requires for suse-build-key +* Mon Feb 11 2002 - ro@suse.de +- tar option for bz2 is now "j" (re-added) +* Mon Feb 11 2002 - ma@suse.de +- unk_ugname_cached.diff: Upon building a package, unpacking sources + by calling tar from the spec file, may lead to files with unknown + user/group names. If those files are to be included in the final + package, it's not appropriate to simply map unknown user/group names + to the builders user/group (usg. root). This behaviour has been disabled + and building the package will fail. There are ample means to propperly + define file attributes. If a spec file does not use them, although it + should, it's considered broken. + Unknown user/group names lead to NULL entries in rpms user/group name cache, + which may cause a segmentation fault on cache lookup. This has been fixed. +* Sat Jan 26 2002 - ro@suse.de +- apply configure-diff also on s390x +* Mon Jan 21 2002 - bk@suse.de +- use RPM_OPT_FLAGS for compilation +- add lib64 support for s390x +- update srcdir-supplied rpm-suse_macros file to newest version + adds: %%_lib handling for ltconfig/-main and macro suse_update_libdir +- sparc64 and s390x: call scripts/brp-%%_arch-linux at the end of install +* Wed Jan 16 2002 - schwab@suse.de +- Fix parsing of nested conditionals. +* Wed Jan 02 2002 - schwab@suse.de +- Remove wrong assertion. +* Tue Dec 18 2001 - adrian@suse.de +- fix find-requires for objdump with private flags finaly +* Mon Dec 17 2001 - adrian@suse.de +- apply mips patch only on mips architecture +- fix mips patch +* Sun Dec 16 2001 - adrian@suse.de +- fix find-requires script for mips + ( do not include private flags from objdump to dependencies ) +* Wed Dec 05 2001 - schwab@suse.de +- Use optind = 0 to reset getopt in glibc. +* Mon Dec 03 2001 - schwab@suse.de +- Fix another endian bug due to pointer mismatch. +* Thu Nov 22 2001 - mls@suse.de +- reset getopt in grabArgs() macro expansion +* Thu Nov 15 2001 - ma@suse.de +- Fixed: copyFile() in rpmchecksig didn't recognize 'No space left on + device' condition, when creating tempfiles. rpm reported that the + signature was not ok instead. (#12294) +* Thu Nov 08 2001 - adrian@suse.de +- name mips big endian as "mips" instead of "mipseb" + this is compatible to all GNU tools and to the SGI distribution +* Sat Nov 03 2001 - ro@suse.de +- accept automake 1.5 (still needs depcomp added) +* Tue Sep 04 2001 - schwab@suse.de +- Accept libtool 1.4.1. +* Fri Aug 17 2001 - ro@suse.de +- Exclude /usr/share/doc from Requires +* Sat Jul 21 2001 - schwab@suse.de +- Adapt for autoconf 2.52. +- Allow libtool version suffix. +* Tue Jul 03 2001 - kukuk@suse.de +- Fix typo in last change +* Mon Jul 02 2001 - ma@suse.de +- Change -m486 to -mcpu=i486 in optflags +* Wed Jun 20 2001 - ma@suse.de +- Don't define popt version via macro. Abuild does not like it (#8224). +- Patches for rpmrc.in (ia64.dif,ppc64.rpmrc.diff) incorporated + into config.diff. +- Patches for brp scripts (strip_no_lib.dif) and sparc64-linux.{req,prov} + scripts (sparc64.dif) incorporated into pkg_build.diff. +* Wed Jun 13 2001 - bk@suse.de +- rpm-3.0.6.config.diff: add s390x support +* Mon Jun 11 2001 - olh@suse.de +- add ppc64 diff +* Fri Jun 08 2001 - schwab@suse.de +- Fix endian bugs. +* Mon Jun 04 2001 - kukuk@suse.de +- Fix requires/provides scripts for sparc64 +* Fri Jun 01 2001 - schwab@suse.de +- Fix for new configure tools. +* Wed May 09 2001 - mfabian@suse.de +- bzip2 sources +* Thu May 03 2001 - ma@suse.de +- provides script shouldn't block soname as version +* Tue May 01 2001 - kukuk@suse.de +- modify spec file for sparc64 +* Thu Apr 12 2001 - ro@suse.de +- gettextize to compile with new gettext +* Fri Apr 06 2001 - kukuk@suse.de +- Make some changes to the changes entries so rpm likes it again +* Thu Mar 29 2001 - ro@suse.de +- provides/requires script: add "-n200" to xargs arguments +* Mon Feb 26 2001 - ro@suse.de +- no optimization for alpha for now ... +* Wed Feb 14 2001 - ma@suse.de +- Fix rpmio (unknown type off64_t) with glibc >= 2.2 +- Fix configure.in to recognize SuSE as platform specific vendor +* Tue Feb 06 2001 - ro@suse.de +- popt: include float.h to make it compile +* Wed Jan 17 2001 - schwab@suse.de +- Mark ia64 as compatible to i386. +* Mon Jan 08 2001 - ma@suse.de +- fixed previous fix (error occuring outside %%doc was lost) +* Sat Jan 06 2001 - ma@suse.de +- fixed rpm does not abort build if %%doc file is missing (#503) +* Mon Nov 27 2000 - ma@suse.de +- wrongly free() after alloca() fixed +* Thu Nov 23 2000 - bk@suse.de +- removed old s390 hack(not needed-breaks with new rpm and glibc) +* Tue Nov 14 2000 - ro@suse.de +- added patch not to strip all shared libs and + files with "/lib/modules/" in path +* Fri Nov 03 2000 - ma@suse.de +- let 'rpm -e --root ..' remove files/dirs chroot. +* Wed Oct 25 2000 - ma@suse.de +- update subpackage popt to 1.6 +* Tue Oct 17 2000 - ma@suse.de +- fixed missing libpopt.so in popt subpackage +* Fri Oct 06 2000 - ma@suse.de +- update to 3.0.6 +* Fri Sep 29 2000 - schwab@suse.de +- Fix last change to stay compatible with glibc < 2.2. +* Fri Sep 29 2000 - schwab@suse.de +- Fix libio cookie function pointer clash in rpmio. +* Fri Jul 28 2000 - ma@suse.de +- update to 3.0.5 (handles RPM v4 packages) +- ia64/s309 patches incorporated +* Wed Jul 26 2000 - ma@suse.de +- ignore chown() errors eg. if files are installed on a DOS partition +* Fri Jul 14 2000 - ma@suse.de +- fixed: ignore dependencies below /usr/share/doc. +- rpmrc: synced s390 entries with those in rpm-4.0. +* Mon Jun 26 2000 - bk@suse.de +- build static on s390 too. +* Fri May 26 2000 - schwab@suse.de +- For for new libbz2 API. +* Thu May 18 2000 - kasal@suse.de +- hope now rpm-3.0.4-macro-grabArgs.patch works +* Wed May 17 2000 - kasal@suse.cz +- fixed a typo in rpm-3.0.4-macro-grabArgs.patch (c=='?') +- fixed a problem when + ifarch someother + define macro sometext + endif + defined macro anyway +* Tue May 16 2000 - kasal@suse.cz +- fixed the bug with {?suse_update_config:%%{suse_update_config -f}} +* Fri May 12 2000 - schwab@suse.de +- Make ia64 compatible with noarch. +* Wed Apr 26 2000 - ma@suse.de +- updated 3.0.4, removed obsolete patches, builds on + libc5 +* Fri Apr 14 2000 - ma@suse.de +- Update for RPM-HOWTO +- Fix in config.diff (use Makefile.am not Makefile.in) +* Mon Apr 10 2000 - schwab@suse.de +- Fix config patch. +* Thu Apr 06 2000 - bk@suse.de +- added /lib/libpopt.so* to filelist on s390 +* Wed Apr 05 2000 - bk@suse.de +- uses autoconf and automake now +- added /lib/libbz2.so* and /lib/libz.so* to filelist on s390 +* Sat Apr 01 2000 - bk@suse.de +- add s390 architecture support to rpm +- add required %%suse_update_config for s390 +- rpm is NOT linked statically on s390 for now +* Tue Mar 28 2000 - ma@suse.de +- rpm.spec: avoid macro usage in 'Version:' entry +* Thu Mar 02 2000 - schwab@suse.de +- Fix md5 for ia64. +* Mon Feb 28 2000 - ma@suse.de +- remove 'libNoVersion' in find-requires +* Wed Feb 23 2000 - schwab@suse.de +- recognize ia64 as architecture. +* Mon Feb 07 2000 - ma@suse.de +- rebuilddb fix +- set info/mandir macros to /usr/share/... +* Wed Feb 02 2000 - ma@suse.de +- update to 3.0.4 (popt-1.5) +- new subpackage: popt +* Sat Nov 13 1999 - kukuk@suse.de +- Add sparc64 directory +- Fix installation into RPM_BUILD_ROOT directory +* Mon Nov 08 1999 - kukuk@suse.de +- add directory /usr/src/packages/RPMS/sparc +* Thu Nov 04 1999 - bs@suse.de +- fixed bug in find-requires regarding pseudo scripts + starting with "#! --" +* Thu Oct 28 1999 - bs@suse.de +- added directories /usr/src/packages/RPMS/{ppc,noarch} +* Wed Oct 27 1999 - ma@suse.de +- place suse_macrofile in source/binary package +- don't check reqires below /usr/doc/ +* Mon Sep 13 1999 - bs@suse.de +- ran old prepare_spec on spec file to switch to new prepare_spec. +* Thu Sep 09 1999 - bs@suse.de +- fixed call of Check at the end of %%install section +* Mon Jul 19 1999 - ma@suse.de +- again rebuilddb.patch +* Wed Jul 14 1999 - ro@suse.de +- update to 3.0.3 +* Mon Jun 28 1999 - ro@suse.de +- changed macros.in for libc5 : no "h" parameter for chown,chmod +* Fri Jun 25 1999 - ro@suse.de +- update to rpm-3.0.2 +- added librpmbuild.a to filelist +- added patch not to generate dependency for libNoVersion +- rebuilddb.patch removed (incorporated in source) +* Thu Jun 17 1999 - ma@suse.de +- fixed bug when --rebuilddb and --root where used + at the same time. +* Wed May 26 1999 - ro@suse.de +- update to 3.0.1 +* Mon Apr 26 1999 - werner@suse.de +- Speed up find-requires for linux +* Mon Apr 26 1999 - ro@suse.de +- update to 3.0 (noreplace fix has been incorporated) +* Mon Apr 12 1999 - ro@suse.de +- update to 2.93 +* Fri Mar 19 1999 - ro@suse.de +- update to 2.92 +* Thu Mar 18 1999 - ro@suse.de +- respect movement of libz to usr/lib +* Sun Feb 28 1999 - ro@suse.de +- update to rpm-src from 99/02/25 +* Sat Feb 27 1999 - ro@suse.de +- install both dirs RPM/i386 and RPM/alpha (since buildarch doesn't + seem to be defined now ?) +* Tue Feb 23 1999 - ro@suse.de +- adapted macros file to SuSE +- fixed segfault when not using BuildRoot +* Tue Feb 23 1999 - ro@suse.de +- modified diff-style +- use additional parameter "-h" on chown after unpacking in build +* Mon Feb 22 1999 - ro@suse.de +- update to 2.91 +- ported ma's fixes +* Wed Nov 25 1998 - ma@suse.de +- new version 2.5.5 +- fixed in 2.5.5: find-requires/provides bug +- fixed in 2.5.5: rebuilddb +* Wed Nov 18 1998 - ma@suse.de +- link rpm.dyn dynamic against libc only +* Mon Nov 16 1998 - ma@suse.de +- shared binary (/usr/lib/rpm/rpm.dyn) added +* Tue Nov 10 1998 - ro@suse.de +- fixed find-requires (linux.req) +* Mon Nov 09 1998 - ro@suse.de +- added %%post: do rpm --initdb if triggerindex.rpm doesn't exist +- do chown root.root for RPM-HOWTO +* Thu Nov 05 1998 - ma@suse.de +- new version 2.5.4 +- fix for rebuilddb +- fix for %%config(noreplace) +- RPM-Changes html document that describes the important changes + in RPM since what is documented in Maximum RPM. +* Tue Nov 03 1998 - ro@suse.de +- disabled glibc-patch for build in glibc-2.0 +* Sun Sep 20 1998 - ro@suse.de +- use libdb185.a for rpm in glibc system +* Thu Sep 03 1998 - ma@suse.de +- glibc patches +* Thu Feb 05 1998 - ro@suse.de +- update to 2.4.12 +* Tue Dec 09 1997 - bs@suse.de +- skip *.SuSE-dynamic in find-requires +* Wed Nov 12 1997 - ma@suse.de +- new version 2.4.10 +* Sat Nov 08 1997 - ma@suse.de +- patch: rpmdbFindByFile() didn't work for "/". Thus "/" wasn't + handled correctly in querries and upon updates ("rmdir /"). +* Mon Oct 27 1997 - ma@suse.de +- new version 2.4.8 +- spec file for autobuild provided + - dirs below /usr/src/packages are installed mode 1777 +- obsolete: patch to allow installing rpm v1 packages (from Aug 7 1997) + Seems to be fixed in 2.4.8 +- patch: always 'chdir /' before executing scripts. +- patch: remove empty dirs when installing a symlink +- patch: ignore errors when installing a symlink and called from YaST +- de.po update +* Thu Aug 07 1997 - ma@suse.de +- duplicate '--nodeps' entry in rpm manpage deleted. +- quick patch to allow installing rpm v1 packages. +- workaround to skip installing a symlink (Jul 15 1997) + is disabeled, unless environment variable RPM_IgnoreFailedSymlinks + is set. +* Tue Jul 15 1997 - ro@suse.de +- added workaround to skip installing a symlink when + impossible to remove an existing directory +* Thu Jun 26 1997 - ma@suse.de +- introducing rpm, version 2.4.1 +- documentation (ascii,html) in usr/doc/packages/rpm diff --git a/rpmconfigcheck b/rpmconfigcheck index 7699148..c7a1267 100644 --- a/rpmconfigcheck +++ b/rpmconfigcheck @@ -11,7 +11,7 @@ ### BEGIN INIT INFO # Provides: rpmconfigcheck # Required-Start: $remote_fs -# Required-Stop: $null +# Required-Stop: # Default-Start: 2 3 5 # Default-Stop: # Description: rpm config file scan @@ -66,11 +66,7 @@ case "$1" in rm -f $configcheckfile.old $configcheckfile.dup $configcheckfile.new fi ;; - stop) - ;; - status) - rc_failed 4 - rc_status -v + stop|status) ;; *) echo "Usage: $0 {start}" diff --git a/rpmdb_get_open_flags.diff b/rpmdb_get_open_flags.diff deleted file mode 100644 index eab0b19..0000000 --- a/rpmdb_get_open_flags.diff +++ /dev/null @@ -1,13 +0,0 @@ -Suppress berkeleydb error messages when doing 'rpm --verifydb'. - ---- lib/rpmdb.c.orig 2011-05-12 14:08:07.000000000 +0000 -+++ lib/rpmdb.c 2011-05-12 14:09:06.000000000 +0000 -@@ -165,7 +165,7 @@ static dbiIndex rpmdbOpenIndex(rpmdb db, - uintId, uintCmp, NULL); - } - /* If primary got created, we can safely run without fsync */ -- if ((dbiFlags(dbi) & DBI_CREATED) || db->cfg.db_no_fsync) { -+ if ((!verifyonly && (dbiFlags(dbi) & DBI_CREATED)) || db->cfg.db_no_fsync) { - rpmlog(RPMLOG_DEBUG, "disabling fsync on database\n"); - db->cfg.db_no_fsync = 1; - dbSetFSync(db->db_dbenv, 0); diff --git a/rpmpopt.diff b/rpmpopt.diff index 0a00ea8..6f88a93 100644 --- a/rpmpopt.diff +++ b/rpmpopt.diff @@ -1,8 +1,10 @@ ---- ./rpmpopt.in.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./rpmpopt.in 2011-05-11 15:02:34.000000000 +0000 -@@ -101,7 +101,8 @@ Relocations : %|PREFIXES?{[%{PREFIXES} ] +Index: rpmpopt.in +=================================================================== +--- rpmpopt.in.orig ++++ rpmpopt.in +@@ -86,7 +86,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p + %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|URL?{URL : %{URL}\n}|\ - %|BUGURL?{Bug URL : %{BUGURL}\n}|\ Summary : %{SUMMARY}\n\ -Description :\n%{DESCRIPTION}\n' \ +Description :\n%{DESCRIPTION}\n\ @@ -10,3 +12,78 @@ --POPTdesc=$"list descriptive information from package(s)" rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ +@@ -129,11 +130,11 @@ rpm alias --fileprovide --qf '[%{FILENAM + rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \ + --POPTdesc=$"list file names with requires" + +-rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides \ +- --POPTdesc=$"find package name that contains a provided capability (needs rpmdb-redhat package installed)" ++rpm alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \ ++ --POPTdesc=$"list file names with classes" + +-rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires \ +- --POPTdesc=$"find package name that contains a required capability (needs rpmdb-redhat package installed)" ++rpm alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \ ++ --POPTdesc=$"list file names with colors" + + # colon separated i18n domains to use as PO catalogue lookaside for + * retrieving header group/description/summary. +@@ -201,22 +202,22 @@ rpm alias --timecheck --define '_timeche + #rpm exec --target rpmb --target + #rpm exec --short-circuit rpmb --short-circuit + +-rpm exec --initdb rpmd --initdb +-rpm exec --rebuilddb rpmd --rebuilddb +-rpm exec --verifydb rpmd --verifydb +- +-rpm exec --addsign rpmk --addsign +-rpm exec -K rpmk -K +-rpm exec --checksig rpmk --checksig +-rpm exec --import rpmk --import +-rpm exec --resign rpmk --resign +- +-rpm exec -q rpmq -q +-rpm exec --query rpmq --query +-rpm exec --querytags rpmq --querytags +-rpm exec -V rpmv -V +-rpm exec -y rpmv -y +-rpm exec --verify rpmv --verify ++#rpm exec --initdb rpmd --initdb ++#rpm exec --rebuilddb rpmd --rebuilddb ++#rpm exec --verifydb rpmd --verifydb ++ ++#rpm exec --addsign rpmk --addsign ++#rpm exec -K rpmk -K ++#rpm exec --checksig rpmk --checksig ++#rpm exec --import rpmk --import ++#rpm exec --resign rpmk --resign ++ ++#rpm exec -q rpmq -q ++#rpm exec --query rpmq --query ++#rpm exec --querytags rpmq --querytags ++#rpm exec -V rpmv -V ++#rpm exec -y rpmv -y ++#rpm exec --verify rpmv --verify + + #rpm exec -i rpmi -i + #rpm exec --install rpmi --install +@@ -382,7 +383,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p + %|PACKAGER?{Packager : %{PACKAGER}\n}|\ + %|URL?{URL : %{URL}\n}|\ + Summary : %{SUMMARY}\n\ +-Description :\n%{DESCRIPTION}\n' \ ++Description :\n%{DESCRIPTION}\n\ ++Distribution: %{DISTRIBUTION}\n' \ + --POPTdesc=$"list descriptive information from package(s)" + + rpmq alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ +@@ -495,7 +497,8 @@ Size : %-27{SIZE}%|LICENSE?{ + %|PACKAGER?{Packager : %{PACKAGER}\n}|\ + %|URL?{URL : %{URL}\n}|\ + Summary : %{SUMMARY}\n\ +-Description :\n%{DESCRIPTION}\n' \ ++Description :\n%{DESCRIPTION}\n\ ++Distribution: %{DISTRIBUTION}\n' \ + --POPTdesc=$"list descriptive information from package(s)" + + rpmquery alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ diff --git a/rpmqpack.diff b/rpmqpack.diff index 63605be..3013c3a 100644 --- a/rpmqpack.diff +++ b/rpmqpack.diff @@ -1,32 +1,51 @@ Provide rpmqpack, a fast way to list all installed packages are check if some package is installed. This is a hack. ---- ./Makefile.am.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./Makefile.am 2011-05-11 15:15:27.000000000 +0000 -@@ -170,6 +170,10 @@ rpmgraph_LDADD = lib/librpm.la rpmio/lib +--- Makefile.am ++++ Makefile.am +@@ -48,7 +48,7 @@ + bin_SCRIPTS = gendiff - dist_bin_SCRIPTS = scripts/gendiff + pkglibdir = @RPMCONFIGDIR@ +-pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq ++pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq rpmqpack + pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros + pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \ + config.guess config.sub config.site +@@ -98,6 +98,12 @@ + rpm2cpio_LDFLAGS = $(myLDFLAGS) + rpm2cpio_LDADD = $(myLDADD) @LIBMISC@ -+bin_PROGRAMS += rpmqpack -+rpmqpack_SOURCES = rpmqpack.c -+rpmqpack_LDADD = lib/librpm.la ++rpmqpack_SOURCES = rpmqpack.c ++rpmqpack_LDFLAGS = $(myLDFLAGS) ++rpmqpack_LDADD = $(top_builddir)/rpmdb/librpmdb.la \ ++ $(top_builddir)/rpmio/librpmio.la \ ++ $(top_builddir)/popt/libpopt.la + - rpmconfig_DATA = rpmrc - rpmrc: $(top_srcdir)/rpmrc.in - @$(SED) \ ---- ./doc/Makefile.am.orig 2011-01-05 08:11:09.000000000 +0000 -+++ ./doc/Makefile.am 2011-05-11 15:16:24.000000000 +0000 -@@ -8,7 +8,7 @@ EXTRA_DIST += $(man_man1_DATA) + $(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@ - man_man8dir = $(mandir)/man8 - man_man8_DATA = rpm.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 --man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 -+man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 rpmqpack.8 - EXTRA_DIST += $(man_man8_DATA) + .PHONY: splint +@@ -147,6 +153,8 @@ + @LN_S@ ../lib/rpm/rpmv $(DESTDIR)$(bindir)/rpmverify + rm -f $(DESTDIR)$(bindir)/rpmsign + @LN_S@ ../lib/rpm/rpmk $(DESTDIR)$(bindir)/rpmsign ++ rm -f $(DESTDIR)$(bindir)/rpmqpack ++ @LN_S@ ../lib/rpm/rpmqpack $(DESTDIR)$(bindir)/rpmqpack + rm -f $(DESTDIR)$(bindir)/rpmdb ; \ + @LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \ + for bf in e i u ; do \ +--- doc/Makefile.am ++++ doc/Makefile.am +@@ -2,6 +2,6 @@ - man_fr_man8dir = $(mandir)/fr/man8 ---- ./doc/rpmqpack.8.orig 2011-05-11 15:15:27.000000000 +0000 -+++ ./doc/rpmqpack.8 2011-05-11 15:15:27.000000000 +0000 + SUBDIRS = manual fr ja ko pl ru sk + +-man_MANS = gendiff.1 rpm.8 rpmbuild.8 rpmcache.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 ++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 ++++ doc/rpmqpack.8 @@ -0,0 +1,25 @@ +.TH RPMQPACK 8 "Mar 2002" +.SH NAME @@ -53,8 +72,8 @@ check if some package is installed. This is a hack. + +.SH AUTHOR +Michael Schroeder ---- ./rpmqpack.c.orig 2011-05-11 15:15:27.000000000 +0000 -+++ ./rpmqpack.c 2011-05-11 15:15:27.000000000 +0000 +--- rpmqpack.c ++++ rpmqpack.c @@ -0,0 +1,59 @@ +#include +#include @@ -80,7 +99,7 @@ check if some package is installed. This is a hack. + perror("db_create"); + exit(1); + } -+ if (db->open(db, 0, "/var/lib/rpm/Name", 0, DB_UNKNOWN, DB_RDONLY, 0664)) ++ if (db->open(db, 0, "/var/lib/rpm/Name", 0, DB_HASH, DB_RDONLY, 0664)) + { + perror("db->open"); + exit(1); diff --git a/rpmrc.diff b/rpmrc.diff index f2d5b84..399a67a 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -4,33 +4,46 @@ Index: rpmrc.in =================================================================== --- rpmrc.in.orig +++ rpmrc.in -@@ -12,16 +12,16 @@ +@@ -15,41 +15,42 @@ # "fat" binary with both archs, for Darwin optflags: fat -O2 -g -arch i386 -arch ppc --optflags: i386 -O2 -g -march=i386 -mtune=i686 +-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: pentium3 -O2 -g -march=pentium3 --optflags: pentium4 -O2 -g -march=pentium4 --optflags: athlon -O2 -g -march=athlon -+optflags: i386 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -+optflags: i486 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -+optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -+optflags: i686 -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -+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: i386 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 ++optflags: i486 -O2 -g -m32 -march=i486 ++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 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -+optflags: x86_64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++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 -@@ -41,15 +41,16 @@ optflags: sparc64v -O2 -g -m64 -mtune=ni + 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 optflags: m68k -O2 -g -fomit-frame-pointer @@ -41,31 +54,44 @@ Index: rpmrc.in -optflags: ppciseries -O2 -g -fsigned-char -optflags: ppcpseries -O2 -g -fsigned-char -optflags: ppc64 -O2 -g -fsigned-char -+optflags: ppc -O2 -g -m32 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -+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 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++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: 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 -@@ -75,8 +76,8 @@ optflags: atariclone -O2 -g -fomit-frame +@@ -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 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 -m31 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -+optflags: s390x -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++optflags: s390 -O2 -g -fmessage-length=0 ++optflags: s390x -O2 -g -fmessage-length=0 - optflags: sh3 -O2 -g - optflags: sh4 -O2 -g -mieee -@@ -200,17 +201,17 @@ os_canon: MacOSX: macosx 21 + ############################################################# + # Canonical arch names and numbers +@@ -181,16 +182,16 @@ os_canon: MacOSX: macosx 21 ############################################################# # For a given uname().machine, the default build arch @@ -77,13 +103,11 @@ 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 @@ -91,17 +115,17 @@ Index: rpmrc.in buildarchtranslate: i486: i386 buildarchtranslate: i386: i386 -@@ -239,6 +240,7 @@ buildarchtranslate: ppciseries: ppc +@@ -217,6 +218,7 @@ buildarchtranslate: ppciseries: ppc buildarchtranslate: ppcpseries: ppc buildarchtranslate: ppc64iseries: ppc64 buildarchtranslate: ppc64pseries: ppc64 +buildarchtranslate: powerpc64: ppc64 - buildarchtranslate: armv3l: armv3l - buildarchtranslate: armv4b: armv4b -@@ -270,6 +272,15 @@ buildarchtranslate: sh3: sh3 - buildarchtranslate: sh4: sh4 - buildarchtranslate: sh4a: sh4 + buildarchtranslate: atarist: m68kmint + buildarchtranslate: atariste: m68kmint +@@ -235,6 +237,15 @@ buildarchtranslate: x86_64: x86_64 + buildarchtranslate: amd64: x86_64 + buildarchtranslate: ia32e: x86_64 +buildarchtranslate: parisc: hppa +buildarchtranslate: hppa2.0: hppa @@ -115,7 +139,7 @@ Index: rpmrc.in ############################################################# # Architecture compatibility -@@ -325,14 +336,18 @@ arch_compat: mipsel: noarch +@@ -287,10 +298,16 @@ arch_compat: mipsel: noarch arch_compat: hppa2.0: hppa1.2 arch_compat: hppa1.2: hppa1.1 arch_compat: hppa1.1: hppa1.0 @@ -127,28 +151,30 @@ Index: rpmrc.in +arch_compat: armv5teb: armv5b +arch_compat: armv5b: armv4b arch_compat: armv4b: noarch - arch_compat: armv7l: armv6l - arch_compat: armv6l: armv5tejl - arch_compat: armv5tejl: armv5tel --arch_compat: armv5tel: armv4tl ++ +arch_compat: armv5tel: armv5l -+arch_compat: armv5l: armv4tl - arch_compat: armv4tl: armv4l ++arch_compat: armv5l: armv4l arch_compat: armv4l: armv3l arch_compat: armv3l: noarch -@@ -349,9 +364,9 @@ arch_compat: i370: noarch - arch_compat: s390: noarch - arch_compat: s390x: s390 noarch --arch_compat: ia64: noarch -+arch_compat: ia64: i686 noarch +@@ -308,7 +325,7 @@ arch_compat: s390x: s390 noarch + + arch_compat: ia64: noarch -arch_compat: x86_64: amd64 athlon noarch +arch_compat: x86_64: amd64 em64t athlon noarch arch_compat: amd64: x86_64 athlon noarch arch_compat: ia32e: x86_64 athlon noarch -@@ -444,7 +459,8 @@ buildarch_compat: armv3l: 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 + buildarch_compat: hppa2.0: hppa1.2 buildarch_compat: hppa1.2: hppa1.1 buildarch_compat: hppa1.1: hppa1.0 @@ -158,3 +184,12 @@ 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 + +-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 + + # \endverbatim + #*/ diff --git a/rpmrctests.diff b/rpmrctests.diff index 34e42fe..d756989 100644 --- a/rpmrctests.diff +++ b/rpmrctests.diff @@ -1,8 +1,9 @@ -Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713] +Patch machine detection code: always use "ppc", restore SIGILL +handler, detect transmeta. [#52713] ---- ./lib/rpmrc.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./lib/rpmrc.c 2011-05-11 12:48:02.000000000 +0000 -@@ -1,9 +1,6 @@ +--- ./lib/rpmrc.c.orig 2005-01-17 18:46:23.000000000 +0000 ++++ ./lib/rpmrc.c 2005-12-16 18:30:29.000000000 +0000 +@@ -2,9 +2,6 @@ #include "system.h" #include @@ -10,13 +11,37 @@ Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713] -#include -#endif - #if HAVE_SYS_UTSNAME_H - #include -@@ -788,6 +785,14 @@ static inline int RPMClass(void) + #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); cpu = (tfms>>8)&15; -+ if (cpu == 5 ++ /* Check if we have a Transmeta i686-compatible CPU ++ that reports as being i586 */ ++ if(cpu == 5 + && cpuid_ecx(0)=='68xM' + && cpuid_edx(0)=='Teni' + && (cpuid_edx(1) & ((1<<8)|(1<<15))) == ((1<<8)|(1<<15))) { @@ -24,11 +49,13 @@ Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713] + return 6; /* has CX8 and CMOV */ + } + - sigaction(SIGILL, &oldsa, NULL); - ++ sigaction(SIGILL, &oldsa, NULL); ++ if (cpu < 6) -@@ -924,15 +929,6 @@ static int is_geode() - } + return cpu; + +@@ -1076,15 +1091,6 @@ static int is_pentium4() + #endif -#if defined(__linux__) && defined(__powerpc__) @@ -42,8 +69,8 @@ Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713] - /** */ - static void defaultMachine(const char ** arch, -@@ -1059,6 +1055,11 @@ static void defaultMachine(const char ** + static void defaultMachine(/*@out@*/ const char ** arch, +@@ -1219,6 +1225,11 @@ static void defaultMachine(/*@out@*/ con /* big endian */ strcpy(un.machine, "mips"); # endif @@ -55,3 +82,31 @@ Patch machine detection code: detect transmeta, rename parisc to hppa. [#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/rpmsort b/rpmsort index 841c2d7..a73478b 100644 --- a/rpmsort +++ b/rpmsort @@ -17,7 +17,7 @@ use Getopt::Long qw(:config gnu_getopt); -sub do_rpm_cmp_versions { +sub rpm_cmp_versions { my ($evr1, $evr2) = @_; sub _rpm_cmp { @@ -31,10 +31,8 @@ sub do_rpm_cmp_versions { $s1 =~ s/^[^a-zA-Z0-9]+//; $s2 =~ s/^[^a-zA-Z0-9]+//; if ($s1 =~ /^\d/ || $s2 =~ /^\d/) { - $s1 =~ s/^(0*(\d*))//; $x1 = $2; - return -1 if $1 eq ''; - $s2 =~ s/^(0*(\d*))//; $x2 = $2; - return 1 if $1 eq ''; + $s1 =~ s/^0*(\d*)//; $x1 = $1; + $s2 =~ s/^0*(\d*)//; $x2 = $1; $r = length $x1 <=> length $x2 || $x1 cmp $x2; } else { $s1 =~ s/^([a-zA-Z]*)//; $x1 = $1; @@ -59,35 +57,11 @@ sub do_rpm_cmp_versions { my $reorder = sub { return @_ }; my $key = 0; -my $test = 0; - -sub rpm_cmp_versions { - my ($evr1, $evr2) = @_; - - chomp($evr1, $evr2); - my $res1 = do_rpm_cmp_versions($evr1, $evr2); - if ($test) { - open(my $fd, '-|', 'zypper', '--terse', 'versioncmp', - $evr1, $evr2) or die "zypper: $!\n"; - my $res2 = <$fd>; - close($fd) or die "zypper: $!\n"; - chomp $res2; - if ($res1 != $res2) { - my @operators = qw(< == >); - my $op1 = $operators[$res1 + 1]; - my $op2 = $operators[$res2 + 1]; - - print STDERR "BUG: $evr1 $op1 $evr2 vs. zypper: $evr1 $op2 $evr2\n"; - } - } - return $res1; -} GetOptions ("r|reverse" => sub { $reorder = sub { return reverse @_ } }, - "k|key=i" => \$key, - "test" => \$test) + "k|key=i" => \$key) or do { - print STDERR "Usage $0 [-r, --reverse] [-k N, --key=N] [--test]\n"; + print STDERR "Usage\n"; exit 1; }; diff --git a/safemacro.diff b/safemacro.diff deleted file mode 100644 index 96f065a..0000000 --- a/safemacro.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- rpmio/macro.c.orig 2011-05-17 08:43:40.000000000 +0000 -+++ rpmio/macro.c 2011-05-17 08:44:48.000000000 +0000 -@@ -1016,12 +1016,12 @@ expandMacro(MacroBuf mb, const char *src - char *source = NULL; - - /* Handle non-terminated substrings by creating a terminated copy */ -- if (slen > 0) { -- source = xmalloc(slen + 1); -- strncpy(source, src, slen); -- source[slen] = '\0'; -- s = source; -- } -+ if (!slen) -+ slen = strlen(src); -+ source = xmalloc(slen + 1); -+ strncpy(source, src, slen); -+ source[slen] = '\0'; -+ s = source; - - if (mb->buf == NULL) { - size_t blen = MACROBUFSIZ + strlen(s); diff --git a/safeugid.diff b/safeugid.diff deleted file mode 100644 index 859dd02..0000000 --- a/safeugid.diff +++ /dev/null @@ -1,213 +0,0 @@ -Work around glibc/nscd caching problems when doing 'rpm --root'. - ---- ./lib/rpmchroot.c.orig 2011-05-12 08:26:10.000000000 +0000 -+++ ./lib/rpmchroot.c 2011-05-12 08:28:32.000000000 +0000 -@@ -66,6 +66,7 @@ int rpmChrootIn(void) - } else if (rootState.chrootDone == 0) { - if (chdir("/") == 0 && chroot(rootState.rootDir) == 0) { - rootState.chrootDone = 1; -+ rpmugChroot(1); - } else { - rpmlog(RPMLOG_ERR, _("Unable to change root directory: %m\n")); - rc = -1; -@@ -91,6 +92,7 @@ int rpmChrootOut(void) - } else if (rootState.chrootDone == 1) { - if (chroot(".") == 0 && fchdir(rootState.cwd) == 0) { - rootState.chrootDone = 0; -+ rpmugChroot(0); - } else { - rpmlog(RPMLOG_ERR, _("Unable to restore root directory: %m\n")); - rc = -1; ---- ./lib/rpmug.c.orig 2011-05-12 08:13:52.000000000 +0000 -+++ ./lib/rpmug.c 2011-05-12 08:33:28.000000000 +0000 -@@ -35,6 +35,47 @@ const char * rpmugStashStr(const char *s - return ret; - } - -+#if defined(__GLIBC__) -+ -+static int inchroot; -+ -+/* -+ * Unfortunatelly glibc caches nss/nscd data and there is no -+ * good way to flush those caches when we did a chroot(). Thus -+ * we need to parse /etc/passwd and /etc/group ourselfs. -+ */ -+static int safe_lookup(const char * file, const char * name) -+{ -+ FILE *fp; -+ int l; -+ char buf[4096], *p; -+ -+ if (!name || !*name) -+ return -1; -+ l = strlen(name); -+ if ((fp = fopen(file, "r")) == 0) -+ return -1; -+ while ((p = fgets(buf, sizeof(buf), fp)) != 0) { -+ if (*p == '#') -+ continue; -+ while (*p && (*p == ' ' || *p == '\t')) -+ p++; -+ if (strncmp(p, name, l) != 0 || p[l] != ':') -+ continue; -+ p = strchr(p + l + 1, ':'); -+ if (!p) -+ continue; -+ fclose(fp); -+ p++; -+ while (*p && (*p == ' ' || *p == '\t')) -+ p++; -+ return atoi(p); -+ } -+ fclose(fp); -+ return -1; -+} -+#endif -+ - /* - * These really ought to use hash tables. I just made the - * guess that most files would be owned by root or the same person/group -@@ -68,17 +109,28 @@ int rpmugUid(const char * thisUname, uid - lastUnameAlloced = thisUnameLen + 10; - lastUname = xrealloc(lastUname, lastUnameAlloced); /* XXX memory leak */ - } -- strcpy(lastUname, thisUname); - -- pwent = getpwnam(thisUname); -- if (pwent == NULL) { -- /* FIX: shrug */ -- endpwent(); -+#if defined(__GLIBC__) -+ if (inchroot) { -+ int uid = safe_lookup("/etc/passwd", thisUname); -+ if (uid < 0) -+ return -1; -+ lastUid = uid; -+ } else -+#endif -+ { - pwent = getpwnam(thisUname); -- if (pwent == NULL) return -1; -+ if (pwent == NULL) { -+ /* FIX: shrug */ -+ endpwent(); -+ pwent = getpwnam(thisUname); -+ if (pwent == NULL) return -1; -+ } -+ lastUid = pwent->pw_uid; - } - -- lastUid = pwent->pw_uid; -+ strcpy(lastUname, thisUname); -+ lastUnameLen = thisUnameLen; - } - - *uid = lastUid; -@@ -111,18 +163,29 @@ int rpmugGid(const char * thisGname, gid - lastGnameAlloced = thisGnameLen + 10; - lastGname = xrealloc(lastGname, lastGnameAlloced); /* XXX memory leak */ - } -- strcpy(lastGname, thisGname); - -- grent = getgrnam(thisGname); -- if (grent == NULL) { -- /* FIX: shrug */ -- endgrent(); -+#if defined(__GLIBC__) -+ if (inchroot) { -+ int gid = safe_lookup("/etc/group", thisGname); -+ if (gid < 0) -+ return -1; -+ lastGid = gid; -+ } else -+#endif -+ { - grent = getgrnam(thisGname); - if (grent == NULL) { -- return -1; -+ /* FIX: shrug */ -+ endgrent(); -+ grent = getgrnam(thisGname); -+ if (grent == NULL) { -+ return -1; -+ } - } -+ lastGid = grent->gr_gid; - } -- lastGid = grent->gr_gid; -+ strcpy(lastGname, thisGname); -+ lastGnameLen = thisGnameLen; - } - - *gid = lastGid; -@@ -134,7 +197,7 @@ const char * rpmugUname(uid_t uid) - { - static uid_t lastUid = (uid_t) -1; - static char * lastUname = NULL; -- static size_t lastUnameLen = 0; -+ static size_t lastUnameAlloced = 0; - - if (uid == (uid_t) -1) { - lastUid = (uid_t) -1; -@@ -151,9 +214,9 @@ const char * rpmugUname(uid_t uid) - - lastUid = uid; - len = strlen(pwent->pw_name); -- if (lastUnameLen < len + 1) { -- lastUnameLen = len + 20; -- lastUname = xrealloc(lastUname, lastUnameLen); -+ if (lastUnameAlloced < len + 1) { -+ lastUnameAlloced = len + 20; -+ lastUname = xrealloc(lastUname, lastUnameAlloced); - } - strcpy(lastUname, pwent->pw_name); - -@@ -165,7 +228,7 @@ const char * rpmugGname(gid_t gid) - { - static gid_t lastGid = (gid_t) -1; - static char * lastGname = NULL; -- static size_t lastGnameLen = 0; -+ static size_t lastGnameAlloced = 0; - - if (gid == (gid_t) -1) { - lastGid = (gid_t) -1; -@@ -182,9 +245,9 @@ const char * rpmugGname(gid_t gid) - - lastGid = gid; - len = strlen(grent->gr_name); -- if (lastGnameLen < len + 1) { -- lastGnameLen = len + 20; -- lastGname = xrealloc(lastGname, lastGnameLen); -+ if (lastGnameAlloced < len + 1) { -+ lastGnameAlloced = len + 20; -+ lastGname = xrealloc(lastGname, lastGnameAlloced); - } - strcpy(lastGname, grent->gr_name); - -@@ -200,3 +263,16 @@ void rpmugFree(void) - rpmugGname(-1); - strStash = strCacheFree(strStash); - } -+ -+void rpmugChroot(int in) -+{ -+ /* tell libc to drop caches / file descriptors */ -+ endpwent(); -+ endgrent(); -+ /* drop our own caches */ -+ rpmugUid(NULL, NULL); -+ rpmugGid(NULL, NULL); -+#if defined(__GLIBC__) -+ inchroot = in; -+#endif -+} ---- ./lib/rpmug.h.orig 2011-05-12 08:13:52.000000000 +0000 -+++ ./lib/rpmug.h 2011-05-12 08:26:56.000000000 +0000 -@@ -15,4 +15,6 @@ const char * rpmugGname(gid_t gid); - - void rpmugFree(void); - -+void rpmugChroot(int in); -+ - #endif /* _RPMUG_H */ diff --git a/sbitcheck.diff b/sbitcheck.diff new file mode 100644 index 0000000..368e3de --- /dev/null +++ b/sbitcheck.diff @@ -0,0 +1,105 @@ +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 new file mode 100644 index 0000000..7501f4e --- /dev/null +++ b/setpermsugids.diff @@ -0,0 +1,20 @@ +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/signature.diff b/signature.diff new file mode 100644 index 0000000..d2de3a3 --- /dev/null +++ b/signature.diff @@ -0,0 +1,21 @@ +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 new file mode 100644 index 0000000..87174fb --- /dev/null +++ b/signwriteerror.diff @@ -0,0 +1,16 @@ +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/specfilemacro.diff b/specfilemacro.diff deleted file mode 100644 index a9663dc..0000000 --- a/specfilemacro.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- ./build/parseSpec.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./build/parseSpec.c 2011-05-11 15:58:37.000000000 +0000 -@@ -519,6 +519,7 @@ static rpmSpec parseSpec(const char *spe - spec = newSpec(); - - spec->specFile = rpmGetPath(specFile, NULL); -+ addMacro(spec->macros, "_specfile", NULL, spec->specFile, RMIL_SPEC); - spec->fileStack = newOpenFileInfo(); - spec->fileStack->fileName = xstrdup(spec->specFile); - /* If buildRoot not specified, use default %{buildroot} */ diff --git a/spectest.diff b/spectest.diff new file mode 100644 index 0000000..5416193 --- /dev/null +++ b/spectest.diff @@ -0,0 +1,19 @@ +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 new file mode 100644 index 0000000..61fed9f --- /dev/null +++ b/sqcondmutex.diff @@ -0,0 +1,119 @@ +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 new file mode 100644 index 0000000..a2f0df6 --- /dev/null +++ b/srcdefattr.diff @@ -0,0 +1,68 @@ +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 f4c981b..be5188f 100644 --- a/suspendlock.diff +++ b/suspendlock.diff @@ -2,128 +2,36 @@ Suspend exclusive database lock when scriptlets get called, allowing read access in scriptlets. Only needed for DB_PRIVATE (aka global) locking. ---- ./lib/backend/db3.c.orig 2011-05-12 10:24:20.000000000 +0000 -+++ ./lib/backend/db3.c 2011-05-12 10:26:14.000000000 +0000 -@@ -640,3 +640,59 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt - - return rc; - } -+ -+int dbiSuspendDBLock(dbiIndex dbi, unsigned int flags) -+{ -+ struct flock l; -+ int rc = 0; -+ int fdno = -1; -+ -+ if (!dbi->dbi_lockdbfd) -+ return 0; -+ if (!(dbi->dbi_rpmdb->db_mode & (O_RDWR|O_WRONLY))) -+ return 0; -+ if (_lockdbfd == 0) -+ return 0; -+ if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0)) -+ return 1; -+ memset(&l, 0, sizeof(l)); -+ l.l_whence = 0; -+ l.l_start = 0; -+ l.l_len = 0; -+ l.l_type = F_RDLCK; -+ rc = fcntl(fdno, F_SETLK, (void *)&l); -+ if (rc) -+ rpmlog(RPMLOG_WARNING, _("could not suspend database lock\n")); -+ return rc; -+} -+ -+int dbiResumeDBLock(dbiIndex dbi, unsigned int flags) -+{ -+ struct flock l; -+ int rc = 0; -+ int tries; -+ int fdno = -1; -+ -+ if (!dbi->dbi_lockdbfd) -+ return 0; -+ if (!(dbi->dbi_rpmdb->db_mode & (O_RDWR|O_WRONLY))) -+ return 0; -+ if (_lockdbfd == 0) -+ return 0; -+ if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0)) -+ return 1; -+ for (tries = 0; tries < 2; tries++) { -+ memset(&l, 0, sizeof(l)); -+ l.l_whence = 0; -+ l.l_start = 0; -+ l.l_len = 0; -+ l.l_type = F_WRLCK; -+ rc = fcntl(fdno, tries ? F_SETLKW : F_SETLK, (void *)&l); -+ if (!rc) -+ break; -+ if (tries == 0) -+ rpmlog(RPMLOG_WARNING, _("waiting to reestablish exclusive database lock\n")); -+ } -+ return rc; -+} -+ ---- ./lib/backend/dbi.h.orig 2010-12-21 09:48:21.000000000 +0000 -+++ ./lib/backend/dbi.h 2011-05-12 10:24:57.000000000 +0000 -@@ -263,6 +263,24 @@ int dbiFlags(dbiIndex dbi); - RPM_GNUC_INTERNAL - const char * dbiName(dbiIndex dbi); - -+/** \ingroup dbi -+ * Suspend the exclusive lock on the dbi -+ * @param dbi index database handle -+ * @param flags (unused) -+ * @return 0 on success -+ */ -+RPM_GNUC_INTERNAL -+int dbiSuspendDBLock(dbiIndex dbi, unsigned int flags); -+ -+/** \ingroup dbi -+ * Reacquire an exclusive lock on the dbi -+ * @param dbi index database handle -+ * @param flags (unused) -+ * @return 0 on success -+ */ -+RPM_GNUC_INTERNAL -+int dbiResumeDBLock(dbiIndex dbi, unsigned int flags); -+ - #ifdef __cplusplus - } - #endif ---- ./lib/psm.c.orig 2011-05-12 10:23:47.000000000 +0000 -+++ ./lib/psm.c 2011-05-12 10:24:57.000000000 +0000 -@@ -412,10 +412,12 @@ static rpmRC runScript(rpmpsm psm, ARGV_ - script->tag != RPMTAG_VERIFYSCRIPT); - int selinux = !(rpmtsFlags(psm->ts) & RPMTRANS_FLAG_NOCONTEXTS); +I hijacked the dbiSync function for this because I did not want +to change the ABI. + +Index: lib/psm.c +=================================================================== +--- lib/psm.c.orig ++++ lib/psm.c +@@ -799,6 +799,8 @@ static rpmRC runScript(rpmpsm psm, Heade + } + if (out == NULL) return RPMRC_FAIL; /* XXX can't happen */ + rpmtsSuspendResumeDBLock(psm->ts, 0); - rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); - rc = rpmScriptRun(script, arg1, arg2, rpmtsScriptFd(psm->ts), - prefixes, warn_only, selinux); - rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); -+ rpmtsSuspendResumeDBLock(psm->ts, 1); - - /* - * Notify callback for all errors. "total" abused for warning/error, ---- ./lib/rpmdb.c.orig 2011-05-12 10:23:47.000000000 +0000 -+++ ./lib/rpmdb.c 2011-05-12 10:24:57.000000000 +0000 -@@ -674,6 +674,12 @@ int rpmdbSync(rpmdb db) - return dbiForeach(db->_dbi, dbiSync, 0); - } - -+int rpmdbSuspendResumeDBLock(rpmdb db, int mode) -+{ -+ if (db == NULL) return 0; -+ return dbiForeach(db->_dbi, mode ? dbiResumeDBLock : dbiSuspendDBLock, 0); -+} + - static rpmdb newRpmdb(const char * root, const char * home, - int mode, int perms, int flags) - { ---- ./lib/rpmts.c.orig 2010-12-22 11:17:20.000000000 +0000 -+++ ./lib/rpmts.c 2011-05-12 10:24:57.000000000 +0000 -@@ -95,6 +95,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) + /*@-branchstate@*/ + xx = rpmsqFork(&psm->sq); + if (psm->sq.child == 0) { +@@ -924,6 +926,8 @@ static rpmRC runScript(rpmpsm psm, Heade + + (void) psmWait(psm); + ++ rpmtsSuspendResumeDBLock(psm->ts, 1); ++ + /* XXX filter order dependent multilib "other" arch helper error. */ + if (!(psm->sq.reaped >= 0 && !strcmp(argv[0], "/usr/sbin/glibc_post_upgrade") && WEXITSTATUS(psm->sq.status) == 110)) { + if (psm->sq.reaped < 0) { +Index: lib/rpmts.c +=================================================================== +--- lib/rpmts.c.orig ++++ lib/rpmts.c +@@ -190,6 +190,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) return rc; } @@ -134,15 +42,120 @@ locking. + int rpmtsInitDB(rpmts ts, int dbmode) { - rpmlock lock = rpmtsAcquireLock(ts); ---- ./lib/rpmts.h.orig 2010-12-21 09:50:50.000000000 +0000 -+++ ./lib/rpmts.h 2011-05-12 10:24:57.000000000 +0000 -@@ -423,6 +423,8 @@ rpmdb rpmtsGetRdb(rpmts ts); - void * rpmtsNotify(rpmts ts, rpmte te, - rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total); + void *lock = rpmtsAcquireLock(ts); +Index: lib/rpmts.h +=================================================================== +--- lib/rpmts.h.orig ++++ lib/rpmts.h +@@ -470,6 +470,10 @@ int rpmtsRebuildDB(rpmts ts) + /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ + /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; -+int rpmtsSuspendResumeDBLock(rpmts ts, int mode); ++int rpmtsSuspendResumeDBLock(rpmts ts, int mode) ++ /*@globals fileSystem @*/ ++ /*@modifies fileSystem @*/; + /** \ingroup rpmts - * Return number of (ordered) transaction set elements. + * Verify the database used by the transaction. * @param ts transaction set +Index: rpmdb/db3.c +=================================================================== +--- rpmdb/db3.c.orig ++++ rpmdb/db3.c +@@ -458,6 +458,8 @@ errxit: + } + /*@=moduncon@*/ + ++static int db3SuspendResumeLock(dbiIndex dbi, int mode); ++ + static int db3sync(dbiIndex dbi, unsigned int flags) + /*@globals fileSystem @*/ + /*@modifies fileSystem @*/ +@@ -466,6 +468,10 @@ static int db3sync(dbiIndex dbi, unsigne + int rc = 0; + int _printit; + ++ if (flags == (unsigned int)-1) ++ return db3SuspendResumeLock(dbi, 0); ++ if (flags == (unsigned int)-2) ++ return db3SuspendResumeLock(dbi, 1); + if (db != NULL) + rc = db->sync(db, flags); + /* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */ +@@ -1412,6 +1418,50 @@ static int db3open(rpmdb rpmdb, rpmTag r + /*@=nullstate =compmempass@*/ + } + ++static int ++db3SuspendResumeLock(dbiIndex dbi, int mode) ++{ ++ struct flock l; ++ int rc = 0; ++ int tries; ++ int fdno = -1; ++ ++ if (!dbi->dbi_lockdbfd) ++ return 0; ++ if (!(dbi->dbi_mode & (O_RDWR|O_WRONLY))) ++ return 0; ++ if ((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) ++ return 0; ++ if (dbi->dbi_use_dbenv && _lockdbfd == 0) ++ return 0; ++ if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0)) ++ return 1; ++ if (mode == 0) { ++ memset(&l, 0, sizeof(l)); ++ l.l_whence = 0; ++ l.l_start = 0; ++ l.l_len = 0; ++ l.l_type = F_RDLCK; ++ rc = fcntl(fdno, F_SETLK, (void *) &l); ++ if (rc) ++ rpmMessage(RPMMESS_WARNING, _("could not suspend database lock\n")); ++ } else { ++ for (tries = 0; tries < 2; tries++) { ++ memset(&l, 0, sizeof(l)); ++ l.l_whence = 0; ++ l.l_start = 0; ++ l.l_len = 0; ++ l.l_type = F_WRLCK; ++ rc = fcntl(fdno, tries ? F_SETLKW : F_SETLK, (void *) &l); ++ if (!rc) ++ break; ++ if (tries == 0) ++ rpmMessage(RPMMESS_WARNING, _("waiting to reestablish exclusive database lock\n")); ++ } ++ } ++ return rc; ++} ++ + /** \ingroup db3 + */ + /*@-exportheadervar@*/ +Index: rpmdb/rpmdb.c +=================================================================== +--- rpmdb/rpmdb.c.orig ++++ rpmdb/rpmdb.c +@@ -945,6 +945,21 @@ int rpmdbSync(rpmdb db) + return rc; + } + ++int rpmdbSuspendResumeDBLock(rpmdb db, int mode) ++{ ++ int dbix; ++ int rc = 0; ++ if (db == NULL) return 0; ++ for (dbix = 0; dbix < db->db_ndbi; dbix++) { ++ int xx; ++ if (db->_dbi[dbix] == NULL) ++ continue; ++ xx = dbiSync(db->_dbi[dbix], mode ? -2 : -1); ++ if (xx && rc == 0) rc = xx; ++ } ++ return rc; ++} ++ + /*@-mods@*/ /* FIX: dbTemplate structure assignment */ + static /*@only@*/ /*@null@*/ + rpmdb newRpmdb(/*@kept@*/ /*@null@*/ const char * root, diff --git a/taggedfileindex.diff b/taggedfileindex.diff index 7fc306d..693e28d 100644 --- a/taggedfileindex.diff +++ b/taggedfileindex.diff @@ -1,14 +1,119 @@ -This used to be the taggedfileindex patch, but it's gone. -The remaining part just strips off the tag. ---- ./lib/rpmdb.c.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./lib/rpmdb.c 2011-05-11 15:14:39.000000000 +0000 -@@ -257,6 +257,9 @@ static int dbt2set(dbiIndex dbi, DBT * d - _DBSWAP(hdrNum); - _DBSWAP(tagNum); - } -+ /* remove tagged directory info */ -+ if (tagNum.ui & 0x80000000) -+ tagNum.ui &= 0x0000ffff; - set->recs[i].hdrNum = hdrNum.ui; - set->recs[i].tagNum = tagNum.ui; - } +The taggedfileindex patch. Speeds up database searches, but breaks +fingerprint semantics. Needs findfplistexclude.diff. +rh#103204 + +Index: rpmdb/rpmdb.c +=================================================================== +--- rpmdb/rpmdb.c.orig ++++ rpmdb/rpmdb.c +@@ -1223,6 +1223,16 @@ int rpmdbVerify(const char * prefix) + return rc; + } + ++static inline unsigned int taghash(const char *s) ++{ ++ int c; ++ unsigned int r = 0; ++ while ((c = *(const unsigned char *)s++) != 0) ++ if (c != '/') ++ r += (r << 3) + c; ++ return ((r & 0x7fff) | 0x8000) << 16; ++} ++ + /** + * Find file matches in database. + * @param db rpm database +@@ -1302,6 +1312,11 @@ if (key->size == 0) key->size++; /* XXX + if (rc == 0) + (void) dbt2set(dbi, data, &allMatches); + ++ /* strip off directory tags */ ++ if (allMatches != NULL) ++ for (i = 0; i < allMatches->count; i++) ++ if (allMatches->recs[i].tagNum & 0x80000000) ++ allMatches->recs[i].tagNum &= 0x0000ffff; + xx = dbiCclose(dbi, dbcursor, 0); + dbcursor = NULL; + } else +@@ -2408,7 +2423,7 @@ static void rpmdbSortIterator(/*@null@*/ + } + + /*@-bounds@*/ /* LCL: segfault */ +-static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum, unsigned int exclude) ++static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum, unsigned int exclude, unsigned int tag) + /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ + /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/ + { +@@ -2456,10 +2471,16 @@ static int rpmdbGrowIterator(/*@null@*/ + set = NULL; + (void) dbt2set(dbi, data, &set); + +- /* prune the set against exclude */ ++ /* prune the set against exclude and tag */ + for (i = j = 0; i < set->count; i++) { + if (exclude && set->recs[i].hdrNum == exclude) + continue; ++ if (set->recs[i].tagNum & 0x80000000) { ++ /* tagged entry */ ++ if ((set->recs[i].tagNum & 0xffff0000) != tag) ++ continue; ++ set->recs[i].tagNum &= 0x0000ffff; ++ } + if (i != j) + set->recs[j] = set->recs[i]; + j++; +@@ -2987,7 +3008,9 @@ DBT * data = alloca(sizeof(*data)); + HFD_t hfd = headerFreeData; + sigset_t signalMask; + const char ** baseNames; +- rpmTagType bnt; ++ const char ** dirNames; ++ int_32 * dirIndexes, *dirs; ++ rpmTagType bnt, dit, dnt; + int count = 0; + dbiIndex dbi; + int dbix; +@@ -3027,6 +3050,13 @@ memset(data, 0, sizeof(*data)); + */ + + xx = hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, &count); ++ xx = hge(h, RPMTAG_DIRINDEXES, &dit, (void **) &dirIndexes, NULL); ++ xx = hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL); ++ ++ /* save dirIndexes, because expandFilelist may free it */ ++ dirs = alloca(count * sizeof(*dirs)); ++ for (xx = 0; xx < count; xx++) ++ dirs[xx] = dirIndexes[xx]; + + if (_noDirTokens) + expandFilelist(h); +@@ -3243,6 +3273,11 @@ data->size = 0; + */ + rec->tagNum = i; + switch (dbi->dbi_rpmtag) { ++ case RPMTAG_BASENAMES: ++ /* tag index entry with directory hash */ ++ if (i < 0x010000) ++ rec->tagNum |= taghash(dirNames[dirs[i]]); ++ /*@switchbreak@*/ break; + case RPMTAG_PUBKEYS: + /*@switchbreak@*/ break; + case RPMTAG_FILEMD5S: +@@ -3417,6 +3452,8 @@ if (key->size == 0) key->size++; /* XXX + } + + exit: ++ dirIndexes = hfd(dirIndexes, dit); ++ dirNames = hfd(dirNames, dnt); + (void) unblockSignals(db, &signalMask); + + return ret; +@@ -3505,7 +3542,7 @@ if (key->size == 0) key->size++; /* XXX + if (!exclude && skipDir(fpList[i].entry->dirName)) + continue; + +- xx = rpmdbGrowIterator(mi, i, exclude); ++ xx = rpmdbGrowIterator(mi, i, exclude, taghash(fpList[i].entry->dirName)); + + } + diff --git a/tagsbackport.diff b/tagsbackport.diff new file mode 100644 index 0000000..69d6830 --- /dev/null +++ b/tagsbackport.diff @@ -0,0 +1,37 @@ +Backported some new tags and sense values. + +Index: lib/rpmlib.h +=================================================================== +--- lib/rpmlib.h.orig ++++ lib/rpmlib.h +@@ -447,6 +447,19 @@ typedef enum rpmTag_e { + RPMTAG_PRIORITY = 1162, /* i extension placeholder */ + RPMTAG_CVSID = 1163, /* s */ + #define RPMTAG_SVNID RPMTAG_CVSID /* s */ ++ RPMTAG_BLINKPKGID = 1164, /* s[] */ ++ RPMTAG_BLINKHDRID = 1165, /* s[] */ ++ RPMTAG_BLINKNEVRA = 1166, /* s[] */ ++ RPMTAG_FLINKPKGID = 1167, /* s[] */ ++ RPMTAG_FLINKHDRID = 1168, /* s[] */ ++ RPMTAG_FLINKNEVRA = 1169, /* s[] */ ++ RPMTAG_PACKAGEORIGIN = 1170, /* s */ ++ RPMTAG_TRIGGERPREIN = 1171, /*!< internal */ ++ RPMTAG_BUILDSUGGESTS = 1172, /*!< internal */ ++ RPMTAG_BUILDENHANCES = 1173, /*!< internal */ ++ RPMTAG_SCRIPTSTATES = 1174, /*!< i scriptlet exit codes */ ++ RPMTAG_SCRIPTMETRICS = 1175, /*!< i scriptlet execution times */ ++ RPMTAG_BUILDCPUCLOCK = 1176, /*!< i */ + + /*@-enummemuse@*/ + RPMTAG_FIRSTFREE_TAG /*!< internal */ +@@ -530,7 +543,9 @@ typedef enum rpmsenseFlags_e { + /*@=enummemuse@*/ + RPMSENSE_KEYRING = (1 << 26), + RPMSENSE_PATCHES = (1 << 27), +- RPMSENSE_CONFIG = (1 << 28) ++ RPMSENSE_CONFIG = (1 << 28), ++ RPMSENSE_PROBE = (1 << 29), ++ RPMSENSE_PACKAGE = (1 << 30) + } rpmsenseFlags; + + #define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie serial, */ diff --git a/totalsizenoexclude.diff b/totalsizenoexclude.diff new file mode 100644 index 0000000..84f9509 --- /dev/null +++ b/totalsizenoexclude.diff @@ -0,0 +1,13 @@ +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 new file mode 100644 index 0000000..fa9bc5f --- /dev/null +++ b/translockroot.diff @@ -0,0 +1,37 @@ +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 new file mode 100644 index 0000000..8a2bfd8 --- /dev/null +++ b/vercmp.diff @@ -0,0 +1,31 @@ +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/verify_p.diff b/verify_p.diff deleted file mode 100644 index 8eeea06..0000000 --- a/verify_p.diff +++ /dev/null @@ -1,49 +0,0 @@ -Make 'rpm -Vp ' work again. - ---- ./lib/rpmte.c.orig 2011-05-12 15:22:06.000000000 +0000 -+++ ./lib/rpmte.c 2011-05-12 15:23:39.000000000 +0000 -@@ -905,15 +905,19 @@ int rpmteProcess(rpmte te, pkgGoal goal) - } - } - -- rpmteRunAllCollections(te, PLUGINHOOK_COLL_PRE_REMOVE); -- -- if (rpmteOpen(te, reset_fi)) { -+ if (goal == PKG_VERIFY) { - failed = rpmpsmRun(te->ts, te, goal); -- rpmteClose(te, reset_fi); -- } -+ } else { -+ rpmteRunAllCollections(te, PLUGINHOOK_COLL_PRE_REMOVE); -+ -+ if (rpmteOpen(te, reset_fi)) { -+ failed = rpmpsmRun(te->ts, te, goal); -+ rpmteClose(te, reset_fi); -+ } - -- rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ADD); -- rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ANY); -+ rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ADD); -+ rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ANY); -+ } - - /* XXX should %pretrans failure fail the package install? */ - if (failed && !scriptstage) { ---- ./lib/verify.c.orig 2011-05-12 15:22:01.000000000 +0000 -+++ ./lib/verify.c 2011-05-12 15:22:49.000000000 +0000 -@@ -267,11 +267,11 @@ static int rpmVerifyScript(rpmts ts, Hea - - if (headerIsEntry(h, RPMTAG_VERIFYSCRIPT)) { - /* fake up a erasure transaction element */ -- (void) rpmtsAddEraseElement(ts, h, -1); -- -- rc = (rpmteProcess(rpmtsElement(ts, 0), PKG_VERIFY) != RPMRC_OK); -- -+ rpmte p = rpmteNew(ts, h, TR_REMOVED, NULL, NULL); -+ rpmteSetHeader(p, h); -+ rc = (rpmteProcess(p, PKG_VERIFY) != RPMRC_OK); - /* clean up our fake transaction bits */ -+ rpmteFree(p); - rpmtsEmpty(ts); - } - diff --git a/verifylstatfail.diff b/verifylstatfail.diff new file mode 100644 index 0000000..d0fd950 --- /dev/null +++ b/verifylstatfail.diff @@ -0,0 +1,15 @@ +Tell user the reason why the lstat failed in a verify operation. + +--- ./lib/verify.c.orig 2005-12-15 15:17:41.000000000 +0000 ++++ ./lib/verify.c 2005-12-15 15:24:48.000000000 +0000 +@@ -327,6 +327,10 @@ static int verifyHeader(QVA_t qva, const + (fileAttrs & RPMFILE_README) ? 'r' : ' '), + rpmfiFN(fi)); + te += strlen(te); ++ if ((rc & RPMVERIFY_LSTATFAIL) != 0) { ++ sprintf(te, " (%s)", strerror(errno)); ++ te += strlen(te); ++ } + ec = rc; + } + } else if (verifyResult || rpmIsVerbose()) { diff --git a/waitlock.diff b/waitlock.diff index 8a811c5..79ae33d 100644 --- a/waitlock.diff +++ b/waitlock.diff @@ -1,104 +1,98 @@ Fix global (DB_PRIVATE) lock code: fix recursion counter, retry failed lock operations for up to 3 minutes. - ---- ./lib/backend/db3.c.orig 2011-03-02 06:40:10.000000000 +0000 -+++ ./lib/backend/db3.c 2011-05-12 10:24:20.000000000 +0000 -@@ -432,6 +432,8 @@ int dbiVerify(dbiIndex dbi, unsigned int - return rc; +--- ./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); } + /*@=mustmod@*/ +static int _lockdbfd = 0; + - int dbiClose(dbiIndex dbi, unsigned int flags) - { - rpmdb rdb = dbi->dbi_rpmdb; -@@ -451,6 +453,8 @@ int dbiClose(dbiIndex dbi, unsigned int + /*@-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 - rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n", - dbhome, dbi->dbi_file); -+ if (dbi->dbi_lockdbfd && _lockdbfd) + rpmMessage(RPMMESS_DEBUG, _("closed db index %s/%s\n"), + dbhome, (dbfile ? dbfile : tagName(dbi->dbi_rpmtag))); ++ if (dbi->dbi_lockdbfd && ++ !((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) && ++ _lockdbfd) + _lockdbfd--; + } - xx = db_fini(rdb, dbhome ? dbhome : ""); -@@ -490,6 +494,7 @@ static int dbiFlock(dbiIndex dbi, int mo - rc = 1; - } else { - const char *dbhome = rpmdbHome(dbi->dbi_rpmdb); -+ int tries; - struct flock l; - memset(&l, 0, sizeof(l)); - l.l_whence = 0; -@@ -499,20 +504,38 @@ static int dbiFlock(dbiIndex dbi, int mo - ? F_RDLCK : F_WRLCK; - l.l_pid = 0; +@@ -1138,8 +1157,6 @@ static int db3open(rpmdb rpmdb, rpmTag r + prDbiOpenFlags(oflags, 0), dbi->dbi_mode); -- rc = fcntl(fdno, F_SETLK, (void *) &l); -- if (rc) { -- uint32_t eflags = db_envflags(db); -- /* Warning iff using non-private CDB locking. */ -- rc = (((eflags & DB_INIT_CDB) && !(eflags & DB_PRIVATE)) ? 0 : 1); -- rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), -- _("cannot get %s lock on %s/%s\n"), -- ((mode & O_ACCMODE) == O_RDONLY) -- ? _("shared") : _("exclusive"), -- dbhome, dbi->dbi_file); -- } else { -- rpmlog(RPMLOG_DEBUG, -- "locked db index %s/%s\n", -- dbhome, dbi->dbi_file); -+ for (tries = 0; ; tries++) { -+ rc = fcntl(fdno, F_SETLK, (void *) &l); -+ if (rc) { -+ uint32_t eflags = db_envflags(db); -+ /* Warning iff using non-private CDB locking. */ -+ rc = (((eflags & DB_INIT_CDB) && !(eflags & DB_PRIVATE)) ? 0 : 1); -+ if (errno == EAGAIN && rc) { -+ struct timespec ts; -+ if (tries == 0) -+ rpmlog(RPMLOG_WARNING, -+ _("waiting for %s lock on %s/%s\n"), -+ ((mode & O_ACCMODE) == O_RDONLY) -+ ? _("shared") : _("exclusive"), -+ dbhome, dbi->dbi_file); -+ ts.tv_sec = (time_t)0; -+ ts.tv_nsec = 100000000; /* .1 seconds */ -+ if (tries < 10*60*3) { /* 3 minutes */ -+ nanosleep(&ts, (struct timespec *)0); -+ continue; -+ } -+ } -+ rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), -+ _("cannot get %s lock on %s/%s\n"), -+ ((mode & O_ACCMODE) == O_RDONLY) -+ ? _("shared") : _("exclusive"), -+ dbhome, dbi->dbi_file); -+ } else { -+ rpmlog(RPMLOG_DEBUG, -+ "locked db index %s/%s\n", -+ dbhome, dbi->dbi_file); -+ } -+ break; + if (rc == 0) { +- static int _lockdbfd = 0; +- + /*@-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 + if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) { + rc = 1; + } else { ++ int tries; + struct flock l; + /*@-boundswrite@*/ + memset(&l, 0, sizeof(l)); +@@ -1367,24 +1385,40 @@ static int db3open(rpmdb rpmdb, rpmTag r + ? F_WRLCK : F_RDLCK; + l.l_pid = 0; + +- rc = fcntl(fdno, F_SETLK, (void *) &l); +- if (rc) { +- /* Warning iff using non-private CDB locking. */ +- rc = ((dbi->dbi_use_dbenv && +- (dbi->dbi_eflags & DB_INIT_CDB) && +- !(dbi->dbi_eflags & DB_PRIVATE)) +- ? 0 : 1); +- rpmError( (rc ? RPMERR_FLOCK : RPMWARN_FLOCK), +- _("cannot get %s lock on %s/%s\n"), +- ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) +- ? _("exclusive") : _("shared")), +- dbhome, (dbfile ? dbfile : "")); +- } else if (dbfile) { +- rpmMessage(RPMMESS_DEBUG, +- _("locked db index %s/%s\n"), +- dbhome, dbfile); ++ for (tries = 0; ; tries++) { ++ rc = fcntl(fdno, F_SETLK, (void *) &l); ++ if (rc) { ++ /* Warning iff using non-private CDB locking. */ ++ rc = ((dbi->dbi_use_dbenv && ++ (dbi->dbi_eflags & DB_INIT_CDB) && ++ !(dbi->dbi_eflags & DB_PRIVATE)) ++ ? 0 : 1); ++ if (errno == EAGAIN && rc) { ++ struct timespec ts; ++ if (tries == 0) ++ rpmMessage(RPMMESS_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, (dbfile ? dbfile : "")); ++ ts.tv_sec = (time_t)0; ++ ts.tv_nsec = 100000000; ++ if (tries < 10*60*3) { ++ nanosleep(&ts, (struct timespec *)0); ++ continue; ++ } ++ } ++ rpmError( (rc ? RPMERR_FLOCK : RPMWARN_FLOCK), ++ _("cannot get %s lock on %s/%s\n"), ++ ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ++ ? _("exclusive") : _("shared")), ++ dbhome, (dbfile ? dbfile : "")); ++ } else if (dbfile) { ++ rpmMessage(RPMMESS_DEBUG, ++ _("locked db index %s/%s\n"), ++ dbhome, dbfile); ++ } ++ break; + } + } ++ if (rc && dbi->dbi_use_dbenv) ++ _lockdbfd--; + } } } - return rc; -@@ -529,7 +552,6 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt - DB * db = NULL; - DBTYPE dbtype = DB_UNKNOWN; - uint32_t oflags; -- static int _lockdbfd = 0; - - if (dbip) - *dbip = NULL; -@@ -603,7 +625,10 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt - dbi->dbi_db = db; - dbi->dbi_oflags = oflags; - -- if (!verifyonly && rc == 0 && dbi->dbi_lockdbfd && _lockdbfd++ == 0) { -+ if (verifyonly) -+ dbi->dbi_lockdbfd = 0; /* disable locking in verify mode */ -+ -+ if (rc == 0 && dbi->dbi_lockdbfd && _lockdbfd++ == 0) { - rc = dbiFlock(dbi, rdb->db_mode); - } - diff --git a/weakdeps.diff b/weakdeps.diff index f46e0cc..b5ad2b6 100644 --- a/weakdeps.diff +++ b/weakdeps.diff @@ -14,18 +14,29 @@ B) use RPMSENSE_STRONG to support a "strong" version, "Recommends" Needs extcond.diff for query operations. ---- ./build/parsePreamble.c.orig 2011-01-25 13:52:28.000000000 +0000 -+++ ./build/parsePreamble.c 2011-05-11 14:09:07.000000000 +0000 -@@ -310,6 +310,8 @@ static struct tokenBits_s const installS +Index: build/parsePreamble.c +=================================================================== +--- build/parsePreamble.c.orig ++++ build/parsePreamble.c +@@ -129,6 +129,8 @@ static struct tokenBits_s installScriptB + { "post", RPMSENSE_SCRIPT_POST }, + { "rpmlib", RPMSENSE_RPMLIB }, { "verify", RPMSENSE_SCRIPT_VERIFY }, - { "pretrans", RPMSENSE_PRETRANS }, - { "posttrans", RPMSENSE_POSTTRANS }, -+ { "hint", RPMSENSE_MISSINGOK }, -+ { "strong", RPMSENSE_STRONG }, ++ { "hint", RPMSENSE_MISSINGOK }, ++ { "strong", RPMSENSE_STRONG }, { NULL, 0 } }; -@@ -790,6 +792,18 @@ static int handlePreambleTag(rpmSpec spe +@@ -140,6 +142,8 @@ static struct tokenBits_s buildScriptBit + { "build", RPMSENSE_SCRIPT_BUILD }, + { "install", RPMSENSE_SCRIPT_INSTALL }, + { "clean", RPMSENSE_SCRIPT_CLEAN }, ++ { "hint", RPMSENSE_MISSINGOK }, ++ { "strong", RPMSENSE_STRONG }, + { NULL, 0 } + }; + +@@ -692,6 +696,18 @@ static int handlePreambleTag(Spec spec, if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) return rc; break; @@ -44,66 +55,66 @@ Needs extcond.diff for query operations. case RPMTAG_EXCLUDEARCH: case RPMTAG_EXCLUSIVEARCH: case RPMTAG_EXCLUDEOS: -@@ -895,6 +909,14 @@ static struct PreambleRec_s const preamb - {RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")}, - {RPMTAG_COLLECTIONS, 0, 0, LEN_AND_STR("collections")}, - {RPMTAG_ORDERFLAGS, 2, 0, LEN_AND_STR("orderwithrequires")}, -+ {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("recommends")}, -+ {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("suggests")}, -+ {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("supplements")}, -+ {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("enhances")}, -+ {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildrecommends")}, -+ {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildsuggests")}, -+ {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildsupplements")}, -+ {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildenhances")}, - {0, 0, 0, 0} - }; - ---- ./build/parseReqs.c.orig 2010-12-13 14:01:56.000000000 +0000 -+++ ./build/parseReqs.c 2011-05-11 14:16:43.000000000 +0000 -@@ -95,6 +95,20 @@ rpmRC parseRCPOT(rpmSpec spec, Package p - nametag = RPMTAG_CONFLICTNAME; +@@ -783,6 +799,14 @@ static struct PreambleRec_s preambleList + {RPMTAG_DISTTAG, 0, 0, 0, "disttag"}, + {RPMTAG_CVSID, 0, 0, 0, "cvsid"}, + {RPMTAG_SVNID, 0, 0, 0, "svnid"}, ++ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "recommends"}, ++ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "suggests"}, ++ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "supplements"}, ++ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "enhances"}, ++ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildrecommends"}, ++ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildsuggests"}, ++ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildsupplements"}, ++ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildenhances"}, + /*@-nullassign@*/ /* LCL: can't add null annotation */ + {0, 0, 0, 0, 0} + /*@=nullassign@*/ +Index: build/parseReqs.c +=================================================================== +--- build/parseReqs.c.orig ++++ build/parseReqs.c +@@ -81,6 +81,14 @@ int parseRCPOT(Spec spec, Package pkg, c + tagflags |= RPMSENSE_ANY; h = spec->buildRestrictions; break; + case RPMTAG_SUGGESTSFLAGS: -+ nametag = RPMTAG_SUGGESTSNAME; -+ break; + case RPMTAG_ENHANCESFLAGS: -+ nametag = RPMTAG_ENHANCESNAME; ++ h = pkg->header; + break; + case RPMTAG_BUILDSUGGESTS: -+ nametag = RPMTAG_SUGGESTSNAME; -+ h = spec->buildRestrictions; -+ break; + case RPMTAG_BUILDENHANCES: -+ nametag = RPMTAG_ENHANCESNAME; -+ h = spec->buildRestrictions; -+ break; - } - - for (r = field; *r != '\0'; r = re) { ---- ./build/reqprov.c.orig 2010-12-13 14:01:56.000000000 +0000 -+++ ./build/reqprov.c 2011-05-11 14:15:02.000000000 +0000 -@@ -75,6 +75,16 @@ int addReqProv(Header h, rpmTagVal tagN, ++ h = spec->buildRestrictions; ++ break; + default: + case RPMTAG_REQUIREFLAGS: + tagflags |= RPMSENSE_ANY; +Index: build/reqprov.c +=================================================================== +--- build/reqprov.c.orig ++++ build/reqprov.c +@@ -48,6 +48,16 @@ int addReqProv(/*@unused@*/ Spec spec, H + flagtag = RPMTAG_TRIGGERFLAGS; indextag = RPMTAG_TRIGGERINDEX; extra = Flags & RPMSENSE_TRIGGER; - break; -+ case RPMTAG_SUGGESTSNAME: ++ } else if (tagN == RPMTAG_SUGGESTSFLAGS || tagN == RPMTAG_BUILDSUGGESTS) { ++ nametag = RPMTAG_SUGGESTSNAME; + versiontag = RPMTAG_SUGGESTSVERSION; + flagtag = RPMTAG_SUGGESTSFLAGS; + extra = Flags & _ALL_REQUIRES_MASK; -+ break; -+ case RPMTAG_ENHANCESNAME: ++ } else if (tagN == RPMTAG_ENHANCESFLAGS || tagN == RPMTAG_BUILDENHANCES) { ++ nametag = RPMTAG_ENHANCESNAME; + versiontag = RPMTAG_ENHANCESVERSION; + flagtag = RPMTAG_ENHANCESFLAGS; + extra = Flags & _ALL_REQUIRES_MASK; -+ break; - case RPMTAG_REQUIRENAME: - default: - tagN = RPMTAG_REQUIRENAME; ---- ./build/rpmfc.c.orig 2011-02-28 09:57:21.000000000 +0000 -+++ ./build/rpmfc.c 2011-05-11 13:58:33.000000000 +0000 -@@ -1075,6 +1075,12 @@ static struct DepMsg_s depMsgs[] = { + } else { + nametag = RPMTAG_REQUIRENAME; + versiontag = RPMTAG_REQUIREVERSION; +Index: build/rpmfc.c +=================================================================== +--- build/rpmfc.c.orig ++++ build/rpmfc.c +@@ -1350,6 +1350,12 @@ static struct DepMsg_s depMsgs[] = { { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, 0, -1 }, @@ -116,10 +127,10 @@ Needs extcond.diff for query operations. { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } }; -@@ -1160,6 +1166,14 @@ static rpmRC rpmfcGenerateDependsHelper( +@@ -1445,6 +1451,14 @@ static int rpmfcGenerateDependsHelper(co failnonzero = 0; tagflags = RPMSENSE_FIND_REQUIRES; - break; + /*@switchbreak@*/ break; + case RPMTAG_ENHANCESFLAGS: + if (!pkg->autoProv) + continue; @@ -127,144 +138,181 @@ Needs extcond.diff for query operations. + tagflags = RPMSENSE_FIND_REQUIRES | RPMSENSE_MISSINGOK; + if (strcmp(dm->msg, "Supplements") == 0) + tagflags |= RPMSENSE_STRONG; -+ break; ++ /*@switchbreak@*/ break; default: continue; - break; ---- ./lib/formats.c.orig 2011-01-25 13:52:28.000000000 +0000 -+++ ./lib/formats.c 2011-05-11 14:02:09.000000000 +0000 -@@ -560,6 +560,24 @@ static char * depflagsFormat(rpmtd td, c - return val; - } - -+static char * depflag_strongFormat(rpmtd td, char * formatPrefix) -+{ -+ char * val = NULL; -+ -+ if (rpmtdClass(td) != RPM_NUMERIC_CLASS) { -+ val = xstrdup(_("(not a number)")); -+ } else { -+ uint64_t anint = rpmtdGetNumber(td); -+ char buf[10]; -+ buf[0] = '\0'; -+ if (anint & RPMSENSE_STRONG) -+ strcat(buf, "strong"); -+ strcat(formatPrefix, "s"); -+ rasprintf(&val, formatPrefix, buf); -+ } -+ return val; -+} -+ - /** - * Return tag container array size. - * @param td tag data container -@@ -672,6 +690,7 @@ static const struct headerFormatFunc_s r - { RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat }, - { RPMTD_FORMAT_EXPAND, "expand", expandFormat }, - { RPMTD_FORMAT_FSTATUS, "fstatus", fstatusFormat }, -+ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", depflag_strongFormat }, - { -1, NULL, NULL } - }; - ---- ./lib/rpmds.c.orig 2011-02-15 13:04:04.000000000 +0000 -+++ ./lib/rpmds.c 2011-05-11 13:58:33.000000000 +0000 -@@ -69,6 +69,10 @@ static int dsType(rpmTagVal tag, - t = "Trigger"; - evr = RPMTAG_TRIGGERVERSION; - f = RPMTAG_TRIGGERFLAGS; -+ } else if (tag == RPMTAG_ENHANCESNAME) { -+ t = "Enhances"; -+ evr = RPMTAG_ENHANCESVERSION; -+ f = RPMTAG_ENHANCESFLAGS; - } else { - rc = 1; - } ---- ./lib/rpmds.h.orig 2011-05-11 09:15:33.000000000 +0000 -+++ ./lib/rpmds.h 2011-05-11 14:01:07.000000000 +0000 -@@ -48,7 +48,7 @@ enum rpmsenseFlags_e { - RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ - RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ + /*@notreached@*/ /*@switchbreak@*/ break; +Index: lib/rpmlib.h +=================================================================== +--- lib/rpmlib.h.orig ++++ lib/rpmlib.h +@@ -541,7 +541,7 @@ typedef enum rpmsenseFlags_e { + RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */ + /*@=enummemuse@*/ RPMSENSE_KEYRING = (1 << 26), -- /* bit 27 unused */ -+ RPMSENSE_STRONG = (1 << 27), - RPMSENSE_CONFIG = (1 << 28) - }; - -@@ -69,6 +69,7 @@ typedef rpmFlags rpmsenseFlags; +- RPMSENSE_PATCHES = (1 << 27), ++ RPMSENSE_STRONG = (1 << 27), + RPMSENSE_CONFIG = (1 << 28), + RPMSENSE_PROBE = (1 << 29), + RPMSENSE_PACKAGE = (1 << 30) +@@ -562,6 +562,7 @@ typedef enum rpmsenseFlags_e { RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_FIND_REQUIRES | \ RPMSENSE_MISSINGOK | \ + RPMSENSE_STRONG | \ - RPMSENSE_RPMLIB | \ - RPMSENSE_KEYRING | \ - RPMSENSE_PRETRANS | \ ---- ./lib/rpmtag.h.orig 2010-12-13 14:01:56.000000000 +0000 -+++ ./lib/rpmtag.h 2011-05-11 13:58:33.000000000 +0000 -@@ -217,14 +217,14 @@ typedef enum rpmTag_e { - RPMTAG_PRETRANSPROG = 1153, /* s */ - RPMTAG_POSTTRANSPROG = 1154, /* s */ - RPMTAG_DISTTAG = 1155, /* s */ -- RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */ --#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */ -- RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */ -- RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */ -- RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder (unimplemented) */ --#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemented) */ -- RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimplemented) */ -- RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimplemented) */ -+ RPMTAG_SUGGESTSNAME = 1156, /* s[] extension */ -+#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] */ -+ RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension */ -+ RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension */ -+ RPMTAG_ENHANCESNAME = 1159, /* s[] extension */ -+#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] */ -+ RPMTAG_ENHANCESVERSION = 1160, /* s[] extension */ -+ RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension */ - RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ - RPMTAG_CVSID = 1163, /* s (unimplemented) */ - #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ ---- ./lib/rpmtd.h.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./lib/rpmtd.h 2011-05-11 14:00:06.000000000 +0000 -@@ -220,6 +220,7 @@ typedef enum rpmtdFormats_e { - RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int types) */ - RPMTD_FORMAT_EXPAND = 18, /* macro expansion (string types) */ - RPMTD_FORMAT_FSTATUS = 19, /* file verify status (int types) */ -+ RPMTD_FORMAT_DEPFLAG_STRONG = 20, /* strong dependency (int types) */ - } rpmtdFormats; - - /** \ingroup rpmtd ---- ./python/rpmmodule.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./python/rpmmodule.c 2011-05-11 14:19:37.000000000 +0000 -@@ -376,6 +376,7 @@ static int initModule(PyObject *m) + RPMSENSE_SCRIPT_PREP | \ + RPMSENSE_SCRIPT_BUILD | \ + RPMSENSE_SCRIPT_INSTALL | \ +Index: python/rpmmodule.c +=================================================================== +--- python/rpmmodule.c.orig ++++ python/rpmmodule.c +@@ -354,7 +354,7 @@ void init_rpm(void) REGISTER_ENUM(RPMSENSE_RPMLIB); REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); REGISTER_ENUM(RPMSENSE_KEYRING); +- REGISTER_ENUM(RPMSENSE_PATCHES); + REGISTER_ENUM(RPMSENSE_STRONG); REGISTER_ENUM(RPMSENSE_CONFIG); REGISTER_ENUM(RPMTRANS_FLAG_TEST); ---- ./rpmpopt.in.orig 2011-01-11 07:04:51.000000000 +0000 -+++ ./rpmpopt.in 2011-05-11 14:18:47.000000000 +0000 -@@ -65,6 +65,22 @@ rpm alias --requires --qf \ +Index: lib/rpmds.c +=================================================================== +--- lib/rpmds.c.orig ++++ lib/rpmds.c +@@ -320,6 +320,11 @@ rpmds rpmdsNew(Header h, rpmTag tagN, in + tagEVR = RPMTAG_TRIGGERVERSION; + tagF = RPMTAG_TRIGGERFLAGS; + } else ++ if (tagN == RPMTAG_ENHANCESNAME) { ++ Type = "Enhances"; ++ tagEVR = RPMTAG_ENHANCESVERSION; ++ tagF = RPMTAG_ENHANCESFLAGS; ++ } else + goto exit; + + /*@-branchstate@*/ +Index: rpmpopt.in +=================================================================== +--- rpmpopt.in.orig ++++ rpmpopt.in +@@ -60,6 +60,22 @@ rpm alias --requires --qf \ --POPTdesc=$"list capabilities required by package(s)" rpm alias -R --requires -+rpm alias --suggests --qf \ ++rpm alias --suggests --qf \ + "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package suggests" + -+rpm alias --recommends --qf \ ++rpm alias --recommends --qf \ + "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package recommends" + -+rpm alias --enhances --qf \ ++rpm alias --enhances --qf \ + "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package enhances" + -+rpm alias --supplements --qf \ ++rpm alias --supplements --qf \ + "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package supplements" + - rpm alias --info --qf '\ - Name : %{NAME}\n\ - %|EPOCH?{Epoch : %{EPOCH}\n}|\ + 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 \ + --POPTdesc=$"list capabilities required by package(s)" + rpmq alias -R --requires + ++rpmq alias --suggests --qf \ ++ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package suggests" ++ ++rpmq alias --recommends --qf \ ++ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package recommends" ++ ++rpmq alias --enhances --qf \ ++ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package enhances" ++ ++rpmq alias --supplements --qf \ ++ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package supplements" ++ + 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 \ + --POPTdesc=$"list capabilities required by package(s)" + rpmquery alias -R --requires + ++rpmquery alias --suggests --qf \ ++ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package suggests" ++ ++rpmquery alias --recommends --qf \ ++ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package recommends" ++ ++rpmquery alias --enhances --qf \ ++ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package enhances" ++ ++rpmquery alias --supplements --qf \ ++ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package supplements" ++ + rpmquery 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\ +Index: lib/formats.c +=================================================================== +--- lib/formats.c.orig ++++ lib/formats.c +@@ -652,6 +652,38 @@ static /*@only@*/ char * depflagsFormat( + return val; + } + ++static /*@only@*/ char * depflag_strongFormat(int_32 type, const void * data, ++ char * formatPrefix, int padding, /*@unused@*/ int element) ++ /*@modifies formatPrefix @*/ ++ /*@requires maxRead(data) >= 0 @*/ ++{ ++ char * val; ++ char buf[10]; ++ int anint; ++ ++ if (type != RPM_INT32_TYPE) { ++ val = xstrdup(_("(not a number)")); ++ } else { ++ anint = *((int_32 *) data); ++ buf[0] = '\0'; ++ ++/*@-boundswrite@*/ ++ if (anint & RPMSENSE_STRONG) ++ strcat(buf, "strong"); ++/*@=boundswrite@*/ ++ ++ val = xmalloc(7 + padding); ++/*@-boundswrite@*/ ++ strcat(formatPrefix, "s"); ++/*@=boundswrite@*/ ++ /*@-formatconst@*/ ++ sprintf(val, formatPrefix, buf); ++ /*@=formatconst@*/ ++ } ++ ++ return val; ++} ++ + /** + * Retrieve mounted file system paths. + * @param h header +@@ -1344,6 +1376,7 @@ const struct headerSprintfExtension_s rp + { HEADER_EXT_FORMAT, "base64", { base64Format } }, + { HEADER_EXT_FORMAT, "pgpsig", { pgpsigFormat } }, + { HEADER_EXT_FORMAT, "depflags", { depflagsFormat } }, ++ { HEADER_EXT_FORMAT, "depflag_strong", { depflag_strongFormat } }, + { HEADER_EXT_FORMAT, "fflags", { fflagsFormat } }, + { HEADER_EXT_FORMAT, "perms", { permsFormat } }, + { HEADER_EXT_FORMAT, "permissions", { permsFormat } }, diff --git a/whatrequires-doc.diff b/whatrequires-doc.diff deleted file mode 100644 index 96cf15f..0000000 --- a/whatrequires-doc.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- ./doc/rpm.8.orig 2011-01-05 08:11:09.000000000 +0000 -+++ ./doc/rpm.8 2011-05-11 15:36:18.000000000 +0000 -@@ -564,6 +564,11 @@ Query all packages that provide the \fIC - .TP - \fB--whatrequires \fICAPABILITY\fB\fR - Query all packages that require \fICAPABILITY\fR for proper functioning. -+.br -+Note that this does not return what requires a given package. -+A package usually provides multiple capabilities and file-names on which -+other packages may depend. To see the complete dependencies -+for a package, use \fB-e --test \fIPACKAGE_NAME\fB\fR - .SS "PACKAGE QUERY OPTIONS:" - .PP - .TP From c6d0d7bf0ff422a57f077f53ec1c18d5c454fdaac81d3b48a1b6c7a67b337e63 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 26 Jan 2007 22:12:24 +0000 Subject: [PATCH 002/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=2 --- noprovides.diff | 23 +++++++++ rpm-python.spec | 4 +- rpm.changes | 6 +++ rpm.spec | 21 +++++--- testmode.diff | 134 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 179 insertions(+), 9 deletions(-) create mode 100644 noprovides.diff create mode 100644 testmode.diff diff --git a/noprovides.diff b/noprovides.diff new file mode 100644 index 0000000..c8e7fb8 --- /dev/null +++ b/noprovides.diff @@ -0,0 +1,23 @@ +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/rpm-python.spec b/rpm-python.spec index ef05e37..c1f7880 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,7 +1,7 @@ # # spec file for package rpm-python (Version 4.4.2) # -# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 76 +Release: 88 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index 11db5f0..cd451e8 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 26 16:55:15 CET 2007 - mls@suse.de + +- create /var/spool/repackage directory [#230866] +- do not run pre/posttrans scripts in test mode [#235361] + ------------------------------------------------------------------- Thu Nov 30 14:04:56 CET 2006 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index c32da45..938635f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rpm (Version 4.4.2) # -# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 76 +Release: 82 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -87,7 +87,7 @@ Patch57: nodefattr.diff Patch58: nolua.diff Patch59: luaroot.diff Patch60: noneon.diff -#Patch61: noprovides.diff +Patch61: noprovides.diff Patch62: openallbuttemp.diff Patch63: refreshtestarch.diff Patch64: rpmrctests.diff @@ -116,6 +116,7 @@ Patch86: convertdb1static.diff Patch87: build.diff Patch88: modalias-kernel_module.diff Patch89: querybuffer.diff +Patch90: testmode.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -185,6 +186,7 @@ rm -f rpmdb/db.h %patch -P 60 -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 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -231,6 +233,7 @@ ln -sf ../../etc/init.d/rpmconfigcheck $RPM_BUILD_ROOT/usr/sbin/rcrpmconfigcheck cp -a suse_macros $RPM_BUILD_ROOT/usr/lib/rpm mv $RPM_BUILD_ROOT/usr/src/* $RPM_BUILD_ROOT/usr/src/packages mkdir -p $RPM_BUILD_ROOT/var/lib/rpm +mkdir -p $RPM_BUILD_ROOT/var/spool/repackage rm -rf $RPM_BUILD_ROOT/usr/include/beecrypt $RPM_BUILD_ROOT/usr/include/libelf $RPM_BUILD_ROOT/%{_libdir}/libbeecrypt* $RPM_BUILD_ROOT/usr/lib/libelf* gzip -9 $RPM_BUILD_ROOT/%{_mandir}/man[18]/*.[18] export RPM_BUILD_ROOT @@ -288,6 +291,7 @@ fi #%doc %{_mandir}/*/man[18]/*.[18]* /usr/share/locale/*/LC_MESSAGES/rpm.mo %dir /var/lib/rpm +%dir /var/spool/repackage %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILD %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SPECS %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SOURCES @@ -307,10 +311,10 @@ fi %{_libdir}/librpmio.so %package -n popt Summary: A C library for parsing command line parameters -License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), Other License(s), see package +License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 304 +Release: 310 # %description -n popt @@ -330,10 +334,10 @@ Authors: %package -n popt-devel Summary: C Library for Parsing Command Line Parameters -License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), Other License(s), see package +License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 304 +Release: 310 Requires: popt = 1.7 Requires: glibc-devel @@ -371,6 +375,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog -n rpm +* Fri Jan 26 2007 - mls@suse.de +- create /var/spool/repackage directory [#230866] +- do not run pre/posttrans scripts in test mode [#235361] * Thu Nov 30 2006 - mls@suse.de - disable noprovides patch [#224824] * Fri Nov 24 2006 - mls@suse.de diff --git a/testmode.diff b/testmode.diff new file mode 100644 index 0000000..1f97185 --- /dev/null +++ b/testmode.diff @@ -0,0 +1,134 @@ +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); + From ba46981ece9d5a0681bc493b327698858afc554e279c69f1724ef2e7cd92436f Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 15 Mar 2007 00:49:23 +0000 Subject: [PATCH 003/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=3 --- rpm-python.spec | 4 ++-- rpm-suse_macros | 4 ++-- rpm.changes | 6 ++++++ rpm.spec | 11 +++++++---- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index c1f7880..c553d6b 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 88 +Release: 94 Requires: rpm = %{version} %py_requires @@ -61,7 +61,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_libdir}/python* -%changelog -n rpm-python +%changelog * Wed Oct 18 2006 - mls@suse.de - use rpm.spec for building instead of duplication everything - delete superfluous .a and .la files [#202604] diff --git a/rpm-suse_macros b/rpm-suse_macros index 12d409f..92bc572 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -451,8 +451,8 @@ %do_profiling 1 -%cflags_profile_generate -fprofile-arcs -%cflags_profile_feedback -fbranch-probabilities +%cflags_profile_generate -fprofile-generate +%cflags_profile_feedback -fprofile-use # find-supplements.ksyms parses this macro directly out of the spec file: %supplements_kernel_module() \ diff --git a/rpm.changes b/rpm.changes index cd451e8..e0e0233 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 6 20:19:40 CET 2007 - rguenther@suse.de + +- adjust cflags_profile_generate and cflags_profile_feedback to + enable tree profiling + ------------------------------------------------------------------- Fri Jan 26 16:55:15 CET 2007 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 938635f..3c1c50c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 82 +Release: 87 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -314,7 +314,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 310 +Release: 315 # %description -n popt @@ -337,7 +337,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 310 +Release: 315 Requires: popt = 1.7 Requires: glibc-devel @@ -374,7 +374,10 @@ Authors: %{_libdir}/libpopt.so %doc %{_mandir}/man3/popt.3* -%changelog -n rpm +%changelog +* Tue Mar 06 2007 - rguenther@suse.de +- adjust cflags_profile_generate and cflags_profile_feedback to + enable tree profiling * Fri Jan 26 2007 - mls@suse.de - create /var/spool/repackage directory [#230866] - do not run pre/posttrans scripts in test mode [#235361] From ad583e9807571680794da9dcc3ffe8980a2593e800cb665304f622f7f2538c66 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 22 Mar 2007 10:01:25 +0000 Subject: [PATCH 004/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=4 --- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 9 +++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index c553d6b..1e47b9e 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 94 +Release: 95 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index e0e0233..f26ae35 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 19 16:48:22 CET 2007 - rguenther@suse.de + +- do not require build-key + ------------------------------------------------------------------- Tue Mar 6 20:19:40 CET 2007 - rguenther@suse.de diff --git a/rpm.spec b/rpm.spec index 3c1c50c..15c7763 100644 --- a/rpm.spec +++ b/rpm.spec @@ -14,13 +14,12 @@ Name: rpm License: GNU General Public License (GPL) Group: System/Packages Provides: rpminst -Requires: build-key %define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 87 +Release: 88 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -314,7 +313,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 315 +Release: 316 # %description -n popt @@ -337,7 +336,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 315 +Release: 316 Requires: popt = 1.7 Requires: glibc-devel @@ -375,6 +374,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Mar 19 2007 - rguenther@suse.de +- do not require build-key * Tue Mar 06 2007 - rguenther@suse.de - adjust cflags_profile_generate and cflags_profile_feedback to enable tree profiling From d9868f2b3fe8cc5cab29eeb7668873ff1834ae8df8c3042ed70ffea5ce67c442 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 22 Mar 2007 10:05:35 +0000 Subject: [PATCH 005/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=5 --- po-file-fixes.diff | 59 ++++++++++++++++++++++++++++++++++++++++++++ popt-so-version.diff | 11 +++++++++ rpm-python.spec | 2 +- rpm.changes | 9 +++++++ rpm.spec | 22 ++++++++++------- 5 files changed, 93 insertions(+), 10 deletions(-) create mode 100644 po-file-fixes.diff create mode 100644 popt-so-version.diff diff --git a/po-file-fixes.diff b/po-file-fixes.diff new file mode 100644 index 0000000..43a4a86 --- /dev/null +++ b/po-file-fixes.diff @@ -0,0 +1,59 @@ +--- 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-so-version.diff b/popt-so-version.diff new file mode 100644 index 0000000..ab936d9 --- /dev/null +++ b/popt-so-version.diff @@ -0,0 +1,11 @@ +--- popt/Makefile.am ++++ popt/Makefile.am +@@ -39,7 +39,7 @@ + usrlib_LTLIBRARIES = libpopt.la + + libpopt_la_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c +-libpopt_la_LDFLAGS = @INTLLIBS@ ++libpopt_la_LDFLAGS = @INTLLIBS@ -version-info 8:0:7 + + man_MANS = popt.3 + diff --git a/rpm-python.spec b/rpm-python.spec index 1e47b9e..0e07f52 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 95 +Release: 96 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index f26ae35..529e2ac 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------ +Thu Mar 22 10:45:08 CET 2007 - dmueller@suse.de + +- remove strangely duplicated libpopt +- remove static popt and corresponding .la file to reduce + dependencies +- Fix various format string errors in german translation + which cause crashes + ------------------------------------------------------------------- Mon Mar 19 16:48:22 CET 2007 - rguenther@suse.de diff --git a/rpm.spec b/rpm.spec index 15c7763..9a25ae3 100644 --- a/rpm.spec +++ b/rpm.spec @@ -19,7 +19,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 88 +Release: 89 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -116,6 +116,8 @@ Patch87: build.diff Patch88: modalias-kernel_module.diff Patch89: querybuffer.diff Patch90: testmode.diff +Patch91: popt-so-version.diff +Patch92: po-file-fixes.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -185,7 +187,7 @@ rm -f rpmdb/db.h %patch -P 60 -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 +%patch -P 90 -P 91 -P 92 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -214,7 +216,6 @@ cp popt/autogen.sh file ./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --with-lua --without-selinux --enable-shared rm po/de.gmo make %{?jobs:-j%jobs} -(cd popt; gcc -shared .libs/popt.o .libs/findme.o .libs/poptparse.o .libs/poptconfig.o .libs/popthelp.o $RPM_OPT_FLAGS -Wl,-soname -Wl,libpopt.so.1 -o .libs/libpopt.so.1.0.0) %install rm -rf $RPM_BUILD_ROOT @@ -223,8 +224,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/share/locale ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale make DESTDIR="$RPM_BUILD_ROOT" install -cp popt/.libs/libpopt.so.1.0.0 $RPM_BUILD_ROOT/%{_libdir} -ln -sf libpopt.so.1.0.0 $RPM_BUILD_ROOT/%{_libdir}/libpopt.so.1 +rm -f $RPM_BUILD_ROOT/%_libdir/libpopt.a $RPM_BUILD_ROOT/%_libdir/libpopt.la mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m 755 %{SOURCE8} $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/usr/sbin @@ -313,7 +313,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 316 +Release: 317 # %description -n popt @@ -336,7 +336,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 316 +Release: 317 Requires: popt = 1.7 Requires: glibc-devel @@ -368,12 +368,16 @@ Authors: %files -n popt-devel %defattr(644,root,root,755) /usr/include/popt.h - %{_libdir}/libpopt.a - %{_libdir}/libpopt.la %{_libdir}/libpopt.so %doc %{_mandir}/man3/popt.3* %changelog +* Thu Mar 22 2007 - dmueller@suse.de +- remove strangely duplicated libpopt +- remove static popt and corresponding .la file to reduce + dependencies +- Fix various format string errors in german translation + which cause crashes * Mon Mar 19 2007 - rguenther@suse.de - do not require build-key * Tue Mar 06 2007 - rguenther@suse.de From 6485e3dfdcea7aec16645a7bf2c2768339be169832d1b3af161a50402ddcd200 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 22 Mar 2007 18:49:53 +0000 Subject: [PATCH 006/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=6 --- files.diff | 11 +++++++++++ rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 12 ++++++++---- 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 files.diff diff --git a/files.diff b/files.diff new file mode 100644 index 0000000..0f7051a --- /dev/null +++ b/files.diff @@ -0,0 +1,11 @@ +--- 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) + res = 1; + } ++ else ++ checkFiles(check_fileList); + + check_fileList = freeStringBuf(check_fileList); + diff --git a/rpm-python.spec b/rpm-python.spec index 0e07f52..57d4acb 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 96 +Release: 97 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index 529e2ac..3f014a6 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 22 16:41:44 CET 2007 - stbinner@suse.de + +- files.diff: when checking %files list also show unpackaged files + after "not found" error message [#255780] + ------------------------------------------------------------------ Thu Mar 22 10:45:08 CET 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 9a25ae3..80e1df6 100644 --- a/rpm.spec +++ b/rpm.spec @@ -19,7 +19,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 89 +Release: 90 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -118,6 +118,7 @@ Patch89: querybuffer.diff Patch90: testmode.diff Patch91: popt-so-version.diff Patch92: po-file-fixes.diff +Patch93: files.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -187,7 +188,7 @@ rm -f rpmdb/db.h %patch -P 60 -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 +%patch -P 90 -P 91 -P 92 -P 93 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -313,7 +314,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 317 +Release: 318 # %description -n popt @@ -336,7 +337,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 317 +Release: 318 Requires: popt = 1.7 Requires: glibc-devel @@ -372,6 +373,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Mar 22 2007 - stbinner@suse.de +- files.diff: when checking %%files list also show unpackaged files + after "not found" error message [#255780] * Thu Mar 22 2007 - dmueller@suse.de - remove strangely duplicated libpopt - remove static popt and corresponding .la file to reduce From 00c558150c8ed12ddc0d016af4ed608515702505f283cf46b00cf88c7e9cc5dd Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 23 Mar 2007 16:13:50 +0000 Subject: [PATCH 007/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=7 --- popt-so-version.diff | 11 ----------- popt-to-lib.diff | 31 +++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 8 ++++++++ rpm.spec | 31 +++++++++++++++++++++---------- 5 files changed, 61 insertions(+), 22 deletions(-) delete mode 100644 popt-so-version.diff create mode 100644 popt-to-lib.diff diff --git a/popt-so-version.diff b/popt-so-version.diff deleted file mode 100644 index ab936d9..0000000 --- a/popt-so-version.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- popt/Makefile.am -+++ popt/Makefile.am -@@ -39,7 +39,7 @@ - usrlib_LTLIBRARIES = libpopt.la - - libpopt_la_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c --libpopt_la_LDFLAGS = @INTLLIBS@ -+libpopt_la_LDFLAGS = @INTLLIBS@ -version-info 8:0:7 - - man_MANS = popt.3 - diff --git a/popt-to-lib.diff b/popt-to-lib.diff new file mode 100644 index 0000000..6dfb6a6 --- /dev/null +++ b/popt-to-lib.diff @@ -0,0 +1,31 @@ +diff -u popt/Makefile.am popt/Makefile.am +--- popt/Makefile.am ++++ popt/Makefile.am +@@ -18,13 +18,13 @@ + noinst_PROGRAMS = test1 test2 test3 + test1_SOURCES = test1.c + test1_LDFLAGS = +-test1_LDADD = $(usrlib_LTLIBRARIES) ++test1_LDADD = $(popt_LTLIBRARIES) + test2_SOURCES = test2.c + test2_LDFLAGS = +-test2_LDADD = $(usrlib_LTLIBRARIES) ++test2_LDADD = $(popt_LTLIBRARIES) + test3_SOURCES = test3.c + test3_LDFLAGS = +-test3_LDADD = $(usrlib_LTLIBRARIES) ++test3_LDADD = $(popt_LTLIBRARIES) + + noinst_SCRIPTS = testit.sh + +@@ -35,8 +35,8 @@ + + include_HEADERS = popt.h + +-usrlibdir = $(libdir)@MARK64@ +-usrlib_LTLIBRARIES = libpopt.la ++poptdir = /lib@MARK64@ ++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 diff --git a/rpm-python.spec b/rpm-python.spec index 57d4acb..47362a4 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 97 +Release: 98 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index 3f014a6..c832bb1 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Mar 23 16:14:28 CET 2007 - dmueller@suse.de + +- drop custom libpopt so versioning +- move libpopt to /lib(64) for cryptsetup +- adjust installed libtool files +- Fix rpm buildrequires / devel requires + ------------------------------------------------------------------- Thu Mar 22 16:41:44 CET 2007 - stbinner@suse.de diff --git a/rpm.spec b/rpm.spec index 80e1df6..fbe88db 100644 --- a/rpm.spec +++ b/rpm.spec @@ -13,13 +13,14 @@ Name: rpm License: GNU General Public License (GPL) Group: System/Packages +BuildRequires: ncurses-devel zlib-devel Provides: rpminst %define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 90 +Release: 91 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -116,9 +117,9 @@ Patch87: build.diff Patch88: modalias-kernel_module.diff Patch89: querybuffer.diff Patch90: testmode.diff -Patch91: popt-so-version.diff -Patch92: po-file-fixes.diff -Patch93: files.diff +Patch91: po-file-fixes.diff +Patch92: files.diff +Patch93: popt-to-lib.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -143,7 +144,7 @@ Summary: Include Files and Libraries mandatory for Development. License: GNU General Public License (GPL) Group: System/Packages Requires: rpm = %{version} -Requires: popt-devel +Requires: popt-devel zlib-devel bzip2 %description devel This package contains the RPM C library and header files. These @@ -225,7 +226,12 @@ mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/share/locale ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale make DESTDIR="$RPM_BUILD_ROOT" install -rm -f $RPM_BUILD_ROOT/%_libdir/libpopt.a $RPM_BUILD_ROOT/%_libdir/libpopt.la +# remove .la file and the static variant of libpopt +# have to remove the dependency from other .la files as well +rm -f $RPM_BUILD_ROOT/%_lib/libpopt.a $RPM_BUILD_ROOT/%_lib/libpopt.la +for f in $RPM_BUILD_ROOT/%{_libdir}/*.la; do + sed -i -e "s,/%_lib/libpopt.la,-lpopt,g" $f +done mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m 755 %{SOURCE8} $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/usr/sbin @@ -314,7 +320,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 318 +Release: 319 # %description -n popt @@ -337,7 +343,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 318 +Release: 319 Requires: popt = 1.7 Requires: glibc-devel @@ -363,16 +369,21 @@ Authors: %files -n popt %defattr(-,root,root) - %{_libdir}/libpopt.so.* + /%{_lib}/libpopt.so.* /usr/share/locale/*/LC_MESSAGES/popt.mo %files -n popt-devel %defattr(644,root,root,755) /usr/include/popt.h - %{_libdir}/libpopt.so + /%{_lib}/libpopt.so %doc %{_mandir}/man3/popt.3* %changelog +* Fri Mar 23 2007 - dmueller@suse.de +- drop custom libpopt so versioning +- move libpopt to /lib(64) for cryptsetup +- adjust installed libtool files +- Fix rpm buildrequires / devel requires * Thu Mar 22 2007 - stbinner@suse.de - files.diff: when checking %%files list also show unpackaged files after "not found" error message [#255780] From 83f8f0f67fa9e2e994002fd60305f44a3c4d904dd94e71f519d9782da0373588 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 24 Mar 2007 11:23:30 +0000 Subject: [PATCH 008/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=8 --- rpm-python.spec | 4 ++-- rpm.changes | 5 +++++ rpm.spec | 12 +++++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 47362a4..8c5b519 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -11,12 +11,12 @@ # norootforbuild Name: rpm-python -BuildRequires: python-devel +BuildRequires: libbz2-devel python-devel License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 98 +Release: 99 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index c832bb1..b801670 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 24 12:22:23 CET 2007 - ro@suse.de + +- added libbz2-devel to BuildRequires and Requires for -devel + ------------------------------------------------------------------- Fri Mar 23 16:14:28 CET 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index fbe88db..60535ed 100644 --- a/rpm.spec +++ b/rpm.spec @@ -13,14 +13,14 @@ Name: rpm License: GNU General Public License (GPL) Group: System/Packages -BuildRequires: ncurses-devel zlib-devel +BuildRequires: libbz2-devel ncurses-devel zlib-devel Provides: rpminst %define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 91 +Release: 93 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -144,7 +144,7 @@ Summary: Include Files and Libraries mandatory for Development. License: GNU General Public License (GPL) Group: System/Packages Requires: rpm = %{version} -Requires: popt-devel zlib-devel bzip2 +Requires: popt-devel zlib-devel bzip2 libbz2-devel %description devel This package contains the RPM C library and header files. These @@ -320,7 +320,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 319 +Release: 321 # %description -n popt @@ -343,7 +343,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 319 +Release: 321 Requires: popt = 1.7 Requires: glibc-devel @@ -379,6 +379,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Sat Mar 24 2007 - ro@suse.de +- added libbz2-devel to BuildRequires and Requires for -devel * Fri Mar 23 2007 - dmueller@suse.de - drop custom libpopt so versioning - move libpopt to /lib(64) for cryptsetup From 2ca74ac3c608a896a0629f1c8f0459656b5435499c7c45ce12cde6509427c7c1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 30 Mar 2007 14:32:56 +0000 Subject: [PATCH 009/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=9 --- rpm-python.changes | 5 +++++ rpm-python.spec | 6 ++++-- rpm.spec | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/rpm-python.changes b/rpm-python.changes index 0746aa6..eb78897 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 30 15:06:28 CEST 2007 - rguenther@suse.de + +- add ncurses-devel and zlib-devel BuildRequires. + ------------------------------------------------------------------- Wed Oct 18 22:59:02 CEST 2006 - mls@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 8c5b519..ace07f4 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -11,12 +11,12 @@ # norootforbuild Name: rpm-python -BuildRequires: libbz2-devel python-devel +BuildRequires: libbz2-devel ncurses-devel python-devel zlib-devel License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 99 +Release: 101 Requires: rpm = %{version} %py_requires @@ -62,6 +62,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog +* Fri Mar 30 2007 - rguenther@suse.de +- add ncurses-devel and zlib-devel BuildRequires. * Wed Oct 18 2006 - mls@suse.de - use rpm.spec for building instead of duplication everything - delete superfluous .a and .la files [#202604] diff --git a/rpm.spec b/rpm.spec index 60535ed..5087914 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 93 +Release: 95 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -320,7 +320,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 321 +Release: 323 # %description -n popt @@ -343,7 +343,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 321 +Release: 323 Requires: popt = 1.7 Requires: glibc-devel From ff4b21879c2a7bb7116f7f9e8003419beb724993ec1ba3bd8e78ed3515408bd3 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 12 Apr 2007 14:58:31 +0000 Subject: [PATCH 010/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=10 --- debugedit-comp-dir.diff | 57 +++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 5 ++++ rpm.spec | 11 +++++--- 4 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 debugedit-comp-dir.diff diff --git a/debugedit-comp-dir.diff b/debugedit-comp-dir.diff new file mode 100644 index 0000000..2a56efa --- /dev/null +++ b/debugedit-comp-dir.diff @@ -0,0 +1,57 @@ +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, + uint_32 value, dirt_cnt; + size_t comp_dir_len = strlen (comp_dir); + size_t abs_file_cnt = 0, abs_dir_cnt = 0; ++ int comp_dir_used = 0; + + if (phase != 0) + return 0; +@@ -586,6 +587,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + } + else + { ++ 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, + read_uleb128 (ptr); + } + ++ptr; +- ++ ++ if (comp_dir_used && list_file_fd != -1 ++ && (base_dir == NULL || has_prefix (comp_dir, base_dir))) ++ { ++ char *p; ++ size_t size; ++ ssize_t ret; ++ ++ size = comp_dir_len + 1; ++ p = comp_dir; ++ if (base_dir) ++ { ++ p += strlen (base_dir); ++ size -= strlen (base_dir); ++ } ++ while (size > 0) ++ { ++ ret = write (list_file_fd, p, size); ++ if (ret == -1) ++ break; ++ size -= ret; ++ p += ret; ++ } ++ } ++ + if (dest_dir) + { + unsigned char *srcptr, *buf = NULL; diff --git a/rpm-python.spec b/rpm-python.spec index ace07f4..2364bbf 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 101 +Release: 104 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index b801670..a40840f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Apr 8 23:22:12 CEST 2007 - schwab@suse.de + +- Include compilation directory in debuginfo file list. + ------------------------------------------------------------------- Sat Mar 24 12:22:23 CET 2007 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index 5087914..faf9805 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 95 +Release: 97 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -120,6 +120,7 @@ Patch90: testmode.diff Patch91: po-file-fixes.diff Patch92: files.diff Patch93: popt-to-lib.diff +Patch94: debugedit-comp-dir.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -189,7 +190,7 @@ rm -f rpmdb/db.h %patch -P 60 -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 +%patch -P 90 -P 91 -P 92 -P 93 -P 94 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -320,7 +321,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 323 +Release: 325 # %description -n popt @@ -343,7 +344,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 323 +Release: 325 Requires: popt = 1.7 Requires: glibc-devel @@ -379,6 +380,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Sun Apr 08 2007 - schwab@suse.de +- Include compilation directory in debuginfo file list. * Sat Mar 24 2007 - ro@suse.de - added libbz2-devel to BuildRequires and Requires for -devel * Fri Mar 23 2007 - dmueller@suse.de From f1d1f2d22db89d7a5c7553de8d944e50051a6829b8bc0684a2c680e55b7d6722 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 20 Apr 2007 13:59:58 +0000 Subject: [PATCH 011/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=11 --- finddebuginfo.diff | 32 ++++++++++++++++---------------- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/finddebuginfo.diff b/finddebuginfo.diff index f53501f..b5c6a5d 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,8 +1,6 @@ -SUSE specific find-debuginfo changes. - ---- ./scripts/find-debuginfo.sh.orig 2005-07-14 15:52:31.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2006-03-17 13:13:03.000000000 +0000 -@@ -14,9 +14,18 @@ debugdir="${RPM_BUILD_ROOT}/usr/lib/debu +--- scripts/find-debuginfo.sh ++++ scripts/find-debuginfo.sh +@@ -14,9 +14,18 @@ echo -n > $SOURCEFILE # Strip ELF binaries @@ -23,7 +21,7 @@ SUSE specific find-debuginfo changes. dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p") bn=$(basename $f .debug).debug -@@ -25,6 +34,8 @@ do +@@ -25,6 +34,8 @@ [ -f "${debugfn}" ] && continue echo extracting debug info from $f @@ -32,7 +30,7 @@ SUSE specific find-debuginfo changes. /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" # A binary already copied into /usr/lib/debug doesn't get stripped, -@@ -34,19 +45,56 @@ do +@@ -34,19 +45,58 @@ esac mkdir -p "${debugdn}" @@ -45,18 +43,20 @@ SUSE specific find-debuginfo changes. + objcopy --only-keep-debug $f $debugfn || : + strip_option="--strip-all" + case "$f" in -+ *.ko|*.a) strip_option="--strip-debug" ;; ++ *$STRIP_KEEP_SYMTAB*) ++ strip_option="--strip-debug" ++ ;; ++ *.ko|*.a) ++ strip_option="--strip-debug" ++ ;; + esac -+ if test -n "$STRIP_KEEP_SYMTAB" ; then -+ strip_option="--strip-debug" - fi + if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then + strip_option= -+ fi + fi + objcopy --add-gnu-debuglink=$debugfn $strip_option $f || : + chmod $mode $f - done - ++done ++ +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") @@ -66,8 +66,8 @@ SUSE specific find-debuginfo changes. + debugdn="${debugdir}${dn}" + mkdir -p "${debugdn}" + mv "$f" "${debugdn}" -+done -+ + 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) diff --git a/rpm-python.spec b/rpm-python.spec index 2364bbf..445c598 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 104 +Release: 105 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index a40840f..b45e867 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 17 14:24:01 CEST 2007 - dmueller@suse.de + +- strip comment and gcc command line sections from the packages +- rework SYMTAB_KEEP to accept a file pattern + ------------------------------------------------------------------- Sun Apr 8 23:22:12 CEST 2007 - schwab@suse.de diff --git a/rpm.spec b/rpm.spec index faf9805..a045830 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 97 +Release: 98 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -321,7 +321,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 325 +Release: 326 # %description -n popt @@ -344,7 +344,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 325 +Release: 326 Requires: popt = 1.7 Requires: glibc-devel @@ -380,6 +380,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Apr 17 2007 - dmueller@suse.de +- strip comment and gcc command line sections from the packages +- rework SYMTAB_KEEP to accept a file pattern * Sun Apr 08 2007 - schwab@suse.de - Include compilation directory in debuginfo file list. * Sat Mar 24 2007 - ro@suse.de From 6d338d7cd4c3deef4bf218f966a67df836b4cd50e5045c509644bf84abdf7101 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 23 Apr 2007 21:21:13 +0000 Subject: [PATCH 012/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=12 --- finddebuginfo.diff | 28 +++++++++++++++------------- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/finddebuginfo.diff b/finddebuginfo.diff index b5c6a5d..39e51fa 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -30,7 +30,7 @@ /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" # A binary already copied into /usr/lib/debug doesn't get stripped, -@@ -34,19 +45,58 @@ +@@ -34,19 +45,60 @@ esac mkdir -p "${debugdn}" @@ -43,20 +43,22 @@ + objcopy --only-keep-debug $f $debugfn || : + strip_option="--strip-all" + case "$f" in -+ *$STRIP_KEEP_SYMTAB*) -+ strip_option="--strip-debug" -+ ;; + *.ko|*.a) + strip_option="--strip-debug" + ;; -+ esac ++ *$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 $strip_option $f || : + chmod $mode $f -+done -+ + done + +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") @@ -66,17 +68,15 @@ + debugdn="${debugdir}${dn}" + mkdir -p "${debugdn}" + mv "$f" "${debugdn}" - done - ++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 - --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 @@ -90,7 +90,9 @@ + cp "`readlink -f $RPM_BUILD_DIR/$link`" "$DBASE/$link" + fi +done -+ + +-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 +{ + test -d ${RPM_BUILD_ROOT}/usr/lib/debug && echo /usr/lib/debug + echo /usr/src/debug diff --git a/rpm-python.spec b/rpm-python.spec index 445c598..9059d18 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 105 +Release: 107 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index b45e867..054fa41 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Apr 22 15:23:12 CEST 2007 - dmueller@suse.de + +- fix stripping of symbol table + ------------------------------------------------------------------- Tue Apr 17 14:24:01 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index a045830..8fc49dc 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 98 +Release: 100 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -321,7 +321,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 326 +Release: 328 # %description -n popt @@ -344,7 +344,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 326 +Release: 328 Requires: popt = 1.7 Requires: glibc-devel @@ -380,6 +380,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Sun Apr 22 2007 - dmueller@suse.de +- fix stripping of symbol table * Tue Apr 17 2007 - dmueller@suse.de - strip comment and gcc command line sections from the packages - rework SYMTAB_KEEP to accept a file pattern From ccca20e1856bd6fadb5b9e5082d17d091820cd7faaf2824bd8b02c85e9eeba09 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 26 Apr 2007 17:02:20 +0000 Subject: [PATCH 013/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=13 --- noprovides.diff | 2 +- rpm-python.spec | 2 +- rpm.changes | 9 +++++++++ rpm.spec | 14 ++++++++++---- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/noprovides.diff b/noprovides.diff index c8e7fb8..095948f 100644 --- a/noprovides.diff +++ b/noprovides.diff @@ -17,7 +17,7 @@ for obsoleted packages. It's just too dangerous. mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, Name, 0); else - mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0); -+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0); ++ mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0); xx = rpmdbPruneIterator(mi, ts->removedPackages, ts->numRemovedPackages, 1); diff --git a/rpm-python.spec b/rpm-python.spec index 9059d18..5b910d8 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 107 +Release: 109 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index 054fa41..9431561 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Apr 24 17:12:47 CEST 2007 - mls@suse.de + +- enable noprovides patch again. + disable part of the patch so that rpm checks the package provides + again instead of just package name when going through the + obsoletes list. This makes rpm behaviour consistent with the + updated libzypp. [#232127] + ------------------------------------------------------------------- Sun Apr 22 15:23:12 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 8fc49dc..7f2e8ae 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 100 +Release: 103 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -187,7 +187,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 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 +%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 @@ -321,7 +321,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 328 +Release: 331 # %description -n popt @@ -344,7 +344,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 328 +Release: 331 Requires: popt = 1.7 Requires: glibc-devel @@ -380,6 +380,12 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Apr 24 2007 - mls@suse.de +- enable noprovides patch again. + disable part of the patch so that rpm checks the package provides + again instead of just package name when going through the + obsoletes list. This makes rpm behaviour consistent with the + updated libzypp. [#232127] * Sun Apr 22 2007 - dmueller@suse.de - fix stripping of symbol table * Tue Apr 17 2007 - dmueller@suse.de From 20b3067a90a66a8dafaf87d2942e582c349a2e0c8f50e42e08e7507be32f2bb0 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sun, 6 May 2007 15:11:25 +0000 Subject: [PATCH 014/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=14 --- autodeps.diff | 10 +++++----- rpm-python.spec | 2 +- rpm.changes | 9 +++++++++ rpm.spec | 12 +++++++++--- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/autodeps.diff b/autodeps.diff index eb8e567..8f19ecd 100644 --- a/autodeps.diff +++ b/autodeps.diff @@ -18,7 +18,7 @@ Some (probably SUSE specific) changes to linux.prov and linux.req + cut -d: -f1)) pythonlist= tcllist= -+monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) ++monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) # # --- Alpha does not mark 64bit dependencies @@ -93,8 +93,8 @@ Some (probably SUSE specific) changes to linux.prov and linux.req +# +# --- Mono exes/dlls +: ${MONO_PREFIX=/usr} -+[ -x $MONO_PREFIX/bin/mono -a -f $MONO_PREFIX/bin/mono-find-provides -a -n "$monolist" ] && -+ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-provides ++[ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] && ++ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-provides || echo "WARNING: MONO RPM PROVIDES WERE NOT GENERATED FOR THIS BUILD!!" 1>&2 + +# +# --- Kernel module exported symbols @@ -251,8 +251,8 @@ Some (probably SUSE specific) changes to linux.prov and linux.req +# +# --- Mono exes/dlls +: ${MONO_PREFIX=/usr} -+[ -x $MONO_PREFIX/bin/mono -a -f $MONO_PREFIX/bin/mono-find-requires -a -n "$monolist" ] && -+ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-requires ++[ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] && ++ printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-requires || echo "WARNING: MONO RPM REQUIRES WERE NOT GENERATED FOR THIS BUILD!!" 1>&2 + +# +# --- Kernel module imported symbols diff --git a/rpm-python.spec b/rpm-python.spec index 5b910d8..337e561 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 109 +Release: 112 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index 9431561..7914067 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sat Apr 28 00:43:30 CEST 2007 - wberrier@suse.de + +- autodeps.diff - bnc #227362 + -Print warning if mono assembiles are found but mono-find-* fails + (solution is to make sure mono-devel is installed) + -Also include .config files when searching for mono assemblies. + (bnc #210224) + ------------------------------------------------------------------- Tue Apr 24 17:12:47 CEST 2007 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 7f2e8ae..616b862 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 103 +Release: 105 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -321,7 +321,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 331 +Release: 333 # %description -n popt @@ -344,7 +344,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 331 +Release: 333 Requires: popt = 1.7 Requires: glibc-devel @@ -380,6 +380,12 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Sat Apr 28 2007 - wberrier@suse.de +- autodeps.diff - bnc #227362 + -Print warning if mono assembiles are found but mono-find-* fails + (solution is to make sure mono-devel is installed) + -Also include .config files when searching for mono assemblies. + (bnc #210224) * Tue Apr 24 2007 - mls@suse.de - enable noprovides patch again. disable part of the patch so that rpm checks the package provides From bde43395ac4f277cee3195762126da3760f76852073fa37024a2b66ffb550769 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 16 May 2007 22:32:19 +0000 Subject: [PATCH 015/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=15 --- autodeps.diff | 10 ++++++---- findlang.diff | 4 ++-- rpm-python.spec | 2 +- rpm-suse_macros | 10 ++++++++++ rpm.changes | 15 +++++++++++++++ rpm.spec | 12 +++++++++--- 6 files changed, 43 insertions(+), 10 deletions(-) diff --git a/autodeps.diff b/autodeps.diff index 8f19ecd..724039c 100644 --- a/autodeps.diff +++ b/autodeps.diff @@ -2,7 +2,7 @@ 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 -@@ -2,60 +2,71 @@ +@@ -2,60 +2,72 @@ # This script reads filenames from STDIN and outputs any relevant provides # information that needs to be included in the package. @@ -93,8 +93,9 @@ Some (probably SUSE specific) changes to linux.prov and linux.req +# +# --- Mono exes/dlls +: ${MONO_PREFIX=/usr} -+[ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] && ++if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then + printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-provides || echo "WARNING: MONO RPM PROVIDES WERE NOT GENERATED FOR THIS BUILD!!" 1>&2 ++fi + +# +# --- Kernel module exported symbols @@ -227,7 +228,7 @@ Some (probably SUSE specific) changes to linux.prov and linux.req print LIBNAME "(" $4 ")'$lib64'"; } ' -@@ -118,17 +122,28 @@ done | sort -u +@@ -118,17 +122,29 @@ done | sort -u # # --- Perl modules. @@ -251,8 +252,9 @@ Some (probably SUSE specific) changes to linux.prov and linux.req +# +# --- Mono exes/dlls +: ${MONO_PREFIX=/usr} -+[ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] && ++if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then + printf "%s\n" "${monolist[@]}" | MONO_PATH=$MONO_PREFIX/lib${MONO_PATH:+:$MONO_PATH} prefix=$MONO_PREFIX $MONO_PREFIX/bin/mono-find-requires || echo "WARNING: MONO RPM REQUIRES WERE NOT GENERATED FOR THIS BUILD!!" 1>&2 ++fi + +# +# --- Kernel module imported symbols diff --git a/findlang.diff b/findlang.diff index 235d1a8..9b9b891 100644 --- a/findlang.diff +++ b/findlang.diff @@ -99,9 +99,9 @@ SUSE patches for find-lang. '"$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: +'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: -+'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: ++'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) %doc \1\2\3: +'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: -+'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: ++'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) %doc \1\2\3: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME diff --git a/rpm-python.spec b/rpm-python.spec index 337e561..ad4a188 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 112 +Release: 117 Requires: rpm = %{version} %py_requires diff --git a/rpm-suse_macros b/rpm-suse_macros index 92bc572..a8e2538 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -457,3 +457,13 @@ # find-supplements.ksyms parses this macro directly out of the spec file: %supplements_kernel_module() \ %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} + +# Template for lang sub-package. +%lang_package \ +%package lang\ +Summary: Languages for package %{name}\ +Group: System/Localization\ +Requires: %{name} = %{version}\ +%description lang\ +Provides translations to the package %{name}. + diff --git a/rpm.changes b/rpm.changes index 7914067..f626d7f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed May 16 12:16:44 CEST 2007 - mls@suse.de + +- fix autodeps.diff mono logic + +------------------------------------------------------------------- +Mon May 14 13:47:02 CEST 2007 - coolo@suse.de + +- correctly mark KDE documentation as %doc in find-lang.sh + +------------------------------------------------------------------- +Fri May 11 14:34:35 CEST 2007 - coolo@suse.de + +- adding %lang_package to simplify seperating translations + ------------------------------------------------------------------- Sat Apr 28 00:43:30 CEST 2007 - wberrier@suse.de diff --git a/rpm.spec b/rpm.spec index 616b862..a1361d9 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 105 +Release: 107 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -321,7 +321,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 333 +Release: 335 # %description -n popt @@ -344,7 +344,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 333 +Release: 335 Requires: popt = 1.7 Requires: glibc-devel @@ -380,6 +380,12 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Wed May 16 2007 - mls@suse.de +- fix autodeps.diff mono logic +* Mon May 14 2007 - coolo@suse.de +- correctly mark KDE documentation as %%doc in find-lang.sh +* Fri May 11 2007 - coolo@suse.de +- adding %%lang_package to simplify seperating translations * Sat Apr 28 2007 - wberrier@suse.de - autodeps.diff - bnc #227362 -Print warning if mono assembiles are found but mono-find-* fails From 531e464c172dc17eba71b63c2b8da1964b43f3e33ebb1e8bd32da0e982323abe Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 25 May 2007 15:22:10 +0000 Subject: [PATCH 016/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=16 --- convertdb1static.diff | 13 ++++++------ patchrpms.diff | 4 +++- perlprov.diff | 41 ++++++++++++++++++++++++++++++++++++ pythonunicode.diff | 13 ++++++++++++ rpm-python.changes | 5 +++++ rpm-python.spec | 4 +++- rpm.changes | 11 ++++++++++ rpm.spec | 24 +++++++++++++++------ showtransscripts.diff | 49 +++++++++++++++++++++++++++++++++++++++++++ tarwildcards.diff | 13 ++++++++++++ verifylstatfail.diff | 8 ++++--- 11 files changed, 168 insertions(+), 17 deletions(-) create mode 100644 perlprov.diff create mode 100644 pythonunicode.diff create mode 100644 showtransscripts.diff create mode 100644 tarwildcards.diff diff --git a/convertdb1static.diff b/convertdb1static.diff index 52caaf5..ad349dd 100644 --- a/convertdb1static.diff +++ b/convertdb1static.diff @@ -1,9 +1,10 @@ -Build convertdb1 as static binary so that it always works. +Build convertdb1, too. -diff -ur ./tools/Makefile.am ../rpm-4.4.2.orig/tools/Makefile.am ---- ./tools/Makefile.am 2006-09-21 19:35:56.000000000 +0200 -+++ ../rpm-4.4.2.orig/tools/Makefile.am 2006-09-21 20:59:01.000000000 +0200 -@@ -18,22 +18,26 @@ +Index: tools/Makefile.am +=================================================================== +--- tools/Makefile.am.orig ++++ tools/Makefile.am +@@ -18,22 +18,26 @@ INCLUDES = -I. \ EXTRA_DIST = rpminject.c rpmsort.c rpmxml.c rpmxp.c rpmxp.h hashtab.h @@ -26,7 +27,7 @@ diff -ur ./tools/Makefile.am ../rpm-4.4.2.orig/tools/Makefile.am bin_PROGRAMS = rpmgraph convertdb1_SOURCES = convertdb1.c -+convertdb1_LDFLAGS = $(staticLDFLAGS) ++#convertdb1_LDFLAGS = $(staticLDFLAGS) +convertdb1_LDADD = \ + $(top_builddir)/lib/librpm.la \ + @WITH_LIBELF_LIB@ diff --git a/patchrpms.diff b/patchrpms.diff index 050189d..d40482c 100644 --- a/patchrpms.diff +++ b/patchrpms.diff @@ -272,17 +272,19 @@ Index: lib/query.c if ((rc = qva->qva_showPackage(qva, ts, h)) != 0) ec = rc; if (qva->qva_source == RPMQV_DBOFFSET) -@@ -685,7 +708,15 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A +@@ -685,7 +708,17 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A switch (qva->qva_source) { case RPMQV_ALL: - qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0); + if ((!argv || !*argv) && (qva->qva_flags & QUERY_FOR_PATCHES) != 0) { + qva->qva_gi = rpmgiNew(ts, RPMTAG_REQUIRENAME, "rpmlib(PatchRPMs)", 0); ++ qva->qva_gi->mi = rpmtsInitIterator(qva->qva_gi->ts, qva->qva_gi->tag, qva->qva_gi->keyp, qva->qva_gi->keylen); + if (qva->qva_gi->mi == NULL) { + rpmError(RPMERR_QUERYINFO, _("no patch-rpm installed\n")); + break; + } ++ qva->qva_gi->mi = rpmdbFreeIterator(qva->qva_gi->mi); + } else { + qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0); + } diff --git a/perlprov.diff b/perlprov.diff new file mode 100644 index 0000000..631134c --- /dev/null +++ b/perlprov.diff @@ -0,0 +1,41 @@ +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 { + + $version= $1; + } +- $require{$package}=$version; ++ $require{$package} ||= $version; + } + + # 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/pythonunicode.diff b/pythonunicode.diff new file mode 100644 index 0000000..aff230a --- /dev/null +++ b/pythonunicode.diff @@ -0,0 +1,13 @@ +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/rpm-python.changes b/rpm-python.changes index eb78897..4f38533 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 25 16:20:53 CEST 2007 - mls@suse.de + +- fix unicode queries + ------------------------------------------------------------------- Fri Mar 30 15:06:28 CEST 2007 - rguenther@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index ad4a188..721cc24 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 117 +Release: 122 Requires: rpm = %{version} %py_requires @@ -62,6 +62,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog +* Fri May 25 2007 - mls@suse.de +- fix unicode queries * Fri Mar 30 2007 - rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires. * Wed Oct 18 2006 - mls@suse.de diff --git a/rpm.changes b/rpm.changes index f626d7f..bec4834 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri May 25 16:18:07 CEST 2007 - mls@suse.de + +- fix patch-rpm query +- do not link convertdb1 statically [#274694] +- use --wildcards option for tar [#272519] +- fix perl.prov [#255009] +- show pre/posttrans scripts in --scripts query [#253620] +- remove popt version requires [#246871] +- fix missing file error + ------------------------------------------------------------------- Wed May 16 12:16:44 CEST 2007 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index a1361d9..69b35f5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,12 +15,12 @@ License: GNU General Public License (GPL) Group: System/Packages BuildRequires: libbz2-devel ncurses-devel zlib-devel Provides: rpminst -%define popt_version 1.7 -PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permissions +%define popt_version 1.7 +PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 107 +Release: 110 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -121,6 +121,10 @@ 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 BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -190,7 +194,7 @@ rm -f rpmdb/db.h %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 +%patch -P 90 -P 91 -P 92 -P 93 -P 94 -P 95 -P 96 -P 97 -P 98 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -321,7 +325,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 335 +Release: 338 # %description -n popt @@ -344,7 +348,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 335 +Release: 338 Requires: popt = 1.7 Requires: glibc-devel @@ -380,6 +384,14 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri May 25 2007 - mls@suse.de +- fix patch-rpm query +- do not link convertdb1 statically [#274694] +- use --wildcards option for tar [#272519] +- fix perl.prov [#255009] +- show pre/posttrans scripts in --scripts query [#253620] +- remove popt version requires [#246871] +- fix missing file error * Wed May 16 2007 - mls@suse.de - fix autodeps.diff mono logic * Mon May 14 2007 - coolo@suse.de diff --git a/showtransscripts.diff b/showtransscripts.diff new file mode 100644 index 0000000..322c8af --- /dev/null +++ b/showtransscripts.diff @@ -0,0 +1,49 @@ +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/tarwildcards.diff b/tarwildcards.diff new file mode 100644 index 0000000..6530eb6 --- /dev/null +++ b/tarwildcards.diff @@ -0,0 +1,13 @@ +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/verifylstatfail.diff b/verifylstatfail.diff index d0fd950..852e156 100644 --- a/verifylstatfail.diff +++ b/verifylstatfail.diff @@ -1,12 +1,14 @@ Tell user the reason why the lstat failed in a verify operation. ---- ./lib/verify.c.orig 2005-12-15 15:17:41.000000000 +0000 -+++ ./lib/verify.c 2005-12-15 15:24:48.000000000 +0000 +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 ((rc & RPMVERIFY_LSTATFAIL) != 0) { ++ if ((verifyResult & RPMVERIFY_LSTATFAIL) != 0 && errno != ENOENT) { + sprintf(te, " (%s)", strerror(errno)); + te += strlen(te); + } From 15255771db34266b6e866b3ab77716f91efeda701cd98c8d53379a2864662c1d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 31 May 2007 19:11:57 +0000 Subject: [PATCH 017/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=17 --- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- rpmpopt.diff | 25 +++++++++++++------------ 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 721cc24..f220f30 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 122 +Release: 126 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index bec4834..18c2ed2 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun May 27 16:43:25 CEST 2007 - schwab@suse.de + +- Remove duplicate rpmpopt alias. + ------------------------------------------------------------------- Fri May 25 16:18:07 CEST 2007 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 69b35f5..8a7ec66 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 110 +Release: 112 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -325,7 +325,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 338 +Release: 340 # %description -n popt @@ -348,7 +348,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 338 +Release: 340 Requires: popt = 1.7 Requires: glibc-devel @@ -384,6 +384,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Sun May 27 2007 - schwab@suse.de +- Remove duplicate rpmpopt alias. * Fri May 25 2007 - mls@suse.de - fix patch-rpm query - do not link convertdb1 statically [#274694] diff --git a/rpmpopt.diff b/rpmpopt.diff index 6f88a93..6cbf7ba 100644 --- a/rpmpopt.diff +++ b/rpmpopt.diff @@ -1,7 +1,11 @@ +--- + rpmpopt.in | 47 ++++++++++++++++++++++------------------------- + 1 file changed, 22 insertions(+), 25 deletions(-) + Index: rpmpopt.in =================================================================== ---- rpmpopt.in.orig -+++ 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 %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|URL?{URL : %{URL}\n}|\ @@ -12,23 +16,20 @@ Index: rpmpopt.in --POPTdesc=$"list descriptive information from package(s)" rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ -@@ -129,11 +130,11 @@ rpm alias --fileprovide --qf '[%{FILENAM +@@ -129,12 +130,6 @@ rpm alias --fileprovide --qf '[%{FILENAM rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \ --POPTdesc=$"list file names with requires" -rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides \ - --POPTdesc=$"find package name that contains a provided capability (needs rpmdb-redhat package installed)" -+rpm alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \ -+ --POPTdesc=$"list file names with classes" - +- -rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires \ - --POPTdesc=$"find package name that contains a required capability (needs rpmdb-redhat package installed)" -+rpm alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \ -+ --POPTdesc=$"list file names with colors" - +- # colon separated i18n domains to use as PO catalogue lookaside for * retrieving header group/description/summary. -@@ -201,22 +202,22 @@ rpm alias --timecheck --define '_timeche + # +@@ -201,22 +196,22 @@ rpm alias --timecheck --define '_timeche #rpm exec --target rpmb --target #rpm exec --short-circuit rpmb --short-circuit @@ -67,7 +68,7 @@ Index: rpmpopt.in #rpm exec -i rpmi -i #rpm exec --install rpmi --install -@@ -382,7 +383,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p +@@ -382,7 +377,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|URL?{URL : %{URL}\n}|\ Summary : %{SUMMARY}\n\ @@ -77,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 +497,8 @@ Size : %-27{SIZE}%|LICENSE?{ +@@ -495,7 +491,8 @@ Size : %-27{SIZE}%|LICENSE?{ %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|URL?{URL : %{URL}\n}|\ Summary : %{SUMMARY}\n\ From e5251051ba65d2530fb58e4890903453d974e445f9fa47dec7a087e0a86a85ce Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 23 Jul 2007 18:54:09 +0000 Subject: [PATCH 018/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=18 --- RPM-Changes.html.tar.bz2 | 3 --- rpm-debugedit-shared.diff | 11 ++++++++++ rpm-python.spec | 4 ++-- rpm.changes | 5 +++++ rpm.spec | 45 +++++++++++++++++++++++++++------------ 5 files changed, 49 insertions(+), 19 deletions(-) delete mode 100644 RPM-Changes.html.tar.bz2 create mode 100644 rpm-debugedit-shared.diff diff --git a/RPM-Changes.html.tar.bz2 b/RPM-Changes.html.tar.bz2 deleted file mode 100644 index 5cb5122..0000000 --- a/RPM-Changes.html.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b1d6954ea1c3fd4681d1419dbbae6907fac09ac9e8ea8cd33b08e930873e4c2 -size 9527 diff --git a/rpm-debugedit-shared.diff b/rpm-debugedit-shared.diff new file mode 100644 index 0000000..2210cd5 --- /dev/null +++ b/rpm-debugedit-shared.diff @@ -0,0 +1,11 @@ +--- 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-python.spec b/rpm-python.spec index f220f30..aedbae6 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -12,11 +12,11 @@ Name: rpm-python BuildRequires: libbz2-devel ncurses-devel python-devel zlib-devel -License: GNU General Public License (GPL) +License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 126 +Release: 140 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index 18c2ed2..f017944 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 15 08:30:07 CEST 2007 - dmueller@suse.de + +- package size reduction (28%) + ------------------------------------------------------------------- Sun May 27 16:43:25 CEST 2007 - schwab@suse.de diff --git a/rpm.spec b/rpm.spec index 8a7ec66..2b242f8 100644 --- a/rpm.spec +++ b/rpm.spec @@ -11,7 +11,7 @@ # norootforbuild Name: rpm -License: GNU General Public License (GPL) +License: GPL v2 or later Group: System/Packages BuildRequires: libbz2-devel ncurses-devel zlib-devel Provides: rpminst @@ -20,11 +20,10 @@ PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 112 +Release: 121 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 -Source3: RPM-Changes.html.tar.bz2 Source4: rpm-suse_macros Source5: rpmsort Source6: symset-table @@ -125,6 +124,7 @@ Patch95: pythonunicode.diff Patch96: tarwildcards.diff Patch97: perlprov.diff Patch98: showtransscripts.diff +Patch99: %{name}-debugedit-shared.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -146,7 +146,7 @@ Authors: %package devel Summary: Include Files and Libraries mandatory for Development. -License: GNU General Public License (GPL) +License: GPL v2 or later Group: System/Packages Requires: rpm = %{version} Requires: popt-devel zlib-devel bzip2 libbz2-devel @@ -194,12 +194,11 @@ rm -f rpmdb/db.h %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 +%patch -P 90 -P 91 -P 92 -P 93 -P 94 -P 95 -P 96 -P 97 -P 98 -P 99 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} tar -xjvf %{SOURCE2} -tar -xjvf %{SOURCE3} if [ -s /etc/rpm/suse_macros ]; then cp -a /etc/rpm/suse_macros %{SOURCE4} fi @@ -208,7 +207,8 @@ rename no nb po/no.* popt/po/no.* %build %{?suse_update_config:%{suse_update_config -f popt}} -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -ffunction-sections" +export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" %ifarch alpha export CFLAGS="-g -O0 -fno-strict-aliasing" %endif @@ -265,6 +265,22 @@ install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc mkdir -p $RPM_BUILD_ROOT/etc/rpm chmod 755 $RPM_BUILD_ROOT/etc/rpm +# remove some nonsense or non-working scripts +pushd $RPM_BUILD_ROOT/usr/lib/rpm/ +for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \ + magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \ + brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \ + rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile +do + rm $f +done +for i in /usr/share/automake-*/*; do + if test -f "$i" && test -f "${i##*/}"; then + rm -f "${i##*/}" + fi +done +popd +gzip -9 CHANGES %clean rm -rf $RPM_BUILD_ROOT @@ -288,9 +304,9 @@ fi %files %defattr(-,root,root) -%doc RPM-PGP-KEY RPM-GPG-KEY CHANGES COPYING GROUPS +%doc CHANGES.gz COPYING GROUPS %doc doc/manual -%doc RPM-HOWTO RPM-Tips RPM-Changes +%doc RPM-HOWTO RPM-Tips /etc/rpm /bin/rpm /usr/bin/* @@ -299,7 +315,6 @@ fi /usr/lib/rpm %{_libdir}/librpm*-*.so %doc %{_mandir}/man[18]/*.[18]* -#%doc %{_mandir}/*/man[18]/*.[18]* /usr/share/locale/*/LC_MESSAGES/rpm.mo %dir /var/lib/rpm %dir /var/spool/repackage @@ -322,10 +337,10 @@ fi %{_libdir}/librpmio.so %package -n popt Summary: A C library for parsing command line parameters -License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) +License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 340 +Release: 349 # %description -n popt @@ -345,10 +360,10 @@ Authors: %package -n popt-devel Summary: C Library for Parsing Command Line Parameters -License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) +License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 340 +Release: 349 Requires: popt = 1.7 Requires: glibc-devel @@ -384,6 +399,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Jun 15 2007 - dmueller@suse.de +- package size reduction (28%%) * Sun May 27 2007 - schwab@suse.de - Remove duplicate rpmpopt alias. * Fri May 25 2007 - mls@suse.de From 00764860c96a9459bccf17b3f9d2701299218c024e665724030eeb3b23d391a1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 27 Jul 2007 13:46:41 +0000 Subject: [PATCH 019/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=19 --- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 10 ++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index aedbae6..f87ed92 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 140 +Release: 141 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index f017944..3bd80bd 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 24 13:29:10 CEST 2007 - dmueller@suse.de + +- hardcode rpm in patch name + ------------------------------------------------------------------- Fri Jun 15 08:30:07 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 2b242f8..71da3b7 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 121 +Release: 123 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -124,7 +124,7 @@ Patch95: pythonunicode.diff Patch96: tarwildcards.diff Patch97: perlprov.diff Patch98: showtransscripts.diff -Patch99: %{name}-debugedit-shared.diff +Patch99: rpm-debugedit-shared.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -340,7 +340,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 349 +Release: 351 # %description -n popt @@ -363,7 +363,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 349 +Release: 351 Requires: popt = 1.7 Requires: glibc-devel @@ -399,6 +399,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Jul 24 2007 - dmueller@suse.de +- hardcode rpm in patch name * Fri Jun 15 2007 - dmueller@suse.de - package size reduction (28%%) * Sun May 27 2007 - schwab@suse.de From b8e3d5572bed103f968f64894c75d6bc91ac44f44dc3ca6c7ea8fd862c05c72e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 3 Aug 2007 12:06:02 +0000 Subject: [PATCH 020/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=20 --- macrosin.diff | 2 +- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/macrosin.diff b/macrosin.diff index f8fb3e9..77c9962 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -16,7 +16,7 @@ Index: macros.in Group: Development/Debug\ AutoReqProv: 0\ -%description debug\ -+Requires: %{name} = %{version}-%{release}\ ++Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ +%description debuginfo\ This package provides debug information for package %{name}.\ Debug information is useful when developing applications that use this\ diff --git a/rpm-python.spec b/rpm-python.spec index f87ed92..96ceb33 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 141 +Release: 145 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index 3bd80bd..8344dbb 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 2 15:28:09 CEST 2007 - mls@suse.de + +- let the debug_package_requires macro overwrite the + default requires in the debuginfo package + ------------------------------------------------------------------- Tue Jul 24 13:29:10 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 71da3b7..5b4a986 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 123 +Release: 126 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -340,7 +340,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 351 +Release: 354 # %description -n popt @@ -363,7 +363,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 351 +Release: 354 Requires: popt = 1.7 Requires: glibc-devel @@ -399,6 +399,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Aug 02 2007 - mls@suse.de +- let the debug_package_requires macro overwrite the + default requires in the debuginfo package * Tue Jul 24 2007 - dmueller@suse.de - hardcode rpm in patch name * Fri Jun 15 2007 - dmueller@suse.de From db48afa6610231bf45d2bfd397dba60310135c21efe8d82cf5bdc2fc93cb7a41 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 9 Aug 2007 10:29:08 +0000 Subject: [PATCH 021/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=21 --- rpm-python.spec | 2 +- rpm-suse_macros | 16 ++++++++-------- rpm.changes | 7 +++++++ rpm.spec | 10 +++++++--- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 96ceb33..2020997 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 145 +Release: 148 Requires: rpm = %{version} %py_requires diff --git a/rpm-suse_macros b/rpm-suse_macros index a8e2538..1599467 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -459,11 +459,11 @@ %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} # Template for lang sub-package. -%lang_package \ -%package lang\ -Summary: Languages for package %{name}\ -Group: System/Localization\ -Requires: %{name} = %{version}\ -%description lang\ -Provides translations to the package %{name}. - +%lang_package(n:) \ +%package %{-n:-n %{-n*}-}lang \ +Summary: Languages for package %{name} \ +Group: System/Localization \ +Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ +Requires: %{name} = %{version} \ +%description %{-n:-n %{-n*}-}lang \ +Provides translations to the package %{name} diff --git a/rpm.changes b/rpm.changes index 8344dbb..bd7efb5 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Aug 8 23:25:56 CEST 2007 - dmueller@suse.de + +- support optional -n parameter in %lang_package +- make %lang_package export a -all provides that + can be used to resolve conflicts with the bundle + ------------------------------------------------------------------- Thu Aug 2 15:28:09 CEST 2007 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 5b4a986..09c0d80 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 126 +Release: 128 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -340,7 +340,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 354 +Release: 356 # %description -n popt @@ -363,7 +363,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 354 +Release: 356 Requires: popt = 1.7 Requires: glibc-devel @@ -399,6 +399,10 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Wed Aug 08 2007 - dmueller@suse.de +- support optional -n parameter in %%lang_package +- make %%lang_package export a -all provides that + can be used to resolve conflicts with the bundle * Thu Aug 02 2007 - mls@suse.de - let the debug_package_requires macro overwrite the default requires in the debuginfo package From ab23b3c257baf831b3e6881ddd41569df0d9871f7bfb43cad831fa80cf82b7a6 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 10 Aug 2007 15:16:08 +0000 Subject: [PATCH 022/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=22 --- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 9 ++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 2020997..cb1a389 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 148 +Release: 149 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index bd7efb5..2472cd4 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 10 16:40:10 CEST 2007 - dmueller@suse.de + +- package size reduction (#217472) + ------------------------------------------------------------------- Wed Aug 8 23:25:56 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 09c0d80..4148ecd 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 128 +Release: 129 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -252,6 +252,7 @@ export RPM_BUILD_ROOT [ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux %endif chmod 755 doc/manual +rm -rf doc/manual/Makefile* rm -f $RPM_BUILD_ROOT/usr/lib/rpmpopt rm -rf $RPM_BUILD_ROOT%{_mandir}/{fr,ja,ko,pl,ru,sk} rm -f $RPM_BUILD_ROOT%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo @@ -340,7 +341,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 356 +Release: 357 # %description -n popt @@ -363,7 +364,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 356 +Release: 357 Requires: popt = 1.7 Requires: glibc-devel @@ -399,6 +400,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Aug 10 2007 - dmueller@suse.de +- package size reduction (#217472) * Wed Aug 08 2007 - dmueller@suse.de - support optional -n parameter in %%lang_package - make %%lang_package export a -all provides that From b405e0dd1a83bcdffa0fc3ba1a0fa69180982364dd01bc3f8af0e60c3c19a7f5 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 31 Aug 2007 16:48:05 +0000 Subject: [PATCH 023/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=23 --- rpm-python.spec | 2 +- rpm-suse_macros | 4 ++-- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index cb1a389..b878b71 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 149 +Release: 156 Requires: rpm = %{version} %py_requires diff --git a/rpm-suse_macros b/rpm-suse_macros index 1599467..88efc3d 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -463,7 +463,7 @@ %package %{-n:-n %{-n*}-}lang \ Summary: Languages for package %{name} \ Group: System/Localization \ -Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ -Requires: %{name} = %{version} \ +Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \ +Supplements: bundle-lang-other = %(echo `echo %suse_version | sed -r -e 's,([[:digit:]]*)([[:digit:]])0$,\\1.\\2,'`) \ %description %{-n:-n %{-n*}-}lang \ Provides translations to the package %{name} diff --git a/rpm.changes b/rpm.changes index 2472cd4..41776ce 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 31 18:41:04 CEST 2007 - dmueller@suse.de + +- implement supplements for lang_packages (#306412) + ------------------------------------------------------------------- Fri Aug 10 16:40:10 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 4148ecd..3d54234 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 129 +Release: 135 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -341,7 +341,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 357 +Release: 363 # %description -n popt @@ -364,7 +364,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 357 +Release: 363 Requires: popt = 1.7 Requires: glibc-devel @@ -400,6 +400,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Aug 31 2007 - dmueller@suse.de +- implement supplements for lang_packages (#306412) * Fri Aug 10 2007 - dmueller@suse.de - package size reduction (#217472) * Wed Aug 08 2007 - dmueller@suse.de From d72a6108608a8e46c22b2543418e1381d97524f1be673f876775806f93c50359 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 13 Sep 2007 16:38:33 +0000 Subject: [PATCH 024/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=24 --- rpm-python.spec | 2 +- rpm-suse_macros | 3 ++- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index b878b71..3e12b0f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 156 +Release: 159 Requires: rpm = %{version} %py_requires diff --git a/rpm-suse_macros b/rpm-suse_macros index 88efc3d..b72bf40 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -464,6 +464,7 @@ Summary: Languages for package %{name} \ Group: System/Localization \ Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \ -Supplements: bundle-lang-other = %(echo `echo %suse_version | sed -r -e 's,([[:digit:]]*)([[:digit:]])0$,\\1.\\2,'`) \ +Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ +Supplements: packageand(bundle-lang-other:%{-n:%{-n*}}%{!-n:%{name}}) \ %description %{-n:-n %{-n*}-}lang \ Provides translations to the package %{name} diff --git a/rpm.changes b/rpm.changes index 41776ce..b3b39f7 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 3 13:27:57 CEST 2007 - dmueller@suse.de + +- change %lang_package implementation once again + to support bundle-lang-other for only one desktop (#302270) + ------------------------------------------------------------------- Fri Aug 31 18:41:04 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 3d54234..486cdd5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 135 +Release: 137 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -341,7 +341,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 363 +Release: 365 # %description -n popt @@ -364,7 +364,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 363 +Release: 365 Requires: popt = 1.7 Requires: glibc-devel @@ -400,6 +400,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Sep 03 2007 - dmueller@suse.de +- change %%lang_package implementation once again + to support bundle-lang-other for only one desktop (#302270) * Fri Aug 31 2007 - dmueller@suse.de - implement supplements for lang_packages (#306412) * Fri Aug 10 2007 - dmueller@suse.de From 7d6147aaed455344d9dbd7b7854fe17445467fad98f5a5854b39179c94a9535d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 5 Oct 2007 14:15:51 +0000 Subject: [PATCH 025/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=25 --- rpm-gcc43.diff | 20 ++++++++++++++++++++ rpm-python.spec | 4 +--- rpm.changes | 5 +++++ rpm.spec | 16 +++++++++------- 4 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 rpm-gcc43.diff diff --git a/rpm-gcc43.diff b/rpm-gcc43.diff new file mode 100644 index 0000000..364795a --- /dev/null +++ b/rpm-gcc43.diff @@ -0,0 +1,20 @@ +--- 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.spec b/rpm-python.spec index 3e12b0f..ad204d7 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,9 +16,8 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 159 +Release: 165 Requires: rpm = %{version} - %py_requires Source99: rpm.spec %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} @@ -60,7 +59,6 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_libdir}/python* - %changelog * Fri May 25 2007 - mls@suse.de - fix unicode queries diff --git a/rpm.changes b/rpm.changes index b3b39f7..f698997 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Sep 30 18:28:23 CEST 2007 - rguenther@suse.de + +- fix build with gcc43 + ------------------------------------------------------------------- Mon Sep 3 13:27:57 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 486cdd5..f434401 100644 --- a/rpm.spec +++ b/rpm.spec @@ -17,10 +17,10 @@ BuildRequires: libbz2-devel ncurses-devel zlib-devel Provides: rpminst %define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq permissions -Autoreqprov: on +AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 137 +Release: 141 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -125,6 +125,7 @@ Patch96: tarwildcards.diff Patch97: perlprov.diff Patch98: showtransscripts.diff Patch99: rpm-debugedit-shared.diff +Patch100: rpm-gcc43.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -195,6 +196,7 @@ rm -f rpmdb/db.h %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 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -299,7 +301,6 @@ fi %postun %{insserv_cleanup} - %verifyscript %verify_permissions -f /usr/lib/rpm/permlist @@ -336,12 +337,13 @@ fi %{_libdir}/librpmbuild.so %{_libdir}/librpmdb.so %{_libdir}/librpmio.so + %package -n popt Summary: A C library for parsing command line parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 365 +Release: 369 # %description -n popt @@ -364,7 +366,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 365 +Release: 369 Requires: popt = 1.7 Requires: glibc-devel @@ -383,7 +385,6 @@ Authors: -------- Erik Troan - %post -n popt -p /sbin/ldconfig %postun -n popt -p /sbin/ldconfig @@ -398,8 +399,9 @@ Authors: /usr/include/popt.h /%{_lib}/libpopt.so %doc %{_mandir}/man3/popt.3* - %changelog +* Sun Sep 30 2007 - rguenther@suse.de +- fix build with gcc43 * Mon Sep 03 2007 - dmueller@suse.de - change %%lang_package implementation once again to support bundle-lang-other for only one desktop (#302270) From 69bcd765db5bfc4afe063590958a483ce68cadc7fc4c3e17b18151c0bf7ba0c3 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 13 Oct 2007 16:03:57 +0000 Subject: [PATCH 026/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=26 --- lzma.diff | 100 ++++++++++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 5 +++ rpm.spec | 11 ++++-- 4 files changed, 113 insertions(+), 5 deletions(-) create mode 100644 lzma.diff diff --git a/lzma.diff b/lzma.diff new file mode 100644 index 0000000..f4c4add --- /dev/null +++ b/lzma.diff @@ -0,0 +1,100 @@ +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/rpm-python.spec b/rpm-python.spec index ad204d7..758c231 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 165 +Release: 169 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index f698997..3bbc6be 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 11 13:37:16 CEST 2007 - schwab@suse.de + +- Add support for lzma compressed archives. + ------------------------------------------------------------------- Sun Sep 30 18:28:23 CEST 2007 - rguenther@suse.de diff --git a/rpm.spec b/rpm.spec index f434401..296273a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 141 +Release: 143 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -126,6 +126,7 @@ Patch97: perlprov.diff Patch98: showtransscripts.diff Patch99: rpm-debugedit-shared.diff Patch100: rpm-gcc43.diff +Patch101: lzma.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -196,7 +197,7 @@ rm -f rpmdb/db.h %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 +%patch -P 100 -P 101 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -343,7 +344,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 369 +Release: 371 # %description -n popt @@ -366,7 +367,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2 or later Group: System/Libraries Version: 1.7 -Release: 369 +Release: 371 Requires: popt = 1.7 Requires: glibc-devel @@ -400,6 +401,8 @@ Authors: /%{_lib}/libpopt.so %doc %{_mandir}/man3/popt.3* %changelog +* Thu Oct 11 2007 - schwab@suse.de +- Add support for lzma compressed archives. * Sun Sep 30 2007 - rguenther@suse.de - fix build with gcc43 * Mon Sep 03 2007 - dmueller@suse.de From ee1378254441ff762dd726d1fa9760b3865af40a3b31a9717a809a2f7707918e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 23 Nov 2007 00:38:16 +0000 Subject: [PATCH 027/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=27 --- rpm-python.spec | 3 ++- rpm-shorten-changelog.diff | 52 ++++++++++++++++++++++++++++++++++++++ rpm.changes | 6 +++++ rpm.spec | 17 ++++++++----- 4 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 rpm-shorten-changelog.diff diff --git a/rpm-python.spec b/rpm-python.spec index 758c231..c6221d1 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 169 +Release: 181 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -59,6 +59,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_libdir}/python* + %changelog * Fri May 25 2007 - mls@suse.de - fix unicode queries diff --git a/rpm-shorten-changelog.diff b/rpm-shorten-changelog.diff new file mode 100644 index 0000000..de663d2 --- /dev/null +++ b/rpm-shorten-changelog.diff @@ -0,0 +1,52 @@ +--- build/parseChangelog.c ++++ 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) + return RPMERR_BADSPEC; + } + ++ /* workaround old suse oddity */ ++ if (*s == '-') { ++ ++s; ++ SKIPSPACE(s); ++ } ++ + /* name */ + name = s; + while (*s != '\0') s++; +@@ -178,6 +185,13 @@ static int addChangelog(Header h, StringBuf sb) + return RPMERR_BADSPEC; + } + ++ /* remove domain part of the email address */ ++ p = strstr(name, "@suse"); ++ if (!p) ++ p = strstr(name, "@novell"); ++ if (p) ++ *p = '\0'; ++ + /* text */ + SKIPSPACE(text); + if (! *text) { +@@ -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; + } + diff --git a/rpm.changes b/rpm.changes index 3bbc6be..06d3c5b 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 16 20:46:42 CET 2007 - dmueller@suse.de + +- shorten changelogs in binary rpms (#308569) + * saves 4.3MB for the one CD media + ------------------------------------------------------------------- Thu Oct 11 13:37:16 CEST 2007 - schwab@suse.de diff --git a/rpm.spec b/rpm.spec index 296273a..fee9026 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 143 +Release: 148 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -127,6 +127,7 @@ Patch98: showtransscripts.diff Patch99: rpm-debugedit-shared.diff Patch100: rpm-gcc43.diff Patch101: lzma.diff +Patch102: rpm-shorten-changelog.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -197,7 +198,7 @@ rm -f rpmdb/db.h %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 +%patch -P 100 -P 101 -P 102 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -341,10 +342,10 @@ fi %package -n popt Summary: A C library for parsing command line parameters -License: LGPL v2 or later +License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 371 +Release: 376 # %description -n popt @@ -364,10 +365,10 @@ Authors: %package -n popt-devel Summary: C Library for Parsing Command Line Parameters -License: LGPL v2 or later +License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 371 +Release: 376 Requires: popt = 1.7 Requires: glibc-devel @@ -400,7 +401,11 @@ Authors: /usr/include/popt.h /%{_lib}/libpopt.so %doc %{_mandir}/man3/popt.3* + %changelog +* Fri Nov 16 2007 - dmueller@suse.de +- shorten changelogs in binary rpms (#308569) + * saves 4.3MB for the one CD media * Thu Oct 11 2007 - schwab@suse.de - Add support for lzma compressed archives. * Sun Sep 30 2007 - rguenther@suse.de From 24f96a4afc52f9cde044cad93397bd060c7b6267485f649533350dd2499a7083 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 6 Dec 2007 00:28:59 +0000 Subject: [PATCH 028/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=28 --- rpm-python.spec | 2 +- rpm-shorten-changelog.diff | 14 -------------- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index c6221d1..2e025f1 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 181 +Release: 185 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-shorten-changelog.diff b/rpm-shorten-changelog.diff index de663d2..840336f 100644 --- a/rpm-shorten-changelog.diff +++ b/rpm-shorten-changelog.diff @@ -26,20 +26,6 @@ /* name */ name = s; while (*s != '\0') s++; -@@ -178,6 +185,13 @@ static int addChangelog(Header h, StringBuf sb) - return RPMERR_BADSPEC; - } - -+ /* remove domain part of the email address */ -+ p = strstr(name, "@suse"); -+ if (!p) -+ p = strstr(name, "@novell"); -+ if (p) -+ *p = '\0'; -+ - /* text */ - SKIPSPACE(text); - if (! *text) { @@ -198,7 +212,8 @@ static int addChangelog(Header h, StringBuf sb) *s-- = '\0'; } diff --git a/rpm.changes b/rpm.changes index 06d3c5b..2b21489 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 3 13:38:20 CET 2007 - dmueller@suse.de + +- list email address completely again (#344147) + ------------------------------------------------------------------- Fri Nov 16 20:46:42 CET 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index fee9026..1c37e4a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 148 +Release: 152 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -345,7 +345,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 376 +Release: 380 # %description -n popt @@ -368,7 +368,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 376 +Release: 380 Requires: popt = 1.7 Requires: glibc-devel @@ -403,6 +403,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Dec 03 2007 - dmueller@suse.de +- list email address completely again (#344147) * Fri Nov 16 2007 - dmueller@suse.de - shorten changelogs in binary rpms (#308569) * saves 4.3MB for the one CD media From 95a184d0a88e0f9a4fb6a3053adf6df5ff2ec108b31a076dc7e851143d0cea26 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 17 Jan 2008 23:45:52 +0000 Subject: [PATCH 029/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=29 --- autodeps.diff | 4 +- rpm-python.spec | 20 +- rpm.changes | 6 + rpm.spec | 761 ++++++++++++++++++++++++------------------------ 4 files changed, 400 insertions(+), 391 deletions(-) diff --git a/autodeps.diff b/autodeps.diff index 724039c..705c883 100644 --- a/autodeps.diff +++ b/autodeps.diff @@ -18,7 +18,7 @@ Some (probably SUSE specific) changes to linux.prov and linux.req + cut -d: -f1)) pythonlist= tcllist= -+monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) ++monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) # # --- Alpha does not mark 64bit dependencies @@ -136,7 +136,7 @@ Some (probably SUSE specific) changes to linux.prov and linux.req +perllist=() +pythonlist=() +tcllist=() -+monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) ++monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) # # --- Alpha does not mark 64bit dependencies diff --git a/rpm-python.spec b/rpm-python.spec index 2e025f1..00a2849 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,7 +1,7 @@ # # spec file for package rpm-python (Version 4.4.2) # -# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 185 +Release: 194 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -61,23 +61,23 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog -* Fri May 25 2007 - mls@suse.de +* Fri May 25 2007 mls@suse.de - fix unicode queries -* Fri Mar 30 2007 - rguenther@suse.de +* Fri Mar 30 2007 rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires. -* Wed Oct 18 2006 - mls@suse.de +* Wed Oct 18 2006 mls@suse.de - use rpm.spec for building instead of duplication everything - delete superfluous .a and .la files [#202604] - create .pyc and .pyo files [#205711] -* Sun Oct 15 2006 - schwab@suse.de +* Sun Oct 15 2006 schwab@suse.de - Make sure config.rpath is present. -* Fri Sep 22 2006 - aj@suse.de +* Fri Sep 22 2006 aj@suse.de - Fix for python2.5. -* Thu Sep 21 2006 - lnussel@suse.de +* Thu Sep 21 2006 lnussel@suse.de - do not package beecrypt python bindings as libbeecrypt is not packaged either - fix literal %%{version} in Requires tag -* Thu Sep 21 2006 - lnussel@suse.de +* Thu Sep 21 2006 lnussel@suse.de - fix build with python 2.5 by overriding autodetection -* Tue Sep 19 2006 - rguenther@suse.de +* Tue Sep 19 2006 rguenther@suse.de - split from rpm package diff --git a/rpm.changes b/rpm.changes index 2b21489..ea455a9 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 17 19:19:09 CET 2008 - wberrier@suse.de + +- autodeps.diff + pass .config files to mono-find-requires, not mono-find-provides + ------------------------------------------------------------------- Mon Dec 3 13:38:20 CET 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 1c37e4a..78273dd 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rpm (Version 4.4.2) # -# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 152 +Release: 157 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -345,7 +345,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 380 +Release: 385 # %description -n popt @@ -368,7 +368,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 380 +Release: 385 Requires: popt = 1.7 Requires: glibc-devel @@ -403,36 +403,39 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog -* Mon Dec 03 2007 - dmueller@suse.de +* Thu Jan 17 2008 wberrier@suse.de +- autodeps.diff + pass .config files to mono-find-requires, not mono-find-provides +* Mon Dec 03 2007 dmueller@suse.de - list email address completely again (#344147) -* Fri Nov 16 2007 - dmueller@suse.de +* Fri Nov 16 2007 dmueller@suse.de - shorten changelogs in binary rpms (#308569) * saves 4.3MB for the one CD media -* Thu Oct 11 2007 - schwab@suse.de +* Thu Oct 11 2007 schwab@suse.de - Add support for lzma compressed archives. -* Sun Sep 30 2007 - rguenther@suse.de +* Sun Sep 30 2007 rguenther@suse.de - fix build with gcc43 -* Mon Sep 03 2007 - dmueller@suse.de +* Mon Sep 03 2007 dmueller@suse.de - change %%lang_package implementation once again to support bundle-lang-other for only one desktop (#302270) -* Fri Aug 31 2007 - dmueller@suse.de +* Fri Aug 31 2007 dmueller@suse.de - implement supplements for lang_packages (#306412) -* Fri Aug 10 2007 - dmueller@suse.de +* Fri Aug 10 2007 dmueller@suse.de - package size reduction (#217472) -* Wed Aug 08 2007 - dmueller@suse.de +* Wed Aug 08 2007 dmueller@suse.de - support optional -n parameter in %%lang_package - make %%lang_package export a -all provides that can be used to resolve conflicts with the bundle -* Thu Aug 02 2007 - mls@suse.de +* Thu Aug 02 2007 mls@suse.de - let the debug_package_requires macro overwrite the default requires in the debuginfo package -* Tue Jul 24 2007 - dmueller@suse.de +* Tue Jul 24 2007 dmueller@suse.de - hardcode rpm in patch name -* Fri Jun 15 2007 - dmueller@suse.de +* Fri Jun 15 2007 dmueller@suse.de - package size reduction (28%%) -* Sun May 27 2007 - schwab@suse.de +* Sun May 27 2007 schwab@suse.de - Remove duplicate rpmpopt alias. -* Fri May 25 2007 - mls@suse.de +* Fri May 25 2007 mls@suse.de - fix patch-rpm query - do not link convertdb1 statically [#274694] - use --wildcards option for tar [#272519] @@ -440,63 +443,63 @@ Authors: - show pre/posttrans scripts in --scripts query [#253620] - remove popt version requires [#246871] - fix missing file error -* Wed May 16 2007 - mls@suse.de +* Wed May 16 2007 mls@suse.de - fix autodeps.diff mono logic -* Mon May 14 2007 - coolo@suse.de +* Mon May 14 2007 coolo@suse.de - correctly mark KDE documentation as %%doc in find-lang.sh -* Fri May 11 2007 - coolo@suse.de +* Fri May 11 2007 coolo@suse.de - adding %%lang_package to simplify seperating translations -* Sat Apr 28 2007 - wberrier@suse.de +* Sat Apr 28 2007 wberrier@suse.de - autodeps.diff - bnc #227362 -Print warning if mono assembiles are found but mono-find-* fails (solution is to make sure mono-devel is installed) -Also include .config files when searching for mono assemblies. (bnc #210224) -* Tue Apr 24 2007 - mls@suse.de +* Tue Apr 24 2007 mls@suse.de - enable noprovides patch again. disable part of the patch so that rpm checks the package provides again instead of just package name when going through the obsoletes list. This makes rpm behaviour consistent with the updated libzypp. [#232127] -* Sun Apr 22 2007 - dmueller@suse.de +* Sun Apr 22 2007 dmueller@suse.de - fix stripping of symbol table -* Tue Apr 17 2007 - dmueller@suse.de +* Tue Apr 17 2007 dmueller@suse.de - strip comment and gcc command line sections from the packages - rework SYMTAB_KEEP to accept a file pattern -* Sun Apr 08 2007 - schwab@suse.de +* Sun Apr 08 2007 schwab@suse.de - Include compilation directory in debuginfo file list. -* Sat Mar 24 2007 - ro@suse.de +* Sat Mar 24 2007 ro@suse.de - added libbz2-devel to BuildRequires and Requires for -devel -* Fri Mar 23 2007 - dmueller@suse.de +* Fri Mar 23 2007 dmueller@suse.de - drop custom libpopt so versioning - move libpopt to /lib(64) for cryptsetup - adjust installed libtool files - Fix rpm buildrequires / devel requires -* Thu Mar 22 2007 - stbinner@suse.de +* Thu Mar 22 2007 stbinner@suse.de - files.diff: when checking %%files list also show unpackaged files after "not found" error message [#255780] -* Thu Mar 22 2007 - dmueller@suse.de +* Thu Mar 22 2007 dmueller@suse.de - remove strangely duplicated libpopt - remove static popt and corresponding .la file to reduce dependencies - Fix various format string errors in german translation which cause crashes -* Mon Mar 19 2007 - rguenther@suse.de +* Mon Mar 19 2007 rguenther@suse.de - do not require build-key -* Tue Mar 06 2007 - rguenther@suse.de +* Tue Mar 06 2007 rguenther@suse.de - adjust cflags_profile_generate and cflags_profile_feedback to enable tree profiling -* Fri Jan 26 2007 - mls@suse.de +* Fri Jan 26 2007 mls@suse.de - create /var/spool/repackage directory [#230866] - do not run pre/posttrans scripts in test mode [#235361] -* Thu Nov 30 2006 - mls@suse.de +* Thu Nov 30 2006 mls@suse.de - disable noprovides patch [#224824] -* Fri Nov 24 2006 - mls@suse.de +* Fri Nov 24 2006 mls@suse.de - fix buffer overflow in query function [#218983] - fix off-by-two error in formatStrong [#210135] - fix typo in (unused) beecrypt code [#219738] - add standard buildservice macros -* Tue Nov 14 2006 - agruen@suse.de +* Tue Nov 14 2006 agruen@suse.de - Add %%supplements_kernel_module macro for use in firmware and similar packages which are related to modules in a kernel-$flavor package: RPM then extracts the modaliases from @@ -504,172 +507,172 @@ Authors: modalias(...) tags, so that the package magaer will add such packages automatically when the respective hardware is present. -* Wed Nov 08 2006 - agruen@suse.de +* Wed Nov 08 2006 agruen@suse.de - Move the Kernel Module specific macros into the kernel-source package. -* Fri Oct 20 2006 - agruen@suse.de +* Fri Oct 20 2006 agruen@suse.de - Support the distribution-independent macros %%kernel_module_package_buildreq, %%kernel_module_package, and inside %%kernel_module_package, the macros %%flavors_to_build and %%kernel_source. -* Wed Oct 18 2006 - mls@suse.de +* Wed Oct 18 2006 mls@suse.de - split up jumbo patch in 78 small patches - fix lua directory handling [#201518] - add /etc/rpm directory to filelist [#208762] -* Mon Oct 16 2006 - agruen@suse.de +* Mon Oct 16 2006 agruen@suse.de - Fix the KMP Package spec file template so that whenever the initrd contains a module that the KMP includes, the initrd will be regenerated (211646). -* Sun Oct 15 2006 - schwab@suse.de +* Sun Oct 15 2006 schwab@suse.de - Make sure config.rpath is present. -* Mon Oct 02 2006 - agruen@suse.de +* Mon Oct 02 2006 agruen@suse.de - %%suse_kernel_module_package: Abort when trying to build for a kernel that doesn't have an associated /boot/symsets-$krel.tar.gz file: we cannot generate the appropriate dependencies without. -* Mon Oct 02 2006 - agruen@suse.de +* Mon Oct 02 2006 agruen@suse.de - Allow kernel modules in packages even when the dependencies between those packages and the matching kernel packages cannot be tracked (199474). -* Sun Oct 01 2006 - agruen@suse.de +* Sun Oct 01 2006 agruen@suse.de - Make find-*.ksyms more robust. -* Tue Sep 19 2006 - rguenther@suse.de +* Tue Sep 19 2006 rguenther@suse.de - split rpm-python to separate spec file - remove python-devel BuildRequires -* Tue Aug 15 2006 - ro@suse.de +* Tue Aug 15 2006 ro@suse.de - workaround for gettext using MKINSTALLDIRS in configure.ac -* Wed Jun 14 2006 - mls@suse.de +* Wed Jun 14 2006 mls@suse.de - make rpmlib provide rpmlib(PatchRPMs) [#184856] -* Wed Apr 26 2006 - agruen@suse.de +* Wed Apr 26 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Use a temporary file location that only root can write to (169378). -* Fri Apr 21 2006 - mls@suse.de +* Fri Apr 21 2006 mls@suse.de - copy suse_macros file back into source rpm -* Mon Apr 10 2006 - agruen@suse.de +* Mon Apr 10 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Arguments to -p and -f should be relative to %%_sourcedir. -* Fri Mar 24 2006 - mls@suse.de +* Fri Mar 24 2006 mls@suse.de - fix uninitialized variable in unused file code [#160434] -* Fri Mar 24 2006 - agruen@suse.de +* Fri Mar 24 2006 agruen@suse.de - %%suse_kernel_module_package: Fix -x case when multiple flavors to include are specified. Do not build KMP packages without modversions or kernel(...) requirements. -* Tue Mar 21 2006 - mls@suse.de +* Tue Mar 21 2006 mls@suse.de - fix PGP signature checking when there is no RSA sig -* Mon Mar 20 2006 - agruen@suse.de +* Mon Mar 20 2006 agruen@suse.de - Switch from modalias(foo) to modalias(kernel-flavor:foo) supplements to give the resolver enough information to do "the right thing". -* Sun Mar 19 2006 - agruen@suse.de +* Sun Mar 19 2006 agruen@suse.de - Allow paths relative to %%_sourcedir in %%suse_kernel_module_package. -* Sat Mar 18 2006 - agruen@suse.de +* Sat Mar 18 2006 agruen@suse.de - Clarify rpm --help texts. -* Fri Mar 17 2006 - mls@suse.de +* Fri Mar 17 2006 mls@suse.de - fix cond queries that return no result -* Fri Mar 17 2006 - mls@suse.de +* Fri Mar 17 2006 mls@suse.de - work around broken patchrpm database entries [#156347] - add query support for suggests/recommends/enhances/supplements [#155301] -* Sun Mar 12 2006 - agruen@suse.de +* Sun Mar 12 2006 agruen@suse.de - find-supplements.ksyms: Don't generate too many Supplements; anything that does not have a colon in it (like pci:...) is not a modalias. -* Sat Mar 11 2006 - ro@suse.de +* Sat Mar 11 2006 ro@suse.de - find-debuginfo: only "strip-debug" for static libs, do not use "strip-all" there -* Fri Mar 10 2006 - agruen@suse.de +* Fri Mar 10 2006 agruen@suse.de - Make KMP sub-packages require kernel-$flavor instead of kernel (mostly cosmetic). -* Fri Mar 10 2006 - dmueller@suse.de +* Fri Mar 10 2006 dmueller@suse.de - patch for improved debuginfo extraction (#150940) -* Thu Mar 09 2006 - agruen@suse.de +* Thu Mar 09 2006 agruen@suse.de - find-scripts.diff: Add support for %%__find_enhances and %%__find_supplements scripts (from mls@suse.de). - modalias.diff: Add modalias(...) Supplements tags that define the hardware that kernel module packages support (e.g., modalias(pci:vBADOFBADdDEADBEEFsv*sd*bc*sc*i*)). -* Mon Mar 06 2006 - agruen@suse.de +* Mon Mar 06 2006 agruen@suse.de - %%suse_kernel_module_package: Add a -p option for defining additional preamble lines in sub-packages, subject to the same macro expansion as the sub-package (-s) itself. -* Wed Mar 01 2006 - schwab@suse.de +* Wed Mar 01 2006 schwab@suse.de - Fix logic error in find_debuginfo.sh [#144629]. -* Fri Feb 24 2006 - mls@suse.de +* Fri Feb 24 2006 mls@suse.de - fix cursor leak in rpmdbGrowIterator [#151953] - print error message if scriptlet fork fails [#152779] -* Sun Feb 19 2006 - agruen@suse.de +* Sun Feb 19 2006 agruen@suse.de - scripts/find-requires.ksyms: Fix bug in last find-requires.ksyms fix. -* Sat Feb 18 2006 - ro@suse.de +* Sat Feb 18 2006 ro@suse.de - allow debuginfo packages also for noarch (for mono,java) -* Fri Feb 17 2006 - mls@suse.de +* Fri Feb 17 2006 mls@suse.de - put mono debug files in debuginfo packages [#151353] - fix off-by-one error in glob code - define _libexecdir to be _libdir [#136762] - rename improves to supplements -* Thu Feb 16 2006 - agruen@suse.de +* Thu Feb 16 2006 agruen@suse.de - scripts/find-requires.ksyms: Tolerate kernel modules that have more than one vermagic info entry (it happened!). -* Mon Feb 13 2006 - agruen@suse.de +* Mon Feb 13 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: + Search for the spec file in %%_sourcedir and %%_specdir (150119). + If no KMP subpackage exists, use the Group and Summary tags of the main package. -* Fri Feb 10 2006 - mls@suse.de +* Fri Feb 10 2006 mls@suse.de - add back missing chunk of srcdefattr patch [#48870] - add rpmvercmp patch from Peter Bowan - add -m32 to ix86 optflags to make --target work [#141206] -* Sat Feb 04 2006 - agruen@suse.de +* Sat Feb 04 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Allow to specify a list of kernel flavors to build (-x) instead of specifying an exclude list. -* Fri Feb 03 2006 - mls@suse.de +* Fri Feb 03 2006 mls@suse.de - use RPMSENSE_STRONG instead of RPMSENSE_WEAK - drop support for EssentialFor -* Wed Feb 01 2006 - agruen@suse.de +* Wed Feb 01 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Allow to specify a custom %%files list for the kernel-specific sub-packages. Use the Summary and Group tags, and the %%description section from the KMP sub-package for the kernel-specific sub-packages. -* Tue Jan 31 2006 - agruen@suse.de +* Tue Jan 31 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Add version to additional Provides tag. We may need this for future Obsoletes. -* Fri Jan 27 2006 - mls@suse.de +* Fri Jan 27 2006 mls@suse.de - added support for EssentialFor and Supports - enabled support for lua scripts -* Fri Jan 27 2006 - agruen@suse.de +* Fri Jan 27 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Add "Requires: kernel". Add -r option to override the release number. Clean up. -* Thu Jan 26 2006 - agruen@suse.de +* Thu Jan 26 2006 agruen@suse.de - rpm-suse_macros: Add -v option to %%suse_kernel_module_package to allow specifying a kernel module version different from the main package version. Restore the %%version, %%summary, and %%group macros of the main package at the end of %%suse_kernel_module_package. -* Wed Jan 25 2006 - mls@suse.de +* Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Tue Jan 17 2006 - agruen@suse.de +* Tue Jan 17 2006 agruen@suse.de - rpm-suse_macros: Add %%suse_kernel_module_package macro for building kernel module packages. -* Wed Jan 11 2006 - agruen@suse.de +* Wed Jan 11 2006 agruen@suse.de - rpm-4.4.2.diff: find-requires.ksyms must not print "Requires:". Remove trailing whitespace. -* Wed Dec 21 2005 - mls@suse.de +* Wed Dec 21 2005 mls@suse.de - make transaction lock --root aware -* Mon Dec 19 2005 - mls@suse.de +* Mon Dec 19 2005 mls@suse.de - don't ignore getcwd return value in build.c -* Mon Dec 19 2005 - mls@suse.de +* Mon Dec 19 2005 mls@suse.de - fix find-lang.sh script -* Sun Dec 18 2005 - mls@suse.de +* Sun Dec 18 2005 mls@suse.de - fix find-debuginfo script -* Sun Dec 18 2005 - mls@suse.de +* Sun Dec 18 2005 mls@suse.de - don't assume root:root defattr -* Sun Dec 18 2005 - agruen@suse.de +* Sun Dec 18 2005 agruen@suse.de - fix wrong buildsubdir macro name -* Thu Dec 15 2005 - mls@suse.de +* Thu Dec 15 2005 mls@suse.de - update to version 4.4.2 for now without lua, rpc, dav support -* Wed Dec 07 2005 - agruen@suse.de +* Wed Dec 07 2005 agruen@suse.de - Add find-{requires,provides}.ksyms and invoke them from the global find-{requires,provides} scripts. The scripts add "kernel(symbol set) = version" and "kver(symbol) = version" @@ -678,150 +681,150 @@ Authors: kernel symbol sets from /boot/symsets-*.tar.gz. - Add rpmsort script to sort a file into RPM version order. Used in kernel scripts to sort kernel packages by version. -* Tue Nov 22 2005 - ro@suse.de +* Tue Nov 22 2005 ro@suse.de - change NO_BRP_STRIP_DEBUG to NO_DEBUGINFO_STRIP_DEBUG - fix patchrpm code not to modify immutable header parts -* Fri Nov 18 2005 - ro@suse.de +* Fri Nov 18 2005 ro@suse.de - honor NO_BRP_STRIP_DEBUG in find-debuginfo.sh -* Sat Oct 29 2005 - mls@suse.de +* Sat Oct 29 2005 mls@suse.de - use lstat instead of stat when globbing (#129434) - add RPMTAG_PKGID and RPMTAG_HDRID - make python always return requires/provides/obsoletes/conflicts as array -* Mon Oct 24 2005 - ro@suse.de +* Mon Oct 24 2005 ro@suse.de - find-requires/find-provides: fix MONO_PATH -* Thu Oct 20 2005 - ro@suse.de +* Thu Oct 20 2005 ro@suse.de - find-requires/find-provides: update mono hooks -* Wed Sep 07 2005 - matz@suse.de +* Wed Sep 07 2005 matz@suse.de - Make debuginfo packages require exact version of base rpm. -* Fri Sep 02 2005 - mls@suse.de +* Fri Sep 02 2005 mls@suse.de - backport CLOEXEC workaround [#93727] - fix typo in man page [#114909] -* Thu Aug 25 2005 - mls@suse.de +* Thu Aug 25 2005 mls@suse.de - don't catch ignored signals [#74560] - unblock all signals when running scripts -* Mon Aug 22 2005 - mls@suse.de +* Mon Aug 22 2005 mls@suse.de - do not try to mmap zero sized files in domd5() -* Fri Aug 12 2005 - mls@suse.de +* Fri Aug 12 2005 mls@suse.de - change -mcpu to -mtune and add -D_FORTIFY_SOURCE=2 [#104241] -* Wed Aug 03 2005 - mls@suse.de +* Wed Aug 03 2005 mls@suse.de - ignore /media when creating fdilesystem list - allow --ignoresize when erasing packages -* Fri Jul 01 2005 - schwab@suse.de +* Fri Jul 01 2005 schwab@suse.de - Fix ppc assembly syntax. -* Wed Jun 08 2005 - matz@suse.de +* Wed Jun 08 2005 matz@suse.de - add STRIP_KEEP_SYMTAB to find-debuginfo.sh -* Sat May 21 2005 - schwab@suse.de +* Sat May 21 2005 schwab@suse.de - find-debuginfo.sh: make writable before extracting debug info, simplify. -* Thu May 19 2005 - schwab@suse.de +* Thu May 19 2005 schwab@suse.de - Replace absolute symlinks when copying sources for debuginfo package. -* Wed Apr 06 2005 - schwab@suse.de +* Wed Apr 06 2005 schwab@suse.de - Cleanup neededforbuild. -* Wed Apr 06 2005 - meissner@suse.de +* Wed Apr 06 2005 meissner@suse.de - Added gettext-devel -* Tue Apr 05 2005 - bg@suse.de +* Tue Apr 05 2005 bg@suse.de - add noarch to valid hppa architectures -* Thu Mar 24 2005 - uli@suse.de +* Thu Mar 24 2005 uli@suse.de - better ARM support -* Sun Feb 20 2005 - od@suse.de +* Sun Feb 20 2005 od@suse.de - fix debugedit for relocatable files (kernel modules) on ppc -* Fri Feb 18 2005 - mls@suse.de +* Fri Feb 18 2005 mls@suse.de - update debugedit program -* Fri Feb 18 2005 - od@suse.de +* Fri Feb 18 2005 od@suse.de - make find-debuginfo.sh handle kernel modules -* Wed Feb 16 2005 - mls@suse.de +* Wed Feb 16 2005 mls@suse.de - fix --rebuilddb with --root [#50993] -* Fri Feb 11 2005 - mls@suse.de +* Fri Feb 11 2005 mls@suse.de - update to elfutils-0.97 [#47746], [#48471] - update to db-4.2.52 [#44193] - pack brp-symlink -* Fri Feb 11 2005 - ro@suse.de +* Fri Feb 11 2005 ro@suse.de - remove -fsigned-char from rpmrc (#49877) -* Sat Feb 05 2005 - schwab@suse.de +* Sat Feb 05 2005 schwab@suse.de - Fix building with gcc 4. -* Fri Feb 04 2005 - mls@suse.de +* Fri Feb 04 2005 mls@suse.de - make python-2.4 work [#49990] - fix --setguids / --setperms [#47122] - makd gpgv4 signatures work [#42282] - add brp-symlink [#49596] -* Fri Feb 04 2005 - ro@suse.de +* Fri Feb 04 2005 ro@suse.de - fix one regexp in find_lang change -* Thu Feb 03 2005 - ro@suse.de +* Thu Feb 03 2005 ro@suse.de - hppa may install noarch -* Wed Feb 02 2005 - schwab@suse.de +* Wed Feb 02 2005 schwab@suse.de - Remove compatibility provides on ia64. -* Mon Jan 31 2005 - adrian@suse.de +* Mon Jan 31 2005 adrian@suse.de - handle also ??_?? languages in %%find_lang. -* Fri Jan 28 2005 - coolo@suse.de +* Fri Jan 28 2005 coolo@suse.de - let the debuginfo packages work again -* Fri Jan 21 2005 - skh@suse.de +* Fri Jan 21 2005 skh@suse.de - changed jpackage macros -* Fri Jan 21 2005 - coolo@suse.de +* Fri Jan 21 2005 coolo@suse.de - use binutils for debuginfo packages -* Fri Jan 14 2005 - coolo@suse.de +* Fri Jan 14 2005 coolo@suse.de - name the debug package -debuginfo to sync with redhat/fedora -* Mon Dec 13 2004 - sndirsch@suse.de +* Mon Dec 13 2004 sndirsch@suse.de - moved chinese popt mo file to correct directory (Bug #47262) -* Fri Dec 03 2004 - mls@suse.de +* Fri Dec 03 2004 mls@suse.de - fix update of rpm with same name/version/release but different architecture -* Thu Nov 25 2004 - ro@suse.de +* Thu Nov 25 2004 ro@suse.de - fix build with python-2.4 -* Tue Nov 16 2004 - ro@suse.de +* Tue Nov 16 2004 ro@suse.de - update permissions handling -* Tue Oct 19 2004 - ro@suse.de +* Tue Oct 19 2004 ro@suse.de - locale rename: no -> nb -* Mon Sep 27 2004 - mls@suse.de +* Mon Sep 27 2004 mls@suse.de - move TE type initializaten before the addTE call to make relocations work [#34871, #43557] -* Fri Sep 24 2004 - mls@suse.de +* Fri Sep 24 2004 mls@suse.de - check payloadformat for "cpio", print extra deltarpm message - don't skip directories in the fingerprint check when deleting rpms -* Thu Sep 23 2004 - mls@suse.de +* Thu Sep 23 2004 mls@suse.de - allow database read access in scripts -* Wed Sep 22 2004 - mls@suse.de +* Wed Sep 22 2004 mls@suse.de - only retry locking if errno is EAGAIN [#45704] -* Fri Sep 17 2004 - mls@suse.de +* Fri Sep 17 2004 mls@suse.de - fix isSpecfile fix - reset SIGILL handler in RPMClass() -* Mon Sep 13 2004 - mls@suse.de +* Mon Sep 13 2004 mls@suse.de - glob.h: add workaround for invalid prototypes -* Thu Sep 09 2004 - mls@suse.de +* Thu Sep 09 2004 mls@suse.de - fix jpackage macros - change binary payload compression to w9.bzdio - fix localization of query results [#38474] - delete unmaintained cpanflute scripts [#39988] - patch isSpecfile to be less restrictive [#40328] - wait up to 3 minutes for the package lock [#40961] -* Thu Sep 02 2004 - mls@suse.de +* Thu Sep 02 2004 mls@suse.de - add jpackage macros -* Fri Aug 06 2004 - mls@suse.de +* Fri Aug 06 2004 mls@suse.de - make it build with new automake -* Wed Jun 23 2004 - mls@suse.de +* Wed Jun 23 2004 mls@suse.de - add support for mono provides/requires autodetection. limited to *.exe and *.dll for now. -* Sun May 23 2004 - schwab@suse.de +* Sun May 23 2004 schwab@suse.de - Don't record timestamp in compressed manpages. -* Thu Apr 22 2004 - mls@suse.de +* Thu Apr 22 2004 mls@suse.de - add DISABLE_RESTART_ON_UPDATE and DISABLE_STOP_ON_REMOVAL sysconfig variables -* Mon Apr 19 2004 - mls@suse.de +* Mon Apr 19 2004 mls@suse.de - go back to libpopt.so.0.0.0 - also create and pack libpopt.so.1.0.0 for compatibility -* Wed Mar 31 2004 - uli@suse.de +* Wed Mar 31 2004 uli@suse.de - added detection of i686-capable Transmeta Crusoe that reports as being i586 (bug #37713). This patch is necessary because YaST (rightfully) tries to install an i686 glibc on machines with this CPU, but RPM refuses to do so -> BOOM. This patch is safe because it only uses cpuid functions already used earlier in RPMClass() and does not do anything if the CPU identification string does not end in "ineTMx86". -* Wed Mar 31 2004 - ke@suse.de +* Wed Mar 31 2004 ke@suse.de - remove broken german translation file [#30665], -* Fri Mar 26 2004 - mls@suse.de +* Fri Mar 26 2004 mls@suse.de - use the system's zlib, fixes python segfault [#36810] -* Sun Mar 21 2004 - aj@suse.de +* Sun Mar 21 2004 aj@suse.de - Work around lvalue used as cast problems. -* Thu Mar 18 2004 - mls@suse.de +* Thu Mar 18 2004 mls@suse.de - convert query results to locale encoding [#28347] - don't check provides if filename doesn't contain '/' [#32078] - allow interrups if database is RDONLY [#33026] @@ -830,342 +833,342 @@ Authors: - remove bogus entries from .la files [#36346] - add _docdir_fmt macro to make it possible to create rpms for other distributions -* Sat Mar 06 2004 - ro@suse.de +* Sat Mar 06 2004 ro@suse.de - readd lost patch hunk from last change: set docdir default back to .../packages/%%name (w/o version) -* Fri Mar 05 2004 - mls@suse.de +* Fri Mar 05 2004 mls@suse.de - backport some fixes from rpm-4.2 - match py_libdir macro definition with python - clean and re-create buildroot in a safe way -* Sat Feb 28 2004 - schwab@suse.de +* Sat Feb 28 2004 schwab@suse.de - Remove anchor from pattern in find-requires. -* Fri Feb 27 2004 - schwab@suse.de +* Fri Feb 27 2004 schwab@suse.de - Silence error from find. -* Fri Feb 27 2004 - mls@suse.de +* Fri Feb 27 2004 mls@suse.de - fix definition of _initrddir - set sysconfdir to /etc - set localstatedir to /var -* Thu Feb 26 2004 - schwab@suse.de +* Thu Feb 26 2004 schwab@suse.de - Handle more cases of filenames with spaces. -* Thu Feb 26 2004 - ro@suse.de +* Thu Feb 26 2004 ro@suse.de - some fixes in linux.prov to survive filenames with spaces -* Thu Feb 12 2004 - mls@suse.de +* Thu Feb 12 2004 mls@suse.de - fixed linux.req soname generation (#21664) - disable nptl for now -* Mon Feb 09 2004 - kukuk@suse.de +* Mon Feb 09 2004 kukuk@suse.de - linux.req: Fix finding of interpreters -* Sat Feb 07 2004 - olh@suse.de +* Sat Feb 07 2004 olh@suse.de - disable redhat's uname hack for ppc -* Thu Feb 05 2004 - ro@suse.de +* Thu Feb 05 2004 ro@suse.de - linux.prov: don't block soname in versioned-requires - linux.req: disable perl-requires, it's broken -* Tue Feb 03 2004 - schwab@suse.de +* Tue Feb 03 2004 schwab@suse.de - Readd ia64 64bit provides hack. -* Tue Feb 03 2004 - kukuk@suse.de +* Tue Feb 03 2004 kukuk@suse.de - Remove all special find-requires scripts and use the default one -* Sat Jan 17 2004 - schwab@suse.de +* Sat Jan 17 2004 schwab@suse.de - Filter out linux-gate.so. -* Thu Jan 15 2004 - schwab@suse.de +* Thu Jan 15 2004 schwab@suse.de - For ia64 require 64bit symbols and provide them both with and without 64bit. -* Tue Jan 13 2004 - adrian@suse.de +* Tue Jan 13 2004 adrian@suse.de - call ldconfig - add missing Requires in -devel packages - add %%defattr -* Fri Jan 09 2004 - kukuk@suse.de +* Fri Jan 09 2004 kukuk@suse.de - Coompile with "-fno-strict-aliasing" -* Fri Nov 14 2003 - bg@suse.de +* Fri Nov 14 2003 bg@suse.de - added changes for hppa - fix build for hppa -* Fri Oct 10 2003 - sf@suse.de +* Fri Oct 10 2003 sf@suse.de - added alias 'amd64' for 'x86_64' -* Fri Oct 10 2003 - ro@suse.de +* Fri Oct 10 2003 ro@suse.de - ignore "linux-gate.so" in ldd output (on 2.6 systems) -* Wed Oct 08 2003 - schwab@suse.de +* Wed Oct 08 2003 schwab@suse.de - Add popt to prerequires for rpm. -* Tue Sep 23 2003 - mls@suse.de +* Tue Sep 23 2003 mls@suse.de - really disable rpmconfigcheck -* Sat Sep 20 2003 - kukuk@suse.de +* Sat Sep 20 2003 kukuk@suse.de - Don't enable rpmconfigcheck per default -* Fri Sep 19 2003 - schwab@suse.de +* Fri Sep 19 2003 schwab@suse.de - Fix descriptor leak [#31450]. -* Mon Sep 15 2003 - mls@suse.de +* Mon Sep 15 2003 mls@suse.de - remove redhat options from popt (#30302) - check name and arch to find out if two packages are the same -* Fri Sep 05 2003 - mls@suse.de +* Fri Sep 05 2003 mls@suse.de - fix rpmalMakeIndex and off by one error in rpmalAllSatisfiesDepend -* Fri Sep 05 2003 - mls@suse.de +* Fri Sep 05 2003 mls@suse.de - use mkstemp in build.c - fix --noghost query option -* Fri Sep 05 2003 - mls@suse.de +* Fri Sep 05 2003 mls@suse.de - escape '+' in MIRE_DEFAULT iterator - use MIRE_STRCMP when going for an exact match - update rpmrc -* Wed Sep 03 2003 - mls@suse.de +* Wed Sep 03 2003 mls@suse.de - speed up installation by making nofsync local and setting it for all databases but Packages - fix database locking issue (#29407) - don't open temporary databases in chroot case (may fix #29584) -* Mon Sep 01 2003 - schwab@suse.de +* Mon Sep 01 2003 schwab@suse.de - Fix assembler routines to not clobber predicate registers. -* Fri Aug 29 2003 - mcihar@suse.cz +* Fri Aug 29 2003 mcihar@suse.cz - rpm-python require same python version as it was built with -* Fri Aug 22 2003 - mls@suse.de +* Fri Aug 22 2003 mls@suse.de - make usage of / in post section consistent - don't force the activation of rpmconfigcheck -* Tue Aug 05 2003 - coolo@suse.de +* Tue Aug 05 2003 coolo@suse.de - give libpopt a soname > 0 as it's not compatible to the libpopt on SL 8.2 (now that we link shared, it does matter) -* Fri Aug 01 2003 - mls@suse.de +* Fri Aug 01 2003 mls@suse.de - fix segfault in rpmdbFindByFile -* Thu Jul 31 2003 - mls@suse.de +* Thu Jul 31 2003 mls@suse.de - added directory tagging to speed up installation/updates -* Tue Jul 29 2003 - mls@suse.de +* Tue Jul 29 2003 mls@suse.de - add support for patch-rpms - fix --root option (#28266) - fix erase exit status (#28267) - fix database open ignoring locks the second time -* Fri Jul 11 2003 - mls@suse.de +* Fri Jul 11 2003 mls@suse.de - add perl_vendorlib and perl_vendorarch - integrate patches -* Tue Jul 01 2003 - coolo@suse.de +* Tue Jul 01 2003 coolo@suse.de - update find-debuginfo.sh to fix permissions of copied files - give warning on already stripped files -* Fri Jun 27 2003 - schwab@suse.de +* Fri Jun 27 2003 schwab@suse.de - Fix configure scripts. - Don't link rpm statically. -* Fri Jun 20 2003 - kukuk@suse.de +* Fri Jun 20 2003 kukuk@suse.de - use -fPIC, not -fpic to compile elfutils -* Thu Jun 19 2003 - ro@suse.de +* Thu Jun 19 2003 ro@suse.de - fix build (gettext and definition of mkinstalldirs) -* Mon Jun 16 2003 - kukuk@suse.de +* Mon Jun 16 2003 kukuk@suse.de - Don't call find on /usr/share/locale if directory does not exist. -* Sat Jun 14 2003 - coolo@suse.de +* Sat Jun 14 2003 coolo@suse.de - avoid stale links in /usr/src/debug -* Fri Jun 13 2003 - mls@suse.de +* Fri Jun 13 2003 mls@suse.de - make PreReqs work again if --nodeps is used - fix rpmconfigcheck - apply find-debuginfo.sh patch from coolo -* Thu Jun 12 2003 - kukuk@suse.de +* Thu Jun 12 2003 kukuk@suse.de - Fix find-lang.sh (special /usr/share/locale handling) -* Thu Jun 12 2003 - coolo@suse.de +* Thu Jun 12 2003 coolo@suse.de - enhancing find-lang.sh to take KDE/GNOME into account and label them correctly -* Wed Jun 11 2003 - kukuk@suse.de +* Wed Jun 11 2003 kukuk@suse.de - Remove translated manual pages -* Fri Jun 06 2003 - mls@suse.de +* Fri Jun 06 2003 mls@suse.de - fix vendor for s390/s390x -* Thu Jun 05 2003 - mls@suse.de +* Thu Jun 05 2003 mls@suse.de - no longer build rpm static - add --fileclass and --filecolor macros to rpmpopt -* Thu Jun 05 2003 - ro@suse.de +* Thu Jun 05 2003 ro@suse.de - remove dangling rpmpopt symlink -* Mon Jun 02 2003 - mls@suse.de +* Mon Jun 02 2003 mls@suse.de - convertdb1: call providePackageNVR to retrofit "Provide: name = EVR" into converted headers -* Fri May 23 2003 - ro@suse.de +* Fri May 23 2003 ro@suse.de - fixed brp-compress to convert bzip2 man pages into gziped ones (even if hardlinked). (#21121) (from ma) -* Fri May 16 2003 - mls@suse.de +* Fri May 16 2003 mls@suse.de - fixed x86_64 build -* Thu May 15 2003 - mls@suse.de +* Thu May 15 2003 mls@suse.de - update to rpm-4.1.1 -* Tue May 13 2003 - mls@suse.de +* Tue May 13 2003 mls@suse.de - don't obsolete own package when refreshing - fix parsing of nested conditionals (again) -* Tue May 13 2003 - mls@suse.de +* Tue May 13 2003 mls@suse.de - created rpm-python subpackage - fix check-files/fixowner, second try -* Mon May 12 2003 - mls@suse.de +* Mon May 12 2003 mls@suse.de - fix check-files to work without buildroot -* Mon May 12 2003 - mls@suse.de +* Mon May 12 2003 mls@suse.de - re-activate fixowner/group/perms - allow /usr/share/info/dir in check-files - fix 'head -n 1' in /usr/lib/rpm/find-requires -* Thu May 08 2003 - mls@suse.de +* Thu May 08 2003 mls@suse.de - update to rpm-4.1 -* Mon Apr 07 2003 - ro@suse.de +* Mon Apr 07 2003 ro@suse.de - fix for new head(1) syntax -* Mon Mar 10 2003 - mls@suse.de +* Mon Mar 10 2003 mls@suse.de - fix exit status if file to be installed is not a rpm package -* Fri Feb 28 2003 - mls@suse.de +* Fri Feb 28 2003 mls@suse.de - use mkstemp instead of tempnam (#24478) -* Thu Feb 20 2003 - ma@suse.de +* Thu Feb 20 2003 ma@suse.de - Work arround rpm2cpio wrongly reporting an error, if the rpm file is read from stdin. (#16800) -* Mon Feb 17 2003 - mls@suse.de +* Mon Feb 17 2003 mls@suse.de - made rpmconfigcheck add new files to /var/log/update-messages -* Fri Feb 14 2003 - schwab@suse.de +* Fri Feb 14 2003 schwab@suse.de - Save errno inside Fclose, its return value is never checked anyway. -* Fri Feb 14 2003 - pthomas@suse.de +* Fri Feb 14 2003 pthomas@suse.de - find-provides for elf64 systems used to omit symbol versions if they contained the soname, fixed by find_provides_soname.diff. -* Wed Feb 12 2003 - mls@suse.de +* Wed Feb 12 2003 mls@suse.de - removed runlevels '1' and 'S' from rpmconfigcheck -* Fri Feb 07 2003 - mls@suse.de +* Fri Feb 07 2003 mls@suse.de - speed up rpmconfigcheck by just checking the old conflicts if no rpm was installed - rerun gpg if gpg fails with "option file created" - set LC_ALL to C before calling gpg -* Tue Jan 28 2003 - kukuk@suse.de +* Tue Jan 28 2003 kukuk@suse.de - Remove wrong Provides "rpm-devel" and "rpm-python" from Provides -* Sun Jan 26 2003 - olh@suse.de +* Sun Jan 26 2003 olh@suse.de - the official arch_canon value for ppc64 is 16, not 5 -* Thu Jan 16 2003 - ma@suse.de +* Thu Jan 16 2003 ma@suse.de - update subpackage popt to 1.6.4 -* Thu Dec 19 2002 - schwab@suse.de +* Thu Dec 19 2002 schwab@suse.de - Update autogen patch. -* Mon Nov 18 2002 - stepan@suse.de +* Mon Nov 18 2002 stepan@suse.de - add m68k as chanonical architecture to configure.in -* Mon Nov 18 2002 - ro@suse.de +* Mon Nov 18 2002 ro@suse.de - adapt to latest autoconf - use host instead of host_alias for %%host_alias since the latter is not set -* Mon Nov 11 2002 - ma@suse.de +* Mon Nov 11 2002 ma@suse.de - let linux.prov list vrsion definitions in libraries/plugins without soname. (find_provides.diff) (#21664) -* Fri Oct 25 2002 - sf@suse.de +* Fri Oct 25 2002 sf@suse.de - corrected %%_libdir-macro (rpm-3.0.6-platform.diff) -* Mon Oct 21 2002 - schwab@suse.de +* Mon Oct 21 2002 schwab@suse.de - Fix read beyond EOS. -* Mon Oct 07 2002 - ro@suse.de +* Mon Oct 07 2002 ro@suse.de - fixed brp-compress script for current fileutils (add LC_TIME=POSIX, this bug lead to broken tcl man pages) -* Wed Oct 02 2002 - mls@suse.de +* Wed Oct 02 2002 mls@suse.de - update unpatched files in patchrpms even if --nodeps is used [Bug #20418] -* Sat Aug 24 2002 - ro@suse.de +* Sat Aug 24 2002 ro@suse.de - fix popt-devel requires -* Sun Aug 18 2002 - olh@suse.de +* Sun Aug 18 2002 olh@suse.de - adding -mminimal-toc to each package is a boring job use it per default on ppc64 -* Thu Aug 15 2002 - kukuk@suse.de +* Thu Aug 15 2002 kukuk@suse.de - Add insserv PreRequires [Bug #17969] -* Mon Aug 12 2002 - bk@suse.de +* Mon Aug 12 2002 bk@suse.de - rpmrc/s390{,x}: change dummy -fomit-frame-pointer to -fsigned-char -* Sat Aug 10 2002 - schwab@suse.de +* Sat Aug 10 2002 schwab@suse.de - Make ia64 arch_compat to i686. -* Sat Aug 10 2002 - kukuk@suse.de +* Sat Aug 10 2002 kukuk@suse.de - Fix version number of popt-devel -* Fri Aug 09 2002 - kukuk@suse.de +* Fri Aug 09 2002 kukuk@suse.de - Fix typo -* Fri Aug 09 2002 - kukuk@suse.de +* Fri Aug 09 2002 kukuk@suse.de - Fix requires of rpm-devel and popt-devel -* Fri Aug 09 2002 - ro@suse.de +* Fri Aug 09 2002 ro@suse.de - adapt automake version in configure -* Fri Jul 26 2002 - mls@suse.de +* Fri Jul 26 2002 mls@suse.de - Added perl/python macros from conectiva -* Fri Jul 26 2002 - kukuk@suse.de +* Fri Jul 26 2002 kukuk@suse.de - Create rpm-devel and popt-devel subpackages [Bug #17225] -* Fri Jul 26 2002 - kukuk@suse.de +* Fri Jul 26 2002 kukuk@suse.de - Change Requires for suse-build-key to build-key -* Thu Jul 25 2002 - mls@suse.de +* Thu Jul 25 2002 mls@suse.de - renamed rpmconfigscan to rpmconfigcheck - fixed elf64-linux.req to ignore scripts without #! - disabled tag check in rpmdbFindByFile, too dangerous -* Thu Jul 18 2002 - mls@suse.de +* Thu Jul 18 2002 mls@suse.de - fixed double free of header if the postinstall script failed - return exit status when doing --initdb -* Thu Jul 11 2002 - mls@suse.de +* Thu Jul 11 2002 mls@suse.de - use "officially reserved" value of RPMFILE_UNPATCHED - added rpmconfigcheck script to search for unresolved config file changes -* Mon Jul 08 2002 - mls@suse.de +* Mon Jul 08 2002 mls@suse.de - new version of patchrpm diff: handle patch "freshen" operations gracefully - documented patchrpm options - taggedindex diff: add directory tags to the fileindex to speed up file conflict detection -* Tue Jul 02 2002 - ke@suse.de +* Tue Jul 02 2002 ke@suse.de - Update German program messages using translations by Christian Kirsch. Add as Source7; drop Patch19 [# 8442]. -* Fri Jun 21 2002 - ro@suse.de +* Fri Jun 21 2002 ro@suse.de - automake is 1.6.2 -* Wed Jun 12 2002 - bk@suse.de +* Wed Jun 12 2002 bk@suse.de - ppc: fix arch for elf64.prov and elf64.req to powerpc(from olh) - s390x: fix brp-lib64-linux to ignore */lib/ld64.so.1 in lib check - remove obsolete x64_64 scripts, replaced by generic elf64 scripts - rpm-3.0.6.pkg_build.diff: remove obsolete diff for sparc-linux.req -* Fri May 31 2002 - olh@suse.de +* Fri May 31 2002 olh@suse.de - remove ppc64 hack -* Mon May 27 2002 - bk@suse.de +* Mon May 27 2002 bk@suse.de - all lib64 platforms use the same brp, req and prov scripts now. - merge mips diff to not include private flags into linux.req.suse - merge last rpm-3.0.6-s390x-lib64.diff into rpm-3.0.6.config.diff - add (64bit) fix for empty soname in elf64.prov from sles7-s390x -* Fri May 17 2002 - olh@suse.de +* Fri May 17 2002 olh@suse.de - add more ppc64 changes, add brp-ppc64-linux - apply mips, x86_64 and s390x patches on all archs - rpm-3.0.6.lib64.diff: merged all lib64 stuff and add SUBSTS macros for uname->target_cpu handling on ppc64, s390 and x86_64 -* Wed May 15 2002 - ro@suse.de +* Wed May 15 2002 ro@suse.de - update brp-x86_64-linux -* Wed May 15 2002 - mfabian@suse.de +* Wed May 15 2002 mfabian@suse.de - fix ja.po, it contained some junk which caused mojibake on output, especially in ja_JP.UTF-8 locale. Remove a lot of fuzzies which had correct translations. -* Mon May 13 2002 - olh@suse.de +* Mon May 13 2002 olh@suse.de - do not translate ppc64 to ppc anymore -* Fri Apr 26 2002 - sf@suse.de +* Fri Apr 26 2002 sf@suse.de - fixed brp-x86_64-linux script - added *.a-files to brp-script - look _only_ for files or links with names *.a, *.so* - added /opt/gnome/lib and /opt/kde/lib -* Wed Apr 24 2002 - sf@suse.de +* Wed Apr 24 2002 sf@suse.de - added script to show requires and provides with 64 bit (like s390 and sparc64) - rpm will now stop (on x86_64) if a 64-bit binary (or a link to one) is found in $RPM_BUILD_ROOT{, /usr, /usr/X11R6}/lib -* Wed Apr 24 2002 - ke@suse.de +* Wed Apr 24 2002 ke@suse.de - patch19: Fix 1 german message (3 strings) in de.po [# 8442]. -* Mon Apr 22 2002 - kukuk@suse.de +* Mon Apr 22 2002 kukuk@suse.de - Remove broken s390x try to fix lib64 library location -* Thu Apr 18 2002 - kukuk@suse.de +* Thu Apr 18 2002 kukuk@suse.de - x86_64 can also build noarch packages -* Wed Apr 17 2002 - sf@suse.de +* Wed Apr 17 2002 sf@suse.de - install i386-rpms on x86_64 - patch65 only, if not on s390x (doesn't apply) - patch to build with new automake (ro) -* Fri Apr 12 2002 - kukuk@suse.de +* Fri Apr 12 2002 kukuk@suse.de - Don't apply s390x 64bit hacks on sparc64, sparc64 has a working libtool -* Thu Apr 11 2002 - mls@suse.de +* Thu Apr 11 2002 mls@suse.de - fixed bug in patchrpm case that prevented the reuse of old timestamps in unpatched files in some cases - fixed patchrpm dependency failure message -* Wed Apr 10 2002 - sf@suse.de +* Wed Apr 10 2002 sf@suse.de - added x86_64 architecture - added --libdir to autogen.sh to copy the libs depending on architecture (lib / lib64) -* Fri Mar 29 2002 - schwab@suse.de +* Fri Mar 29 2002 schwab@suse.de - Fix for new autotools. -* Fri Mar 22 2002 - mls@suse.de +* Fri Mar 22 2002 mls@suse.de - added rpmqpack program to speed up susehelp -* Wed Mar 20 2002 - ro@suse.de +* Wed Mar 20 2002 ro@suse.de - modified config.diff for currently used optflags (#15123) -* Mon Mar 18 2002 - schwab@suse.de +* Mon Mar 18 2002 schwab@suse.de - Don't lose errno. -* Mon Mar 11 2002 - mls@suse.de +* Mon Mar 11 2002 mls@suse.de - use gpg --keyring when checking keys with uid != 0 - use hardcoded keyring path if _gpg_path is not set and uid == 0 - removed _gpg_path from suse_macros -* Sat Mar 09 2002 - bk@suse.de +* Sat Mar 09 2002 bk@suse.de - brp-s390x-linux: merge lib64 fix: patch .la files when moving -* Fri Mar 08 2002 - ma@suse.de +* Fri Mar 08 2002 ma@suse.de - introduced x86_64 architecture in rpmrc (#14110) -* Fri Mar 08 2002 - mls@suse.de +* Fri Mar 08 2002 mls@suse.de - backported rpm4 fix to get mtime right on s390x -* Mon Feb 25 2002 - mls@suse.de +* Mon Feb 25 2002 mls@suse.de - added patchrpm support - changed rpm -qi to include the distribution -* Thu Feb 21 2002 - schwab@suse.de +* Thu Feb 21 2002 schwab@suse.de - Fix to build with new gettext. -* Mon Feb 18 2002 - ro@suse.de +* Mon Feb 18 2002 ro@suse.de - added requires for suse-build-key -* Mon Feb 11 2002 - ro@suse.de +* Mon Feb 11 2002 ro@suse.de - tar option for bz2 is now "j" (re-added) -* Mon Feb 11 2002 - ma@suse.de +* Mon Feb 11 2002 ma@suse.de - unk_ugname_cached.diff: Upon building a package, unpacking sources by calling tar from the spec file, may lead to files with unknown user/group names. If those files are to be included in the final @@ -1176,260 +1179,260 @@ Authors: should, it's considered broken. Unknown user/group names lead to NULL entries in rpms user/group name cache, which may cause a segmentation fault on cache lookup. This has been fixed. -* Sat Jan 26 2002 - ro@suse.de +* Sat Jan 26 2002 ro@suse.de - apply configure-diff also on s390x -* Mon Jan 21 2002 - bk@suse.de +* Mon Jan 21 2002 bk@suse.de - use RPM_OPT_FLAGS for compilation - add lib64 support for s390x - update srcdir-supplied rpm-suse_macros file to newest version adds: %%_lib handling for ltconfig/-main and macro suse_update_libdir - sparc64 and s390x: call scripts/brp-%%_arch-linux at the end of install -* Wed Jan 16 2002 - schwab@suse.de +* Wed Jan 16 2002 schwab@suse.de - Fix parsing of nested conditionals. -* Wed Jan 02 2002 - schwab@suse.de +* Wed Jan 02 2002 schwab@suse.de - Remove wrong assertion. -* Tue Dec 18 2001 - adrian@suse.de +* Tue Dec 18 2001 adrian@suse.de - fix find-requires for objdump with private flags finaly -* Mon Dec 17 2001 - adrian@suse.de +* Mon Dec 17 2001 adrian@suse.de - apply mips patch only on mips architecture - fix mips patch -* Sun Dec 16 2001 - adrian@suse.de +* Sun Dec 16 2001 adrian@suse.de - fix find-requires script for mips ( do not include private flags from objdump to dependencies ) -* Wed Dec 05 2001 - schwab@suse.de +* Wed Dec 05 2001 schwab@suse.de - Use optind = 0 to reset getopt in glibc. -* Mon Dec 03 2001 - schwab@suse.de +* Mon Dec 03 2001 schwab@suse.de - Fix another endian bug due to pointer mismatch. -* Thu Nov 22 2001 - mls@suse.de +* Thu Nov 22 2001 mls@suse.de - reset getopt in grabArgs() macro expansion -* Thu Nov 15 2001 - ma@suse.de +* Thu Nov 15 2001 ma@suse.de - Fixed: copyFile() in rpmchecksig didn't recognize 'No space left on device' condition, when creating tempfiles. rpm reported that the signature was not ok instead. (#12294) -* Thu Nov 08 2001 - adrian@suse.de +* Thu Nov 08 2001 adrian@suse.de - name mips big endian as "mips" instead of "mipseb" this is compatible to all GNU tools and to the SGI distribution -* Sat Nov 03 2001 - ro@suse.de +* Sat Nov 03 2001 ro@suse.de - accept automake 1.5 (still needs depcomp added) -* Tue Sep 04 2001 - schwab@suse.de +* Tue Sep 04 2001 schwab@suse.de - Accept libtool 1.4.1. -* Fri Aug 17 2001 - ro@suse.de +* Fri Aug 17 2001 ro@suse.de - Exclude /usr/share/doc from Requires -* Sat Jul 21 2001 - schwab@suse.de +* Sat Jul 21 2001 schwab@suse.de - Adapt for autoconf 2.52. - Allow libtool version suffix. -* Tue Jul 03 2001 - kukuk@suse.de +* Tue Jul 03 2001 kukuk@suse.de - Fix typo in last change -* Mon Jul 02 2001 - ma@suse.de +* Mon Jul 02 2001 ma@suse.de - Change -m486 to -mcpu=i486 in optflags -* Wed Jun 20 2001 - ma@suse.de +* Wed Jun 20 2001 ma@suse.de - Don't define popt version via macro. Abuild does not like it (#8224). - Patches for rpmrc.in (ia64.dif,ppc64.rpmrc.diff) incorporated into config.diff. - Patches for brp scripts (strip_no_lib.dif) and sparc64-linux.{req,prov} scripts (sparc64.dif) incorporated into pkg_build.diff. -* Wed Jun 13 2001 - bk@suse.de +* Wed Jun 13 2001 bk@suse.de - rpm-3.0.6.config.diff: add s390x support -* Mon Jun 11 2001 - olh@suse.de +* Mon Jun 11 2001 olh@suse.de - add ppc64 diff -* Fri Jun 08 2001 - schwab@suse.de +* Fri Jun 08 2001 schwab@suse.de - Fix endian bugs. -* Mon Jun 04 2001 - kukuk@suse.de +* Mon Jun 04 2001 kukuk@suse.de - Fix requires/provides scripts for sparc64 -* Fri Jun 01 2001 - schwab@suse.de +* Fri Jun 01 2001 schwab@suse.de - Fix for new configure tools. -* Wed May 09 2001 - mfabian@suse.de +* Wed May 09 2001 mfabian@suse.de - bzip2 sources -* Thu May 03 2001 - ma@suse.de +* Thu May 03 2001 ma@suse.de - provides script shouldn't block soname as version -* Tue May 01 2001 - kukuk@suse.de +* Tue May 01 2001 kukuk@suse.de - modify spec file for sparc64 -* Thu Apr 12 2001 - ro@suse.de +* Thu Apr 12 2001 ro@suse.de - gettextize to compile with new gettext -* Fri Apr 06 2001 - kukuk@suse.de +* Fri Apr 06 2001 kukuk@suse.de - Make some changes to the changes entries so rpm likes it again -* Thu Mar 29 2001 - ro@suse.de +* Thu Mar 29 2001 ro@suse.de - provides/requires script: add "-n200" to xargs arguments -* Mon Feb 26 2001 - ro@suse.de +* Mon Feb 26 2001 ro@suse.de - no optimization for alpha for now ... -* Wed Feb 14 2001 - ma@suse.de +* Wed Feb 14 2001 ma@suse.de - Fix rpmio (unknown type off64_t) with glibc >= 2.2 - Fix configure.in to recognize SuSE as platform specific vendor -* Tue Feb 06 2001 - ro@suse.de +* Tue Feb 06 2001 ro@suse.de - popt: include float.h to make it compile -* Wed Jan 17 2001 - schwab@suse.de +* Wed Jan 17 2001 schwab@suse.de - Mark ia64 as compatible to i386. -* Mon Jan 08 2001 - ma@suse.de +* Mon Jan 08 2001 ma@suse.de - fixed previous fix (error occuring outside %%doc was lost) -* Sat Jan 06 2001 - ma@suse.de +* Sat Jan 06 2001 ma@suse.de - fixed rpm does not abort build if %%doc file is missing (#503) -* Mon Nov 27 2000 - ma@suse.de +* Mon Nov 27 2000 ma@suse.de - wrongly free() after alloca() fixed -* Thu Nov 23 2000 - bk@suse.de +* Thu Nov 23 2000 bk@suse.de - removed old s390 hack(not needed-breaks with new rpm and glibc) -* Tue Nov 14 2000 - ro@suse.de +* Tue Nov 14 2000 ro@suse.de - added patch not to strip all shared libs and files with "/lib/modules/" in path -* Fri Nov 03 2000 - ma@suse.de +* Fri Nov 03 2000 ma@suse.de - let 'rpm -e --root ..' remove files/dirs chroot. -* Wed Oct 25 2000 - ma@suse.de +* Wed Oct 25 2000 ma@suse.de - update subpackage popt to 1.6 -* Tue Oct 17 2000 - ma@suse.de +* Tue Oct 17 2000 ma@suse.de - fixed missing libpopt.so in popt subpackage -* Fri Oct 06 2000 - ma@suse.de +* Fri Oct 06 2000 ma@suse.de - update to 3.0.6 -* Fri Sep 29 2000 - schwab@suse.de +* Fri Sep 29 2000 schwab@suse.de - Fix last change to stay compatible with glibc < 2.2. -* Fri Sep 29 2000 - schwab@suse.de +* Fri Sep 29 2000 schwab@suse.de - Fix libio cookie function pointer clash in rpmio. -* Fri Jul 28 2000 - ma@suse.de +* Fri Jul 28 2000 ma@suse.de - update to 3.0.5 (handles RPM v4 packages) - ia64/s309 patches incorporated -* Wed Jul 26 2000 - ma@suse.de +* Wed Jul 26 2000 ma@suse.de - ignore chown() errors eg. if files are installed on a DOS partition -* Fri Jul 14 2000 - ma@suse.de +* Fri Jul 14 2000 ma@suse.de - fixed: ignore dependencies below /usr/share/doc. - rpmrc: synced s390 entries with those in rpm-4.0. -* Mon Jun 26 2000 - bk@suse.de +* Mon Jun 26 2000 bk@suse.de - build static on s390 too. -* Fri May 26 2000 - schwab@suse.de +* Fri May 26 2000 schwab@suse.de - For for new libbz2 API. -* Thu May 18 2000 - kasal@suse.de +* Thu May 18 2000 kasal@suse.de - hope now rpm-3.0.4-macro-grabArgs.patch works -* Wed May 17 2000 - kasal@suse.cz +* Wed May 17 2000 kasal@suse.cz - fixed a typo in rpm-3.0.4-macro-grabArgs.patch (c=='?') - fixed a problem when ifarch someother define macro sometext endif defined macro anyway -* Tue May 16 2000 - kasal@suse.cz +* Tue May 16 2000 kasal@suse.cz - fixed the bug with {?suse_update_config:%%{suse_update_config -f}} -* Fri May 12 2000 - schwab@suse.de +* Fri May 12 2000 schwab@suse.de - Make ia64 compatible with noarch. -* Wed Apr 26 2000 - ma@suse.de +* Wed Apr 26 2000 ma@suse.de - updated 3.0.4, removed obsolete patches, builds on libc5 -* Fri Apr 14 2000 - ma@suse.de +* Fri Apr 14 2000 ma@suse.de - Update for RPM-HOWTO - Fix in config.diff (use Makefile.am not Makefile.in) -* Mon Apr 10 2000 - schwab@suse.de +* Mon Apr 10 2000 schwab@suse.de - Fix config patch. -* Thu Apr 06 2000 - bk@suse.de +* Thu Apr 06 2000 bk@suse.de - added /lib/libpopt.so* to filelist on s390 -* Wed Apr 05 2000 - bk@suse.de +* Wed Apr 05 2000 bk@suse.de - uses autoconf and automake now - added /lib/libbz2.so* and /lib/libz.so* to filelist on s390 -* Sat Apr 01 2000 - bk@suse.de +* Sat Apr 01 2000 bk@suse.de - add s390 architecture support to rpm - add required %%suse_update_config for s390 - rpm is NOT linked statically on s390 for now -* Tue Mar 28 2000 - ma@suse.de +* Tue Mar 28 2000 ma@suse.de - rpm.spec: avoid macro usage in 'Version:' entry -* Thu Mar 02 2000 - schwab@suse.de +* Thu Mar 02 2000 schwab@suse.de - Fix md5 for ia64. -* Mon Feb 28 2000 - ma@suse.de +* Mon Feb 28 2000 ma@suse.de - remove 'libNoVersion' in find-requires -* Wed Feb 23 2000 - schwab@suse.de +* Wed Feb 23 2000 schwab@suse.de - recognize ia64 as architecture. -* Mon Feb 07 2000 - ma@suse.de +* Mon Feb 07 2000 ma@suse.de - rebuilddb fix - set info/mandir macros to /usr/share/... -* Wed Feb 02 2000 - ma@suse.de +* Wed Feb 02 2000 ma@suse.de - update to 3.0.4 (popt-1.5) - new subpackage: popt -* Sat Nov 13 1999 - kukuk@suse.de +* Sat Nov 13 1999 kukuk@suse.de - Add sparc64 directory - Fix installation into RPM_BUILD_ROOT directory -* Mon Nov 08 1999 - kukuk@suse.de +* Mon Nov 08 1999 kukuk@suse.de - add directory /usr/src/packages/RPMS/sparc -* Thu Nov 04 1999 - bs@suse.de +* Thu Nov 04 1999 bs@suse.de - fixed bug in find-requires regarding pseudo scripts starting with "#! --" -* Thu Oct 28 1999 - bs@suse.de +* Thu Oct 28 1999 bs@suse.de - added directories /usr/src/packages/RPMS/{ppc,noarch} -* Wed Oct 27 1999 - ma@suse.de +* Wed Oct 27 1999 ma@suse.de - place suse_macrofile in source/binary package - don't check reqires below /usr/doc/ -* Mon Sep 13 1999 - bs@suse.de +* Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. -* Thu Sep 09 1999 - bs@suse.de +* Thu Sep 09 1999 bs@suse.de - fixed call of Check at the end of %%install section -* Mon Jul 19 1999 - ma@suse.de +* Mon Jul 19 1999 ma@suse.de - again rebuilddb.patch -* Wed Jul 14 1999 - ro@suse.de +* Wed Jul 14 1999 ro@suse.de - update to 3.0.3 -* Mon Jun 28 1999 - ro@suse.de +* Mon Jun 28 1999 ro@suse.de - changed macros.in for libc5 : no "h" parameter for chown,chmod -* Fri Jun 25 1999 - ro@suse.de +* Fri Jun 25 1999 ro@suse.de - update to rpm-3.0.2 - added librpmbuild.a to filelist - added patch not to generate dependency for libNoVersion - rebuilddb.patch removed (incorporated in source) -* Thu Jun 17 1999 - ma@suse.de +* Thu Jun 17 1999 ma@suse.de - fixed bug when --rebuilddb and --root where used at the same time. -* Wed May 26 1999 - ro@suse.de +* Wed May 26 1999 ro@suse.de - update to 3.0.1 -* Mon Apr 26 1999 - werner@suse.de +* Mon Apr 26 1999 werner@suse.de - Speed up find-requires for linux -* Mon Apr 26 1999 - ro@suse.de +* Mon Apr 26 1999 ro@suse.de - update to 3.0 (noreplace fix has been incorporated) -* Mon Apr 12 1999 - ro@suse.de +* Mon Apr 12 1999 ro@suse.de - update to 2.93 -* Fri Mar 19 1999 - ro@suse.de +* Fri Mar 19 1999 ro@suse.de - update to 2.92 -* Thu Mar 18 1999 - ro@suse.de +* Thu Mar 18 1999 ro@suse.de - respect movement of libz to usr/lib -* Sun Feb 28 1999 - ro@suse.de +* Sun Feb 28 1999 ro@suse.de - update to rpm-src from 99/02/25 -* Sat Feb 27 1999 - ro@suse.de +* Sat Feb 27 1999 ro@suse.de - install both dirs RPM/i386 and RPM/alpha (since buildarch doesn't seem to be defined now ?) -* Tue Feb 23 1999 - ro@suse.de +* Tue Feb 23 1999 ro@suse.de - adapted macros file to SuSE - fixed segfault when not using BuildRoot -* Tue Feb 23 1999 - ro@suse.de +* Tue Feb 23 1999 ro@suse.de - modified diff-style - use additional parameter "-h" on chown after unpacking in build -* Mon Feb 22 1999 - ro@suse.de +* Mon Feb 22 1999 ro@suse.de - update to 2.91 - ported ma's fixes -* Wed Nov 25 1998 - ma@suse.de +* Wed Nov 25 1998 ma@suse.de - new version 2.5.5 - fixed in 2.5.5: find-requires/provides bug - fixed in 2.5.5: rebuilddb -* Wed Nov 18 1998 - ma@suse.de +* Wed Nov 18 1998 ma@suse.de - link rpm.dyn dynamic against libc only -* Mon Nov 16 1998 - ma@suse.de +* Mon Nov 16 1998 ma@suse.de - shared binary (/usr/lib/rpm/rpm.dyn) added -* Tue Nov 10 1998 - ro@suse.de +* Tue Nov 10 1998 ro@suse.de - fixed find-requires (linux.req) -* Mon Nov 09 1998 - ro@suse.de +* Mon Nov 09 1998 ro@suse.de - added %%post: do rpm --initdb if triggerindex.rpm doesn't exist - do chown root.root for RPM-HOWTO -* Thu Nov 05 1998 - ma@suse.de +* Thu Nov 05 1998 ma@suse.de - new version 2.5.4 - fix for rebuilddb - fix for %%config(noreplace) - RPM-Changes html document that describes the important changes in RPM since what is documented in Maximum RPM. -* Tue Nov 03 1998 - ro@suse.de +* Tue Nov 03 1998 ro@suse.de - disabled glibc-patch for build in glibc-2.0 -* Sun Sep 20 1998 - ro@suse.de +* Sun Sep 20 1998 ro@suse.de - use libdb185.a for rpm in glibc system -* Thu Sep 03 1998 - ma@suse.de +* Thu Sep 03 1998 ma@suse.de - glibc patches -* Thu Feb 05 1998 - ro@suse.de +* Thu Feb 05 1998 ro@suse.de - update to 2.4.12 -* Tue Dec 09 1997 - bs@suse.de +* Tue Dec 09 1997 bs@suse.de - skip *.SuSE-dynamic in find-requires -* Wed Nov 12 1997 - ma@suse.de +* Wed Nov 12 1997 ma@suse.de - new version 2.4.10 -* Sat Nov 08 1997 - ma@suse.de +* Sat Nov 08 1997 ma@suse.de - patch: rpmdbFindByFile() didn't work for "/". Thus "/" wasn't handled correctly in querries and upon updates ("rmdir /"). -* Mon Oct 27 1997 - ma@suse.de +* Mon Oct 27 1997 ma@suse.de - new version 2.4.8 - spec file for autobuild provided - dirs below /usr/src/packages are installed mode 1777 @@ -1439,15 +1442,15 @@ Authors: - patch: remove empty dirs when installing a symlink - patch: ignore errors when installing a symlink and called from YaST - de.po update -* Thu Aug 07 1997 - ma@suse.de +* Thu Aug 07 1997 ma@suse.de - duplicate '--nodeps' entry in rpm manpage deleted. - quick patch to allow installing rpm v1 packages. - workaround to skip installing a symlink (Jul 15 1997) is disabeled, unless environment variable RPM_IgnoreFailedSymlinks is set. -* Tue Jul 15 1997 - ro@suse.de +* Tue Jul 15 1997 ro@suse.de - added workaround to skip installing a symlink when impossible to remove an existing directory -* Thu Jun 26 1997 - ma@suse.de +* Thu Jun 26 1997 ma@suse.de - introducing rpm, version 2.4.1 - documentation (ascii,html) in usr/doc/packages/rpm From 2c9120d8417efa164faf7abd663b1b0c647aef6b769a96c086e492045e02b8b1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 19 Jan 2008 16:15:33 +0000 Subject: [PATCH 030/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=30 --- rpm-python.spec | 2 +- rpm-suse_macros | 66 +++++++++++++++++++++++++++++++++++-------------- rpm.changes | 5 ++++ rpm.spec | 8 +++--- 4 files changed, 58 insertions(+), 23 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 00a2849..95f874b 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 194 +Release: 196 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index b72bf40..2d95b58 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -14,16 +14,21 @@ %_defaultdocdir %{_usr}/share/doc/packages # package build macros -%makeinstall make DESTDIR=%{buildroot} install +%makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install %tcl_version %(echo 'puts [package require Tcl]' | tclsh) -%insserv_prereq insserv -%fillup_prereq fillup fileutils +%tclscriptdir %_datadir/tcl +%rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/") +%rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")') +%insserv_prereq insserv sed +%fillup_prereq fillup coreutils grep diffutils +%suseconfig_fonts_prereq perl aaa_base %install_info_prereq info -%__os_install_post \ +%__os_install_post %{?_suse_os_install_post}%{!?_suse_os_install_post: \ %{suse_check} \ /usr/lib/rpm/brp-compress \ -%{nil} + /usr/lib/rpm/brp-symlink \ +%{nil}} # perl_vendorarch is defined # perl_vendorlib is defined @@ -40,8 +45,8 @@ # macro: %suse_update_desktop_file # Used to add easily a category to .desktop files according to XDG # standard. -%suse_update_desktop_file(:-:) \ - /usr/lib/rpm/suse_update_desktop_file.sh %{**} || exit 1 \ +%suse_update_desktop_file(cinrud:D:N:C:G:) \ + /usr/lib/rpm/suse_update_desktop_file.sh %{**} || exit 1 \ %nil # macro: %restart_on_update() @@ -102,12 +107,32 @@ if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.%{-m*} ; then \ /sbin/SuSEconfig --module %{-m*} \ else \ - echo -e "\\nERROR: SuSEconfig or requested SuSEconfig module not present!\\n" ; exit 1 \ + echo -e "\\nWARNING: SuSEconfig or requested SuSEconfig module not present!\\n" ; \ fi \ fi \ %nil -%verify_permissions(:-:) \ +# macro: run_suseconfig_fonts +# call SuSEconfig modules necessary for font setup +# options: +# -c (the fonts are CJK fonts, also do setup which is only needed +# for CJK) +%run_suseconfig_fonts(c) \ + if test -z "$YAST_IS_RUNNING" ; then \ + if test -x /sbin/conf.d/SuSEconfig.fonts ; then \ + %run_suseconfig -m fonts \ + fi \ + if test -x /sbin/conf.d/SuSEconfig.pango ; then \ + %run_suseconfig -m pango \ + fi \ + %{-c:if test -x /sbin/conf.d/SuSEconfig.ghostscript-cjk ; then \ + %run_suseconfig -m ghostscript-cjk \ + fi} \ + fi \ + %nil + + +%verify_permissions(e:f:) \ if test -f /etc/sysconfig/security ; then \ source /etc/sysconfig/security \ fi \ @@ -119,6 +144,7 @@ done \ /usr/bin/chkstat -n %{**} $PERMFILES 1>&2 \ %nil + # %{suse_update_config [-fcl] [dirs...]} # -f: force, ignore timestamp # -c: no config.guess,config.sub @@ -223,7 +249,8 @@ echo -e "#\\n# Start service $SCRIPTNAME\\n#\\n$STARTVAR=\\"${!STARTVAR}\\"\\n\\n" >> var/adm/fillup-templates/rc.config.$PNAME.del } } \ done \ %{!-f: %{do_real_fillup}} \ - %{!-i: %{add_start_if_needed $INSSRV_ARRAY } } + %{!-i: %{add_start_if_needed $INSSRV_ARRAY } } \ + %nil # do_real_fillup: internal macro # this part really calls fillup for the appropriate files @@ -258,7 +285,7 @@ fi \ else \ echo "ERROR: fillup not found. This should not happen. Please compare" \ - echo "etc/rc.config and $TEMPLATE_DIR/rc.config.$PNAME and" \ + echo "etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" \ echo "update by hand." \ fi @@ -320,9 +347,10 @@ %{rc_fillup} \ else \ echo "ERROR: fillup not found. This should not happen. Please compare" \ - echo "etc/rc.config and $RC_TEMPLATE and" \ + echo "etc/sysconfig/$SD_NAME$PNAME and $SYSC_TEMPLATE and" \ echo "update by hand." \ - fi + fi \ + %nil # internal only: rc_fillup %rc_fillup() \ @@ -445,19 +473,18 @@ fi ; \ fi ; -%suse_version 901 +# find-supplements.ksyms parses this macro directly out of the spec file: +%supplements_kernel_module() \ + %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} + +%suse_version 1031 %sles_version 0 %ul_version 0 - %do_profiling 1 %cflags_profile_generate -fprofile-generate %cflags_profile_feedback -fprofile-use -# find-supplements.ksyms parses this macro directly out of the spec file: -%supplements_kernel_module() \ - %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} - # Template for lang sub-package. %lang_package(n:) \ %package %{-n:-n %{-n*}-}lang \ @@ -468,3 +495,4 @@ Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ Supplements: packageand(bundle-lang-other:%{-n:%{-n*}}%{!-n:%{name}}) \ %description %{-n:-n %{-n*}-}lang \ Provides translations to the package %{name} + diff --git a/rpm.changes b/rpm.changes index ea455a9..48c3824 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jan 19 17:14:55 CET 2008 - mls@suse.de + +- update rpm-suse_macros so that the build service can build, too + ------------------------------------------------------------------- Thu Jan 17 19:19:09 CET 2008 - wberrier@suse.de diff --git a/rpm.spec b/rpm.spec index 78273dd..b56464d 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 157 +Release: 159 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -345,7 +345,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 385 +Release: 387 # %description -n popt @@ -368,7 +368,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 385 +Release: 387 Requires: popt = 1.7 Requires: glibc-devel @@ -403,6 +403,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Sat Jan 19 2008 mls@suse.de +- update rpm-suse_macros so that the build service can build, too * Thu Jan 17 2008 wberrier@suse.de - autodeps.diff pass .config files to mono-find-requires, not mono-find-provides From 067e8ebe8fb0df7f1b68291e9a5224d7e6eacd9fc416cc315f35411983d1ce62 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 25 Jan 2008 15:54:57 +0000 Subject: [PATCH 031/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=31 --- build.diff | 11 ++--------- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build.diff b/build.diff index b050cfd..1b61524 100644 --- a/build.diff +++ b/build.diff @@ -297,23 +297,16 @@ Index: configure.ac *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; esac case "${build_os_noversion}" in -@@ -1290,7 +1287,7 @@ mint) RPMCANONARCH=m68kmint ;; +@@ -1290,7 +1287,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 -@@ -1298,6 +1295,7 @@ unknown|pc|ibm|redhat|pld|mandrake|conec - test -f /etc/lvr-release && RPMCANONVENDOR=lvr - test -f /etc/yellowdog-release && RPMCANONVENDOR=yellowdog - test -f /etc/caos-release && RPMCANONVENDOR=caos -+ test -f /etc/SuSE-release -o -f /.buildenv && RPMCANONVENDOR=suse - ;; - esac - RPMCANONOS="$build_os_noversion" @@ -1372,7 +1370,7 @@ dnl XXX this causes popt to depend on zl dnl # XXX Propagate -lucb to popt ... dnl export LIBS INCPATH CONFIG_SITE diff --git a/rpm-python.spec b/rpm-python.spec index 95f874b..770b6a0 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 196 +Release: 199 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 48c3824..ec0b39d 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 21 12:27:18 CET 2008 - mls@suse.de + +- change vendor detection so that it works in build service, too + ------------------------------------------------------------------- Sat Jan 19 17:14:55 CET 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index b56464d..3dc354c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 159 +Release: 161 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -345,7 +345,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 387 +Release: 389 # %description -n popt @@ -368,7 +368,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 387 +Release: 389 Requires: popt = 1.7 Requires: glibc-devel @@ -403,6 +403,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Jan 21 2008 mls@suse.de +- change vendor detection so that it works in build service, too * Sat Jan 19 2008 mls@suse.de - update rpm-suse_macros so that the build service can build, too * Thu Jan 17 2008 wberrier@suse.de From 3c09d0e71f517b965743d648f026c84f7b206ca0cabdefae806b71be329d0f0d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 29 Jan 2008 00:44:43 +0000 Subject: [PATCH 032/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=32 --- finddebuginfo.diff | 20 ++++++++++---------- rpm-python.spec | 6 +++--- rpm.changes | 5 +++++ rpm.spec | 32 +++++++++++++++++--------------- 4 files changed, 35 insertions(+), 28 deletions(-) diff --git a/finddebuginfo.diff b/finddebuginfo.diff index 39e51fa..b803fb5 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -59,16 +59,16 @@ + chmod $mode $f done -+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 ++#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 diff --git a/rpm-python.spec b/rpm-python.spec index 770b6a0..a5c9bbd 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 199 +Release: 201 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -65,11 +65,11 @@ rm -rf $RPM_BUILD_ROOT - fix unicode queries * Fri Mar 30 2007 rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires. -* Wed Oct 18 2006 mls@suse.de +* Thu Oct 19 2006 mls@suse.de - use rpm.spec for building instead of duplication everything - delete superfluous .a and .la files [#202604] - create .pyc and .pyo files [#205711] -* Sun Oct 15 2006 schwab@suse.de +* Mon Oct 16 2006 schwab@suse.de - Make sure config.rpath is present. * Fri Sep 22 2006 aj@suse.de - Fix for python2.5. diff --git a/rpm.changes b/rpm.changes index ec0b39d..bb3f93a 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 28 16:35:46 CET 2008 - ro@suse.de + +- finddebuginfo.diff: disable debuginfo for mono at the moment + ------------------------------------------------------------------- Mon Jan 21 12:27:18 CET 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 3dc354c..aee10d6 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 161 +Release: 163 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -345,7 +345,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 389 +Release: 391 # %description -n popt @@ -368,7 +368,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 389 +Release: 391 Requires: popt = 1.7 Requires: glibc-devel @@ -403,6 +403,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Jan 28 2008 ro@suse.de +- finddebuginfo.diff: disable debuginfo for mono at the moment * Mon Jan 21 2008 mls@suse.de - change vendor detection so that it works in build service, too * Sat Jan 19 2008 mls@suse.de @@ -426,7 +428,7 @@ Authors: - implement supplements for lang_packages (#306412) * Fri Aug 10 2007 dmueller@suse.de - package size reduction (#217472) -* Wed Aug 08 2007 dmueller@suse.de +* Thu Aug 09 2007 dmueller@suse.de - support optional -n parameter in %%lang_package - make %%lang_package export a -all provides that can be used to resolve conflicts with the bundle @@ -470,7 +472,7 @@ Authors: * Tue Apr 17 2007 dmueller@suse.de - strip comment and gcc command line sections from the packages - rework SYMTAB_KEEP to accept a file pattern -* Sun Apr 08 2007 schwab@suse.de +* Mon Apr 09 2007 schwab@suse.de - Include compilation directory in debuginfo file list. * Sat Mar 24 2007 ro@suse.de - added libbz2-devel to BuildRequires and Requires for -devel @@ -527,7 +529,7 @@ Authors: - Fix the KMP Package spec file template so that whenever the initrd contains a module that the KMP includes, the initrd will be regenerated (211646). -* Sun Oct 15 2006 schwab@suse.de +* Mon Oct 16 2006 schwab@suse.de - Make sure config.rpath is present. * Mon Oct 02 2006 agruen@suse.de - %%suse_kernel_module_package: Abort when trying to build for a @@ -626,14 +628,14 @@ Authors: - add back missing chunk of srcdefattr patch [#48870] - add rpmvercmp patch from Peter Bowan - add -m32 to ix86 optflags to make --target work [#141206] -* Sat Feb 04 2006 agruen@suse.de +* Sun Feb 05 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Allow to specify a list of kernel flavors to build (-x) instead of specifying an exclude list. * Fri Feb 03 2006 mls@suse.de - use RPMSENSE_STRONG instead of RPMSENSE_WEAK - drop support for EssentialFor -* Wed Feb 01 2006 agruen@suse.de +* Thu Feb 02 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Allow to specify a custom %%files list for the kernel-specific sub-packages. Use the Summary and Group tags, and the %%description section from the @@ -767,12 +769,12 @@ Authors: - use binutils for debuginfo packages * Fri Jan 14 2005 coolo@suse.de - name the debug package -debuginfo to sync with redhat/fedora -* Mon Dec 13 2004 sndirsch@suse.de +* Tue Dec 14 2004 sndirsch@suse.de - moved chinese popt mo file to correct directory (Bug #47262) * Fri Dec 03 2004 mls@suse.de - fix update of rpm with same name/version/release but different architecture -* Thu Nov 25 2004 ro@suse.de +* Fri Nov 26 2004 ro@suse.de - fix build with python-2.4 * Tue Nov 16 2004 ro@suse.de - update permissions handling @@ -866,7 +868,7 @@ Authors: * Thu Feb 05 2004 ro@suse.de - linux.prov: don't block soname in versioned-requires - linux.req: disable perl-requires, it's broken -* Tue Feb 03 2004 schwab@suse.de +* Wed Feb 04 2004 schwab@suse.de - Readd ia64 64bit provides hack. * Tue Feb 03 2004 kukuk@suse.de - Remove all special find-requires scripts and use the default one @@ -894,7 +896,7 @@ Authors: - really disable rpmconfigcheck * Sat Sep 20 2003 kukuk@suse.de - Don't enable rpmconfigcheck per default -* Fri Sep 19 2003 schwab@suse.de +* Sat Sep 20 2003 schwab@suse.de - Fix descriptor leak [#31450]. * Mon Sep 15 2003 mls@suse.de - remove redhat options from popt (#30302) @@ -953,7 +955,7 @@ Authors: - make PreReqs work again if --nodeps is used - fix rpmconfigcheck - apply find-debuginfo.sh patch from coolo -* Thu Jun 12 2003 kukuk@suse.de +* Fri Jun 13 2003 kukuk@suse.de - Fix find-lang.sh (special /usr/share/locale handling) * Thu Jun 12 2003 coolo@suse.de - enhancing find-lang.sh to take KDE/GNOME into account and label @@ -1170,7 +1172,7 @@ Authors: - Fix to build with new gettext. * Mon Feb 18 2002 ro@suse.de - added requires for suse-build-key -* Mon Feb 11 2002 ro@suse.de +* Tue Feb 12 2002 ro@suse.de - tar option for bz2 is now "j" (re-added) * Mon Feb 11 2002 ma@suse.de - unk_ugname_cached.diff: Upon building a package, unpacking sources @@ -1327,7 +1329,7 @@ Authors: * Wed Apr 05 2000 bk@suse.de - uses autoconf and automake now - added /lib/libbz2.so* and /lib/libz.so* to filelist on s390 -* Sat Apr 01 2000 bk@suse.de +* Sun Apr 02 2000 bk@suse.de - add s390 architecture support to rpm - add required %%suse_update_config for s390 - rpm is NOT linked statically on s390 for now From 2e79e34327d97459f764a7683cc1256e20c7cf04bb910734d88ac02a77975cab Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 1 Feb 2008 18:33:28 +0000 Subject: [PATCH 033/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=33 --- brp.diff | 2 +- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/brp.diff b/brp.diff index fdaf8c5..affad08 100644 --- a/brp.diff +++ b/brp.diff @@ -174,7 +174,7 @@ SUSE specific brp script patches + echo " skip the files from packaging)" + exit 1 + ;; -+ *,/opt/kde3/share/doc/HTML/*/common) # white listed for not existant ++ *,/opt/kde3/share/doc*/HTML/*/common) # white listed for not existant + ;; + *,/proc/*) # links pointing into /proc file system + ;; diff --git a/rpm-python.spec b/rpm-python.spec index a5c9bbd..0bd8331 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 201 +Release: 203 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index bb3f93a..04f71e4 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 31 15:12:55 CET 2008 - ro@suse.de + +- brp-symlink: whitelist /opt/kde3/share/doc*/HTML/*/common + ------------------------------------------------------------------- Mon Jan 28 16:35:46 CET 2008 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index aee10d6..5f0e9fe 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 163 +Release: 165 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -345,7 +345,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 391 +Release: 393 # %description -n popt @@ -368,7 +368,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 391 +Release: 393 Requires: popt = 1.7 Requires: glibc-devel @@ -403,6 +403,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Jan 31 2008 ro@suse.de +- brp-symlink: whitelist /opt/kde3/share/doc*/HTML/*/common * Mon Jan 28 2008 ro@suse.de - finddebuginfo.diff: disable debuginfo for mono at the moment * Mon Jan 21 2008 mls@suse.de From 96dbe016e507e5c2533e1833ed4b2564e95a4e287394e2ee691a71c2e8224ba6 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 25 Feb 2008 16:02:20 +0000 Subject: [PATCH 034/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=34 --- noautoreloc.diff | 14 ++++++++++++++ rpm-python.spec | 3 ++- rpm.changes | 5 +++++ rpm.spec | 12 ++++++++---- 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 noautoreloc.diff diff --git a/noautoreloc.diff b/noautoreloc.diff new file mode 100644 index 0000000..f9efd69 --- /dev/null +++ b/noautoreloc.diff @@ -0,0 +1,14 @@ +--- ./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/rpm-python.spec b/rpm-python.spec index 0bd8331..4317ddd 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -10,13 +10,14 @@ # norootforbuild + Name: rpm-python BuildRequires: libbz2-devel ncurses-devel python-devel zlib-devel License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 203 +Release: 212 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 04f71e4..1cc1780 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 21 21:58:39 CET 2008 - mls@suse.de + +- do not configure autoreloc or colors + ------------------------------------------------------------------- Thu Jan 31 15:12:55 CET 2008 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index 5f0e9fe..c4f0e67 100644 --- a/rpm.spec +++ b/rpm.spec @@ -10,6 +10,7 @@ # norootforbuild + Name: rpm License: GPL v2 or later Group: System/Packages @@ -20,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 165 +Release: 170 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -128,6 +129,7 @@ Patch99: rpm-debugedit-shared.diff Patch100: rpm-gcc43.diff Patch101: lzma.diff Patch102: rpm-shorten-changelog.diff +Patch103: noautoreloc.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -198,7 +200,7 @@ rm -f rpmdb/db.h %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 +%patch -P 100 -P 101 -P 102 -P 103 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -345,7 +347,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 393 +Release: 398 # %description -n popt @@ -368,7 +370,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 393 +Release: 398 Requires: popt = 1.7 Requires: glibc-devel @@ -403,6 +405,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Feb 21 2008 mls@suse.de +- do not configure autoreloc or colors * Thu Jan 31 2008 ro@suse.de - brp-symlink: whitelist /opt/kde3/share/doc*/HTML/*/common * Mon Jan 28 2008 ro@suse.de From 1b00a6c6d9f3fa457e020c3bb84609f75555377793e9e9cdc56a060e1c38553e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 21 Mar 2008 01:12:40 +0000 Subject: [PATCH 035/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=35 --- build.diff | 74 +++----- db.diff | 106 ++++++------ lzma-payload-2.diff | 399 ++++++++++++++++++++++++++++++++++++++++++++ lzma-payload.diff | 108 ++++++++++++ rpm-python.spec | 2 +- rpm.changes | 28 ++++ rpm.spec | 26 ++- rpmrc.diff | 7 +- 8 files changed, 639 insertions(+), 111 deletions(-) create mode 100644 lzma-payload-2.diff create mode 100644 lzma-payload.diff diff --git a/build.diff b/build.diff index 1b61524..9b01455 100644 --- a/build.diff +++ b/build.diff @@ -2,10 +2,10 @@ Many changes to Makefiles/autogen and the like to make it build on SUSE systems. Index: Makefile.am -=================================================================== ---- Makefile.am.orig +================================================================================ +--- Makefile.am +++ Makefile.am -@@ -15,7 +15,7 @@ EXTRA_DIST = CHANGES CREDITS Doxyheader +@@ -15,7 +15,7 @@ EXTRA_DIST = CHANGES CREDITS Doxyheader po/*.in po/*.po po/rpm.pot \ rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c @@ -14,9 +14,7 @@ Index: Makefile.am INCLUDES = \ -I$(top_srcdir)/build \ -Index: autogen.sh -=================================================================== ---- autogen.sh.orig +--- autogen.sh +++ autogen.sh @@ -26,12 +26,12 @@ case $libtoolize in esac @@ -49,11 +47,11 @@ Index: autogen.sh if [ -d neon ]; then (echo "--- neon"; cd neon; ./autogen.sh "$@") fi -+(echo "--- db"; cd db/dist; libtoolize --copy --force ; cp /usr/share/aclocal/libtool.m4 aclocal/libtool.ac ; ./s_config ) ++(echo "--- db"; cd db/dist; libtoolize --copy --force ; rm aclocal/libtool.ac ; ./s_config ) echo "--- rpm" $libtoolize --copy --force -@@ -66,7 +68,7 @@ if [ "$1" = "--noconfigure" ]; then +@@ -66,7 +68,7 @@ if [ "$1" = "--noconfigure" ]; then exit 0; fi @@ -62,9 +60,7 @@ Index: autogen.sh if [ -d /usr/share/man ]; then mandir=/usr/share/man infodir=/usr/share/info -Index: build/Makefile.am -=================================================================== ---- build/Makefile.am.orig +--- build/Makefile.am +++ build/Makefile.am @@ -22,7 +22,7 @@ pkgincdir = $(pkgincludedir) pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h @@ -75,9 +71,7 @@ Index: build/Makefile.am usrlibdir = $(libdir)@MARK64@ usrlib_LTLIBRARIES = librpmbuild.la -Index: configure.ac -=================================================================== ---- configure.ac.orig +--- configure.ac +++ configure.ac @@ -1,30 +1,3 @@ - @@ -316,9 +310,7 @@ Index: configure.ac AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile -Index: db3/configure -=================================================================== ---- db3/configure.orig +--- db3/configure +++ db3/configure @@ -10,9 +10,9 @@ rm -f config.cache # XXX edit CFLAGS= ... out of invocation args ??? @@ -333,9 +325,7 @@ Index: db3/configure mv Makefile Makefile.orig cat Makefile.orig | sed -e '/^install[:-]/c\ -Index: file/src/Makefile.am -=================================================================== ---- file/src/Makefile.am.orig +--- file/src/Makefile.am +++ file/src/Makefile.am @@ -26,7 +26,7 @@ libmagic_la_LDFLAGS = -version-info 1:0: @@ -346,9 +336,7 @@ Index: file/src/Makefile.am file_LDADD = libmagic.la listobjs: -Index: installplatform -=================================================================== ---- installplatform.orig +--- installplatform +++ installplatform @@ -62,11 +62,11 @@ for SUBST in $SUBSTS ; do sparcv9-linux) MULTILIBNO=1 ;; @@ -375,9 +363,7 @@ Index: installplatform esac cat $PLATFORM \ -Index: lib/Makefile.am -=================================================================== ---- lib/Makefile.am.orig +--- lib/Makefile.am +++ lib/Makefile.am @@ -29,7 +29,7 @@ noinst_HEADERS = \ mylibs = librpm.la @@ -388,9 +374,7 @@ Index: lib/Makefile.am usrlibdir = $(libdir)@MARK64@ usrlib_LTLIBRARIES = librpm.la -Index: po/Makefile.in -=================================================================== ---- po/Makefile.in.orig +--- po/Makefile.in +++ po/Makefile.in @@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po INSTALL = /usr/bin/install -c @@ -401,9 +385,7 @@ Index: po/Makefile.in CC = gcc GMSGFMT = /usr/bin/msgfmt -Index: po/Makefile.in.in -=================================================================== ---- po/Makefile.in.in.orig +--- po/Makefile.in.in +++ po/Makefile.in.in @@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ @@ -414,9 +396,7 @@ Index: po/Makefile.in.in CC = @CC@ GMSGFMT = @GMSGFMT@ -Index: popt/autogen.sh -=================================================================== ---- popt/autogen.sh.orig +--- popt/autogen.sh +++ popt/autogen.sh @@ -28,7 +28,7 @@ fi @@ -427,9 +407,7 @@ Index: popt/autogen.sh $srcdir/configure --prefix=/usr "$@" else $srcdir/configure "$@" -Index: popt/configure.ac -=================================================================== ---- popt/configure.ac.orig +--- popt/configure.ac +++ popt/configure.ac @@ -1,11 +1,12 @@ AC_INIT(popt.h) @@ -446,9 +424,7 @@ Index: popt/configure.ac AC_ISC_POSIX -Index: popt/po/Makefile.in -=================================================================== ---- popt/po/Makefile.in.orig +--- popt/po/Makefile.in +++ popt/po/Makefile.in @@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po INSTALL = /usr/bin/install -c @@ -459,9 +435,7 @@ Index: popt/po/Makefile.in CC = gcc GMSGFMT = /usr/bin/msgfmt -Index: popt/po/Makefile.in.in -=================================================================== ---- popt/po/Makefile.in.in.orig +--- popt/po/Makefile.in.in +++ popt/po/Makefile.in.in @@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ @@ -472,9 +446,7 @@ Index: popt/po/Makefile.in.in CC = @CC@ GMSGFMT = @GMSGFMT@ -Index: rpmdb/Makefile.am -=================================================================== ---- rpmdb/Makefile.am.orig +--- rpmdb/Makefile.am +++ rpmdb/Makefile.am @@ -31,7 +31,7 @@ noinst_HEADERS = fprint.h header_interna pkgbindir = @RPMCONFIGDIR@ @@ -494,9 +466,7 @@ Index: rpmdb/Makefile.am usrlibdir = $(libdir)@MARK64@ usrlib_LTLIBRARIES = librpmdb.la -Index: rpmio/Makefile.am -=================================================================== ---- rpmio/Makefile.am.orig +--- rpmio/Makefile.am +++ rpmio/Makefile.am @@ -24,9 +24,9 @@ pkginc_HEADERS = \ rpmsq.h rpmsw.h ugid.h @@ -528,9 +498,7 @@ Index: rpmio/Makefile.am done \ fi touch $@ -Index: scripts/Makefile.am -=================================================================== ---- scripts/Makefile.am.orig +--- scripts/Makefile.am +++ scripts/Makefile.am @@ -6,6 +6,7 @@ EXTRA_DIST = \ brp-compress brp-python-bytecompile brp-java-gcjcompile brp-redhat \ diff --git a/db.diff b/db.diff index 121ae44..e608601 100644 --- a/db.diff +++ b/db.diff @@ -1,5 +1,5 @@ ---- db/db/db.c.orig 2004-11-11 15:58:46.000000000 +0000 -+++ db/db/db.c 2005-12-15 16:17:45.000000000 +0000 +--- db/db/db.c ++++ db/db/db.c @@ -591,6 +591,8 @@ __db_dbenv_mpool(dbp, fname, flags) (F_ISSET(dbp, DB_AM_NOT_DURABLE) ? DB_TXN_NOT_DURABLE : 0), 0, dbp->pgsize)) != 0) @@ -9,8 +9,8 @@ return (0); } ---- db/db/db_iface.c.orig 2004-10-16 01:31:54.000000000 +0000 -+++ db/db/db_iface.c 2005-12-15 16:17:45.000000000 +0000 +--- db/db/db_iface.c ++++ db/db/db_iface.c @@ -1068,7 +1068,7 @@ __db_open_arg(dbp, txn, fname, dname, ty #define OKFLAGS \ (DB_AUTO_COMMIT | DB_CREATE | DB_DIRTY_READ | DB_EXCL | \ @@ -20,8 +20,8 @@ if ((ret = __db_fchk(dbenv, "DB->open", flags, OKFLAGS)) != 0) return (ret); if (LF_ISSET(DB_EXCL) && !LF_ISSET(DB_CREATE)) ---- db/dbinc/db.in.orig 2004-10-16 01:31:54.000000000 +0000 -+++ db/dbinc/db.in 2005-12-15 16:17:45.000000000 +0000 +--- db/dbinc/db.in ++++ db/dbinc/db.in @@ -260,6 +260,7 @@ struct __db_dbt { #define DB_FCNTL_LOCKING 0x0002000 /* UNDOC: fcntl(2) locking. */ #define DB_RDWRMASTER 0x0004000 /* UNDOC: allow subdb master open R/W */ @@ -30,8 +30,8 @@ /* * Flags private to DB_ENV->txn_begin. ---- db/dbinc/mp.h.orig 2004-10-16 01:31:54.000000000 +0000 -+++ db/dbinc/mp.h 2005-12-15 16:25:56.000000000 +0000 +--- db/dbinc/mp.h ++++ db/dbinc/mp.h @@ -309,6 +309,7 @@ struct __mpoolfile { #define MP_FAKE_UOC 0x080 /* Unlink_on_close field: fake flag. */ #define MP_NOT_DURABLE 0x100 /* File is not durable. */ @@ -40,8 +40,55 @@ u_int32_t flags; }; ---- db/mp/mp_sync.c.orig 2004-11-11 15:58:48.000000000 +0000 -+++ db/mp/mp_sync.c 2005-12-15 16:23:57.000000000 +0000 +--- db/dist/aclocal/options.ac ++++ db/dist/aclocal/options.ac +@@ -277,10 +277,6 @@ fi + + # Uniquename excludes C++, Java, RPC. + if test "$db_cv_uniquename" = "yes"; then +- if test "$db_cv_rpc" = "yes"; then +- AC_MSG_ERROR( +- [--with-uniquename is not compatible with --enable-rpc]) +- fi + if test "$db_cv_cxx" = "yes"; then + AC_MSG_ERROR( + [--with-uniquename is not compatible with --enable-cxx]) +--- db/dist/s_config ++++ db/dist/s_config +@@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3 + . ./RELEASE + + echo "autoconf: building aclocal.m4..." +-cat aclocal/*.ac aclocal_java/*.ac > aclocal.m4 ++cat aclocal/*.ac aclocal_java/*.ac > acinclude.m4 ++aclocal + + echo "autoconf: running autoheader to build config.hin..." + rm -f config.hin +@@ -20,14 +21,13 @@ rm -f configure + autoconf + + # Edit version information we couldn't pre-compute. +-(echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" && +- echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" && +- echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" && +- echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" && +- echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" && +- echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" && +- echo "w" && +- echo "q") | ed configure ++sed -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \ ++ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \ ++ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \ ++ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \ ++ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ ++ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \ ++ -i configure + + rm -rf autom4te.cache + chmod 555 configure +--- db/mp/mp_sync.c ++++ db/mp/mp_sync.c @@ -553,7 +553,7 @@ done: /* if (ret == 0 && (op == DB_SYNC_CACHE || op == DB_SYNC_FILE)) { if (dbmfp == NULL) @@ -70,42 +117,3 @@ /* * Expects caller to be holding the region lock: we're using the path * name and __memp_nameop might try and rename the file. ---- db/dist/s_config.orig 2003-12-15 21:42:41.000000000 +0000 -+++ db/dist/s_config 2005-02-11 14:44:09.018907747 +0000 -@@ -20,14 +20,15 @@ - autoconf - - # Edit version information we couldn't pre-compute. --(echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" && -- echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" && -- echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" && -- echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" && -- echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" && -- echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" && -- echo "w" && -- echo "q") | ed configure -+mv configure configure.old -+sed -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \ -+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \ -+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \ -+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \ -+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ -+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \ -+< configure.old > configure -+rm -f configure.old - - rm -rf autom4te.cache - chmod 555 configure ---- db/dist/aclocal/options.ac.orig 2005-12-15 16:43:14.000000000 +0000 -+++ db/dist/aclocal/options.ac 2005-12-15 16:43:40.000000000 +0000 -@@ -277,10 +277,6 @@ fi - - # Uniquename excludes C++, Java, RPC. - if test "$db_cv_uniquename" = "yes"; then -- if test "$db_cv_rpc" = "yes"; then -- AC_MSG_ERROR( -- [--with-uniquename is not compatible with --enable-rpc]) -- fi - if test "$db_cv_cxx" = "yes"; then - AC_MSG_ERROR( - [--with-uniquename is not compatible with --enable-cxx]) diff --git a/lzma-payload-2.diff b/lzma-payload-2.diff new file mode 100644 index 0000000..386b6d3 --- /dev/null +++ b/lzma-payload-2.diff @@ -0,0 +1,399 @@ +--- 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 + #define FDONLY(fd) assert(fdGetIo(fd) == fdio) + #define GZDONLY(fd) assert(fdGetIo(fd) == gzdio) + #define BZDONLY(fd) assert(fdGetIo(fd) == bzdio) ++#define LZDONLY(fd) assert(fdGetIo(fd) == lzdio) + + #define UFDONLY(fd) /* assert(fdGetIo(fd) == ufdio) */ + +@@ -185,6 +186,8 @@ static /*@observer@*/ const char * fdbg( + } else if (fps->io == bzdio) { + sprintf(be, "BZD %p fdno %d", fps->fp, fps->fdno); + #endif ++ } else if (fps->io == lzdio) { ++ sprintf(be, "LZD %p fdno %d", fps->fp, fps->fdno); + } else if (fps->io == fpio) { + /*@+voidabstract@*/ + sprintf(be, "%s %p(%d) fdno %d", +@@ -2629,6 +2632,348 @@ FDIO_t bzdio = /*@-compmempass@*/ &bzdio + /*@=moduncon@*/ + #endif /* HAVE_BZLIB_H */ + ++#include ++#include ++#include ++ ++#define kBufferSize (1 << 15) ++ ++typedef struct lzfile { ++ /* IO buffer */ ++ uint8_t buf[kBufferSize]; ++ ++ lzma_stream strm; ++ ++ FILE *file; ++ ++ int encoding; ++ int eof; ++ ++} LZFILE; ++ ++static LZFILE *lzopen_internal(const char *path, const char *mode, int fd) ++{ ++ int level = 5; ++ int encoding = 0; ++ FILE *fp; ++ LZFILE *lzfile; ++ lzma_ret ret; ++ ++ for (; *mode; mode++) { ++ if (*mode == 'w') ++ encoding = 1; ++ else if (*mode == 'r') ++ encoding = 0; ++ else if (*mode >= '1' && *mode <= '9') ++ level = *mode - '0'; ++ } ++ if (fd != -1) ++ fp = fdopen(fd, encoding ? "w" : "r"); ++ else ++ fp = fopen(path, encoding ? "w" : "r"); ++ if (!fp) ++ return 0; ++ lzfile = calloc(1, sizeof(*lzfile)); ++ if (!lzfile) { ++ fclose(fp); ++ return 0; ++ } ++ lzfile->file = fp; ++ lzfile->encoding = encoding; ++ lzfile->eof = 0; ++ lzfile->strm = LZMA_STREAM_INIT_VAR; ++ if (encoding) { ++ lzma_options_alone alone; ++ alone.uncompressed_size = LZMA_VLI_VALUE_UNKNOWN; ++ memcpy(&alone.lzma, &lzma_preset_lzma[level - 1], sizeof(alone.lzma)); ++ ret = lzma_alone_encoder(&lzfile->strm, &alone); ++ } else { ++ ret = lzma_auto_decoder(&lzfile->strm, 0, 0); ++ } ++ if (ret != LZMA_OK) { ++ fclose(fp); ++ free(lzfile); ++ return 0; ++ } ++ return lzfile; ++} ++ ++static LZFILE *lzopen(const char *path, const char *mode) ++{ ++ return lzopen_internal(path, mode, -1); ++} ++ ++static LZFILE *lzdopen(int fd, const char *mode) ++{ ++ if (fd < 0) ++ return 0; ++ return lzopen_internal(0, mode, fd); ++} ++ ++static int lzflush(LZFILE *lzfile) ++{ ++ return fflush(lzfile->file); ++} ++ ++static int lzclose(LZFILE *lzfile) ++{ ++ lzma_ret ret; ++ int n; ++ ++ if (!lzfile) ++ return -1; ++ if (lzfile->encoding) { ++ for (;;) { ++ lzfile->strm.avail_out = kBufferSize; ++ lzfile->strm.next_out = lzfile->buf; ++ ret = lzma_code(&lzfile->strm, LZMA_FINISH); ++ if (ret != LZMA_OK && ret != LZMA_STREAM_END) ++ return -1; ++ n = kBufferSize - lzfile->strm.avail_out; ++ if (n && fwrite(lzfile->buf, 1, n, lzfile->file) != n) ++ return -1; ++ if (ret == LZMA_STREAM_END) ++ break; ++ } ++ } ++ lzma_end(&lzfile->strm); ++ return fclose(lzfile->file); ++ free(lzfile); ++} ++ ++static ssize_t lzread(LZFILE *lzfile, void *buf, size_t len) ++{ ++ lzma_ret ret; ++ int eof = 0; ++ ++ if (!lzfile || lzfile->encoding) ++ return -1; ++ if (lzfile->eof) ++ return 0; ++ lzfile->strm.next_out = buf; ++ lzfile->strm.avail_out = len; ++ for (;;) { ++ if (!lzfile->strm.avail_in) { ++ lzfile->strm.next_in = lzfile->buf; ++ lzfile->strm.avail_in = fread(lzfile->buf, 1, kBufferSize, lzfile->file); ++ if (!lzfile->strm.avail_in) ++ eof = 1; ++ } ++ ret = lzma_code(&lzfile->strm, LZMA_RUN); ++ if (ret == LZMA_STREAM_END) { ++ lzfile->eof = 1; ++ return len - lzfile->strm.avail_out; ++ } ++ if (ret != LZMA_OK) ++ return -1; ++ if (!lzfile->strm.avail_out) ++ return len; ++ if (eof) ++ return -1; ++ } ++} ++ ++static ssize_t lzwrite(LZFILE *lzfile, void *buf, size_t len) ++{ ++ lzma_ret ret; ++ int n; ++ if (!lzfile || !lzfile->encoding) ++ return -1; ++ if (!len) ++ return 0; ++ lzfile->strm.next_in = buf; ++ lzfile->strm.avail_in = len; ++ for (;;) { ++ lzfile->strm.next_out = lzfile->buf; ++ lzfile->strm.avail_out = kBufferSize; ++ ret = lzma_code(&lzfile->strm, LZMA_RUN); ++ if (ret != LZMA_OK) ++ return -1; ++ n = kBufferSize - lzfile->strm.avail_out; ++ if (n && fwrite(lzfile->buf, 1, n, lzfile->file) != n) ++ return -1; ++ if (!lzfile->strm.avail_in) ++ return len; ++ } ++} ++ ++/* =============================================================== */ ++ ++static inline /*@dependent@*/ void * lzdFileno(FD_t fd) ++ /*@*/ ++{ ++ void * rc = NULL; ++ int i; ++ ++ FDSANE(fd); ++ for (i = fd->nfps; i >= 0; i--) { ++/*@-boundsread@*/ ++ FDSTACK_t * fps = &fd->fps[i]; ++/*@=boundsread@*/ ++ if (fps->io != lzdio) ++ continue; ++ rc = fps->fp; ++ break; ++ } ++ ++ return rc; ++} ++ ++/*@-globuse@*/ ++static /*@null@*/ FD_t lzdOpen(const char * path, const char * mode) ++ /*@globals fileSystem @*/ ++ /*@modifies fileSystem @*/ ++{ ++ FD_t fd; ++ LZFILE *lzfile; ++ if ((lzfile = lzopen(path, mode)) == NULL) ++ return NULL; ++ fd = fdNew("open (lzdOpen)"); ++ fdPop(fd); fdPush(fd, lzdio, lzfile, -1); ++ return fdLink(fd, "lzdOpen"); ++} ++/*@=globuse@*/ ++ ++ ++/*@-globuse@*/ ++static /*@null@*/ FD_t lzdFdopen(void * cookie, const char * fmode) ++ /*@globals fileSystem, internalState @*/ ++ /*@modifies fileSystem, internalState @*/ ++{ ++ FD_t fd = c2f(cookie); ++ int fdno; ++ LZFILE *lzfile; ++ ++ if (fmode == NULL) return NULL; ++ fdno = fdFileno(fd); ++ fdSetFdno(fd, -1); /* XXX skip the fdio close */ ++ if (fdno < 0) return NULL; ++ lzfile = lzdopen(fdno, fmode); ++ if (lzfile == NULL) return NULL; ++ fdPush(fd, lzdio, lzfile, fdno); ++ return fdLink(fd, "lzdFdopen"); ++} ++/*@=globuse@*/ ++ ++/*@-globuse@*/ ++static int lzdFlush(FD_t fd) ++ /*@globals fileSystem @*/ ++ /*@modifies fileSystem @*/ ++{ ++ return lzflush(lzdFileno(fd)); ++} ++/*@=globuse@*/ ++ ++/* =============================================================== */ ++/*@-globuse@*/ ++/*@-mustmod@*/ /* LCL: *buf is modified */ ++static ssize_t lzdRead(void * cookie, /*@out@*/ char * buf, size_t count) ++ /*@globals fileSystem, internalState @*/ ++ /*@modifies *buf, fileSystem, internalState @*/ ++{ ++ FD_t fd = c2f(cookie); ++ LZFILE *lzfile; ++ ssize_t rc = 0; ++ ++ if (fd->bytesRemain == 0) return 0; /* XXX simulate EOF */ ++ lzfile = lzdFileno(fd); ++ fdstat_enter(fd, FDSTAT_READ); ++ if (lzfile) ++ /*@-compdef@*/ ++ rc = lzread(lzfile, buf, count); ++ /*@=compdef@*/ ++ if (rc == -1) { ++ fd->errcookie = "Lzma: decoding error"; ++ } else if (rc >= 0) { ++ fdstat_exit(fd, FDSTAT_READ, rc); ++ /*@-compdef@*/ ++ if (fd->ndigests && rc > 0) fdUpdateDigests(fd, (void *)buf, rc); ++ /*@=compdef@*/ ++ } ++ return rc; ++} ++/*@=mustmod@*/ ++/*@=globuse@*/ ++ ++/*@-globuse@*/ ++static ssize_t lzdWrite(void * cookie, const char * buf, size_t count) ++/*@globals fileSystem, internalState @*/ ++/*@modifies fileSystem, internalState @*/ ++{ ++ FD_t fd = c2f(cookie); ++ LZFILE *lzfile; ++ ssize_t rc = 0; ++ ++ if (fd == NULL || fd->bytesRemain == 0) return 0; /* XXX simulate EOF */ ++ ++ if (fd->ndigests && count > 0) fdUpdateDigests(fd, (void *)buf, count); ++ ++ lzfile = lzdFileno(fd); ++ ++ fdstat_enter(fd, FDSTAT_WRITE); ++ rc = lzwrite(lzfile, (void *)buf, count); ++ if (rc < 0) { ++ fd->errcookie = "Lzma: encoding error"; ++ } else if (rc > 0) { ++ fdstat_exit(fd, FDSTAT_WRITE, rc); ++ } ++ return rc; ++} ++ ++static inline int lzdSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, ++ /*@unused@*/ int whence) ++ /*@*/ ++{ ++ FD_t fd = c2f(cookie); ++ ++ LZDONLY(fd); ++ return -2; ++} ++ ++static int lzdClose( /*@only@*/ void * cookie) ++ /*@globals fileSystem, internalState @*/ ++ /*@modifies fileSystem, internalState @*/ ++{ ++ FD_t fd = c2f(cookie); ++ LZFILE *lzfile; ++ int rc; ++ ++ lzfile = lzdFileno(fd); ++ ++ if (lzfile == NULL) return -2; ++ fdstat_enter(fd, FDSTAT_CLOSE); ++ /*@-dependenttrans@*/ ++ rc = lzclose(lzfile); ++ /*@=dependenttrans@*/ ++ ++ /* XXX TODO: preserve fd if errors */ ++ ++ if (fd) { ++ if (rc == -1) { ++ fd->errcookie = strerror(ferror(lzfile->file)); ++ } else if (rc >= 0) { ++ fdstat_exit(fd, FDSTAT_CLOSE, rc); ++ } ++ } ++ ++DBGIO(fd, (stderr, "==>\tlzdClose(%p) rc %lx %s\n", cookie, (unsigned long)rc, fdbg(fd))); ++ ++ if (_rpmio_debug || rpmIsDebug()) fdstat_print(fd, "LZDIO", stderr); ++ /*@-branchstate@*/ ++ if (rc == 0) ++ fd = fdFree(fd, "open (lzdClose)"); ++ /*@=branchstate@*/ ++ return rc; ++} ++ ++/*@-type@*/ /* LCL: function typedefs */ ++static struct FDIO_s lzdio_s = { ++ lzdRead, lzdWrite, lzdSeek, lzdClose, XfdLink, XfdFree, XfdNew, fdFileno, ++ NULL, lzdOpen, lzdFileno, lzdFlush, NULL, NULL, NULL, NULL, NULL ++}; ++/*@=type@*/ ++FDIO_t lzdio = /*@-compmempass@*/ &lzdio_s /*@=compmempass@*/ ; ++ + /* =============================================================== */ + /*@observer@*/ + static const char * getFdErrstr (FD_t fd) +@@ -2647,7 +2992,9 @@ static const char * getFdErrstr (FD_t fd + errstr = fd->errcookie; + } else + #endif /* HAVE_BZLIB_H */ +- ++ if (fdGetIo(fd) == lzdio) { ++ errstr = fd->errcookie; ++ } else + { + errstr = (fd->syserrno ? strerror(fd->syserrno) : ""); + } +@@ -2961,6 +3308,9 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n" + fd = bzdFdopen(fd, zstdio); + /*@=internalglobs@*/ + #endif ++ } else if (!strcmp(end, "lzdio")) { ++ iof = lzdio; ++ fd = lzdFdopen(fd, zstdio); + } else if (!strcmp(end, "ufdio")) { + iof = ufdio; + } else if (!strcmp(end, "fpio")) { +@@ -3148,6 +3498,9 @@ int Ferror(FD_t fd) + ec = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0; + i--; /* XXX fdio under bzdio always has fdno == -1 */ + #endif ++ } else if (fps->io == lzdio) { ++ ec = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0; ++ i--; /* XXX fdio under lzdio always has fdno == -1 */ + } else { + /* XXX need to check ufdio/gzdio/bzdio/fdio errors correctly. */ + ec = (fdFileno(fd) < 0 ? -1 : 0); diff --git a/lzma-payload.diff b/lzma-payload.diff new file mode 100644 index 0000000..2f232f0 --- /dev/null +++ b/lzma-payload.diff @@ -0,0 +1,108 @@ +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 +@@ -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"); + } ++ if (s[1] == 'l' && s[2] == 'z') { ++ (void) headerAddEntry(h, RPMTAG_PAYLOADCOMPRESSOR, RPM_STRING_TYPE, ++ "lzma", 1); ++ (void) rpmlibNeedsFeature(h, "PayloadIsLzma", "4.4.2-1"); ++ } + 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); + t = stpcpy(t, ".gzdio"); + if (!strcmp(payload_compressor, "bzip2")) + t = stpcpy(t, ".bzdio"); ++ if (!strcmp(payload_compressor, "lzma")) ++ t = stpcpy(t, ".lzdio"); + 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 + ( 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 } + }; + + 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.\ + # 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 +@@ -76,6 +76,8 @@ int main(int argc, char **argv) + t = stpcpy(t, ".gzdio"); + if (!strcmp(payload_compressor, "bzip2")) + t = stpcpy(t, ".bzdio"); ++ if (!strcmp(payload_compressor, "lzma")) ++ t = stpcpy(t, ".lzdio"); + } + + 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, + + /** + */ ++/*@observer@*/ /*@unchecked@*/ extern FDIO_t lzdio; ++ ++/** ++ */ + /*@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 +@@ -23,4 +23,14 @@ dl=`expr 256 \* \( 256 \* \( 256 \* $6 + + hdrsize=`expr 8 + 16 \* $il + $dl` + o=`expr $o + $hdrsize` + +-dd if=$pkg ibs=$o skip=1 2>/dev/null | gunzip ++comp=`dd if="$pkg" ibs=$o skip=1 count=1 2>/dev/null \ ++ | dd bs=3 count=1 2>/dev/null` ++ ++gz="`echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }'`" ++case "$comp" in ++ BZh) dd if="$pkg" ibs=$o skip=1 2>/dev/null | bunzip2 ;; ++ "$gz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;; ++ # no magic in old lzma format, if unknown we assume that's lzma for now ++ *) 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 @@ + @WITH_MAGIC_LIB@ \ + @WITH_ZLIB_LIB@ \ + -lpthread +-librpmio_la_LIBADD = $(BEECRYPTLOBJS) ++librpmio_la_LIBADD = $(BEECRYPTLOBJS) -llzma + librpmio_la_DEPENDENCIES = .created + + .created: diff --git a/rpm-python.spec b/rpm-python.spec index 4317ddd..97fae89 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 212 +Release: 220 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 1cc1780..28601e5 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Tue Mar 18 17:12:00 CET 2008 - mls@suse.de + +- make ia32 compatible to ia64, like it was in SLES9 [bnc#367705] +- fix memory leak and endless loops in lzma code +- make rpm provide the right lzma rpmlib name + +------------------------------------------------------------------- +Tue Mar 18 13:33:25 CET 2008 - schwab@suse.de + +- Fix broken db configuration. + +------------------------------------------------------------------- +Fri Mar 14 21:54:57 CET 2008 - coolo@suse.de + +- change it to the "alone" file format used by stable + distributions of 7zip and lzma + +------------------------------------------------------------------- +Fri Mar 14 18:05:18 CET 2008 - coolo@suse.de + +- daring some more compression time to get an overall picture + +------------------------------------------------------------------- +Thu Mar 13 08:11:47 CET 2008 - coolo@suse.de + +- support lzma payload using liblzma + ------------------------------------------------------------------- Thu Feb 21 21:58:39 CET 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index c4f0e67..abdb531 100644 --- a/rpm.spec +++ b/rpm.spec @@ -14,14 +14,14 @@ Name: rpm License: GPL v2 or later Group: System/Packages -BuildRequires: libbz2-devel ncurses-devel zlib-devel +BuildRequires: libbz2-devel lzma-alpha-devel ncurses-devel zlib-devel Provides: rpminst %define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 170 +Release: 177 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -130,6 +130,8 @@ Patch100: rpm-gcc43.diff Patch101: lzma.diff Patch102: rpm-shorten-changelog.diff Patch103: noautoreloc.diff +Patch104: lzma-payload.diff +Patch105: lzma-payload-2.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -201,6 +203,7 @@ rm -f rpmdb/db.h %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 +%patch -P 104 -P 105 -b .lzma chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -231,8 +234,6 @@ rm po/de.gmo make %{?jobs:-j%jobs} %install -rm -rf $RPM_BUILD_ROOT -mkdir $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/share/locale ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale @@ -347,7 +348,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 398 +Release: 405 # %description -n popt @@ -370,7 +371,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 398 +Release: 405 Requires: popt = 1.7 Requires: glibc-devel @@ -405,6 +406,19 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Mar 18 2008 mls@suse.de +- make ia32 compatible to ia64, like it was in SLES9 [bnc#367705] +- fix memory leak and endless loops in lzma code +- make rpm provide the right lzma rpmlib name +* Tue Mar 18 2008 schwab@suse.de +- Fix broken db configuration. +* Fri Mar 14 2008 coolo@suse.de +- change it to the "alone" file format used by stable + distributions of 7zip and lzma +* Fri Mar 14 2008 coolo@suse.de +- daring some more compression time to get an overall picture +* Thu Mar 13 2008 coolo@suse.de +- support lzma payload using liblzma * Thu Feb 21 2008 mls@suse.de - do not configure autoreloc or colors * Thu Jan 31 2008 ro@suse.de diff --git a/rpmrc.diff b/rpmrc.diff index 399a67a..a974bf8 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -157,9 +157,12 @@ Index: rpmrc.in arch_compat: armv4l: armv3l arch_compat: armv3l: noarch -@@ -308,7 +325,7 @@ arch_compat: s390x: s390 noarch +@@ -306,9 +323,9 @@ arch_compat: i370: noarch + arch_compat: s390: noarch + arch_compat: s390x: s390 noarch - arch_compat: ia64: noarch +-arch_compat: ia64: noarch ++arch_compat: ia64: i686 noarch -arch_compat: x86_64: amd64 athlon noarch +arch_compat: x86_64: amd64 em64t athlon noarch From e00b4c22b98af391e746c269e82832abf874238afed5efde65bfb9f56686ad39 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 27 Mar 2008 17:08:51 +0000 Subject: [PATCH 036/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=36 --- findlang.diff | 19 +++++++++---------- macrosin.diff | 2 +- rpm-python.changes | 5 +++++ rpm-python.spec | 8 +++++--- rpm.changes | 6 ++++++ rpm.spec | 11 +++++++---- 6 files changed, 33 insertions(+), 18 deletions(-) diff --git a/findlang.diff b/findlang.diff index 9b9b891..ed20524 100644 --- a/findlang.diff +++ b/findlang.diff @@ -1,8 +1,6 @@ -SUSE patches for find-lang. - ---- ./scripts/find-lang.sh.orig 2004-06-20 18:55:19.000000000 +0000 -+++ ./scripts/find-lang.sh 2005-12-19 15:22:52.000000000 +0000 -@@ -28,10 +28,10 @@ the top of the tree containing the files +--- 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 @@ 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 @@ -16,7 +14,7 @@ SUSE patches for find-lang. --all-name match all package/domain names --without-mo not find locales files EOF -@@ -52,8 +52,8 @@ else NAME=$1 +@@ -52,8 +52,8 @@ fi shift @@ -27,7 +25,7 @@ SUSE patches for find-lang. MO= MO_NAME=$NAME.lang ALL_NAME=# -@@ -61,12 +61,12 @@ NO_ALL_NAME= +@@ -61,12 +61,12 @@ while test $# -gt 0 ; do case "${1}" in @@ -44,7 +42,7 @@ SUSE patches for find-lang. shift ;; --without-mo ) -@@ -85,26 +85,43 @@ while test $# -gt 0 ; do +@@ -85,26 +85,43 @@ esac done @@ -80,8 +78,9 @@ SUSE patches for find-lang. -'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1: +'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1: '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\):: - '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2: +-'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2: -'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir \1: ++'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2: +'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir %doc \1: '"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\):: -'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) \1\2: @@ -94,7 +93,7 @@ SUSE patches for find-lang. find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: -@@ -112,12 +129,20 @@ s:'"$TOP_DIR"':: +@@ -112,12 +129,20 @@ '"$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: diff --git a/macrosin.diff b/macrosin.diff index 77c9962..a181192 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -47,7 +47,7 @@ Index: macros.in # #%_source_payload w9.gzdio -#%_binary_payload w9.gzdio -+%_binary_payload w9.bzdio ++%_binary_payload w2.lzdio # The signature to use and the location of configuration files for # signing packages with PGP. diff --git a/rpm-python.changes b/rpm-python.changes index 4f38533..c9af26a 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 27 14:47:18 CET 2008 - coolo@suse.de + +- fix buildrequires + ------------------------------------------------------------------- Fri May 25 16:20:53 CEST 2007 - mls@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 97fae89..eb0a09d 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -12,12 +12,12 @@ Name: rpm-python -BuildRequires: libbz2-devel ncurses-devel python-devel zlib-devel +BuildRequires: libbz2-devel lzma-alpha-devel ncurses-devel python-devel zlib-devel License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 220 +Release: 221 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -62,11 +62,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog +* Thu Mar 27 2008 coolo@suse.de +- fix buildrequires * Fri May 25 2007 mls@suse.de - fix unicode queries * Fri Mar 30 2007 rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires. -* Thu Oct 19 2006 mls@suse.de +* Wed Oct 18 2006 mls@suse.de - use rpm.spec for building instead of duplication everything - delete superfluous .a and .la files [#202604] - create .pyc and .pyo files [#205711] diff --git a/rpm.changes b/rpm.changes index 28601e5..e759886 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 27 14:43:24 CET 2008 - coolo@suse.de + +- switch payload default to lzma -2 +- flag GNOME docu as %doc (bnc#358838) + ------------------------------------------------------------------- Tue Mar 18 17:12:00 CET 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index abdb531..0d46afc 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 177 +Release: 180 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -156,7 +156,7 @@ Summary: Include Files and Libraries mandatory for Development. License: GPL v2 or later Group: System/Packages Requires: rpm = %{version} -Requires: popt-devel zlib-devel bzip2 libbz2-devel +Requires: popt-devel zlib-devel bzip2 libbz2-devel lzma-alpha-devel %description devel This package contains the RPM C library and header files. These @@ -348,7 +348,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 405 +Release: 408 # %description -n popt @@ -371,7 +371,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 405 +Release: 408 Requires: popt = 1.7 Requires: glibc-devel @@ -406,6 +406,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Mar 27 2008 coolo@suse.de +- switch payload default to lzma -2 +- flag GNOME docu as %%doc (bnc#358838) * Tue Mar 18 2008 mls@suse.de - make ia32 compatible to ia64, like it was in SLES9 [bnc#367705] - fix memory leak and endless loops in lzma code From 8fbfaaf411b42e0b51c9d4adcd6e79ca1f5bebec13e7b90a08164ee81e3d2cdd Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Mar 2008 16:11:41 +0000 Subject: [PATCH 037/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=37 --- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 11 ++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index eb0a09d..948530a 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 221 +Release: 222 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index e759886..8845a8f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 28 14:54:04 CET 2008 - coolo@suse.de + +- leave the rpm package itself with bzip payload to + avoid blocking updates from within running system + ------------------------------------------------------------------- Thu Mar 27 14:43:24 CET 2008 - coolo@suse.de diff --git a/rpm.spec b/rpm.spec index 0d46afc..bcd0f1f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 180 +Release: 181 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -134,6 +134,8 @@ Patch104: lzma-payload.diff Patch105: lzma-payload-2.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # +# avoid bootstrapping problem +%define _binary_payload w9.bzdio %description RPM Package Manager is the main tool for managing the software packages @@ -348,7 +350,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 408 +Release: 409 # %description -n popt @@ -371,7 +373,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 408 +Release: 409 Requires: popt = 1.7 Requires: glibc-devel @@ -406,6 +408,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Mar 28 2008 coolo@suse.de +- leave the rpm package itself with bzip payload to + avoid blocking updates from within running system * Thu Mar 27 2008 coolo@suse.de - switch payload default to lzma -2 - flag GNOME docu as %%doc (bnc#358838) From 007fcda01c751238cea38043023336411f8a0fea5ce06060d54773f7b34eac8e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 9 Apr 2008 16:18:03 +0000 Subject: [PATCH 038/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=38 --- debugsource-package.diff | 107 +++++++++++++++++++++++++++++++++++++++ finddebuginfo.diff | 24 +++++---- rpm-python.spec | 2 +- rpm-suse_macros | 2 - rpm.changes | 5 ++ rpm.spec | 26 ++++++---- 6 files changed, 143 insertions(+), 23 deletions(-) create mode 100644 debugsource-package.diff diff --git a/debugsource-package.diff b/debugsource-package.diff new file mode 100644 index 0000000..c7839f4 --- /dev/null +++ b/debugsource-package.diff @@ -0,0 +1,107 @@ +Subject: Split sources for debugging into separate -debugsource package + +At the moment the -debuginfo package also include the sources where used to +build the binary. The patches moves them into a separate package -debugsource. + +--- + macros.in | 12 ++++++++++++ + scripts/find-debuginfo.sh | 39 ++++++++++++++++++++++++--------------- + 2 files changed, 36 insertions(+), 15 deletions(-) + +Index: b/macros.in +=================================================================== +--- a/macros.in ++++ b/macros.in +@@ -179,6 +179,18 @@ Debug information is useful when develop + package or when debugging this package.\ + %files debuginfo -f debugfiles.list\ + %defattr(-,root,root)\ ++\ ++%package debugsource\ ++Summary: Debug sources for package %{name}\ ++Group: Development/Debug\ ++AutoReqProv: 0\ ++Requires: %{name}-debuginfo = %{version}-%{release}\ ++%description debugsource\ ++This package provides debug sources for package %{name}.\ ++Debug sources are useful when developing applications that use this\ ++package or when debugging this package.\ ++%files debugsource -f debugsources.list\ ++%defattr(-,root,root)\ + %{nil} + + %_defaultdocdir %{_usr}/doc/packages +Index: b/scripts/find-debuginfo.sh +=================================================================== +--- a/scripts/find-debuginfo.sh ++++ b/scripts/find-debuginfo.sh +@@ -7,11 +7,13 @@ 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` + + # Strip ELF binaries + for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ` +@@ -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" + + # 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 + ++# 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 | \ ++ 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 ++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 | \ ++ sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTSOURCE diff --git a/finddebuginfo.diff b/finddebuginfo.diff index b803fb5..e33a7b1 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,6 +1,12 @@ ---- scripts/find-debuginfo.sh +--- + scripts/find-debuginfo.sh | 78 ++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 65 insertions(+), 13 deletions(-) + +Index: scripts/find-debuginfo.sh +=================================================================== +--- scripts/find-debuginfo.sh.orig +++ scripts/find-debuginfo.sh -@@ -14,9 +14,18 @@ +@@ -14,9 +14,18 @@ debugdir="${RPM_BUILD_ROOT}/usr/lib/debu echo -n > $SOURCEFILE # Strip ELF binaries @@ -21,7 +27,7 @@ dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p") bn=$(basename $f .debug).debug -@@ -25,6 +34,8 @@ +@@ -25,6 +34,8 @@ do [ -f "${debugfn}" ] && continue echo extracting debug info from $f @@ -30,7 +36,7 @@ /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" # A binary already copied into /usr/lib/debug doesn't get stripped, -@@ -34,19 +45,60 @@ +@@ -34,19 +45,60 @@ do esac mkdir -p "${debugdn}" @@ -43,7 +49,7 @@ + objcopy --only-keep-debug $f $debugfn || : + strip_option="--strip-all" + case "$f" in -+ *.ko|*.a) ++ *.ko) + strip_option="--strip-debug" + ;; + *$STRIP_KEEP_SYMTAB*) @@ -76,7 +82,9 @@ -# 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 -+ + +-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 @@ -90,9 +98,7 @@ + cp "`readlink -f $RPM_BUILD_DIR/$link`" "$DBASE/$link" + fi +done - --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 ++ +{ + test -d ${RPM_BUILD_ROOT}/usr/lib/debug && echo /usr/lib/debug + echo /usr/src/debug diff --git a/rpm-python.spec b/rpm-python.spec index 948530a..94fe208 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 222 +Release: 226 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index 2d95b58..9b3bd34 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -15,8 +15,6 @@ # package build macros %makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install -%tcl_version %(echo 'puts [package require Tcl]' | tclsh) -%tclscriptdir %_datadir/tcl %rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/") %rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")') %insserv_prereq insserv sed diff --git a/rpm.changes b/rpm.changes index 8845a8f..8ea697d 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 9 12:56:57 CEST 2008 - jblunck@suse.de + +- Put debug sources into separate -debugsource package. + ------------------------------------------------------------------- Fri Mar 28 14:54:04 CET 2008 - coolo@suse.de diff --git a/rpm.spec b/rpm.spec index bcd0f1f..f6037be 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 181 +Release: 184 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -132,6 +132,7 @@ Patch102: rpm-shorten-changelog.diff Patch103: noautoreloc.diff Patch104: lzma-payload.diff Patch105: lzma-payload-2.diff +Patch106: debugsource-package.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -206,6 +207,7 @@ rm -f rpmdb/db.h %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 %patch -P 104 -P 105 -b .lzma +%patch106 -p1 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -350,7 +352,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 409 +Release: 412 # %description -n popt @@ -373,7 +375,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 409 +Release: 412 Requires: popt = 1.7 Requires: glibc-devel @@ -408,6 +410,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Wed Apr 09 2008 jblunck@suse.de +- Put debug sources into separate -debugsource package. * Fri Mar 28 2008 coolo@suse.de - leave the rpm package itself with bzip payload to avoid blocking updates from within running system @@ -549,7 +553,7 @@ Authors: %%kernel_module_package_buildreq, %%kernel_module_package, and inside %%kernel_module_package, the macros %%flavors_to_build and %%kernel_source. -* Wed Oct 18 2006 mls@suse.de +* Thu Oct 19 2006 mls@suse.de - split up jumbo patch in 78 small patches - fix lua directory handling [#201518] - add /etc/rpm directory to filelist [#208762] @@ -671,7 +675,7 @@ Authors: * Tue Jan 31 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Add version to additional Provides tag. We may need this for future Obsoletes. -* Fri Jan 27 2006 mls@suse.de +* Sat Jan 28 2006 mls@suse.de - added support for EssentialFor and Supports - enabled support for lua scripts * Fri Jan 27 2006 agruen@suse.de @@ -697,7 +701,7 @@ Authors: - don't ignore getcwd return value in build.c * Mon Dec 19 2005 mls@suse.de - fix find-lang.sh script -* Sun Dec 18 2005 mls@suse.de +* Mon Dec 19 2005 mls@suse.de - fix find-debuginfo script * Sun Dec 18 2005 mls@suse.de - don't assume root:root defattr @@ -748,7 +752,7 @@ Authors: - Fix ppc assembly syntax. * Wed Jun 08 2005 matz@suse.de - add STRIP_KEEP_SYMTAB to find-debuginfo.sh -* Sat May 21 2005 schwab@suse.de +* Sun May 22 2005 schwab@suse.de - find-debuginfo.sh: make writable before extracting debug info, simplify. * Thu May 19 2005 schwab@suse.de - Replace absolute symlinks when copying sources for debuginfo package. @@ -1050,7 +1054,7 @@ Authors: - the official arch_canon value for ppc64 is 16, not 5 * Thu Jan 16 2003 ma@suse.de - update subpackage popt to 1.6.4 -* Thu Dec 19 2002 schwab@suse.de +* Fri Dec 20 2002 schwab@suse.de - Update autogen patch. * Mon Nov 18 2002 stepan@suse.de - add m68k as chanonical architecture to configure.in @@ -1202,7 +1206,7 @@ Authors: - added requires for suse-build-key * Tue Feb 12 2002 ro@suse.de - tar option for bz2 is now "j" (re-added) -* Mon Feb 11 2002 ma@suse.de +* Tue Feb 12 2002 ma@suse.de - unk_ugname_cached.diff: Upon building a package, unpacking sources by calling tar from the spec file, may lead to files with unknown user/group names. If those files are to be included in the final @@ -1215,7 +1219,7 @@ Authors: which may cause a segmentation fault on cache lookup. This has been fixed. * Sat Jan 26 2002 ro@suse.de - apply configure-diff also on s390x -* Mon Jan 21 2002 bk@suse.de +* Tue Jan 22 2002 bk@suse.de - use RPM_OPT_FLAGS for compilation - add lib64 support for s390x - update srcdir-supplied rpm-suse_macros file to newest version @@ -1352,7 +1356,7 @@ Authors: - Fix in config.diff (use Makefile.am not Makefile.in) * Mon Apr 10 2000 schwab@suse.de - Fix config patch. -* Thu Apr 06 2000 bk@suse.de +* Fri Apr 07 2000 bk@suse.de - added /lib/libpopt.so* to filelist on s390 * Wed Apr 05 2000 bk@suse.de - uses autoconf and automake now From d34126f7a995507dd13227807f3f8b371fe599c9029e383f8d478dbb9947dc24 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 9 Apr 2008 19:09:43 +0000 Subject: [PATCH 039/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=39 --- debugsource-package.diff | 4 ++-- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/debugsource-package.diff b/debugsource-package.diff index c7839f4..6d5b16a 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -69,7 +69,7 @@ Index: b/scripts/find-debuginfo.sh +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 | \ ++find ${debugdir} -mindepth 0 -maxdepth 1 | \ + sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE -mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug @@ -103,5 +103,5 @@ Index: b/scripts/find-debuginfo.sh - 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 | \ ++find ${debugsrcdir} -mindepth 0 -maxdepth 1 | \ + sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTSOURCE diff --git a/rpm-python.spec b/rpm-python.spec index 94fe208..e4f63eb 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 226 +Release: 227 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 8ea697d..5ce45ec 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 9 21:00:30 CEST 2008 - jblunck@suse.de + +- Fix a bug in last commit that leads to /usr/src/debug not belonging + to any package. + ------------------------------------------------------------------- Wed Apr 9 12:56:57 CEST 2008 - jblunck@suse.de diff --git a/rpm.spec b/rpm.spec index f6037be..36b19f9 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 184 +Release: 185 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -352,7 +352,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 412 +Release: 413 # %description -n popt @@ -375,7 +375,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 412 +Release: 413 Requires: popt = 1.7 Requires: glibc-devel @@ -411,6 +411,9 @@ Authors: %changelog * Wed Apr 09 2008 jblunck@suse.de +- Fix a bug in last commit that leads to /usr/src/debug not belonging + to any package. +* Wed Apr 09 2008 jblunck@suse.de - Put debug sources into separate -debugsource package. * Fri Mar 28 2008 coolo@suse.de - leave the rpm package itself with bzip payload to From 9f470bb9fdf9acc9b6e8fd5cd48d77940fd65946626ec9ee44e5ab408b65bb2b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 9 Apr 2008 21:18:03 +0000 Subject: [PATCH 040/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=40 --- debugsource-package.diff | 4 ++-- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/debugsource-package.diff b/debugsource-package.diff index 6d5b16a..c7839f4 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -69,7 +69,7 @@ Index: b/scripts/find-debuginfo.sh +find ${debugdir} -type d -print0 | xargs -0 -r chmod 0755 +find ${debugdir} -type f -print0 | xargs -0 -r chmod 0644 + -+find ${debugdir} -mindepth 0 -maxdepth 1 | \ ++find ${debugdir} -mindepth 1 -maxdepth 1 | \ + sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE -mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug @@ -103,5 +103,5 @@ Index: b/scripts/find-debuginfo.sh - 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 0 -maxdepth 1 | \ ++find ${debugsrcdir} -mindepth 1 -maxdepth 1 | \ + sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTSOURCE diff --git a/rpm-python.spec b/rpm-python.spec index e4f63eb..63fcc24 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 227 +Release: 228 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 5ce45ec..ea2f495 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 9 23:15:48 CEST 2008 - mrueckert@suse.de + +- revert the last change as it leads to duplicated entries in the + file list + ------------------------------------------------------------------- Wed Apr 9 21:00:30 CEST 2008 - jblunck@suse.de diff --git a/rpm.spec b/rpm.spec index 36b19f9..26dbceb 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 185 +Release: 186 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -352,7 +352,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 413 +Release: 414 # %description -n popt @@ -375,7 +375,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 413 +Release: 414 Requires: popt = 1.7 Requires: glibc-devel @@ -410,6 +410,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Apr 10 2008 mrueckert@suse.de +- revert the last change as it leads to duplicated entries in the + file list * Wed Apr 09 2008 jblunck@suse.de - Fix a bug in last commit that leads to /usr/src/debug not belonging to any package. From 54896d919e062f6de8ad7f1c71fb5757f141cf9ecbbe3f9149dfe8c2bc8ad1bb Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 10 Apr 2008 11:14:36 +0000 Subject: [PATCH 041/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=41 --- baselibs.conf | 1 + rpm-python.spec | 2 +- rpm.changes | 13 +++++++++++++ rpm.spec | 15 ++++++++++++--- whatrequires-doc.diff | 14 ++++++++++++++ 5 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 baselibs.conf create mode 100644 whatrequires-doc.diff diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..2e87827 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +popt diff --git a/rpm-python.spec b/rpm-python.spec index 63fcc24..e4efb5d 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 228 +Release: 229 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index ea2f495..79fea82 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Apr 10 12:50:33 CEST 2008 - ro@suse.de + +- added baselibs.conf file for xxbit packages + +------------------------------------------------------------------- +Thu Apr 10 12:32:46 CEST 2008 - jw@suse.de + +- added whatrequires-doc.diff + Adds a hint to the misleading --whatrequires option, pointing to + the more useful -e --test. + Motivated by a talk thread started by Hubert. + ------------------------------------------------------------------- Wed Apr 9 23:15:48 CEST 2008 - mrueckert@suse.de diff --git a/rpm.spec b/rpm.spec index 26dbceb..d67ddca 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 186 +Release: 187 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -133,6 +133,7 @@ Patch103: noautoreloc.diff Patch104: lzma-payload.diff Patch105: lzma-payload-2.diff Patch106: debugsource-package.diff +Patch107: whatrequires-doc.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -208,6 +209,7 @@ rm -f rpmdb/db.h %patch -P 100 -P 101 -P 102 -P 103 %patch -P 104 -P 105 -b .lzma %patch106 -p1 +%patch107 -p1 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -352,7 +354,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 414 +Release: 415 # %description -n popt @@ -375,7 +377,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 414 +Release: 415 Requires: popt = 1.7 Requires: glibc-devel @@ -410,6 +412,13 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Apr 10 2008 ro@suse.de +- added baselibs.conf file for xxbit packages +* Thu Apr 10 2008 jw@suse.de +- added whatrequires-doc.diff + Adds a hint to the misleading --whatrequires option, pointing to + the more useful -e --test. + Motivated by a talk thread started by Hubert. * Thu Apr 10 2008 mrueckert@suse.de - revert the last change as it leads to duplicated entries in the file list diff --git a/whatrequires-doc.diff b/whatrequires-doc.diff new file mode 100644 index 0000000..ab8ce03 --- /dev/null +++ b/whatrequires-doc.diff @@ -0,0 +1,14 @@ +--- rpm-4.4.2/doc/rpm.8.orig 2008-04-10 12:02:59.000000000 +0200 ++++ rpm-4.4.2/doc/rpm.8 2008-04-10 12:30:16.923076000 +0200 +@@ -584,6 +584,11 @@ + .TP + \fB--whatrequires \fICAPABILITY\fB\fR + Query all packages that requires \fICAPABILITY\fR for proper functioning. ++.br ++Note that this does not return what requires a given package. ++A package usually provides multiple capabilities and file-names on which ++other packages may depend. To see the complete dependencies ++for a package, use \fB-e --test \fIPACKAGE_NAME\fB\fR + .SS "PACKAGE QUERY OPTIONS:" + .PP + .TP From 876a7c8ef69617b934d5e7b246b7ee73a5b13def417c95fb9b8588d15e7d6ec6 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 19 Apr 2008 21:47:59 +0000 Subject: [PATCH 042/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=42 --- debugsource-package.diff | 19 ++++++++++++------- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/debugsource-package.diff b/debugsource-package.diff index c7839f4..1e06af6 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -5,8 +5,8 @@ build the binary. The patches moves them into a separate package -debugsource. --- macros.in | 12 ++++++++++++ - scripts/find-debuginfo.sh | 39 ++++++++++++++++++++++++--------------- - 2 files changed, 36 insertions(+), 15 deletions(-) + scripts/find-debuginfo.sh | 43 ++++++++++++++++++++++++++----------------- + 2 files changed, 38 insertions(+), 17 deletions(-) Index: b/macros.in =================================================================== @@ -35,7 +35,7 @@ Index: b/scripts/find-debuginfo.sh =================================================================== --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh -@@ -7,11 +7,13 @@ else BUILDDIR=$1 +@@ -7,14 +7,16 @@ else BUILDDIR=$1 fi LISTFILE=$BUILDDIR/debugfiles.list @@ -49,8 +49,13 @@ Index: b/scripts/find-debuginfo.sh +[ -d "$TMPDIR" ] || TMPDIR="/tmp" +SOURCES_TMP=`mktemp $TMPDIR/rpmXXXXXX` - # 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 +-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) @@ -69,7 +74,7 @@ Index: b/scripts/find-debuginfo.sh +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 | \ ++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 @@ -103,5 +108,5 @@ Index: b/scripts/find-debuginfo.sh - 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 | \ ++find ${debugsrcdir} -mindepth 1 -maxdepth 1 2>/dev/null | \ + sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTSOURCE diff --git a/rpm-python.spec b/rpm-python.spec index e4efb5d..28d5f21 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 229 +Release: 231 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 79fea82..93aba28 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 16 17:57:43 CEST 2008 - jblunck@suse.de + +- Get rid of noise when no debuginfo was generated +- Never strip static libraries in find-debuginfo script + ------------------------------------------------------------------- Thu Apr 10 12:50:33 CEST 2008 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index d67ddca..26166af 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 187 +Release: 189 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -354,7 +354,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 415 +Release: 417 # %description -n popt @@ -377,7 +377,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 415 +Release: 417 Requires: popt = 1.7 Requires: glibc-devel @@ -412,6 +412,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Wed Apr 16 2008 jblunck@suse.de +- Get rid of noise when no debuginfo was generated +- Never strip static libraries in find-debuginfo script * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file for xxbit packages * Thu Apr 10 2008 jw@suse.de From 2429782fc0b202a9199552bde1de35bdab2dd211ff396bd449ffb2e22cc15046 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 6 May 2008 16:29:40 +0000 Subject: [PATCH 043/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=43 --- findksyms.diff | 9 +++++---- modalias-kernel_module.diff | 22 ++++++++++++++++------ noprovides.diff | 2 +- rpm-python.spec | 2 +- rpm.changes | 20 ++++++++++++++++++++ rpm.spec | 17 ++++++++++++++--- 6 files changed, 57 insertions(+), 15 deletions(-) diff --git a/findksyms.diff b/findksyms.diff index 88d4f02..b804b3b 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -29,7 +29,7 @@ Index: scripts/find-requires.ksyms =================================================================== --- /dev/null +++ scripts/find-requires.ksyms -@@ -0,0 +1,58 @@ +@@ -0,0 +1,59 @@ +#! /bin/bash + +IFS=$'\n' @@ -82,9 +82,10 @@ Index: scripts/find-requires.ksyms + | sort -u \ + | awk ' + { FS = "\t" ; OFS = "\t" } -+ NF == 3 { print "kernel(" $2 ") = " $3 -+ next } + { split($1, arr, "/") -+ print "ksym(" arr[3] ") = " arr[2] } ++ flavor = gensub(/.*-/, "", "", arr[1]) } ++ NF == 3 { print "kernel(" flavor ":" $2 ") = " $3 ++ next } ++ { print "ksym(" flavor ":" arr[3] ") = " arr[2] } + ' +fi diff --git a/modalias-kernel_module.diff b/modalias-kernel_module.diff index 4add934..ddee61d 100644 --- a/modalias-kernel_module.diff +++ b/modalias-kernel_module.diff @@ -1,16 +1,15 @@ -Index: scripts/find-supplements.ksyms -=================================================================== --- scripts/find-supplements.ksyms +++ scripts/find-supplements.ksyms -@@ -1,5 +1,6 @@ +@@ -1,6 +1,8 @@ #! /bin/sh +RPM_SOURCE_DIR=/usr/src/packages/SOURCES IFS=$'\n' ++PACKAGE=$1 case "$1" in -@@ -46,11 +47,43 @@ combine_modaliases() { - print_modaliases "$class" "$variants" "$pos" + kernel-module-*) ;; # Fedora kernel module package names start with +@@ -47,10 +49,53 @@ } -for module in $(grep -E '/lib/modules/.+\.ko$'); do @@ -20,12 +19,23 @@ Index: scripts/find-supplements.ksyms - | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" -done \ +aliases_of_filelist() { ++ modlist=$(mktemp) ++ have_module=1 + for module in $(grep -E '/lib/modules/.+\.ko$'); do + vermagic=$(/sbin/modinfo -F vermagic "$module") + krel=${vermagic%% *} ++ if ! test -x /sbin/modinfo; then ++ echo "ERROR: add module-init-tools to BuildRequires" >&2 ++ exit 1 ++ fi ++ have_module=0 + /sbin/modinfo -F alias "$module" \ -+ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" ++ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist + done ++ if ! test -s "$modlist" && test $have_module = 0; then ++ echo "packageand(kernel-${krel##*-}:$PACKAGE-kmp)" ++ fi ++ rm -f $modlist +} + +aliases_of_specfile_macro() { diff --git a/noprovides.diff b/noprovides.diff index 095948f..c8e7fb8 100644 --- a/noprovides.diff +++ b/noprovides.diff @@ -17,7 +17,7 @@ for obsoleted packages. It's just too dangerous. mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, Name, 0); else - mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0); -+ 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/rpm-python.spec b/rpm-python.spec index 28d5f21..c152705 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 231 +Release: 239 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 93aba28..5c9bc90 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Tue May 6 18:01:34 CEST 2008 - mls@suse.de + +- enable all parts of the noprovides patch again, making our rpm + compatible to rpm4 + +------------------------------------------------------------------- +Fri May 2 15:50:17 CEST 2008 - dmueller@suse.de + +- add at least one supplements prefering the right kernel flavour + if no modalias could be generated (bnc#384084) + +------------------------------------------------------------------- +Thu May 1 22:43:17 CEST 2008 - agruen@suse.de + +- For kernel modules, require "kernel(flavor:symset) = version" + instead of "kernel(symset) = version". This disambiguates + the case where several kernel flavors end up with the same + modver checksums (190163, 355628). + ------------------------------------------------------------------- Wed Apr 16 17:57:43 CEST 2008 - jblunck@suse.de diff --git a/rpm.spec b/rpm.spec index 26166af..52955fc 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 189 +Release: 193 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -354,7 +354,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 417 +Release: 421 # %description -n popt @@ -377,7 +377,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 417 +Release: 421 Requires: popt = 1.7 Requires: glibc-devel @@ -412,6 +412,17 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue May 06 2008 mls@suse.de +- enable all parts of the noprovides patch again, making our rpm + compatible to rpm4 +* Fri May 02 2008 dmueller@suse.de +- add at least one supplements prefering the right kernel flavour + if no modalias could be generated (bnc#384084) +* Fri May 02 2008 agruen@suse.de +- For kernel modules, require "kernel(flavor:symset) = version" + instead of "kernel(symset) = version". This disambiguates + the case where several kernel flavors end up with the same + modver checksums (190163, 355628). * Wed Apr 16 2008 jblunck@suse.de - Get rid of noise when no debuginfo was generated - Never strip static libraries in find-debuginfo script From 15e46e9b75aff850ca13530dadfbe02729542055dc3f700618754c06478581b9 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 16 May 2008 19:47:05 +0000 Subject: [PATCH 044/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=44 --- debugsource-package.diff | 8 ++++---- remove-brp-strips.diff | 16 ++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 13 +++++++------ whatrequires-doc.diff | 4 ++-- 6 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 remove-brp-strips.diff diff --git a/debugsource-package.diff b/debugsource-package.diff index 1e06af6..13b4c63 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -10,8 +10,8 @@ build the binary. The patches moves them into a separate package -debugsource. Index: b/macros.in =================================================================== ---- a/macros.in -+++ b/macros.in +--- macros.in ++++ macros.in @@ -179,6 +179,18 @@ Debug information is useful when develop package or when debugging this package.\ %files debuginfo -f debugfiles.list\ @@ -33,8 +33,8 @@ Index: b/macros.in %_defaultdocdir %{_usr}/doc/packages Index: b/scripts/find-debuginfo.sh =================================================================== ---- a/scripts/find-debuginfo.sh -+++ b/scripts/find-debuginfo.sh +--- scripts/find-debuginfo.sh ++++ scripts/find-debuginfo.sh @@ -7,14 +7,16 @@ else BUILDDIR=$1 fi diff --git a/remove-brp-strips.diff b/remove-brp-strips.diff new file mode 100644 index 0000000..751f609 --- /dev/null +++ b/remove-brp-strips.diff @@ -0,0 +1,16 @@ +Subject: remove references to removed brp scripts + +Some brp-scripts are not used in openSUSE, remove references +to it + +--- platform.in ++++ platform.in +@@ -55,8 +55,6 @@ + %__os_install_post \ + @RPMCONFIGDIR@/brp-compress \ + @RPMCONFIGDIR@/brp-strip \ +- @RPMCONFIGDIR@/brp-strip-static-archive \ +- @RPMCONFIGDIR@/brp-strip-comment-note \ + %{nil} + + %__spec_install_post\ diff --git a/rpm-python.spec b/rpm-python.spec index c152705..81ee893 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 239 +Release: 243 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 5c9bc90..ac9c00d 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 15 14:31:51 CEST 2008 - dmueller@suse.de + +- remove references to brp-strip-comment-note (bnc#390163) + ------------------------------------------------------------------- Tue May 6 18:01:34 CEST 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 52955fc..c9c1e3c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 193 +Release: 196 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -134,6 +134,7 @@ Patch104: lzma-payload.diff Patch105: lzma-payload-2.diff Patch106: debugsource-package.diff Patch107: whatrequires-doc.diff +Patch108: remove-brp-strips.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -206,10 +207,8 @@ rm -f rpmdb/db.h %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 +%patch -P 100 -P 101 -P 102 -P 103 -P -P 106 -P 107 -P 108 %patch -P 104 -P 105 -b .lzma -%patch106 -p1 -%patch107 -p1 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -354,7 +353,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 421 +Release: 424 # %description -n popt @@ -377,7 +376,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 421 +Release: 424 Requires: popt = 1.7 Requires: glibc-devel @@ -412,6 +411,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu May 15 2008 dmueller@suse.de +- remove references to brp-strip-comment-note (bnc#390163) * Tue May 06 2008 mls@suse.de - enable all parts of the noprovides patch again, making our rpm compatible to rpm4 diff --git a/whatrequires-doc.diff b/whatrequires-doc.diff index ab8ce03..2ea6033 100644 --- a/whatrequires-doc.diff +++ b/whatrequires-doc.diff @@ -1,5 +1,5 @@ ---- rpm-4.4.2/doc/rpm.8.orig 2008-04-10 12:02:59.000000000 +0200 -+++ rpm-4.4.2/doc/rpm.8 2008-04-10 12:30:16.923076000 +0200 +--- doc/rpm.8.orig 2008-04-10 12:02:59.000000000 +0200 ++++ doc/rpm.8 2008-04-10 12:30:16.923076000 +0200 @@ -584,6 +584,11 @@ .TP \fB--whatrequires \fICAPABILITY\fB\fR From 881bdd39be356ca248966beb26ddd8a2e16ecd30a19c5e8a488c4695963450f7 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 26 Jun 2008 16:55:58 +0000 Subject: [PATCH 045/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=45 --- db.diff | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 9 ++++---- 4 files changed, 71 insertions(+), 5 deletions(-) diff --git a/db.diff b/db.diff index e608601..741de66 100644 --- a/db.diff +++ b/db.diff @@ -53,6 +53,66 @@ if test "$db_cv_cxx" = "yes"; then AC_MSG_ERROR( [--with-uniquename is not compatible with --enable-cxx]) +--- db/dist/configure.ac ++++ db/dist/configure.ac +@@ -690,14 +690,14 @@ LTLIBOBJS=`echo "$LIB@&t@OBJS" | + AC_SUBST(LTLIBOBJS) + + # Initial output file list. +-CREATE_LIST="Makefile +- db_cxx.h:$srcdir/../dbinc/db_cxx.in +- db_int.h:$srcdir/../dbinc/db_int.in ++CREATE_LIST="Makefile \ ++ db_cxx.h:$srcdir/../dbinc/db_cxx.in \ ++ db_int.h:$srcdir/../dbinc/db_int.in \ + include.tcl:$srcdir/../test/include.tcl" + + # MinGW needs win_db.h. + if test "$db_cv_mingw" = "yes"; then +-CREATE_LIST="$CREATE_LIST ++CREATE_LIST="$CREATE_LIST \ + win_db.h:$srcdir/win_db.in" + fi + +@@ -705,10 +705,10 @@ fi + # prototypes, and, if configured for unique names, a list of #defines + # to do DB_VERSION_UNIQUE_NAME substitution. + if test "$db_cv_uniquename" = "yes"; then +- CREATE_LIST="$CREATE_LIST ++ CREATE_LIST="$CREATE_LIST \ + db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/ext_def.in:$srcdir/../dbinc_auto/ext_prot.in" + else +- CREATE_LIST="$CREATE_LIST ++ CREATE_LIST="$CREATE_LIST \ + db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/ext_prot.in" + fi + +@@ -716,7 +716,7 @@ fi + # does the DB_VERSION_UNIQUE_NAME substitution), which is included by + # the db_int.h file. + if test "$db_cv_uniquename" = "yes"; then +- CREATE_LIST="$CREATE_LIST ++ CREATE_LIST="$CREATE_LIST \ + db_int_def.h:$srcdir/../dbinc_auto/int_def.in" + db_int_def='#include "db_int_def.h"' + fi +@@ -726,12 +726,12 @@ fi + # of #defines to do DB_VERSION_UNIQUE_NAME substitution. + if test "$db_cv_compat185" = "yes"; then + if test "$db_cv_uniquename" = "yes"; then +- CREATE_LIST="$CREATE_LIST +- db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in ++ CREATE_LIST="$CREATE_LIST \ ++ db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in \ + db185_int.h:$srcdir/../db185/db185_int.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in" + else +- CREATE_LIST="$CREATE_LIST +- db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_prot.in ++ CREATE_LIST="$CREATE_LIST \ ++ db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_prot.in \ + db185_int.h:$srcdir/../db185/db185_int.in:$srcdir/../dbinc_auto/ext_185_prot.in" + fi + fi --- db/dist/s_config +++ db/dist/s_config @@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3 diff --git a/rpm-python.spec b/rpm-python.spec index 81ee893..d364953 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 243 +Release: 249 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index ac9c00d..61e73fb 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 26 18:40:46 CEST 2008 - schwab@suse.de + +- Fix db configure script. + ------------------------------------------------------------------- Thu May 15 14:31:51 CEST 2008 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index c9c1e3c..6d6d4a6 100644 --- a/rpm.spec +++ b/rpm.spec @@ -8,7 +8,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: rpm @@ -21,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 196 +Release: 201 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -353,7 +352,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 424 +Release: 429 # %description -n popt @@ -376,7 +375,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 424 +Release: 429 Requires: popt = 1.7 Requires: glibc-devel @@ -411,6 +410,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Jun 26 2008 schwab@suse.de +- Fix db configure script. * Thu May 15 2008 dmueller@suse.de - remove references to brp-strip-comment-note (bnc#390163) * Tue May 06 2008 mls@suse.de From 28974b84365dbcb6ce7c503c00d7472ff12e9b77d6818206248da22b383e6aeb Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 4 Jul 2008 22:53:44 +0000 Subject: [PATCH 046/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=46 --- requires-ge-macro.diff | 10 ++++++++++ rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 11 +++++++---- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 requires-ge-macro.diff diff --git a/requires-ge-macro.diff b/requires-ge-macro.diff new file mode 100644 index 0000000..a29cfd4 --- /dev/null +++ b/requires-ge-macro.diff @@ -0,0 +1,10 @@ +--- macros.in ++++ macros.in +@@ -1242,6 +1242,7 @@ + # %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") + %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-python.spec b/rpm-python.spec index d364953..5145110 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -17,7 +17,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 249 +Release: 251 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 61e73fb..c7bd302 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 30 14:02:35 CEST 2008 - dmueller@suse.de + +- add a requires_ge macro as well + ------------------------------------------------------------------- Thu Jun 26 18:40:46 CEST 2008 - schwab@suse.de diff --git a/rpm.spec b/rpm.spec index 6d6d4a6..0fa66b1 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 201 +Release: 203 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -134,6 +134,7 @@ Patch105: lzma-payload-2.diff Patch106: debugsource-package.diff Patch107: whatrequires-doc.diff Patch108: remove-brp-strips.diff +Patch109: requires-ge-macro.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -206,7 +207,7 @@ rm -f rpmdb/db.h %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 +%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 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms @@ -352,7 +353,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 429 +Release: 431 # %description -n popt @@ -375,7 +376,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 429 +Release: 431 Requires: popt = 1.7 Requires: glibc-devel @@ -410,6 +411,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Jun 30 2008 dmueller@suse.de +- add a requires_ge macro as well * Thu Jun 26 2008 schwab@suse.de - Fix db configure script. * Thu May 15 2008 dmueller@suse.de From 87bfedae717a660a837a240067201f3edbc4a6e8cedd99962490d8ec1b98c7c4 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 8 Aug 2008 15:23:33 +0000 Subject: [PATCH 047/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=47 --- build.diff | 20 ++++++++++++++++---- rpm-python.changes | 5 +++++ rpm-python.spec | 17 +++++++++++++---- rpm.spec | 17 ++++++++++++----- 4 files changed, 46 insertions(+), 13 deletions(-) diff --git a/build.diff b/build.diff index 9b01455..28a0758 100644 --- a/build.diff +++ b/build.diff @@ -167,12 +167,24 @@ Index: Makefile.am 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,74 @@ withval=auto +@@ -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([[ @@ -283,7 +295,7 @@ Index: Makefile.am fi if test "$WITH_PYTHON_VERSION" != no ; then -@@ -1283,6 +1279,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH="${ +@@ -1283,6 +1291,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH="${ mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;; mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;; m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;; @@ -291,7 +303,7 @@ Index: Makefile.am *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; esac case "${build_os_noversion}" in -@@ -1290,7 +1287,8 @@ mint) RPMCANONARCH=m68kmint ;; +@@ -1290,7 +1299,8 @@ mint) RPMCANONARCH=m68kmint ;; esac RPMCANONVENDOR="$build_vendor" case "${build_vendor}" in @@ -301,7 +313,7 @@ Index: Makefile.am test -f /etc/redhat-release && RPMCANONVENDOR=redhat test -f /etc/pld-release && RPMCANONVENDOR=pld test -f /etc/mandrake-release && RPMCANONVENDOR=mandrake -@@ -1372,7 +1370,7 @@ dnl XXX this causes popt to depend on zl +@@ -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 diff --git a/rpm-python.changes b/rpm-python.changes index c9af26a..1109f99 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 7 16:05:51 CEST 2008 - dmueller@suse.de + +- fix build against python 2.6 + ------------------------------------------------------------------- Thu Mar 27 14:47:18 CET 2008 - coolo@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 5145110..fbf0389 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -2,9 +2,16 @@ # spec file for package rpm-python (Version 4.4.2) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -17,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 251 +Release: 265 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -62,13 +69,15 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog +* Thu Aug 07 2008 dmueller@suse.de +- fix build against python 2.6 * Thu Mar 27 2008 coolo@suse.de - fix buildrequires * Fri May 25 2007 mls@suse.de - fix unicode queries * Fri Mar 30 2007 rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires. -* Wed Oct 18 2006 mls@suse.de +* Thu Oct 19 2006 mls@suse.de - use rpm.spec for building instead of duplication everything - delete superfluous .a and .la files [#202604] - create .pyc and .pyo files [#205711] diff --git a/rpm.spec b/rpm.spec index 0fa66b1..d273911 100644 --- a/rpm.spec +++ b/rpm.spec @@ -2,9 +2,16 @@ # spec file for package rpm (Version 4.4.2) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -20,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 203 +Release: 209 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -353,7 +360,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 431 +Release: 437 # %description -n popt @@ -376,7 +383,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 431 +Release: 437 Requires: popt = 1.7 Requires: glibc-devel From 2e8ff90a4b9f369195649ce5756728e2e91a8205504500683dd48a50821df856 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 21 Aug 2008 15:44:07 +0000 Subject: [PATCH 048/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=48 --- rpm-python.spec | 2 +- rpm-suse_macros | 277 +++++++++++++++--------------------------------- rpm.changes | 13 +++ rpm.spec | 16 ++- rpmconfigcheck | 2 +- 5 files changed, 110 insertions(+), 200 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index fbf0389..d4df44c 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 265 +Release: 273 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index 9b3bd34..a03c040 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -203,11 +203,9 @@ # instead of package name) # -f (skip fillup parts) # -i (skip insserv parts) -# -s (specify START_ variable names, otherwise tr a-z A-Z is used) # -y (default start-variable value to yes) # Used only if X-UnitedLinux-Default-Enabled is not specified # in the init script -# -p (ignored for backwards compatibility) # -Y (force_yes: always activate, discard setting before update) # arguments: # [if "-n" first argument as package name] @@ -218,37 +216,27 @@ # # template for variables into etc/sysconfig/package: # var/adm/fillup-templates/sysconfig.package -# template for variables into etc/rc.config: -# var/adm/fillup-templates/rc.config.package %fillup_and_insserv(finpsyY) \ - test -n "$FIRST_ARG" || FIRST_ARG=$1 \ - %{-Y:FORCE_YES=1}%{!-Y:FORCE_YES=0} \ - REMOVED_START=no \ - set -- %{?*} \ - %{-n:PNAME=$1 ; shift }%{!-n:PNAME=%{name}} \ - INSSRV_ARRAY="" \ - while [ ${#*} -gt 0 ] ; do \ - SCRIPTNAME=$1 \ - shift \ - %{-s:STARTVAR=$1 ; shift} \ - %{!-s:STARTVAR=START_`echo $SCRIPTNAME | tr a-z.- A-Z__`} \ - SV_B='^### BEGIN INIT INFO' \ - SV_E='^### END INIT INFO' \ - SV_KW=X-UnitedLinux-Default-Enabled \ - SV_VAL=`sed -n -e "/$SV_B/,/$SV_E/{/^# $SV_KW:[[:space:]]*\\([^[:space:]]*\\).*/s//\\1/p;}" < etc/init.d/$SCRIPTNAME` \ - test -n "$SV_VAL" || SV_VAL=%{-y:"yes"}%{!-y:"no"} \ - eval $STARTVAR=$SV_VAL \ - test -n "$STARTVAR" -a -n "$SCRIPTNAME" || { \ - echo "STARTVARIABLE or SCRIPTNAME unknown" \ - exit 1 \ - } \ - INSSRV_ARRAY="$INSSRV_ARRAY $SCRIPTNAME $STARTVAR" \ - %{!-f:%{!-i:grep -q "$STARTVAR=" var/adm/fillup-templates/rc.config.$PNAME.del 2>/dev/null || \ - echo -e "#\\n# Start service $SCRIPTNAME\\n#\\n$STARTVAR=\\"${!STARTVAR}\\"\\n\\n" >> var/adm/fillup-templates/rc.config.$PNAME.del } } \ - done \ - %{!-f: %{do_real_fillup}} \ - %{!-i: %{add_start_if_needed $INSSRV_ARRAY } } \ - %nil + %{-p:echo "-p option for fillup_and_insserv no longer supported (ever only used on SL8.0)"; exit 1;} \ + %{-s:echo "STARTVAR for fillup_and_insserv no longer supported (rc.config is gone since SL8.0)"; exit 1;} \ + test -n "$FIRST_ARG" || FIRST_ARG=$1 \ + %{-Y:FORCE_YES=1}%{!-Y:FORCE_YES=0} \ + set -- %{?*} \ + %{-n:PNAME=$1 ; shift }%{!-n:PNAME=%{name}} \ + INSSRV_ARRAY="" \ + while [ ${#*} -gt 0 ] ; do \ + SCRIPTNAME=$1 \ + shift \ + SV_B='^### BEGIN INIT INFO' \ + 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 -n "$SV_VALUE" || SV_VALUE=%{-y:"yes"}%{!-y:"no"} \ + INSSRV_ARRAY="$INSSRV_ARRAY $SCRIPTNAME $SV_VALUE" \ + done \ + %{!-f: %{do_real_fillup}} \ + %{!-i: %{add_start_if_needed $INSSRV_ARRAY } } \ + %nil # do_real_fillup: internal macro # this part really calls fillup for the appropriate files @@ -256,71 +244,30 @@ %do_real_fillup() \ TEMPLATE_DIR=var/adm/fillup-templates \ SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME \ - RC_TEMPLATE=$TEMPLATE_DIR/rc.config.$PNAME \ SD_NAME="" \ - if [ -x bin/fillup ] ; then \ - %{sysc_fillup} \ - # remove the START_ variables from the base fillup template \ - if [ -f $RC_TEMPLATE.del -a -f $RC_TEMPLATE ] ; then \ - bin/fillup -q -r -i $RC_TEMPLATE $RC_TEMPLATE.del /dev/null \ - mv $RC_TEMPLATE.new $RC_TEMPLATE \ - fi \ - if [ -f etc/rc.config ] ; then \ - %{rc_fillup} \ - # remove the deprecated START_ variables from rc.config \ - if [ -f $TEMPLATE_DIR/rc.config.$PNAME.del ] ; then \ - rm -f etc/rc.config.xtract \ - bin/fillup -q -r -i etc/rc.config $RC_TEMPLATE.del etc/rc.config.xtract \ - if [ -f etc/rc.config.xtract ] ; then \ - . etc/rc.config.xtract \ - fi \ - rm -f etc/rc.config.xtract $RC_TEMPLATE.del \ - if [ -f etc/rc.config.new ] ; then \ - cmp -s etc/rc.config.new etc/rc.config || REMOVED_START=yes \ - mv etc/rc.config.new etc/rc.config \ - fi \ - fi \ - fi \ - else \ - echo "ERROR: fillup not found. This should not happen. Please compare" \ - echo "etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" \ - echo "update by hand." \ - fi + %{sysc_fillup} # add_start_if_needed: internally used by fillup_and_insserv %add_start_if_needed() \ - set -- %{?*} \ + set -- %{?*} \ while [ ${#*} -gt 0 ] ; do \ SCRIPTNAME=$1 \ - STARTVAR=$2 \ + SV_VALUE=$2 \ shift 2 \ - test -n "$STARTVAR" -a -n "$SCRIPTNAME" || { \ - echo "STARTVAR or SCRIPTNAME unknown" \ - exit 1 \ - } \ - if test "$FIRST_ARG" = "1" -o "$REMOVED_START" = "yes" -o "$FORCE_YES" = "1" ; then \ - if test -n "$YAST_IS_RUNNING" ; then \ - INSSERV_FORCE="-f" \ - else \ - INSSERV_FORCE="" \ - fi \ - if test "${!STARTVAR}" = "yes" -o "$FORCE_YES" = "1" ; then \ - sbin/insserv $INSSERV_FORCE etc/init.d/$SCRIPTNAME \ - else \ - sbin/insserv $INSSERV_FORCE -r etc/init.d/$SCRIPTNAME \ - fi \ + test -n "$SCRIPTNAME" -a -n "$SV_VALUE" || { echo "SCRIPTNAME or SV_VALUE unknown"; exit 1;} \ + if test "$FIRST_ARG" = "1" -a "$SV_VALUE" = "no" ; then \ + sbin/insserv ${YAST_IS_RUNNING:+-f} -r etc/init.d/$SCRIPTNAME \ + elif test "$FIRST_ARG" = "1" -o "$FORCE_YES" = "1" ; then \ + sbin/insserv ${YAST_IS_RUNNING:+-f} etc/init.d/$SCRIPTNAME \ fi \ done # macro: insserv_cleanup -# only here to be able to define this to nil -# for versions prior to 7.1 %insserv_cleanup() \ - sbin/insserv etc/init.d + sbin/insserv etc/init.d # macro: fillup_only -# do the fillup for sysconfig files and if needed extraction -# of older variables from rc.config and rc.config.d +# do the fillup for sysconfig files # template naming convention: # .../fillup-templates/sysconfig.$NAME1[-$NAME2] # NAME1: the name of the sysconfig-file @@ -333,149 +280,91 @@ # -d use a subdirectory of sysconfig # (last arg as directory name) %fillup_only(dans) \ - %{-n:PNAME=%{1}}%{!-n:PNAME=%{name}} \ - %{-s:SUBPNAME=-%{2}}%{!-s:SUBPNAME=%{-a:-%{name}}} \ + %{-n:PNAME=%{1}}%{!-n:PNAME=%{name}} \ + %{-s:SUBPNAME=-%{2}}%{!-s:SUBPNAME=%{-a:-%{name}}} \ TEMPLATE_DIR=var/adm/fillup-templates \ SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME$SUBPNAME \ - RC_TEMPLATE=$TEMPLATE_DIR/rc.config.$PNAME \ SD_NAME="" \ %{-d:%{-s:SD_NAME=%{3}/}%{!-s:SD_NAME=%{2}/}} \ - if [ -x bin/fillup ] ; then \ - %{sysc_fillup} \ - %{rc_fillup} \ - else \ - echo "ERROR: fillup not found. This should not happen. Please compare" \ - echo "etc/sysconfig/$SD_NAME$PNAME and $SYSC_TEMPLATE and" \ - echo "update by hand." \ - fi \ + %{sysc_fillup} \ %nil -# internal only: rc_fillup -%rc_fillup() \ - # maybe the fillup template for rc.config is old, make sure we do not readd stuff here \ - if [ -f $SYSC_TEMPLATE -a -f $RC_TEMPLATE ] ; then \ - bin/fillup -q -r -i $RC_TEMPLATE $SYSC_TEMPLATE /dev/null \ - mv $RC_TEMPLATE.new $RC_TEMPLATE \ - fi \ - # do the normal fillup for the rc.config variables \ - if [ -f $RC_TEMPLATE ] ; then \ - bin/fillup -q -d = etc/rc.config $RC_TEMPLATE \ - fi - # internal only: sysc_fillup %sysc_fillup() \ + if [ -x bin/fillup ] ; then \ if [ -f $SYSC_TEMPLATE ] ; then \ echo "Updating etc/sysconfig/$SD_NAME$PNAME..." \ - if [ ! -d etc/sysconfig/$SD_NAME ] ; then \ - mkdir -p etc/sysconfig/$SD_NAME \ - fi \ - if [ -f etc/rc.config.d/$PNAME.rc.config ] ; then \ - if [ -f etc/sysconfig/$SD_NAME$PNAME ] ; then \ - bin/fillup -q etc/sysconfig/$SD_NAME$PNAME etc/rc.config.d/$PNAME.rc.config \ - rm -f etc/rc.config.d/$PNAME.rc.config \ - else \ - mv etc/rc.config.d/$PNAME.rc.config etc/sysconfig/$SD_NAME$PNAME \ - fi \ - fi \ - if [ ! -f etc/rc.config ] ; then \ - test -f etc/sysconfig/$SD_NAME$PNAME || touch etc/sysconfig/$SD_NAME$PNAME \ - bin/fillup -q etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE \ - else \ - if [ ! -f etc/sysconfig/$SD_NAME$PNAME ] ; then \ - bin/fillup -q -r -i etc/rc.config $SYSC_TEMPLATE etc/sysconfig/$SD_NAME$PNAME \ - else \ - bin/fillup -q -r -i etc/rc.config $SYSC_TEMPLATE etc/sysconfig/$SD_NAME$PNAME.tmp \ - bin/fillup -q etc/sysconfig/$SD_NAME$PNAME etc/sysconfig/$SD_NAME$PNAME.tmp \ - rm -f etc/sysconfig/$SD_NAME$PNAME.tmp \ - fi \ - if [ -f etc/rc.config.new ] ; then \ - mv etc/rc.config.new etc/rc.config \ - fi \ - fi\ - fi + mkdir -p etc/sysconfig/$SD_NAME \ + touch etc/sysconfig/$SD_NAME$PNAME \ + bin/fillup -q etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE \ + fi \ + else \ + echo "ERROR: fillup not found. This should not happen. Please compare" \ + echo "etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" \ + echo "update by hand." \ + fi # macro: rename_sysconfig_variable -# as the name says, rename a variable in rc.config -# or with -f in the given file +# as the name says, rename a variable in the file given with -f %rename_sysconfig_variable(f:) \ - %{!-f:FILE=etc/rc.config}%{-f:FILE=%{-f*}} \ - if [ -f $FILE ] ; then \ - sed -e "s/^%{1}=/%{2}=/" $FILE > $FILE.new \ - mv $FILE.new $FILE \ - fi - -# macro: save_rc_config_d_was_in_filelist -# only used for packages that erroneously had the rc.config.d file -# in their filelist -%save_rc_config_d_was_in_filelist(n) \ - %{-n:PNAME=%{?*}}%{!-n:PNAME=%{name}} \ - mkdir -p etc/sysconfig \ - if [ -f etc/rc.config.d/$PNAME.rc.config -a ! -f etc/sysconfig/$PNAME ] ; then \ - cp etc/rc.config.d/$PNAME.rc.config etc/sysconfig/$PNAME \ - fi + %{!-f:echo "missing argument for rename_sysconfig_variable"; exit 1; }%{-f:FILE=%{-f*}} \ + if [ -f $FILE ] ; then \ + sed -i -e "s/^%{1}=/%{2}=/" $FILE \ + fi # macro: remove_and_set -# remove variables from rc.config and sysconfig.$NAME +# remove variables from sysconfig.$NAME # (both if existant) and set them in the environment # for further handling in postinstall # options: -n set package name # -y default to yes if not found (otherwise no) %remove_and_set(n:y) \ - %{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \ - DEF_VAL=%{-y:"yes"}%{!-y:"no"} \ - DEL_TEMPL=var/adm/fillup-templates/$PNAME.del \ - rm -f $DEL_TEMPL \ - for var in %{?*} ; do \ - echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \ - done \ - if [ -f etc/rc.config ] ; then \ - bin/fillup -q -t -r -i -d "=" etc/rc.config $DEL_TEMPL etc/rc.config.xtract \ - test -f etc/rc.config.new && mv etc/rc.config.new etc/rc.config \ - fi \ - if [ -f etc/sysconfig/$PNAME ] ; then \ - bin/fillup -q -t -r -i -d "=" etc/sysconfig/$PNAME $DEL_TEMPL etc/rc.config.xtract.too \ - test -f etc/sysconfig/$PNAME.new && mv etc/sysconfig/$PNAME.new etc/sysconfig/$PNAME \ - fi \ - for i in $DEL_TEMPL etc/rc.config.xtract etc/rc.config.xtract.too ; do \ - if [ -f $i ] ; then \ - . $i \ - rm -f $i \ - fi \ - done + %{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \ + DEF_VAL=%{-y:"yes"}%{!-y:"no"} \ + DEL_TEMPL=var/adm/fillup-templates/$PNAME.del \ + rm -f $DEL_TEMPL \ + for var in %{?*} ; do \ + echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \ + done \ + if [ -f etc/sysconfig/$PNAME ] ; then \ + bin/fillup -q -t -r -i -d "=" etc/sysconfig/$PNAME $DEL_TEMPL etc/sysconfig/$PNAME.deleted.$$ \ + test -f etc/sysconfig/$PNAME.new && mv etc/sysconfig/$PNAME.new etc/sysconfig/$PNAME \ + fi \ + for i in $DEL_TEMPL etc/sysconfig/$PNAME.deleted.$$ ; do \ + if [ -f $i ] ; then \ + . $i \ + rm -f $i \ + fi \ + done %insserv_force_if_yast() \ - if test -n "$YAST_IS_RUNNING" ; then \ - INSSERV_FORCE="-f" \ - else \ - INSSERV_FORCE="" \ - fi \ - sbin/insserv $INSSERV_FORCE %{?*} + sbin/insserv ${YAST_IS_RUNNING:+-f} %{?*} %run_ldconfig /sbin/ldconfig %install_info(:-:) \ - ALL_ARGS=(%{**}) \ - NUM_ARGS=${#ALL_ARGS[@]} \ - if test -x sbin/install-info ; then \ - if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ - sbin/install-info "${ALL_ARGS[@]}" \ - fi \ - fi ; + ALL_ARGS=(%{**}) \ + NUM_ARGS=${#ALL_ARGS[@]} \ + if test -x sbin/install-info ; then \ + if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ + sbin/install-info "${ALL_ARGS[@]}" \ + fi \ + fi ; %install_info_delete(:-:) \ - ALL_ARGS=(%{**}) \ - NUM_ARGS=${#ALL_ARGS[@]} \ - if test -x sbin/install-info ; then \ - if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ - sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \ - fi ; \ - fi ; + ALL_ARGS=(%{**}) \ + NUM_ARGS=${#ALL_ARGS[@]} \ + if test -x sbin/install-info ; then \ + if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ + sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \ + fi ; \ + fi ; # find-supplements.ksyms parses this macro directly out of the spec file: %supplements_kernel_module() \ - %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} + %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} -%suse_version 1031 +%suse_version 1110 %sles_version 0 %ul_version 0 diff --git a/rpm.changes b/rpm.changes index c7bd302..8105714 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Aug 21 01:49:00 CEST 2008 - ro@suse.de + +- update rpm-suse_macros + +------------------------------------------------------------------- +Wed Aug 20 12:39:53 CEST 2008 - agruen@suse.de + +- rpmconfigcheck: set Required-Stop to $null; this init script + only performs some checks when started. +- /usr/lib/python* belongs to the rpm-python package; remove from + the main rpm package. + ------------------------------------------------------------------- Mon Jun 30 14:02:35 CEST 2008 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index d273911..a063448 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 209 +Release: 212 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -164,7 +164,7 @@ Authors: Marc Ewing %package devel -Summary: Include Files and Libraries mandatory for Development. +Summary: Include Files and Libraries mandatory for Development License: GPL v2 or later Group: System/Packages Requires: rpm = %{version} @@ -301,6 +301,7 @@ for i in /usr/share/automake-*/*; do done popd gzip -9 CHANGES +rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} %clean rm -rf $RPM_BUILD_ROOT @@ -360,7 +361,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 437 +Release: 440 # %description -n popt @@ -383,7 +384,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 437 +Release: 440 Requires: popt = 1.7 Requires: glibc-devel @@ -418,6 +419,13 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Aug 21 2008 ro@suse.de +- update rpm-suse_macros +* Wed Aug 20 2008 agruen@suse.de +- rpmconfigcheck: set Required-Stop to $null; this init script + only performs some checks when started. +- /usr/lib/python* belongs to the rpm-python package; remove from + the main rpm package. * Mon Jun 30 2008 dmueller@suse.de - add a requires_ge macro as well * Thu Jun 26 2008 schwab@suse.de diff --git a/rpmconfigcheck b/rpmconfigcheck index c7a1267..a4eeb48 100644 --- a/rpmconfigcheck +++ b/rpmconfigcheck @@ -11,7 +11,7 @@ ### BEGIN INIT INFO # Provides: rpmconfigcheck # Required-Start: $remote_fs -# Required-Stop: +# Required-Stop: $null # Default-Start: 2 3 5 # Default-Stop: # Description: rpm config file scan From 2a4654b79e66bba575d61a3daff02db4def3764285df54f4ef32daa08a62736f Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 29 Aug 2008 21:14:19 +0000 Subject: [PATCH 049/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=49 --- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 14 ++++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index d4df44c..53f35b9 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 273 +Release: 277 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 8105714..c82914a 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 25 14:48:28 CEST 2008 - prusnak@suse.cz + +- enabled SELinux support [Fate#303662] + ------------------------------------------------------------------- Thu Aug 21 01:49:00 CEST 2008 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index a063448..c098074 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,14 +20,14 @@ Name: rpm License: GPL v2 or later Group: System/Packages -BuildRequires: libbz2-devel lzma-alpha-devel ncurses-devel zlib-devel +BuildRequires: libbz2-devel libselinux-devel lzma-alpha-devel ncurses-devel zlib-devel Provides: rpminst %define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 212 +Release: 215 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -168,7 +168,7 @@ Summary: Include Files and Libraries mandatory for Development License: GPL v2 or later Group: System/Packages Requires: rpm = %{version} -Requires: popt-devel zlib-devel bzip2 libbz2-devel lzma-alpha-devel +Requires: popt-devel zlib-devel bzip2 libbz2-devel lzma-alpha-devel libselinux-devel %description devel This package contains the RPM C library and header files. These @@ -241,7 +241,7 @@ cp popt/autogen.sh libelf cp popt/autogen.sh elfutils cp popt/autogen.sh file # cp popt/autogen.sh neon -./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --with-lua --without-selinux --enable-shared +./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --with-lua --with-selinux --enable-shared rm po/de.gmo make %{?jobs:-j%jobs} @@ -361,7 +361,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 440 +Release: 443 # %description -n popt @@ -384,7 +384,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 440 +Release: 443 Requires: popt = 1.7 Requires: glibc-devel @@ -419,6 +419,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Aug 25 2008 prusnak@suse.cz +- enabled SELinux support [Fate#303662] * Thu Aug 21 2008 ro@suse.de - update rpm-suse_macros * Wed Aug 20 2008 agruen@suse.de From 83481adde8f297f844ff5c03b8e582c34fe8abce7f733244148a2593fe4bdd8c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 5 Sep 2008 17:37:54 +0000 Subject: [PATCH 050/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=50 --- finddebuginfo.diff | 19 ++++++++----------- rpm-python.changes | 5 +++++ rpm-python.spec | 6 ++++-- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/finddebuginfo.diff b/finddebuginfo.diff index e33a7b1..8d72657 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,12 +1,6 @@ ---- - scripts/find-debuginfo.sh | 78 ++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 65 insertions(+), 13 deletions(-) - -Index: scripts/find-debuginfo.sh -=================================================================== ---- scripts/find-debuginfo.sh.orig +--- scripts/find-debuginfo.sh +++ scripts/find-debuginfo.sh -@@ -14,9 +14,18 @@ debugdir="${RPM_BUILD_ROOT}/usr/lib/debu +@@ -14,9 +14,18 @@ echo -n > $SOURCEFILE # Strip ELF binaries @@ -27,7 +21,7 @@ Index: scripts/find-debuginfo.sh dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p") bn=$(basename $f .debug).debug -@@ -25,6 +34,8 @@ do +@@ -25,6 +34,8 @@ [ -f "${debugfn}" ] && continue echo extracting debug info from $f @@ -36,7 +30,7 @@ Index: scripts/find-debuginfo.sh /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" # A binary already copied into /usr/lib/debug doesn't get stripped, -@@ -34,19 +45,60 @@ do +@@ -34,19 +45,63 @@ esac mkdir -p "${debugdn}" @@ -47,6 +41,8 @@ Index: scripts/find-debuginfo.sh - 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) @@ -61,8 +57,9 @@ Index: scripts/find-debuginfo.sh + if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then + strip_option= fi -+ objcopy --add-gnu-debuglink=$debugfn $strip_option $f || : ++ objcopy --add-gnu-debuglink=$debugfn -R .comment -R .GCC.command.line $strip_option $f + chmod $mode $f ++ ) || : done +#for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -name "*.exe.mdb" -or -name "*.dll.mdb" \) ` diff --git a/rpm-python.changes b/rpm-python.changes index 1109f99..f169277 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Aug 30 21:23:38 CEST 2008 - cthiel@suse.de + +- add libselinux-devel to BuildRequires + ------------------------------------------------------------------- Thu Aug 7 16:05:51 CEST 2008 - dmueller@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 53f35b9..2dbeecf 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -19,12 +19,12 @@ Name: rpm-python -BuildRequires: libbz2-devel lzma-alpha-devel ncurses-devel python-devel zlib-devel +BuildRequires: libbz2-devel libselinux-devel lzma-alpha-devel ncurses-devel python-devel zlib-devel License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 277 +Release: 278 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -69,6 +69,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog +* Sat Aug 30 2008 cthiel@suse.de +- add libselinux-devel to BuildRequires * Thu Aug 07 2008 dmueller@suse.de - fix build against python 2.6 * Thu Mar 27 2008 coolo@suse.de diff --git a/rpm.changes b/rpm.changes index c82914a..18056b0 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 5 16:56:23 CEST 2008 - dmueller@suse.de + +- strip .comment and .GCC.command.line sections from ELF binaries + ------------------------------------------------------------------- Mon Aug 25 14:48:28 CEST 2008 - prusnak@suse.cz diff --git a/rpm.spec b/rpm.spec index c098074..e794acf 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 215 +Release: 217 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -361,7 +361,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 443 +Release: 445 # %description -n popt @@ -384,7 +384,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 443 +Release: 445 Requires: popt = 1.7 Requires: glibc-devel @@ -419,6 +419,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Sep 05 2008 dmueller@suse.de +- strip .comment and .GCC.command.line sections from ELF binaries * Mon Aug 25 2008 prusnak@suse.cz - enabled SELinux support [Fate#303662] * Thu Aug 21 2008 ro@suse.de From 9525994e02db5d6a363999ae62aa259416f04da3728ab06f1470a29e334b3272 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 12 Sep 2008 18:37:28 +0000 Subject: [PATCH 051/137] 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 } }, From 2300e13507dbc9b454555537f6557b9a8f35eeb2328fc83273f2cd7c79c348b3 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 15 Sep 2008 23:28:45 +0000 Subject: [PATCH 052/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=52 --- debugsource-package.diff | 18 +++++++-------- finddebuginfo.diff | 49 ++++++++++++++++++++++++++++++++-------- rpm-python.spec | 2 +- rpm.changes | 12 ++++++++++ rpm.spec | 12 +++++++--- 5 files changed, 70 insertions(+), 23 deletions(-) diff --git a/debugsource-package.diff b/debugsource-package.diff index 4da802b..e0428d0 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -5,12 +5,12 @@ build the binary. The patches moves them into a separate package -debugsource. --- macros.in | 12 ++++++++++++ - scripts/find-debuginfo.sh | 43 ++++++++++++++++++++++++++----------------- - 2 files changed, 38 insertions(+), 17 deletions(-) + scripts/find-debuginfo.sh | 12 +++++++++--- + 2 files changed, 21 insertions(+), 3 deletions(-) -Index: macros.in +Index: b/macros.in =================================================================== ---- macros.in.orig +--- macros.in +++ macros.in @@ -183,6 +183,18 @@ Debug information is useful when develop package or when debugging this package.\ @@ -31,19 +31,19 @@ Index: macros.in %{nil} %_defaultdocdir %{_usr}/doc/packages -Index: scripts/find-debuginfo.sh +Index: b/scripts/find-debuginfo.sh =================================================================== ---- scripts/find-debuginfo.sh.orig +--- scripts/find-debuginfo.sh +++ scripts/find-debuginfo.sh @@ -172,8 +172,8 @@ set -o pipefail strict_error=ERROR $strict || strict_error=WARNING -# Strip ELF binaries --find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) | +-find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | +# 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' | ++find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | + xargs --no-run-if-empty -0 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 - diff --git a/finddebuginfo.diff b/finddebuginfo.diff index 9d28466..eaec503 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,8 +1,36 @@ -Index: scripts/find-debuginfo.sh -=================================================================== ---- scripts/find-debuginfo.sh.orig -+++ scripts/find-debuginfo.sh -@@ -173,12 +173,18 @@ strict_error=ERROR +--- scripts/find-debuginfo.sh 2008/09/15 22:56:11 1.1 ++++ scripts/find-debuginfo.sh 2008/09/15 22:58:57 +@@ -126,6 +126,20 @@ + link_relative "$t" "$l" "$RPM_BUILD_ROOT" + } + ++# Compare two binaries but ignore the .note.gnu.build-id section ++elfcmp() ++{ ++ local tmp1=$(mktemp -t ${1##*/}.XXXXXX) ++ local tmp2=$(mktemp -t ${2##*/}.XXXXXX) ++ ++ objcopy -O binary -R .note.gnu.build-id $1 $tmp1 ++ objcopy -O binary -R .note.gnu.build-id $2 $tmp2 ++ cmp -s $tmp1 $tmp2 ++ local res=$? ++ rm -f $tmp1 $tmp2 ++ return $res ++} ++ + # Make a build-id symlink for id $1 with suffix $3 to file $2. + make_id_link() + { +@@ -144,7 +158,7 @@ + local other=$(readlink -m "$root_idfile") + other=${other#$RPM_BUILD_ROOT} + if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" || +- eu-elfcmp -q "$root_idfile" "$RPM_BUILD_ROOT$file" 2> /dev/null; then ++ elfcmp "$root_idfile" "$RPM_BUILD_ROOT$file" ; then + # Two copies. Maybe one has to be setuid or something. + echo >&2 "*** WARNING: identical binaries are copied, not linked:" + echo >&2 " $file" +@@ -173,12 +187,18 @@ $strict || strict_error=WARNING # Strip ELF binaries @@ -10,8 +38,9 @@ Index: scripts/find-debuginfo.sh - \( -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' | +-xargs --no-run-if-empty stat -c '%h %D_%i %n' | ++find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | ++xargs --no-run-if-empty -0 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 ;; @@ -25,7 +54,7 @@ Index: scripts/find-debuginfo.sh get_debugfn "$f" [ -f "${debugfn}" ] && continue -@@ -199,6 +205,8 @@ while read nlinks inum f; do +@@ -199,6 +219,8 @@ fi echo "extracting debug info from $f" @@ -34,7 +63,7 @@ Index: scripts/find-debuginfo.sh 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 +@@ -215,13 +237,25 @@ esac mkdir -p "${debugdn}" @@ -67,7 +96,7 @@ Index: scripts/find-debuginfo.sh if [ -n "$id" ]; then make_id_link "$id" "$dn/$(basename $f)" -@@ -250,12 +270,14 @@ if [ -s "$SOURCEFILE" ]; then +@@ -250,12 +284,14 @@ # 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 diff --git a/rpm-python.spec b/rpm-python.spec index eaeddb1..adc8420 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 2 +Release: 5 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 472c2a5..0c75c89 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Sep 16 01:01:30 CEST 2008 - ro@suse.de + +- fix find-debuginfo.sh and debugsource-package.diff to even + apply (directory depth) +- add hack from jblunck using home made elfcmp + +------------------------------------------------------------------- +Mon Sep 15 20:32:32 CEST 2008 - jblunck@suse.de + +- fix find-debuginfo.sh to work on filenames with spaces in + ------------------------------------------------------------------- Fri Sep 12 18:16:33 CEST 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 1fd21b8..5f613ee 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 2 +Release: 5 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -306,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: 450 +Release: 453 # %description -n popt @@ -329,7 +329,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 450 +Release: 453 Requires: popt = 1.7 Requires: glibc-devel @@ -364,6 +364,12 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Sep 16 2008 ro@suse.de +- fix find-debuginfo.sh and debugsource-package.diff to even + apply (directory depth) +- add hack from jblunck using home made elfcmp +* Mon Sep 15 2008 jblunck@suse.de +- fix find-debuginfo.sh to work on filenames with spaces in * Fri Sep 12 2008 mls@suse.de - fix changelog cutter - fix find-requires script From b793b101b56b3d3d6cf12baf0b631cdb0fa0a60b5a537378f62b0190f9198267 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 6 Oct 2008 14:13:13 +0000 Subject: [PATCH 053/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=54 --- build.diff | 382 +++++++++++++++++++++------------------ debugedit-canon-fix.diff | 327 +++++++++++++++++++++++++++++++++ elfutils-0.97.diff | 171 ------------------ elfutils-0.97.tar.bz2 | 3 - finddebuginfo.diff | 31 +++- rpm-python.spec | 2 +- rpm-suse_macros | 2 +- rpm.changes | 16 ++ rpm.spec | 38 ++-- rpmrc.diff | 2 +- 10 files changed, 589 insertions(+), 385 deletions(-) create mode 100644 debugedit-canon-fix.diff delete mode 100644 elfutils-0.97.diff delete mode 100644 elfutils-0.97.tar.bz2 diff --git a/build.diff b/build.diff index a19cf9f..a1b5a7a 100644 --- a/build.diff +++ b/build.diff @@ -1,6 +1,20 @@ Many changes to Makefiles/autogen and the like to make it build on SUSE systems. +--- + autogen.sh | 16 +++-- + build/Makefile.am | 2 + configure.ac | 153 ++++++++++++++++++++++++++++++++------------------- + db3/configure | 6 +- + file/src/Makefile.am | 2 + installplatform | 9 ++- + lib/Makefile.am | 2 + popt/autogen.sh | 2 + rpmdb/Makefile.am | 4 - + rpmio/Makefile.am | 10 +-- + scripts/Makefile.am | 8 ++ + 11 files changed, 132 insertions(+), 82 deletions(-) + Index: autogen.sh =================================================================== --- autogen.sh.orig @@ -66,184 +80,6 @@ Index: build/Makefile.am usrlibdir = $(libdir)@MARK64@ usrlib_LTLIBRARIES = librpmbuild.la -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% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`" - --CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \ -- --enable-shared --enable-static --enable-rpc \ -- --with-uniquename=_rpmdb --srcdir=$db_dist -+CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \ -+ --enable-shared --enable-static \ -+ --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS - - mv Makefile Makefile.orig - cat Makefile.orig | sed -e '/^install[:-]/c\ -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: - - noinst_PROGRAMS = file - file_SOURCES = file.c --file_LDFLAGS = -L../../zlib # -all-static -+file_LDFLAGS = # -L../../zlib # -all-static - file_LDADD = libmagic.la - - listobjs: -Index: installplatform -=================================================================== ---- installplatform.orig -+++ installplatform -@@ -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|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 -@@ -102,6 +102,9 @@ for SUBST in $SUBSTS ; do - apple) - VENDORSED='-e s,^@apple@,,' - ;; -+ suse) -+ VENDORSED='-e s,^@SuSE@,,' -+ ;; - esac - - 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 - LIBS = - --LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) -+LDFLAGS = - - usrlibdir = $(libdir)@MARK64@ - usrlib_LTLIBRARIES = librpm.la -Index: popt/autogen.sh -=================================================================== ---- popt/autogen.sh.orig -+++ popt/autogen.sh -@@ -28,7 +28,7 @@ fi - - cd "$THEDIR" - --if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then -+if [ X"$*" = X -a "X`uname -s`" = "XLinux" ]; then - $srcdir/configure --prefix=/usr "$@" - else - $srcdir/configure "$@" -Index: rpmdb/Makefile.am -=================================================================== ---- rpmdb/Makefile.am.orig -+++ rpmdb/Makefile.am -@@ -31,7 +31,7 @@ noinst_HEADERS = fprint.h header_interna - pkgbindir = @RPMCONFIGDIR@ - pkgbin_PROGRAMS = \ - rpmdb_archive rpmdb_checkpoint rpmdb_deadlock rpmdb_dump rpmdb_load \ -- rpmdb_printlog rpmdb_recover rpmdb_svc rpmdb_stat rpmdb_upgrade \ -+ rpmdb_printlog rpmdb_recover rpmdb_stat rpmdb_upgrade \ - rpmdb_verify - - mylibs = librpmdb.la -@@ -42,7 +42,7 @@ LIBS = - libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la - - # XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different --LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) -+LDFLAGS = - - usrlibdir = $(libdir)@MARK64@ - usrlib_LTLIBRARIES = librpmdb.la -Index: rpmio/Makefile.am -=================================================================== ---- rpmio/Makefile.am.orig -+++ rpmio/Makefile.am -@@ -24,9 +24,9 @@ pkginc_HEADERS = \ - rpmsq.h rpmsw.h ugid.h - noinst_HEADERS = rpmio_internal.h rpmlua.h rpmhook.h - --BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs) -+BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/listobjs) - --LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) -+LDFLAGS = - - usrlibdir = $(libdir)@MARK64@ - usrlib_LTLIBRARIES = librpmio.la -@@ -41,14 +41,14 @@ librpmio_la_LDFLAGS = -release 4.4 $(LDF - @WITH_MAGIC_LIB@ \ - @WITH_ZLIB_LIB@ \ - -lpthread --librpmio_la_LIBADD = # $(BEECRYPTLOBJS) --librpmio_la_DEPENDENCIES = # .created -+librpmio_la_LIBADD = $(BEECRYPTLOBJS) -+librpmio_la_DEPENDENCIES = .created - - .created: - if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \ - ${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \ - for lo in $(BEECRYPTLOBJS); do \ -- [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \ -+ [ -f $$lo ] || sed -e "s!'!'$(top_builddir)/beecrypt/!" < $(top_builddir)/beecrypt/$$lo > $$lo ; \ - done \ - fi - touch $@ -Index: scripts/Makefile.am -=================================================================== ---- scripts/Makefile.am.orig -+++ scripts/Makefile.am -@@ -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 \ -@@ -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-* mono-find* osgideps.pl -+ macros.php* find-*.php find-php-* mono-find* osgideps.pl \ -+ find-provides.ksyms find-requires.ksyms - - installprefix = $(DESTDIR) - -@@ -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 \ -@@ -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 @@ -261,6 +97,18 @@ Index: configure.ac for dir in $dirs do case $dir in +@@ -430,9 +430,9 @@ WITH_LIBELF_LIB= + AC_CHECK_HEADER([libelf.h]) + AC_CHECK_HEADER([gelf.h], [ + AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the header file.]) +- AC_CHECK_LIB(elf, gelf_getvernaux, [ ++ AC_CHECK_LIB(elf_pic, gelf_getvernaux, [ + AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).]) +- WITH_LIBELF_LIB="-lelf" ++ WITH_LIBELF_LIB="-lelf_pic" + ]) + ], [ + if test -d elfutils/libelf ; then @@ -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 @@ -462,3 +310,181 @@ Index: configure.ac RPMCANONOS="$build_os_noversion" RPMCANONGNU="$build_os_gnu" AC_SUBST(RPMCANONCOLOR) +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% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`" + +-CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \ +- --enable-shared --enable-static --enable-rpc \ +- --with-uniquename=_rpmdb --srcdir=$db_dist ++CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \ ++ --enable-shared --enable-static \ ++ --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS + + mv Makefile Makefile.orig + cat Makefile.orig | sed -e '/^install[:-]/c\ +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: + + noinst_PROGRAMS = file + file_SOURCES = file.c +-file_LDFLAGS = -L../../zlib # -all-static ++file_LDFLAGS = # -L../../zlib # -all-static + file_LDADD = libmagic.la + + listobjs: +Index: installplatform +=================================================================== +--- installplatform.orig ++++ installplatform +@@ -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|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 +@@ -102,6 +102,9 @@ for SUBST in $SUBSTS ; do + apple) + VENDORSED='-e s,^@apple@,,' + ;; ++ suse) ++ VENDORSED='-e s,^@SuSE@,,' ++ ;; + esac + + 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 + LIBS = + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) ++LDFLAGS = + + usrlibdir = $(libdir)@MARK64@ + usrlib_LTLIBRARIES = librpm.la +Index: popt/autogen.sh +=================================================================== +--- popt/autogen.sh.orig ++++ popt/autogen.sh +@@ -28,7 +28,7 @@ fi + + cd "$THEDIR" + +-if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then ++if [ X"$*" = X -a "X`uname -s`" = "XLinux" ]; then + $srcdir/configure --prefix=/usr "$@" + else + $srcdir/configure "$@" +Index: rpmdb/Makefile.am +=================================================================== +--- rpmdb/Makefile.am.orig ++++ rpmdb/Makefile.am +@@ -31,7 +31,7 @@ noinst_HEADERS = fprint.h header_interna + pkgbindir = @RPMCONFIGDIR@ + pkgbin_PROGRAMS = \ + rpmdb_archive rpmdb_checkpoint rpmdb_deadlock rpmdb_dump rpmdb_load \ +- rpmdb_printlog rpmdb_recover rpmdb_svc rpmdb_stat rpmdb_upgrade \ ++ rpmdb_printlog rpmdb_recover rpmdb_stat rpmdb_upgrade \ + rpmdb_verify + + mylibs = librpmdb.la +@@ -42,7 +42,7 @@ LIBS = + libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la + + # XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) ++LDFLAGS = + + usrlibdir = $(libdir)@MARK64@ + usrlib_LTLIBRARIES = librpmdb.la +Index: rpmio/Makefile.am +=================================================================== +--- rpmio/Makefile.am.orig ++++ rpmio/Makefile.am +@@ -24,9 +24,9 @@ pkginc_HEADERS = \ + rpmsq.h rpmsw.h ugid.h + noinst_HEADERS = rpmio_internal.h rpmlua.h rpmhook.h + +-BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs) ++BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/listobjs) + +-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) ++LDFLAGS = + + usrlibdir = $(libdir)@MARK64@ + usrlib_LTLIBRARIES = librpmio.la +@@ -41,14 +41,14 @@ librpmio_la_LDFLAGS = -release 4.4 $(LDF + @WITH_MAGIC_LIB@ \ + @WITH_ZLIB_LIB@ \ + -lpthread +-librpmio_la_LIBADD = # $(BEECRYPTLOBJS) +-librpmio_la_DEPENDENCIES = # .created ++librpmio_la_LIBADD = $(BEECRYPTLOBJS) ++librpmio_la_DEPENDENCIES = .created + + .created: + if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \ + ${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \ + for lo in $(BEECRYPTLOBJS); do \ +- [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \ ++ [ -f $$lo ] || sed -e "s!'!'$(top_builddir)/beecrypt/!" < $(top_builddir)/beecrypt/$$lo > $$lo ; \ + done \ + fi + touch $@ +Index: scripts/Makefile.am +=================================================================== +--- scripts/Makefile.am.orig ++++ scripts/Makefile.am +@@ -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 \ +@@ -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-* mono-find* osgideps.pl ++ macros.php* find-*.php find-php-* mono-find* osgideps.pl \ ++ find-provides.ksyms find-requires.ksyms + + installprefix = $(DESTDIR) + +@@ -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 \ +@@ -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 diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff new file mode 100644 index 0000000..606105c --- /dev/null +++ b/debugedit-canon-fix.diff @@ -0,0 +1,327 @@ +--- + tools/debugedit.c | 137 +++++++++++++++++++++++++++--------------------------- + 1 file changed, 70 insertions(+), 67 deletions(-) + +Index: b/tools/debugedit.c +=================================================================== +--- tools/debugedit.c ++++ tools/debugedit.c +@@ -471,13 +471,13 @@ has_prefix (const char *str, + { + int str_len; + int prefix_len; +- ++ + str_len = strlen (str); + prefix_len = strlen (prefix); + + if (str_len < prefix_len) + return 0; +- ++ + return strncmp (str, prefix, prefix_len) == 0; + } + +@@ -485,7 +485,7 @@ static int + edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase) + { + unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir; +- unsigned char **dirt; ++ char **dirt; + unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size; + unsigned char *endcu, *endprol; + unsigned char opcode_base; +@@ -496,9 +496,9 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + + if (phase != 0) + return 0; +- ++ + ptr += off; +- ++ + endcu = ptr + 4; + endcu += read_32 (ptr); + if (endcu == ptr + 0xffffffff) +@@ -521,7 +521,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + value); + return 1; + } +- ++ + endprol = ptr + 4; + endprol += read_32 (ptr); + if (endprol > endcu) +@@ -530,26 +530,26 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + dso->filename); + return 1; + } +- ++ + opcode_base = ptr[4]; + ptr = dir = ptr + 4 + opcode_base; +- ++ + /* dir table: */ + value = 1; + while (*ptr != 0) + { +- ptr = strchr (ptr, 0) + 1; ++ ptr = (unsigned char *)strchr ((char *)ptr, 0) + 1; + ++value; + } + +- dirt = (unsigned char **) alloca (value * sizeof (unsigned char *)); ++ dirt = (char **) alloca (value * sizeof (char *)); + dirt[0] = "."; + dirt_cnt = 1; + ptr = dir; + while (*ptr != 0) + { +- dirt[dirt_cnt++] = ptr; +- ptr = strchr (ptr, 0) + 1; ++ dirt[dirt_cnt++] = (char *)ptr; ++ ptr = (unsigned char *)strchr ((char *)ptr, 0) + 1; + } + ptr++; + +@@ -559,8 +559,8 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + char *s, *file; + size_t file_len, dir_len; + +- file = ptr; +- ptr = strchr (ptr, 0) + 1; ++ file = (char *)ptr; ++ ptr = (unsigned char *)strchr ((char *)ptr, 0) + 1; + value = read_uleb128 (ptr); + + if (value >= dirt_cnt) +@@ -629,7 +629,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + } + + free (s); +- ++ + read_uleb128 (ptr); + read_uleb128 (ptr); + } +@@ -661,7 +661,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + + if (dest_dir) + { +- unsigned char *srcptr, *buf = NULL; ++ char *srcptr, *srcstart, *buf = NULL; + size_t base_len = strlen (base_dir); + size_t dest_len = strlen (dest_dir); + size_t shrank = 0; +@@ -675,12 +675,16 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + ptr = dir; + } + else +- ptr = srcptr = dir; +- unsigned char *srcstart=srcptr; ++ { ++ ptr = dir; ++ srcptr = (char *)dir; ++ } ++ ++ srcstart = srcptr; + while (*srcptr != 0) + { +- size_t len = strlen (srcptr) + 1; +- const unsigned char *readptr = srcptr; ++ size_t len = strlen (srcptr); ++ const char *readptr = srcptr; + + if (*srcptr == '/' && has_prefix (srcptr, base_dir)) + { +@@ -689,24 +693,28 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + memcpy (ptr, dest_dir, dest_len); + ptr += dest_len; + readptr += base_len; +- } ++ } + srcptr += len; + + shrank += srcptr - readptr; +- canonicalize_path (readptr, ptr); +- len = strlen (ptr) + 1; ++ canonicalize_path (readptr, (char *)ptr); ++ len = strlen ((char *)ptr); ++ ++ if ((srcptr - readptr) > len) ++ error(0, 0,"canonicalization unexpectedly shrank (%lu): \"%s\"\n", ++ (long unsigned int)(srcptr - readptr) - len, ptr); ++ + shrank -= len; + ptr += len; + +- elf_flagdata (debug_sections[DEBUG_STR].elf_data, +- ELF_C_SET, ELF_F_DIRTY); +- } ++ elf_flagdata (debug_sections[DEBUG_STR].elf_data, ++ ELF_C_SET, ELF_F_DIRTY); ++ ++ptr; ++ ++srcptr; ++ } + + if (shrank > 0) + { +- if (--shrank == 0) +- error (EXIT_FAILURE, 0, +- "canonicalization unexpectedly shrank by one character"); + memset (ptr, 'X', shrank); + ptr += shrank; + *ptr++ = '\0'; +@@ -741,17 +749,17 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + elf_flagdata (debug_sections[DEBUG_STR].elf_data, + ELF_C_SET, ELF_F_DIRTY); + } +- else if (ptr != srcptr) ++ else if ((char *)ptr != srcptr) + memmove (ptr, srcptr, len); + srcptr += len; + ptr += len; +- dir = srcptr; ++ dir = (unsigned char *)srcptr; + read_uleb128 (srcptr); + read_uleb128 (srcptr); + read_uleb128 (srcptr); + if (ptr != dir) +- memmove (ptr, dir, srcptr - dir); +- ptr += srcptr - dir; ++ memmove (ptr, dir, (unsigned char *)srcptr - dir); ++ ptr += (unsigned char *)srcptr - dir; + } + *ptr = '\0'; + free (buf); +@@ -767,17 +775,13 @@ edit_attributes (DSO *dso, unsigned char + int i; + uint_32 list_offs; + int found_list_offs; +- unsigned char *comp_dir; +- +- comp_dir = NULL; +- list_offs = 0; +- found_list_offs = 0; ++ char *comp_dir; ++ + for (i = 0; i < t->nattr; ++i) + { + uint_32 form = t->attr[i].form; + uint_32 len = 0; + int base_len, dest_len; +- + + while (1) + { +@@ -791,56 +795,55 @@ edit_attributes (DSO *dso, unsigned char + } + + if (t->attr[i].attr == DW_AT_comp_dir) +- { ++ { + if ( form == DW_FORM_string ) +- { ++ { + free (comp_dir); +- comp_dir = strdup (ptr); +- +- if (phase == 1 && dest_dir && has_prefix (ptr, base_dir)) +- { ++ comp_dir = strdup ((char *)ptr); ++ ++ if (phase == 1 && dest_dir ++ && has_prefix ((char *)ptr, base_dir)) ++ { + base_len = strlen (base_dir); + dest_len = strlen (dest_dir); +- ++ + memcpy (ptr, dest_dir, dest_len); + if (dest_len < base_len) +- { ++ { + memset(ptr + dest_len, '/', + base_len - dest_len); +- +- } ++ } + elf_flagdata (debug_sections[DEBUG_INFO].elf_data, + ELF_C_SET, ELF_F_DIRTY); +- } +- } +- ++ } ++ } + else if (form == DW_FORM_strp && + debug_sections[DEBUG_STR].data) +- { ++ { + char *dir; + +- dir = debug_sections[DEBUG_STR].data +- + do_read_32_relocated (ptr); ++ dir = (char *)debug_sections[DEBUG_STR].data ++ + do_read_32_relocated (ptr); + + free (comp_dir); + comp_dir = strdup (dir); + + if (phase == 1 && dest_dir && has_prefix (dir, base_dir)) +- { ++ { + base_len = strlen (base_dir); + dest_len = strlen (dest_dir); +- ++ + memcpy (dir, dest_dir, dest_len); + if (dest_len < base_len) +- { ++ { + memmove (dir + dest_len, dir + base_len, + strlen (dir + base_len) + 1); +- } ++ } + elf_flagdata (debug_sections[DEBUG_STR].elf_data, + ELF_C_SET, ELF_F_DIRTY); +- } +- } +- } ++ } ++ } ++ } + else if ((t->tag == DW_TAG_compile_unit + || t->tag == DW_TAG_partial_unit) + && t->attr[i].attr == DW_AT_name +@@ -848,9 +851,9 @@ edit_attributes (DSO *dso, unsigned char + && debug_sections[DEBUG_STR].data) + { + char *name; +- +- name = debug_sections[DEBUG_STR].data +- + do_read_32_relocated (ptr); ++ ++ name = (char *)debug_sections[DEBUG_STR].data ++ + do_read_32_relocated (ptr); + if (*name == '/' && comp_dir == NULL) + { + char *enddir = strrchr (name, '/'); +@@ -869,7 +872,7 @@ edit_attributes (DSO *dso, unsigned char + { + base_len = strlen (base_dir); + dest_len = strlen (dest_dir); +- ++ + memcpy (name, dest_dir, dest_len); + if (dest_len < base_len) + { +@@ -913,7 +916,7 @@ edit_attributes (DSO *dso, unsigned char + ptr += 4; + break; + case DW_FORM_string: +- ptr = strchr (ptr, '\0') + 1; ++ ptr = (unsigned char *)strchr ((char *)ptr, '\0') + 1; + break; + case DW_FORM_indirect: + form = read_uleb128 (ptr); diff --git a/elfutils-0.97.diff b/elfutils-0.97.diff deleted file mode 100644 index 40cefff..0000000 --- a/elfutils-0.97.diff +++ /dev/null @@ -1,171 +0,0 @@ ---- elfutils-0.97/Makefile.am.orig 2004-01-18 23:24:16.000000000 +0000 -+++ elfutils-0.97/Makefile.am 2005-02-10 18:01:28.029920520 +0000 -@@ -18,9 +18,8 @@ - ## - ACLOCAL_AMFLAGS = -I m4 - --mini_SUBDIRS = config m4 lib libelf libelf-po --all_SUBDIRS = doc libebl libdw libcpu libasm src po tests --SUBDIRS = $(mini_SUBDIRS) $(all_SUBDIRS) -+mini_SUBDIRS = config m4 libelf libelf-po -+SUBDIRS = $(mini_SUBDIRS) - - EXTRA_DIST = splint.rc elfutils.spec GPG-KEY NOTES COPYING.GPL - ---- elfutils-0.97/configure.ac.orig 2004-09-25 19:41:03.000000000 +0000 -+++ elfutils-0.97/configure.ac 2005-02-10 18:01:28.030920377 +0000 -@@ -130,34 +130,9 @@ - - dnl The directories with content. - --dnl Documentation. --AC_CONFIG_FILES([doc/Makefile]) -- --dnl Support library. --AC_CONFIG_FILES([lib/Makefile]) -- - dnl ELF library. - AC_CONFIG_FILES([libelf/Makefile libelf-po/Makefile.in]) - --dnl Higher-level ELF support library. --AC_CONFIG_FILES([libebl/Makefile]) -- --dnl DWARF library. --AC_CONFIG_FILES([libdw/Makefile]) -- --dnl CPU handling library. --AC_CONFIG_FILES([libcpu/Makefile]) -- --dnl Assembler library. --AC_CONFIG_FILES([libasm/Makefile]) -- --dnl Tools. --AC_CONFIG_FILES([src/Makefile po/Makefile.in]) -- --dnl Test suite. --AC_CONFIG_FILES([tests/Makefile]) -- -- - dnl Test of the config.h file. We hide all kinds of configuration magic - dnl in there. - AH_BOTTOM([ ---- elfutils-0.97/libelf-po/Makefile.in.in.orig 2004-01-18 23:51:37.000000000 +0000 -+++ elfutils-0.97/libelf-po/Makefile.in.in 2005-02-10 18:01:28.030920377 +0000 -@@ -28,7 +28,7 @@ - INSTALL = @INSTALL@ - INSTALL_DATA = @INSTALL_DATA@ - MKINSTALLDIRS = @MKINSTALLDIRS@ --mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` -+mkinstalldirs = @MKINSTALLDIRS@ - - GMSGFMT = @GMSGFMT@ - MSGFMT = @MSGFMT@ ---- elfutils-0.97/libelf/Makefile.am.orig 2004-01-23 10:38:49.000000000 +0000 -+++ elfutils-0.97/libelf/Makefile.am 2005-02-10 18:03:15.337610448 +0000 -@@ -31,15 +31,15 @@ - - LINT = splint - --lib_LIBRARIES = libelf.a -+#lib_LIBRARIES = libelf.a - if !MUDFLAP --noinst_LIBRARIES = libelf_pic.a --noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) -+noinst_LIBRARIES = libelf.a libelf_pic.a -+noinst_PROGRAMS = libelf.so - endif --include_HEADERS = libelf.h gelf.h nlist.h -+#include_HEADERS = libelf.h gelf.h nlist.h - --euincludedir = $(includedir)/elfutils --euinclude_HEADERS = elf-knowledge.h -+#euincludedir = $(includedir)/elfutils -+#euinclude_HEADERS = elf-knowledge.h - - libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ - elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \ -@@ -96,7 +96,7 @@ - ln -fs $@ $@.$(VERSION) - - %.os: %.c %.o -- if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ -+ if $(COMPILE) -c -o $@ -fPIC -DPIC -DSHARED -MT $@ -MD -MP \ - -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ - then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ - rm -f "$(DEPDIR)/$*.Tpo"; \ -@@ -104,15 +104,15 @@ - fi - - install: install-am libelf.so -- $(mkinstalldirs) $(DESTDIR)$(libdir) -- $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so -- ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION) -- ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so -+# $(mkinstalldirs) $(DESTDIR)$(libdir) -+# $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so -+# ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION) -+# ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so - - uninstall: uninstall-am -- rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so -- rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION) -- rm -f $(DESTDIR)$(libdir)/libelf.so -+# rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so -+# rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION) -+# rm -f $(DESTDIR)$(libdir)/libelf.so - endif - - .PSEUDO: lint ---- elfutils-0.97/libelf/Makefile.in.orig 2004-09-25 19:41:08.000000000 +0000 -+++ elfutils-0.97/libelf/Makefile.in 2005-02-10 18:01:28.028920662 +0000 -@@ -731,7 +731,7 @@ - @MUDFLAP_FALSE@ ln -fs $@ $@.$(VERSION) - - @MUDFLAP_FALSE@%.os: %.c %.o --@MUDFLAP_FALSE@ if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ -+@MUDFLAP_FALSE@ if $(COMPILE) -c -o $@ -fPIC -DPIC -DSHARED -MT $@ -MD -MP \ - @MUDFLAP_FALSE@ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ - @MUDFLAP_FALSE@ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ - @MUDFLAP_FALSE@ rm -f "$(DEPDIR)/$*.Tpo"; \ ---- elfutils-0.97/libelf/libelfP.h.orig 2003-12-25 18:43:31.000000000 +0000 -+++ elfutils-0.97/libelf/libelfP.h 2005-02-10 18:01:28.029920520 +0000 -@@ -387,7 +387,7 @@ - extern int __libelf_fill_byte attribute_hidden; - - /* Nonzero if the version was set. */ --extern int __libelf_version_initialized attribute_hidden; -+extern int __libelf_version_initialized /* attribute_hidden */; - - - /* The libelf API does not have such a function but it is still useful. ---- elfutils-0.97/configure.ac 2006/08/14 23:04:23 1.1 -+++ elfutils-0.97/configure.ac 2006/08/14 23:06:50 -@@ -53,6 +53,8 @@ - AC_PROG_CPP - AC_PROG_GCC_TRADITIONAL - AM_GNU_GETTEXT([external]) -+MKINSTALLDIRS="\$(SHELL) \$(top_srcdir)/config/mkinstalldirs" -+AC_SUBST(MKINSTALLDIRS) - 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/elfutils-0.97.tar.bz2 b/elfutils-0.97.tar.bz2 deleted file mode 100644 index 0402483..0000000 --- a/elfutils-0.97.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:105115416927f1498abecd7741af0d178a31a2bc780b3ab935b78bac48bac342 -size 216798 diff --git a/finddebuginfo.diff b/finddebuginfo.diff index eaec503..5598461 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,6 +1,12 @@ ---- scripts/find-debuginfo.sh 2008/09/15 22:56:11 1.1 -+++ scripts/find-debuginfo.sh 2008/09/15 22:58:57 -@@ -126,6 +126,20 @@ +--- + scripts/find-debuginfo.sh | 69 +++++++++++++++++++++++++++++++++++----------- + 1 file changed, 53 insertions(+), 16 deletions(-) + +Index: scripts/find-debuginfo.sh +=================================================================== +--- scripts/find-debuginfo.sh.orig ++++ scripts/find-debuginfo.sh +@@ -126,6 +126,20 @@ debug_link() link_relative "$t" "$l" "$RPM_BUILD_ROOT" } @@ -21,7 +27,7 @@ # Make a build-id symlink for id $1 with suffix $3 to file $2. make_id_link() { -@@ -144,7 +158,7 @@ +@@ -144,7 +158,7 @@ make_id_link() local other=$(readlink -m "$root_idfile") other=${other#$RPM_BUILD_ROOT} if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" || @@ -30,7 +36,7 @@ # Two copies. Maybe one has to be setuid or something. echo >&2 "*** WARNING: identical binaries are copied, not linked:" echo >&2 " $file" -@@ -173,12 +187,18 @@ +@@ -173,12 +187,18 @@ strict_error=ERROR $strict || strict_error=WARNING # Strip ELF binaries @@ -54,16 +60,21 @@ get_debugfn "$f" [ -f "${debugfn}" ] && continue -@@ -199,6 +219,8 @@ +@@ -199,8 +219,11 @@ while read nlinks inum f; do fi echo "extracting debug info from $f" +- id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \ +- -i -l "$SOURCEFILE" "$f") || exit + 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 ++ id=$($(DEBUGEDIT=$(which debugedit 2>/dev/null); \ ++ echo ${DEBUGEDIT:-/usr/lib/rpm/debugedit}) -b "$RPM_BUILD_DIR" \ ++ -d /usr/src/debug -i -l "$SOURCEFILE" "$f") || exit if [ -z "$id" ]; then -@@ -215,13 +237,25 @@ + echo >&2 "*** ${strict_error}: No build ID note found in $f" + $strict && exit 2 +@@ -215,13 +238,25 @@ while read nlinks inum f; do esac mkdir -p "${debugdn}" @@ -96,7 +107,7 @@ if [ -n "$id" ]; then make_id_link "$id" "$dn/$(basename $f)" -@@ -250,12 +284,14 @@ +@@ -250,12 +285,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 diff --git a/rpm-python.spec b/rpm-python.spec index adc8420..60c52ff 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 5 +Release: 6 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index e20f8f7..1a589f3 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -43,7 +43,7 @@ # macro: %suse_update_desktop_file # Used to add easily a category to .desktop files according to XDG # standard. -%suse_update_desktop_file(cinrud:D:N:C:G:) \ +%suse_update_desktop_file(cinrtud:D:N:C:G:) \ /usr/lib/rpm/suse_update_desktop_file.sh %{**} || exit 1 \ %nil diff --git a/rpm.changes b/rpm.changes index 0c75c89..3a96b40 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Thu Oct 2 18:30:41 CEST 2008 - vuntz@suse.de + +- support the new -t option of suse_update_desktop_file.sh in + rpm-suse_macros + +------------------------------------------------------------------- +Thu Oct 2 17:43:59 CEST 2008 - mls@suse.de + +- fix rpmrc compile options for ia64 [bnc#431345] + +------------------------------------------------------------------- +Thu Oct 2 16:19:03 CEST 2008 - jblunck@suse.de + +- debugedit: Fix some compilation warnings and the canonicalization error. + ------------------------------------------------------------------- Tue Sep 16 01:01:30 CEST 2008 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index 5f613ee..d60e5f1 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,14 +20,14 @@ Name: rpm License: GPL v2 or later Group: System/Packages -BuildRequires: libbz2-devel libselinux-devel lzma-alpha-devel ncurses-devel zlib-devel +BuildRequires: libbz2-devel libelf-devel libselinux-devel lzma-alpha-devel ncurses-devel zlib-devel Provides: rpminst %define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 5 +Release: 6 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -36,11 +36,9 @@ Source5: rpmsort Source6: symset-table Source8: rpmconfigcheck Source9: sysconfig.services-rpm -Source10: elfutils-0.97.tar.bz2 -Source11: beecrypt-4.1.2.tar.bz2 -Patch1: elfutils-0.97.diff -Patch2: beecrypt-4.1.2.diff -Patch3: db.diff +Source10: beecrypt-4.1.2.tar.bz2 +Patch1: beecrypt-4.1.2.diff +Patch2: db.diff # quilt patches start here Patch10: debugedit.diff Patch11: findfplistexclude.diff @@ -93,6 +91,7 @@ Patch57: whatrequires-doc.diff Patch58: remove-brp-strips.diff Patch59: requires-ge-macro.diff Patch60: mimetype.diff +Patch61: debugedit-canon-fix.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -138,14 +137,8 @@ Authors: %prep %setup -q -n rpm-%{version} rm -rf sqlite -rm -rf elfutils rm -rf beecrypt tar xjf %{SOURCE10} -ln -s elfutils-0.97 elfutils -# remove all OSL stuff -rm -rf elfutils/doc elfutils/libebl elfutils/libdw elfutils/libcpu elfutils/libasm elfutils/src elfutils/po elfutils/tests -rm -rf elfutils/lib/dynamicsizehash.c elfutils/lib/dynamicsizehash.h elfutils/lib/list.h elfutils/lib/xmalloc.c elfutils/lib/xstrdup.c elfutils/lib/xstrndup.c -tar xjf %{SOURCE11} ln -s beecrypt-4.1.2 beecrypt #tar xjf %{SOURCE12} #ln -s neon-0.24.7 neon @@ -155,13 +148,13 @@ rm -f rpmdb/db.h # %setup -q -D -T -a 9 # mv popt popt.orig # ln -s popt-%{popt_version} popt -%patch -P 1 -P 2 -P 3 +%patch -P 1 -P 2 %patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19 %patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 %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 +%patch -P 60 -P 61 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -182,8 +175,6 @@ export CFLAGS="-g -O0 -fno-strict-aliasing" rm -rf zlib cp /usr/share/gettext/config.rpath . cp popt/autogen.sh beecrypt -cp popt/autogen.sh libelf -cp popt/autogen.sh elfutils cp popt/autogen.sh file # cp popt/autogen.sh neon ./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --with-lua --with-selinux --enable-shared @@ -209,7 +200,7 @@ cp -a suse_macros $RPM_BUILD_ROOT/usr/lib/rpm mv $RPM_BUILD_ROOT/usr/src/* $RPM_BUILD_ROOT/usr/src/packages mkdir -p $RPM_BUILD_ROOT/var/lib/rpm mkdir -p $RPM_BUILD_ROOT/var/spool/repackage -rm -rf $RPM_BUILD_ROOT/usr/include/beecrypt $RPM_BUILD_ROOT/usr/include/libelf $RPM_BUILD_ROOT/%{_libdir}/libbeecrypt* $RPM_BUILD_ROOT/usr/lib/libelf* +rm -rf $RPM_BUILD_ROOT/usr/include/beecrypt $RPM_BUILD_ROOT/%{_libdir}/libbeecrypt* gzip -9 $RPM_BUILD_ROOT/%{_mandir}/man[18]/*.[18] export RPM_BUILD_ROOT %ifarch s390x @@ -306,7 +297,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 453 +Release: 454 # %description -n popt @@ -329,7 +320,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 453 +Release: 454 Requires: popt = 1.7 Requires: glibc-devel @@ -364,6 +355,13 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Oct 02 2008 vuntz@suse.de +- support the new -t option of suse_update_desktop_file.sh in + rpm-suse_macros +* Thu Oct 02 2008 mls@suse.de +- fix rpmrc compile options for ia64 [bnc#431345] +* Thu Oct 02 2008 jblunck@suse.de +- debugedit: Fix some compilation warnings and the canonicalization error. * Tue Sep 16 2008 ro@suse.de - fix find-debuginfo.sh and debugsource-package.diff to even apply (directory depth) diff --git a/rpmrc.diff b/rpmrc.diff index 762df24..516c3c0 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -25,7 +25,7 @@ Index: rpmrc.in 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: ia64 -O2 -g -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 From 180d8fb9d175b244812b1389cd5a9ee0642737ecf2ec101ba87ceb42d772a490 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 13 Oct 2008 13:51:18 +0000 Subject: [PATCH 054/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=55 --- rpm-python.changes | 5 +++++ rpm-python.spec | 6 ++++-- rpm.spec | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/rpm-python.changes b/rpm-python.changes index 436626b..a5a836a 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 8 11:24:22 CEST 2008 - cthiel@suse.de + +- added libelf-devel to BuildRequires to fix build + ------------------------------------------------------------------- Thu Sep 11 15:33:52 CEST 2008 - mls@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 60c52ff..d86e2be 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -19,12 +19,12 @@ Name: rpm-python -BuildRequires: libbz2-devel libselinux-devel lzma-alpha-devel ncurses-devel python-devel zlib-devel +BuildRequires: libbz2-devel libelf-devel libselinux-devel lzma-alpha-devel ncurses-devel python-devel zlib-devel License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 6 +Release: 7 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -69,6 +69,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog +* Wed Oct 08 2008 cthiel@suse.de +- added libelf-devel to BuildRequires to fix build * 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 diff --git a/rpm.spec b/rpm.spec index d60e5f1..386c045 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 6 +Release: 7 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -297,7 +297,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 454 +Release: 455 # %description -n popt @@ -320,7 +320,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 454 +Release: 455 Requires: popt = 1.7 Requires: glibc-devel From cd885bd77ca777d215401fa060a8c83b2b36fe4c6dcae8049297b03f2536355f Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 22 Oct 2008 15:28:47 +0000 Subject: [PATCH 055/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=56 --- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 40 ++++++++++++++++++++++++++++++++++------ 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index d86e2be..b87198e 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 7 +Release: 8 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 3a96b40..aa755bc 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 20 16:16:01 CEST 2008 - mls@suse.de + +- drop static libraries and libtool archives + ------------------------------------------------------------------- Thu Oct 2 18:30:41 CEST 2008 - vuntz@suse.de diff --git a/rpm.spec b/rpm.spec index 386c045..cb8f984 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 7 +Release: 8 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -118,7 +118,7 @@ Summary: Include Files and Libraries mandatory for Development License: GPL v2 or later Group: System/Packages Requires: rpm = %{version} -Requires: popt-devel zlib-devel bzip2 libbz2-devel lzma-alpha-devel libselinux-devel +Requires: popt-devel %description devel This package contains the RPM C library and header files. These @@ -129,6 +129,27 @@ need an intimate knowledge of RPM packages in order to function. +Authors: +-------- + Erik Troan + Marc Ewing + +%package devel-static +Summary: Include Files and Libraries mandatory for Development +License: GPL v2 or later +Group: System/Packages +Requires: rpm-devel = %{version} +Requires: zlib-devel bzip2 libbz2-devel lzma-alpha-devel libselinux-devel libebl-devel + +%description devel-static +This package contains the RPM C library and header files. These +development files will simplify the process of writing programs which +manipulate RPM packages and databases and are intended to make it +easier to create graphical package managers or any other tools that +need an intimate knowledge of RPM packages in order to function. + + + Authors: -------- Erik Troan @@ -238,6 +259,8 @@ done popd gzip -9 CHANGES rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} +#rm $RPM_BUILD_ROOT%{_libdir}/*.la +#rm $RPM_BUILD_ROOT%{_libdir}/*.a %clean rm -rf $RPM_BUILD_ROOT @@ -285,19 +308,22 @@ fi %files devel %defattr(644,root,root,755) /usr/include/rpm - %{_libdir}/librpm*.a - %{_libdir}/librpm*.la %{_libdir}/librpm.so %{_libdir}/librpmbuild.so %{_libdir}/librpmdb.so %{_libdir}/librpmio.so +%files devel-static +%defattr(644,root,root,755) + %{_libdir}/librpm*.a + %{_libdir}/librpm*.la + %package -n popt Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 455 +Release: 456 # %description -n popt @@ -320,7 +346,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 455 +Release: 456 Requires: popt = 1.7 Requires: glibc-devel @@ -355,6 +381,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Oct 20 2008 mls@suse.de +- drop static libraries and libtool archives * Thu Oct 02 2008 vuntz@suse.de - support the new -t option of suse_update_desktop_file.sh in rpm-suse_macros From 1b2b9260e6aea9832b89761aeed8da39ef743d742a0937ec3898a1738b855578 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 23 Oct 2008 20:18:30 +0000 Subject: [PATCH 056/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=57 --- debugedit-canon-fix.diff | 96 ++++++++++++++++++++++++++++------------ rpm-python.spec | 2 +- rpm.changes | 17 ++++--- rpm.spec | 8 ++-- 4 files changed, 84 insertions(+), 39 deletions(-) diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff index 606105c..c383010 100644 --- a/debugedit-canon-fix.diff +++ b/debugedit-canon-fix.diff @@ -1,10 +1,15 @@ ---- - tools/debugedit.c | 137 +++++++++++++++++++++++++++--------------------------- - 1 file changed, 70 insertions(+), 67 deletions(-) +Subject: Fix path canonicalization issues in debugedit -Index: b/tools/debugedit.c +This patch fixes multiple problems with path canonicalization in +debugedit. This version of debugedit is taken from the dwarftools repository. + +--- + tools/debugedit.c | 165 ++++++++++++++++++++++++++---------------------------- + 1 file changed, 82 insertions(+), 83 deletions(-) + +Index: tools/debugedit.c =================================================================== ---- tools/debugedit.c +--- tools/debugedit.c.orig +++ tools/debugedit.c @@ -471,13 +471,13 @@ has_prefix (const char *str, { @@ -22,7 +27,7 @@ Index: b/tools/debugedit.c return strncmp (str, prefix, prefix_len) == 0; } -@@ -485,7 +485,7 @@ static int +@@ -485,9 +485,10 @@ static int edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase) { unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir; @@ -30,8 +35,11 @@ Index: b/tools/debugedit.c + char **dirt; unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size; unsigned char *endcu, *endprol; ++ char line_base; unsigned char opcode_base; -@@ -496,9 +496,9 @@ edit_dwarf2_line (DSO *dso, uint_32 off, + uint_32 value, dirt_cnt; + size_t comp_dir_len = strlen (comp_dir); +@@ -496,9 +497,9 @@ edit_dwarf2_line (DSO *dso, uint_32 off, if (phase != 0) return 0; @@ -43,7 +51,7 @@ Index: b/tools/debugedit.c endcu = ptr + 4; endcu += read_32 (ptr); if (endcu == ptr + 0xffffffff) -@@ -521,7 +521,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -521,7 +522,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, value); return 1; } @@ -52,12 +60,13 @@ Index: b/tools/debugedit.c endprol = ptr + 4; endprol += read_32 (ptr); if (endprol > endcu) -@@ -530,26 +530,26 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -530,26 +531,27 @@ edit_dwarf2_line (DSO *dso, uint_32 off, dso->filename); return 1; } - + ++ line_base = (char) (ptr[2] & 0xff); opcode_base = ptr[4]; ptr = dir = ptr + 4 + opcode_base; - @@ -85,7 +94,7 @@ Index: b/tools/debugedit.c } ptr++; -@@ -559,8 +559,8 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -559,8 +561,8 @@ edit_dwarf2_line (DSO *dso, uint_32 off, char *s, *file; size_t file_len, dir_len; @@ -96,7 +105,7 @@ Index: b/tools/debugedit.c value = read_uleb128 (ptr); if (value >= dirt_cnt) -@@ -629,7 +629,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -629,7 +631,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, } free (s); @@ -105,7 +114,7 @@ Index: b/tools/debugedit.c read_uleb128 (ptr); read_uleb128 (ptr); } -@@ -661,7 +661,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -661,7 +663,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, if (dest_dir) { @@ -114,7 +123,7 @@ Index: b/tools/debugedit.c size_t base_len = strlen (base_dir); size_t dest_len = strlen (dest_dir); size_t shrank = 0; -@@ -675,12 +675,16 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -675,12 +677,16 @@ edit_dwarf2_line (DSO *dso, uint_32 off, ptr = dir; } else @@ -135,7 +144,7 @@ Index: b/tools/debugedit.c if (*srcptr == '/' && has_prefix (srcptr, base_dir)) { -@@ -689,24 +693,28 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -689,39 +695,28 @@ edit_dwarf2_line (DSO *dso, uint_32 off, memcpy (ptr, dest_dir, dest_len); ptr += dest_len; readptr += base_len; @@ -149,9 +158,11 @@ Index: b/tools/debugedit.c + canonicalize_path (readptr, (char *)ptr); + len = strlen ((char *)ptr); + ++/* + if ((srcptr - readptr) > len) + error(0, 0,"canonicalization unexpectedly shrank (%lu): \"%s\"\n", + (long unsigned int)(srcptr - readptr) - len, ptr); ++*/ + shrank -= len; ptr += len; @@ -159,21 +170,35 @@ Index: b/tools/debugedit.c - elf_flagdata (debug_sections[DEBUG_STR].elf_data, - ELF_C_SET, ELF_F_DIRTY); - } +- +- if (shrank > 0) +- { +- if (--shrank == 0) +- error (EXIT_FAILURE, 0, +- "canonicalization unexpectedly shrank by one character"); +- memset (ptr, 'X', shrank); +- ptr += shrank; +- *ptr++ = '\0'; + elf_flagdata (debug_sections[DEBUG_STR].elf_data, + ELF_C_SET, ELF_F_DIRTY); + ++ptr; + ++srcptr; -+ } + } - if (shrank > 0) - { -- if (--shrank == 0) -- error (EXIT_FAILURE, 0, -- "canonicalization unexpectedly shrank by one character"); - memset (ptr, 'X', shrank); - ptr += shrank; - *ptr++ = '\0'; -@@ -741,17 +749,17 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +- if (abs_dir_cnt + abs_file_cnt != 0) +- { +- size_t len = (abs_dir_cnt + abs_file_cnt) * (base_len - dest_len); +- +- if (len == 1) +- error (EXIT_FAILURE, 0, "-b arg has to be either the same length as -d arg, or more than 1 char shorter"); +- memset (ptr, 'X', len - 1); +- ptr += len - 1; +- *ptr++ = '\0'; +- } + *ptr++ = '\0'; + ++srcptr; + +@@ -741,21 +736,30 @@ edit_dwarf2_line (DSO *dso, uint_32 off, elf_flagdata (debug_sections[DEBUG_STR].elf_data, ELF_C_SET, ELF_F_DIRTY); } @@ -195,7 +220,20 @@ Index: b/tools/debugedit.c } *ptr = '\0'; free (buf); -@@ -767,17 +775,13 @@ edit_attributes (DSO *dso, unsigned char + } ++ ++ /* move the line number program */ ++ ptr++; ++ if (ptr != endprol) ++ memmove(ptr, endprol, endcu - endprol); ++ ++ /* fill the rest of the section with a NOP opcode */ ++ ptr += endcu - endprol; ++ memset(ptr, opcode_base - line_base, endcu - ptr); + return 0; + } + +@@ -767,17 +771,13 @@ edit_attributes (DSO *dso, unsigned char int i; uint_32 list_offs; int found_list_offs; @@ -215,7 +253,7 @@ Index: b/tools/debugedit.c while (1) { -@@ -791,56 +795,55 @@ edit_attributes (DSO *dso, unsigned char +@@ -791,56 +791,55 @@ edit_attributes (DSO *dso, unsigned char } if (t->attr[i].attr == DW_AT_comp_dir) @@ -294,7 +332,7 @@ Index: b/tools/debugedit.c else if ((t->tag == DW_TAG_compile_unit || t->tag == DW_TAG_partial_unit) && t->attr[i].attr == DW_AT_name -@@ -848,9 +851,9 @@ edit_attributes (DSO *dso, unsigned char +@@ -848,9 +847,9 @@ edit_attributes (DSO *dso, unsigned char && debug_sections[DEBUG_STR].data) { char *name; @@ -307,7 +345,7 @@ Index: b/tools/debugedit.c if (*name == '/' && comp_dir == NULL) { char *enddir = strrchr (name, '/'); -@@ -869,7 +872,7 @@ edit_attributes (DSO *dso, unsigned char +@@ -869,7 +868,7 @@ edit_attributes (DSO *dso, unsigned char { base_len = strlen (base_dir); dest_len = strlen (dest_dir); @@ -316,7 +354,7 @@ Index: b/tools/debugedit.c memcpy (name, dest_dir, dest_len); if (dest_len < base_len) { -@@ -913,7 +916,7 @@ edit_attributes (DSO *dso, unsigned char +@@ -913,7 +912,7 @@ edit_attributes (DSO *dso, unsigned char ptr += 4; break; case DW_FORM_string: diff --git a/rpm-python.spec b/rpm-python.spec index b87198e..5da3543 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 8 +Release: 9 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index aa755bc..af73afd 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 21 11:22:22 CEST 2008 - jblunck@suse.de + +- debugedit: Fix debuginfo problems introduced by last patch (bnc #433182) + ------------------------------------------------------------------- Mon Oct 20 16:16:01 CEST 2008 - mls@suse.de @@ -354,7 +359,7 @@ Thu Mar 22 16:41:44 CET 2007 - stbinner@suse.de - files.diff: when checking %files list also show unpackaged files after "not found" error message [#255780] ------------------------------------------------------------------- +------------------------------------------------------------------- Thu Mar 22 10:45:08 CET 2007 - dmueller@suse.de - remove strangely duplicated libpopt @@ -774,8 +779,8 @@ Wed Sep 7 18:13:11 CEST 2005 - matz@suse.de - Make debuginfo packages require exact version of base rpm. -------------------------------------------------------------------- +------------------------------------------------------------------- Fri Sep 2 13:07:08 CEST 2005 - mls@suse.de - backport CLOEXEC workaround [#93727] @@ -2277,7 +2282,7 @@ Mon Feb 22 15:08:09 MET 1999 - ro@suse.de - update to 2.91 - ported ma's fixes ------------------------------------------------------------------- +------------------------------------------------------------------- Wed Nov 25 19:06:11 MET 1998 - ma@suse.de - new version 2.5.5 @@ -2363,7 +2368,7 @@ Mon Oct 27 15:29:41 MET 1997 - ma@suse.de - patch: ignore errors when installing a symlink and called from YaST - de.po update ----------------------------------------------------------------------- +------------------------------------------------------------------- Thu Aug 7 17:46:48 MEST 1997 - ma@suse.de - duplicate '--nodeps' entry in rpm manpage deleted. @@ -2372,13 +2377,13 @@ Thu Aug 7 17:46:48 MEST 1997 - ma@suse.de is disabeled, unless environment variable RPM_IgnoreFailedSymlinks is set. ----------------------------------------------------------------------- +------------------------------------------------------------------- Tue Jul 15 13:24:22 MEST 1997 - ro@suse.de - added workaround to skip installing a symlink when impossible to remove an existing directory ----------------------------------------------------------------------- +------------------------------------------------------------------- Thu Jun 26 19:10:48 MEST 1997 - ma@suse.de - introducing rpm, version 2.4.1 diff --git a/rpm.spec b/rpm.spec index cb8f984..c6f708f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 8 +Release: 9 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -323,7 +323,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 456 +Release: 457 # %description -n popt @@ -346,7 +346,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 456 +Release: 457 Requires: popt = 1.7 Requires: glibc-devel @@ -381,6 +381,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Oct 21 2008 jblunck@suse.de +- debugedit: Fix debuginfo problems introduced by last patch (bnc #433182) * Mon Oct 20 2008 mls@suse.de - drop static libraries and libtool archives * Thu Oct 02 2008 vuntz@suse.de From d90be4a5acb4836e04b1f51b1f0971d7d7cde231cc273dcdf84667c5dd733e22 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 1 Nov 2008 22:16:01 +0000 Subject: [PATCH 057/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=58 --- debugedit-canon-fix.diff | 55 +++++++++++++++++++++++++++------------- fingerprint.diff | 24 ++++++++++++++++++ rpm-python.spec | 2 +- rpm-suse_macros | 7 ----- rpm.changes | 18 +++++++++++++ rpm.spec | 36 ++++++++++++++++---------- 6 files changed, 103 insertions(+), 39 deletions(-) create mode 100644 fingerprint.diff diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff index c383010..2bc7a42 100644 --- a/debugedit-canon-fix.diff +++ b/debugedit-canon-fix.diff @@ -4,13 +4,22 @@ This patch fixes multiple problems with path canonicalization in debugedit. This version of debugedit is taken from the dwarftools repository. --- - tools/debugedit.c | 165 ++++++++++++++++++++++++++---------------------------- - 1 file changed, 82 insertions(+), 83 deletions(-) + tools/debugedit.c | 168 ++++++++++++++++++++++++++---------------------------- + 1 file changed, 82 insertions(+), 86 deletions(-) Index: tools/debugedit.c =================================================================== --- tools/debugedit.c.orig +++ tools/debugedit.c +@@ -157,7 +157,7 @@ strptr (DSO *dso, int sec, off_t offset) + { + if (data->d_buf + && offset >= data->d_off +- && offset < data->d_off + data->d_size) ++ && offset < data->d_off + (off_t)data->d_size) + return (const char *) data->d_buf + (offset - data->d_off); + } + } @@ -471,13 +471,13 @@ has_prefix (const char *str, { int str_len; @@ -158,11 +167,11 @@ Index: tools/debugedit.c + canonicalize_path (readptr, (char *)ptr); + len = strlen ((char *)ptr); + -+/* ++#ifdef DEBUG + if ((srcptr - readptr) > len) + error(0, 0,"canonicalization unexpectedly shrank (%lu): \"%s\"\n", + (long unsigned int)(srcptr - readptr) - len, ptr); -+*/ ++#endif + shrank -= len; ptr += len; @@ -198,7 +207,7 @@ Index: tools/debugedit.c *ptr++ = '\0'; ++srcptr; -@@ -741,21 +736,30 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -741,21 +736,26 @@ edit_dwarf2_line (DSO *dso, uint_32 off, elf_flagdata (debug_sections[DEBUG_STR].elf_data, ELF_C_SET, ELF_F_DIRTY); } @@ -222,18 +231,14 @@ Index: tools/debugedit.c free (buf); } + -+ /* move the line number program */ + ptr++; -+ if (ptr != endprol) -+ memmove(ptr, endprol, endcu - endprol); -+ -+ /* fill the rest of the section with a NOP opcode */ -+ ptr += endcu - endprol; -+ memset(ptr, opcode_base - line_base, endcu - ptr); ++ /* fill the rest until the line number program starts with NOP opcode */ ++ memset(ptr, opcode_base - line_base, endprol - ptr); ++ /* don't touch the line number program */ return 0; } -@@ -767,17 +771,13 @@ edit_attributes (DSO *dso, unsigned char +@@ -767,17 +767,13 @@ edit_attributes (DSO *dso, unsigned char int i; uint_32 list_offs; int found_list_offs; @@ -242,7 +247,7 @@ Index: tools/debugedit.c - comp_dir = NULL; - list_offs = 0; - found_list_offs = 0; -+ char *comp_dir; ++ char *comp_dir = NULL; + for (i = 0; i < t->nattr; ++i) { @@ -253,7 +258,7 @@ Index: tools/debugedit.c while (1) { -@@ -791,56 +791,55 @@ edit_attributes (DSO *dso, unsigned char +@@ -791,56 +787,55 @@ edit_attributes (DSO *dso, unsigned char } if (t->attr[i].attr == DW_AT_comp_dir) @@ -332,7 +337,7 @@ Index: tools/debugedit.c else if ((t->tag == DW_TAG_compile_unit || t->tag == DW_TAG_partial_unit) && t->attr[i].attr == DW_AT_name -@@ -848,9 +847,9 @@ edit_attributes (DSO *dso, unsigned char +@@ -848,9 +843,9 @@ edit_attributes (DSO *dso, unsigned char && debug_sections[DEBUG_STR].data) { char *name; @@ -345,7 +350,7 @@ Index: tools/debugedit.c if (*name == '/' && comp_dir == NULL) { char *enddir = strrchr (name, '/'); -@@ -869,7 +868,7 @@ edit_attributes (DSO *dso, unsigned char +@@ -869,7 +864,7 @@ edit_attributes (DSO *dso, unsigned char { base_len = strlen (base_dir); dest_len = strlen (dest_dir); @@ -354,7 +359,7 @@ Index: tools/debugedit.c memcpy (name, dest_dir, dest_len); if (dest_len < base_len) { -@@ -913,7 +912,7 @@ edit_attributes (DSO *dso, unsigned char +@@ -913,7 +908,7 @@ edit_attributes (DSO *dso, unsigned char ptr += 4; break; case DW_FORM_string: @@ -363,3 +368,17 @@ Index: tools/debugedit.c break; case DW_FORM_indirect: form = read_uleb128 (ptr); +@@ -1470,10 +1465,11 @@ handle_build_id (DSO *dso, Elf_Data *bui + const unsigned char * id = build_id->d_buf + build_id_offset; + char hex[build_id_size * 2 + 1]; + int n = snprintf (hex, 3, "%02" PRIx8, id[0]); ++ size_t size; + assert (n == 2); +- for (i = 1; i < build_id_size; ++i) ++ for (size = 1; size < build_id_size; ++size) + { +- n = snprintf (&hex[i * 2], 3, "%02" PRIx8, id[i]); ++ n = snprintf (&hex[size * 2], 3, "%02" PRIx8, id[size]); + assert (n == 2); + } + puts (hex); diff --git a/fingerprint.diff b/fingerprint.diff new file mode 100644 index 0000000..bf877d4 --- /dev/null +++ b/fingerprint.diff @@ -0,0 +1,24 @@ +--- rpmio/rpmpgp.c.orig 2008-10-28 16:14:18.000000000 +0000 ++++ rpmio/rpmpgp.c 2008-10-28 16:09:51.000000000 +0000 +@@ -876,6 +876,7 @@ + const uint8_t *se, *h; + DIGEST_CTX ctx; + int rc = -1; /* assume failure. */ ++ byte in[3]; + + if (!(val & 0x80)) + return rc; +@@ -926,7 +927,12 @@ + } + + ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE); +- (void) rpmDigestUpdate(ctx, pkt, (se-pkt)); ++ i = se - h; ++ in[0] = 0x99; ++ in[1] = i >> 8; ++ in[2] = i; ++ (void) rpmDigestUpdate(ctx, in, 3); ++ (void) rpmDigestUpdate(ctx, h, i); + (void) rpmDigestFinal(ctx, (void **)&d, &dlen, 0); + + memmove(keyid, (d + (dlen-8)), 8); diff --git a/rpm-python.spec b/rpm-python.spec index 5da3543..e79e0a9 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 9 +Release: 10 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index 1a589f3..3aea0fb 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -40,13 +40,6 @@ rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \ %nil -# macro: %suse_update_desktop_file -# Used to add easily a category to .desktop files according to XDG -# standard. -%suse_update_desktop_file(cinrtud:D:N:C:G:) \ - /usr/lib/rpm/suse_update_desktop_file.sh %{**} || exit 1 \ - %nil - # macro: %restart_on_update() # Used to restart a service in postun section, if we are # not running from YaST2 in instsys on update. diff --git a/rpm.changes b/rpm.changes index af73afd..9c097c6 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Oct 31 18:59:25 CET 2008 - coolo@suse.de + +- moved suse_update_desktop_files to package update_desktop_files + +------------------------------------------------------------------- +Tue Oct 28 19:07:02 CET 2008 - jblunck@suse.de + +- debugedit: Don't emit NOPs at the end of the line number program but at the + beginning (bnc #433182 again) +- debugedit: Fix an uninitialized variable use that lead to segfaults from + time to time + +------------------------------------------------------------------- +Tue Oct 28 17:18:03 CET 2008 - mls@suse.de + +- fix fingerprint computation for gpg checksums + ------------------------------------------------------------------- Tue Oct 21 11:22:22 CEST 2008 - jblunck@suse.de diff --git a/rpm.spec b/rpm.spec index c6f708f..d4a9a42 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 9 +Release: 10 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -92,6 +92,7 @@ Patch58: remove-brp-strips.diff Patch59: requires-ge-macro.diff Patch60: mimetype.diff Patch61: debugedit-canon-fix.diff +Patch62: fingerprint.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -175,7 +176,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 +%patch -P 60 -P 61 -P 62 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -323,7 +324,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 457 +Release: 458 # %description -n popt @@ -346,7 +347,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 457 +Release: 458 Requires: popt = 1.7 Requires: glibc-devel @@ -381,6 +382,15 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Oct 31 2008 coolo@suse.de +- moved suse_update_desktop_files to package update_desktop_files +* Tue Oct 28 2008 jblunck@suse.de +- debugedit: Don't emit NOPs at the end of the line number program but at the + beginning (bnc #433182 again) +- debugedit: Fix an uninitialized variable use that lead to segfaults from + time to time +* Tue Oct 28 2008 mls@suse.de +- fix fingerprint computation for gpg checksums * Tue Oct 21 2008 jblunck@suse.de - debugedit: Fix debuginfo problems introduced by last patch (bnc #433182) * Mon Oct 20 2008 mls@suse.de @@ -429,7 +439,7 @@ Authors: * Fri May 02 2008 dmueller@suse.de - add at least one supplements prefering the right kernel flavour if no modalias could be generated (bnc#384084) -* Fri May 02 2008 agruen@suse.de +* Thu May 01 2008 agruen@suse.de - For kernel modules, require "kernel(flavor:symset) = version" instead of "kernel(symset) = version". This disambiguates the case where several kernel flavors end up with the same @@ -593,7 +603,7 @@ Authors: %%kernel_module_package_buildreq, %%kernel_module_package, and inside %%kernel_module_package, the macros %%flavors_to_build and %%kernel_source. -* Thu Oct 19 2006 mls@suse.de +* Wed Oct 18 2006 mls@suse.de - split up jumbo patch in 78 small patches - fix lua directory handling [#201518] - add /etc/rpm directory to filelist [#208762] @@ -715,7 +725,7 @@ Authors: * Tue Jan 31 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Add version to additional Provides tag. We may need this for future Obsoletes. -* Sat Jan 28 2006 mls@suse.de +* Fri Jan 27 2006 mls@suse.de - added support for EssentialFor and Supports - enabled support for lua scripts * Fri Jan 27 2006 agruen@suse.de @@ -741,7 +751,7 @@ Authors: - don't ignore getcwd return value in build.c * Mon Dec 19 2005 mls@suse.de - fix find-lang.sh script -* Mon Dec 19 2005 mls@suse.de +* Sun Dec 18 2005 mls@suse.de - fix find-debuginfo script * Sun Dec 18 2005 mls@suse.de - don't assume root:root defattr @@ -792,7 +802,7 @@ Authors: - Fix ppc assembly syntax. * Wed Jun 08 2005 matz@suse.de - add STRIP_KEEP_SYMTAB to find-debuginfo.sh -* Sun May 22 2005 schwab@suse.de +* Sat May 21 2005 schwab@suse.de - find-debuginfo.sh: make writable before extracting debug info, simplify. * Thu May 19 2005 schwab@suse.de - Replace absolute symlinks when copying sources for debuginfo package. @@ -1094,7 +1104,7 @@ Authors: - the official arch_canon value for ppc64 is 16, not 5 * Thu Jan 16 2003 ma@suse.de - update subpackage popt to 1.6.4 -* Fri Dec 20 2002 schwab@suse.de +* Thu Dec 19 2002 schwab@suse.de - Update autogen patch. * Mon Nov 18 2002 stepan@suse.de - add m68k as chanonical architecture to configure.in @@ -1246,7 +1256,7 @@ Authors: - added requires for suse-build-key * Tue Feb 12 2002 ro@suse.de - tar option for bz2 is now "j" (re-added) -* Tue Feb 12 2002 ma@suse.de +* Mon Feb 11 2002 ma@suse.de - unk_ugname_cached.diff: Upon building a package, unpacking sources by calling tar from the spec file, may lead to files with unknown user/group names. If those files are to be included in the final @@ -1259,7 +1269,7 @@ Authors: which may cause a segmentation fault on cache lookup. This has been fixed. * Sat Jan 26 2002 ro@suse.de - apply configure-diff also on s390x -* Tue Jan 22 2002 bk@suse.de +* Mon Jan 21 2002 bk@suse.de - use RPM_OPT_FLAGS for compilation - add lib64 support for s390x - update srcdir-supplied rpm-suse_macros file to newest version @@ -1396,7 +1406,7 @@ Authors: - Fix in config.diff (use Makefile.am not Makefile.in) * Mon Apr 10 2000 schwab@suse.de - Fix config patch. -* Fri Apr 07 2000 bk@suse.de +* Thu Apr 06 2000 bk@suse.de - added /lib/libpopt.so* to filelist on s390 * Wed Apr 05 2000 bk@suse.de - uses autoconf and automake now From 473bbbb4644539befb4bba1b2a954b615aa2cc28743134c0b82429b2de8ba17d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 7 Nov 2008 14:13:35 +0000 Subject: [PATCH 058/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=59 --- rpm-python.spec | 6 +++--- rpm.changes | 5 +++++ rpm.spec | 50 +++++++++++++++++++++++++------------------------ rpmrc.diff | 20 ++++++++++---------- 4 files changed, 44 insertions(+), 37 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index e79e0a9..41101c2 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 10 +Release: 11 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -83,11 +83,11 @@ rm -rf $RPM_BUILD_ROOT - fix unicode queries * Fri Mar 30 2007 rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires. -* Thu Oct 19 2006 mls@suse.de +* Wed Oct 18 2006 mls@suse.de - use rpm.spec for building instead of duplication everything - delete superfluous .a and .la files [#202604] - create .pyc and .pyo files [#205711] -* Mon Oct 16 2006 schwab@suse.de +* Sun Oct 15 2006 schwab@suse.de - Make sure config.rpath is present. * Fri Sep 22 2006 aj@suse.de - Fix for python2.5. diff --git a/rpm.changes b/rpm.changes index 9c097c6..ea0f55c 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 7 15:03:25 CET 2008 - ro@suse.de + +- update gcc flags to current set + ------------------------------------------------------------------- Fri Oct 31 18:59:25 CET 2008 - coolo@suse.de diff --git a/rpm.spec b/rpm.spec index d4a9a42..bcd6090 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 10 +Release: 11 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -324,7 +324,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 458 +Release: 459 # %description -n popt @@ -347,7 +347,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 458 +Release: 459 Requires: popt = 1.7 Requires: glibc-devel @@ -382,6 +382,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Nov 07 2008 ro@suse.de +- update gcc flags to current set * Fri Oct 31 2008 coolo@suse.de - moved suse_update_desktop_files to package update_desktop_files * Tue Oct 28 2008 jblunck@suse.de @@ -454,7 +456,7 @@ Authors: Adds a hint to the misleading --whatrequires option, pointing to the more useful -e --test. Motivated by a talk thread started by Hubert. -* Thu Apr 10 2008 mrueckert@suse.de +* Wed Apr 09 2008 mrueckert@suse.de - revert the last change as it leads to duplicated entries in the file list * Wed Apr 09 2008 jblunck@suse.de @@ -510,7 +512,7 @@ Authors: - implement supplements for lang_packages (#306412) * Fri Aug 10 2007 dmueller@suse.de - package size reduction (#217472) -* Thu Aug 09 2007 dmueller@suse.de +* Wed Aug 08 2007 dmueller@suse.de - support optional -n parameter in %%lang_package - make %%lang_package export a -all provides that can be used to resolve conflicts with the bundle @@ -537,7 +539,7 @@ Authors: - correctly mark KDE documentation as %%doc in find-lang.sh * Fri May 11 2007 coolo@suse.de - adding %%lang_package to simplify seperating translations -* Sat Apr 28 2007 wberrier@suse.de +* Fri Apr 27 2007 wberrier@suse.de - autodeps.diff - bnc #227362 -Print warning if mono assembiles are found but mono-find-* fails (solution is to make sure mono-devel is installed) @@ -554,7 +556,7 @@ Authors: * Tue Apr 17 2007 dmueller@suse.de - strip comment and gcc command line sections from the packages - rework SYMTAB_KEEP to accept a file pattern -* Mon Apr 09 2007 schwab@suse.de +* Sun Apr 08 2007 schwab@suse.de - Include compilation directory in debuginfo file list. * Sat Mar 24 2007 ro@suse.de - added libbz2-devel to BuildRequires and Requires for -devel @@ -611,7 +613,7 @@ Authors: - Fix the KMP Package spec file template so that whenever the initrd contains a module that the KMP includes, the initrd will be regenerated (211646). -* Mon Oct 16 2006 schwab@suse.de +* Sun Oct 15 2006 schwab@suse.de - Make sure config.rpath is present. * Mon Oct 02 2006 agruen@suse.de - %%suse_kernel_module_package: Abort when trying to build for a @@ -621,12 +623,12 @@ Authors: - Allow kernel modules in packages even when the dependencies between those packages and the matching kernel packages cannot be tracked (199474). -* Sun Oct 01 2006 agruen@suse.de +* Sat Sep 30 2006 agruen@suse.de - Make find-*.ksyms more robust. * Tue Sep 19 2006 rguenther@suse.de - split rpm-python to separate spec file - remove python-devel BuildRequires -* Tue Aug 15 2006 ro@suse.de +* Mon Aug 14 2006 ro@suse.de - workaround for gettext using MKINSTALLDIRS in configure.ac * Wed Jun 14 2006 mls@suse.de - make rpmlib provide rpmlib(PatchRPMs) [#184856] @@ -710,14 +712,14 @@ Authors: - add back missing chunk of srcdefattr patch [#48870] - add rpmvercmp patch from Peter Bowan - add -m32 to ix86 optflags to make --target work [#141206] -* Sun Feb 05 2006 agruen@suse.de +* Sat Feb 04 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Allow to specify a list of kernel flavors to build (-x) instead of specifying an exclude list. * Fri Feb 03 2006 mls@suse.de - use RPMSENSE_STRONG instead of RPMSENSE_WEAK - drop support for EssentialFor -* Thu Feb 02 2006 agruen@suse.de +* Wed Feb 01 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Allow to specify a custom %%files list for the kernel-specific sub-packages. Use the Summary and Group tags, and the %%description section from the @@ -774,7 +776,7 @@ Authors: - fix patchrpm code not to modify immutable header parts * Fri Nov 18 2005 ro@suse.de - honor NO_BRP_STRIP_DEBUG in find-debuginfo.sh -* Sat Oct 29 2005 mls@suse.de +* Fri Oct 28 2005 mls@suse.de - use lstat instead of stat when globbing (#129434) - add RPMTAG_PKGID and RPMTAG_HDRID - make python always return requires/provides/obsoletes/conflicts @@ -851,16 +853,16 @@ Authors: - use binutils for debuginfo packages * Fri Jan 14 2005 coolo@suse.de - name the debug package -debuginfo to sync with redhat/fedora -* Tue Dec 14 2004 sndirsch@suse.de +* Mon Dec 13 2004 sndirsch@suse.de - moved chinese popt mo file to correct directory (Bug #47262) * Fri Dec 03 2004 mls@suse.de - fix update of rpm with same name/version/release but different architecture -* Fri Nov 26 2004 ro@suse.de +* Thu Nov 25 2004 ro@suse.de - fix build with python-2.4 * Tue Nov 16 2004 ro@suse.de - update permissions handling -* Tue Oct 19 2004 ro@suse.de +* Mon Oct 18 2004 ro@suse.de - locale rename: no -> nb * Mon Sep 27 2004 mls@suse.de - move TE type initializaten before the addTE call to make @@ -950,7 +952,7 @@ Authors: * Thu Feb 05 2004 ro@suse.de - linux.prov: don't block soname in versioned-requires - linux.req: disable perl-requires, it's broken -* Wed Feb 04 2004 schwab@suse.de +* Tue Feb 03 2004 schwab@suse.de - Readd ia64 64bit provides hack. * Tue Feb 03 2004 kukuk@suse.de - Remove all special find-requires scripts and use the default one @@ -978,7 +980,7 @@ Authors: - really disable rpmconfigcheck * Sat Sep 20 2003 kukuk@suse.de - Don't enable rpmconfigcheck per default -* Sat Sep 20 2003 schwab@suse.de +* Fri Sep 19 2003 schwab@suse.de - Fix descriptor leak [#31450]. * Mon Sep 15 2003 mls@suse.de - remove redhat options from popt (#30302) @@ -1037,7 +1039,7 @@ Authors: - make PreReqs work again if --nodeps is used - fix rpmconfigcheck - apply find-debuginfo.sh patch from coolo -* Fri Jun 13 2003 kukuk@suse.de +* Thu Jun 12 2003 kukuk@suse.de - Fix find-lang.sh (special /usr/share/locale handling) * Thu Jun 12 2003 coolo@suse.de - enhancing find-lang.sh to take KDE/GNOME into account and label @@ -1142,7 +1144,7 @@ Authors: - Fix typo * Fri Aug 09 2002 kukuk@suse.de - Fix requires of rpm-devel and popt-devel -* Fri Aug 09 2002 ro@suse.de +* Thu Aug 08 2002 ro@suse.de - adapt automake version in configure * Fri Jul 26 2002 mls@suse.de - Added perl/python macros from conectiva @@ -1170,7 +1172,7 @@ Authors: * Tue Jul 02 2002 ke@suse.de - Update German program messages using translations by Christian Kirsch. Add as Source7; drop Patch19 [# 8442]. -* Fri Jun 21 2002 ro@suse.de +* Thu Jun 20 2002 ro@suse.de - automake is 1.6.2 * Wed Jun 12 2002 bk@suse.de - ppc: fix arch for elf64.prov and elf64.req to powerpc(from olh) @@ -1254,7 +1256,7 @@ Authors: - Fix to build with new gettext. * Mon Feb 18 2002 ro@suse.de - added requires for suse-build-key -* Tue Feb 12 2002 ro@suse.de +* Mon Feb 11 2002 ro@suse.de - tar option for bz2 is now "j" (re-added) * Mon Feb 11 2002 ma@suse.de - unk_ugname_cached.diff: Upon building a package, unpacking sources @@ -1408,7 +1410,7 @@ Authors: - Fix config patch. * Thu Apr 06 2000 bk@suse.de - added /lib/libpopt.so* to filelist on s390 -* Wed Apr 05 2000 bk@suse.de +* Tue Apr 04 2000 bk@suse.de - uses autoconf and automake now - added /lib/libbz2.so* and /lib/libz.so* to filelist on s390 * Sun Apr 02 2000 bk@suse.de @@ -1450,7 +1452,7 @@ Authors: - again rebuilddb.patch * Wed Jul 14 1999 ro@suse.de - update to 3.0.3 -* Mon Jun 28 1999 ro@suse.de +* Sun Jun 27 1999 ro@suse.de - changed macros.in for libc5 : no "h" parameter for chown,chmod * Fri Jun 25 1999 ro@suse.de - update to rpm-3.0.2 diff --git a/rpmrc.diff b/rpmrc.diff index 516c3c0..fe9a5fe 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -15,18 +15,18 @@ Index: rpmrc.in -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 -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: i386 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++optflags: i486 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++optflags: i686 -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +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 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -+optflags: x86_64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 ++optflags: ia64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++optflags: x86_64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: amd64 -O2 -g -mtune=generic optflags: ia32e -O2 -g -m64 -mtune=generic @@ -41,13 +41,13 @@ Index: rpmrc.in -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: ppc -O2 -g -m32 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +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: ppc64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: parisc -O2 -g -mpa-risc-1-0 +optflags: hppa -O2 -g -mpa-risc-1-0 @@ -60,8 +60,8 @@ Index: rpmrc.in -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 ++optflags: s390 -O2 -g -m31 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++optflags: s390x -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: sh3 -O2 -g optflags: sh4 -O2 -g From e2d5e1342a6bb5d0737652e69c2cabf4e0eba0d0fb59e1684c14cab2fe25f920 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 17 Nov 2008 15:33:54 +0000 Subject: [PATCH 059/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=60 --- findksyms.diff | 7 +++++-- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/findksyms.diff b/findksyms.diff index b804b3b..f8554e5 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -4,7 +4,7 @@ Index: scripts/find-provides.ksyms =================================================================== --- /dev/null +++ scripts/find-provides.ksyms -@@ -0,0 +1,20 @@ +@@ -0,0 +1,23 @@ +#! /bin/sh + +IFS=$'\n' @@ -21,8 +21,11 @@ Index: scripts/find-provides.ksyms +fi + +for module in $(grep -E '/lib/modules/.+\.ko$'); do ++ flavor=$(/sbin/modinfo -F vermagic "$module") ++ flavor=${flavor%% *} ++ flavor=${flavor##*-} + nm "$module" \ -+ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):ksym(\2) = \1:p' ++ | sed -r -ne "s:^0*([0-9a-f]+) A __crc_(.+):ksym($flavor:\\2) = \\1:p" +done \ +| sort -u Index: scripts/find-requires.ksyms diff --git a/rpm-python.spec b/rpm-python.spec index 41101c2..5557180 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 11 +Release: 12 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index ea0f55c..7888b5b 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Nov 13 18:16:14 CET 2008 - agruen@suse.de + +- Fix the ksym(...) provides to also include the kernel flavor + (bnc#444698). + ------------------------------------------------------------------- Fri Nov 7 15:03:25 CET 2008 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index bcd6090..5236bde 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 11 +Release: 12 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -324,7 +324,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 459 +Release: 460 # %description -n popt @@ -347,7 +347,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 459 +Release: 460 Requires: popt = 1.7 Requires: glibc-devel @@ -382,6 +382,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Nov 13 2008 agruen@suse.de +- Fix the ksym(...) provides to also include the kernel flavor + (bnc#444698). * Fri Nov 07 2008 ro@suse.de - update gcc flags to current set * Fri Oct 31 2008 coolo@suse.de From d9076f08caba314c6d3aa8291928c2a8b8825f2f1583b10fb7f39fc60876223d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 21 Nov 2008 14:08:47 +0000 Subject: [PATCH 060/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=61 --- finddebuginfo-absolute-links.diff | 35 +++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 11 ++++++---- 4 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 finddebuginfo-absolute-links.diff diff --git a/finddebuginfo-absolute-links.diff b/finddebuginfo-absolute-links.diff new file mode 100644 index 0000000..381b58e --- /dev/null +++ b/finddebuginfo-absolute-links.diff @@ -0,0 +1,35 @@ +From: Jan Blunck +Subject: Do the symbolic links right in the first place + +Since brp-symlink relinks symbolic links to enforce a certain policy we should +do it right in the first place. So this patch changes find-debuginfo.sh scripts +behavior to reflect that policy. + +Signed-off-by: Jan Blunck +--- + scripts/find-debuginfo.sh | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +Index: scripts/find-debuginfo.sh +=================================================================== +--- scripts/find-debuginfo.sh.orig ++++ scripts/find-debuginfo.sh +@@ -123,7 +123,17 @@ debug_link() + local l="/usr/lib/debug$2" + local t="$1" + echo >> "$LINKSFILE" "$l $t" +- link_relative "$t" "$l" "$RPM_BUILD_ROOT" ++ ++ # this should correspond to what brp-symlink is doing ++ case $t in ++ /usr*) ++ link_relative "$t" "$l" "$RPM_BUILD_ROOT" ++ ;; ++ *) ++ mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \ ++ ln -snf "$t" "$RPM_BUILD_ROOT$l" ++ ;; ++ esac + } + + # Compare two binaries but ignore the .note.gnu.build-id section diff --git a/rpm-python.spec b/rpm-python.spec index 5557180..93ae284 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 12 +Release: 14 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 7888b5b..37c79a6 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 18 17:46:53 CET 2008 - jblunck@suse.de + +- find-debuginfo.sh: Create symlinks reflecting the policy from brp-symlink + ------------------------------------------------------------------- Thu Nov 13 18:16:14 CET 2008 - agruen@suse.de diff --git a/rpm.spec b/rpm.spec index 5236bde..17f2981 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 12 +Release: 14 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -93,6 +93,7 @@ Patch59: requires-ge-macro.diff Patch60: mimetype.diff Patch61: debugedit-canon-fix.diff Patch62: fingerprint.diff +Patch63: finddebuginfo-absolute-links.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -176,7 +177,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 +%patch -P 60 -P 61 -P 62 -P 63 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -324,7 +325,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 460 +Release: 462 # %description -n popt @@ -347,7 +348,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 460 +Release: 462 Requires: popt = 1.7 Requires: glibc-devel @@ -382,6 +383,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Nov 18 2008 jblunck@suse.de +- find-debuginfo.sh: Create symlinks reflecting the policy from brp-symlink * Thu Nov 13 2008 agruen@suse.de - Fix the ksym(...) provides to also include the kernel flavor (bnc#444698). From 233e3d0fd012e0f8a39655930afd9aa4235fe7ed95b863e58c60d2fe0cff2580 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 21 Nov 2008 14:09:51 +0000 Subject: [PATCH 061/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=62 --- findksyms.diff | 2 +- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/findksyms.diff b/findksyms.diff index f8554e5..1734b87 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -25,7 +25,7 @@ Index: scripts/find-provides.ksyms + flavor=${flavor%% *} + flavor=${flavor##*-} + nm "$module" \ -+ | sed -r -ne "s:^0*([0-9a-f]+) A __crc_(.+):ksym($flavor:\\2) = \\1:p" ++ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" +done \ +| sort -u Index: scripts/find-requires.ksyms diff --git a/rpm-python.spec b/rpm-python.spec index 93ae284..62a0cfa 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 14 +Release: 15 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 37c79a6..4c81235 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 21 14:38:57 CET 2008 - mmarek@suse.cz + +- fixed sed expression in find-provides.ksyms + ------------------------------------------------------------------- Tue Nov 18 17:46:53 CET 2008 - jblunck@suse.de diff --git a/rpm.spec b/rpm.spec index 17f2981..cdf9c4b 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 14 +Release: 15 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -325,7 +325,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 462 +Release: 463 # %description -n popt @@ -348,7 +348,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 462 +Release: 463 Requires: popt = 1.7 Requires: glibc-devel @@ -383,6 +383,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Nov 21 2008 mmarek@suse.cz +- fixed sed expression in find-provides.ksyms * Tue Nov 18 2008 jblunck@suse.de - find-debuginfo.sh: Create symlinks reflecting the policy from brp-symlink * Thu Nov 13 2008 agruen@suse.de From a6655a4dd9a28e2a4c777ca998442452bb8467f014996166211936e458a3154e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 21 Nov 2008 15:55:58 +0000 Subject: [PATCH 062/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=63 --- firmware.diff | 37 +++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 13 +++++++++---- 4 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 firmware.diff diff --git a/firmware.diff b/firmware.diff new file mode 100644 index 0000000..2ba7522 --- /dev/null +++ b/firmware.diff @@ -0,0 +1,37 @@ +Index: autodeps/linux.prov +=================================================================== +--- autodeps/linux.prov.orig ++++ autodeps/linux.prov +@@ -12,6 +12,7 @@ pythonlist= + tcllist= + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) ++firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) + + # + # --- Alpha does not mark 64bit dependencies +@@ -65,6 +66,11 @@ done | sort -u + printf "%s\n" "${mimetypelist[@]}" | /usr/lib/rpm/mimetypes.prov | sort -u + + # ++# --- firmware files ++[ -x /usr/lib/rpm/firmware.prov -a -n "$firmwarelist" ] && ++ printf "%s\n" "${firmwarelist[@]}" | /usr/lib/rpm/firmware.prov | sort -u ++ ++# + # --- Mono exes/dlls + : ${MONO_PREFIX=/usr} + if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then +Index: scripts/firmware.prov +=================================================================== +--- /dev/null ++++ scripts/firmware.prov +@@ -0,0 +1,8 @@ ++#!/bin/sh ++# Add firmware files in /lib/firmware into RPM provides ++ ++while read instfile ; do ++ case $instfile in ++ */lib/firmware/*) test -f "$instfile" && echo "firmware(${instfile##*/lib/firmware/})" ;; ++ esac ++done diff --git a/rpm-python.spec b/rpm-python.spec index 62a0cfa..11b946b 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 15 +Release: 16 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 4c81235..ce7f03f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 21 16:30:19 CET 2008 - mls@suse.de + +- add firmware.prov provides helper + ------------------------------------------------------------------- Fri Nov 21 14:38:57 CET 2008 - mmarek@suse.cz diff --git a/rpm.spec b/rpm.spec index cdf9c4b..e3c8d9e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 15 +Release: 16 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -94,6 +94,7 @@ Patch60: mimetype.diff Patch61: debugedit-canon-fix.diff Patch62: fingerprint.diff Patch63: finddebuginfo-absolute-links.diff +Patch64: firmware.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -177,9 +178,10 @@ 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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms +chmod 755 scripts/firmware.prov tar -xjvf %{SOURCE1} tar -xjvf %{SOURCE2} if [ -s /etc/rpm/suse_macros ]; then @@ -241,6 +243,7 @@ find $RPM_BUILD_ROOT/usr/src/packages/* -type d | sed -e "s@$RPM_BUILD_ROOT@@" > install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm +install -m 755 scripts/firmware.prov $RPM_BUILD_ROOT/usr/lib/rpm rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc mkdir -p $RPM_BUILD_ROOT/etc/rpm chmod 755 $RPM_BUILD_ROOT/etc/rpm @@ -325,7 +328,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 463 +Release: 464 # %description -n popt @@ -348,7 +351,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 463 +Release: 464 Requires: popt = 1.7 Requires: glibc-devel @@ -383,6 +386,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Nov 21 2008 mls@suse.de +- add firmware.prov provides helper * Fri Nov 21 2008 mmarek@suse.cz - fixed sed expression in find-provides.ksyms * Tue Nov 18 2008 jblunck@suse.de From 8f9b9d3c82ed5ff42c2ecb9ccce9b5cfa2699ee97779942bda0b4bc351b39f08 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Nov 2008 13:34:30 +0000 Subject: [PATCH 063/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=64 --- finddebuginfo-absolute-links.diff | 21 ++++++++++++++++----- modalias-kernel_module.diff | 4 ++-- modalias.diff | 19 ++++++++++++++++--- rpm-python.spec | 2 +- rpm.changes | 13 +++++++++++++ rpm.spec | 16 ++++++++++++---- rpmrc.diff | 2 +- specfilemacro.diff | 10 ++++++++++ 8 files changed, 71 insertions(+), 16 deletions(-) create mode 100644 specfilemacro.diff diff --git a/finddebuginfo-absolute-links.diff b/finddebuginfo-absolute-links.diff index 381b58e..da28ce1 100644 --- a/finddebuginfo-absolute-links.diff +++ b/finddebuginfo-absolute-links.diff @@ -7,13 +7,13 @@ behavior to reflect that policy. Signed-off-by: Jan Blunck --- - scripts/find-debuginfo.sh | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) + scripts/find-debuginfo.sh | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) -Index: scripts/find-debuginfo.sh +Index: b/scripts/find-debuginfo.sh =================================================================== ---- scripts/find-debuginfo.sh.orig -+++ scripts/find-debuginfo.sh +--- a/scripts/find-debuginfo.sh ++++ b/scripts/find-debuginfo.sh @@ -123,7 +123,17 @@ debug_link() local l="/usr/lib/debug$2" local t="$1" @@ -33,3 +33,14 @@ Index: scripts/find-debuginfo.sh } # Compare two binaries but ignore the .note.gnu.build-id section +@@ -157,8 +167,8 @@ make_id_link() + + local other=$(readlink -m "$root_idfile") + other=${other#$RPM_BUILD_ROOT} +- if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" || +- elfcmp "$root_idfile" "$RPM_BUILD_ROOT$file" ; then ++ if cmp -s "$RPM_BUILD_ROOT$other" "$RPM_BUILD_ROOT$file" || ++ elfcmp "$RPM_BUILD_ROOT$other" "$RPM_BUILD_ROOT$file" ; then + # Two copies. Maybe one has to be setuid or something. + echo >&2 "*** WARNING: identical binaries are copied, not linked:" + echo >&2 " $file" diff --git a/modalias-kernel_module.diff b/modalias-kernel_module.diff index ddee61d..293c6f9 100644 --- a/modalias-kernel_module.diff +++ b/modalias-kernel_module.diff @@ -3,7 +3,7 @@ @@ -1,6 +1,8 @@ #! /bin/sh -+RPM_SOURCE_DIR=/usr/src/packages/SOURCES ++SPECFILE=${RPMBUILD_SPECFILE:-/usr/src/packages/SOURCES/$1.spec} IFS=$'\n' +PACKAGE=$1 @@ -44,7 +44,7 @@ + regex=$( + set -o noglob + set -- $(sed -ne 's:^%supplements_kernel_module[ \t]::p' \ -+ $RPM_SOURCE_DIR/$1.spec) ++ $SPECFILE) + while [ $# -ge 1 ]; do + regex=$(echo "$1" \ + | sed -e 's:[.]:\\.:g' \ diff --git a/modalias.diff b/modalias.diff index bba9fae..88f2b35 100644 --- a/modalias.diff +++ b/modalias.diff @@ -4,12 +4,25 @@ Index: macros.in =================================================================== --- macros.in.orig +++ macros.in -@@ -440,7 +440,7 @@ print (t)\ - %__find_requires @RPMCONFIGDIR@/find-requires %name +@@ -433,14 +433,18 @@ print (t)\ + # + # Path to scripts to autogenerate package dependencies, + # ++%__set_helper_env %{lua: ++posix.setenv("RPMBUILD_SPECFILE",rpm.expand("%?_specfile")); ++posix.setenv("RPMBUILD_SOURCEDIR",rpm.expand("%?_sourcedir")); ++} + # Note: Used iff _use_internal_dependency_generator is zero. + #%__find_provides @RPMCONFIGDIR@/rpmdeps --provides + #%__find_requires @RPMCONFIGDIR@/rpmdeps --requires +-%__find_provides @RPMCONFIGDIR@/find-provides %name +-%__find_requires @RPMCONFIGDIR@/find-requires %name ++%__find_provides %{__set_helper_env}@RPMCONFIGDIR@/find-provides %name ++%__find_requires %{__set_helper_env}@RPMCONFIGDIR@/find-requires %name #%__find_conflicts ??? #%__find_obsoletes ??? -#%__find_supplements ??? -+%__find_supplements @RPMCONFIGDIR@/find-supplements %name ++%__find_supplements %{__set_helper_env}@RPMCONFIGDIR@/find-supplements %name #%__find_enhances ??? # diff --git a/rpm-python.spec b/rpm-python.spec index 11b946b..86f6c07 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 16 +Release: 17 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index ce7f03f..c456b47 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Nov 27 11:37:30 CET 2008 - mls@suse.de + +- remove '-m64' from ppc64 optflags [bnc#447002] +- add _specfile macro +- set RPMBUILD_ env vars for file helpers +- make find-supplements.ksyms use RPMBUILD_SPECFILE [bnc#443815] + +------------------------------------------------------------------- +Tue Nov 25 17:10:40 CET 2008 - jblunck@suse.de + +- find-debuginfo.sh: fix for handling absolute symlinks + ------------------------------------------------------------------- Fri Nov 21 16:30:19 CET 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index e3c8d9e..18c7e23 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 16 +Release: 17 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -95,6 +95,7 @@ Patch61: debugedit-canon-fix.diff Patch62: fingerprint.diff Patch63: finddebuginfo-absolute-links.diff Patch64: firmware.diff +Patch65: specfilemacro.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -178,7 +179,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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/firmware.prov @@ -328,7 +329,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 464 +Release: 465 # %description -n popt @@ -351,7 +352,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 464 +Release: 465 Requires: popt = 1.7 Requires: glibc-devel @@ -386,6 +387,13 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Nov 27 2008 mls@suse.de +- remove '-m64' from ppc64 optflags [bnc#447002] +- add _specfile macro +- set RPMBUILD_ env vars for file helpers +- make find-supplements.ksyms use RPMBUILD_SPECFILE [bnc#443815] +* Tue Nov 25 2008 jblunck@suse.de +- find-debuginfo.sh: fix for handling absolute symlinks * Fri Nov 21 2008 mls@suse.de - add firmware.prov provides helper * Fri Nov 21 2008 mmarek@suse.cz diff --git a/rpmrc.diff b/rpmrc.diff index fe9a5fe..4b6dedc 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -47,7 +47,7 @@ Index: rpmrc.in +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 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++optflags: ppc64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: parisc -O2 -g -mpa-risc-1-0 +optflags: hppa -O2 -g -mpa-risc-1-0 diff --git a/specfilemacro.diff b/specfilemacro.diff new file mode 100644 index 0000000..cac5b0a --- /dev/null +++ b/specfilemacro.diff @@ -0,0 +1,10 @@ +--- build/parseSpec.c.orig 2008-11-27 11:41:51.000000000 +0100 ++++ build/parseSpec.c 2008-11-27 11:43:00.000000000 +0100 +@@ -475,6 +475,7 @@ + * /.././../usr/../bin//./sh (XXX FIXME: dots not handled yet) + */ + spec->specFile = rpmGetPath(specFile, NULL); ++ addMacro(spec->macros, "_specfile", NULL, spec->specFile, RMIL_SPEC); + spec->fileStack = newOpenFileInfo(); + spec->fileStack->fileName = xstrdup(spec->specFile); + if (buildRootURL) { From 06ea39905ce533762020bdaf33f288a230505f5acc15bc3410fd9dea25eab8f2 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Nov 2008 13:47:54 +0000 Subject: [PATCH 064/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=65 --- macrosin.diff | 2 +- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/macrosin.diff b/macrosin.diff index a1fe427..0818b05 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -16,7 +16,7 @@ Index: macros.in Group: Development/Debug\ AutoReqProv: 0\ -%description debug\ -+Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ ++#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ +%description debuginfo\ This package provides debug information for package %{name}.\ Debug information is useful when developing applications that use this\ diff --git a/rpm-python.spec b/rpm-python.spec index 86f6c07..d637e29 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 17 +Release: 18 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index c456b47..5b3d310 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 28 14:46:04 CET 2008 - mls@suse.de + +- disable debug package requires for now, they cause more harm + than benefits + ------------------------------------------------------------------- Thu Nov 27 11:37:30 CET 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 18c7e23..7578702 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 17 +Release: 18 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -329,7 +329,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 465 +Release: 466 # %description -n popt @@ -352,7 +352,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 465 +Release: 466 Requires: popt = 1.7 Requires: glibc-devel @@ -387,6 +387,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Nov 28 2008 mls@suse.de +- disable debug package requires for now, they cause more harm + than benefits * Thu Nov 27 2008 mls@suse.de - remove '-m64' from ppc64 optflags [bnc#447002] - add _specfile macro From a4b6681cdd11cc509694d8061e5a212ec1a19a0f1a20b4573ee1d14f98bd3e2a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Nov 2008 15:19:38 +0000 Subject: [PATCH 065/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=66 --- finddebuginfo-absolute-links.diff | 4 ++-- rpm-filelist-bufferoverflow.diff | 12 ++++++++++++ rpm-python.spec | 2 +- rpm-suse_macros | 5 +++++ rpm.changes | 7 +++++++ rpm.spec | 13 +++++++++---- 6 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 rpm-filelist-bufferoverflow.diff diff --git a/finddebuginfo-absolute-links.diff b/finddebuginfo-absolute-links.diff index da28ce1..20098fb 100644 --- a/finddebuginfo-absolute-links.diff +++ b/finddebuginfo-absolute-links.diff @@ -12,8 +12,8 @@ Signed-off-by: Jan Blunck Index: b/scripts/find-debuginfo.sh =================================================================== ---- a/scripts/find-debuginfo.sh -+++ b/scripts/find-debuginfo.sh +--- scripts/find-debuginfo.sh ++++ scripts/find-debuginfo.sh @@ -123,7 +123,17 @@ debug_link() local l="/usr/lib/debug$2" local t="$1" diff --git a/rpm-filelist-bufferoverflow.diff b/rpm-filelist-bufferoverflow.diff new file mode 100644 index 0000000..47397c3 --- /dev/null +++ b/rpm-filelist-bufferoverflow.diff @@ -0,0 +1,12 @@ +--- build/files.c ++++ build/files.c +@@ -2053,7 +2053,8 @@ static int processPackageFiles(Spec spec, Package pkg, + continue; + fileName = NULL; + /*@-nullpass@*/ /* LCL: buf is NULL ?!? */ +- strcpy(buf, s); ++ strncpy(buf, s, sizeof(buf)-1); ++ buf[sizeof(buf)-1] = '\0'; + /*@=nullpass@*/ + + /* Reset for a new line in %files */ diff --git a/rpm-python.spec b/rpm-python.spec index d637e29..8f43ecf 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 18 +Release: 19 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index 3aea0fb..d6b9e42 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -366,6 +366,11 @@ %cflags_profile_generate -fprofile-generate %cflags_profile_feedback -fprofile-use +%suse_install_update_message() \ + install -D -m 644 %1 %buildroot/var/adm/update-messages/%{name}-%{version}-%{release}-%(basename %1).txt +%suse_install_update_script() \ + install -D -m 755 %1 %buildroot/var/adm/update-scripts/%{name}-%{version}-%{release}-%(basename %1).txt + # Template for lang sub-package. %lang_package(n:) \ %package %{-n:-n %{-n*}-}lang \ diff --git a/rpm.changes b/rpm.changes index 5b3d310..e2b6962 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 28 15:15:10 CET 2008 - dmueller@suse.de + +- fix build +- fix stack based buffer overflow in filelist parsing (bnc#397006) +- add macros for update messages and update scripts + ------------------------------------------------------------------- Fri Nov 28 14:46:04 CET 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 7578702..e4819b2 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 18 +Release: 19 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -96,6 +96,7 @@ Patch62: fingerprint.diff Patch63: finddebuginfo-absolute-links.diff Patch64: firmware.diff Patch65: specfilemacro.diff +Patch66: rpm-filelist-bufferoverflow.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -179,7 +180,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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/firmware.prov @@ -329,7 +330,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 466 +Release: 467 # %description -n popt @@ -352,7 +353,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 466 +Release: 467 Requires: popt = 1.7 Requires: glibc-devel @@ -387,6 +388,10 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Nov 28 2008 dmueller@suse.de +- fix build +- fix stack based buffer overflow in filelist parsing (bnc#397006) +- add macros for update messages and update scripts * Fri Nov 28 2008 mls@suse.de - disable debug package requires for now, they cause more harm than benefits From 0d4f84aeaa152d44a731e763a61383f3eb6feebea3b9192e6736efe4c46269cf Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 2 Dec 2008 14:49:45 +0000 Subject: [PATCH 066/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=67 --- baselibs.conf | 1 + rpm-python.spec | 2 +- rpm-suse_macros | 7 +++++-- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index 2e87827..e9d7bde 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1,2 @@ popt +rpm diff --git a/rpm-python.spec b/rpm-python.spec index 8f43ecf..803f11c 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 19 +Release: 20 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index d6b9e42..223bd83 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -367,9 +367,12 @@ %cflags_profile_feedback -fprofile-use %suse_install_update_message() \ - install -D -m 644 %1 %buildroot/var/adm/update-messages/%{name}-%{version}-%{release}-%(basename %1).txt + install -D -m 644 %1 %buildroot/var/adm/update-messages/%{name}-%{version}-%{release}-%(basename %1).txt \ +%nil + %suse_install_update_script() \ - install -D -m 755 %1 %buildroot/var/adm/update-scripts/%{name}-%{version}-%{release}-%(basename %1).txt + install -D -m 755 %1 %buildroot/var/adm/update-scripts/%{name}-%{version}-%{release}-%(basename %1).txt \ +%nil # Template for lang sub-package. %lang_package(n:) \ diff --git a/rpm.changes b/rpm.changes index e2b6962..862c8e2 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 1 12:35:39 CET 2008 - ro@suse.de + +- add rpm to baselibs.conf (for net-snmp) +- append a "nil" after suse_install_update_script and _message + ------------------------------------------------------------------- Fri Nov 28 15:15:10 CET 2008 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index e4819b2..30a3e59 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 19 +Release: 20 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -330,7 +330,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 467 +Release: 468 # %description -n popt @@ -353,7 +353,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 467 +Release: 468 Requires: popt = 1.7 Requires: glibc-devel @@ -388,6 +388,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Dec 01 2008 ro@suse.de +- add rpm to baselibs.conf (for net-snmp) +- append a "nil" after suse_install_update_script and _message * Fri Nov 28 2008 dmueller@suse.de - fix build - fix stack based buffer overflow in filelist parsing (bnc#397006) From 18106e2730f7e38b2185b5a1c1f1de0822d7d1fd3fa371c7dac9c2bc697d5808 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 15 Dec 2008 10:56:27 +0000 Subject: [PATCH 067/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=68 --- brp.diff | 4 +++- finddebuginfo.diff | 4 ++-- modalias-encode.diff | 40 ++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 18 ++++++++++++++++++ rpm.spec | 18 ++++++++++++++---- 6 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 modalias-encode.diff diff --git a/brp.diff b/brp.diff index 6cfbc95..e7a7d44 100644 --- a/brp.diff +++ b/brp.diff @@ -88,7 +88,7 @@ Index: scripts/brp-symlink =================================================================== --- /dev/null +++ scripts/brp-symlink -@@ -0,0 +1,182 @@ +@@ -0,0 +1,184 @@ +#!/bin/sh + +# Task: go through the files in $RPM_BUILD_ROOT and @@ -186,6 +186,8 @@ Index: scripts/brp-symlink + ;; + *,/opt/kde3/share/doc*/HTML/*/common) # white listed for not existant + ;; ++ *,usr/share/doc/kde/HTML/*/common) # white listed for not existant ++ ;; + *,/proc/*) # links pointing into /proc file system + ;; + *) diff --git a/finddebuginfo.diff b/finddebuginfo.diff index 5598461..d4d2efc 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -16,8 +16,8 @@ Index: scripts/find-debuginfo.sh + local tmp1=$(mktemp -t ${1##*/}.XXXXXX) + local tmp2=$(mktemp -t ${2##*/}.XXXXXX) + -+ objcopy -O binary -R .note.gnu.build-id $1 $tmp1 -+ objcopy -O binary -R .note.gnu.build-id $2 $tmp2 ++ objcopy -R .note.gnu.build-id -R .gnu_debuglink $1 $tmp1 ++ objcopy -R .note.gnu.build-id -R .gnu_debuglink $2 $tmp2 + cmp -s $tmp1 $tmp2 + local res=$? + rm -f $tmp1 $tmp2 diff --git a/modalias-encode.diff b/modalias-encode.diff new file mode 100644 index 0000000..c92f195 --- /dev/null +++ b/modalias-encode.diff @@ -0,0 +1,40 @@ +Module aliases (modinfo -F alias ) may contain special characters +that rpm does not allow in dependencies, such as commas. Encode those as +%XX to avoid generating broken dependencies. + +Signed-off-by: Andreas Gruenbacher + +Index: rpm-4.4.2.3/scripts/find-supplements.ksyms +=================================================================== +--- scripts/find-supplements.ksyms ++++ scripts/find-supplements.ksyms +@@ -48,6 +48,21 @@ combine_modaliases() { + print_modaliases "$class" "$variants" "$pos" + } + ++# Encode all characters other than [*:a-zA-Z0-9] in stdin as %XX. ++# (This includes the % character itself, which becomes %25.) ++hexenc() { ++ local line hex ++ ++ while read line; do ++ set -- "" "$line" ++ while [[ "$2" =~ ([*:a-zA-Z0-9]*)([^*:a-zA-Z0-9])(.*) ]]; do ++ hex=$(echo -n "${BASH_REMATCH[2]}" | hexdump -e '"%X"') ++ set -- "$1${BASH_REMATCH[1]}%$hex" "${BASH_REMATCH[3]}" ++ done ++ echo "$1$2" ++ done ++} ++ + aliases_of_filelist() { + modlist=$(mktemp) + have_module=1 +@@ -60,6 +75,7 @@ aliases_of_filelist() { + fi + have_module=0 + /sbin/modinfo -F alias "$module" \ ++ | hexenc \ + | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist + done + if ! test -s "$modlist" && test $have_module = 0; then diff --git a/rpm-python.spec b/rpm-python.spec index 803f11c..c6c2e14 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 20 +Release: 21 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 862c8e2..acfc97f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Thu Dec 11 17:18:49 CET 2008 - ro@suse.de + +- brp-symlink: whitelist kde4 doc path (bnc#457908) + +------------------------------------------------------------------- +Thu Dec 11 08:14:27 CET 2008 - agruen@suse.de + +- find-supplements.ksyms: Module aliases may contain special + characters that rpm does not allow in dependencies, such as + commas. Encode those as %XX to avoid generating broken + dependencies (bnc#456695). + +------------------------------------------------------------------- +Tue Dec 9 16:45:44 CET 2008 - schwab@suse.de + +- find-debuginfo.sh: Don't convert to binary. + ------------------------------------------------------------------- Mon Dec 1 12:35:39 CET 2008 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index 30a3e59..03e9fa2 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 20 +Release: 21 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -97,6 +97,7 @@ Patch63: finddebuginfo-absolute-links.diff Patch64: firmware.diff Patch65: specfilemacro.diff Patch66: rpm-filelist-bufferoverflow.diff +Patch67: modalias-encode.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -180,7 +181,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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/firmware.prov @@ -330,7 +331,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 468 +Release: 469 # %description -n popt @@ -353,7 +354,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 468 +Release: 469 Requires: popt = 1.7 Requires: glibc-devel @@ -388,6 +389,15 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Dec 11 2008 ro@suse.de +- brp-symlink: whitelist kde4 doc path (bnc#457908) +* Thu Dec 11 2008 agruen@suse.de +- find-supplements.ksyms: Module aliases may contain special + characters that rpm does not allow in dependencies, such as + commas. Encode those as %%XX to avoid generating broken + dependencies (bnc#456695). +* Tue Dec 09 2008 schwab@suse.de +- find-debuginfo.sh: Don't convert to binary. * Mon Dec 01 2008 ro@suse.de - add rpm to baselibs.conf (for net-snmp) - append a "nil" after suse_install_update_script and _message From 8a8a5c4c4473607088d90ec088e427fcf044692121ff05dffd8a1e6116ff4143 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 19 Dec 2008 14:30:06 +0000 Subject: [PATCH 068/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=69 --- baselibs.conf | 2 ++ rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index e9d7bde..5f85cd9 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,2 +1,4 @@ popt rpm +arch ppc package popt-devel +arch ppc package rpm-devel diff --git a/rpm-python.spec b/rpm-python.spec index c6c2e14..8d450b1 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 21 +Release: 22 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index acfc97f..950eedb 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 19 15:26:30 CET 2008 - mls@suse.de + +- add popt-devel and rpm-devel to baselibs config (bnc#445037) + ------------------------------------------------------------------- Thu Dec 11 17:18:49 CET 2008 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index 03e9fa2..d36e11a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 21 +Release: 22 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -331,7 +331,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 469 +Release: 470 # %description -n popt @@ -354,7 +354,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 469 +Release: 470 Requires: popt = 1.7 Requires: glibc-devel @@ -389,6 +389,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Dec 19 2008 mls@suse.de +- add popt-devel and rpm-devel to baselibs config (bnc#445037) * Thu Dec 11 2008 ro@suse.de - brp-symlink: whitelist kde4 doc path (bnc#457908) * Thu Dec 11 2008 agruen@suse.de From 9b759396d84a258de78616588d37249194c56ef143609235068f5adc6fe44613 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 8 Jan 2009 13:33:30 +0000 Subject: [PATCH 069/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=70 --- findksyms.diff | 17 +++++++++-------- rpm-python.spec | 4 ++-- rpm.changes | 6 ++++++ rpm.spec | 11 +++++++---- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/findksyms.diff b/findksyms.diff index 1734b87..06eb45e 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -1,7 +1,10 @@ SUSE specific kernel provides/requires scripts -Index: scripts/find-provides.ksyms -=================================================================== +--- + scripts/find-provides.ksyms | 23 +++++++++++++++++ + scripts/find-requires.ksyms | 59 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 82 insertions(+) + --- /dev/null +++ scripts/find-provides.ksyms @@ -0,0 +1,23 @@ @@ -28,8 +31,6 @@ Index: scripts/find-provides.ksyms + | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" +done \ +| sort -u -Index: scripts/find-requires.ksyms -=================================================================== --- /dev/null +++ scripts/find-requires.ksyms @@ -0,0 +1,59 @@ @@ -48,7 +49,7 @@ Index: scripts/find-requires.ksyms + nm "$module" + done \ + | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):\1\t\2:p' \ -+ | sort -k2 -u ++ | sort -t $'\t' -k2 -u +} + +all_requires() { @@ -59,7 +60,7 @@ Index: scripts/find-requires.ksyms + | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':' + fi + done \ -+ | sort -k2 -u ++ | sort -t $'\t' -k2 -u +} + +if ! [ -z "$is_kernel_package" -a -e /sbin/modinfo -a -e /sbin/modprobe ]; then @@ -70,7 +71,7 @@ Index: scripts/find-requires.ksyms +modules=($(grep -E '/lib/modules/.+\.ko$')) +if [ ${#modules[@]} -gt 0 ]; then + symset_table=$(mktemp -t ${0##*/}.XXXXX) -+ /usr/lib/rpm/symset-table | sort > $symset_table ++ /usr/lib/rpm/symset-table | sort -t $'\t' -k 1,1 > $symset_table + + join -t $'\t' -j 1 -a 2 $symset_table <( + # Filter out requirements that we fulfill ourself. @@ -81,7 +82,7 @@ Index: scripts/find-requires.ksyms + BEGIN { FS = "\t" ; OFS = "\t" } + { print $3 "/" $2 "/" $1 } + ' \ -+ | sort -u) \ ++ | sort -t $'\t' -k 1,1 -u) \ + | sort -u \ + | awk ' + { FS = "\t" ; OFS = "\t" } diff --git a/rpm-python.spec b/rpm-python.spec index 8d450b1..c8ad497 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,7 +1,7 @@ # # spec file for package rpm-python (Version 4.4.2.3) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 22 +Release: 23 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 950eedb..e7d4e9e 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 5 15:37:07 CET 2009 - mmarek@suse.cz + +- findksyms.diff: make sure that the input files for join are + sorted properly (bnc#450714) + ------------------------------------------------------------------- Fri Dec 19 15:26:30 CET 2008 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index d36e11a..9050f09 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rpm (Version 4.4.2.3) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 22 +Release: 23 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -331,7 +331,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 470 +Release: 471 # %description -n popt @@ -354,7 +354,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 470 +Release: 471 Requires: popt = 1.7 Requires: glibc-devel @@ -389,6 +389,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Jan 05 2009 mmarek@suse.cz +- findksyms.diff: make sure that the input files for join are + sorted properly (bnc#450714) * Fri Dec 19 2008 mls@suse.de - add popt-devel and rpm-devel to baselibs config (bnc#445037) * Thu Dec 11 2008 ro@suse.de From 527ed15bef190839fdedc61bf6bbd4b519f928ee1e5a5501aa732109d03d3b21 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 29 Jan 2009 21:24:24 +0000 Subject: [PATCH 070/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=71 --- modalias-kernel_module.diff | 9 ++++++--- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 9 ++++++--- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/modalias-kernel_module.diff b/modalias-kernel_module.diff index 293c6f9..524e02e 100644 --- a/modalias-kernel_module.diff +++ b/modalias-kernel_module.diff @@ -1,4 +1,6 @@ ---- scripts/find-supplements.ksyms +Index: scripts/find-supplements.ksyms +=================================================================== +--- scripts/find-supplements.ksyms.orig +++ scripts/find-supplements.ksyms @@ -1,6 +1,8 @@ #! /bin/sh @@ -9,7 +11,8 @@ case "$1" in kernel-module-*) ;; # Fedora kernel module package names start with -@@ -47,10 +49,53 @@ +@@ -46,11 +48,54 @@ combine_modaliases() { + print_modaliases "$class" "$variants" "$pos" } -for module in $(grep -E '/lib/modules/.+\.ko$'); do @@ -33,7 +36,7 @@ + | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist + done + if ! test -s "$modlist" && test $have_module = 0; then -+ echo "packageand(kernel-${krel##*-}:$PACKAGE-kmp)" ++ echo "packageand(kernel-${krel##*-}:$PACKAGE)" + fi + rm -f $modlist +} diff --git a/rpm-python.spec b/rpm-python.spec index c8ad497..ddb5596 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 23 +Release: 25 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index e7d4e9e..c50d60d 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 27 21:19:51 CET 2009 - agruen@suse.de + +- find-supplements.ksyms: Fix "Supplements: packageand( + kernel-$flavor:$package)" dependency (bnc#429254). + ------------------------------------------------------------------- Mon Jan 5 15:37:07 CET 2009 - mmarek@suse.cz diff --git a/rpm.spec b/rpm.spec index 9050f09..38ebad4 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 23 +Release: 25 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -331,7 +331,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 471 +Release: 473 # %description -n popt @@ -354,7 +354,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 471 +Release: 473 Requires: popt = 1.7 Requires: glibc-devel @@ -389,6 +389,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Jan 27 2009 agruen@suse.de +- find-supplements.ksyms: Fix "Supplements: packageand( + kernel-$flavor:$package)" dependency (bnc#429254). * Mon Jan 05 2009 mmarek@suse.cz - findksyms.diff: make sure that the input files for join are sorted properly (bnc#450714) From d1cf07ca12e6d3750d838bca9a7e46c492b8254962d808a48a852097cd9d9186 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 9 Feb 2009 17:05:08 +0000 Subject: [PATCH 071/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=72 --- disttag-macro.diff | 29 +++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 10 ++++++++++ rpm.spec | 23 +++++++++++++++++++---- 4 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 disttag-macro.diff diff --git a/disttag-macro.diff b/disttag-macro.diff new file mode 100644 index 0000000..a294c43 --- /dev/null +++ b/disttag-macro.diff @@ -0,0 +1,29 @@ +--- build/parsePreamble.c ++++ build/parsePreamble.c 2009/02/09 13:05:35 +@@ -330,6 +330,7 @@ + { RPMTAG_PACKAGER, "%{packager}" }, + { RPMTAG_DISTRIBUTION, "%{distribution}" }, + { RPMTAG_DISTURL, "%{disturl}" }, ++ { RPMTAG_DISTTAG, "%{disttag}" }, + { -1, NULL } + }; + +--- macros.in ++++ macros.in 2009/02/09 13:03:08 +@@ -259,6 +259,16 @@ + # + #%disturl + ++# Configurable distribution tag, same as Disttag: tag in a specfile. ++# The tag will be used to supply reliable information to tools like ++# rpmfind. ++# ++# Note: You should not configure with disturl (or build packages with ++# the Disttag: tag) unless you are willing to supply content in a ++# yet-to-be-determined format at the tag specified. ++# ++#%disttag ++ + # Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files + # marked as %doc should be installed. + #%_excludedocs diff --git a/rpm-python.spec b/rpm-python.spec index ddb5596..57ff87a 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 25 +Release: 27 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index c50d60d..6b96a6f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Feb 9 14:16:52 CET 2009 - ro@suse.de + +- define disttag as optional tag with macro just like disturl + +------------------------------------------------------------------- +Thu Jan 29 10:34:22 CET 2009 - olh@suse.de + +- obsolete old -XXbit packages (bnc#437293) + ------------------------------------------------------------------- Tue Jan 27 21:19:51 CET 2009 - agruen@suse.de diff --git a/rpm.spec b/rpm.spec index 38ebad4..b38cb2f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 25 +Release: 27 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -98,6 +98,7 @@ Patch64: firmware.diff Patch65: specfilemacro.diff Patch66: rpm-filelist-bufferoverflow.diff Patch67: modalias-encode.diff +Patch68: disttag-macro.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -181,7 +182,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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/firmware.prov @@ -331,7 +332,12 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 473 +Release: 475 +# bug437293 +%ifarch ppc64 +Obsoletes: popt-64bit +%endif +# # %description -n popt @@ -354,9 +360,14 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 473 +Release: 475 Requires: popt = 1.7 Requires: glibc-devel +# bug437293 +%ifarch ppc64 +Obsoletes: popt-devel-64bit +%endif +# %description -n popt-devel Popt is a C library for parsing command line parameters. Popt was @@ -389,6 +400,10 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Feb 09 2009 ro@suse.de +- define disttag as optional tag with macro just like disturl +* Thu Jan 29 2009 olh@suse.de +- obsolete old -XXbit packages (bnc#437293) * Tue Jan 27 2009 agruen@suse.de - find-supplements.ksyms: Fix "Supplements: packageand( kernel-$flavor:$package)" dependency (bnc#429254). From e8332ae0d8052cca2e81db8e3c8428a1469551831ba4692e8e1cb41814a5e008 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 16 Feb 2009 13:06:39 +0000 Subject: [PATCH 072/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=73 --- debugsource-package.diff | 4 +-- finddebuginfo.diff | 2 +- lzma-payload-2.diff | 53 ++++++++++++++++++++++++++++++++++++++++ rpm-python.changes | 5 ++++ rpm-python.spec | 6 +++-- rpm.changes | 10 ++++++++ rpm.spec | 14 +++++++---- 7 files changed, 84 insertions(+), 10 deletions(-) diff --git a/debugsource-package.diff b/debugsource-package.diff index e0428d0..775fcb2 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -40,9 +40,9 @@ Index: b/scripts/find-debuginfo.sh $strict || strict_error=WARNING -# Strip ELF binaries --find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | +-find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort | +# 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" -print0 | ++find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | sort | xargs --no-run-if-empty -0 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 diff --git a/finddebuginfo.diff b/finddebuginfo.diff index d4d2efc..d32d5b6 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -45,7 +45,7 @@ Index: scripts/find-debuginfo.sh - -print | -file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' | -xargs --no-run-if-empty stat -c '%h %D_%i %n' | -+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | ++find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort | +xargs --no-run-if-empty -0 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 diff --git a/lzma-payload-2.diff b/lzma-payload-2.diff index c3a4115..d0e9993 100644 --- a/lzma-payload-2.diff +++ b/lzma-payload-2.diff @@ -399,3 +399,56 @@ Index: rpmio/rpmio.c } else { /* XXX need to check ufdio/gzdio/bzdio/fdio errors correctly. */ ec = (fdFileno(fd) < 0 ? -1 : 0); +--- rpmio/rpmio.c 2009-02-11 10:48:50.000000000 +0100 ++++ rpmio.c 2009-02-11 12:32:05.000000000 +0100 +@@ -2834,11 +2834,12 @@ + lzfile->file = fp; + lzfile->encoding = encoding; + lzfile->eof = 0; +- lzfile->strm = LZMA_STREAM_INIT_VAR; ++ lzma_stream tmp = LZMA_STREAM_INIT; ++ lzfile->strm = tmp; ++ + if (encoding) { +- lzma_options_alone alone; +- alone.uncompressed_size = LZMA_VLI_VALUE_UNKNOWN; +- memcpy(&alone.lzma, &lzma_preset_lzma[level - 1], sizeof(alone.lzma)); ++ lzma_options_lzma alone; ++ lzma_lzma_preset(&alone, level - 1); + ret = lzma_alone_encoder(&lzfile->strm, &alone); + } else { + ret = lzma_auto_decoder(&lzfile->strm, 0, 0); +--- rpmio.orig/rpmio.c 2009-02-12 15:13:46.000000000 +0100 ++++ rpmio/rpmio.c 2009-02-12 15:58:36.000000000 +0100 +@@ -2842,7 +2842,7 @@ + lzma_lzma_preset(&alone, level - 1); + ret = lzma_alone_encoder(&lzfile->strm, &alone); + } else { +- ret = lzma_auto_decoder(&lzfile->strm, 0, 0); ++ ret = lzma_alone_decoder(&lzfile->strm, UINT64_C(1) << 24); + } + if (ret != LZMA_OK) { + fclose(fp); +@@ -2918,12 +2918,19 @@ + lzfile->eof = 1; + return len - lzfile->strm.avail_out; + } +- if (ret != LZMA_OK) ++ if (ret == LZMA_MEMLIMIT_ERROR) { ++ ret = lzma_memlimit_set(&lzfile->strm, 1 << 31); ++ continue; ++ } ++ if (ret != LZMA_OK) { + return -1; +- if (!lzfile->strm.avail_out) ++ } ++ if (!lzfile->strm.avail_out) { + return len; +- if (eof) ++ } ++ if (eof) { + return -1; ++ } + } + } + diff --git a/rpm-python.changes b/rpm-python.changes index a5a836a..fb4f96b 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 12 16:52:26 CET 2009 - ro@suse.de + +- adapt buildrequires + ------------------------------------------------------------------- Wed Oct 8 11:24:22 CEST 2008 - cthiel@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 57ff87a..f396cfd 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -19,12 +19,12 @@ Name: rpm-python -BuildRequires: libbz2-devel libelf-devel libselinux-devel lzma-alpha-devel ncurses-devel python-devel zlib-devel +BuildRequires: libbz2-devel libelf-devel libselinux-devel ncurses-devel python-devel xz-devel zlib-devel License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 27 +Release: 33 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -69,6 +69,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog +* Thu Feb 12 2009 ro@suse.de +- adapt buildrequires * Wed Oct 08 2008 cthiel@suse.de - added libelf-devel to BuildRequires to fix build * Thu Sep 11 2008 mls@suse.de diff --git a/rpm.changes b/rpm.changes index 6b96a6f..5c8516f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Feb 11 14:01:51 CET 2009 - coolo@suse.de + +- sort the result of find to make symlinks stable in finddebuginfo + +------------------------------------------------------------------- +Wed Feb 11 13:02:12 CET 2009 - coolo@suse.de + +- adapt to new API of xz, sticking with the old LZMA format (not XZ) + ------------------------------------------------------------------- Mon Feb 9 14:16:52 CET 2009 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index b38cb2f..0204042 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,14 +20,14 @@ Name: rpm License: GPL v2 or later Group: System/Packages -BuildRequires: libbz2-devel libelf-devel libselinux-devel lzma-alpha-devel ncurses-devel zlib-devel +BuildRequires: libbz2-devel libelf-devel libselinux-devel ncurses-devel xz-devel zlib-devel Provides: rpminst %define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 27 +Release: 33 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -146,7 +146,7 @@ Summary: Include Files and Libraries mandatory for Development License: GPL v2 or later Group: System/Packages Requires: rpm-devel = %{version} -Requires: zlib-devel bzip2 libbz2-devel lzma-alpha-devel libselinux-devel libebl-devel +Requires: zlib-devel bzip2 libbz2-devel xz-devel libselinux-devel libebl-devel %description devel-static This package contains the RPM C library and header files. These @@ -332,7 +332,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 475 +Release: 481 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -360,7 +360,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 475 +Release: 481 Requires: popt = 1.7 Requires: glibc-devel # bug437293 @@ -400,6 +400,10 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Wed Feb 11 2009 coolo@suse.de +- sort the result of find to make symlinks stable in finddebuginfo +* Wed Feb 11 2009 coolo@suse.de +- adapt to new API of xz, sticking with the old LZMA format (not XZ) * Mon Feb 09 2009 ro@suse.de - define disttag as optional tag with macro just like disturl * Thu Jan 29 2009 olh@suse.de From 1f3c5a0bbcb0291e41305a044790a72bb6c356ce9de0f0e92be3c2accf821664 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 16 Feb 2009 16:11:16 +0000 Subject: [PATCH 073/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=74 --- debugsource-package.diff | 4 ++-- finddebuginfo.diff | 2 +- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/debugsource-package.diff b/debugsource-package.diff index 775fcb2..ec03d43 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -40,9 +40,9 @@ Index: b/scripts/find-debuginfo.sh $strict || strict_error=WARNING -# Strip ELF binaries --find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort | +-find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort -z | +# 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" -print0 | sort | ++find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | sort -z | xargs --no-run-if-empty -0 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 diff --git a/finddebuginfo.diff b/finddebuginfo.diff index d32d5b6..9cfe956 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -45,7 +45,7 @@ Index: scripts/find-debuginfo.sh - -print | -file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' | -xargs --no-run-if-empty stat -c '%h %D_%i %n' | -+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort | ++find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort -z | +xargs --no-run-if-empty -0 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 diff --git a/rpm-python.spec b/rpm-python.spec index f396cfd..ac09157 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 33 +Release: 34 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 5c8516f..f26487a 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 16 17:10:31 CET 2009 - ro@suse.de + +- fix sort call in finddebuginfo again + ------------------------------------------------------------------- Wed Feb 11 14:01:51 CET 2009 - coolo@suse.de diff --git a/rpm.spec b/rpm.spec index 0204042..9855acb 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 33 +Release: 34 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -332,7 +332,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 481 +Release: 482 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -360,7 +360,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 481 +Release: 482 Requires: popt = 1.7 Requires: glibc-devel # bug437293 @@ -400,6 +400,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Feb 16 2009 ro@suse.de +- fix sort call in finddebuginfo again * Wed Feb 11 2009 coolo@suse.de - sort the result of find to make symlinks stable in finddebuginfo * Wed Feb 11 2009 coolo@suse.de From 4a08a332bf0f110835463c48308a0d5f4d0edd7035c9b90687c8486d9e0f9e8a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 19 Feb 2009 21:19:42 +0000 Subject: [PATCH 074/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=75 --- buildidprov.diff | 75 +++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 10 ++++++ rpm.spec | 17 +++++++--- xz.diff | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 185 insertions(+), 5 deletions(-) create mode 100644 buildidprov.diff create mode 100644 xz.diff diff --git a/buildidprov.diff b/buildidprov.diff new file mode 100644 index 0000000..d05c515 --- /dev/null +++ b/buildidprov.diff @@ -0,0 +1,75 @@ +From: Jan Blunck +Subject: Let debuginfo packages provide the build-id + +This patch let debuginfo packages provide build-id like follows: + + debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517 + +Users can therefore ask zypper to install the correct debuginfo package with: + + zypper install -C "debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517" + +Signed-off-by: Jan Blunck +--- + autodeps/linux.prov | 8 ++++++++ + macros.in | 3 ++- + scripts/debuginfo.prov | 12 ++++++++++++ + 3 files changed, 22 insertions(+), 1 deletion(-) + +Index: autodeps/linux.prov +=================================================================== +--- autodeps/linux.prov.orig ++++ autodeps/linux.prov +@@ -5,6 +5,9 @@ + IFS=$'\n' + filelist=($(cat)) + ++debuginfolist=($(printf "%s\n" "${filelist[@]}" | grep "/usr/lib/debug/")) ++filelist=($(printf "%s\n" "${filelist[@]}" | grep -v "/usr/lib/debug/")) ++ + solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \ + tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \ + cut -d: -f1)) +@@ -71,6 +74,11 @@ done | sort -u + printf "%s\n" "${firmwarelist[@]}" | /usr/lib/rpm/firmware.prov | sort -u + + # ++# --- debuginfo files ++[ -x /usr/lib/rpm/debuginfo.prov -a -n "$debuginfolist" ] && ++ printf "%s\n" "${debuginfolist[@]}" | /usr/lib/rpm/debuginfo.prov | sort -u ++ ++# + # --- Mono exes/dlls + : ${MONO_PREFIX=/usr} + if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then +Index: macros.in +=================================================================== +--- macros.in.orig ++++ macros.in +@@ -175,7 +175,8 @@ + %package debuginfo\ + Summary: Debug information for package %{name}\ + Group: Development/Debug\ +-AutoReqProv: 0\ ++AutoReq: 0\ ++AutoProv: 1\ + #Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ + %description debuginfo\ + This package provides debug information for package %{name}.\ +Index: scripts/debuginfo.prov +=================================================================== +--- /dev/null ++++ scripts/debuginfo.prov +@@ -0,0 +1,12 @@ ++#!/bin/sh ++ ++while read instfile ; do ++ case $instfile in ++ */usr/lib/debug/.build-id/*.debug) ++ if [ -f "$instfile" ] ; then ++ BUILDID=$(echo $instfile | sed -ne 's|.*/usr/lib/debug/.build-id/\([0-9a-f]*\)/\([0-9a-f]*\)\.debug|\1\2|p') ++ echo "debuginfo(build-id) = $BUILDID" ++ fi ++ ;; ++ esac ++done diff --git a/rpm-python.spec b/rpm-python.spec index ac09157..bfe832d 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 34 +Release: 36 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index f26487a..2f7254f 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Feb 19 11:05:37 CET 2009 - schwab@suse.de + +- Add support for xz compressed sources. + +------------------------------------------------------------------- +Wed Feb 18 11:04:35 CET 2009 - jblunck@suse.de + +- Add debuginfo.prov helper script for build-id provides. + ------------------------------------------------------------------- Mon Feb 16 17:10:31 CET 2009 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index 9855acb..f45ed01 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 34 +Release: 36 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -99,6 +99,8 @@ Patch65: specfilemacro.diff Patch66: rpm-filelist-bufferoverflow.diff Patch67: modalias-encode.diff Patch68: disttag-macro.diff +Patch69: buildidprov.diff +Patch70: xz.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -182,10 +184,12 @@ 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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 +%patch -P 70 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/firmware.prov +chmod 755 scripts/debuginfo.prov tar -xjvf %{SOURCE1} tar -xjvf %{SOURCE2} if [ -s /etc/rpm/suse_macros ]; then @@ -248,6 +252,7 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/firmware.prov $RPM_BUILD_ROOT/usr/lib/rpm +install -m 755 scripts/debuginfo.prov $RPM_BUILD_ROOT/usr/lib/rpm rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc mkdir -p $RPM_BUILD_ROOT/etc/rpm chmod 755 $RPM_BUILD_ROOT/etc/rpm @@ -332,7 +337,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 482 +Release: 484 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -360,7 +365,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 482 +Release: 484 Requires: popt = 1.7 Requires: glibc-devel # bug437293 @@ -400,6 +405,10 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Feb 19 2009 schwab@suse.de +- Add support for xz compressed sources. +* Wed Feb 18 2009 jblunck@suse.de +- Add debuginfo.prov helper script for build-id provides. * Mon Feb 16 2009 ro@suse.de - fix sort call in finddebuginfo again * Wed Feb 11 2009 coolo@suse.de diff --git a/xz.diff b/xz.diff new file mode 100644 index 0000000..092fc8f --- /dev/null +++ b/xz.diff @@ -0,0 +1,86 @@ +--- + build/parsePrep.c | 3 +++ + configure.ac | 1 + + macros.in | 1 + + rpmio/macro.c | 8 ++++++++ + rpmio/rpmmacro.h | 3 ++- + 5 files changed, 15 insertions(+), 1 deletion(-) + +Index: build/parsePrep.c +=================================================================== +--- build/parsePrep.c.orig 2008-04-01 09:28:21.000000000 +0200 ++++ build/parsePrep.c 2009-02-19 10:49:23.000000000 +0100 +@@ -258,6 +258,9 @@ static char *doPatch(Spec spec, int c, i + case COMPRESSED_LZMA: + t = "%{__lzma} -dc"; + break; ++ case COMPRESSED_XZ: ++ t = "%{__xz} -dc"; ++ break; + } + zipper = rpmGetPath(t, NULL); + buf[0] = '\0'; +Index: configure.ac +=================================================================== +--- configure.ac.orig 2009-02-19 10:43:13.000000000 +0100 ++++ configure.ac 2009-02-19 10:50:25.000000000 +0100 +@@ -247,6 +247,7 @@ AC_SUBST(__ID_U) + + AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH) + AC_PATH_PROG(__LZMA, lzma, /usr/bin/lzma, $MYPATH) ++AC_PATH_PROG(__XZ, xz, /usr/bin/xz, $MYPATH) + AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH) + AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH) + AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH) +Index: macros.in +=================================================================== +--- macros.in.orig 2009-02-19 10:43:13.000000000 +0100 ++++ macros.in 2009-02-19 10:51:05.000000000 +0100 +@@ -49,6 +49,7 @@ + %__install @__INSTALL@ + %__ln_s @LN_S@ + %__lzma @__LZMA@ ++%__xz @__XZ@ + %__make @__MAKE@ + %__mkdir @__MKDIR@ + %__mkdir_p @MKDIR_P@ +Index: rpmio/macro.c +=================================================================== +--- rpmio/macro.c.orig 2008-04-01 09:29:13.000000000 +0200 ++++ rpmio/macro.c 2009-02-19 10:47:57.000000000 +0100 +@@ -1184,6 +1184,9 @@ doFoo(MacroBuf mb, int negate, const cha + case COMPRESSED_LZMA: + sprintf(be, "%%_lzma -dc %s", b); + break; ++ case COMPRESSED_XZ: ++ sprintf(be, "%%_xz -dc %s", b); ++ break; + } + b = be; + } else if (STREQ("S", f, fn)) { +@@ -2120,6 +2123,11 @@ int isCompressed(const char * file, rpmC + (magic[4] == 0x41) && (magic[5] == 0x00)) { + /* new style lzma with magic */ + *compressed = COMPRESSED_LZMA; ++ } else if ((magic[0] == 0xfd) && (magic[1] == 0x37) && ++ (magic[2] == 0x7a) && (magic[3] == 0x58) && ++ (magic[4] == 0x5a) && (magic[5] == 0x00)) { ++ /* xz */ ++ *compressed = COMPRESSED_XZ; + } 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 2008-04-01 09:28:22.000000000 +0200 ++++ rpmio/rpmmacro.h 2009-02-19 10:48:39.000000000 +0100 +@@ -176,7 +176,8 @@ typedef enum rpmCompressedMagic_e { + COMPRESSED_OTHER = 1, /*!< gzip can handle */ + COMPRESSED_BZIP2 = 2, /*!< bzip2 can handle */ + COMPRESSED_ZIP = 3, /*!< unzip can handle */ +- COMPRESSED_LZMA = 4 /*!< lzma can handle */ ++ COMPRESSED_LZMA = 4, /*!< lzma can handle */ ++ COMPRESSED_XZ = 5 /*!< xz can handle */ + } rpmCompressedMagic; + + /** From aff076be86ee2e530f01317645ed60c60c793bba5e0cc48959f8a2c225d2f02a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 20 Mar 2009 17:55:39 +0000 Subject: [PATCH 075/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=76 --- rpm-python.spec | 2 +- rpm-suse_macros | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index bfe832d..49b8f07 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 36 +Release: 38 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index 223bd83..e0b03e7 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -358,7 +358,7 @@ %supplements_kernel_module() \ %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} -%suse_version 1110 +%suse_version 1120 %sles_version 0 %ul_version 0 diff --git a/rpm.changes b/rpm.changes index 2f7254f..34d2387 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 19 15:42:20 CET 2009 - ro@suse.de + +- rpm-suse_macros: suse_version to 1120 + ------------------------------------------------------------------- Thu Feb 19 11:05:37 CET 2009 - schwab@suse.de diff --git a/rpm.spec b/rpm.spec index f45ed01..a499d65 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 36 +Release: 38 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -337,7 +337,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 484 +Release: 486 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -365,7 +365,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 484 +Release: 486 Requires: popt = 1.7 Requires: glibc-devel # bug437293 @@ -405,6 +405,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Thu Mar 19 2009 ro@suse.de +- rpm-suse_macros: suse_version to 1120 * Thu Feb 19 2009 schwab@suse.de - Add support for xz compressed sources. * Wed Feb 18 2009 jblunck@suse.de From f576b0beb9a36cb0fa619ebc699e29a6116d1a6a6e9da1c6069d233caacd2426 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 2 Apr 2009 15:18:50 +0000 Subject: [PATCH 076/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=77 --- findksyms.diff | 10 ++++++---- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 39 +++++++++++++++++++++------------------ 4 files changed, 34 insertions(+), 23 deletions(-) diff --git a/findksyms.diff b/findksyms.diff index 06eb45e..90f3771 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -5,6 +5,8 @@ SUSE specific kernel provides/requires scripts scripts/find-requires.ksyms | 59 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) +Index: scripts/find-provides.ksyms +=================================================================== --- /dev/null +++ scripts/find-provides.ksyms @@ -0,0 +1,23 @@ @@ -31,9 +33,11 @@ SUSE specific kernel provides/requires scripts + | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" +done \ +| sort -u +Index: scripts/find-requires.ksyms +=================================================================== --- /dev/null +++ scripts/find-requires.ksyms -@@ -0,0 +1,59 @@ +@@ -0,0 +1,57 @@ +#! /bin/bash + +IFS=$'\n' @@ -55,10 +59,8 @@ SUSE specific kernel provides/requires scripts +all_requires() { + for module in "$@"; do + set -- $(/sbin/modinfo -F vermagic "$module" | sed -e 's: .*::' -e q) -+ if [ -e "/boot/symsets-$1.tar.gz" ]; then -+ /sbin/modprobe --dump-modversions "$module" \ ++ /sbin/modprobe --dump-modversions "$module" \ + | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':' -+ fi + done \ + | sort -t $'\t' -k2 -u +} diff --git a/rpm-python.spec b/rpm-python.spec index 49b8f07..6895191 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 38 +Release: 39 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 34d2387..3520781 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 31 11:25:14 CEST 2009 - mmarek@suse.cz + +- findksyms.diff: don't check for /boot/symsets-*, generate ksym() + requires if not present. + ------------------------------------------------------------------- Thu Mar 19 15:42:20 CET 2009 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index a499d65..005fc72 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 38 +Release: 39 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -337,7 +337,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 486 +Release: 487 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -365,7 +365,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 486 +Release: 487 Requires: popt = 1.7 Requires: glibc-devel # bug437293 @@ -405,6 +405,9 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Mar 31 2009 mmarek@suse.cz +- findksyms.diff: don't check for /boot/symsets-*, generate ksym() + requires if not present. * Thu Mar 19 2009 ro@suse.de - rpm-suse_macros: suse_version to 1120 * Thu Feb 19 2009 schwab@suse.de @@ -621,7 +624,7 @@ Authors: - correctly mark KDE documentation as %%doc in find-lang.sh * Fri May 11 2007 coolo@suse.de - adding %%lang_package to simplify seperating translations -* Fri Apr 27 2007 wberrier@suse.de +* Sat Apr 28 2007 wberrier@suse.de - autodeps.diff - bnc #227362 -Print warning if mono assembiles are found but mono-find-* fails (solution is to make sure mono-devel is installed) @@ -705,12 +708,12 @@ Authors: - Allow kernel modules in packages even when the dependencies between those packages and the matching kernel packages cannot be tracked (199474). -* Sat Sep 30 2006 agruen@suse.de +* Sun Oct 01 2006 agruen@suse.de - Make find-*.ksyms more robust. * Tue Sep 19 2006 rguenther@suse.de - split rpm-python to separate spec file - remove python-devel BuildRequires -* Mon Aug 14 2006 ro@suse.de +* Tue Aug 15 2006 ro@suse.de - workaround for gettext using MKINSTALLDIRS in configure.ac * Wed Jun 14 2006 mls@suse.de - make rpmlib provide rpmlib(PatchRPMs) [#184856] @@ -794,14 +797,14 @@ Authors: - add back missing chunk of srcdefattr patch [#48870] - add rpmvercmp patch from Peter Bowan - add -m32 to ix86 optflags to make --target work [#141206] -* Sat Feb 04 2006 agruen@suse.de +* Sun Feb 05 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Allow to specify a list of kernel flavors to build (-x) instead of specifying an exclude list. * Fri Feb 03 2006 mls@suse.de - use RPMSENSE_STRONG instead of RPMSENSE_WEAK - drop support for EssentialFor -* Wed Feb 01 2006 agruen@suse.de +* Thu Feb 02 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Allow to specify a custom %%files list for the kernel-specific sub-packages. Use the Summary and Group tags, and the %%description section from the @@ -858,7 +861,7 @@ Authors: - fix patchrpm code not to modify immutable header parts * Fri Nov 18 2005 ro@suse.de - honor NO_BRP_STRIP_DEBUG in find-debuginfo.sh -* Fri Oct 28 2005 mls@suse.de +* Sat Oct 29 2005 mls@suse.de - use lstat instead of stat when globbing (#129434) - add RPMTAG_PKGID and RPMTAG_HDRID - make python always return requires/provides/obsoletes/conflicts @@ -935,16 +938,16 @@ Authors: - use binutils for debuginfo packages * Fri Jan 14 2005 coolo@suse.de - name the debug package -debuginfo to sync with redhat/fedora -* Mon Dec 13 2004 sndirsch@suse.de +* Tue Dec 14 2004 sndirsch@suse.de - moved chinese popt mo file to correct directory (Bug #47262) * Fri Dec 03 2004 mls@suse.de - fix update of rpm with same name/version/release but different architecture -* Thu Nov 25 2004 ro@suse.de +* Fri Nov 26 2004 ro@suse.de - fix build with python-2.4 * Tue Nov 16 2004 ro@suse.de - update permissions handling -* Mon Oct 18 2004 ro@suse.de +* Tue Oct 19 2004 ro@suse.de - locale rename: no -> nb * Mon Sep 27 2004 mls@suse.de - move TE type initializaten before the addTE call to make @@ -1034,7 +1037,7 @@ Authors: * Thu Feb 05 2004 ro@suse.de - linux.prov: don't block soname in versioned-requires - linux.req: disable perl-requires, it's broken -* Tue Feb 03 2004 schwab@suse.de +* Wed Feb 04 2004 schwab@suse.de - Readd ia64 64bit provides hack. * Tue Feb 03 2004 kukuk@suse.de - Remove all special find-requires scripts and use the default one @@ -1226,7 +1229,7 @@ Authors: - Fix typo * Fri Aug 09 2002 kukuk@suse.de - Fix requires of rpm-devel and popt-devel -* Thu Aug 08 2002 ro@suse.de +* Fri Aug 09 2002 ro@suse.de - adapt automake version in configure * Fri Jul 26 2002 mls@suse.de - Added perl/python macros from conectiva @@ -1254,7 +1257,7 @@ Authors: * Tue Jul 02 2002 ke@suse.de - Update German program messages using translations by Christian Kirsch. Add as Source7; drop Patch19 [# 8442]. -* Thu Jun 20 2002 ro@suse.de +* Fri Jun 21 2002 ro@suse.de - automake is 1.6.2 * Wed Jun 12 2002 bk@suse.de - ppc: fix arch for elf64.prov and elf64.req to powerpc(from olh) @@ -1338,7 +1341,7 @@ Authors: - Fix to build with new gettext. * Mon Feb 18 2002 ro@suse.de - added requires for suse-build-key -* Mon Feb 11 2002 ro@suse.de +* Tue Feb 12 2002 ro@suse.de - tar option for bz2 is now "j" (re-added) * Mon Feb 11 2002 ma@suse.de - unk_ugname_cached.diff: Upon building a package, unpacking sources @@ -1492,7 +1495,7 @@ Authors: - Fix config patch. * Thu Apr 06 2000 bk@suse.de - added /lib/libpopt.so* to filelist on s390 -* Tue Apr 04 2000 bk@suse.de +* Wed Apr 05 2000 bk@suse.de - uses autoconf and automake now - added /lib/libbz2.so* and /lib/libz.so* to filelist on s390 * Sun Apr 02 2000 bk@suse.de @@ -1534,7 +1537,7 @@ Authors: - again rebuilddb.patch * Wed Jul 14 1999 ro@suse.de - update to 3.0.3 -* Sun Jun 27 1999 ro@suse.de +* Mon Jun 28 1999 ro@suse.de - changed macros.in for libc5 : no "h" parameter for chown,chmod * Fri Jun 25 1999 ro@suse.de - update to rpm-3.0.2 From 12fecf60aa6f4d7460928186216c9e9b1a9f6b8e0cc6bbe39724f1bb6c4cc747 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 23 Apr 2009 16:29:01 +0000 Subject: [PATCH 077/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=78 --- brp.diff | 2 +- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/brp.diff b/brp.diff index e7a7d44..74e65e0 100644 --- a/brp.diff +++ b/brp.diff @@ -186,7 +186,7 @@ Index: scripts/brp-symlink + ;; + *,/opt/kde3/share/doc*/HTML/*/common) # white listed for not existant + ;; -+ *,usr/share/doc/kde/HTML/*/common) # white listed for not existant ++ *,/usr/share/doc/kde/HTML/*/common) # white listed for not existant + ;; + *,/proc/*) # links pointing into /proc file system + ;; diff --git a/rpm-python.spec b/rpm-python.spec index 6895191..89a190c 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 39 +Release: 40 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 3520781..6ca8a76 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 6 02:09:43 CEST 2009 - ro@suse.de + +- fix typo in brp-symlink (bnc#457908) + ------------------------------------------------------------------- Tue Mar 31 11:25:14 CEST 2009 - mmarek@suse.cz diff --git a/rpm.spec b/rpm.spec index 005fc72..9edf012 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 39 +Release: 40 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -337,7 +337,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 487 +Release: 488 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -365,7 +365,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 487 +Release: 488 Requires: popt = 1.7 Requires: glibc-devel # bug437293 @@ -405,6 +405,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Mon Apr 06 2009 ro@suse.de +- fix typo in brp-symlink (bnc#457908) * Tue Mar 31 2009 mmarek@suse.cz - findksyms.diff: don't check for /boot/symsets-*, generate ksym() requires if not present. From 9ca22243e0b5a17c5d8a2fd42dab947b489fcbd98b941cb5111362d61d3182b4 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 12 Jun 2009 14:15:38 +0000 Subject: [PATCH 078/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=79 --- findksyms.diff | 48 +++++++++++++++++++++++++++++++----------------- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 42 insertions(+), 21 deletions(-) diff --git a/findksyms.diff b/findksyms.diff index 90f3771..2bccd1c 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -1,15 +1,13 @@ SUSE specific kernel provides/requires scripts --- - scripts/find-provides.ksyms | 23 +++++++++++++++++ - scripts/find-requires.ksyms | 59 ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 82 insertions(+) + scripts/find-provides.ksyms | 41 +++++++++++++++++++++++++++++++ + scripts/find-requires.ksyms | 57 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 98 insertions(+) -Index: scripts/find-provides.ksyms -=================================================================== --- /dev/null +++ scripts/find-provides.ksyms -@@ -0,0 +1,23 @@ +@@ -0,0 +1,41 @@ +#! /bin/sh + +IFS=$'\n' @@ -17,24 +15,40 @@ Index: scripts/find-provides.ksyms +case "$1" in +kernel-module-*) ;; # Fedora kernel module package names start with + # kernel-module. -+kernel*) is_kernel_package=1 ;; ++kernel*) kernel_flavor=${1#kernel-} ;; +esac + -+if ! [ -z "$is_kernel_package" ]; then -+ cat > /dev/null -+ exit 0 -+fi -+ -+for module in $(grep -E '/lib/modules/.+\.ko$'); do -+ flavor=$(/sbin/modinfo -F vermagic "$module") ++trap 'rm -f "$tmp"' EXIT ++tmp=$(mktemp) ++while read f; do ++ test -e "$f" || continue ++ case "$f" in ++ *.debug) ++ continue ++ ;; ++ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*) ++ ;; ++ *) ++ continue ++ esac ++ unzip=false ++ case "$f" in ++ *.gz | */boot/vmlinuz*) ++ unzip=true ++ esac ++ if $unzip && gzip -cd "$f" >"$tmp"; then ++ f=$tmp ++ fi ++ flavor=$(/sbin/modinfo -F vermagic "$f") + flavor=${flavor%% *} + flavor=${flavor##*-} -+ nm "$module" \ ++ if test -z "$flavor"; then ++ flavor=$kernel_flavor ++ fi ++ nm "$f" \ + | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" +done \ +| sort -u -Index: scripts/find-requires.ksyms -=================================================================== --- /dev/null +++ scripts/find-requires.ksyms @@ -0,0 +1,57 @@ diff --git a/rpm-python.spec b/rpm-python.spec index 89a190c..c659f4f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 40 +Release: 41 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 6ca8a76..e289c27 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 9 11:53:50 CEST 2009 - mmarek@suse.cz + +- findksyms.diff: also generate provides for kernel packages. + ------------------------------------------------------------------- Mon Apr 6 02:09:43 CEST 2009 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index 9edf012..b15e712 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 40 +Release: 41 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -337,7 +337,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 488 +Release: 489 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -365,7 +365,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 488 +Release: 489 Requires: popt = 1.7 Requires: glibc-devel # bug437293 @@ -405,6 +405,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Tue Jun 09 2009 mmarek@suse.cz +- findksyms.diff: also generate provides for kernel packages. * Mon Apr 06 2009 ro@suse.de - fix typo in brp-symlink (bnc#457908) * Tue Mar 31 2009 mmarek@suse.cz From f794e0de4e37e4e2ffbb22e0ebf94d4e8ef0afc0ce9be9c0195f533d06764625 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 17 Jul 2009 13:42:23 +0000 Subject: [PATCH 079/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=80 --- platformin.diff | 5 +- rpm-python.spec | 34 +- rpm.changes | 6 + rpm.spec | 1234 +---------------------------------------------- 4 files changed, 12 insertions(+), 1267 deletions(-) diff --git a/platformin.diff b/platformin.diff index 43c96e1..f9020ff 100644 --- a/platformin.diff +++ b/platformin.diff @@ -1,5 +1,4 @@ -SUSE specific platform changes. The libexecdir definition is probably -wrong, LSB seems to demand "%{_exec_prefix}/lib". +SUSE specific platform changes. --- ./platform.in.orig 2005-01-26 03:39:54.000000000 +0000 +++ ./platform.in 2006-02-17 14:18:30.000000000 +0000 @@ -8,7 +7,7 @@ wrong, LSB seems to demand "%{_exec_prefix}/lib". %_bindir @bindir@ %_sbindir @sbindir@ -%_libexecdir @libexecdir@ -+%_libexecdir %{_libdir} ++%_libexecdir %{_exec_prefix}/lib %_datadir @datadir@ %_sysconfdir @sysconfdir@ %_sharedstatedir @sharedstatedir@ diff --git a/rpm-python.spec b/rpm-python.spec index c659f4f..bb86481 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 41 +Release: 42 Requires: rpm = %{version} %py_requires Source99: rpm.spec @@ -69,35 +69,3 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/python* %changelog -* Thu Feb 12 2009 ro@suse.de -- adapt buildrequires -* Wed Oct 08 2008 cthiel@suse.de -- added libelf-devel to BuildRequires to fix build -* 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 -- fix build against python 2.6 -* Thu Mar 27 2008 coolo@suse.de -- fix buildrequires -* Fri May 25 2007 mls@suse.de -- fix unicode queries -* Fri Mar 30 2007 rguenther@suse.de -- add ncurses-devel and zlib-devel BuildRequires. -* Wed Oct 18 2006 mls@suse.de -- use rpm.spec for building instead of duplication everything -- delete superfluous .a and .la files [#202604] -- create .pyc and .pyo files [#205711] -* Sun Oct 15 2006 schwab@suse.de -- Make sure config.rpath is present. -* Fri Sep 22 2006 aj@suse.de -- Fix for python2.5. -* Thu Sep 21 2006 lnussel@suse.de -- do not package beecrypt python bindings as libbeecrypt is not - packaged either -- fix literal %%{version} in Requires tag -* Thu Sep 21 2006 lnussel@suse.de -- fix build with python 2.5 by overriding autodetection -* Tue Sep 19 2006 rguenther@suse.de -- split from rpm package diff --git a/rpm.changes b/rpm.changes index e289c27..24e3454 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 13 12:50:30 CEST 2009 - coolo@novell.com + +- the correct value for libexecdir is exec_prefix/lib (as the + comment rightfully already mentioned) + ------------------------------------------------------------------- Tue Jun 9 11:53:50 CEST 2009 - mmarek@suse.cz diff --git a/rpm.spec b/rpm.spec index b15e712..8ec468c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 41 +Release: 42 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -337,7 +337,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 489 +Release: 490 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -365,7 +365,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 489 +Release: 490 Requires: popt = 1.7 Requires: glibc-devel # bug437293 @@ -405,1231 +405,3 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog -* Tue Jun 09 2009 mmarek@suse.cz -- findksyms.diff: also generate provides for kernel packages. -* Mon Apr 06 2009 ro@suse.de -- fix typo in brp-symlink (bnc#457908) -* Tue Mar 31 2009 mmarek@suse.cz -- findksyms.diff: don't check for /boot/symsets-*, generate ksym() - requires if not present. -* Thu Mar 19 2009 ro@suse.de -- rpm-suse_macros: suse_version to 1120 -* Thu Feb 19 2009 schwab@suse.de -- Add support for xz compressed sources. -* Wed Feb 18 2009 jblunck@suse.de -- Add debuginfo.prov helper script for build-id provides. -* Mon Feb 16 2009 ro@suse.de -- fix sort call in finddebuginfo again -* Wed Feb 11 2009 coolo@suse.de -- sort the result of find to make symlinks stable in finddebuginfo -* Wed Feb 11 2009 coolo@suse.de -- adapt to new API of xz, sticking with the old LZMA format (not XZ) -* Mon Feb 09 2009 ro@suse.de -- define disttag as optional tag with macro just like disturl -* Thu Jan 29 2009 olh@suse.de -- obsolete old -XXbit packages (bnc#437293) -* Tue Jan 27 2009 agruen@suse.de -- find-supplements.ksyms: Fix "Supplements: packageand( - kernel-$flavor:$package)" dependency (bnc#429254). -* Mon Jan 05 2009 mmarek@suse.cz -- findksyms.diff: make sure that the input files for join are - sorted properly (bnc#450714) -* Fri Dec 19 2008 mls@suse.de -- add popt-devel and rpm-devel to baselibs config (bnc#445037) -* Thu Dec 11 2008 ro@suse.de -- brp-symlink: whitelist kde4 doc path (bnc#457908) -* Thu Dec 11 2008 agruen@suse.de -- find-supplements.ksyms: Module aliases may contain special - characters that rpm does not allow in dependencies, such as - commas. Encode those as %%XX to avoid generating broken - dependencies (bnc#456695). -* Tue Dec 09 2008 schwab@suse.de -- find-debuginfo.sh: Don't convert to binary. -* Mon Dec 01 2008 ro@suse.de -- add rpm to baselibs.conf (for net-snmp) -- append a "nil" after suse_install_update_script and _message -* Fri Nov 28 2008 dmueller@suse.de -- fix build -- fix stack based buffer overflow in filelist parsing (bnc#397006) -- add macros for update messages and update scripts -* Fri Nov 28 2008 mls@suse.de -- disable debug package requires for now, they cause more harm - than benefits -* Thu Nov 27 2008 mls@suse.de -- remove '-m64' from ppc64 optflags [bnc#447002] -- add _specfile macro -- set RPMBUILD_ env vars for file helpers -- make find-supplements.ksyms use RPMBUILD_SPECFILE [bnc#443815] -* Tue Nov 25 2008 jblunck@suse.de -- find-debuginfo.sh: fix for handling absolute symlinks -* Fri Nov 21 2008 mls@suse.de -- add firmware.prov provides helper -* Fri Nov 21 2008 mmarek@suse.cz -- fixed sed expression in find-provides.ksyms -* Tue Nov 18 2008 jblunck@suse.de -- find-debuginfo.sh: Create symlinks reflecting the policy from brp-symlink -* Thu Nov 13 2008 agruen@suse.de -- Fix the ksym(...) provides to also include the kernel flavor - (bnc#444698). -* Fri Nov 07 2008 ro@suse.de -- update gcc flags to current set -* Fri Oct 31 2008 coolo@suse.de -- moved suse_update_desktop_files to package update_desktop_files -* Tue Oct 28 2008 jblunck@suse.de -- debugedit: Don't emit NOPs at the end of the line number program but at the - beginning (bnc #433182 again) -- debugedit: Fix an uninitialized variable use that lead to segfaults from - time to time -* Tue Oct 28 2008 mls@suse.de -- fix fingerprint computation for gpg checksums -* Tue Oct 21 2008 jblunck@suse.de -- debugedit: Fix debuginfo problems introduced by last patch (bnc #433182) -* Mon Oct 20 2008 mls@suse.de -- drop static libraries and libtool archives -* Thu Oct 02 2008 vuntz@suse.de -- support the new -t option of suse_update_desktop_file.sh in - rpm-suse_macros -* Thu Oct 02 2008 mls@suse.de -- fix rpmrc compile options for ia64 [bnc#431345] -* Thu Oct 02 2008 jblunck@suse.de -- debugedit: Fix some compilation warnings and the canonicalization error. -* Tue Sep 16 2008 ro@suse.de -- fix find-debuginfo.sh and debugsource-package.diff to even - apply (directory depth) -- add hack from jblunck using home made elfcmp -* Mon Sep 15 2008 jblunck@suse.de -- fix find-debuginfo.sh to work on filenames with spaces in -* 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 -- enabled SELinux support [Fate#303662] -* Thu Aug 21 2008 ro@suse.de -- update rpm-suse_macros -* Wed Aug 20 2008 agruen@suse.de -- rpmconfigcheck: set Required-Stop to $null; this init script - only performs some checks when started. -- /usr/lib/python* belongs to the rpm-python package; remove from - the main rpm package. -* Mon Jun 30 2008 dmueller@suse.de -- add a requires_ge macro as well -* Thu Jun 26 2008 schwab@suse.de -- Fix db configure script. -* Thu May 15 2008 dmueller@suse.de -- remove references to brp-strip-comment-note (bnc#390163) -* Tue May 06 2008 mls@suse.de -- enable all parts of the noprovides patch again, making our rpm - compatible to rpm4 -* Fri May 02 2008 dmueller@suse.de -- add at least one supplements prefering the right kernel flavour - if no modalias could be generated (bnc#384084) -* Thu May 01 2008 agruen@suse.de -- For kernel modules, require "kernel(flavor:symset) = version" - instead of "kernel(symset) = version". This disambiguates - the case where several kernel flavors end up with the same - modver checksums (190163, 355628). -* Wed Apr 16 2008 jblunck@suse.de -- Get rid of noise when no debuginfo was generated -- Never strip static libraries in find-debuginfo script -* Thu Apr 10 2008 ro@suse.de -- added baselibs.conf file for xxbit packages -* Thu Apr 10 2008 jw@suse.de -- added whatrequires-doc.diff - Adds a hint to the misleading --whatrequires option, pointing to - the more useful -e --test. - Motivated by a talk thread started by Hubert. -* Wed Apr 09 2008 mrueckert@suse.de -- revert the last change as it leads to duplicated entries in the - file list -* Wed Apr 09 2008 jblunck@suse.de -- Fix a bug in last commit that leads to /usr/src/debug not belonging - to any package. -* Wed Apr 09 2008 jblunck@suse.de -- Put debug sources into separate -debugsource package. -* Fri Mar 28 2008 coolo@suse.de -- leave the rpm package itself with bzip payload to - avoid blocking updates from within running system -* Thu Mar 27 2008 coolo@suse.de -- switch payload default to lzma -2 -- flag GNOME docu as %%doc (bnc#358838) -* Tue Mar 18 2008 mls@suse.de -- make ia32 compatible to ia64, like it was in SLES9 [bnc#367705] -- fix memory leak and endless loops in lzma code -- make rpm provide the right lzma rpmlib name -* Tue Mar 18 2008 schwab@suse.de -- Fix broken db configuration. -* Fri Mar 14 2008 coolo@suse.de -- change it to the "alone" file format used by stable - distributions of 7zip and lzma -* Fri Mar 14 2008 coolo@suse.de -- daring some more compression time to get an overall picture -* Thu Mar 13 2008 coolo@suse.de -- support lzma payload using liblzma -* Thu Feb 21 2008 mls@suse.de -- do not configure autoreloc or colors -* Thu Jan 31 2008 ro@suse.de -- brp-symlink: whitelist /opt/kde3/share/doc*/HTML/*/common -* Mon Jan 28 2008 ro@suse.de -- finddebuginfo.diff: disable debuginfo for mono at the moment -* Mon Jan 21 2008 mls@suse.de -- change vendor detection so that it works in build service, too -* Sat Jan 19 2008 mls@suse.de -- update rpm-suse_macros so that the build service can build, too -* Thu Jan 17 2008 wberrier@suse.de -- autodeps.diff - pass .config files to mono-find-requires, not mono-find-provides -* Mon Dec 03 2007 dmueller@suse.de -- list email address completely again (#344147) -* Fri Nov 16 2007 dmueller@suse.de -- shorten changelogs in binary rpms (#308569) - * saves 4.3MB for the one CD media -* Thu Oct 11 2007 schwab@suse.de -- Add support for lzma compressed archives. -* Sun Sep 30 2007 rguenther@suse.de -- fix build with gcc43 -* Mon Sep 03 2007 dmueller@suse.de -- change %%lang_package implementation once again - to support bundle-lang-other for only one desktop (#302270) -* Fri Aug 31 2007 dmueller@suse.de -- implement supplements for lang_packages (#306412) -* Fri Aug 10 2007 dmueller@suse.de -- package size reduction (#217472) -* Wed Aug 08 2007 dmueller@suse.de -- support optional -n parameter in %%lang_package -- make %%lang_package export a -all provides that - can be used to resolve conflicts with the bundle -* Thu Aug 02 2007 mls@suse.de -- let the debug_package_requires macro overwrite the - default requires in the debuginfo package -* Tue Jul 24 2007 dmueller@suse.de -- hardcode rpm in patch name -* Fri Jun 15 2007 dmueller@suse.de -- package size reduction (28%%) -* Sun May 27 2007 schwab@suse.de -- Remove duplicate rpmpopt alias. -* Fri May 25 2007 mls@suse.de -- fix patch-rpm query -- do not link convertdb1 statically [#274694] -- use --wildcards option for tar [#272519] -- fix perl.prov [#255009] -- show pre/posttrans scripts in --scripts query [#253620] -- remove popt version requires [#246871] -- fix missing file error -* Wed May 16 2007 mls@suse.de -- fix autodeps.diff mono logic -* Mon May 14 2007 coolo@suse.de -- correctly mark KDE documentation as %%doc in find-lang.sh -* Fri May 11 2007 coolo@suse.de -- adding %%lang_package to simplify seperating translations -* Sat Apr 28 2007 wberrier@suse.de -- autodeps.diff - bnc #227362 - -Print warning if mono assembiles are found but mono-find-* fails - (solution is to make sure mono-devel is installed) - -Also include .config files when searching for mono assemblies. - (bnc #210224) -* Tue Apr 24 2007 mls@suse.de -- enable noprovides patch again. - disable part of the patch so that rpm checks the package provides - again instead of just package name when going through the - obsoletes list. This makes rpm behaviour consistent with the - updated libzypp. [#232127] -* Sun Apr 22 2007 dmueller@suse.de -- fix stripping of symbol table -* Tue Apr 17 2007 dmueller@suse.de -- strip comment and gcc command line sections from the packages -- rework SYMTAB_KEEP to accept a file pattern -* Sun Apr 08 2007 schwab@suse.de -- Include compilation directory in debuginfo file list. -* Sat Mar 24 2007 ro@suse.de -- added libbz2-devel to BuildRequires and Requires for -devel -* Fri Mar 23 2007 dmueller@suse.de -- drop custom libpopt so versioning -- move libpopt to /lib(64) for cryptsetup -- adjust installed libtool files -- Fix rpm buildrequires / devel requires -* Thu Mar 22 2007 stbinner@suse.de -- files.diff: when checking %%files list also show unpackaged files - after "not found" error message [#255780] -* Thu Mar 22 2007 dmueller@suse.de -- remove strangely duplicated libpopt -- remove static popt and corresponding .la file to reduce - dependencies -- Fix various format string errors in german translation - which cause crashes -* Mon Mar 19 2007 rguenther@suse.de -- do not require build-key -* Tue Mar 06 2007 rguenther@suse.de -- adjust cflags_profile_generate and cflags_profile_feedback to - enable tree profiling -* Fri Jan 26 2007 mls@suse.de -- create /var/spool/repackage directory [#230866] -- do not run pre/posttrans scripts in test mode [#235361] -* Thu Nov 30 2006 mls@suse.de -- disable noprovides patch [#224824] -* Fri Nov 24 2006 mls@suse.de -- fix buffer overflow in query function [#218983] -- fix off-by-two error in formatStrong [#210135] -- fix typo in (unused) beecrypt code [#219738] -- add standard buildservice macros -* Tue Nov 14 2006 agruen@suse.de -- Add %%supplements_kernel_module macro for use in firmware and - similar packages which are related to modules in a - kernel-$flavor package: RPM then extracts the modaliases from - the specified module(s) and adds them as Supplements: - modalias(...) tags, so that the package magaer will add - such packages automatically when the respective hardware is - present. -* Wed Nov 08 2006 agruen@suse.de -- Move the Kernel Module specific macros into the kernel-source - package. -* Fri Oct 20 2006 agruen@suse.de -- Support the distribution-independent macros - %%kernel_module_package_buildreq, %%kernel_module_package, and - inside %%kernel_module_package, the macros %%flavors_to_build and - %%kernel_source. -* Wed Oct 18 2006 mls@suse.de -- split up jumbo patch in 78 small patches -- fix lua directory handling [#201518] -- add /etc/rpm directory to filelist [#208762] -* Mon Oct 16 2006 agruen@suse.de -- Fix the KMP Package spec file template so that whenever the - initrd contains a module that the KMP includes, the initrd will - be regenerated (211646). -* Sun Oct 15 2006 schwab@suse.de -- Make sure config.rpath is present. -* Mon Oct 02 2006 agruen@suse.de -- %%suse_kernel_module_package: Abort when trying to build for a - kernel that doesn't have an associated /boot/symsets-$krel.tar.gz - file: we cannot generate the appropriate dependencies without. -* Mon Oct 02 2006 agruen@suse.de -- Allow kernel modules in packages even when the dependencies - between those packages and the matching kernel packages cannot - be tracked (199474). -* Sun Oct 01 2006 agruen@suse.de -- Make find-*.ksyms more robust. -* Tue Sep 19 2006 rguenther@suse.de -- split rpm-python to separate spec file -- remove python-devel BuildRequires -* Tue Aug 15 2006 ro@suse.de -- workaround for gettext using MKINSTALLDIRS in configure.ac -* Wed Jun 14 2006 mls@suse.de -- make rpmlib provide rpmlib(PatchRPMs) [#184856] -* Wed Apr 26 2006 agruen@suse.de -- rpm-suse-kernel-module-subpackage: Use a temporary file location - that only root can write to (169378). -* Fri Apr 21 2006 mls@suse.de -- copy suse_macros file back into source rpm -* Mon Apr 10 2006 agruen@suse.de -- rpm-suse-kernel-module-subpackage: Arguments to -p and -f should - be relative to %%_sourcedir. -* Fri Mar 24 2006 mls@suse.de -- fix uninitialized variable in unused file code [#160434] -* Fri Mar 24 2006 agruen@suse.de -- %%suse_kernel_module_package: Fix -x case when multiple flavors - to include are specified. Do not build KMP packages without - modversions or kernel(...) requirements. -* Tue Mar 21 2006 mls@suse.de -- fix PGP signature checking when there is no RSA sig -* Mon Mar 20 2006 agruen@suse.de -- Switch from modalias(foo) to modalias(kernel-flavor:foo) - supplements to give the resolver enough information to do "the - right thing". -* Sun Mar 19 2006 agruen@suse.de -- Allow paths relative to %%_sourcedir in - %%suse_kernel_module_package. -* Sat Mar 18 2006 agruen@suse.de -- Clarify rpm --help texts. -* Fri Mar 17 2006 mls@suse.de -- fix cond queries that return no result -* Fri Mar 17 2006 mls@suse.de -- work around broken patchrpm database entries [#156347] -- add query support for suggests/recommends/enhances/supplements - [#155301] -* Sun Mar 12 2006 agruen@suse.de -- find-supplements.ksyms: Don't generate too many Supplements; - anything that does not have a colon in it (like pci:...) is not - a modalias. -* Sat Mar 11 2006 ro@suse.de -- find-debuginfo: only "strip-debug" for static libs, - do not use "strip-all" there -* Fri Mar 10 2006 agruen@suse.de -- Make KMP sub-packages require kernel-$flavor instead of kernel - (mostly cosmetic). -* Fri Mar 10 2006 dmueller@suse.de -- patch for improved debuginfo extraction (#150940) -* Thu Mar 09 2006 agruen@suse.de -- find-scripts.diff: Add support for %%__find_enhances and - %%__find_supplements scripts (from mls@suse.de). -- modalias.diff: Add modalias(...) Supplements tags that define - the hardware that kernel module packages support (e.g., - modalias(pci:vBADOFBADdDEADBEEFsv*sd*bc*sc*i*)). -* Mon Mar 06 2006 agruen@suse.de -- %%suse_kernel_module_package: Add a -p option for defining - additional preamble lines in sub-packages, subject to the same - macro expansion as the sub-package (-s) itself. -* Wed Mar 01 2006 schwab@suse.de -- Fix logic error in find_debuginfo.sh [#144629]. -* Fri Feb 24 2006 mls@suse.de -- fix cursor leak in rpmdbGrowIterator [#151953] -- print error message if scriptlet fork fails [#152779] -* Sun Feb 19 2006 agruen@suse.de -- scripts/find-requires.ksyms: Fix bug in last find-requires.ksyms - fix. -* Sat Feb 18 2006 ro@suse.de -- allow debuginfo packages also for noarch (for mono,java) -* Fri Feb 17 2006 mls@suse.de -- put mono debug files in debuginfo packages [#151353] -- fix off-by-one error in glob code -- define _libexecdir to be _libdir [#136762] -- rename improves to supplements -* Thu Feb 16 2006 agruen@suse.de -- scripts/find-requires.ksyms: Tolerate kernel modules that have - more than one vermagic info entry (it happened!). -* Mon Feb 13 2006 agruen@suse.de -- rpm-suse-kernel-module-subpackage: - + Search for the spec file in %%_sourcedir and %%_specdir (150119). - + If no KMP subpackage exists, use the Group and Summary tags - of the main package. -* Fri Feb 10 2006 mls@suse.de -- add back missing chunk of srcdefattr patch [#48870] -- add rpmvercmp patch from Peter Bowan -- add -m32 to ix86 optflags to make --target work [#141206] -* Sun Feb 05 2006 agruen@suse.de -- rpm-suse-kernel-module-subpackage: Allow to specify a list of - kernel flavors to build (-x) instead of specifying an exclude - list. -* Fri Feb 03 2006 mls@suse.de -- use RPMSENSE_STRONG instead of RPMSENSE_WEAK -- drop support for EssentialFor -* Thu Feb 02 2006 agruen@suse.de -- rpm-suse-kernel-module-subpackage: Allow to specify a custom - %%files list for the kernel-specific sub-packages. Use the - Summary and Group tags, and the %%description section from the - KMP sub-package for the kernel-specific sub-packages. -* Tue Jan 31 2006 agruen@suse.de -- rpm-suse-kernel-module-subpackage: Add version to additional - Provides tag. We may need this for future Obsoletes. -* Fri Jan 27 2006 mls@suse.de -- added support for EssentialFor and Supports -- enabled support for lua scripts -* Fri Jan 27 2006 agruen@suse.de -- rpm-suse-kernel-module-subpackage: Add "Requires: kernel". Add - -r option to override the release number. Clean up. -* Thu Jan 26 2006 agruen@suse.de -- rpm-suse_macros: Add -v option to %%suse_kernel_module_package - to allow specifying a kernel module version different from the - main package version. Restore the %%version, %%summary, and - %%group macros of the main package at the end of - %%suse_kernel_module_package. -* Wed Jan 25 2006 mls@suse.de -- converted neededforbuild to BuildRequires -* Tue Jan 17 2006 agruen@suse.de -- rpm-suse_macros: Add %%suse_kernel_module_package macro for - building kernel module packages. -* Wed Jan 11 2006 agruen@suse.de -- rpm-4.4.2.diff: find-requires.ksyms must not print "Requires:". - Remove trailing whitespace. -* Wed Dec 21 2005 mls@suse.de -- make transaction lock --root aware -* Mon Dec 19 2005 mls@suse.de -- don't ignore getcwd return value in build.c -* Mon Dec 19 2005 mls@suse.de -- fix find-lang.sh script -* Sun Dec 18 2005 mls@suse.de -- fix find-debuginfo script -* Sun Dec 18 2005 mls@suse.de -- don't assume root:root defattr -* Sun Dec 18 2005 agruen@suse.de -- fix wrong buildsubdir macro name -* Thu Dec 15 2005 mls@suse.de -- update to version 4.4.2 - for now without lua, rpc, dav support -* Wed Dec 07 2005 agruen@suse.de -- Add find-{requires,provides}.ksyms and invoke them from the - global find-{requires,provides} scripts. The scripts add - "kernel(symbol set) = version" and "kver(symbol) = version" - provides and requires to kernel module packages. -- Add symset-table script used to generate a table of known - kernel symbol sets from /boot/symsets-*.tar.gz. -- Add rpmsort script to sort a file into RPM version order. Used - in kernel scripts to sort kernel packages by version. -* Tue Nov 22 2005 ro@suse.de -- change NO_BRP_STRIP_DEBUG to NO_DEBUGINFO_STRIP_DEBUG -- fix patchrpm code not to modify immutable header parts -* Fri Nov 18 2005 ro@suse.de -- honor NO_BRP_STRIP_DEBUG in find-debuginfo.sh -* Sat Oct 29 2005 mls@suse.de -- use lstat instead of stat when globbing (#129434) -- add RPMTAG_PKGID and RPMTAG_HDRID -- make python always return requires/provides/obsoletes/conflicts - as array -* Mon Oct 24 2005 ro@suse.de -- find-requires/find-provides: fix MONO_PATH -* Thu Oct 20 2005 ro@suse.de -- find-requires/find-provides: update mono hooks -* Wed Sep 07 2005 matz@suse.de -- Make debuginfo packages require exact version of base rpm. -* Fri Sep 02 2005 mls@suse.de -- backport CLOEXEC workaround [#93727] -- fix typo in man page [#114909] -* Thu Aug 25 2005 mls@suse.de -- don't catch ignored signals [#74560] -- unblock all signals when running scripts -* Mon Aug 22 2005 mls@suse.de -- do not try to mmap zero sized files in domd5() -* Fri Aug 12 2005 mls@suse.de -- change -mcpu to -mtune and add -D_FORTIFY_SOURCE=2 [#104241] -* Wed Aug 03 2005 mls@suse.de -- ignore /media when creating fdilesystem list -- allow --ignoresize when erasing packages -* Fri Jul 01 2005 schwab@suse.de -- Fix ppc assembly syntax. -* Wed Jun 08 2005 matz@suse.de -- add STRIP_KEEP_SYMTAB to find-debuginfo.sh -* Sat May 21 2005 schwab@suse.de -- find-debuginfo.sh: make writable before extracting debug info, simplify. -* Thu May 19 2005 schwab@suse.de -- Replace absolute symlinks when copying sources for debuginfo package. -* Wed Apr 06 2005 schwab@suse.de -- Cleanup neededforbuild. -* Wed Apr 06 2005 meissner@suse.de -- Added gettext-devel -* Tue Apr 05 2005 bg@suse.de -- add noarch to valid hppa architectures -* Thu Mar 24 2005 uli@suse.de -- better ARM support -* Sun Feb 20 2005 od@suse.de -- fix debugedit for relocatable files (kernel modules) on ppc -* Fri Feb 18 2005 mls@suse.de -- update debugedit program -* Fri Feb 18 2005 od@suse.de -- make find-debuginfo.sh handle kernel modules -* Wed Feb 16 2005 mls@suse.de -- fix --rebuilddb with --root [#50993] -* Fri Feb 11 2005 mls@suse.de -- update to elfutils-0.97 [#47746], [#48471] -- update to db-4.2.52 [#44193] -- pack brp-symlink -* Fri Feb 11 2005 ro@suse.de -- remove -fsigned-char from rpmrc (#49877) -* Sat Feb 05 2005 schwab@suse.de -- Fix building with gcc 4. -* Fri Feb 04 2005 mls@suse.de -- make python-2.4 work [#49990] -- fix --setguids / --setperms [#47122] -- makd gpgv4 signatures work [#42282] -- add brp-symlink [#49596] -* Fri Feb 04 2005 ro@suse.de -- fix one regexp in find_lang change -* Thu Feb 03 2005 ro@suse.de -- hppa may install noarch -* Wed Feb 02 2005 schwab@suse.de -- Remove compatibility provides on ia64. -* Mon Jan 31 2005 adrian@suse.de -- handle also ??_?? languages in %%find_lang. -* Fri Jan 28 2005 coolo@suse.de -- let the debuginfo packages work again -* Fri Jan 21 2005 skh@suse.de -- changed jpackage macros -* Fri Jan 21 2005 coolo@suse.de -- use binutils for debuginfo packages -* Fri Jan 14 2005 coolo@suse.de -- name the debug package -debuginfo to sync with redhat/fedora -* Tue Dec 14 2004 sndirsch@suse.de -- moved chinese popt mo file to correct directory (Bug #47262) -* Fri Dec 03 2004 mls@suse.de -- fix update of rpm with same name/version/release but different - architecture -* Fri Nov 26 2004 ro@suse.de -- fix build with python-2.4 -* Tue Nov 16 2004 ro@suse.de -- update permissions handling -* Tue Oct 19 2004 ro@suse.de -- locale rename: no -> nb -* Mon Sep 27 2004 mls@suse.de -- move TE type initializaten before the addTE call to make - relocations work [#34871, #43557] -* Fri Sep 24 2004 mls@suse.de -- check payloadformat for "cpio", print extra deltarpm message -- don't skip directories in the fingerprint check when deleting rpms -* Thu Sep 23 2004 mls@suse.de -- allow database read access in scripts -* Wed Sep 22 2004 mls@suse.de -- only retry locking if errno is EAGAIN [#45704] -* Fri Sep 17 2004 mls@suse.de -- fix isSpecfile fix -- reset SIGILL handler in RPMClass() -* Mon Sep 13 2004 mls@suse.de -- glob.h: add workaround for invalid prototypes -* Thu Sep 09 2004 mls@suse.de -- fix jpackage macros -- change binary payload compression to w9.bzdio -- fix localization of query results [#38474] -- delete unmaintained cpanflute scripts [#39988] -- patch isSpecfile to be less restrictive [#40328] -- wait up to 3 minutes for the package lock [#40961] -* Thu Sep 02 2004 mls@suse.de -- add jpackage macros -* Fri Aug 06 2004 mls@suse.de -- make it build with new automake -* Wed Jun 23 2004 mls@suse.de -- add support for mono provides/requires autodetection. - limited to *.exe and *.dll for now. -* Sun May 23 2004 schwab@suse.de -- Don't record timestamp in compressed manpages. -* Thu Apr 22 2004 mls@suse.de -- add DISABLE_RESTART_ON_UPDATE and DISABLE_STOP_ON_REMOVAL - sysconfig variables -* Mon Apr 19 2004 mls@suse.de -- go back to libpopt.so.0.0.0 -- also create and pack libpopt.so.1.0.0 for compatibility -* Wed Mar 31 2004 uli@suse.de -- added detection of i686-capable Transmeta Crusoe that reports - as being i586 (bug #37713). This patch is necessary because YaST - (rightfully) tries to install an i686 glibc on machines with this CPU, but - RPM refuses to do so -> BOOM. This patch is safe because it only uses - cpuid functions already used earlier in RPMClass() and does not do - anything if the CPU identification string does not end in "ineTMx86". -* Wed Mar 31 2004 ke@suse.de -- remove broken german translation file [#30665], -* Fri Mar 26 2004 mls@suse.de -- use the system's zlib, fixes python segfault [#36810] -* Sun Mar 21 2004 aj@suse.de -- Work around lvalue used as cast problems. -* Thu Mar 18 2004 mls@suse.de -- convert query results to locale encoding [#28347] -- don't check provides if filename doesn't contain '/' [#32078] -- allow interrups if database is RDONLY [#33026] -- added _srcdefattr macro to set defattr for srpms [#33870] -- drop sbits from old files if installing new version [#35376] -- remove bogus entries from .la files [#36346] -- add _docdir_fmt macro to make it possible to create rpms - for other distributions -* Sat Mar 06 2004 ro@suse.de -- readd lost patch hunk from last change: - set docdir default back to .../packages/%%name (w/o version) -* Fri Mar 05 2004 mls@suse.de -- backport some fixes from rpm-4.2 -- match py_libdir macro definition with python -- clean and re-create buildroot in a safe way -* Sat Feb 28 2004 schwab@suse.de -- Remove anchor from pattern in find-requires. -* Fri Feb 27 2004 schwab@suse.de -- Silence error from find. -* Fri Feb 27 2004 mls@suse.de -- fix definition of _initrddir -- set sysconfdir to /etc -- set localstatedir to /var -* Thu Feb 26 2004 schwab@suse.de -- Handle more cases of filenames with spaces. -* Thu Feb 26 2004 ro@suse.de -- some fixes in linux.prov to survive filenames with spaces -* Thu Feb 12 2004 mls@suse.de -- fixed linux.req soname generation (#21664) -- disable nptl for now -* Mon Feb 09 2004 kukuk@suse.de -- linux.req: Fix finding of interpreters -* Sat Feb 07 2004 olh@suse.de -- disable redhat's uname hack for ppc -* Thu Feb 05 2004 ro@suse.de -- linux.prov: don't block soname in versioned-requires -- linux.req: disable perl-requires, it's broken -* Wed Feb 04 2004 schwab@suse.de -- Readd ia64 64bit provides hack. -* Tue Feb 03 2004 kukuk@suse.de -- Remove all special find-requires scripts and use the default one -* Sat Jan 17 2004 schwab@suse.de -- Filter out linux-gate.so. -* Thu Jan 15 2004 schwab@suse.de -- For ia64 require 64bit symbols and provide them both with and without - 64bit. -* Tue Jan 13 2004 adrian@suse.de -- call ldconfig -- add missing Requires in -devel packages -- add %%defattr -* Fri Jan 09 2004 kukuk@suse.de -- Coompile with "-fno-strict-aliasing" -* Fri Nov 14 2003 bg@suse.de -- added changes for hppa -- fix build for hppa -* Fri Oct 10 2003 sf@suse.de -- added alias 'amd64' for 'x86_64' -* Fri Oct 10 2003 ro@suse.de -- ignore "linux-gate.so" in ldd output (on 2.6 systems) -* Wed Oct 08 2003 schwab@suse.de -- Add popt to prerequires for rpm. -* Tue Sep 23 2003 mls@suse.de -- really disable rpmconfigcheck -* Sat Sep 20 2003 kukuk@suse.de -- Don't enable rpmconfigcheck per default -* Fri Sep 19 2003 schwab@suse.de -- Fix descriptor leak [#31450]. -* Mon Sep 15 2003 mls@suse.de -- remove redhat options from popt (#30302) -- check name and arch to find out if two packages are the same -* Fri Sep 05 2003 mls@suse.de -- fix rpmalMakeIndex and off by one error in rpmalAllSatisfiesDepend -* Fri Sep 05 2003 mls@suse.de -- use mkstemp in build.c -- fix --noghost query option -* Fri Sep 05 2003 mls@suse.de -- escape '+' in MIRE_DEFAULT iterator -- use MIRE_STRCMP when going for an exact match -- update rpmrc -* Wed Sep 03 2003 mls@suse.de -- speed up installation by making nofsync local and setting it - for all databases but Packages -- fix database locking issue (#29407) -- don't open temporary databases in chroot case (may fix #29584) -* Mon Sep 01 2003 schwab@suse.de -- Fix assembler routines to not clobber predicate registers. -* Fri Aug 29 2003 mcihar@suse.cz -- rpm-python require same python version as it was built with -* Fri Aug 22 2003 mls@suse.de -- make usage of / in post section consistent -- don't force the activation of rpmconfigcheck -* Tue Aug 05 2003 coolo@suse.de -- give libpopt a soname > 0 as it's not compatible to the libpopt - on SL 8.2 (now that we link shared, it does matter) -* Fri Aug 01 2003 mls@suse.de -- fix segfault in rpmdbFindByFile -* Thu Jul 31 2003 mls@suse.de -- added directory tagging to speed up installation/updates -* Tue Jul 29 2003 mls@suse.de -- add support for patch-rpms -- fix --root option (#28266) -- fix erase exit status (#28267) -- fix database open ignoring locks the second time -* Fri Jul 11 2003 mls@suse.de -- add perl_vendorlib and perl_vendorarch -- integrate patches -* Tue Jul 01 2003 coolo@suse.de -- update find-debuginfo.sh to fix permissions of copied files -- give warning on already stripped files -* Fri Jun 27 2003 schwab@suse.de -- Fix configure scripts. -- Don't link rpm statically. -* Fri Jun 20 2003 kukuk@suse.de -- use -fPIC, not -fpic to compile elfutils -* Thu Jun 19 2003 ro@suse.de -- fix build (gettext and definition of mkinstalldirs) -* Mon Jun 16 2003 kukuk@suse.de -- Don't call find on /usr/share/locale if directory does not exist. -* Sat Jun 14 2003 coolo@suse.de -- avoid stale links in /usr/src/debug -* Fri Jun 13 2003 mls@suse.de -- make PreReqs work again if --nodeps is used -- fix rpmconfigcheck -- apply find-debuginfo.sh patch from coolo -* Thu Jun 12 2003 kukuk@suse.de -- Fix find-lang.sh (special /usr/share/locale handling) -* Thu Jun 12 2003 coolo@suse.de -- enhancing find-lang.sh to take KDE/GNOME into account and label - them correctly -* Wed Jun 11 2003 kukuk@suse.de -- Remove translated manual pages -* Fri Jun 06 2003 mls@suse.de -- fix vendor for s390/s390x -* Thu Jun 05 2003 mls@suse.de -- no longer build rpm static -- add --fileclass and --filecolor macros to rpmpopt -* Thu Jun 05 2003 ro@suse.de -- remove dangling rpmpopt symlink -* Mon Jun 02 2003 mls@suse.de -- convertdb1: call providePackageNVR to retrofit "Provide: name = EVR" - into converted headers -* Fri May 23 2003 ro@suse.de -- fixed brp-compress to convert bzip2 man pages into gziped ones - (even if hardlinked). (#21121) (from ma) -* Fri May 16 2003 mls@suse.de -- fixed x86_64 build -* Thu May 15 2003 mls@suse.de -- update to rpm-4.1.1 -* Tue May 13 2003 mls@suse.de -- don't obsolete own package when refreshing -- fix parsing of nested conditionals (again) -* Tue May 13 2003 mls@suse.de -- created rpm-python subpackage -- fix check-files/fixowner, second try -* Mon May 12 2003 mls@suse.de -- fix check-files to work without buildroot -* Mon May 12 2003 mls@suse.de -- re-activate fixowner/group/perms -- allow /usr/share/info/dir in check-files -- fix 'head -n 1' in /usr/lib/rpm/find-requires -* Thu May 08 2003 mls@suse.de -- update to rpm-4.1 -* Mon Apr 07 2003 ro@suse.de -- fix for new head(1) syntax -* Mon Mar 10 2003 mls@suse.de -- fix exit status if file to be installed is not a rpm package -* Fri Feb 28 2003 mls@suse.de -- use mkstemp instead of tempnam (#24478) -* Thu Feb 20 2003 ma@suse.de -- Work arround rpm2cpio wrongly reporting an error, if the rpm file - is read from stdin. (#16800) -* Mon Feb 17 2003 mls@suse.de -- made rpmconfigcheck add new files to /var/log/update-messages -* Fri Feb 14 2003 schwab@suse.de -- Save errno inside Fclose, its return value is never checked anyway. -* Fri Feb 14 2003 pthomas@suse.de -- find-provides for elf64 systems used to omit symbol versions - if they contained the soname, fixed by find_provides_soname.diff. -* Wed Feb 12 2003 mls@suse.de -- removed runlevels '1' and 'S' from rpmconfigcheck -* Fri Feb 07 2003 mls@suse.de -- speed up rpmconfigcheck by just checking the old conflicts if - no rpm was installed -- rerun gpg if gpg fails with "option file created" -- set LC_ALL to C before calling gpg -* Tue Jan 28 2003 kukuk@suse.de -- Remove wrong Provides "rpm-devel" and "rpm-python" from Provides -* Sun Jan 26 2003 olh@suse.de -- the official arch_canon value for ppc64 is 16, not 5 -* Thu Jan 16 2003 ma@suse.de -- update subpackage popt to 1.6.4 -* Thu Dec 19 2002 schwab@suse.de -- Update autogen patch. -* Mon Nov 18 2002 stepan@suse.de -- add m68k as chanonical architecture to configure.in -* Mon Nov 18 2002 ro@suse.de -- adapt to latest autoconf -- use host instead of host_alias for %%host_alias since the latter - is not set -* Mon Nov 11 2002 ma@suse.de -- let linux.prov list vrsion definitions in libraries/plugins without - soname. (find_provides.diff) (#21664) -* Fri Oct 25 2002 sf@suse.de -- corrected %%_libdir-macro (rpm-3.0.6-platform.diff) -* Mon Oct 21 2002 schwab@suse.de -- Fix read beyond EOS. -* Mon Oct 07 2002 ro@suse.de -- fixed brp-compress script for current fileutils - (add LC_TIME=POSIX, this bug lead to broken tcl man pages) -* Wed Oct 02 2002 mls@suse.de -- update unpatched files in patchrpms even if --nodeps is used - [Bug #20418] -* Sat Aug 24 2002 ro@suse.de -- fix popt-devel requires -* Sun Aug 18 2002 olh@suse.de -- adding -mminimal-toc to each package is a boring job - use it per default on ppc64 -* Thu Aug 15 2002 kukuk@suse.de -- Add insserv PreRequires [Bug #17969] -* Mon Aug 12 2002 bk@suse.de -- rpmrc/s390{,x}: change dummy -fomit-frame-pointer to -fsigned-char -* Sat Aug 10 2002 schwab@suse.de -- Make ia64 arch_compat to i686. -* Sat Aug 10 2002 kukuk@suse.de -- Fix version number of popt-devel -* Fri Aug 09 2002 kukuk@suse.de -- Fix typo -* Fri Aug 09 2002 kukuk@suse.de -- Fix requires of rpm-devel and popt-devel -* Fri Aug 09 2002 ro@suse.de -- adapt automake version in configure -* Fri Jul 26 2002 mls@suse.de -- Added perl/python macros from conectiva -* Fri Jul 26 2002 kukuk@suse.de -- Create rpm-devel and popt-devel subpackages [Bug #17225] -* Fri Jul 26 2002 kukuk@suse.de -- Change Requires for suse-build-key to build-key -* Thu Jul 25 2002 mls@suse.de -- renamed rpmconfigscan to rpmconfigcheck -- fixed elf64-linux.req to ignore scripts without #! -- disabled tag check in rpmdbFindByFile, too dangerous -* Thu Jul 18 2002 mls@suse.de -- fixed double free of header if the postinstall script failed -- return exit status when doing --initdb -* Thu Jul 11 2002 mls@suse.de -- use "officially reserved" value of RPMFILE_UNPATCHED -- added rpmconfigcheck script to search for unresolved config - file changes -* Mon Jul 08 2002 mls@suse.de -- new version of patchrpm diff: handle patch "freshen" operations - gracefully -- documented patchrpm options -- taggedindex diff: add directory tags to the fileindex to speed - up file conflict detection -* Tue Jul 02 2002 ke@suse.de -- Update German program messages using translations by Christian - Kirsch. Add as Source7; drop Patch19 [# 8442]. -* Fri Jun 21 2002 ro@suse.de -- automake is 1.6.2 -* Wed Jun 12 2002 bk@suse.de -- ppc: fix arch for elf64.prov and elf64.req to powerpc(from olh) -- s390x: fix brp-lib64-linux to ignore */lib/ld64.so.1 in lib check -- remove obsolete x64_64 scripts, replaced by generic elf64 scripts -- rpm-3.0.6.pkg_build.diff: remove obsolete diff for sparc-linux.req -* Fri May 31 2002 olh@suse.de -- remove ppc64 hack -* Mon May 27 2002 bk@suse.de -- all lib64 platforms use the same brp, req and prov scripts now. -- merge mips diff to not include private flags into linux.req.suse -- merge last rpm-3.0.6-s390x-lib64.diff into rpm-3.0.6.config.diff -- add (64bit) fix for empty soname in elf64.prov from sles7-s390x -* Fri May 17 2002 olh@suse.de -- add more ppc64 changes, add brp-ppc64-linux -- apply mips, x86_64 and s390x patches on all archs -- rpm-3.0.6.lib64.diff: merged all lib64 stuff and add SUBSTS macros - for uname->target_cpu handling on ppc64, s390 and x86_64 -* Wed May 15 2002 ro@suse.de -- update brp-x86_64-linux -* Wed May 15 2002 mfabian@suse.de -- fix ja.po, it contained some junk which caused mojibake on - output, especially in ja_JP.UTF-8 locale. Remove a lot - of fuzzies which had correct translations. -* Mon May 13 2002 olh@suse.de -- do not translate ppc64 to ppc anymore -* Fri Apr 26 2002 sf@suse.de -- fixed brp-x86_64-linux script -- added *.a-files to brp-script -- look _only_ for files or links with names *.a, *.so* -- added /opt/gnome/lib and /opt/kde/lib -* Wed Apr 24 2002 sf@suse.de -- added script to show requires and provides with 64 bit - (like s390 and sparc64) -- rpm will now stop (on x86_64) if a 64-bit binary - (or a link to one) is found in - $RPM_BUILD_ROOT{, /usr, /usr/X11R6}/lib -* Wed Apr 24 2002 ke@suse.de -- patch19: Fix 1 german message (3 strings) in de.po [# 8442]. -* Mon Apr 22 2002 kukuk@suse.de -- Remove broken s390x try to fix lib64 library location -* Thu Apr 18 2002 kukuk@suse.de -- x86_64 can also build noarch packages -* Wed Apr 17 2002 sf@suse.de -- install i386-rpms on x86_64 -- patch65 only, if not on s390x (doesn't apply) -- patch to build with new automake (ro) -* Fri Apr 12 2002 kukuk@suse.de -- Don't apply s390x 64bit hacks on sparc64, sparc64 has a working - libtool -* Thu Apr 11 2002 mls@suse.de -- fixed bug in patchrpm case that prevented the reuse of - old timestamps in unpatched files in some cases -- fixed patchrpm dependency failure message -* Wed Apr 10 2002 sf@suse.de -- added x86_64 architecture -- added --libdir to autogen.sh to copy the libs depending on - architecture (lib / lib64) -* Fri Mar 29 2002 schwab@suse.de -- Fix for new autotools. -* Fri Mar 22 2002 mls@suse.de -- added rpmqpack program to speed up susehelp -* Wed Mar 20 2002 ro@suse.de -- modified config.diff for currently used optflags (#15123) -* Mon Mar 18 2002 schwab@suse.de -- Don't lose errno. -* Mon Mar 11 2002 mls@suse.de -- use gpg --keyring when checking keys with uid != 0 -- use hardcoded keyring path if _gpg_path is not set and uid == 0 -- removed _gpg_path from suse_macros -* Sat Mar 09 2002 bk@suse.de -- brp-s390x-linux: merge lib64 fix: patch .la files when moving -* Fri Mar 08 2002 ma@suse.de -- introduced x86_64 architecture in rpmrc (#14110) -* Fri Mar 08 2002 mls@suse.de -- backported rpm4 fix to get mtime right on s390x -* Mon Feb 25 2002 mls@suse.de -- added patchrpm support -- changed rpm -qi to include the distribution -* Thu Feb 21 2002 schwab@suse.de -- Fix to build with new gettext. -* Mon Feb 18 2002 ro@suse.de -- added requires for suse-build-key -* Tue Feb 12 2002 ro@suse.de -- tar option for bz2 is now "j" (re-added) -* Mon Feb 11 2002 ma@suse.de -- unk_ugname_cached.diff: Upon building a package, unpacking sources - by calling tar from the spec file, may lead to files with unknown - user/group names. If those files are to be included in the final - package, it's not appropriate to simply map unknown user/group names - to the builders user/group (usg. root). This behaviour has been disabled - and building the package will fail. There are ample means to propperly - define file attributes. If a spec file does not use them, although it - should, it's considered broken. - Unknown user/group names lead to NULL entries in rpms user/group name cache, - which may cause a segmentation fault on cache lookup. This has been fixed. -* Sat Jan 26 2002 ro@suse.de -- apply configure-diff also on s390x -* Mon Jan 21 2002 bk@suse.de -- use RPM_OPT_FLAGS for compilation -- add lib64 support for s390x -- update srcdir-supplied rpm-suse_macros file to newest version - adds: %%_lib handling for ltconfig/-main and macro suse_update_libdir -- sparc64 and s390x: call scripts/brp-%%_arch-linux at the end of install -* Wed Jan 16 2002 schwab@suse.de -- Fix parsing of nested conditionals. -* Wed Jan 02 2002 schwab@suse.de -- Remove wrong assertion. -* Tue Dec 18 2001 adrian@suse.de -- fix find-requires for objdump with private flags finaly -* Mon Dec 17 2001 adrian@suse.de -- apply mips patch only on mips architecture -- fix mips patch -* Sun Dec 16 2001 adrian@suse.de -- fix find-requires script for mips - ( do not include private flags from objdump to dependencies ) -* Wed Dec 05 2001 schwab@suse.de -- Use optind = 0 to reset getopt in glibc. -* Mon Dec 03 2001 schwab@suse.de -- Fix another endian bug due to pointer mismatch. -* Thu Nov 22 2001 mls@suse.de -- reset getopt in grabArgs() macro expansion -* Thu Nov 15 2001 ma@suse.de -- Fixed: copyFile() in rpmchecksig didn't recognize 'No space left on - device' condition, when creating tempfiles. rpm reported that the - signature was not ok instead. (#12294) -* Thu Nov 08 2001 adrian@suse.de -- name mips big endian as "mips" instead of "mipseb" - this is compatible to all GNU tools and to the SGI distribution -* Sat Nov 03 2001 ro@suse.de -- accept automake 1.5 (still needs depcomp added) -* Tue Sep 04 2001 schwab@suse.de -- Accept libtool 1.4.1. -* Fri Aug 17 2001 ro@suse.de -- Exclude /usr/share/doc from Requires -* Sat Jul 21 2001 schwab@suse.de -- Adapt for autoconf 2.52. -- Allow libtool version suffix. -* Tue Jul 03 2001 kukuk@suse.de -- Fix typo in last change -* Mon Jul 02 2001 ma@suse.de -- Change -m486 to -mcpu=i486 in optflags -* Wed Jun 20 2001 ma@suse.de -- Don't define popt version via macro. Abuild does not like it (#8224). -- Patches for rpmrc.in (ia64.dif,ppc64.rpmrc.diff) incorporated - into config.diff. -- Patches for brp scripts (strip_no_lib.dif) and sparc64-linux.{req,prov} - scripts (sparc64.dif) incorporated into pkg_build.diff. -* Wed Jun 13 2001 bk@suse.de -- rpm-3.0.6.config.diff: add s390x support -* Mon Jun 11 2001 olh@suse.de -- add ppc64 diff -* Fri Jun 08 2001 schwab@suse.de -- Fix endian bugs. -* Mon Jun 04 2001 kukuk@suse.de -- Fix requires/provides scripts for sparc64 -* Fri Jun 01 2001 schwab@suse.de -- Fix for new configure tools. -* Wed May 09 2001 mfabian@suse.de -- bzip2 sources -* Thu May 03 2001 ma@suse.de -- provides script shouldn't block soname as version -* Tue May 01 2001 kukuk@suse.de -- modify spec file for sparc64 -* Thu Apr 12 2001 ro@suse.de -- gettextize to compile with new gettext -* Fri Apr 06 2001 kukuk@suse.de -- Make some changes to the changes entries so rpm likes it again -* Thu Mar 29 2001 ro@suse.de -- provides/requires script: add "-n200" to xargs arguments -* Mon Feb 26 2001 ro@suse.de -- no optimization for alpha for now ... -* Wed Feb 14 2001 ma@suse.de -- Fix rpmio (unknown type off64_t) with glibc >= 2.2 -- Fix configure.in to recognize SuSE as platform specific vendor -* Tue Feb 06 2001 ro@suse.de -- popt: include float.h to make it compile -* Wed Jan 17 2001 schwab@suse.de -- Mark ia64 as compatible to i386. -* Mon Jan 08 2001 ma@suse.de -- fixed previous fix (error occuring outside %%doc was lost) -* Sat Jan 06 2001 ma@suse.de -- fixed rpm does not abort build if %%doc file is missing (#503) -* Mon Nov 27 2000 ma@suse.de -- wrongly free() after alloca() fixed -* Thu Nov 23 2000 bk@suse.de -- removed old s390 hack(not needed-breaks with new rpm and glibc) -* Tue Nov 14 2000 ro@suse.de -- added patch not to strip all shared libs and - files with "/lib/modules/" in path -* Fri Nov 03 2000 ma@suse.de -- let 'rpm -e --root ..' remove files/dirs chroot. -* Wed Oct 25 2000 ma@suse.de -- update subpackage popt to 1.6 -* Tue Oct 17 2000 ma@suse.de -- fixed missing libpopt.so in popt subpackage -* Fri Oct 06 2000 ma@suse.de -- update to 3.0.6 -* Fri Sep 29 2000 schwab@suse.de -- Fix last change to stay compatible with glibc < 2.2. -* Fri Sep 29 2000 schwab@suse.de -- Fix libio cookie function pointer clash in rpmio. -* Fri Jul 28 2000 ma@suse.de -- update to 3.0.5 (handles RPM v4 packages) -- ia64/s309 patches incorporated -* Wed Jul 26 2000 ma@suse.de -- ignore chown() errors eg. if files are installed on a DOS partition -* Fri Jul 14 2000 ma@suse.de -- fixed: ignore dependencies below /usr/share/doc. -- rpmrc: synced s390 entries with those in rpm-4.0. -* Mon Jun 26 2000 bk@suse.de -- build static on s390 too. -* Fri May 26 2000 schwab@suse.de -- For for new libbz2 API. -* Thu May 18 2000 kasal@suse.de -- hope now rpm-3.0.4-macro-grabArgs.patch works -* Wed May 17 2000 kasal@suse.cz -- fixed a typo in rpm-3.0.4-macro-grabArgs.patch (c=='?') -- fixed a problem when - ifarch someother - define macro sometext - endif - defined macro anyway -* Tue May 16 2000 kasal@suse.cz -- fixed the bug with {?suse_update_config:%%{suse_update_config -f}} -* Fri May 12 2000 schwab@suse.de -- Make ia64 compatible with noarch. -* Wed Apr 26 2000 ma@suse.de -- updated 3.0.4, removed obsolete patches, builds on - libc5 -* Fri Apr 14 2000 ma@suse.de -- Update for RPM-HOWTO -- Fix in config.diff (use Makefile.am not Makefile.in) -* Mon Apr 10 2000 schwab@suse.de -- Fix config patch. -* Thu Apr 06 2000 bk@suse.de -- added /lib/libpopt.so* to filelist on s390 -* Wed Apr 05 2000 bk@suse.de -- uses autoconf and automake now -- added /lib/libbz2.so* and /lib/libz.so* to filelist on s390 -* Sun Apr 02 2000 bk@suse.de -- add s390 architecture support to rpm -- add required %%suse_update_config for s390 -- rpm is NOT linked statically on s390 for now -* Tue Mar 28 2000 ma@suse.de -- rpm.spec: avoid macro usage in 'Version:' entry -* Thu Mar 02 2000 schwab@suse.de -- Fix md5 for ia64. -* Mon Feb 28 2000 ma@suse.de -- remove 'libNoVersion' in find-requires -* Wed Feb 23 2000 schwab@suse.de -- recognize ia64 as architecture. -* Mon Feb 07 2000 ma@suse.de -- rebuilddb fix -- set info/mandir macros to /usr/share/... -* Wed Feb 02 2000 ma@suse.de -- update to 3.0.4 (popt-1.5) -- new subpackage: popt -* Sat Nov 13 1999 kukuk@suse.de -- Add sparc64 directory -- Fix installation into RPM_BUILD_ROOT directory -* Mon Nov 08 1999 kukuk@suse.de -- add directory /usr/src/packages/RPMS/sparc -* Thu Nov 04 1999 bs@suse.de -- fixed bug in find-requires regarding pseudo scripts - starting with "#! --" -* Thu Oct 28 1999 bs@suse.de -- added directories /usr/src/packages/RPMS/{ppc,noarch} -* Wed Oct 27 1999 ma@suse.de -- place suse_macrofile in source/binary package -- don't check reqires below /usr/doc/ -* Mon Sep 13 1999 bs@suse.de -- ran old prepare_spec on spec file to switch to new prepare_spec. -* Thu Sep 09 1999 bs@suse.de -- fixed call of Check at the end of %%install section -* Mon Jul 19 1999 ma@suse.de -- again rebuilddb.patch -* Wed Jul 14 1999 ro@suse.de -- update to 3.0.3 -* Mon Jun 28 1999 ro@suse.de -- changed macros.in for libc5 : no "h" parameter for chown,chmod -* Fri Jun 25 1999 ro@suse.de -- update to rpm-3.0.2 -- added librpmbuild.a to filelist -- added patch not to generate dependency for libNoVersion -- rebuilddb.patch removed (incorporated in source) -* Thu Jun 17 1999 ma@suse.de -- fixed bug when --rebuilddb and --root where used - at the same time. -* Wed May 26 1999 ro@suse.de -- update to 3.0.1 -* Mon Apr 26 1999 werner@suse.de -- Speed up find-requires for linux -* Mon Apr 26 1999 ro@suse.de -- update to 3.0 (noreplace fix has been incorporated) -* Mon Apr 12 1999 ro@suse.de -- update to 2.93 -* Fri Mar 19 1999 ro@suse.de -- update to 2.92 -* Thu Mar 18 1999 ro@suse.de -- respect movement of libz to usr/lib -* Sun Feb 28 1999 ro@suse.de -- update to rpm-src from 99/02/25 -* Sat Feb 27 1999 ro@suse.de -- install both dirs RPM/i386 and RPM/alpha (since buildarch doesn't - seem to be defined now ?) -* Tue Feb 23 1999 ro@suse.de -- adapted macros file to SuSE -- fixed segfault when not using BuildRoot -* Tue Feb 23 1999 ro@suse.de -- modified diff-style -- use additional parameter "-h" on chown after unpacking in build -* Mon Feb 22 1999 ro@suse.de -- update to 2.91 -- ported ma's fixes -* Wed Nov 25 1998 ma@suse.de -- new version 2.5.5 -- fixed in 2.5.5: find-requires/provides bug -- fixed in 2.5.5: rebuilddb -* Wed Nov 18 1998 ma@suse.de -- link rpm.dyn dynamic against libc only -* Mon Nov 16 1998 ma@suse.de -- shared binary (/usr/lib/rpm/rpm.dyn) added -* Tue Nov 10 1998 ro@suse.de -- fixed find-requires (linux.req) -* Mon Nov 09 1998 ro@suse.de -- added %%post: do rpm --initdb if triggerindex.rpm doesn't exist -- do chown root.root for RPM-HOWTO -* Thu Nov 05 1998 ma@suse.de -- new version 2.5.4 -- fix for rebuilddb -- fix for %%config(noreplace) -- RPM-Changes html document that describes the important changes - in RPM since what is documented in Maximum RPM. -* Tue Nov 03 1998 ro@suse.de -- disabled glibc-patch for build in glibc-2.0 -* Sun Sep 20 1998 ro@suse.de -- use libdb185.a for rpm in glibc system -* Thu Sep 03 1998 ma@suse.de -- glibc patches -* Thu Feb 05 1998 ro@suse.de -- update to 2.4.12 -* Tue Dec 09 1997 bs@suse.de -- skip *.SuSE-dynamic in find-requires -* Wed Nov 12 1997 ma@suse.de -- new version 2.4.10 -* Sat Nov 08 1997 ma@suse.de -- patch: rpmdbFindByFile() didn't work for "/". Thus "/" wasn't - handled correctly in querries and upon updates ("rmdir /"). -* Mon Oct 27 1997 ma@suse.de -- new version 2.4.8 -- spec file for autobuild provided - - dirs below /usr/src/packages are installed mode 1777 -- obsolete: patch to allow installing rpm v1 packages (from Aug 7 1997) - Seems to be fixed in 2.4.8 -- patch: always 'chdir /' before executing scripts. -- patch: remove empty dirs when installing a symlink -- patch: ignore errors when installing a symlink and called from YaST -- de.po update -* Thu Aug 07 1997 ma@suse.de -- duplicate '--nodeps' entry in rpm manpage deleted. -- quick patch to allow installing rpm v1 packages. -- workaround to skip installing a symlink (Jul 15 1997) - is disabeled, unless environment variable RPM_IgnoreFailedSymlinks - is set. -* Tue Jul 15 1997 ro@suse.de -- added workaround to skip installing a symlink when - impossible to remove an existing directory -* Thu Jun 26 1997 ma@suse.de -- introducing rpm, version 2.4.1 -- documentation (ascii,html) in usr/doc/packages/rpm From afde44f6bff7facb22b94a95dc16ced24093f5737aab5b93b70646cd3fd1ca1c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 23 Jul 2009 13:27:47 +0000 Subject: [PATCH 080/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=81 --- buildcounter.diff | 112 +++++++++++++++++ debugsubpkg.diff | 313 ++++++++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 11 ++ rpm.spec | 10 +- 5 files changed, 444 insertions(+), 4 deletions(-) create mode 100644 buildcounter.diff create mode 100644 debugsubpkg.diff diff --git a/buildcounter.diff b/buildcounter.diff new file mode 100644 index 0000000..2f590fc --- /dev/null +++ b/buildcounter.diff @@ -0,0 +1,112 @@ +Index: rpm-4.4.2.3/lib/rpmlib.h +=================================================================== +--- rpm-4.4.2.3.orig/lib/rpmlib.h 2009-07-20 10:50:09.000000000 +0200 ++++ rpm-4.4.2.3/lib/rpmlib.h 2009-07-20 10:57:40.000000000 +0200 +@@ -461,6 +461,7 @@ typedef enum rpmTag_e { + RPMTAG_SCRIPTMETRICS = 1175, /*!< i scriptlet execution times */ + RPMTAG_BUILDCPUCLOCK = 1176, /*!< i */ + ++ RPMTAG_SUSEBUILDCNT = 1177, /* s */ + /*@-enummemuse@*/ + RPMTAG_FIRSTFREE_TAG /*!< internal */ + /*@=enummemuse@*/ +Index: rpm-4.4.2.3/build/parsePreamble.c +=================================================================== +--- rpm-4.4.2.3.orig/build/parsePreamble.c 2009-07-20 10:50:10.000000000 +0200 ++++ rpm-4.4.2.3/build/parsePreamble.c 2009-07-20 11:17:14.000000000 +0200 +@@ -32,6 +32,7 @@ static rpmTag copyTagsDuringParse[] = { + RPMTAG_RHNPLATFORM, + RPMTAG_DISTTAG, + RPMTAG_CVSID, ++ RPMTAG_SUSEBUILDCNT, + 0 + }; + +@@ -335,6 +336,7 @@ static struct optionalTag { + { RPMTAG_DISTRIBUTION, "%{distribution}" }, + { RPMTAG_DISTURL, "%{disturl}" }, + { RPMTAG_DISTTAG, "%{disttag}" }, ++ { RPMTAG_SUSEBUILDCNT, "%{susebuildcnt}" }, + { -1, NULL } + }; + +@@ -522,6 +524,7 @@ static int handlePreambleTag(Spec spec, + case RPMTAG_RHNPLATFORM: + case RPMTAG_DISTTAG: + case RPMTAG_CVSID: ++ case RPMTAG_SUSEBUILDCNT: + SINGLE_TOKEN_ONLY; + /* These macros are for backward compatibility */ + if (tag == RPMTAG_VERSION) { +@@ -759,6 +762,7 @@ static struct PreambleRec_s preambleList + {RPMTAG_NAME, 0, 0, 0, "name"}, + {RPMTAG_VERSION, 0, 0, 0, "version"}, + {RPMTAG_RELEASE, 0, 0, 0, "release"}, ++ {RPMTAG_SUSEBUILDCNT, 0, 0, 0, "susebuildcnt"}, + {RPMTAG_EPOCH, 0, 0, 0, "epoch"}, + {RPMTAG_EPOCH, 0, 0, 1, "serial"}, + {RPMTAG_SUMMARY, 0, 1, 0, "summary"}, +Index: rpm-4.4.2.3/lib/psm.c +=================================================================== +--- rpm-4.4.2.3.orig/lib/psm.c 2009-07-20 10:50:09.000000000 +0200 ++++ rpm-4.4.2.3/lib/psm.c 2009-07-20 11:04:46.000000000 +0200 +@@ -103,6 +103,7 @@ static struct tagMacro { + { "version", RPMTAG_VERSION }, + { "release", RPMTAG_RELEASE }, + { "epoch", RPMTAG_EPOCH }, ++ { "susebuildcnt", RPMTAG_SUSEBUILDCNT }, + { NULL, 0 } + }; + +Index: rpm-4.4.2.3/build/pack.c +=================================================================== +--- rpm-4.4.2.3.orig/build/pack.c 2009-07-20 10:50:09.000000000 +0200 ++++ rpm-4.4.2.3/build/pack.c 2009-07-20 16:36:16.000000000 +0200 +@@ -41,7 +41,7 @@ static inline int genSourceRpmName(Spec + const char *name, *version, *release; + char fileName[BUFSIZ]; + +- (void) headerNVR(spec->packages->header, &name, &version, &release); ++ (void) headerNVR(spec->sourceHeader, &name, &version, &release); + sprintf(fileName, "%s-%s-%s.%ssrc.rpm", name, version, release, + spec->noSource ? "no" : ""); + spec->sourceRpmName = xstrdup(fileName); +@@ -849,6 +849,26 @@ int packageBinaries(Spec spec) + (void) headerAddEntry(pkg->header, RPMTAG_BUILDTIME, + RPM_INT32_TYPE, getBuildTime(), 1); + ++ { ++ int type, count; ++ char *ap = NULL; ++ char *rp = NULL; ++ char *bp = NULL; ++ if ((!headerGetEntry(pkg->header, RPMTAG_ARCH, &type, (void **)&ap, &count) ++ || (type == RPM_STRING_TYPE && count == 1 ++ && strcmp (ap, "noarch") != 0)) ++ && headerGetEntry(pkg->header, RPMTAG_RELEASE, &type, (void **) &rp, &count) ++ && type == RPM_STRING_TYPE && count == 1 ++ && headerGetEntry(pkg->header, RPMTAG_SUSEBUILDCNT, &type, (void **) &bp, &count) ++ && type == RPM_STRING_TYPE && count == 1) ++ { ++ char tmp[1024]; ++ snprintf (tmp, 1024, "%s.%s", rp, bp); ++ headerModifyEntry (pkg->header, RPMTAG_RELEASE, RPM_STRING_TYPE, ++ strdup (tmp), 1); ++ } ++ } ++ + providePackageNVR(pkg->header); + + { const char * optflags = rpmExpand("%{optflags}", NULL); +Index: rpm-4.4.2.3/build/files.c +=================================================================== +--- rpm-4.4.2.3.orig/build/files.c 2009-07-23 11:50:30.000000000 +0200 ++++ rpm-4.4.2.3/build/files.c 2009-07-23 11:51:05.000000000 +0200 +@@ -2608,6 +2608,7 @@ static rpmTag copyTagsForDebug[] = { + RPMTAG_DISTTAG, + RPMTAG_CVSID, + RPMTAG_ARCH, ++ RPMTAG_SUSEBUILDCNT, + 0 + }; + diff --git a/debugsubpkg.diff b/debugsubpkg.diff new file mode 100644 index 0000000..ade70d8 --- /dev/null +++ b/debugsubpkg.diff @@ -0,0 +1,313 @@ +Index: rpm-4.4.2.3/build/files.c +=================================================================== +--- rpm-4.4.2.3.orig/build/files.c 2009-07-22 14:07:58.000000000 +0200 ++++ rpm-4.4.2.3/build/files.c 2009-07-23 11:50:30.000000000 +0200 +@@ -28,6 +28,10 @@ + #define _RPMTE_INTERNAL + #include "rpmte.h" + ++#if HAVE_GELF_H ++#include ++#endif ++ + #include "buildio.h" + + #include "legacy.h" /* XXX domd5, expandFileList, compressFileList */ +@@ -2485,6 +2489,128 @@ exit: + return rc; + } + ++ ++/* Query the build-id from the ELF file NAME and store it in the newly ++ allocated *build_id array of size *build_id_size. Returns -1 on ++ error. */ ++ ++int ++getELFBuildId (const char *name, ++ unsigned char **id, size_t *id_size) ++{ ++ int fd, i; ++ Elf *elf; ++ GElf_Ehdr ehdr; ++ Elf_Data *build_id = NULL; ++ size_t build_id_offset = 0, build_id_size = 0; ++ ++ /* Now query the build-id of the file and add the ++ corresponding links in the .build-id tree. ++ The following code is based on tools/debugedit.c. */ ++ fd = open (name, O_RDONLY); ++ if (fd < 0) ++ return -1; ++ elf = elf_begin (fd, ELF_C_READ_MMAP, NULL); ++ if (elf == NULL) ++ { ++ fprintf (stderr, "cannot open ELF file: %s", ++ elf_errmsg (-1)); ++ close (fd); ++ return -1; ++ } ++ if (elf_kind (elf) != ELF_K_ELF ++ || gelf_getehdr (elf, &ehdr) == NULL ++ || (ehdr.e_type != ET_DYN ++ && ehdr.e_type != ET_EXEC ++ && ehdr.e_type != ET_REL)) ++ { ++ elf_end (elf); ++ close (fd); ++ return -1; ++ } ++ for (i = 0; i < ehdr.e_shnum; ++i) ++ { ++ Elf_Scn *s = elf_getscn (elf, i); ++ GElf_Shdr shdr; ++ Elf_Data *data; ++ Elf32_Nhdr nh; ++ Elf_Data dst = ++ { ++ .d_version = EV_CURRENT, .d_type = ELF_T_NHDR, ++ .d_buf = &nh, .d_size = sizeof nh ++ }; ++ Elf_Data src = dst; ++ ++ gelf_getshdr (s, &shdr); ++ if (shdr.sh_type != SHT_NOTE ++ || !(shdr.sh_flags & SHF_ALLOC)) ++ continue; ++ ++ /* Look for a build-ID note here. */ ++ data = elf_rawdata (s, NULL); ++ src.d_buf = data->d_buf; ++ assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr)); ++ while (data->d_buf + data->d_size - src.d_buf > (int) sizeof nh ++ && elf32_xlatetom (&dst, &src, ehdr.e_ident[EI_DATA])) ++ { ++ Elf32_Word len = sizeof nh + nh.n_namesz; ++ len = (len + 3) & ~3; ++ ++ if (nh.n_namesz == sizeof "GNU" && nh.n_type == 3 ++ && !memcmp (src.d_buf + sizeof nh, "GNU", sizeof "GNU")) ++ { ++ build_id = data; ++ build_id_offset = src.d_buf + len - data->d_buf; ++ build_id_size = nh.n_descsz; ++ break; ++ } ++ ++ len += nh.n_descsz; ++ len = (len + 3) & ~3; ++ src.d_buf += len; ++ } ++ ++ if (build_id != NULL) ++ break; ++ } ++ ++ if (build_id == NULL) ++ return -1; ++ ++ *id = malloc (build_id_size); ++ *id_size = build_id_size; ++ memcpy (*id, build_id->d_buf + build_id_offset, build_id_size); ++ ++ elf_end (elf); ++ close (fd); ++ ++ return 0; ++} ++ ++ ++static rpmTag copyTagsForDebug[] = { ++ RPMTAG_EPOCH, ++ RPMTAG_VERSION, ++ RPMTAG_RELEASE, ++ RPMTAG_LICENSE, ++ RPMTAG_PACKAGER, ++ RPMTAG_DISTRIBUTION, ++ RPMTAG_DISTURL, ++ RPMTAG_VENDOR, ++ RPMTAG_ICON, ++ RPMTAG_URL, ++ RPMTAG_CHANGELOGTIME, ++ RPMTAG_CHANGELOGNAME, ++ RPMTAG_CHANGELOGTEXT, ++ RPMTAG_PREFIXES, ++ RPMTAG_RHNPLATFORM, ++ RPMTAG_OS, ++ RPMTAG_DISTTAG, ++ RPMTAG_CVSID, ++ RPMTAG_ARCH, ++ 0 ++}; ++ + /*@-incondefs@*/ + int processBinaryFiles(Spec spec, int installSpecialDoc, int test) + /*@globals check_fileList @*/ +@@ -2498,6 +2624,8 @@ int processBinaryFiles(Spec spec, int in + for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { + const char *n, *v, *r; + int rc; ++ int type, count; ++ char *ap; + + if (pkg->fileList == NULL) + continue; +@@ -2508,6 +2636,106 @@ int processBinaryFiles(Spec spec, int in + if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test))) + res = rc; + ++ /* BEGIN DEBUGPKG */ ++#if HAVE_GELF_H && HAVE_LIBELF ++ elf_version(EV_CURRENT); ++ ++ /* Now we have the file list of pkg in pkg->cpioList. Iterate over ++ them and build a file list containing debug information for them. */ ++ if (headerGetEntry (pkg->header, RPMTAG_ARCH, &type, (void **)&ap, &count) ++ && type == RPM_STRING_TYPE && count == 1 ++ && strcmp (ap, "noarch") != 0 ++ && strcmp (ap, "src") != 0) ++ { ++ Package dbg; ++ rpmfi fi = pkg->cpioList; ++ char tmp[1024]; ++ const char *name; ++ StringBuf files = NULL; ++ ++ /* Check if the current package has files with debug info ++ and record them. */ ++ fi = rpmfiInit (fi, 0); ++ while (rpmfiNext (fi) >= 0) ++ { ++ const char *base; ++ int i; ++ unsigned char *build_id; ++ size_t build_id_size = 0; ++ struct stat sbuf; ++ ++ name = rpmfiFN (fi); ++ /* Skip leading buildroot. */ ++ base = name + strlen (spec->buildRootURL); ++ /* Pre-pend %buildroot/usr/lib/debug and append .debug. */ ++ snprintf (tmp, 1024, "%s/usr/lib/debug%s.debug", ++ spec->buildRootURL, base); ++ /* If that file exists we have debug information for it. */ ++ if (access (tmp, F_OK) != 0) ++ continue; ++ ++ /* Append the file list preamble. */ ++ if (!files) ++ { ++ files = newStringBuf(); ++ appendStringBuf(files, "%defattr(-,root,root)\n"); ++ appendStringBuf(files, "%dir /usr/lib/debug\n"); ++ appendStringBuf(files, "%dir /usr/lib/debug/.build-id\n"); ++ } ++ /* Add the files main debug-info file. */ ++ snprintf (tmp, 1024, "/usr/lib/debug/%s.debug\n", base); ++ appendStringBuf(files, tmp); ++ ++ /* Do not bother to check build-ids for symbolic links. ++ We'll handle them for the link target. */ ++ if (lstat (name, &sbuf) == -1 ++ || S_ISLNK (sbuf.st_mode)) ++ continue; ++ ++ /* Try to gather the build-id from the binary. */ ++ if (getELFBuildId (name, &build_id, &build_id_size) == -1) ++ continue; ++ ++ /* From the build-id construct the two links pointing back ++ to the debug information file and the binary. */ ++ snprintf (tmp, 1024, "/usr/lib/debug/.build-id/%02x/", ++ build_id[0]); ++ for (i = 1; i < build_id_size; ++i) ++ sprintf (tmp + strlen (tmp), "%02x", build_id[i]); ++ appendStringBuf(files, tmp); ++ appendStringBuf(files, "\n"); ++ appendStringBuf(files, tmp); ++ appendStringBuf(files, ".debug\n"); ++ ++ free (build_id); ++ } ++ ++ /* If there are debuginfo files for this package add a ++ new debuginfo package. */ ++ if (files) ++ { ++ dbg = newPackage (spec); ++ headerNVR (pkg->header, &name, NULL, NULL); ++ /* Set name, summary and group. */ ++ snprintf (tmp, 1024, "%s-debuginfo", name); ++ headerAddEntry (dbg->header, RPMTAG_NAME, RPM_STRING_TYPE, tmp, 1); ++ snprintf (tmp, 1024, "Debug information for package %s", name); ++ headerAddEntry (dbg->header, RPMTAG_SUMMARY, RPM_STRING_TYPE, ++ tmp, 1); ++ headerAddEntry (dbg->header, RPMTAG_GROUP, RPM_STRING_TYPE, ++ "Development/Debug", 1); ++ /* Inherit other tags from parent. */ ++ headerCopyTags (pkg->header, dbg->header, ++ (int_32 *)copyTagsForDebug); ++ ++ /* Build up the files list. */ ++ dbg->fileList = files; ++ } ++ } ++ ++ /* END DEBUGPKG */ ++#endif ++ + if ((rc = rpmfcGenerateDepends(spec, pkg))) + res = rc; + } +Index: rpm-4.4.2.3/macros.in +=================================================================== +--- rpm-4.4.2.3.orig/macros.in 2009-07-22 14:07:58.000000000 +0200 ++++ rpm-4.4.2.3/macros.in 2009-07-22 14:08:05.000000000 +0200 +@@ -173,19 +173,6 @@ + # Template for debug information sub-package. + %debug_package \ + %global __debug_package 1\ +-%package debuginfo\ +-Summary: Debug information for package %{name}\ +-Group: Development/Debug\ +-AutoReq: 0\ +-AutoProv: 1\ +-#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ +-%description debuginfo\ +-This package provides debug information for package %{name}.\ +-Debug information is useful when developing applications that use this\ +-package or when debugging this package.\ +-%files debuginfo -f debugfiles.list\ +-%defattr(-,root,root)\ +-\ + %package debugsource\ + Summary: Debug sources for package %{name}\ + Group: Development/Debug\ +Index: rpm-4.4.2.3/scripts/find-debuginfo.sh +=================================================================== +--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-22 14:07:58.000000000 +0200 ++++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-23 11:24:47.000000000 +0200 +@@ -274,19 +274,11 @@ while read nlinks inum f; do + fi + done || exit + +-# For each symlink whose target has a .debug file, +-# make a .debug symlink to that file. +-find $RPM_BUILD_ROOT ! -path "${debugdir}/*" -type l -print | +-while read f +-do +- t=$(readlink -m "$f").debug +- f=${f#$RPM_BUILD_ROOT} +- t=${t#$RPM_BUILD_ROOT} +- if [ -f "$debugdir$t" ]; then +- echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug" +- debug_link "/usr/lib/debug$t" "${f}.debug" +- fi +-done ++# We used to make a .debug symlink for each symlink whose target ++# has a .debug file to that file. This is not necessary because ++# the debuglink section contains only the destination of those links. ++# Creating those links anyway results in debuginfo packages for ++# devel packages just because of the .so symlinks in them. + + if [ -s "$SOURCEFILE" ]; then + mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug" diff --git a/rpm-python.spec b/rpm-python.spec index bb86481..a60a0f0 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 42 +Release: 43 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 24e3454..c5a84fe 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Jul 23 12:48:50 CEST 2009 - rguenther@suse.de + +- add support for SUSEBuildCnt tag + +------------------------------------------------------------------- +Thu Jul 23 11:41:54 CEST 2009 - rguenther@suse.de + +- generate debuginfo packages for each sub-package with corresponding + debug information + ------------------------------------------------------------------- Mon Jul 13 12:50:30 CEST 2009 - coolo@novell.com diff --git a/rpm.spec b/rpm.spec index 8ec468c..644ce4e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 42 +Release: 43 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -101,6 +101,8 @@ Patch67: modalias-encode.diff Patch68: disttag-macro.diff Patch69: buildidprov.diff Patch70: xz.diff +Patch71: debugsubpkg.diff +Patch72: buildcounter.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -186,6 +188,8 @@ rm -f rpmdb/db.h %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 +%patch71 -p1 +%patch72 -p1 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/firmware.prov @@ -337,7 +341,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 490 +Release: 491 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -365,7 +369,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 490 +Release: 491 Requires: popt = 1.7 Requires: glibc-devel # bug437293 From 98cbe2ea23dc4983802483d7f12bf8af89632ef5afe5510ef72fda321a89b110 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 24 Jul 2009 10:07:18 +0000 Subject: [PATCH 081/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=82 --- buildcounter.diff | 112 ---------------------------------------------- debugsubpkg.diff | 28 +++++++----- rpm-python.spec | 2 +- rpm.changes | 6 +++ rpm.spec | 8 ++-- 5 files changed, 28 insertions(+), 128 deletions(-) delete mode 100644 buildcounter.diff diff --git a/buildcounter.diff b/buildcounter.diff deleted file mode 100644 index 2f590fc..0000000 --- a/buildcounter.diff +++ /dev/null @@ -1,112 +0,0 @@ -Index: rpm-4.4.2.3/lib/rpmlib.h -=================================================================== ---- rpm-4.4.2.3.orig/lib/rpmlib.h 2009-07-20 10:50:09.000000000 +0200 -+++ rpm-4.4.2.3/lib/rpmlib.h 2009-07-20 10:57:40.000000000 +0200 -@@ -461,6 +461,7 @@ typedef enum rpmTag_e { - RPMTAG_SCRIPTMETRICS = 1175, /*!< i scriptlet execution times */ - RPMTAG_BUILDCPUCLOCK = 1176, /*!< i */ - -+ RPMTAG_SUSEBUILDCNT = 1177, /* s */ - /*@-enummemuse@*/ - RPMTAG_FIRSTFREE_TAG /*!< internal */ - /*@=enummemuse@*/ -Index: rpm-4.4.2.3/build/parsePreamble.c -=================================================================== ---- rpm-4.4.2.3.orig/build/parsePreamble.c 2009-07-20 10:50:10.000000000 +0200 -+++ rpm-4.4.2.3/build/parsePreamble.c 2009-07-20 11:17:14.000000000 +0200 -@@ -32,6 +32,7 @@ static rpmTag copyTagsDuringParse[] = { - RPMTAG_RHNPLATFORM, - RPMTAG_DISTTAG, - RPMTAG_CVSID, -+ RPMTAG_SUSEBUILDCNT, - 0 - }; - -@@ -335,6 +336,7 @@ static struct optionalTag { - { RPMTAG_DISTRIBUTION, "%{distribution}" }, - { RPMTAG_DISTURL, "%{disturl}" }, - { RPMTAG_DISTTAG, "%{disttag}" }, -+ { RPMTAG_SUSEBUILDCNT, "%{susebuildcnt}" }, - { -1, NULL } - }; - -@@ -522,6 +524,7 @@ static int handlePreambleTag(Spec spec, - case RPMTAG_RHNPLATFORM: - case RPMTAG_DISTTAG: - case RPMTAG_CVSID: -+ case RPMTAG_SUSEBUILDCNT: - SINGLE_TOKEN_ONLY; - /* These macros are for backward compatibility */ - if (tag == RPMTAG_VERSION) { -@@ -759,6 +762,7 @@ static struct PreambleRec_s preambleList - {RPMTAG_NAME, 0, 0, 0, "name"}, - {RPMTAG_VERSION, 0, 0, 0, "version"}, - {RPMTAG_RELEASE, 0, 0, 0, "release"}, -+ {RPMTAG_SUSEBUILDCNT, 0, 0, 0, "susebuildcnt"}, - {RPMTAG_EPOCH, 0, 0, 0, "epoch"}, - {RPMTAG_EPOCH, 0, 0, 1, "serial"}, - {RPMTAG_SUMMARY, 0, 1, 0, "summary"}, -Index: rpm-4.4.2.3/lib/psm.c -=================================================================== ---- rpm-4.4.2.3.orig/lib/psm.c 2009-07-20 10:50:09.000000000 +0200 -+++ rpm-4.4.2.3/lib/psm.c 2009-07-20 11:04:46.000000000 +0200 -@@ -103,6 +103,7 @@ static struct tagMacro { - { "version", RPMTAG_VERSION }, - { "release", RPMTAG_RELEASE }, - { "epoch", RPMTAG_EPOCH }, -+ { "susebuildcnt", RPMTAG_SUSEBUILDCNT }, - { NULL, 0 } - }; - -Index: rpm-4.4.2.3/build/pack.c -=================================================================== ---- rpm-4.4.2.3.orig/build/pack.c 2009-07-20 10:50:09.000000000 +0200 -+++ rpm-4.4.2.3/build/pack.c 2009-07-20 16:36:16.000000000 +0200 -@@ -41,7 +41,7 @@ static inline int genSourceRpmName(Spec - const char *name, *version, *release; - char fileName[BUFSIZ]; - -- (void) headerNVR(spec->packages->header, &name, &version, &release); -+ (void) headerNVR(spec->sourceHeader, &name, &version, &release); - sprintf(fileName, "%s-%s-%s.%ssrc.rpm", name, version, release, - spec->noSource ? "no" : ""); - spec->sourceRpmName = xstrdup(fileName); -@@ -849,6 +849,26 @@ int packageBinaries(Spec spec) - (void) headerAddEntry(pkg->header, RPMTAG_BUILDTIME, - RPM_INT32_TYPE, getBuildTime(), 1); - -+ { -+ int type, count; -+ char *ap = NULL; -+ char *rp = NULL; -+ char *bp = NULL; -+ if ((!headerGetEntry(pkg->header, RPMTAG_ARCH, &type, (void **)&ap, &count) -+ || (type == RPM_STRING_TYPE && count == 1 -+ && strcmp (ap, "noarch") != 0)) -+ && headerGetEntry(pkg->header, RPMTAG_RELEASE, &type, (void **) &rp, &count) -+ && type == RPM_STRING_TYPE && count == 1 -+ && headerGetEntry(pkg->header, RPMTAG_SUSEBUILDCNT, &type, (void **) &bp, &count) -+ && type == RPM_STRING_TYPE && count == 1) -+ { -+ char tmp[1024]; -+ snprintf (tmp, 1024, "%s.%s", rp, bp); -+ headerModifyEntry (pkg->header, RPMTAG_RELEASE, RPM_STRING_TYPE, -+ strdup (tmp), 1); -+ } -+ } -+ - providePackageNVR(pkg->header); - - { const char * optflags = rpmExpand("%{optflags}", NULL); -Index: rpm-4.4.2.3/build/files.c -=================================================================== ---- rpm-4.4.2.3.orig/build/files.c 2009-07-23 11:50:30.000000000 +0200 -+++ rpm-4.4.2.3/build/files.c 2009-07-23 11:51:05.000000000 +0200 -@@ -2608,6 +2608,7 @@ static rpmTag copyTagsForDebug[] = { - RPMTAG_DISTTAG, - RPMTAG_CVSID, - RPMTAG_ARCH, -+ RPMTAG_SUSEBUILDCNT, - 0 - }; - diff --git a/debugsubpkg.diff b/debugsubpkg.diff index ade70d8..dfa4cc5 100644 --- a/debugsubpkg.diff +++ b/debugsubpkg.diff @@ -1,7 +1,7 @@ Index: rpm-4.4.2.3/build/files.c =================================================================== ---- rpm-4.4.2.3.orig/build/files.c 2009-07-22 14:07:58.000000000 +0200 -+++ rpm-4.4.2.3/build/files.c 2009-07-23 11:50:30.000000000 +0200 +--- rpm-4.4.2.3.orig/build/files.c 2009-07-24 11:38:22.000000000 +0200 ++++ rpm-4.4.2.3/build/files.c 2009-07-24 11:38:30.000000000 +0200 @@ -28,6 +28,10 @@ #define _RPMTE_INTERNAL #include "rpmte.h" @@ -142,7 +142,15 @@ Index: rpm-4.4.2.3/build/files.c /*@-incondefs@*/ int processBinaryFiles(Spec spec, int installSpecialDoc, int test) /*@globals check_fileList @*/ -@@ -2498,6 +2624,8 @@ int processBinaryFiles(Spec spec, int in +@@ -2492,12 +2618,16 @@ int processBinaryFiles(Spec spec, int in + { + Package pkg; + int res = 0; ++ char *buildrooturl; + + check_fileList = newStringBuf(); ++ buildrooturl = rpmGenPath(spec->rootURL, spec->buildRootURL, NULL); + for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { const char *n, *v, *r; int rc; @@ -151,7 +159,7 @@ Index: rpm-4.4.2.3/build/files.c if (pkg->fileList == NULL) continue; -@@ -2508,6 +2636,106 @@ int processBinaryFiles(Spec spec, int in +@@ -2508,6 +2638,106 @@ int processBinaryFiles(Spec spec, int in if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test))) res = rc; @@ -185,10 +193,10 @@ Index: rpm-4.4.2.3/build/files.c + + name = rpmfiFN (fi); + /* Skip leading buildroot. */ -+ base = name + strlen (spec->buildRootURL); ++ base = name + strlen (buildrooturl); + /* Pre-pend %buildroot/usr/lib/debug and append .debug. */ + snprintf (tmp, 1024, "%s/usr/lib/debug%s.debug", -+ spec->buildRootURL, base); ++ buildrooturl, base); + /* If that file exists we have debug information for it. */ + if (access (tmp, F_OK) != 0) + continue; @@ -260,8 +268,8 @@ Index: rpm-4.4.2.3/build/files.c } Index: rpm-4.4.2.3/macros.in =================================================================== ---- rpm-4.4.2.3.orig/macros.in 2009-07-22 14:07:58.000000000 +0200 -+++ rpm-4.4.2.3/macros.in 2009-07-22 14:08:05.000000000 +0200 +--- rpm-4.4.2.3.orig/macros.in 2009-07-24 11:38:22.000000000 +0200 ++++ rpm-4.4.2.3/macros.in 2009-07-24 11:38:22.000000000 +0200 @@ -173,19 +173,6 @@ # Template for debug information sub-package. %debug_package \ @@ -284,8 +292,8 @@ Index: rpm-4.4.2.3/macros.in Group: Development/Debug\ Index: rpm-4.4.2.3/scripts/find-debuginfo.sh =================================================================== ---- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-22 14:07:58.000000000 +0200 -+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-23 11:24:47.000000000 +0200 +--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-24 11:38:22.000000000 +0200 ++++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-24 11:38:22.000000000 +0200 @@ -274,19 +274,11 @@ while read nlinks inum f; do fi done || exit diff --git a/rpm-python.spec b/rpm-python.spec index a60a0f0..90cf644 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 43 +Release: 44 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index c5a84fe..f3a5499 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 24 11:39:04 CEST 2009 - rguenther@suse.de + +- revert SUSEBuildCnt patch +- fix debuginfo package generation for build root URLs with macros + ------------------------------------------------------------------- Thu Jul 23 12:48:50 CEST 2009 - rguenther@suse.de diff --git a/rpm.spec b/rpm.spec index 644ce4e..17cfeea 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 43 +Release: 44 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -102,7 +102,6 @@ Patch68: disttag-macro.diff Patch69: buildidprov.diff Patch70: xz.diff Patch71: debugsubpkg.diff -Patch72: buildcounter.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -189,7 +188,6 @@ rm -f rpmdb/db.h %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 %patch71 -p1 -%patch72 -p1 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/firmware.prov @@ -341,7 +339,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 491 +Release: 492 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -369,7 +367,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 491 +Release: 492 Requires: popt = 1.7 Requires: glibc-devel # bug437293 From 77a19250592d2411bee49379d04adbd22df7b5845a6ee7ca096ba9b8aeb5719e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 29 Jul 2009 15:17:28 +0000 Subject: [PATCH 082/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=83 --- debuglink.diff | 14 ++++++++++++++ debugsubpkg.diff | 33 ++++++++++++++++++++++++--------- elfflagreqprov.diff | 12 ++++++++++++ rpm-python.spec | 2 +- rpm.changes | 17 +++++++++++++++++ rpm.spec | 10 +++++++--- 6 files changed, 75 insertions(+), 13 deletions(-) create mode 100644 debuglink.diff create mode 100644 elfflagreqprov.diff diff --git a/debuglink.diff b/debuglink.diff new file mode 100644 index 0000000..7b5ee79 --- /dev/null +++ b/debuglink.diff @@ -0,0 +1,14 @@ +Index: rpm-4.4.2.3/scripts/find-debuginfo.sh +=================================================================== +--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-27 12:06:41.000000000 +0200 ++++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-27 12:08:05.000000000 +0200 +@@ -185,7 +185,8 @@ make_id_link() + get_debugfn() + { + dn=$(dirname "${1#$RPM_BUILD_ROOT}") +- bn=$(basename "$1" .debug).debug ++# Do not strip existing .debug suffixes ++ bn=$(basename "$1").debug + + debugdn=${debugdir}${dn} + debugfn=${debugdn}/${bn} diff --git a/debugsubpkg.diff b/debugsubpkg.diff index dfa4cc5..bddebd4 100644 --- a/debugsubpkg.diff +++ b/debugsubpkg.diff @@ -1,7 +1,7 @@ Index: rpm-4.4.2.3/build/files.c =================================================================== ---- rpm-4.4.2.3.orig/build/files.c 2009-07-24 11:38:22.000000000 +0200 -+++ rpm-4.4.2.3/build/files.c 2009-07-24 11:38:30.000000000 +0200 +--- rpm-4.4.2.3.orig/build/files.c 2009-07-27 17:59:07.000000000 +0200 ++++ rpm-4.4.2.3/build/files.c 2009-07-27 18:02:00.000000000 +0200 @@ -28,6 +28,10 @@ #define _RPMTE_INTERNAL #include "rpmte.h" @@ -159,7 +159,7 @@ Index: rpm-4.4.2.3/build/files.c if (pkg->fileList == NULL) continue; -@@ -2508,6 +2638,106 @@ int processBinaryFiles(Spec spec, int in +@@ -2508,6 +2638,116 @@ int processBinaryFiles(Spec spec, int in if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test))) res = rc; @@ -179,6 +179,7 @@ Index: rpm-4.4.2.3/build/files.c + char tmp[1024]; + const char *name; + StringBuf files = NULL; ++ int seen_build_id = 0; + + /* Check if the current package has files with debug info + and record them. */ @@ -207,7 +208,6 @@ Index: rpm-4.4.2.3/build/files.c + files = newStringBuf(); + appendStringBuf(files, "%defattr(-,root,root)\n"); + appendStringBuf(files, "%dir /usr/lib/debug\n"); -+ appendStringBuf(files, "%dir /usr/lib/debug/.build-id\n"); + } + /* Add the files main debug-info file. */ + snprintf (tmp, 1024, "/usr/lib/debug/%s.debug\n", base); @@ -223,6 +223,11 @@ Index: rpm-4.4.2.3/build/files.c + if (getELFBuildId (name, &build_id, &build_id_size) == -1) + continue; + ++ /* If we see build-id links for the first time add the ++ directory. */ ++ if (!seen_build_id) ++ appendStringBuf(files, "%dir /usr/lib/debug/.build-id\n"); ++ + /* From the build-id construct the two links pointing back + to the debug information file and the binary. */ + snprintf (tmp, 1024, "/usr/lib/debug/.build-id/%02x/", @@ -249,6 +254,11 @@ Index: rpm-4.4.2.3/build/files.c + snprintf (tmp, 1024, "Debug information for package %s", name); + headerAddEntry (dbg->header, RPMTAG_SUMMARY, RPM_STRING_TYPE, + tmp, 1); ++ snprintf (tmp, 1024, "This package provides debug information for package %s.\n" ++ "Debug information is useful when developing applications that use this\n" ++ "package or when debugging this package.", name); ++ headerAddEntry (dbg->header, RPMTAG_DESCRIPTION, RPM_STRING_TYPE, ++ tmp, 1); + headerAddEntry (dbg->header, RPMTAG_GROUP, RPM_STRING_TYPE, + "Development/Debug", 1); + /* Inherit other tags from parent. */ @@ -268,9 +278,9 @@ Index: rpm-4.4.2.3/build/files.c } Index: rpm-4.4.2.3/macros.in =================================================================== ---- rpm-4.4.2.3.orig/macros.in 2009-07-24 11:38:22.000000000 +0200 -+++ rpm-4.4.2.3/macros.in 2009-07-24 11:38:22.000000000 +0200 -@@ -173,19 +173,6 @@ +--- rpm-4.4.2.3.orig/macros.in 2009-07-27 17:59:07.000000000 +0200 ++++ rpm-4.4.2.3/macros.in 2009-07-27 17:59:07.000000000 +0200 +@@ -173,24 +173,10 @@ # Template for debug information sub-package. %debug_package \ %global __debug_package 1\ @@ -290,10 +300,15 @@ Index: rpm-4.4.2.3/macros.in %package debugsource\ Summary: Debug sources for package %{name}\ Group: Development/Debug\ + AutoReqProv: 0\ +-Requires: %{name}-debuginfo = %{version}-%{release}\ + %description debugsource\ + This package provides debug sources for package %{name}.\ + Debug sources are useful when developing applications that use this\ Index: rpm-4.4.2.3/scripts/find-debuginfo.sh =================================================================== ---- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-24 11:38:22.000000000 +0200 -+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-24 11:38:22.000000000 +0200 +--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-27 17:59:06.000000000 +0200 ++++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-27 17:59:10.000000000 +0200 @@ -274,19 +274,11 @@ while read nlinks inum f; do fi done || exit diff --git a/elfflagreqprov.diff b/elfflagreqprov.diff new file mode 100644 index 0000000..b815a78 --- /dev/null +++ b/elfflagreqprov.diff @@ -0,0 +1,12 @@ +Index: rpm-4.4.2.3/autodeps/linux.req +=================================================================== +--- rpm-4.4.2.3.orig/autodeps/linux.req 2009-07-24 11:38:21.000000000 +0200 ++++ rpm-4.4.2.3/autodeps/linux.req 2009-07-27 15:45:17.000000000 +0200 +@@ -110,6 +110,7 @@ for f in "${liblist[@]}" "${exelist[@]}" + } + } + /^Version References:$/ { START=2; } ++ /^private flags/ { START=3; } + (START==2) && /required from/ { + sub(/:/, "", $3); + LIBNAME=$3; diff --git a/rpm-python.spec b/rpm-python.spec index 90cf644..964a2e9 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -24,7 +24,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 -Release: 44 +Release: 45 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index f3a5499..017efe1 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Mon Jul 27 18:02:37 CEST 2009 - rguenther@suse.de + +- add description to debuginfo packages + +------------------------------------------------------------------- +Mon Jul 27 15:46:36 CEST 2009 - rguenther@suse.de + +- do not strip .debug suffix during debug-link generation +- do not add requires based on private ELF flags [bnc#524681] +- remove requires on debuginfo from debugsource package + +------------------------------------------------------------------- +Sat Jul 25 12:04:11 CEST 2009 - rguenther@suse.de + +- fix debuginfo package generation for binaries without build-id + ------------------------------------------------------------------- Fri Jul 24 11:39:04 CEST 2009 - rguenther@suse.de diff --git a/rpm.spec b/rpm.spec index 17cfeea..09cecd5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.4.2.3 -Release: 44 +Release: 45 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -102,6 +102,8 @@ Patch68: disttag-macro.diff Patch69: buildidprov.diff Patch70: xz.diff Patch71: debugsubpkg.diff +Patch72: debuglink.diff +Patch73: elfflagreqprov.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -188,6 +190,8 @@ rm -f rpmdb/db.h %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 %patch71 -p1 +%patch72 -p1 +%patch73 -p1 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/firmware.prov @@ -339,7 +343,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 492 +Release: 493 # bug437293 %ifarch ppc64 Obsoletes: popt-64bit @@ -367,7 +371,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 492 +Release: 493 Requires: popt = 1.7 Requires: glibc-devel # bug437293 From a76d6c30a2acb7468976483cf294744fa60a1a58ba1577006b733bbaa98763c4 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 28 Aug 2009 13:54:03 +0000 Subject: [PATCH 083/137] Accepting request 18841 from Base:System Copy from Base:System/rpm based on submit request 18841 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/18841 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=84 --- autodeps.diff | 5 +- baselibs.conf | 4 - brp.diff | 38 +- build.diff | 443 +------- buildidprov.diff | 2 +- chownwarn.diff | 12 +- convertdb1static.diff | 400 ++++++- dbfsync.diff | 30 +- dbprivate.diff | 12 +- dbrointerruptable.diff | 22 +- debugedit-canon-fix.diff | 286 +---- debugedit-comp-dir.diff | 8 +- debugedit.diff | 45 +- debuglink.diff | 6 +- debugsource-package.diff | 16 +- debugsubpkg.diff | 104 +- diskspace.diff | 2 +- disttag-macro.diff | 16 +- elfflagreqprov.diff | 12 - extcond.diff | 47 +- files.diff | 10 +- findfplistexclude.diff | 114 -- findksyms.diff | 24 + findlang.diff | 46 +- fingerprint.diff | 24 - globlstat.diff | 20 - legacyprereq.diff | 16 - localetag.diff | 161 ++- luaroot.diff | 42 +- lzma-payload-2.diff | 454 -------- lzma-payload.diff | 116 -- macrosin.diff | 66 +- mimetype.diff | 6 +- missingok.diff | 14 +- modalias.diff | 16 +- nameversioncompare.diff | 16 +- nodefattr.diff | 2 +- patchrpms.diff | 745 ------------ platformin.diff | 28 +- popt-to-lib.diff | 32 - refreshtestarch.diff | 25 +- remove-brp-strips.diff | 12 +- requires-ge-macro.diff | 2 +- rpm-4.4.2.3-db.tar.bz2 | 3 + rpm-4.4.2.3.tar.bz2 | 3 - rpm-4.7.1.tar.bz2 | 3 + rpm-beecrypt.diff | 1835 ++++++++++++++++++++++++++++++ rpm-filelist-bufferoverflow.diff | 12 - rpm-python.spec | 10 +- rpm-shorten-changelog.diff | 31 +- rpm.changes | 10 + rpm.spec | 274 ++--- rpmpopt.diff | 74 +- rpmqpack.diff | 51 +- rpmrc.diff | 91 +- rpmrctests.diff | 10 +- specfilemacro.diff | 14 +- suspendlock.diff | 61 +- taggedfileindex.diff | 212 ++-- tagsbackport.diff | 37 - waitlock.diff | 82 +- weakdeps.diff | 230 ++-- whatrequires-doc.diff | 12 +- xz.diff | 86 -- 64 files changed, 3179 insertions(+), 3463 deletions(-) delete mode 100644 baselibs.conf delete mode 100644 elfflagreqprov.diff delete mode 100644 findfplistexclude.diff delete mode 100644 fingerprint.diff delete mode 100644 globlstat.diff delete mode 100644 legacyprereq.diff delete mode 100644 lzma-payload-2.diff delete mode 100644 lzma-payload.diff delete mode 100644 patchrpms.diff delete mode 100644 popt-to-lib.diff create mode 100644 rpm-4.4.2.3-db.tar.bz2 delete mode 100644 rpm-4.4.2.3.tar.bz2 create mode 100644 rpm-4.7.1.tar.bz2 create mode 100644 rpm-beecrypt.diff delete mode 100644 rpm-filelist-bufferoverflow.diff delete mode 100644 tagsbackport.diff delete mode 100644 xz.diff diff --git a/autodeps.diff b/autodeps.diff index 0a791aa..ffcf061 100644 --- a/autodeps.diff +++ b/autodeps.diff @@ -223,7 +223,7 @@ Index: autodeps/linux.req /^$/ { START=0; } /^Dynamic Section:$/ { START=1; } (START==1) && /NEEDED/ { -@@ -110,26 +114,37 @@ for f in $liblist $exelist ; do +@@ -111,7 +115,7 @@ for f in $liblist $exelist ; do sub(/:/, "", $3); LIBNAME=$3; } @@ -231,9 +231,8 @@ Index: autodeps/linux.req + (START==2) && (LIBNAME!="") && ($4!="") { print LIBNAME "(" $4 ")'$lib64'"; } -- /^[A-Za-z]/ { START=3; } ' - done | sort -u +@@ -119,17 +123,29 @@ done | sort -u # # --- Perl modules. diff --git a/baselibs.conf b/baselibs.conf deleted file mode 100644 index 5f85cd9..0000000 --- a/baselibs.conf +++ /dev/null @@ -1,4 +0,0 @@ -popt -rpm -arch ppc package popt-devel -arch ppc package rpm-devel diff --git a/brp.diff b/brp.diff index 74e65e0..3f7a341 100644 --- a/brp.diff +++ b/brp.diff @@ -47,18 +47,6 @@ Index: scripts/brp-lib64-linux + fi +done +exit 0 -Index: scripts/brp-sparc64-linux -=================================================================== ---- scripts/brp-sparc64-linux.orig -+++ scripts/brp-sparc64-linux -@@ -6,6 +6,7 @@ fi - files= - LC_ALL= - LANG= -+LC_TIME=POSIX - - # Move 64bit ELF objects from /lib, /usr/lib, /usr/X11R6/lib to */lib64 - # directories Index: scripts/brp-strip =================================================================== --- scripts/brp-strip.orig @@ -273,3 +261,29 @@ Index: scripts/brp-symlink +if test "$had_errors" = 1; then + exit 1 +fi +Index: scripts/Makefile.am +=================================================================== +--- scripts/Makefile.am.orig ++++ scripts/Makefile.am +@@ -6,8 +6,10 @@ CLEANFILES = + + EXTRA_DIST = \ + brp-compress brp-python-bytecompile brp-java-gcjcompile \ ++ brp-lib64-linux \ + brp-strip brp-strip-comment-note \ + brp-strip-shared brp-strip-static-archive \ ++ brp-symlink \ + check-files check-prereqs \ + check-buildroot check-rpaths check-rpaths-worker \ + find-debuginfo.sh find-lang.sh \ +@@ -23,8 +25,10 @@ EXTRA_DIST = \ + + rpmconfig_SCRIPTS = \ + brp-compress brp-python-bytecompile brp-java-gcjcompile \ ++ brp-lib64-linux \ + brp-strip brp-strip-comment-note \ + brp-strip-shared brp-strip-static-archive \ ++ brp-symlink \ + check-files check-prereqs \ + check-buildroot check-rpaths check-rpaths-worker \ + find-lang.sh \ diff --git a/build.diff b/build.diff index a1b5a7a..7aa43dc 100644 --- a/build.diff +++ b/build.diff @@ -15,272 +15,11 @@ on SUSE systems. scripts/Makefile.am | 8 ++ 11 files changed, 132 insertions(+), 82 deletions(-) -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 --[ "`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 -+#[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1 - - myopts= --if [ X"$@" = X -a "X`uname -s`" = "XDarwin" -a -d /opt/local ]; then -+if [ X"$*" = X -a "X`uname -s`" = "XDarwin" -a -d /opt/local ]; then - export myopts="--prefix=/usr --disable-nls" - export CPPFLAGS="-I${myprefix}/include" - fi -@@ -49,10 +49,11 @@ if [ -d zlib ]; then - (echo "--- zlib"; cd zlib; ./autogen.sh --noconfigure "$@") - fi - if [ -d beecrypt ]; then -- (echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@") -+ #(echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@") -+ (echo "--- beecrypt"; cd beecrypt; ./autogen.sh --without-cplusplus --without-java --without-python "$@") - fi - if [ -d elfutils ]; then -- (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 -+(echo "--- db"; cd db/dist; libtoolize --copy --force ; rm aclocal/libtool.ac ; ./s_config ) - - echo "--- rpm" - $libtoolize --copy --force -@@ -72,7 +74,7 @@ if [ "$1" = "--noconfigure" ]; then - exit 0; - fi - --if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then -+if [ X"$*" = X -a "X`uname -s`" = "XLinux" ]; then - if [ -d /usr/share/man ]; then - mandir=/usr/share/man - infodir=/usr/share/info -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 - noinst_HEADERS = buildio.h - --LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) -+LDFLAGS = - - usrlibdir = $(libdir)@MARK64@ - usrlib_LTLIBRARIES = librpmbuild.la 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 -@@ -430,9 +430,9 @@ WITH_LIBELF_LIB= - AC_CHECK_HEADER([libelf.h]) - AC_CHECK_HEADER([gelf.h], [ - AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the header file.]) -- AC_CHECK_LIB(elf, gelf_getvernaux, [ -+ AC_CHECK_LIB(elf_pic, gelf_getvernaux, [ - AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).]) -- WITH_LIBELF_LIB="-lelf" -+ WITH_LIBELF_LIB="-lelf_pic" - ]) - ], [ - if test -d elfutils/libelf ; then -@@ -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 +@@ -1009,6 +1009,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;; mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;; m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;; @@ -288,28 +27,24 @@ Index: configure.ac sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;; sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;; *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; -@@ -1227,7 +1262,8 @@ mint) RPMCANONARCH=m68kmint ;; - esac +@@ -1019,6 +1020,7 @@ 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) + unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) + RPMCANONVENDOR=suse test -f /etc/redhat-release && RPMCANONVENDOR=redhat + test -f /etc/SuSE-release && RPMCANONVENDOR=suse 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 - ;; +@@ -1031,6 +1033,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec esac + RPMCANONOS="$host_os_noversion" + RPMCANONGNU="$host_os_gnu" +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) + AC_SUBST(RPMCANONARCH) + AC_SUBST(RPMCANONVENDOR) Index: db3/configure =================================================================== --- db3/configure.orig @@ -322,44 +57,29 @@ Index: db3/configure - --enable-shared --enable-static --enable-rpc \ - --with-uniquename=_rpmdb --srcdir=$db_dist +CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \ -+ --enable-shared --enable-static \ ++ --enable-shared --enable-static --enable-rpc \ + --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS mv Makefile Makefile.orig cat Makefile.orig | sed -e '/^install[:-]/c\ -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: - - noinst_PROGRAMS = file - file_SOURCES = file.c --file_LDFLAGS = -L../../zlib # -all-static -+file_LDFLAGS = # -L../../zlib # -all-static - file_LDADD = libmagic.la - - listobjs: Index: installplatform =================================================================== --- installplatform.orig +++ installplatform -@@ -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|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 ;; +@@ -54,9 +54,9 @@ for SUBST in $SUBSTS ; do + ARCH_INSTALL_POST='%{nil}' + case "${ARCH}-${OS}" in + sparc64*-linux) LIB=lib64 ;; +- s390x-linux) LIB=lib64 ;; +- ppc64-linux|powerpc64-linux) LIB=lib64 ;; +- x86_64-linux|amd64-linux|ia32e-linux) LIB=lib64 ;; ++ s390x-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;; ++ ppc64-linux|powerpc64-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;; ++ x86_64-linux|amd64-linux|ia32e-linux) ARCH_INSTALL_POST=${pkglibdir}/brp-lib64-linux ; LIB=lib64 ;; + *) LIB=lib;; esac - if [ -n "$MULTILIBNO" ]; then -@@ -102,6 +102,9 @@ for SUBST in $SUBSTS ; do +@@ -136,6 +136,9 @@ for SUBST in $SUBSTS ; do apple) VENDORSED='-e s,^@apple@,,' ;; @@ -369,122 +89,3 @@ Index: installplatform esac 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 - LIBS = - --LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) -+LDFLAGS = - - usrlibdir = $(libdir)@MARK64@ - usrlib_LTLIBRARIES = librpm.la -Index: popt/autogen.sh -=================================================================== ---- popt/autogen.sh.orig -+++ popt/autogen.sh -@@ -28,7 +28,7 @@ fi - - cd "$THEDIR" - --if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then -+if [ X"$*" = X -a "X`uname -s`" = "XLinux" ]; then - $srcdir/configure --prefix=/usr "$@" - else - $srcdir/configure "$@" -Index: rpmdb/Makefile.am -=================================================================== ---- rpmdb/Makefile.am.orig -+++ rpmdb/Makefile.am -@@ -31,7 +31,7 @@ noinst_HEADERS = fprint.h header_interna - pkgbindir = @RPMCONFIGDIR@ - pkgbin_PROGRAMS = \ - rpmdb_archive rpmdb_checkpoint rpmdb_deadlock rpmdb_dump rpmdb_load \ -- rpmdb_printlog rpmdb_recover rpmdb_svc rpmdb_stat rpmdb_upgrade \ -+ rpmdb_printlog rpmdb_recover rpmdb_stat rpmdb_upgrade \ - rpmdb_verify - - mylibs = librpmdb.la -@@ -42,7 +42,7 @@ LIBS = - libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la - - # XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different --LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) -+LDFLAGS = - - usrlibdir = $(libdir)@MARK64@ - usrlib_LTLIBRARIES = librpmdb.la -Index: rpmio/Makefile.am -=================================================================== ---- rpmio/Makefile.am.orig -+++ rpmio/Makefile.am -@@ -24,9 +24,9 @@ pkginc_HEADERS = \ - rpmsq.h rpmsw.h ugid.h - noinst_HEADERS = rpmio_internal.h rpmlua.h rpmhook.h - --BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs) -+BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/listobjs) - --LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir) -+LDFLAGS = - - usrlibdir = $(libdir)@MARK64@ - usrlib_LTLIBRARIES = librpmio.la -@@ -41,14 +41,14 @@ librpmio_la_LDFLAGS = -release 4.4 $(LDF - @WITH_MAGIC_LIB@ \ - @WITH_ZLIB_LIB@ \ - -lpthread --librpmio_la_LIBADD = # $(BEECRYPTLOBJS) --librpmio_la_DEPENDENCIES = # .created -+librpmio_la_LIBADD = $(BEECRYPTLOBJS) -+librpmio_la_DEPENDENCIES = .created - - .created: - if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \ - ${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \ - for lo in $(BEECRYPTLOBJS); do \ -- [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \ -+ [ -f $$lo ] || sed -e "s!'!'$(top_builddir)/beecrypt/!" < $(top_builddir)/beecrypt/$$lo > $$lo ; \ - done \ - fi - touch $@ -Index: scripts/Makefile.am -=================================================================== ---- scripts/Makefile.am.orig -+++ scripts/Makefile.am -@@ -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 \ -@@ -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-* mono-find* osgideps.pl -+ macros.php* find-*.php find-php-* mono-find* osgideps.pl \ -+ find-provides.ksyms find-requires.ksyms - - installprefix = $(DESTDIR) - -@@ -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 \ -@@ -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 diff --git a/buildidprov.diff b/buildidprov.diff index d05c515..6cbc765 100644 --- a/buildidprov.diff +++ b/buildidprov.diff @@ -46,7 +46,7 @@ Index: macros.in =================================================================== --- macros.in.orig +++ macros.in -@@ -175,7 +175,8 @@ +@@ -179,7 +179,8 @@ %package debuginfo\ Summary: Debug information for package %{name}\ Group: Development/Debug\ diff --git a/chownwarn.diff b/chownwarn.diff index 2e1100d..7d56a31 100644 --- a/chownwarn.diff +++ b/chownwarn.diff @@ -4,25 +4,25 @@ Index: lib/fsm.c =================================================================== --- lib/fsm.c.orig +++ lib/fsm.c -@@ -2193,6 +2193,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS +@@ -2093,6 +2093,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS break; case FSM_CHOWN: rc = chown(fsm->path, st->st_uid, st->st_gid); + if (rc < 0 && errno == EPERM) { -+ rpmMessage(RPMMESS_WARNING, "can't chown %s (%s)\n", fsm->path, strerror(errno)); ++ rpmlog(RPMLOG_WARNING, "can't chown %s (%s)\n", fsm->path, strerror(errno)); + rc = 0; + } if (_fsm_debug && (stage & FSM_SYSCALL)) - rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur, + rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", cur, fsm->path, (int)st->st_uid, (int)st->st_gid, -@@ -2202,6 +2206,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS +@@ -2102,6 +2106,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS case FSM_LCHOWN: #if ! CHOWN_FOLLOWS_SYMLINK rc = lchown(fsm->path, st->st_uid, st->st_gid); + if (rc < 0 && errno == EPERM) { -+ rpmMessage(RPMMESS_WARNING, "can't lchown %s (%s)\n", fsm->path, strerror(errno)); ++ rpmlog(RPMLOG_WARNING, "can't lchown %s (%s)\n", fsm->path, strerror(errno)); + rc = 0; + } if (_fsm_debug && (stage & FSM_SYSCALL)) - rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur, + rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", cur, fsm->path, (int)st->st_uid, (int)st->st_gid, diff --git a/convertdb1static.diff b/convertdb1static.diff index 2d7a45f..f1ead10 100644 --- a/convertdb1static.diff +++ b/convertdb1static.diff @@ -1,40 +1,368 @@ Build convertdb1, too. -Index: tools/Makefile.am +Index: Makefile.am =================================================================== ---- tools/Makefile.am.orig -+++ tools/Makefile.am -@@ -18,25 +18,29 @@ INCLUDES = -I. \ +--- Makefile.am.orig ++++ Makefile.am +@@ -143,6 +143,10 @@ bin_PROGRAMS += rpmqpack + rpmqpack_SOURCES = rpmqpack.c + rpmqpack_LDADD = lib/librpm.la - EXTRA_DIST = rpminject.c rpmsort.c rpmxml.c rpmxp.c rpmxp.h hashtab.h - --EXTRA_PROGRAMS = debugedit convertdb1 rpminject rpmsort rpmtool rpmxml -+EXTRA_PROGRAMS = rpminject rpmsort rpmtool rpmxml - - LDADD = \ - $(top_builddir)/lib/librpm.la - --staticLDFLAGS = @LDFLAGS_STATIC@ @LDFLAGS_NPTL@ -+staticLDFLAGS = @LDFLAGS_STATIC@ # @LDFLAGS_NPTL@ - - noinst_PROGRAMS = dumpdb - - pkgbindir = @RPMCONFIGDIR@ --pkgbin_PROGRAMS = @WITH_LIBDWARF_DEBUGEDIT@ javadeps rpmcache rpmdeps rpmfile -+pkgbin_PROGRAMS = debugedit javadeps rpmcache rpmdeps rpmfile convertdb1 - MAGIC = $(pkgbindir)/magic - - bin_PROGRAMS = rpmgraph - - convertdb1_SOURCES = convertdb1.c -+#convertdb1_LDFLAGS = $(staticLDFLAGS) -+convertdb1_LDADD = \ -+ $(top_builddir)/lib/librpm.la \ -+ @WITH_LIBELF_LIB@ - - debugedit_SOURCES = debugedit.c hashtab.c --#debugedit_LDADD = @LDFLAGS_STATIC@ \ -+#debugedit_LDADD = @LDFLAGS_STATIC@ - debugedit_LDADD = \ - @WITH_LIBELF_LIB@ \ - $(top_builddir)/rpmdb/librpmdb.la \ ++check_PROGRAMS += convertdb1 ++convertdb1_SOURCES = tools/convertdb1.c ++convertdb1_LDADD = lib/librpm.la ++ + rpmconfig_DATA = rpmrc + rpmrc: $(top_srcdir)/rpmrc.in + @$(SED) \ +Index: tools/convertdb1.c +=================================================================== +--- /dev/null ++++ tools/convertdb1.c +@@ -0,0 +1,346 @@ ++#if defined(HAVE_CONFIG_H) ++#include "system.h" ++const char *__progname; ++#else ++#include ++#include ++#include ++#endif ++ ++#include ++#include ++#include ++#include ++ ++#define FA_MAGIC 0x02050920 ++ ++struct faFileHeader{ ++ unsigned int magic; ++ unsigned int firstFree; ++}; ++ ++struct faHeader { ++ unsigned int size; ++ unsigned int freeNext; /* offset of the next free block, 0 if none */ ++ unsigned int freePrev; ++ unsigned int isFree; ++ ++ /* note that the u16's appear last for alignment/space reasons */ ++}; ++ ++ ++static int fadFileSize; ++ ++static ssize_t Pread(FD_t fd, void * buf, size_t count, off_t offset) { ++ if (Fseek(fd, offset, SEEK_SET) < 0) ++ return -1; ++ return Fread(buf, sizeof(char), count, fd); ++} ++ ++static FD_t fadOpen(const char * path) ++{ ++ struct faFileHeader newHdr; ++ FD_t fd; ++ struct stat stb; ++ ++ fd = Fopen(path, "r.fdio"); ++ if (!fd || Ferror(fd)) ++ return NULL; ++ ++ if (fstat(Fileno(fd), &stb)) { ++ Fclose(fd); ++ return NULL; ++ } ++ fadFileSize = stb.st_size; ++ ++ /* is this file brand new? */ ++ if (fadFileSize == 0) { ++ Fclose(fd); ++ return NULL; ++ } ++ if (Pread(fd, &newHdr, sizeof(newHdr), 0) != sizeof(newHdr)) { ++ Fclose(fd); ++ return NULL; ++ } ++ if (newHdr.magic != FA_MAGIC) { ++ Fclose(fd); ++ return NULL; ++ } ++ /*@-refcounttrans@*/ return fd /*@=refcounttrans@*/ ; ++} ++ ++static int fadNextOffset(FD_t fd, unsigned int lastOffset) ++{ ++ struct faHeader header; ++ int offset; ++ ++ offset = (lastOffset) ++ ? (lastOffset - sizeof(header)) ++ : sizeof(struct faFileHeader); ++ ++ if (offset >= fadFileSize) ++ return 0; ++ ++ if (Pread(fd, &header, sizeof(header), offset) != sizeof(header)) ++ return 0; ++ ++ if (!lastOffset && !header.isFree) ++ return (offset + sizeof(header)); ++ ++ do { ++ offset += header.size; ++ ++ if (Pread(fd, &header, sizeof(header), offset) != sizeof(header)) ++ return 0; ++ ++ if (!header.isFree) break; ++ } while (offset < fadFileSize && header.isFree); ++ ++ if (offset < fadFileSize) { ++ /* Sanity check this to make sure we're not going in loops */ ++ offset += sizeof(header); ++ ++ if (offset <= lastOffset) return -1; ++ ++ return offset; ++ } else ++ return 0; ++} ++ ++static int fadFirstOffset(FD_t fd) ++{ ++ return fadNextOffset(fd, 0); ++} ++ ++/*@-boundsread@*/ ++static int dncmp(const void * a, const void * b) ++ /*@*/ ++{ ++ const char *const * first = a; ++ const char *const * second = b; ++ return strcmp(*first, *second); ++} ++/*@=boundsread@*/ ++ ++static void compressFilelist(Header h) ++{ ++ struct rpmtd_s fileNames; ++ char ** dirNames; ++ const char ** baseNames; ++ uint32_t * dirIndexes; ++ rpm_count_t count; ++ int xx, i; ++ int dirIndex = -1; ++ ++ /* ++ * This assumes the file list is already sorted, and begins with a ++ * single '/'. That assumption isn't critical, but it makes things go ++ * a bit faster. ++ */ ++ ++ if (headerIsEntry(h, RPMTAG_DIRNAMES)) { ++ xx = headerDel(h, RPMTAG_OLDFILENAMES); ++ return; /* Already converted. */ ++ } ++ ++ if (!headerGet(h, RPMTAG_OLDFILENAMES, &fileNames, HEADERGET_MINMEM)) ++ return; ++ count = rpmtdCount(&fileNames); ++ if (count < 1) ++ return; ++ ++ dirNames = xmalloc(sizeof(*dirNames) * count); /* worst case */ ++ baseNames = xmalloc(sizeof(*dirNames) * count); ++ dirIndexes = xmalloc(sizeof(*dirIndexes) * count); ++ ++ /* HACK. Source RPM, so just do things differently */ ++ { const char *fn = rpmtdGetString(&fileNames); ++ if (fn && *fn != '/') { ++ dirIndex = 0; ++ dirNames[dirIndex] = xstrdup(""); ++ while ((i = rpmtdNext(&fileNames)) >= 0) { ++ dirIndexes[i] = dirIndex; ++ baseNames[i] = rpmtdGetString(&fileNames); ++ } ++ goto exit; ++ } ++ } ++ ++ while ((i = rpmtdNext(&fileNames)) >= 0) { ++ char ** needle; ++ char savechar; ++ char * baseName; ++ size_t len; ++ const char *filename = rpmtdGetString(&fileNames); ++ ++ if (filename == NULL) /* XXX can't happen */ ++ continue; ++ baseName = strrchr(filename, '/') + 1; ++ len = baseName - filename; ++ needle = dirNames; ++ savechar = *baseName; ++ *baseName = '\0'; ++ if (dirIndex < 0 || ++ (needle = bsearch(&filename, dirNames, dirIndex + 1, sizeof(dirNames[0]), dncmp)) == NULL) { ++ char *s = xmalloc(len + 1); ++ rstrlcpy(s, filename, len + 1); ++ dirIndexes[i] = ++dirIndex; ++ dirNames[dirIndex] = s; ++ } else ++ dirIndexes[i] = needle - dirNames; ++ ++ *baseName = savechar; ++ baseNames[i] = baseName; ++ } ++ ++exit: ++ if (count > 0) { ++ headerPutUint32(h, RPMTAG_DIRINDEXES, dirIndexes, count); ++ headerPutStringArray(h, RPMTAG_BASENAMES, baseNames, count); ++ headerPutStringArray(h, RPMTAG_DIRNAMES, ++ (const char **) dirNames, dirIndex + 1); ++ } ++ ++ rpmtdFreeData(&fileNames); ++ for (i = 0; i <= dirIndex; i++) { ++ free(dirNames[i]); ++ } ++ free(dirNames); ++ free(baseNames); ++ free(dirIndexes); ++ ++ xx = headerDel(h, RPMTAG_OLDFILENAMES); ++} ++ ++/* ++ * Up to rpm 3.0.4, packages implicitly provided their own name-version-release. ++ * Retrofit an explicit "Provides: name = epoch:version-release. ++ */ ++static void providePackageNVR(Header h) ++{ ++ const char *name; ++ char *pEVR; ++ rpmsenseFlags pFlags = RPMSENSE_EQUAL; ++ int bingo = 1; ++ struct rpmtd_s pnames; ++ rpmds hds, nvrds; ++ ++ /* Generate provides for this package name-version-release. */ ++ pEVR = headerGetEVR(h, &name); ++ if (!(name && pEVR)) ++ return; ++ ++ /* ++ * Rpm prior to 3.0.3 does not have versioned provides. ++ * If no provides at all are available, we can just add. ++ */ ++ if (!headerGet(h, RPMTAG_PROVIDENAME, &pnames, HEADERGET_MINMEM)) { ++ goto exit; ++ } ++ ++ /* ++ * Otherwise, fill in entries on legacy packages. ++ */ ++ if (!headerIsEntry(h, RPMTAG_PROVIDEVERSION)) { ++ while (rpmtdNext(&pnames) >= 0) { ++ rpmsenseFlags fdummy = RPMSENSE_ANY; ++ ++ headerPutString(h, RPMTAG_PROVIDEVERSION, ""); ++ headerPutUint32(h, RPMTAG_PROVIDEFLAGS, &fdummy, 1); ++ } ++ goto exit; ++ } ++ ++ /* see if we already have this provide */ ++ hds = rpmdsNew(h, RPMTAG_PROVIDENAME, 0); ++ nvrds = rpmdsSingle(RPMTAG_PROVIDENAME, name, pEVR, pFlags); ++ if (rpmdsFind(hds, nvrds) >= 0) { ++ bingo = 0; ++ } ++ rpmdsFree(hds); ++ rpmdsFree(nvrds); ++ ++exit: ++ if (bingo) { ++ const char *evr = pEVR; ++ headerPutString(h, RPMTAG_PROVIDENAME, name); ++ headerPutString(h, RPMTAG_PROVIDEVERSION, evr); ++ headerPutUint32(h, RPMTAG_PROVIDEFLAGS, &pFlags, 1); ++ } ++ rpmtdFreeData(&pnames); ++ free(pEVR); ++} ++/*@=bounds@*/ ++ ++static rpmdb db; ++ ++int ++main(int argc, char ** argv) ++{ ++ FD_t fd; ++ int offset; ++ Header h; ++ const char *name; ++ const char *version; ++ const char *release; ++ ++ if (argc != 2) ++ { ++ fprintf(stderr, "usage: %s \n", argv[0]); ++ exit(1); ++ } ++ if ((fd = fadOpen(argv[1])) == 0) ++ { ++ fprintf(stderr, "could not open %s\n", argv[1]); ++ exit(1); ++ } ++ rpmInitMacros(NULL, "/usr/lib/rpm/macros"); ++ ++ /* speed things up */ ++ (void) rpmDefineMacro(NULL, "_rpmdb_rebuild %{nil}", -1); ++ ++ if (rpmdbOpen("/", &db, O_RDWR, 0644)) { ++ fprintf(stderr, "could not open rpm database\n"); ++ exit(1); ++ } ++ ++ for (offset = fadFirstOffset(fd); offset; offset = fadNextOffset(fd, offset)) ++ { ++ rpmdbMatchIterator mi; ++ ++ /* have to use lseek instead of Fseek because headerRead ++ * uses low level IO ++ */ ++ if (lseek(Fileno(fd), (off_t)offset, SEEK_SET) == -1) ++ { ++ perror("lseek"); ++ continue; ++ } ++ h = headerRead(fd, HEADER_MAGIC_NO); ++ if (!h) ++ continue; ++ compressFilelist(h); ++ providePackageNVR(h); ++ headerNVR(h, &name, &version, &release); ++ mi = rpmdbInitIterator(db, RPMTAG_NAME, name, 0); ++ rpmdbSetIteratorRE(mi, RPMTAG_VERSION, RPMMIRE_DEFAULT, version); ++ rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_DEFAULT, release); ++ if (rpmdbNextIterator(mi)) ++ { ++ printf("%s-%s-%s is already in database\n", name, version, release); ++ rpmdbFreeIterator(mi); ++ headerFree(h); ++ continue; ++ } ++ rpmdbFreeIterator(mi); ++ if (rpmdbAdd(db, -1, h, 0, 0)) ++ { ++ fprintf(stderr, "could not add %s-%s-%s!\n", name, version, release); ++ } ++ headerFree(h); ++ } ++ Fclose(fd); ++ rpmdbClose(db); ++ return 0; ++} ++ diff --git a/dbfsync.diff b/dbfsync.diff index 00da14c..4c5c9c4 100644 --- a/dbfsync.diff +++ b/dbfsync.diff @@ -1,40 +1,40 @@ Support a database-local fsync setting. Needs berkeley db patch. ---- ./rpmdb/db3.c.orig 2005-03-23 18:15:28.000000000 +0000 -+++ ./rpmdb/db3.c 2006-01-27 20:08:29.000000000 +0000 -@@ -211,11 +211,13 @@ static int db_fini(dbiIndex dbi, const c +Index: lib/backend/db3.c +=================================================================== +--- lib/backend/db3.c.orig ++++ lib/backend/db3.c +@@ -191,10 +191,12 @@ static int db_fini(dbiIndex dbi, const c return rc; } +#if 0 - static int db3_fsync_disable(/*@unused@*/ int fd) - /*@*/ + static int db3_fsync_disable(int fd) { return 0; } +#endif - #if 0 - #if HAVE_LIBPTHREAD -@@ -414,6 +416,7 @@ static int db_init(dbiIndex dbi, const c + #if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 5) + /* +@@ -357,10 +359,12 @@ static int db_init(dbiIndex dbi, const c /* dbenv->set_rep_transport(???) */ /* dbenv->set_rep_limit(???) */ +#if 0 if (dbi->dbi_no_fsync) { - #if (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR != 0) || (DB_VERSION_MAJOR == 4) xx = db_env_set_func_fsync(db3_fsync_disable); -@@ -422,6 +425,7 @@ static int db_init(dbiIndex dbi, const c - #endif xx = cvtdberr(dbi, "db_env_set_func_fsync", xx, _debug); } +#endif if (dbi->dbi_shmkey) { xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey); ---- ./rpmdb/dbconfig.c.orig 2004-10-16 12:50:52.000000000 +0000 -+++ ./rpmdb/dbconfig.c 2005-12-15 13:12:32.000000000 +0000 -@@ -99,6 +99,8 @@ struct poptOption rdbOptions[] = { +Index: lib/backend/dbconfig.c +=================================================================== +--- lib/backend/dbconfig.c.orig ++++ lib/backend/dbconfig.c +@@ -94,6 +94,8 @@ struct poptOption rdbOptions[] = { NULL, NULL }, { "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING, NULL, NULL }, @@ -43,7 +43,7 @@ Support a database-local fsync setting. Needs berkeley db patch. { "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE, NULL, NULL }, -@@ -145,8 +147,6 @@ struct poptOption rdbOptions[] = { +@@ -140,8 +142,6 @@ struct poptOption rdbOptions[] = { NULL, NULL }, { "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0, NULL, NULL }, diff --git a/dbprivate.diff b/dbprivate.diff index 08ebadb..da64e54 100644 --- a/dbprivate.diff +++ b/dbprivate.diff @@ -1,12 +1,12 @@ Always use DB_PRIVATE. Should probably be configured instead. -Index: rpmdb/db3.c +Index: lib/backend/db3.c =================================================================== ---- rpmdb/db3.c.orig -+++ rpmdb/db3.c -@@ -1050,6 +1050,9 @@ static int db3open(rpmdb rpmdb, rpmTag r - #endif - #endif +--- lib/backend/db3.c.orig ++++ lib/backend/db3.c +@@ -804,6 +804,9 @@ static int db3open(rpmdb rpmdb, rpmTag r + */ + if (dbi->dbi_use_dbenv) { + /* always use fcntl lock */ + dbi->dbi_eflags |= DB_PRIVATE; diff --git a/dbrointerruptable.diff b/dbrointerruptable.diff index 355cfc4..a9bc1c7 100644 --- a/dbrointerruptable.diff +++ b/dbrointerruptable.diff @@ -1,11 +1,11 @@ Do not block signals if the database is opened read-only, it jst annoys the users. [#48026] -Index: rpmdb/rpmdb.c +Index: lib/rpmdb.c =================================================================== ---- rpmdb/rpmdb.c.orig -+++ rpmdb/rpmdb.c -@@ -873,10 +873,12 @@ int rpmdbClose(rpmdb db) +--- lib/rpmdb.c.orig ++++ lib/rpmdb.c +@@ -819,10 +819,12 @@ int rpmdbClose(rpmdb db) rpmdb * prev, next; int dbix; int rc = 0; @@ -15,12 +15,12 @@ Index: rpmdb/rpmdb.c goto exit; + dbmode = db->db_mode; - (void) rpmdbUnlink(db, "rpmdbClose"); + (void) rpmdbUnlink(db, RPMDBG_M("rpmdbClose")); - /*@-usereleased@*/ -@@ -913,12 +915,14 @@ int rpmdbClose(rpmdb db) - /*@-refcounttrans@*/ db = _free(db); /*@=refcounttrans@*/ - /*@=usereleased@*/ + if (db->nrefs > 0) +@@ -855,12 +857,14 @@ int rpmdbClose(rpmdb db) + + dbiTagsFree(); + if ((dbmode & (O_RDWR|O_WRONLY)) != 0) { + (void) rpmsqEnable(-SIGHUP, NULL); @@ -37,8 +37,8 @@ Index: rpmdb/rpmdb.c - (void) rpmsqEnable(-SIGPIPE,NULL); return rc; } - /*@=incondefs@*/ -@@ -1050,11 +1054,13 @@ static int openDatabase(/*@null@*/ const + +@@ -956,11 +960,13 @@ static int openDatabase(const char * pre if (db == NULL) return 1; diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff index 2bc7a42..8d6ad2a 100644 --- a/debugedit-canon-fix.diff +++ b/debugedit-canon-fix.diff @@ -11,7 +11,7 @@ Index: tools/debugedit.c =================================================================== --- tools/debugedit.c.orig +++ tools/debugedit.c -@@ -157,7 +157,7 @@ strptr (DSO *dso, int sec, off_t offset) +@@ -158,7 +158,7 @@ strptr (DSO *dso, int sec, off_t offset) { if (data->d_buf && offset >= data->d_off @@ -20,24 +20,8 @@ Index: tools/debugedit.c return (const char *) data->d_buf + (offset - data->d_off); } } -@@ -471,13 +471,13 @@ has_prefix (const char *str, - { - int str_len; - int prefix_len; -- -+ - str_len = strlen (str); - prefix_len = strlen (prefix); - - if (str_len < prefix_len) - return 0; -- -+ - return strncmp (str, prefix, prefix_len) == 0; - } - -@@ -485,9 +485,10 @@ static int - edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase) +@@ -488,9 +488,10 @@ static int + edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase) { unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir; - unsigned char **dirt; @@ -46,114 +30,60 @@ Index: tools/debugedit.c unsigned char *endcu, *endprol; + char line_base; unsigned char opcode_base; - uint_32 value, dirt_cnt; + uint32_t value, dirt_cnt; size_t comp_dir_len = strlen (comp_dir); -@@ -496,9 +497,9 @@ edit_dwarf2_line (DSO *dso, uint_32 off, - - if (phase != 0) - return 0; -- -+ - ptr += off; -- -+ - endcu = ptr + 4; - endcu += read_32 (ptr); - if (endcu == ptr + 0xffffffff) -@@ -521,7 +522,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, - value); +@@ -534,6 +535,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off return 1; } -- -+ - endprol = ptr + 4; - endprol += read_32 (ptr); - if (endprol > endcu) -@@ -530,26 +531,27 @@ edit_dwarf2_line (DSO *dso, uint_32 off, - dso->filename); - return 1; - } -- -+ + + line_base = (char) (ptr[2] & 0xff); opcode_base = ptr[4]; ptr = dir = ptr + 4 + opcode_base; -- -+ - /* dir table: */ - value = 1; - while (*ptr != 0) - { -- ptr = strchr (ptr, 0) + 1; -+ ptr = (unsigned char *)strchr ((char *)ptr, 0) + 1; + +@@ -545,13 +547,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off ++value; } - dirt = (unsigned char **) alloca (value * sizeof (unsigned char *)); -+ dirt = (char **) alloca (value * sizeof (char *)); - dirt[0] = "."; ++ dirt = (char **) alloca (value * sizeof (unsigned char *)); + dirt[0] = (unsigned char *) "."; dirt_cnt = 1; ptr = dir; while (*ptr != 0) { - dirt[dirt_cnt++] = ptr; -- ptr = strchr (ptr, 0) + 1; + dirt[dirt_cnt++] = (char *)ptr; -+ ptr = (unsigned char *)strchr ((char *)ptr, 0) + 1; + ptr = (unsigned char *) strchr ((char *)ptr, 0) + 1; } ptr++; - -@@ -559,8 +561,8 @@ edit_dwarf2_line (DSO *dso, uint_32 off, - char *s, *file; - size_t file_len, dir_len; - -- file = ptr; -- ptr = strchr (ptr, 0) + 1; -+ file = (char *)ptr; -+ ptr = (unsigned char *)strchr ((char *)ptr, 0) + 1; - value = read_uleb128 (ptr); - - if (value >= dirt_cnt) -@@ -629,7 +631,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, - } - - free (s); -- -+ - read_uleb128 (ptr); - read_uleb128 (ptr); - } -@@ -661,7 +663,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -664,7 +666,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off if (dest_dir) { - unsigned char *srcptr, *buf = NULL; -+ char *srcptr, *srcstart, *buf = NULL; ++ char *srcptr, *buf = NULL; size_t base_len = strlen (base_dir); size_t dest_len = strlen (dest_dir); size_t shrank = 0; -@@ -675,12 +677,16 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -678,11 +680,14 @@ edit_dwarf2_line (DSO *dso, uint32_t off ptr = dir; } else - ptr = srcptr = dir; -- unsigned char *srcstart=srcptr; + { + ptr = dir; + srcptr = (char *)dir; + } -+ -+ srcstart = srcptr; while (*srcptr != 0) { -- size_t len = strlen (srcptr) + 1; +- size_t len = strlen ((char *)srcptr) + 1; - const unsigned char *readptr = srcptr; -+ size_t len = strlen (srcptr); ++ size_t len = strlen ((char *)srcptr); + const char *readptr = srcptr; - if (*srcptr == '/' && has_prefix (srcptr, base_dir)) + if (*srcptr == '/' && has_prefix ((char *)srcptr, base_dir)) { -@@ -689,39 +695,28 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -691,42 +696,27 @@ edit_dwarf2_line (DSO *dso, uint32_t off memcpy (ptr, dest_dir, dest_len); ptr += dest_len; readptr += base_len; @@ -162,32 +92,34 @@ Index: tools/debugedit.c srcptr += len; shrank += srcptr - readptr; -- canonicalize_path (readptr, ptr); -- len = strlen (ptr) + 1; -+ canonicalize_path (readptr, (char *)ptr); + canonicalize_path ((char *)readptr, (char *)ptr); +- len = strlen ((char *)ptr) + 1; +- shrank -= len; +- ptr += len; + len = strlen ((char *)ptr); -+ -+#ifdef DEBUG -+ if ((srcptr - readptr) > len) -+ error(0, 0,"canonicalization unexpectedly shrank (%lu): \"%s\"\n", -+ (long unsigned int)(srcptr - readptr) - len, ptr); -+#endif -+ - shrank -= len; - ptr += len; - elf_flagdata (debug_sections[DEBUG_STR].elf_data, - ELF_C_SET, ELF_F_DIRTY); - } -- ++#ifdef DEBUG ++ if ((srcptr - readptr) > len) ++ error(0, 0,"canonicalization unexpectedly shrank (%lu): \"%s\"\n", ++ (long unsigned int)(srcptr - readptr) - len, ptr); ++#endif + - if (shrank > 0) - { - if (--shrank == 0) - error (EXIT_FAILURE, 0, - "canonicalization unexpectedly shrank by one character"); -- memset (ptr, 'X', shrank); -- ptr += shrank; -- *ptr++ = '\0'; +- else +- { +- memset (ptr, 'X', shrank); +- ptr += shrank; +- *ptr++ = '\0'; +- } ++ shrank -= len; ++ ptr += len; + elf_flagdata (debug_sections[DEBUG_STR].elf_data, + ELF_C_SET, ELF_F_DIRTY); + ++ptr; @@ -207,7 +139,7 @@ Index: tools/debugedit.c *ptr++ = '\0'; ++srcptr; -@@ -741,21 +736,26 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -746,21 +736,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off elf_flagdata (debug_sections[DEBUG_STR].elf_data, ELF_C_SET, ELF_F_DIRTY); } @@ -238,147 +170,3 @@ Index: tools/debugedit.c return 0; } -@@ -767,17 +767,13 @@ edit_attributes (DSO *dso, unsigned char - int i; - uint_32 list_offs; - int found_list_offs; -- unsigned char *comp_dir; -- -- comp_dir = NULL; -- list_offs = 0; -- found_list_offs = 0; -+ char *comp_dir = NULL; -+ - for (i = 0; i < t->nattr; ++i) - { - uint_32 form = t->attr[i].form; - uint_32 len = 0; - int base_len, dest_len; -- - - while (1) - { -@@ -791,56 +787,55 @@ edit_attributes (DSO *dso, unsigned char - } - - if (t->attr[i].attr == DW_AT_comp_dir) -- { -+ { - if ( form == DW_FORM_string ) -- { -+ { - free (comp_dir); -- comp_dir = strdup (ptr); -- -- if (phase == 1 && dest_dir && has_prefix (ptr, base_dir)) -- { -+ comp_dir = strdup ((char *)ptr); -+ -+ if (phase == 1 && dest_dir -+ && has_prefix ((char *)ptr, base_dir)) -+ { - base_len = strlen (base_dir); - dest_len = strlen (dest_dir); -- -+ - memcpy (ptr, dest_dir, dest_len); - if (dest_len < base_len) -- { -+ { - memset(ptr + dest_len, '/', - base_len - dest_len); -- -- } -+ } - elf_flagdata (debug_sections[DEBUG_INFO].elf_data, - ELF_C_SET, ELF_F_DIRTY); -- } -- } -- -+ } -+ } - else if (form == DW_FORM_strp && - debug_sections[DEBUG_STR].data) -- { -+ { - char *dir; - -- dir = debug_sections[DEBUG_STR].data -- + do_read_32_relocated (ptr); -+ dir = (char *)debug_sections[DEBUG_STR].data -+ + do_read_32_relocated (ptr); - - free (comp_dir); - comp_dir = strdup (dir); - - if (phase == 1 && dest_dir && has_prefix (dir, base_dir)) -- { -+ { - base_len = strlen (base_dir); - dest_len = strlen (dest_dir); -- -+ - memcpy (dir, dest_dir, dest_len); - if (dest_len < base_len) -- { -+ { - memmove (dir + dest_len, dir + base_len, - strlen (dir + base_len) + 1); -- } -+ } - elf_flagdata (debug_sections[DEBUG_STR].elf_data, - ELF_C_SET, ELF_F_DIRTY); -- } -- } -- } -+ } -+ } -+ } - else if ((t->tag == DW_TAG_compile_unit - || t->tag == DW_TAG_partial_unit) - && t->attr[i].attr == DW_AT_name -@@ -848,9 +843,9 @@ edit_attributes (DSO *dso, unsigned char - && debug_sections[DEBUG_STR].data) - { - char *name; -- -- name = debug_sections[DEBUG_STR].data -- + do_read_32_relocated (ptr); -+ -+ name = (char *)debug_sections[DEBUG_STR].data -+ + do_read_32_relocated (ptr); - if (*name == '/' && comp_dir == NULL) - { - char *enddir = strrchr (name, '/'); -@@ -869,7 +864,7 @@ edit_attributes (DSO *dso, unsigned char - { - base_len = strlen (base_dir); - dest_len = strlen (dest_dir); -- -+ - memcpy (name, dest_dir, dest_len); - if (dest_len < base_len) - { -@@ -913,7 +908,7 @@ edit_attributes (DSO *dso, unsigned char - ptr += 4; - break; - case DW_FORM_string: -- ptr = strchr (ptr, '\0') + 1; -+ ptr = (unsigned char *)strchr ((char *)ptr, '\0') + 1; - break; - case DW_FORM_indirect: - form = read_uleb128 (ptr); -@@ -1470,10 +1465,11 @@ handle_build_id (DSO *dso, Elf_Data *bui - const unsigned char * id = build_id->d_buf + build_id_offset; - char hex[build_id_size * 2 + 1]; - int n = snprintf (hex, 3, "%02" PRIx8, id[0]); -+ size_t size; - assert (n == 2); -- for (i = 1; i < build_id_size; ++i) -+ for (size = 1; size < build_id_size; ++size) - { -- n = snprintf (&hex[i * 2], 3, "%02" PRIx8, id[i]); -+ n = snprintf (&hex[size * 2], 3, "%02" PRIx8, id[size]); - assert (n == 2); - } - puts (hex); diff --git a/debugedit-comp-dir.diff b/debugedit-comp-dir.diff index 60e749a..5dd5ae9 100644 --- a/debugedit-comp-dir.diff +++ b/debugedit-comp-dir.diff @@ -8,15 +8,15 @@ 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; +@@ -495,6 +495,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off + uint32_t value, dirt_cnt; size_t comp_dir_len = strlen (comp_dir); size_t abs_file_cnt = 0, abs_dir_cnt = 0; + int comp_dir_used = 0; if (phase != 0) return 0; -@@ -600,6 +601,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -603,6 +604,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off memcpy (p, dirt[value], dir_len); p[dir_len] = '/'; memcpy (p + dir_len + 1, file, file_len + 1); @@ -24,7 +24,7 @@ Index: tools/debugedit.c } canonicalize_path (s, s); if (list_file_fd != -1) -@@ -632,7 +634,31 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -635,7 +637,31 @@ edit_dwarf2_line (DSO *dso, uint32_t off read_uleb128 (ptr); } ++ptr; diff --git a/debugedit.diff b/debugedit.diff index 3cd43ac..cb4c499 100644 --- a/debugedit.diff +++ b/debugedit.diff @@ -1,10 +1,10 @@ -Make debugedit build without dwarf.h. Also fixes a logic bug for ppc. +Make debugedit build without dwarf.h Index: tools/debugedit.c =================================================================== --- tools/debugedit.c.orig +++ tools/debugedit.c -@@ -34,7 +34,37 @@ +@@ -37,7 +37,37 @@ #include #include @@ -41,26 +41,25 @@ Index: tools/debugedit.c +#define DW_FORM_ref_udata 0x15 +#define DW_FORM_indirect 0x16 - #include - -@@ -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 + #include + #include +Index: 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@ +--- Makefile.am.orig ++++ Makefile.am +@@ -103,7 +103,6 @@ rpm2cpio_LDADD += @WITH_LIBELF_LIB@ @WIT - javadeps_SOURCES = javadeps.c + + if LIBELF +-if LIBDWARF + rpmconfig_SCRIPTS += scripts/find-debuginfo.sh + + rpmlibexec_PROGRAMS += debugedit +@@ -111,7 +110,6 @@ debugedit_SOURCES = tools/debugedit.c to + debugedit_LDADD = rpmio/librpmio.la + debugedit_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@ + endif +-endif + + rpmlibexec_PROGRAMS += javadeps + javadeps_SOURCES = tools/javadeps.c diff --git a/debuglink.diff b/debuglink.diff index 7b5ee79..39892b5 100644 --- a/debuglink.diff +++ b/debuglink.diff @@ -1,7 +1,7 @@ -Index: rpm-4.4.2.3/scripts/find-debuginfo.sh +Index: scripts/find-debuginfo.sh =================================================================== ---- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-27 12:06:41.000000000 +0200 -+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-27 12:08:05.000000000 +0200 +--- scripts/find-debuginfo.sh.orig 2009-07-27 12:06:41.000000000 +0200 ++++ scripts/find-debuginfo.sh 2009-07-27 12:08:05.000000000 +0200 @@ -185,7 +185,8 @@ make_id_link() get_debugfn() { diff --git a/debugsource-package.diff b/debugsource-package.diff index ec03d43..17e4599 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 | 12 +++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) -Index: b/macros.in +Index: macros.in =================================================================== ---- macros.in +--- macros.in.orig +++ macros.in -@@ -183,6 +183,18 @@ Debug information is useful when develop +@@ -187,6 +187,18 @@ Debug information is useful when develop package or when debugging this package.\ %files debuginfo -f debugfiles.list\ %defattr(-,root,root)\ @@ -30,12 +30,12 @@ Index: b/macros.in +%defattr(-,root,root)\ %{nil} - %_defaultdocdir %{_usr}/doc/packages -Index: b/scripts/find-debuginfo.sh + %_defaultdocdir %{_datadir}/doc/packages +Index: scripts/find-debuginfo.sh =================================================================== ---- scripts/find-debuginfo.sh +--- scripts/find-debuginfo.sh.orig +++ scripts/find-debuginfo.sh -@@ -172,8 +172,8 @@ set -o pipefail +@@ -186,8 +186,8 @@ set -o pipefail strict_error=ERROR $strict || strict_error=WARNING @@ -46,7 +46,7 @@ Index: b/scripts/find-debuginfo.sh xargs --no-run-if-empty -0 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 - +@@ -297,10 +297,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o - (cd "${RPM_BUILD_ROOT}/usr" test ! -d lib/debug || find lib/debug ! -type d diff --git a/debugsubpkg.diff b/debugsubpkg.diff index bddebd4..cab3e33 100644 --- a/debugsubpkg.diff +++ b/debugsubpkg.diff @@ -1,23 +1,22 @@ -Index: rpm-4.4.2.3/build/files.c +Index: build/files.c =================================================================== ---- rpm-4.4.2.3.orig/build/files.c 2009-07-27 17:59:07.000000000 +0200 -+++ rpm-4.4.2.3/build/files.c 2009-07-27 18:02:00.000000000 +0200 -@@ -28,6 +28,10 @@ - #define _RPMTE_INTERNAL - #include "rpmte.h" +--- build/files.c.orig ++++ build/files.c +@@ -17,6 +17,10 @@ + #include /* rpmDoDigest() */ + #include +#if HAVE_GELF_H +#include +#endif + - #include "buildio.h" - - #include "legacy.h" /* XXX domd5, expandFileList, compressFileList */ -@@ -2485,6 +2489,128 @@ exit: + #include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */ + #include "rpmio/base64.h" + #include "rpmio/fts.h" +@@ -2220,12 +2224,136 @@ exit: return rc; } -+ +/* Query the build-id from the ELF file NAME and store it in the newly + allocated *build_id array of size *build_id_size. Returns -1 on + error. */ @@ -139,40 +138,31 @@ Index: rpm-4.4.2.3/build/files.c + 0 +}; + - /*@-incondefs@*/ - int processBinaryFiles(Spec spec, int installSpecialDoc, int test) - /*@globals check_fileList @*/ -@@ -2492,12 +2618,16 @@ int processBinaryFiles(Spec spec, int in ++ + int processBinaryFiles(rpmSpec spec, int installSpecialDoc, int test) { Package pkg; - int res = 0; -+ char *buildrooturl; + int rc = RPMRC_OK; ++ char *buildroot; check_fileList = newStringBuf(); -+ buildrooturl = rpmGenPath(spec->rootURL, spec->buildRootURL, NULL); ++ buildroot = rpmGenPath(spec->rootDir, spec->buildRoot, NULL); + genSourceRpmName(spec); for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { - const char *n, *v, *r; - int rc; -+ int type, count; -+ char *ap; - - if (pkg->fileList == NULL) - continue; -@@ -2508,6 +2638,116 @@ int processBinaryFiles(Spec spec, int in - if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test))) - res = rc; - +@@ -2238,8 +2366,109 @@ int processBinaryFiles(rpmSpec spec, int + (void) headerNEVRA(pkg->header, &n, NULL, &v, &r, &a); + rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s.%s\n"), n, v, r, a); + +- if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK || +- (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) ++ if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK) ++ goto exit; ++ + /* BEGIN DEBUGPKG */ +#if HAVE_GELF_H && HAVE_LIBELF + elf_version(EV_CURRENT); -+ -+ /* Now we have the file list of pkg in pkg->cpioList. Iterate over -+ them and build a file list containing debug information for them. */ -+ if (headerGetEntry (pkg->header, RPMTAG_ARCH, &type, (void **)&ap, &count) -+ && type == RPM_STRING_TYPE && count == 1 -+ && strcmp (ap, "noarch") != 0 -+ && strcmp (ap, "src") != 0) ++ if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0) + { + Package dbg; + rpmfi fi = pkg->cpioList; @@ -194,10 +184,10 @@ Index: rpm-4.4.2.3/build/files.c + + name = rpmfiFN (fi); + /* Skip leading buildroot. */ -+ base = name + strlen (buildrooturl); ++ base = name + strlen (buildroot); + /* Pre-pend %buildroot/usr/lib/debug and append .debug. */ + snprintf (tmp, 1024, "%s/usr/lib/debug%s.debug", -+ buildrooturl, base); ++ buildroot, base); + /* If that file exists we have debug information for it. */ + if (access (tmp, F_OK) != 0) + continue; @@ -250,37 +240,33 @@ Index: rpm-4.4.2.3/build/files.c + headerNVR (pkg->header, &name, NULL, NULL); + /* Set name, summary and group. */ + snprintf (tmp, 1024, "%s-debuginfo", name); -+ headerAddEntry (dbg->header, RPMTAG_NAME, RPM_STRING_TYPE, tmp, 1); ++ headerPutString(dbg->header, RPMTAG_NAME, tmp); + snprintf (tmp, 1024, "Debug information for package %s", name); -+ headerAddEntry (dbg->header, RPMTAG_SUMMARY, RPM_STRING_TYPE, -+ tmp, 1); ++ headerPutString(dbg->header, RPMTAG_SUMMARY, tmp); + snprintf (tmp, 1024, "This package provides debug information for package %s.\n" + "Debug information is useful when developing applications that use this\n" + "package or when debugging this package.", name); -+ headerAddEntry (dbg->header, RPMTAG_DESCRIPTION, RPM_STRING_TYPE, -+ tmp, 1); -+ headerAddEntry (dbg->header, RPMTAG_GROUP, RPM_STRING_TYPE, -+ "Development/Debug", 1); ++ headerPutString(dbg->header, RPMTAG_DESCRIPTION, tmp); ++ headerPutString(dbg->header, RPMTAG_GROUP, "Development/Debug"); + /* Inherit other tags from parent. */ -+ headerCopyTags (pkg->header, dbg->header, -+ (int_32 *)copyTagsForDebug); ++ headerCopyTags (pkg->header, dbg->header, copyTagsForDebug); + + /* Build up the files list. */ + dbg->fileList = files; + } + } -+ -+ /* END DEBUGPKG */ +#endif ++ /* END DEBUGPKG */ + - if ((rc = rpmfcGenerateDepends(spec, pkg))) - res = rc; - } -Index: rpm-4.4.2.3/macros.in ++ if ((rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) + goto exit; + + if (strcmp(a, "noarch") == 0 && headerGetColor(pkg->header) != 0) { +Index: macros.in =================================================================== ---- rpm-4.4.2.3.orig/macros.in 2009-07-27 17:59:07.000000000 +0200 -+++ rpm-4.4.2.3/macros.in 2009-07-27 17:59:07.000000000 +0200 -@@ -173,24 +173,10 @@ +--- macros.in.orig ++++ macros.in +@@ -176,24 +176,10 @@ # Template for debug information sub-package. %debug_package \ %global __debug_package 1\ @@ -305,10 +291,10 @@ Index: rpm-4.4.2.3/macros.in %description debugsource\ This package provides debug sources for package %{name}.\ Debug sources are useful when developing applications that use this\ -Index: rpm-4.4.2.3/scripts/find-debuginfo.sh +Index: scripts/find-debuginfo.sh =================================================================== ---- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-27 17:59:06.000000000 +0200 -+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-27 17:59:10.000000000 +0200 +--- scripts/find-debuginfo.sh.orig ++++ scripts/find-debuginfo.sh @@ -274,19 +274,11 @@ while read nlinks inum f; do fi done || exit diff --git a/diskspace.diff b/diskspace.diff index bd0514a..f647151 100644 --- a/diskspace.diff +++ b/diskspace.diff @@ -6,7 +6,7 @@ Index: lib/rpmts.c =================================================================== --- lib/rpmts.c.orig +++ lib/rpmts.c -@@ -1358,14 +1358,14 @@ void rpmtsCheckDSIProblems(const rpmts t +@@ -924,14 +924,14 @@ void rpmtsCheckDSIProblems(const rpmts t rpmpsAppend(ps, RPMPROB_DISKSPACE, rpmteNEVRA(te), rpmteKey(te), ts->filesystems[i], NULL, NULL, diff --git a/disttag-macro.diff b/disttag-macro.diff index a294c43..e436aaf 100644 --- a/disttag-macro.diff +++ b/disttag-macro.diff @@ -1,6 +1,8 @@ ---- build/parsePreamble.c -+++ build/parsePreamble.c 2009/02/09 13:05:35 -@@ -330,6 +330,7 @@ +Index: build/parsePreamble.c +=================================================================== +--- build/parsePreamble.c.orig ++++ build/parsePreamble.c +@@ -311,6 +311,7 @@ static struct optionalTag { { RPMTAG_PACKAGER, "%{packager}" }, { RPMTAG_DISTRIBUTION, "%{distribution}" }, { RPMTAG_DISTURL, "%{disturl}" }, @@ -8,9 +10,11 @@ { -1, NULL } }; ---- macros.in -+++ macros.in 2009/02/09 13:03:08 -@@ -259,6 +259,16 @@ +Index: macros.in +=================================================================== +--- macros.in.orig ++++ macros.in +@@ -276,6 +276,16 @@ package or when debugging this package.\ # #%disturl diff --git a/elfflagreqprov.diff b/elfflagreqprov.diff deleted file mode 100644 index b815a78..0000000 --- a/elfflagreqprov.diff +++ /dev/null @@ -1,12 +0,0 @@ -Index: rpm-4.4.2.3/autodeps/linux.req -=================================================================== ---- rpm-4.4.2.3.orig/autodeps/linux.req 2009-07-24 11:38:21.000000000 +0200 -+++ rpm-4.4.2.3/autodeps/linux.req 2009-07-27 15:45:17.000000000 +0200 -@@ -110,6 +110,7 @@ for f in "${liblist[@]}" "${exelist[@]}" - } - } - /^Version References:$/ { START=2; } -+ /^private flags/ { START=3; } - (START==2) && /required from/ { - sub(/:/, "", $3); - LIBNAME=$3; diff --git a/extcond.diff b/extcond.diff index 4dcc626..20e2eed 100644 --- a/extcond.diff +++ b/extcond.diff @@ -4,11 +4,11 @@ assumed to be true. This mechanism is used by the weakdeps patch to filter the "RPMSENSE_STRONG" flag. -Index: rpmdb/header.c +Index: lib/headerfmt.c =================================================================== ---- rpmdb/header.c.orig -+++ rpmdb/header.c -@@ -2984,8 +2984,12 @@ static int parseExpression(headerSprintf +--- lib/headerfmt.c.orig ++++ lib/headerfmt.c +@@ -582,8 +582,12 @@ static int parseExpression(headerSprintf *endPtr = chptr; @@ -21,16 +21,16 @@ Index: rpmdb/header.c (void) findTag(hsa, token, str); return 0; -@@ -3226,6 +3230,7 @@ static char * singleSprintf(headerSprint - int_32 type; - int_32 count; +@@ -675,6 +679,7 @@ static char * singleSprintf(headerSprint + int i, j, found; + rpm_count_t count, numElements; sprintfToken spft; + sprintfTag stag; int condNumFormats; size_t need; -@@ -3257,6 +3262,18 @@ static char * singleSprintf(headerSprint - if (token->u.cond.tag.ext || headerIsEntry(hsa->h, token->u.cond.tag.tag)) { +@@ -705,6 +710,18 @@ static char * singleSprintf(headerSprint + headerIsEntry(hsa->h, token->u.cond.tag.tag)) { spft = token->u.cond.ifFormat; condNumFormats = token->u.cond.numIfTokens; + if (token->u.cond.tag.fmt) { @@ -48,33 +48,20 @@ Index: rpmdb/header.c } else { spft = token->u.cond.elseFormat; condNumFormats = token->u.cond.numElseTokens; -@@ -3278,19 +3295,22 @@ static char * singleSprintf(headerSprint - spft = token->u.array.format; +@@ -728,10 +745,13 @@ static char * singleSprintf(headerSprint for (i = 0; i < token->u.array.numTokens; i++, spft++) { + rpmtd td = NULL; - if (spft->type != PTOK_TAG || -- spft->u.tag.arrayCount || - spft->u.tag.justOne) continue; + if (spft->type != PTOK_TAG && spft->type != PTOK_COND) + continue; -+ + stag = (spft->type == PTOK_COND ? &spft->u.cond.tag : &spft->u.tag); -+ if (stag->arrayCount || stag->justOne) ++ if (stag->justOne) + continue; -- if (spft->u.tag.ext) { -+ if (stag->ext) { - /*@-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, -+ hsa->ec + stag->extNum)) - continue; - /*@=boundswrite@*/ - } else { - /*@-boundswrite@*/ -- if (!headerGetEntry(hsa->h, spft->u.tag.tag, &type, NULL, &count)) -+ if (!headerGetEntry(hsa->h, stag->tag, &type, NULL, &count)) - continue; - /*@=boundswrite@*/ - } +- if (!(td = getData(hsa, spft->u.tag.tag))) { ++ if (!(td = getData(hsa, stag->tag))) { + continue; + } + diff --git a/files.diff b/files.diff index d0a2ddd..a332314 100644 --- a/files.diff +++ b/files.diff @@ -2,12 +2,12 @@ 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; +@@ -2211,6 +2211,8 @@ static int checkFiles(StringBuf fileList + _("Installed (but unpackaged) file(s) found:\n%s"), t); + } } + else + checkFiles(check_fileList); - check_fileList = freeStringBuf(check_fileList); - + exit: + sb_stdout = freeStringBuf(sb_stdout); diff --git a/findfplistexclude.diff b/findfplistexclude.diff deleted file mode 100644 index f37ed56..0000000 --- a/findfplistexclude.diff +++ /dev/null @@ -1,114 +0,0 @@ -Allow an "exclude" parameter for rpmdbFindFp, specifying a header -that is to be excluded in the match. Used to speed up package erase -operations. -Also fixes the skipDir problem that made rpm incorrectly delete -files even if another package still references them. -rh#140055 - -Index: lib/transaction.c -=================================================================== ---- lib/transaction.c.orig -+++ lib/transaction.c -@@ -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)); -- if (rpmdbFindFpList(rpmtsGetRdb(ts), fi->fps, matches, fc)) { -+ if (rpmdbFindFpListExclude(rpmtsGetRdb(ts), fi->fps, matches, fc, rpmteType(p) == TR_REMOVED ? fi->record : 0)) { - ps = rpmpsFree(ps); - rpmtsFreeLock(lock); - return 1; /* XXX WTFO? */ -Index: rpmdb/fprint.h -=================================================================== ---- rpmdb/fprint.h.orig -+++ rpmdb/fprint.h -@@ -79,6 +79,12 @@ int rpmdbFindFpList(/*@null@*/ rpmdb db, - /*@modifies db, *matchList, rpmGlobalMacroContext, - fileSystem, internalState @*/; - -+int rpmdbFindFpListExclude(/*@null@*/ rpmdb db, fingerPrint * fpList, -+ /*@out@*/ dbiIndexSet * matchList, int numItems, unsigned int exclude) -+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ -+ /*@modifies db, *matchList, rpmGlobalMacroContext, -+ fileSystem, internalState @*/; -+ - /* Be carefull with the memory... assert(*fullName == '/' || !scareMemory) */ - - /** -Index: rpmdb/rpmdb.c -=================================================================== ---- rpmdb/rpmdb.c.orig -+++ rpmdb/rpmdb.c -@@ -2390,7 +2390,7 @@ static void rpmdbSortIterator(/*@null@*/ - } - - /*@-bounds@*/ /* LCL: segfault */ --static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum) -+static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum, unsigned int exclude) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/ - { -@@ -2401,7 +2401,7 @@ static int rpmdbGrowIterator(/*@null@*/ - dbiIndexSet set; - int rc; - int xx; -- int i; -+ int i, j; - - if (mi == NULL) - return 1; -@@ -2437,6 +2437,25 @@ static int rpmdbGrowIterator(/*@null@*/ - - set = NULL; - (void) dbt2set(dbi, data, &set); -+ -+ /* prune the set against exclude */ -+ for (i = j = 0; i < set->count; i++) { -+ if (exclude && set->recs[i].hdrNum == exclude) -+ continue; -+ if (i != j) -+ set->recs[j] = set->recs[i]; -+ j++; -+ } -+ if (j == 0) { -+#ifdef SQLITE_HACK -+ xx = dbiCclose(dbi, dbcursor, 0); -+ dbcursor = NULL; -+#endif -+ set = dbiFreeIndexSet(set); -+ return DB_NOTFOUND; -+ } -+ set->count = j; -+ - for (i = 0; i < set->count; i++) - set->recs[i].fpNum = fpNum; - -@@ -3412,6 +3431,12 @@ static int skipDir(const char * dn) - int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList, - int numItems) - { -+ return rpmdbFindFpListExclude(db, fpList, matchList, numItems, 0); -+} -+ -+int rpmdbFindFpListExclude(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList, -+ int numItems, unsigned int exclude) -+{ - DBT * key; - DBT * data; - HGE_t hge = (HGE_t)headerGetEntryMinMemory; -@@ -3443,10 +3468,13 @@ key->data = (void *) fpList[i].baseName; - key->size = strlen((char *)key->data); - if (key->size == 0) key->size++; /* XXX "/" fixup. */ - -- if (skipDir(fpList[i].entry->dirName)) -+ /* HACK HACK HACK: don't skip dirs while removing -+ * packages as we will loose files on conflicts. -+ * exclude is not zero when removing */ -+ if (!exclude && skipDir(fpList[i].entry->dirName)) - continue; - -- xx = rpmdbGrowIterator(mi, i); -+ xx = rpmdbGrowIterator(mi, i, exclude); - - } - diff --git a/findksyms.diff b/findksyms.diff index 2bccd1c..d279ad4 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -5,6 +5,8 @@ SUSE specific kernel provides/requires scripts scripts/find-requires.ksyms | 57 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) +Index: scripts/find-provides.ksyms +=================================================================== --- /dev/null +++ scripts/find-provides.ksyms @@ -0,0 +1,41 @@ @@ -49,6 +51,8 @@ SUSE specific kernel provides/requires scripts + | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" +done \ +| sort -u +Index: scripts/find-requires.ksyms +=================================================================== --- /dev/null +++ scripts/find-requires.ksyms @@ -0,0 +1,57 @@ @@ -109,3 +113,23 @@ SUSE specific kernel provides/requires scripts + { print "ksym(" flavor ":" arr[3] ") = " arr[2] } + ' +fi +Index: scripts/Makefile.am +=================================================================== +--- scripts/Makefile.am.orig ++++ scripts/Makefile.am +@@ -19,6 +19,7 @@ EXTRA_DIST = \ + tcl.req tgpg u_pkg.sh \ + vpkg-provides.sh vpkg-provides2.sh \ + find-requires.php find-provides.php \ ++ find-requires.ksyms find-provides.ksyms \ + find-php-provides find-php-requires \ + mono-find-requires mono-find-provides \ + pkgconfigdeps.sh libtooldeps.sh +@@ -33,6 +34,7 @@ rpmconfig_SCRIPTS = \ + check-buildroot check-rpaths check-rpaths-worker \ + find-lang.sh \ + perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \ ++ find-requires.ksyms find-provides.ksyms \ + mono-find-requires mono-find-provides \ + pkgconfigdeps.sh libtooldeps.sh \ + rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg diff --git a/findlang.diff b/findlang.diff index 0862f91..3be64ba 100644 --- a/findlang.diff +++ b/findlang.diff @@ -42,7 +42,7 @@ Index: scripts/find-lang.sh --with-qt ) QT= shift -@@ -97,32 +105,48 @@ while test $# -gt 0 ; do +@@ -97,33 +105,49 @@ while test $# -gt 0 ; do esac done @@ -60,7 +60,7 @@ Index: scripts/find-lang.sh 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"':: @@ -92,38 +92,42 @@ Index: scripts/find-lang.sh find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1: + '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%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"':: +@@ -131,7 +155,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: -+'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: -+'"$NO_ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) %doc \1\2\3: -+'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: -+'"$ALL_NAME$KDE"'s:\(.*/kde.*share/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) %doc \1\2\3: + KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null` + if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then +@@ -143,7 +167,7 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW + fi + + KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null` +@@ -156,7 +180,7 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: + s:^\([^%].*\):: + s:%lang(C) :: +-/^$/d' >> $MO_NAME ++/^$/d' >> $MO_NAME_NEW + fi 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: +@@ -168,7 +192,7 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: -/^$/d' >> $MO_NAME @@ -131,8 +135,8 @@ Index: scripts/find-lang.sh 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: +@@ -176,17 +200,22 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME @@ -140,7 +144,7 @@ Index: scripts/find-lang.sh 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: + '"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME @@ -149,9 +153,11 @@ Index: scripts/find-lang.sh -if ! grep -q / $MO_NAME; then +if ! grep -q / $MO_NAME_NEW; then echo "No translations found for ${NAME} in ${TOP_DIR}" -+ rm -rf $MO_NAME_NEW ++ rm -f $MO_NAME_NEW exit 1 fi ++ +sort -u $MO_NAME_NEW >> $MO_NAME +rm -f $MO_NAME_NEW ++ exit 0 diff --git a/fingerprint.diff b/fingerprint.diff deleted file mode 100644 index bf877d4..0000000 --- a/fingerprint.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- rpmio/rpmpgp.c.orig 2008-10-28 16:14:18.000000000 +0000 -+++ rpmio/rpmpgp.c 2008-10-28 16:09:51.000000000 +0000 -@@ -876,6 +876,7 @@ - const uint8_t *se, *h; - DIGEST_CTX ctx; - int rc = -1; /* assume failure. */ -+ byte in[3]; - - if (!(val & 0x80)) - return rc; -@@ -926,7 +927,12 @@ - } - - ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE); -- (void) rpmDigestUpdate(ctx, pkt, (se-pkt)); -+ i = se - h; -+ in[0] = 0x99; -+ in[1] = i >> 8; -+ in[2] = i; -+ (void) rpmDigestUpdate(ctx, in, 3); -+ (void) rpmDigestUpdate(ctx, h, i); - (void) rpmDigestFinal(ctx, (void **)&d, &dlen, 0); - - memmove(keyid, (d + (dlen-8)), 8); diff --git a/globlstat.diff b/globlstat.diff deleted file mode 100644 index 2ab4040..0000000 --- a/globlstat.diff +++ /dev/null @@ -1,20 +0,0 @@ -Always use lstat in glob call to work around a change in glibc's -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). - -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; -- pglob->gl_stat = Stat; -+ /* always use lstat to glob symlinks */ -+ pglob->gl_stat = Lstat; - /*@=type@*/ - flags |= GLOB_ALTDIRFUNC; - flags &= ~GLOB_TILDE; diff --git a/legacyprereq.diff b/legacyprereq.diff deleted file mode 100644 index 2f7af00..0000000 --- a/legacyprereq.diff +++ /dev/null @@ -1,16 +0,0 @@ -Keep RPMSENSE_PREREQ definition to be compatible with older -versions. Maybe not needed. - -diff -ur ./lib/rpmlib.h ../rpm-4.4.2.orig/lib/rpmlib.h ---- ./lib/rpmlib.h 2006-09-21 21:07:18.000000000 +0200 -+++ ../rpm-4.4.2.orig/lib/rpmlib.h 2006-09-21 20:59:00.000000000 +0200 -@@ -517,8 +517,7 @@ - RPMSENSE_EQUAL = (1 << 3), - RPMSENSE_PROVIDES = (1 << 4), /* only used internally by builds */ - RPMSENSE_CONFLICTS = (1 << 5), /* only used internally by builds */ -- /* bit 6 used to be RPMSENSE_PREREQ */ --#define RPMSENSE_PREREQ RPMSENSE_ANY -+ RPMSENSE_PREREQ = (1 << 6), /*!< @todo Legacy. */ - RPMSENSE_OBSOLETES = (1 << 7), /* only used internally by builds */ - RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet. */ - RPMSENSE_SCRIPT_PRE = ((1 << 9)|RPMSENSE_PREREQ), /*!< %pre dependency. */ diff --git a/localetag.diff b/localetag.diff index fd6e632..8f4ead9 100644 --- a/localetag.diff +++ b/localetag.diff @@ -1,25 +1,23 @@ Convert changelog and i18n header elements to current locale. [#43347], rh#140050 -Already in rpm-4.4.7 - -Index: lib/formats.c +Index: lib/tagexts.c =================================================================== ---- lib/formats.c.orig -+++ lib/formats.c +--- lib/tagexts.c.orig ++++ lib/tagexts.c @@ -2,6 +2,7 @@ * \file lib/formats.c */ +#include #include "system.h" - #include "rpmio_internal.h" - #include -@@ -18,6 +19,114 @@ - /*@access pgpDig @*/ - /*@access pgpDigParams @*/ -+static const char * strtolocale(const char *str) + #include +@@ -156,6 +157,114 @@ exit: + return rc; + } + ++static char * strtolocale(char *str) +{ + wchar_t *wstr, *wp; + const unsigned char *cp; @@ -101,7 +99,7 @@ Index: lib/formats.c + wstr = _free(wstr); + return str; + } -+ str = _free(str); ++ str = _free((char *)str); + memset(&ps, 0, sizeof(ps)); + ccl = cca = 0; + for (wp = wstr; ; wp++) { @@ -124,104 +122,79 @@ Index: lib/formats.c + } + } + wstr = _free(wstr); -+ return (const char *)cc; ++ return (char *)cc; +} + /** - * Identify type of trigger. - * @param type tag type -@@ -1080,6 +1189,7 @@ static int i18nTag(Header h, int_32 tag, + * Retrieve mounted file system paths. + * @param h header +@@ -534,9 +643,43 @@ static int i18nTag(Header h, rpmTag tag, + dstring = _free(dstring); - if (rc && (*data) != NULL) { - *data = xstrdup(*data); -+ *data = strtolocale(*data); - *freeData = 1; - return 0; - } -@@ -1091,6 +1201,56 @@ static int i18nTag(Header h, int_32 tag, - } - - /** -+ * Retrieve text and convert to locale. -+ */ -+static int localeTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type, -+ /*@out@*/ const void ** data, /*@out@*/ int_32 * count, -+ /*@out@*/ int * freeData) -+{ -+ HGE_t hge = (HGE_t)headerGetEntryMinMemory; -+ rpmTagType t; -+ char **d, **d2, *dp; -+ int rc, i, l; -+ -+ rc = hge(h, tag, &t, (void **)&d, count); -+ if (!rc || d == NULL || *count == 0) { -+ *freeData = 0; -+ *data = NULL; -+ *count = 0; -+ return 1; + rc = headerGet(h, tag, td, HEADERGET_DEFAULT); ++ if (rc && td->data) { ++ td->data = xstrdup(td->data); ++ td->data = strtolocale(td->data); ++ td->flags = RPMTD_ALLOCED; + } -+ if (type) -+ *type = t; -+ if (t == RPM_STRING_TYPE) { -+ d = (char **)xstrdup((char *)d); -+ d = (char **)strtolocale((char *)d); -+ *freeData = 1; -+ } else if (t == RPM_STRING_ARRAY_TYPE) { -+ l = 0; -+ for (i = 0; i < *count; i++) { -+ d[i] = xstrdup(d[i]); -+ d[i] = (char *)strtolocale(d[i]); -+ l += strlen(d[i]) + 1; -+ } -+ d2 = xmalloc(*count * sizeof(char *) + l); -+ dp = (char *)(d2 + *count); -+ for (i = 0; i < *count; i++) { -+ d2[i] = dp; -+ strcpy(dp, d[i]); -+ dp += strlen(dp) + 1; -+ d[i] = _free(d[i]); -+ } -+ d = _free(d); -+ d = d2; -+ *freeData = 1; -+ } else -+ *freeData = 0; -+ *data = (void **)d; -+ return 0; ++ return rc; +} + -+ +/** - * Retrieve summary text. - * @param h header - * @retval *type tag type -@@ -1130,6 +1290,20 @@ static int descriptionTag(Header h, /*@o - return i18nTag(h, RPMTAG_DESCRIPTION, type, data, count, freeData); ++ * Retrieve text and convert to locale. ++ */ ++static int localeTag(Header h, rpmTag tag, rpmtd td) ++{ ++ int rc; ++ rc = headerGet(h, tag, td, HEADERGET_DEFAULT); ++ if (!rc) ++ return 0; ++ if (td->type == RPM_STRING_TYPE) { ++ td->data = xstrdup(td->data); ++ td->data = strtolocale(td->data); ++ td->flags = RPMTD_ALLOCED; ++ td->count = 1; ++ } else if (td->type == RPM_STRING_ARRAY_TYPE) { ++ char **arr; ++ int i; ++ arr = xmalloc(td->count * sizeof(*arr)); ++ for (i = 0; i < td->count; i++) { ++ arr[i] = xstrdup(((char **)td->data)[i]); ++ arr[i] = strtolocale(arr[i]); ++ } ++ td->data = arr; ++ td->flags = RPMTD_ALLOCED | RPMTD_PTR_ALLOCED; ++ } + return rc; } -+static int changelognameTag(Header h, /*@out@*/ rpmTagType * type, -+ /*@out@*/ const void ** data, /*@out@*/ int_32 * count, -+ /*@out@*/ int * freeData) ++ + /** + * Retrieve summary text. + * @param h header +@@ -559,6 +702,16 @@ static int descriptionTag(Header h, rpmt + return i18nTag(h, RPMTAG_DESCRIPTION, td); + } + ++static int changelognameTag(Header h, rpmtd td) +{ -+ return localeTag(h, RPMTAG_CHANGELOGNAME, type, data, count, freeData); ++ return localeTag(h, RPMTAG_CHANGELOGNAME, td); +} + -+static int changelogtextTag(Header h, /*@out@*/ rpmTagType * type, -+ /*@out@*/ const void ** data, /*@out@*/ int_32 * count, -+ /*@out@*/ int * freeData) ++static int changelogtextTag(Header h, rpmtd td) +{ -+ return localeTag(h, RPMTAG_CHANGELOGTEXT, type, data, count, freeData); ++ return localeTag(h, RPMTAG_CHANGELOGTEXT, td); +} + /** * Retrieve group text. * @param h header -@@ -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 } }, -+ { HEADER_EXT_TAG, "RPMTAG_CHANGELOGNAME", { changelognameTag } }, -+ { HEADER_EXT_TAG, "RPMTAG_CHANGELOGTEXT", { changelogtextTag } }, - { HEADER_EXT_TAG, "RPMTAG_FILECLASS", { fileclassTag } }, - { HEADER_EXT_TAG, "RPMTAG_FILECONTEXTS", { filecontextsTag } }, - { HEADER_EXT_TAG, "RPMTAG_FILENAMES", { filenamesTag } }, +@@ -663,6 +816,8 @@ static const struct headerTagFunc_s rpmH + { RPMTAG_LONGARCHIVESIZE, longarchivesizeTag }, + { RPMTAG_LONGSIZE, longsizeTag }, + { RPMTAG_LONGSIGSIZE, longsigsizeTag }, ++ { RPMTAG_CHANGELOGNAME, changelognameTag }, ++ { RPMTAG_CHANGELOGTEXT, changelogtextTag }, + { 0, NULL } + }; + diff --git a/luaroot.diff b/luaroot.diff index ee66eac..764aec9 100644 --- a/luaroot.diff +++ b/luaroot.diff @@ -2,67 +2,55 @@ Index: lib/psm.c =================================================================== --- lib/psm.c.orig +++ lib/psm.c -@@ -506,6 +506,8 @@ static rpmRC runLuaScript(rpmpsm psm, He - { - const rpmts ts = psm->ts; +@@ -441,6 +441,8 @@ static rpmRC runLuaScript(rpmpsm psm, He + #ifdef WITH_LUA + char *sname = NULL; int rootFd = -1; + int chroot_done; + const char *rootDir; - const char *n, *v, *r; - rpmRC rc = RPMRC_OK; - int i; -@@ -515,20 +517,27 @@ static rpmRC runLuaScript(rpmpsm psm, He - - xx = headerNVR(h, &n, &v, &r); + int xx; + rpmlua lua = NULL; /* Global state. */ + rpmluav var; +@@ -449,16 +451,21 @@ static rpmRC runLuaScript(rpmpsm psm, He + rpmlog(RPMLOG_DEBUG, "%s: %s running scriptlet.\n", + psm->stepName, sname); - if (!rpmtsChrootDone(ts)) { - const char *rootDir = rpmtsRootDir(ts); - xx = chdir("/"); +- rootFd = open(".", O_RDONLY, 0); +- if (rootFd >= 0) { +- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') + chroot_done = rpmtsChrootDone(ts); + rootDir = rpmtsRootDir(ts); + if (!chroot_done) { + if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') { + xx = chdir("/"); - /*@-nullpass@*/ -- rootFd = open(".", O_RDONLY, 0); + rootFd = open(".", O_RDONLY, 0); - /*@=nullpass@*/ -- if (rootFd >= 0) { -- /*@-superuser -noeffect @*/ -- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') + if (rootFd >= 0) { -+ /*@-superuser -noeffect @*/ xx = chroot(rootDir); -- /*@=superuser =noeffect @*/ - xx = rpmtsSetChrootDone(ts, 1); -+ /*@=superuser =noeffect @*/ + xx = rpmtsSetChrootDone(ts, 1); + } } + } else { -+/*@-nullpass@*/ + rootFd = open(".", O_RDONLY, 0); -+/*@=nullpass@*/ } + xx = chdir("/"); /* Create arg variable */ rpmluaPushTable(lua, "arg"); -@@ -565,14 +574,19 @@ static rpmRC runLuaScript(rpmpsm psm, He +@@ -491,12 +498,17 @@ static rpmRC runLuaScript(rpmpsm psm, He rpmluaDelVar(lua, "arg"); if (rootFd >= 0) { - const char *rootDir = rpmtsRootDir(ts); xx = fchdir(rootFd); xx = close(rootFd); -- /*@-superuser -noeffect @*/ - if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') + if (!chroot_done) { -+ /*@-superuser -noeffect @*/ xx = chroot("."); -- /*@=superuser =noeffect @*/ - xx = rpmtsSetChrootDone(ts, 0); -+ /*@=superuser =noeffect @*/ + xx = rpmtsSetChrootDone(ts, 0); + } + } @@ -71,5 +59,5 @@ Index: lib/psm.c + if (currDir != NULL) + xx = chdir(currDir); } - - return rc; + free(sname); + #else diff --git a/lzma-payload-2.diff b/lzma-payload-2.diff deleted file mode 100644 index d0e9993..0000000 --- a/lzma-payload-2.diff +++ /dev/null @@ -1,454 +0,0 @@ -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) -+#define LZDONLY(fd) assert(fdGetIo(fd) == lzdio) - - #define UFDONLY(fd) /* assert(fdGetIo(fd) == ufdio) */ - -@@ -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 -+ } else if (fps->io == lzdio) { -+ sprintf(be, "LZD %p fdno %d", fps->fp, fps->fdno); - } else if (fps->io == fpio) { - /*@+voidabstract@*/ - sprintf(be, "%s %p(%d) fdno %d", -@@ -2782,6 +2785,348 @@ FDIO_t bzdio = /*@-compmempass@*/ &bzdio - /*@=moduncon@*/ - #endif /* HAVE_BZLIB_H */ - -+#include -+#include -+#include -+ -+#define kBufferSize (1 << 15) -+ -+typedef struct lzfile { -+ /* IO buffer */ -+ uint8_t buf[kBufferSize]; -+ -+ lzma_stream strm; -+ -+ FILE *file; -+ -+ int encoding; -+ int eof; -+ -+} LZFILE; -+ -+static LZFILE *lzopen_internal(const char *path, const char *mode, int fd) -+{ -+ int level = 5; -+ int encoding = 0; -+ FILE *fp; -+ LZFILE *lzfile; -+ lzma_ret ret; -+ -+ for (; *mode; mode++) { -+ if (*mode == 'w') -+ encoding = 1; -+ else if (*mode == 'r') -+ encoding = 0; -+ else if (*mode >= '1' && *mode <= '9') -+ level = *mode - '0'; -+ } -+ if (fd != -1) -+ fp = fdopen(fd, encoding ? "w" : "r"); -+ else -+ fp = fopen(path, encoding ? "w" : "r"); -+ if (!fp) -+ return 0; -+ lzfile = calloc(1, sizeof(*lzfile)); -+ if (!lzfile) { -+ fclose(fp); -+ return 0; -+ } -+ lzfile->file = fp; -+ lzfile->encoding = encoding; -+ lzfile->eof = 0; -+ lzfile->strm = LZMA_STREAM_INIT_VAR; -+ if (encoding) { -+ lzma_options_alone alone; -+ alone.uncompressed_size = LZMA_VLI_VALUE_UNKNOWN; -+ memcpy(&alone.lzma, &lzma_preset_lzma[level - 1], sizeof(alone.lzma)); -+ ret = lzma_alone_encoder(&lzfile->strm, &alone); -+ } else { -+ ret = lzma_auto_decoder(&lzfile->strm, 0, 0); -+ } -+ if (ret != LZMA_OK) { -+ fclose(fp); -+ free(lzfile); -+ return 0; -+ } -+ return lzfile; -+} -+ -+static LZFILE *lzopen(const char *path, const char *mode) -+{ -+ return lzopen_internal(path, mode, -1); -+} -+ -+static LZFILE *lzdopen(int fd, const char *mode) -+{ -+ if (fd < 0) -+ return 0; -+ return lzopen_internal(0, mode, fd); -+} -+ -+static int lzflush(LZFILE *lzfile) -+{ -+ return fflush(lzfile->file); -+} -+ -+static int lzclose(LZFILE *lzfile) -+{ -+ lzma_ret ret; -+ int n; -+ -+ if (!lzfile) -+ return -1; -+ if (lzfile->encoding) { -+ for (;;) { -+ lzfile->strm.avail_out = kBufferSize; -+ lzfile->strm.next_out = lzfile->buf; -+ ret = lzma_code(&lzfile->strm, LZMA_FINISH); -+ if (ret != LZMA_OK && ret != LZMA_STREAM_END) -+ return -1; -+ n = kBufferSize - lzfile->strm.avail_out; -+ if (n && fwrite(lzfile->buf, 1, n, lzfile->file) != n) -+ return -1; -+ if (ret == LZMA_STREAM_END) -+ break; -+ } -+ } -+ lzma_end(&lzfile->strm); -+ return fclose(lzfile->file); -+ free(lzfile); -+} -+ -+static ssize_t lzread(LZFILE *lzfile, void *buf, size_t len) -+{ -+ lzma_ret ret; -+ int eof = 0; -+ -+ if (!lzfile || lzfile->encoding) -+ return -1; -+ if (lzfile->eof) -+ return 0; -+ lzfile->strm.next_out = buf; -+ lzfile->strm.avail_out = len; -+ for (;;) { -+ if (!lzfile->strm.avail_in) { -+ lzfile->strm.next_in = lzfile->buf; -+ lzfile->strm.avail_in = fread(lzfile->buf, 1, kBufferSize, lzfile->file); -+ if (!lzfile->strm.avail_in) -+ eof = 1; -+ } -+ ret = lzma_code(&lzfile->strm, LZMA_RUN); -+ if (ret == LZMA_STREAM_END) { -+ lzfile->eof = 1; -+ return len - lzfile->strm.avail_out; -+ } -+ if (ret != LZMA_OK) -+ return -1; -+ if (!lzfile->strm.avail_out) -+ return len; -+ if (eof) -+ return -1; -+ } -+} -+ -+static ssize_t lzwrite(LZFILE *lzfile, void *buf, size_t len) -+{ -+ lzma_ret ret; -+ int n; -+ if (!lzfile || !lzfile->encoding) -+ return -1; -+ if (!len) -+ return 0; -+ lzfile->strm.next_in = buf; -+ lzfile->strm.avail_in = len; -+ for (;;) { -+ lzfile->strm.next_out = lzfile->buf; -+ lzfile->strm.avail_out = kBufferSize; -+ ret = lzma_code(&lzfile->strm, LZMA_RUN); -+ if (ret != LZMA_OK) -+ return -1; -+ n = kBufferSize - lzfile->strm.avail_out; -+ if (n && fwrite(lzfile->buf, 1, n, lzfile->file) != n) -+ return -1; -+ if (!lzfile->strm.avail_in) -+ return len; -+ } -+} -+ -+/* =============================================================== */ -+ -+static inline /*@dependent@*/ void * lzdFileno(FD_t fd) -+ /*@*/ -+{ -+ void * rc = NULL; -+ int i; -+ -+ FDSANE(fd); -+ for (i = fd->nfps; i >= 0; i--) { -+/*@-boundsread@*/ -+ FDSTACK_t * fps = &fd->fps[i]; -+/*@=boundsread@*/ -+ if (fps->io != lzdio) -+ continue; -+ rc = fps->fp; -+ break; -+ } -+ -+ return rc; -+} -+ -+/*@-globuse@*/ -+static /*@null@*/ FD_t lzdOpen(const char * path, const char * mode) -+ /*@globals fileSystem @*/ -+ /*@modifies fileSystem @*/ -+{ -+ FD_t fd; -+ LZFILE *lzfile; -+ if ((lzfile = lzopen(path, mode)) == NULL) -+ return NULL; -+ fd = fdNew("open (lzdOpen)"); -+ fdPop(fd); fdPush(fd, lzdio, lzfile, -1); -+ return fdLink(fd, "lzdOpen"); -+} -+/*@=globuse@*/ -+ -+ -+/*@-globuse@*/ -+static /*@null@*/ FD_t lzdFdopen(void * cookie, const char * fmode) -+ /*@globals fileSystem, internalState @*/ -+ /*@modifies fileSystem, internalState @*/ -+{ -+ FD_t fd = c2f(cookie); -+ int fdno; -+ LZFILE *lzfile; -+ -+ if (fmode == NULL) return NULL; -+ fdno = fdFileno(fd); -+ fdSetFdno(fd, -1); /* XXX skip the fdio close */ -+ if (fdno < 0) return NULL; -+ lzfile = lzdopen(fdno, fmode); -+ if (lzfile == NULL) return NULL; -+ fdPush(fd, lzdio, lzfile, fdno); -+ return fdLink(fd, "lzdFdopen"); -+} -+/*@=globuse@*/ -+ -+/*@-globuse@*/ -+static int lzdFlush(FD_t fd) -+ /*@globals fileSystem @*/ -+ /*@modifies fileSystem @*/ -+{ -+ return lzflush(lzdFileno(fd)); -+} -+/*@=globuse@*/ -+ -+/* =============================================================== */ -+/*@-globuse@*/ -+/*@-mustmod@*/ /* LCL: *buf is modified */ -+static ssize_t lzdRead(void * cookie, /*@out@*/ char * buf, size_t count) -+ /*@globals fileSystem, internalState @*/ -+ /*@modifies *buf, fileSystem, internalState @*/ -+{ -+ FD_t fd = c2f(cookie); -+ LZFILE *lzfile; -+ ssize_t rc = 0; -+ -+ if (fd->bytesRemain == 0) return 0; /* XXX simulate EOF */ -+ lzfile = lzdFileno(fd); -+ fdstat_enter(fd, FDSTAT_READ); -+ if (lzfile) -+ /*@-compdef@*/ -+ rc = lzread(lzfile, buf, count); -+ /*@=compdef@*/ -+ if (rc == -1) { -+ fd->errcookie = "Lzma: decoding error"; -+ } else if (rc >= 0) { -+ fdstat_exit(fd, FDSTAT_READ, rc); -+ /*@-compdef@*/ -+ if (fd->ndigests && rc > 0) fdUpdateDigests(fd, (void *)buf, rc); -+ /*@=compdef@*/ -+ } -+ return rc; -+} -+/*@=mustmod@*/ -+/*@=globuse@*/ -+ -+/*@-globuse@*/ -+static ssize_t lzdWrite(void * cookie, const char * buf, size_t count) -+/*@globals fileSystem, internalState @*/ -+/*@modifies fileSystem, internalState @*/ -+{ -+ FD_t fd = c2f(cookie); -+ LZFILE *lzfile; -+ ssize_t rc = 0; -+ -+ if (fd == NULL || fd->bytesRemain == 0) return 0; /* XXX simulate EOF */ -+ -+ if (fd->ndigests && count > 0) fdUpdateDigests(fd, (void *)buf, count); -+ -+ lzfile = lzdFileno(fd); -+ -+ fdstat_enter(fd, FDSTAT_WRITE); -+ rc = lzwrite(lzfile, (void *)buf, count); -+ if (rc < 0) { -+ fd->errcookie = "Lzma: encoding error"; -+ } else if (rc > 0) { -+ fdstat_exit(fd, FDSTAT_WRITE, rc); -+ } -+ return rc; -+} -+ -+static inline int lzdSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, -+ /*@unused@*/ int whence) -+ /*@*/ -+{ -+ FD_t fd = c2f(cookie); -+ -+ LZDONLY(fd); -+ return -2; -+} -+ -+static int lzdClose( /*@only@*/ void * cookie) -+ /*@globals fileSystem, internalState @*/ -+ /*@modifies fileSystem, internalState @*/ -+{ -+ FD_t fd = c2f(cookie); -+ LZFILE *lzfile; -+ int rc; -+ -+ lzfile = lzdFileno(fd); -+ -+ if (lzfile == NULL) return -2; -+ fdstat_enter(fd, FDSTAT_CLOSE); -+ /*@-dependenttrans@*/ -+ rc = lzclose(lzfile); -+ /*@=dependenttrans@*/ -+ -+ /* XXX TODO: preserve fd if errors */ -+ -+ if (fd) { -+ if (rc == -1) { -+ fd->errcookie = strerror(ferror(lzfile->file)); -+ } else if (rc >= 0) { -+ fdstat_exit(fd, FDSTAT_CLOSE, rc); -+ } -+ } -+ -+DBGIO(fd, (stderr, "==>\tlzdClose(%p) rc %lx %s\n", cookie, (unsigned long)rc, fdbg(fd))); -+ -+ if (_rpmio_debug || rpmIsDebug()) fdstat_print(fd, "LZDIO", stderr); -+ /*@-branchstate@*/ -+ if (rc == 0) -+ fd = fdFree(fd, "open (lzdClose)"); -+ /*@=branchstate@*/ -+ return rc; -+} -+ -+/*@-type@*/ /* LCL: function typedefs */ -+static struct FDIO_s lzdio_s = { -+ lzdRead, lzdWrite, lzdSeek, lzdClose, XfdLink, XfdFree, XfdNew, fdFileno, -+ NULL, lzdOpen, lzdFileno, lzdFlush, NULL, NULL, NULL, NULL, NULL -+}; -+/*@=type@*/ -+FDIO_t lzdio = /*@-compmempass@*/ &lzdio_s /*@=compmempass@*/ ; -+ - /* =============================================================== */ - /*@observer@*/ - 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 */ -- -+ if (fdGetIo(fd) == lzdio) { -+ errstr = fd->errcookie; -+ } else - { - errstr = (fd->syserrno ? strerror(fd->syserrno) : ""); - } -@@ -3114,6 +3461,9 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n" - fd = bzdFdopen(fd, zstdio); - /*@=internalglobs@*/ - #endif -+ } else if (!strcmp(end, "lzdio")) { -+ iof = lzdio; -+ fd = lzdFdopen(fd, zstdio); - } else if (!strcmp(end, "ufdio")) { - iof = ufdio; - } else if (!strcmp(end, "fpio")) { -@@ -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 -+ } else if (fps->io == lzdio) { -+ ec = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0; -+ i--; /* XXX fdio under lzdio always has fdno == -1 */ - } else { - /* XXX need to check ufdio/gzdio/bzdio/fdio errors correctly. */ - ec = (fdFileno(fd) < 0 ? -1 : 0); ---- rpmio/rpmio.c 2009-02-11 10:48:50.000000000 +0100 -+++ rpmio.c 2009-02-11 12:32:05.000000000 +0100 -@@ -2834,11 +2834,12 @@ - lzfile->file = fp; - lzfile->encoding = encoding; - lzfile->eof = 0; -- lzfile->strm = LZMA_STREAM_INIT_VAR; -+ lzma_stream tmp = LZMA_STREAM_INIT; -+ lzfile->strm = tmp; -+ - if (encoding) { -- lzma_options_alone alone; -- alone.uncompressed_size = LZMA_VLI_VALUE_UNKNOWN; -- memcpy(&alone.lzma, &lzma_preset_lzma[level - 1], sizeof(alone.lzma)); -+ lzma_options_lzma alone; -+ lzma_lzma_preset(&alone, level - 1); - ret = lzma_alone_encoder(&lzfile->strm, &alone); - } else { - ret = lzma_auto_decoder(&lzfile->strm, 0, 0); ---- rpmio.orig/rpmio.c 2009-02-12 15:13:46.000000000 +0100 -+++ rpmio/rpmio.c 2009-02-12 15:58:36.000000000 +0100 -@@ -2842,7 +2842,7 @@ - lzma_lzma_preset(&alone, level - 1); - ret = lzma_alone_encoder(&lzfile->strm, &alone); - } else { -- ret = lzma_auto_decoder(&lzfile->strm, 0, 0); -+ ret = lzma_alone_decoder(&lzfile->strm, UINT64_C(1) << 24); - } - if (ret != LZMA_OK) { - fclose(fp); -@@ -2918,12 +2918,19 @@ - lzfile->eof = 1; - return len - lzfile->strm.avail_out; - } -- if (ret != LZMA_OK) -+ if (ret == LZMA_MEMLIMIT_ERROR) { -+ ret = lzma_memlimit_set(&lzfile->strm, 1 << 31); -+ continue; -+ } -+ if (ret != LZMA_OK) { - return -1; -- if (!lzfile->strm.avail_out) -+ } -+ if (!lzfile->strm.avail_out) { - return len; -- if (eof) -+ } -+ if (eof) { - return -1; -+ } - } - } - diff --git a/lzma-payload.diff b/lzma-payload.diff deleted file mode 100644 index 59a77c8..0000000 --- a/lzma-payload.diff +++ /dev/null @@ -1,116 +0,0 @@ -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"); - } -+ if (s[1] == 'l' && s[2] == 'z') { -+ (void) headerAddEntry(h, RPMTAG_PAYLOADCOMPRESSOR, RPM_STRING_TYPE, -+ "lzma", 1); -+ (void) rpmlibNeedsFeature(h, "PayloadIsLzma", "4.4.2-1"); -+ } - strcpy(buf, rpmio_flags); - buf[s - rpmio_flags] = '\0'; - (void) headerAddEntry(h, RPMTAG_PAYLOADFLAGS, RPM_STRING_TYPE, buf+1, 1); -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"); -+ if (!strcmp(payload_compressor, "lzma")) -+ t = stpcpy(t, ".lzdio"); - rc = RPMRC_OK; - } break; - -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 -+ { "rpmlib(PayloadIsLzma)", "4.4.2-1", -+ (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), -+ N_("package payload can be compressed using lzma.") }, - { NULL, NULL, 0, NULL } - }; - -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 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")) - t = stpcpy(t, ".bzdio"); -+ if (!strcmp(payload_compressor, "lzma")) -+ t = stpcpy(t, ".lzdio"); - } - - gzdi = Fdopen(fdi, rpmio_flags); /* XXX gzdi == fdi */ -Index: rpmio/rpmio.h -=================================================================== ---- rpmio/rpmio.h.orig -+++ rpmio/rpmio.h -@@ -669,6 +669,10 @@ int ufdGetFile( /*@killref@*/ FD_t sfd, - - /** - */ -+/*@observer@*/ /*@unchecked@*/ extern FDIO_t lzdio; -+ -+/** -+ */ - /*@observer@*/ /*@unchecked@*/ extern FDIO_t fadio; - /*@=exportlocal@*/ - /*@}*/ -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` - --dd if=$pkg ibs=$o skip=1 2>/dev/null | gunzip -+comp=`dd if="$pkg" ibs=$o skip=1 count=1 2>/dev/null \ -+ | dd bs=3 count=1 2>/dev/null` -+ -+gz="`echo . | awk '{ printf("%c%c", 0x1f, 0x8b); }'`" -+case "$comp" in -+ BZh) dd if="$pkg" ibs=$o skip=1 2>/dev/null | bunzip2 ;; -+ "$gz"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;; -+ # no magic in old lzma format, if unknown we assume that's lzma for now -+ *) dd if="$pkg" ibs=$o skip=1 2>/dev/null | unlzma ;; -+ #*) echo "Unrecognized rpm file: $pkg"; return 1 ;; -+esac -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 --librpmio_la_LIBADD = $(BEECRYPTLOBJS) -+librpmio_la_LIBADD = $(BEECRYPTLOBJS) -llzma - librpmio_la_DEPENDENCIES = .created - - .created: diff --git a/macrosin.diff b/macrosin.diff index 0818b05..02b3480 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -4,7 +4,7 @@ Index: macros.in =================================================================== --- macros.in.orig +++ macros.in -@@ -171,22 +171,22 @@ +@@ -175,22 +175,22 @@ # Template for debug information sub-package. %debug_package \ @@ -27,31 +27,40 @@ Index: macros.in -%endif\ %{nil} --%_defaultdocdir %{_usr}/doc -+%_defaultdocdir %{_usr}/doc/packages -+%_docdir_fmt %%{NAME} +-%_defaultdocdir %{_datadir}/doc ++%_defaultdocdir %{_datadir}/doc/packages ++%_docdir_fmt %%{NAME} # The path to the gzip executable (legacy, use %{__gzip} instead). %_gzipbin %{__gzip} -@@ -223,7 +223,7 @@ package or when debugging this package.\ +@@ -233,7 +233,7 @@ package or when debugging this package.\ %_tmppath %{_var}/tmp # Path to top of build area. --%_topdir %{_usrsrc}/redhat +-%_topdir %{getenv:HOME}/rpmbuild +%_topdir %{_usrsrc}/packages # The path to the unzip executable (legacy, use %{__unzip} instead). %_unzipbin %{__unzip} -@@ -328,7 +328,7 @@ package or when debugging this package.\ - # "w9.bzdio" bzip2 level 9. +@@ -330,7 +330,7 @@ package or when debugging this package.\ + # "w7.lzdio" lzma-alone level 7, lzma's default # #%_source_payload w9.gzdio -#%_binary_payload w9.gzdio +%_binary_payload w2.lzdio - # The signature to use and the location of configuration files for - # signing packages with PGP. -@@ -383,7 +383,7 @@ package or when debugging this package.\ + # Algorithm to use for generating file checksum digests on build. + # If not specified or 0, MD5 is used. +@@ -357,7 +357,7 @@ package or when debugging this package.\ + #%vendor + + # Default fuzz level for %patch in spec file. +-%_default_patch_fuzz 0 ++%_default_patch_fuzz 2 + + # Default patch flags + %_default_patch_flags -s +@@ -420,7 +420,7 @@ package or when debugging this package.\ # # Use internal dependency generator rather than external helpers? @@ -60,7 +69,7 @@ Index: macros.in # # Filter GLIBC_PRIVATE Provides: and Requires: -@@ -426,16 +426,22 @@ print (t)\ +@@ -466,16 +466,22 @@ print (t)\ # Undefined, missing or %{nil} will use package content (if available). %_verify_file_context_path %{__file_context_path} @@ -72,12 +81,12 @@ Index: macros.in # 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 --%__find_provides @RPMCONFIGDIR@/find-provides --%__find_requires @RPMCONFIGDIR@/find-requires -+%__find_provides @RPMCONFIGDIR@/find-provides %name -+%__find_requires @RPMCONFIGDIR@/find-requires %name + #%__find_provides %{_rpmconfigdir}/rpmdeps --provides + #%__find_requires %{_rpmconfigdir}/rpmdeps --requires +-%__find_provides %{_rpmconfigdir}/find-provides +-%__find_requires %{_rpmconfigdir}/find-requires ++%__find_provides %{_rpmconfigdir}/find-provides %name ++%__find_requires %{_rpmconfigdir}/find-requires %name #%__find_conflicts ??? #%__find_obsoletes ??? +#%__find_supplements ??? @@ -85,7 +94,7 @@ Index: macros.in # # Path to scripts to autogenerate per-interpreter package dependencies, -@@ -606,15 +612,15 @@ print (t)\ +@@ -638,15 +644,15 @@ print (t)\ %_dbi_config_Packages %{_dbi_htconfig} lockdbfd # "Depends" is a per-transaction cache of known dependency resolutions. @@ -108,7 +117,7 @@ Index: macros.in # XXX legacy configuration. # Choose db interface: -@@ -1038,7 +1044,7 @@ print (t)\ +@@ -1008,7 +1014,7 @@ print (t)\ %_build_vendor %{_host_vendor} %_build_os %{_host_os} %_host @host@ @@ -117,7 +126,7 @@ Index: macros.in %_host_cpu @host_cpu@ %_host_vendor @host_vendor@ %_host_os @host_os@ -@@ -1194,6 +1200,181 @@ done \ +@@ -1168,6 +1174,181 @@ done \ %perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib) %perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) @@ -299,19 +308,18 @@ Index: macros.in #------------------------------------------------------------------------------ # arch macro for all Intel i?86 compatibile processors # (Note: This macro (and it's analogues) will probably be obsoleted when -@@ -1204,8 +1385,9 @@ done \ +@@ -1178,7 +1359,9 @@ 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 +-%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l ++%arm armv3l armv4b armv4l armv4tl armv5b armv5l armv5teb armv5tel armv5tejl armv6l armv7l ++%arml armv3l armv4l armv5l armv5tel armv6l armv7l ++%armb armv4b armv5b armv5teb #------------------------------------------------------------------------------ - # arch macro for all supported Alpha processors -@@ -1224,3 +1406,26 @@ done \ + # arch macro for all supported Sparc processors +@@ -1207,3 +1390,26 @@ done \ # \endverbatim #*/ diff --git a/mimetype.diff b/mimetype.diff index 5b4020d..886cf38 100644 --- a/mimetype.diff +++ b/mimetype.diff @@ -1,5 +1,7 @@ ---- ./autodeps/linux.prov.orig 2008-09-12 16:23:17.000000000 +0000 -+++ ./autodeps/linux.prov 2008-09-12 16:37:03.000000000 +0000 +Index: autodeps/linux.prov +=================================================================== +--- autodeps/linux.prov.orig ++++ autodeps/linux.prov @@ -11,6 +11,7 @@ solist=($(printf "%s\n" "${filelist[@]}" pythonlist= tcllist= diff --git a/missingok.diff b/missingok.diff index a4e1412..5eeac43 100644 --- a/missingok.diff +++ b/missingok.diff @@ -4,8 +4,8 @@ Index: lib/depends.c =================================================================== --- lib/depends.c.orig +++ lib/depends.c -@@ -593,8 +593,13 @@ retry: - /*@=boundsread@*/ +@@ -518,8 +518,13 @@ retry: + } unsatisfied: - rc = 1; /* dependency is unsatisfied */ @@ -20,7 +20,7 @@ Index: lib/depends.c exit: /* -@@ -963,6 +968,8 @@ static inline /*@observer@*/ const char +@@ -827,6 +832,8 @@ static inline const char * identifyDepen return "Requires(postun):"; if (f & RPMSENSE_SCRIPT_VERIFY) return "Requires(verify):"; @@ -29,11 +29,11 @@ Index: lib/depends.c if (f & RPMSENSE_FIND_REQUIRES) return "Requires(auto):"; return "Requires:"; -Index: lib/rpmlib.h +Index: lib/rpmds.h =================================================================== ---- lib/rpmlib.h.orig -+++ lib/rpmlib.h -@@ -548,6 +548,7 @@ typedef enum rpmsenseFlags_e { +--- lib/rpmds.h.orig ++++ lib/rpmds.h +@@ -73,6 +73,7 @@ typedef enum rpmsenseFlags_e { RPMSENSE_SCRIPT_POSTUN | \ RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_FIND_REQUIRES | \ diff --git a/modalias.diff b/modalias.diff index 88f2b35..b6dcff6 100644 --- a/modalias.diff +++ b/modalias.diff @@ -4,7 +4,7 @@ Index: macros.in =================================================================== --- macros.in.orig +++ macros.in -@@ -433,14 +433,18 @@ print (t)\ +@@ -473,14 +473,18 @@ print (t)\ # # Path to scripts to autogenerate package dependencies, # @@ -13,16 +13,16 @@ Index: macros.in +posix.setenv("RPMBUILD_SOURCEDIR",rpm.expand("%?_sourcedir")); +} # Note: Used iff _use_internal_dependency_generator is zero. - #%__find_provides @RPMCONFIGDIR@/rpmdeps --provides - #%__find_requires @RPMCONFIGDIR@/rpmdeps --requires --%__find_provides @RPMCONFIGDIR@/find-provides %name --%__find_requires @RPMCONFIGDIR@/find-requires %name -+%__find_provides %{__set_helper_env}@RPMCONFIGDIR@/find-provides %name -+%__find_requires %{__set_helper_env}@RPMCONFIGDIR@/find-requires %name + #%__find_provides %{_rpmconfigdir}/rpmdeps --provides + #%__find_requires %{_rpmconfigdir}/rpmdeps --requires +-%__find_provides %{_rpmconfigdir}/find-provides %name +-%__find_requires %{_rpmconfigdir}/find-requires %name ++%__find_provides %{__set_helper_env}%{_rpmconfigdir}/find-provides %name ++%__find_requires %{__set_helper_env}%{_rpmconfigdir}/find-requires %name #%__find_conflicts ??? #%__find_obsoletes ??? -#%__find_supplements ??? -+%__find_supplements %{__set_helper_env}@RPMCONFIGDIR@/find-supplements %name ++%__find_supplements %{__set_helper_env}%{_rpmconfigdir}/find-supplements %name #%__find_enhances ??? # diff --git a/nameversioncompare.diff b/nameversioncompare.diff index c02343d..bcf5ce7 100644 --- a/nameversioncompare.diff +++ b/nameversioncompare.diff @@ -5,7 +5,7 @@ Index: lib/depends.c =================================================================== --- lib/depends.c.orig +++ lib/depends.c -@@ -124,6 +124,24 @@ static int removePackage(rpmts ts, Heade +@@ -102,6 +102,24 @@ static int removePackage(rpmts ts, Heade return 0; } @@ -30,7 +30,7 @@ Index: lib/depends.c int rpmtsAddInstallElement(rpmts ts, Header h, fnpyKey key, int upgrade, rpmRelocation * relocs) { -@@ -315,7 +333,7 @@ addheader: +@@ -291,7 +309,7 @@ addheader: continue; /* Skip packages that contain identical NEVR. */ @@ -38,18 +38,18 @@ Index: lib/depends.c + if (rpmNameVersionCompare(h, oh) == 0) continue; - xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey); -@@ -366,11 +384,9 @@ addheader: + xx = removePackage(ts, oh, pkgKey); +@@ -342,11 +360,9 @@ addheader: * If no obsoletes version info is available, match all names. */ if (rpmdsEVR(obsoletes) == NULL - || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { + || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) { - const char * ohNEVRA = hGetNEVRA(oh, NULL); + char * ohNEVRA = headerGetNEVRA(oh, NULL); -#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */ - if (rpmVersionCompare(h, oh)) -#endif + if (rpmNameVersionCompare(h, oh)) - xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey); - /*@-nullptrarith@*/ - rpmMessage(RPMMESS_DEBUG, _(" Obsoletes: %s\t\terases %s\n"), + xx = removePackage(ts, oh, pkgKey); + rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n", + rpmdsDNEVR(obsoletes)+2, ohNEVRA); diff --git a/nodefattr.diff b/nodefattr.diff index fb535db..d1fd124 100644 --- a/nodefattr.diff +++ b/nodefattr.diff @@ -5,7 +5,7 @@ Index: build/files.c =================================================================== --- build/files.c.orig +++ build/files.c -@@ -2014,7 +2014,9 @@ static int processPackageFiles(Spec spec +@@ -1793,7 +1793,9 @@ static rpmRC processPackageFiles(rpmSpec nullAttrRec(&fl.cur_ar); nullAttrRec(&fl.def_ar); diff --git a/patchrpms.diff b/patchrpms.diff deleted file mode 100644 index 5e17871..0000000 --- a/patchrpms.diff +++ /dev/null @@ -1,745 +0,0 @@ -Add support for patch rpms. Maybe not needed that much any more, -as delta rpms are more efficient and do not need so much evil -rpm patchery. -rh#103205 - -Index: lib/depends.c -=================================================================== ---- lib/depends.c.orig -+++ lib/depends.c -@@ -159,6 +159,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea - const char * os; - rpmds oldChk, newChk; - rpmds obsoletes; -+ rpmds patches; - alKey pkgKey; /* addedPackages key */ - int xx; - int ec = 0; -@@ -399,6 +400,40 @@ addheader: - } - obsoletes = rpmdsFree(obsoletes); - -+ patches = rpmdsLink(rpmteDS(p, RPMTAG_PATCHESNAME), "Patches"); -+ patches = rpmdsInit(patches); -+ if (patches != NULL) -+ while (rpmdsNext(patches) >= 0) { -+ const char * Name; -+ -+ if ((Name = rpmdsN(patches)) == NULL) -+ continue; /* XXX can't happen */ -+ -+ /* Ignore colored patches not in our rainbow. */ -+ dscolor = rpmdsColor(patches); -+ if (tscolor && dscolor && !(tscolor & dscolor)) -+ continue; -+ -+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0); -+ -+ xx = rpmdbPruneIterator(mi, -+ ts->removedPackages, ts->numRemovedPackages, 1); -+ -+ while((oh = rpmdbNextIterator(mi)) != NULL) { -+ /* Ignore colored packages not in our rainbow. */ -+ ohcolor = hGetColor(oh); -+ if (tscolor && hcolor && ohcolor && !(hcolor & ohcolor)) -+ /*@innercontinue@*/ continue; -+ if (rpmdsEVR(patches) == NULL -+ || rpmdsNVRMatchesDep(oh, patches, _rpmds_nopromote)) { -+ if (rpmVersionCompare(h, oh)) -+ xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey); -+ } -+ } -+ mi = rpmdbFreeIterator(mi); -+ } -+ patches = rpmdsFree(patches); -+ - ec = 0; - - exit: -@@ -656,6 +691,57 @@ exit: - return rc; - } - -+static int checkPatchDeps(rpmts ts, rpmte p, int reportprobs) -+{ -+ const char * Name; -+ Header h; -+ rpmds patches; -+ rpmds this; -+ rpmdbMatchIterator mi; -+ -+ patches = rpmdsInit(rpmteDS(p, RPMTAG_PATCHESNAME)); -+ if (!patches) -+ return 0; -+ this = rpmteDS(p, RPMTAG_NAME); -+ -+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmdsN(this), 0); -+ while ((h = rpmdbNextIterator(mi)) != NULL) { -+ if (rpmdsNVRMatchesDep(h, this, _rpmds_nopromote)) { -+ rpmdsNotify(this, _("(patch refresh)"), 0); -+ p->hPatched = headerLink(h); -+ p->isPatchRefresh = 1; -+ mi = rpmdbFreeIterator(mi); -+ return 0; -+ } -+ } -+ mi = rpmdbFreeIterator(mi); -+ -+ while (rpmdsNext(patches) >= 0) { -+ if ((Name = rpmdsN(patches)) == NULL) -+ return 1; /* XXX can't happen */ -+ mi = rpmtsInitIterator(ts, RPMTAG_NAME, Name, 0); -+ while ((h = rpmdbNextIterator(mi)) != NULL) { -+ if (rpmdsNVRMatchesDep(h, patches, _rpmds_nopromote)) { -+ rpmdsNotify(patches, _("(db package)"), 0); -+ p->hPatched = headerLink(h); -+ p->isPatchRefresh = 0; -+ mi = rpmdbFreeIterator(mi); -+ return 0; -+ } -+ } -+ mi = rpmdbFreeIterator(mi); -+ } -+ -+ rpmdsNotify(patches, NULL, 1); -+ if (reportprobs) { -+ patches = rpmdsInit(patches); -+ rpmdsNext(patches); -+ rpmdsProblem(ts->probs, rpmteNEVR(p), patches, NULL, 1); -+ } -+ return 0; -+} -+ -+ - /** - * Check added requires/conflicts against against installed+added packages. - * @param ts transaction set -@@ -1730,6 +1816,7 @@ int rpmtsCheck(rpmts ts) - rpmteDS(p, RPMTAG_CONFLICTNAME), - NULL, - tscolor, 1); -+ rc |= checkPatchDeps(ts, p, 1); - if (rc) - goto exit; - -@@ -1827,3 +1914,22 @@ exit: - /*@=branchstate@*/ - return rc; - } -+ -+void rpmtsPatchCheck(rpmts ts) -+{ -+ int closeatexit = 0; -+ rpmtsi pi = NULL; rpmte p; -+ -+ if (rpmtsGetRdb(ts) == NULL && ts->dbmode != -1) { -+ if ((rpmtsOpenDB(ts, ts->dbmode)) != 0) -+ return; -+ closeatexit = 1; -+ } -+ pi = rpmtsiInit(ts); -+ while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) -+ if (p->key) /* key is filename for install, zero for verify */ -+ (void)checkPatchDeps(ts, p, 0); -+ pi = rpmtsiFree(pi); -+ if (closeatexit) -+ (void)rpmtsCloseDB(ts); -+} -Index: lib/formats.c -=================================================================== ---- lib/formats.c.orig -+++ lib/formats.c -@@ -232,6 +232,8 @@ static /*@only@*/ char * fflagsFormat(in - strcat(buf, "l"); - if (anint & RPMFILE_README) - strcat(buf, "r"); -+ if (anint & RPMFILE_UNPATCHED) -+ strcat(buf, "u"); - /*@=boundswrite@*/ - - val = xmalloc(5 + padding); -Index: lib/fsm.c -=================================================================== ---- lib/fsm.c.orig -+++ lib/fsm.c -@@ -707,7 +707,7 @@ assert(rpmteType(fi->te) == TR_ADDED); - break; - - case FA_BACKUP: -- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */ -+ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */ - switch (rpmteType(fi->te)) { - case TR_ADDED: - fsm->osuffix = SUFFIX_RPMORIG; -@@ -720,13 +720,13 @@ assert(rpmteType(fi->te) == TR_ADDED); - - case FA_ALTNAME: - assert(rpmteType(fi->te) == TR_ADDED); -- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */ -+ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */ - fsm->nsuffix = SUFFIX_RPMNEW; - break; - - case FA_SAVE: - assert(rpmteType(fi->te) == TR_ADDED); -- if (!(fsm->fflags & RPMFILE_GHOST)) /* XXX Don't if %ghost file. */ -+ if (!(fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED))) /* XXX Don't if %ghost file. */ - fsm->osuffix = SUFFIX_RPMSAVE; - break; - case FA_ERASE: -@@ -1740,7 +1740,7 @@ int fsmStage(FSM_t fsm, fileStage stage) - } - - if (fsm->goal == FSM_PKGBUILD) { -- if (fsm->fflags & RPMFILE_GHOST) /* XXX Don't if %ghost file. */ -+ if (fsm->fflags & (RPMFILE_GHOST|RPMFILE_UNPATCHED)) /* XXX Don't if %ghost file. */ - break; - if (!S_ISDIR(st->st_mode) && st->st_nlink > 1) { - struct hardLink_s * li, * prev; -Index: lib/poptQV.c -=================================================================== ---- lib/poptQV.c.orig -+++ lib/poptQV.c -@@ -171,6 +171,7 @@ static void queryArgCallback(poptContext - case 'l': qva->qva_flags |= QUERY_FOR_LIST; break; - case 's': qva->qva_flags |= QUERY_FOR_STATE | QUERY_FOR_LIST; - break; -+ case 'P': qva->qva_flags |= QUERY_FOR_PATCHES; break; - case POPT_DUMP: qva->qva_flags |= QUERY_FOR_DUMPFILES | QUERY_FOR_LIST; - break; - -@@ -278,6 +279,8 @@ struct poptOption rpmQueryPoptTable[] = - N_("skip %%readme files"), NULL }, - #endif - -+ { "patches", 'P', 0, 0, 'P', -+ N_("list patches or patched files "), NULL }, - { "qf", '\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, 0, - POPT_QUERYFORMAT, NULL, NULL }, - { "queryformat", '\0', POPT_ARG_STRING, 0, POPT_QUERYFORMAT, -Index: lib/query.c -=================================================================== ---- lib/query.c.orig -+++ lib/query.c -@@ -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)) -+ continue; -+ - /*@-boundswrite@*/ - if (!rpmIsVerbose() && prefix) - te = stpcpy(te, prefix); -@@ -377,6 +381,21 @@ void rpmDisplayQueryTags(FILE * fp) - } - } - -+static int isPatch(Header h) -+{ -+ int i, requiresCount = 0; -+ const char ** requires; -+ -+ if (!headerGetEntry(h, RPMTAG_REQUIRENAME, NULL, (void **) &requires, &requiresCount)) -+ return 0; -+ for (i = 0; i < requiresCount; i++) -+ if (!strcmp("rpmlib(PatchRPMs)", requires[i])) -+ break; -+ if (requiresCount) -+ free(requires); -+ return i < requiresCount; -+} -+ - static int rpmgiShowMatches(QVA_t qva, rpmts ts) - /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ - /*@modifies qva, rpmGlobalMacroContext, h_errno, internalState @*/ -@@ -391,6 +410,8 @@ static int rpmgiShowMatches(QVA_t qva, r - h = rpmgiHeader(gi); - if (h == NULL) /* XXX perhaps stricter break instead? */ - continue; -+ if ((qva->qva_flags & QUERY_FOR_PATCHES) != 0 && !isPatch(h)) -+ continue; - if ((rc = qva->qva_showPackage(qva, ts, h)) != 0) - ec = rc; - if (qva->qva_source == RPMQV_DBOFFSET) -@@ -406,6 +427,8 @@ int rpmcliShowMatches(QVA_t qva, rpmts t - - while ((h = rpmdbNextIterator(qva->qva_mi)) != NULL) { - int rc; -+ if ((qva->qva_flags & QUERY_FOR_PATCHES) != 0 && !isPatch(h)) -+ continue; - if ((rc = qva->qva_showPackage(qva, ts, h)) != 0) - ec = rc; - if (qva->qva_source == RPMQV_DBOFFSET) -@@ -703,7 +726,17 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A - - switch (qva->qva_source) { - case RPMQV_ALL: -- qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0); -+ if ((!argv || !*argv) && (qva->qva_flags & QUERY_FOR_PATCHES) != 0) { -+ qva->qva_gi = rpmgiNew(ts, RPMTAG_REQUIRENAME, "rpmlib(PatchRPMs)", 0); -+ qva->qva_gi->mi = rpmtsInitIterator(qva->qva_gi->ts, qva->qva_gi->tag, qva->qva_gi->keyp, qva->qva_gi->keylen); -+ if (qva->qva_gi->mi == NULL) { -+ rpmError(RPMERR_QUERYINFO, _("no patch-rpm installed\n")); -+ break; -+ } -+ qva->qva_gi->mi = rpmdbFreeIterator(qva->qva_gi->mi); -+ } else { -+ qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0); -+ } - qva->qva_rc = rpmgiSetArgs(qva->qva_gi, argv, ftsOpts, RPMGI_NONE); - - if (qva->qva_gi != NULL && (qva->qva_gi->flags & RPMGI_TSADD)) /* Load the ts with headers. */ -Index: lib/rpmcli.h -=================================================================== ---- lib/rpmcli.h.orig -+++ lib/rpmcli.h -@@ -165,7 +165,7 @@ typedef enum rpmQueryFlags_e { - QUERY_SCRIPT = (1 << 18), /*!< verify: from --noscripts */ - QUERY_DIGEST = (1 << 19), /*!< verify: from --nodigest */ - QUERY_SIGNATURE = (1 << 20), /*!< verify: from --nosignature */ -- QUERY_PATCHES = (1 << 21), /*!< verify: from --nopatches */ -+ QUERY_FOR_PATCHES = (1 << 21), /*!< verify: from --patches */ - QUERY_HDRCHK = (1 << 22), /*!< verify: from --nohdrchk */ - /*@=enummemuse@*/ - QUERY_FOR_LIST = (1 << 23), /*!< query: from --list */ -Index: lib/rpmds.c -=================================================================== ---- lib/rpmds.c.orig -+++ lib/rpmds.c -@@ -87,6 +87,10 @@ fprintf(stderr, "*** ds %p\t%s[%d]\n", d - tagEVR = RPMTAG_TRIGGERVERSION; - tagF = RPMTAG_TRIGGERFLAGS; - } else -+ if (ds->tagN == RPMTAG_PATCHESNAME) { -+ tagEVR = RPMTAG_PATCHESVERSION; -+ tagF = RPMTAG_PATCHESFLAGS; -+ } else - return NULL; - - /*@-branchstate@*/ -@@ -325,6 +329,11 @@ rpmds rpmdsNew(Header h, rpmTag tagN, in - tagEVR = RPMTAG_ENHANCESVERSION; - tagF = RPMTAG_ENHANCESFLAGS; - } else -+ if (tagN == RPMTAG_PATCHESNAME) { -+ Type = "patches"; -+ tagEVR = RPMTAG_PATCHESVERSION; -+ tagF = RPMTAG_PATCHESFLAGS; -+ } else - goto exit; - - /*@-branchstate@*/ -@@ -1127,14 +1136,28 @@ void rpmdsProblem(rpmps ps, const char * - if (DNEVR == NULL) DNEVR = "? ?N? ?OP? ?EVR?"; - /*@=branchstate@*/ - -- rpmMessage(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"), -- pkgNEVR, ds->Type, DNEVR+2); -- - switch ((unsigned)DNEVR[0]) { - case 'C': type = RPMPROB_CONFLICT; break; - default: - case 'R': type = RPMPROB_REQUIRES; break; - } -+ if (DNEVR[0] == 'p') { -+ const char *d; -+ char *dn; -+ rpmds pds = rpmdsInit(ds); -+ dn = xstrdup("p "); -+ while (rpmdsNext(pds) >= 0) { -+ d = rpmdsDNEVR(ds) + 2; -+ dn = xrealloc(dn, strlen(dn) + strlen(d) + 4); -+ if (dn[2]) -+ strcat(dn, " | "); -+ strcat(dn, d); -+ } -+ DNEVR = (const char *)dn; -+ } -+ -+ rpmMessage(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"), -+ pkgNEVR, ds->Type, DNEVR+2); - - key = (suggestedKeys ? suggestedKeys[0] : NULL); - rpmpsAppend(ps, type, pkgNEVR, key, NULL, NULL, DNEVR, adding); -Index: lib/rpminstall.c -=================================================================== ---- lib/rpminstall.c.orig -+++ lib/rpminstall.c -@@ -683,6 +683,11 @@ maybe_manifest: - /*@=branchstate@*/ - } - ps = rpmpsFree(ps); -+ } else if (eiu->numRPMS) { -+ /* needed in rpmtsOrder */ -+ rpmalMakeIndex(ts->addedPackages); -+ /* need patch references */ -+ rpmtsPatchCheck(ts); - } - - if (eiu->numRPMS && !(ia->installInterfaceFlags & INSTALL_NOORDER)) { -@@ -789,7 +794,7 @@ int rpmErase(rpmts ts, struct rpmInstall - { int notifyFlags; - notifyFlags = ia->eraseInterfaceFlags | (rpmIsVerbose() ? INSTALL_LABEL : 0 ); - xx = rpmtsSetNotifyCallback(ts, -- rpmShowProgress, (void *) ((long)notifyFlags) -+ rpmShowProgress, (void *) ((long)notifyFlags)) - } - #endif - -Index: lib/rpmlibprov.c -=================================================================== ---- lib/rpmlibprov.c.orig -+++ lib/rpmlibprov.c -@@ -33,6 +33,9 @@ static struct rpmlibProvides_s rpmlibPro - { "rpmlib(PayloadIsBzip2)", "3.0.5-1", - (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), - N_("package payload can be compressed using bzip2.") }, -+ { "rpmlib(PatchRPMs)", "3.0.6-1", -+ (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), -+ N_("understand rpms that replace a subset of files.") }, - { "rpmlib(PayloadFilesHavePrefix)", "4.0-1", - (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), - N_("package payload file(s) have \"./\" prefix.") }, -Index: lib/rpmte.c -=================================================================== ---- lib/rpmte.c.orig -+++ lib/rpmte.c -@@ -64,6 +64,7 @@ static void delTE(rpmte p) - p->NEVRA = _free(p->NEVRA); - - p->h = headerFree(p->h); -+ p->hPatched = headerFree(p->hPatched); - - /*@-boundswrite@*/ - memset(p, 0, sizeof(*p)); /* XXX trash and burn */ -@@ -183,6 +184,9 @@ static void addTE(rpmts ts, rpmte p, Hea - p->requires = rpmdsNew(h, RPMTAG_REQUIRENAME, scareMem); - p->conflicts = rpmdsNew(h, RPMTAG_CONFLICTNAME, scareMem); - p->obsoletes = rpmdsNew(h, RPMTAG_OBSOLETENAME, scareMem); -+ p->patches = rpmdsNew(h, RPMTAG_PATCHESNAME, scareMem | 2); -+ p->hPatched = NULL; -+ p->isPatchRefresh = 0; - - savep = rpmtsSetRelocateElement(ts, p); - p->fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem); -@@ -520,6 +524,9 @@ rpmds rpmteDS(rpmte te, rpmTag tag) - if (tag == RPMTAG_OBSOLETENAME) - return te->obsoletes; - else -+ if (tag == RPMTAG_PATCHESNAME) -+ return te->patches; -+ else - return NULL; - /*@=compdef =refcounttrans =retalias =retexpose =usereleased @*/ - } -Index: lib/rpmte.h -=================================================================== ---- lib/rpmte.h.orig -+++ lib/rpmte.h -@@ -115,6 +115,9 @@ struct rpmte_s { - int autorelocatex; /*!< (TR_ADDED) Auto relocation entry index. */ - /*@refcounted@*/ /*@null@*/ - FD_t fd; /*!< (TR_ADDED) Payload file descriptor. */ -+ rpmds patches; /*!< Patches: dependencies. */ -+ Header hPatched; /*!< (TR_ADDED) Header of package we patch */ -+ int isPatchRefresh; /*!< (TR_ADDED) is a patch refresh */ - - /*@-fielduse@*/ /* LCL: confused by union? */ - union { -Index: lib/transaction.c -=================================================================== ---- lib/transaction.c.orig -+++ lib/transaction.c -@@ -199,6 +199,11 @@ static int handleInstInstalledFiles(cons - int rConflicts; - - rConflicts = reportConflicts; -+ if (rConflicts && p->hPatched && p->isPatchRefresh) { -+ /* If same package (patch refresh) turn off conflicts */ -+ /* Handling of unpatched files not worth the trouble */ -+ rConflicts = 0; -+ } - /* Resolve file conflicts to prefer Elf64 (if not forced). */ - if (tscolor != 0 && FColor != 0 && FColor != oFColor) - { -@@ -975,6 +980,176 @@ rpmfi rpmtsiFi(const rpmtsi tsi) - /*@=compdef =refcounttrans =usereleased @*/ - } - -+static int_32 *dupint32(int_32 *old, int cnt) -+{ -+ int i; -+ int_32 *new = xmalloc(cnt * sizeof(int_32)); -+ for (i = 0; i < cnt; i++) -+ new[i] = old[i]; -+ return new; -+} -+ -+static void patchUnpatchedFiles(Header oldh, Header h, int isRefresh) -+{ -+ int fileCount, oldfileCount, i, j, oldidx, oldidxj; -+ const char ** baseNames, ** dirNames; -+ int_32 * dirIndexes; -+ int_32 * fileMtimes; -+ int_32 * fileSizes; -+ int_32 * fileFlags; -+ char ** fileMd5s; -+ const char ** oldbaseNames, ** olddirNames; -+ int_32 * olddirIndexes; -+ int_32 * oldfileMtimes; -+ int_32 * oldfileSizes; -+ int_32 * oldfileFlags; -+ char ** oldfileMd5s; -+ const char * name, * version, * release; -+ char * evr; -+ int_32 sense; -+ int_32 *epochp; -+ int save = 0; -+ char epoch[20]; -+ const char ** oldpatches, **oldpatchesEVR = NULL; -+ int_32 * oldpatchesFlags; -+ int oldpatchesCount; -+ -+ if (!oldh) { -+ headerRemoveEntry(h, RPMTAG_PATCHESNAME); -+ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS); -+ headerRemoveEntry(h, RPMTAG_PATCHESVERSION); -+#if 1 -+ name = "(none)"; -+ sense = 0; -+ evr = ""; -+ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, &name, 1); -+ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, &sense, 1); -+ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, &evr, 1); -+#endif -+ return; -+ } -+ if (!headerGetEntry(h, RPMTAG_BASENAMES, NULL, -+ (void **) &baseNames, &fileCount)) -+ return; -+ headerGetEntry(h, RPMTAG_DIRNAMES, NULL, -+ (void **) &dirNames, NULL); -+ headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, -+ (void **) &dirIndexes, NULL); -+ headerGetEntry(h, RPMTAG_FILESIZES, NULL, -+ (void **) &fileSizes, NULL); -+ headerGetEntry(h, RPMTAG_FILEMD5S, NULL, -+ (void **) &fileMd5s, NULL); -+ headerGetEntry(h, RPMTAG_FILEMTIMES, NULL, -+ (void **) &fileMtimes, NULL); -+ headerGetEntry(h, RPMTAG_FILEFLAGS, NULL, -+ (void **) &fileFlags, NULL); -+ -+ if (!headerGetEntry(oldh, RPMTAG_BASENAMES, NULL, -+ (void **) &oldbaseNames, &oldfileCount)) -+ return; -+ headerGetEntry(oldh, RPMTAG_DIRNAMES, NULL, -+ (void **) &olddirNames, NULL); -+ headerGetEntry(oldh, RPMTAG_DIRINDEXES, NULL, -+ (void **) &olddirIndexes, NULL); -+ headerGetEntry(oldh, RPMTAG_FILESIZES, NULL, -+ (void **) &oldfileSizes, NULL); -+ headerGetEntry(oldh, RPMTAG_FILEMD5S, NULL, -+ (void **) &oldfileMd5s, NULL); -+ headerGetEntry(oldh, RPMTAG_FILEMTIMES, NULL, -+ (void **) &oldfileMtimes, NULL); -+ headerGetEntry(oldh, RPMTAG_FILEFLAGS, NULL, -+ (void **) &oldfileFlags, NULL); -+ -+ oldidx = -1; -+ oldidxj = 0; -+ for (i = 0; i < fileCount; i++) { -+ if (!(fileFlags[i] & RPMFILE_UNPATCHED)) -+ continue; -+ if (dirIndexes[i] != oldidx) { -+ for (j = 0; j < oldfileCount; j++) -+ if (strcmp(dirNames[dirIndexes[i]], olddirNames[olddirIndexes[j]]) == 0) -+ break; -+ if (j == oldfileCount) { -+ while (i + 1 < fileCount && dirIndexes[i] == dirIndexes[i + 1]) -+ i++; -+ continue; -+ } -+ oldidx = olddirIndexes[j]; -+ oldidxj = j; -+ } -+ for (j = oldidxj; j < oldfileCount; j++) -+ if (olddirIndexes[j] == oldidx && !strcmp(baseNames[i], oldbaseNames[j])) { -+ if (!save) { -+ /* duplicate fileSizes, fileMtimes, fileFlags -+ * so we can modify them */ -+ fileSizes = dupint32(fileSizes, fileCount); -+ fileMtimes = dupint32(fileMtimes, fileCount); -+ fileFlags = dupint32(fileFlags, fileCount); -+ } -+ fileSizes[i] = oldfileSizes[j]; -+ fileMtimes[i] = oldfileMtimes[j]; -+ fileMd5s[i] = oldfileMd5s[j]; -+ fileFlags[i] = oldfileFlags[j] | RPMFILE_UNPATCHED; -+ save = 1; -+ break; -+ } -+ } -+ if (save) { -+ headerModifyEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE, -+ (void *) fileSizes, fileCount); -+ headerModifyEntry(h, RPMTAG_FILEMD5S, RPM_STRING_ARRAY_TYPE, -+ (void *) fileMd5s, fileCount); -+ headerModifyEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE, -+ (void *) fileMtimes, fileCount); -+ headerModifyEntry(h, RPMTAG_FILEFLAGS, RPM_INT32_TYPE, -+ (void *) fileFlags, fileCount); -+ free(fileSizes); -+ free(fileMtimes); -+ free(fileFlags); -+ } -+ free(baseNames); -+ free(dirNames); -+ free(fileMd5s); -+ free(oldbaseNames); -+ free(olddirNames); -+ free(oldfileMd5s); -+ -+ if (isRefresh) { -+ /* same patch installed, this is just a refresh operation */ -+ headerRemoveEntry(h, RPMTAG_PATCHESNAME); -+ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS); -+ headerRemoveEntry(h, RPMTAG_PATCHESVERSION); -+ if (headerGetEntry(oldh, RPMTAG_PATCHESNAME, NULL, (void **) &oldpatches, &oldpatchesCount) && oldpatchesCount) { -+ headerGetEntry(oldh, RPMTAG_PATCHESFLAGS, NULL, (void **) &oldpatchesFlags, &oldpatchesCount); -+ headerGetEntry(oldh, RPMTAG_PATCHESVERSION, NULL, (void **) &oldpatchesEVR, &oldpatchesCount); -+ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, oldpatches, oldpatchesCount); -+ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, oldpatchesFlags, oldpatchesCount); -+ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, oldpatchesEVR, oldpatchesCount); -+ free(oldpatches); -+ free(oldpatchesEVR); -+ } -+ return; -+ } -+ headerNVR(oldh, &name, &version, &release); -+ *epoch = 0; -+ if (headerGetEntry(h, RPMTAG_EPOCH, NULL, (void **) &epochp, NULL)) -+ sprintf(epoch, "%d:", *epochp); -+ evr = xmalloc(strlen(epoch) + strlen(version) + strlen(release) + 2); -+ strcpy(evr, epoch); -+ strcat(evr, version); -+ strcat(evr, "-"); -+ strcat(evr, release); -+ sense = RPMSENSE_EQUAL; -+ headerRemoveEntry(h, RPMTAG_PATCHESNAME); -+ headerRemoveEntry(h, RPMTAG_PATCHESFLAGS); -+ headerRemoveEntry(h, RPMTAG_PATCHESVERSION); -+ headerAddEntry(h, RPMTAG_PATCHESNAME, RPM_STRING_ARRAY_TYPE, &name, 1); -+ headerAddEntry(h, RPMTAG_PATCHESFLAGS, RPM_INT32_TYPE, &sense, 1); -+ headerAddEntry(h, RPMTAG_PATCHESVERSION, RPM_STRING_ARRAY_TYPE, &evr, 1); -+ free(evr); -+} -+ -+ - /** - * This is not a generalized function to be called from outside - * librpm. It is called internally by rpmtsRun() to rollback -@@ -2154,6 +2329,8 @@ assert(psm != NULL); - } - psm->fi = rpmfiLink(p->fi, NULL); - -+ if (p->hPatched || rpmteDS(p, RPMTAG_PATCHESNAME)) -+ patchUnpatchedFiles(p->hPatched, p->fi->h, p->isPatchRefresh); - /*@-nullstate@*/ /* FIX: psm->fi may be NULL */ - if (rpmpsmStage(psm, PSM_PKGINSTALL)) { - ourrc++; -Index: doc/rpm.8 -=================================================================== ---- doc/rpm.8.orig -+++ doc/rpm.8 -@@ -68,7 +68,8 @@ rpm \- RPM Package Manager - - - [\fB\fIPACKAGE_NAME\fB\fR] [\fB-a,--all\fR] [\fB-f,--file \fIFILE\fB\fR] -- [\fB-g,--group \fIGROUP\fB\fR] {\fB-p,--package \fIPACKAGE_FILE\fB\fR] -+ [\fB-g,--group \fIGROUP\fB\fR] [\fB-p,--package \fIPACKAGE_FILE\fB\fR] -+ [\fB-P,--patches\fR] - [\fB--fileid \fIMD5\fB\fR] [\fB--hdrid \fISHA1\fB\fR] [\fB--pkgid \fIMD5\fB\fR] [\fB--tid \fITID\fB\fR] - [\fB--querybynumber \fIHDRNUM\fB\fR] [\fB--triggeredby \fIPACKAGE_NAME\fB\fR] - [\fB--whatprovides \fICAPABILITY\fB\fR] [\fB--whatrequires \fICAPABILITY\fB\fR] -@@ -77,7 +78,8 @@ rpm \- RPM Package Manager - .PP - - -- [\fB--changelog\fR] [\fB-c,--configfiles\fR] [\fB-d,--docfiles\fR] [\fB--dump\fR] -+ [\fB--basedon\fR] [\fB--changelog\fR] [\fB-c,--configfiles\fR] -+ [\fB-d,--docfiles\fR] [\fB--dump\fR] - [\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 - the package manifest as additional \fIPACKAGE_FILE\fR - arguments to the query. - .TP -+\fB-P, --patches\fP -+Limit the selected packages to patch-rpms. As a side effect, limit -+the file list to patched files. -+.TP - \fB--pkgid \fIMD5\fB\fR - Query package that contains a given package identifier, i.e. the - \fIMD5\fR digest of the combined header and -@@ -581,6 +587,10 @@ Query all packages that requires \fICAPA - .SS "PACKAGE QUERY OPTIONS:" - .PP - .TP -+\fB--basedon\fR -+Show what packages a patch-rpm is based on. A patch-rpm can only be -+installed if one of the packages it is based on is installed. -+.TP - \fB--changelog\fR - Display change information for the package. - .TP -@@ -613,7 +623,8 @@ Orders the package listing by install ti - packages are at the top. - .TP - \fB-l, --list\fR --List files in package. -+List files in package. If the \fB\-P\fP option is also given, only -+patched files are shown. - .TP - \fB--provides\fR - List capabilities this package provides. -Index: rpmpopt.in -=================================================================== ---- rpmpopt.in.orig -+++ rpmpopt.in -@@ -84,6 +84,10 @@ rpm alias --supplements --qf \ - "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ - --POPTdesc=$"list capabilities this package supplements" - -+rpm alias --basedon --qf \ -+ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \ -+ --POPTdesc=$"list packages this patch-rpm is based on" -+ - 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\ -@@ -378,6 +382,10 @@ rpmq alias --supplements --qf \ - "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ - --POPTdesc=$"list capabilities this package supplements" - -+rpmq alias --basedon --qf \ -+ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \ -+ --POPTdesc=$"list packages this patch-rpm is based on" -+ - 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\ -@@ -496,6 +504,10 @@ rpmquery alias --supplements --qf \ - "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ - --POPTdesc=$"list capabilities this package supplements" - -+rpmquery alias --basedon --qf \ -+ "[%{PATCHESNAME} %{PATCHESFLAGS:depflags} %{PATCHESVERSION}\n]" \ -+ --POPTdesc=$"list packages this patch-rpm is based on" -+ - rpmquery 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\ diff --git a/platformin.diff b/platformin.diff index f9020ff..94bc710 100644 --- a/platformin.diff +++ b/platformin.diff @@ -1,30 +1,28 @@ SUSE specific platform changes. ---- ./platform.in.orig 2005-01-26 03:39:54.000000000 +0000 -+++ ./platform.in 2006-02-17 14:18:30.000000000 +0000 -@@ -17,18 +17,18 @@ +Index: platform.in +=================================================================== +--- platform.in.orig ++++ platform.in +@@ -21,7 +21,7 @@ %_exec_prefix @exec_prefix@ %_bindir @bindir@ %_sbindir @sbindir@ -%_libexecdir @libexecdir@ +%_libexecdir %{_exec_prefix}/lib + %_datarootdir @datarootdir@ %_datadir @datadir@ %_sysconfdir @sysconfdir@ - %_sharedstatedir @sharedstatedir@ - %_localstatedir @localstatedir@ - %_lib @LIB@ --%_libdir @LIBDIR@ -+%_libdir %{_exec_prefix}/%{_lib} - %_includedir @includedir@ +@@ -33,7 +33,7 @@ %_oldincludedir @oldincludedir@ %_infodir @infodir@ %_mandir @mandir@ --%_initrddir %{_sysconfdir}/rc.d/init.d -+%_initrddir %{_sysconfdir}/init.d +-%_initddir %{_sysconfdir}/rc.d/init.d ++%_initddir %{_sysconfdir}/init.d + # Deprecated misspelling, present for backwards compatibility. + %_initrddir %{_initddir} - %_defaultdocdir @DEFAULTDOCDIR@ - -@@ -148,3 +148,21 @@ +@@ -146,3 +146,21 @@ @mandrake@%_gamesdir games @mandrake@%_gamesbindir %{_prefix}/%{_gamesdir} @mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir} @@ -35,7 +33,7 @@ SUSE specific platform changes. +@SuSE@%__chown_Rhf @__CHOWN_RHF@ +@SuSE@%__chgrp_Rhf @__CHGRP_RHF@ +@SuSE@%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root -+@SuSE@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@ ++@SuSE@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root +@SuSE@%_fixperms %{__chmod} -Rf @FIXPERMS@ +@SuSE@ +@SuSE@#--------------------------------------------------------------------- diff --git a/popt-to-lib.diff b/popt-to-lib.diff deleted file mode 100644 index 65e6075..0000000 --- a/popt-to-lib.diff +++ /dev/null @@ -1,32 +0,0 @@ -Index: popt/Makefile.am -=================================================================== ---- popt/Makefile.am.orig -+++ popt/Makefile.am -@@ -17,13 +17,13 @@ noinst_HEADERS = findme.h poptint.h syst - noinst_PROGRAMS = test1 test2 test3 - test1_SOURCES = test1.c - test1_LDFLAGS = --test1_LDADD = $(usrlib_LTLIBRARIES) -+test1_LDADD = $(popt_LTLIBRARIES) - test2_SOURCES = test2.c - test2_LDFLAGS = --test2_LDADD = $(usrlib_LTLIBRARIES) -+test2_LDADD = $(popt_LTLIBRARIES) - test3_SOURCES = test3.c - test3_LDFLAGS = --test3_LDADD = $(usrlib_LTLIBRARIES) -+test3_LDADD = $(popt_LTLIBRARIES) - - noinst_SCRIPTS = testit.sh - -@@ -34,8 +34,8 @@ TESTS = testit.sh - - include_HEADERS = popt.h - --usrlibdir = $(libdir)@MARK64@ --usrlib_LTLIBRARIES = libpopt.la -+poptdir = /lib@MARK64@ -+popt_LTLIBRARIES = libpopt.la - - libpopt_la_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c - libpopt_la_LDFLAGS = @INTLLIBS@ diff --git a/refreshtestarch.diff b/refreshtestarch.diff index ef0ef31..f429b2b 100644 --- a/refreshtestarch.diff +++ b/refreshtestarch.diff @@ -5,22 +5,23 @@ Index: lib/psm.c =================================================================== --- lib/psm.c.orig +++ lib/psm.c -@@ -1447,15 +1447,16 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s +@@ -1202,6 +1202,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s + + psm->scriptArg = psm->npkgs_installed + 1; - assert(psm->mi == NULL); - psm->mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(psm->te), 0); + /* this must match rpmNameVersionCompare in depends.c */ - xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, + mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(psm->te), 0); + xx = rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, rpmteE(psm->te)); - xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_VERSION, RPMMIRE_STRCMP, +@@ -1209,9 +1210,9 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s rpmteV(psm->te)); - xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, + xx = rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, rpmteR(psm->te)); -- if (tscolor) { -- xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_ARCH, RPMMIRE_STRCMP, -+ xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_ARCH, RPMMIRE_STRCMP, - rpmteA(psm->te)); -+ if (tscolor) { - xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_OS, RPMMIRE_STRCMP, ++ xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, ++ rpmteA(psm->te)); + if (tscolor) { +- xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, +- rpmteA(psm->te)); + xx = rpmdbSetIteratorRE(mi, RPMTAG_OS, RPMMIRE_STRCMP, rpmteO(psm->te)); } diff --git a/remove-brp-strips.diff b/remove-brp-strips.diff index 751f609..c0ef51a 100644 --- a/remove-brp-strips.diff +++ b/remove-brp-strips.diff @@ -3,14 +3,16 @@ Subject: remove references to removed brp scripts Some brp-scripts are not used in openSUSE, remove references to it ---- platform.in +Index: platform.in +=================================================================== +--- platform.in.orig +++ platform.in @@ -55,8 +55,6 @@ %__os_install_post \ - @RPMCONFIGDIR@/brp-compress \ - @RPMCONFIGDIR@/brp-strip \ -- @RPMCONFIGDIR@/brp-strip-static-archive \ -- @RPMCONFIGDIR@/brp-strip-comment-note \ + %{_rpmconfigdir}/brp-compress \ + %{_rpmconfigdir}/brp-strip \ +- %{_rpmconfigdir}/brp-strip-static-archive \ +- %{_rpmconfigdir}/brp-strip-comment-note \ %{nil} %__spec_install_post\ diff --git a/requires-ge-macro.diff b/requires-ge-macro.diff index 77464b4..0873add 100644 --- a/requires-ge-macro.diff +++ b/requires-ge-macro.diff @@ -2,7 +2,7 @@ Index: macros.in =================================================================== --- macros.in.orig +++ macros.in -@@ -1205,7 +1205,8 @@ done \ +@@ -1182,7 +1182,8 @@ done \ # %{perl_sitearch}/Image # %dir %{perl_sitearch}/auto/Image # diff --git a/rpm-4.4.2.3-db.tar.bz2 b/rpm-4.4.2.3-db.tar.bz2 new file mode 100644 index 0000000..1a2af71 --- /dev/null +++ b/rpm-4.4.2.3-db.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1226a5eeee069402b8dddfde652e2b0a44b64a193078b3c7276d97b1b5f756cb +size 5271325 diff --git a/rpm-4.4.2.3.tar.bz2 b/rpm-4.4.2.3.tar.bz2 deleted file mode 100644 index ff2cf1e..0000000 --- a/rpm-4.4.2.3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1573a7d34c6a95abe3ad3d2ce310c7d5f8873e45955875f2e03647c756012fcd -size 8525878 diff --git a/rpm-4.7.1.tar.bz2 b/rpm-4.7.1.tar.bz2 new file mode 100644 index 0000000..13a628c --- /dev/null +++ b/rpm-4.7.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0af1f507b342eda33f9ef113b645048034fb7fef3b4ff3c084532af12b6f70d +size 3410587 diff --git a/rpm-beecrypt.diff b/rpm-beecrypt.diff new file mode 100644 index 0000000..0fff5e4 --- /dev/null +++ b/rpm-beecrypt.diff @@ -0,0 +1,1835 @@ +--- ./Makefile.am.orig 2009-06-23 11:40:57.000000000 +0000 ++++ ./Makefile.am 2009-08-20 13:47:03.000000000 +0000 +@@ -88,7 +88,8 @@ DISTCLEANFILES += find-requires + + rpm_SOURCES = rpmqv.c debug.h system.h + rpm_CPPFLAGS = $(AM_CPPFLAGS) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV +-rpm_LDADD = build/librpmbuild.la lib/librpm.la rpmio/librpmio.la ++rpm_LDADD = lib/librpm.la rpmio/librpmio.la ++rpm_LDADD += build/.libs/spec.o build/.libs/misc.o build/.libs/names.o build/.libs/expression.o build/.libs/reqprov.o build/.libs/poptBT.o build/.libs/parse*.o + rpm_LDADD += @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@ + + rpmbuild_SOURCES = build.c rpmqv.c build.h debug.h system.h +--- ./config.h.in.orig 2009-07-21 08:21:37.000000000 +0000 ++++ ./config.h.in 2009-08-20 13:47:03.000000000 +0000 +@@ -13,6 +13,9 @@ + /* Define to 1 if you have the `basename' function. */ + #undef HAVE_BASENAME + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_BEECRYPT_API_H ++ + /* Define as 1 if you bzip2 1.0 */ + #undef HAVE_BZ2_1_0 + +@@ -110,7 +113,7 @@ + /* Define as 1 if defines h_errno */ + #undef HAVE_HERRNO + +-/* Define if you have the iconv() function. */ ++/* Define if you have the iconv() function and it works. */ + #undef HAVE_ICONV + + /* Define to 1 if you have the `inet_aton' function. */ +@@ -359,6 +362,10 @@ + */ + #undef LT_OBJDIR + ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++#undef LT_OBJDIR ++ + /* Define to 1 if `major', `minor', and `makedev' are declared in . + */ + #undef MAJOR_IN_MKDEV +@@ -456,6 +463,9 @@ + /* Build with acl support? */ + #undef WITH_ACL + ++/* Build with beecrypt instead of nss3 support? */ ++#undef WITH_BEECRYPT ++ + /* Build with capability support? */ + #undef WITH_CAP + +--- ./configure.ac.orig 2009-07-21 08:20:46.000000000 +0000 ++++ ./configure.ac 2009-08-20 13:47:03.000000000 +0000 +@@ -300,12 +300,43 @@ AC_CHECK_HEADERS([dwarf.h], [ + AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes]) + + #================= ++# Check for beecrypt library if requested. ++AC_ARG_WITH(beecrypt, [ --with-beecrypt build with beecrypt support ],,[with_beecrypt=yes]) ++AC_ARG_WITH(internal_beecrypt, [ --with-internal-beecrypt build with internal beecrypt library ],,[with_internal_beecrypt=yes]) ++AM_CONDITIONAL([WITH_INTERNAL_BEECRYPT],[test "$with_internal_beecrypt" = yes]) ++if test "$with_internal_beecrypt" = yes ; then ++ with_beecrypt=yes ++fi ++AM_CONDITIONAL([WITH_BEECRYPT],[test "$with_beecrypt" = yes]) ++ ++WITH_BEECRYPT_INCLUDE= ++WITH_BEECRYPT_LIB= ++if test "$with_beecrypt" = yes ; then ++ AC_DEFINE(WITH_BEECRYPT, 1, [Build with beecrypt instead of nss3 support?]) ++ if test "$with_internal_beecrypt" = yes ; then ++ WITH_BEECRYPT_INCLUDE="-I\$(top_srcdir)/beecrypt" ++ AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the header file.]) ++ else ++ AC_CHECK_LIB(beecrypt, mpfprintln, [ ++ WITH_BEECRYPT_LIB="-lbeecrypt" ++ ],[ ++ AC_MSG_ERROR([missing required library 'beecrypt']) ++ ]) ++ AC_CHECK_HEADER([beecrypt/api.h], [AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the header file.]) ++ ]) ++ fi ++fi ++AC_SUBST(WITH_BEECRYPT_LIB) ++AC_SUBST(WITH_BEECRYPT_INCLUDE) ++ ++#================= + # Check for NSS library. + # We need nss.h from NSS which needs nspr.h. Unfortunately both glibc and NSS + # have a header named nss.h... so make extra check for NSS's sechash.h + # which we use too and hopefully is slightly more unique to NSS. + WITH_NSS_INCLUDE= + WITH_NSS_LIB= ++if test "$with_beecrypt" != yes ; then + AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [ + AC_MSG_ERROR([missing required NSPR / NSS header]) + ]) +@@ -314,6 +345,7 @@ AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ + ], [ + AC_MSG_ERROR([missing required NSS library 'nss3']) + ]) ++fi + AC_SUBST(WITH_NSS_INCLUDE) + AC_SUBST(WITH_NSS_LIB) + +--- ./lib/signature.c.orig 2009-06-23 11:40:58.000000000 +0000 ++++ ./lib/signature.c 2009-08-20 13:47:03.000000000 +0000 +@@ -1118,10 +1118,8 @@ verifyRSASignature(rpmKeyring keyring, r + DIGEST_CTX md5ctx) + { + pgpDigParams sigp = dig ? &dig->signature : NULL; +- SECOidTag sigalg; + rpmRC res = RPMRC_OK; + int xx; +- SECItem digest; + const char *hdr, *signame = _("Unknown");; + const char *sig = sigtd->data; + int sigver; +@@ -1153,27 +1151,21 @@ verifyRSASignature(rpmKeyring keyring, r + switch (sigp->hash_algo) { + case PGPHASHALGO_MD5: + signame = "RSA/MD5"; +- sigalg = SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION; + break; + case PGPHASHALGO_SHA1: + signame = "RSA/SHA1"; +- sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; + break; + case PGPHASHALGO_MD2: + signame = "RSA/MD2"; +- sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION; + break; + case PGPHASHALGO_SHA256: + signame = "RSA/SHA256"; +- sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; + break; + case PGPHASHALGO_SHA384: + signame = "RSA/SHA384"; +- sigalg = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; + break; + case PGPHASHALGO_SHA512: + signame = "RSA/SHA512"; +- sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; + break; + /* fallthrough for unsupported / unknown types */ + case PGPHASHALGO_TIGER192: +@@ -1181,7 +1173,6 @@ verifyRSASignature(rpmKeyring keyring, r + case PGPHASHALGO_RIPEMD160: + default: + res = RPMRC_NOKEY; +- sigalg = SEC_OID_UNKNOWN; + break; + } + +@@ -1212,9 +1203,6 @@ verifyRSASignature(rpmKeyring keyring, r + res = RPMRC_FAIL; + goto exit; + } +- digest.type = siBuffer; +- digest.data = dig->md5; +- digest.len = dig->md5len; + } + + /* Retrieve the matching public key. */ +@@ -1222,29 +1210,8 @@ verifyRSASignature(rpmKeyring keyring, r + if (res != RPMRC_OK) + goto exit; + +- { SECItem *sig = dig->rsasig; +- size_t siglen = SECKEY_SignatureLen(dig->rsa); +- +- /* Zero-pad signature data up to expected size if necessary */ +- if (siglen > sig->len) { +- size_t pad = siglen - sig->len; +- if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { +- res = RPMRC_FAIL; +- goto exit; +- } +- memset(sig->data, 0, pad); +- memcpy(sig->data+pad, dig->rsasig->data, dig->rsasig->len); +- } +- +- if (VFY_VerifyDigest(&digest, dig->rsa, sig, sigalg, NULL) == SECSuccess) +- res = RPMRC_OK; +- else +- res = RPMRC_FAIL; +- +- if (sig != dig->rsasig) { +- SECITEM_ZfreeItem(sig, 1); +- } +- } ++ if (pgpVerifyRSA(dig)) ++ res = RPMRC_FAIL; + + exit: + if (sigp != NULL) { +@@ -1273,7 +1240,6 @@ verifyDSASignature(rpmKeyring keyring, r + pgpDigParams sigp = dig ? &dig->signature : NULL; + rpmRC res; + int xx; +- SECItem digest; + const char *hdr; + int sigver; + const char *sig = sigtd->data; +@@ -1320,9 +1286,6 @@ verifyDSASignature(rpmKeyring keyring, r + res = RPMRC_FAIL; + goto exit; + } +- digest.type = siBuffer; +- digest.data = dig->sha1; +- digest.len = dig->sha1len; + } + + /* Retrieve the matching public key. */ +@@ -1330,10 +1293,7 @@ verifyDSASignature(rpmKeyring keyring, r + if (res != RPMRC_OK) + goto exit; + +- if (VFY_VerifyDigest(&digest, dig->dsa, dig->dsasig, +- SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, NULL) == SECSuccess) +- res = RPMRC_OK; +- else ++ if (pgpVerifyDSA(dig)) + res = RPMRC_FAIL; + + exit: +--- ./rpmio/Makefile.am.orig 2009-06-23 11:40:59.000000000 +0000 ++++ ./rpmio/Makefile.am 2009-08-20 13:47:03.000000000 +0000 +@@ -2,6 +2,7 @@ + + AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ + AM_CPPFLAGS += @WITH_NSS_INCLUDE@ ++AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@ + AM_CPPFLAGS += @WITH_LUA_INCLUDE@ + AM_CPPFLAGS += @WITH_POPT_INCLUDE@ + AM_CPPFLAGS += -I$(top_srcdir)/misc +@@ -19,10 +20,17 @@ librpmio_la_SOURCES = \ + rpmstring.c rpmfileutil.c \ + rpmkeyring.c + ++if WITH_BEECRYPT ++librpmio_la_SOURCES += digest_beecrypt.c ++else ++librpmio_la_SOURCES += digest_nss.c ++endif ++ + librpmio_la_LDFLAGS = -version-info 0:0:0 + librpmio_la_LIBADD = \ + ../misc/libmisc.la \ + @WITH_NSS_LIB@ \ ++ @WITH_BEECRYPT_LIB@ \ + @WITH_LUA_LIB@ \ + @WITH_BZ2_LIB@ \ + @WITH_ZLIB_LIB@ \ +@@ -31,6 +39,17 @@ librpmio_la_LIBADD = \ + @WITH_LZMA_LIB@ \ + -lpthread + ++if WITH_INTERNAL_BEECRYPT ++librpmio_la_LIBADD += $(libbeecrypt_la) ++ ++libbeecrypt_la = $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la ++ ++$(top_builddir)/beecrypt/libbeecrypt_nolibdir.la: $(top_builddir)/beecrypt/libbeecrypt.la ++ sed -e 's/libdir=.*/libdir=/' < $(top_builddir)/beecrypt/libbeecrypt.la > $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la ++endif ++ ++ ++ + if WITH_LUAEXT + AM_CPPFLAGS += -I$(top_builddir)/luaext/ + librpmio_la_LIBADD += $(top_builddir)/luaext/libluaext.la +--- ./rpmio/base64.c.orig 2009-06-23 11:40:59.000000000 +0000 ++++ ./rpmio/base64.c 2009-08-20 13:47:03.000000000 +0000 +@@ -4,8 +4,11 @@ + #include + #include + ++#include "system.h" ++ + #include "rpmio/base64.h" + ++#ifndef WITH_BEECRYPT + + static char base64_encode_value(char value_in) + { +@@ -253,3 +256,4 @@ int main(int argc, char *argv[]) + } + #endif + ++#endif /* WITH_BEECRYPT */ +--- ./rpmio/digest.c.orig 2009-06-23 11:40:59.000000000 +0000 ++++ ./rpmio/digest.c 2009-08-20 13:47:03.000000000 +0000 +@@ -4,165 +4,12 @@ + + #include "system.h" + ++#include + #include "rpmio/digest.h" ++#include "rpmio/rpmio_internal.h" + + #include "debug.h" + +-#ifdef SHA_DEBUG +-#define DPRINTF(_a) fprintf _a +-#else +-#define DPRINTF(_a) +-#endif +- +- +-/** +- * MD5/SHA1 digest private data. +- */ +-struct DIGEST_CTX_s { +- rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ +- HASHContext *hashctx; /*!< Internal NSS hash context. */ +-}; +- +-DIGEST_CTX +-rpmDigestDup(DIGEST_CTX octx) +-{ +- DIGEST_CTX nctx; +- nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); +- nctx->hashctx = HASH_Clone(octx->hashctx); +- if (nctx->hashctx == NULL) { +- fprintf(stderr, "HASH_Clone failed\n"); +- exit(EXIT_FAILURE); /* FIX: callers do not bother checking error return */ +- } +- return nctx; +-} +- +-RPM_GNUC_PURE +-static HASH_HashType getHashType(pgpHashAlgo hashalgo) +-{ +- switch (hashalgo) { +- case PGPHASHALGO_MD5: +- return HASH_AlgMD5; +- break; +- case PGPHASHALGO_MD2: +- return HASH_AlgMD2; +- break; +- case PGPHASHALGO_SHA1: +- return HASH_AlgSHA1; +- break; +- case PGPHASHALGO_SHA256: +- return HASH_AlgSHA256; +- break; +- case PGPHASHALGO_SHA384: +- return HASH_AlgSHA384; +- break; +- case PGPHASHALGO_SHA512: +- return HASH_AlgSHA512; +- break; +- case PGPHASHALGO_RIPEMD160: +- case PGPHASHALGO_TIGER192: +- case PGPHASHALGO_HAVAL_5_160: +- default: +- return HASH_AlgNULL; +- break; +- } +-} +- +-size_t +-rpmDigestLength(pgpHashAlgo hashalgo) +-{ +- return HASH_ResultLen(getHashType(hashalgo)); +-} +- +-DIGEST_CTX +-rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags) +-{ +- HASH_HashType type; +- DIGEST_CTX ctx; +- +- if (rpmInitCrypto() < 0) +- return NULL; +- +- ctx = xcalloc(1, sizeof(*ctx)); +- ctx->flags = flags; +- +- type = getHashType(hashalgo); +- if (type == HASH_AlgNULL) { +- free(ctx); +- return NULL; +- } +- +- ctx->hashctx = HASH_Create(type); +- if (ctx->hashctx == NULL) { +- free(ctx); +- return NULL; +- } +- +- HASH_Begin(ctx->hashctx); +- +-DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); +- return ctx; +-} +- +-int +-rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) +-{ +- size_t partlen; +- const unsigned char *ptr = data; +- +- if (ctx == NULL) +- return -1; +- +-DPRINTF((stderr, "*** Update(%p,%p,%zd) hashctx %p \"%s\"\n", ctx, data, len, ctx->hashctx, ((char *)data))); +- partlen = ~(unsigned int)0xFF; +- while (len > 0) { +- if (len < partlen) { +- partlen = len; +- } +- HASH_Update(ctx->hashctx, ptr, partlen); +- ptr += partlen; +- len -= partlen; +- } +- return 0; +-} +- +-int +-rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) +-{ +- unsigned char * digest; +- unsigned int digestlen; +- +- if (ctx == NULL) +- return -1; +- digestlen = HASH_ResultLenContext(ctx->hashctx); +- digest = xmalloc(digestlen); +- +-DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); +-/* FIX: check rc */ +- HASH_End(ctx->hashctx, digest, (unsigned int *) &digestlen, digestlen); +- +- /* Return final digest. */ +- if (!asAscii) { +- if (lenp) *lenp = digestlen; +- if (datap) { +- *datap = digest; +- digest = NULL; +- } +- } else { +- if (lenp) *lenp = (2*digestlen) + 1; +- if (datap) { +- const uint8_t * s = (const uint8_t *) digest; +- *datap = pgpHexStr(s, digestlen); +- } +- } +- if (digest) { +- memset(digest, 0, digestlen); /* In case it's sensitive */ +- free(digest); +- } +- HASH_Destroy(ctx->hashctx); +- memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ +- free(ctx); +- return 0; +-} + + void fdInitDigest(FD_t fd, pgpHashAlgo hashalgo, int flags) + { +--- ./rpmio/digest.h.orig 2009-06-23 11:40:59.000000000 +0000 ++++ ./rpmio/digest.h 2009-08-20 13:47:03.000000000 +0000 +@@ -1,11 +1,6 @@ + #ifndef _RPMDIGEST_H + #define _RPMDIGEST_H + +-#include +-#include +-#include +-#include +- + #include + #include "rpmio/base64.h" + #include "rpmio/rpmio_internal.h" +@@ -55,12 +50,22 @@ struct pgpDig_s { + size_t md5len; /*!< (rsa) V3 signature hash length. */ + + /* DSA parameters */ +- SECKEYPublicKey *dsa; +- SECItem *dsasig; ++ void *dsa; ++ void *dsasig; + + /* RSA parameters */ +- SECKEYPublicKey *rsa; +- SECItem *rsasig; ++ void *rsa; ++ void *rsasig; + }; + ++int pgpSetSigMpiRSA(pgpDig dig, int num, const uint8_t *p); ++int pgpSetPubMpiRSA(pgpDig dig, int num, const uint8_t *p); ++void pgpCleanRSA(pgpDig dig); ++int pgpVerifyRSA(pgpDig dig); ++ ++int pgpSetSigMpiDSA(pgpDig dig, int num, const uint8_t *p); ++int pgpSetPubMpiDSA(pgpDig dig, int num, const uint8_t *p); ++void pgpCleanDSA(pgpDig dig); ++int pgpVerifyDSA(pgpDig dig); ++ + #endif /* _RPMDIGEST_H */ +--- ./rpmio/digest_beecrypt.c.orig 2009-08-20 13:47:03.000000000 +0000 ++++ ./rpmio/digest_beecrypt.c 2009-08-20 13:47:03.000000000 +0000 +@@ -0,0 +1,503 @@ ++#include "system.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#if HAVE_BEECRYPT_API_H ++#include ++#include ++#include ++#endif ++ ++#include ++#include "rpmio/digest.h" ++#include "rpmio/rpmio_internal.h" ++ ++#include "debug.h" ++ ++/* interface to beecrpyt crypto framework */ ++ ++/**************************** init ************************************/ ++ ++int rpmInitCrypto(void) { ++ return 0; ++} ++ ++int rpmFreeCrypto(void) { ++ return 0; ++} ++ ++/**************************** helpers ************************************/ ++ ++static inline unsigned int pgpMpiBits(const uint8_t *p) ++{ ++ return ((p[0] << 8) | p[1]); ++} ++ ++static inline size_t pgpMpiLen(const uint8_t *p) ++{ ++ return (2 + ((pgpMpiBits(p)+7)>>3)); ++} ++ ++static inline char * pgpHexCvt(char *t, const byte *s, int nbytes) ++ /*@modifies *t @*/ ++{ ++ static char hex[] = "0123456789abcdef"; ++ while (nbytes-- > 0) { ++ unsigned int i; ++ i = *s++; ++ *t++ = hex[ (i >> 4) & 0xf ]; ++ *t++ = hex[ (i ) & 0xf ]; ++ } ++ *t = '\0'; ++ return t; ++} ++ ++static const char * pgpMpiHex(const byte *p) ++{ ++ static char prbuf[2048]; ++ char *t = prbuf; ++ t = pgpHexCvt(t, p+2, pgpMpiLen(p)-2); ++ return prbuf; ++} ++ ++static int pgpHexSet(int lbits, mpnumber * mpn, const byte * p) ++{ ++ unsigned int mbits = pgpMpiBits(p); ++ unsigned int nbits; ++ unsigned int nbytes; ++ char *t; ++ unsigned int ix; ++ ++ nbits = (lbits > mbits ? lbits : mbits); ++ nbytes = ((nbits + 7) >> 3); ++ t = xmalloc(2*nbytes+1); ++ ix = 2 * ((nbits - mbits) >> 3); ++ ++ if (ix > 0) memset(t, (int)'0', ix); ++ strcpy(t+ix, pgpMpiHex(p)); ++ (void) mpnsethex(mpn, t); ++ t = _free(t); ++ return 0; ++} ++ ++ ++/****************************** RSA **************************************/ ++ ++struct pgpDigSigRSA_s { ++ mpnumber c; ++}; ++ ++struct pgpDigPubRSA_s { ++ rsapk rsa_pk; ++}; ++ ++int ++pgpSetSigMpiRSA(pgpDig dig, int num, const uint8_t *p) ++{ ++ struct pgpDigSigRSA_s *sig; ++ if (num != 0) ++ return 1; ++ if (!dig->rsasig) ++ dig->rsasig = xcalloc(1, sizeof(*sig)); ++ sig = dig->rsasig; ++ if (!sig) ++ return 1; ++ (void) mpnsethex(&sig->c, pgpMpiHex(p)); ++ return 0; ++} ++ ++int ++pgpSetPubMpiRSA(pgpDig dig, int num, const uint8_t *p) ++{ ++ struct pgpDigPubRSA_s *pub; ++ ++ if (!dig->rsa) ++ dig->rsa = xcalloc(1, sizeof(*pub)); ++ pub = dig->rsa; ++ if (!pub) ++ return 1; ++ switch(num) { ++ case 0: ++ (void) mpbsethex(&pub->rsa_pk.n, pgpMpiHex(p)); ++ return 0; ++ case 1: ++ (void) mpnsethex(&pub->rsa_pk.e, pgpMpiHex(p)); ++ return 0; ++ default: ++ return 1; ++ } ++} ++ ++void pgpCleanRSA(pgpDig dig) ++{ ++ if (!dig) ++ return; ++ if (dig->rsa) { ++ dig->rsa = _free(dig->rsa); ++ } ++ if (dig->rsasig) { ++ dig->rsasig = _free(dig->rsasig); ++ } ++} ++ ++static inline unsigned char nibble(char c) ++{ ++ if (c >= '0' && c <= '9') ++ return (c - '0'); ++ if (c >= 'A' && c <= 'F') ++ return (c - 'A') + 10; ++ if (c >= 'a' && c <= 'f') ++ return (c - 'a') + 10; ++ return 0; ++} ++ ++int pgpVerifyRSA(pgpDig dig) ++{ ++ const char * prefix = NULL; ++ int res; ++ mpnumber rsahm; ++ struct pgpDigSigRSA_s *sig; ++ struct pgpDigPubRSA_s *pub; ++ ++ sig = dig->rsasig; ++ pub = dig->rsa; ++ if (!sig || !pub) ++ return 1; ++ ++ switch (dig->signature.hash_algo) { ++ case PGPHASHALGO_MD5: ++ prefix = "3020300c06082a864886f70d020505000410"; ++ break; ++ case PGPHASHALGO_SHA1: ++ prefix = "3021300906052b0e03021a05000414"; ++ break; ++ case PGPHASHALGO_MD2: ++ prefix = "3020300c06082a864886f70d020205000410"; ++ break; ++ case PGPHASHALGO_SHA256: ++ prefix = "3031300d060960864801650304020105000420"; ++ break; ++ case PGPHASHALGO_SHA384: ++ prefix = "3041300d060960864801650304020205000430"; ++ break; ++ case PGPHASHALGO_SHA512: ++ prefix = "3051300d060960864801650304020305000440"; ++ break; ++ /* fallthrough for unsupported / unknown types */ ++ default: ++ return 1; ++ } ++ ++ /* Generate RSA modulus parameter. */ ++ { unsigned int nbits = MP_WORDS_TO_BITS(sig->c.size); ++ unsigned int nb = (nbits + 7) >> 3; ++ byte *buf, *bp; ++ ++ if (nb < 3) ++ return 1; ++ buf = xmalloc(nb); ++ memset(buf, 0xff, nb); ++ buf[0] = 0x00; ++ buf[1] = 0x01; ++ bp = buf + nb - strlen(prefix)/2 - dig->md5len - 1; ++ if (bp < buf) ++ return 1; ++ *bp++ = 0; ++ for (; *prefix; prefix += 2) ++ *bp++ = (nibble(prefix[0]) << 4) | nibble(prefix[1]); ++ memcpy(bp, dig->md5, dig->md5len); ++ mpnzero(&rsahm); ++ (void) mpnsetbin(&rsahm, buf, nb); ++ buf = _free(buf); ++ } ++#if HAVE_BEECRYPT_API_H ++ res = rsavrfy(&pub->rsa_pk.n, &pub->rsa_pk.e, &sig->c, &rsahm) == 1 ? 0 : 1; ++#else ++ res = rsavrfy(&pub->rsa_pk, &rsahm, &sig->c) == 1 ? 0 : 1; ++#endif ++ mpnfree(&rsahm); ++ return res; ++} ++ ++ ++/****************************** DSA **************************************/ ++ ++struct pgpDigSigDSA_s { ++ mpnumber r; ++ mpnumber s; ++}; ++ ++struct pgpDigPubDSA_s { ++ mpbarrett p; ++ mpbarrett q; ++ mpnumber g; ++ mpnumber y; ++}; ++ ++int ++pgpSetSigMpiDSA(pgpDig dig, int num, const uint8_t *p) ++{ ++ struct pgpDigSigDSA_s *sig; ++ ++ if (!dig->dsasig) ++ dig->dsasig = xcalloc(1, sizeof(*sig)); ++ sig = dig->dsasig; ++ if (!sig) ++ return 1; ++ switch(num) { ++ case 0: ++ return pgpHexSet(160, &sig->r, p); ++ case 1: ++ return pgpHexSet(160, &sig->s, p); ++ default: ++ return 1; ++ } ++} ++ ++int ++pgpSetPubMpiDSA(pgpDig dig, int num, const uint8_t *p) ++{ ++ struct pgpDigPubDSA_s *pub; ++ ++ if (!dig->dsa) ++ dig->dsa = xcalloc(1, sizeof(*pub)); ++ pub = dig->dsa; ++ if (!pub) ++ return 1; ++ switch(num) { ++ case 0: ++ mpbsethex(&pub->p, pgpMpiHex(p)); ++ return 0; ++ case 1: ++ mpbsethex(&pub->q, pgpMpiHex(p)); ++ return 0; ++ case 2: ++ mpnsethex(&pub->g, pgpMpiHex(p)); ++ return 0; ++ case 3: ++ mpnsethex(&pub->y, pgpMpiHex(p)); ++ return 0; ++ default: ++ return 1; ++ } ++} ++ ++void pgpCleanDSA(pgpDig dig) ++{ ++ if (!dig) ++ return; ++ if (dig->dsa) { ++ dig->dsa = _free(dig->dsa); ++ } ++ if (dig->dsasig) { ++ dig->dsasig = _free(dig->dsasig); ++ } ++} ++ ++int pgpVerifyDSA(pgpDig dig) ++{ ++ struct pgpDigSigDSA_s *sig; ++ struct pgpDigPubDSA_s *pub; ++ mpnumber hm; ++ int res; ++ ++ sig = dig->dsasig; ++ pub = dig->dsa; ++ if (!sig || !pub) ++ return 1; ++ mpnzero(&hm); ++ mpnsetbin(&hm, dig->sha1, dig->sha1len); ++ res = dsavrfy(&pub->p, &pub->q, &pub->g, &hm, &pub->y, &sig->r, &sig->s) == 1 ? 0 : 1; ++ mpnfree(&hm); ++ return res; ++} ++ ++/**************************** digest ************************************/ ++ ++#ifdef SHA_DEBUG ++#define DPRINTF(_a) fprintf _a ++#else ++#define DPRINTF(_a) ++#endif ++ ++/** ++ * MD5/SHA1 digest private data. ++ */ ++struct DIGEST_CTX_s { ++ rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ ++ uint32_t datalen; /*!< No. bytes in block of plaintext data. */ ++ uint32_t paramlen; /*!< No. bytes of digest parameters. */ ++ uint32_t digestlen; /*!< No. bytes of digest. */ ++ void * param; /*!< Digest parameters. */ ++ int (*Reset) (void * param) ++ /*@modifies param @*/; /*!< Digest initialize. */ ++ int (*Update) (void * param, const byte * data, size_t size) ++ /*@modifies param @*/; /*!< Digest transform. */ ++ int (*Digest) (void * param, /*@out@*/ byte * digest) ++ /*@modifies param, digest @*/; /*!< Digest finish. */ ++}; ++ ++DIGEST_CTX ++rpmDigestDup(DIGEST_CTX octx) ++{ ++ DIGEST_CTX nctx; ++ nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); ++ nctx->param = memcpy(xcalloc(1, nctx->paramlen), octx->param, nctx->paramlen); ++ return nctx; ++} ++ ++size_t ++rpmDigestLength(pgpHashAlgo hashalgo) ++{ ++ switch (hashalgo) { ++ case PGPHASHALGO_MD5: ++ return 16; ++ case PGPHASHALGO_SHA1: ++ return 20; ++#if HAVE_BEECRYPT_API_H ++ case PGPHASHALGO_SHA256: ++ return 32; ++ case PGPHASHALGO_SHA384: ++ return 48; ++ case PGPHASHALGO_SHA512: ++ return 64; ++#endif ++ default: ++ return 0; ++ } ++} ++ ++DIGEST_CTX ++rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags) ++{ ++ DIGEST_CTX ctx = xcalloc(1, sizeof(*ctx)); ++ int xx; ++ ++ ctx->flags = flags; ++ ++ switch (hashalgo) { ++ case PGPHASHALGO_MD5: ++ ctx->digestlen = 16; ++ ctx->datalen = 64; ++ ctx->paramlen = sizeof(md5Param); ++ ctx->param = xcalloc(1, ctx->paramlen); ++ ctx->Reset = (void *) md5Reset; ++ ctx->Update = (void *) md5Update; ++ ctx->Digest = (void *) md5Digest; ++ break; ++ case PGPHASHALGO_SHA1: ++ ctx->digestlen = 20; ++ ctx->datalen = 64; ++ ctx->paramlen = sizeof(sha1Param); ++ ctx->param = xcalloc(1, ctx->paramlen); ++ ctx->Reset = (void *) sha1Reset; ++ ctx->Update = (void *) sha1Update; ++ ctx->Digest = (void *) sha1Digest; ++ break; ++#if HAVE_BEECRYPT_API_H ++ case PGPHASHALGO_SHA256: ++ ctx->digestlen = 32; ++ ctx->datalen = 64; ++ ctx->paramlen = sizeof(sha256Param); ++ ctx->param = xcalloc(1, ctx->paramlen); ++ ctx->Reset = (void *) sha256Reset; ++ ctx->Update = (void *) sha256Update; ++ ctx->Digest = (void *) sha256Digest; ++ break; ++ case PGPHASHALGO_SHA384: ++ ctx->digestlen = 48; ++ ctx->datalen = 128; ++ ctx->paramlen = sizeof(sha384Param); ++ ctx->param = xcalloc(1, ctx->paramlen); ++ ctx->Reset = (void *) sha384Reset; ++ ctx->Update = (void *) sha384Update; ++ ctx->Digest = (void *) sha384Digest; ++ break; ++ case PGPHASHALGO_SHA512: ++ ctx->digestlen = 64; ++ ctx->datalen = 128; ++ ctx->paramlen = sizeof(sha512Param); ++ ctx->param = xcalloc(1, ctx->paramlen); ++ ctx->Reset = (void *) sha512Reset; ++ ctx->Update = (void *) sha512Update; ++ ctx->Digest = (void *) sha512Digest; ++ break; ++#endif ++ case PGPHASHALGO_RIPEMD160: ++ case PGPHASHALGO_MD2: ++ case PGPHASHALGO_TIGER192: ++ case PGPHASHALGO_HAVAL_5_160: ++ default: ++ free(ctx); ++ return NULL; ++ } ++ ++ xx = (*ctx->Reset) (ctx->param); ++ ++DPRINTF((stderr, "*** Init(%x) ctx %p param %p\n", flags, ctx, ctx->param)); ++ return ctx; ++} ++ ++/* LCL: ctx->param may be modified, but ctx is abstract @*/ ++int ++rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) ++{ ++ if (ctx == NULL) ++ return -1; ++ ++DPRINTF((stderr, "*** Update(%p,%p,%d) param %p \"%s\"\n", ctx, data, len, ctx->param, ((char *)data))); ++ return (*ctx->Update) (ctx->param, data, len); ++} ++ ++int ++rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) ++{ ++ byte * digest; ++ char * t; ++ int i; ++ ++ if (ctx == NULL) ++ return -1; ++ digest = xmalloc(ctx->digestlen); ++ ++DPRINTF((stderr, "*** Final(%p,%p,%p,%d) param %p digest %p\n", ctx, datap, lenp, asAscii, ctx->param, digest)); ++ /* FIX: check rc */ ++ (void) (*ctx->Digest) (ctx->param, digest); ++ ++ /* Return final digest. */ ++ if (!asAscii) { ++ if (lenp) *lenp = ctx->digestlen; ++ if (datap) { ++ *datap = digest; ++ digest = NULL; ++ } ++ } else { ++ if (lenp) *lenp = (2*ctx->digestlen) + 1; ++ if (datap) { ++ const byte * s = (const byte *) digest; ++ static const char hex[] = "0123456789abcdef"; ++ ++ *datap = t = xmalloc((2*ctx->digestlen) + 1); ++ for (i = 0 ; i < ctx->digestlen; i++) { ++ *t++ = hex[ (unsigned)((*s >> 4) & 0x0f) ]; ++ *t++ = hex[ (unsigned)((*s++ ) & 0x0f) ]; ++ } ++ *t = '\0'; ++ } ++ } ++ if (digest) { ++ memset(digest, 0, ctx->digestlen); /* In case it's sensitive */ ++ free(digest); ++ } ++ memset(ctx->param, 0, ctx->paramlen); /* In case it's sensitive */ ++ free(ctx->param); ++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ ++ free(ctx); ++ return 0; ++} +--- ./rpmio/digest_nss.c.orig 2009-08-20 13:47:03.000000000 +0000 ++++ ./rpmio/digest_nss.c 2009-08-20 13:49:53.000000000 +0000 +@@ -0,0 +1,513 @@ ++#include ++#include ++#include ++#include ++ ++#include "system.h" ++ ++#include ++#include "rpmio/rpmio_internal.h" ++#include "rpmio/digest.h" ++ ++#include "debug.h" ++ ++/* interface to nss crypto framework */ ++ ++/**************************** init ************************************/ ++ ++static int _crypto_initialized = 0; ++static int _new_process = 1; ++ ++/* ++ * Only flag for re-initialization here, in the common case the child ++ * exec()'s something else shutting down NSS here would be waste of time. ++ */ ++static void at_forkchild(void) { ++ _new_process = 1; ++} ++ ++int rpmInitCrypto(void) { ++ int rc = 0; ++ ++ /* Lazy NSS shutdown for re-initialization after fork() */ ++ if (_new_process && _crypto_initialized) { ++ rpmFreeCrypto(); ++ } ++ ++ /* Initialize NSS if not already done */ ++ if (!_crypto_initialized) { ++ if (NSS_NoDB_Init(NULL) != SECSuccess) { ++ rc = -1; ++ } else { ++ _crypto_initialized = 1; ++ } ++ } ++ ++ /* Register one post-fork handler per process */ ++ if (_new_process) { ++ if (pthread_atfork(NULL, NULL, at_forkchild) != 0) { ++ rpmlog(RPMLOG_WARNING, _("Failed to register fork handler: %m\n")); ++ } ++ _new_process = 0; ++ } ++ return rc; ++} ++ ++int rpmInitCrypto(void) { ++ int rc = 0; ++ ++ if (!_crypto_initialized) { ++ if (NSS_NoDB_Init(NULL) != SECSuccess) { ++ rc = -1; ++ } else { ++ _crypto_initialized = 1; ++ } ++ } ++ return rc; ++} ++ ++int rpmFreeCrypto(void) ++{ ++ int rc = 0; ++ if (_crypto_initialized) { ++ rc = (NSS_Shutdown() != SECSuccess); ++ _crypto_initialized = 0; ++ } ++ return rc; ++} ++ ++/**************************** helpers ************************************/ ++ ++static SECKEYPublicKey *pgpNewPublicKey(KeyType type) ++{ ++ PRArenaPool *arena; ++ SECKEYPublicKey *key; ++ ++ arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); ++ if (arena == NULL) ++ return NULL; ++ ++ key = PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey)); ++ ++ if (key == NULL) { ++ PORT_FreeArena(arena, PR_FALSE); ++ return NULL; ++ } ++ ++ key->keyType = type; ++ key->pkcs11ID = CK_INVALID_HANDLE; ++ key->pkcs11Slot = NULL; ++ key->arena = arena; ++ return key; ++} ++ ++static SECItem *pgpMpiItem(PRArenaPool *arena, SECItem *item, const uint8_t *p) ++{ ++ size_t nbytes = pgpMpiLen(p)-2; ++ ++ if (item == NULL) { ++ if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL) ++ return item; ++ } else { ++ if (arena != NULL) ++ item->data = PORT_ArenaGrow(arena, item->data, item->len, nbytes); ++ else ++ item->data = PORT_Realloc(item->data, nbytes); ++ ++ if (item->data == NULL) { ++ if (arena == NULL) ++ SECITEM_FreeItem(item, PR_TRUE); ++ return NULL; ++ } ++ } ++ ++ memcpy(item->data, p+2, nbytes); ++ item->len = nbytes; ++ return item; ++} ++ ++static int pgpMpiSet(unsigned int lbits, ++ void *dest, const uint8_t * p, const uint8_t * pend) ++{ ++ unsigned int mbits = pgpMpiBits(p); ++ unsigned int nbits; ++ size_t nbytes; ++ char *t = dest; ++ unsigned int ix; ++ ++ if ((p + ((mbits+7) >> 3)) > pend) ++ return 1; ++ ++ if (mbits > lbits) ++ return 1; ++ ++ nbits = (lbits > mbits ? lbits : mbits); ++ nbytes = ((nbits + 7) >> 3); ++ ix = (nbits - mbits) >> 3; ++ ++ if (ix > 0) memset(t, '\0', ix); ++ memcpy(t+ix, p+2, nbytes-ix); ++ ++ return 0; ++} ++ ++/****************************** RSA **************************************/ ++ ++int ++pgpSetSigMpiRSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) ++{ ++ SECItem *sig; ++ ++ if (num != 0) ++ return 1; ++ sig = dig->rsasig; ++ sig = pgpMpiItem(NULL, sig, p); ++ dig->rsasig = sig; ++ if (sig == NULL) ++ return 1; ++ return 0; ++} ++ ++int ++pgpSetPubMpiRSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) ++{ ++ SECKEYPublicKey *pub; ++ ++ if (!dig->rsa) ++ dig->rsa = pgpNewPublicKey(rsaKey); ++ pub = dig->rsa; ++ if (!pub) ++ return 1; ++ switch(num) { ++ case 0: ++ pgpMpiItem(dig->rsa->arena, &pub->u.rsa.modulus, p); ++ return 0; ++ case 1: ++ pgpMpiItem(dig->rsa->arena, &pub->u.rsa.publicExponent, p); ++ return 0; ++ default: ++ return 1; ++ } ++} ++ ++void pgpCleanRSA(pgpDig dig) ++{ ++ if (!dig) ++ return; ++ if (dig->rsa) { ++ SECKEY_DestroyPublicKey(dig->rsa); ++ dig->rsa = NULL; ++ } ++ if (dig->rsasig) { ++ SECITEM_ZfreeItem(dig->rsasig, PR_TRUE); ++ dig->rsasig = NULL; ++ } ++} ++ ++int pgpVerifyRSA(pgpDig dig) ++{ ++ SECOidTag sigalg; ++ SECItem digest; ++ SECItem *sig; ++ size_t siglen; ++ int res; ++ ++ switch (dig->hash_algo) { ++ case PGPHASHALGO_MD5: ++ sigalg = SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION; ++ break; ++ case PGPHASHALGO_SHA1: ++ sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; ++ break; ++ case PGPHASHALGO_MD2: ++ sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION; ++ break; ++ case PGPHASHALGO_SHA256: ++ sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; ++ break; ++ case PGPHASHALGO_SHA384: ++ sigalg = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; ++ break; ++ case PGPHASHALGO_SHA512: ++ sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; ++ break; ++ /* fallthrough for unsupported / unknown types */ ++ default: ++ sigalg = SEC_OID_UNKNOWN; ++ break; ++ } ++ digest.type = siBuffer; ++ digest.data = dig->md5; ++ digest.len = dig->md5len; ++ ++ sig = dig->rsasig; ++ siglen = SECKEY_SignatureLen(dig->rsa); ++ ++ /* Zero-pad signature data up to expected size if necessary */ ++ if (siglen > sig->len) { ++ size_t pad = siglen - sig->len; ++ if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { ++ return 1; ++ } ++ memset(sig->data, 0, pad); ++ memcpy(sig->data+pad, dig->rsasig->data, dig->rsasig->len); ++ } ++ ++ if (VFY_VerifyDigest(&digest, dig->rsa, sig, sigalg, NULL) == SECSuccess) ++ res = 0; ++ else ++ res = 1; ++ ++ if (sig != dig->rsasig) { ++ SECITEM_ZfreeItem(sig, 1); ++ } ++ return res; ++} ++ ++ ++/****************************** DSA **************************************/ ++ ++int ++pgpSetSigMpiDSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) ++{ ++ SECItem *sig, *new; ++ ++ switch(num) { ++ case 0: ++ sig = SECITEM_AllocItem(NULL, NULL, 2*DSA_SUBPRIME_LEN); ++ dig->dsasig = sig; ++ memset(sig->data, 0, 2*DSA_SUBPRIME_LEN); ++ pgpMpiSet(DSA_SUBPRIME_LEN*8, sig->data, p, pend); ++ return 0; ++ case 1: ++ sig = dig->dsasig; ++ if (!sig) ++ return 1; ++ pgpMpiSet(DSA_SUBPRIME_LEN*8, sig->data + DSA_SUBPRIME_LEN, p, pend); ++ new = SECITEM_AllocItem(NULL, NULL, 0); ++ if (!new) ++ return 1; ++ if (DSAU_EncodeDerSig(new, sig) != SECSuccess) ++ return 1; ++ SECITEM_FreeItem(sig, PR_TRUE); ++ dig->dsasig = new; ++ return 0; ++ default: ++ return 1; ++ } ++} ++ ++int ++pgpSetPubMpiDSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) ++{ ++ SECKEYPublicKey *pub; ++ ++ if (!dig->dsa) ++ dig->dsa = pgpNewPublicKey(dsaKey); ++ pub = dig->dsa; ++ if (!pub) ++ return 1; ++ switch(num) { ++ case 0: ++ pgpMpiItem(pub->arena, &pub->u.dsa.params.prime, p); ++ return 0; ++ case 1: ++ pgpMpiItem(pub->arena, &pub->u.dsa.params.subPrime, p); ++ return 0; ++ case 2: ++ pgpMpiItem(pub->arena, &pub->u.dsa.params.base, p); ++ return 0; ++ case 3: ++ pgpMpiItem(pub->arena, &pub->u.dsa.publicValue, p); ++ return 0; ++ default: ++ return 1; ++ } ++} ++ ++void pgpCleanDSA(pgpDig dig) ++{ ++ if (!dig) ++ return; ++ if (dig->dsa) { ++ SECKEY_DestroyPublicKey(dig->dsa); ++ dig->dsa = NULL; ++ } ++ if (dig->dsasig) { ++ SECITEM_ZfreeItem(dig->dsasig, PR_TRUE); ++ dig->dsasig = NULL; ++ } ++} ++ ++int pgpVerifyDSA(pgpDig dig) ++{ ++ SECItem digest; ++ ++ digest.type = siBuffer; ++ digest.data = dig->sha1; ++ digest.len = dig->sha1len; ++ if (VFY_VerifyDigest(&digest, dig->dsa, dig->dsasig, SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, NULL) == SECSuccess) ++ return 0; ++ else ++ return 1; ++} ++ ++ ++/**************************** digest ************************************/ ++ ++ ++#ifdef SHA_DEBUG ++#define DPRINTF(_a) fprintf _a ++#else ++#define DPRINTF(_a) ++#endif ++ ++ ++/** ++ * MD5/SHA1 digest private data. ++ */ ++struct DIGEST_CTX_s { ++ rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ ++ HASHContext *hashctx; /*!< Internal NSS hash context. */ ++}; ++ ++DIGEST_CTX ++rpmDigestDup(DIGEST_CTX octx) ++{ ++ DIGEST_CTX nctx; ++ nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); ++ nctx->hashctx = HASH_Clone(octx->hashctx); ++ if (nctx->hashctx == NULL) { ++ fprintf(stderr, "HASH_Clone failed\n"); ++ exit(EXIT_FAILURE); /* FIX: callers do not bother checking error return */ ++ } ++ return nctx; ++} ++ ++RPM_GNUC_PURE ++static HASH_HashType getHashType(pgpHashAlgo hashalgo) ++{ ++ switch (hashalgo) { ++ case PGPHASHALGO_MD5: ++ return HASH_AlgMD5; ++ break; ++ case PGPHASHALGO_MD2: ++ return HASH_AlgMD2; ++ break; ++ case PGPHASHALGO_SHA1: ++ return HASH_AlgSHA1; ++ break; ++ case PGPHASHALGO_SHA256: ++ return HASH_AlgSHA256; ++ break; ++ case PGPHASHALGO_SHA384: ++ return HASH_AlgSHA384; ++ break; ++ case PGPHASHALGO_SHA512: ++ return HASH_AlgSHA512; ++ break; ++ case PGPHASHALGO_RIPEMD160: ++ case PGPHASHALGO_TIGER192: ++ case PGPHASHALGO_HAVAL_5_160: ++ default: ++ return HASH_AlgNULL; ++ break; ++ } ++} ++ ++size_t ++rpmDigestLength(pgpHashAlgo hashalgo) ++{ ++ return HASH_ResultLen(getHashType(hashalgo)); ++} ++ ++DIGEST_CTX ++rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags) ++{ ++ HASH_HashType type; ++ DIGEST_CTX ctx; ++ ++ if (rpmInitCrypto() < 0) ++ return NULL; ++ ++ ctx = xcalloc(1, sizeof(*ctx)); ++ ctx->flags = flags; ++ ++ type = getHashType(hashalgo); ++ if (type == HASH_AlgNULL) { ++ free(ctx); ++ return NULL; ++ } ++ ++ ctx->hashctx = HASH_Create(type); ++ if (ctx->hashctx == NULL) { ++ free(ctx); ++ return NULL; ++ } ++ ++ HASH_Begin(ctx->hashctx); ++ ++DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); ++ return ctx; ++} ++ ++int ++rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) ++{ ++ size_t partlen; ++ const unsigned char *ptr = data; ++ ++ if (ctx == NULL) ++ return -1; ++ ++DPRINTF((stderr, "*** Update(%p,%p,%zd) hashctx %p \"%s\"\n", ctx, data, len, ctx->hashctx, ((char *)data))); ++ partlen = ~(unsigned int)0xFF; ++ while (len > 0) { ++ if (len < partlen) { ++ partlen = len; ++ } ++ HASH_Update(ctx->hashctx, ptr, partlen); ++ ptr += partlen; ++ len -= partlen; ++ } ++ return 0; ++} ++ ++int ++rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) ++{ ++ unsigned char * digest; ++ unsigned int digestlen; ++ ++ if (ctx == NULL) ++ return -1; ++ digestlen = HASH_ResultLenContext(ctx->hashctx); ++ digest = xmalloc(digestlen); ++ ++DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); ++/* FIX: check rc */ ++ HASH_End(ctx->hashctx, digest, (unsigned int *) &digestlen, digestlen); ++ ++ /* Return final digest. */ ++ if (!asAscii) { ++ if (lenp) *lenp = digestlen; ++ if (datap) { ++ *datap = digest; ++ digest = NULL; ++ } ++ } else { ++ if (lenp) *lenp = (2*digestlen) + 1; ++ if (datap) { ++ const uint8_t * s = (const uint8_t *) digest; ++ *datap = pgpHexStr(s, digestlen); ++ } ++ } ++ if (digest) { ++ memset(digest, 0, digestlen); /* In case it's sensitive */ ++ free(digest); ++ } ++ HASH_Destroy(ctx->hashctx); ++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ ++ free(ctx); ++ return 0; ++} +--- ./rpmio/rpmpgp.c.orig 2009-06-23 11:40:59.000000000 +0000 ++++ ./rpmio/rpmpgp.c 2009-08-20 13:50:14.000000000 +0000 +@@ -20,9 +20,6 @@ static int _debug = 0; + + static int _print = 0; + +-static int _crypto_initialized = 0; +-static int _new_process = 1; +- + static struct pgpValTbl_s const pgpSigTypeTbl[] = { + { PGPSIGTYPE_BINARY, "Binary document signature" }, + { PGPSIGTYPE_TEXT, "Text document signature" }, +@@ -291,99 +288,6 @@ int pgpValTok(pgpValTbl vs, const char * + } while ((++vs)->val != -1); + return vs->val; + } +-/** +- * @return 0 on success +- */ +-static int pgpMpiSet(const char * pre, unsigned int lbits, +- void *dest, const uint8_t * p, const uint8_t * pend) +-{ +- unsigned int mbits = pgpMpiBits(p); +- unsigned int nbits; +- size_t nbytes; +- char *t = dest; +- unsigned int ix; +- +- if ((p + ((mbits+7) >> 3)) > pend) +- return 1; +- +- if (mbits > lbits) +- return 1; +- +- nbits = (lbits > mbits ? lbits : mbits); +- nbytes = ((nbits + 7) >> 3); +- ix = (nbits - mbits) >> 3; +- +-if (_debug) +-fprintf(stderr, "*** mbits %u nbits %u nbytes %zu ix %u\n", mbits, nbits, nbytes, ix); +- if (ix > 0) memset(t, '\0', ix); +- memcpy(t+ix, p+2, nbytes-ix); +-if (_debug) +-fprintf(stderr, "*** %s %s\n", pre, pgpHexStr(dest, nbytes)); +- +- return 0; +-} +- +-/** +- * @return NULL on error +- */ +-static SECItem *pgpMpiItem(PRArenaPool *arena, SECItem *item, const uint8_t *p) +-{ +- size_t nbytes = pgpMpiLen(p)-2; +- +- if (item == NULL) { +- if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL) +- return item; +- } else { +- if (arena != NULL) +- item->data = PORT_ArenaGrow(arena, item->data, item->len, nbytes); +- else +- item->data = PORT_Realloc(item->data, nbytes); +- +- if (item->data == NULL) { +- if (arena == NULL) +- SECITEM_FreeItem(item, PR_TRUE); +- return NULL; +- } +- } +- +- memcpy(item->data, p+2, nbytes); +- item->len = nbytes; +- return item; +-} +-/*@=boundswrite@*/ +- +-static SECKEYPublicKey *pgpNewPublicKey(KeyType type) +-{ +- PRArenaPool *arena; +- SECKEYPublicKey *key; +- +- arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); +- if (arena == NULL) +- return NULL; +- +- key = PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey)); +- +- if (key == NULL) { +- PORT_FreeArena(arena, PR_FALSE); +- return NULL; +- } +- +- key->keyType = type; +- key->pkcs11ID = CK_INVALID_HANDLE; +- key->pkcs11Slot = NULL; +- key->arena = arena; +- return key; +-} +- +-static SECKEYPublicKey *pgpNewRSAKey(void) +-{ +- return pgpNewPublicKey(rsaKey); +-} +- +-static SECKEYPublicKey *pgpNewDSAKey(void) +-{ +- return pgpNewPublicKey(dsaKey); +-} + + /** \ingroup rpmpgp + * Is buffer at beginning of an OpenPGP packet? +@@ -579,29 +483,16 @@ static int pgpPrtSigParams(pgpTag tag, u + { + const uint8_t * pend = h + hlen; + size_t i; +- SECItem dsaraw; +- unsigned char dsabuf[2*DSA_SUBPRIME_LEN]; + char *mpi; + +- dsaraw.type = 0; +- dsaraw.data = dsabuf; +- dsaraw.len = sizeof(dsabuf); +- + for (i = 0; p < pend; i++, p += pgpMpiLen(p)) { + if (pubkey_algo == PGPPUBKEYALGO_RSA) { + if (i >= 1) break; + if (_dig && + (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT)) + { +- switch (i) { +- case 0: /* m**d */ +- _dig->rsasig = pgpMpiItem(NULL, _dig->rsasig, p); +- if (_dig->rsasig == NULL) +- return 1; +- break; +- default: +- break; +- } ++ if (pgpSetSigMpiRSA(_dig, i, p)) ++ return 1; + } + pgpPrtStr("", pgpSigRSA[i]); + } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { +@@ -609,30 +500,8 @@ static int pgpPrtSigParams(pgpTag tag, u + if (_dig && + (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT)) + { +- int xx; +- xx = 0; +- switch (i) { +- case 0: +- memset(dsaraw.data, '\0', 2*DSA_SUBPRIME_LEN); +- /* r */ +- xx = pgpMpiSet(pgpSigDSA[i], DSA_SUBPRIME_LEN*8, dsaraw.data, p, pend); +- break; +- case 1: /* s */ +- xx = pgpMpiSet(pgpSigDSA[i], DSA_SUBPRIME_LEN*8, dsaraw.data + DSA_SUBPRIME_LEN, p, pend); +- if (_dig->dsasig != NULL) +- SECITEM_FreeItem(_dig->dsasig, PR_FALSE); +- else if ((_dig->dsasig=SECITEM_AllocItem(NULL, NULL, 0)) == NULL) { +- xx = 1; +- break; +- } +- if (DSAU_EncodeDerSig(_dig->dsasig, &dsaraw) != SECSuccess) +- xx = 1; +- break; +- default: +- xx = 1; +- break; +- } +- if (xx) return xx; ++ if (pgpSetSigMpiDSA(_dig, i, p)) ++ return 1; + } + pgpPrtStr("", pgpSigDSA[i]); + } else { +@@ -824,49 +693,11 @@ static const uint8_t * pgpPrtPubkeyParam + char * mpi; + if (pubkey_algo == PGPPUBKEYALGO_RSA) { + if (i >= 2) break; +- if (_dig) { +- if (_dig->rsa == NULL) { +- _dig->rsa = pgpNewRSAKey(); +- if (_dig->rsa == NULL) +- break; /* error abort? */ +- } +- switch (i) { +- case 0: /* n */ +- pgpMpiItem(_dig->rsa->arena, &_dig->rsa->u.rsa.modulus, p); +- break; +- case 1: /* e */ +- pgpMpiItem(_dig->rsa->arena, &_dig->rsa->u.rsa.publicExponent, p); +- break; +- default: +- break; +- } +- } ++ pgpSetPubMpiRSA(_dig, i, p); + pgpPrtStr("", pgpPublicRSA[i]); + } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { + if (i >= 4) break; +- if (_dig) { +- if (_dig->dsa == NULL) { +- _dig->dsa = pgpNewDSAKey(); +- if (_dig->dsa == NULL) +- break; /* error abort? */ +- } +- switch (i) { +- case 0: /* p */ +- pgpMpiItem(_dig->dsa->arena, &_dig->dsa->u.dsa.params.prime, p); +- break; +- case 1: /* q */ +- pgpMpiItem(_dig->dsa->arena, &_dig->dsa->u.dsa.params.subPrime, p); +- break; +- case 2: /* g */ +- pgpMpiItem(_dig->dsa->arena, &_dig->dsa->u.dsa.params.base, p); +- break; +- case 3: /* y */ +- pgpMpiItem(_dig->dsa->arena, &_dig->dsa->u.dsa.publicValue, p); +- break; +- default: +- break; +- } +- } ++ pgpSetPubMpiDSA(_dig, i, p); + pgpPrtStr("", pgpPublicDSA[i]); + } else if (pubkey_algo == PGPPUBKEYALGO_ELGAMAL_ENCRYPT) { + if (i >= 3) break; +@@ -1256,25 +1087,8 @@ void pgpCleanDig(pgpDig dig) + dig->md5 = _free(dig->md5); + dig->sha1 = _free(dig->sha1); + +- if (dig->dsa != NULL) { +- SECKEY_DestroyPublicKey(dig->dsa); +- dig->dsa = NULL; +- } +- +- if (dig->dsasig != NULL) { +- SECITEM_ZfreeItem(dig->dsasig, PR_TRUE); +- dig->dsasig = NULL; +- } +- +- if (dig->rsa != NULL) { +- SECKEY_DestroyPublicKey(dig->rsa); +- dig->rsa = NULL; +- } +- +- if (dig->rsasig != NULL) { +- SECITEM_ZfreeItem(dig->rsasig, PR_TRUE); +- dig->rsasig = NULL; +- } ++ pgpCleanRSA(dig); ++ pgpCleanDSA(dig); + + } + return; +@@ -1501,50 +1315,3 @@ char * pgpArmorWrap(int atype, const uns + return val; + } + +-/* +- * Only flag for re-initialization here, in the common case the child +- * exec()'s something else shutting down NSS here would be waste of time. +- */ +-static void at_forkchild(void) +-{ +- _new_process = 1; +-} +- +-int rpmInitCrypto(void) { +- int rc = 0; +- +- /* Lazy NSS shutdown for re-initialization after fork() */ +- if (_new_process && _crypto_initialized) { +- rpmFreeCrypto(); +- } +- +- /* Initialize NSS if not already done */ +- if (!_crypto_initialized) { +- if (NSS_NoDB_Init(NULL) != SECSuccess) { +- rc = -1; +- } else { +- _crypto_initialized = 1; +- } +- } +- +- /* Register one post-fork handler per process */ +- if (_new_process) { +- if (pthread_atfork(NULL, NULL, at_forkchild) != 0) { +- rpmlog(RPMLOG_WARNING, _("Failed to register fork handler: %m\n")); +- } +- _new_process = 0; +- } +- return rc; +-} +- +-int rpmFreeCrypto(void) +-{ +- int rc = 0; +- if (_crypto_initialized) { +- rc = (NSS_Shutdown() != SECSuccess); +- _crypto_initialized = 0; +- } +- return rc; +-} +- +- diff --git a/rpm-filelist-bufferoverflow.diff b/rpm-filelist-bufferoverflow.diff deleted file mode 100644 index 47397c3..0000000 --- a/rpm-filelist-bufferoverflow.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- build/files.c -+++ build/files.c -@@ -2053,7 +2053,8 @@ static int processPackageFiles(Spec spec, Package pkg, - continue; - fileName = NULL; - /*@-nullpass@*/ /* LCL: buf is NULL ?!? */ -- strcpy(buf, s); -+ strncpy(buf, s, sizeof(buf)-1); -+ buf[sizeof(buf)-1] = '\0'; - /*@=nullpass@*/ - - /* Reset for a new line in %files */ diff --git a/rpm-python.spec b/rpm-python.spec index 964a2e9..7ce4675 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,5 +1,5 @@ # -# spec file for package rpm-python (Version 4.4.2.3) +# spec file for package rpm-python (Version 4.7.1) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,16 +19,18 @@ Name: rpm-python -BuildRequires: libbz2-devel libelf-devel libselinux-devel ncurses-devel python-devel xz-devel zlib-devel +BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel popt-devel python-devel xz-devel zlib-devel +#!BuildIgnore: rpmlint-Factory License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages -Version: 4.4.2.3 -Release: 45 +Version: 4.7.1 +Release: 1 Requires: rpm = %{version} %py_requires Source99: rpm.spec %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} +%global with_python 1 %description The rpm-python package contains a module that permits applications diff --git a/rpm-shorten-changelog.diff b/rpm-shorten-changelog.diff index 9dacc09..434eaa8 100644 --- a/rpm-shorten-changelog.diff +++ b/rpm-shorten-changelog.diff @@ -2,8 +2,8 @@ Index: build/parseChangelog.c =================================================================== --- build/parseChangelog.c.orig +++ build/parseChangelog.c -@@ -167,6 +167,11 @@ static int addChangelog(Header h, String - return RPMERR_BADSPEC; +@@ -167,6 +167,11 @@ static rpmRC addChangelog(Header h, Stri + return RPMRC_FAIL; } + /* workaround old suse oddity */ @@ -18,9 +18,9 @@ Index: build/pack.c =================================================================== --- build/pack.c.orig +++ build/pack.c -@@ -751,6 +751,65 @@ static int_32 copyTags[] = { - 0 - }; +@@ -707,6 +707,64 @@ rpmRC checkPackages(char *pkgcheck) + return RPMRC_OK; + } +static void +trimChangelog(Header h) @@ -34,19 +34,19 @@ Index: build/pack.c + if (!oneshot) { + char *binarychangelogtrim = rpmExpand("%{?_binarychangelogtrim}", NULL); + oneshot = 1; -+ if (binarychangelogtrim && *binarychangelogtrim) { ++ if (binarychangelogtrim && *binarychangelogtrim) { + maxnum = atoi(binarychangelogtrim); + binarychangelogtrim = strchr(binarychangelogtrim, ','); + if (binarychangelogtrim) + binarychangelogtrim++; + } -+ if (binarychangelogtrim && *binarychangelogtrim) { ++ if (binarychangelogtrim && *binarychangelogtrim) { + cuttime = atoi(binarychangelogtrim); + binarychangelogtrim = strchr(binarychangelogtrim, ','); + if (binarychangelogtrim) + binarychangelogtrim++; + } -+ if (binarychangelogtrim && *binarychangelogtrim) { ++ if (binarychangelogtrim && *binarychangelogtrim) { + minnum = atoi(binarychangelogtrim); + binarychangelogtrim = strchr(binarychangelogtrim, ','); + } @@ -55,13 +55,13 @@ Index: build/pack.c + return; + } + if (!headerGetEntry(h, RPMTAG_CHANGELOGTIME, NULL, (void **) ×, &count)) -+ return; ++ return; + if ((!cuttime || count <= minnum) && (!maxnum || count <= maxnum)) { + return; + } + keep = count; + if (maxnum && keep > maxnum) -+ keep = maxnum; ++ keep = maxnum; + if (cuttime) { + for (i = 0; i < keep; i++) { + if (i >= minnum && times[i] < cuttime) @@ -80,15 +80,14 @@ Index: build/pack.c + free(texts); +} + -+ - /*@-boundswrite@*/ - int packageBinaries(Spec spec) + rpmRC packageBinaries(rpmSpec spec) { -@@ -760,6 +819,7 @@ int packageBinaries(Spec spec) - const char *errorString; + struct cpioSourceArchive_s csabuf; +@@ -716,6 +774,7 @@ rpmRC packageBinaries(rpmSpec spec) Package pkg; + char *pkglist = NULL; + trimChangelog(spec->packages->header); for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { - const char *fn; + char *fn; diff --git a/rpm.changes b/rpm.changes index 017efe1..a5089c8 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Aug 26 14:39:44 CEST 2009 - mls@suse.de + +- set fuzz factor back to 2 for now + +------------------------------------------------------------------- +Mon Aug 24 15:06:57 CEST 2009 - mls@suse.de + +- update to rpm-4.7.1 + ------------------------------------------------------------------- Mon Jul 27 18:02:37 CEST 2009 - rguenther@suse.de diff --git a/rpm.spec b/rpm.spec index 09cecd5..7b2f6fd 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,5 +1,5 @@ # -# spec file for package rpm (Version 4.4.2.3) +# spec file for package rpm (Version 4.7.1) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -20,14 +20,15 @@ Name: rpm License: GPL v2 or later Group: System/Packages -BuildRequires: libbz2-devel libelf-devel libselinux-devel ncurses-devel xz-devel zlib-devel +BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel xz-devel zlib-devel +BuildRequires: popt-devel +#!BuildIgnore: rpmlint-Factory Provides: rpminst -%define popt_version 1.7 PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager -Version: 4.4.2.3 -Release: 45 +Version: 4.7.1 +Release: 1 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -37,11 +38,12 @@ Source6: symset-table Source8: rpmconfigcheck Source9: sysconfig.services-rpm Source10: beecrypt-4.1.2.tar.bz2 +Source11: rpm-4.4.2.3-db.tar.bz2 Patch1: beecrypt-4.1.2.diff Patch2: db.diff # quilt patches start here -Patch10: debugedit.diff -Patch11: findfplistexclude.diff +Patch10: rpm-beecrypt.diff +Patch11: debugedit.diff Patch12: localetag.diff Patch13: missingok.diff Patch14: nameversioncompare.diff @@ -50,60 +52,49 @@ 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 -Patch61: debugedit-canon-fix.diff -Patch62: fingerprint.diff -Patch63: finddebuginfo-absolute-links.diff -Patch64: firmware.diff -Patch65: specfilemacro.diff -Patch66: rpm-filelist-bufferoverflow.diff -Patch67: modalias-encode.diff -Patch68: disttag-macro.diff -Patch69: buildidprov.diff -Patch70: xz.diff -Patch71: debugsubpkg.diff -Patch72: debuglink.diff -Patch73: elfflagreqprov.diff +Patch20: nodefattr.diff +Patch21: luaroot.diff +Patch22: refreshtestarch.diff +Patch23: rpmrctests.diff +Patch24: suspendlock.diff +Patch25: waitlock.diff +Patch26: dbprivate.diff +Patch27: weakdeps.diff +Patch28: autodeps.diff +Patch29: brp.diff +Patch30: brpcombress.diff +Patch31: checkfilesnoinfodir.diff +Patch32: finddebuginfo.diff +Patch33: findksyms.diff +Patch34: findlang.diff +Patch35: macrosin.diff +Patch36: modalias.diff +Patch37: platformin.diff +Patch38: rpmpopt.diff +Patch39: rpmrc.diff +Patch40: taggedfileindex.diff +Patch41: rpmqpack.diff +Patch42: convertdb1static.diff +Patch43: build.diff +Patch44: modalias-kernel_module.diff +Patch45: files.diff +Patch46: debugedit-comp-dir.diff +Patch47: perlprov.diff +Patch48: rpm-shorten-changelog.diff +Patch49: debugsource-package.diff +Patch50: whatrequires-doc.diff +Patch51: remove-brp-strips.diff +Patch52: requires-ge-macro.diff +Patch53: mimetype.diff +Patch54: debugedit-canon-fix.diff +Patch55: finddebuginfo-absolute-links.diff +Patch56: firmware.diff +Patch57: specfilemacro.diff +Patch58: modalias-encode.diff +Patch59: disttag-macro.diff +Patch60: buildidprov.diff +Patch61: debugsubpkg.diff +Patch62: debuglink.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -141,27 +132,6 @@ need an intimate knowledge of RPM packages in order to function. -Authors: --------- - Erik Troan - Marc Ewing - -%package devel-static -Summary: Include Files and Libraries mandatory for Development -License: GPL v2 or later -Group: System/Packages -Requires: rpm-devel = %{version} -Requires: zlib-devel bzip2 libbz2-devel xz-devel libselinux-devel libebl-devel - -%description devel-static -This package contains the RPM C library and header files. These -development files will simplify the process of writing programs which -manipulate RPM packages and databases and are intended to make it -easier to create graphical package managers or any other tools that -need an intimate knowledge of RPM packages in order to function. - - - Authors: -------- Erik Troan @@ -172,30 +142,23 @@ Authors: rm -rf sqlite rm -rf beecrypt tar xjf %{SOURCE10} +tar xjf %{SOURCE11} ln -s beecrypt-4.1.2 beecrypt #tar xjf %{SOURCE12} #ln -s neon-0.24.7 neon # will get linked from db3 rm -f rpmdb/db.h -# separate popt source -# %setup -q -D -T -a 9 -# mv popt popt.orig -# ln -s popt-%{popt_version} popt %patch -P 1 -P 2 %patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19 %patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 %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 -%patch71 -p1 -%patch72 -p1 -%patch73 -p1 -chmod 755 scripts/find-supplements{,.ksyms} -chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms -chmod 755 scripts/firmware.prov -chmod 755 scripts/debuginfo.prov +%patch -P 60 -P 61 -P 62 +#chmod 755 scripts/find-supplements{,.ksyms} +#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms +#chmod 755 scripts/firmware.prov +#chmod 755 scripts/debuginfo.prov tar -xjvf %{SOURCE1} tar -xjvf %{SOURCE2} if [ -s /etc/rpm/suse_macros ]; then @@ -204,30 +167,30 @@ fi cp -a %{SOURCE4} suse_macros %build -%{?suse_update_config:%{suse_update_config -f popt}} export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -ffunction-sections" export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" %ifarch alpha export CFLAGS="-g -O0 -fno-strict-aliasing" %endif -#cp popt/autogen.sh zlib -rm -rf zlib cp /usr/share/gettext/config.rpath . -cp popt/autogen.sh beecrypt -cp popt/autogen.sh file -# cp popt/autogen.sh neon -./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --with-lua --with-selinux --enable-shared +cp autogen.sh beecrypt +pushd beecrypt +./autogen.sh --with-pic +make %{?jobs:-j%jobs} +popd +./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --with-lua --with-selinux --with-internal-beecrypt --enable-shared %{?with_python: --enable-python} rm po/de.gmo make %{?jobs:-j%jobs} +make convertdb1 %install mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/share/locale ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale make DESTDIR="$RPM_BUILD_ROOT" install +install -m 755 convertdb1 $RPM_BUILD_ROOT/usr/lib/rpm # remove .la file and the static variant of libpopt # have to remove the dependency from other .la files as well -rm -f $RPM_BUILD_ROOT/%_lib/libpopt.a $RPM_BUILD_ROOT/%_lib/libpopt.la for f in $RPM_BUILD_ROOT/%{_libdir}/*.la; do sed -i -e "s,/%_lib/libpopt.la,-lpopt,g" $f done @@ -236,10 +199,19 @@ install -m 755 %{SOURCE8} $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/usr/sbin ln -sf ../../etc/init.d/rpmconfigcheck $RPM_BUILD_ROOT/usr/sbin/rcrpmconfigcheck cp -a suse_macros $RPM_BUILD_ROOT/usr/lib/rpm -mv $RPM_BUILD_ROOT/usr/src/* $RPM_BUILD_ROOT/usr/src/packages +mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/suse +ln -s ../suse_macros $RPM_BUILD_ROOT/usr/lib/rpm/suse/macros +for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do + mkdir -p $RPM_BUILD_ROOT/usr/src/packages/$d + chmod 1777 $RPM_BUILD_ROOT/usr/src/packages/$d +done +for d in $RPM_BUILD_ROOT/usr/lib/rpm/platform/*-linux/macros ; do + dd=${d%%-linux/macros} + dd=${dd##*/} + mkdir $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd + chmod 1777 $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd +done mkdir -p $RPM_BUILD_ROOT/var/lib/rpm -mkdir -p $RPM_BUILD_ROOT/var/spool/repackage -rm -rf $RPM_BUILD_ROOT/usr/include/beecrypt $RPM_BUILD_ROOT/%{_libdir}/libbeecrypt* gzip -9 $RPM_BUILD_ROOT/%{_mandir}/man[18]/*.[18] export RPM_BUILD_ROOT %ifarch s390x @@ -269,7 +241,7 @@ for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \ brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \ rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile do - rm $f + rm -f $f done for i in /usr/share/automake-*/*; do if test -f "$i" && test -f "${i##*/}"; then @@ -279,8 +251,7 @@ done popd gzip -9 CHANGES rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} -#rm $RPM_BUILD_ROOT%{_libdir}/*.la -#rm $RPM_BUILD_ROOT%{_libdir}/*.a +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %clean rm -rf $RPM_BUILD_ROOT @@ -312,16 +283,18 @@ fi /etc/init.d/rpmconfigcheck /usr/sbin/rcrpmconfigcheck /usr/lib/rpm - %{_libdir}/librpm*-*.so + %{_libdir}/librpm.so.* + %{_libdir}/librpmbuild.so.* + %{_libdir}/librpmio.so.* %doc %{_mandir}/man[18]/*.[18]* /usr/share/locale/*/LC_MESSAGES/rpm.mo %dir /var/lib/rpm -%dir /var/spool/repackage %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILD %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SPECS %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SOURCES %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SRPMS %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/RPMS +%verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILDROOT %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/RPMS/* /var/adm/fillup-templates/sysconfig.services-rpm @@ -330,84 +303,7 @@ fi /usr/include/rpm %{_libdir}/librpm.so %{_libdir}/librpmbuild.so - %{_libdir}/librpmdb.so %{_libdir}/librpmio.so - -%files devel-static -%defattr(644,root,root,755) - %{_libdir}/librpm*.a - %{_libdir}/librpm*.la - -%package -n popt -Summary: A C library for parsing command line parameters -License: LGPL v2.1 or later -Group: System/Libraries -Version: 1.7 -Release: 493 -# bug437293 -%ifarch ppc64 -Obsoletes: popt-64bit -%endif -# -# - -%description -n popt -Popt is a C library for parsing command line parameters. Popt was -heavily influenced by the getopt() and getopt_long() functions. It -improves on them by allowing more powerful argument expansion. Popt can -parse arbitrary argv[] style arrays and automatically set variables -based on command line arguments. Popt allows command line arguments to -be aliased via configuration files and includes utility functions for -parsing arbitrary strings into argv[] arrays using shell-like rules. - - - -Authors: --------- - Erik Troan - -%package -n popt-devel -Summary: C Library for Parsing Command Line Parameters -License: LGPL v2.1 or later -Group: System/Libraries -Version: 1.7 -Release: 493 -Requires: popt = 1.7 -Requires: glibc-devel -# bug437293 -%ifarch ppc64 -Obsoletes: popt-devel-64bit -%endif -# - -%description -n popt-devel -Popt is a C library for parsing command line parameters. Popt was -heavily influenced by the getopt() and getopt_long() functions, but it -improves on them by allowing more powerful argument expansion. Popt can -parse arbitrary argv[] style arrays and automatically set variables -based on command line arguments. Popt allows command line arguments to -be aliased via configuration files and includes utility functions for -parsing arbitrary strings into argv[] arrays using shell-like rules. - - - -Authors: --------- - Erik Troan - -%post -n popt -p /sbin/ldconfig - -%postun -n popt -p /sbin/ldconfig - -%files -n popt -%defattr(-,root,root) - /%{_lib}/libpopt.so.* - /usr/share/locale/*/LC_MESSAGES/popt.mo - -%files -n popt-devel -%defattr(644,root,root,755) - /usr/include/popt.h - /%{_lib}/libpopt.so -%doc %{_mandir}/man3/popt.3* + %{_libdir}/pkgconfig/rpm.pc %changelog diff --git a/rpmpopt.diff b/rpmpopt.diff index 9573bad..7809a60 100644 --- a/rpmpopt.diff +++ b/rpmpopt.diff @@ -6,7 +6,7 @@ Index: rpmpopt.in =================================================================== --- rpmpopt.in.orig +++ rpmpopt.in -@@ -94,7 +94,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p +@@ -91,7 +91,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|URL?{URL : %{URL}\n}|\ Summary : %{SUMMARY}\n\ @@ -16,75 +16,3 @@ Index: rpmpopt.in --POPTdesc=$"list descriptive information from package(s)" rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ -@@ -140,12 +141,6 @@ rpm alias --fileprovide --qf '[%{FILENAM - rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \ - --POPTdesc=$"list file names with requires" - --rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides \ -- --POPTdesc=$"find package name that contains a provided capability (needs rpmdb-redhat package installed)" -- --rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires \ -- --POPTdesc=$"find package name that contains a required capability (needs rpmdb-redhat package installed)" -- - # colon separated i18n domains to use as PO catalogue lookaside for - * retrieving header group/description/summary. - # -@@ -212,22 +207,22 @@ rpm alias --timecheck --define '_timeche - #rpm exec --target rpmb --target - #rpm exec --short-circuit rpmb --short-circuit - --rpm exec --initdb rpmd --initdb --rpm exec --rebuilddb rpmd --rebuilddb --rpm exec --verifydb rpmd --verifydb -- --rpm exec --addsign rpmk --addsign --rpm exec -K rpmk -K --rpm exec --checksig rpmk --checksig --rpm exec --import rpmk --import --rpm exec --resign rpmk --resign -- --rpm exec -q rpmq -q --rpm exec --query rpmq --query --rpm exec --querytags rpmq --querytags --rpm exec -V rpmv -V --rpm exec -y rpmv -y --rpm exec --verify rpmv --verify -+#rpm exec --initdb rpmd --initdb -+#rpm exec --rebuilddb rpmd --rebuilddb -+#rpm exec --verifydb rpmd --verifydb -+ -+#rpm exec --addsign rpmk --addsign -+#rpm exec -K rpmk -K -+#rpm exec --checksig rpmk --checksig -+#rpm exec --import rpmk --import -+#rpm exec --resign rpmk --resign -+ -+#rpm exec -q rpmq -q -+#rpm exec --query rpmq --query -+#rpm exec --querytags rpmq --querytags -+#rpm exec -V rpmv -V -+#rpm exec -y rpmv -y -+#rpm exec --verify rpmv --verify - - #rpm exec -i rpmi -i - #rpm exec --install rpmi --install -@@ -393,7 +388,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p - %|PACKAGER?{Packager : %{PACKAGER}\n}|\ - %|URL?{URL : %{URL}\n}|\ - Summary : %{SUMMARY}\n\ --Description :\n%{DESCRIPTION}\n' \ -+Description :\n%{DESCRIPTION}\n\ -+Distribution: %{DISTRIBUTION}\n' \ - --POPTdesc=$"list descriptive information from package(s)" - - rpmq alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ -@@ -509,7 +505,8 @@ Size : %-27{SIZE}%|LICENSE?{ - %|PACKAGER?{Packager : %{PACKAGER}\n}|\ - %|URL?{URL : %{URL}\n}|\ - Summary : %{SUMMARY}\n\ --Description :\n%{DESCRIPTION}\n' \ -+Description :\n%{DESCRIPTION}\n\ -+Distribution: %{DISTRIBUTION}\n' \ - --POPTdesc=$"list descriptive information from package(s)" - - rpmquery alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ diff --git a/rpmqpack.diff b/rpmqpack.diff index c7ed796..ff79989 100644 --- a/rpmqpack.diff +++ b/rpmqpack.diff @@ -5,49 +5,30 @@ Index: Makefile.am =================================================================== --- Makefile.am.orig +++ Makefile.am -@@ -41,7 +41,7 @@ rpmbin_PROGRAMS = rpm - bin_PROGRAMS = rpm2cpio +@@ -139,6 +139,10 @@ check_PROGRAMS += rpmsort + rpmsort_SOURCES = tools/rpmsort.c + rpmsort_LDADD = lib/librpm.la - pkglibdir = @RPMCONFIGDIR@ --pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq -+pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq rpmqpack - pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros - pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \ - config.guess config.sub config.site -@@ -93,6 +93,12 @@ rpm2cpio_SOURCES = $(top_srcdir)/rpm2cpi - rpm2cpio_LDFLAGS = $(myLDFLAGS) - rpm2cpio_LDADD = $(myLDADD) @LIBMISC@ - -+rpmqpack_SOURCES = rpmqpack.c -+rpmqpack_LDFLAGS = $(myLDFLAGS) -+rpmqpack_LDADD = $(top_builddir)/rpmdb/librpmdb.la \ -+ $(top_builddir)/rpmio/librpmio.la \ -+ $(top_builddir)/popt/libpopt.la ++bin_PROGRAMS += rpmqpack ++rpmqpack_SOURCES = rpmqpack.c ++rpmqpack_LDADD = lib/librpm.la + - $(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@ - - .PHONY: splint -@@ -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 -+ rm -f $(DESTDIR)$(bindir)/rpmqpack -+ @LN_S@ ../lib/rpm/rpmqpack $(DESTDIR)$(bindir)/rpmqpack - rm -f $(DESTDIR)$(bindir)/rpmdb ; \ - @LN_S@ ../lib/rpm/rpmd $(DESTDIR)$(bindir)/rpmdb ; \ - for bf in e i u ; do \ + rpmconfig_DATA = rpmrc + rpmrc: $(top_srcdir)/rpmrc.in + @$(SED) \ Index: doc/Makefile.am =================================================================== --- doc/Makefile.am.orig +++ doc/Makefile.am -@@ -2,6 +2,6 @@ +@@ -7,7 +7,7 @@ man_man1_DATA = gendiff.1 + EXTRA_DIST += $(man_man1_DATA) - SUBDIRS = manual fr ja ko pl ru sk + man_man8dir = $(mandir)/man8 +-man_man8_DATA = rpm.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 ++man_man8_DATA = rpm.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 rpmqpack.8 + EXTRA_DIST += $(man_man8_DATA) --man_MANS = gendiff.1 rpm.8 rpmbuild.8 rpmcache.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 -+man_MANS = gendiff.1 rpm.8 rpmbuild.8 rpmcache.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 rpmqpack.8 - - EXTRA_DIST = $(man_MANS) + man_fr_man8dir = $(mandir)/fr/man8 Index: doc/rpmqpack.8 =================================================================== --- /dev/null diff --git a/rpmrc.diff b/rpmrc.diff index 4b6dedc..f2d5b84 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -4,17 +4,17 @@ Index: rpmrc.in =================================================================== --- rpmrc.in.orig +++ rpmrc.in -@@ -15,16 +15,16 @@ +@@ -12,16 +12,16 @@ # "fat" binary with both archs, for Darwin optflags: fat -O2 -g -arch i386 -arch ppc --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 -march=i386 -mtune=i686 +-optflags: i486 -O2 -g -march=i486 +-optflags: i586 -O2 -g -march=i586 +-optflags: i686 -O2 -g -march=i686 +-optflags: pentium3 -O2 -g -march=pentium3 +-optflags: pentium4 -O2 -g -march=pentium4 +-optflags: athlon -O2 -g -march=athlon +optflags: i386 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: i486 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables @@ -22,25 +22,25 @@ Index: rpmrc.in +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: geode -Os -g -m32 -march=geode +-optflags: ia64 -O2 -g +-optflags: x86_64 -O2 -g +optflags: ia64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: x86_64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables - optflags: amd64 -O2 -g -mtune=generic - optflags: ia32e -O2 -g -m64 -mtune=generic + optflags: amd64 -O2 -g + optflags: ia32e -O2 -g -@@ -44,15 +44,16 @@ optflags: sparc64v -O2 -g -m64 -march=ni +@@ -41,15 +41,16 @@ optflags: sparc64v -O2 -g -m64 -mtune=ni optflags: m68k -O2 -g -fomit-frame-pointer --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 -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 -m32 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: ppc8260 -O2 -g -m32 +optflags: ppc8560 -O2 -g -m32 @@ -54,18 +54,18 @@ Index: rpmrc.in 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 -@@ -77,8 +78,8 @@ optflags: atariclone -O2 -g -fomit-frame +@@ -75,8 +76,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 -m31 --optflags: s390x -O2 -g -m64 +-optflags: s390 -O2 -g +-optflags: s390x -O2 -g +optflags: s390 -O2 -g -m31 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: s390x -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: sh3 -O2 -g - optflags: sh4 -O2 -g -@@ -201,17 +202,17 @@ os_canon: MacOSX: macosx 21 + optflags: sh4 -O2 -g -mieee +@@ -200,17 +201,17 @@ os_canon: MacOSX: macosx 21 ############################################################# # For a given uname().machine, the default build arch @@ -91,7 +91,7 @@ Index: rpmrc.in buildarchtranslate: i486: i386 buildarchtranslate: i386: i386 -@@ -240,6 +241,7 @@ buildarchtranslate: ppciseries: ppc +@@ -239,6 +240,7 @@ buildarchtranslate: ppciseries: ppc buildarchtranslate: ppcpseries: ppc buildarchtranslate: ppc64iseries: ppc64 buildarchtranslate: ppc64pseries: ppc64 @@ -115,17 +115,19 @@ Index: rpmrc.in ############################################################# # Architecture compatibility -@@ -326,12 +337,16 @@ arch_compat: hppa2.0: hppa1.2 +@@ -325,14 +336,18 @@ arch_compat: mipsel: noarch + 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: parisc: noarch +-arch_compat: hppa1.0: parisc +arch_compat: hppa1.0: hppa -+arch_compat: hppa: noarch ++arch_compat: hppa: parisc + arch_compat: parisc: noarch +arch_compat: armv5teb: armv5b +arch_compat: armv5b: armv4b arch_compat: armv4b: noarch + arch_compat: armv7l: armv6l arch_compat: armv6l: armv5tejl arch_compat: armv5tejl: armv5tel -arch_compat: armv5tel: armv4tl @@ -134,7 +136,7 @@ Index: rpmrc.in arch_compat: armv4tl: armv4l arch_compat: armv4l: armv3l arch_compat: armv3l: noarch -@@ -348,9 +363,9 @@ arch_compat: i370: noarch +@@ -349,9 +364,9 @@ arch_compat: i370: noarch arch_compat: s390: noarch arch_compat: s390x: s390 noarch @@ -146,21 +148,7 @@ Index: rpmrc.in arch_compat: amd64: x86_64 athlon noarch arch_compat: ia32e: x86_64 athlon 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 +@@ -444,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 @@ -170,12 +158,3 @@ Index: rpmrc.in buildarch_compat: parisc: noarch buildarch_compat: atarist: m68kmint noarch -@@ -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 - - # \endverbatim - #*/ diff --git a/rpmrctests.diff b/rpmrctests.diff index 9566317..4045e56 100644 --- a/rpmrctests.diff +++ b/rpmrctests.diff @@ -4,7 +4,7 @@ Index: lib/rpmrc.c =================================================================== --- lib/rpmrc.c.orig +++ lib/rpmrc.c -@@ -2,9 +2,6 @@ +@@ -1,9 +1,6 @@ #include "system.h" #include @@ -14,7 +14,7 @@ Index: lib/rpmrc.c #include /* XXX for /etc/rpm/platform contents */ -@@ -975,6 +972,14 @@ static inline int RPMClass(void) +@@ -784,6 +781,14 @@ static inline int RPMClass(void) cpu = (tfms>>8)&15; @@ -29,7 +29,7 @@ Index: lib/rpmrc.c sigaction(SIGILL, &oldsa, NULL); if (cpu < 6) -@@ -1112,15 +1117,6 @@ static int is_geode() +@@ -920,15 +925,6 @@ static int is_geode() } #endif @@ -44,8 +44,8 @@ Index: lib/rpmrc.c - /** */ - static void defaultMachine(/*@out@*/ const char ** arch, -@@ -1255,6 +1251,11 @@ static void defaultMachine(/*@out@*/ con + static void defaultMachine(const char ** arch, +@@ -1055,6 +1051,11 @@ static void defaultMachine(const char ** /* big endian */ strcpy(un.machine, "mips"); # endif diff --git a/specfilemacro.diff b/specfilemacro.diff index cac5b0a..739e3cb 100644 --- a/specfilemacro.diff +++ b/specfilemacro.diff @@ -1,10 +1,12 @@ ---- build/parseSpec.c.orig 2008-11-27 11:41:51.000000000 +0100 -+++ build/parseSpec.c 2008-11-27 11:43:00.000000000 +0100 -@@ -475,6 +475,7 @@ - * /.././../usr/../bin//./sh (XXX FIXME: dots not handled yet) - */ +Index: build/parseSpec.c +=================================================================== +--- build/parseSpec.c.orig ++++ build/parseSpec.c +@@ -425,6 +425,7 @@ int parseSpec(rpmts ts, const char *spec + spec = newSpec(); + spec->specFile = rpmGetPath(specFile, NULL); + addMacro(spec->macros, "_specfile", NULL, spec->specFile, RMIL_SPEC); spec->fileStack = newOpenFileInfo(); spec->fileStack->fileName = xstrdup(spec->specFile); - if (buildRootURL) { + /* If buildRoot not specified, use default %{buildroot} */ diff --git a/suspendlock.diff b/suspendlock.diff index 06a5eac..5b5f015 100644 --- a/suspendlock.diff +++ b/suspendlock.diff @@ -9,29 +9,29 @@ Index: lib/psm.c =================================================================== --- lib/psm.c.orig +++ lib/psm.c -@@ -813,6 +813,8 @@ static rpmRC runScript(rpmpsm psm, Heade +@@ -756,6 +756,8 @@ static rpmRC runScript(rpmpsm psm, Heade + goto exit; } - if (out == NULL) return RPMRC_FAIL; /* XXX can't happen */ + rpmtsSuspendResumeDBLock(psm->ts, 0); + - /*@-branchstate@*/ xx = rpmsqFork(&psm->sq); if (psm->sq.child == 0) { -@@ -933,6 +935,8 @@ static rpmRC runScript(rpmpsm psm, Heade + rpmlog(RPMLOG_DEBUG, "%s: %s\texecv(%s) pid %d\n", +@@ -770,6 +772,8 @@ static rpmRC runScript(rpmpsm psm, Heade (void) psmWait(psm); + rpmtsSuspendResumeDBLock(psm->ts, 1); + - /* XXX filter order dependent multilib "other" arch helper error. */ - if (!(psm->sq.reaped >= 0 && !strcmp(argv[0], "/usr/sbin/glibc_post_upgrade") && WEXITSTATUS(psm->sq.status) == 110)) { if (psm->sq.reaped < 0) { + rpmlog(RPMLOG_ERR, _("%s scriptlet failed, waitpid(%d) rc %d: %s\n"), + sname, psm->sq.child, psm->sq.reaped, strerror(errno)); Index: lib/rpmts.c =================================================================== --- lib/rpmts.c.orig +++ lib/rpmts.c -@@ -190,6 +190,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) +@@ -108,6 +108,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) return rc; } @@ -47,31 +47,30 @@ Index: lib/rpmts.h =================================================================== --- lib/rpmts.h.orig +++ lib/rpmts.h -@@ -476,6 +476,10 @@ int rpmtsRebuildDB(rpmts ts) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/; +@@ -472,6 +472,10 @@ rpmdb rpmtsGetRdb(rpmts ts); + */ + int rpmtsInitDSI(const rpmts ts); +int rpmtsSuspendResumeDBLock(rpmts ts, int mode) + /*@globals fileSystem @*/ + /*@modifies fileSystem @*/; + /** \ingroup rpmts - * Verify the database used by the transaction. + * Update disk space info for a file. * @param ts transaction set -Index: rpmdb/db3.c +Index: lib/backend/db3.c =================================================================== ---- rpmdb/db3.c.orig -+++ rpmdb/db3.c -@@ -458,6 +458,8 @@ errxit: +--- lib/backend/db3.c.orig ++++ lib/backend/db3.c +@@ -398,12 +398,18 @@ errxit: + return rc; } - /*@=moduncon@*/ +static int db3SuspendResumeLock(dbiIndex dbi, int mode); + static int db3sync(dbiIndex dbi, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/ -@@ -466,6 +468,10 @@ static int db3sync(dbiIndex dbi, unsigne + { + DB * db = dbi->dbi_db; int rc = 0; int _printit; @@ -82,8 +81,8 @@ Index: rpmdb/db3.c if (db != NULL) rc = db->sync(db, flags); /* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */ -@@ -1412,6 +1418,50 @@ static int db3open(rpmdb rpmdb, rpmTag r - /*@=nullstate =compmempass@*/ +@@ -1122,6 +1128,50 @@ static int db3open(rpmdb rpmdb, rpmTag r + return rc; } +static int @@ -112,7 +111,7 @@ Index: rpmdb/db3.c + l.l_type = F_RDLCK; + rc = fcntl(fdno, F_SETLK, (void *) &l); + if (rc) -+ rpmMessage(RPMMESS_WARNING, _("could not suspend database lock\n")); ++ rpmlog(RPMLOG_WARNING, _("could not suspend database lock\n")); + } else { + for (tries = 0; tries < 2; tries++) { + memset(&l, 0, sizeof(l)); @@ -124,7 +123,7 @@ Index: rpmdb/db3.c + if (!rc) + break; + if (tries == 0) -+ rpmMessage(RPMMESS_WARNING, _("waiting to reestablish exclusive database lock\n")); ++ rpmlog(RPMLOG_WARNING, _("waiting to reestablish exclusive database lock\n")); + } + } + return rc; @@ -132,12 +131,12 @@ Index: rpmdb/db3.c + /** \ingroup db3 */ - /*@-exportheadervar@*/ -Index: rpmdb/rpmdb.c + RPM_GNUC_INTERNAL +Index: lib/rpmdb.c =================================================================== ---- rpmdb/rpmdb.c.orig -+++ rpmdb/rpmdb.c -@@ -945,6 +945,21 @@ int rpmdbSync(rpmdb db) +--- lib/rpmdb.c.orig ++++ lib/rpmdb.c +@@ -886,6 +886,21 @@ int rpmdbSync(rpmdb db) return rc; } @@ -156,6 +155,6 @@ Index: rpmdb/rpmdb.c + return rc; +} + - /*@-mods@*/ /* FIX: dbTemplate structure assignment */ - static /*@only@*/ /*@null@*/ - rpmdb newRpmdb(/*@kept@*/ /*@null@*/ const char * root, + /* FIX: dbTemplate structure assignment */ + static + rpmdb newRpmdb(const char * root, diff --git a/taggedfileindex.diff b/taggedfileindex.diff index 7c0fc20..b158377 100644 --- a/taggedfileindex.diff +++ b/taggedfileindex.diff @@ -1,12 +1,12 @@ The taggedfileindex patch. Speeds up database searches, but breaks -fingerprint semantics. Needs findfplistexclude.diff. +fingerprint semantics. rh#103204 -Index: rpmdb/rpmdb.c +Index: lib/rpmdb.c =================================================================== ---- rpmdb/rpmdb.c.orig -+++ rpmdb/rpmdb.c -@@ -1215,6 +1215,16 @@ int rpmdbVerify(const char * prefix) +--- lib/rpmdb.c.orig ++++ lib/rpmdb.c +@@ -1107,6 +1107,16 @@ int rpmdbVerify(const char * prefix) return rc; } @@ -23,9 +23,9 @@ Index: rpmdb/rpmdb.c /** * Find file matches in database. * @param db rpm database -@@ -1294,6 +1304,11 @@ if (key->size == 0) key->size++; /* XXX - if (rc == 0) - (void) dbt2set(dbi, data, &allMatches); +@@ -1169,6 +1179,11 @@ static int rpmdbFindByFile(rpmdb db, con + if (rc == 0) + (void) dbt2set(dbi, data, &allMatches); + /* strip off directory tags */ + if (allMatches != NULL) @@ -35,85 +35,153 @@ Index: rpmdb/rpmdb.c xx = dbiCclose(dbi, dbcursor, 0); dbcursor = NULL; } else -@@ -2411,7 +2426,7 @@ static void rpmdbSortIterator(/*@null@*/ +@@ -2172,7 +2187,7 @@ void rpmdbSortIterator(rpmdbMatchIterato } - /*@-bounds@*/ /* LCL: segfault */ --static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum, unsigned int exclude) -+static int rpmdbGrowIterator(/*@null@*/ rpmdbMatchIterator mi, int fpNum, unsigned int exclude, unsigned int tag) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/ + /* LCL: segfault */ +-static int rpmdbGrowIterator(rpmdbMatchIterator mi) ++static int rpmdbGrowIterator(rpmdbMatchIterator mi, unsigned int tag) { -@@ -2459,10 +2474,16 @@ static int rpmdbGrowIterator(/*@null@*/ - set = NULL; - (void) dbt2set(dbi, data, &set); + DBC * dbcursor; + DBT * key; +@@ -2222,6 +2237,27 @@ static int rpmdbGrowIterator(rpmdbMatchI + dbcursor = NULL; + #endif -- /* prune the set against exclude */ -+ /* prune the set against exclude and tag */ - for (i = j = 0; i < set->count; i++) { - if (exclude && set->recs[i].hdrNum == exclude) - continue; -+ if (set->recs[i].tagNum & 0x80000000) { -+ /* tagged entry */ -+ if ((set->recs[i].tagNum & 0xffff0000) != tag) -+ continue; -+ set->recs[i].tagNum &= 0x0000ffff; ++ if (tag) { ++ int i, j; ++ /* prune the set against the tag */ ++ for (i = j = 0; i < set->count; i++) { ++ if (set->recs[i].tagNum & 0x80000000) { ++ /* tagged entry */ ++ if ((set->recs[i].tagNum & 0xffff0000) != tag) ++ continue; ++ set->recs[i].tagNum &= 0x0000ffff; ++ } ++ if (i != j) ++ set->recs[j] = set->recs[i]; ++ j++; + } - if (i != j) - set->recs[j] = set->recs[i]; - j++; -@@ -2987,7 +3008,9 @@ DBT * data = alloca(sizeof(*data)); - HFD_t hfd = headerFreeData; - sigset_t signalMask; - const char ** baseNames; -- rpmTagType bnt; -+ const char ** dirNames; -+ int_32 * dirIndexes, *dirs; -+ rpmTagType bnt, dit, dnt; - int count = 0; - dbiIndex dbi; - int dbix; -@@ -3027,6 +3050,13 @@ memset(data, 0, sizeof(*data)); - */ - - xx = hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, &count); -+ xx = hge(h, RPMTAG_DIRINDEXES, &dit, (void **) &dirIndexes, NULL); -+ xx = hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL); ++ set->count = j; ++ if (j == 0) { ++ set = dbiFreeIndexSet(set); ++ return DB_NOTFOUND; ++ } ++ } + -+ /* save dirIndexes, because expandFilelist may free it */ -+ dirs = alloca(count * sizeof(*dirs)); -+ for (xx = 0; xx < count; xx++) -+ dirs[xx] = dirIndexes[xx]; + if (mi->mi_set == NULL) { + mi->mi_set = set; + } else { +@@ -2403,7 +2439,15 @@ int rpmdbExtendIterator(rpmdbMatchIterat + { + mi->mi_key.data = (void *) keyp; + mi->mi_key.size = keylen ? keylen : strlen(keyp); +- return rpmdbGrowIterator(mi); ++ return rpmdbGrowIterator(mi, 0); ++} ++ ++int rpmdbExtendIteratorDirtag(rpmdbMatchIterator mi, ++ const void * keyp, size_t keylen, const char *dirname) ++{ ++ mi->mi_key.data = (void *) keyp; ++ mi->mi_key.size = keylen ? keylen : strlen(keyp); ++ return rpmdbGrowIterator(mi, dirname ? taghash(dirname) : 0); + } - if (_noDirTokens) - expandFilelist(h); -@@ -3240,6 +3270,11 @@ data->size = 0; + /* +@@ -2798,8 +2842,16 @@ int rpmdbAdd(rpmdb db, int iid, Header h + + if (hdrNum) + { ++ struct rpmtd_s dn, di; ++ const char ** dirNames; ++ uint32_t * dirIndexes; + dbiIndexItem rec = dbiIndexNewItem(hdrNum, 0); + ++ headerGet(h, RPMTAG_DIRNAMES, &dn, HEADERGET_MINMEM); ++ headerGet(h, RPMTAG_DIRINDEXES, &di, HEADERGET_MINMEM); ++ dirNames = dn.data; ++ dirIndexes = di.data; ++ + if (dbiTags.tags != NULL) + for (dbix = 0; dbix < dbiTags.max; dbix++) { + rpmTag rpmtag; +@@ -2891,6 +2943,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h */ - rec->tagNum = i; - switch (dbi->dbi_rpmtag) { + i = rec->tagNum = rpmtdGetIndex(&tagdata); + switch (rpmtag) { + case RPMTAG_BASENAMES: -+ /* tag index entry with directory hash */ + if (i < 0x010000) -+ rec->tagNum |= taghash(dirNames[dirs[i]]); -+ /*@switchbreak@*/ break; - case RPMTAG_PUBKEYS: - /*@switchbreak@*/ break; - case RPMTAG_FILEMD5S: -@@ -3414,6 +3449,8 @@ if (key->size == 0) key->size++; /* XXX ++ rec->tagNum |= taghash(dirNames[dirIndexes[i]]); ++ break; + case RPMTAG_REQUIRENAME: { + /* Filter out install prerequisites. */ + rpm_flag_t *rflag = rpmtdNextUint32(&reqflags); +@@ -2976,6 +3032,9 @@ cont: + if (ret == 0) { + headerSetInstance(h, hdrNum); + } ++ ++ rpmtdFreeData(&dn); ++ rpmtdFreeData(&di); } exit: -+ dirIndexes = hfd(dirIndexes, dit); -+ dirNames = hfd(dirNames, dnt); - (void) unblockSignals(db, &signalMask); +Index: lib/rpmdb_internal.h +=================================================================== +--- lib/rpmdb_internal.h.orig ++++ lib/rpmdb_internal.h +@@ -540,6 +540,9 @@ unsigned int dbiIndexRecordFileNumber(db + int rpmdbExtendIterator(rpmdbMatchIterator mi, + const void * keyp, size_t keylen); - return ret; -@@ -3495,7 +3532,7 @@ if (key->size == 0) key->size++; /* XXX - if (!exclude && skipDir(fpList[i].entry->dirName)) - continue; ++int rpmdbExtendIteratorDirtag(rpmdbMatchIterator mi, ++ const void * keyp, size_t keylen, const char *); ++ + /** \ingroup rpmdb + * sort the iterator by (recnum, filenum) + * Return database iterator. +Index: lib/transaction.c +=================================================================== +--- lib/transaction.c.orig ++++ lib/transaction.c +@@ -609,9 +609,12 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( + rpmdbMatchIterator mi; + int i, xx; + const char * baseName; ++ const char * dirName; -- xx = rpmdbGrowIterator(mi, i, exclude); -+ xx = rpmdbGrowIterator(mi, i, exclude, taghash(fpList[i].entry->dirName)); ++#if 0 + rpmStringSet baseNames = rpmStringSetCreate(fileCount, + hashFunctionString, strcmp, NULL); ++#endif + mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMTAG_BASENAMES, NULL, 0); + +@@ -629,18 +632,25 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( + while ((i = rpmfiNext(fi)) >= 0) { + size_t keylen; + baseName = rpmfiBN(fi); ++ dirName = rpmfiDN(fi); ++#if 0 + if (rpmStringSetHasEntry(baseNames, baseName)) + continue; ++#endif + + keylen = strlen(baseName); + if (keylen == 0) + keylen++; /* XXX "/" fixup. */ +- xx = rpmdbExtendIterator(mi, baseName, keylen); ++ xx = rpmdbExtendIteratorDirtag(mi, baseName, keylen, dirName); ++#if 0 + rpmStringSetAddEntry(baseNames, baseName); ++#endif + } } + pi = rpmtsiFree(pi); ++#if 0 + rpmStringSetFree(baseNames); ++#endif + rpmdbSortIterator(mi); + /* iterator is now sorted by (recnum, filenum) */ diff --git a/tagsbackport.diff b/tagsbackport.diff deleted file mode 100644 index 6f95695..0000000 --- a/tagsbackport.diff +++ /dev/null @@ -1,37 +0,0 @@ -Backported some new tags and sense values. - -Index: lib/rpmlib.h -=================================================================== ---- lib/rpmlib.h.orig -+++ lib/rpmlib.h -@@ -447,7 +447,19 @@ typedef enum rpmTag_e { - RPMTAG_PRIORITY = 1162, /* i extension placeholder */ - RPMTAG_CVSID = 1163, /* s */ - #define RPMTAG_SVNID RPMTAG_CVSID /* s */ -+ RPMTAG_BLINKPKGID = 1164, /* s[] */ -+ RPMTAG_BLINKHDRID = 1165, /* s[] */ -+ RPMTAG_BLINKNEVRA = 1166, /* s[] */ -+ RPMTAG_FLINKPKGID = 1167, /* s[] */ -+ RPMTAG_FLINKHDRID = 1168, /* s[] */ -+ RPMTAG_FLINKNEVRA = 1169, /* s[] */ -+ RPMTAG_PACKAGEORIGIN = 1170, /* s */ - RPMTAG_TRIGGERPREIN = 1171, /*!< internal */ -+ RPMTAG_BUILDSUGGESTS = 1172, /*!< internal */ -+ RPMTAG_BUILDENHANCES = 1173, /*!< internal */ -+ RPMTAG_SCRIPTSTATES = 1174, /*!< i scriptlet exit codes */ -+ RPMTAG_SCRIPTMETRICS = 1175, /*!< i scriptlet execution times */ -+ RPMTAG_BUILDCPUCLOCK = 1176, /*!< i */ - - /*@-enummemuse@*/ - RPMTAG_FIRSTFREE_TAG /*!< internal */ -@@ -531,7 +543,9 @@ typedef enum rpmsenseFlags_e { - /*@=enummemuse@*/ - RPMSENSE_KEYRING = (1 << 26), - RPMSENSE_PATCHES = (1 << 27), -- RPMSENSE_CONFIG = (1 << 28) -+ RPMSENSE_CONFIG = (1 << 28), -+ RPMSENSE_PROBE = (1 << 29), -+ RPMSENSE_PACKAGE = (1 << 30) - } rpmsenseFlags; - - #define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie serial, */ diff --git a/waitlock.diff b/waitlock.diff index 0d3e932..d60a798 100644 --- a/waitlock.diff +++ b/waitlock.diff @@ -1,78 +1,75 @@ Fix global (DB_PRIVATE) lock code: fix recursion counter, retry failed lock operations for up to 3 minutes. -Index: rpmdb/db3.c +Index: lib/backend/db3.c =================================================================== ---- rpmdb/db3.c.orig -+++ rpmdb/db3.c -@@ -769,6 +769,8 @@ assert(db != NULL); +--- lib/backend/db3.c.orig ++++ lib/backend/db3.c +@@ -586,6 +586,8 @@ static int db3stat(dbiIndex dbi, unsigne + return rc; } - /*@=mustmod@*/ +static int _lockdbfd = 0; + - /*@-moduncon@*/ /* FIX: annotate db3 methods */ - static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) - /*@globals rpmGlobalMacroContext, h_errno, -@@ -828,6 +830,10 @@ static int db3close(/*@only@*/ dbiIndex + static int db3close(dbiIndex dbi, unsigned int flags) + { + rpmdb rpmdb = dbi->dbi_rpmdb; +@@ -632,6 +634,10 @@ static int db3close(dbiIndex dbi, unsign + rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n", + dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag))); - rpmMessage(RPMMESS_DEBUG, _("closed db index %s/%s\n"), - dbhome, (dbfile ? dbfile : tagName(dbi->dbi_rpmtag))); + if (dbi->dbi_lockdbfd && + !((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) && + _lockdbfd) + _lockdbfd--; - } -@@ -1148,8 +1154,6 @@ static int db3open(rpmdb rpmdb, rpmTag r - prDbiOpenFlags(oflags, 0), dbi->dbi_mode); + if (rpmdb->db_dbenv != NULL && dbi->dbi_use_dbenv) { +@@ -899,8 +905,6 @@ static int db3open(rpmdb rpmdb, rpmTag r + } if (rc == 0) { - static int _lockdbfd = 0; - - /*@-moduncon@*/ /* FIX: annotate db3 methods */ rc = db_create(&db, dbenv, dbi->dbi_cflags); - /*@=moduncon@*/ -@@ -1366,6 +1370,7 @@ static int db3open(rpmdb rpmdb, rpmTag r + rc = cvtdberr(dbi, "db_create", rc, _debug); + if (rc == 0 && db != NULL) { +@@ -1082,6 +1086,7 @@ static int db3open(rpmdb rpmdb, rpmTag r if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) { rc = 1; } else { + int tries; struct flock l; - /*@-boundswrite@*/ memset(&l, 0, sizeof(l)); -@@ -1377,24 +1382,40 @@ static int db3open(rpmdb rpmdb, rpmTag r - ? F_WRLCK : F_RDLCK; + l.l_whence = 0; +@@ -1091,24 +1096,40 @@ static int db3open(rpmdb rpmdb, rpmTag r + ? F_RDLCK : F_WRLCK; l.l_pid = 0; - rc = fcntl(fdno, F_SETLK, (void *) &l); - if (rc) { - /* Warning iff using non-private CDB locking. */ - rc = ((dbi->dbi_use_dbenv && -- (dbi->dbi_eflags & DB_INIT_CDB) && -- !(dbi->dbi_eflags & DB_PRIVATE)) -- ? 0 : 1); -- rpmError( (rc ? RPMERR_FLOCK : RPMWARN_FLOCK), -- _("cannot get %s lock on %s/%s\n"), -- ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) -- ? _("exclusive") : _("shared")), -- dbhome, (dbfile ? dbfile : "")); -- } else if (dbfile) { -- rpmMessage(RPMMESS_DEBUG, -- _("locked db index %s/%s\n"), -- dbhome, dbfile); + for (tries = 0; ; tries++) { + rc = fcntl(fdno, F_SETLK, (void *) &l); + if (rc) { -+ /* Warning iff using non-private CDB locking. */ + rc = ((dbi->dbi_use_dbenv && -+ (dbi->dbi_eflags & DB_INIT_CDB) && -+ !(dbi->dbi_eflags & DB_PRIVATE)) + (dbi->dbi_eflags & DB_INIT_CDB) && + !(dbi->dbi_eflags & DB_PRIVATE)) +- ? 0 : 1); +- rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), +- _("cannot get %s lock on %s/%s\n"), +- ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY) +- ? _("shared") : _("exclusive"), +- dbhome, (dbfile ? dbfile : "")); +- } else if (dbfile) { +- rpmlog(RPMLOG_DEBUG, +- "locked db index %s/%s\n", +- dbhome, dbfile); + ? 0 : 1); + if (errno == EAGAIN && rc) { + struct timespec ts; + if (tries == 0) -+ rpmMessage(RPMMESS_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, (dbfile ? dbfile : "")); ++ rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, (dbfile ? dbfile : "")); + ts.tv_sec = (time_t)0; + ts.tv_nsec = 100000000; + if (tries < 10*60*3) { @@ -80,17 +77,18 @@ Index: rpmdb/db3.c + continue; + } + } -+ rpmError( (rc ? RPMERR_FLOCK : RPMWARN_FLOCK), ++ rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), + _("cannot get %s lock on %s/%s\n"), -+ ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) -+ ? _("exclusive") : _("shared")), ++ ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY) ++ ? _("shared") : _("exclusive"), + dbhome, (dbfile ? dbfile : "")); + } else if (dbfile) { -+ rpmMessage(RPMMESS_DEBUG, -+ _("locked db index %s/%s\n"), ++ rpmlog(RPMLOG_DEBUG, ++ "locked db index %s/%s\n", + dbhome, dbfile); ++ break; + } -+ break; ++ } } + if (rc && dbi->dbi_use_dbenv) diff --git a/weakdeps.diff b/weakdeps.diff index ce52075..179f088 100644 --- a/weakdeps.diff +++ b/weakdeps.diff @@ -18,7 +18,7 @@ Index: build/parsePreamble.c =================================================================== --- build/parsePreamble.c.orig +++ build/parsePreamble.c -@@ -129,6 +129,8 @@ static struct tokenBits_s installScriptB +@@ -122,6 +122,8 @@ static struct tokenBits_s const installS { "post", RPMSENSE_SCRIPT_POST }, { "rpmlib", RPMSENSE_RPMLIB }, { "verify", RPMSENSE_SCRIPT_VERIFY }, @@ -27,7 +27,7 @@ Index: build/parsePreamble.c { NULL, 0 } }; -@@ -140,6 +142,8 @@ static struct tokenBits_s buildScriptBit +@@ -132,6 +134,8 @@ static const struct tokenBits_s const bu { "build", RPMSENSE_SCRIPT_BUILD }, { "install", RPMSENSE_SCRIPT_INSTALL }, { "clean", RPMSENSE_SCRIPT_CLEAN }, @@ -36,7 +36,7 @@ Index: build/parsePreamble.c { NULL, 0 } }; -@@ -692,6 +696,18 @@ static int handlePreambleTag(Spec spec, +@@ -637,6 +641,18 @@ static int handlePreambleTag(rpmSpec spe if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) return rc; break; @@ -55,10 +55,10 @@ Index: build/parsePreamble.c case RPMTAG_EXCLUDEARCH: case RPMTAG_EXCLUSIVEARCH: case RPMTAG_EXCLUDEOS: -@@ -783,6 +799,14 @@ static struct PreambleRec_s preambleList +@@ -734,6 +750,14 @@ static struct PreambleRec_s preambleList + {RPMTAG_AUTOPROV, 0, 0, 0, "autoprov"}, + {RPMTAG_DOCDIR, 0, 0, 0, "docdir"}, {RPMTAG_DISTTAG, 0, 0, 0, "disttag"}, - {RPMTAG_CVSID, 0, 0, 0, "cvsid"}, - {RPMTAG_SVNID, 0, 0, 0, "svnid"}, + {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "recommends"}, + {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "suggests"}, + {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "supplements"}, @@ -67,14 +67,14 @@ Index: build/parsePreamble.c + {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildsuggests"}, + {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildsupplements"}, + {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildenhances"}, - /*@-nullassign@*/ /* LCL: can't add null annotation */ + /* LCL: can't add null annotation */ {0, 0, 0, 0, 0} - /*@=nullassign@*/ + }; Index: build/parseReqs.c =================================================================== --- build/parseReqs.c.orig +++ build/parseReqs.c -@@ -85,6 +85,14 @@ int parseRCPOT(Spec spec, Package pkg, c +@@ -84,6 +84,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p tagflags |= RPMSENSE_ANY; h = spec->buildRestrictions; break; @@ -93,7 +93,7 @@ Index: build/reqprov.c =================================================================== --- build/reqprov.c.orig +++ build/reqprov.c -@@ -48,6 +48,16 @@ int addReqProv(/*@unused@*/ Spec spec, H +@@ -43,6 +43,16 @@ int addReqProv(rpmSpec spec, Header h, r flagtag = RPMTAG_TRIGGERFLAGS; indextag = RPMTAG_TRIGGERINDEX; extra = Flags & RPMSENSE_TRIGGER; @@ -114,7 +114,7 @@ Index: build/rpmfc.c =================================================================== --- build/rpmfc.c.orig +++ build/rpmfc.c -@@ -1385,6 +1385,12 @@ static struct DepMsg_s depMsgs[] = { +@@ -1377,6 +1377,12 @@ static struct DepMsg_s depMsgs[] = { { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, 0, -1 }, @@ -127,10 +127,10 @@ Index: build/rpmfc.c { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } }; -@@ -1480,6 +1486,14 @@ static int rpmfcGenerateDependsHelper(co +@@ -1467,6 +1473,14 @@ static int rpmfcGenerateDependsHelper(co failnonzero = 0; tagflags = RPMSENSE_FIND_REQUIRES; - /*@switchbreak@*/ break; + break; + case RPMTAG_ENHANCESFLAGS: + if (!pkg->autoProv) + continue; @@ -138,36 +138,15 @@ Index: build/rpmfc.c + tagflags = RPMSENSE_FIND_REQUIRES | RPMSENSE_MISSINGOK; + if (strcmp(dm->msg, "Supplements") == 0) + tagflags |= RPMSENSE_STRONG; -+ /*@switchbreak@*/ break; ++ break; default: continue; - /*@notreached@*/ /*@switchbreak@*/ break; -Index: lib/rpmlib.h -=================================================================== ---- lib/rpmlib.h.orig -+++ lib/rpmlib.h -@@ -541,7 +541,7 @@ typedef enum rpmsenseFlags_e { - RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */ - /*@=enummemuse@*/ - RPMSENSE_KEYRING = (1 << 26), -- RPMSENSE_PATCHES = (1 << 27), -+ RPMSENSE_STRONG = (1 << 27), - RPMSENSE_CONFIG = (1 << 28), - RPMSENSE_PROBE = (1 << 29), - RPMSENSE_PACKAGE = (1 << 30) -@@ -562,6 +562,7 @@ typedef enum rpmsenseFlags_e { - RPMSENSE_SCRIPT_VERIFY | \ - RPMSENSE_FIND_REQUIRES | \ - RPMSENSE_MISSINGOK | \ -+ RPMSENSE_STRONG | \ - RPMSENSE_SCRIPT_PREP | \ - RPMSENSE_SCRIPT_BUILD | \ - RPMSENSE_SCRIPT_INSTALL | \ + break; Index: python/rpmmodule.c =================================================================== --- python/rpmmodule.c.orig +++ python/rpmmodule.c -@@ -433,7 +433,7 @@ void init_rpm(void) +@@ -387,7 +387,7 @@ void init_rpm(void) REGISTER_ENUM(RPMSENSE_RPMLIB); REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); REGISTER_ENUM(RPMSENSE_KEYRING); @@ -180,23 +159,22 @@ Index: lib/rpmds.c =================================================================== --- lib/rpmds.c.orig +++ lib/rpmds.c -@@ -320,6 +320,11 @@ rpmds rpmdsNew(Header h, rpmTag tagN, in - tagEVR = RPMTAG_TRIGGERVERSION; - tagF = RPMTAG_TRIGGERFLAGS; - } else -+ if (tagN == RPMTAG_ENHANCESNAME) { -+ Type = "Enhances"; -+ tagEVR = RPMTAG_ENHANCESVERSION; -+ tagF = RPMTAG_ENHANCESFLAGS; -+ } else - goto exit; - - /*@-branchstate@*/ +@@ -73,6 +73,10 @@ static int dsType(rpmTag tag, + t = "Trigger"; + evr = RPMTAG_TRIGGERVERSION; + f = RPMTAG_TRIGGERFLAGS; ++ } else if (tag == RPMTAG_ENHANCESNAME) { ++ t = "Enhances"; ++ evr = RPMTAG_ENHANCESVERSION; ++ f = RPMTAG_ENHANCESFLAGS; + } else { + rc = 1; + } Index: rpmpopt.in =================================================================== --- rpmpopt.in.orig +++ rpmpopt.in -@@ -68,6 +68,22 @@ rpm alias --requires --qf \ +@@ -65,6 +65,22 @@ rpm alias --requires --qf \ --POPTdesc=$"list capabilities required by package(s)" rpm alias -R --requires @@ -219,100 +197,100 @@ 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\ -@@ -351,6 +367,22 @@ rpmq alias --requires --qf \ - --POPTdesc=$"list capabilities required by package(s)" - rpmq alias -R --requires - -+rpmq alias --suggests --qf \ -+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package suggests" -+ -+rpmq alias --recommends --qf \ -+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package recommends" -+ -+rpmq alias --enhances --qf \ -+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package enhances" -+ -+rpmq alias --supplements --qf \ -+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package supplements" -+ - 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\ -@@ -452,6 +484,22 @@ rpmquery alias --requires --qf \ - --POPTdesc=$"list capabilities required by package(s)" - rpmquery alias -R --requires - -+rpmquery alias --suggests --qf \ -+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package suggests" -+ -+rpmquery alias --recommends --qf \ -+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package recommends" -+ -+rpmquery alias --enhances --qf \ -+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package enhances" -+ -+rpmquery alias --supplements --qf \ -+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package supplements" -+ - rpmquery 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\ Index: lib/formats.c =================================================================== --- lib/formats.c.orig +++ lib/formats.c -@@ -652,6 +652,38 @@ static /*@only@*/ char * depflagsFormat( +@@ -601,6 +601,25 @@ static char * depflagsFormat(rpmtd td, c return val; } -+static /*@only@*/ char * depflag_strongFormat(int_32 type, const void * data, -+ char * formatPrefix, int padding, /*@unused@*/ int element) -+ /*@modifies formatPrefix @*/ -+ /*@requires maxRead(data) >= 0 @*/ ++static char * depflag_strongFormat(rpmtd td, char * formatPrefix) +{ -+ char * val; -+ char buf[10]; -+ int anint; ++ char * val = NULL; + -+ if (type != RPM_INT32_TYPE) { ++ if (rpmtdType(td) != RPM_NUMERIC_CLASS) { + val = xstrdup(_("(not a number)")); + } else { -+ anint = *((int_32 *) data); ++ uint64_t anint = rpmtdGetNumber(td); ++ char buf[10]; + buf[0] = '\0'; -+ -+/*@-boundswrite@*/ + if (anint & RPMSENSE_STRONG) + strcat(buf, "strong"); -+/*@=boundswrite@*/ -+ -+ val = xmalloc(7 + padding); -+/*@-boundswrite@*/ + strcat(formatPrefix, "s"); -+/*@=boundswrite@*/ -+ /*@-formatconst@*/ -+ sprintf(val, formatPrefix, buf); -+ /*@=formatconst@*/ ++ rasprintf(&val, formatPrefix, buf); + } + + return val; +} + /** - * Retrieve mounted file system paths. - * @param h header -@@ -1347,6 +1379,7 @@ const struct headerSprintfExtension_s rp - { HEADER_EXT_FORMAT, "base64", { base64Format } }, - { HEADER_EXT_FORMAT, "pgpsig", { pgpsigFormat } }, - { HEADER_EXT_FORMAT, "depflags", { depflagsFormat } }, -+ { HEADER_EXT_FORMAT, "depflag_strong", { depflag_strongFormat } }, - { HEADER_EXT_FORMAT, "fflags", { fflagsFormat } }, - { HEADER_EXT_FORMAT, "perms", { permsFormat } }, - { HEADER_EXT_FORMAT, "permissions", { permsFormat } }, + * Return tag container array size. + * @param td tag data container +@@ -661,5 +680,6 @@ static const struct headerFormatFunc_s r + { RPMTD_FORMAT_DAY, "day", dayFormat }, + { RPMTD_FORMAT_SHESCAPE, "shescape", shescapeFormat }, + { RPMTD_FORMAT_ARRAYSIZE, "arraysize", arraysizeFormat }, ++ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", { depflag_strongFormat } }, + { -1, NULL, NULL } + }; +Index: lib/rpmds.h +=================================================================== +--- lib/rpmds.h.orig ++++ lib/rpmds.h +@@ -55,7 +55,7 @@ typedef enum rpmsenseFlags_e { + RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ + RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ + RPMSENSE_KEYRING = (1 << 26), +- RPMSENSE_PATCHES = (1 << 27), ++ RPMSENSE_STRONG = (1 << 27), + RPMSENSE_CONFIG = (1 << 28) + } rpmsenseFlags; + +@@ -74,6 +74,7 @@ typedef enum rpmsenseFlags_e { + RPMSENSE_SCRIPT_VERIFY | \ + RPMSENSE_FIND_REQUIRES | \ + RPMSENSE_MISSINGOK | \ ++ RPMSENSE_STRONG | \ + RPMSENSE_SCRIPT_PREP | \ + RPMSENSE_SCRIPT_BUILD | \ + RPMSENSE_SCRIPT_INSTALL | \ +Index: lib/rpmtd.h +=================================================================== +--- lib/rpmtd.h.orig ++++ lib/rpmtd.h +@@ -214,6 +214,7 @@ typedef enum rpmtdFormats_e { + RPMTD_FORMAT_SHESCAPE = 13, /* shell escaped (any type) */ + RPMTD_FORMAT_ARRAYSIZE = 14, /* size of contained array (any type) */ + RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int32 types) */ ++ RPMTD_FORMAT_DEPFLAG_STRONG = 16, /* strong dependency */ + } rpmtdFormats; + + /** \ingroup rpmtd +Index: lib/rpmtag.h +=================================================================== +--- lib/rpmtag.h.orig ++++ lib/rpmtag.h +@@ -228,14 +228,14 @@ typedef enum rpmTag_e { + RPMTAG_PRETRANSPROG = 1153, /* s */ + RPMTAG_POSTTRANSPROG = 1154, /* s */ + RPMTAG_DISTTAG = 1155, /* s */ +- RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */ +-#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */ +- RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */ +- RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */ +- RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder (unimplemented) */ +-#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemented) */ +- RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimplemented) */ +- RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimplemented) */ ++ RPMTAG_SUGGESTSNAME = 1156, /* s[] extension */ ++#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] */ ++ RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension */ ++ RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension */ ++ RPMTAG_ENHANCESNAME = 1159, /* s[] extension */ ++#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] */ ++ RPMTAG_ENHANCESVERSION = 1160, /* s[] extension */ ++ RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension */ + RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ + RPMTAG_CVSID = 1163, /* s (unimplemented) */ + #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ diff --git a/whatrequires-doc.diff b/whatrequires-doc.diff index 2ea6033..dff6c33 100644 --- a/whatrequires-doc.diff +++ b/whatrequires-doc.diff @@ -1,12 +1,14 @@ ---- doc/rpm.8.orig 2008-04-10 12:02:59.000000000 +0200 -+++ doc/rpm.8 2008-04-10 12:30:16.923076000 +0200 -@@ -584,6 +584,11 @@ +Index: doc/rpm.8 +=================================================================== +--- doc/rpm.8.orig ++++ doc/rpm.8 +@@ -572,6 +572,11 @@ Query all packages that provide the \fIC .TP \fB--whatrequires \fICAPABILITY\fB\fR - Query all packages that requires \fICAPABILITY\fR for proper functioning. + Query all packages that require \fICAPABILITY\fR for proper functioning. +.br +Note that this does not return what requires a given package. -+A package usually provides multiple capabilities and file-names on which ++A package usually provides multiple capabilities and file-names on which +other packages may depend. To see the complete dependencies +for a package, use \fB-e --test \fIPACKAGE_NAME\fB\fR .SS "PACKAGE QUERY OPTIONS:" diff --git a/xz.diff b/xz.diff deleted file mode 100644 index 092fc8f..0000000 --- a/xz.diff +++ /dev/null @@ -1,86 +0,0 @@ ---- - build/parsePrep.c | 3 +++ - configure.ac | 1 + - macros.in | 1 + - rpmio/macro.c | 8 ++++++++ - rpmio/rpmmacro.h | 3 ++- - 5 files changed, 15 insertions(+), 1 deletion(-) - -Index: build/parsePrep.c -=================================================================== ---- build/parsePrep.c.orig 2008-04-01 09:28:21.000000000 +0200 -+++ build/parsePrep.c 2009-02-19 10:49:23.000000000 +0100 -@@ -258,6 +258,9 @@ static char *doPatch(Spec spec, int c, i - case COMPRESSED_LZMA: - t = "%{__lzma} -dc"; - break; -+ case COMPRESSED_XZ: -+ t = "%{__xz} -dc"; -+ break; - } - zipper = rpmGetPath(t, NULL); - buf[0] = '\0'; -Index: configure.ac -=================================================================== ---- configure.ac.orig 2009-02-19 10:43:13.000000000 +0100 -+++ configure.ac 2009-02-19 10:50:25.000000000 +0100 -@@ -247,6 +247,7 @@ AC_SUBST(__ID_U) - - AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH) - AC_PATH_PROG(__LZMA, lzma, /usr/bin/lzma, $MYPATH) -+AC_PATH_PROG(__XZ, xz, /usr/bin/xz, $MYPATH) - AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH) - AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH) - AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH) -Index: macros.in -=================================================================== ---- macros.in.orig 2009-02-19 10:43:13.000000000 +0100 -+++ macros.in 2009-02-19 10:51:05.000000000 +0100 -@@ -49,6 +49,7 @@ - %__install @__INSTALL@ - %__ln_s @LN_S@ - %__lzma @__LZMA@ -+%__xz @__XZ@ - %__make @__MAKE@ - %__mkdir @__MKDIR@ - %__mkdir_p @MKDIR_P@ -Index: rpmio/macro.c -=================================================================== ---- rpmio/macro.c.orig 2008-04-01 09:29:13.000000000 +0200 -+++ rpmio/macro.c 2009-02-19 10:47:57.000000000 +0100 -@@ -1184,6 +1184,9 @@ doFoo(MacroBuf mb, int negate, const cha - case COMPRESSED_LZMA: - sprintf(be, "%%_lzma -dc %s", b); - break; -+ case COMPRESSED_XZ: -+ sprintf(be, "%%_xz -dc %s", b); -+ break; - } - b = be; - } else if (STREQ("S", f, fn)) { -@@ -2120,6 +2123,11 @@ int isCompressed(const char * file, rpmC - (magic[4] == 0x41) && (magic[5] == 0x00)) { - /* new style lzma with magic */ - *compressed = COMPRESSED_LZMA; -+ } else if ((magic[0] == 0xfd) && (magic[1] == 0x37) && -+ (magic[2] == 0x7a) && (magic[3] == 0x58) && -+ (magic[4] == 0x5a) && (magic[5] == 0x00)) { -+ /* xz */ -+ *compressed = COMPRESSED_XZ; - } 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 2008-04-01 09:28:22.000000000 +0200 -+++ rpmio/rpmmacro.h 2009-02-19 10:48:39.000000000 +0100 -@@ -176,7 +176,8 @@ typedef enum rpmCompressedMagic_e { - COMPRESSED_OTHER = 1, /*!< gzip can handle */ - COMPRESSED_BZIP2 = 2, /*!< bzip2 can handle */ - COMPRESSED_ZIP = 3, /*!< unzip can handle */ -- COMPRESSED_LZMA = 4 /*!< lzma can handle */ -+ COMPRESSED_LZMA = 4, /*!< lzma can handle */ -+ COMPRESSED_XZ = 5 /*!< xz can handle */ - } rpmCompressedMagic; - - /** From beccf7970ebafe7778bfadb65ddfabd8dce43fbedc854962a0d6a1be054c5bea Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 28 Aug 2009 16:08:34 +0000 Subject: [PATCH 084/137] Accepting request 19161 from Base:System Copy from Base:System/rpm based on submit request 19161 from user darix OBS-URL: https://build.opensuse.org/request/show/19161 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=85 --- baselibs.conf | 2 ++ rpm-python.spec | 2 +- rpm.spec | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 baselibs.conf diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..65e15b5 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,2 @@ +rpm +arch ppc package rpm-devel diff --git a/rpm-python.spec b/rpm-python.spec index 7ce4675..5d476be 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.7.1 -Release: 1 +Release: 2 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 7b2f6fd..44de3e2 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.7.1 -Release: 1 +Release: 2 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 73d87ec7a210c2f8071aac10da650a8b0cc19c98d105897797a61c685f30708c Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 2 Sep 2009 16:05:59 +0000 Subject: [PATCH 085/137] Accepting request 19545 from Base:System Copy from Base:System/rpm based on submit request 19545 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/19545 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=86 --- allowufdio.diff | 25 +++++++++++++++++++++++++ debuginfo-mono.patch | 22 ++++++++++++++++++++++ fixabsfilelists.diff | 21 +++++++++++++++++++++ fixqueryreturn.diff | 13 +++++++++++++ rpm-python.spec | 2 +- rpm.changes | 14 ++++++++++++++ rpm.spec | 9 +++++++-- 7 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 allowufdio.diff create mode 100644 debuginfo-mono.patch create mode 100644 fixabsfilelists.diff create mode 100644 fixqueryreturn.diff diff --git a/allowufdio.diff b/allowufdio.diff new file mode 100644 index 0000000..471ecc1 --- /dev/null +++ b/allowufdio.diff @@ -0,0 +1,25 @@ +Index: build/pack.c +=================================================================== +--- build/pack.c.orig ++++ build/pack.c +@@ -379,7 +379,9 @@ rpmRC writeRPM(Header *hdrp, unsigned ch + const char *compr = NULL; + headerPutString(h, RPMTAG_PAYLOADFORMAT, "cpio"); + +- if (strcmp(s+1, "gzdio") == 0) { ++ if (strcmp(s+1, "ufdio") == 0) { ++ compr = NULL; ++ } else if (strcmp(s+1, "gzdio") == 0) { + compr = "gzip"; + #if HAVE_BZLIB_H + } else if (strcmp(s+1, "bzdio") == 0) { +@@ -402,7 +404,8 @@ rpmRC writeRPM(Header *hdrp, unsigned ch + goto exit; + } + +- headerPutString(h, RPMTAG_PAYLOADCOMPRESSOR, compr); ++ if (compr) ++ headerPutString(h, RPMTAG_PAYLOADCOMPRESSOR, compr); + buf = xstrdup(rpmio_flags); + buf[s - rpmio_flags] = '\0'; + headerPutString(h, RPMTAG_PAYLOADFLAGS, buf+1); diff --git a/debuginfo-mono.patch b/debuginfo-mono.patch new file mode 100644 index 0000000..32e1bfd --- /dev/null +++ b/debuginfo-mono.patch @@ -0,0 +1,22 @@ +Index: scripts/find-debuginfo.sh +=================================================================== +--- scripts/find-debuginfo.sh.orig ++++ scripts/find-debuginfo.sh +@@ -210,6 +210,17 @@ while read nlinks inum f; do + ;; + *) continue ;; + esac ++ # double check that we really have an ELF file, ++ # to handle monodevelop-debugger-gdb and monodevelop-debugger-mdb ++ ftype=`/usr/bin/file $f | cut -d: -f2-` ++ case $ftype in ++ *ELF*) ;; ++ *) ++ echo "$f is not an ELF file, skipping" ++ continue ++ ;; ++ esac ++ + get_debugfn "$f" + [ -f "${debugfn}" ] && continue + diff --git a/fixabsfilelists.diff b/fixabsfilelists.diff new file mode 100644 index 0000000..6683e06 --- /dev/null +++ b/fixabsfilelists.diff @@ -0,0 +1,21 @@ +Index: build/files.c +=================================================================== +--- build/files.c.orig ++++ build/files.c +@@ -1742,9 +1742,13 @@ static rpmRC processPackageFiles(rpmSpec + + argvSplit(&filelists, getStringBuf(pkg->fileFile), "\n"); + for (fp = filelists; *fp != NULL; fp++) { +- ffn = rpmGetPath("%{_builddir}/", +- (spec->buildSubdir ? spec->buildSubdir : "") , +- "/", *fp, NULL); ++ if (**fp == '/') { ++ ffn = rpmGetPath(*fp, NULL); ++ } else { ++ ffn = rpmGetPath("%{_builddir}/", ++ (spec->buildSubdir ? spec->buildSubdir : "") , ++ "/", *fp, NULL); ++ } + fd = fopen(ffn, "r"); + + if (fd == NULL || ferror(fd)) { diff --git a/fixqueryreturn.diff b/fixqueryreturn.diff new file mode 100644 index 0000000..99bb24c --- /dev/null +++ b/fixqueryreturn.diff @@ -0,0 +1,13 @@ +Index: lib/query.c +=================================================================== +--- lib/query.c.orig ++++ lib/query.c +@@ -283,7 +283,7 @@ static int rpmgiShowMatches(QVA_t qva, r + if (qva->qva_source == RPMQV_DBOFFSET) + break; + } +- return rpmgiNumErrors(gi); ++ return ec + rpmgiNumErrors(gi); + } + + int rpmcliShowMatches(QVA_t qva, rpmts ts) diff --git a/rpm-python.spec b/rpm-python.spec index 5d476be..8d6e6d5 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.7.1 -Release: 2 +Release: 3 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index a5089c8..1757171 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Sep 2 17:16:37 CEST 2009 - mls@suse.de + +- allow ufdio payload +- pack db.h include file +- fix abs filelist specification [bnc#535594] +- fix query return value [bnc#527191] + +------------------------------------------------------------------- +Mon Aug 31 18:59:12 UTC 2009 - aj@suse.de + +- Fix debuginfo handling for monodevelop-debugger-gdb and + monodevelop-debugger-mdb packages (bnc#535543). + ------------------------------------------------------------------- Wed Aug 26 14:39:44 CEST 2009 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 44de3e2..d0da9d0 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.7.1 -Release: 2 +Release: 3 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -95,6 +95,10 @@ Patch59: disttag-macro.diff Patch60: buildidprov.diff Patch61: debugsubpkg.diff Patch62: debuglink.diff +Patch63: debuginfo-mono.patch +Patch64: allowufdio.diff +Patch65: fixabsfilelists.diff +Patch66: fixqueryreturn.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -154,7 +158,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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov @@ -189,6 +193,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/locale ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale make DESTDIR="$RPM_BUILD_ROOT" install install -m 755 convertdb1 $RPM_BUILD_ROOT/usr/lib/rpm +install -m 644 db3/db.h $RPM_BUILD_ROOT/usr/include/rpm # remove .la file and the static variant of libpopt # have to remove the dependency from other .la files as well for f in $RPM_BUILD_ROOT/%{_libdir}/*.la; do From ebdf1dffe6b7ec5fca5313718cdd68522bfb7d645efe1e45448d8d8799d31c1e Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 4 Sep 2009 22:20:13 +0000 Subject: [PATCH 086/137] Accepting request 19899 from Base:System Copy from Base:System/rpm based on submit request 19899 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/19899 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=87 --- defclean.diff | 18 +++ lazystatfs.diff | 286 ++++++++++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 8 ++ rpm.spec | 9 +- 5 files changed, 320 insertions(+), 3 deletions(-) create mode 100644 defclean.diff create mode 100644 lazystatfs.diff diff --git a/defclean.diff b/defclean.diff new file mode 100644 index 0000000..1f02855 --- /dev/null +++ b/defclean.diff @@ -0,0 +1,18 @@ +Index: build/parseSpec.c +=================================================================== +--- build/parseSpec.c.orig ++++ build/parseSpec.c +@@ -569,6 +569,13 @@ int parseSpec(rpmts ts, const char *spec + } + /* LCL: parsePart is modified @*/ + ++ if (spec->clean == NULL) { ++ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL); ++ spec->clean = newStringBuf(); ++ appendLineStringBuf(spec->clean, body); ++ free(body); ++ } ++ + /* Check for description in each package and add arch and os */ + { + char *platform = rpmExpand("%{_target_platform}", NULL); diff --git a/lazystatfs.diff b/lazystatfs.diff new file mode 100644 index 0000000..ecfbb69 --- /dev/null +++ b/lazystatfs.diff @@ -0,0 +1,286 @@ +Index: lib/rpmts.c +=================================================================== +--- lib/rpmts.c.orig ++++ lib/rpmts.c +@@ -779,83 +779,102 @@ rpmdb rpmtsGetRdb(rpmts ts) + + int rpmtsInitDSI(const rpmts ts) + { +- rpmDiskSpaceInfo dsi; +- struct stat sb; +- int rc; +- int i; +- + if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE) + return 0; +- +- rpmlog(RPMLOG_DEBUG, "mounted filesystems:\n"); +- rpmlog(RPMLOG_DEBUG, +- " i dev bsize bavail iavail mount point\n"); +- +- rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount); +- if (rc || ts->filesystems == NULL || ts->filesystemCount <= 0) +- return rc; +- +- /* Get available space on mounted file systems. */ +- + ts->dsi = _free(ts->dsi); +- ts->dsi = xcalloc((ts->filesystemCount + 1), sizeof(*ts->dsi)); ++ ts->dsi = xcalloc(1, sizeof(*ts->dsi)); ++ return 0; ++} + +- dsi = ts->dsi; ++static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, const char *dirName, int count) ++{ ++ rpmDiskSpaceInfo dsi; ++ struct stat sb; ++ int rc; + +- if (dsi != NULL) +- for (i = 0; (i < ts->filesystemCount) && dsi; i++, dsi++) { + #if STATFS_IN_SYS_STATVFS +- struct statvfs sfb; +- memset(&sfb, 0, sizeof(sfb)); +- rc = statvfs(ts->filesystems[i], &sfb); ++ struct statvfs sfb; ++ memset(&sfb, 0, sizeof(sfb)); ++ rc = statvfs(dirName, &sfb); + #else +- struct statfs sfb; +- memset(&sfb, 0, sizeof(sfb)); ++ struct statfs sfb; ++ memset(&sfb, 0, sizeof(sfb)); + # if STAT_STATFS4 + /* This platform has the 4-argument version of the statfs call. The last two + * should be the size of struct statfs and 0, respectively. The 0 is the + * filesystem type, and is always 0 when statfs is called on a mounted + * filesystem, as we're doing. + */ +- rc = statfs(ts->filesystems[i], &sfb, sizeof(sfb), 0); ++ rc = statfs(dirName, &sfb, sizeof(sfb), 0); + # else +- rc = statfs(ts->filesystems[i], &sfb); ++ rc = statfs(dirName, &sfb); + # endif + #endif +- if (rc) +- break; +- +- rc = stat(ts->filesystems[i], &sb); +- if (rc) +- break; +- dsi->dev = sb.st_dev; ++ if (rc) ++ return NULL; + +- dsi->bsize = sfb.f_bsize; +- dsi->bneeded = 0; +- dsi->ineeded = 0; ++ rc = stat(dirName, &sb); ++ if (rc) ++ return NULL; ++ if (sb.st_dev != dev) ++ return NULL; ++ ++ ts->dsi = xrealloc(ts->dsi, (count + 2) * sizeof(*ts->dsi)); ++ dsi = ts->dsi + count; ++ memset(dsi, 0, 2 * sizeof(*dsi)); ++ dsi->dev = dev; ++ dsi->bsize = sfb.f_bsize; ++ if (!dsi->bsize) ++ dsi->bsize = 512; /* we need a bsize */ ++ dsi->bneeded = 0; ++ dsi->ineeded = 0; + #ifdef STATFS_HAS_F_BAVAIL +- dsi->bavail = sfb.f_bavail; ++ dsi->bavail = sfb.f_bavail; + #else + /* FIXME: the statfs struct doesn't have a member to tell how many blocks are + * available for non-superusers. f_blocks - f_bfree is probably too big, but + * it's about all we can do. + */ +- dsi->bavail = sfb.f_blocks - sfb.f_bfree; ++ dsi->bavail = sfb.f_blocks - sfb.f_bfree; + #endif +- /* XXX Avoid FAT and other file systems that have not inodes. */ +- /* XXX assigning negative value to unsigned type */ +- dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) +- ? sfb.f_ffree : -1; +- rpmlog(RPMLOG_DEBUG, +- "%5d 0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n", +- i, (unsigned) dsi->dev, dsi->bsize, +- dsi->bavail, dsi->iavail, +- ts->filesystems[i]); ++ /* XXX Avoid FAT and other file systems that have not inodes. */ ++ /* XXX assigning negative value to unsigned type */ ++ dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) ++ ? sfb.f_ffree : -1; ++ ++ return dsi; ++} ++ ++static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi) ++{ ++ int i; ++ struct stat sb; ++ ++ /* must leave chroot for this */ ++ if (rpmtsChrootDone(ts)) { ++ chroot("."); ++ } ++ if (!ts->filesystemCount) ++ rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount); ++ for (i = 0; i < ts->filesystemCount; i++) { ++ if (stat(ts->filesystems[i], &sb)) ++ continue; ++ if (sb.st_dev == dsi->dev) { ++ dsi->mntPoint = ts->filesystems[i]; ++ break; ++ } ++ } ++ if (i == ts->filesystemCount) { ++ /* file system not found, create something to display */ ++ dsi->mntPoint = xmalloc(20); ++ sprintf(dsi->mntPoint, "dev 0x%08x", (unsigned)dsi->dev); ++ } ++ if (rpmtsChrootDone(ts)) { ++ chroot(ts->rootDir); + } +- return rc; + } + +-void rpmtsUpdateDSI(const rpmts ts, dev_t dev, ++void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName, + rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize, + rpmFileAction action) + { +@@ -866,8 +885,10 @@ void rpmtsUpdateDSI(const rpmts ts, dev_ + if (dsi) { + while (dsi->bsize && dsi->dev != dev) + dsi++; +- if (dsi->bsize == 0) +- dsi = NULL; ++ if (dsi->bsize == 0) { ++ /* create new entry */ ++ dsi = rpmtsCreateDSI(ts, dev, dirName, dsi - ts->dsi); ++ } + } + if (dsi == NULL) + return; +@@ -910,32 +931,32 @@ void rpmtsCheckDSIProblems(const rpmts t + rpmDiskSpaceInfo dsi; + rpmps ps; + int fc; +- int i; +- +- if (ts->filesystems == NULL || ts->filesystemCount <= 0) +- return; + + dsi = ts->dsi; +- if (dsi == NULL) ++ if (dsi == NULL || !dsi->bsize) + return; + fc = rpmfiFC(rpmteFI(te)); + if (fc <= 0) + return; + + ps = rpmtsProblems(ts); +- for (i = 0; i < ts->filesystemCount; i++, dsi++) { ++ for (; dsi->bsize; dsi++) { + + if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) { ++ if (!dsi->mntPoint) ++ rpmtsFindDSIMount(ts, dsi); + rpmpsAppend(ps, RPMPROB_DISKSPACE, + rpmteNEVRA(te), rpmteKey(te), +- ts->filesystems[i], NULL, NULL, ++ dsi->mntPoint, NULL, NULL, + (adj_fs_blocks(dsi->bneeded)) * dsi->bsize); + } + + if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { ++ if (!dsi->mntPoint) ++ rpmtsFindDSIMount(ts, dsi); + rpmpsAppend(ps, RPMPROB_DISKNODES, + rpmteNEVRA(te), rpmteKey(te), +- ts->filesystems[i], NULL, NULL, ++ dsi->mntPoint, NULL, NULL, + (adj_fs_blocks(dsi->ineeded))); + } + } +Index: lib/rpmts.h +=================================================================== +--- lib/rpmts.h.orig ++++ lib/rpmts.h +@@ -485,7 +485,7 @@ int rpmtsSuspendResumeDBLock(rpmts ts, i + * @param fixupSize long size difference + * @param action file disposition + */ +-void rpmtsUpdateDSI(const rpmts ts, dev_t dev, ++void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName, + rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize, + rpmFileAction action); + +Index: lib/rpmts_internal.h +=================================================================== +--- lib/rpmts_internal.h.orig ++++ lib/rpmts_internal.h +@@ -14,6 +14,7 @@ typedef struct diskspaceInfo_s * rpmDisk + /** \ingroup rpmts + */ + struct diskspaceInfo_s { ++ const char *mntPoint; /*!< File system mount point */ + dev_t dev; /*!< File system device number. */ + int64_t bneeded; /*!< No. of blocks needed. */ + int64_t ineeded; /*!< No. of inodes needed. */ +Index: lib/transaction.c +=================================================================== +--- lib/transaction.c.orig ++++ lib/transaction.c +@@ -343,7 +343,7 @@ assert(otherFi != NULL); + } + + /* Update disk space info for a file. */ +- rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi), ++ rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName, rpmfiFSize(fi), + rpmfiFReplacedSize(fi), fixupSize, rpmfsGetAction(fs, i)); + + } +Index: configure.ac +=================================================================== +--- configure.ac.orig ++++ configure.ac +@@ -511,25 +511,25 @@ dnl + found_struct_statfs=no + + if test X$found_struct_statfs = Xno ; then +-dnl Solaris 2.6+ wants to use statvfs ++dnl first try including sys/vfs.h + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #ifdef HAVE_SYS_TYPES_H + #include + #endif +-#include ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h) +- AC_DEFINE(STATFS_IN_SYS_STATVFS, 1, +- [statfs in (for solaris 2.6+ systems)]) ++#include ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h) ++ AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in (for linux systems)]) + found_struct_statfs=yes],[]) + fi + + if test X$found_struct_statfs = Xno ; then +-dnl first try including sys/vfs.h ++dnl Solaris 2.6+ wants to use statvfs + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #ifdef HAVE_SYS_TYPES_H + #include + #endif +-#include ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h) +- AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in (for linux systems)]) ++#include ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h) ++ AC_DEFINE(STATFS_IN_SYS_STATVFS, 1, ++ [statfs in (for solaris 2.6+ systems)]) + found_struct_statfs=yes],[]) + fi + diff --git a/rpm-python.spec b/rpm-python.spec index 8d6e6d5..190f4dd 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.7.1 -Release: 3 +Release: 4 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 1757171..b5a74e0 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 4 11:32:33 CEST 2009 - mls@suse.de + +- do not statfs all filesystems until there is something + to report +- cherry pick default clean section patch from upstream +- add make_install macro definition + ------------------------------------------------------------------- Wed Sep 2 17:16:37 CEST 2009 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index d0da9d0..1e938ff 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.7.1 -Release: 3 +Release: 4 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -99,6 +99,8 @@ Patch63: debuginfo-mono.patch Patch64: allowufdio.diff Patch65: fixabsfilelists.diff Patch66: fixqueryreturn.diff +Patch67: lazystatfs.diff +Patch68: defclean.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -158,7 +160,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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov @@ -271,6 +273,9 @@ if test -s var/lib/rpm/packages.rpm ; then mv -f var/lib/rpm/packages.rpm var/lib/rpm/packages.rpm3 rm -f var/lib/rpm/conflictsindex.rpm var/lib/rpm/fileindex.rpm var/lib/rpm/groupindex.rpm var/lib/rpm/nameindex.rpm var/lib/rpm/providesindex.rpm var/lib/rpm/requiredby.rpm var/lib/rpm/triggerindex.rpm fi +if test -s var/lib/rpm/Filemd5s -a ! -e var/lib/rpm/Filedigests ; then + ln var/lib/rpm/Filemd5s var/lib/rpm/Filedigests +fi %postun %{insserv_cleanup} From d9c29837f8887b03a3a0840ca9cdae4725e252362f2bf1376368345c37fee1fe Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 10 Sep 2009 11:19:00 +0000 Subject: [PATCH 087/137] Accepting request 20302 from Base:System Copy from Base:System/rpm based on submit request 20302 from user coolo OBS-URL: https://build.opensuse.org/request/show/20302 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=88 --- rpm-python.spec | 2 +- rpm-suse_macros | 1 + rpm.changes | 5 +++++ rpm.spec | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 190f4dd..bcd5348 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.7.1 -Release: 4 +Release: 5 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index e0b03e7..dae65b8 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -382,6 +382,7 @@ Group: System/Localization \ Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \ Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ Supplements: packageand(bundle-lang-other:%{-n:%{-n*}}%{!-n:%{name}}) \ +BuildArch: noarch \ %description %{-n:-n %{-n*}-}lang \ Provides translations to the package %{name} diff --git a/rpm.changes b/rpm.changes index b5a74e0..e92d7e1 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 8 02:40:55 CEST 2009 - crrodriguez@suse.de + +- make lang_package(s) Noarch + ------------------------------------------------------------------- Fri Sep 4 11:32:33 CEST 2009 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 1e938ff..8065717 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.7.1 -Release: 4 +Release: 5 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 16859282b6fa16e1e0f56a896bc1cfca03a200cf02059af51d79d10fcb4cface Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 23 Oct 2009 19:53:26 +0000 Subject: [PATCH 088/137] Accepting request 23035 from Base:System Copy from Base:System/rpm based on submit request 23035 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/23035 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=90 --- rpm-python.spec | 2 +- rpm-suse_macros | 1 + rpm.changes | 5 +++++ rpm.spec | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index bcd5348..1b799b4 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.7.1 -Release: 5 +Release: 6 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index dae65b8..79b0e01 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -14,6 +14,7 @@ %_defaultdocdir %{_usr}/share/doc/packages # package build macros +%make_install make install DESTDIR=%{?buildroot} %makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install %rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/") %rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")') diff --git a/rpm.changes b/rpm.changes index e92d7e1..ecd8782 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 23 17:56:28 CEST 2009 - mls@suse.de + +- add make_install macro definition for real + ------------------------------------------------------------------- Tue Sep 8 02:40:55 CEST 2009 - crrodriguez@suse.de diff --git a/rpm.spec b/rpm.spec index 8065717..fd27cb5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.7.1 -Release: 5 +Release: 6 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From d25b1bb8d6ebb27518db94fe09d7287ca7351bc7c1d300373e34bbe34a27f7a0 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 10 Nov 2009 08:46:33 +0000 Subject: [PATCH 089/137] Accepting request 23854 from Base:System Copy from Base:System/rpm based on submit request 23854 from user coolo OBS-URL: https://build.opensuse.org/request/show/23854 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=91 --- macrosin.diff | 11 +---------- rpm-python.spec | 2 +- rpm-suse_macros | 2 +- rpm.changes | 11 +++++++++++ rpm.spec | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/macrosin.diff b/macrosin.diff index 02b3480..def6639 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -47,19 +47,10 @@ Index: macros.in # #%_source_payload w9.gzdio -#%_binary_payload w9.gzdio -+%_binary_payload w2.lzdio ++%_binary_payload w5.lzdio # Algorithm to use for generating file checksum digests on build. # If not specified or 0, MD5 is used. -@@ -357,7 +357,7 @@ package or when debugging this package.\ - #%vendor - - # Default fuzz level for %patch in spec file. --%_default_patch_fuzz 0 -+%_default_patch_fuzz 2 - - # Default patch flags - %_default_patch_flags -s @@ -420,7 +420,7 @@ package or when debugging this package.\ # diff --git a/rpm-python.spec b/rpm-python.spec index 1b799b4..40d24ae 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.7.1 -Release: 6 +Release: 7 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index 79b0e01..f924be7 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -359,7 +359,7 @@ %supplements_kernel_module() \ %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} -%suse_version 1120 +%suse_version 1130 %sles_version 0 %ul_version 0 diff --git a/rpm.changes b/rpm.changes index ecd8782..a612488 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Nov 4 09:43:43 UTC 2009 - coolo@novell.com + +- set suse_version to 1130 + +------------------------------------------------------------------- +Wed Nov 4 08:52:48 UTC 2009 - coolo@novell.com + +- do not overwrite the default fuzz factor any longer +- change the payload compression to 5 + ------------------------------------------------------------------- Fri Oct 23 17:56:28 CEST 2009 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index fd27cb5..262b0ba 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.7.1 -Release: 6 +Release: 7 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From abe76bc27a8e7ba2859414ddce3d8d300da481e252be2dca995b37928f5c3b19 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 14 Jan 2010 13:59:15 +0000 Subject: [PATCH 090/137] Accepting request 29431 from Base:System Copy from Base:System/rpm based on submit request 29431 from user coolo OBS-URL: https://build.opensuse.org/request/show/29431 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=92 --- baselibs.conf | 1 + rpm-python.spec | 6 +++--- rpm.changes | 6 ++++++ rpm.spec | 9 +++++---- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index 65e15b5..bdc5343 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,2 +1,3 @@ rpm arch ppc package rpm-devel +arch sparcv9 package rpm-devel diff --git a/rpm-python.spec b/rpm-python.spec index 40d24ae..6eb1eca 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,7 +1,7 @@ # # spec file for package rpm-python (Version 4.7.1) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,11 +21,11 @@ Name: rpm-python BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel popt-devel python-devel xz-devel zlib-devel #!BuildIgnore: rpmlint-Factory -License: GPL v2 or later +License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.7.1 -Release: 7 +Release: 8 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index a612488..3102d6a 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Dec 12 23:42:26 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source +- add SPARC baselibs + ------------------------------------------------------------------- Wed Nov 4 09:43:43 UTC 2009 - coolo@novell.com diff --git a/rpm.spec b/rpm.spec index 262b0ba..2f23318 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rpm (Version 4.7.1) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: rpm -License: GPL v2 or later +License: GPLv2+ Group: System/Packages BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel xz-devel zlib-devel BuildRequires: popt-devel @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.7.1 -Release: 7 +Release: 8 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -39,6 +39,7 @@ Source8: rpmconfigcheck Source9: sysconfig.services-rpm Source10: beecrypt-4.1.2.tar.bz2 Source11: rpm-4.4.2.3-db.tar.bz2 +Source12: baselibs.conf Patch1: beecrypt-4.1.2.diff Patch2: db.diff # quilt patches start here @@ -124,7 +125,7 @@ Authors: %package devel Summary: Include Files and Libraries mandatory for Development -License: GPL v2 or later +License: GPLv2+ Group: System/Packages Requires: rpm = %{version} Requires: popt-devel From 1386bec313df457cd1837b1e931408243176c71ca89ac0d8fcebee365c0efcf4 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 25 Feb 2010 10:12:30 +0000 Subject: [PATCH 091/137] Accepting request 33357 from Base:System Copy from Base:System/rpm based on submit request 33357 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/33357 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=93 --- readlineofi.diff | 10 ++++++++++ rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 5 +++-- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 readlineofi.diff diff --git a/readlineofi.diff b/readlineofi.diff new file mode 100644 index 0000000..d4123d1 --- /dev/null +++ b/readlineofi.diff @@ -0,0 +1,10 @@ +--- build/parseSpec.c.orig 2010-02-15 11:49:29.000000000 +0000 ++++ build/parseSpec.c 2010-02-24 10:38:25.000000000 +0000 +@@ -283,6 +283,7 @@ int readLine(rpmSpec spec, int strip) + retry: + if ((rc = readLineFromOFI(spec, ofi)) != 0) + return rc; ++ ofi = spec->fileStack; + + /* Copy next file line into the spec line buffer */ + rc = copyNextLineFromOFI(spec, ofi); diff --git a/rpm-python.spec b/rpm-python.spec index 6eb1eca..59e5970 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.7.1 -Release: 8 +Release: 9 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 3102d6a..e99a0f8 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 24 11:57:30 CET 2010 - mls@suse.de + +- fix readLine segfault [bnc#582599] + ------------------------------------------------------------------- Sat Dec 12 23:42:26 CET 2009 - jengelh@medozas.de diff --git a/rpm.spec b/rpm.spec index 2f23318..ce1a3c6 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.7.1 -Release: 8 +Release: 9 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -102,6 +102,7 @@ Patch65: fixabsfilelists.diff Patch66: fixqueryreturn.diff Patch67: lazystatfs.diff Patch68: defclean.diff +Patch69: readlineofi.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -161,7 +162,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 +%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From d210f61336dd116e4ad9eda0ed0e9a3c433879daca4b75120325cba895edcc9d Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 18 Mar 2010 15:26:36 +0000 Subject: [PATCH 092/137] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=94 --- ready | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ready diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000 From bd93352974bdf923774923470685c70232bb9bc27a49b3960ae4e77c14b2b2c9 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 1 Apr 2010 16:15:26 +0000 Subject: [PATCH 093/137] Accepting request 36638 from Base:System Copy from Base:System/rpm based on submit request 36638 from user oertel OBS-URL: https://build.opensuse.org/request/show/36638 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=95 --- allowufdio.diff | 18 +- brpcombress.diff | 36 ++- build.diff | 47 +-- dbfsync.diff | 24 +- debugsubpkg.diff | 31 +- defclean.diff | 10 +- diskspace.diff | 29 +- disttag-macro.diff | 20 +- findksyms.diff | 55 ++-- fixabsfilelists.diff | 21 -- fixqueryreturn.diff | 13 - lazystatfs.diff | 496 +++++++++++++++---------------- localetag.diff | 51 ++-- luaroot.diff | 34 +-- macrosin.diff | 32 +- missingok.diff | 27 +- modemuncher.diff | 16 + nameversioncompare.diff | 18 +- repackage-nomd5.diff | 29 ++ rpm-4.7.1.tar.bz2 | 3 - rpm-4.8.0.tar.bz2 | 3 + rpm-beecrypt.diff | 640 +++++++++++++++++----------------------- rpm-python.spec | 6 +- rpm.changes | 12 + rpm.spec | 21 +- rpmdb-no-svc.diff | 19 ++ safeugid.diff | 236 +++++++++++++++ suspendlock.diff | 125 ++++---- taggedfileindex.diff | 46 ++- waitlock.diff | 51 ++-- weakdeps.diff | 221 +++++++------- 31 files changed, 1219 insertions(+), 1171 deletions(-) delete mode 100644 fixabsfilelists.diff delete mode 100644 fixqueryreturn.diff create mode 100644 modemuncher.diff create mode 100644 repackage-nomd5.diff delete mode 100644 rpm-4.7.1.tar.bz2 create mode 100644 rpm-4.8.0.tar.bz2 create mode 100644 rpmdb-no-svc.diff create mode 100644 safeugid.diff diff --git a/allowufdio.diff b/allowufdio.diff index 471ecc1..57b0c3b 100644 --- a/allowufdio.diff +++ b/allowufdio.diff @@ -1,19 +1,17 @@ -Index: build/pack.c -=================================================================== ---- build/pack.c.orig -+++ build/pack.c -@@ -379,7 +379,9 @@ rpmRC writeRPM(Header *hdrp, unsigned ch +--- ./build/pack.c.orig 2010-03-25 15:18:23.000000000 +0000 ++++ ./build/pack.c 2010-03-25 15:23:54.000000000 +0000 +@@ -375,7 +375,9 @@ rpmRC writeRPM(Header *hdrp, unsigned ch const char *compr = NULL; headerPutString(h, RPMTAG_PAYLOADFORMAT, "cpio"); -- if (strcmp(s+1, "gzdio") == 0) { -+ if (strcmp(s+1, "ufdio") == 0) { +- if (rstreq(s+1, "gzdio")) { ++ if (rstreq(s+1, "ufdio")) { + compr = NULL; -+ } else if (strcmp(s+1, "gzdio") == 0) { ++ } else if (rstreq(s+1, "gzdio")) { compr = "gzip"; #if HAVE_BZLIB_H - } else if (strcmp(s+1, "bzdio") == 0) { -@@ -402,7 +404,8 @@ rpmRC writeRPM(Header *hdrp, unsigned ch + } else if (rstreq(s+1, "bzdio")) { +@@ -398,7 +400,8 @@ rpmRC writeRPM(Header *hdrp, unsigned ch goto exit; } diff --git a/brpcombress.diff b/brpcombress.diff index f46c29b..c879014 100644 --- a/brpcombress.diff +++ b/brpcombress.diff @@ -1,8 +1,11 @@ -make brp-compress deal correctly with hardlinked man pages - ---- ./scripts/brp-compress.orig 2004-10-17 18:49:52.000000000 +0000 -+++ ./scripts/brp-compress 2005-12-15 14:03:58.000000000 +0000 -@@ -5,12 +5,38 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD +--- ./scripts/brp-compress.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./scripts/brp-compress 2010-03-25 15:11:29.000000000 +0000 +@@ -1,16 +1,43 @@ +-#!/bin/sh ++#!/bin/bash + + # If using normal root, avoid changing anything. + if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi @@ -20,7 +23,6 @@ make brp-compress deal correctly with hardlinked man pages +{ + dir=$1 + b=$2 -+ type=$3 + + inode=`ls -i $b | awk '{ print $1 }'` + others=`find $dir -type f -inum $inode` @@ -28,11 +30,13 @@ make brp-compress deal correctly with hardlinked man pages + [ "$afile" != "$b" ] && rm -f $afile + done + -+ case $type in -+ Z|gz) gunzip $b ;; -+ bz2) bunzip2 $b ;; ++ case $b in ++ *.Z|*.gz) gunzip $b ;; ++ *.bz2) bunzip2 $b ;; ++ *.xz|*.lzma) unxz $b ;; + esac + ++ type=${b##*.} + for afile in $others ; do + [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type} + done @@ -41,16 +45,16 @@ make brp-compress deal correctly with hardlinked man pages for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ -@@ -23,9 +49,9 @@ do +@@ -23,9 +50,9 @@ do [ "`basename $f`" = "dir" ] && continue case "$f" in -- *.Z) gunzip $f; b=`echo $f | sed -e 's/\.Z$//'`;; -- *.gz) gunzip $f; b=`echo $f | sed -e 's/\.gz$//'`;; -- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; -+ *.Z) gunzip $f || check_for_hard_link $d $f Z; b=`echo $f | sed -e 's/\.Z$//'`;; -+ *.gz) gunzip $f || check_for_hard_link $d $f gz; b=`echo $f | sed -e 's/\.gz$//'`;; -+ *.bz2) bunzip2 $f || check_for_hard_link $d $f bz2; b=`echo $f | sed -e 's/\.bz2$//'`;; +- *.gz|*.Z) gunzip $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; +- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; +- *.xz|*.lzma) unxz $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; ++ *.gz|*.Z) gunzip $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; ++ *.bz2) bunzip2 $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.bz2$//'`;; ++ *.xz|*.lzma) unxz $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; *) b=$f;; esac diff --git a/build.diff b/build.diff index 7aa43dc..861aa1b 100644 --- a/build.diff +++ b/build.diff @@ -1,25 +1,9 @@ Many changes to Makefiles/autogen and the like to make it build on SUSE systems. ---- - autogen.sh | 16 +++-- - build/Makefile.am | 2 - configure.ac | 153 ++++++++++++++++++++++++++++++++------------------- - db3/configure | 6 +- - file/src/Makefile.am | 2 - installplatform | 9 ++- - lib/Makefile.am | 2 - popt/autogen.sh | 2 - rpmdb/Makefile.am | 4 - - rpmio/Makefile.am | 10 +-- - scripts/Makefile.am | 8 ++ - 11 files changed, 132 insertions(+), 82 deletions(-) - -Index: configure.ac -=================================================================== ---- configure.ac.orig -+++ configure.ac -@@ -1009,6 +1009,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm +--- ./configure.ac.orig 2010-03-24 16:35:40.000000000 +0000 ++++ ./configure.ac 2010-03-25 15:16:21.000000000 +0000 +@@ -1006,6 +1006,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;; mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;; m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;; @@ -27,7 +11,7 @@ Index: configure.ac sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;; sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;; *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; -@@ -1019,6 +1020,7 @@ esac +@@ -1016,6 +1017,7 @@ esac RPMCANONVENDOR="$build_vendor" case "${build_vendor}" in unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) @@ -35,7 +19,7 @@ Index: configure.ac test -f /etc/redhat-release && RPMCANONVENDOR=redhat test -f /etc/SuSE-release && RPMCANONVENDOR=suse test -f /etc/pld-release && RPMCANONVENDOR=pld -@@ -1031,6 +1033,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec +@@ -1028,6 +1030,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec esac RPMCANONOS="$host_os_noversion" RPMCANONGNU="$host_os_gnu" @@ -45,28 +29,23 @@ Index: configure.ac AC_SUBST(RPMCANONCOLOR) AC_SUBST(RPMCANONARCH) AC_SUBST(RPMCANONVENDOR) -Index: db3/configure -=================================================================== ---- db3/configure.orig -+++ db3/configure +--- ./db3/configure.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./db3/configure 2010-03-25 15:17:41.000000000 +0000 @@ -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% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`" -CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \ -- --enable-shared --enable-static --enable-rpc \ -- --with-uniquename=_rpmdb --srcdir=$db_dist +CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \ -+ --enable-shared --enable-static --enable-rpc \ + --enable-shared --enable-static \ +- --with-uniquename=_rpmdb --srcdir=$db_dist + --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS mv Makefile Makefile.orig cat Makefile.orig | sed -e '/^install[:-]/c\ -Index: installplatform -=================================================================== ---- installplatform.orig -+++ installplatform -@@ -54,9 +54,9 @@ for SUBST in $SUBSTS ; do +--- ./installplatform.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./installplatform 2010-03-25 15:16:21.000000000 +0000 +@@ -47,9 +47,9 @@ for SUBST in $SUBSTS ; do ARCH_INSTALL_POST='%{nil}' case "${ARCH}-${OS}" in sparc64*-linux) LIB=lib64 ;; @@ -79,7 +58,7 @@ Index: installplatform *) LIB=lib;; esac -@@ -136,6 +136,9 @@ for SUBST in $SUBSTS ; do +@@ -129,6 +129,9 @@ for SUBST in $SUBSTS ; do apple) VENDORSED='-e s,^@apple@,,' ;; diff --git a/dbfsync.diff b/dbfsync.diff index 4c5c9c4..2326504 100644 --- a/dbfsync.diff +++ b/dbfsync.diff @@ -1,10 +1,8 @@ Support a database-local fsync setting. Needs berkeley db patch. -Index: lib/backend/db3.c -=================================================================== ---- lib/backend/db3.c.orig -+++ lib/backend/db3.c -@@ -191,10 +191,12 @@ static int db_fini(dbiIndex dbi, const c +--- ./lib/backend/db3.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/backend/db3.c 2010-03-25 14:35:39.000000000 +0000 +@@ -62,10 +62,12 @@ static int db_fini(dbiIndex dbi, const c return rc; } @@ -17,9 +15,9 @@ Index: lib/backend/db3.c #if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 5) /* -@@ -357,10 +359,12 @@ static int db_init(dbiIndex dbi, const c - /* dbenv->set_rep_transport(???) */ - /* dbenv->set_rep_limit(???) */ +@@ -168,10 +170,12 @@ static int db_init(dbiIndex dbi, const c + xx = cvtdberr(dbi, "dbenv->set_cachesize", xx, _debug); + } +#if 0 if (dbi->dbi_no_fsync) { @@ -30,11 +28,9 @@ Index: lib/backend/db3.c if (dbi->dbi_shmkey) { xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey); -Index: lib/backend/dbconfig.c -=================================================================== ---- lib/backend/dbconfig.c.orig -+++ lib/backend/dbconfig.c -@@ -94,6 +94,8 @@ struct poptOption rdbOptions[] = { +--- ./lib/backend/dbconfig.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/backend/dbconfig.c 2010-03-25 14:35:39.000000000 +0000 +@@ -72,6 +72,8 @@ static const struct poptOption rdbOption NULL, NULL }, { "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING, NULL, NULL }, @@ -43,7 +39,7 @@ Index: lib/backend/dbconfig.c { "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE, NULL, NULL }, -@@ -140,8 +142,6 @@ struct poptOption rdbOptions[] = { +@@ -101,8 +103,6 @@ static const struct poptOption rdbOption NULL, NULL }, { "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0, NULL, NULL }, diff --git a/debugsubpkg.diff b/debugsubpkg.diff index cab3e33..e6002df 100644 --- a/debugsubpkg.diff +++ b/debugsubpkg.diff @@ -1,7 +1,5 @@ -Index: build/files.c -=================================================================== ---- build/files.c.orig -+++ build/files.c +--- ./build/files.c.orig 2010-03-25 15:18:05.000000000 +0000 ++++ ./build/files.c 2010-03-25 15:21:26.000000000 +0000 @@ -17,6 +17,10 @@ #include /* rpmDoDigest() */ #include @@ -13,7 +11,7 @@ Index: build/files.c #include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */ #include "rpmio/base64.h" #include "rpmio/fts.h" -@@ -2220,12 +2224,136 @@ exit: +@@ -2230,12 +2234,136 @@ exit: return rc; } @@ -150,9 +148,9 @@ Index: build/files.c genSourceRpmName(spec); for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -@@ -2238,8 +2366,109 @@ int processBinaryFiles(rpmSpec spec, int - (void) headerNEVRA(pkg->header, &n, NULL, &v, &r, &a); - rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s.%s\n"), n, v, r, a); +@@ -2250,8 +2378,110 @@ int processBinaryFiles(rpmSpec spec, int + rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr); + free(nvr); - if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK || - (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) @@ -162,6 +160,7 @@ Index: build/files.c + /* BEGIN DEBUGPKG */ +#if HAVE_GELF_H && HAVE_LIBELF + elf_version(EV_CURRENT); ++ a = headerGetString(pkg->header, RPMTAG_ARCH); + if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0) + { + Package dbg; @@ -261,11 +260,9 @@ Index: build/files.c + if ((rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) goto exit; - if (strcmp(a, "noarch") == 0 && headerGetColor(pkg->header) != 0) { -Index: macros.in -=================================================================== ---- macros.in.orig -+++ macros.in + a = headerGetString(pkg->header, RPMTAG_ARCH); +--- ./macros.in.orig 2010-03-25 15:21:20.000000000 +0000 ++++ ./macros.in 2010-03-25 15:21:26.000000000 +0000 @@ -176,24 +176,10 @@ # Template for debug information sub-package. %debug_package \ @@ -291,11 +288,9 @@ Index: macros.in %description debugsource\ This package provides debug sources for package %{name}.\ Debug sources are useful when developing applications that use this\ -Index: scripts/find-debuginfo.sh -=================================================================== ---- scripts/find-debuginfo.sh.orig -+++ scripts/find-debuginfo.sh -@@ -274,19 +274,11 @@ while read nlinks inum f; do +--- ./scripts/find-debuginfo.sh.orig 2010-03-25 15:19:04.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2010-03-25 15:21:26.000000000 +0000 +@@ -275,19 +275,11 @@ while read nlinks inum f; do fi done || exit diff --git a/defclean.diff b/defclean.diff index 1f02855..59ab7aa 100644 --- a/defclean.diff +++ b/defclean.diff @@ -1,10 +1,8 @@ -Index: build/parseSpec.c -=================================================================== ---- build/parseSpec.c.orig -+++ build/parseSpec.c -@@ -569,6 +569,13 @@ int parseSpec(rpmts ts, const char *spec +--- ./build/parseSpec.c.orig 2010-03-25 15:19:16.000000000 +0000 ++++ ./build/parseSpec.c 2010-03-25 15:45:25.000000000 +0000 +@@ -562,6 +562,13 @@ int parseSpec(rpmts ts, const char *spec + free(body); } - /* LCL: parsePart is modified @*/ + if (spec->clean == NULL) { + char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL); diff --git a/diskspace.diff b/diskspace.diff index f647151..1744881 100644 --- a/diskspace.diff +++ b/diskspace.diff @@ -2,24 +2,23 @@ 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. -Index: lib/rpmts.c -=================================================================== ---- lib/rpmts.c.orig -+++ lib/rpmts.c -@@ -924,14 +924,14 @@ void rpmtsCheckDSIProblems(const rpmts t - rpmpsAppend(ps, RPMPROB_DISKSPACE, +--- ./lib/transaction.c.orig 2010-03-25 14:37:50.000000000 +0000 ++++ ./lib/transaction.c 2010-03-25 14:38:27.000000000 +0000 +@@ -212,7 +212,7 @@ static void rpmtsCheckDSIProblems(const + rpmpsAppend(ps, RPMPROB_DISKSPACE, 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); +- (adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize); ++ (adj_fs_blocks(dsi->bneeded)) * dsi->bsize); + dsi->obneeded = dsi->bneeded; + } } - - if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { - rpmpsAppend(ps, RPMPROB_DISKNODES, +@@ -222,7 +222,7 @@ static void rpmtsCheckDSIProblems(const + rpmpsAppend(ps, RPMPROB_DISKNODES, rpmteNEVRA(te), rpmteKey(te), ts->filesystems[i], NULL, NULL, -- (adj_fs_blocks(dsi->ineeded) - dsi->iavail)); -+ (adj_fs_blocks(dsi->ineeded))); +- (adj_fs_blocks(dsi->ineeded) - dsi->iavail)); ++ (adj_fs_blocks(dsi->ineeded))); + dsi->oineeded = dsi->ineeded; + } } - } - ps = rpmpsFree(ps); diff --git a/disttag-macro.diff b/disttag-macro.diff index e436aaf..c9dd0f2 100644 --- a/disttag-macro.diff +++ b/disttag-macro.diff @@ -1,22 +1,18 @@ -Index: build/parsePreamble.c -=================================================================== ---- build/parsePreamble.c.orig -+++ build/parsePreamble.c -@@ -311,6 +311,7 @@ static struct optionalTag { +--- ./build/parsePreamble.c.orig 2010-03-25 14:56:24.000000000 +0000 ++++ ./build/parsePreamble.c 2010-03-25 15:20:35.000000000 +0000 +@@ -312,6 +312,7 @@ static struct optionalTag { { RPMTAG_PACKAGER, "%{packager}" }, { RPMTAG_DISTRIBUTION, "%{distribution}" }, { RPMTAG_DISTURL, "%{disturl}" }, + { RPMTAG_DISTTAG, "%{disttag}" }, + { RPMTAG_BUGURL, "%{bugurl}" }, { -1, NULL } }; - -Index: macros.in -=================================================================== ---- macros.in.orig -+++ macros.in -@@ -276,6 +276,16 @@ package or when debugging this package.\ +--- ./macros.in.orig 2010-03-25 15:18:50.000000000 +0000 ++++ ./macros.in 2010-03-25 15:19:25.000000000 +0000 +@@ -279,6 +279,16 @@ package or when debugging this package.\ # - #%disturl + #%bugurl +# Configurable distribution tag, same as Disttag: tag in a specfile. +# The tag will be used to supply reliable information to tools like diff --git a/findksyms.diff b/findksyms.diff index d279ad4..5b14c52 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -1,14 +1,25 @@ SUSE specific kernel provides/requires scripts ---- - scripts/find-provides.ksyms | 41 +++++++++++++++++++++++++++++++ - scripts/find-requires.ksyms | 57 ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 98 insertions(+) - -Index: scripts/find-provides.ksyms -=================================================================== ---- /dev/null -+++ scripts/find-provides.ksyms +--- ./scripts/Makefile.am.orig 2010-03-25 16:39:30.000000000 +0000 ++++ ./scripts/Makefile.am 2010-03-25 16:39:56.000000000 +0000 +@@ -18,6 +18,7 @@ EXTRA_DIST = \ + rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \ + tcl.req tgpg vpkg-provides.sh \ + find-requires.php find-provides.php \ ++ find-requires.ksyms find-provides.ksyms \ + find-php-provides find-php-requires \ + mono-find-requires mono-find-provides \ + ocaml-find-requires.sh ocaml-find-provides.sh \ +@@ -34,6 +35,7 @@ rpmconfig_SCRIPTS = \ + check-buildroot check-rpaths check-rpaths-worker \ + find-lang.sh \ + perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \ ++ find-requires.ksyms find-provides.ksyms \ + mono-find-requires mono-find-provides \ + pkgconfigdeps.sh libtooldeps.sh \ + ocaml-find-requires.sh ocaml-find-provides.sh \ +--- ./scripts/find-provides.ksyms.orig 2010-03-25 16:39:56.000000000 +0000 ++++ ./scripts/find-provides.ksyms 2010-03-25 16:39:56.000000000 +0000 @@ -0,0 +1,41 @@ +#! /bin/sh + @@ -51,10 +62,8 @@ Index: scripts/find-provides.ksyms + | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" +done \ +| sort -u -Index: scripts/find-requires.ksyms -=================================================================== ---- /dev/null -+++ scripts/find-requires.ksyms +--- ./scripts/find-requires.ksyms.orig 2010-03-25 16:39:56.000000000 +0000 ++++ ./scripts/find-requires.ksyms 2010-03-25 16:39:56.000000000 +0000 @@ -0,0 +1,57 @@ +#! /bin/bash + @@ -113,23 +122,3 @@ Index: scripts/find-requires.ksyms + { print "ksym(" flavor ":" arr[3] ") = " arr[2] } + ' +fi -Index: scripts/Makefile.am -=================================================================== ---- scripts/Makefile.am.orig -+++ scripts/Makefile.am -@@ -19,6 +19,7 @@ EXTRA_DIST = \ - tcl.req tgpg u_pkg.sh \ - vpkg-provides.sh vpkg-provides2.sh \ - find-requires.php find-provides.php \ -+ find-requires.ksyms find-provides.ksyms \ - find-php-provides find-php-requires \ - mono-find-requires mono-find-provides \ - pkgconfigdeps.sh libtooldeps.sh -@@ -33,6 +34,7 @@ rpmconfig_SCRIPTS = \ - check-buildroot check-rpaths check-rpaths-worker \ - find-lang.sh \ - perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \ -+ find-requires.ksyms find-provides.ksyms \ - mono-find-requires mono-find-provides \ - pkgconfigdeps.sh libtooldeps.sh \ - rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg diff --git a/fixabsfilelists.diff b/fixabsfilelists.diff deleted file mode 100644 index 6683e06..0000000 --- a/fixabsfilelists.diff +++ /dev/null @@ -1,21 +0,0 @@ -Index: build/files.c -=================================================================== ---- build/files.c.orig -+++ build/files.c -@@ -1742,9 +1742,13 @@ static rpmRC processPackageFiles(rpmSpec - - argvSplit(&filelists, getStringBuf(pkg->fileFile), "\n"); - for (fp = filelists; *fp != NULL; fp++) { -- ffn = rpmGetPath("%{_builddir}/", -- (spec->buildSubdir ? spec->buildSubdir : "") , -- "/", *fp, NULL); -+ if (**fp == '/') { -+ ffn = rpmGetPath(*fp, NULL); -+ } else { -+ ffn = rpmGetPath("%{_builddir}/", -+ (spec->buildSubdir ? spec->buildSubdir : "") , -+ "/", *fp, NULL); -+ } - fd = fopen(ffn, "r"); - - if (fd == NULL || ferror(fd)) { diff --git a/fixqueryreturn.diff b/fixqueryreturn.diff deleted file mode 100644 index 99bb24c..0000000 --- a/fixqueryreturn.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: lib/query.c -=================================================================== ---- lib/query.c.orig -+++ lib/query.c -@@ -283,7 +283,7 @@ static int rpmgiShowMatches(QVA_t qva, r - if (qva->qva_source == RPMQV_DBOFFSET) - break; - } -- return rpmgiNumErrors(gi); -+ return ec + rpmgiNumErrors(gi); - } - - int rpmcliShowMatches(QVA_t qva, rpmts ts) diff --git a/lazystatfs.diff b/lazystatfs.diff index ecfbb69..71389f3 100644 --- a/lazystatfs.diff +++ b/lazystatfs.diff @@ -1,257 +1,6 @@ -Index: lib/rpmts.c -=================================================================== ---- lib/rpmts.c.orig -+++ lib/rpmts.c -@@ -779,83 +779,102 @@ rpmdb rpmtsGetRdb(rpmts ts) - - int rpmtsInitDSI(const rpmts ts) - { -- rpmDiskSpaceInfo dsi; -- struct stat sb; -- int rc; -- int i; -- - if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE) - return 0; -- -- rpmlog(RPMLOG_DEBUG, "mounted filesystems:\n"); -- rpmlog(RPMLOG_DEBUG, -- " i dev bsize bavail iavail mount point\n"); -- -- rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount); -- if (rc || ts->filesystems == NULL || ts->filesystemCount <= 0) -- return rc; -- -- /* Get available space on mounted file systems. */ -- - ts->dsi = _free(ts->dsi); -- ts->dsi = xcalloc((ts->filesystemCount + 1), sizeof(*ts->dsi)); -+ ts->dsi = xcalloc(1, sizeof(*ts->dsi)); -+ return 0; -+} - -- dsi = ts->dsi; -+static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, const char *dirName, int count) -+{ -+ rpmDiskSpaceInfo dsi; -+ struct stat sb; -+ int rc; - -- if (dsi != NULL) -- for (i = 0; (i < ts->filesystemCount) && dsi; i++, dsi++) { - #if STATFS_IN_SYS_STATVFS -- struct statvfs sfb; -- memset(&sfb, 0, sizeof(sfb)); -- rc = statvfs(ts->filesystems[i], &sfb); -+ struct statvfs sfb; -+ memset(&sfb, 0, sizeof(sfb)); -+ rc = statvfs(dirName, &sfb); - #else -- struct statfs sfb; -- memset(&sfb, 0, sizeof(sfb)); -+ struct statfs sfb; -+ memset(&sfb, 0, sizeof(sfb)); - # if STAT_STATFS4 - /* This platform has the 4-argument version of the statfs call. The last two - * should be the size of struct statfs and 0, respectively. The 0 is the - * filesystem type, and is always 0 when statfs is called on a mounted - * filesystem, as we're doing. - */ -- rc = statfs(ts->filesystems[i], &sfb, sizeof(sfb), 0); -+ rc = statfs(dirName, &sfb, sizeof(sfb), 0); - # else -- rc = statfs(ts->filesystems[i], &sfb); -+ rc = statfs(dirName, &sfb); - # endif - #endif -- if (rc) -- break; -- -- rc = stat(ts->filesystems[i], &sb); -- if (rc) -- break; -- dsi->dev = sb.st_dev; -+ if (rc) -+ return NULL; - -- dsi->bsize = sfb.f_bsize; -- dsi->bneeded = 0; -- dsi->ineeded = 0; -+ rc = stat(dirName, &sb); -+ if (rc) -+ return NULL; -+ if (sb.st_dev != dev) -+ return NULL; -+ -+ ts->dsi = xrealloc(ts->dsi, (count + 2) * sizeof(*ts->dsi)); -+ dsi = ts->dsi + count; -+ memset(dsi, 0, 2 * sizeof(*dsi)); -+ dsi->dev = dev; -+ dsi->bsize = sfb.f_bsize; -+ if (!dsi->bsize) -+ dsi->bsize = 512; /* we need a bsize */ -+ dsi->bneeded = 0; -+ dsi->ineeded = 0; - #ifdef STATFS_HAS_F_BAVAIL -- dsi->bavail = sfb.f_bavail; -+ dsi->bavail = sfb.f_bavail; - #else - /* FIXME: the statfs struct doesn't have a member to tell how many blocks are - * available for non-superusers. f_blocks - f_bfree is probably too big, but - * it's about all we can do. - */ -- dsi->bavail = sfb.f_blocks - sfb.f_bfree; -+ dsi->bavail = sfb.f_blocks - sfb.f_bfree; - #endif -- /* XXX Avoid FAT and other file systems that have not inodes. */ -- /* XXX assigning negative value to unsigned type */ -- dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) -- ? sfb.f_ffree : -1; -- rpmlog(RPMLOG_DEBUG, -- "%5d 0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n", -- i, (unsigned) dsi->dev, dsi->bsize, -- dsi->bavail, dsi->iavail, -- ts->filesystems[i]); -+ /* XXX Avoid FAT and other file systems that have not inodes. */ -+ /* XXX assigning negative value to unsigned type */ -+ dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) -+ ? sfb.f_ffree : -1; -+ -+ return dsi; -+} -+ -+static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi) -+{ -+ int i; -+ struct stat sb; -+ -+ /* must leave chroot for this */ -+ if (rpmtsChrootDone(ts)) { -+ chroot("."); -+ } -+ if (!ts->filesystemCount) -+ rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount); -+ for (i = 0; i < ts->filesystemCount; i++) { -+ if (stat(ts->filesystems[i], &sb)) -+ continue; -+ if (sb.st_dev == dsi->dev) { -+ dsi->mntPoint = ts->filesystems[i]; -+ break; -+ } -+ } -+ if (i == ts->filesystemCount) { -+ /* file system not found, create something to display */ -+ dsi->mntPoint = xmalloc(20); -+ sprintf(dsi->mntPoint, "dev 0x%08x", (unsigned)dsi->dev); -+ } -+ if (rpmtsChrootDone(ts)) { -+ chroot(ts->rootDir); - } -- return rc; - } - --void rpmtsUpdateDSI(const rpmts ts, dev_t dev, -+void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName, - rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize, - rpmFileAction action) - { -@@ -866,8 +885,10 @@ void rpmtsUpdateDSI(const rpmts ts, dev_ - if (dsi) { - while (dsi->bsize && dsi->dev != dev) - dsi++; -- if (dsi->bsize == 0) -- dsi = NULL; -+ if (dsi->bsize == 0) { -+ /* create new entry */ -+ dsi = rpmtsCreateDSI(ts, dev, dirName, dsi - ts->dsi); -+ } - } - if (dsi == NULL) - return; -@@ -910,32 +931,32 @@ void rpmtsCheckDSIProblems(const rpmts t - rpmDiskSpaceInfo dsi; - rpmps ps; - int fc; -- int i; -- -- if (ts->filesystems == NULL || ts->filesystemCount <= 0) -- return; - - dsi = ts->dsi; -- if (dsi == NULL) -+ if (dsi == NULL || !dsi->bsize) - return; - fc = rpmfiFC(rpmteFI(te)); - if (fc <= 0) - return; - - ps = rpmtsProblems(ts); -- for (i = 0; i < ts->filesystemCount; i++, dsi++) { -+ for (; dsi->bsize; dsi++) { - - if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) { -+ if (!dsi->mntPoint) -+ rpmtsFindDSIMount(ts, dsi); - rpmpsAppend(ps, RPMPROB_DISKSPACE, - rpmteNEVRA(te), rpmteKey(te), -- ts->filesystems[i], NULL, NULL, -+ dsi->mntPoint, NULL, NULL, - (adj_fs_blocks(dsi->bneeded)) * dsi->bsize); - } - - if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { -+ if (!dsi->mntPoint) -+ rpmtsFindDSIMount(ts, dsi); - rpmpsAppend(ps, RPMPROB_DISKNODES, - rpmteNEVRA(te), rpmteKey(te), -- ts->filesystems[i], NULL, NULL, -+ dsi->mntPoint, NULL, NULL, - (adj_fs_blocks(dsi->ineeded))); - } - } -Index: lib/rpmts.h -=================================================================== ---- lib/rpmts.h.orig -+++ lib/rpmts.h -@@ -485,7 +485,7 @@ int rpmtsSuspendResumeDBLock(rpmts ts, i - * @param fixupSize long size difference - * @param action file disposition - */ --void rpmtsUpdateDSI(const rpmts ts, dev_t dev, -+void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName, - rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize, - rpmFileAction action); - -Index: lib/rpmts_internal.h -=================================================================== ---- lib/rpmts_internal.h.orig -+++ lib/rpmts_internal.h -@@ -14,6 +14,7 @@ typedef struct diskspaceInfo_s * rpmDisk - /** \ingroup rpmts - */ - struct diskspaceInfo_s { -+ const char *mntPoint; /*!< File system mount point */ - dev_t dev; /*!< File system device number. */ - int64_t bneeded; /*!< No. of blocks needed. */ - int64_t ineeded; /*!< No. of inodes needed. */ -Index: lib/transaction.c -=================================================================== ---- lib/transaction.c.orig -+++ lib/transaction.c -@@ -343,7 +343,7 @@ assert(otherFi != NULL); - } - - /* Update disk space info for a file. */ -- rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi), -+ rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName, rpmfiFSize(fi), - rpmfiFReplacedSize(fi), fixupSize, rpmfsGetAction(fs, i)); - - } -Index: configure.ac -=================================================================== ---- configure.ac.orig -+++ configure.ac -@@ -511,25 +511,25 @@ dnl +--- ./configure.ac.orig 2010-03-25 15:16:21.000000000 +0000 ++++ ./configure.ac 2010-03-25 15:27:47.000000000 +0000 +@@ -510,25 +510,25 @@ dnl found_struct_statfs=no if test X$found_struct_statfs = Xno ; then @@ -284,3 +33,242 @@ Index: configure.ac found_struct_statfs=yes],[]) fi +--- ./lib/transaction.c.orig 2010-03-25 15:14:38.000000000 +0000 ++++ ./lib/transaction.c 2010-03-25 15:44:25.000000000 +0000 +@@ -45,6 +45,7 @@ + #include "debug.h" + + struct diskspaceInfo_s { ++ const char *mntPoint; /*!< File system mount point */ + dev_t dev; /*!< File system device number. */ + int64_t bneeded; /*!< No. of blocks needed. */ + int64_t ineeded; /*!< No. of inodes needed. */ +@@ -61,83 +62,78 @@ struct diskspaceInfo_s { + + static int rpmtsInitDSI(const rpmts ts) + { +- rpmDiskSpaceInfo dsi; +- struct stat sb; +- int rc; +- int i; +- + if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE) + return 0; + +- rpmlog(RPMLOG_DEBUG, "mounted filesystems:\n"); +- rpmlog(RPMLOG_DEBUG, +- " i dev bsize bavail iavail mount point\n"); +- +- rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount); +- if (rc || ts->filesystems == NULL || ts->filesystemCount <= 0) +- return rc; +- +- /* Get available space on mounted file systems. */ +- + ts->dsi = _free(ts->dsi); +- ts->dsi = xcalloc((ts->filesystemCount + 1), sizeof(*ts->dsi)); ++ ts->dsi = xcalloc(1, sizeof(*ts->dsi)); ++ return 0; ++} + +- dsi = ts->dsi; ++static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, const char *dirName, int count) ++{ ++ rpmDiskSpaceInfo dsi; ++ struct stat sb; ++ int rc; + +- if (dsi != NULL) +- for (i = 0; (i < ts->filesystemCount) && dsi; i++, dsi++) { + #if STATFS_IN_SYS_STATVFS +- struct statvfs sfb; +- memset(&sfb, 0, sizeof(sfb)); +- rc = statvfs(ts->filesystems[i], &sfb); ++ struct statvfs sfb; ++ memset(&sfb, 0, sizeof(sfb)); ++ rc = statvfs(ts->filesystems[i], &sfb); + #else +- struct statfs sfb; +- memset(&sfb, 0, sizeof(sfb)); ++ struct statfs sfb; ++ memset(&sfb, 0, sizeof(sfb)); + # if STAT_STATFS4 + /* This platform has the 4-argument version of the statfs call. The last two + * should be the size of struct statfs and 0, respectively. The 0 is the + * filesystem type, and is always 0 when statfs is called on a mounted + * filesystem, as we're doing. + */ +- rc = statfs(ts->filesystems[i], &sfb, sizeof(sfb), 0); ++ rc = statfs(dirName, &sfb, sizeof(sfb), 0); + # else +- rc = statfs(ts->filesystems[i], &sfb); ++ rc = statfs(dirName, &sfb); + # endif + #endif +- if (rc) +- break; ++ if (rc) ++ return NULL; + +- rc = stat(ts->filesystems[i], &sb); +- if (rc) +- break; +- dsi->dev = sb.st_dev; ++ rc = stat(dirName, &sb); ++ if (rc) ++ return NULL; ++ if (sb.st_dev != dev) ++ return NULL; + +- dsi->bsize = sfb.f_bsize; +- dsi->bneeded = 0; +- dsi->ineeded = 0; ++ ts->dsi = xrealloc(ts->dsi, (count + 2) * sizeof(*ts->dsi)); ++ dsi = ts->dsi + count; ++ memset(dsi, 0, 2 * sizeof(*dsi)); ++ ++ dsi->dev = sb.st_dev; ++ dsi->bsize = sfb.f_bsize; ++ if (!dsi->bsize) ++ dsi->bsize = 512; /* we need a bsize */ ++ dsi->bneeded = 0; ++ dsi->ineeded = 0; + #ifdef STATFS_HAS_F_BAVAIL +- dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail; ++# ifdef ST_RDONLY ++ dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail; ++# else ++ dsi->bavail = sfb.f_bavail; ++# endif + #else + /* FIXME: the statfs struct doesn't have a member to tell how many blocks are + * available for non-superusers. f_blocks - f_bfree is probably too big, but + * it's about all we can do. + */ +- dsi->bavail = sfb.f_blocks - sfb.f_bfree; ++ dsi->bavail = sfb.f_blocks - sfb.f_bfree; + #endif +- /* XXX Avoid FAT and other file systems that have not inodes. */ +- /* XXX assigning negative value to unsigned type */ +- dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) +- ? sfb.f_ffree : -1; +- rpmlog(RPMLOG_DEBUG, +- "%5d 0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n", +- i, (unsigned) dsi->dev, dsi->bsize, +- dsi->bavail, dsi->iavail, +- ts->filesystems[i]); +- } +- return rc; ++ /* XXX Avoid FAT and other file systems that have not inodes. */ ++ /* XXX assigning negative value to unsigned type */ ++ dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) ++ ? sfb.f_ffree : -1; ++ return dsi; + } + +-static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, ++static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName, + rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize, + rpmFileAction action) + { +@@ -148,8 +140,10 @@ static void rpmtsUpdateDSI(const rpmts t + if (dsi) { + while (dsi->bsize && dsi->dev != dev) + dsi++; +- if (dsi->bsize == 0) +- dsi = NULL; ++ if (dsi->bsize == 0) { ++ /* create new entry */ ++ dsi = rpmtsCreateDSI(ts, dev, dirName, dsi - ts->dsi); ++ } + } + if (dsi == NULL) + return; +@@ -187,31 +181,58 @@ static void rpmtsUpdateDSI(const rpmts t + dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize); + } + ++static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi) ++{ ++ int i; ++ struct stat sb; ++ ++ /* must leave chroot for this */ ++ if (rpmtsChrootDone(ts)) { ++ chroot("."); ++ } ++ if (!ts->filesystemCount) ++ rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount); ++ for (i = 0; i < ts->filesystemCount; i++) { ++ if (stat(ts->filesystems[i], &sb)) ++ continue; ++ if (sb.st_dev == dsi->dev) { ++ dsi->mntPoint = ts->filesystems[i]; ++ break; ++ } ++ } ++ if (i == ts->filesystemCount) { ++ /* file system not found, create something to display */ ++ dsi->mntPoint = xmalloc(20); ++ sprintf((char *)dsi->mntPoint, "dev 0x%08x", (unsigned)dsi->dev); ++ } ++ if (rpmtsChrootDone(ts)) { ++ chroot(ts->rootDir); ++ } ++} ++ + static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te) + { + rpmDiskSpaceInfo dsi; + rpmps ps; + int fc; +- int i; +- +- if (ts->filesystems == NULL || ts->filesystemCount <= 0) +- return; + + dsi = ts->dsi; +- if (dsi == NULL) ++ if (dsi == NULL || !dsi->bsize) + return; + fc = rpmfiFC(rpmteFI(te)); + if (fc <= 0) + return; + + ps = rpmtsProblems(ts); +- for (i = 0; i < ts->filesystemCount; i++, dsi++) { ++ for (; dsi->bsize; dsi++) { + + if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) { + if (dsi->bneeded != dsi->obneeded) { ++ if (!dsi->mntPoint) ++ rpmtsFindDSIMount(ts, dsi); + rpmpsAppend(ps, RPMPROB_DISKSPACE, + rpmteNEVRA(te), rpmteKey(te), +- ts->filesystems[i], NULL, NULL, ++ dsi->mntPoint, NULL, NULL, + (adj_fs_blocks(dsi->bneeded)) * dsi->bsize); + dsi->obneeded = dsi->bneeded; + } +@@ -219,9 +240,11 @@ static void rpmtsCheckDSIProblems(const + + if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { + if (dsi->ineeded != dsi->oineeded) { ++ if (!dsi->mntPoint) ++ rpmtsFindDSIMount(ts, dsi); + rpmpsAppend(ps, RPMPROB_DISKNODES, + rpmteNEVRA(te), rpmteKey(te), +- ts->filesystems[i], NULL, NULL, ++ dsi->mntPoint, NULL, NULL, + (adj_fs_blocks(dsi->ineeded))); + dsi->oineeded = dsi->ineeded; + } +@@ -543,7 +566,7 @@ assert(otherFi != NULL); + } + + /* Update disk space info for a file. */ +- rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi), ++ rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName, rpmfiFSize(fi), + rpmfiFReplacedSize(fi), fixupSize, rpmfsGetAction(fs, i)); + + } diff --git a/localetag.diff b/localetag.diff index 8f4ead9..e3bea98 100644 --- a/localetag.diff +++ b/localetag.diff @@ -1,10 +1,5 @@ -Convert changelog and i18n header elements to current locale. -[#43347], rh#140050 - -Index: lib/tagexts.c -=================================================================== ---- lib/tagexts.c.orig -+++ lib/tagexts.c +--- ./lib/tagexts.c.orig 2010-01-08 08:14:37.000000000 +0000 ++++ ./lib/tagexts.c 2010-03-24 16:46:03.000000000 +0000 @@ -2,6 +2,7 @@ * \file lib/formats.c */ @@ -13,7 +8,7 @@ Index: lib/tagexts.c #include "system.h" #include -@@ -156,6 +157,114 @@ exit: +@@ -157,6 +158,114 @@ exit: return rc; } @@ -128,31 +123,27 @@ Index: lib/tagexts.c /** * Retrieve mounted file system paths. * @param h header -@@ -534,9 +643,43 @@ static int i18nTag(Header h, rpmTag tag, +@@ -533,10 +642,41 @@ static int i18nTag(Header h, rpmTag tag, dstring = _free(dstring); - rc = headerGet(h, tag, td, HEADERGET_DEFAULT); + rc = headerGet(h, tag, td, HEADERGET_ALLOC); + if (rc && td->data) { -+ td->data = xstrdup(td->data); + td->data = strtolocale(td->data); -+ td->flags = RPMTD_ALLOCED; + } -+ return rc; -+} -+ -+/** + return rc; + } + + /** + * Retrieve text and convert to locale. + */ +static int localeTag(Header h, rpmTag tag, rpmtd td) +{ + int rc; -+ rc = headerGet(h, tag, td, HEADERGET_DEFAULT); ++ rc = headerGet(h, tag, td, HEADERGET_ALLOC); + if (!rc) + return 0; + if (td->type == RPM_STRING_TYPE) { -+ td->data = xstrdup(td->data); + td->data = strtolocale(td->data); -+ td->flags = RPMTD_ALLOCED; + td->count = 1; + } else if (td->type == RPM_STRING_ARRAY_TYPE) { + char **arr; @@ -162,18 +153,20 @@ Index: lib/tagexts.c + arr[i] = xstrdup(((char **)td->data)[i]); + arr[i] = strtolocale(arr[i]); + } ++ _free(td->data); + td->data = arr; + td->flags = RPMTD_ALLOCED | RPMTD_PTR_ALLOCED; + } - return rc; - } - ++ return rc; ++} + - /** ++ ++/** * Retrieve summary text. * @param h header -@@ -559,6 +702,16 @@ static int descriptionTag(Header h, rpmt - return i18nTag(h, RPMTAG_DESCRIPTION, td); + * @retval td tag data container +@@ -558,6 +698,16 @@ static int descriptionTag(Header h, rpmt + return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags); } +static int changelognameTag(Header h, rpmtd td) @@ -189,12 +182,12 @@ Index: lib/tagexts.c /** * Retrieve group text. * @param h header -@@ -663,6 +816,8 @@ static const struct headerTagFunc_s rpmH +@@ -791,6 +941,8 @@ static const struct headerTagFunc_s rpmH { RPMTAG_LONGARCHIVESIZE, longarchivesizeTag }, { RPMTAG_LONGSIZE, longsizeTag }, { RPMTAG_LONGSIGSIZE, longsigsizeTag }, + { RPMTAG_CHANGELOGNAME, changelognameTag }, + { RPMTAG_CHANGELOGTEXT, changelogtextTag }, - { 0, NULL } - }; - + { RPMTAG_DBINSTANCE, dbinstanceTag }, + { RPMTAG_EVR, evrTag }, + { RPMTAG_NVR, nvrTag }, diff --git a/luaroot.diff b/luaroot.diff index 764aec9..db5bff2 100644 --- a/luaroot.diff +++ b/luaroot.diff @@ -1,8 +1,6 @@ -Index: lib/psm.c -=================================================================== ---- lib/psm.c.orig -+++ lib/psm.c -@@ -441,6 +441,8 @@ static rpmRC runLuaScript(rpmpsm psm, He +--- ./lib/psm.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/psm.c 2010-03-25 14:42:52.000000000 +0000 +@@ -455,6 +455,8 @@ static rpmRC runLuaScript(rpmpsm psm, He #ifdef WITH_LUA char *sname = NULL; int rootFd = -1; @@ -11,16 +9,10 @@ Index: lib/psm.c int xx; rpmlua lua = NULL; /* Global state. */ rpmluav var; -@@ -449,16 +451,21 @@ static rpmRC runLuaScript(rpmpsm psm, He +@@ -463,6 +465,22 @@ static rpmRC runLuaScript(rpmpsm psm, He rpmlog(RPMLOG_DEBUG, "%s: %s running scriptlet.\n", psm->stepName, sname); -- if (!rpmtsChrootDone(ts)) { -- const char *rootDir = rpmtsRootDir(ts); -- xx = chdir("/"); -- rootFd = open(".", O_RDONLY, 0); -- if (rootFd >= 0) { -- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') + chroot_done = rpmtsChrootDone(ts); + rootDir = rpmtsRootDir(ts); + if (!chroot_done) { @@ -28,26 +20,26 @@ Index: lib/psm.c + xx = chdir("/"); + rootFd = open(".", O_RDONLY, 0); + if (rootFd >= 0) { - xx = chroot(rootDir); -- xx = rpmtsSetChrootDone(ts, 1); ++ xx = chroot(rootDir); + xx = rpmtsSetChrootDone(ts, 1); + } - } ++ } + } else { + rootFd = open(".", O_RDONLY, 0); - } ++ } + xx = chdir("/"); - - /* Create arg variable */ - rpmluaPushTable(lua, "arg"); -@@ -491,12 +498,17 @@ static rpmRC runLuaScript(rpmpsm psm, He ++ + if (!rpmtsChrootDone(ts)) { + const char *rootDir = rpmtsRootDir(ts); + xx = chdir("/"); +@@ -505,12 +523,17 @@ static rpmRC runLuaScript(rpmpsm psm, He rpmluaDelVar(lua, "arg"); if (rootFd >= 0) { - const char *rootDir = rpmtsRootDir(ts); xx = fchdir(rootFd); xx = close(rootFd); -- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') +- if (rootDir != NULL && !rstreq(rootDir, "/") && *rootDir == '/') + if (!chroot_done) { xx = chroot("."); - xx = rpmtsSetChrootDone(ts, 0); diff --git a/macrosin.diff b/macrosin.diff index def6639..65d9089 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -1,9 +1,5 @@ -SUSE specific macro changes. - -Index: macros.in -=================================================================== ---- macros.in.orig -+++ macros.in +--- ./macros.in.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./macros.in 2010-03-25 15:13:43.000000000 +0000 @@ -175,22 +175,22 @@ # Template for debug information sub-package. @@ -33,7 +29,7 @@ Index: macros.in # The path to the gzip executable (legacy, use %{__gzip} instead). %_gzipbin %{__gzip} -@@ -233,7 +233,7 @@ package or when debugging this package.\ +@@ -230,7 +230,7 @@ package or when debugging this package.\ %_tmppath %{_var}/tmp # Path to top of build area. @@ -42,7 +38,7 @@ Index: macros.in # The path to the unzip executable (legacy, use %{__unzip} instead). %_unzipbin %{__unzip} -@@ -330,7 +330,7 @@ package or when debugging this package.\ +@@ -333,7 +333,7 @@ package or when debugging this package.\ # "w7.lzdio" lzma-alone level 7, lzma's default # #%_source_payload w9.gzdio @@ -51,7 +47,7 @@ Index: macros.in # Algorithm to use for generating file checksum digests on build. # If not specified or 0, MD5 is used. -@@ -420,7 +420,7 @@ package or when debugging this package.\ +@@ -417,7 +417,7 @@ package or when debugging this package.\ # # Use internal dependency generator rather than external helpers? @@ -60,7 +56,7 @@ Index: macros.in # # Filter GLIBC_PRIVATE Provides: and Requires: -@@ -466,16 +466,22 @@ print (t)\ +@@ -463,16 +463,22 @@ print (t)\ # Undefined, missing or %{nil} will use package content (if available). %_verify_file_context_path %{__file_context_path} @@ -84,8 +80,8 @@ Index: macros.in +#%__find_enhances ??? # - # Path to scripts to autogenerate per-interpreter package dependencies, -@@ -638,15 +644,15 @@ print (t)\ + # Path to scripts to autogenerate per-interpreter package dependencies. +@@ -644,15 +650,15 @@ print (t)\ %_dbi_config_Packages %{_dbi_htconfig} lockdbfd # "Depends" is a per-transaction cache of known dependency resolutions. @@ -108,7 +104,7 @@ Index: macros.in # XXX legacy configuration. # Choose db interface: -@@ -1008,7 +1014,7 @@ print (t)\ +@@ -991,7 +997,7 @@ print (t)\ %_build_vendor %{_host_vendor} %_build_os %{_host_os} %_host @host@ @@ -117,9 +113,9 @@ Index: macros.in %_host_cpu @host_cpu@ %_host_vendor @host_vendor@ %_host_os @host_os@ -@@ -1168,6 +1174,181 @@ done \ - %perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib) - %perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) +@@ -1154,6 +1160,181 @@ done \ + %python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))") + %python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])") +# More useful perl macros (from Raul Dias ) +# @@ -299,7 +295,7 @@ Index: macros.in #------------------------------------------------------------------------------ # arch macro for all Intel i?86 compatibile processors # (Note: This macro (and it's analogues) will probably be obsoleted when -@@ -1178,7 +1359,9 @@ done \ +@@ -1164,7 +1345,9 @@ done \ #------------------------------------------------------------------------------ # arch macro for all supported ARM processors @@ -310,7 +306,7 @@ Index: macros.in #------------------------------------------------------------------------------ # arch macro for all supported Sparc processors -@@ -1207,3 +1390,26 @@ done \ +@@ -1197,3 +1380,26 @@ done \ # \endverbatim #*/ diff --git a/missingok.diff b/missingok.diff index 5eeac43..39285dd 100644 --- a/missingok.diff +++ b/missingok.diff @@ -1,10 +1,6 @@ -Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7. - -Index: lib/depends.c -=================================================================== ---- lib/depends.c.orig -+++ lib/depends.c -@@ -518,8 +518,13 @@ retry: +--- ./lib/depends.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/depends.c 2010-03-24 16:47:28.000000000 +0000 +@@ -450,8 +450,13 @@ retry: } unsatisfied: @@ -19,20 +15,9 @@ Index: lib/depends.c + } exit: - /* -@@ -827,6 +832,8 @@ static inline const char * identifyDepen - return "Requires(postun):"; - if (f & RPMSENSE_SCRIPT_VERIFY) - return "Requires(verify):"; -+ if (f & RPMSENSE_MISSINGOK) -+ return "Requires(hint):"; - if (f & RPMSENSE_FIND_REQUIRES) - return "Requires(auto):"; - return "Requires:"; -Index: lib/rpmds.h -=================================================================== ---- lib/rpmds.h.orig -+++ lib/rpmds.h + if (cacheThis) { +--- ./lib/rpmds.h.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/rpmds.h 2010-03-24 16:47:28.000000000 +0000 @@ -73,6 +73,7 @@ typedef enum rpmsenseFlags_e { RPMSENSE_SCRIPT_POSTUN | \ RPMSENSE_SCRIPT_VERIFY | \ diff --git a/modemuncher.diff b/modemuncher.diff new file mode 100644 index 0000000..f791f5e --- /dev/null +++ b/modemuncher.diff @@ -0,0 +1,16 @@ +--- luaext/modemuncher.c.orig 2010-03-26 09:43:45.000000000 +0000 ++++ luaext/modemuncher.c 2010-03-26 09:44:54.000000000 +0000 +@@ -245,11 +245,11 @@ printf("modemuncher: doneflag = %u\n", d + if (ch_mode) switch (op) + { + case '+': +- *mode = *mode |= ch_mode & affected_bits; ++ *mode |= ch_mode & affected_bits; + break; + + case '-': +- *mode = *mode &= ~(ch_mode & affected_bits); ++ *mode &= ~(ch_mode & affected_bits); + break; + + case '=': diff --git a/nameversioncompare.diff b/nameversioncompare.diff index bcf5ce7..99b21f0 100644 --- a/nameversioncompare.diff +++ b/nameversioncompare.diff @@ -1,11 +1,9 @@ Also compare the name and not only the version when checking if two packages are the same. rh#104066 -Index: lib/depends.c -=================================================================== ---- lib/depends.c.orig -+++ lib/depends.c -@@ -102,6 +102,24 @@ static int removePackage(rpmts ts, Heade +--- ./lib/depends.c.orig 2010-03-24 16:47:28.000000000 +0000 ++++ ./lib/depends.c 2010-03-24 16:52:00.000000000 +0000 +@@ -100,6 +100,24 @@ static int removePackage(rpmts ts, Heade return 0; } @@ -30,7 +28,7 @@ Index: lib/depends.c int rpmtsAddInstallElement(rpmts ts, Header h, fnpyKey key, int upgrade, rpmRelocation * relocs) { -@@ -291,7 +309,7 @@ addheader: +@@ -275,7 +293,7 @@ addheader: continue; /* Skip packages that contain identical NEVR. */ @@ -38,18 +36,18 @@ Index: lib/depends.c + if (rpmNameVersionCompare(h, oh) == 0) continue; - xx = removePackage(ts, oh, pkgKey); -@@ -342,11 +360,9 @@ addheader: + xx = removePackage(ts, oh, p); +@@ -316,11 +334,9 @@ addheader: * If no obsoletes version info is available, match all names. */ if (rpmdsEVR(obsoletes) == NULL - || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { + || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) { - char * ohNEVRA = headerGetNEVRA(oh, NULL); + char * ohNEVRA = headerGetAsString(oh, RPMTAG_NEVRA); -#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */ - if (rpmVersionCompare(h, oh)) -#endif + if (rpmNameVersionCompare(h, oh)) - xx = removePackage(ts, oh, pkgKey); + xx = removePackage(ts, oh, p); rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n", rpmdsDNEVR(obsoletes)+2, ohNEVRA); diff --git a/repackage-nomd5.diff b/repackage-nomd5.diff new file mode 100644 index 0000000..639b841 --- /dev/null +++ b/repackage-nomd5.diff @@ -0,0 +1,29 @@ +--- ./lib/psm.c.orig 2010-03-26 15:06:20.000000000 +0000 ++++ ./lib/psm.c 2010-03-26 15:11:27.000000000 +0000 +@@ -1318,6 +1318,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s + + if (psm->goal == PSM_PKGINSTALL) { + FD_t payload = NULL; ++ rpmtransFlags oldtsflags; + + if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB) break; + +@@ -1343,6 +1344,9 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s + break; + } + ++ oldtsflags = rpmtsFlags(ts); ++ if (headerIsEntry(fi->h, RPMTAG_REMOVETID)) ++ (void) rpmtsSetFlags(ts, oldtsflags | RPMTRANS_FLAG_NOMD5); + rc = fsmSetup(rpmfiFSM(fi), FSM_PKGINSTALL, ts, psm->te, fi, + payload, NULL, &psm->failedFile); + (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS), +@@ -1350,6 +1354,8 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s + (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST), + fdOp(payload, FDSTAT_DIGEST)); + xx = fsmTeardown(rpmfiFSM(fi)); ++ if (headerIsEntry(fi->h, RPMTAG_REMOVETID)) ++ (void) rpmtsSetFlags(ts, oldtsflags); + + saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ + xx = Fclose(payload); diff --git a/rpm-4.7.1.tar.bz2 b/rpm-4.7.1.tar.bz2 deleted file mode 100644 index 13a628c..0000000 --- a/rpm-4.7.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0af1f507b342eda33f9ef113b645048034fb7fef3b4ff3c084532af12b6f70d -size 3410587 diff --git a/rpm-4.8.0.tar.bz2 b/rpm-4.8.0.tar.bz2 new file mode 100644 index 0000000..2fec1e1 --- /dev/null +++ b/rpm-4.8.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3b4bb2d78eaf1f5200fdcd51372ca9cedce64e030046372e6a13e361cb82b64 +size 3692408 diff --git a/rpm-beecrypt.diff b/rpm-beecrypt.diff index 0fff5e4..c4a2292 100644 --- a/rpm-beecrypt.diff +++ b/rpm-beecrypt.diff @@ -1,6 +1,6 @@ ---- ./Makefile.am.orig 2009-06-23 11:40:57.000000000 +0000 -+++ ./Makefile.am 2009-08-20 13:47:03.000000000 +0000 -@@ -88,7 +88,8 @@ DISTCLEANFILES += find-requires +--- ./Makefile.am.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./Makefile.am 2010-03-24 15:39:14.000000000 +0000 +@@ -87,7 +87,8 @@ DISTCLEANFILES += find-requires rpm_SOURCES = rpmqv.c debug.h system.h rpm_CPPFLAGS = $(AM_CPPFLAGS) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV @@ -10,8 +10,8 @@ rpm_LDADD += @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@ rpmbuild_SOURCES = build.c rpmqv.c build.h debug.h system.h ---- ./config.h.in.orig 2009-07-21 08:21:37.000000000 +0000 -+++ ./config.h.in 2009-08-20 13:47:03.000000000 +0000 +--- ./config.h.in.orig 2010-01-08 08:35:12.000000000 +0000 ++++ ./config.h.in 2010-03-24 15:39:14.000000000 +0000 @@ -13,6 +13,9 @@ /* Define to 1 if you have the `basename' function. */ #undef HAVE_BASENAME @@ -52,9 +52,9 @@ /* Build with capability support? */ #undef WITH_CAP ---- ./configure.ac.orig 2009-07-21 08:20:46.000000000 +0000 -+++ ./configure.ac 2009-08-20 13:47:03.000000000 +0000 -@@ -300,12 +300,43 @@ AC_CHECK_HEADERS([dwarf.h], [ +--- ./configure.ac.orig 2010-01-08 08:34:41.000000000 +0000 ++++ ./configure.ac 2010-03-24 15:39:14.000000000 +0000 +@@ -299,12 +299,43 @@ AC_CHECK_HEADERS([dwarf.h], [ AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes]) #================= @@ -98,7 +98,7 @@ AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [ AC_MSG_ERROR([missing required NSPR / NSS header]) ]) -@@ -314,6 +345,7 @@ AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ +@@ -313,6 +344,7 @@ AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ ], [ AC_MSG_ERROR([missing required NSS library 'nss3']) ]) @@ -106,129 +106,8 @@ AC_SUBST(WITH_NSS_INCLUDE) AC_SUBST(WITH_NSS_LIB) ---- ./lib/signature.c.orig 2009-06-23 11:40:58.000000000 +0000 -+++ ./lib/signature.c 2009-08-20 13:47:03.000000000 +0000 -@@ -1118,10 +1118,8 @@ verifyRSASignature(rpmKeyring keyring, r - DIGEST_CTX md5ctx) - { - pgpDigParams sigp = dig ? &dig->signature : NULL; -- SECOidTag sigalg; - rpmRC res = RPMRC_OK; - int xx; -- SECItem digest; - const char *hdr, *signame = _("Unknown");; - const char *sig = sigtd->data; - int sigver; -@@ -1153,27 +1151,21 @@ verifyRSASignature(rpmKeyring keyring, r - switch (sigp->hash_algo) { - case PGPHASHALGO_MD5: - signame = "RSA/MD5"; -- sigalg = SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION; - break; - case PGPHASHALGO_SHA1: - signame = "RSA/SHA1"; -- sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; - break; - case PGPHASHALGO_MD2: - signame = "RSA/MD2"; -- sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION; - break; - case PGPHASHALGO_SHA256: - signame = "RSA/SHA256"; -- sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; - break; - case PGPHASHALGO_SHA384: - signame = "RSA/SHA384"; -- sigalg = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; - break; - case PGPHASHALGO_SHA512: - signame = "RSA/SHA512"; -- sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; - break; - /* fallthrough for unsupported / unknown types */ - case PGPHASHALGO_TIGER192: -@@ -1181,7 +1173,6 @@ verifyRSASignature(rpmKeyring keyring, r - case PGPHASHALGO_RIPEMD160: - default: - res = RPMRC_NOKEY; -- sigalg = SEC_OID_UNKNOWN; - break; - } - -@@ -1212,9 +1203,6 @@ verifyRSASignature(rpmKeyring keyring, r - res = RPMRC_FAIL; - goto exit; - } -- digest.type = siBuffer; -- digest.data = dig->md5; -- digest.len = dig->md5len; - } - - /* Retrieve the matching public key. */ -@@ -1222,29 +1210,8 @@ verifyRSASignature(rpmKeyring keyring, r - if (res != RPMRC_OK) - goto exit; - -- { SECItem *sig = dig->rsasig; -- size_t siglen = SECKEY_SignatureLen(dig->rsa); -- -- /* Zero-pad signature data up to expected size if necessary */ -- if (siglen > sig->len) { -- size_t pad = siglen - sig->len; -- if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { -- res = RPMRC_FAIL; -- goto exit; -- } -- memset(sig->data, 0, pad); -- memcpy(sig->data+pad, dig->rsasig->data, dig->rsasig->len); -- } -- -- if (VFY_VerifyDigest(&digest, dig->rsa, sig, sigalg, NULL) == SECSuccess) -- res = RPMRC_OK; -- else -- res = RPMRC_FAIL; -- -- if (sig != dig->rsasig) { -- SECITEM_ZfreeItem(sig, 1); -- } -- } -+ if (pgpVerifyRSA(dig)) -+ res = RPMRC_FAIL; - - exit: - if (sigp != NULL) { -@@ -1273,7 +1240,6 @@ verifyDSASignature(rpmKeyring keyring, r - pgpDigParams sigp = dig ? &dig->signature : NULL; - rpmRC res; - int xx; -- SECItem digest; - const char *hdr; - int sigver; - const char *sig = sigtd->data; -@@ -1320,9 +1286,6 @@ verifyDSASignature(rpmKeyring keyring, r - res = RPMRC_FAIL; - goto exit; - } -- digest.type = siBuffer; -- digest.data = dig->sha1; -- digest.len = dig->sha1len; - } - - /* Retrieve the matching public key. */ -@@ -1330,10 +1293,7 @@ verifyDSASignature(rpmKeyring keyring, r - if (res != RPMRC_OK) - goto exit; - -- if (VFY_VerifyDigest(&digest, dig->dsa, dig->dsasig, -- SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, NULL) == SECSuccess) -- res = RPMRC_OK; -- else -+ if (pgpVerifyDSA(dig)) - res = RPMRC_FAIL; - - exit: ---- ./rpmio/Makefile.am.orig 2009-06-23 11:40:59.000000000 +0000 -+++ ./rpmio/Makefile.am 2009-08-20 13:47:03.000000000 +0000 +--- ./rpmio/Makefile.am.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./rpmio/Makefile.am 2010-03-24 15:42:04.000000000 +0000 @@ -2,6 +2,7 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ @@ -247,7 +126,7 @@ +librpmio_la_SOURCES += digest_nss.c +endif + - librpmio_la_LDFLAGS = -version-info 0:0:0 + librpmio_la_LDFLAGS = -version-info 1:0:0 librpmio_la_LIBADD = \ ../misc/libmisc.la \ @WITH_NSS_LIB@ \ @@ -255,7 +134,7 @@ @WITH_LUA_LIB@ \ @WITH_BZ2_LIB@ \ @WITH_ZLIB_LIB@ \ -@@ -31,6 +39,17 @@ librpmio_la_LIBADD = \ +@@ -31,6 +39,15 @@ librpmio_la_LIBADD = \ @WITH_LZMA_LIB@ \ -lpthread @@ -267,14 +146,12 @@ +$(top_builddir)/beecrypt/libbeecrypt_nolibdir.la: $(top_builddir)/beecrypt/libbeecrypt.la + sed -e 's/libdir=.*/libdir=/' < $(top_builddir)/beecrypt/libbeecrypt.la > $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la +endif -+ -+ + if WITH_LUAEXT - AM_CPPFLAGS += -I$(top_builddir)/luaext/ + AM_CPPFLAGS += -I$(top_srcdir)/luaext/ librpmio_la_LIBADD += $(top_builddir)/luaext/libluaext.la ---- ./rpmio/base64.c.orig 2009-06-23 11:40:59.000000000 +0000 -+++ ./rpmio/base64.c 2009-08-20 13:47:03.000000000 +0000 +--- ./rpmio/base64.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./rpmio/base64.c 2010-03-24 15:39:14.000000000 +0000 @@ -4,8 +4,11 @@ #include #include @@ -292,9 +169,9 @@ #endif +#endif /* WITH_BEECRYPT */ ---- ./rpmio/digest.c.orig 2009-06-23 11:40:59.000000000 +0000 -+++ ./rpmio/digest.c 2009-08-20 13:47:03.000000000 +0000 -@@ -4,165 +4,12 @@ +--- ./rpmio/digest.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./rpmio/digest.c 2010-03-24 15:43:57.000000000 +0000 +@@ -4,26 +4,12 @@ #include "system.h" @@ -317,17 +194,26 @@ -struct DIGEST_CTX_s { - rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ - HASHContext *hashctx; /*!< Internal NSS hash context. */ +- pgpHashAlgo algo; /*!< Used hash algorithm */ -}; - + #define DIGESTS_MAX 11 + struct rpmDigestBundle_s { + int index_min; /*!< Smallest index of active digest */ +@@ -109,138 +95,3 @@ DIGEST_CTX rpmDigestBundleDupCtx(rpmDige + return dup; + } + -DIGEST_CTX -rpmDigestDup(DIGEST_CTX octx) -{ -- DIGEST_CTX nctx; -- nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); -- nctx->hashctx = HASH_Clone(octx->hashctx); -- if (nctx->hashctx == NULL) { -- fprintf(stderr, "HASH_Clone failed\n"); -- exit(EXIT_FAILURE); /* FIX: callers do not bother checking error return */ +- DIGEST_CTX nctx = NULL; +- if (octx) { +- HASHContext *hctx = HASH_Clone(octx->hashctx); +- if (hctx) { +- nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); +- nctx->hashctx = hctx; +- } - } - return nctx; -} @@ -372,30 +258,23 @@ -DIGEST_CTX -rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags) -{ -- HASH_HashType type; -- DIGEST_CTX ctx; +- HASH_HashType type = getHashType(hashalgo); +- HASHContext *hashctx = NULL; +- DIGEST_CTX ctx = NULL; - -- if (rpmInitCrypto() < 0) -- return NULL; +- if (type == HASH_AlgNULL || rpmInitCrypto() < 0) +- goto exit; - -- ctx = xcalloc(1, sizeof(*ctx)); -- ctx->flags = flags; -- -- type = getHashType(hashalgo); -- if (type == HASH_AlgNULL) { -- free(ctx); -- return NULL; +- if ((hashctx = HASH_Create(type)) != NULL) { +- ctx = xcalloc(1, sizeof(*ctx)); +- ctx->flags = flags; +- ctx->algo = hashalgo; +- ctx->hashctx = hashctx; +- HASH_Begin(ctx->hashctx); - } -- -- ctx->hashctx = HASH_Create(type); -- if (ctx->hashctx == NULL) { -- free(ctx); -- return NULL; -- } -- -- HASH_Begin(ctx->hashctx); - -DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); +-exit: - return ctx; -} - @@ -459,11 +338,9 @@ - free(ctx); - return 0; -} - - void fdInitDigest(FD_t fd, pgpHashAlgo hashalgo, int flags) - { ---- ./rpmio/digest.h.orig 2009-06-23 11:40:59.000000000 +0000 -+++ ./rpmio/digest.h 2009-08-20 13:47:03.000000000 +0000 +- +--- ./rpmio/digest.h.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./rpmio/digest.h 2010-03-24 15:56:12.000000000 +0000 @@ -1,11 +1,6 @@ #ifndef _RPMDIGEST_H #define _RPMDIGEST_H @@ -475,37 +352,31 @@ - #include #include "rpmio/base64.h" - #include "rpmio/rpmio_internal.h" -@@ -55,12 +50,22 @@ struct pgpDig_s { - size_t md5len; /*!< (rsa) V3 signature hash length. */ - /* DSA parameters */ -- SECKEYPublicKey *dsa; -- SECItem *dsasig; -+ void *dsa; -+ void *dsasig; +@@ -42,8 +37,18 @@ struct pgpDig_s { + struct pgpDigParams_s pubkey; - /* RSA parameters */ -- SECKEYPublicKey *rsa; -- SECItem *rsasig; -+ void *rsa; -+ void *rsasig; + /* DSA/RSA parameters */ +- SECKEYPublicKey *keydata; +- SECItem *sigdata; ++ void *keydata; ++ void *sigdata; }; ++void pgpCleanRSADSA(pgpDig dig); ++ +int pgpSetSigMpiRSA(pgpDig dig, int num, const uint8_t *p); +int pgpSetPubMpiRSA(pgpDig dig, int num, const uint8_t *p); -+void pgpCleanRSA(pgpDig dig); -+int pgpVerifyRSA(pgpDig dig); ++int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen); + +int pgpSetSigMpiDSA(pgpDig dig, int num, const uint8_t *p); +int pgpSetPubMpiDSA(pgpDig dig, int num, const uint8_t *p); -+void pgpCleanDSA(pgpDig dig); -+int pgpVerifyDSA(pgpDig dig); ++int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen); + #endif /* _RPMDIGEST_H */ ---- ./rpmio/digest_beecrypt.c.orig 2009-08-20 13:47:03.000000000 +0000 -+++ ./rpmio/digest_beecrypt.c 2009-08-20 13:47:03.000000000 +0000 -@@ -0,0 +1,503 @@ +--- ./rpmio/digest_beecrypt.c.orig 2010-03-24 15:39:14.000000000 +0000 ++++ ./rpmio/digest_beecrypt.c 2010-03-24 16:16:23.000000000 +0000 +@@ -0,0 +1,493 @@ +#include "system.h" + +#include @@ -594,6 +465,18 @@ + return 0; +} + ++void pgpCleanRSADSA(pgpDig dig) ++{ ++ if (!dig) ++ return; ++ if (dig->keydata) { ++ dig->keydata= _free(dig->keydata); ++ } ++ if (dig->sigdata) { ++ dig->sigdata = _free(dig->sigdata); ++ } ++} ++ + +/****************************** RSA **************************************/ + @@ -611,9 +494,9 @@ + struct pgpDigSigRSA_s *sig; + if (num != 0) + return 1; -+ if (!dig->rsasig) -+ dig->rsasig = xcalloc(1, sizeof(*sig)); -+ sig = dig->rsasig; ++ if (!dig->sigdata) ++ dig->sigdata = xcalloc(1, sizeof(*sig)); ++ sig = dig->sigdata; + if (!sig) + return 1; + (void) mpnsethex(&sig->c, pgpMpiHex(p)); @@ -625,9 +508,9 @@ +{ + struct pgpDigPubRSA_s *pub; + -+ if (!dig->rsa) -+ dig->rsa = xcalloc(1, sizeof(*pub)); -+ pub = dig->rsa; ++ if (!dig->keydata) ++ dig->keydata = xcalloc(1, sizeof(*pub)); ++ pub = dig->keydata; + if (!pub) + return 1; + switch(num) { @@ -642,18 +525,6 @@ + } +} + -+void pgpCleanRSA(pgpDig dig) -+{ -+ if (!dig) -+ return; -+ if (dig->rsa) { -+ dig->rsa = _free(dig->rsa); -+ } -+ if (dig->rsasig) { -+ dig->rsasig = _free(dig->rsasig); -+ } -+} -+ +static inline unsigned char nibble(char c) +{ + if (c >= '0' && c <= '9') @@ -665,7 +536,7 @@ + return 0; +} + -+int pgpVerifyRSA(pgpDig dig) ++int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen) +{ + const char * prefix = NULL; + int res; @@ -673,8 +544,8 @@ + struct pgpDigSigRSA_s *sig; + struct pgpDigPubRSA_s *pub; + -+ sig = dig->rsasig; -+ pub = dig->rsa; ++ sig = dig->sigdata; ++ pub = dig->keydata; + if (!sig || !pub) + return 1; + @@ -713,13 +584,13 @@ + memset(buf, 0xff, nb); + buf[0] = 0x00; + buf[1] = 0x01; -+ bp = buf + nb - strlen(prefix)/2 - dig->md5len - 1; ++ bp = buf + nb - strlen(prefix)/2 - hashlen - 1; + if (bp < buf) + return 1; + *bp++ = 0; + for (; *prefix; prefix += 2) + *bp++ = (nibble(prefix[0]) << 4) | nibble(prefix[1]); -+ memcpy(bp, dig->md5, dig->md5len); ++ memcpy(bp, hash, hashlen); + mpnzero(&rsahm); + (void) mpnsetbin(&rsahm, buf, nb); + buf = _free(buf); @@ -753,9 +624,9 @@ +{ + struct pgpDigSigDSA_s *sig; + -+ if (!dig->dsasig) -+ dig->dsasig = xcalloc(1, sizeof(*sig)); -+ sig = dig->dsasig; ++ if (!dig->sigdata) ++ dig->sigdata = xcalloc(1, sizeof(*sig)); ++ sig = dig->sigdata; + if (!sig) + return 1; + switch(num) { @@ -773,9 +644,9 @@ +{ + struct pgpDigPubDSA_s *pub; + -+ if (!dig->dsa) -+ dig->dsa = xcalloc(1, sizeof(*pub)); -+ pub = dig->dsa; ++ if (!dig->keydata) ++ dig->keydata = xcalloc(1, sizeof(*pub)); ++ pub = dig->keydata; + if (!pub) + return 1; + switch(num) { @@ -796,31 +667,19 @@ + } +} + -+void pgpCleanDSA(pgpDig dig) -+{ -+ if (!dig) -+ return; -+ if (dig->dsa) { -+ dig->dsa = _free(dig->dsa); -+ } -+ if (dig->dsasig) { -+ dig->dsasig = _free(dig->dsasig); -+ } -+} -+ -+int pgpVerifyDSA(pgpDig dig) ++int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen) +{ + struct pgpDigSigDSA_s *sig; + struct pgpDigPubDSA_s *pub; + mpnumber hm; + int res; + -+ sig = dig->dsasig; -+ pub = dig->dsa; ++ sig = dig->sigdata; ++ pub = dig->keydata; + if (!sig || !pub) + return 1; + mpnzero(&hm); -+ mpnsetbin(&hm, dig->sha1, dig->sha1len); ++ mpnsetbin(&hm, hash, hashlen); + res = dsavrfy(&pub->p, &pub->q, &pub->g, &hm, &pub->y, &sig->r, &sig->s) == 1 ? 0 : 1; + mpnfree(&hm); + return res; @@ -839,6 +698,7 @@ + */ +struct DIGEST_CTX_s { + rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ ++ pgpHashAlgo algo; /*!< Used hash algorithm */ + uint32_t datalen; /*!< No. bytes in block of plaintext data. */ + uint32_t paramlen; /*!< No. bytes of digest parameters. */ + uint32_t digestlen; /*!< No. bytes of digest. */ @@ -888,6 +748,7 @@ + int xx; + + ctx->flags = flags; ++ ctx->algo = hashalgo; + + switch (hashalgo) { + case PGPHASHALGO_MD5: @@ -1009,9 +870,9 @@ + free(ctx); + return 0; +} ---- ./rpmio/digest_nss.c.orig 2009-08-20 13:47:03.000000000 +0000 -+++ ./rpmio/digest_nss.c 2009-08-20 13:49:53.000000000 +0000 -@@ -0,0 +1,513 @@ +--- ./rpmio/digest_nss.c.orig 2010-03-24 15:39:14.000000000 +0000 ++++ ./rpmio/digest_nss.c 2010-03-24 16:14:36.000000000 +0000 +@@ -0,0 +1,500 @@ +#include +#include +#include @@ -1165,6 +1026,20 @@ + return 0; +} + ++void pgpCleanRSADSA(pgpDig dig) ++{ ++ if (!dig) ++ return; ++ if (dig->keydata) { ++ SECKEY_DestroyPublicKey(dig->keydata); ++ dig->keydata = NULL; ++ } ++ if (dig->sigdata) { ++ SECITEM_ZfreeItem(dig->sigdata, PR_TRUE); ++ dig->sigdata = NULL; ++ } ++} ++ +/****************************** RSA **************************************/ + +int @@ -1174,9 +1049,9 @@ + + if (num != 0) + return 1; -+ sig = dig->rsasig; ++ sig = dig->rsasigdata; + sig = pgpMpiItem(NULL, sig, p); -+ dig->rsasig = sig; ++ dig->rsasigdata = sig; + if (sig == NULL) + return 1; + return 0; @@ -1187,42 +1062,30 @@ +{ + SECKEYPublicKey *pub; + -+ if (!dig->rsa) -+ dig->rsa = pgpNewPublicKey(rsaKey); -+ pub = dig->rsa; ++ if (!dig->keydata) ++ dig->keydata = pgpNewPublicKey(rsaKey); ++ pub = dig->keydata; + if (!pub) + return 1; + switch(num) { + case 0: -+ pgpMpiItem(dig->rsa->arena, &pub->u.rsa.modulus, p); ++ pgpMpiItem(pub->arena, &pub->u.rsa.modulus, p); + return 0; + case 1: -+ pgpMpiItem(dig->rsa->arena, &pub->u.rsa.publicExponent, p); ++ pgpMpiItem(pub->arena, &pub->u.rsa.publicExponent, p); + return 0; + default: + return 1; + } +} + -+void pgpCleanRSA(pgpDig dig) -+{ -+ if (!dig) -+ return; -+ if (dig->rsa) { -+ SECKEY_DestroyPublicKey(dig->rsa); -+ dig->rsa = NULL; -+ } -+ if (dig->rsasig) { -+ SECITEM_ZfreeItem(dig->rsasig, PR_TRUE); -+ dig->rsasig = NULL; -+ } -+} -+ -+int pgpVerifyRSA(pgpDig dig) ++int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen) +{ + SECOidTag sigalg; + SECItem digest; ++ SECKEYPublicKey *pub; + SECItem *sig; ++ SECItem *newsig = NULL; + size_t siglen; + int res; + @@ -1251,29 +1114,31 @@ + break; + } + digest.type = siBuffer; -+ digest.data = dig->md5; -+ digest.len = dig->md5len; ++ digest.data = hash; ++ digest.len = hashlen; + -+ sig = dig->rsasig; -+ siglen = SECKEY_SignatureLen(dig->rsa); ++ pub = dig->keydata; ++ sig = dig->sigdata; ++ siglen = SECKEY_SignatureLen(dig->keydata); + + /* Zero-pad signature data up to expected size if necessary */ + if (siglen > sig->len) { + size_t pad = siglen - sig->len; -+ if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { ++ if ((newsig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { + return 1; + } -+ memset(sig->data, 0, pad); -+ memcpy(sig->data+pad, dig->rsasig->data, dig->rsasig->len); ++ memset(newsig->data, 0, pad); ++ memcpy(newsig->data+pad, sig->data, sig->len); ++ sig = newsig; + } + -+ if (VFY_VerifyDigest(&digest, dig->rsa, sig, sigalg, NULL) == SECSuccess) ++ if (VFY_VerifyDigest(&digest, pub, sig, sigalg, NULL) == SECSuccess) + res = 0; + else + res = 1; + -+ if (sig != dig->rsasig) { -+ SECITEM_ZfreeItem(sig, 1); ++ if (newsig) { ++ SECITEM_ZfreeItem(newsig, 1); + } + return res; +} @@ -1289,12 +1154,12 @@ + switch(num) { + case 0: + sig = SECITEM_AllocItem(NULL, NULL, 2*DSA_SUBPRIME_LEN); -+ dig->dsasig = sig; ++ dig->sigdata = sig; + memset(sig->data, 0, 2*DSA_SUBPRIME_LEN); + pgpMpiSet(DSA_SUBPRIME_LEN*8, sig->data, p, pend); + return 0; + case 1: -+ sig = dig->dsasig; ++ sig = dig->sigdata; + if (!sig) + return 1; + pgpMpiSet(DSA_SUBPRIME_LEN*8, sig->data + DSA_SUBPRIME_LEN, p, pend); @@ -1304,7 +1169,7 @@ + if (DSAU_EncodeDerSig(new, sig) != SECSuccess) + return 1; + SECITEM_FreeItem(sig, PR_TRUE); -+ dig->dsasig = new; ++ dig->sigdata = new; + return 0; + default: + return 1; @@ -1316,9 +1181,9 @@ +{ + SECKEYPublicKey *pub; + -+ if (!dig->dsa) -+ dig->dsa = pgpNewPublicKey(dsaKey); -+ pub = dig->dsa; ++ if (!dig->keydata) ++ dig->keydata = pgpNewPublicKey(dsaKey); ++ pub = dig->keydata; + if (!pub) + return 1; + switch(num) { @@ -1339,28 +1204,18 @@ + } +} + -+void pgpCleanDSA(pgpDig dig) -+{ -+ if (!dig) -+ return; -+ if (dig->dsa) { -+ SECKEY_DestroyPublicKey(dig->dsa); -+ dig->dsa = NULL; -+ } -+ if (dig->dsasig) { -+ SECITEM_ZfreeItem(dig->dsasig, PR_TRUE); -+ dig->dsasig = NULL; -+ } -+} -+ -+int pgpVerifyDSA(pgpDig dig) ++int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen) +{ + SECItem digest; ++ SECKEYPublicKey *pub; ++ SECItem *sig; + ++ sig = dig->sigdata; ++ pub = dig->keydata; + digest.type = siBuffer; -+ digest.data = dig->sha1; -+ digest.len = dig->sha1len; -+ if (VFY_VerifyDigest(&digest, dig->dsa, dig->dsasig, SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, NULL) == SECSuccess) ++ digest.data = hash; ++ digest.len = hashlen; ++ if (VFY_VerifyDigest(&digest, pub, sig, SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, NULL) == SECSuccess) + return 0; + else + return 1; @@ -1383,6 +1238,7 @@ +struct DIGEST_CTX_s { + rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ + HASHContext *hashctx; /*!< Internal NSS hash context. */ ++ pgpHashAlgo algo; /*!< Used hash algorithm */ +}; + +DIGEST_CTX @@ -1439,26 +1295,18 @@ +rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags) +{ + HASH_HashType type; -+ DIGEST_CTX ctx; ++ HASHContext *hashctx = NULL; ++ DIGEST_CTX ctx = NULL; + -+ if (rpmInitCrypto() < 0) ++ if (type == HASH_AlgNULL || rpmInitCrypto() < 0) + return NULL; + ++ if ((hashctx = HASH_Create(type)) == NULL) ++ return NULL; + ctx = xcalloc(1, sizeof(*ctx)); + ctx->flags = flags; -+ -+ type = getHashType(hashalgo); -+ if (type == HASH_AlgNULL) { -+ free(ctx); -+ return NULL; -+ } -+ -+ ctx->hashctx = HASH_Create(type); -+ if (ctx->hashctx == NULL) { -+ free(ctx); -+ return NULL; -+ } -+ ++ ctx->algo = hashalgo; ++ ctx->hashctx = hashctx; + HASH_Begin(ctx->hashctx); + +DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); @@ -1525,8 +1373,8 @@ + free(ctx); + return 0; +} ---- ./rpmio/rpmpgp.c.orig 2009-06-23 11:40:59.000000000 +0000 -+++ ./rpmio/rpmpgp.c 2009-08-20 13:50:14.000000000 +0000 +--- ./rpmio/rpmpgp.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./rpmio/rpmpgp.c 2010-03-24 16:26:00.000000000 +0000 @@ -20,9 +20,6 @@ static int _debug = 0; static int _print = 0; @@ -1537,7 +1385,7 @@ static struct pgpValTbl_s const pgpSigTypeTbl[] = { { PGPSIGTYPE_BINARY, "Binary document signature" }, { PGPSIGTYPE_TEXT, "Text document signature" }, -@@ -291,99 +288,6 @@ int pgpValTok(pgpValTbl vs, const char * +@@ -291,89 +288,6 @@ int pgpValTok(pgpValTbl vs, const char * } while ((++vs)->val != -1); return vs->val; } @@ -1623,21 +1471,11 @@ - key->pkcs11Slot = NULL; - key->arena = arena; - return key; --} -- --static SECKEYPublicKey *pgpNewRSAKey(void) --{ -- return pgpNewPublicKey(rsaKey); --} -- --static SECKEYPublicKey *pgpNewDSAKey(void) --{ -- return pgpNewPublicKey(dsaKey); -} /** \ingroup rpmpgp * Is buffer at beginning of an OpenPGP packet? -@@ -579,29 +483,16 @@ static int pgpPrtSigParams(pgpTag tag, u +@@ -569,29 +483,16 @@ static int pgpPrtSigParams(pgpTag tag, u { const uint8_t * pend = h + hlen; size_t i; @@ -1657,8 +1495,8 @@ { - switch (i) { - case 0: /* m**d */ -- _dig->rsasig = pgpMpiItem(NULL, _dig->rsasig, p); -- if (_dig->rsasig == NULL) +- _dig->sigdata = pgpMpiItem(NULL, _dig->sigdata, p); +- if (_dig->sigdata == NULL) - return 1; - break; - default: @@ -1669,7 +1507,7 @@ } pgpPrtStr("", pgpSigRSA[i]); } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { -@@ -609,30 +500,8 @@ static int pgpPrtSigParams(pgpTag tag, u +@@ -599,30 +500,8 @@ static int pgpPrtSigParams(pgpTag tag, u if (_dig && (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT)) { @@ -1683,13 +1521,13 @@ - break; - case 1: /* s */ - xx = pgpMpiSet(pgpSigDSA[i], DSA_SUBPRIME_LEN*8, dsaraw.data + DSA_SUBPRIME_LEN, p, pend); -- if (_dig->dsasig != NULL) -- SECITEM_FreeItem(_dig->dsasig, PR_FALSE); -- else if ((_dig->dsasig=SECITEM_AllocItem(NULL, NULL, 0)) == NULL) { +- if (_dig->sigdata != NULL) +- SECITEM_FreeItem(_dig->sigdata, PR_FALSE); +- else if ((_dig->sigdata=SECITEM_AllocItem(NULL, NULL, 0)) == NULL) { - xx = 1; - break; - } -- if (DSAU_EncodeDerSig(_dig->dsasig, &dsaraw) != SECSuccess) +- if (DSAU_EncodeDerSig(_dig->sigdata, &dsaraw) != SECSuccess) - xx = 1; - break; - default: @@ -1702,22 +1540,22 @@ } pgpPrtStr("", pgpSigDSA[i]); } else { -@@ -824,49 +693,11 @@ static const uint8_t * pgpPrtPubkeyParam +@@ -814,49 +693,11 @@ static const uint8_t * pgpPrtPubkeyParam char * mpi; if (pubkey_algo == PGPPUBKEYALGO_RSA) { if (i >= 2) break; - if (_dig) { -- if (_dig->rsa == NULL) { -- _dig->rsa = pgpNewRSAKey(); -- if (_dig->rsa == NULL) +- if (_dig->keydata == NULL) { +- _dig->keydata = pgpNewPublicKey(rsaKey); +- if (_dig->keydata == NULL) - break; /* error abort? */ - } - switch (i) { - case 0: /* n */ -- pgpMpiItem(_dig->rsa->arena, &_dig->rsa->u.rsa.modulus, p); +- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.rsa.modulus, p); - break; - case 1: /* e */ -- pgpMpiItem(_dig->rsa->arena, &_dig->rsa->u.rsa.publicExponent, p); +- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.rsa.publicExponent, p); - break; - default: - break; @@ -1728,23 +1566,23 @@ } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { if (i >= 4) break; - if (_dig) { -- if (_dig->dsa == NULL) { -- _dig->dsa = pgpNewDSAKey(); -- if (_dig->dsa == NULL) +- if (_dig->keydata == NULL) { +- _dig->keydata = pgpNewPublicKey(dsaKey); +- if (_dig->keydata == NULL) - break; /* error abort? */ - } - switch (i) { - case 0: /* p */ -- pgpMpiItem(_dig->dsa->arena, &_dig->dsa->u.dsa.params.prime, p); +- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.prime, p); - break; - case 1: /* q */ -- pgpMpiItem(_dig->dsa->arena, &_dig->dsa->u.dsa.params.subPrime, p); +- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.subPrime, p); - break; - case 2: /* g */ -- pgpMpiItem(_dig->dsa->arena, &_dig->dsa->u.dsa.params.base, p); +- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.base, p); - break; - case 3: /* y */ -- pgpMpiItem(_dig->dsa->arena, &_dig->dsa->u.dsa.publicValue, p); +- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.publicValue, p); - break; - default: - break; @@ -1754,35 +1592,101 @@ pgpPrtStr("", pgpPublicDSA[i]); } else if (pubkey_algo == PGPPUBKEYALGO_ELGAMAL_ENCRYPT) { if (i >= 3) break; -@@ -1256,25 +1087,8 @@ void pgpCleanDig(pgpDig dig) - dig->md5 = _free(dig->md5); - dig->sha1 = _free(dig->sha1); +@@ -1241,15 +1082,7 @@ void pgpCleanDig(pgpDig dig) + memset(&dig->signature, 0, sizeof(dig->signature)); + memset(&dig->pubkey, 0, sizeof(dig->pubkey)); -- if (dig->dsa != NULL) { -- SECKEY_DestroyPublicKey(dig->dsa); -- dig->dsa = NULL; +- if (dig->keydata != NULL) { +- SECKEY_DestroyPublicKey(dig->keydata); +- dig->keydata = NULL; - } - -- if (dig->dsasig != NULL) { -- SECITEM_ZfreeItem(dig->dsasig, PR_TRUE); -- dig->dsasig = NULL; +- if (dig->sigdata != NULL) { +- SECITEM_ZfreeItem(dig->sigdata, PR_TRUE); +- dig->sigdata = NULL; - } -- -- if (dig->rsa != NULL) { -- SECKEY_DestroyPublicKey(dig->rsa); -- dig->rsa = NULL; -- } -- -- if (dig->rsasig != NULL) { -- SECITEM_ZfreeItem(dig->rsasig, PR_TRUE); -- dig->rsasig = NULL; -- } -+ pgpCleanRSA(dig); -+ pgpCleanDSA(dig); - ++ pgpCleanRSADSA(dig); } return; -@@ -1501,50 +1315,3 @@ char * pgpArmorWrap(int atype, const uns + } +@@ -1291,39 +1124,6 @@ int pgpPrtPkts(const uint8_t * pkts, siz + return 0; + } + +-static SECOidTag getSigAlg(pgpDigParams sigp) +-{ +- SECOidTag sigalg = SEC_OID_UNKNOWN; +- if (sigp->pubkey_algo == PGPPUBKEYALGO_DSA) { +- /* assume SHA1 for now, NSS doesn't have SECOID's for other types */ +- sigalg = SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST; +- } else if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { +- switch (sigp->hash_algo) { +- case PGPHASHALGO_MD5: +- sigalg = SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION; +- break; +- case PGPHASHALGO_MD2: +- sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION; +- break; +- case PGPHASHALGO_SHA1: +- sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; +- break; +- case PGPHASHALGO_SHA256: +- sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; +- break; +- case PGPHASHALGO_SHA384: +- sigalg = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; +- break; +- case PGPHASHALGO_SHA512: +- sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; +- break; +- default: +- break; +- } +- } +- return sigalg; +-} +- + char *pgpIdentItem(pgpDigParams digp) + { + char *id = NULL; +@@ -1372,30 +1172,12 @@ rpmRC pgpVerifySig(pgpDig dig, DIGEST_CT + + /* Compare leading 16 bits of digest for quick check. */ + if (hash && memcmp(hash, sigp->signhash16, 2) == 0) { +- SECItem digest = { .type = siBuffer, .data = hash, .len = hashlen }; +- SECItem *sig = dig->sigdata; +- +- /* Zero-pad RSA signature to expected size if necessary */ +- if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { +- size_t siglen = SECKEY_SignatureLen(dig->keydata); +- if (siglen > sig->len) { +- size_t pad = siglen - sig->len; +- if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { +- goto exit; +- } +- memset(sig->data, 0, pad); +- memcpy(sig->data+pad, dig->sigdata->data, dig->sigdata->len); +- } +- } +- +- /* XXX VFY_VerifyDigest() is deprecated in NSS 3.12 */ +- if (VFY_VerifyDigest(&digest, dig->keydata, sig, +- getSigAlg(sigp), NULL) == SECSuccess) { +- res = RPMRC_OK; +- } +- +- if (sig != dig->sigdata) { +- SECITEM_ZfreeItem(sig, 1); ++ if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { ++ if (!pgpVerifyRSA(dig, hash, hashlen)) ++ res = RPMRC_OK; ++ } else if (sigp->pubkey_algo == PGPPUBKEYALGO_DSA) { ++ if (!pgpVerifyDSA(dig, hash, hashlen)) ++ res = RPMRC_OK; + } + } + +@@ -1580,50 +1362,3 @@ char * pgpArmorWrap(int atype, const uns return val; } diff --git a/rpm-python.spec b/rpm-python.spec index 59e5970..99636b0 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,5 +1,5 @@ # -# spec file for package rpm-python (Version 4.7.1) +# spec file for package rpm-python (Version 4.8.0) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -24,8 +24,8 @@ BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages -Version: 4.7.1 -Release: 9 +Version: 4.8.0 +Release: 1 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index e99a0f8..364a858 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Mar 26 16:29:36 CET 2010 - mls@suse.de + +- port sles11-sp1 repackage-nomd5.diff and safeugid.diff + +------------------------------------------------------------------- +Fri Mar 26 11:49:59 CET 2010 - mls@suse.de + +- update to rpm-4.8.0 + * updated python bindings + * new transaction ordering code + ------------------------------------------------------------------- Wed Feb 24 11:57:30 CET 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index ce1a3c6..fbfaa90 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,5 +1,5 @@ # -# spec file for package rpm (Version 4.7.1) +# spec file for package rpm (Version 4.8.0) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -27,8 +27,8 @@ Provides: rpminst PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager -Version: 4.7.1 -Release: 9 +Version: 4.8.0 +Release: 1 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -98,11 +98,13 @@ Patch61: debugsubpkg.diff Patch62: debuglink.diff Patch63: debuginfo-mono.patch Patch64: allowufdio.diff -Patch65: fixabsfilelists.diff -Patch66: fixqueryreturn.diff -Patch67: lazystatfs.diff -Patch68: defclean.diff -Patch69: readlineofi.diff +Patch65: lazystatfs.diff +Patch66: defclean.diff +Patch67: readlineofi.diff +Patch68: rpmdb-no-svc.diff +Patch69: modemuncher.diff +Patch70: repackage-nomd5.diff +Patch71: safeugid.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -163,6 +165,7 @@ rm -f rpmdb/db.h %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 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov @@ -180,7 +183,7 @@ export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" %ifarch alpha export CFLAGS="-g -O0 -fno-strict-aliasing" %endif -cp /usr/share/gettext/config.rpath . +#cp -p /usr/share/gettext/config.rpath . cp autogen.sh beecrypt pushd beecrypt ./autogen.sh --with-pic diff --git a/rpmdb-no-svc.diff b/rpmdb-no-svc.diff new file mode 100644 index 0000000..f2a4787 --- /dev/null +++ b/rpmdb-no-svc.diff @@ -0,0 +1,19 @@ +--- lib/Makefile.am.orig 2010-03-26 09:34:16.000000000 +0000 ++++ lib/Makefile.am 2010-03-26 09:34:39.000000000 +0000 +@@ -148,16 +148,6 @@ rpmdb_stat_LDADD = \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +-rpmlibexec_PROGRAMS += rpmdb_svc +-rpmdb_svc_SOURCES = +-rpmdb_svc_LDADD = \ +- $(top_builddir)/db3/db_server_proc.o \ +- $(top_builddir)/db3/db_server_svc.o \ +- $(top_builddir)/db3/db_server_util.o \ +- $(top_builddir)/db3/gen_db_server.o \ +- $(top_builddir)/db3/util_log.o \ +- librpm.la +- + rpmlibexec_PROGRAMS += rpmdb_upgrade + rpmdb_upgrade_SOURCES = + rpmdb_upgrade_LDADD = \ diff --git a/safeugid.diff b/safeugid.diff new file mode 100644 index 0000000..f1e7509 --- /dev/null +++ b/safeugid.diff @@ -0,0 +1,236 @@ +--- lib/fsm.c.orig 2010-03-26 15:06:20.000000000 +0000 ++++ lib/fsm.c 2010-03-26 15:16:31.000000000 +0000 +@@ -736,22 +736,26 @@ static int fsmMapAttrs(FSM_t fsm) + + /* this check is pretty moot, rpmfi accessors check array bounds etc */ + if (fi && i >= 0 && i < rpmfiFC(fi)) { ++ rpmts ts = fsmGetTs(fsm); + mode_t finalMode = rpmfiFModeIndex(fi, i); + dev_t finalRdev = rpmfiFRdevIndex(fi, i); + time_t finalMtime = rpmfiFMtimeIndex(fi, i); + const char *user = rpmfiFUserIndex(fi, i); + const char *group = rpmfiFGroupIndex(fi, i); ++ int safe = rpmtsChrootDone(ts); ++ extern int unameToUid_safe(const char *, gid_t *, int); ++ extern int gnameToGid_safe(const char *, gid_t *, int); + uid_t uid = 0; + gid_t gid = 0; + +- if (user && unameToUid(user, &uid)) { ++ if (user && unameToUid_safe(user, &uid, safe)) { + if (fsm->goal == FSM_PKGINSTALL) + rpmlog(RPMLOG_WARNING, + _("user %s does not exist - using root\n"), user); + finalMode &= ~S_ISUID; /* turn off suid bit */ + } + +- if (group && gnameToGid(group, &gid)) { ++ if (group && gnameToGid_safe(group, &gid, safe)) { + if (fsm->goal == FSM_PKGINSTALL) + rpmlog(RPMLOG_WARNING, + _("group %s does not exist - using root\n"), group); +@@ -773,8 +777,7 @@ static int fsmMapAttrs(FSM_t fsm) + if (fsm->mapFlags & CPIO_MAP_GID) + st->st_gid = gid; + +- { rpmts ts = fsmGetTs(fsm); +- ++ { + /* + * Set file digest (if not disabled). + */ +--- lib/misc.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ lib/misc.c 2010-03-26 15:26:05.000000000 +0000 +@@ -14,6 +14,42 @@ const char * const RPMVERSION = VERSION; + + #include "debug.h" + ++/* ++ * Unfortunatelly glibc caches nss/nscd data and there is no ++ * good way to flush those caches when we did a chroot(). Thus ++ * we need to parse /etc/passwd and /etc/group ourselfs. ++ */ ++static int safe_lookup(const char * file, const char * name) ++{ ++ FILE *fp; ++ int l; ++ char buf[4096], *p; ++ ++ if (!name || !*name) ++ return -1; ++ l = strlen(name); ++ if ((fp = fopen(file, "r")) == 0) ++ return -1; ++ while ((p = fgets(buf, sizeof(buf), fp)) != 0) { ++ if (*p == '#') ++ continue; ++ while (*p && (*p == ' ' || *p == '\t')) ++ p++; ++ if (strncmp(p, name, l) != 0 || p[l] != ':') ++ continue; ++ p = strchr(p + l + 1, ':'); ++ if (!p) ++ continue; ++ fclose(fp); ++ p++; ++ while (*p && (*p == ' ' || *p == '\t')) ++ p++; ++ return atoi(p); ++ } ++ fclose(fp); ++ return -1; ++} ++ + /* unameToUid(), uidTouname() and the group variants are really poorly + implemented. They really ought to use hash tables. I just made the + guess that most files would be owned by root or the same person/group +@@ -21,11 +57,12 @@ const char * const RPMVERSION = VERSION; + is looked up via getpw() and getgr() functions. If this performs + too poorly I'll have to implement it properly :-( */ + +-int unameToUid(const char * thisUname, uid_t * uid) ++int unameToUid_safe(const char * thisUname, uid_t * uid, int safe) + { + static char * lastUname = NULL; + static size_t lastUnameLen = 0; + static size_t lastUnameAlloced; ++ static int lastUnameSafe; + static uid_t lastUid; + struct passwd * pwent; + size_t thisUnameLen; +@@ -38,6 +75,11 @@ static char * lastUname = NULL; + return 0; + } + ++ if (safe != lastUnameSafe) { ++ lastUnameLen = 0; ++ lastUnameSafe = safe; ++ } ++ + thisUnameLen = strlen(thisUname); + if (lastUname == NULL || thisUnameLen != lastUnameLen || + !rstreq(thisUname, lastUname)) +@@ -48,15 +90,21 @@ static char * lastUname = NULL; + } + strcpy(lastUname, thisUname); + +- pwent = getpwnam(thisUname); +- if (pwent == NULL) { +- /* FIX: shrug */ +- endpwent(); ++ if (safe) { ++ int uid = safe_lookup("/etc/passwd", thisUname); ++ if (uid < 0) ++ return -1; ++ lastUid = (uid_t)uid; ++ } else { + pwent = getpwnam(thisUname); +- if (pwent == NULL) return -1; ++ if (pwent == NULL) { ++ /* FIX: shrug */ ++ endpwent(); ++ pwent = getpwnam(thisUname); ++ if (pwent == NULL) return -1; ++ } ++ lastUid = pwent->pw_uid; + } +- +- lastUid = pwent->pw_uid; + } + + *uid = lastUid; +@@ -64,11 +112,18 @@ static char * lastUname = NULL; + return 0; + } + +-int gnameToGid(const char * thisGname, gid_t * gid) ++int unameToUid(const char * thisUname, uid_t * uid) ++{ ++ return unameToUid_safe(thisUname, uid, 0); ++} ++ ++ ++int gnameToGid_safe(const char * thisGname, gid_t * gid, int safe) + { + static char * lastGname = NULL; + static size_t lastGnameLen = 0; + static size_t lastGnameAlloced; ++ static int lastGnameSafe; + static gid_t lastGid; + size_t thisGnameLen; + struct group * grent; +@@ -81,6 +136,11 @@ static char * lastGname = NULL; + return 0; + } + ++ if (safe != lastGnameSafe) { ++ lastGnameLen = 0; ++ lastGnameSafe = safe; ++ } ++ + thisGnameLen = strlen(thisGname); + if (lastGname == NULL || thisGnameLen != lastGnameLen || + !rstreq(thisGname, lastGname)) +@@ -91,25 +151,34 @@ static char * lastGname = NULL; + } + strcpy(lastGname, thisGname); + +- grent = getgrnam(thisGname); +- if (grent == NULL) { +- /* FIX: shrug */ +- endgrent(); ++ if (safe) { ++ int gid = safe_lookup("/etc/group", thisGname); ++ if (gid < 0) ++ return -1; ++ lastGid = (gid_t)gid; ++ } else { + grent = getgrnam(thisGname); + if (grent == NULL) { +- /* XXX The filesystem package needs group/lock w/o getgrnam. */ +- if (rstreq(thisGname, "lock")) { +- *gid = lastGid = 54; +- return 0; +- } else +- if (rstreq(thisGname, "mail")) { +- *gid = lastGid = 12; +- return 0; +- } else +- return -1; ++ /* FIX: shrug */ ++ endgrent(); ++ grent = getgrnam(thisGname); ++ if (grent == NULL) { ++#ifdef STRANGE_FEDORA_HACKS ++ /* XXX The filesystem package needs group/lock w/o getgrnam. */ ++ if (rstreq(thisGname, "lock")) { ++ *gid = lastGid = 54; ++ return 0; ++ } else ++ if (rstreq(thisGname, "mail")) { ++ *gid = lastGid = 12; ++ return 0; ++ } else ++#endif ++ return -1; ++ } + } ++ lastGid = grent->gr_gid; + } +- lastGid = grent->gr_gid; + } + + *gid = lastGid; +@@ -117,6 +186,12 @@ static char * lastGname = NULL; + return 0; + } + ++int gnameToGid(const char * thisGname, gid_t * gid) ++{ ++ return gnameToGid_safe(thisGname, gid, 0); ++} ++ ++ + const char * uidToUname(uid_t uid) + { + static uid_t lastUid = (uid_t) -1; diff --git a/suspendlock.diff b/suspendlock.diff index 5b5f015..3346b01 100644 --- a/suspendlock.diff +++ b/suspendlock.diff @@ -5,64 +5,9 @@ locking. I hijacked the dbiSync function for this because I did not want to change the ABI. -Index: lib/psm.c -=================================================================== ---- lib/psm.c.orig -+++ lib/psm.c -@@ -756,6 +756,8 @@ static rpmRC runScript(rpmpsm psm, Heade - goto exit; - } - -+ rpmtsSuspendResumeDBLock(psm->ts, 0); -+ - xx = rpmsqFork(&psm->sq); - if (psm->sq.child == 0) { - rpmlog(RPMLOG_DEBUG, "%s: %s\texecv(%s) pid %d\n", -@@ -770,6 +772,8 @@ static rpmRC runScript(rpmpsm psm, Heade - - (void) psmWait(psm); - -+ rpmtsSuspendResumeDBLock(psm->ts, 1); -+ - if (psm->sq.reaped < 0) { - rpmlog(RPMLOG_ERR, _("%s scriptlet failed, waitpid(%d) rc %d: %s\n"), - sname, psm->sq.child, psm->sq.reaped, strerror(errno)); -Index: lib/rpmts.c -=================================================================== ---- lib/rpmts.c.orig -+++ lib/rpmts.c -@@ -108,6 +108,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) - return rc; - } - -+int rpmtsSuspendResumeDBLock(rpmts ts, int mode) -+{ -+ return rpmdbSuspendResumeDBLock(ts->rdb, mode); -+} -+ - int rpmtsInitDB(rpmts ts, int dbmode) - { - void *lock = rpmtsAcquireLock(ts); -Index: lib/rpmts.h -=================================================================== ---- lib/rpmts.h.orig -+++ lib/rpmts.h -@@ -472,6 +472,10 @@ rpmdb rpmtsGetRdb(rpmts ts); - */ - int rpmtsInitDSI(const rpmts ts); - -+int rpmtsSuspendResumeDBLock(rpmts ts, int mode) -+ /*@globals fileSystem @*/ -+ /*@modifies fileSystem @*/; -+ - /** \ingroup rpmts - * Update disk space info for a file. - * @param ts transaction set -Index: lib/backend/db3.c -=================================================================== ---- lib/backend/db3.c.orig -+++ lib/backend/db3.c -@@ -398,12 +398,18 @@ errxit: +--- ./lib/backend/db3.c.orig 2010-03-25 14:35:39.000000000 +0000 ++++ ./lib/backend/db3.c 2010-03-25 14:44:42.000000000 +0000 +@@ -208,11 +208,17 @@ errxit: return rc; } @@ -72,16 +17,15 @@ Index: lib/backend/db3.c { DB * db = dbi->dbi_db; int rc = 0; - int _printit; + if (flags == (unsigned int)-1) + return db3SuspendResumeLock(dbi, 0); + if (flags == (unsigned int)-2) + return db3SuspendResumeLock(dbi, 1); - if (db != NULL) + if (db != NULL) { rc = db->sync(db, flags); - /* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */ -@@ -1122,6 +1128,50 @@ static int db3open(rpmdb rpmdb, rpmTag r + rc = cvtdberr(dbi, "db->sync", rc, _debug); +@@ -848,6 +854,48 @@ static int db3open(rpmdb rpmdb, rpmTag r return rc; } @@ -97,8 +41,6 @@ Index: lib/backend/db3.c + return 0; + if (!(dbi->dbi_mode & (O_RDWR|O_WRONLY))) + return 0; -+ if ((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) -+ return 0; + if (dbi->dbi_use_dbenv && _lockdbfd == 0) + return 0; + if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0)) @@ -132,11 +74,29 @@ Index: lib/backend/db3.c /** \ingroup db3 */ RPM_GNUC_INTERNAL -Index: lib/rpmdb.c -=================================================================== ---- lib/rpmdb.c.orig -+++ lib/rpmdb.c -@@ -886,6 +886,21 @@ int rpmdbSync(rpmdb db) +--- ./lib/psm.c.orig 2010-03-25 14:43:29.000000000 +0000 ++++ ./lib/psm.c 2010-03-25 14:43:41.000000000 +0000 +@@ -754,6 +754,8 @@ static rpmRC runScript(rpmpsm psm, Heade + goto exit; + } + ++ rpmtsSuspendResumeDBLock(psm->ts, 0); ++ + xx = rpmsqFork(&psm->sq); + if (psm->sq.child == 0) { + rpmlog(RPMLOG_DEBUG, "%s: %s\texecv(%s) pid %d\n", +@@ -768,6 +770,8 @@ static rpmRC runScript(rpmpsm psm, Heade + + (void) psmWait(psm); + ++ rpmtsSuspendResumeDBLock(psm->ts, 1); ++ + if (psm->sq.reaped < 0) { + rpmlog(RPMLOG_ERR, _("%s scriptlet failed, waitpid(%d) rc %d: %s\n"), + sname, psm->sq.child, psm->sq.reaped, strerror(errno)); +--- ./lib/rpmdb.c.orig 2010-03-25 14:36:57.000000000 +0000 ++++ ./lib/rpmdb.c 2010-03-25 14:43:41.000000000 +0000 +@@ -903,6 +903,21 @@ int rpmdbSync(rpmdb db) return rc; } @@ -158,3 +118,30 @@ Index: lib/rpmdb.c /* FIX: dbTemplate structure assignment */ static rpmdb newRpmdb(const char * root, +--- ./lib/rpmts.c.orig 2009-12-17 09:05:37.000000000 +0000 ++++ ./lib/rpmts.c 2010-03-25 14:43:41.000000000 +0000 +@@ -89,6 +89,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) + return rc; + } + ++int rpmtsSuspendResumeDBLock(rpmts ts, int mode) ++{ ++ return rpmdbSuspendResumeDBLock(ts->rdb, mode); ++} ++ + int rpmtsInitDB(rpmts ts, int dbmode) + { + void *lock = rpmtsAcquireLock(ts); +--- ./lib/rpmts.h.orig 2009-12-17 09:05:37.000000000 +0000 ++++ ./lib/rpmts.h 2010-03-25 14:43:41.000000000 +0000 +@@ -469,6 +469,10 @@ rpmdb rpmtsGetRdb(rpmts ts); + void * rpmtsNotify(rpmts ts, rpmte te, + rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total); + ++int rpmtsSuspendResumeDBLock(rpmts ts, int mode) ++ /*@globals fileSystem @*/ ++ /*@modifies fileSystem @*/; ++ + /** \ingroup rpmts + * Return number of (ordered) transaction set elements. + * @param ts transaction set diff --git a/taggedfileindex.diff b/taggedfileindex.diff index b158377..52fe192 100644 --- a/taggedfileindex.diff +++ b/taggedfileindex.diff @@ -2,11 +2,9 @@ The taggedfileindex patch. Speeds up database searches, but breaks fingerprint semantics. rh#103204 -Index: lib/rpmdb.c -=================================================================== ---- lib/rpmdb.c.orig -+++ lib/rpmdb.c -@@ -1107,6 +1107,16 @@ int rpmdbVerify(const char * prefix) +--- ./lib/rpmdb.c.orig 2010-03-25 14:43:41.000000000 +0000 ++++ ./lib/rpmdb.c 2010-03-25 15:15:14.000000000 +0000 +@@ -1122,6 +1122,16 @@ int rpmdbVerify(const char * prefix) return rc; } @@ -23,7 +21,7 @@ Index: lib/rpmdb.c /** * Find file matches in database. * @param db rpm database -@@ -1169,6 +1179,11 @@ static int rpmdbFindByFile(rpmdb db, con +@@ -1181,6 +1191,11 @@ static int rpmdbFindByFile(rpmdb db, con if (rc == 0) (void) dbt2set(dbi, data, &allMatches); @@ -35,16 +33,16 @@ Index: lib/rpmdb.c xx = dbiCclose(dbi, dbcursor, 0); dbcursor = NULL; } else -@@ -2172,7 +2187,7 @@ void rpmdbSortIterator(rpmdbMatchIterato +@@ -2182,7 +2197,7 @@ void rpmdbSortIterator(rpmdbMatchIterato + } } - /* LCL: segfault */ -static int rpmdbGrowIterator(rpmdbMatchIterator mi) +static int rpmdbGrowIterator(rpmdbMatchIterator mi, unsigned int tag) { DBC * dbcursor; DBT * key; -@@ -2222,6 +2237,27 @@ static int rpmdbGrowIterator(rpmdbMatchI +@@ -2232,6 +2247,27 @@ static int rpmdbGrowIterator(rpmdbMatchI dbcursor = NULL; #endif @@ -72,7 +70,7 @@ Index: lib/rpmdb.c if (mi->mi_set == NULL) { mi->mi_set = set; } else { -@@ -2403,7 +2439,15 @@ int rpmdbExtendIterator(rpmdbMatchIterat +@@ -2413,7 +2449,15 @@ int rpmdbExtendIterator(rpmdbMatchIterat { mi->mi_key.data = (void *) keyp; mi->mi_key.size = keylen ? keylen : strlen(keyp); @@ -89,7 +87,7 @@ Index: lib/rpmdb.c } /* -@@ -2798,8 +2842,16 @@ int rpmdbAdd(rpmdb db, int iid, Header h +@@ -2808,8 +2852,16 @@ int rpmdbAdd(rpmdb db, int iid, Header h if (hdrNum) { @@ -106,7 +104,7 @@ Index: lib/rpmdb.c if (dbiTags.tags != NULL) for (dbix = 0; dbix < dbiTags.max; dbix++) { rpmTag rpmtag; -@@ -2891,6 +2943,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h +@@ -2901,6 +2953,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h */ i = rec->tagNum = rpmtdGetIndex(&tagdata); switch (rpmtag) { @@ -117,7 +115,7 @@ Index: lib/rpmdb.c case RPMTAG_REQUIRENAME: { /* Filter out install prerequisites. */ rpm_flag_t *rflag = rpmtdNextUint32(&reqflags); -@@ -2976,6 +3032,9 @@ cont: +@@ -2986,6 +3042,9 @@ cont: if (ret == 0) { headerSetInstance(h, hdrNum); } @@ -127,11 +125,9 @@ Index: lib/rpmdb.c } exit: -Index: lib/rpmdb_internal.h -=================================================================== ---- lib/rpmdb_internal.h.orig -+++ lib/rpmdb_internal.h -@@ -540,6 +540,9 @@ unsigned int dbiIndexRecordFileNumber(db +--- ./lib/rpmdb_internal.h.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/rpmdb_internal.h 2010-03-25 15:14:38.000000000 +0000 +@@ -542,6 +542,9 @@ const char *rpmdbHome(rpmdb db); int rpmdbExtendIterator(rpmdbMatchIterator mi, const void * keyp, size_t keylen); @@ -141,13 +137,11 @@ Index: lib/rpmdb_internal.h /** \ingroup rpmdb * sort the iterator by (recnum, filenum) * Return database iterator. -Index: lib/transaction.c -=================================================================== ---- lib/transaction.c.orig -+++ lib/transaction.c -@@ -609,9 +609,12 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( +--- ./lib/transaction.c.orig 2010-03-25 14:38:27.000000000 +0000 ++++ ./lib/transaction.c 2010-03-25 15:14:38.000000000 +0000 +@@ -848,9 +848,12 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( rpmdbMatchIterator mi; - int i, xx; + int xx; const char * baseName; + const char * dirName; @@ -158,8 +152,8 @@ Index: lib/transaction.c mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMTAG_BASENAMES, NULL, 0); -@@ -629,18 +632,25 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( - while ((i = rpmfiNext(fi)) >= 0) { +@@ -868,18 +871,25 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( + while (rpmfiNext(fi) >= 0) { size_t keylen; baseName = rpmfiBN(fi); + dirName = rpmfiDN(fi); diff --git a/waitlock.diff b/waitlock.diff index d60a798..d794d21 100644 --- a/waitlock.diff +++ b/waitlock.diff @@ -1,10 +1,9 @@ Fix global (DB_PRIVATE) lock code: fix recursion counter, retry failed lock operations for up to 3 minutes. -Index: lib/backend/db3.c -=================================================================== ---- lib/backend/db3.c.orig -+++ lib/backend/db3.c -@@ -586,6 +586,8 @@ static int db3stat(dbiIndex dbi, unsigne + +--- ./lib/backend/db3.c.orig 2010-03-25 14:44:42.000000000 +0000 ++++ ./lib/backend/db3.c 2010-03-25 14:52:05.000000000 +0000 +@@ -394,6 +394,8 @@ static int db3stat(dbiIndex dbi, unsigne return rc; } @@ -13,18 +12,17 @@ Index: lib/backend/db3.c static int db3close(dbiIndex dbi, unsigned int flags) { rpmdb rpmdb = dbi->dbi_rpmdb; -@@ -632,6 +634,10 @@ static int db3close(dbiIndex dbi, unsign +@@ -414,6 +416,9 @@ static int db3close(dbiIndex dbi, unsign rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n", - dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag))); + dbhome, dbi->dbi_file); + if (dbi->dbi_lockdbfd && -+ !((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) && + _lockdbfd) + _lockdbfd--; } if (rpmdb->db_dbenv != NULL && dbi->dbi_use_dbenv) { -@@ -899,8 +905,6 @@ static int db3open(rpmdb rpmdb, rpmTag r +@@ -645,8 +651,6 @@ static int db3open(rpmdb rpmdb, rpmTag r } if (rc == 0) { @@ -33,7 +31,7 @@ Index: lib/backend/db3.c rc = db_create(&db, dbenv, dbi->dbi_cflags); rc = cvtdberr(dbi, "db_create", rc, _debug); if (rc == 0 && db != NULL) { -@@ -1082,6 +1086,7 @@ static int db3open(rpmdb rpmdb, rpmTag r +@@ -810,6 +814,7 @@ static int db3open(rpmdb rpmdb, rpmTag r if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) { rc = 1; } else { @@ -41,7 +39,7 @@ Index: lib/backend/db3.c struct flock l; memset(&l, 0, sizeof(l)); l.l_whence = 0; -@@ -1091,24 +1096,40 @@ static int db3open(rpmdb rpmdb, rpmTag r +@@ -819,24 +824,39 @@ static int db3open(rpmdb rpmdb, rpmTag r ? F_RDLCK : F_WRLCK; l.l_pid = 0; @@ -49,27 +47,29 @@ Index: lib/backend/db3.c - if (rc) { - /* Warning iff using non-private CDB locking. */ - rc = ((dbi->dbi_use_dbenv && -+ for (tries = 0; ; tries++) { -+ rc = fcntl(fdno, F_SETLK, (void *) &l); -+ if (rc) { -+ rc = ((dbi->dbi_use_dbenv && - (dbi->dbi_eflags & DB_INIT_CDB) && - !(dbi->dbi_eflags & DB_PRIVATE)) +- (dbi->dbi_eflags & DB_INIT_CDB) && +- !(dbi->dbi_eflags & DB_PRIVATE)) - ? 0 : 1); - rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), - _("cannot get %s lock on %s/%s\n"), - ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY) - ? _("shared") : _("exclusive"), -- dbhome, (dbfile ? dbfile : "")); -- } else if (dbfile) { +- dbhome, dbi->dbi_file); +- } else { - rpmlog(RPMLOG_DEBUG, - "locked db index %s/%s\n", -- dbhome, dbfile); +- dbhome, dbi->dbi_file); ++ for (tries = 0; ; tries++) { ++ rc = fcntl(fdno, F_SETLK, (void *) &l); ++ if (rc) { ++ rc = ((dbi->dbi_use_dbenv && ++ (dbi->dbi_eflags & DB_INIT_CDB) && ++ !(dbi->dbi_eflags & DB_PRIVATE)) + ? 0 : 1); + if (errno == EAGAIN && rc) { + struct timespec ts; + if (tries == 0) -+ rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, (dbfile ? dbfile : "")); ++ rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, dbi->dbi_file); + ts.tv_sec = (time_t)0; + ts.tv_nsec = 100000000; + if (tries < 10*60*3) { @@ -81,14 +81,13 @@ Index: lib/backend/db3.c + _("cannot get %s lock on %s/%s\n"), + ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY) + ? _("shared") : _("exclusive"), -+ dbhome, (dbfile ? dbfile : "")); -+ } else if (dbfile) { ++ dbhome, dbi->dbi_file); ++ } else { + rpmlog(RPMLOG_DEBUG, + "locked db index %s/%s\n", -+ dbhome, dbfile); -+ break; ++ dbhome, dbi->dbi_file); + } -+ ++ break; } } + if (rc && dbi->dbi_use_dbenv) diff --git a/weakdeps.diff b/weakdeps.diff index 179f088..22bd9bc 100644 --- a/weakdeps.diff +++ b/weakdeps.diff @@ -14,11 +14,9 @@ B) use RPMSENSE_STRONG to support a "strong" version, "Recommends" Needs extcond.diff for query operations. -Index: build/parsePreamble.c -=================================================================== ---- build/parsePreamble.c.orig -+++ build/parsePreamble.c -@@ -122,6 +122,8 @@ static struct tokenBits_s const installS +--- ./build/parsePreamble.c.orig 2009-12-17 09:05:55.000000000 +0000 ++++ ./build/parsePreamble.c 2010-03-25 14:56:24.000000000 +0000 +@@ -124,6 +124,8 @@ static struct tokenBits_s const installS { "post", RPMSENSE_SCRIPT_POST }, { "rpmlib", RPMSENSE_RPMLIB }, { "verify", RPMSENSE_SCRIPT_VERIFY }, @@ -27,7 +25,7 @@ Index: build/parsePreamble.c { NULL, 0 } }; -@@ -132,6 +134,8 @@ static const struct tokenBits_s const bu +@@ -134,6 +136,8 @@ static const struct tokenBits_s const bu { "build", RPMSENSE_SCRIPT_BUILD }, { "install", RPMSENSE_SCRIPT_INSTALL }, { "clean", RPMSENSE_SCRIPT_CLEAN }, @@ -36,7 +34,7 @@ Index: build/parsePreamble.c { NULL, 0 } }; -@@ -637,6 +641,18 @@ static int handlePreambleTag(rpmSpec spe +@@ -649,6 +653,18 @@ static int handlePreambleTag(rpmSpec spe if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) return rc; break; @@ -55,26 +53,24 @@ Index: build/parsePreamble.c case RPMTAG_EXCLUDEARCH: case RPMTAG_EXCLUSIVEARCH: case RPMTAG_EXCLUDEOS: -@@ -734,6 +750,14 @@ static struct PreambleRec_s preambleList - {RPMTAG_AUTOPROV, 0, 0, 0, "autoprov"}, - {RPMTAG_DOCDIR, 0, 0, 0, "docdir"}, - {RPMTAG_DISTTAG, 0, 0, 0, "disttag"}, -+ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "recommends"}, -+ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "suggests"}, -+ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "supplements"}, -+ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "enhances"}, -+ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildrecommends"}, -+ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildsuggests"}, -+ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildsupplements"}, -+ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildenhances"}, - /* LCL: can't add null annotation */ - {0, 0, 0, 0, 0} +@@ -748,6 +764,14 @@ static struct PreambleRec_s const preamb + {RPMTAG_DOCDIR, 0, 0, LEN_AND_STR("docdir")}, + {RPMTAG_DISTTAG, 0, 0, LEN_AND_STR("disttag")}, + {RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")}, ++ {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("recommends")}, ++ {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("suggests")}, ++ {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("supplements")}, ++ {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("enhances")}, ++ {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildrecommends")}, ++ {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildsuggests")}, ++ {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildsupplements")}, ++ {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildenhances")}, + {0, 0, 0, 0} }; -Index: build/parseReqs.c -=================================================================== ---- build/parseReqs.c.orig -+++ build/parseReqs.c -@@ -84,6 +84,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p + +--- ./build/parseReqs.c.orig 2009-12-17 09:05:55.000000000 +0000 ++++ ./build/parseReqs.c 2010-03-25 14:53:47.000000000 +0000 +@@ -85,6 +85,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p tagflags |= RPMSENSE_ANY; h = spec->buildRestrictions; break; @@ -89,11 +85,9 @@ Index: build/parseReqs.c default: case RPMTAG_REQUIREFLAGS: tagflags |= RPMSENSE_ANY; -Index: build/reqprov.c -=================================================================== ---- build/reqprov.c.orig -+++ build/reqprov.c -@@ -43,6 +43,16 @@ int addReqProv(rpmSpec spec, Header h, r +--- ./build/reqprov.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./build/reqprov.c 2010-03-25 14:53:47.000000000 +0000 +@@ -75,6 +75,16 @@ int addReqProv(rpmSpec spec, Header h, r flagtag = RPMTAG_TRIGGERFLAGS; indextag = RPMTAG_TRIGGERINDEX; extra = Flags & RPMSENSE_TRIGGER; @@ -110,11 +104,9 @@ Index: build/reqprov.c } else { nametag = RPMTAG_REQUIRENAME; versiontag = RPMTAG_REQUIREVERSION; -Index: build/rpmfc.c -=================================================================== ---- build/rpmfc.c.orig -+++ build/rpmfc.c -@@ -1377,6 +1377,12 @@ static struct DepMsg_s depMsgs[] = { +--- ./build/rpmfc.c.orig 2009-12-09 13:37:25.000000000 +0000 ++++ ./build/rpmfc.c 2010-03-25 14:53:47.000000000 +0000 +@@ -1405,6 +1405,12 @@ static struct DepMsg_s depMsgs[] = { { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, 0, -1 }, @@ -127,7 +119,7 @@ Index: build/rpmfc.c { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } }; -@@ -1467,6 +1473,14 @@ static int rpmfcGenerateDependsHelper(co +@@ -1490,6 +1496,14 @@ static int rpmfcGenerateDependsHelper(co failnonzero = 0; tagflags = RPMSENSE_FIND_REQUIRES; break; @@ -142,66 +134,9 @@ Index: build/rpmfc.c default: continue; break; -Index: python/rpmmodule.c -=================================================================== ---- python/rpmmodule.c.orig -+++ python/rpmmodule.c -@@ -387,7 +387,7 @@ void init_rpm(void) - REGISTER_ENUM(RPMSENSE_RPMLIB); - REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); - REGISTER_ENUM(RPMSENSE_KEYRING); -- REGISTER_ENUM(RPMSENSE_PATCHES); -+ REGISTER_ENUM(RPMSENSE_STRONG); - REGISTER_ENUM(RPMSENSE_CONFIG); - - REGISTER_ENUM(RPMTRANS_FLAG_TEST); -Index: lib/rpmds.c -=================================================================== ---- lib/rpmds.c.orig -+++ lib/rpmds.c -@@ -73,6 +73,10 @@ static int dsType(rpmTag tag, - t = "Trigger"; - evr = RPMTAG_TRIGGERVERSION; - f = RPMTAG_TRIGGERFLAGS; -+ } else if (tag == RPMTAG_ENHANCESNAME) { -+ t = "Enhances"; -+ evr = RPMTAG_ENHANCESVERSION; -+ f = RPMTAG_ENHANCESFLAGS; - } else { - rc = 1; - } -Index: rpmpopt.in -=================================================================== ---- rpmpopt.in.orig -+++ rpmpopt.in -@@ -65,6 +65,22 @@ rpm alias --requires --qf \ - --POPTdesc=$"list capabilities required by package(s)" - rpm alias -R --requires - -+rpm alias --suggests --qf \ -+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package suggests" -+ -+rpm alias --recommends --qf \ -+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package recommends" -+ -+rpm alias --enhances --qf \ -+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package enhances" -+ -+rpm alias --supplements --qf \ -+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ -+ --POPTdesc=$"list capabilities this package supplements" -+ - 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\ -Index: lib/formats.c -=================================================================== ---- lib/formats.c.orig -+++ lib/formats.c -@@ -601,6 +601,25 @@ static char * depflagsFormat(rpmtd td, c +--- ./lib/formats.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/formats.c 2010-03-25 15:00:15.000000000 +0000 +@@ -601,6 +601,24 @@ static char * depflagsFormat(rpmtd td, c return val; } @@ -220,24 +155,34 @@ Index: lib/formats.c + strcat(formatPrefix, "s"); + rasprintf(&val, formatPrefix, buf); + } -+ + return val; +} + /** * Return tag container array size. * @param td tag data container -@@ -661,5 +680,6 @@ static const struct headerFormatFunc_s r - { RPMTD_FORMAT_DAY, "day", dayFormat }, - { RPMTD_FORMAT_SHESCAPE, "shescape", shescapeFormat }, +@@ -738,5 +756,6 @@ static const struct headerFormatFunc_s r { RPMTD_FORMAT_ARRAYSIZE, "arraysize", arraysizeFormat }, -+ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", { depflag_strongFormat } }, + { RPMTD_FORMAT_FSTATE, "fstate", fstateFormat }, + { RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat }, ++ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", depflag_strongFormat }, { -1, NULL, NULL } }; -Index: lib/rpmds.h -=================================================================== ---- lib/rpmds.h.orig -+++ lib/rpmds.h +--- ./lib/rpmds.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/rpmds.c 2010-03-25 14:53:47.000000000 +0000 +@@ -66,6 +66,10 @@ static int dsType(rpmTag tag, + t = "Trigger"; + evr = RPMTAG_TRIGGERVERSION; + f = RPMTAG_TRIGGERFLAGS; ++ } else if (tag == RPMTAG_ENHANCESNAME) { ++ t = "Enhances"; ++ evr = RPMTAG_ENHANCESVERSION; ++ f = RPMTAG_ENHANCESFLAGS; + } else { + rc = 1; + } +--- ./lib/rpmds.h.orig 2010-03-24 16:47:28.000000000 +0000 ++++ ./lib/rpmds.h 2010-03-25 14:53:47.000000000 +0000 @@ -55,7 +55,7 @@ typedef enum rpmsenseFlags_e { RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ @@ -255,22 +200,8 @@ Index: lib/rpmds.h RPMSENSE_SCRIPT_PREP | \ RPMSENSE_SCRIPT_BUILD | \ RPMSENSE_SCRIPT_INSTALL | \ -Index: lib/rpmtd.h -=================================================================== ---- lib/rpmtd.h.orig -+++ lib/rpmtd.h -@@ -214,6 +214,7 @@ typedef enum rpmtdFormats_e { - RPMTD_FORMAT_SHESCAPE = 13, /* shell escaped (any type) */ - RPMTD_FORMAT_ARRAYSIZE = 14, /* size of contained array (any type) */ - RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int32 types) */ -+ RPMTD_FORMAT_DEPFLAG_STRONG = 16, /* strong dependency */ - } rpmtdFormats; - - /** \ingroup rpmtd -Index: lib/rpmtag.h -=================================================================== ---- lib/rpmtag.h.orig -+++ lib/rpmtag.h +--- ./lib/rpmtag.h.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/rpmtag.h 2010-03-25 14:53:47.000000000 +0000 @@ -228,14 +228,14 @@ typedef enum rpmTag_e { RPMTAG_PRETRANSPROG = 1153, /* s */ RPMTAG_POSTTRANSPROG = 1154, /* s */ @@ -294,3 +225,49 @@ Index: lib/rpmtag.h RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ RPMTAG_CVSID = 1163, /* s (unimplemented) */ #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ +--- ./lib/rpmtd.h.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./lib/rpmtd.h 2010-03-25 14:58:31.000000000 +0000 +@@ -216,6 +216,7 @@ typedef enum rpmtdFormats_e { + RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int types) */ + RPMTD_FORMAT_FSTATE = 16, /* file states (int types) */ + RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int types) */ ++ RPMTD_FORMAT_DEPFLAG_STRONG = 18, /* strong dependency */ + } rpmtdFormats; + + /** \ingroup rpmtd +--- ./python/rpmmodule.c.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./python/rpmmodule.c 2010-03-25 14:53:47.000000000 +0000 +@@ -373,7 +373,7 @@ static int initModule(PyObject *m) + REGISTER_ENUM(RPMSENSE_RPMLIB); + REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); + REGISTER_ENUM(RPMSENSE_KEYRING); +- REGISTER_ENUM(RPMSENSE_PATCHES); ++ REGISTER_ENUM(RPMSENSE_STRONG); + REGISTER_ENUM(RPMSENSE_CONFIG); + + REGISTER_ENUM(RPMTRANS_FLAG_TEST); +--- ./rpmpopt.in.orig 2009-12-07 14:36:49.000000000 +0000 ++++ ./rpmpopt.in 2010-03-25 14:53:47.000000000 +0000 +@@ -65,6 +65,22 @@ rpm alias --requires --qf \ + --POPTdesc=$"list capabilities required by package(s)" + rpm alias -R --requires + ++rpm alias --suggests --qf \ ++ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package suggests" ++ ++rpm alias --recommends --qf \ ++ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package recommends" ++ ++rpm alias --enhances --qf \ ++ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package enhances" ++ ++rpm alias --supplements --qf \ ++ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ ++ --POPTdesc=$"list capabilities this package supplements" ++ + 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\ From b4494b17adbbd85a031b4af002f4a4bc49002d38e269c990c53ca96f583c647a Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 13 Apr 2010 19:06:36 +0000 Subject: [PATCH 094/137] Accepting request 37534 from Base:System Copy from Base:System/rpm based on submit request 37534 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/37534 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=96 --- backport.diff | 55 ++++++++++++++++++++++++++++++++++++ fontprovides.diff | 64 +++++++++++++++++++++++++++++++++++++++++ noprereqdeprec.diff | 20 +++++++++++++ nosignature.diff | 23 +++++++++++++++ nosource.diff | 36 +++++++++++++++++++++++ pythondeps.diff | 69 +++++++++++++++++++++++++++++++++++++++++++++ resetdefattr.diff | 55 ++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 20 +++++++++++++ rpm.spec | 12 ++++++-- rpmconfigcheck | 6 +++- tarrecordsize.diff | 17 +++++++++++ 12 files changed, 375 insertions(+), 4 deletions(-) create mode 100644 backport.diff create mode 100644 fontprovides.diff create mode 100644 noprereqdeprec.diff create mode 100644 nosignature.diff create mode 100644 nosource.diff create mode 100644 pythondeps.diff create mode 100644 resetdefattr.diff create mode 100644 tarrecordsize.diff diff --git a/backport.diff b/backport.diff new file mode 100644 index 0000000..734f84f --- /dev/null +++ b/backport.diff @@ -0,0 +1,55 @@ +A couple of fixes picked from upstream. + +--- ./lib/rpminstall.c.orig 2010-04-08 12:35:48.000000000 +0000 ++++ ./lib/rpminstall.c 2010-04-08 12:36:00.000000000 +0000 +@@ -458,7 +458,7 @@ restart: + case URL_IS_HTTPS: + case URL_IS_HTTP: + case URL_IS_FTP: +- { char *tfn; ++ { char *tfn = NULL; + FD_t tfd; + + if (rpmIsVerbose()) +--- ./lib/transaction.c.orig 2010-04-08 12:33:22.000000000 +0000 ++++ ./lib/transaction.c 2010-04-08 12:35:00.000000000 +0000 +@@ -183,6 +183,10 @@ static void rpmtsUpdateDSI(const rpmts t + + if (fixupSize) + dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize); ++ ++ /* adjust bookkeeping when requirements shrink */ ++ if (dsi->bneeded < dsi->obneeded) dsi->obneeded = dsi->bneeded; ++ if (dsi->ineeded < dsi->oineeded) dsi->oineeded = dsi->ineeded; + } + + static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi) +@@ -231,7 +235,7 @@ static void rpmtsCheckDSIProblems(const + for (; dsi->bsize; dsi++) { + + if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) { +- if (dsi->bneeded != dsi->obneeded) { ++ if (dsi->bneeded > dsi->obneeded) { + if (!dsi->mntPoint) + rpmtsFindDSIMount(ts, dsi); + rpmpsAppend(ps, RPMPROB_DISKSPACE, +@@ -243,7 +247,7 @@ static void rpmtsCheckDSIProblems(const + } + + if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { +- if (dsi->ineeded != dsi->oineeded) { ++ if (dsi->ineeded > dsi->oineeded) { + if (!dsi->mntPoint) + rpmtsFindDSIMount(ts, dsi); + rpmpsAppend(ps, RPMPROB_DISKNODES, +--- ./lib/verify.c.orig 2010-04-08 12:36:09.000000000 +0000 ++++ ./lib/verify.c 2010-04-08 12:37:37.000000000 +0000 +@@ -348,7 +348,7 @@ static int verifyHeader(QVA_t qva, const + static const char *const aok = "."; + static const char *const unknown = "?"; + +- ec = (verifyResult != 0); ++ if (verifyResult) ec = 1; + + #define _verify(_RPMVERIFY_F, _C) \ + ((verifyResult & _RPMVERIFY_F) ? _C : aok) diff --git a/fontprovides.diff b/fontprovides.diff new file mode 100644 index 0000000..70d7537 --- /dev/null +++ b/fontprovides.diff @@ -0,0 +1,64 @@ +--- ./autodeps/linux.prov.orig 2010-04-08 14:52:42.000000000 +0000 ++++ ./autodeps/linux.prov 2010-04-08 15:04:37.000000000 +0000 +@@ -16,6 +16,8 @@ tcllist= + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) + firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) ++pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$')) ++fontlist=($(printf "%s\n" "${filelist[@]}" | egrep -i "/usr/share/fonts/.*\.(ttf|otf|pfa)$")) + + # + # --- Alpha does not mark 64bit dependencies +@@ -86,6 +88,16 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo + fi + + # ++# --- pkgconfig provides ++[ -x /usr/lib/rpm/pkgconfigdeps.sh -a -n "$pkgconfiglist" ] && ++ printf "%s\n" "${pkgconfiglist[@]}" | /usr/lib/rpm/pkgconfigdeps.sh -P | sort -u ++ ++# ++# --- font provides ++[ -x /usr/lib/rpm/fontconfig.prov -a -n "$fontlist" ] && ++ printf "%s\n" "${fontlist[@]}" | /usr/lib/rpm/fontconfig.prov | sort -u ++ ++# + # --- Kernel module exported symbols + [ -x /usr/lib/rpm/find-provides.ksyms ] && + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" +--- ./autodeps/linux.req.orig 2010-04-08 15:01:18.000000000 +0000 ++++ ./autodeps/linux.req 2010-04-08 15:04:20.000000000 +0000 +@@ -35,6 +35,7 @@ perllist=() + pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) + tcllist=() + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) ++pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$')) + + # + # --- Alpha does not mark 64bit dependencies +@@ -144,6 +145,11 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo + fi + + # ++# --- pkgconfig requires ++[ -x /usr/lib/rpm/pkgconfigdeps.sh -a -n "$pkgconfiglist" ] && ++ printf "%s\n" "${pkgconfiglist[@]}" | /usr/lib/rpm/pkgconfigdeps.sh -R | sort -u ++ ++# + # --- Kernel module imported symbols + [ -x ${0%/*}/find-requires.ksyms ] && + printf "%s\n" "${filelist[@]}" | ${0%/*}/find-requires.ksyms "$@" +--- ./scripts/fontconfig.prov.orig 2010-04-08 14:57:21.000000000 +0000 ++++ ./scripts/fontconfig.prov 2010-04-08 14:57:42.000000000 +0000 +@@ -12,7 +12,10 @@ + + fcquery=/usr/bin/fc-query + +-[ -x $fcquery ] || exit 0 ++[ -x $fcquery ] || { ++ cat > /dev/null ++ exit 0 ++} + + # filter out anything outside main fontconfig path + grep /usr/share/fonts/ | diff --git a/noprereqdeprec.diff b/noprereqdeprec.diff new file mode 100644 index 0000000..7ac25c2 --- /dev/null +++ b/noprereqdeprec.diff @@ -0,0 +1,20 @@ +--- ./build/parsePreamble.c.orig 2010-04-07 14:52:57.000000000 +0000 ++++ ./build/parsePreamble.c 2010-04-07 14:53:51.000000000 +0000 +@@ -748,7 +748,7 @@ static struct PreambleRec_s const preamb + {RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")}, + {RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")}, + {RPMTAG_REQUIREFLAGS, 1, 0, LEN_AND_STR("requires")}, +- {RPMTAG_PREREQ, 1, 1, LEN_AND_STR("prereq")}, ++ {RPMTAG_PREREQ, 1, 0, LEN_AND_STR("prereq")}, + {RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")}, + {RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")}, + {RPMTAG_PREFIXES, 0, 0, LEN_AND_STR("prefixes")}, +@@ -757,7 +757,7 @@ static struct PreambleRec_s const preamb + {RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarchitectures")}, + {RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarch")}, + {RPMTAG_BUILDCONFLICTS, 0, 0, LEN_AND_STR("buildconflicts")}, +- {RPMTAG_BUILDPREREQ, 1, 1, LEN_AND_STR("buildprereq")}, ++ {RPMTAG_BUILDPREREQ, 1, 0, LEN_AND_STR("buildprereq")}, + {RPMTAG_BUILDREQUIRES, 1, 0, LEN_AND_STR("buildrequires")}, + {RPMTAG_AUTOREQPROV, 0, 0, LEN_AND_STR("autoreqprov")}, + {RPMTAG_AUTOREQ, 0, 0, LEN_AND_STR("autoreq")}, diff --git a/nosignature.diff b/nosignature.diff new file mode 100644 index 0000000..0802056 --- /dev/null +++ b/nosignature.diff @@ -0,0 +1,23 @@ +Do not load keyring if signature checking is disabled. + +--- ./lib/package.c.orig 2010-04-09 09:56:42.000000000 +0000 ++++ ./lib/package.c 2010-04-09 09:57:50.000000000 +0000 +@@ -760,12 +760,16 @@ exit: + rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) + { + rpmRC rc; +- rpmKeyring keyring = rpmtsGetKeyring(ts, 1); + rpmVSFlags vsflags = rpmtsVSFlags(ts); ++ rpmKeyring keyring = 0; ++ ++ if ((vsflags & _RPMVSF_NOSIGNATURES) != _RPMVSF_NOSIGNATURES) ++ keyring = rpmtsGetKeyring(ts, 1); + + rc = rpmpkgRead(keyring, vsflags, fd, fn, hdrp); + +- rpmKeyringFree(keyring); ++ if (keyring) ++ rpmKeyringFree(keyring); + return rc; + } + diff --git a/nosource.diff b/nosource.diff new file mode 100644 index 0000000..e824db0 --- /dev/null +++ b/nosource.diff @@ -0,0 +1,36 @@ +rpm does not allow headerPutUint32 on internal tags, so use +headerPut instead. (Maybe NOSOURCE/NOPATCH should not be internal +at all, though.) + +--- ./build/files.c.orig 2010-04-08 16:23:42.000000000 +0000 ++++ ./build/files.c 2010-04-08 16:23:44.000000000 +0000 +@@ -2088,15 +2088,25 @@ int processSourceFiles(rpmSpec spec) + if (srcPtr->flags & RPMBUILD_ISSOURCE) { + headerPutString(spec->sourceHeader, RPMTAG_SOURCE, srcPtr->source); + if (srcPtr->flags & RPMBUILD_ISNO) { +- headerPutUint32(spec->sourceHeader, RPMTAG_NOSOURCE, +- &srcPtr->num, 1); ++ struct rpmtd_s td; ++ rpmtdReset(&td); ++ td.tag = RPMTAG_NOSOURCE; ++ td.type = RPM_INT32_TYPE; ++ td.data = &srcPtr->num; ++ td.count = 1; ++ headerPut(spec->sourceHeader, &td, HEADERPUT_APPEND); + } + } + if (srcPtr->flags & RPMBUILD_ISPATCH) { + headerPutString(spec->sourceHeader, RPMTAG_PATCH, srcPtr->source); + if (srcPtr->flags & RPMBUILD_ISNO) { +- headerPutUint32(spec->sourceHeader, RPMTAG_NOSOURCE, +- &srcPtr->num, 1); ++ struct rpmtd_s td; ++ rpmtdReset(&td); ++ td.tag = RPMTAG_NOPATCH; ++ td.type = RPM_INT32_TYPE; ++ td.data = &srcPtr->num; ++ td.count = 1; ++ headerPut(spec->sourceHeader, &td, HEADERPUT_APPEND); + } + } + diff --git a/pythondeps.diff b/pythondeps.diff new file mode 100644 index 0000000..6f07ea7 --- /dev/null +++ b/pythondeps.diff @@ -0,0 +1,69 @@ +--- ./autodeps/linux.prov.orig 2010-04-08 13:32:56.000000000 +0000 ++++ ./autodeps/linux.prov 2010-04-08 13:38:44.000000000 +0000 +@@ -11,7 +11,7 @@ filelist=($(printf "%s\n" "${filelist[@] + solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \ + tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \ + cut -d: -f1)) +-pythonlist= ++pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/bin/python.\..$')) + tcllist= + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) +@@ -55,8 +55,8 @@ done | sort -u + + # + # --- Python modules. +-[ -x /usr/lib/rpm/python.prov -a -n "$pythonlist" ] && +- printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.prov | sort -u ++[ -x /usr/lib/rpm/pythondeps.sh -a -n "$pythonlist" ] && ++ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/pythondeps.sh -P | sort -u + + # + # --- Tcl modules. +--- ./autodeps/linux.req.orig 2010-04-08 13:36:47.000000000 +0000 ++++ ./autodeps/linux.req 2010-04-08 13:40:25.000000000 +0000 +@@ -32,7 +32,7 @@ liblist=($(printf "%s\0" "${filelist[@]} + + interplist=() + perllist=() +-pythonlist=() ++pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) + tcllist=() + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) + +@@ -128,8 +128,8 @@ done | sort -u + + # + # --- Python modules. +-[ -x /usr/lib/rpm/python.req -a -n "$pythonlist" ] && \ +- printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.req | sort -u ++[ -x /usr/lib/rpm/pythondeps.sh -a -n "$pythonlist" ] && \ ++ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/pythondeps.sh -R | sort -u + + # + # --- Tcl modules. +--- ./scripts/pythondeps.sh.orig 2010-04-08 13:40:34.000000000 +0000 ++++ ./scripts/pythondeps.sh 2010-04-08 13:42:19.000000000 +0000 +@@ -5,17 +5,17 @@ + exit 0 + } + +-PYVER=`python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v"` + case $1 in + -P|--provides) + shift +- grep "/usr/bin/python\*\$" >& /dev/null && echo "python(abi) = ${PYVER}" +- exit 0 ++ grep "/usr/bin/python.\..$" \ ++ | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|" + ;; + -R|--requires) + shift +- grep "/usr/lib[^/]*/python${PYVER}/" >& /dev/null && echo "python(abi) = ${PYVER}" +- exit 0 ++ grep "/usr/lib[^/]*/python.\../.*" \ ++ | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \ ++ | sort | uniq + ;; + esac + diff --git a/resetdefattr.diff b/resetdefattr.diff new file mode 100644 index 0000000..0e2a892 --- /dev/null +++ b/resetdefattr.diff @@ -0,0 +1,55 @@ +--- ./build/files.c.orig 2010-04-07 14:27:54.000000000 +0000 ++++ ./build/files.c 2010-04-07 14:51:11.000000000 +0000 +@@ -561,8 +561,13 @@ static rpmRC parseForAttr(const char * b + } + ar->ar_fmode = ui; + } else { +- ar->ar_fmodestr = fl->def_ar.ar_fmodestr; +- ar->ar_fmode = fl->def_ar.ar_fmode; ++ if (ret_ar == &(fl->def_ar)) { ++ ar->ar_fmodestr = NULL; ++ ar->ar_fmode = 0; ++ } else { ++ ar->ar_fmodestr = fl->def_ar.ar_fmodestr; ++ ar->ar_fmode = fl->def_ar.ar_fmode; ++ } + } + + if (ar->ar_dmodestr && !isAttrDefault(ar->ar_dmodestr)) { +@@ -574,15 +579,30 @@ static rpmRC parseForAttr(const char * b + } + ar->ar_dmode = ui; + } else { +- ar->ar_dmodestr = fl->def_ar.ar_dmodestr; +- ar->ar_dmode = fl->def_ar.ar_dmode; ++ if (ret_ar == &(fl->def_ar)) { ++ ar->ar_dmodestr = NULL; ++ ar->ar_dmode = 0; ++ } else { ++ ar->ar_dmodestr = fl->def_ar.ar_dmodestr; ++ ar->ar_dmode = fl->def_ar.ar_dmode; ++ } + } + +- if (!(ar->ar_user && !isAttrDefault(ar->ar_user))) +- ar->ar_user = fl->def_ar.ar_user; ++ if (!(ar->ar_user && !isAttrDefault(ar->ar_user))) { ++ if (ret_ar == &(fl->def_ar)) { ++ ar->ar_user = NULL; ++ } else { ++ ar->ar_user = fl->def_ar.ar_user; ++ } ++ } + +- if (!(ar->ar_group && !isAttrDefault(ar->ar_group))) +- ar->ar_group = fl->def_ar.ar_group; ++ if (!(ar->ar_group && !isAttrDefault(ar->ar_group))) { ++ if (ret_ar == &(fl->def_ar)) { ++ ar->ar_group = 0; ++ } else { ++ ar->ar_group = fl->def_ar.ar_group; ++ } ++ } + + dupAttrRec(ar, ret_ar); + diff --git a/rpm-python.spec b/rpm-python.spec index 99636b0..b4b29ad 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 1 +Release: 2 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 364a858..91e629b 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Apr 9 12:00:29 CEST 2010 - mls@suse.de + +- do not load keyring if signature checking is disabled [bnc#554552] +- fix nosource/nopatch srpm tag generation + +------------------------------------------------------------------- +Thu Apr 8 17:11:08 CEST 2010 - mls@suse.de + +- backport some fixes from upstream +- add generation of python/font/pkgconfig dependencies + +------------------------------------------------------------------- +Wed Apr 7 16:59:58 CEST 2010 - mls@suse.de + +- work around spurious tar message [bnc#558475] +- fix defattr reset bug [bnc#594310] +- make 'rpmconfigcheck status' exit with 4 [bnc#592269] +- don't consider prereq deprecated for now + ------------------------------------------------------------------- Fri Mar 26 16:29:36 CET 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index fbfaa90..50db57e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 1 +Release: 2 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -105,6 +105,14 @@ Patch68: rpmdb-no-svc.diff Patch69: modemuncher.diff Patch70: repackage-nomd5.diff Patch71: safeugid.diff +Patch72: resetdefattr.diff +Patch73: noprereqdeprec.diff +Patch74: tarrecordsize.diff +Patch75: backport.diff +Patch76: pythondeps.diff +Patch77: fontprovides.diff +Patch78: nosource.diff +Patch79: nosignature.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -165,7 +173,7 @@ rm -f rpmdb/db.h %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 +%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov diff --git a/rpmconfigcheck b/rpmconfigcheck index a4eeb48..7699148 100644 --- a/rpmconfigcheck +++ b/rpmconfigcheck @@ -66,7 +66,11 @@ case "$1" in rm -f $configcheckfile.old $configcheckfile.dup $configcheckfile.new fi ;; - stop|status) + stop) + ;; + status) + rc_failed 4 + rc_status -v ;; *) echo "Usage: $0 {start}" diff --git a/tarrecordsize.diff b/tarrecordsize.diff new file mode 100644 index 0000000..7b79d61 --- /dev/null +++ b/tarrecordsize.diff @@ -0,0 +1,17 @@ +--- ./build.c.orig 2010-04-07 14:56:36.000000000 +0000 ++++ ./build.c 2010-04-07 14:58:52.000000000 +0000 +@@ -126,7 +126,13 @@ static char * getTarSpec(const char *arg + if (!(fp = popen(cmd, "r"))) { + rpmlog(RPMLOG_ERR, _("Failed to open tar pipe: %m\n")); + } else { +- char *fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp); ++ char *fok; ++ for (;;) { ++ fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp); ++ /* tar sometimes prints "tar: Record size = 16" messages */ ++ if (!fok || strncmp(fok, "tar: ", 5) != 0) ++ break; ++ } + pclose(fp); + gotspec = (fok != NULL) && isSpecFile(tmpSpecFile); + } From de19650ae2fd0e5e29bd75a4e2a06c2f864a859aed01d142d62b91242b881e19 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 4 Jun 2010 14:12:17 +0000 Subject: [PATCH 095/137] Accepting request 41140 from Base:System Copy from Base:System/rpm based on submit request 41140 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/41140 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=97 --- fixsbits.diff | 47 +++++++++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 6 ++++-- 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 fixsbits.diff diff --git a/fixsbits.diff b/fixsbits.diff new file mode 100644 index 0000000..e54690e --- /dev/null +++ b/fixsbits.diff @@ -0,0 +1,47 @@ +--- ./lib/fsm.c.orig 2010-06-04 13:47:57.000000000 +0000 ++++ ./lib/fsm.c 2010-06-04 13:48:07.000000000 +0000 +@@ -1323,6 +1323,21 @@ static const char * rpmteTypeString(rpmt + } + } + ++static void removeSBITS(const char *path) ++{ ++ struct stat stb; ++ if (lstat(path, &stb) == 0 && S_ISREG(stb.st_mode)) { ++ if ((stb.st_mode & 06000) != 0) { ++ (void) chmod(path, stb.st_mode & 0777); ++ } ++#if WITH_CAP ++ if (stb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) { ++ (void) cap_set_file(path, NULL); ++ } ++#endif ++ } ++} ++ + #define IS_DEV_LOG(_x) \ + ((_x) != NULL && strlen(_x) >= (sizeof("/dev/log")-1) && \ + rstreqn((_x), "/dev/log", sizeof("/dev/log")-1) && \ +@@ -2027,11 +2042,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS + 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); +- } ++ if (fsm->mapFlags & CPIO_SBIT_CHECK) ++ removeSBITS(fsm->path); + rc = unlink(fsm->path); + if (_fsm_debug && (stage & FSM_SYSCALL)) + rpmlog(RPMLOG_DEBUG, " %8s (%s) %s\n", cur, +@@ -2040,6 +2052,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS + rc = (errno == ENOENT ? CPIOERR_ENOENT : CPIOERR_UNLINK_FAILED); + break; + case FSM_RENAME: ++ if (fsm->mapFlags & CPIO_SBIT_CHECK) ++ removeSBITS(fsm->path); + rc = rename(fsm->opath, fsm->path); + #if defined(ETXTBSY) && defined(__HPUX__) + if (rc && errno == ETXTBSY) { diff --git a/rpm-python.spec b/rpm-python.spec index b4b29ad..1a168e3 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 2 +Release: 3 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 91e629b..9b98906 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 4 15:00:54 CEST 2010 - mls@suse.de + +- fix sbit removal code [bnc#610941] +- sort permlist file + ------------------------------------------------------------------- Fri Apr 9 12:00:29 CEST 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 50db57e..7b6421e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 2 +Release: 3 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -113,6 +113,7 @@ Patch76: pythondeps.diff Patch77: fontprovides.diff Patch78: nosource.diff Patch79: nosignature.diff +Patch80: fixsbits.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -174,6 +175,7 @@ rm -f rpmdb/db.h %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 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov @@ -245,7 +247,7 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates install -c -m0644 %{SOURCE9} $RPM_BUILD_ROOT/var/adm/fillup-templates/ rm -f $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute2 -find $RPM_BUILD_ROOT/usr/src/packages/* -type d | sed -e "s@$RPM_BUILD_ROOT@@" > $RPM_BUILD_ROOT/usr/lib/rpm/permlist +find $RPM_BUILD_ROOT/usr/src/packages/* -type d | sed -e "s@$RPM_BUILD_ROOT@@" | sort > $RPM_BUILD_ROOT/usr/lib/rpm/permlist install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm From 1b6a3beacdfbc03ab1da01d19adf76e19b2168da99a4a9bf741b15bba5c7c726 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 4 Jun 2010 14:53:02 +0000 Subject: [PATCH 096/137] Accepting request 41146 from Base:System Copy from Base:System/rpm based on submit request 41146 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/41146 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=98 --- macrosin.diff | 4 ++-- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/macrosin.diff b/macrosin.diff index 65d9089..a86e0ab 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -61,8 +61,8 @@ %_verify_file_context_path %{__file_context_path} +# maxnum,cuttime,minnum -+# 2006/07/01 (SLES10 GA) -+%_binarychangelogtrim 0,1151704800,10 ++# 2009/03/01 (SLES11 GA) ++%_binarychangelogtrim 0,1235862000,10 + # # Path to scripts to autogenerate package dependencies, diff --git a/rpm-python.spec b/rpm-python.spec index 1a168e3..a5637f3 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 3 +Release: 4 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 9b98906..a857952 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 4 16:44:29 CEST 2010 - mls@suse.de + +- update changelog trim date + ------------------------------------------------------------------- Fri Jun 4 15:00:54 CEST 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 7b6421e..a66732c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 3 +Release: 4 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 9504724d1acb963d83e6438f151ef9cf56bafb94e7c111e7f86e224c2e774776 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 20 Jul 2010 18:12:09 +0000 Subject: [PATCH 097/137] Accepting request 43488 from Base:System Copy from Base:System/rpm based on submit request 43488 from user coolo OBS-URL: https://build.opensuse.org/request/show/43488 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=101 --- rpm-python.spec | 2 +- rpm-suse_macros | 2 +- rpm.changes | 10 ++++++++++ rpm.spec | 6 +++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index a5637f3..f32ca50 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 4 +Release: 5 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index f924be7..1406145 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -359,7 +359,7 @@ %supplements_kernel_module() \ %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} -%suse_version 1130 +%suse_version 1140 %sles_version 0 %ul_version 0 diff --git a/rpm.changes b/rpm.changes index a857952..89080a3 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Jul 20 11:47:29 UTC 2010 - coolo@novell.com + +- make suse_version 1140 + +------------------------------------------------------------------- +Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de + +- use %_smp_mflags + ------------------------------------------------------------------- Fri Jun 4 16:44:29 CEST 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index a66732c..6b35817 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 4 +Release: 5 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -197,11 +197,11 @@ export CFLAGS="-g -O0 -fno-strict-aliasing" cp autogen.sh beecrypt pushd beecrypt ./autogen.sh --with-pic -make %{?jobs:-j%jobs} +make %{?_smp_mflags} popd ./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --with-lua --with-selinux --with-internal-beecrypt --enable-shared %{?with_python: --enable-python} rm po/de.gmo -make %{?jobs:-j%jobs} +make %{?_smp_mflags} make convertdb1 %install From 0ac512d62c291ed8a96fca9d811b58a7ee7aeb29ccbb9ced29857911f36012fb Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 24 Aug 2010 15:14:20 +0000 Subject: [PATCH 098/137] Accepting request 45898 from Base:System Copy from Base:System/rpm based on submit request 45898 from user oertel OBS-URL: https://build.opensuse.org/request/show/45898 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=102 --- pkgconfig-0.24.diff | 27 +++++++++++++++++++++++++++ rpm-python.spec | 2 +- rpm.changes | 9 +++++++++ rpm.spec | 5 +++-- 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 pkgconfig-0.24.diff diff --git a/pkgconfig-0.24.diff b/pkgconfig-0.24.diff new file mode 100644 index 0000000..02291fd --- /dev/null +++ b/pkgconfig-0.24.diff @@ -0,0 +1,27 @@ +Index: ./scripts/pkgconfigdeps.sh +=================================================================== +--- ./scripts/pkgconfigdeps.sh ++++ ./scripts/pkgconfigdeps.sh +@@ -11,6 +11,13 @@ test -x $pkgconfig || { + exit 0 + } + ++`$pkgconfig --exists "pkg-config >= 0.24" 2> /dev/null` ++if [ $? -eq 0 ]; then ++ PRINT_REQUIRES="--print-requires --print-requires-private" ++else ++ PRINT_REQUIRES="--print-requires" ++fi ++ + case $1 in + -P|--provides) + while read filename ; do +@@ -39,7 +46,7 @@ case $1 in + [ $i -eq 1 ] && echo "$pkgconfig" + DIR="`dirname ${filename}`" + export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" +- $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do ++ $pkgconfig $PRINT_REQUIRES "$filename" 2> /dev/null | while read n r v ; do + [ -n "$n" ] || continue + echo -n "pkgconfig($n) " + [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v" diff --git a/rpm-python.spec b/rpm-python.spec index f32ca50..bfe06e2 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 5 +Release: 8 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 89080a3..4dcbb0d 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Aug 12 17:17:49 CEST 2010 - vuntz@opensuse.org + +- Add pkgconfig-0.24.diff: starting with pkg-config 0.24, the + --print-requires command was upstreamed, but split in + --print-requires and --print-requires-private. We need both in + pkgconfigdeps.sh, though. If accepted, the patch should get + upstreamed. + ------------------------------------------------------------------- Tue Jul 20 11:47:29 UTC 2010 - coolo@novell.com diff --git a/rpm.spec b/rpm.spec index 6b35817..0b2328e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 5 +Release: 8 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -114,6 +114,7 @@ Patch77: fontprovides.diff Patch78: nosource.diff Patch79: nosignature.diff Patch80: fixsbits.diff +Patch81: pkgconfig-0.24.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -175,7 +176,7 @@ rm -f rpmdb/db.h %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 +%patch -P 80 -P 81 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From 5fc1e5dff445db6b8e78de974265d0cc2227d8fb13e01e97fa7c21910f56c40b Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 9 Sep 2010 12:31:22 +0000 Subject: [PATCH 099/137] Accepting request 47523 from Base:System Copy from Base:System/rpm based on submit request 47523 from user elvigia OBS-URL: https://build.opensuse.org/request/show/47523 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=103 --- rpm-gst-provides.patch | 14 ++++++++++++ rpm-python.spec | 2 +- rpm-suse_macros | 48 +++++++++++++++++++++--------------------- rpm.changes | 12 +++++++++++ rpm.spec | 5 +++-- 5 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 rpm-gst-provides.patch diff --git a/rpm-gst-provides.patch b/rpm-gst-provides.patch new file mode 100644 index 0000000..7c4fe6c --- /dev/null +++ b/rpm-gst-provides.patch @@ -0,0 +1,14 @@ +Index: ./autodeps/linux.prov +=================================================================== +--- ./autodeps/linux.prov ++++ ./autodeps/linux.prov +@@ -102,4 +102,9 @@ fi + [ -x /usr/lib/rpm/find-provides.ksyms ] && + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" + ++# ++# --- GStreamer provides, codecs ++[ -x /usr/lib/rpm/gstreamer-provides ] && ++ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/gstreamer-provides | sort -u ++ + exit 0 diff --git a/rpm-python.spec b/rpm-python.spec index bfe06e2..d7442ab 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 8 +Release: 9 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index 1406145..cb75541 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -208,8 +208,8 @@ # and # name of (old) START variable (unless -s is given) # -# template for variables into etc/sysconfig/package: -# var/adm/fillup-templates/sysconfig.package +# template for variables into /etc/sysconfig/package: +# /var/adm/fillup-templates/sysconfig.package %fillup_and_insserv(finpsyY) \ %{-p:echo "-p option for fillup_and_insserv no longer supported (ever only used on SL8.0)"; exit 1;} \ %{-s:echo "STARTVAR for fillup_and_insserv no longer supported (rc.config is gone since SL8.0)"; exit 1;} \ @@ -224,7 +224,7 @@ SV_B='^### BEGIN INIT INFO' \ 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` \ + 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" \ @@ -237,7 +237,7 @@ # this part really calls fillup for the appropriate files # %do_real_fillup() \ - TEMPLATE_DIR=var/adm/fillup-templates \ + TEMPLATE_DIR=/var/adm/fillup-templates \ SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME \ SD_NAME="" \ %{sysc_fillup} @@ -251,15 +251,15 @@ shift 2 \ test -n "$SCRIPTNAME" -a -n "$SV_VALUE" || { echo "SCRIPTNAME or SV_VALUE unknown"; exit 1;} \ if test "$FIRST_ARG" = "1" -a "$SV_VALUE" = "no" ; then \ - sbin/insserv ${YAST_IS_RUNNING:+-f} -r etc/init.d/$SCRIPTNAME \ + /sbin/insserv ${YAST_IS_RUNNING:+-f} -r /etc/init.d/$SCRIPTNAME \ elif test "$FIRST_ARG" = "1" -o "$FORCE_YES" = "1" ; then \ - sbin/insserv ${YAST_IS_RUNNING:+-f} etc/init.d/$SCRIPTNAME \ + /sbin/insserv ${YAST_IS_RUNNING:+-f} /etc/init.d/$SCRIPTNAME \ fi \ done # macro: insserv_cleanup %insserv_cleanup() \ - sbin/insserv etc/init.d + /sbin/insserv /etc/init.d # macro: fillup_only # do the fillup for sysconfig files @@ -277,7 +277,7 @@ %fillup_only(dans) \ %{-n:PNAME=%{1}}%{!-n:PNAME=%{name}} \ %{-s:SUBPNAME=-%{2}}%{!-s:SUBPNAME=%{-a:-%{name}}} \ - TEMPLATE_DIR=var/adm/fillup-templates \ + TEMPLATE_DIR=/var/adm/fillup-templates \ SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME$SUBPNAME \ SD_NAME="" \ %{-d:%{-s:SD_NAME=%{3}/}%{!-s:SD_NAME=%{2}/}} \ @@ -286,16 +286,16 @@ # internal only: sysc_fillup %sysc_fillup() \ - if [ -x bin/fillup ] ; then \ + if [ -x /bin/fillup ] ; then \ if [ -f $SYSC_TEMPLATE ] ; then \ - echo "Updating etc/sysconfig/$SD_NAME$PNAME..." \ - mkdir -p etc/sysconfig/$SD_NAME \ - touch etc/sysconfig/$SD_NAME$PNAME \ - bin/fillup -q etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE \ + echo "Updating /etc/sysconfig/$SD_NAME$PNAME..." \ + mkdir -p /etc/sysconfig/$SD_NAME \ + touch /etc/sysconfig/$SD_NAME$PNAME \ + /bin/fillup -q /etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE \ fi \ else \ echo "ERROR: fillup not found. This should not happen. Please compare" \ - echo "etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" \ + echo "/etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" \ echo "update by hand." \ fi @@ -316,16 +316,16 @@ %remove_and_set(n:y) \ %{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \ DEF_VAL=%{-y:"yes"}%{!-y:"no"} \ - DEL_TEMPL=var/adm/fillup-templates/$PNAME.del \ + DEL_TEMPL=/var/adm/fillup-templates/$PNAME.del \ rm -f $DEL_TEMPL \ for var in %{?*} ; do \ echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \ done \ - if [ -f etc/sysconfig/$PNAME ] ; then \ - bin/fillup -q -t -r -i -d "=" etc/sysconfig/$PNAME $DEL_TEMPL etc/sysconfig/$PNAME.deleted.$$ \ - test -f etc/sysconfig/$PNAME.new && mv etc/sysconfig/$PNAME.new etc/sysconfig/$PNAME \ + if [ -f /etc/sysconfig/$PNAME ] ; then \ + /bin/fillup -q -t -r -i -d "=" /etc/sysconfig/$PNAME $DEL_TEMPL /etc/sysconfig/$PNAME.deleted.$$ \ + test -f /etc/sysconfig/$PNAME.new && mv /etc/sysconfig/$PNAME.new /etc/sysconfig/$PNAME \ fi \ - for i in $DEL_TEMPL etc/sysconfig/$PNAME.deleted.$$ ; do \ + for i in $DEL_TEMPL /etc/sysconfig/$PNAME.deleted.$$ ; do \ if [ -f $i ] ; then \ . $i \ rm -f $i \ @@ -333,25 +333,25 @@ done %insserv_force_if_yast() \ - sbin/insserv ${YAST_IS_RUNNING:+-f} %{?*} + /sbin/insserv ${YAST_IS_RUNNING:+-f} %{?*} %run_ldconfig /sbin/ldconfig %install_info(:-:) \ ALL_ARGS=(%{**}) \ NUM_ARGS=${#ALL_ARGS[@]} \ - if test -x sbin/install-info ; then \ + if test -x /sbin/install-info ; then \ if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ - sbin/install-info "${ALL_ARGS[@]}" \ + /sbin/install-info "${ALL_ARGS[@]}" \ fi \ fi ; %install_info_delete(:-:) \ ALL_ARGS=(%{**}) \ NUM_ARGS=${#ALL_ARGS[@]} \ - if test -x sbin/install-info ; then \ + if test -x /sbin/install-info ; then \ if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \ - sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \ + /sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \ fi ; \ fi ; diff --git a/rpm.changes b/rpm.changes index 4dcbb0d..a31563e 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Sep 8 11:35:46 CEST 2010 - ro@suse.de + +- add leading / where appropriate in rpm-suse_macros (bnc#625763) + +------------------------------------------------------------------- +Thu Sep 2 10:26:05 UTC 2010 - dimstar@opensuse.org + +- Add rpm-gst-provides.patch to allow rpm to collect provides of + gstreamer codecs. This will help pk-gstreamer-install to also + find the codecs it is looking for. + ------------------------------------------------------------------- Thu Aug 12 17:17:49 CEST 2010 - vuntz@opensuse.org diff --git a/rpm.spec b/rpm.spec index 0b2328e..5bf684e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -28,7 +28,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 8 +Release: 9 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -115,6 +115,7 @@ Patch78: nosource.diff Patch79: nosignature.diff Patch80: fixsbits.diff Patch81: pkgconfig-0.24.diff +Patch82: rpm-gst-provides.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -176,7 +177,7 @@ rm -f rpmdb/db.h %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 +%patch -P 80 -P 81 -P 82 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From e88f820c9461b7126f4e2b8f12d450a87008ef3f0cd51ecb891a75ecb189b24f Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 7 Oct 2010 19:47:23 +0000 Subject: [PATCH 100/137] Accepting request 49797 from Base:System Copy from Base:System/rpm based on submit request 49797 from user elvigia OBS-URL: https://build.opensuse.org/request/show/49797 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=104 --- rpm-python.spec | 2 +- rpm.changes | 6 ++++++ rpm.spec | 7 +++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index d7442ab..77e5935 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -25,7 +25,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 9 +Release: 10 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index a31563e..96de78b 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 4 17:34:52 UTC 2010 - cristian.rodriguez@opensuse.org + +- Enable libcap support so we can use the %caps macro in spec + files to set POSIX capabilities. + ------------------------------------------------------------------- Wed Sep 8 11:35:46 CEST 2010 - ro@suse.de diff --git a/rpm.spec b/rpm.spec index 5bf684e..8980fdc 100644 --- a/rpm.spec +++ b/rpm.spec @@ -22,13 +22,14 @@ License: GPLv2+ Group: System/Packages BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel xz-devel zlib-devel BuildRequires: popt-devel +BuildRequires: libacl-devel libcap-devel #!BuildIgnore: rpmlint-Factory Provides: rpminst PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 9 +Release: 10 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -201,7 +202,9 @@ pushd beecrypt ./autogen.sh --with-pic make %{?_smp_mflags} popd -./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --with-lua --with-selinux --with-internal-beecrypt --enable-shared %{?with_python: --enable-python} +./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ +--libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --with-lua \ +--with-selinux --with-internal-beecrypt --with-acl --with-cap --enable-shared %{?with_python: --enable-python} rm po/de.gmo make %{?_smp_mflags} make convertdb1 From 77a79b352cae1f056d788a1b86b647bfafa5d42d9ad3702897a23859a8689c30 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Thu, 28 Oct 2010 13:39:50 +0000 Subject: [PATCH 101/137] Accepting request 51267 from Base:System Accepted submit request 51267 from user elvigia OBS-URL: https://build.opensuse.org/request/show/51267 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=105 --- rpm-python.changes | 10 ++++++++++ rpm-python.spec | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rpm-python.changes b/rpm-python.changes index fb4f96b..41c56de 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Oct 22 15:52:32 UTC 2010 - coolo@novell.com + +- adapt second spec file to changes done to rpm.spec + +------------------------------------------------------------------- +Mon Oct 18 11:03:53 CEST 2010 - dmueller@suse.de + +- adapt buildrequires + ------------------------------------------------------------------- Thu Feb 12 16:52:26 CET 2009 - ro@suse.de diff --git a/rpm-python.spec b/rpm-python.spec index 77e5935..95a663e 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -19,7 +19,8 @@ Name: rpm-python -BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel popt-devel python-devel xz-devel zlib-devel +BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel popt-devel +BuildRequires: libcap-devel python-devel xz-devel zlib-devel libacl-devel #!BuildIgnore: rpmlint-Factory License: GPLv2+ Group: System/Packages From 85098b5458adbf44f24c733c601437441966359ffeaf67a21b493f1dedc40e74 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 28 Oct 2010 13:40:02 +0000 Subject: [PATCH 102/137] Autobuild autoformatter for 51267 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=106 --- rpm-python.spec | 4 ++-- rpm.spec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 95a663e..3d5fe21 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -20,13 +20,13 @@ Name: rpm-python BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel popt-devel -BuildRequires: libcap-devel python-devel xz-devel zlib-devel libacl-devel +BuildRequires: libacl-devel libcap-devel python-devel xz-devel zlib-devel #!BuildIgnore: rpmlint-Factory License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 10 +Release: 11 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 8980fdc..cfd1814 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 10 +Release: 11 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 2cf5f719a46238d4db837c6cd41bd6d8c1761ce19bcb0d78a88c1d73a1179231 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Tue, 2 Nov 2010 09:13:22 +0000 Subject: [PATCH 103/137] Accepting request 51647 from Base:System Accepted submit request 51647 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/51647 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=107 --- langnoc.diff | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++ rpm.changes | 6 +++ rpm.spec | 3 +- 3 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 langnoc.diff diff --git a/langnoc.diff b/langnoc.diff new file mode 100644 index 0000000..e069a54 --- /dev/null +++ b/langnoc.diff @@ -0,0 +1,129 @@ +--- ./macros.in.orig 2010-10-28 13:57:37.000000000 +0000 ++++ ./macros.in 2010-10-29 12:35:39.000000000 +0000 +@@ -1381,6 +1381,7 @@ EOF + # %files -f %{name}.lang + # + %find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot} ++%no_lang_C --without-C + + # Commands + opts to use for retrieving remote files + # Proxy opts can be set through --httpproxy/--httpport popt aliases, +--- ./scripts/find-lang.sh.orig 2010-10-28 13:44:49.000000000 +0000 ++++ ./scripts/find-lang.sh 2010-10-29 09:39:22.000000000 +0000 +@@ -62,6 +62,8 @@ MO= + MO_NAME=$NAME.lang + ALL_NAME=# + NO_ALL_NAME= ++ONLY_C=# ++NO_C=# + + while test $# -gt 0 ; do + case "${1}" in +@@ -98,6 +100,14 @@ while test $# -gt 0 ; do + NO_ALL_NAME=# + shift + ;; ++ --with-only-C ) ++ ONLY_C= ++ shift ++ ;; ++ --without-C ) ++ NO_C= ++ shift ++ ;; + * ) + MO_NAME=${1} + shift +@@ -117,6 +127,8 @@ 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: + s:^\([^%].*\):: ++'"$ONLY_C"'/%lang(C)/!d ++'"$NO_C"'/%lang(C)/d + s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + +@@ -131,22 +143,25 @@ s:%lang(C) :: + + find $TOP_DIR -type d|sed ' + s:'"$TOP_DIR"':: +-'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1: ++'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%lang(C) %dir %doc \1: + '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\):: + '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2: +-'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir %doc \1: ++'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%lang(C) %dir %doc \1: + '"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\):: + '"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) %doc \1\2: + s:%lang(.*) .*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*:: + s:^\([^%].*\):: ++'"$ONLY_C"'/%lang(C)/!d ++'"$NO_C"'/%lang(C)/d + s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type d|sed ' + s:'"$TOP_DIR"':: +-'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1: +-'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1: ++'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%lang(C) %dir \1: ++'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%lang(C) %dir \1: + s:^\([^%].*\):: ++s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type f|sed ' +@@ -154,6 +169,8 @@ s:'"$TOP_DIR"':: + '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1: + '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: + s:^[^%].*:: ++'"$ONLY_C"'/%lang(C)/!d ++'"$NO_C"'/%lang(C)/d + s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + +@@ -166,6 +183,8 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: + '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: + s:^\([^%].*\):: ++'"$ONLY_C"'/%lang(C)/!d ++'"$NO_C"'/%lang(C)/d + s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + fi +@@ -179,6 +198,8 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: + '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: + s:^\([^%].*\):: ++'"$ONLY_C"'/%lang(C)/!d ++'"$NO_C"'/%lang(C)/d + s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + fi +@@ -191,6 +212,8 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}_[a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: + '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: + s:^[^%].*:: ++'"$ONLY_C"'/%lang(C)/!d ++'"$NO_C"'/%lang(C)/d + s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + +@@ -199,6 +222,8 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\):: + '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: + s:^\([^%].*\):: ++'"$ONLY_C"'/%lang(C)/!d ++'"$NO_C"'/%lang(C)/d + s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + +@@ -206,6 +231,8 @@ 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:^\([^%].*\):: ++'"$ONLY_C"'/%lang(C)/!d ++'"$NO_C"'/%lang(C)/d + s:%lang(C) :: + /^$/d' >> $MO_NAME_NEW + diff --git a/rpm.changes b/rpm.changes index 96de78b..2d32185 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 29 15:03:50 CEST 2010 - mls@suse.de + +- add support --with-only-C and --without-C options to find-lang.sh, + add %no_lang_C macro to allow compatible builds [bnc#449847] + ------------------------------------------------------------------- Mon Oct 4 17:34:52 UTC 2010 - cristian.rodriguez@opensuse.org diff --git a/rpm.spec b/rpm.spec index cfd1814..f982907 100644 --- a/rpm.spec +++ b/rpm.spec @@ -117,6 +117,7 @@ Patch79: nosignature.diff Patch80: fixsbits.diff Patch81: pkgconfig-0.24.diff Patch82: rpm-gst-provides.patch +Patch83: langnoc.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -178,7 +179,7 @@ rm -f rpmdb/db.h %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 +%patch -P 80 -P 81 -P 82 -P 83 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From 3ffe93d6a91f987a652563ec4762b75f4a1b334ec649d4f59fb4c16e485ab909 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 2 Nov 2010 09:13:30 +0000 Subject: [PATCH 104/137] Autobuild autoformatter for 51647 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=108 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 3d5fe21..ad14429 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 11 +Release: 12 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index f982907..f0f3c32 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 11 +Release: 12 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 1bbb749072274bd983b8b9751be011cff940d10639ddb2972ba2b4ad85b5deb8 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Thu, 18 Nov 2010 13:55:26 +0000 Subject: [PATCH 105/137] Accepting request 53332 from Base:System Accepted submit request 53332 from user elvigia OBS-URL: https://build.opensuse.org/request/show/53332 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=109 --- brp.diff | 2 +- rpm-suse_macros | 28 ++++++++++------------------ rpm.changes | 16 ++++++++++++++++ rpm.spec | 1 + 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/brp.diff b/brp.diff index 3f7a341..8eaf776 100644 --- a/brp.diff +++ b/brp.diff @@ -276,7 +276,7 @@ Index: scripts/Makefile.am check-files check-prereqs \ check-buildroot check-rpaths check-rpaths-worker \ find-debuginfo.sh find-lang.sh \ -@@ -23,8 +25,10 @@ EXTRA_DIST = \ +@@ -24,8 +26,10 @@ EXTRA_DIST = \ rpmconfig_SCRIPTS = \ brp-compress brp-python-bytecompile brp-java-gcjcompile \ diff --git a/rpm-suse_macros b/rpm-suse_macros index cb75541..ab14b81 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -1,10 +1,5 @@ -%suse_check \ - %{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\ - export RPM_BUILD_ROOT}\ - test -x /usr/sbin/Check -a $UID = 0 -o -x /usr/sbin/Check -a ! -z "$RPM_BUILD_ROOT" && {\ - echo "I call /usr/sbin/Check..."\ - /usr/sbin/Check\ - } +# need to keep this around for a while +%suse_check %{nil} # directories %_infodir %{_prefix}/share/info @@ -23,8 +18,8 @@ %suseconfig_fonts_prereq perl aaa_base %install_info_prereq info +# _suse_os_install_post is defined in brp-checks-suse %__os_install_post %{?_suse_os_install_post}%{!?_suse_os_install_post: \ - %{suse_check} \ /usr/lib/rpm/brp-compress \ /usr/lib/rpm/brp-symlink \ %{nil}} @@ -85,6 +80,7 @@ %is_plus %(if test -f /.buildenv ; then source /.buildenv ; if [[ "$BUILD_BASENAME" == *+kde ]] ; then echo 1 ; else echo 0 ; fi ; else echo 0 ; fi) +# deprecated, use %set_permissions instead %run_permissions() \ if test "$YAST_IS_RUNNING" != "instsys" ; then \ if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.permissions ; then \ @@ -123,18 +119,14 @@ fi \ %nil +%set_permissions(f:) \ + if [ -x /usr/bin/chkstat ]; then \ + /usr/bin/chkstat -n --set --system %{**} \ + fi \ + %nil %verify_permissions(e:f:) \ - if test -f /etc/sysconfig/security ; then \ - source /etc/sysconfig/security \ - fi \ - PERMFILES="/etc/permissions" \ - for PERMEXT in $PERMISSION_SECURITY ; do \ - if test -f /etc/permissions.$PERMEXT ; then \ - PERMFILES="$PERMFILES /etc/permissions.$PERMEXT" \ - fi \ - done \ - /usr/bin/chkstat -n %{**} $PERMFILES 1>&2 \ + /usr/bin/chkstat -n --warn --system %{**} 1>&2 \ %nil # %{suse_update_config [-fcl] [dirs...]} diff --git a/rpm.changes b/rpm.changes index 2d32185..335c374 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Tue Nov 16 15:25:45 UTC 2010 - lnussel@suse.de + +- fix %verify_permissions to actually only warn +- introduce %set_permissions to replace %run_permissions in the future + +------------------------------------------------------------------- +Tue Nov 9 15:07:52 UTC 2010 - lnussel@suse.de + +- don't call /usr/bin/Check at all anymore. superfluous + +------------------------------------------------------------------- +Tue Nov 9 13:04:21 UTC 2010 - lnussel@suse.de + +- change %verify_permissions to use new system mode of chkstat + ------------------------------------------------------------------- Fri Oct 29 15:03:50 CEST 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index f0f3c32..f9d00f0 100644 --- a/rpm.spec +++ b/rpm.spec @@ -300,6 +300,7 @@ fi %postun %{insserv_cleanup} + %verifyscript %verify_permissions -f /usr/lib/rpm/permlist From 2de8cc857841392fee91fc5c36d5c0ae6d0678a6f9b53807d4d26170190f578f Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 18 Nov 2010 13:55:41 +0000 Subject: [PATCH 106/137] Autobuild autoformatter for 53332 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=110 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index ad14429..87035ff 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 12 +Release: 13 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index f9d00f0..5853b5b 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 12 +Release: 13 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From f34c8be18e92a0738d34ebd91772c0c33929f62136f17d4e2333124527132abf Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Sat, 20 Nov 2010 10:12:42 +0000 Subject: [PATCH 107/137] Accepting request 53553 from Base:System Accepted submit request 53553 from user elvigia OBS-URL: https://build.opensuse.org/request/show/53553 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=111 --- rpm-suse_macros | 12 ------------ rpm.changes | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/rpm-suse_macros b/rpm-suse_macros index ab14b81..bde23c6 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -24,18 +24,6 @@ /usr/lib/rpm/brp-symlink \ %{nil}} -# perl_vendorarch is defined -# perl_vendorlib is defined -%perl_make_install make DESTDIR=$RPM_BUILD_ROOT install_vendor - -%perl_process_packlist(n:) \ - mkdir -p $RPM_BUILD_ROOT/var/adm/perl-modules \ - test -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod && { sed -e "s@$RPM_BUILD_ROOT@@g" < $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod > $RPM_BUILD_ROOT/var/adm/perl-modules/%{-n:%{-n*}}%{!-n:%{name}} ; } ; \ - test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT/%perl_sitearch/auto && find $RPM_BUILD_ROOT/%perl_sitearch/auto -name .packlist -print0 | xargs -0 -r perl -spi -e "s@$RPM_BUILD_ROOT@@g" ; \ - test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT/%perl_vendorarch/auto && find $RPM_BUILD_ROOT/%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r perl -spi -e "s@$RPM_BUILD_ROOT@@g" ; \ - rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \ - %nil - # macro: %restart_on_update() # Used to restart a service in postun section, if we are # not running from YaST2 in instsys on update. diff --git a/rpm.changes b/rpm.changes index 335c374..21bfc44 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 19 16:09:20 UTC 2010 - chris@computersalat.de + +- remove perl macro stuff from suse_macros + o provided with perl /etc/rpm/macros.perl + ------------------------------------------------------------------- Tue Nov 16 15:25:45 UTC 2010 - lnussel@suse.de From 31d208b713ececc5b1c0f140ce9626eb6d5ea6e3b31830e6bf6125c8e87bd40a Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Sat, 20 Nov 2010 10:12:48 +0000 Subject: [PATCH 108/137] Autobuild autoformatter for 53553 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=112 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 87035ff..600865f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 13 +Release: 14 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 5853b5b..e26b8b7 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 13 +Release: 14 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 5efc08dde5abfa224e02570198abbe9bbb49f0157574dc193634fadaade903f4 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 8 Dec 2010 16:30:12 +0000 Subject: [PATCH 109/137] Accepting request 55228 from Base:System Accepted submit request 55228 from user coolo OBS-URL: https://build.opensuse.org/request/show/55228 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=113 --- brpcombress.diff | 51 ++++++++++++++++++++++++++++++++++++++------ initscriptsprov.diff | 44 ++++++++++++++++++++++++++++++++++++++ rpm.changes | 10 +++++++++ rpm.spec | 2 ++ 4 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 initscriptsprov.diff diff --git a/brpcombress.diff b/brpcombress.diff index c879014..fff1a7e 100644 --- a/brpcombress.diff +++ b/brpcombress.diff @@ -1,5 +1,7 @@ ---- ./scripts/brp-compress.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./scripts/brp-compress 2010-03-25 15:11:29.000000000 +0000 +Index: scripts/brp-compress +=================================================================== +--- scripts/brp-compress.orig ++++ scripts/brp-compress @@ -1,16 +1,43 @@ -#!/bin/sh +#!/bin/bash @@ -45,16 +47,51 @@ for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ -@@ -23,9 +50,9 @@ do +@@ -23,34 +50,34 @@ do [ "`basename $f`" = "dir" ] && continue case "$f" in - *.gz|*.Z) gunzip $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; - *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; - *.xz|*.lzma) unxz $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; -+ *.gz|*.Z) gunzip $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; -+ *.bz2) bunzip2 $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.bz2$//'`;; -+ *.xz|*.lzma) unxz $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; - *) b=$f;; +- *) b=$f;; ++ *.gz|*.Z) gunzip "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.\(gz\|Z\)$//'`";; ++ *.bz2) bunzip2 "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.bz2$//'`";; ++ *.xz|*.lzma) unxz "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`";; ++ *) b="$f";; esac +- $COMPRESS $b /dev/null || { ++ $COMPRESS "$b" /dev/null || { + inode=`ls -i $b | awk '{ print $1 }'` + others=`find $d -type f -inum $inode` + if [ -n "$others" ]; then + for afile in $others ; do +- [ "$afile" != "$b" ] && rm -f $afile ++ [ "$afile" != "$b" ] && rm -f "$afile" + done +- $COMPRESS -f $b ++ $COMPRESS -f "$b" + for afile in $others ; do +- [ "$afile" != "$b" ] && ln $b$COMPRESS_EXT $afile$COMPRESS_EXT ++ [ "$afile" != "$b" ] && ln "$b$COMPRESS_EXT" "$afile$COMPRESS_EXT" + done + else +- $COMPRESS -f $b ++ $COMPRESS -f "$b" + fi + } + done + + for f in `find $d -type l` + do +- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'` +- rm -f $f +- b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'` +- ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT ++ l="`ls -l "$f" | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`" ++ rm -f "$f" ++ b="`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`" ++ ln -sf "$l$COMPRESS_EXT" "$b$COMPRESS_EXT" + done + done diff --git a/initscriptsprov.diff b/initscriptsprov.diff new file mode 100644 index 0000000..4a95d90 --- /dev/null +++ b/initscriptsprov.diff @@ -0,0 +1,44 @@ +Index: rpm-4.8.0/autodeps/linux.prov +=================================================================== +--- rpm-4.8.0.orig/autodeps/linux.prov 2010-12-08 15:16:12.984842683 +0100 ++++ rpm-4.8.0/autodeps/linux.prov 2010-12-08 15:16:52.530842661 +0100 +@@ -107,4 +107,9 @@ fi + [ -x /usr/lib/rpm/gstreamer-provides ] && + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/gstreamer-provides | sort -u + ++# ++# --- Provides of sysvinit scripts ++[ -x /usr/lib/rpm/sysvinitdeps.sh ] && ++ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/sysvinitdeps.sh -P | sort -u ++ + exit 0 +Index: rpm-4.8.0/scripts/sysvinitdeps.sh +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ rpm-4.8.0/scripts/sysvinitdeps.sh 2010-12-08 15:17:11.183843303 +0100 +@@ -0,0 +1,13 @@ ++#!/bin/sh ++ ++# -P blindly assumed ++while read file; do ++ case $file in ++ */etc/init.d/*) ++ provs=`grep '^# *Provides:' $file | sed 's,^.*:,,'` ++ for p in $provs; do ++ echo "sysvinit($p)" ++ done ++ ;; ++ esac ++done +Index: rpm-4.8.0/scripts/Makefile.am +=================================================================== +--- rpm-4.8.0.orig/scripts/Makefile.am 2010-12-08 15:16:12.985844013 +0100 ++++ rpm-4.8.0/scripts/Makefile.am 2010-12-08 15:16:52.531842720 +0100 +@@ -40,6 +40,7 @@ rpmconfig_SCRIPTS = \ + pkgconfigdeps.sh libtooldeps.sh \ + ocaml-find-requires.sh ocaml-find-provides.sh \ + fontconfig.prov desktop-file.prov \ ++ sysvinitdeps.sh \ + rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg + + rpmconfig_DATA = \ diff --git a/rpm.changes b/rpm.changes index 21bfc44..6f7e9fc 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Dec 8 13:05:06 UTC 2010 - meissner@novell.com + +- handle spaces in manpage filenames (like e.g. in boost). + +------------------------------------------------------------------- +Tue Dec 7 14:33:33 UTC 2010 - coolo@novell.com + +- add script to provide sysvinit() from /etc/init.d/* + ------------------------------------------------------------------- Fri Nov 19 16:09:20 UTC 2010 - chris@computersalat.de diff --git a/rpm.spec b/rpm.spec index e26b8b7..2f73e68 100644 --- a/rpm.spec +++ b/rpm.spec @@ -118,6 +118,7 @@ Patch80: fixsbits.diff Patch81: pkgconfig-0.24.diff Patch82: rpm-gst-provides.patch Patch83: langnoc.diff +Patch84: initscriptsprov.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -180,6 +181,7 @@ rm -f rpmdb/db.h %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 +%patch84 -p1 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From 9cde89a03075bc4e1f417ad70708033efc286abdf5b9d823a9ce311650e8957c Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 8 Dec 2010 16:30:18 +0000 Subject: [PATCH 110/137] Autobuild autoformatter for 55228 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=114 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 600865f..65f01f5 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 14 +Release: 15 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 2f73e68..33f02d4 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 14 +Release: 15 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 0db4e169288c99138b911e176112fa548bade619b6a14260a0ada2997e6c079e Mon Sep 17 00:00:00 2001 From: Berthold Gunreben Date: Tue, 14 Dec 2010 08:50:24 +0000 Subject: [PATCH 111/137] Accepting request 55865 from Base:System Accepted submit request 55865 from user elvigia OBS-URL: https://build.opensuse.org/request/show/55865 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=115 --- brpcombress.diff | 16 ++++++++++++---- rpm.changes | 5 +++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/brpcombress.diff b/brpcombress.diff index fff1a7e..57e2383 100644 --- a/brpcombress.diff +++ b/brpcombress.diff @@ -2,7 +2,7 @@ Index: scripts/brp-compress =================================================================== --- scripts/brp-compress.orig +++ scripts/brp-compress -@@ -1,16 +1,43 @@ +@@ -1,56 +1,83 @@ -#!/bin/sh +#!/bin/bash @@ -47,8 +47,15 @@ Index: scripts/brp-compress for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ -@@ -23,34 +50,34 @@ do - [ "`basename $f`" = "dir" ] && continue + ./usr/share/doc/*/man/man* ./usr/lib/*/man/man* + do + [ -d $d ] || continue +- for f in `find $d -type f` ++ find $d -type f | while read f + do + [ -f "$f" ] || continue +- [ "`basename $f`" = "dir" ] && continue ++ [ "`basename \"$f\"`" = "dir" ] && continue case "$f" in - *.gz|*.Z) gunzip $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; @@ -83,7 +90,8 @@ Index: scripts/brp-compress } done - for f in `find $d -type l` +- for f in `find $d -type l` ++ find $d -type l | while read f do - l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'` - rm -f $f diff --git a/rpm.changes b/rpm.changes index 6f7e9fc..fc6ab55 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Dec 9 16:44:10 UTC 2010 - meissner@novell.com + +- fixed two more remaining filenames with spaces issues. + ------------------------------------------------------------------- Wed Dec 8 13:05:06 UTC 2010 - meissner@novell.com From f9e36a03f25e00c58e97052917ead3298d36d3f709a27cd1df5f5704c9187f91 Mon Sep 17 00:00:00 2001 From: Berthold Gunreben Date: Tue, 14 Dec 2010 08:50:32 +0000 Subject: [PATCH 112/137] Autobuild autoformatter for 55865 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=116 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 65f01f5..13b37cf 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 15 +Release: 16 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 33f02d4..2351e7c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 15 +Release: 16 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From f4a6e9c7a73fe040f327257e02903b5dc061fd68d81528c24b73fb7e43535eba Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 20 Dec 2010 13:37:51 +0000 Subject: [PATCH 113/137] Accepting request 56397 from Base:System Accepted submit request 56397 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/56397 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=117 --- rpm.changes | 6 ++++++ weakdeps.diff | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/rpm.changes b/rpm.changes index fc6ab55..b64c643 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 20 11:50:55 CET 2010 - mls@suse.de + +- fix depflag_strong filter, all weak deps were shown as + strong (bnc#359566). + ------------------------------------------------------------------- Thu Dec 9 16:44:10 UTC 2010 - meissner@novell.com diff --git a/weakdeps.diff b/weakdeps.diff index 22bd9bc..7e12a74 100644 --- a/weakdeps.diff +++ b/weakdeps.diff @@ -144,7 +144,7 @@ Needs extcond.diff for query operations. +{ + char * val = NULL; + -+ if (rpmtdType(td) != RPM_NUMERIC_CLASS) { ++ if (rpmtdClass(td) != RPM_NUMERIC_CLASS) { + val = xstrdup(_("(not a number)")); + } else { + uint64_t anint = rpmtdGetNumber(td); From 54213345e24040785a6a9f901d019411dbb22e4441ec894a9328ab5bb80f240d Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 20 Dec 2010 13:38:06 +0000 Subject: [PATCH 114/137] Autobuild autoformatter for 56397 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=118 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 13b37cf..df32e4d 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 16 +Release: 17 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 2351e7c..bb771bc 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 16 +Release: 17 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 2ba39a4004d05980a0a25580e3171fbe5bf6471fb27d31460b64c5f8038422cb Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 14 Jan 2011 13:47:47 +0000 Subject: [PATCH 115/137] Accepting request 58184 from Base:System Accepted submit request 58184 from user coolo OBS-URL: https://build.opensuse.org/request/show/58184 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=119 --- remove-translations.diff | 20 ++++++++++++++++++++ rpm.changes | 6 ++++++ rpm.spec | 7 ++++--- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 remove-translations.diff diff --git a/remove-translations.diff b/remove-translations.diff new file mode 100644 index 0000000..8a95025 --- /dev/null +++ b/remove-translations.diff @@ -0,0 +1,20 @@ +--- scripts/find-lang.sh 2011-01-13 13:44:01.000000000 +0100 ++++ scripts/find-lang.sh 2011-01-13 13:44:39.770439219 +0100 +@@ -122,6 +122,17 @@ fi + MO_NAME_NEW=$MO_NAME.tmp.$$ + rm -f $MO_NAME_NEW + ++# remove languages we do not yet support - but give out statistics ++find $TOP_DIR/usr/share/locale/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/share/locale/'::; /^$/d' | while read dir; do ++ if ! rpm -ql filesystem | egrep -q "/usr/share/locale/$dir"$; then ++ find $TOP_DIR/usr/share/locale/$dir -name *.mo | sed 's:'"$TOP_DIR"'::' | while read file; do ++ echo -n "removing translation $file: " ++ msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null - ++ done ++ rm -rf $TOP_DIR/usr/share/locale/$dir ++ fi ++done ++ + find $TOP_DIR -type f -o -type l|sed ' + s:'"$TOP_DIR"':: + '"$ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: diff --git a/rpm.changes b/rpm.changes index b64c643..79c86f6 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 14 08:58:40 UTC 2011 - coolo@novell.com + +- let %find_lang remove (with a comment) languages not supported. + Supported languages are in filesystem.rpm's file list (bnc#659001) + ------------------------------------------------------------------- Mon Dec 20 11:50:55 CET 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index bb771bc..c852773 100644 --- a/rpm.spec +++ b/rpm.spec @@ -119,6 +119,7 @@ Patch81: pkgconfig-0.24.diff Patch82: rpm-gst-provides.patch Patch83: langnoc.diff Patch84: initscriptsprov.diff +Patch85: remove-translations.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -180,7 +181,7 @@ rm -f rpmdb/db.h %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 +%patch -P 80 -P 81 -P 82 -P 83 -P 85 %patch84 -p1 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms @@ -282,6 +283,7 @@ popd gzip -9 CHANGES rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm %clean rm -rf $RPM_BUILD_ROOT @@ -306,7 +308,7 @@ fi %verifyscript %verify_permissions -f /usr/lib/rpm/permlist -%files +%files -f rpm.lang %defattr(-,root,root) %doc CHANGES.gz COPYING GROUPS %doc doc/manual @@ -321,7 +323,6 @@ fi %{_libdir}/librpmbuild.so.* %{_libdir}/librpmio.so.* %doc %{_mandir}/man[18]/*.[18]* - /usr/share/locale/*/LC_MESSAGES/rpm.mo %dir /var/lib/rpm %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILD %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SPECS From c2821de56a075001c38d6394fb50781b0d244324033d2b3a4b4c7a32038ecdd8 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 14 Jan 2011 13:47:55 +0000 Subject: [PATCH 116/137] Autobuild autoformatter for 58184 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=120 --- rpm-python.spec | 6 +++--- rpm.spec | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index df32e4d..4942a4b 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -1,7 +1,7 @@ # -# spec file for package rpm-python (Version 4.8.0) +# spec file for package rpm-python # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 17 +Release: 18 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index c852773..c12a48f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,7 +1,7 @@ # -# spec file for package rpm (Version 4.8.0) +# spec file for package rpm # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 17 +Release: 18 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 137a7b9e808c2094a8e06fb10067e216f2f15fbca97b30fc177ae6fcf8c3bdd1 Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Sun, 20 Feb 2011 23:55:25 +0000 Subject: [PATCH 117/137] Accepting request 62161 from Base:System Accepted submit request 62161 from user coolo OBS-URL: https://build.opensuse.org/request/show/62161 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=122 --- rpm-suse_macros | 3 --- rpm.changes | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rpm-suse_macros b/rpm-suse_macros index bde23c6..37237e0 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -98,9 +98,6 @@ if test -x /sbin/conf.d/SuSEconfig.fonts ; then \ %run_suseconfig -m fonts \ fi \ - if test -x /sbin/conf.d/SuSEconfig.pango ; then \ - %run_suseconfig -m pango \ - fi \ %{-c:if test -x /sbin/conf.d/SuSEconfig.ghostscript-cjk ; then \ %run_suseconfig -m ghostscript-cjk \ fi} \ diff --git a/rpm.changes b/rpm.changes index 79c86f6..45a71a9 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Feb 19 12:39:31 CET 2011 - vuntz@opensuse.org + +- Don't call /sbin/conf.d/SuSEconfig.pango in + %run_suseconfig_fonts: it has been removed during 11.4 + development. + ------------------------------------------------------------------- Fri Jan 14 08:58:40 UTC 2011 - coolo@novell.com From ef17c506c44096d54e6e444b918fc787abd806b81e1ab1295977a4d4a407891b Mon Sep 17 00:00:00 2001 From: Ruediger Oertel Date: Sun, 20 Feb 2011 23:55:37 +0000 Subject: [PATCH 118/137] Autobuild autoformatter for 62161 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=123 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 4942a4b..a579329 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 18 +Release: 19 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index c12a48f..895e77f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 18 +Release: 30 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 491e9492dd87f19ee8345ba72b23a996fadfebc3388f6615774806fbf35b8e57 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 24 Feb 2011 07:47:38 +0000 Subject: [PATCH 119/137] Accepting request 62627 from Base:System Accepted submit request 62627 from user mlschroe OBS-URL: https://build.opensuse.org/request/show/62627 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=124 --- rpm-python.changes | 5 +++++ rpm-python.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rpm-python.changes b/rpm-python.changes index 41c56de..2c2353d 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 23 14:01:41 CET 2011 - mls@suse.de + +- drop standard python directories from filelist [bnc#229189] + ------------------------------------------------------------------- Fri Oct 22 15:52:32 UTC 2010 - coolo@novell.com diff --git a/rpm-python.spec b/rpm-python.spec index a579329..6d10974 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -69,6 +69,6 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%{_libdir}/python* +%{_libdir}/python*/*/* %changelog From c3b37d48f11b63788dcefce8845f4b56f69b13b394c43d59234c39902309fe35 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 24 Feb 2011 07:47:46 +0000 Subject: [PATCH 120/137] Autobuild autoformatter for 62627 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=125 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 6d10974..a8cf732 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 19 +Release: 20 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 895e77f..30d0457 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 30 +Release: 31 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From c6226665ac465385eb285db81a0f0727859ea2104ad50838f4193b37b67b263f Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 5 May 2011 07:31:12 +0000 Subject: [PATCH 121/137] Accepting request 69617 from Base:System - rpmsort + Fix comparison function to match rpm (bnc#644515, thanks to Michael Schroeder). + Add --test option to verify result against zypper vcmp. (forwarded request 69563 from michal-m) OBS-URL: https://build.opensuse.org/request/show/69617 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=126 --- rpm.changes | 8 ++++++++ rpmsort | 36 +++++++++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/rpm.changes b/rpm.changes index 45a71a9..7f29467 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed May 4 12:42:33 UTC 2011 - mmarek@novell.com + +- rpmsort + + Fix comparison function to match rpm (bnc#644515, thanks to + Michael Schroeder). + + Add --test option to verify result against zypper vcmp. + ------------------------------------------------------------------- Sat Feb 19 12:39:31 CET 2011 - vuntz@opensuse.org diff --git a/rpmsort b/rpmsort index a73478b..841c2d7 100644 --- a/rpmsort +++ b/rpmsort @@ -17,7 +17,7 @@ use Getopt::Long qw(:config gnu_getopt); -sub rpm_cmp_versions { +sub do_rpm_cmp_versions { my ($evr1, $evr2) = @_; sub _rpm_cmp { @@ -31,8 +31,10 @@ sub rpm_cmp_versions { $s1 =~ s/^[^a-zA-Z0-9]+//; $s2 =~ s/^[^a-zA-Z0-9]+//; if ($s1 =~ /^\d/ || $s2 =~ /^\d/) { - $s1 =~ s/^0*(\d*)//; $x1 = $1; - $s2 =~ s/^0*(\d*)//; $x2 = $1; + $s1 =~ s/^(0*(\d*))//; $x1 = $2; + return -1 if $1 eq ''; + $s2 =~ s/^(0*(\d*))//; $x2 = $2; + return 1 if $1 eq ''; $r = length $x1 <=> length $x2 || $x1 cmp $x2; } else { $s1 =~ s/^([a-zA-Z]*)//; $x1 = $1; @@ -57,11 +59,35 @@ sub rpm_cmp_versions { my $reorder = sub { return @_ }; my $key = 0; +my $test = 0; + +sub rpm_cmp_versions { + my ($evr1, $evr2) = @_; + + chomp($evr1, $evr2); + my $res1 = do_rpm_cmp_versions($evr1, $evr2); + if ($test) { + open(my $fd, '-|', 'zypper', '--terse', 'versioncmp', + $evr1, $evr2) or die "zypper: $!\n"; + my $res2 = <$fd>; + close($fd) or die "zypper: $!\n"; + chomp $res2; + if ($res1 != $res2) { + my @operators = qw(< == >); + my $op1 = $operators[$res1 + 1]; + my $op2 = $operators[$res2 + 1]; + + print STDERR "BUG: $evr1 $op1 $evr2 vs. zypper: $evr1 $op2 $evr2\n"; + } + } + return $res1; +} GetOptions ("r|reverse" => sub { $reorder = sub { return reverse @_ } }, - "k|key=i" => \$key) + "k|key=i" => \$key, + "test" => \$test) or do { - print STDERR "Usage\n"; + print STDERR "Usage $0 [-r, --reverse] [-k N, --key=N] [--test]\n"; exit 1; }; From b31fb43bf5ac3450d6426bd987b3e1f3635a16f43b53d66e04d27595e547e3a3 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 5 May 2011 07:31:28 +0000 Subject: [PATCH 122/137] Autobuild autoformatter for 69617 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=127 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index a8cf732..a7ef82e 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.8.0 -Release: 20 +Release: 21 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 30d0457..82a0d7d 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.8.0 -Release: 31 +Release: 32 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 43997482be1b2cd6d15d445a01042ee5764137f4c4501465d27c730fbc643c79 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 18 May 2011 15:08:31 +0000 Subject: [PATCH 123/137] Accepting request 70563 from Base:System -> OBS-URL: https://build.opensuse.org/request/show/70563 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=128 --- allowufdio.diff | 23 --- autodeps.diff | 42 ++-- backport.diff | 55 ------ brp.diff | 88 ++++----- brpcombress.diff => brpcompress.diff | 37 ++-- build.diff | 18 +- buildidprov.diff | 29 +-- chownwarn.diff | 72 ++++--- convertdb1static.diff | 29 +-- db-4.8.30.tar.bz2 | 3 + db.diff | 203 +++++-------------- dbfsync.diff | 54 ++---- dbprivate.diff | 26 ++- dbrointerruptable.diff | 67 +++---- debugedit-canon-fix.diff | 91 ++------- debugedit-comp-dir.diff | 20 +- debugedit.diff | 44 ++--- debuginfo-mono.patch | 8 +- debuglink.diff | 8 +- debugsource-package.diff | 23 +-- debugsubpkg.diff | 235 +++++++++++----------- defclean.diff | 16 -- diskspace.diff | 24 --- disttag-macro.diff | 12 +- emptyprep.diff | 13 ++ extcond.diff | 14 +- fileattrs.diff | 71 +++++++ files.diff | 28 +-- finddebuginfo-absolute-links.diff | 13 +- finddebuginfo.diff | 22 +-- findksyms.diff | 18 +- findlang.diff | 35 ++-- findsupplements.diff | 75 +++++++ fixsbits.diff | 47 ----- fontprovides.diff | 26 +-- headeradddb.diff | 55 ++++++ initscriptsprov.diff | 50 ++--- langnoc.diff | 30 ++- lazystatfs.diff | 244 +---------------------- localetag.diff | 19 +- luaroot.diff | 55 ------ macrosin.diff | 49 ++--- magic_and_path.diff | 31 +++ missingok.diff | 22 ++- modalias.diff | 54 +++--- modemuncher.diff | 16 -- nameversioncompare.diff | 37 ++-- no_rep_autop.diff | 12 ++ nobuildcolor.diff | 13 ++ nodefattr.diff | 17 -- nomagiccheck.diff | 13 ++ noprereqdeprec.diff | 22 ++- nosignature.diff | 23 --- nosource.diff | 36 ---- perlprov.diff | 18 +- pkgconfig-0.24.diff | 27 --- platformin.diff | 8 +- pythondeps.diff | 37 +--- readlineofi.diff | 10 - refreshtestarch.diff | 14 +- remove-brp-strips.diff | 12 +- remove-translations.diff | 6 +- repackage-nomd5.diff | 16 +- requires-ge-macro.diff | 8 +- resetdefattr.diff | 55 ------ rpm-4.4.2.3-db.tar.bz2 | 3 - rpm-4.8.0.tar.bz2 | 3 - rpm-4.9.0.tar.bz2 | 3 + rpm-beecrypt.diff | 125 ++++++------ rpm-python.spec | 6 +- rpm-shorten-changelog.diff | 45 ++--- rpm.changes | 21 ++ rpm.spec | 158 +++++++-------- rpmdb-no-svc.diff | 19 -- rpmdb_get_open_flags.diff | 13 ++ rpmpopt.diff | 14 +- rpmqpack.diff | 40 ++-- rpmrctests.diff | 16 +- safemacro.diff | 21 ++ safeugid.diff | 279 ++++++++++++--------------- specfilemacro.diff | 8 +- suspendlock.diff | 185 +++++++++--------- taggedfileindex.diff | 193 ++---------------- tarrecordsize.diff | 17 -- verify_p.diff | 49 +++++ waitlock.diff | 167 ++++++++-------- weakdeps.diff | 169 ++++++++-------- whatrequires-doc.diff | 8 +- 88 files changed, 1679 insertions(+), 2481 deletions(-) delete mode 100644 allowufdio.diff delete mode 100644 backport.diff rename brpcombress.diff => brpcompress.diff (64%) create mode 100644 db-4.8.30.tar.bz2 delete mode 100644 defclean.diff delete mode 100644 diskspace.diff create mode 100644 emptyprep.diff create mode 100644 fileattrs.diff create mode 100644 findsupplements.diff delete mode 100644 fixsbits.diff create mode 100644 headeradddb.diff delete mode 100644 luaroot.diff create mode 100644 magic_and_path.diff delete mode 100644 modemuncher.diff create mode 100644 no_rep_autop.diff create mode 100644 nobuildcolor.diff delete mode 100644 nodefattr.diff create mode 100644 nomagiccheck.diff delete mode 100644 nosignature.diff delete mode 100644 nosource.diff delete mode 100644 pkgconfig-0.24.diff delete mode 100644 readlineofi.diff delete mode 100644 resetdefattr.diff delete mode 100644 rpm-4.4.2.3-db.tar.bz2 delete mode 100644 rpm-4.8.0.tar.bz2 create mode 100644 rpm-4.9.0.tar.bz2 delete mode 100644 rpmdb-no-svc.diff create mode 100644 rpmdb_get_open_flags.diff create mode 100644 safemacro.diff delete mode 100644 tarrecordsize.diff create mode 100644 verify_p.diff diff --git a/allowufdio.diff b/allowufdio.diff deleted file mode 100644 index 57b0c3b..0000000 --- a/allowufdio.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- ./build/pack.c.orig 2010-03-25 15:18:23.000000000 +0000 -+++ ./build/pack.c 2010-03-25 15:23:54.000000000 +0000 -@@ -375,7 +375,9 @@ rpmRC writeRPM(Header *hdrp, unsigned ch - const char *compr = NULL; - headerPutString(h, RPMTAG_PAYLOADFORMAT, "cpio"); - -- if (rstreq(s+1, "gzdio")) { -+ if (rstreq(s+1, "ufdio")) { -+ compr = NULL; -+ } else if (rstreq(s+1, "gzdio")) { - compr = "gzip"; - #if HAVE_BZLIB_H - } else if (rstreq(s+1, "bzdio")) { -@@ -398,7 +400,8 @@ rpmRC writeRPM(Header *hdrp, unsigned ch - goto exit; - } - -- headerPutString(h, RPMTAG_PAYLOADCOMPRESSOR, compr); -+ if (compr) -+ headerPutString(h, RPMTAG_PAYLOADCOMPRESSOR, compr); - buf = xstrdup(rpmio_flags); - buf[s - rpmio_flags] = '\0'; - headerPutString(h, RPMTAG_PAYLOADFLAGS, buf+1); diff --git a/autodeps.diff b/autodeps.diff index ffcf061..f8ad21f 100644 --- a/autodeps.diff +++ b/autodeps.diff @@ -1,9 +1,5 @@ -Some (probably SUSE specific) changes to linux.prov and linux.req - -Index: autodeps/linux.prov -=================================================================== ---- autodeps/linux.prov.orig -+++ autodeps/linux.prov +--- ./autodeps/linux.prov.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./autodeps/linux.prov 2011-05-11 14:27:40.000000000 +0000 @@ -2,60 +2,72 @@ # This script reads filenames from STDIN and outputs any relevant provides @@ -105,28 +101,20 @@ Index: autodeps/linux.prov + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" exit 0 -Index: autodeps/linux.req -=================================================================== ---- autodeps/linux.req.orig -+++ autodeps/linux.req -@@ -19,18 +19,22 @@ fi +--- ./autodeps/linux.req.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./autodeps/linux.req 2011-05-11 14:28:45.000000000 +0000 +@@ -19,18 +19,21 @@ fi # # --- Grab the file manifest and classify files. #filelist=`sed "s/['\"]/\\\&/g"` -filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"` --exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \ +-exelist=`echo $filelist | xargs -r file | grep -Ev ":.* (commands|script) " | \ - grep ":.*executable" | cut -d: -f1` -scriptlist=`echo $filelist | xargs -r file | \ -- egrep ":.* (commands|script) " | cut -d: -f1` +- grep -E ":.* (commands|script) " | cut -d: -f1` -liblist=`echo $filelist | xargs -r file | \ - grep ":.*shared object" | cut -d : -f1` -- --interplist= --perllist= --pythonlist= --tcllist= +#filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"` -+IFS=$'\n' +filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/')) +exelist=($(printf "%s\0" "${filelist[@]}" | xargs -0 -r file | \ + egrep -v ":.* (commands|script) " | \ @@ -135,7 +123,11 @@ Index: autodeps/linux.req + egrep ":.* (commands|script) " | cut -d: -f1)) +liblist=($(printf "%s\0" "${filelist[@]}" | xargs -0 -r file | \ + grep ":.*shared object" | cut -d : -f1)) -+ + +-interplist= +-perllist= +-pythonlist= +-tcllist= +interplist=() +perllist=() +pythonlist=() @@ -144,7 +136,7 @@ Index: autodeps/linux.req # # --- Alpha does not mark 64bit dependencies -@@ -42,12 +46,12 @@ esac +@@ -42,12 +45,12 @@ esac if [ "$needed" -eq 0 ]; then # # --- Executable dependency sonames. @@ -162,7 +154,7 @@ Index: autodeps/linux.req gsub(/'\''"/,"\\&",$1); printf "%s'$lib64'\n", $1 } -@@ -56,12 +60,12 @@ if [ "$needed" -eq 0 ]; then +@@ -56,12 +59,12 @@ if [ "$needed" -eq 0 ]; then # # --- Library dependency sonames. @@ -180,7 +172,7 @@ Index: autodeps/linux.req gsub(/'\''"/,"\\&",$1); printf "%s'$lib64'\n", $1 } -@@ -71,30 +75,30 @@ fi +@@ -71,30 +74,30 @@ fi # # --- Script interpreters. @@ -223,7 +215,7 @@ Index: autodeps/linux.req /^$/ { START=0; } /^Dynamic Section:$/ { START=1; } (START==1) && /NEEDED/ { -@@ -111,7 +115,7 @@ for f in $liblist $exelist ; do +@@ -111,7 +114,7 @@ for f in $liblist $exelist ; do sub(/:/, "", $3); LIBNAME=$3; } @@ -232,7 +224,7 @@ Index: autodeps/linux.req print LIBNAME "(" $4 ")'$lib64'"; } ' -@@ -119,17 +123,29 @@ done | sort -u +@@ -119,17 +122,29 @@ done | sort -u # # --- Perl modules. diff --git a/backport.diff b/backport.diff deleted file mode 100644 index 734f84f..0000000 --- a/backport.diff +++ /dev/null @@ -1,55 +0,0 @@ -A couple of fixes picked from upstream. - ---- ./lib/rpminstall.c.orig 2010-04-08 12:35:48.000000000 +0000 -+++ ./lib/rpminstall.c 2010-04-08 12:36:00.000000000 +0000 -@@ -458,7 +458,7 @@ restart: - case URL_IS_HTTPS: - case URL_IS_HTTP: - case URL_IS_FTP: -- { char *tfn; -+ { char *tfn = NULL; - FD_t tfd; - - if (rpmIsVerbose()) ---- ./lib/transaction.c.orig 2010-04-08 12:33:22.000000000 +0000 -+++ ./lib/transaction.c 2010-04-08 12:35:00.000000000 +0000 -@@ -183,6 +183,10 @@ static void rpmtsUpdateDSI(const rpmts t - - if (fixupSize) - dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize); -+ -+ /* adjust bookkeeping when requirements shrink */ -+ if (dsi->bneeded < dsi->obneeded) dsi->obneeded = dsi->bneeded; -+ if (dsi->ineeded < dsi->oineeded) dsi->oineeded = dsi->ineeded; - } - - static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi) -@@ -231,7 +235,7 @@ static void rpmtsCheckDSIProblems(const - for (; dsi->bsize; dsi++) { - - if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) { -- if (dsi->bneeded != dsi->obneeded) { -+ if (dsi->bneeded > dsi->obneeded) { - if (!dsi->mntPoint) - rpmtsFindDSIMount(ts, dsi); - rpmpsAppend(ps, RPMPROB_DISKSPACE, -@@ -243,7 +247,7 @@ static void rpmtsCheckDSIProblems(const - } - - if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { -- if (dsi->ineeded != dsi->oineeded) { -+ if (dsi->ineeded > dsi->oineeded) { - if (!dsi->mntPoint) - rpmtsFindDSIMount(ts, dsi); - rpmpsAppend(ps, RPMPROB_DISKNODES, ---- ./lib/verify.c.orig 2010-04-08 12:36:09.000000000 +0000 -+++ ./lib/verify.c 2010-04-08 12:37:37.000000000 +0000 -@@ -348,7 +348,7 @@ static int verifyHeader(QVA_t qva, const - static const char *const aok = "."; - static const char *const unknown = "?"; - -- ec = (verifyResult != 0); -+ if (verifyResult) ec = 1; - - #define _verify(_RPMVERIFY_F, _C) \ - ((verifyResult & _RPMVERIFY_F) ? _C : aok) diff --git a/brp.diff b/brp.diff index 8eaf776..27fe6b5 100644 --- a/brp.diff +++ b/brp.diff @@ -1,9 +1,25 @@ SUSE specific brp script patches -Index: scripts/brp-lib64-linux -=================================================================== ---- /dev/null -+++ scripts/brp-lib64-linux +--- ./scripts/Makefile.am.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./scripts/Makefile.am 2011-05-11 14:31:45.000000000 +0000 +@@ -6,6 +6,7 @@ CLEANFILES = + + EXTRA_DIST = \ + brp-compress brp-python-bytecompile brp-java-gcjcompile \ ++ brp-lib64-linux brp-symlink \ + brp-strip brp-strip-comment-note brp-python-hardlink \ + brp-strip-shared brp-strip-static-archive \ + check-files check-prereqs \ +@@ -24,6 +25,7 @@ EXTRA_DIST = \ + + rpmconfig_SCRIPTS = \ + brp-compress brp-python-bytecompile brp-java-gcjcompile \ ++ brp-lib64-linux brp-symlink \ + brp-strip brp-strip-comment-note brp-python-hardlink \ + brp-strip-shared brp-strip-static-archive \ + check-files check-prereqs \ +--- ./scripts/brp-lib64-linux.orig 2011-05-11 14:30:08.000000000 +0000 ++++ ./scripts/brp-lib64-linux 2011-05-11 14:30:08.000000000 +0000 @@ -0,0 +1,42 @@ +#!/bin/bash +# script checks wether package is 64-bit clean @@ -47,23 +63,9 @@ Index: scripts/brp-lib64-linux + fi +done +exit 0 -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 +--- ./scripts/brp-strip-comment-note.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./scripts/brp-strip-comment-note 2011-05-11 14:30:08.000000000 +0000 +@@ -16,6 +16,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 {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ @@ -71,11 +73,19 @@ Index: scripts/brp-strip-comment-note + grep -v '/lib/modules/' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do note="-R .note" - if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ -Index: scripts/brp-symlink -=================================================================== ---- /dev/null -+++ scripts/brp-symlink + if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ +--- ./scripts/brp-strip.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./scripts/brp-strip 2011-05-11 14:30:08.000000000 +0000 +@@ -15,6 +15,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 2011-05-11 14:30:08.000000000 +0000 ++++ ./scripts/brp-symlink 2011-05-11 14:30:08.000000000 +0000 @@ -0,0 +1,184 @@ +#!/bin/sh + @@ -261,29 +271,3 @@ Index: scripts/brp-symlink +if test "$had_errors" = 1; then + exit 1 +fi -Index: scripts/Makefile.am -=================================================================== ---- scripts/Makefile.am.orig -+++ scripts/Makefile.am -@@ -6,8 +6,10 @@ CLEANFILES = - - EXTRA_DIST = \ - brp-compress brp-python-bytecompile brp-java-gcjcompile \ -+ brp-lib64-linux \ - brp-strip brp-strip-comment-note \ - brp-strip-shared brp-strip-static-archive \ -+ brp-symlink \ - check-files check-prereqs \ - check-buildroot check-rpaths check-rpaths-worker \ - find-debuginfo.sh find-lang.sh \ -@@ -24,8 +26,10 @@ EXTRA_DIST = \ - - rpmconfig_SCRIPTS = \ - brp-compress brp-python-bytecompile brp-java-gcjcompile \ -+ brp-lib64-linux \ - brp-strip brp-strip-comment-note \ - brp-strip-shared brp-strip-static-archive \ -+ brp-symlink \ - check-files check-prereqs \ - check-buildroot check-rpaths check-rpaths-worker \ - find-lang.sh \ diff --git a/brpcombress.diff b/brpcompress.diff similarity index 64% rename from brpcombress.diff rename to brpcompress.diff index 57e2383..07e5174 100644 --- a/brpcombress.diff +++ b/brpcompress.diff @@ -1,13 +1,6 @@ -Index: scripts/brp-compress -=================================================================== ---- scripts/brp-compress.orig -+++ scripts/brp-compress -@@ -1,56 +1,83 @@ --#!/bin/sh -+#!/bin/bash - - # If using normal root, avoid changing anything. - if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then +--- ./scripts/brp-compress.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./scripts/brp-compress 2011-05-11 14:44:21.000000000 +0000 +@@ -5,51 +5,78 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD exit 0 fi @@ -29,13 +22,13 @@ Index: scripts/brp-compress + inode=`ls -i $b | awk '{ print $1 }'` + others=`find $dir -type f -inum $inode` + for afile in $others ; do -+ [ "$afile" != "$b" ] && rm -f $afile ++ [ "$afile" != "$b" ] && rm -f "$afile" + done + + case $b in + *.Z|*.gz) gunzip $b ;; + *.bz2) bunzip2 $b ;; -+ *.xz|*.lzma) unxz $b ;; ++ *.xz|*.lzma) unxz $b ;; + esac + + type=${b##*.} @@ -50,21 +43,19 @@ Index: scripts/brp-compress ./usr/share/doc/*/man/man* ./usr/lib/*/man/man* do [ -d $d ] || continue -- for f in `find $d -type f` -+ find $d -type f | while read f +- for f in `find $d -type f ! -name dir` ++ find $d -type f ! -name dir | while read f do [ -f "$f" ] || continue -- [ "`basename $f`" = "dir" ] && continue -+ [ "`basename \"$f\"`" = "dir" ] && continue case "$f" in -- *.gz|*.Z) gunzip $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; -- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; -- *.xz|*.lzma) unxz $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; +- *.gz|*.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; +- *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;; +- *.xz|*.lzma) unxz -f $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; - *) b=$f;; -+ *.gz|*.Z) gunzip "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.\(gz\|Z\)$//'`";; -+ *.bz2) bunzip2 "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.bz2$//'`";; -+ *.xz|*.lzma) unxz "$f" || check_for_hard_link $d "$f"; b="`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`";; ++ *.gz|*.Z) gunzip "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; ++ *.bz2) bunzip2 "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.bz2$//'`;; ++ *.xz|*.lzma) unxz "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; + *) b="$f";; esac @@ -99,7 +90,7 @@ Index: scripts/brp-compress - ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT + l="`ls -l "$f" | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`" + rm -f "$f" -+ b="`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`" ++ b="`echo "$f" | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`" + ln -sf "$l$COMPRESS_EXT" "$b$COMPRESS_EXT" done done diff --git a/build.diff b/build.diff index 861aa1b..65d851b 100644 --- a/build.diff +++ b/build.diff @@ -1,9 +1,9 @@ Many changes to Makefiles/autogen and the like to make it build on SUSE systems. ---- ./configure.ac.orig 2010-03-24 16:35:40.000000000 +0000 -+++ ./configure.ac 2010-03-25 15:16:21.000000000 +0000 -@@ -1006,6 +1006,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm +--- ./configure.ac.orig 2011-05-11 14:27:32.000000000 +0000 ++++ ./configure.ac 2011-05-11 15:18:44.000000000 +0000 +@@ -850,6 +850,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;; mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;; m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;; @@ -11,7 +11,7 @@ on SUSE systems. sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;; sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;; *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; -@@ -1016,6 +1017,7 @@ esac +@@ -860,6 +861,7 @@ esac RPMCANONVENDOR="$build_vendor" case "${build_vendor}" in unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) @@ -19,7 +19,7 @@ on SUSE systems. test -f /etc/redhat-release && RPMCANONVENDOR=redhat test -f /etc/SuSE-release && RPMCANONVENDOR=suse test -f /etc/pld-release && RPMCANONVENDOR=pld -@@ -1028,6 +1030,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec +@@ -872,6 +874,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec esac RPMCANONOS="$host_os_noversion" RPMCANONGNU="$host_os_gnu" @@ -29,8 +29,8 @@ on SUSE systems. AC_SUBST(RPMCANONCOLOR) AC_SUBST(RPMCANONARCH) AC_SUBST(RPMCANONVENDOR) ---- ./db3/configure.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./db3/configure 2010-03-25 15:17:41.000000000 +0000 +--- ./db3/configure.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./db3/configure 2011-05-11 15:18:44.000000000 +0000 @@ -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% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`" @@ -43,8 +43,8 @@ on SUSE systems. mv Makefile Makefile.orig cat Makefile.orig | sed -e '/^install[:-]/c\ ---- ./installplatform.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./installplatform 2010-03-25 15:16:21.000000000 +0000 +--- ./installplatform.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./installplatform 2011-05-11 15:18:44.000000000 +0000 @@ -47,9 +47,9 @@ for SUBST in $SUBSTS ; do ARCH_INSTALL_POST='%{nil}' case "${ARCH}-${OS}" in diff --git a/buildidprov.diff b/buildidprov.diff index 6cbc765..fd5b417 100644 --- a/buildidprov.diff +++ b/buildidprov.diff @@ -1,7 +1,7 @@ From: Jan Blunck Subject: Let debuginfo packages provide the build-id -This patch let debuginfo packages provide build-id like follows: +This patch lets debuginfo packages provide build-id like follows: debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517 @@ -9,17 +9,8 @@ Users can therefore ask zypper to install the correct debuginfo package with: zypper install -C "debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517" -Signed-off-by: Jan Blunck ---- - autodeps/linux.prov | 8 ++++++++ - macros.in | 3 ++- - scripts/debuginfo.prov | 12 ++++++++++++ - 3 files changed, 22 insertions(+), 1 deletion(-) - -Index: autodeps/linux.prov -=================================================================== ---- autodeps/linux.prov.orig -+++ autodeps/linux.prov +--- ./autodeps/linux.prov.orig 2011-05-11 15:58:28.000000000 +0000 ++++ ./autodeps/linux.prov 2011-05-11 15:59:31.000000000 +0000 @@ -5,6 +5,9 @@ IFS=$'\n' filelist=($(cat)) @@ -42,11 +33,9 @@ Index: autodeps/linux.prov # --- Mono exes/dlls : ${MONO_PREFIX=/usr} if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then -Index: macros.in -=================================================================== ---- macros.in.orig -+++ macros.in -@@ -179,7 +179,8 @@ +--- ./macros.in.orig 2011-05-11 15:59:08.000000000 +0000 ++++ ./macros.in 2011-05-11 15:59:31.000000000 +0000 +@@ -182,7 +182,8 @@ %package debuginfo\ Summary: Debug information for package %{name}\ Group: Development/Debug\ @@ -56,10 +45,8 @@ Index: macros.in #Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ %description debuginfo\ This package provides debug information for package %{name}.\ -Index: scripts/debuginfo.prov -=================================================================== ---- /dev/null -+++ scripts/debuginfo.prov +--- ./scripts/debuginfo.prov.orig 2011-05-11 15:59:31.000000000 +0000 ++++ ./scripts/debuginfo.prov 2011-05-11 15:59:31.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + diff --git a/chownwarn.diff b/chownwarn.diff index 7d56a31..fccaa1a 100644 --- a/chownwarn.diff +++ b/chownwarn.diff @@ -1,28 +1,50 @@ -Warn the user if chown/fchown fails. +Do not abort if chown/chmod fails but the file is already correct -Index: lib/fsm.c -=================================================================== ---- lib/fsm.c.orig -+++ lib/fsm.c -@@ -2093,6 +2093,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS - break; - case FSM_CHOWN: - rc = chown(fsm->path, st->st_uid, st->st_gid); -+ if (rc < 0 && errno == EPERM) { -+ rpmlog(RPMLOG_WARNING, "can't chown %s (%s)\n", fsm->path, strerror(errno)); +--- ./lib/fsm.c.orig 2011-03-02 06:46:13.000000000 +0000 ++++ ./lib/fsm.c 2011-05-10 16:30:55.000000000 +0000 +@@ -1449,6 +1449,11 @@ static int fsmRename(FSM_t fsm) + static int fsmChown(FSM_t fsm) + { + int rc = chown(fsm->path, fsm->sb.st_uid, fsm->sb.st_gid); ++ if (rc < 0) { ++ struct stat st; ++ if (lstat(fsm->path, &st) == 0 && st.st_uid == fsm->sb.st_uid && st.st_gid == fsm->sb.st_gid) + rc = 0; -+ } - if (_fsm_debug && (stage & FSM_SYSCALL)) - rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", cur, - fsm->path, (int)st->st_uid, (int)st->st_gid, -@@ -2102,6 +2106,10 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS - case FSM_LCHOWN: - #if ! CHOWN_FOLLOWS_SYMLINK - rc = lchown(fsm->path, st->st_uid, st->st_gid); -+ if (rc < 0 && errno == EPERM) { -+ rpmlog(RPMLOG_WARNING, "can't lchown %s (%s)\n", fsm->path, strerror(errno)); ++ } + if (_fsm_debug && (FSM_CHOWN & FSM_SYSCALL)) + rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", fileStageString(FSM_CHOWN), + fsm->path, (int)fsm->sb.st_uid, (int)fsm->sb.st_gid, +@@ -1461,6 +1466,11 @@ static int fsmLChown(FSM_t fsm) + { + int rc = 0; + rc = lchown(fsm->path, fsm->sb.st_uid, fsm->sb.st_gid); ++ if (rc < 0) { ++ struct stat st; ++ if (lstat(fsm->path, &st) == 0 && st.st_uid == fsm->sb.st_uid && st.st_gid == fsm->sb.st_gid) + rc = 0; -+ } - if (_fsm_debug && (stage & FSM_SYSCALL)) - rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", cur, - fsm->path, (int)st->st_uid, (int)st->st_gid, ++ } + if (_fsm_debug && (FSM_LCHOWN & FSM_SYSCALL)) + rpmlog(RPMLOG_DEBUG, " %8s (%s, %d, %d) %s\n", fileStageString(FSM_LCHOWN), + fsm->path, (int)fsm->sb.st_uid, (int)fsm->sb.st_gid, +@@ -1472,6 +1482,11 @@ static int fsmLChown(FSM_t fsm) + static int fsmChmod(FSM_t fsm) + { + int rc = chmod(fsm->path, (fsm->sb.st_mode & 07777)); ++ if (rc < 0) { ++ struct stat st; ++ if (lstat(fsm->path, &st) == 0 && (st.st_mode & 07777) == (fsm->sb.st_mode & 07777)) ++ rc = 0; ++ } + if (_fsm_debug && (FSM_CHMOD & FSM_SYSCALL)) + rpmlog(RPMLOG_DEBUG, " %8s (%s, 0%04o) %s\n", fileStageString(FSM_CHMOD), + fsm->path, (unsigned)(fsm->sb.st_mode & 07777), +@@ -2033,6 +2048,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS + st->st_mtime = rpmfiFMtimeIndex(fi, fsm->ix); + rc = fsmUtime(fsm); + st->st_mtime = mtime; ++ /* utime error is not critical for directories */ ++ if (rc && S_ISDIR(st->st_mode)) ++ rc = 0; + } + #if WITH_CAP + if (!rc && !S_ISDIR(st->st_mode) && !getuid()) { diff --git a/convertdb1static.diff b/convertdb1static.diff index f1ead10..1b9e796 100644 --- a/convertdb1static.diff +++ b/convertdb1static.diff @@ -1,25 +1,21 @@ Build convertdb1, too. -Index: Makefile.am -=================================================================== ---- Makefile.am.orig -+++ Makefile.am -@@ -143,6 +143,10 @@ bin_PROGRAMS += rpmqpack +--- ./Makefile.am.orig 2011-05-11 15:15:27.000000000 +0000 ++++ ./Makefile.am 2011-05-11 15:18:21.000000000 +0000 +@@ -174,6 +174,10 @@ bin_PROGRAMS += rpmqpack rpmqpack_SOURCES = rpmqpack.c rpmqpack_LDADD = lib/librpm.la -+check_PROGRAMS += convertdb1 ++bin_PROGRAMS += convertdb1 +convertdb1_SOURCES = tools/convertdb1.c +convertdb1_LDADD = lib/librpm.la + rpmconfig_DATA = rpmrc rpmrc: $(top_srcdir)/rpmrc.in @$(SED) \ -Index: tools/convertdb1.c -=================================================================== ---- /dev/null -+++ tools/convertdb1.c -@@ -0,0 +1,346 @@ +--- tools/convertdb1.c.orig 2011-05-12 13:31:37.000000000 +0000 ++++ tools/convertdb1.c 2011-05-12 13:31:28.000000000 +0000 +@@ -0,0 +1,351 @@ +#if defined(HAVE_CONFIG_H) +#include "system.h" +const char *__progname; @@ -30,6 +26,7 @@ Index: tools/convertdb1.c +#endif + +#include ++#include +#include +#include +#include @@ -305,6 +302,7 @@ Index: tools/convertdb1.c + const char *name; + const char *version; + const char *release; ++ rpmts ts; + + if (argc != 2) + { @@ -321,7 +319,9 @@ Index: tools/convertdb1.c + /* speed things up */ + (void) rpmDefineMacro(NULL, "_rpmdb_rebuild %{nil}", -1); + -+ if (rpmdbOpen("/", &db, O_RDWR, 0644)) { ++ ts = rpmtsCreate(); ++ ++ if (rpmtsOpenDB(ts, O_RDWR)) { + fprintf(stderr, "could not open rpm database\n"); + exit(1); + } @@ -355,14 +355,15 @@ Index: tools/convertdb1.c + continue; + } + rpmdbFreeIterator(mi); -+ if (rpmdbAdd(db, -1, h, 0, 0)) ++ if (rpmtsHeaderAddDB(ts, h)) + { + fprintf(stderr, "could not add %s-%s-%s!\n", name, version, release); + } + headerFree(h); + } + Fclose(fd); -+ rpmdbClose(db); ++ rpmtsCloseDB(ts); ++ rpmtsFree(ts); + return 0; +} + diff --git a/db-4.8.30.tar.bz2 b/db-4.8.30.tar.bz2 new file mode 100644 index 0000000..b0fa0be --- /dev/null +++ b/db-4.8.30.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ba998b7451758928011878514c78b8a6f0fbfd49ebf5cc9f4269f4666414ab4 +size 19969243 diff --git a/db.diff b/db.diff index 741de66..0d389f0 100644 --- a/db.diff +++ b/db.diff @@ -1,179 +1,82 @@ ---- db/db/db.c -+++ db/db/db.c -@@ -591,6 +591,8 @@ __db_dbenv_mpool(dbp, fname, flags) - (F_ISSET(dbp, DB_AM_NOT_DURABLE) ? DB_TXN_NOT_DURABLE : 0), - 0, dbp->pgsize)) != 0) +--- db/db/db.c.orig 2010-04-12 20:25:22.000000000 +0000 ++++ db/db/db.c 2011-05-12 11:38:59.000000000 +0000 +@@ -646,6 +646,8 @@ __env_mpool(dbp, fname, flags) + MAKE_INMEM(dbp); return (ret); + } + if (LF_ISSET(DB_NOFSYNC) && mpf->mfp) + F_SET(mpf->mfp, MP_NOFSYNC); - return (0); - } ---- db/db/db_iface.c -+++ db/db/db_iface.c -@@ -1068,7 +1068,7 @@ __db_open_arg(dbp, txn, fname, dname, ty + /* + * Set the open flag. We use it to mean that the dbp has gone +--- db/db/db_iface.c.orig 2010-04-12 20:25:22.000000000 +0000 ++++ db/db/db_iface.c 2011-05-12 11:21:32.000000000 +0000 +@@ -1230,6 +1230,7 @@ __db_open_arg(dbp, txn, fname, dname, ty #define OKFLAGS \ - (DB_AUTO_COMMIT | DB_CREATE | DB_DIRTY_READ | DB_EXCL | \ - DB_FCNTL_LOCKING | DB_NO_AUTO_COMMIT | DB_NOMMAP | DB_RDONLY | \ -- DB_RDWRMASTER | DB_THREAD | DB_TRUNCATE | DB_WRITEOPEN) -+ DB_RDWRMASTER | DB_THREAD | DB_TRUNCATE | DB_WRITEOPEN | DB_NOFSYNC) - if ((ret = __db_fchk(dbenv, "DB->open", flags, OKFLAGS)) != 0) + (DB_AUTO_COMMIT | DB_CREATE | DB_EXCL | DB_FCNTL_LOCKING | \ + DB_MULTIVERSION | DB_NOMMAP | DB_NO_AUTO_COMMIT | DB_RDONLY | \ ++ DB_NOFSYNC | \ + DB_RDWRMASTER | DB_READ_UNCOMMITTED | DB_THREAD | DB_TRUNCATE) + if ((ret = __db_fchk(env, "DB->open", flags, OKFLAGS)) != 0) return (ret); - if (LF_ISSET(DB_EXCL) && !LF_ISSET(DB_CREATE)) ---- db/dbinc/db.in -+++ db/dbinc/db.in -@@ -260,6 +260,7 @@ struct __db_dbt { - #define DB_FCNTL_LOCKING 0x0002000 /* UNDOC: fcntl(2) locking. */ - #define DB_RDWRMASTER 0x0004000 /* UNDOC: allow subdb master open R/W */ - #define DB_WRITEOPEN 0x0008000 /* UNDOC: open with write lock. */ -+#define DB_NOFSYNC 0x0010000 /* UNDOC: don't fsync */ - - /* - * Flags private to DB_ENV->txn_begin. ---- db/dbinc/mp.h -+++ db/dbinc/mp.h -@@ -309,6 +309,7 @@ struct __mpoolfile { +--- db/dbinc/mp.h.orig 2010-04-12 20:25:22.000000000 +0000 ++++ db/dbinc/mp.h 2011-05-12 12:01:32.000000000 +0000 +@@ -467,6 +467,7 @@ struct __mpoolfile { #define MP_FAKE_UOC 0x080 /* Unlink_on_close field: fake flag. */ #define MP_NOT_DURABLE 0x100 /* File is not durable. */ #define MP_TEMP 0x200 /* Backing file is a temporary. */ -+#define MP_NOFSYNC 0x400 /* Don't fsync */ ++#define MP_NOFSYNC 0x400 /* Don't fsync */ u_int32_t flags; }; ---- db/dist/aclocal/options.ac -+++ db/dist/aclocal/options.ac -@@ -277,10 +277,6 @@ fi - - # Uniquename excludes C++, Java, RPC. - if test "$db_cv_uniquename" = "yes"; then -- if test "$db_cv_rpc" = "yes"; then -- AC_MSG_ERROR( -- [--with-uniquename is not compatible with --enable-rpc]) -- fi - if test "$db_cv_cxx" = "yes"; then - AC_MSG_ERROR( - [--with-uniquename is not compatible with --enable-cxx]) ---- db/dist/configure.ac -+++ db/dist/configure.ac -@@ -690,14 +690,14 @@ LTLIBOBJS=`echo "$LIB@&t@OBJS" | - AC_SUBST(LTLIBOBJS) - - # Initial output file list. --CREATE_LIST="Makefile -- db_cxx.h:$srcdir/../dbinc/db_cxx.in -- db_int.h:$srcdir/../dbinc/db_int.in -+CREATE_LIST="Makefile \ -+ db_cxx.h:$srcdir/../dbinc/db_cxx.in \ -+ db_int.h:$srcdir/../dbinc/db_int.in \ - include.tcl:$srcdir/../test/include.tcl" - - # MinGW needs win_db.h. - if test "$db_cv_mingw" = "yes"; then --CREATE_LIST="$CREATE_LIST -+CREATE_LIST="$CREATE_LIST \ - win_db.h:$srcdir/win_db.in" - fi - -@@ -705,10 +705,10 @@ fi - # prototypes, and, if configured for unique names, a list of #defines - # to do DB_VERSION_UNIQUE_NAME substitution. - if test "$db_cv_uniquename" = "yes"; then -- CREATE_LIST="$CREATE_LIST -+ CREATE_LIST="$CREATE_LIST \ - db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/ext_def.in:$srcdir/../dbinc_auto/ext_prot.in" - else -- CREATE_LIST="$CREATE_LIST -+ CREATE_LIST="$CREATE_LIST \ - db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/ext_prot.in" - fi - -@@ -716,7 +716,7 @@ fi - # does the DB_VERSION_UNIQUE_NAME substitution), which is included by - # the db_int.h file. - if test "$db_cv_uniquename" = "yes"; then -- CREATE_LIST="$CREATE_LIST -+ CREATE_LIST="$CREATE_LIST \ - db_int_def.h:$srcdir/../dbinc_auto/int_def.in" - db_int_def='#include "db_int_def.h"' - fi -@@ -726,12 +726,12 @@ fi - # of #defines to do DB_VERSION_UNIQUE_NAME substitution. - if test "$db_cv_compat185" = "yes"; then - if test "$db_cv_uniquename" = "yes"; then -- CREATE_LIST="$CREATE_LIST -- db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in -+ CREATE_LIST="$CREATE_LIST \ -+ db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in \ - db185_int.h:$srcdir/../db185/db185_int.in:$srcdir/../dbinc_auto/ext_185_def.in:$srcdir/../dbinc_auto/ext_185_prot.in" - else -- CREATE_LIST="$CREATE_LIST -- db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_prot.in -+ CREATE_LIST="$CREATE_LIST \ -+ db_185.h:$srcdir/../dbinc/db_185.in:$srcdir/../dbinc_auto/ext_185_prot.in \ - db185_int.h:$srcdir/../db185/db185_int.in:$srcdir/../dbinc_auto/ext_185_prot.in" - fi - fi ---- db/dist/s_config -+++ db/dist/s_config +--- db/dbinc_auto/api_flags.in.orig 2011-05-12 11:40:57.000000000 +0000 ++++ db/dbinc_auto/api_flags.in 2011-05-12 11:55:10.000000000 +0000 +@@ -83,6 +83,7 @@ + #define DB_NOORDERCHK 0x00000002 + #define DB_NOPANIC 0x00000800 + #define DB_NO_AUTO_COMMIT 0x00001000 ++#define DB_NOFSYNC 0x00040000 + #define DB_ODDFILESIZE 0x00000080 + #define DB_ORDERCHKONLY 0x00000004 + #define DB_OVERWRITE 0x00001000 +--- db/dist/s_config.orig 2010-04-12 20:25:23.000000000 +0000 ++++ db/dist/s_config 2011-05-12 12:00:34.000000000 +0000 @@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3 . ./RELEASE echo "autoconf: building aclocal.m4..." --cat aclocal/*.ac aclocal_java/*.ac > aclocal.m4 -+cat aclocal/*.ac aclocal_java/*.ac > acinclude.m4 +-cat aclocal/*.m4 aclocal_java/*.m4 > aclocal.m4 ++cat aclocal/*.m4 aclocal_java/*.m4 > acinclude.m4 +aclocal echo "autoconf: running autoheader to build config.hin..." rm -f config.hin -@@ -20,14 +21,13 @@ rm -f configure - autoconf - - # Edit version information we couldn't pre-compute. --(echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" && -- echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" && -- echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" && -- echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" && -- echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" && -- echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" && -- echo "w" && -- echo "q") | ed configure -+sed -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \ -+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \ -+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \ -+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \ -+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ -+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \ -+ -i configure - - rm -rf autom4te.cache - chmod 555 configure ---- db/mp/mp_sync.c -+++ db/mp/mp_sync.c -@@ -553,7 +553,7 @@ done: /* - if (ret == 0 && (op == DB_SYNC_CACHE || op == DB_SYNC_FILE)) { +--- db/mp/mp_sync.c.orig 2010-04-12 20:25:34.000000000 +0000 ++++ db/mp/mp_sync.c 2011-05-12 11:36:58.000000000 +0000 +@@ -578,7 +578,7 @@ done: /* + if (ret == 0 && required_write) { if (dbmfp == NULL) - ret = __memp_sync_files(dbenv, dbmp); + ret = __memp_sync_files(env); - else -+ else if (!dbmfp->mfp || !F_ISSET(dbmfp->mfp, MP_NOFSYNC)) - ret = __os_fsync(dbenv, dbmfp->fhp); ++ else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC)) + ret = __os_fsync(env, dbmfp->fhp); } -@@ -600,7 +600,7 @@ int __memp_sync_files(dbenv, dbmp) - MUTEX_THREAD_LOCK(dbenv, dbmp->mutexp); - for (dbmfp = TAILQ_FIRST(&dbmp->dbmfq); - dbmfp != NULL; dbmfp = TAILQ_NEXT(dbmfp, q)) { -- if (dbmfp->mfp != mfp || F_ISSET(dbmfp, MP_READONLY)) -+ if (dbmfp->mfp != mfp || F_ISSET(dbmfp, MP_READONLY | MP_NOFSYNC)) - continue; - ret = __os_fsync(dbenv, dbmfp->fhp); - break; -@@ -662,6 +662,9 @@ __memp_mf_sync(dbmp, mfp) +@@ -665,7 +665,7 @@ __memp_sync_file(env, mfp, argp, countp, + "%s: unable to flush", (char *) + R_ADDR(dbmp->reginfo, mfp->path_off)); + } +- } else ++ } else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC)) + ret = __os_fsync(env, dbmfp->fhp); - dbenv = dbmp->dbenv; + /* +@@ -801,6 +801,8 @@ __memp_mf_sync(dbmp, mfp, locked) + COMPQUIET(hp, NULL); + env = dbmp->env; + if (F_ISSET(mfp, MP_NOFSYNC)) + return 0; -+ /* - * Expects caller to be holding the region lock: we're using the path - * name and __memp_nameop might try and rename the file. + * We need to be holding the hash lock: we're using the path name + * and __memp_nameop might try and rename the file. diff --git a/dbfsync.diff b/dbfsync.diff index 2326504..a71fb23 100644 --- a/dbfsync.diff +++ b/dbfsync.diff @@ -1,50 +1,24 @@ Support a database-local fsync setting. Needs berkeley db patch. ---- ./lib/backend/db3.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/backend/db3.c 2010-03-25 14:35:39.000000000 +0000 -@@ -62,10 +62,12 @@ static int db_fini(dbiIndex dbi, const c - return rc; - } +--- ./lib/backend/dbconfig.c.orig 2011-01-03 13:57:41.000000000 +0000 ++++ ./lib/backend/dbconfig.c 2011-05-10 17:00:29.000000000 +0000 +@@ -58,8 +58,10 @@ static const struct poptOption rdbOption + { "mp_size", 0,POPT_ARG_INT, &staticcfg.db_cachesize, 0, + NULL, NULL }, +#if 0 - static int db3_fsync_disable(int fd) - { - return 0; - } + { "nofsync", 0,POPT_ARG_NONE, &staticcfg.db_no_fsync, 0, + NULL, NULL }, +#endif - #if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 5) - /* -@@ -168,10 +170,12 @@ static int db_init(dbiIndex dbi, const c - xx = cvtdberr(dbi, "dbenv->set_cachesize", xx, _debug); - } - -+#if 0 - if (dbi->dbi_no_fsync) { - xx = db_env_set_func_fsync(db3_fsync_disable); - xx = cvtdberr(dbi, "db_env_set_func_fsync", xx, _debug); - } -+#endif - - if (dbi->dbi_shmkey) { - xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey); ---- ./lib/backend/dbconfig.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/backend/dbconfig.c 2010-03-25 14:35:39.000000000 +0000 -@@ -72,6 +72,8 @@ static const struct poptOption rdbOption + /* Per-dbi options */ + { "nommap", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOMMAP, +@@ -69,6 +71,8 @@ static const struct poptOption rdbOption NULL, NULL }, - { "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING, + { "lockdbfd", 0,POPT_ARG_NONE, &staticdbi.dbi_lockdbfd, 0, NULL, NULL }, -+ { "nofsync", 0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_NOFSYNC, ++ { "nofsync", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOFSYNC, + NULL, NULL }, - { "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE, - NULL, NULL }, -@@ -101,8 +103,6 @@ static const struct poptOption rdbOption - NULL, NULL }, - { "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0, - NULL, NULL }, -- { "nofsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_fsync, 0, -- NULL, NULL }, - { "nodbsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_dbsync, 0, - NULL, NULL }, - { "lockdbfd", 0,POPT_ARG_NONE, &db3dbi.dbi_lockdbfd, 0, + POPT_TABLEEND + }; diff --git a/dbprivate.diff b/dbprivate.diff index da64e54..48d3912 100644 --- a/dbprivate.diff +++ b/dbprivate.diff @@ -1,16 +1,14 @@ -Always use DB_PRIVATE. Should probably be configured instead. +Always use DB_PRIVATE. Unfortunately no longer configurable +in the macros file. -Index: lib/backend/db3.c -=================================================================== ---- lib/backend/db3.c.orig -+++ lib/backend/db3.c -@@ -804,6 +804,9 @@ static int db3open(rpmdb rpmdb, rpmTag r - */ - if (dbi->dbi_use_dbenv) { +--- lib/backend/db3.c.orig 2011-05-12 15:38:18.000000000 +0000 ++++ lib/backend/db3.c 2011-05-12 15:38:41.000000000 +0000 +@@ -119,7 +119,7 @@ static int db_init(rpmdb rdb, const char + int retry_open = 2; + struct _dbConfig * cfg = &rdb->cfg; + /* This is our setup, thou shall not have other setups before us */ +- uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB); ++ uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB|DB_PRIVATE); -+ /* always use fcntl lock */ -+ dbi->dbi_eflags |= DB_PRIVATE; -+ - if (access(dbhome, W_OK) == -1) { - - /* dbhome is unwritable, don't attempt DB_CREATE on DB->open ... */ + if (rdb->db_dbenv != NULL) { + rdb->db_opens++; diff --git a/dbrointerruptable.diff b/dbrointerruptable.diff index a9bc1c7..1fb0233 100644 --- a/dbrointerruptable.diff +++ b/dbrointerruptable.diff @@ -1,13 +1,11 @@ -Do not block signals if the database is opened read-only, it jst +Do not block signals if the database is opened read-only, it just annoys the users. [#48026] -Index: lib/rpmdb.c -=================================================================== ---- lib/rpmdb.c.orig -+++ lib/rpmdb.c -@@ -819,10 +819,12 @@ int rpmdbClose(rpmdb db) +--- ./lib/rpmdb.c.orig 2011-02-28 09:57:27.000000000 +0000 ++++ ./lib/rpmdb.c 2011-05-10 16:58:21.000000000 +0000 +@@ -623,10 +623,12 @@ int rpmdbClose(rpmdb db) + { rpmdb * prev, next; - int dbix; int rc = 0; + int dbmode; @@ -15,13 +13,18 @@ Index: lib/rpmdb.c goto exit; + dbmode = db->db_mode; - (void) rpmdbUnlink(db, RPMDBG_M("rpmdbClose")); + (void) rpmdbUnlink(db); if (db->nrefs > 0) -@@ -855,12 +857,14 @@ int rpmdbClose(rpmdb db) - - dbiTagsFree(); +@@ -655,11 +657,13 @@ int rpmdbClose(rpmdb db) + db = _free(db); + exit: +- (void) rpmsqEnable(-SIGHUP, NULL); +- (void) rpmsqEnable(-SIGINT, NULL); +- (void) rpmsqEnable(-SIGTERM,NULL); +- (void) rpmsqEnable(-SIGQUIT,NULL); +- (void) rpmsqEnable(-SIGPIPE,NULL); + if ((dbmode & (O_RDWR|O_WRONLY)) != 0) { + (void) rpmsqEnable(-SIGHUP, NULL); + (void) rpmsqEnable(-SIGINT, NULL); @@ -29,31 +32,25 @@ Index: lib/rpmdb.c + (void) rpmsqEnable(-SIGQUIT,NULL); + (void) rpmsqEnable(-SIGPIPE,NULL); + } - exit: -- (void) rpmsqEnable(-SIGHUP, NULL); -- (void) rpmsqEnable(-SIGINT, NULL); -- (void) rpmsqEnable(-SIGTERM,NULL); -- (void) rpmsqEnable(-SIGQUIT,NULL); -- (void) rpmsqEnable(-SIGPIPE,NULL); return rc; } -@@ -956,11 +960,13 @@ static int openDatabase(const char * pre - if (db == NULL) - return 1; - -- (void) rpmsqEnable(SIGHUP, NULL); -- (void) rpmsqEnable(SIGINT, NULL); -- (void) rpmsqEnable(SIGTERM,NULL); -- (void) rpmsqEnable(SIGQUIT,NULL); -- (void) rpmsqEnable(SIGPIPE,NULL); -+ if ((db->db_mode & (O_RDWR|O_WRONLY)) != 0) { -+ (void) rpmsqEnable(SIGHUP, NULL); -+ (void) rpmsqEnable(SIGINT, NULL); -+ (void) rpmsqEnable(SIGTERM,NULL); -+ (void) rpmsqEnable(SIGQUIT,NULL); -+ (void) rpmsqEnable(SIGPIPE,NULL); -+ } - - db->db_api = _dbapi; +@@ -721,11 +725,13 @@ static int openDatabase(const char * pre + /* Try to ensure db home exists, error out if we cant even create */ + rc = rpmioMkpath(rpmdbHome(db), 0755, getuid(), getgid()); + if (rc == 0) { +- (void) rpmsqEnable(SIGHUP, NULL); +- (void) rpmsqEnable(SIGINT, NULL); +- (void) rpmsqEnable(SIGTERM,NULL); +- (void) rpmsqEnable(SIGQUIT,NULL); +- (void) rpmsqEnable(SIGPIPE,NULL); ++ if ((db->db_mode & (O_RDWR|O_WRONLY)) != 0) { ++ (void) rpmsqEnable(SIGHUP, NULL); ++ (void) rpmsqEnable(SIGINT, NULL); ++ (void) rpmsqEnable(SIGTERM,NULL); ++ (void) rpmsqEnable(SIGQUIT,NULL); ++ (void) rpmsqEnable(SIGPIPE,NULL); ++ } + /* Just the primary Packages database opened here */ + rc = (rpmdbOpenIndex(db, RPMDBI_PACKAGES, db->db_flags) != NULL) ? 0 : -2; diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff index 8d6ad2a..2434272 100644 --- a/debugedit-canon-fix.diff +++ b/debugedit-canon-fix.diff @@ -3,14 +3,8 @@ Subject: Fix path canonicalization issues in debugedit This patch fixes multiple problems with path canonicalization in debugedit. This version of debugedit is taken from the dwarftools repository. ---- - tools/debugedit.c | 168 ++++++++++++++++++++++++++---------------------------- - 1 file changed, 82 insertions(+), 86 deletions(-) - -Index: tools/debugedit.c -=================================================================== ---- tools/debugedit.c.orig -+++ tools/debugedit.c +--- ./tools/debugedit.c.orig 2011-05-11 15:31:31.000000000 +0000 ++++ ./tools/debugedit.c 2011-05-11 15:54:49.000000000 +0000 @@ -158,7 +158,7 @@ strptr (DSO *dso, int sec, off_t offset) { if (data->d_buf @@ -20,7 +14,7 @@ Index: tools/debugedit.c return (const char *) data->d_buf + (offset - data->d_off); } } -@@ -488,9 +488,10 @@ static int +@@ -496,9 +496,10 @@ static int edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase) { unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir; @@ -32,15 +26,15 @@ Index: tools/debugedit.c unsigned char opcode_base; uint32_t value, dirt_cnt; size_t comp_dir_len = strlen (comp_dir); -@@ -534,6 +535,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -542,6 +543,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off return 1; } - + + line_base = (char) (ptr[2] & 0xff); opcode_base = ptr[4]; ptr = dir = ptr + 4 + opcode_base; - -@@ -545,13 +547,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off + +@@ -553,13 +555,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off ++value; } @@ -56,7 +50,7 @@ Index: tools/debugedit.c ptr = (unsigned char *) strchr ((char *)ptr, 0) + 1; } ptr++; -@@ -664,7 +666,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -672,7 +674,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off if (dest_dir) { @@ -65,7 +59,7 @@ Index: tools/debugedit.c size_t base_len = strlen (base_dir); size_t dest_len = strlen (dest_dir); size_t shrank = 0; -@@ -678,11 +680,14 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -686,11 +688,14 @@ edit_dwarf2_line (DSO *dso, uint32_t off ptr = dir; } else @@ -76,72 +70,15 @@ Index: tools/debugedit.c + } while (*srcptr != 0) { -- size_t len = strlen ((char *)srcptr) + 1; + size_t len = strlen ((char *)srcptr) + 1; - const unsigned char *readptr = srcptr; -+ size_t len = strlen ((char *)srcptr); + const char *readptr = srcptr; - if (*srcptr == '/' && has_prefix ((char *)srcptr, base_dir)) - { -@@ -691,42 +696,27 @@ edit_dwarf2_line (DSO *dso, uint32_t off - memcpy (ptr, dest_dir, dest_len); - ptr += dest_len; - readptr += base_len; -- } -+ } - srcptr += len; + char *orig = strdup ((const char *) srcptr); - shrank += srcptr - readptr; - canonicalize_path ((char *)readptr, (char *)ptr); -- len = strlen ((char *)ptr) + 1; -- shrank -= len; -- ptr += len; -+ len = strlen ((char *)ptr); - -- elf_flagdata (debug_sections[DEBUG_STR].elf_data, -- ELF_C_SET, ELF_F_DIRTY); -- } -+#ifdef DEBUG -+ if ((srcptr - readptr) > len) -+ error(0, 0,"canonicalization unexpectedly shrank (%lu): \"%s\"\n", -+ (long unsigned int)(srcptr - readptr) - len, ptr); -+#endif - -- if (shrank > 0) -- { -- if (--shrank == 0) -- error (EXIT_FAILURE, 0, -- "canonicalization unexpectedly shrank by one character"); -- else -- { -- memset (ptr, 'X', shrank); -- ptr += shrank; -- *ptr++ = '\0'; -- } -+ shrank -= len; -+ ptr += len; -+ elf_flagdata (debug_sections[DEBUG_STR].elf_data, -+ ELF_C_SET, ELF_F_DIRTY); -+ ++ptr; -+ ++srcptr; - } - -- if (abs_dir_cnt + abs_file_cnt != 0) -- { -- size_t len = (abs_dir_cnt + abs_file_cnt) * (base_len - dest_len); -- -- if (len == 1) -- error (EXIT_FAILURE, 0, "-b arg has to be either the same length as -d arg, or more than 1 char shorter"); -- memset (ptr, 'X', len - 1); -- ptr += len - 1; -- *ptr++ = '\0'; -- } - *ptr++ = '\0'; - ++srcptr; - -@@ -746,21 +736,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off - elf_flagdata (debug_sections[DEBUG_STR].elf_data, - ELF_C_SET, ELF_F_DIRTY); +@@ -756,21 +761,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off + } + dirty_section (DEBUG_STR); } - else if (ptr != srcptr) + else if ((char *)ptr != srcptr) diff --git a/debugedit-comp-dir.diff b/debugedit-comp-dir.diff index 5dd5ae9..288ed10 100644 --- a/debugedit-comp-dir.diff +++ b/debugedit-comp-dir.diff @@ -1,14 +1,8 @@ Include compilation directory in source file list if used. ---- - tools/debugedit.c | 28 +++++++++++++++++++++++++++- - 1 file changed, 27 insertions(+), 1 deletion(-) - -Index: tools/debugedit.c -=================================================================== ---- tools/debugedit.c.orig -+++ tools/debugedit.c -@@ -495,6 +495,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off +--- ./tools/debugedit.c.orig 2011-05-11 14:27:32.000000000 +0000 ++++ ./tools/debugedit.c 2011-05-11 15:31:31.000000000 +0000 +@@ -503,6 +503,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off uint32_t value, dirt_cnt; size_t comp_dir_len = strlen (comp_dir); size_t abs_file_cnt = 0, abs_dir_cnt = 0; @@ -16,7 +10,7 @@ Index: tools/debugedit.c if (phase != 0) return 0; -@@ -603,6 +604,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -611,6 +612,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off memcpy (p, dirt[value], dir_len); p[dir_len] = '/'; memcpy (p + dir_len + 1, file, file_len + 1); @@ -24,12 +18,10 @@ Index: tools/debugedit.c } canonicalize_path (s, s); if (list_file_fd != -1) -@@ -635,7 +637,31 @@ edit_dwarf2_line (DSO *dso, uint32_t off - read_uleb128 (ptr); +@@ -644,6 +646,30 @@ edit_dwarf2_line (DSO *dso, uint32_t off } ++ptr; -- -+ + + if (comp_dir_used && list_file_fd != -1 + && (base_dir == NULL || has_prefix (comp_dir, base_dir))) + { diff --git a/debugedit.diff b/debugedit.diff index cb4c499..ad9ec99 100644 --- a/debugedit.diff +++ b/debugedit.diff @@ -1,9 +1,25 @@ Make debugedit build without dwarf.h -Index: tools/debugedit.c -=================================================================== ---- tools/debugedit.c.orig -+++ tools/debugedit.c +--- ./Makefile.am.orig 2010-12-22 11:17:20.000000000 +0000 ++++ ./Makefile.am 2011-05-10 16:03:49.000000000 +0000 +@@ -143,7 +143,6 @@ rpm2cpio_LDADD += @WITH_NSS_LIB@ @WITH_P + + + if LIBELF +-if LIBDWARF + rpmconfig_SCRIPTS += scripts/find-debuginfo.sh + + rpmlibexec_PROGRAMS += debugedit +@@ -156,7 +155,6 @@ elfdeps_SOURCES = tools/elfdeps.c + elfdeps_LDADD = rpmio/librpmio.la + elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@ + endif +-endif + + rpmlibexec_PROGRAMS += javadeps + javadeps_SOURCES = tools/javadeps.c +--- ./tools/debugedit.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./tools/debugedit.c 2011-05-10 16:03:49.000000000 +0000 @@ -37,7 +37,37 @@ #include @@ -43,23 +59,3 @@ Index: tools/debugedit.c #include #include -Index: Makefile.am -=================================================================== ---- Makefile.am.orig -+++ Makefile.am -@@ -103,7 +103,6 @@ rpm2cpio_LDADD += @WITH_LIBELF_LIB@ @WIT - - - if LIBELF --if LIBDWARF - rpmconfig_SCRIPTS += scripts/find-debuginfo.sh - - rpmlibexec_PROGRAMS += debugedit -@@ -111,7 +110,6 @@ debugedit_SOURCES = tools/debugedit.c to - debugedit_LDADD = rpmio/librpmio.la - debugedit_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@ - endif --endif - - rpmlibexec_PROGRAMS += javadeps - javadeps_SOURCES = tools/javadeps.c diff --git a/debuginfo-mono.patch b/debuginfo-mono.patch index 32e1bfd..d877a73 100644 --- a/debuginfo-mono.patch +++ b/debuginfo-mono.patch @@ -1,8 +1,6 @@ -Index: scripts/find-debuginfo.sh -=================================================================== ---- scripts/find-debuginfo.sh.orig -+++ scripts/find-debuginfo.sh -@@ -210,6 +210,17 @@ while read nlinks inum f; do +--- ./scripts/find-debuginfo.sh.orig 2011-05-11 16:10:22.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2011-05-11 16:10:48.000000000 +0000 +@@ -211,6 +211,17 @@ while read nlinks inum f; do ;; *) continue ;; esac diff --git a/debuglink.diff b/debuglink.diff index 39892b5..4a97043 100644 --- a/debuglink.diff +++ b/debuglink.diff @@ -1,8 +1,6 @@ -Index: scripts/find-debuginfo.sh -=================================================================== ---- scripts/find-debuginfo.sh.orig 2009-07-27 12:06:41.000000000 +0200 -+++ scripts/find-debuginfo.sh 2009-07-27 12:08:05.000000000 +0200 -@@ -185,7 +185,8 @@ make_id_link() +--- ./scripts/find-debuginfo.sh.orig 2011-05-11 15:59:44.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2011-05-11 16:10:22.000000000 +0000 +@@ -186,7 +186,8 @@ make_id_link() get_debugfn() { dn=$(dirname "${1#$RPM_BUILD_ROOT}") diff --git a/debugsource-package.diff b/debugsource-package.diff index 17e4599..11eae89 100644 --- a/debugsource-package.diff +++ b/debugsource-package.diff @@ -3,16 +3,9 @@ Subject: Split sources for debugging into separate -debugsource package At the moment the -debuginfo package also include the sources where used to build the binary. The patches moves them into a separate package -debugsource. ---- - macros.in | 12 ++++++++++++ - scripts/find-debuginfo.sh | 12 +++++++++--- - 2 files changed, 21 insertions(+), 3 deletions(-) - -Index: macros.in -=================================================================== ---- macros.in.orig -+++ macros.in -@@ -187,6 +187,18 @@ Debug information is useful when develop +--- ./macros.in.orig 2011-05-11 15:01:39.000000000 +0000 ++++ ./macros.in 2011-05-11 15:36:05.000000000 +0000 +@@ -190,6 +190,18 @@ Debug information is useful when develop package or when debugging this package.\ %files debuginfo -f debugfiles.list\ %defattr(-,root,root)\ @@ -31,11 +24,9 @@ Index: macros.in %{nil} %_defaultdocdir %{_datadir}/doc/packages -Index: scripts/find-debuginfo.sh -=================================================================== ---- scripts/find-debuginfo.sh.orig -+++ scripts/find-debuginfo.sh -@@ -186,8 +186,8 @@ set -o pipefail +--- ./scripts/find-debuginfo.sh.orig 2011-05-11 14:46:18.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2011-05-11 15:36:05.000000000 +0000 +@@ -187,8 +187,8 @@ set -o pipefail strict_error=ERROR $strict || strict_error=WARNING @@ -46,7 +37,7 @@ Index: scripts/find-debuginfo.sh xargs --no-run-if-empty -0 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 -@@ -297,10 +297,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o - +@@ -300,10 +300,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o - (cd "${RPM_BUILD_ROOT}/usr" test ! -d lib/debug || find lib/debug ! -type d diff --git a/debugsubpkg.diff b/debugsubpkg.diff index e6002df..2f9157e 100644 --- a/debugsubpkg.diff +++ b/debugsubpkg.diff @@ -1,6 +1,8 @@ ---- ./build/files.c.orig 2010-03-25 15:18:05.000000000 +0000 -+++ ./build/files.c 2010-03-25 15:21:26.000000000 +0000 -@@ -17,6 +17,10 @@ +Create a debuginfo package for each subpackage. + +--- ./build/files.c.orig 2011-05-13 15:34:01.000000000 +0000 ++++ ./build/files.c 2011-05-13 15:35:42.000000000 +0000 +@@ -20,6 +20,10 @@ #include /* rpmDoDigest() */ #include @@ -10,11 +12,12 @@ + #include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */ #include "rpmio/base64.h" - #include "rpmio/fts.h" -@@ -2230,12 +2234,136 @@ exit: + #include "misc/fts.h" +@@ -2105,13 +2109,237 @@ exit: return rc; } ++#if HAVE_GELF_H && HAVE_LIBELF +/* Query the build-id from the ELF file NAME and store it in the newly + allocated *build_id array of size *build_id_size. Returns -1 on + error. */ @@ -136,11 +139,111 @@ + 0 +}; + ++static void addDebuginfoPackage(rpmSpec spec, Package pkg, char *buildroot) ++{ ++ const char *a; + - int processBinaryFiles(rpmSpec spec, int installSpecialDoc, int test) ++ elf_version(EV_CURRENT); ++ a = headerGetString(pkg->header, RPMTAG_ARCH); ++ if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0) ++ { ++ Package dbg; ++ rpmfi fi = pkg->cpioList; ++ char tmp[1024]; ++ const char *name; ++ ARGV_t files = NULL; ++ int seen_build_id = 0; ++ ++ /* Check if the current package has files with debug info ++ and record them. */ ++ fi = rpmfiInit (fi, 0); ++ while (rpmfiNext (fi) >= 0) ++ { ++ const char *base; ++ int i; ++ unsigned char *build_id; ++ size_t build_id_size = 0; ++ struct stat sbuf; ++ ++ name = rpmfiFN (fi); ++ /* Skip leading buildroot. */ ++ base = name + strlen (buildroot); ++ /* Pre-pend %buildroot/usr/lib/debug and append .debug. */ ++ snprintf (tmp, 1024, "%s/usr/lib/debug%s.debug", ++ buildroot, base); ++ /* If that file exists we have debug information for it. */ ++ if (access (tmp, F_OK) != 0) ++ continue; ++ ++ /* Append the file list preamble. */ ++ if (!files) ++ { ++ argvAdd(&files, "%defattr(-,root,root)"); ++ argvAdd(&files, "%dir /usr/lib/debug"); ++ } ++ /* Add the files main debug-info file. */ ++ snprintf (tmp, 1024, "/usr/lib/debug/%s.debug", base); ++ argvAdd(&files, tmp); ++ ++ /* Do not bother to check build-ids for symbolic links. ++ We'll handle them for the link target. */ ++ if (lstat (name, &sbuf) == -1 ++ || S_ISLNK (sbuf.st_mode)) ++ continue; ++ ++ /* Try to gather the build-id from the binary. */ ++ if (getELFBuildId (name, &build_id, &build_id_size) == -1) ++ continue; ++ ++ /* If we see build-id links for the first time add the ++ directory. */ ++ if (!seen_build_id) ++ argvAdd(&files, "%dir /usr/lib/debug/.build-id"); ++ ++ /* From the build-id construct the two links pointing back ++ to the debug information file and the binary. */ ++ snprintf (tmp, 1024, "/usr/lib/debug/.build-id/%02x/", ++ build_id[0]); ++ for (i = 1; i < build_id_size; ++i) ++ sprintf (tmp + strlen (tmp), "%02x", build_id[i]); ++ argvAdd(&files, tmp); ++ sprintf (tmp + strlen (tmp), ".debug"); ++ argvAdd(&files, tmp); ++ ++ free (build_id); ++ } ++ ++ /* If there are debuginfo files for this package add a ++ new debuginfo package. */ ++ if (files) ++ { ++ dbg = newPackage (spec); ++ headerNVR (pkg->header, &name, NULL, NULL); ++ /* Set name, summary and group. */ ++ snprintf (tmp, 1024, "%s-debuginfo", name); ++ headerPutString(dbg->header, RPMTAG_NAME, tmp); ++ snprintf (tmp, 1024, "Debug information for package %s", name); ++ headerPutString(dbg->header, RPMTAG_SUMMARY, tmp); ++ snprintf (tmp, 1024, "This package provides debug information for package %s.\n" ++ "Debug information is useful when developing applications that use this\n" ++ "package or when debugging this package.", name); ++ headerPutString(dbg->header, RPMTAG_DESCRIPTION, tmp); ++ headerPutString(dbg->header, RPMTAG_GROUP, "Development/Debug"); ++ /* Inherit other tags from parent. */ ++ headerCopyTags (pkg->header, dbg->header, copyTagsForDebug); ++ ++ /* Build up the files list. */ ++ dbg->fileList = files; ++ } ++ } ++} ++#endif ++ + rpmRC processBinaryFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags, + int installSpecialDoc, int test) { Package pkg; - int rc = RPMRC_OK; + rpmRC rc = RPMRC_OK; + char *buildroot; check_fileList = newStringBuf(); @@ -148,122 +251,24 @@ genSourceRpmName(spec); for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -@@ -2250,8 +2378,110 @@ int processBinaryFiles(rpmSpec spec, int +@@ -2127,8 +2355,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr); free(nvr); -- if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK || +- if ((rc = processPackageFiles(spec, pkgFlags, pkg, installSpecialDoc, test)) != RPMRC_OK || - (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) -+ if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK) ++ if ((rc = processPackageFiles(spec, pkgFlags, pkg, installSpecialDoc, test)) != RPMRC_OK) + goto exit; -+ -+ /* BEGIN DEBUGPKG */ +#if HAVE_GELF_H && HAVE_LIBELF -+ elf_version(EV_CURRENT); -+ a = headerGetString(pkg->header, RPMTAG_ARCH); -+ if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0) -+ { -+ Package dbg; -+ rpmfi fi = pkg->cpioList; -+ char tmp[1024]; -+ const char *name; -+ StringBuf files = NULL; -+ int seen_build_id = 0; -+ -+ /* Check if the current package has files with debug info -+ and record them. */ -+ fi = rpmfiInit (fi, 0); -+ while (rpmfiNext (fi) >= 0) -+ { -+ const char *base; -+ int i; -+ unsigned char *build_id; -+ size_t build_id_size = 0; -+ struct stat sbuf; -+ -+ name = rpmfiFN (fi); -+ /* Skip leading buildroot. */ -+ base = name + strlen (buildroot); -+ /* Pre-pend %buildroot/usr/lib/debug and append .debug. */ -+ snprintf (tmp, 1024, "%s/usr/lib/debug%s.debug", -+ buildroot, base); -+ /* If that file exists we have debug information for it. */ -+ if (access (tmp, F_OK) != 0) -+ continue; -+ -+ /* Append the file list preamble. */ -+ if (!files) -+ { -+ files = newStringBuf(); -+ appendStringBuf(files, "%defattr(-,root,root)\n"); -+ appendStringBuf(files, "%dir /usr/lib/debug\n"); -+ } -+ /* Add the files main debug-info file. */ -+ snprintf (tmp, 1024, "/usr/lib/debug/%s.debug\n", base); -+ appendStringBuf(files, tmp); -+ -+ /* Do not bother to check build-ids for symbolic links. -+ We'll handle them for the link target. */ -+ if (lstat (name, &sbuf) == -1 -+ || S_ISLNK (sbuf.st_mode)) -+ continue; -+ -+ /* Try to gather the build-id from the binary. */ -+ if (getELFBuildId (name, &build_id, &build_id_size) == -1) -+ continue; -+ -+ /* If we see build-id links for the first time add the -+ directory. */ -+ if (!seen_build_id) -+ appendStringBuf(files, "%dir /usr/lib/debug/.build-id\n"); -+ -+ /* From the build-id construct the two links pointing back -+ to the debug information file and the binary. */ -+ snprintf (tmp, 1024, "/usr/lib/debug/.build-id/%02x/", -+ build_id[0]); -+ for (i = 1; i < build_id_size; ++i) -+ sprintf (tmp + strlen (tmp), "%02x", build_id[i]); -+ appendStringBuf(files, tmp); -+ appendStringBuf(files, "\n"); -+ appendStringBuf(files, tmp); -+ appendStringBuf(files, ".debug\n"); -+ -+ free (build_id); -+ } -+ -+ /* If there are debuginfo files for this package add a -+ new debuginfo package. */ -+ if (files) -+ { -+ dbg = newPackage (spec); -+ headerNVR (pkg->header, &name, NULL, NULL); -+ /* Set name, summary and group. */ -+ snprintf (tmp, 1024, "%s-debuginfo", name); -+ headerPutString(dbg->header, RPMTAG_NAME, tmp); -+ snprintf (tmp, 1024, "Debug information for package %s", name); -+ headerPutString(dbg->header, RPMTAG_SUMMARY, tmp); -+ snprintf (tmp, 1024, "This package provides debug information for package %s.\n" -+ "Debug information is useful when developing applications that use this\n" -+ "package or when debugging this package.", name); -+ headerPutString(dbg->header, RPMTAG_DESCRIPTION, tmp); -+ headerPutString(dbg->header, RPMTAG_GROUP, "Development/Debug"); -+ /* Inherit other tags from parent. */ -+ headerCopyTags (pkg->header, dbg->header, copyTagsForDebug); -+ -+ /* Build up the files list. */ -+ dbg->fileList = files; -+ } -+ } ++ addDebuginfoPackage(spec, pkg, buildroot); +#endif -+ /* END DEBUGPKG */ -+ + if ((rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) goto exit; a = headerGetString(pkg->header, RPMTAG_ARCH); ---- ./macros.in.orig 2010-03-25 15:21:20.000000000 +0000 -+++ ./macros.in 2010-03-25 15:21:26.000000000 +0000 -@@ -176,24 +176,10 @@ +--- ./macros.in.orig 2011-05-13 15:34:01.000000000 +0000 ++++ ./macros.in 2011-05-13 15:34:10.000000000 +0000 +@@ -179,24 +179,10 @@ # Template for debug information sub-package. %debug_package \ %global __debug_package 1\ @@ -288,9 +293,9 @@ %description debugsource\ This package provides debug sources for package %{name}.\ Debug sources are useful when developing applications that use this\ ---- ./scripts/find-debuginfo.sh.orig 2010-03-25 15:19:04.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2010-03-25 15:21:26.000000000 +0000 -@@ -275,19 +275,11 @@ while read nlinks inum f; do +--- ./scripts/find-debuginfo.sh.orig 2011-05-13 15:34:01.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2011-05-13 15:34:10.000000000 +0000 +@@ -277,19 +277,11 @@ while read nlinks inum f; do fi done || exit diff --git a/defclean.diff b/defclean.diff deleted file mode 100644 index 59ab7aa..0000000 --- a/defclean.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- ./build/parseSpec.c.orig 2010-03-25 15:19:16.000000000 +0000 -+++ ./build/parseSpec.c 2010-03-25 15:45:25.000000000 +0000 -@@ -562,6 +562,13 @@ int parseSpec(rpmts ts, const char *spec - free(body); - } - -+ if (spec->clean == NULL) { -+ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL); -+ spec->clean = newStringBuf(); -+ appendLineStringBuf(spec->clean, body); -+ free(body); -+ } -+ - /* Check for description in each package and add arch and os */ - { - char *platform = rpmExpand("%{_target_platform}", NULL); diff --git a/diskspace.diff b/diskspace.diff deleted file mode 100644 index 1744881..0000000 --- a/diskspace.diff +++ /dev/null @@ -1,24 +0,0 @@ -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/transaction.c.orig 2010-03-25 14:37:50.000000000 +0000 -+++ ./lib/transaction.c 2010-03-25 14:38:27.000000000 +0000 -@@ -212,7 +212,7 @@ static void rpmtsCheckDSIProblems(const - rpmpsAppend(ps, RPMPROB_DISKSPACE, - 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); - dsi->obneeded = dsi->bneeded; - } - } -@@ -222,7 +222,7 @@ static void rpmtsCheckDSIProblems(const - rpmpsAppend(ps, RPMPROB_DISKNODES, - rpmteNEVRA(te), rpmteKey(te), - ts->filesystems[i], NULL, NULL, -- (adj_fs_blocks(dsi->ineeded) - dsi->iavail)); -+ (adj_fs_blocks(dsi->ineeded))); - dsi->oineeded = dsi->ineeded; - } - } diff --git a/disttag-macro.diff b/disttag-macro.diff index c9dd0f2..795e52c 100644 --- a/disttag-macro.diff +++ b/disttag-macro.diff @@ -1,6 +1,8 @@ ---- ./build/parsePreamble.c.orig 2010-03-25 14:56:24.000000000 +0000 -+++ ./build/parsePreamble.c 2010-03-25 15:20:35.000000000 +0000 -@@ -312,6 +312,7 @@ static struct optionalTag { +Hmm, SUSE doesn't use it, so what's the purpose of this patch? + +--- ./build/parsePreamble.c.orig 2011-05-11 14:27:32.000000000 +0000 ++++ ./build/parsePreamble.c 2011-05-11 15:59:08.000000000 +0000 +@@ -485,6 +485,7 @@ static struct optionalTag { { RPMTAG_PACKAGER, "%{packager}" }, { RPMTAG_DISTRIBUTION, "%{distribution}" }, { RPMTAG_DISTURL, "%{disturl}" }, @@ -8,8 +10,8 @@ { RPMTAG_BUGURL, "%{bugurl}" }, { -1, NULL } }; ---- ./macros.in.orig 2010-03-25 15:18:50.000000000 +0000 -+++ ./macros.in 2010-03-25 15:19:25.000000000 +0000 +--- ./macros.in.orig 2011-05-11 15:38:44.000000000 +0000 ++++ ./macros.in 2011-05-11 15:59:08.000000000 +0000 @@ -279,6 +279,16 @@ package or when debugging this package.\ # #%bugurl diff --git a/emptyprep.diff b/emptyprep.diff new file mode 100644 index 0000000..1b53278 --- /dev/null +++ b/emptyprep.diff @@ -0,0 +1,13 @@ +Do not segfault if the prep section is empty + +--- build/parsePrep.c.orig 2011-05-13 16:22:59.000000000 +0000 ++++ build/parsePrep.c 2011-05-13 16:23:41.000000000 +0000 +@@ -518,7 +518,7 @@ int parsePrep(rpmSpec spec) + } + } + +- for (ARGV_const_t lines = saveLines; *lines; lines++) { ++ for (ARGV_const_t lines = saveLines; lines && *lines; lines++) { + res = 0; + if (rstreqn(*lines, "%setup", sizeof("%setup")-1)) { + res = doSetupMacro(spec, *lines); diff --git a/extcond.diff b/extcond.diff index 20e2eed..32d8e81 100644 --- a/extcond.diff +++ b/extcond.diff @@ -4,11 +4,9 @@ assumed to be true. This mechanism is used by the weakdeps patch to filter the "RPMSENSE_STRONG" flag. -Index: lib/headerfmt.c -=================================================================== ---- lib/headerfmt.c.orig -+++ lib/headerfmt.c -@@ -582,8 +582,12 @@ static int parseExpression(headerSprintf +--- ./lib/headerfmt.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./lib/headerfmt.c 2011-05-10 17:06:49.000000000 +0000 +@@ -568,8 +568,12 @@ static int parseExpression(headerSprintf *endPtr = chptr; @@ -21,7 +19,7 @@ Index: lib/headerfmt.c (void) findTag(hsa, token, str); return 0; -@@ -675,6 +679,7 @@ static char * singleSprintf(headerSprint +@@ -657,6 +661,7 @@ static char * singleSprintf(headerSprint int i, j, found; rpm_count_t count, numElements; sprintfToken spft; @@ -29,7 +27,7 @@ Index: lib/headerfmt.c int condNumFormats; size_t need; -@@ -705,6 +710,18 @@ static char * singleSprintf(headerSprint +@@ -687,6 +692,18 @@ static char * singleSprintf(headerSprint headerIsEntry(hsa->h, token->u.cond.tag.tag)) { spft = token->u.cond.ifFormat; condNumFormats = token->u.cond.numIfTokens; @@ -48,7 +46,7 @@ Index: lib/headerfmt.c } else { spft = token->u.cond.elseFormat; condNumFormats = token->u.cond.numElseTokens; -@@ -728,10 +745,13 @@ static char * singleSprintf(headerSprint +@@ -710,10 +727,13 @@ static char * singleSprintf(headerSprint for (i = 0; i < token->u.array.numTokens; i++, spft++) { rpmtd td = NULL; diff --git a/fileattrs.diff b/fileattrs.diff new file mode 100644 index 0000000..5722108 --- /dev/null +++ b/fileattrs.diff @@ -0,0 +1,71 @@ +--- ./fileattrs/Makefile.am.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/Makefile.am 2011-05-18 09:27:58.000000000 +0000 +@@ -6,6 +6,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs + + fattrs_DATA = \ + desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ +- pkgconfig.attr python.attr ocaml.attr script.attr mono.attr ++ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \ ++ debuginfo.attr elflib.attr firmware.attr gstreamer.attr ksyms.attr sysvinit.attr + + EXTRA_DIST = $(fattrs_DATA) +--- ./fileattrs/debuginfo.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/debuginfo.attr 2011-05-18 09:27:58.000000000 +0000 +@@ -0,0 +1,2 @@ ++%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov ++%__debuginfo_path ^/usr/lib/debug/ +--- ./fileattrs/desktop.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/desktop.attr 2011-05-18 09:27:58.000000000 +0000 +@@ -1,2 +1,2 @@ +-%__desktop_provides %{_rpmconfigdir}/desktop-file.prov +-%__desktop_path ^%{_datadir}/applications/.*\\.desktop$ ++%__desktop_provides %{_rpmconfigdir}/mimetypes.prov ++%__desktop_path .*\\.desktop$ +--- ./fileattrs/elf.attr.orig 2011-05-18 09:28:33.000000000 +0000 ++++ ./fileattrs/elf.attr 2011-05-18 09:33:20.000000000 +0000 +@@ -1,4 +1,5 @@ + %__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} + %__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} +-%__elf_magic ^ELF (32|64)-bit.*$ ++%__elf_magic ^ELF (32|64)-bit.*executable + %__elf_flags exeonly ++%__elf_exclude_path ^/usr/lib/debug/ +--- ./fileattrs/elflib.attr.orig 2011-05-18 09:28:23.000000000 +0000 ++++ ./fileattrs/elflib.attr 2011-05-18 09:31:30.000000000 +0000 +@@ -0,0 +1,4 @@ ++%__elflib_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} ++%__elflib_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} ++%__elflib_magic ^ELF (32|64)-bit.*shared object ++%__elflib_exclude_path ^/usr/lib/debug/ +--- ./fileattrs/firmware.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/firmware.attr 2011-05-18 09:27:58.000000000 +0000 +@@ -0,0 +1,2 @@ ++%__firmware_provides %{_rpmconfigdir}/firmware.prov ++%__firmware_path /lib/firmware/ +--- ./fileattrs/gstreamer.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/gstreamer.attr 2011-05-18 09:27:58.000000000 +0000 +@@ -0,0 +1,4 @@ ++%__gstreamer_provides %{_rpmconfigdir}/gstreamer-provides ++%__gstreamer_path libgst ++%__gstreamer_magic ELF.*shared object ++%__gstreamer_flags magic_and_path +--- ./fileattrs/ksyms.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/ksyms.attr 2011-05-18 09:27:58.000000000 +0000 +@@ -0,0 +1,4 @@ ++%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name ++%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name ++%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name ++%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$ +--- ./fileattrs/perl.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/perl.attr 2011-05-18 09:27:58.000000000 +0000 +@@ -1,3 +1,4 @@ +-%__perl_requires %{_rpmconfigdir}/perl.req ++# disabled for now ++#%__perl_requires %{_rpmconfigdir}/perl.req + %__perl_magic ^.*perl .*$ + %__perl_flags exeonly +--- ./fileattrs/sysvinit.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/sysvinit.attr 2011-05-18 09:27:58.000000000 +0000 +@@ -0,0 +1,2 @@ ++%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides ++%__sysvinit_path ^/etc/init\.d/ diff --git a/files.diff b/files.diff index a332314..32c6fa2 100644 --- a/files.diff +++ b/files.diff @@ -1,13 +1,17 @@ -Index: build/files.c -=================================================================== ---- build/files.c.orig -+++ build/files.c -@@ -2211,6 +2211,8 @@ static int checkFiles(StringBuf fileList - _("Installed (but unpackaged) file(s) found:\n%s"), t); - } - } -+ else -+ checkFiles(check_fileList); +Print "unpackaged files" section even if there was an error +in the filelist. + +--- ./build/files.c.orig 2011-05-11 15:27:11.000000000 +0000 ++++ ./build/files.c 2011-05-11 15:29:12.000000000 +0000 +@@ -2149,10 +2149,10 @@ rpmRC processBinaryFiles(rpmSpec spec, r + */ - exit: - sb_stdout = freeStringBuf(sb_stdout); + ++exit: + if (checkFiles(spec->buildRoot, check_fileList) > 0) { + rc = RPMRC_FAIL; + } +-exit: + check_fileList = freeStringBuf(check_fileList); + + return rc; diff --git a/finddebuginfo-absolute-links.diff b/finddebuginfo-absolute-links.diff index 20098fb..9cd08c7 100644 --- a/finddebuginfo-absolute-links.diff +++ b/finddebuginfo-absolute-links.diff @@ -6,15 +6,10 @@ do it right in the first place. So this patch changes find-debuginfo.sh scripts behavior to reflect that policy. Signed-off-by: Jan Blunck ---- - scripts/find-debuginfo.sh | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) -Index: b/scripts/find-debuginfo.sh -=================================================================== ---- scripts/find-debuginfo.sh -+++ scripts/find-debuginfo.sh -@@ -123,7 +123,17 @@ debug_link() +--- ./scripts/find-debuginfo.sh.orig 2011-05-11 15:36:05.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2011-05-11 15:58:17.000000000 +0000 +@@ -124,7 +124,17 @@ debug_link() local l="/usr/lib/debug$2" local t="$1" echo >> "$LINKSFILE" "$l $t" @@ -33,7 +28,7 @@ Index: b/scripts/find-debuginfo.sh } # Compare two binaries but ignore the .note.gnu.build-id section -@@ -157,8 +167,8 @@ make_id_link() +@@ -158,8 +168,8 @@ make_id_link() local other=$(readlink -m "$root_idfile") other=${other#$RPM_BUILD_ROOT} diff --git a/finddebuginfo.diff b/finddebuginfo.diff index 9cfe956..d382d24 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,12 +1,6 @@ ---- - scripts/find-debuginfo.sh | 69 +++++++++++++++++++++++++++++++++++----------- - 1 file changed, 53 insertions(+), 16 deletions(-) - -Index: scripts/find-debuginfo.sh -=================================================================== ---- scripts/find-debuginfo.sh.orig -+++ scripts/find-debuginfo.sh -@@ -126,6 +126,20 @@ debug_link() +--- ./scripts/find-debuginfo.sh.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2011-05-11 14:46:18.000000000 +0000 +@@ -127,6 +127,20 @@ debug_link() link_relative "$t" "$l" "$RPM_BUILD_ROOT" } @@ -27,7 +21,7 @@ Index: scripts/find-debuginfo.sh # Make a build-id symlink for id $1 with suffix $3 to file $2. make_id_link() { -@@ -144,7 +158,7 @@ make_id_link() +@@ -145,7 +159,7 @@ make_id_link() local other=$(readlink -m "$root_idfile") other=${other#$RPM_BUILD_ROOT} if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" || @@ -36,7 +30,7 @@ Index: scripts/find-debuginfo.sh # Two copies. Maybe one has to be setuid or something. echo >&2 "*** WARNING: identical binaries are copied, not linked:" echo >&2 " $file" -@@ -173,12 +187,18 @@ strict_error=ERROR +@@ -174,12 +188,18 @@ strict_error=ERROR $strict || strict_error=WARNING # Strip ELF binaries @@ -60,7 +54,7 @@ Index: scripts/find-debuginfo.sh get_debugfn "$f" [ -f "${debugfn}" ] && continue -@@ -199,8 +219,11 @@ while read nlinks inum f; do +@@ -200,8 +220,11 @@ while read nlinks inum f; do fi echo "extracting debug info from $f" @@ -74,7 +68,7 @@ Index: scripts/find-debuginfo.sh if [ -z "$id" ]; then echo >&2 "*** ${strict_error}: No build ID note found in $f" $strict && exit 2 -@@ -215,13 +238,25 @@ while read nlinks inum f; do +@@ -218,13 +241,25 @@ while read nlinks inum f; do esac mkdir -p "${debugdn}" @@ -107,7 +101,7 @@ Index: scripts/find-debuginfo.sh if [ -n "$id" ]; then make_id_link "$id" "$dn/$(basename $f)" -@@ -250,12 +285,14 @@ if [ -s "$SOURCEFILE" ]; then +@@ -253,12 +288,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 diff --git a/findksyms.diff b/findksyms.diff index 5b14c52..786cc91 100644 --- a/findksyms.diff +++ b/findksyms.diff @@ -1,16 +1,16 @@ SUSE specific kernel provides/requires scripts ---- ./scripts/Makefile.am.orig 2010-03-25 16:39:30.000000000 +0000 -+++ ./scripts/Makefile.am 2010-03-25 16:39:56.000000000 +0000 -@@ -18,6 +18,7 @@ EXTRA_DIST = \ - rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \ +--- ./scripts/Makefile.am.orig 2011-05-11 14:31:45.000000000 +0000 ++++ ./scripts/Makefile.am 2011-05-11 14:46:38.000000000 +0000 +@@ -16,6 +16,7 @@ EXTRA_DIST = \ + rpmdb_loadcvt rpm.daily rpm.log rpm2cpio.sh \ tcl.req tgpg vpkg-provides.sh \ find-requires.php find-provides.php \ + find-requires.ksyms find-provides.ksyms \ find-php-provides find-php-requires \ mono-find-requires mono-find-provides \ ocaml-find-requires.sh ocaml-find-provides.sh \ -@@ -34,6 +35,7 @@ rpmconfig_SCRIPTS = \ +@@ -32,6 +33,7 @@ rpmconfig_SCRIPTS = \ check-buildroot check-rpaths check-rpaths-worker \ find-lang.sh \ perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \ @@ -18,8 +18,8 @@ SUSE specific kernel provides/requires scripts mono-find-requires mono-find-provides \ pkgconfigdeps.sh libtooldeps.sh \ ocaml-find-requires.sh ocaml-find-provides.sh \ ---- ./scripts/find-provides.ksyms.orig 2010-03-25 16:39:56.000000000 +0000 -+++ ./scripts/find-provides.ksyms 2010-03-25 16:39:56.000000000 +0000 +--- ./scripts/find-provides.ksyms.orig 2011-05-11 14:46:38.000000000 +0000 ++++ ./scripts/find-provides.ksyms 2011-05-11 14:46:38.000000000 +0000 @@ -0,0 +1,41 @@ +#! /bin/sh + @@ -62,8 +62,8 @@ SUSE specific kernel provides/requires scripts + | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" +done \ +| sort -u ---- ./scripts/find-requires.ksyms.orig 2010-03-25 16:39:56.000000000 +0000 -+++ ./scripts/find-requires.ksyms 2010-03-25 16:39:56.000000000 +0000 +--- ./scripts/find-requires.ksyms.orig 2011-05-11 14:46:38.000000000 +0000 ++++ ./scripts/find-requires.ksyms 2011-05-11 14:46:38.000000000 +0000 @@ -0,0 +1,57 @@ +#! /bin/bash + diff --git a/findlang.diff b/findlang.diff index 3be64ba..51b9ab3 100644 --- a/findlang.diff +++ b/findlang.diff @@ -1,7 +1,5 @@ -Index: scripts/find-lang.sh -=================================================================== ---- scripts/find-lang.sh.orig -+++ scripts/find-lang.sh +--- ./scripts/find-lang.sh.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./scripts/find-lang.sh 2011-05-11 14:53:34.000000000 +0000 @@ -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 @@ -42,12 +40,12 @@ Index: scripts/find-lang.sh --with-qt ) QT= shift -@@ -97,33 +105,49 @@ while test $# -gt 0 ; do +@@ -97,33 +105,40 @@ while test $# -gt 0 ; do esac done +if ! test -s $MO_NAME ; then -+ echo "%defattr (644, root, root, 755)" > $MO_NAME ++ echo "%defattr (644, root, root, 755)" > $MO_NAME +fi + +MO_NAME_NEW=$MO_NAME.tmp.$$ @@ -55,21 +53,14 @@ Index: scripts/find-lang.sh + 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: +-'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: +-'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: ++'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3: ++'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) %doc \1\2\3: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' > $MO_NAME +/^$/d' >> $MO_NAME_NEW -+ -+find $TOP_DIR -type f -o -type l|sed ' -+s:'"$TOP_DIR"':: -+/\/share\/locale\//d -+'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\([^/]*\)\(.*\)/LC_MESSAGES/.*\.mo$:%lang(\2) %doc \1\2\3\4: -+'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\([^/]*\)\(.*\)/LC_MESSAGES/'"$NAME"'\.mo$:%lang(\2) %doc \1\2\3\4: -+s:^\([^%].*\):: -+s:%lang(C) :: -+/^ *$/d' >> $MO_NAME_NEW find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: @@ -99,7 +90,7 @@ Index: scripts/find-lang.sh find $TOP_DIR -type f|sed ' s:'"$TOP_DIR"':: -@@ -131,7 +155,7 @@ s:'"$TOP_DIR"':: +@@ -131,7 +146,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) :: @@ -108,7 +99,7 @@ Index: scripts/find-lang.sh KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null` if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then -@@ -143,7 +167,7 @@ s:'"$TOP_DIR"':: +@@ -143,7 +158,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -117,7 +108,7 @@ Index: scripts/find-lang.sh fi KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null` -@@ -156,7 +180,7 @@ s:'"$TOP_DIR"':: +@@ -156,7 +171,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -126,7 +117,7 @@ Index: scripts/find-lang.sh fi find $TOP_DIR -type f -o -type l|sed ' -@@ -168,7 +192,7 @@ s:'"$TOP_DIR"':: +@@ -168,7 +183,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: @@ -135,7 +126,7 @@ Index: scripts/find-lang.sh find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: -@@ -176,17 +200,22 @@ s:'"$TOP_DIR"':: +@@ -176,17 +191,22 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: s:%lang(C) :: diff --git a/findsupplements.diff b/findsupplements.diff new file mode 100644 index 0000000..83476d0 --- /dev/null +++ b/findsupplements.diff @@ -0,0 +1,75 @@ +Add support for supplements to the internal dependency +generator. + +--- build/rpmfc.c.orig 2011-05-13 16:54:26.000000000 +0000 ++++ build/rpmfc.c 2011-05-13 17:11:20.000000000 +0000 +@@ -54,6 +54,7 @@ struct rpmfc_s { + + rpmds provides; /*!< (no. provides) package provides */ + rpmds requires; /*!< (no. requires) package requires */ ++ rpmds supplements; /*!< (no. supplements) package supplements */ + }; + + struct rpmfcTokens_s { +@@ -481,6 +482,14 @@ static int rpmfcHelper(rpmfc fc, unsigne + dsContext = RPMSENSE_FIND_REQUIRES; + tagN = RPMTAG_REQUIRENAME; + break; ++ case 'S': ++ if (fc->skipProv) ++ return 0; ++ depname = "supplements"; ++ depsp = &fc->supplements; ++ dsContext = RPMSENSE_FIND_REQUIRES|RPMSENSE_STRONG|RPMSENSE_MISSINGOK; ++ tagN = RPMTAG_ENHANCESNAME; ++ break; + } + + /* If the entire path is filtered out, there's nothing more to do */ +@@ -752,6 +761,7 @@ rpmfc rpmfcFree(rpmfc fc) + + fc->provides = rpmdsFree(fc->provides); + fc->requires = rpmdsFree(fc->requires); ++ fc->supplements = rpmdsFree(fc->supplements); + } + fc = _free(fc); + return NULL; +@@ -804,6 +814,7 @@ rpmRC rpmfcApply(rpmfc fc) + for (ARGV_t fattr = fc->fattrs[fc->ix]; fattr && *fattr; fattr++) { + xx += rpmfcHelper(fc, 'P', *fattr); + xx += rpmfcHelper(fc, 'R', *fattr); ++ xx += rpmfcHelper(fc, 'S', *fattr); + } + } + +@@ -846,6 +857,11 @@ rpmRC rpmfcApply(rpmfc fc) + dix = rpmdsFind(fc->requires, ds); + ds = rpmdsFree(ds); + break; ++ case 'S': ++ ds = rpmdsSingle(RPMTAG_ENHANCESNAME, N, EVR, Flags); ++ dix = rpmdsFind(fc->supplements, ds); ++ ds = rpmdsFree(ds); ++ break; + } + + /* XXX assertion incorrect while generating -debuginfo deps. */ +@@ -1357,6 +1373,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec + } + } + ++ /* Add Supplements: */ ++ if (fc->supplements != NULL && rpmdsCount(fc->supplements) > 0 && !fc->skipReq) { ++ rpmds pi = rpmdsInit(fc->supplements); ++ while (rpmdsNext(pi) >= 0) { ++ rpmsenseFlags flags = rpmdsFlags(pi); ++ ++ headerPutString(pkg->header, RPMTAG_ENHANCESNAME, rpmdsN(pi)); ++ headerPutString(pkg->header, RPMTAG_ENHANCESVERSION, rpmdsEVR(pi)); ++ headerPutUint32(pkg->header, RPMTAG_ENHANCESFLAGS, &flags, 1); ++ } ++ } ++ + /* Add dependency dictionary(#dependencies) */ + if (rpmtdFromArgi(&td, RPMTAG_DEPENDSDICT, fc->ddictx)) { + assert(rpmtdType(&td) == RPM_INT32_TYPE); diff --git a/fixsbits.diff b/fixsbits.diff deleted file mode 100644 index e54690e..0000000 --- a/fixsbits.diff +++ /dev/null @@ -1,47 +0,0 @@ ---- ./lib/fsm.c.orig 2010-06-04 13:47:57.000000000 +0000 -+++ ./lib/fsm.c 2010-06-04 13:48:07.000000000 +0000 -@@ -1323,6 +1323,21 @@ static const char * rpmteTypeString(rpmt - } - } - -+static void removeSBITS(const char *path) -+{ -+ struct stat stb; -+ if (lstat(path, &stb) == 0 && S_ISREG(stb.st_mode)) { -+ if ((stb.st_mode & 06000) != 0) { -+ (void) chmod(path, stb.st_mode & 0777); -+ } -+#if WITH_CAP -+ if (stb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) { -+ (void) cap_set_file(path, NULL); -+ } -+#endif -+ } -+} -+ - #define IS_DEV_LOG(_x) \ - ((_x) != NULL && strlen(_x) >= (sizeof("/dev/log")-1) && \ - rstreqn((_x), "/dev/log", sizeof("/dev/log")-1) && \ -@@ -2027,11 +2042,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS - 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); -- } -+ if (fsm->mapFlags & CPIO_SBIT_CHECK) -+ removeSBITS(fsm->path); - rc = unlink(fsm->path); - if (_fsm_debug && (stage & FSM_SYSCALL)) - rpmlog(RPMLOG_DEBUG, " %8s (%s) %s\n", cur, -@@ -2040,6 +2052,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS - rc = (errno == ENOENT ? CPIOERR_ENOENT : CPIOERR_UNLINK_FAILED); - break; - case FSM_RENAME: -+ if (fsm->mapFlags & CPIO_SBIT_CHECK) -+ removeSBITS(fsm->path); - rc = rename(fsm->opath, fsm->path); - #if defined(ETXTBSY) && defined(__HPUX__) - if (rc && errno == ETXTBSY) { diff --git a/fontprovides.diff b/fontprovides.diff index 70d7537..cc60af8 100644 --- a/fontprovides.diff +++ b/fontprovides.diff @@ -1,5 +1,5 @@ ---- ./autodeps/linux.prov.orig 2010-04-08 14:52:42.000000000 +0000 -+++ ./autodeps/linux.prov 2010-04-08 15:04:37.000000000 +0000 +--- ./autodeps/linux.prov.orig 2011-05-11 16:39:09.000000000 +0000 ++++ ./autodeps/linux.prov 2011-05-11 16:40:49.000000000 +0000 @@ -16,6 +16,8 @@ tcllist= monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) @@ -26,9 +26,9 @@ # --- Kernel module exported symbols [ -x /usr/lib/rpm/find-provides.ksyms ] && printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" ---- ./autodeps/linux.req.orig 2010-04-08 15:01:18.000000000 +0000 -+++ ./autodeps/linux.req 2010-04-08 15:04:20.000000000 +0000 -@@ -35,6 +35,7 @@ perllist=() +--- ./autodeps/linux.req.orig 2011-05-11 16:39:09.000000000 +0000 ++++ ./autodeps/linux.req 2011-05-11 16:40:49.000000000 +0000 +@@ -34,6 +34,7 @@ perllist=() pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) tcllist=() monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) @@ -36,7 +36,7 @@ # # --- Alpha does not mark 64bit dependencies -@@ -144,6 +145,11 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo +@@ -143,6 +144,11 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo fi # @@ -48,17 +48,3 @@ # --- Kernel module imported symbols [ -x ${0%/*}/find-requires.ksyms ] && printf "%s\n" "${filelist[@]}" | ${0%/*}/find-requires.ksyms "$@" ---- ./scripts/fontconfig.prov.orig 2010-04-08 14:57:21.000000000 +0000 -+++ ./scripts/fontconfig.prov 2010-04-08 14:57:42.000000000 +0000 -@@ -12,7 +12,10 @@ - - fcquery=/usr/bin/fc-query - --[ -x $fcquery ] || exit 0 -+[ -x $fcquery ] || { -+ cat > /dev/null -+ exit 0 -+} - - # filter out anything outside main fontconfig path - grep /usr/share/fonts/ | diff --git a/headeradddb.diff b/headeradddb.diff new file mode 100644 index 0000000..af197df --- /dev/null +++ b/headeradddb.diff @@ -0,0 +1,55 @@ +Add rpmtsHeaderAddDB and rpmtsHeaderRemoveDB so that +convertdb1 will build again. + +--- lib/rpmts.c.orig 2011-05-12 13:21:03.000000000 +0000 ++++ lib/rpmts.c 2011-05-12 13:26:25.000000000 +0000 +@@ -159,6 +159,24 @@ int rpmtsVerifyDB(rpmts ts) + return rc; + } + ++int rpmtsHeaderAddDB(rpmts ts, Header h) ++{ ++ if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT))) ++ return RPMRC_FAIL; ++ if (rpmdbAdd(rpmtsGetRdb(ts), h) != 0) ++ return RPMRC_FAIL; ++ return RPMRC_OK; ++} ++ ++int rpmtsHeaderRemoveDB(rpmts ts, unsigned int hdrNum) ++{ ++ if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT))) ++ return RPMRC_FAIL; ++ if (rpmdbRemove(rpmtsGetRdb(ts), hdrNum) != 0) ++ return RPMRC_FAIL; ++ return RPMRC_OK; ++} ++ + /* keyp might no be defined. */ + rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, + const void * keyp, size_t keylen) +--- lib/rpmts.h.orig 2011-05-12 13:21:11.000000000 +0000 ++++ lib/rpmts.h 2011-05-12 13:28:32.000000000 +0000 +@@ -264,6 +264,22 @@ int rpmtsRebuildDB(rpmts ts); + int rpmtsVerifyDB(rpmts ts); + + /** \ingroup rpmts ++ * Add a header to the database used by the transaction. ++ * @param ts transaction set ++ * @param h header to add ++ * @return 0 on success ++ */ ++int rpmtsHeaderAddDB(rpmts ts, Header h); ++ ++/** \ingroup rpmts ++ * Remove a header from the database used by the transaction. ++ * @param ts transaction set ++ * @param hdrNum index of header to remove ++ * @return 0 on success ++ */ ++int rpmtsHeaderRemoveDB(rpmts ts, unsigned int hdrNum); ++ ++/** \ingroup rpmts + * Return transaction database iterator. + * @param ts transaction set + * @param rpmtag database index tag diff --git a/initscriptsprov.diff b/initscriptsprov.diff index 4a95d90..8a5c2f0 100644 --- a/initscriptsprov.diff +++ b/initscriptsprov.diff @@ -1,7 +1,5 @@ -Index: rpm-4.8.0/autodeps/linux.prov -=================================================================== ---- rpm-4.8.0.orig/autodeps/linux.prov 2010-12-08 15:16:12.984842683 +0100 -+++ rpm-4.8.0/autodeps/linux.prov 2010-12-08 15:16:52.530842661 +0100 +--- ./autodeps/linux.prov.orig 2011-05-11 16:45:13.000000000 +0000 ++++ ./autodeps/linux.prov 2011-05-11 16:51:10.000000000 +0000 @@ -107,4 +107,9 @@ fi [ -x /usr/lib/rpm/gstreamer-provides ] && printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/gstreamer-provides | sort -u @@ -12,14 +10,34 @@ Index: rpm-4.8.0/autodeps/linux.prov + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/sysvinitdeps.sh -P | sort -u + exit 0 -Index: rpm-4.8.0/scripts/sysvinitdeps.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ rpm-4.8.0/scripts/sysvinitdeps.sh 2010-12-08 15:17:11.183843303 +0100 -@@ -0,0 +1,13 @@ +--- ./scripts/Makefile.am.orig 2011-05-11 14:46:38.000000000 +0000 ++++ ./scripts/Makefile.am 2011-05-11 16:52:10.000000000 +0000 +@@ -22,6 +22,7 @@ EXTRA_DIST = \ + ocaml-find-requires.sh ocaml-find-provides.sh \ + pkgconfigdeps.sh libtooldeps.sh \ + fontconfig.prov desktop-file.prov script.req \ ++ sysvinitdeps.sh \ + macros.perl macros.php macros.python + + rpmconfig_SCRIPTS = \ +@@ -38,6 +39,7 @@ rpmconfig_SCRIPTS = \ + pkgconfigdeps.sh libtooldeps.sh \ + ocaml-find-requires.sh ocaml-find-provides.sh \ + fontconfig.prov desktop-file.prov script.req \ ++ sysvinitdeps.sh \ + rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg + + rpmconfig_DATA = \ +--- ./scripts/sysvinitdeps.sh.orig 2011-05-11 16:51:10.000000000 +0000 ++++ ./scripts/sysvinitdeps.sh 2011-05-11 16:54:33.000000000 +0000 +@@ -0,0 +1,17 @@ +#!/bin/sh + -+# -P blindly assumed ++[ "$1" = '-P' -o "$1" = '--provides' ] || { ++ cat > /dev/null ++ exit 0 ++} ++ +while read file; do + case $file in + */etc/init.d/*) @@ -30,15 +48,3 @@ Index: rpm-4.8.0/scripts/sysvinitdeps.sh + ;; + esac +done -Index: rpm-4.8.0/scripts/Makefile.am -=================================================================== ---- rpm-4.8.0.orig/scripts/Makefile.am 2010-12-08 15:16:12.985844013 +0100 -+++ rpm-4.8.0/scripts/Makefile.am 2010-12-08 15:16:52.531842720 +0100 -@@ -40,6 +40,7 @@ rpmconfig_SCRIPTS = \ - pkgconfigdeps.sh libtooldeps.sh \ - ocaml-find-requires.sh ocaml-find-provides.sh \ - fontconfig.prov desktop-file.prov \ -+ sysvinitdeps.sh \ - rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg - - rpmconfig_DATA = \ diff --git a/langnoc.diff b/langnoc.diff index e069a54..ab99287 100644 --- a/langnoc.diff +++ b/langnoc.diff @@ -1,6 +1,6 @@ ---- ./macros.in.orig 2010-10-28 13:57:37.000000000 +0000 -+++ ./macros.in 2010-10-29 12:35:39.000000000 +0000 -@@ -1381,6 +1381,7 @@ EOF +--- ./macros.in.orig 2011-05-11 15:59:44.000000000 +0000 ++++ ./macros.in 2011-05-11 16:45:30.000000000 +0000 +@@ -1247,6 +1247,7 @@ EOF # %files -f %{name}.lang # %find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot} @@ -8,8 +8,8 @@ # Commands + opts to use for retrieving remote files # Proxy opts can be set through --httpproxy/--httpport popt aliases, ---- ./scripts/find-lang.sh.orig 2010-10-28 13:44:49.000000000 +0000 -+++ ./scripts/find-lang.sh 2010-10-29 09:39:22.000000000 +0000 +--- ./scripts/find-lang.sh.orig 2011-05-11 14:53:34.000000000 +0000 ++++ ./scripts/find-lang.sh 2011-05-11 16:45:30.000000000 +0000 @@ -62,6 +62,8 @@ MO= MO_NAME=$NAME.lang ALL_NAME=# @@ -34,17 +34,15 @@ * ) MO_NAME=${1} shift -@@ -117,6 +127,8 @@ 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: +@@ -117,27 +127,32 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3: + '"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) %doc \1\2\3: s:^\([^%].*\):: +'"$ONLY_C"'/%lang(C)/!d +'"$NO_C"'/%lang(C)/d s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -131,22 +143,25 @@ s:%lang(C) :: - find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: -'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1: @@ -73,7 +71,7 @@ /^$/d' >> $MO_NAME_NEW find $TOP_DIR -type f|sed ' -@@ -154,6 +169,8 @@ s:'"$TOP_DIR"':: +@@ -145,6 +160,8 @@ s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1: '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: s:^[^%].*:: @@ -82,7 +80,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -166,6 +183,8 @@ s:'"$TOP_DIR"':: +@@ -157,6 +174,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: @@ -91,7 +89,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW fi -@@ -179,6 +198,8 @@ s:'"$TOP_DIR"':: +@@ -170,6 +189,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: @@ -100,7 +98,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW fi -@@ -191,6 +212,8 @@ s:'"$TOP_DIR"':: +@@ -182,6 +203,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}_[a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: s:^[^%].*:: @@ -109,7 +107,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -199,6 +222,8 @@ s:'"$TOP_DIR"':: +@@ -190,6 +213,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\):: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: @@ -118,7 +116,7 @@ s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -206,6 +231,8 @@ find $TOP_DIR -type f -o -type l|sed ' +@@ -197,6 +222,8 @@ 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:^\([^%].*\):: diff --git a/lazystatfs.diff b/lazystatfs.diff index 71389f3..5869a23 100644 --- a/lazystatfs.diff +++ b/lazystatfs.diff @@ -1,6 +1,7 @@ ---- ./configure.ac.orig 2010-03-25 15:16:21.000000000 +0000 -+++ ./configure.ac 2010-03-25 15:27:47.000000000 +0000 -@@ -510,25 +510,25 @@ dnl +Prefer sys/vfs.h, as statvfs stats all filesystems again +--- ./configure.ac.orig 2011-05-12 12:36:32.000000000 +0000 ++++ ./configure.ac 2011-05-12 12:36:42.000000000 +0000 +@@ -402,25 +402,25 @@ dnl found_struct_statfs=no if test X$found_struct_statfs = Xno ; then @@ -33,242 +34,17 @@ found_struct_statfs=yes],[]) fi ---- ./lib/transaction.c.orig 2010-03-25 15:14:38.000000000 +0000 -+++ ./lib/transaction.c 2010-03-25 15:44:25.000000000 +0000 -@@ -45,6 +45,7 @@ - #include "debug.h" - - struct diskspaceInfo_s { -+ const char *mntPoint; /*!< File system mount point */ - dev_t dev; /*!< File system device number. */ - int64_t bneeded; /*!< No. of blocks needed. */ - int64_t ineeded; /*!< No. of inodes needed. */ -@@ -61,83 +62,78 @@ struct diskspaceInfo_s { - - static int rpmtsInitDSI(const rpmts ts) - { -- rpmDiskSpaceInfo dsi; -- struct stat sb; -- int rc; -- int i; -- - if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE) - return 0; - -- rpmlog(RPMLOG_DEBUG, "mounted filesystems:\n"); -- rpmlog(RPMLOG_DEBUG, -- " i dev bsize bavail iavail mount point\n"); -- -- rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount); -- if (rc || ts->filesystems == NULL || ts->filesystemCount <= 0) -- return rc; -- -- /* Get available space on mounted file systems. */ -- - ts->dsi = _free(ts->dsi); -- ts->dsi = xcalloc((ts->filesystemCount + 1), sizeof(*ts->dsi)); -+ ts->dsi = xcalloc(1, sizeof(*ts->dsi)); -+ return 0; -+} - -- dsi = ts->dsi; -+static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, const char *dirName, int count) -+{ -+ rpmDiskSpaceInfo dsi; -+ struct stat sb; -+ int rc; - -- if (dsi != NULL) -- for (i = 0; (i < ts->filesystemCount) && dsi; i++, dsi++) { - #if STATFS_IN_SYS_STATVFS -- struct statvfs sfb; -- memset(&sfb, 0, sizeof(sfb)); -- rc = statvfs(ts->filesystems[i], &sfb); -+ struct statvfs sfb; -+ memset(&sfb, 0, sizeof(sfb)); -+ rc = statvfs(ts->filesystems[i], &sfb); - #else -- struct statfs sfb; -- memset(&sfb, 0, sizeof(sfb)); -+ struct statfs sfb; -+ memset(&sfb, 0, sizeof(sfb)); - # if STAT_STATFS4 - /* This platform has the 4-argument version of the statfs call. The last two - * should be the size of struct statfs and 0, respectively. The 0 is the - * filesystem type, and is always 0 when statfs is called on a mounted - * filesystem, as we're doing. - */ -- rc = statfs(ts->filesystems[i], &sfb, sizeof(sfb), 0); -+ rc = statfs(dirName, &sfb, sizeof(sfb), 0); - # else -- rc = statfs(ts->filesystems[i], &sfb); -+ rc = statfs(dirName, &sfb); - # endif - #endif -- if (rc) -- break; -+ if (rc) -+ return NULL; - -- rc = stat(ts->filesystems[i], &sb); -- if (rc) -- break; -- dsi->dev = sb.st_dev; -+ rc = stat(dirName, &sb); -+ if (rc) -+ return NULL; -+ if (sb.st_dev != dev) -+ return NULL; - -- dsi->bsize = sfb.f_bsize; -- dsi->bneeded = 0; -- dsi->ineeded = 0; -+ ts->dsi = xrealloc(ts->dsi, (count + 2) * sizeof(*ts->dsi)); -+ dsi = ts->dsi + count; -+ memset(dsi, 0, 2 * sizeof(*dsi)); -+ -+ dsi->dev = sb.st_dev; -+ dsi->bsize = sfb.f_bsize; -+ if (!dsi->bsize) -+ dsi->bsize = 512; /* we need a bsize */ -+ dsi->bneeded = 0; -+ dsi->ineeded = 0; +--- ./lib/transaction.c.orig 2011-05-12 12:36:55.000000000 +0000 ++++ ./lib/transaction.c 2011-05-12 12:38:03.000000000 +0000 +@@ -114,7 +114,11 @@ static rpmDiskSpaceInfo rpmtsCreateDSI(c + dsi->bneeded = 0; + dsi->ineeded = 0; #ifdef STATFS_HAS_F_BAVAIL -- dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail; +# ifdef ST_RDONLY -+ dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail; + dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail; +# else + dsi->bavail = sfb.f_bavail; +# endif #else /* FIXME: the statfs struct doesn't have a member to tell how many blocks are * available for non-superusers. f_blocks - f_bfree is probably too big, but - * it's about all we can do. - */ -- dsi->bavail = sfb.f_blocks - sfb.f_bfree; -+ dsi->bavail = sfb.f_blocks - sfb.f_bfree; - #endif -- /* XXX Avoid FAT and other file systems that have not inodes. */ -- /* XXX assigning negative value to unsigned type */ -- dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) -- ? sfb.f_ffree : -1; -- rpmlog(RPMLOG_DEBUG, -- "%5d 0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n", -- i, (unsigned) dsi->dev, dsi->bsize, -- dsi->bavail, dsi->iavail, -- ts->filesystems[i]); -- } -- return rc; -+ /* XXX Avoid FAT and other file systems that have not inodes. */ -+ /* XXX assigning negative value to unsigned type */ -+ dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) -+ ? sfb.f_ffree : -1; -+ return dsi; - } - --static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, -+static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName, - rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize, - rpmFileAction action) - { -@@ -148,8 +140,10 @@ static void rpmtsUpdateDSI(const rpmts t - if (dsi) { - while (dsi->bsize && dsi->dev != dev) - dsi++; -- if (dsi->bsize == 0) -- dsi = NULL; -+ if (dsi->bsize == 0) { -+ /* create new entry */ -+ dsi = rpmtsCreateDSI(ts, dev, dirName, dsi - ts->dsi); -+ } - } - if (dsi == NULL) - return; -@@ -187,31 +181,58 @@ static void rpmtsUpdateDSI(const rpmts t - dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize); - } - -+static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi) -+{ -+ int i; -+ struct stat sb; -+ -+ /* must leave chroot for this */ -+ if (rpmtsChrootDone(ts)) { -+ chroot("."); -+ } -+ if (!ts->filesystemCount) -+ rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount); -+ for (i = 0; i < ts->filesystemCount; i++) { -+ if (stat(ts->filesystems[i], &sb)) -+ continue; -+ if (sb.st_dev == dsi->dev) { -+ dsi->mntPoint = ts->filesystems[i]; -+ break; -+ } -+ } -+ if (i == ts->filesystemCount) { -+ /* file system not found, create something to display */ -+ dsi->mntPoint = xmalloc(20); -+ sprintf((char *)dsi->mntPoint, "dev 0x%08x", (unsigned)dsi->dev); -+ } -+ if (rpmtsChrootDone(ts)) { -+ chroot(ts->rootDir); -+ } -+} -+ - static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te) - { - rpmDiskSpaceInfo dsi; - rpmps ps; - int fc; -- int i; -- -- if (ts->filesystems == NULL || ts->filesystemCount <= 0) -- return; - - dsi = ts->dsi; -- if (dsi == NULL) -+ if (dsi == NULL || !dsi->bsize) - return; - fc = rpmfiFC(rpmteFI(te)); - if (fc <= 0) - return; - - ps = rpmtsProblems(ts); -- for (i = 0; i < ts->filesystemCount; i++, dsi++) { -+ for (; dsi->bsize; dsi++) { - - if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) { - if (dsi->bneeded != dsi->obneeded) { -+ if (!dsi->mntPoint) -+ rpmtsFindDSIMount(ts, dsi); - rpmpsAppend(ps, RPMPROB_DISKSPACE, - rpmteNEVRA(te), rpmteKey(te), -- ts->filesystems[i], NULL, NULL, -+ dsi->mntPoint, NULL, NULL, - (adj_fs_blocks(dsi->bneeded)) * dsi->bsize); - dsi->obneeded = dsi->bneeded; - } -@@ -219,9 +240,11 @@ static void rpmtsCheckDSIProblems(const - - if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { - if (dsi->ineeded != dsi->oineeded) { -+ if (!dsi->mntPoint) -+ rpmtsFindDSIMount(ts, dsi); - rpmpsAppend(ps, RPMPROB_DISKNODES, - rpmteNEVRA(te), rpmteKey(te), -- ts->filesystems[i], NULL, NULL, -+ dsi->mntPoint, NULL, NULL, - (adj_fs_blocks(dsi->ineeded))); - dsi->oineeded = dsi->ineeded; - } -@@ -543,7 +566,7 @@ assert(otherFi != NULL); - } - - /* Update disk space info for a file. */ -- rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi), -+ rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName, rpmfiFSize(fi), - rpmfiFReplacedSize(fi), fixupSize, rpmfsGetAction(fs, i)); - - } diff --git a/localetag.diff b/localetag.diff index e3bea98..c21a9cb 100644 --- a/localetag.diff +++ b/localetag.diff @@ -1,5 +1,8 @@ ---- ./lib/tagexts.c.orig 2010-01-08 08:14:37.000000000 +0000 -+++ ./lib/tagexts.c 2010-03-24 16:46:03.000000000 +0000 +Convert output to the current locale. Assumes utf8 input if the +decoding works, otherwise iso-8859-1. + +--- ./lib/tagexts.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./lib/tagexts.c 2011-05-10 16:05:30.000000000 +0000 @@ -2,6 +2,7 @@ * \file lib/formats.c */ @@ -8,7 +11,7 @@ #include "system.h" #include -@@ -157,6 +158,114 @@ exit: +@@ -150,6 +151,114 @@ exit: return rc; } @@ -121,10 +124,10 @@ +} + /** - * Retrieve mounted file system paths. + * Retrieve trigger info. * @param h header -@@ -533,10 +642,41 @@ static int i18nTag(Header h, rpmTag tag, - dstring = _free(dstring); +@@ -435,10 +544,41 @@ static int i18nTag(Header h, rpmTag tag, + #endif rc = headerGet(h, tag, td, HEADERGET_ALLOC); + if (rc && td->data) { @@ -165,7 +168,7 @@ * Retrieve summary text. * @param h header * @retval td tag data container -@@ -558,6 +698,16 @@ static int descriptionTag(Header h, rpmt +@@ -460,6 +600,16 @@ static int descriptionTag(Header h, rpmt return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags); } @@ -182,7 +185,7 @@ /** * Retrieve group text. * @param h header -@@ -791,6 +941,8 @@ static const struct headerTagFunc_s rpmH +@@ -677,6 +827,8 @@ static const struct headerTagFunc_s rpmH { RPMTAG_LONGARCHIVESIZE, longarchivesizeTag }, { RPMTAG_LONGSIZE, longsizeTag }, { RPMTAG_LONGSIGSIZE, longsigsizeTag }, diff --git a/luaroot.diff b/luaroot.diff deleted file mode 100644 index db5bff2..0000000 --- a/luaroot.diff +++ /dev/null @@ -1,55 +0,0 @@ ---- ./lib/psm.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/psm.c 2010-03-25 14:42:52.000000000 +0000 -@@ -455,6 +455,8 @@ static rpmRC runLuaScript(rpmpsm psm, He - #ifdef WITH_LUA - char *sname = NULL; - int rootFd = -1; -+ int chroot_done; -+ const char *rootDir; - int xx; - rpmlua lua = NULL; /* Global state. */ - rpmluav var; -@@ -463,6 +465,22 @@ static rpmRC runLuaScript(rpmpsm psm, He - - rpmlog(RPMLOG_DEBUG, "%s: %s running scriptlet.\n", - psm->stepName, sname); -+ chroot_done = rpmtsChrootDone(ts); -+ rootDir = rpmtsRootDir(ts); -+ if (!chroot_done) { -+ if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') { -+ xx = chdir("/"); -+ rootFd = open(".", O_RDONLY, 0); -+ if (rootFd >= 0) { -+ xx = chroot(rootDir); -+ xx = rpmtsSetChrootDone(ts, 1); -+ } -+ } -+ } else { -+ rootFd = open(".", O_RDONLY, 0); -+ } -+ xx = chdir("/"); -+ - if (!rpmtsChrootDone(ts)) { - const char *rootDir = rpmtsRootDir(ts); - xx = chdir("/"); -@@ -505,12 +523,17 @@ static rpmRC runLuaScript(rpmpsm psm, He - rpmluaDelVar(lua, "arg"); - - if (rootFd >= 0) { -- const char *rootDir = rpmtsRootDir(ts); - xx = fchdir(rootFd); - xx = close(rootFd); -- if (rootDir != NULL && !rstreq(rootDir, "/") && *rootDir == '/') -+ if (!chroot_done) { - xx = chroot("."); -- xx = rpmtsSetChrootDone(ts, 0); -+ xx = rpmtsSetChrootDone(ts, 0); -+ } -+ } -+ if (!chroot_done) { -+ const char *currDir = rpmtsCurrDir(ts); -+ if (currDir != NULL) -+ xx = chdir(currDir); - } - free(sname); - #else diff --git a/macrosin.diff b/macrosin.diff index a86e0ab..3c9fcb5 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -1,6 +1,6 @@ ---- ./macros.in.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./macros.in 2010-03-25 15:13:43.000000000 +0000 -@@ -175,22 +175,22 @@ +--- ./macros.in.orig 2011-01-03 13:57:41.000000000 +0000 ++++ ./macros.in 2011-05-12 14:32:18.000000000 +0000 +@@ -178,22 +178,22 @@ # Template for debug information sub-package. %debug_package \ @@ -52,7 +52,7 @@ # # Use internal dependency generator rather than external helpers? -%_use_internal_dependency_generator 1 -+%_use_internal_dependency_generator 0 ++%_use_internal_dependency_generator 1 # # Filter GLIBC_PRIVATE Provides: and Requires: @@ -79,32 +79,25 @@ +#%__find_supplements ??? +#%__find_enhances ??? + # + # Path to file attribute classifications for automatic dependency +@@ -533,12 +539,12 @@ print (t)\ # - # Path to scripts to autogenerate per-interpreter package dependencies. -@@ -644,15 +650,15 @@ print (t)\ - %_dbi_config_Packages %{_dbi_htconfig} lockdbfd - # "Depends" is a per-transaction cache of known dependency resolutions. --%_dbi_config_Depends %{_dbi_htconfig} temporary private -+%_dbi_config_Depends %{_dbi_htconfig} temporary private nofsync + # Misc BDB tuning options +-%__dbi_other mp_mmapsize=128Mb mp_size=64Mb ++%__dbi_other mp_mmapsize=128Mb mp_size=64Mb --%_dbi_config_Dirnames %{_dbi_btconfig} --%_dbi_config_Requireversion %{_dbi_btconfig} --%_dbi_config_Provideversion %{_dbi_btconfig} --%_dbi_config_Installtid %{_dbi_btconfig} --%_dbi_config_Removetid %{_dbi_btconfig} -+%_dbi_config_Dirnames %{_dbi_btconfig} nofsync -+%_dbi_config_Requireversion %{_dbi_btconfig} nofsync -+%_dbi_config_Provideversion %{_dbi_btconfig} nofsync -+%_dbi_config_Installtid %{_dbi_btconfig} nofsync -+%_dbi_config_Removetid %{_dbi_btconfig} nofsync +-%_dbi_config %{?__dbi_other} ++%_dbi_config %{?__dbi_other} nofsync --%_dbi_config %{_dbi_htconfig} -+%_dbi_config %{_dbi_htconfig} nofsync + # "Packages" should have shared/exclusive fcntl(2) lock using "lockdbfd". +-%_dbi_config_Packages %{?_dbi_config} lockdbfd ++%_dbi_config_Packages %{?__dbi_other} lockdbfd - # XXX legacy configuration. - # Choose db interface: -@@ -991,7 +997,7 @@ print (t)\ + #============================================================================== + # ---- GPG/PGP/PGP5 signature macros. +@@ -857,7 +863,7 @@ print (t)\ %_build_vendor %{_host_vendor} %_build_os %{_host_os} %_host @host@ @@ -113,7 +106,7 @@ %_host_cpu @host_cpu@ %_host_vendor @host_vendor@ %_host_os @host_os@ -@@ -1154,6 +1160,181 @@ done \ +@@ -1020,6 +1026,181 @@ done \ %python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))") %python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])") @@ -295,7 +288,7 @@ #------------------------------------------------------------------------------ # arch macro for all Intel i?86 compatibile processors # (Note: This macro (and it's analogues) will probably be obsoleted when -@@ -1164,7 +1345,9 @@ done \ +@@ -1030,7 +1211,9 @@ done \ #------------------------------------------------------------------------------ # arch macro for all supported ARM processors @@ -306,7 +299,7 @@ #------------------------------------------------------------------------------ # arch macro for all supported Sparc processors -@@ -1197,3 +1380,26 @@ done \ +@@ -1070,3 +1253,26 @@ done \ # \endverbatim #*/ diff --git a/magic_and_path.diff b/magic_and_path.diff new file mode 100644 index 0000000..8b3f5f2 --- /dev/null +++ b/magic_and_path.diff @@ -0,0 +1,31 @@ +Allow "magic_and_path" flag to configure that files must +match both regexpes to be sent to the dependency generator. + +--- build/rpmfc.c.orig 2011-05-16 10:46:20.000000000 +0000 ++++ build/rpmfc.c 2011-05-16 11:02:56.000000000 +0000 +@@ -613,6 +613,7 @@ static void rpmfcAttributes(rpmfc fc, co + const char *path = fullpath + fc->brlen; + int is_executable = 0; + struct stat st; ++ int magic_and_path; + if (stat(fullpath, &st) == 0) { + is_executable = (S_ISREG(st.st_mode)) && + (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)); +@@ -630,10 +631,13 @@ static void rpmfcAttributes(rpmfc fc, co + continue; + + /* Add attributes on libmagic type & path pattern matches */ +- if (regMatch((*attr)->magic, ftype)) +- argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name); +- if (regMatch((*attr)->path, path)) +- argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name); ++ if ((*attr)->magic && (*attr)->path && hasAttr((*attr)->flags, "magic_and_path")) { ++ if (regMatch((*attr)->magic, ftype) && regMatch((*attr)->path, path)) ++ argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name); ++ } else { ++ if (regMatch((*attr)->magic, ftype) || regMatch((*attr)->path, path)) ++ argvAddTokens(&fc->fattrs[fc->ix], (*attr)->name); ++ } + } + } + diff --git a/missingok.diff b/missingok.diff index 39285dd..7647696 100644 --- a/missingok.diff +++ b/missingok.diff @@ -1,6 +1,8 @@ ---- ./lib/depends.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/depends.c 2010-03-24 16:47:28.000000000 +0000 -@@ -450,8 +450,13 @@ retry: +support missingok dependency bit + +--- ./lib/depends.c.orig 2011-02-15 13:10:59.000000000 +0000 ++++ ./lib/depends.c 2011-05-10 16:06:39.000000000 +0000 +@@ -448,8 +448,13 @@ retry: } unsatisfied: @@ -15,14 +17,14 @@ + } exit: - if (cacheThis) { ---- ./lib/rpmds.h.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/rpmds.h 2010-03-24 16:47:28.000000000 +0000 -@@ -73,6 +73,7 @@ typedef enum rpmsenseFlags_e { + return rc; +--- ./lib/rpmds.h.orig 2011-05-10 16:09:22.000000000 +0000 ++++ ./lib/rpmds.h 2011-05-10 16:08:04.000000000 +0000 +@@ -68,6 +68,7 @@ typedef rpmFlags rpmsenseFlags; RPMSENSE_SCRIPT_POSTUN | \ RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_FIND_REQUIRES | \ + RPMSENSE_MISSINGOK | \ - RPMSENSE_SCRIPT_PREP | \ - RPMSENSE_SCRIPT_BUILD | \ - RPMSENSE_SCRIPT_INSTALL | \ + RPMSENSE_RPMLIB | \ + RPMSENSE_KEYRING | \ + RPMSENSE_PRETRANS | \ diff --git a/modalias.diff b/modalias.diff index b6dcff6..abcdefd 100644 --- a/modalias.diff +++ b/modalias.diff @@ -1,10 +1,6 @@ -SUSE specific find-supplements, used for kernel builds - -Index: macros.in -=================================================================== ---- macros.in.orig -+++ macros.in -@@ -473,14 +473,18 @@ print (t)\ +--- ./macros.in.orig 2011-05-11 14:57:08.000000000 +0000 ++++ ./macros.in 2011-05-11 15:01:39.000000000 +0000 +@@ -470,14 +470,18 @@ print (t)\ # # Path to scripts to autogenerate package dependencies, # @@ -25,30 +21,9 @@ Index: macros.in +%__find_supplements %{__set_helper_env}%{_rpmconfigdir}/find-supplements %name #%__find_enhances ??? - # -Index: scripts/find-supplements -=================================================================== ---- /dev/null -+++ scripts/find-supplements -@@ -0,0 +1,14 @@ -+#!/bin/bash -+ -+# This script reads filenames from STDIN and outputs any relevant provides -+# information that needs to be included in the package. -+IFS=$'\n' -+filelist=($(cat)) -+ -+# -+# --- Kernel module hardware identifiers -+# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*) -+[ -x /usr/lib/rpm/find-supplements.ksyms ] && -+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@" -+ -+exit 0 -Index: scripts/find-supplements.ksyms -=================================================================== ---- /dev/null -+++ scripts/find-supplements.ksyms + # +--- ./scripts/find-supplements.ksyms.orig 2011-05-11 15:01:39.000000000 +0000 ++++ ./scripts/find-supplements.ksyms 2011-05-11 15:01:39.000000000 +0000 @@ -0,0 +1,56 @@ +#! /bin/sh + @@ -106,3 +81,20 @@ Index: scripts/find-supplements.ksyms +done \ +| sort -u \ +| combine_modaliases +--- ./scripts/find-supplements.orig 2011-05-11 15:01:39.000000000 +0000 ++++ ./scripts/find-supplements 2011-05-11 15:01:39.000000000 +0000 +@@ -0,0 +1,14 @@ ++#!/bin/bash ++ ++# This script reads filenames from STDIN and outputs any relevant provides ++# information that needs to be included in the package. ++IFS=$'\n' ++filelist=($(cat)) ++ ++# ++# --- Kernel module hardware identifiers ++# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*) ++[ -x /usr/lib/rpm/find-supplements.ksyms ] && ++ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@" ++ ++exit 0 diff --git a/modemuncher.diff b/modemuncher.diff deleted file mode 100644 index f791f5e..0000000 --- a/modemuncher.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- luaext/modemuncher.c.orig 2010-03-26 09:43:45.000000000 +0000 -+++ luaext/modemuncher.c 2010-03-26 09:44:54.000000000 +0000 -@@ -245,11 +245,11 @@ printf("modemuncher: doneflag = %u\n", d - if (ch_mode) switch (op) - { - case '+': -- *mode = *mode |= ch_mode & affected_bits; -+ *mode |= ch_mode & affected_bits; - break; - - case '-': -- *mode = *mode &= ~(ch_mode & affected_bits); -+ *mode &= ~(ch_mode & affected_bits); - break; - - case '=': diff --git a/nameversioncompare.diff b/nameversioncompare.diff index 99b21f0..ebede1f 100644 --- a/nameversioncompare.diff +++ b/nameversioncompare.diff @@ -1,10 +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 2010-03-24 16:47:28.000000000 +0000 -+++ ./lib/depends.c 2010-03-24 16:52:00.000000000 +0000 -@@ -100,6 +100,24 @@ static int removePackage(rpmts ts, Heade - return 0; +--- ./lib/depends.c.orig 2011-05-12 12:20:01.000000000 +0000 ++++ ./lib/depends.c 2011-05-12 12:26:25.000000000 +0000 +@@ -95,6 +95,24 @@ static rpmdbMatchIterator rpmtsPrunedIte + return mi; } +static int rpmNameVersionCompare(Header first, Header second) @@ -12,23 +12,23 @@ two packages are the same. rh#104066 + const char * one, * two; + int rc; + -+ rc = headerGetEntry(first, RPMTAG_NAME, NULL, (void **) &one, NULL); -+ rc = headerGetEntry(second, RPMTAG_NAME, NULL, (void **) &two, NULL); ++ one = headerGetString(first, RPMTAG_NAME); ++ two = headerGetString(second, RPMTAG_NAME); + rc = strcmp(one, two); + if (rc) + return rc; -+ rc = headerGetEntry(first, RPMTAG_ARCH, NULL, (void **) &one, NULL); -+ rc = headerGetEntry(second, RPMTAG_ARCH, NULL, (void **) &two, NULL); ++ one = headerGetString(first, RPMTAG_ARCH); ++ two = headerGetString(second, RPMTAG_ARCH); + rc = strcmp(one, two); + if (rc) + return rc; + return rpmVersionCompare(first, second); +} + - int rpmtsAddInstallElement(rpmts ts, Header h, - fnpyKey key, int upgrade, rpmRelocation * relocs) - { -@@ -275,7 +293,7 @@ addheader: + #define skipColor(_tscolor, _color, _ocolor) \ + ((_tscolor) && (_color) && (_ocolor) && !((_color) & (_ocolor))) + +@@ -111,7 +129,7 @@ static void addUpgradeErasures(rpmts ts, continue; /* Skip packages that contain identical NEVR. */ @@ -36,18 +36,13 @@ two packages are the same. rh#104066 + if (rpmNameVersionCompare(h, oh) == 0) continue; - xx = removePackage(ts, oh, p); -@@ -316,11 +334,9 @@ addheader: + removePackage(ts, oh, p); +@@ -150,7 +168,7 @@ static void addObsoleteErasures(rpmts ts * If no obsoletes version info is available, match all names. */ if (rpmdsEVR(obsoletes) == NULL -- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { -+ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) { +- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { ++ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) { char * ohNEVRA = headerGetAsString(oh, RPMTAG_NEVRA); --#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */ -- if (rpmVersionCompare(h, oh)) --#endif -+ if (rpmNameVersionCompare(h, oh)) - xx = removePackage(ts, oh, p); rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n", rpmdsDNEVR(obsoletes)+2, ohNEVRA); diff --git a/no_rep_autop.diff b/no_rep_autop.diff new file mode 100644 index 0000000..4027c96 --- /dev/null +++ b/no_rep_autop.diff @@ -0,0 +1,12 @@ +It seems to be gone... + +--- lib/Makefile.am.orig 2011-05-12 12:59:42.000000000 +0000 ++++ lib/Makefile.am 2011-05-12 12:59:59.000000000 +0000 +@@ -126,7 +126,6 @@ rpmdb_printlog_LDADD = \ + $(top_builddir)/db3/fileops_autop.o \ + $(top_builddir)/db3/hash_autop.o \ + $(top_builddir)/db3/qam_autop.o \ +- $(top_builddir)/db3/rep_autop.o \ + $(top_builddir)/db3/txn_autop.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la diff --git a/nobuildcolor.diff b/nobuildcolor.diff new file mode 100644 index 0000000..ed58d0d --- /dev/null +++ b/nobuildcolor.diff @@ -0,0 +1,13 @@ +Disable file coloring for SUSE systems + +--- build/rpmfc.c.orig 2011-05-13 12:35:29.000000000 +0000 ++++ build/rpmfc.c 2011-05-13 13:49:37.000000000 +0000 +@@ -1312,7 +1312,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec + goto exit; + + /* Add per-file colors(#files) */ +- if (rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) { ++ if (rpmExpandNumeric("%{?_transaction_color}") != 0 && rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) { + rpm_color_t *fcolor; + assert(rpmtdType(&td) == RPM_INT32_TYPE); + /* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */ diff --git a/nodefattr.diff b/nodefattr.diff deleted file mode 100644 index d1fd124..0000000 --- a/nodefattr.diff +++ /dev/null @@ -1,17 +0,0 @@ -Revert upstream patch that always uses %defattr(-,root,root). -Upstream should probably use a macro instead. - -Index: build/files.c -=================================================================== ---- build/files.c.orig -+++ build/files.c -@@ -1793,7 +1793,9 @@ static rpmRC processPackageFiles(rpmSpec - - nullAttrRec(&fl.cur_ar); - nullAttrRec(&fl.def_ar); -+#if 0 - dupAttrRec(&root_ar, &fl.def_ar); /* XXX assume %defattr(-,root,root) */ -+#endif - - fl.defVerifyFlags = RPMVERIFY_ALL; - fl.nLangs = 0; diff --git a/nomagiccheck.diff b/nomagiccheck.diff new file mode 100644 index 0000000..1ae6ccf --- /dev/null +++ b/nomagiccheck.diff @@ -0,0 +1,13 @@ +Don't let rpm complain about a missing /etc/magic.mgc file + +--- build/rpmfc.c.orig 2011-05-13 16:33:20.000000000 +0000 ++++ build/rpmfc.c 2011-05-13 16:33:55.000000000 +0000 +@@ -896,7 +896,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t arg + { + ARGV_t fcav = NULL; + int xx; +- int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS; ++ int msflags = MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS; + magic_t ms = NULL; + rpmRC rc = RPMRC_FAIL; + diff --git a/noprereqdeprec.diff b/noprereqdeprec.diff index 7ac25c2..5d38711 100644 --- a/noprereqdeprec.diff +++ b/noprereqdeprec.diff @@ -1,20 +1,22 @@ ---- ./build/parsePreamble.c.orig 2010-04-07 14:52:57.000000000 +0000 -+++ ./build/parsePreamble.c 2010-04-07 14:53:51.000000000 +0000 -@@ -748,7 +748,7 @@ static struct PreambleRec_s const preamb +Not deprecated for SUSE builds. + +--- ./build/parsePreamble.c.orig 2011-05-11 15:59:08.000000000 +0000 ++++ ./build/parsePreamble.c 2011-05-11 16:35:47.000000000 +0000 +@@ -891,7 +891,7 @@ static struct PreambleRec_s const preamb {RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")}, {RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")}, - {RPMTAG_REQUIREFLAGS, 1, 0, LEN_AND_STR("requires")}, -- {RPMTAG_PREREQ, 1, 1, LEN_AND_STR("prereq")}, -+ {RPMTAG_PREREQ, 1, 0, LEN_AND_STR("prereq")}, + {RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")}, +- {RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")}, ++ {RPMTAG_PREREQ, 2, 0, LEN_AND_STR("prereq")}, {RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")}, {RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")}, {RPMTAG_PREFIXES, 0, 0, LEN_AND_STR("prefixes")}, -@@ -757,7 +757,7 @@ static struct PreambleRec_s const preamb +@@ -900,7 +900,7 @@ static struct PreambleRec_s const preamb {RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarchitectures")}, {RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarch")}, {RPMTAG_BUILDCONFLICTS, 0, 0, LEN_AND_STR("buildconflicts")}, -- {RPMTAG_BUILDPREREQ, 1, 1, LEN_AND_STR("buildprereq")}, -+ {RPMTAG_BUILDPREREQ, 1, 0, LEN_AND_STR("buildprereq")}, - {RPMTAG_BUILDREQUIRES, 1, 0, LEN_AND_STR("buildrequires")}, +- {RPMTAG_BUILDPREREQ, 0, 1, LEN_AND_STR("buildprereq")}, ++ {RPMTAG_BUILDPREREQ, 0, 0, LEN_AND_STR("buildprereq")}, + {RPMTAG_BUILDREQUIRES, 0, 0, LEN_AND_STR("buildrequires")}, {RPMTAG_AUTOREQPROV, 0, 0, LEN_AND_STR("autoreqprov")}, {RPMTAG_AUTOREQ, 0, 0, LEN_AND_STR("autoreq")}, diff --git a/nosignature.diff b/nosignature.diff deleted file mode 100644 index 0802056..0000000 --- a/nosignature.diff +++ /dev/null @@ -1,23 +0,0 @@ -Do not load keyring if signature checking is disabled. - ---- ./lib/package.c.orig 2010-04-09 09:56:42.000000000 +0000 -+++ ./lib/package.c 2010-04-09 09:57:50.000000000 +0000 -@@ -760,12 +760,16 @@ exit: - rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) - { - rpmRC rc; -- rpmKeyring keyring = rpmtsGetKeyring(ts, 1); - rpmVSFlags vsflags = rpmtsVSFlags(ts); -+ rpmKeyring keyring = 0; -+ -+ if ((vsflags & _RPMVSF_NOSIGNATURES) != _RPMVSF_NOSIGNATURES) -+ keyring = rpmtsGetKeyring(ts, 1); - - rc = rpmpkgRead(keyring, vsflags, fd, fn, hdrp); - -- rpmKeyringFree(keyring); -+ if (keyring) -+ rpmKeyringFree(keyring); - return rc; - } - diff --git a/nosource.diff b/nosource.diff deleted file mode 100644 index e824db0..0000000 --- a/nosource.diff +++ /dev/null @@ -1,36 +0,0 @@ -rpm does not allow headerPutUint32 on internal tags, so use -headerPut instead. (Maybe NOSOURCE/NOPATCH should not be internal -at all, though.) - ---- ./build/files.c.orig 2010-04-08 16:23:42.000000000 +0000 -+++ ./build/files.c 2010-04-08 16:23:44.000000000 +0000 -@@ -2088,15 +2088,25 @@ int processSourceFiles(rpmSpec spec) - if (srcPtr->flags & RPMBUILD_ISSOURCE) { - headerPutString(spec->sourceHeader, RPMTAG_SOURCE, srcPtr->source); - if (srcPtr->flags & RPMBUILD_ISNO) { -- headerPutUint32(spec->sourceHeader, RPMTAG_NOSOURCE, -- &srcPtr->num, 1); -+ struct rpmtd_s td; -+ rpmtdReset(&td); -+ td.tag = RPMTAG_NOSOURCE; -+ td.type = RPM_INT32_TYPE; -+ td.data = &srcPtr->num; -+ td.count = 1; -+ headerPut(spec->sourceHeader, &td, HEADERPUT_APPEND); - } - } - if (srcPtr->flags & RPMBUILD_ISPATCH) { - headerPutString(spec->sourceHeader, RPMTAG_PATCH, srcPtr->source); - if (srcPtr->flags & RPMBUILD_ISNO) { -- headerPutUint32(spec->sourceHeader, RPMTAG_NOSOURCE, -- &srcPtr->num, 1); -+ struct rpmtd_s td; -+ rpmtdReset(&td); -+ td.tag = RPMTAG_NOPATCH; -+ td.type = RPM_INT32_TYPE; -+ td.data = &srcPtr->num; -+ td.count = 1; -+ headerPut(spec->sourceHeader, &td, HEADERPUT_APPEND); - } - } - diff --git a/perlprov.diff b/perlprov.diff index 1f08b97..323c180 100644 --- a/perlprov.diff +++ b/perlprov.diff @@ -1,13 +1,13 @@ -Index: scripts/perl.prov -=================================================================== ---- scripts/perl.prov.orig -+++ scripts/perl.prov -@@ -167,7 +167,7 @@ sub process_file { - - $version= $1; +Support a "first version wins" semantics. + +--- ./scripts/perl.prov.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./scripts/perl.prov 2011-05-11 15:32:39.000000000 +0000 +@@ -170,7 +170,7 @@ sub process_file { + + $version = $1; } -- $require{$package}=$version; +- $require{$package} = $version; + $require{$package} ||= $version; } - + # Allow someone to have a variable that defines virtual packages diff --git a/pkgconfig-0.24.diff b/pkgconfig-0.24.diff deleted file mode 100644 index 02291fd..0000000 --- a/pkgconfig-0.24.diff +++ /dev/null @@ -1,27 +0,0 @@ -Index: ./scripts/pkgconfigdeps.sh -=================================================================== ---- ./scripts/pkgconfigdeps.sh -+++ ./scripts/pkgconfigdeps.sh -@@ -11,6 +11,13 @@ test -x $pkgconfig || { - exit 0 - } - -+`$pkgconfig --exists "pkg-config >= 0.24" 2> /dev/null` -+if [ $? -eq 0 ]; then -+ PRINT_REQUIRES="--print-requires --print-requires-private" -+else -+ PRINT_REQUIRES="--print-requires" -+fi -+ - case $1 in - -P|--provides) - while read filename ; do -@@ -39,7 +46,7 @@ case $1 in - [ $i -eq 1 ] && echo "$pkgconfig" - DIR="`dirname ${filename}`" - export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" -- $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do -+ $pkgconfig $PRINT_REQUIRES "$filename" 2> /dev/null | while read n r v ; do - [ -n "$n" ] || continue - echo -n "pkgconfig($n) " - [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v" diff --git a/platformin.diff b/platformin.diff index 94bc710..77e7828 100644 --- a/platformin.diff +++ b/platformin.diff @@ -1,9 +1,7 @@ SUSE specific platform changes. -Index: platform.in -=================================================================== ---- platform.in.orig -+++ platform.in +--- ./platform.in.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./platform.in 2011-05-11 15:02:03.000000000 +0000 @@ -21,7 +21,7 @@ %_exec_prefix @exec_prefix@ %_bindir @bindir@ @@ -22,7 +20,7 @@ Index: platform.in # Deprecated misspelling, present for backwards compatibility. %_initrddir %{_initddir} -@@ -146,3 +146,21 @@ +@@ -143,3 +143,21 @@ @mandrake@%_gamesdir games @mandrake@%_gamesbindir %{_prefix}/%{_gamesdir} @mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir} diff --git a/pythondeps.diff b/pythondeps.diff index 6f07ea7..c8882ef 100644 --- a/pythondeps.diff +++ b/pythondeps.diff @@ -1,5 +1,5 @@ ---- ./autodeps/linux.prov.orig 2010-04-08 13:32:56.000000000 +0000 -+++ ./autodeps/linux.prov 2010-04-08 13:38:44.000000000 +0000 +--- ./autodeps/linux.prov.orig 2011-05-11 15:59:31.000000000 +0000 ++++ ./autodeps/linux.prov 2011-05-11 16:39:09.000000000 +0000 @@ -11,7 +11,7 @@ filelist=($(printf "%s\n" "${filelist[@] solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \ tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \ @@ -20,9 +20,9 @@ # # --- Tcl modules. ---- ./autodeps/linux.req.orig 2010-04-08 13:36:47.000000000 +0000 -+++ ./autodeps/linux.req 2010-04-08 13:40:25.000000000 +0000 -@@ -32,7 +32,7 @@ liblist=($(printf "%s\0" "${filelist[@]} +--- ./autodeps/linux.req.orig 2011-05-11 14:28:45.000000000 +0000 ++++ ./autodeps/linux.req 2011-05-11 16:39:09.000000000 +0000 +@@ -31,7 +31,7 @@ liblist=($(printf "%s\0" "${filelist[@]} interplist=() perllist=() @@ -31,7 +31,7 @@ tcllist=() monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) -@@ -128,8 +128,8 @@ done | sort -u +@@ -127,8 +127,8 @@ done | sort -u # # --- Python modules. @@ -42,28 +42,3 @@ # # --- Tcl modules. ---- ./scripts/pythondeps.sh.orig 2010-04-08 13:40:34.000000000 +0000 -+++ ./scripts/pythondeps.sh 2010-04-08 13:42:19.000000000 +0000 -@@ -5,17 +5,17 @@ - exit 0 - } - --PYVER=`python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v"` - case $1 in - -P|--provides) - shift -- grep "/usr/bin/python\*\$" >& /dev/null && echo "python(abi) = ${PYVER}" -- exit 0 -+ grep "/usr/bin/python.\..$" \ -+ | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|" - ;; - -R|--requires) - shift -- grep "/usr/lib[^/]*/python${PYVER}/" >& /dev/null && echo "python(abi) = ${PYVER}" -- exit 0 -+ grep "/usr/lib[^/]*/python.\../.*" \ -+ | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \ -+ | sort | uniq - ;; - esac - diff --git a/readlineofi.diff b/readlineofi.diff deleted file mode 100644 index d4123d1..0000000 --- a/readlineofi.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- build/parseSpec.c.orig 2010-02-15 11:49:29.000000000 +0000 -+++ build/parseSpec.c 2010-02-24 10:38:25.000000000 +0000 -@@ -283,6 +283,7 @@ int readLine(rpmSpec spec, int strip) - retry: - if ((rc = readLineFromOFI(spec, ofi)) != 0) - return rc; -+ ofi = spec->fileStack; - - /* Copy next file line into the spec line buffer */ - rc = copyNextLineFromOFI(spec, ofi); diff --git a/refreshtestarch.diff b/refreshtestarch.diff index f429b2b..12642dd 100644 --- a/refreshtestarch.diff +++ b/refreshtestarch.diff @@ -1,19 +1,17 @@ Also test architecture in "refresh" test when not colored. This allows -updates to different architecture possible again. +updates to different architectures. -Index: lib/psm.c -=================================================================== ---- lib/psm.c.orig -+++ lib/psm.c -@@ -1202,6 +1202,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s +--- ./lib/psm.c.orig 2010-12-21 09:50:23.000000000 +0000 ++++ ./lib/psm.c 2011-05-11 12:47:13.000000000 +0000 +@@ -723,6 +723,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg psm->scriptArg = psm->npkgs_installed + 1; + /* this must match rpmNameVersionCompare in depends.c */ - mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(psm->te), 0); + mi = rpmtsInitIterator(ts, RPMDBI_NAME, rpmteN(psm->te), 0); xx = rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, rpmteE(psm->te)); -@@ -1209,9 +1210,9 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s +@@ -730,9 +731,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg rpmteV(psm->te)); xx = rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, rpmteR(psm->te)); diff --git a/remove-brp-strips.diff b/remove-brp-strips.diff index c0ef51a..466a948 100644 --- a/remove-brp-strips.diff +++ b/remove-brp-strips.diff @@ -3,16 +3,14 @@ Subject: remove references to removed brp scripts Some brp-scripts are not used in openSUSE, remove references to it -Index: platform.in -=================================================================== ---- platform.in.orig -+++ platform.in +--- ./platform.in.orig 2011-05-11 15:02:03.000000000 +0000 ++++ ./platform.in 2011-05-11 15:38:05.000000000 +0000 @@ -55,8 +55,6 @@ %__os_install_post \ %{_rpmconfigdir}/brp-compress \ - %{_rpmconfigdir}/brp-strip \ -- %{_rpmconfigdir}/brp-strip-static-archive \ -- %{_rpmconfigdir}/brp-strip-comment-note \ + %{_rpmconfigdir}/brp-strip %{__strip} \ +- %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \ +- %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \ %{nil} %__spec_install_post\ diff --git a/remove-translations.diff b/remove-translations.diff index 8a95025..b7453e2 100644 --- a/remove-translations.diff +++ b/remove-translations.diff @@ -1,5 +1,5 @@ ---- scripts/find-lang.sh 2011-01-13 13:44:01.000000000 +0100 -+++ scripts/find-lang.sh 2011-01-13 13:44:39.770439219 +0100 +--- ./scripts/find-lang.sh.orig 2011-05-11 16:45:30.000000000 +0000 ++++ ./scripts/find-lang.sh 2011-05-11 16:55:14.000000000 +0000 @@ -122,6 +122,17 @@ fi MO_NAME_NEW=$MO_NAME.tmp.$$ rm -f $MO_NAME_NEW @@ -17,4 +17,4 @@ + find $TOP_DIR -type f -o -type l|sed ' s:'"$TOP_DIR"':: - '"$ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: + '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) %doc \1\2\3: diff --git a/repackage-nomd5.diff b/repackage-nomd5.diff index 639b841..16e243e 100644 --- a/repackage-nomd5.diff +++ b/repackage-nomd5.diff @@ -1,14 +1,16 @@ ---- ./lib/psm.c.orig 2010-03-26 15:06:20.000000000 +0000 -+++ ./lib/psm.c 2010-03-26 15:11:27.000000000 +0000 -@@ -1318,6 +1318,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s - - if (psm->goal == PSM_PKGINSTALL) { +Don't complain about a bad md5 sum for repackaged rpms. + +--- ./lib/psm.c.orig 2011-05-11 14:27:32.000000000 +0000 ++++ ./lib/psm.c 2011-05-11 16:32:11.000000000 +0000 +@@ -811,6 +811,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg + case PSM_PROCESS: + if (psm->goal == PKG_INSTALL) { FD_t payload = NULL; + rpmtransFlags oldtsflags; if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB) break; -@@ -1343,6 +1344,9 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s +@@ -828,6 +829,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg break; } @@ -18,7 +20,7 @@ rc = fsmSetup(rpmfiFSM(fi), FSM_PKGINSTALL, ts, psm->te, fi, payload, NULL, &psm->failedFile); (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS), -@@ -1350,6 +1354,8 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s +@@ -835,6 +839,8 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST), fdOp(payload, FDSTAT_DIGEST)); xx = fsmTeardown(rpmfiFSM(fi)); diff --git a/requires-ge-macro.diff b/requires-ge-macro.diff index 0873add..51c3e50 100644 --- a/requires-ge-macro.diff +++ b/requires-ge-macro.diff @@ -1,8 +1,6 @@ -Index: macros.in -=================================================================== ---- macros.in.orig -+++ macros.in -@@ -1182,7 +1182,8 @@ done \ +--- ./macros.in.orig 2011-05-11 15:36:05.000000000 +0000 ++++ ./macros.in 2011-05-11 15:38:44.000000000 +0000 +@@ -1027,7 +1027,8 @@ done \ # %{perl_sitearch}/Image # %dir %{perl_sitearch}/auto/Image # diff --git a/resetdefattr.diff b/resetdefattr.diff deleted file mode 100644 index 0e2a892..0000000 --- a/resetdefattr.diff +++ /dev/null @@ -1,55 +0,0 @@ ---- ./build/files.c.orig 2010-04-07 14:27:54.000000000 +0000 -+++ ./build/files.c 2010-04-07 14:51:11.000000000 +0000 -@@ -561,8 +561,13 @@ static rpmRC parseForAttr(const char * b - } - ar->ar_fmode = ui; - } else { -- ar->ar_fmodestr = fl->def_ar.ar_fmodestr; -- ar->ar_fmode = fl->def_ar.ar_fmode; -+ if (ret_ar == &(fl->def_ar)) { -+ ar->ar_fmodestr = NULL; -+ ar->ar_fmode = 0; -+ } else { -+ ar->ar_fmodestr = fl->def_ar.ar_fmodestr; -+ ar->ar_fmode = fl->def_ar.ar_fmode; -+ } - } - - if (ar->ar_dmodestr && !isAttrDefault(ar->ar_dmodestr)) { -@@ -574,15 +579,30 @@ static rpmRC parseForAttr(const char * b - } - ar->ar_dmode = ui; - } else { -- ar->ar_dmodestr = fl->def_ar.ar_dmodestr; -- ar->ar_dmode = fl->def_ar.ar_dmode; -+ if (ret_ar == &(fl->def_ar)) { -+ ar->ar_dmodestr = NULL; -+ ar->ar_dmode = 0; -+ } else { -+ ar->ar_dmodestr = fl->def_ar.ar_dmodestr; -+ ar->ar_dmode = fl->def_ar.ar_dmode; -+ } - } - -- if (!(ar->ar_user && !isAttrDefault(ar->ar_user))) -- ar->ar_user = fl->def_ar.ar_user; -+ if (!(ar->ar_user && !isAttrDefault(ar->ar_user))) { -+ if (ret_ar == &(fl->def_ar)) { -+ ar->ar_user = NULL; -+ } else { -+ ar->ar_user = fl->def_ar.ar_user; -+ } -+ } - -- if (!(ar->ar_group && !isAttrDefault(ar->ar_group))) -- ar->ar_group = fl->def_ar.ar_group; -+ if (!(ar->ar_group && !isAttrDefault(ar->ar_group))) { -+ if (ret_ar == &(fl->def_ar)) { -+ ar->ar_group = 0; -+ } else { -+ ar->ar_group = fl->def_ar.ar_group; -+ } -+ } - - dupAttrRec(ar, ret_ar); - diff --git a/rpm-4.4.2.3-db.tar.bz2 b/rpm-4.4.2.3-db.tar.bz2 deleted file mode 100644 index 1a2af71..0000000 --- a/rpm-4.4.2.3-db.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1226a5eeee069402b8dddfde652e2b0a44b64a193078b3c7276d97b1b5f756cb -size 5271325 diff --git a/rpm-4.8.0.tar.bz2 b/rpm-4.8.0.tar.bz2 deleted file mode 100644 index 2fec1e1..0000000 --- a/rpm-4.8.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a3b4bb2d78eaf1f5200fdcd51372ca9cedce64e030046372e6a13e361cb82b64 -size 3692408 diff --git a/rpm-4.9.0.tar.bz2 b/rpm-4.9.0.tar.bz2 new file mode 100644 index 0000000..5a813cd --- /dev/null +++ b/rpm-4.9.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9af1a56b05fc2c54935062e04a3e02999110c74d00bfd5b5c5ff3a03dde61688 +size 3410799 diff --git a/rpm-beecrypt.diff b/rpm-beecrypt.diff index c4a2292..ecf9284 100644 --- a/rpm-beecrypt.diff +++ b/rpm-beecrypt.diff @@ -1,17 +1,5 @@ ---- ./Makefile.am.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./Makefile.am 2010-03-24 15:39:14.000000000 +0000 -@@ -87,7 +87,8 @@ DISTCLEANFILES += find-requires - - rpm_SOURCES = rpmqv.c debug.h system.h - rpm_CPPFLAGS = $(AM_CPPFLAGS) -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV --rpm_LDADD = build/librpmbuild.la lib/librpm.la rpmio/librpmio.la -+rpm_LDADD = lib/librpm.la rpmio/librpmio.la -+rpm_LDADD += build/.libs/spec.o build/.libs/misc.o build/.libs/names.o build/.libs/expression.o build/.libs/reqprov.o build/.libs/poptBT.o build/.libs/parse*.o - rpm_LDADD += @WITH_LIBELF_LIB@ @WITH_NSS_LIB@ @WITH_POPT_LIB@ @WITH_ZLIB_LIB@ - - rpmbuild_SOURCES = build.c rpmqv.c build.h debug.h system.h ---- ./config.h.in.orig 2010-01-08 08:35:12.000000000 +0000 -+++ ./config.h.in 2010-03-24 15:39:14.000000000 +0000 +--- ./config.h.in.orig 2011-03-02 06:46:47.000000000 +0000 ++++ ./config.h.in 2011-05-10 15:54:41.000000000 +0000 @@ -13,6 +13,9 @@ /* Define to 1 if you have the `basename' function. */ #undef HAVE_BASENAME @@ -22,16 +10,16 @@ /* Define as 1 if you bzip2 1.0 */ #undef HAVE_BZ2_1_0 -@@ -110,7 +113,7 @@ - /* Define as 1 if defines h_errno */ - #undef HAVE_HERRNO +@@ -77,7 +80,7 @@ + /* Define as 1 if your zlib has gzseek() */ + #undef HAVE_GZSEEK -/* Define if you have the iconv() function. */ +/* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV - /* Define to 1 if you have the `inet_aton' function. */ -@@ -359,6 +362,10 @@ + /* Define to 1 if you have the header file. */ +@@ -224,6 +227,10 @@ */ #undef LT_OBJDIR @@ -42,7 +30,7 @@ /* Define to 1 if `major', `minor', and `makedev' are declared in . */ #undef MAJOR_IN_MKDEV -@@ -456,6 +463,9 @@ +@@ -308,6 +315,9 @@ /* Build with acl support? */ #undef WITH_ACL @@ -52,9 +40,9 @@ /* Build with capability support? */ #undef WITH_CAP ---- ./configure.ac.orig 2010-01-08 08:34:41.000000000 +0000 -+++ ./configure.ac 2010-03-24 15:39:14.000000000 +0000 -@@ -299,12 +299,43 @@ AC_CHECK_HEADERS([dwarf.h], [ +--- ./configure.ac.orig 2011-03-02 06:46:20.000000000 +0000 ++++ ./configure.ac 2011-05-10 15:54:41.000000000 +0000 +@@ -246,12 +246,43 @@ AC_CHECK_HEADERS([dwarf.h], [ AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes]) #================= @@ -98,7 +86,7 @@ AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [ AC_MSG_ERROR([missing required NSPR / NSS header]) ]) -@@ -313,6 +344,7 @@ AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ +@@ -260,6 +291,7 @@ AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ ], [ AC_MSG_ERROR([missing required NSS library 'nss3']) ]) @@ -106,8 +94,8 @@ AC_SUBST(WITH_NSS_INCLUDE) AC_SUBST(WITH_NSS_LIB) ---- ./rpmio/Makefile.am.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./rpmio/Makefile.am 2010-03-24 15:42:04.000000000 +0000 +--- ./rpmio/Makefile.am.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./rpmio/Makefile.am 2011-05-10 15:56:13.000000000 +0000 @@ -2,6 +2,7 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ @@ -116,7 +104,7 @@ AM_CPPFLAGS += @WITH_LUA_INCLUDE@ AM_CPPFLAGS += @WITH_POPT_INCLUDE@ AM_CPPFLAGS += -I$(top_srcdir)/misc -@@ -19,10 +20,17 @@ librpmio_la_SOURCES = \ +@@ -18,10 +19,17 @@ librpmio_la_SOURCES = \ rpmstring.c rpmfileutil.c \ rpmkeyring.c @@ -126,7 +114,7 @@ +librpmio_la_SOURCES += digest_nss.c +endif + - librpmio_la_LDFLAGS = -version-info 1:0:0 + librpmio_la_LDFLAGS = -version-info 2:0:0 librpmio_la_LIBADD = \ ../misc/libmisc.la \ @WITH_NSS_LIB@ \ @@ -134,7 +122,7 @@ @WITH_LUA_LIB@ \ @WITH_BZ2_LIB@ \ @WITH_ZLIB_LIB@ \ -@@ -31,6 +39,15 @@ librpmio_la_LIBADD = \ +@@ -30,6 +38,15 @@ librpmio_la_LIBADD = \ @WITH_LZMA_LIB@ \ -lpthread @@ -150,8 +138,8 @@ if WITH_LUAEXT AM_CPPFLAGS += -I$(top_srcdir)/luaext/ librpmio_la_LIBADD += $(top_builddir)/luaext/libluaext.la ---- ./rpmio/base64.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./rpmio/base64.c 2010-03-24 15:39:14.000000000 +0000 +--- ./rpmio/base64.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./rpmio/base64.c 2011-05-10 15:54:41.000000000 +0000 @@ -4,8 +4,11 @@ #include #include @@ -169,9 +157,9 @@ #endif +#endif /* WITH_BEECRYPT */ ---- ./rpmio/digest.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./rpmio/digest.c 2010-03-24 15:43:57.000000000 +0000 -@@ -4,26 +4,12 @@ +--- ./rpmio/digest.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./rpmio/digest.c 2011-05-10 16:00:19.000000000 +0000 +@@ -4,25 +4,12 @@ #include "system.h" @@ -194,13 +182,12 @@ -struct DIGEST_CTX_s { - rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ - HASHContext *hashctx; /*!< Internal NSS hash context. */ -- pgpHashAlgo algo; /*!< Used hash algorithm */ +- int algo; /*!< Used hash algorithm */ -}; -- + #define DIGESTS_MAX 11 struct rpmDigestBundle_s { - int index_min; /*!< Smallest index of active digest */ -@@ -109,138 +95,3 @@ DIGEST_CTX rpmDigestBundleDupCtx(rpmDige +@@ -109,138 +96,3 @@ DIGEST_CTX rpmDigestBundleDupCtx(rpmDige return dup; } @@ -219,7 +206,7 @@ -} - -RPM_GNUC_PURE --static HASH_HashType getHashType(pgpHashAlgo hashalgo) +-static HASH_HashType getHashType(int hashalgo) -{ - switch (hashalgo) { - case PGPHASHALGO_MD5: @@ -250,13 +237,13 @@ -} - -size_t --rpmDigestLength(pgpHashAlgo hashalgo) +-rpmDigestLength(int hashalgo) -{ - return HASH_ResultLen(getHashType(hashalgo)); -} - -DIGEST_CTX --rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags) +-rpmDigestInit(int hashalgo, rpmDigestFlags flags) -{ - HASH_HashType type = getHashType(hashalgo); - HASHContext *hashctx = NULL; @@ -339,8 +326,8 @@ - return 0; -} - ---- ./rpmio/digest.h.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./rpmio/digest.h 2010-03-24 15:56:12.000000000 +0000 +--- ./rpmio/digest.h.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./rpmio/digest.h 2011-05-10 15:54:41.000000000 +0000 @@ -1,11 +1,6 @@ #ifndef _RPMDIGEST_H #define _RPMDIGEST_H @@ -374,8 +361,8 @@ +int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen); + #endif /* _RPMDIGEST_H */ ---- ./rpmio/digest_beecrypt.c.orig 2010-03-24 15:39:14.000000000 +0000 -+++ ./rpmio/digest_beecrypt.c 2010-03-24 16:16:23.000000000 +0000 +--- ./rpmio/digest_beecrypt.c.orig 2011-05-10 15:54:41.000000000 +0000 ++++ ./rpmio/digest_beecrypt.c 2011-05-10 15:54:41.000000000 +0000 @@ -0,0 +1,493 @@ +#include "system.h" + @@ -698,7 +685,7 @@ + */ +struct DIGEST_CTX_s { + rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ -+ pgpHashAlgo algo; /*!< Used hash algorithm */ ++ int algo; /*!< Used hash algorithm */ + uint32_t datalen; /*!< No. bytes in block of plaintext data. */ + uint32_t paramlen; /*!< No. bytes of digest parameters. */ + uint32_t digestlen; /*!< No. bytes of digest. */ @@ -721,7 +708,7 @@ +} + +size_t -+rpmDigestLength(pgpHashAlgo hashalgo) ++rpmDigestLength(int hashalgo) +{ + switch (hashalgo) { + case PGPHASHALGO_MD5: @@ -742,7 +729,7 @@ +} + +DIGEST_CTX -+rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags) ++rpmDigestInit(int hashalgo, rpmDigestFlags flags) +{ + DIGEST_CTX ctx = xcalloc(1, sizeof(*ctx)); + int xx; @@ -870,8 +857,8 @@ + free(ctx); + return 0; +} ---- ./rpmio/digest_nss.c.orig 2010-03-24 15:39:14.000000000 +0000 -+++ ./rpmio/digest_nss.c 2010-03-24 16:14:36.000000000 +0000 +--- ./rpmio/digest_nss.c.orig 2011-05-10 15:54:41.000000000 +0000 ++++ ./rpmio/digest_nss.c 2011-05-10 15:54:41.000000000 +0000 @@ -0,0 +1,500 @@ +#include +#include @@ -1238,7 +1225,7 @@ +struct DIGEST_CTX_s { + rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ + HASHContext *hashctx; /*!< Internal NSS hash context. */ -+ pgpHashAlgo algo; /*!< Used hash algorithm */ ++ int algo; /*!< Used hash algorithm */ +}; + +DIGEST_CTX @@ -1255,7 +1242,7 @@ +} + +RPM_GNUC_PURE -+static HASH_HashType getHashType(pgpHashAlgo hashalgo) ++static HASH_HashType getHashType(int hashalgo) +{ + switch (hashalgo) { + case PGPHASHALGO_MD5: @@ -1286,13 +1273,13 @@ +} + +size_t -+rpmDigestLength(pgpHashAlgo hashalgo) ++rpmDigestLength(int hashalgo) +{ + return HASH_ResultLen(getHashType(hashalgo)); +} + +DIGEST_CTX -+rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags) ++rpmDigestInit(int hashalgo, rpmDigestFlags flags) +{ + HASH_HashType type; + HASHContext *hashctx = NULL; @@ -1373,8 +1360,8 @@ + free(ctx); + return 0; +} ---- ./rpmio/rpmpgp.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./rpmio/rpmpgp.c 2010-03-24 16:26:00.000000000 +0000 +--- ./rpmio/rpmpgp.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./rpmio/rpmpgp.c 2011-05-10 16:01:58.000000000 +0000 @@ -20,9 +20,6 @@ static int _debug = 0; static int _print = 0; @@ -1382,10 +1369,10 @@ -static int _crypto_initialized = 0; -static int _new_process = 1; - - static struct pgpValTbl_s const pgpSigTypeTbl[] = { - { PGPSIGTYPE_BINARY, "Binary document signature" }, - { PGPSIGTYPE_TEXT, "Text document signature" }, -@@ -291,89 +288,6 @@ int pgpValTok(pgpValTbl vs, const char * + typedef const struct pgpValTbl_s { + int val; + char const * const str; +@@ -315,89 +312,6 @@ int pgpValTok(pgpValTbl vs, const char * } while ((++vs)->val != -1); return vs->val; } @@ -1393,12 +1380,12 @@ - * @return 0 on success - */ -static int pgpMpiSet(const char * pre, unsigned int lbits, -- void *dest, const uint8_t * p, const uint8_t * pend) +- uint8_t *dest, const uint8_t * p, const uint8_t * pend) -{ - unsigned int mbits = pgpMpiBits(p); - unsigned int nbits; - size_t nbytes; -- char *t = dest; +- uint8_t *t = dest; - unsigned int ix; - - if ((p + ((mbits+7) >> 3)) > pend) @@ -1475,7 +1462,7 @@ /** \ingroup rpmpgp * Is buffer at beginning of an OpenPGP packet? -@@ -569,29 +483,16 @@ static int pgpPrtSigParams(pgpTag tag, u +@@ -593,29 +507,16 @@ static int pgpPrtSigParams(pgpTag tag, u { const uint8_t * pend = h + hlen; size_t i; @@ -1507,7 +1494,7 @@ } pgpPrtStr("", pgpSigRSA[i]); } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { -@@ -599,30 +500,8 @@ static int pgpPrtSigParams(pgpTag tag, u +@@ -623,30 +524,8 @@ static int pgpPrtSigParams(pgpTag tag, u if (_dig && (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT)) { @@ -1540,7 +1527,7 @@ } pgpPrtStr("", pgpSigDSA[i]); } else { -@@ -814,49 +693,11 @@ static const uint8_t * pgpPrtPubkeyParam +@@ -838,49 +717,11 @@ static const uint8_t * pgpPrtPubkeyParam char * mpi; if (pubkey_algo == PGPPUBKEYALGO_RSA) { if (i >= 2) break; @@ -1592,7 +1579,7 @@ pgpPrtStr("", pgpPublicDSA[i]); } else if (pubkey_algo == PGPPUBKEYALGO_ELGAMAL_ENCRYPT) { if (i >= 3) break; -@@ -1241,15 +1082,7 @@ void pgpCleanDig(pgpDig dig) +@@ -1265,15 +1106,7 @@ void pgpCleanDig(pgpDig dig) memset(&dig->signature, 0, sizeof(dig->signature)); memset(&dig->pubkey, 0, sizeof(dig->pubkey)); @@ -1609,7 +1596,7 @@ } return; } -@@ -1291,39 +1124,6 @@ int pgpPrtPkts(const uint8_t * pkts, siz +@@ -1315,39 +1148,6 @@ int pgpPrtPkts(const uint8_t * pkts, siz return 0; } @@ -1649,7 +1636,7 @@ char *pgpIdentItem(pgpDigParams digp) { char *id = NULL; -@@ -1372,30 +1172,12 @@ rpmRC pgpVerifySig(pgpDig dig, DIGEST_CT +@@ -1396,30 +1196,12 @@ rpmRC pgpVerifySig(pgpDig dig, DIGEST_CT /* Compare leading 16 bits of digest for quick check. */ if (hash && memcmp(hash, sigp->signhash16, 2) == 0) { @@ -1686,7 +1673,7 @@ } } -@@ -1580,50 +1362,3 @@ char * pgpArmorWrap(int atype, const uns +@@ -1607,50 +1389,3 @@ char * pgpArmorWrap(int atype, const uns return val; } diff --git a/rpm-python.spec b/rpm-python.spec index a7ef82e..9b7d163 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -19,14 +19,14 @@ Name: rpm-python -BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel popt-devel +BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel libsemanage-devel lua-devel ncurses-devel popt-devel BuildRequires: libacl-devel libcap-devel python-devel xz-devel zlib-devel #!BuildIgnore: rpmlint-Factory License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages -Version: 4.8.0 -Release: 21 +Version: 4.9.0 +Release: 1 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-shorten-changelog.diff b/rpm-shorten-changelog.diff index 434eaa8..7090250 100644 --- a/rpm-shorten-changelog.diff +++ b/rpm-shorten-changelog.diff @@ -1,29 +1,10 @@ -Index: build/parseChangelog.c -=================================================================== ---- build/parseChangelog.c.orig -+++ build/parseChangelog.c -@@ -167,6 +167,11 @@ static rpmRC addChangelog(Header h, Stri - return RPMRC_FAIL; - } - -+ /* workaround old suse oddity */ -+ if (*s == '-' && s[1] == ' ') { -+ s += 2; -+ } -+ - /* name */ - name = s; - while (*s != '\0') s++; -Index: build/pack.c -=================================================================== ---- build/pack.c.orig -+++ build/pack.c -@@ -707,6 +707,64 @@ rpmRC checkPackages(char *pkgcheck) +--- ./build/pack.c.orig 2011-02-15 13:03:56.000000000 +0000 ++++ ./build/pack.c 2011-05-11 15:35:07.000000000 +0000 +@@ -671,6 +671,63 @@ static rpmRC checkPackages(char *pkgchec return RPMRC_OK; } -+static void -+trimChangelog(Header h) ++static void trimChangelog(Header h) +{ + static int oneshot; + static int cuttime, minnum, maxnum; @@ -80,10 +61,10 @@ Index: build/pack.c + free(texts); +} + - rpmRC packageBinaries(rpmSpec spec) + rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) { struct cpioSourceArchive_s csabuf; -@@ -716,6 +774,7 @@ rpmRC packageBinaries(rpmSpec spec) +@@ -680,6 +737,7 @@ rpmRC packageBinaries(rpmSpec spec, cons Package pkg; char *pkglist = NULL; @@ -91,3 +72,17 @@ Index: build/pack.c for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { char *fn; +--- ./build/parseChangelog.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./build/parseChangelog.c 2011-05-11 15:33:22.000000000 +0000 +@@ -168,6 +168,11 @@ static rpmRC addChangelog(Header h, ARGV + return RPMRC_FAIL; + } + ++ /* workaround old suse oddity */ ++ if (*s == '-' && s[1] == ' ') { ++ s += 2; ++ } ++ + /* name */ + name = s; + while (*s != '\0') s++; diff --git a/rpm.changes b/rpm.changes index 7f29467..c7ae5ab 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Wed May 18 11:34:17 CEST 2011 - mls@suse.de + +- split elflib from elf fileattrs so that libraries without + x-bits are also scanned + +------------------------------------------------------------------- +Tue May 17 10:47:00 CEST 2011 - mls@suse.de + +- allow macro undef/change while expanding the macro itself + +------------------------------------------------------------------- +Mon May 16 14:45:05 CEST 2011 - mls@suse.de + +- update to rpm-4.9.0: + * use internal dependency generator + * pluggable autodeps generators + * update to berkeleydb 4.8.30 + * fixed dependency match corner cases + * experimental collection implementation + ------------------------------------------------------------------- Wed May 4 12:42:33 UTC 2011 - mmarek@novell.com diff --git a/rpm.spec b/rpm.spec index 82a0d7d..67dc2b7 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ Name: rpm License: GPLv2+ Group: System/Packages -BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel xz-devel zlib-devel +BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel libsemanage-devel lua-devel ncurses-devel xz-devel zlib-devel BuildRequires: popt-devel BuildRequires: libacl-devel libcap-devel #!BuildIgnore: rpmlint-Factory @@ -28,8 +28,8 @@ Provides: rpminst PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager -Version: 4.8.0 -Release: 32 +Version: 4.9.0 +Release: 1 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -39,7 +39,7 @@ Source6: symset-table Source8: rpmconfigcheck Source9: sysconfig.services-rpm Source10: beecrypt-4.1.2.tar.bz2 -Source11: rpm-4.4.2.3-db.tar.bz2 +Source11: db-4.8.30.tar.bz2 Source12: baselibs.conf Patch1: beecrypt-4.1.2.diff Patch2: db.diff @@ -52,74 +52,70 @@ Patch14: nameversioncompare.diff Patch15: chownwarn.diff Patch16: dbfsync.diff Patch17: dbrointerruptable.diff -Patch18: diskspace.diff -Patch19: extcond.diff -Patch20: nodefattr.diff -Patch21: luaroot.diff -Patch22: refreshtestarch.diff -Patch23: rpmrctests.diff -Patch24: suspendlock.diff -Patch25: waitlock.diff -Patch26: dbprivate.diff -Patch27: weakdeps.diff -Patch28: autodeps.diff -Patch29: brp.diff -Patch30: brpcombress.diff -Patch31: checkfilesnoinfodir.diff -Patch32: finddebuginfo.diff -Patch33: findksyms.diff -Patch34: findlang.diff -Patch35: macrosin.diff -Patch36: modalias.diff -Patch37: platformin.diff -Patch38: rpmpopt.diff -Patch39: rpmrc.diff -Patch40: taggedfileindex.diff -Patch41: rpmqpack.diff -Patch42: convertdb1static.diff -Patch43: build.diff -Patch44: modalias-kernel_module.diff -Patch45: files.diff -Patch46: debugedit-comp-dir.diff -Patch47: perlprov.diff -Patch48: rpm-shorten-changelog.diff -Patch49: debugsource-package.diff -Patch50: whatrequires-doc.diff -Patch51: remove-brp-strips.diff -Patch52: requires-ge-macro.diff -Patch53: mimetype.diff -Patch54: debugedit-canon-fix.diff -Patch55: finddebuginfo-absolute-links.diff -Patch56: firmware.diff -Patch57: specfilemacro.diff -Patch58: modalias-encode.diff -Patch59: disttag-macro.diff -Patch60: buildidprov.diff -Patch61: debugsubpkg.diff -Patch62: debuglink.diff -Patch63: debuginfo-mono.patch -Patch64: allowufdio.diff -Patch65: lazystatfs.diff -Patch66: defclean.diff -Patch67: readlineofi.diff -Patch68: rpmdb-no-svc.diff -Patch69: modemuncher.diff -Patch70: repackage-nomd5.diff -Patch71: safeugid.diff -Patch72: resetdefattr.diff -Patch73: noprereqdeprec.diff -Patch74: tarrecordsize.diff -Patch75: backport.diff -Patch76: pythondeps.diff -Patch77: fontprovides.diff -Patch78: nosource.diff -Patch79: nosignature.diff -Patch80: fixsbits.diff -Patch81: pkgconfig-0.24.diff -Patch82: rpm-gst-provides.patch -Patch83: langnoc.diff -Patch84: initscriptsprov.diff -Patch85: remove-translations.diff +Patch18: extcond.diff +Patch19: refreshtestarch.diff +Patch20: rpmrctests.diff +Patch21: waitlock.diff +Patch22: suspendlock.diff +Patch23: weakdeps.diff +Patch24: autodeps.diff +Patch25: brp.diff +Patch26: brpcompress.diff +Patch27: checkfilesnoinfodir.diff +Patch28: finddebuginfo.diff +Patch29: findksyms.diff +Patch30: findlang.diff +Patch31: macrosin.diff +Patch32: modalias.diff +Patch33: platformin.diff +Patch34: rpmpopt.diff +Patch35: rpmrc.diff +Patch36: taggedfileindex.diff +Patch37: rpmqpack.diff +Patch38: convertdb1static.diff +Patch39: build.diff +Patch40: modalias-kernel_module.diff +Patch41: files.diff +Patch42: debugedit-comp-dir.diff +Patch43: perlprov.diff +Patch44: rpm-shorten-changelog.diff +Patch45: debugsource-package.diff +Patch46: whatrequires-doc.diff +Patch47: remove-brp-strips.diff +Patch48: requires-ge-macro.diff +Patch49: mimetype.diff +Patch50: debugedit-canon-fix.diff +Patch51: finddebuginfo-absolute-links.diff +Patch52: firmware.diff +Patch53: specfilemacro.diff +Patch54: modalias-encode.diff +Patch55: disttag-macro.diff +Patch56: buildidprov.diff +Patch57: debugsubpkg.diff +Patch58: debuglink.diff +Patch59: debuginfo-mono.patch +Patch60: lazystatfs.diff +Patch61: repackage-nomd5.diff +Patch62: safeugid.diff +Patch63: noprereqdeprec.diff +Patch64: pythondeps.diff +Patch65: fontprovides.diff +Patch66: rpm-gst-provides.patch +Patch67: langnoc.diff +Patch68: initscriptsprov.diff +Patch69: remove-translations.diff +Patch70: no_rep_autop.diff +Patch71: headeradddb.diff +Patch72: rpmdb_get_open_flags.diff +Patch73: verify_p.diff +Patch74: dbprivate.diff +Patch75: nobuildcolor.diff +Patch76: fileattrs.diff +Patch77: emptyprep.diff +Patch78: nomagiccheck.diff +Patch79: findsupplements.diff +Patch80: magic_and_path.diff +Patch81: safemacro.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -168,7 +164,9 @@ rm -rf sqlite rm -rf beecrypt tar xjf %{SOURCE10} tar xjf %{SOURCE11} +ln -s db-4.8.30 db ln -s beecrypt-4.1.2 beecrypt +chmod -R u+w db/* #tar xjf %{SOURCE12} #ln -s neon-0.24.7 neon # will get linked from db3 @@ -181,8 +179,7 @@ rm -f rpmdb/db.h %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 85 -%patch84 -p1 +%patch -P 80 -P 81 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov @@ -193,6 +190,8 @@ if [ -s /etc/rpm/suse_macros ]; then cp -a /etc/rpm/suse_macros %{SOURCE4} fi cp -a %{SOURCE4} suse_macros +rm -f m4/libtool.m4 +rm -f m4/lt*.m4 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -ffunction-sections" @@ -203,7 +202,7 @@ export CFLAGS="-g -O0 -fno-strict-aliasing" #cp -p /usr/share/gettext/config.rpath . cp autogen.sh beecrypt pushd beecrypt -./autogen.sh --with-pic +./autogen.sh --with-pic --without-python make %{?_smp_mflags} popd ./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ @@ -283,6 +282,7 @@ popd gzip -9 CHANGES rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm %clean @@ -298,9 +298,8 @@ if test -s var/lib/rpm/packages.rpm ; then mv -f var/lib/rpm/packages.rpm var/lib/rpm/packages.rpm3 rm -f var/lib/rpm/conflictsindex.rpm var/lib/rpm/fileindex.rpm var/lib/rpm/groupindex.rpm var/lib/rpm/nameindex.rpm var/lib/rpm/providesindex.rpm var/lib/rpm/requiredby.rpm var/lib/rpm/triggerindex.rpm fi -if test -s var/lib/rpm/Filemd5s -a ! -e var/lib/rpm/Filedigests ; then - ln var/lib/rpm/Filemd5s var/lib/rpm/Filedigests -fi +# delete no longer maintained databases +rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion var/lib/rpm/Provideversion %postun %{insserv_cleanup} @@ -319,9 +318,11 @@ fi /etc/init.d/rpmconfigcheck /usr/sbin/rcrpmconfigcheck /usr/lib/rpm + %{_libdir}/rpm-plugins %{_libdir}/librpm.so.* %{_libdir}/librpmbuild.so.* %{_libdir}/librpmio.so.* + %{_libdir}/librpmsign.so.* %doc %{_mandir}/man[18]/*.[18]* %dir /var/lib/rpm %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILD @@ -339,6 +340,7 @@ fi %{_libdir}/librpm.so %{_libdir}/librpmbuild.so %{_libdir}/librpmio.so + %{_libdir}/librpmsign.so %{_libdir}/pkgconfig/rpm.pc %changelog diff --git a/rpmdb-no-svc.diff b/rpmdb-no-svc.diff deleted file mode 100644 index f2a4787..0000000 --- a/rpmdb-no-svc.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- lib/Makefile.am.orig 2010-03-26 09:34:16.000000000 +0000 -+++ lib/Makefile.am 2010-03-26 09:34:39.000000000 +0000 -@@ -148,16 +148,6 @@ rpmdb_stat_LDADD = \ - $(top_builddir)/db3/util_sig.o \ - librpm.la - --rpmlibexec_PROGRAMS += rpmdb_svc --rpmdb_svc_SOURCES = --rpmdb_svc_LDADD = \ -- $(top_builddir)/db3/db_server_proc.o \ -- $(top_builddir)/db3/db_server_svc.o \ -- $(top_builddir)/db3/db_server_util.o \ -- $(top_builddir)/db3/gen_db_server.o \ -- $(top_builddir)/db3/util_log.o \ -- librpm.la -- - rpmlibexec_PROGRAMS += rpmdb_upgrade - rpmdb_upgrade_SOURCES = - rpmdb_upgrade_LDADD = \ diff --git a/rpmdb_get_open_flags.diff b/rpmdb_get_open_flags.diff new file mode 100644 index 0000000..eab0b19 --- /dev/null +++ b/rpmdb_get_open_flags.diff @@ -0,0 +1,13 @@ +Suppress berkeleydb error messages when doing 'rpm --verifydb'. + +--- lib/rpmdb.c.orig 2011-05-12 14:08:07.000000000 +0000 ++++ lib/rpmdb.c 2011-05-12 14:09:06.000000000 +0000 +@@ -165,7 +165,7 @@ static dbiIndex rpmdbOpenIndex(rpmdb db, + uintId, uintCmp, NULL); + } + /* If primary got created, we can safely run without fsync */ +- if ((dbiFlags(dbi) & DBI_CREATED) || db->cfg.db_no_fsync) { ++ if ((!verifyonly && (dbiFlags(dbi) & DBI_CREATED)) || db->cfg.db_no_fsync) { + rpmlog(RPMLOG_DEBUG, "disabling fsync on database\n"); + db->cfg.db_no_fsync = 1; + dbSetFSync(db->db_dbenv, 0); diff --git a/rpmpopt.diff b/rpmpopt.diff index 7809a60..0a00ea8 100644 --- a/rpmpopt.diff +++ b/rpmpopt.diff @@ -1,14 +1,8 @@ ---- - rpmpopt.in | 47 ++++++++++++++++++++++------------------------- - 1 file changed, 22 insertions(+), 25 deletions(-) - -Index: rpmpopt.in -=================================================================== ---- rpmpopt.in.orig -+++ rpmpopt.in -@@ -91,7 +91,8 @@ Signature : %|DSAHEADER?{%{DSAHEADER:p - %|PACKAGER?{Packager : %{PACKAGER}\n}|\ +--- ./rpmpopt.in.orig 2011-05-11 14:27:32.000000000 +0000 ++++ ./rpmpopt.in 2011-05-11 15:02:34.000000000 +0000 +@@ -101,7 +101,8 @@ Relocations : %|PREFIXES?{[%{PREFIXES} ] %|URL?{URL : %{URL}\n}|\ + %|BUGURL?{Bug URL : %{BUGURL}\n}|\ Summary : %{SUMMARY}\n\ -Description :\n%{DESCRIPTION}\n' \ +Description :\n%{DESCRIPTION}\n\ diff --git a/rpmqpack.diff b/rpmqpack.diff index ff79989..63605be 100644 --- a/rpmqpack.diff +++ b/rpmqpack.diff @@ -1,13 +1,11 @@ Provide rpmqpack, a fast way to list all installed packages are check if some package is installed. This is a hack. -Index: Makefile.am -=================================================================== ---- Makefile.am.orig -+++ Makefile.am -@@ -139,6 +139,10 @@ check_PROGRAMS += rpmsort - rpmsort_SOURCES = tools/rpmsort.c - rpmsort_LDADD = lib/librpm.la +--- ./Makefile.am.orig 2011-05-11 14:27:32.000000000 +0000 ++++ ./Makefile.am 2011-05-11 15:15:27.000000000 +0000 +@@ -170,6 +170,10 @@ rpmgraph_LDADD = lib/librpm.la rpmio/lib + + dist_bin_SCRIPTS = scripts/gendiff +bin_PROGRAMS += rpmqpack +rpmqpack_SOURCES = rpmqpack.c @@ -16,23 +14,19 @@ Index: Makefile.am rpmconfig_DATA = rpmrc rpmrc: $(top_srcdir)/rpmrc.in @$(SED) \ -Index: doc/Makefile.am -=================================================================== ---- doc/Makefile.am.orig -+++ doc/Makefile.am -@@ -7,7 +7,7 @@ man_man1_DATA = gendiff.1 - EXTRA_DIST += $(man_man1_DATA) +--- ./doc/Makefile.am.orig 2011-01-05 08:11:09.000000000 +0000 ++++ ./doc/Makefile.am 2011-05-11 15:16:24.000000000 +0000 +@@ -8,7 +8,7 @@ EXTRA_DIST += $(man_man1_DATA) man_man8dir = $(mandir)/man8 --man_man8_DATA = rpm.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 -+man_man8_DATA = rpm.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 rpmqpack.8 + man_man8_DATA = rpm.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8 +-man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 ++man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 rpmqpack.8 EXTRA_DIST += $(man_man8_DATA) man_fr_man8dir = $(mandir)/fr/man8 -Index: doc/rpmqpack.8 -=================================================================== ---- /dev/null -+++ doc/rpmqpack.8 +--- ./doc/rpmqpack.8.orig 2011-05-11 15:15:27.000000000 +0000 ++++ ./doc/rpmqpack.8 2011-05-11 15:15:27.000000000 +0000 @@ -0,0 +1,25 @@ +.TH RPMQPACK 8 "Mar 2002" +.SH NAME @@ -59,10 +53,8 @@ Index: doc/rpmqpack.8 + +.SH AUTHOR +Michael Schroeder -Index: rpmqpack.c -=================================================================== ---- /dev/null -+++ rpmqpack.c +--- ./rpmqpack.c.orig 2011-05-11 15:15:27.000000000 +0000 ++++ ./rpmqpack.c 2011-05-11 15:15:27.000000000 +0000 @@ -0,0 +1,59 @@ +#include +#include @@ -88,7 +80,7 @@ Index: rpmqpack.c + perror("db_create"); + exit(1); + } -+ if (db->open(db, 0, "/var/lib/rpm/Name", 0, DB_HASH, DB_RDONLY, 0664)) ++ if (db->open(db, 0, "/var/lib/rpm/Name", 0, DB_UNKNOWN, DB_RDONLY, 0664)) + { + perror("db->open"); + exit(1); diff --git a/rpmrctests.diff b/rpmrctests.diff index 4045e56..34e42fe 100644 --- a/rpmrctests.diff +++ b/rpmrctests.diff @@ -1,9 +1,7 @@ Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713] -Index: lib/rpmrc.c -=================================================================== ---- lib/rpmrc.c.orig -+++ lib/rpmrc.c +--- ./lib/rpmrc.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./lib/rpmrc.c 2011-05-11 12:48:02.000000000 +0000 @@ -1,9 +1,6 @@ #include "system.h" @@ -12,9 +10,9 @@ Index: lib/rpmrc.c -#include -#endif - #include /* XXX for /etc/rpm/platform contents */ - -@@ -784,6 +781,14 @@ static inline int RPMClass(void) + #if HAVE_SYS_UTSNAME_H + #include +@@ -788,6 +785,14 @@ static inline int RPMClass(void) cpu = (tfms>>8)&15; @@ -29,7 +27,7 @@ Index: lib/rpmrc.c sigaction(SIGILL, &oldsa, NULL); if (cpu < 6) -@@ -920,15 +925,6 @@ static int is_geode() +@@ -924,15 +929,6 @@ static int is_geode() } #endif @@ -45,7 +43,7 @@ Index: lib/rpmrc.c /** */ static void defaultMachine(const char ** arch, -@@ -1055,6 +1051,11 @@ static void defaultMachine(const char ** +@@ -1059,6 +1055,11 @@ static void defaultMachine(const char ** /* big endian */ strcpy(un.machine, "mips"); # endif diff --git a/safemacro.diff b/safemacro.diff new file mode 100644 index 0000000..96f065a --- /dev/null +++ b/safemacro.diff @@ -0,0 +1,21 @@ +--- rpmio/macro.c.orig 2011-05-17 08:43:40.000000000 +0000 ++++ rpmio/macro.c 2011-05-17 08:44:48.000000000 +0000 +@@ -1016,12 +1016,12 @@ expandMacro(MacroBuf mb, const char *src + char *source = NULL; + + /* Handle non-terminated substrings by creating a terminated copy */ +- if (slen > 0) { +- source = xmalloc(slen + 1); +- strncpy(source, src, slen); +- source[slen] = '\0'; +- s = source; +- } ++ if (!slen) ++ slen = strlen(src); ++ source = xmalloc(slen + 1); ++ strncpy(source, src, slen); ++ source[slen] = '\0'; ++ s = source; + + if (mb->buf == NULL) { + size_t blen = MACROBUFSIZ + strlen(s); diff --git a/safeugid.diff b/safeugid.diff index f1e7509..859dd02 100644 --- a/safeugid.diff +++ b/safeugid.diff @@ -1,50 +1,33 @@ ---- lib/fsm.c.orig 2010-03-26 15:06:20.000000000 +0000 -+++ lib/fsm.c 2010-03-26 15:16:31.000000000 +0000 -@@ -736,22 +736,26 @@ static int fsmMapAttrs(FSM_t fsm) - - /* this check is pretty moot, rpmfi accessors check array bounds etc */ - if (fi && i >= 0 && i < rpmfiFC(fi)) { -+ rpmts ts = fsmGetTs(fsm); - mode_t finalMode = rpmfiFModeIndex(fi, i); - dev_t finalRdev = rpmfiFRdevIndex(fi, i); - time_t finalMtime = rpmfiFMtimeIndex(fi, i); - const char *user = rpmfiFUserIndex(fi, i); - const char *group = rpmfiFGroupIndex(fi, i); -+ int safe = rpmtsChrootDone(ts); -+ extern int unameToUid_safe(const char *, gid_t *, int); -+ extern int gnameToGid_safe(const char *, gid_t *, int); - uid_t uid = 0; - gid_t gid = 0; - -- if (user && unameToUid(user, &uid)) { -+ if (user && unameToUid_safe(user, &uid, safe)) { - if (fsm->goal == FSM_PKGINSTALL) - rpmlog(RPMLOG_WARNING, - _("user %s does not exist - using root\n"), user); - finalMode &= ~S_ISUID; /* turn off suid bit */ - } - -- if (group && gnameToGid(group, &gid)) { -+ if (group && gnameToGid_safe(group, &gid, safe)) { - if (fsm->goal == FSM_PKGINSTALL) - rpmlog(RPMLOG_WARNING, - _("group %s does not exist - using root\n"), group); -@@ -773,8 +777,7 @@ static int fsmMapAttrs(FSM_t fsm) - if (fsm->mapFlags & CPIO_MAP_GID) - st->st_gid = gid; - -- { rpmts ts = fsmGetTs(fsm); -- -+ { - /* - * Set file digest (if not disabled). - */ ---- lib/misc.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ lib/misc.c 2010-03-26 15:26:05.000000000 +0000 -@@ -14,6 +14,42 @@ const char * const RPMVERSION = VERSION; - - #include "debug.h" +Work around glibc/nscd caching problems when doing 'rpm --root'. + +--- ./lib/rpmchroot.c.orig 2011-05-12 08:26:10.000000000 +0000 ++++ ./lib/rpmchroot.c 2011-05-12 08:28:32.000000000 +0000 +@@ -66,6 +66,7 @@ int rpmChrootIn(void) + } else if (rootState.chrootDone == 0) { + if (chdir("/") == 0 && chroot(rootState.rootDir) == 0) { + rootState.chrootDone = 1; ++ rpmugChroot(1); + } else { + rpmlog(RPMLOG_ERR, _("Unable to change root directory: %m\n")); + rc = -1; +@@ -91,6 +92,7 @@ int rpmChrootOut(void) + } else if (rootState.chrootDone == 1) { + if (chroot(".") == 0 && fchdir(rootState.cwd) == 0) { + rootState.chrootDone = 0; ++ rpmugChroot(0); + } else { + rpmlog(RPMLOG_ERR, _("Unable to restore root directory: %m\n")); + rc = -1; +--- ./lib/rpmug.c.orig 2011-05-12 08:13:52.000000000 +0000 ++++ ./lib/rpmug.c 2011-05-12 08:33:28.000000000 +0000 +@@ -35,6 +35,47 @@ const char * rpmugStashStr(const char *s + return ret; + } ++#if defined(__GLIBC__) ++ ++static int inchroot; ++ +/* + * Unfortunatelly glibc caches nss/nscd data and there is no + * good way to flush those caches when we did a chroot(). Thus @@ -80,50 +63,30 @@ + fclose(fp); + return -1; +} ++#endif + - /* unameToUid(), uidTouname() and the group variants are really poorly - implemented. They really ought to use hash tables. I just made the - guess that most files would be owned by root or the same person/group -@@ -21,11 +57,12 @@ const char * const RPMVERSION = VERSION; - is looked up via getpw() and getgr() functions. If this performs - too poorly I'll have to implement it properly :-( */ - --int unameToUid(const char * thisUname, uid_t * uid) -+int unameToUid_safe(const char * thisUname, uid_t * uid, int safe) - { - static char * lastUname = NULL; - static size_t lastUnameLen = 0; - static size_t lastUnameAlloced; -+ static int lastUnameSafe; - static uid_t lastUid; - struct passwd * pwent; - size_t thisUnameLen; -@@ -38,6 +75,11 @@ static char * lastUname = NULL; - return 0; - } - -+ if (safe != lastUnameSafe) { -+ lastUnameLen = 0; -+ lastUnameSafe = safe; -+ } -+ - thisUnameLen = strlen(thisUname); - if (lastUname == NULL || thisUnameLen != lastUnameLen || - !rstreq(thisUname, lastUname)) -@@ -48,15 +90,21 @@ static char * lastUname = NULL; + /* + * These really ought to use hash tables. I just made the + * guess that most files would be owned by root or the same person/group +@@ -68,17 +109,28 @@ int rpmugUid(const char * thisUname, uid + lastUnameAlloced = thisUnameLen + 10; + lastUname = xrealloc(lastUname, lastUnameAlloced); /* XXX memory leak */ } - strcpy(lastUname, thisUname); +- strcpy(lastUname, thisUname); - pwent = getpwnam(thisUname); - if (pwent == NULL) { - /* FIX: shrug */ - endpwent(); -+ if (safe) { -+ int uid = safe_lookup("/etc/passwd", thisUname); ++#if defined(__GLIBC__) ++ if (inchroot) { ++ int uid = safe_lookup("/etc/passwd", thisUname); + if (uid < 0) + return -1; -+ lastUid = (uid_t)uid; -+ } else { ++ lastUid = uid; ++ } else ++#endif ++ { pwent = getpwnam(thisUname); - if (pwent == NULL) return -1; + if (pwent == NULL) { @@ -134,103 +97,117 @@ + } + lastUid = pwent->pw_uid; } -- + - lastUid = pwent->pw_uid; ++ strcpy(lastUname, thisUname); ++ lastUnameLen = thisUnameLen; } *uid = lastUid; -@@ -64,11 +112,18 @@ static char * lastUname = NULL; - return 0; - } - --int gnameToGid(const char * thisGname, gid_t * gid) -+int unameToUid(const char * thisUname, uid_t * uid) -+{ -+ return unameToUid_safe(thisUname, uid, 0); -+} -+ -+ -+int gnameToGid_safe(const char * thisGname, gid_t * gid, int safe) - { - static char * lastGname = NULL; - static size_t lastGnameLen = 0; - static size_t lastGnameAlloced; -+ static int lastGnameSafe; - static gid_t lastGid; - size_t thisGnameLen; - struct group * grent; -@@ -81,6 +136,11 @@ static char * lastGname = NULL; - return 0; - } - -+ if (safe != lastGnameSafe) { -+ lastGnameLen = 0; -+ lastGnameSafe = safe; -+ } -+ - thisGnameLen = strlen(thisGname); - if (lastGname == NULL || thisGnameLen != lastGnameLen || - !rstreq(thisGname, lastGname)) -@@ -91,25 +151,34 @@ static char * lastGname = NULL; +@@ -111,18 +163,29 @@ int rpmugGid(const char * thisGname, gid + lastGnameAlloced = thisGnameLen + 10; + lastGname = xrealloc(lastGname, lastGnameAlloced); /* XXX memory leak */ } - strcpy(lastGname, thisGname); +- strcpy(lastGname, thisGname); - grent = getgrnam(thisGname); - if (grent == NULL) { - /* FIX: shrug */ - endgrent(); -+ if (safe) { -+ int gid = safe_lookup("/etc/group", thisGname); ++#if defined(__GLIBC__) ++ if (inchroot) { ++ int gid = safe_lookup("/etc/group", thisGname); + if (gid < 0) + return -1; -+ lastGid = (gid_t)gid; -+ } else { ++ lastGid = gid; ++ } else ++#endif ++ { grent = getgrnam(thisGname); if (grent == NULL) { -- /* XXX The filesystem package needs group/lock w/o getgrnam. */ -- if (rstreq(thisGname, "lock")) { -- *gid = lastGid = 54; -- return 0; -- } else -- if (rstreq(thisGname, "mail")) { -- *gid = lastGid = 12; -- return 0; -- } else - return -1; + /* FIX: shrug */ + endgrent(); + grent = getgrnam(thisGname); + if (grent == NULL) { -+#ifdef STRANGE_FEDORA_HACKS -+ /* XXX The filesystem package needs group/lock w/o getgrnam. */ -+ if (rstreq(thisGname, "lock")) { -+ *gid = lastGid = 54; -+ return 0; -+ } else -+ if (rstreq(thisGname, "mail")) { -+ *gid = lastGid = 12; -+ return 0; -+ } else -+#endif + return -1; + } } + lastGid = grent->gr_gid; } - lastGid = grent->gr_gid; ++ strcpy(lastGname, thisGname); ++ lastGnameLen = thisGnameLen; } *gid = lastGid; -@@ -117,6 +186,12 @@ static char * lastGname = NULL; - return 0; - } - -+int gnameToGid(const char * thisGname, gid_t * gid) -+{ -+ return gnameToGid_safe(thisGname, gid, 0); -+} -+ -+ - const char * uidToUname(uid_t uid) +@@ -134,7 +197,7 @@ const char * rpmugUname(uid_t uid) { static uid_t lastUid = (uid_t) -1; + static char * lastUname = NULL; +- static size_t lastUnameLen = 0; ++ static size_t lastUnameAlloced = 0; + + if (uid == (uid_t) -1) { + lastUid = (uid_t) -1; +@@ -151,9 +214,9 @@ const char * rpmugUname(uid_t uid) + + lastUid = uid; + len = strlen(pwent->pw_name); +- if (lastUnameLen < len + 1) { +- lastUnameLen = len + 20; +- lastUname = xrealloc(lastUname, lastUnameLen); ++ if (lastUnameAlloced < len + 1) { ++ lastUnameAlloced = len + 20; ++ lastUname = xrealloc(lastUname, lastUnameAlloced); + } + strcpy(lastUname, pwent->pw_name); + +@@ -165,7 +228,7 @@ const char * rpmugGname(gid_t gid) + { + static gid_t lastGid = (gid_t) -1; + static char * lastGname = NULL; +- static size_t lastGnameLen = 0; ++ static size_t lastGnameAlloced = 0; + + if (gid == (gid_t) -1) { + lastGid = (gid_t) -1; +@@ -182,9 +245,9 @@ const char * rpmugGname(gid_t gid) + + lastGid = gid; + len = strlen(grent->gr_name); +- if (lastGnameLen < len + 1) { +- lastGnameLen = len + 20; +- lastGname = xrealloc(lastGname, lastGnameLen); ++ if (lastGnameAlloced < len + 1) { ++ lastGnameAlloced = len + 20; ++ lastGname = xrealloc(lastGname, lastGnameAlloced); + } + strcpy(lastGname, grent->gr_name); + +@@ -200,3 +263,16 @@ void rpmugFree(void) + rpmugGname(-1); + strStash = strCacheFree(strStash); + } ++ ++void rpmugChroot(int in) ++{ ++ /* tell libc to drop caches / file descriptors */ ++ endpwent(); ++ endgrent(); ++ /* drop our own caches */ ++ rpmugUid(NULL, NULL); ++ rpmugGid(NULL, NULL); ++#if defined(__GLIBC__) ++ inchroot = in; ++#endif ++} +--- ./lib/rpmug.h.orig 2011-05-12 08:13:52.000000000 +0000 ++++ ./lib/rpmug.h 2011-05-12 08:26:56.000000000 +0000 +@@ -15,4 +15,6 @@ const char * rpmugGname(gid_t gid); + + void rpmugFree(void); + ++void rpmugChroot(int in); ++ + #endif /* _RPMUG_H */ diff --git a/specfilemacro.diff b/specfilemacro.diff index 739e3cb..a9663dc 100644 --- a/specfilemacro.diff +++ b/specfilemacro.diff @@ -1,8 +1,6 @@ -Index: build/parseSpec.c -=================================================================== ---- build/parseSpec.c.orig -+++ build/parseSpec.c -@@ -425,6 +425,7 @@ int parseSpec(rpmts ts, const char *spec +--- ./build/parseSpec.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./build/parseSpec.c 2011-05-11 15:58:37.000000000 +0000 +@@ -519,6 +519,7 @@ static rpmSpec parseSpec(const char *spe spec = newSpec(); spec->specFile = rpmGetPath(specFile, NULL); diff --git a/suspendlock.diff b/suspendlock.diff index 3346b01..f4c981b 100644 --- a/suspendlock.diff +++ b/suspendlock.diff @@ -2,35 +2,39 @@ Suspend exclusive database lock when scriptlets get called, allowing read access in scriptlets. Only needed for DB_PRIVATE (aka global) locking. -I hijacked the dbiSync function for this because I did not want -to change the ABI. - ---- ./lib/backend/db3.c.orig 2010-03-25 14:35:39.000000000 +0000 -+++ ./lib/backend/db3.c 2010-03-25 14:44:42.000000000 +0000 -@@ -208,11 +208,17 @@ errxit: +--- ./lib/backend/db3.c.orig 2011-05-12 10:24:20.000000000 +0000 ++++ ./lib/backend/db3.c 2011-05-12 10:26:14.000000000 +0000 +@@ -640,3 +640,59 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt + return rc; } - -+static int db3SuspendResumeLock(dbiIndex dbi, int mode); + - static int db3sync(dbiIndex dbi, unsigned int flags) - { - DB * db = dbi->dbi_db; - int rc = 0; - -+ if (flags == (unsigned int)-1) -+ return db3SuspendResumeLock(dbi, 0); -+ if (flags == (unsigned int)-2) -+ return db3SuspendResumeLock(dbi, 1); - if (db != NULL) { - rc = db->sync(db, flags); - rc = cvtdberr(dbi, "db->sync", rc, _debug); -@@ -848,6 +854,48 @@ static int db3open(rpmdb rpmdb, rpmTag r - return rc; - } - -+static int -+db3SuspendResumeLock(dbiIndex dbi, int mode) ++int dbiSuspendDBLock(dbiIndex dbi, unsigned int flags) ++{ ++ struct flock l; ++ int rc = 0; ++ int fdno = -1; ++ ++ if (!dbi->dbi_lockdbfd) ++ return 0; ++ if (!(dbi->dbi_rpmdb->db_mode & (O_RDWR|O_WRONLY))) ++ return 0; ++ if (_lockdbfd == 0) ++ return 0; ++ if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0)) ++ return 1; ++ memset(&l, 0, sizeof(l)); ++ l.l_whence = 0; ++ l.l_start = 0; ++ l.l_len = 0; ++ l.l_type = F_RDLCK; ++ rc = fcntl(fdno, F_SETLK, (void *)&l); ++ if (rc) ++ rpmlog(RPMLOG_WARNING, _("could not suspend database lock\n")); ++ return rc; ++} ++ ++int dbiResumeDBLock(dbiIndex dbi, unsigned int flags) +{ + struct flock l; + int rc = 0; @@ -39,88 +43,87 @@ to change the ABI. + + if (!dbi->dbi_lockdbfd) + return 0; -+ if (!(dbi->dbi_mode & (O_RDWR|O_WRONLY))) ++ if (!(dbi->dbi_rpmdb->db_mode & (O_RDWR|O_WRONLY))) + return 0; -+ if (dbi->dbi_use_dbenv && _lockdbfd == 0) ++ if (_lockdbfd == 0) + return 0; + if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0)) + return 1; -+ if (mode == 0) { ++ for (tries = 0; tries < 2; tries++) { + memset(&l, 0, sizeof(l)); + l.l_whence = 0; + l.l_start = 0; + l.l_len = 0; -+ l.l_type = F_RDLCK; -+ rc = fcntl(fdno, F_SETLK, (void *) &l); -+ if (rc) -+ rpmlog(RPMLOG_WARNING, _("could not suspend database lock\n")); -+ } else { -+ for (tries = 0; tries < 2; tries++) { -+ memset(&l, 0, sizeof(l)); -+ l.l_whence = 0; -+ l.l_start = 0; -+ l.l_len = 0; -+ l.l_type = F_WRLCK; -+ rc = fcntl(fdno, tries ? F_SETLKW : F_SETLK, (void *) &l); -+ if (!rc) -+ break; -+ if (tries == 0) -+ rpmlog(RPMLOG_WARNING, _("waiting to reestablish exclusive database lock\n")); -+ } ++ l.l_type = F_WRLCK; ++ rc = fcntl(fdno, tries ? F_SETLKW : F_SETLK, (void *)&l); ++ if (!rc) ++ break; ++ if (tries == 0) ++ rpmlog(RPMLOG_WARNING, _("waiting to reestablish exclusive database lock\n")); + } + return rc; +} + - /** \ingroup db3 - */ +--- ./lib/backend/dbi.h.orig 2010-12-21 09:48:21.000000000 +0000 ++++ ./lib/backend/dbi.h 2011-05-12 10:24:57.000000000 +0000 +@@ -263,6 +263,24 @@ int dbiFlags(dbiIndex dbi); RPM_GNUC_INTERNAL ---- ./lib/psm.c.orig 2010-03-25 14:43:29.000000000 +0000 -+++ ./lib/psm.c 2010-03-25 14:43:41.000000000 +0000 -@@ -754,6 +754,8 @@ static rpmRC runScript(rpmpsm psm, Heade - goto exit; - } + const char * dbiName(dbiIndex dbi); + ++/** \ingroup dbi ++ * Suspend the exclusive lock on the dbi ++ * @param dbi index database handle ++ * @param flags (unused) ++ * @return 0 on success ++ */ ++RPM_GNUC_INTERNAL ++int dbiSuspendDBLock(dbiIndex dbi, unsigned int flags); ++ ++/** \ingroup dbi ++ * Reacquire an exclusive lock on the dbi ++ * @param dbi index database handle ++ * @param flags (unused) ++ * @return 0 on success ++ */ ++RPM_GNUC_INTERNAL ++int dbiResumeDBLock(dbiIndex dbi, unsigned int flags); ++ + #ifdef __cplusplus + } + #endif +--- ./lib/psm.c.orig 2011-05-12 10:23:47.000000000 +0000 ++++ ./lib/psm.c 2011-05-12 10:24:57.000000000 +0000 +@@ -412,10 +412,12 @@ static rpmRC runScript(rpmpsm psm, ARGV_ + script->tag != RPMTAG_VERIFYSCRIPT); + int selinux = !(rpmtsFlags(psm->ts) & RPMTRANS_FLAG_NOCONTEXTS); + rpmtsSuspendResumeDBLock(psm->ts, 0); -+ - xx = rpmsqFork(&psm->sq); - if (psm->sq.child == 0) { - rpmlog(RPMLOG_DEBUG, "%s: %s\texecv(%s) pid %d\n", -@@ -768,6 +770,8 @@ static rpmRC runScript(rpmpsm psm, Heade - - (void) psmWait(psm); - + rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); + rc = rpmScriptRun(script, arg1, arg2, rpmtsScriptFd(psm->ts), + prefixes, warn_only, selinux); + rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); + rpmtsSuspendResumeDBLock(psm->ts, 1); -+ - if (psm->sq.reaped < 0) { - rpmlog(RPMLOG_ERR, _("%s scriptlet failed, waitpid(%d) rc %d: %s\n"), - sname, psm->sq.child, psm->sq.reaped, strerror(errno)); ---- ./lib/rpmdb.c.orig 2010-03-25 14:36:57.000000000 +0000 -+++ ./lib/rpmdb.c 2010-03-25 14:43:41.000000000 +0000 -@@ -903,6 +903,21 @@ int rpmdbSync(rpmdb db) - return rc; + + /* + * Notify callback for all errors. "total" abused for warning/error, +--- ./lib/rpmdb.c.orig 2011-05-12 10:23:47.000000000 +0000 ++++ ./lib/rpmdb.c 2011-05-12 10:24:57.000000000 +0000 +@@ -674,6 +674,12 @@ int rpmdbSync(rpmdb db) + return dbiForeach(db->_dbi, dbiSync, 0); } +int rpmdbSuspendResumeDBLock(rpmdb db, int mode) +{ -+ int dbix; -+ int rc = 0; + if (db == NULL) return 0; -+ for (dbix = 0; dbix < db->db_ndbi; dbix++) { -+ int xx; -+ if (db->_dbi[dbix] == NULL) -+ continue; -+ xx = dbiSync(db->_dbi[dbix], mode ? -2 : -1); -+ if (xx && rc == 0) rc = xx; -+ } -+ return rc; ++ return dbiForeach(db->_dbi, mode ? dbiResumeDBLock : dbiSuspendDBLock, 0); +} + - /* FIX: dbTemplate structure assignment */ - static - rpmdb newRpmdb(const char * root, ---- ./lib/rpmts.c.orig 2009-12-17 09:05:37.000000000 +0000 -+++ ./lib/rpmts.c 2010-03-25 14:43:41.000000000 +0000 -@@ -89,6 +89,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) + static rpmdb newRpmdb(const char * root, const char * home, + int mode, int perms, int flags) + { +--- ./lib/rpmts.c.orig 2010-12-22 11:17:20.000000000 +0000 ++++ ./lib/rpmts.c 2011-05-12 10:24:57.000000000 +0000 +@@ -95,6 +95,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) return rc; } @@ -131,16 +134,14 @@ to change the ABI. + int rpmtsInitDB(rpmts ts, int dbmode) { - void *lock = rpmtsAcquireLock(ts); ---- ./lib/rpmts.h.orig 2009-12-17 09:05:37.000000000 +0000 -+++ ./lib/rpmts.h 2010-03-25 14:43:41.000000000 +0000 -@@ -469,6 +469,10 @@ rpmdb rpmtsGetRdb(rpmts ts); + rpmlock lock = rpmtsAcquireLock(ts); +--- ./lib/rpmts.h.orig 2010-12-21 09:50:50.000000000 +0000 ++++ ./lib/rpmts.h 2011-05-12 10:24:57.000000000 +0000 +@@ -423,6 +423,8 @@ rpmdb rpmtsGetRdb(rpmts ts); void * rpmtsNotify(rpmts ts, rpmte te, rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total); -+int rpmtsSuspendResumeDBLock(rpmts ts, int mode) -+ /*@globals fileSystem @*/ -+ /*@modifies fileSystem @*/; ++int rpmtsSuspendResumeDBLock(rpmts ts, int mode); + /** \ingroup rpmts * Return number of (ordered) transaction set elements. diff --git a/taggedfileindex.diff b/taggedfileindex.diff index 52fe192..7fc306d 100644 --- a/taggedfileindex.diff +++ b/taggedfileindex.diff @@ -1,181 +1,14 @@ -The taggedfileindex patch. Speeds up database searches, but breaks -fingerprint semantics. -rh#103204 - ---- ./lib/rpmdb.c.orig 2010-03-25 14:43:41.000000000 +0000 -+++ ./lib/rpmdb.c 2010-03-25 15:15:14.000000000 +0000 -@@ -1122,6 +1122,16 @@ int rpmdbVerify(const char * prefix) - return rc; - } - -+static inline unsigned int taghash(const char *s) -+{ -+ int c; -+ unsigned int r = 0; -+ while ((c = *(const unsigned char *)s++) != 0) -+ if (c != '/') -+ r += (r << 3) + c; -+ return ((r & 0x7fff) | 0x8000) << 16; -+} -+ - /** - * Find file matches in database. - * @param db rpm database -@@ -1181,6 +1191,11 @@ static int rpmdbFindByFile(rpmdb db, con - if (rc == 0) - (void) dbt2set(dbi, data, &allMatches); - -+ /* strip off directory tags */ -+ if (allMatches != NULL) -+ for (i = 0; i < allMatches->count; i++) -+ if (allMatches->recs[i].tagNum & 0x80000000) -+ allMatches->recs[i].tagNum &= 0x0000ffff; - xx = dbiCclose(dbi, dbcursor, 0); - dbcursor = NULL; - } else -@@ -2182,7 +2197,7 @@ void rpmdbSortIterator(rpmdbMatchIterato - } - } - --static int rpmdbGrowIterator(rpmdbMatchIterator mi) -+static int rpmdbGrowIterator(rpmdbMatchIterator mi, unsigned int tag) - { - DBC * dbcursor; - DBT * key; -@@ -2232,6 +2247,27 @@ static int rpmdbGrowIterator(rpmdbMatchI - dbcursor = NULL; - #endif - -+ if (tag) { -+ int i, j; -+ /* prune the set against the tag */ -+ for (i = j = 0; i < set->count; i++) { -+ if (set->recs[i].tagNum & 0x80000000) { -+ /* tagged entry */ -+ if ((set->recs[i].tagNum & 0xffff0000) != tag) -+ continue; -+ set->recs[i].tagNum &= 0x0000ffff; -+ } -+ if (i != j) -+ set->recs[j] = set->recs[i]; -+ j++; -+ } -+ set->count = j; -+ if (j == 0) { -+ set = dbiFreeIndexSet(set); -+ return DB_NOTFOUND; -+ } -+ } -+ - if (mi->mi_set == NULL) { - mi->mi_set = set; - } else { -@@ -2413,7 +2449,15 @@ int rpmdbExtendIterator(rpmdbMatchIterat - { - mi->mi_key.data = (void *) keyp; - mi->mi_key.size = keylen ? keylen : strlen(keyp); -- return rpmdbGrowIterator(mi); -+ return rpmdbGrowIterator(mi, 0); -+} -+ -+int rpmdbExtendIteratorDirtag(rpmdbMatchIterator mi, -+ const void * keyp, size_t keylen, const char *dirname) -+{ -+ mi->mi_key.data = (void *) keyp; -+ mi->mi_key.size = keylen ? keylen : strlen(keyp); -+ return rpmdbGrowIterator(mi, dirname ? taghash(dirname) : 0); - } - - /* -@@ -2808,8 +2852,16 @@ int rpmdbAdd(rpmdb db, int iid, Header h - - if (hdrNum) - { -+ struct rpmtd_s dn, di; -+ const char ** dirNames; -+ uint32_t * dirIndexes; - dbiIndexItem rec = dbiIndexNewItem(hdrNum, 0); - -+ headerGet(h, RPMTAG_DIRNAMES, &dn, HEADERGET_MINMEM); -+ headerGet(h, RPMTAG_DIRINDEXES, &di, HEADERGET_MINMEM); -+ dirNames = dn.data; -+ dirIndexes = di.data; -+ - if (dbiTags.tags != NULL) - for (dbix = 0; dbix < dbiTags.max; dbix++) { - rpmTag rpmtag; -@@ -2901,6 +2953,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h - */ - i = rec->tagNum = rpmtdGetIndex(&tagdata); - switch (rpmtag) { -+ case RPMTAG_BASENAMES: -+ if (i < 0x010000) -+ rec->tagNum |= taghash(dirNames[dirIndexes[i]]); -+ break; - case RPMTAG_REQUIRENAME: { - /* Filter out install prerequisites. */ - rpm_flag_t *rflag = rpmtdNextUint32(&reqflags); -@@ -2986,6 +3042,9 @@ cont: - if (ret == 0) { - headerSetInstance(h, hdrNum); +This used to be the taggedfileindex patch, but it's gone. +The remaining part just strips off the tag. +--- ./lib/rpmdb.c.orig 2011-05-11 14:27:32.000000000 +0000 ++++ ./lib/rpmdb.c 2011-05-11 15:14:39.000000000 +0000 +@@ -257,6 +257,9 @@ static int dbt2set(dbiIndex dbi, DBT * d + _DBSWAP(hdrNum); + _DBSWAP(tagNum); + } ++ /* remove tagged directory info */ ++ if (tagNum.ui & 0x80000000) ++ tagNum.ui &= 0x0000ffff; + set->recs[i].hdrNum = hdrNum.ui; + set->recs[i].tagNum = tagNum.ui; } -+ -+ rpmtdFreeData(&dn); -+ rpmtdFreeData(&di); - } - - exit: ---- ./lib/rpmdb_internal.h.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/rpmdb_internal.h 2010-03-25 15:14:38.000000000 +0000 -@@ -542,6 +542,9 @@ const char *rpmdbHome(rpmdb db); - int rpmdbExtendIterator(rpmdbMatchIterator mi, - const void * keyp, size_t keylen); - -+int rpmdbExtendIteratorDirtag(rpmdbMatchIterator mi, -+ const void * keyp, size_t keylen, const char *); -+ - /** \ingroup rpmdb - * sort the iterator by (recnum, filenum) - * Return database iterator. ---- ./lib/transaction.c.orig 2010-03-25 14:38:27.000000000 +0000 -+++ ./lib/transaction.c 2010-03-25 15:14:38.000000000 +0000 -@@ -848,9 +848,12 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( - rpmdbMatchIterator mi; - int xx; - const char * baseName; -+ const char * dirName; - -+#if 0 - rpmStringSet baseNames = rpmStringSetCreate(fileCount, - hashFunctionString, strcmp, NULL); -+#endif - - mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMTAG_BASENAMES, NULL, 0); - -@@ -868,18 +871,25 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( - while (rpmfiNext(fi) >= 0) { - size_t keylen; - baseName = rpmfiBN(fi); -+ dirName = rpmfiDN(fi); -+#if 0 - if (rpmStringSetHasEntry(baseNames, baseName)) - continue; -+#endif - - keylen = strlen(baseName); - if (keylen == 0) - keylen++; /* XXX "/" fixup. */ -- xx = rpmdbExtendIterator(mi, baseName, keylen); -+ xx = rpmdbExtendIteratorDirtag(mi, baseName, keylen, dirName); -+#if 0 - rpmStringSetAddEntry(baseNames, baseName); -+#endif - } - } - pi = rpmtsiFree(pi); -+#if 0 - rpmStringSetFree(baseNames); -+#endif - - rpmdbSortIterator(mi); - /* iterator is now sorted by (recnum, filenum) */ diff --git a/tarrecordsize.diff b/tarrecordsize.diff deleted file mode 100644 index 7b79d61..0000000 --- a/tarrecordsize.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- ./build.c.orig 2010-04-07 14:56:36.000000000 +0000 -+++ ./build.c 2010-04-07 14:58:52.000000000 +0000 -@@ -126,7 +126,13 @@ static char * getTarSpec(const char *arg - if (!(fp = popen(cmd, "r"))) { - rpmlog(RPMLOG_ERR, _("Failed to open tar pipe: %m\n")); - } else { -- char *fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp); -+ char *fok; -+ for (;;) { -+ fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp); -+ /* tar sometimes prints "tar: Record size = 16" messages */ -+ if (!fok || strncmp(fok, "tar: ", 5) != 0) -+ break; -+ } - pclose(fp); - gotspec = (fok != NULL) && isSpecFile(tmpSpecFile); - } diff --git a/verify_p.diff b/verify_p.diff new file mode 100644 index 0000000..8eeea06 --- /dev/null +++ b/verify_p.diff @@ -0,0 +1,49 @@ +Make 'rpm -Vp ' work again. + +--- ./lib/rpmte.c.orig 2011-05-12 15:22:06.000000000 +0000 ++++ ./lib/rpmte.c 2011-05-12 15:23:39.000000000 +0000 +@@ -905,15 +905,19 @@ int rpmteProcess(rpmte te, pkgGoal goal) + } + } + +- rpmteRunAllCollections(te, PLUGINHOOK_COLL_PRE_REMOVE); +- +- if (rpmteOpen(te, reset_fi)) { ++ if (goal == PKG_VERIFY) { + failed = rpmpsmRun(te->ts, te, goal); +- rpmteClose(te, reset_fi); +- } ++ } else { ++ rpmteRunAllCollections(te, PLUGINHOOK_COLL_PRE_REMOVE); ++ ++ if (rpmteOpen(te, reset_fi)) { ++ failed = rpmpsmRun(te->ts, te, goal); ++ rpmteClose(te, reset_fi); ++ } + +- rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ADD); +- rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ANY); ++ rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ADD); ++ rpmteRunAllCollections(te, PLUGINHOOK_COLL_POST_ANY); ++ } + + /* XXX should %pretrans failure fail the package install? */ + if (failed && !scriptstage) { +--- ./lib/verify.c.orig 2011-05-12 15:22:01.000000000 +0000 ++++ ./lib/verify.c 2011-05-12 15:22:49.000000000 +0000 +@@ -267,11 +267,11 @@ static int rpmVerifyScript(rpmts ts, Hea + + if (headerIsEntry(h, RPMTAG_VERIFYSCRIPT)) { + /* fake up a erasure transaction element */ +- (void) rpmtsAddEraseElement(ts, h, -1); +- +- rc = (rpmteProcess(rpmtsElement(ts, 0), PKG_VERIFY) != RPMRC_OK); +- ++ rpmte p = rpmteNew(ts, h, TR_REMOVED, NULL, NULL); ++ rpmteSetHeader(p, h); ++ rc = (rpmteProcess(p, PKG_VERIFY) != RPMRC_OK); + /* clean up our fake transaction bits */ ++ rpmteFree(p); + rpmtsEmpty(ts); + } + diff --git a/waitlock.diff b/waitlock.diff index d794d21..8a811c5 100644 --- a/waitlock.diff +++ b/waitlock.diff @@ -1,97 +1,104 @@ Fix global (DB_PRIVATE) lock code: fix recursion counter, retry failed lock operations for up to 3 minutes. ---- ./lib/backend/db3.c.orig 2010-03-25 14:44:42.000000000 +0000 -+++ ./lib/backend/db3.c 2010-03-25 14:52:05.000000000 +0000 -@@ -394,6 +394,8 @@ static int db3stat(dbiIndex dbi, unsigne +--- ./lib/backend/db3.c.orig 2011-03-02 06:40:10.000000000 +0000 ++++ ./lib/backend/db3.c 2011-05-12 10:24:20.000000000 +0000 +@@ -432,6 +432,8 @@ int dbiVerify(dbiIndex dbi, unsigned int return rc; } +static int _lockdbfd = 0; + - static int db3close(dbiIndex dbi, unsigned int flags) + int dbiClose(dbiIndex dbi, unsigned int flags) { - rpmdb rpmdb = dbi->dbi_rpmdb; -@@ -414,6 +416,9 @@ static int db3close(dbiIndex dbi, unsign + rpmdb rdb = dbi->dbi_rpmdb; +@@ -451,6 +453,8 @@ int dbiClose(dbiIndex dbi, unsigned int + rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n", dbhome, dbi->dbi_file); - -+ if (dbi->dbi_lockdbfd && -+ _lockdbfd) ++ if (dbi->dbi_lockdbfd && _lockdbfd) + _lockdbfd--; } - if (rpmdb->db_dbenv != NULL && dbi->dbi_use_dbenv) { -@@ -645,8 +651,6 @@ static int db3open(rpmdb rpmdb, rpmTag r - } + xx = db_fini(rdb, dbhome ? dbhome : ""); +@@ -490,6 +494,7 @@ static int dbiFlock(dbiIndex dbi, int mo + rc = 1; + } else { + const char *dbhome = rpmdbHome(dbi->dbi_rpmdb); ++ int tries; + struct flock l; + memset(&l, 0, sizeof(l)); + l.l_whence = 0; +@@ -499,20 +504,38 @@ static int dbiFlock(dbiIndex dbi, int mo + ? F_RDLCK : F_WRLCK; + l.l_pid = 0; - if (rc == 0) { -- static int _lockdbfd = 0; -- - rc = db_create(&db, dbenv, dbi->dbi_cflags); - rc = cvtdberr(dbi, "db_create", rc, _debug); - if (rc == 0 && db != NULL) { -@@ -810,6 +814,7 @@ static int db3open(rpmdb rpmdb, rpmTag r - if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) { - rc = 1; - } else { -+ int tries; - struct flock l; - memset(&l, 0, sizeof(l)); - l.l_whence = 0; -@@ -819,24 +824,39 @@ static int db3open(rpmdb rpmdb, rpmTag r - ? F_RDLCK : F_WRLCK; - l.l_pid = 0; - -- rc = fcntl(fdno, F_SETLK, (void *) &l); -- if (rc) { -- /* Warning iff using non-private CDB locking. */ -- rc = ((dbi->dbi_use_dbenv && -- (dbi->dbi_eflags & DB_INIT_CDB) && -- !(dbi->dbi_eflags & DB_PRIVATE)) -- ? 0 : 1); -- rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), -- _("cannot get %s lock on %s/%s\n"), -- ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY) -- ? _("shared") : _("exclusive"), -- dbhome, dbi->dbi_file); -- } else { -- rpmlog(RPMLOG_DEBUG, -- "locked db index %s/%s\n", -- dbhome, dbi->dbi_file); -+ for (tries = 0; ; tries++) { -+ rc = fcntl(fdno, F_SETLK, (void *) &l); -+ if (rc) { -+ rc = ((dbi->dbi_use_dbenv && -+ (dbi->dbi_eflags & DB_INIT_CDB) && -+ !(dbi->dbi_eflags & DB_PRIVATE)) -+ ? 0 : 1); -+ if (errno == EAGAIN && rc) { -+ struct timespec ts; -+ if (tries == 0) -+ rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, dbi->dbi_file); -+ ts.tv_sec = (time_t)0; -+ ts.tv_nsec = 100000000; -+ if (tries < 10*60*3) { -+ nanosleep(&ts, (struct timespec *)0); -+ continue; -+ } -+ } -+ rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), -+ _("cannot get %s lock on %s/%s\n"), -+ ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY) -+ ? _("shared") : _("exclusive"), -+ dbhome, dbi->dbi_file); -+ } else { -+ rpmlog(RPMLOG_DEBUG, -+ "locked db index %s/%s\n", -+ dbhome, dbi->dbi_file); -+ } -+ break; - } - } -+ if (rc && dbi->dbi_use_dbenv) -+ _lockdbfd--; - } +- rc = fcntl(fdno, F_SETLK, (void *) &l); +- if (rc) { +- uint32_t eflags = db_envflags(db); +- /* Warning iff using non-private CDB locking. */ +- rc = (((eflags & DB_INIT_CDB) && !(eflags & DB_PRIVATE)) ? 0 : 1); +- rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), +- _("cannot get %s lock on %s/%s\n"), +- ((mode & O_ACCMODE) == O_RDONLY) +- ? _("shared") : _("exclusive"), +- dbhome, dbi->dbi_file); +- } else { +- rpmlog(RPMLOG_DEBUG, +- "locked db index %s/%s\n", +- dbhome, dbi->dbi_file); ++ for (tries = 0; ; tries++) { ++ rc = fcntl(fdno, F_SETLK, (void *) &l); ++ if (rc) { ++ uint32_t eflags = db_envflags(db); ++ /* Warning iff using non-private CDB locking. */ ++ rc = (((eflags & DB_INIT_CDB) && !(eflags & DB_PRIVATE)) ? 0 : 1); ++ if (errno == EAGAIN && rc) { ++ struct timespec ts; ++ if (tries == 0) ++ rpmlog(RPMLOG_WARNING, ++ _("waiting for %s lock on %s/%s\n"), ++ ((mode & O_ACCMODE) == O_RDONLY) ++ ? _("shared") : _("exclusive"), ++ dbhome, dbi->dbi_file); ++ ts.tv_sec = (time_t)0; ++ ts.tv_nsec = 100000000; /* .1 seconds */ ++ if (tries < 10*60*3) { /* 3 minutes */ ++ nanosleep(&ts, (struct timespec *)0); ++ continue; ++ } ++ } ++ rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), ++ _("cannot get %s lock on %s/%s\n"), ++ ((mode & O_ACCMODE) == O_RDONLY) ++ ? _("shared") : _("exclusive"), ++ dbhome, dbi->dbi_file); ++ } else { ++ rpmlog(RPMLOG_DEBUG, ++ "locked db index %s/%s\n", ++ dbhome, dbi->dbi_file); ++ } ++ break; } } + return rc; +@@ -529,7 +552,6 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt + DB * db = NULL; + DBTYPE dbtype = DB_UNKNOWN; + uint32_t oflags; +- static int _lockdbfd = 0; + + if (dbip) + *dbip = NULL; +@@ -603,7 +625,10 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt + dbi->dbi_db = db; + dbi->dbi_oflags = oflags; + +- if (!verifyonly && rc == 0 && dbi->dbi_lockdbfd && _lockdbfd++ == 0) { ++ if (verifyonly) ++ dbi->dbi_lockdbfd = 0; /* disable locking in verify mode */ ++ ++ if (rc == 0 && dbi->dbi_lockdbfd && _lockdbfd++ == 0) { + rc = dbiFlock(dbi, rdb->db_mode); + } + diff --git a/weakdeps.diff b/weakdeps.diff index 7e12a74..f46e0cc 100644 --- a/weakdeps.diff +++ b/weakdeps.diff @@ -14,27 +14,18 @@ B) use RPMSENSE_STRONG to support a "strong" version, "Recommends" Needs extcond.diff for query operations. ---- ./build/parsePreamble.c.orig 2009-12-17 09:05:55.000000000 +0000 -+++ ./build/parsePreamble.c 2010-03-25 14:56:24.000000000 +0000 -@@ -124,6 +124,8 @@ static struct tokenBits_s const installS - { "post", RPMSENSE_SCRIPT_POST }, - { "rpmlib", RPMSENSE_RPMLIB }, +--- ./build/parsePreamble.c.orig 2011-01-25 13:52:28.000000000 +0000 ++++ ./build/parsePreamble.c 2011-05-11 14:09:07.000000000 +0000 +@@ -310,6 +310,8 @@ static struct tokenBits_s const installS { "verify", RPMSENSE_SCRIPT_VERIFY }, -+ { "hint", RPMSENSE_MISSINGOK }, -+ { "strong", RPMSENSE_STRONG }, + { "pretrans", RPMSENSE_PRETRANS }, + { "posttrans", RPMSENSE_POSTTRANS }, ++ { "hint", RPMSENSE_MISSINGOK }, ++ { "strong", RPMSENSE_STRONG }, { NULL, 0 } }; -@@ -134,6 +136,8 @@ static const struct tokenBits_s const bu - { "build", RPMSENSE_SCRIPT_BUILD }, - { "install", RPMSENSE_SCRIPT_INSTALL }, - { "clean", RPMSENSE_SCRIPT_CLEAN }, -+ { "hint", RPMSENSE_MISSINGOK }, -+ { "strong", RPMSENSE_STRONG }, - { NULL, 0 } - }; - -@@ -649,6 +653,18 @@ static int handlePreambleTag(rpmSpec spe +@@ -790,6 +792,18 @@ static int handlePreambleTag(rpmSpec spe if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) return rc; break; @@ -53,10 +44,10 @@ Needs extcond.diff for query operations. case RPMTAG_EXCLUDEARCH: case RPMTAG_EXCLUSIVEARCH: case RPMTAG_EXCLUDEOS: -@@ -748,6 +764,14 @@ static struct PreambleRec_s const preamb - {RPMTAG_DOCDIR, 0, 0, LEN_AND_STR("docdir")}, - {RPMTAG_DISTTAG, 0, 0, LEN_AND_STR("disttag")}, +@@ -895,6 +909,14 @@ static struct PreambleRec_s const preamb {RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")}, + {RPMTAG_COLLECTIONS, 0, 0, LEN_AND_STR("collections")}, + {RPMTAG_ORDERFLAGS, 2, 0, LEN_AND_STR("orderwithrequires")}, + {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("recommends")}, + {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("suggests")}, + {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("supplements")}, @@ -68,45 +59,51 @@ Needs extcond.diff for query operations. {0, 0, 0, 0} }; ---- ./build/parseReqs.c.orig 2009-12-17 09:05:55.000000000 +0000 -+++ ./build/parseReqs.c 2010-03-25 14:53:47.000000000 +0000 -@@ -85,6 +85,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p - tagflags |= RPMSENSE_ANY; +--- ./build/parseReqs.c.orig 2010-12-13 14:01:56.000000000 +0000 ++++ ./build/parseReqs.c 2011-05-11 14:16:43.000000000 +0000 +@@ -95,6 +95,20 @@ rpmRC parseRCPOT(rpmSpec spec, Package p + nametag = RPMTAG_CONFLICTNAME; h = spec->buildRestrictions; break; + case RPMTAG_SUGGESTSFLAGS: ++ nametag = RPMTAG_SUGGESTSNAME; ++ break; + case RPMTAG_ENHANCESFLAGS: -+ h = pkg->header; ++ nametag = RPMTAG_ENHANCESNAME; + break; + case RPMTAG_BUILDSUGGESTS: ++ nametag = RPMTAG_SUGGESTSNAME; ++ h = spec->buildRestrictions; ++ break; + case RPMTAG_BUILDENHANCES: -+ h = spec->buildRestrictions; -+ break; - default: - case RPMTAG_REQUIREFLAGS: - tagflags |= RPMSENSE_ANY; ---- ./build/reqprov.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./build/reqprov.c 2010-03-25 14:53:47.000000000 +0000 -@@ -75,6 +75,16 @@ int addReqProv(rpmSpec spec, Header h, r - flagtag = RPMTAG_TRIGGERFLAGS; ++ nametag = RPMTAG_ENHANCESNAME; ++ h = spec->buildRestrictions; ++ break; + } + + for (r = field; *r != '\0'; r = re) { +--- ./build/reqprov.c.orig 2010-12-13 14:01:56.000000000 +0000 ++++ ./build/reqprov.c 2011-05-11 14:15:02.000000000 +0000 +@@ -75,6 +75,16 @@ int addReqProv(Header h, rpmTagVal tagN, indextag = RPMTAG_TRIGGERINDEX; extra = Flags & RPMSENSE_TRIGGER; -+ } else if (tagN == RPMTAG_SUGGESTSFLAGS || tagN == RPMTAG_BUILDSUGGESTS) { -+ nametag = RPMTAG_SUGGESTSNAME; + break; ++ case RPMTAG_SUGGESTSNAME: + versiontag = RPMTAG_SUGGESTSVERSION; + flagtag = RPMTAG_SUGGESTSFLAGS; + extra = Flags & _ALL_REQUIRES_MASK; -+ } else if (tagN == RPMTAG_ENHANCESFLAGS || tagN == RPMTAG_BUILDENHANCES) { -+ nametag = RPMTAG_ENHANCESNAME; ++ break; ++ case RPMTAG_ENHANCESNAME: + versiontag = RPMTAG_ENHANCESVERSION; + flagtag = RPMTAG_ENHANCESFLAGS; + extra = Flags & _ALL_REQUIRES_MASK; - } else { - nametag = RPMTAG_REQUIRENAME; - versiontag = RPMTAG_REQUIREVERSION; ---- ./build/rpmfc.c.orig 2009-12-09 13:37:25.000000000 +0000 -+++ ./build/rpmfc.c 2010-03-25 14:53:47.000000000 +0000 -@@ -1405,6 +1405,12 @@ static struct DepMsg_s depMsgs[] = { ++ break; + case RPMTAG_REQUIRENAME: + default: + tagN = RPMTAG_REQUIRENAME; +--- ./build/rpmfc.c.orig 2011-02-28 09:57:21.000000000 +0000 ++++ ./build/rpmfc.c 2011-05-11 13:58:33.000000000 +0000 +@@ -1075,6 +1075,12 @@ static struct DepMsg_s depMsgs[] = { { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, 0, -1 }, @@ -119,7 +116,7 @@ Needs extcond.diff for query operations. { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } }; -@@ -1490,6 +1496,14 @@ static int rpmfcGenerateDependsHelper(co +@@ -1160,6 +1166,14 @@ static rpmRC rpmfcGenerateDependsHelper( failnonzero = 0; tagflags = RPMSENSE_FIND_REQUIRES; break; @@ -134,9 +131,9 @@ Needs extcond.diff for query operations. default: continue; break; ---- ./lib/formats.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/formats.c 2010-03-25 15:00:15.000000000 +0000 -@@ -601,6 +601,24 @@ static char * depflagsFormat(rpmtd td, c +--- ./lib/formats.c.orig 2011-01-25 13:52:28.000000000 +0000 ++++ ./lib/formats.c 2011-05-11 14:02:09.000000000 +0000 +@@ -560,6 +560,24 @@ static char * depflagsFormat(rpmtd td, c return val; } @@ -161,16 +158,17 @@ Needs extcond.diff for query operations. /** * Return tag container array size. * @param td tag data container -@@ -738,5 +756,6 @@ static const struct headerFormatFunc_s r - { RPMTD_FORMAT_ARRAYSIZE, "arraysize", arraysizeFormat }, - { RPMTD_FORMAT_FSTATE, "fstate", fstateFormat }, +@@ -672,6 +690,7 @@ static const struct headerFormatFunc_s r { RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat }, + { RPMTD_FORMAT_EXPAND, "expand", expandFormat }, + { RPMTD_FORMAT_FSTATUS, "fstatus", fstatusFormat }, + { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", depflag_strongFormat }, { -1, NULL, NULL } }; ---- ./lib/rpmds.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/rpmds.c 2010-03-25 14:53:47.000000000 +0000 -@@ -66,6 +66,10 @@ static int dsType(rpmTag tag, + +--- ./lib/rpmds.c.orig 2011-02-15 13:04:04.000000000 +0000 ++++ ./lib/rpmds.c 2011-05-11 13:58:33.000000000 +0000 +@@ -69,6 +69,10 @@ static int dsType(rpmTagVal tag, t = "Trigger"; evr = RPMTAG_TRIGGERVERSION; f = RPMTAG_TRIGGERFLAGS; @@ -181,28 +179,28 @@ Needs extcond.diff for query operations. } else { rc = 1; } ---- ./lib/rpmds.h.orig 2010-03-24 16:47:28.000000000 +0000 -+++ ./lib/rpmds.h 2010-03-25 14:53:47.000000000 +0000 -@@ -55,7 +55,7 @@ typedef enum rpmsenseFlags_e { +--- ./lib/rpmds.h.orig 2011-05-11 09:15:33.000000000 +0000 ++++ ./lib/rpmds.h 2011-05-11 14:01:07.000000000 +0000 +@@ -48,7 +48,7 @@ enum rpmsenseFlags_e { RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ RPMSENSE_KEYRING = (1 << 26), -- RPMSENSE_PATCHES = (1 << 27), -+ RPMSENSE_STRONG = (1 << 27), +- /* bit 27 unused */ ++ RPMSENSE_STRONG = (1 << 27), RPMSENSE_CONFIG = (1 << 28) - } rpmsenseFlags; + }; -@@ -74,6 +74,7 @@ typedef enum rpmsenseFlags_e { +@@ -69,6 +69,7 @@ typedef rpmFlags rpmsenseFlags; RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_FIND_REQUIRES | \ RPMSENSE_MISSINGOK | \ + RPMSENSE_STRONG | \ - RPMSENSE_SCRIPT_PREP | \ - RPMSENSE_SCRIPT_BUILD | \ - RPMSENSE_SCRIPT_INSTALL | \ ---- ./lib/rpmtag.h.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/rpmtag.h 2010-03-25 14:53:47.000000000 +0000 -@@ -228,14 +228,14 @@ typedef enum rpmTag_e { + RPMSENSE_RPMLIB | \ + RPMSENSE_KEYRING | \ + RPMSENSE_PRETRANS | \ +--- ./lib/rpmtag.h.orig 2010-12-13 14:01:56.000000000 +0000 ++++ ./lib/rpmtag.h 2011-05-11 13:58:33.000000000 +0000 +@@ -217,14 +217,14 @@ typedef enum rpmTag_e { RPMTAG_PRETRANSPROG = 1153, /* s */ RPMTAG_POSTTRANSPROG = 1154, /* s */ RPMTAG_DISTTAG = 1155, /* s */ @@ -225,49 +223,48 @@ Needs extcond.diff for query operations. RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ RPMTAG_CVSID = 1163, /* s (unimplemented) */ #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ ---- ./lib/rpmtd.h.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./lib/rpmtd.h 2010-03-25 14:58:31.000000000 +0000 -@@ -216,6 +216,7 @@ typedef enum rpmtdFormats_e { - RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int types) */ - RPMTD_FORMAT_FSTATE = 16, /* file states (int types) */ +--- ./lib/rpmtd.h.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./lib/rpmtd.h 2011-05-11 14:00:06.000000000 +0000 +@@ -220,6 +220,7 @@ typedef enum rpmtdFormats_e { RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int types) */ -+ RPMTD_FORMAT_DEPFLAG_STRONG = 18, /* strong dependency */ + RPMTD_FORMAT_EXPAND = 18, /* macro expansion (string types) */ + RPMTD_FORMAT_FSTATUS = 19, /* file verify status (int types) */ ++ RPMTD_FORMAT_DEPFLAG_STRONG = 20, /* strong dependency (int types) */ } rpmtdFormats; /** \ingroup rpmtd ---- ./python/rpmmodule.c.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./python/rpmmodule.c 2010-03-25 14:53:47.000000000 +0000 -@@ -373,7 +373,7 @@ static int initModule(PyObject *m) +--- ./python/rpmmodule.c.orig 2010-12-03 12:11:57.000000000 +0000 ++++ ./python/rpmmodule.c 2011-05-11 14:19:37.000000000 +0000 +@@ -376,6 +376,7 @@ static int initModule(PyObject *m) REGISTER_ENUM(RPMSENSE_RPMLIB); REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); REGISTER_ENUM(RPMSENSE_KEYRING); -- REGISTER_ENUM(RPMSENSE_PATCHES); + REGISTER_ENUM(RPMSENSE_STRONG); REGISTER_ENUM(RPMSENSE_CONFIG); REGISTER_ENUM(RPMTRANS_FLAG_TEST); ---- ./rpmpopt.in.orig 2009-12-07 14:36:49.000000000 +0000 -+++ ./rpmpopt.in 2010-03-25 14:53:47.000000000 +0000 +--- ./rpmpopt.in.orig 2011-01-11 07:04:51.000000000 +0000 ++++ ./rpmpopt.in 2011-05-11 14:18:47.000000000 +0000 @@ -65,6 +65,22 @@ rpm alias --requires --qf \ --POPTdesc=$"list capabilities required by package(s)" rpm alias -R --requires -+rpm alias --suggests --qf \ ++rpm alias --suggests --qf \ + "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package suggests" + -+rpm alias --recommends --qf \ ++rpm alias --recommends --qf \ + "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package recommends" + -+rpm alias --enhances --qf \ ++rpm alias --enhances --qf \ + "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package enhances" + -+rpm alias --supplements --qf \ ++rpm alias --supplements --qf \ + "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \ + --POPTdesc=$"list capabilities this package supplements" + - 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\ + rpm alias --info --qf '\ + Name : %{NAME}\n\ + %|EPOCH?{Epoch : %{EPOCH}\n}|\ diff --git a/whatrequires-doc.diff b/whatrequires-doc.diff index dff6c33..96cf15f 100644 --- a/whatrequires-doc.diff +++ b/whatrequires-doc.diff @@ -1,8 +1,6 @@ -Index: doc/rpm.8 -=================================================================== ---- doc/rpm.8.orig -+++ doc/rpm.8 -@@ -572,6 +572,11 @@ Query all packages that provide the \fIC +--- ./doc/rpm.8.orig 2011-01-05 08:11:09.000000000 +0000 ++++ ./doc/rpm.8 2011-05-11 15:36:18.000000000 +0000 +@@ -564,6 +564,11 @@ Query all packages that provide the \fIC .TP \fB--whatrequires \fICAPABILITY\fB\fR Query all packages that require \fICAPABILITY\fR for proper functioning. From ef28b5789eb46f72985c3069966605abedb4bbe9177d3a3dbb238f2c11512302 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 18 May 2011 15:08:44 +0000 Subject: [PATCH 124/137] Autobuild autoformatter for 70563 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=129 --- rpm-python.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm-python.spec b/rpm-python.spec index 9b7d163..d9a9e07 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -19,7 +19,7 @@ Name: rpm-python -BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel libsemanage-devel lua-devel ncurses-devel popt-devel +BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel libsemanage-devel lua-devel ncurses-devel popt-devel BuildRequires: libacl-devel libcap-devel python-devel xz-devel zlib-devel #!BuildIgnore: rpmlint-Factory License: GPLv2+ From c0a22a6755b8647bf314ff3940ec20e202c472019ada3e4e30b333b169d1fa82 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 19 May 2011 10:44:23 +0000 Subject: [PATCH 125/137] Accepting request 70681 from Base:System -> OBS-URL: https://build.opensuse.org/request/show/70681 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=130 --- fileattrs.diff | 10 +++++++++- rpm.changes | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/fileattrs.diff b/fileattrs.diff index 5722108..e50ddaf 100644 --- a/fileattrs.diff +++ b/fileattrs.diff @@ -1,5 +1,5 @@ --- ./fileattrs/Makefile.am.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/Makefile.am 2011-05-18 09:27:58.000000000 +0000 ++++ ./fileattrs/Makefile.am 2011-05-19 09:58:19.000000000 +0000 @@ -6,6 +6,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs fattrs_DATA = \ @@ -64,6 +64,14 @@ +#%__perl_requires %{_rpmconfigdir}/perl.req %__perl_magic ^.*perl .*$ %__perl_flags exeonly +--- ./fileattrs/perllib.attr.orig 2011-05-19 09:59:05.000000000 +0000 ++++ ./fileattrs/perllib.attr 2011-05-19 09:58:29.000000000 +0000 +@@ -1,3 +1,4 @@ + %__perllib_provides %{_rpmconfigdir}/perl.prov +-%__perllib_requires %{_rpmconfigdir}/perl.req ++#disabled for now ++#%__perllib_requires %{_rpmconfigdir}/perl.req + %__perllib_magic ^Perl[[:digit:]] module source.* --- ./fileattrs/sysvinit.attr.orig 2011-05-18 09:27:44.000000000 +0000 +++ ./fileattrs/sysvinit.attr 2011-05-18 09:27:58.000000000 +0000 @@ -0,0 +1,2 @@ diff --git a/rpm.changes b/rpm.changes index c7ae5ab..d493d81 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 19 11:59:38 CEST 2011 - mls@suse.de + +- disable perl requires generation completely + ------------------------------------------------------------------- Wed May 18 11:34:17 CEST 2011 - mls@suse.de From 557be5e6d386e460dfa4b5025d9228e1a5cc35635351fee6b7b75014cfc43f2c Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 19 May 2011 10:44:36 +0000 Subject: [PATCH 126/137] Autobuild autoformatter for 70681 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=131 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index d9a9e07..945b80f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.9.0 -Release: 1 +Release: 2 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 67dc2b7..1f2b962 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.0 -Release: 1 +Release: 3 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 3854ae5f4daa38e79ca1ba622eac20c99acec6e3d100400da0c19b32c78ca066 Mon Sep 17 00:00:00 2001 From: Berthold Gunreben Date: Thu, 19 May 2011 14:04:20 +0000 Subject: [PATCH 127/137] Accepting request 70699 from Base:System -> OBS-URL: https://build.opensuse.org/request/show/70699 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=132 --- fileattrs.diff | 11 ++--------- magic_and_path.diff | 8 -------- rpm.changes | 6 ++++++ 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/fileattrs.diff b/fileattrs.diff index e50ddaf..914a75d 100644 --- a/fileattrs.diff +++ b/fileattrs.diff @@ -1,12 +1,12 @@ --- ./fileattrs/Makefile.am.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/Makefile.am 2011-05-19 09:58:19.000000000 +0000 ++++ ./fileattrs/Makefile.am 2011-05-19 12:50:54.000000000 +0000 @@ -6,6 +6,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs fattrs_DATA = \ desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ - pkgconfig.attr python.attr ocaml.attr script.attr mono.attr + pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \ -+ debuginfo.attr elflib.attr firmware.attr gstreamer.attr ksyms.attr sysvinit.attr ++ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr EXTRA_DIST = $(fattrs_DATA) --- ./fileattrs/debuginfo.attr.orig 2011-05-18 09:27:44.000000000 +0000 @@ -42,13 +42,6 @@ @@ -0,0 +1,2 @@ +%__firmware_provides %{_rpmconfigdir}/firmware.prov +%__firmware_path /lib/firmware/ ---- ./fileattrs/gstreamer.attr.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/gstreamer.attr 2011-05-18 09:27:58.000000000 +0000 -@@ -0,0 +1,4 @@ -+%__gstreamer_provides %{_rpmconfigdir}/gstreamer-provides -+%__gstreamer_path libgst -+%__gstreamer_magic ELF.*shared object -+%__gstreamer_flags magic_and_path --- ./fileattrs/ksyms.attr.orig 2011-05-18 09:27:44.000000000 +0000 +++ ./fileattrs/ksyms.attr 2011-05-18 09:27:58.000000000 +0000 @@ -0,0 +1,4 @@ diff --git a/magic_and_path.diff b/magic_and_path.diff index 8b3f5f2..de74ea7 100644 --- a/magic_and_path.diff +++ b/magic_and_path.diff @@ -3,14 +3,6 @@ match both regexpes to be sent to the dependency generator. --- build/rpmfc.c.orig 2011-05-16 10:46:20.000000000 +0000 +++ build/rpmfc.c 2011-05-16 11:02:56.000000000 +0000 -@@ -613,6 +613,7 @@ static void rpmfcAttributes(rpmfc fc, co - const char *path = fullpath + fc->brlen; - int is_executable = 0; - struct stat st; -+ int magic_and_path; - if (stat(fullpath, &st) == 0) { - is_executable = (S_ISREG(st.st_mode)) && - (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)); @@ -630,10 +631,13 @@ static void rpmfcAttributes(rpmfc fc, co continue; diff --git a/rpm.changes b/rpm.changes index d493d81..b507303 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 19 14:51:13 CEST 2011 - mls@suse.de + +- remove gstreamer from fileattrs +- remove unused var from magic_and_path patch + ------------------------------------------------------------------- Thu May 19 11:59:38 CEST 2011 - mls@suse.de From 9e395c331c0faf9876a94903b3e450de19324307269cdf365dcbb611dd423a41 Mon Sep 17 00:00:00 2001 From: Berthold Gunreben Date: Thu, 19 May 2011 14:04:31 +0000 Subject: [PATCH 128/137] Autobuild autoformatter for 70699 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=133 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 945b80f..d36cddf 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.9.0 -Release: 2 +Release: 3 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 1f2b962..e5130ee 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.0 -Release: 3 +Release: 5 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 046a619e3c427d36bd51e51097b66558216d89833d7b6b7210c2ad7490a8635f Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Fri, 20 May 2011 12:41:12 +0000 Subject: [PATCH 129/137] Accepting request 70785 from Base:System -> OBS-URL: https://build.opensuse.org/request/show/70785 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=134 --- debugedit-canon-fix.diff | 26 ++++++++++++++++++-------- rpm.changes | 5 +++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff index 2434272..f2be21b 100644 --- a/debugedit-canon-fix.diff +++ b/debugedit-canon-fix.diff @@ -1,10 +1,5 @@ -Subject: Fix path canonicalization issues in debugedit - -This patch fixes multiple problems with path canonicalization in -debugedit. This version of debugedit is taken from the dwarftools repository. - ---- ./tools/debugedit.c.orig 2011-05-11 15:31:31.000000000 +0000 -+++ ./tools/debugedit.c 2011-05-11 15:54:49.000000000 +0000 +--- ./tools/debugedit.c.orig 2011-05-20 11:26:04.000000000 +0000 ++++ ./tools/debugedit.c 2011-05-20 11:27:56.000000000 +0000 @@ -158,7 +158,7 @@ strptr (DSO *dso, int sec, off_t offset) { if (data->d_buf @@ -76,7 +71,22 @@ debugedit. This version of debugedit is taken from the dwarftools repository. char *orig = strdup ((const char *) srcptr); -@@ -756,21 +761,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -717,10 +722,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off + + if (shrank > 0) + { +- if (--shrank == 0) ++ --shrank; ++#if 0 ++ if (shrank == 0) + error (EXIT_FAILURE, 0, + "canonicalization unexpectedly shrank by one character"); + else ++#endif + { + memset (ptr, 'X', shrank); + ptr += shrank; +@@ -756,21 +764,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off } dirty_section (DEBUG_STR); } diff --git a/rpm.changes b/rpm.changes index b507303..955ed73 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 20 13:28:37 CEST 2011 - mls@suse.de + +- get rid of "unexpectedly shrank by one" error + ------------------------------------------------------------------- Thu May 19 14:51:13 CEST 2011 - mls@suse.de From 52bd5c8d178d6c9ca9fd50ab5b52c01fe187ff9c8752c19b98bb29ad2b3cb1fc Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Fri, 20 May 2011 12:41:26 +0000 Subject: [PATCH 130/137] Autobuild autoformatter for 70785 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=135 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index d36cddf..5092424 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.9.0 -Release: 3 +Release: 4 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index e5130ee..34320cd 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.0 -Release: 5 +Release: 7 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 492840cef3b9cbd0ff6c2c070a45fe5028dbbf0a648e56fb1c308ac8ef6a514e Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 6 Jun 2011 07:40:52 +0000 Subject: [PATCH 131/137] Accepting request 72642 from Base:System -> OBS-URL: https://build.opensuse.org/request/show/72642 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=136 --- assumeexec.diff | 27 +++++++++++++++++++++++++++ emptychangelog.diff | 11 +++++++++++ fileattrs.diff | 4 ++-- rpm.changes | 11 +++++++++++ rpm.spec | 4 +++- 5 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 assumeexec.diff create mode 100644 emptychangelog.diff diff --git a/assumeexec.diff b/assumeexec.diff new file mode 100644 index 0000000..d74def4 --- /dev/null +++ b/assumeexec.diff @@ -0,0 +1,27 @@ +--- tools/elfdeps.c.orig 2011-06-03 13:12:32.000000000 +0000 ++++ tools/elfdeps.c 2011-06-03 13:17:45.000000000 +0000 +@@ -14,6 +14,7 @@ + + int filter_private = 0; + int soname_only = 0; ++int assume_exec = 0; + + typedef struct elfInfo_s { + Elf *elf; +@@ -226,7 +227,7 @@ static int processFile(const char *fn, i + ei->isElf64 = 0; + #endif + ei->isDSO = (ehdr->e_type == ET_DYN); +- ei->isExec = (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)); ++ ei->isExec = assume_exec || (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)); + + processSections(ei); + } +@@ -279,6 +280,7 @@ int main(int argc, char *argv[]) + { "requires", 'R', POPT_ARG_VAL, &requires, -1, NULL, NULL }, + { "filter-private", 0, POPT_ARG_VAL, &filter_private, -1, NULL, NULL }, + { "soname-only", 0, POPT_ARG_VAL, &soname_only, -1, NULL, NULL }, ++ { "assume-exec", 0, POPT_ARG_VAL, &assume_exec, -1, NULL, NULL }, + POPT_AUTOHELP + POPT_TABLEEND + }; diff --git a/emptychangelog.diff b/emptychangelog.diff new file mode 100644 index 0000000..cdcc15c --- /dev/null +++ b/emptychangelog.diff @@ -0,0 +1,11 @@ +--- ./build/parseChangelog.c.orig 2011-05-23 14:19:48.000000000 +0000 ++++ ./build/parseChangelog.c 2011-05-23 14:20:36.000000000 +0000 +@@ -238,7 +238,7 @@ int parseChangelog(rpmSpec spec) + } + } + +- if (addChangelog(spec->packages->header, sb)) { ++ if (sb && addChangelog(spec->packages->header, sb)) { + goto exit; + } + res = nextPart; diff --git a/fileattrs.diff b/fileattrs.diff index 914a75d..a7ac98d 100644 --- a/fileattrs.diff +++ b/fileattrs.diff @@ -33,8 +33,8 @@ --- ./fileattrs/elflib.attr.orig 2011-05-18 09:28:23.000000000 +0000 +++ ./fileattrs/elflib.attr 2011-05-18 09:31:30.000000000 +0000 @@ -0,0 +1,4 @@ -+%__elflib_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} -+%__elflib_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} ++%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private} ++%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private} +%__elflib_magic ^ELF (32|64)-bit.*shared object +%__elflib_exclude_path ^/usr/lib/debug/ --- ./fileattrs/firmware.attr.orig 2011-05-18 09:27:44.000000000 +0000 diff --git a/rpm.changes b/rpm.changes index 955ed73..1adf6ca 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Jun 3 15:19:02 CEST 2011 - mls@suse.de + +- add --assume-exec option to elfdeps, so that the dependency + generator really works for libs without x-bits + +------------------------------------------------------------------- +Mon May 23 16:21:52 CEST 2011 - mls@suse.de + +- do not die if the changelog section is empty [bnc#695400] + ------------------------------------------------------------------- Fri May 20 13:28:37 CEST 2011 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 34320cd..855d62c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -116,6 +116,8 @@ Patch78: nomagiccheck.diff Patch79: findsupplements.diff Patch80: magic_and_path.diff Patch81: safemacro.diff +Patch82: emptychangelog.diff +Patch83: assumeexec.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -179,7 +181,7 @@ rm -f rpmdb/db.h %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 +%patch -P 80 -P 81 -P 82 -P 83 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From b8ea9abeafcc0442b022ed0eb782b4e0b280697f67de069c92b17c6850160c25 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 6 Jun 2011 07:41:03 +0000 Subject: [PATCH 132/137] Autobuild autoformatter for 72642 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=137 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 5092424..541cc4f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.9.0 -Release: 4 +Release: 5 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 855d62c..269112c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.0 -Release: 7 +Release: 9 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 1c237029454a5d69e4d8fd1ede4d3966becfd985be362b6208bdb0a2ca0f4ee9 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 6 Jun 2011 13:39:13 +0000 Subject: [PATCH 133/137] Accepting request 72768 from Base:System - ignore SIGPIPE when writing to dependency helpers OBS-URL: https://build.opensuse.org/request/show/72768 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=138 --- buildpipe.diff | 17 +++++++++++++++++ rpm.changes | 6 ++++++ rpm.spec | 3 ++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 buildpipe.diff diff --git a/buildpipe.diff b/buildpipe.diff new file mode 100644 index 0000000..5a9066b --- /dev/null +++ b/buildpipe.diff @@ -0,0 +1,17 @@ +--- build/rpmfc.c.orig 2011-06-06 11:27:32.000000000 +0000 ++++ build/rpmfc.c 2011-06-06 11:28:47.000000000 +0000 +@@ -165,12 +165,14 @@ static int sigpipe_init(void) + fcntl(_sigpipe[1], F_SETFD, (fcntl(_sigpipe[1], F_GETFD)|FD_CLOEXEC)); + /* XXX SIGPIPE too, but NSPR disables it already, dont mess with it */ + signal(SIGCHLD, sigpipe_handler); ++ signal(SIGPIPE, SIG_IGN); + return _sigpipe[0]; + } + + static void sigpipe_finish(void) + { + signal(SIGCHLD, SIG_DFL); ++ signal(SIGPIPE, SIG_DFL); + close(_sigpipe[0]); + close(_sigpipe[1]); + _sigpipe[0] = -1; diff --git a/rpm.changes b/rpm.changes index 1adf6ca..c1ae9c3 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 6 13:30:05 CEST 2011 - mls@suse.de + +- ignore SIGPIPE when writing to dependency helpers, so that + builds don't randomly abort when a helper is missing + ------------------------------------------------------------------- Fri Jun 3 15:19:02 CEST 2011 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 269112c..01d1b1a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -118,6 +118,7 @@ Patch80: magic_and_path.diff Patch81: safemacro.diff Patch82: emptychangelog.diff Patch83: assumeexec.diff +Patch84: buildpipe.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -181,7 +182,7 @@ rm -f rpmdb/db.h %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 +%patch -P 80 -P 81 -P 82 -P 83 -P 84 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From 1ed663656439666a6b5c04bfb34cfa38701c9a665bb05310dd20f35e7c6a105c Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 6 Jun 2011 13:39:32 +0000 Subject: [PATCH 134/137] Autobuild autoformatter for 72768 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=139 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index 541cc4f..f9b1795 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.9.0 -Release: 5 +Release: 6 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index 01d1b1a..5e35d82 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.0 -Release: 9 +Release: 11 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 1f51e266824b29f4c6ccfffeac4725f3c9de76f24d15bffd466998dff99ef18a Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Wed, 8 Jun 2011 15:36:30 +0000 Subject: [PATCH 135/137] Accepting request 72934 from Base:System -> OBS-URL: https://build.opensuse.org/request/show/72934 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=140 --- buildpipe.diff | 14 +++++++- fileattrs.diff | 81 +++++++++++++++++++++++++++-------------------- firmware.diff | 16 +++++----- fontprovides.diff | 18 +++++++---- mimetype.diff | 24 -------------- pythondeps.diff | 16 ++++++---- rpm.changes | 11 +++++++ rpm.spec | 3 +- 8 files changed, 101 insertions(+), 82 deletions(-) delete mode 100644 mimetype.diff diff --git a/buildpipe.diff b/buildpipe.diff index 5a9066b..81099ed 100644 --- a/buildpipe.diff +++ b/buildpipe.diff @@ -1,5 +1,5 @@ --- build/rpmfc.c.orig 2011-06-06 11:27:32.000000000 +0000 -+++ build/rpmfc.c 2011-06-06 11:28:47.000000000 +0000 ++++ build/rpmfc.c 2011-06-08 10:00:38.000000000 +0000 @@ -165,12 +165,14 @@ static int sigpipe_init(void) fcntl(_sigpipe[1], F_SETFD, (fcntl(_sigpipe[1], F_GETFD)|FD_CLOEXEC)); /* XXX SIGPIPE too, but NSPR disables it already, dont mess with it */ @@ -15,3 +15,15 @@ close(_sigpipe[0]); close(_sigpipe[1]); _sigpipe[0] = -1; +@@ -298,10 +300,9 @@ static StringBuf getOutputFrom(ARGV_t ar + appendStringBuf(readBuff, buf); + } + +- /* Child exited, we're done */ ++ /* Child exited, we're maybe done */ + if (FD_ISSET(sigpipe, &ibits)) { + while (read(sigpipe, buf, sizeof(buf)) > 0) {}; +- break; + } + } + diff --git a/fileattrs.diff b/fileattrs.diff index a7ac98d..155a52b 100644 --- a/fileattrs.diff +++ b/fileattrs.diff @@ -1,28 +1,14 @@ ---- ./fileattrs/Makefile.am.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/Makefile.am 2011-05-19 12:50:54.000000000 +0000 -@@ -6,6 +6,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs - - fattrs_DATA = \ - desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ -- pkgconfig.attr python.attr ocaml.attr script.attr mono.attr -+ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \ -+ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr - - EXTRA_DIST = $(fattrs_DATA) ---- ./fileattrs/debuginfo.attr.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/debuginfo.attr 2011-05-18 09:27:58.000000000 +0000 +Index: fileattrs/debuginfo.attr +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ fileattrs/debuginfo.attr 2011-06-06 16:16:00.853820498 +0200 @@ -0,0 +1,2 @@ +%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov +%__debuginfo_path ^/usr/lib/debug/ ---- ./fileattrs/desktop.attr.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/desktop.attr 2011-05-18 09:27:58.000000000 +0000 -@@ -1,2 +1,2 @@ --%__desktop_provides %{_rpmconfigdir}/desktop-file.prov --%__desktop_path ^%{_datadir}/applications/.*\\.desktop$ -+%__desktop_provides %{_rpmconfigdir}/mimetypes.prov -+%__desktop_path .*\\.desktop$ ---- ./fileattrs/elf.attr.orig 2011-05-18 09:28:33.000000000 +0000 -+++ ./fileattrs/elf.attr 2011-05-18 09:33:20.000000000 +0000 +Index: fileattrs/elf.attr +=================================================================== +--- fileattrs/elf.attr.orig 2011-06-06 16:15:01.591403879 +0200 ++++ fileattrs/elf.attr 2011-06-06 16:16:00.853820498 +0200 @@ -1,4 +1,5 @@ %__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} %__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} @@ -30,43 +16,70 @@ +%__elf_magic ^ELF (32|64)-bit.*executable %__elf_flags exeonly +%__elf_exclude_path ^/usr/lib/debug/ ---- ./fileattrs/elflib.attr.orig 2011-05-18 09:28:23.000000000 +0000 -+++ ./fileattrs/elflib.attr 2011-05-18 09:31:30.000000000 +0000 +Index: fileattrs/elflib.attr +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ fileattrs/elflib.attr 2011-06-06 16:16:00.854820404 +0200 @@ -0,0 +1,4 @@ +%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private} +%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private} +%__elflib_magic ^ELF (32|64)-bit.*shared object +%__elflib_exclude_path ^/usr/lib/debug/ ---- ./fileattrs/firmware.attr.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/firmware.attr 2011-05-18 09:27:58.000000000 +0000 +Index: fileattrs/firmware.attr +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ fileattrs/firmware.attr 2011-06-06 16:16:00.854820404 +0200 @@ -0,0 +1,2 @@ +%__firmware_provides %{_rpmconfigdir}/firmware.prov +%__firmware_path /lib/firmware/ ---- ./fileattrs/ksyms.attr.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/ksyms.attr 2011-05-18 09:27:58.000000000 +0000 +Index: fileattrs/ksyms.attr +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ fileattrs/ksyms.attr 2011-06-06 16:16:00.854820404 +0200 @@ -0,0 +1,4 @@ +%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name +%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name +%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name +%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$ ---- ./fileattrs/perl.attr.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/perl.attr 2011-05-18 09:27:58.000000000 +0000 +Index: fileattrs/Makefile.am +=================================================================== +--- fileattrs/Makefile.am.orig 2011-06-06 16:15:01.590403974 +0200 ++++ fileattrs/Makefile.am 2011-06-06 16:16:08.852066946 +0200 +@@ -5,7 +5,8 @@ include $(top_srcdir)/rpm.am + fattrsdir = $(rpmconfigdir)/fileattrs + + fattrs_DATA = \ +- desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ +- pkgconfig.attr python.attr ocaml.attr script.attr mono.attr ++ elf.attr font.attr libtool.attr perl.attr perllib.attr \ ++ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \ ++ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr + + EXTRA_DIST = $(fattrs_DATA) +Index: fileattrs/perl.attr +=================================================================== +--- fileattrs/perl.attr.orig 2011-06-06 16:15:01.591403879 +0200 ++++ fileattrs/perl.attr 2011-06-06 16:16:00.855820310 +0200 @@ -1,3 +1,4 @@ -%__perl_requires %{_rpmconfigdir}/perl.req +# disabled for now +#%__perl_requires %{_rpmconfigdir}/perl.req %__perl_magic ^.*perl .*$ %__perl_flags exeonly ---- ./fileattrs/perllib.attr.orig 2011-05-19 09:59:05.000000000 +0000 -+++ ./fileattrs/perllib.attr 2011-05-19 09:58:29.000000000 +0000 +Index: fileattrs/perllib.attr +=================================================================== +--- fileattrs/perllib.attr.orig 2011-06-06 16:15:01.591403879 +0200 ++++ fileattrs/perllib.attr 2011-06-06 16:16:00.855820310 +0200 @@ -1,3 +1,4 @@ %__perllib_provides %{_rpmconfigdir}/perl.prov -%__perllib_requires %{_rpmconfigdir}/perl.req +#disabled for now +#%__perllib_requires %{_rpmconfigdir}/perl.req %__perllib_magic ^Perl[[:digit:]] module source.* ---- ./fileattrs/sysvinit.attr.orig 2011-05-18 09:27:44.000000000 +0000 -+++ ./fileattrs/sysvinit.attr 2011-05-18 09:27:58.000000000 +0000 +Index: fileattrs/sysvinit.attr +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ fileattrs/sysvinit.attr 2011-06-06 16:16:00.856820216 +0200 @@ -0,0 +1,2 @@ +%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides +%__sysvinit_path ^/etc/init\.d/ diff --git a/firmware.diff b/firmware.diff index 2ba7522..13f7bae 100644 --- a/firmware.diff +++ b/firmware.diff @@ -1,17 +1,17 @@ Index: autodeps/linux.prov =================================================================== ---- autodeps/linux.prov.orig -+++ autodeps/linux.prov -@@ -12,6 +12,7 @@ pythonlist= +--- autodeps/linux.prov.orig 2011-06-08 13:28:10.000000000 +0200 ++++ autodeps/linux.prov 2011-06-08 13:28:51.755445342 +0200 +@@ -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)\$")) +firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) # # --- Alpha does not mark 64bit dependencies -@@ -65,6 +66,11 @@ done | sort -u - printf "%s\n" "${mimetypelist[@]}" | /usr/lib/rpm/mimetypes.prov | sort -u +@@ -59,6 +60,11 @@ done | sort -u + printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.prov | sort -u # +# --- firmware files @@ -24,8 +24,8 @@ Index: autodeps/linux.prov if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then Index: scripts/firmware.prov =================================================================== ---- /dev/null -+++ scripts/firmware.prov +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ scripts/firmware.prov 2011-06-08 13:28:33.117204009 +0200 @@ -0,0 +1,8 @@ +#!/bin/sh +# Add firmware files in /lib/firmware into RPM provides diff --git a/fontprovides.diff b/fontprovides.diff index cc60af8..a22cb85 100644 --- a/fontprovides.diff +++ b/fontprovides.diff @@ -1,15 +1,17 @@ ---- ./autodeps/linux.prov.orig 2011-05-11 16:39:09.000000000 +0000 -+++ ./autodeps/linux.prov 2011-05-11 16:40:49.000000000 +0000 -@@ -16,6 +16,8 @@ tcllist= +Index: autodeps/linux.prov +=================================================================== +--- autodeps/linux.prov.orig 2011-06-08 13:37:46.951974468 +0200 ++++ autodeps/linux.prov 2011-06-08 13:37:46.967972960 +0200 +@@ -15,6 +15,8 @@ pythonlist=($(printf "%s\n" "${filelist[ + tcllist= monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) - mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) +pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$')) +fontlist=($(printf "%s\n" "${filelist[@]}" | egrep -i "/usr/share/fonts/.*\.(ttf|otf|pfa)$")) # # --- Alpha does not mark 64bit dependencies -@@ -86,6 +88,16 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo +@@ -80,6 +82,16 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo fi # @@ -26,8 +28,10 @@ # --- Kernel module exported symbols [ -x /usr/lib/rpm/find-provides.ksyms ] && printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" ---- ./autodeps/linux.req.orig 2011-05-11 16:39:09.000000000 +0000 -+++ ./autodeps/linux.req 2011-05-11 16:40:49.000000000 +0000 +Index: autodeps/linux.req +=================================================================== +--- autodeps/linux.req.orig 2011-06-08 13:37:46.951974468 +0200 ++++ autodeps/linux.req 2011-06-08 13:37:46.968972865 +0200 @@ -34,6 +34,7 @@ perllist=() pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) tcllist=() diff --git a/mimetype.diff b/mimetype.diff deleted file mode 100644 index 886cf38..0000000 --- a/mimetype.diff +++ /dev/null @@ -1,24 +0,0 @@ -Index: autodeps/linux.prov -=================================================================== ---- autodeps/linux.prov.orig -+++ autodeps/linux.prov -@@ -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/pythondeps.diff b/pythondeps.diff index c8882ef..af85219 100644 --- a/pythondeps.diff +++ b/pythondeps.diff @@ -1,5 +1,7 @@ ---- ./autodeps/linux.prov.orig 2011-05-11 15:59:31.000000000 +0000 -+++ ./autodeps/linux.prov 2011-05-11 16:39:09.000000000 +0000 +Index: autodeps/linux.prov +=================================================================== +--- autodeps/linux.prov.orig 2011-06-08 13:31:39.000000000 +0200 ++++ autodeps/linux.prov 2011-06-08 13:31:39.191646314 +0200 @@ -11,7 +11,7 @@ filelist=($(printf "%s\n" "${filelist[@] solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \ tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \ @@ -8,8 +10,8 @@ +pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/bin/python.\..$')) tcllist= monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) - mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) -@@ -55,8 +55,8 @@ done | sort -u + firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) +@@ -54,8 +54,8 @@ done | sort -u # # --- Python modules. @@ -20,8 +22,10 @@ # # --- Tcl modules. ---- ./autodeps/linux.req.orig 2011-05-11 14:28:45.000000000 +0000 -+++ ./autodeps/linux.req 2011-05-11 16:39:09.000000000 +0000 +Index: autodeps/linux.req +=================================================================== +--- autodeps/linux.req.orig 2011-06-08 13:31:38.000000000 +0200 ++++ autodeps/linux.req 2011-06-08 13:31:39.191646314 +0200 @@ -31,7 +31,7 @@ liblist=($(printf "%s\0" "${filelist[@]} interplist=() diff --git a/rpm.changes b/rpm.changes index c1ae9c3..9426b3c 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Jun 8 12:02:51 CEST 2011 - mls@suse.de + +- change sigpipe fix so that the code really reads everything + from the pipe + +------------------------------------------------------------------- +Mon Jun 6 14:16:49 UTC 2011 - coolo@novell.com + +- move desktop.attr to update-desktop-files + ------------------------------------------------------------------- Mon Jun 6 13:30:05 CEST 2011 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 5e35d82..f364216 100644 --- a/rpm.spec +++ b/rpm.spec @@ -83,7 +83,6 @@ Patch45: debugsource-package.diff Patch46: whatrequires-doc.diff Patch47: remove-brp-strips.diff Patch48: requires-ge-macro.diff -Patch49: mimetype.diff Patch50: debugedit-canon-fix.diff Patch51: finddebuginfo-absolute-links.diff Patch52: firmware.diff @@ -178,7 +177,7 @@ rm -f rpmdb/db.h %patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19 %patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 %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 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 %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 From 37b9d175d5a3a0bb1cd2992488a737b9378d5f0e5bc03aea2f7ebd0a0e17787e Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Wed, 8 Jun 2011 15:36:42 +0000 Subject: [PATCH 136/137] Autobuild autoformatter for 72934 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=141 --- rpm-python.spec | 2 +- rpm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm-python.spec b/rpm-python.spec index f9b1795..60aa95f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.9.0 -Release: 6 +Release: 7 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.spec b/rpm.spec index f364216..32484a7 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.0 -Release: 11 +Release: 13 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 From 96ddaeaec51d99a9abb6f7733373b4f340441b3e75cc853e238a4d5fa5419387 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 9 Jun 2011 06:55:03 +0000 Subject: [PATCH 137/137] Accepting request 73032 from openSUSE:Factory revert to get rid of hanging build jobs on all workers OBS-URL: https://build.opensuse.org/request/show/73032 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=142 --- buildpipe.diff | 14 +------- fileattrs.diff | 81 ++++++++++++++++++++--------------------------- firmware.diff | 16 +++++----- fontprovides.diff | 18 ++++------- mimetype.diff | 24 ++++++++++++++ pythondeps.diff | 16 ++++------ rpm-python.spec | 2 +- rpm.changes | 11 ------- rpm.spec | 5 +-- 9 files changed, 84 insertions(+), 103 deletions(-) create mode 100644 mimetype.diff diff --git a/buildpipe.diff b/buildpipe.diff index 81099ed..5a9066b 100644 --- a/buildpipe.diff +++ b/buildpipe.diff @@ -1,5 +1,5 @@ --- build/rpmfc.c.orig 2011-06-06 11:27:32.000000000 +0000 -+++ build/rpmfc.c 2011-06-08 10:00:38.000000000 +0000 ++++ build/rpmfc.c 2011-06-06 11:28:47.000000000 +0000 @@ -165,12 +165,14 @@ static int sigpipe_init(void) fcntl(_sigpipe[1], F_SETFD, (fcntl(_sigpipe[1], F_GETFD)|FD_CLOEXEC)); /* XXX SIGPIPE too, but NSPR disables it already, dont mess with it */ @@ -15,15 +15,3 @@ close(_sigpipe[0]); close(_sigpipe[1]); _sigpipe[0] = -1; -@@ -298,10 +300,9 @@ static StringBuf getOutputFrom(ARGV_t ar - appendStringBuf(readBuff, buf); - } - -- /* Child exited, we're done */ -+ /* Child exited, we're maybe done */ - if (FD_ISSET(sigpipe, &ibits)) { - while (read(sigpipe, buf, sizeof(buf)) > 0) {}; -- break; - } - } - diff --git a/fileattrs.diff b/fileattrs.diff index 155a52b..a7ac98d 100644 --- a/fileattrs.diff +++ b/fileattrs.diff @@ -1,14 +1,28 @@ -Index: fileattrs/debuginfo.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/debuginfo.attr 2011-06-06 16:16:00.853820498 +0200 +--- ./fileattrs/Makefile.am.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/Makefile.am 2011-05-19 12:50:54.000000000 +0000 +@@ -6,6 +6,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs + + fattrs_DATA = \ + desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ +- pkgconfig.attr python.attr ocaml.attr script.attr mono.attr ++ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \ ++ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr + + EXTRA_DIST = $(fattrs_DATA) +--- ./fileattrs/debuginfo.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/debuginfo.attr 2011-05-18 09:27:58.000000000 +0000 @@ -0,0 +1,2 @@ +%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov +%__debuginfo_path ^/usr/lib/debug/ -Index: fileattrs/elf.attr -=================================================================== ---- fileattrs/elf.attr.orig 2011-06-06 16:15:01.591403879 +0200 -+++ fileattrs/elf.attr 2011-06-06 16:16:00.853820498 +0200 +--- ./fileattrs/desktop.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/desktop.attr 2011-05-18 09:27:58.000000000 +0000 +@@ -1,2 +1,2 @@ +-%__desktop_provides %{_rpmconfigdir}/desktop-file.prov +-%__desktop_path ^%{_datadir}/applications/.*\\.desktop$ ++%__desktop_provides %{_rpmconfigdir}/mimetypes.prov ++%__desktop_path .*\\.desktop$ +--- ./fileattrs/elf.attr.orig 2011-05-18 09:28:33.000000000 +0000 ++++ ./fileattrs/elf.attr 2011-05-18 09:33:20.000000000 +0000 @@ -1,4 +1,5 @@ %__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} %__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} @@ -16,70 +30,43 @@ Index: fileattrs/elf.attr +%__elf_magic ^ELF (32|64)-bit.*executable %__elf_flags exeonly +%__elf_exclude_path ^/usr/lib/debug/ -Index: fileattrs/elflib.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/elflib.attr 2011-06-06 16:16:00.854820404 +0200 +--- ./fileattrs/elflib.attr.orig 2011-05-18 09:28:23.000000000 +0000 ++++ ./fileattrs/elflib.attr 2011-05-18 09:31:30.000000000 +0000 @@ -0,0 +1,4 @@ +%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private} +%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private} +%__elflib_magic ^ELF (32|64)-bit.*shared object +%__elflib_exclude_path ^/usr/lib/debug/ -Index: fileattrs/firmware.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/firmware.attr 2011-06-06 16:16:00.854820404 +0200 +--- ./fileattrs/firmware.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/firmware.attr 2011-05-18 09:27:58.000000000 +0000 @@ -0,0 +1,2 @@ +%__firmware_provides %{_rpmconfigdir}/firmware.prov +%__firmware_path /lib/firmware/ -Index: fileattrs/ksyms.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/ksyms.attr 2011-06-06 16:16:00.854820404 +0200 +--- ./fileattrs/ksyms.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/ksyms.attr 2011-05-18 09:27:58.000000000 +0000 @@ -0,0 +1,4 @@ +%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name +%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name +%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name +%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$ -Index: fileattrs/Makefile.am -=================================================================== ---- fileattrs/Makefile.am.orig 2011-06-06 16:15:01.590403974 +0200 -+++ fileattrs/Makefile.am 2011-06-06 16:16:08.852066946 +0200 -@@ -5,7 +5,8 @@ include $(top_srcdir)/rpm.am - fattrsdir = $(rpmconfigdir)/fileattrs - - fattrs_DATA = \ -- desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ -- pkgconfig.attr python.attr ocaml.attr script.attr mono.attr -+ elf.attr font.attr libtool.attr perl.attr perllib.attr \ -+ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \ -+ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr - - EXTRA_DIST = $(fattrs_DATA) -Index: fileattrs/perl.attr -=================================================================== ---- fileattrs/perl.attr.orig 2011-06-06 16:15:01.591403879 +0200 -+++ fileattrs/perl.attr 2011-06-06 16:16:00.855820310 +0200 +--- ./fileattrs/perl.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/perl.attr 2011-05-18 09:27:58.000000000 +0000 @@ -1,3 +1,4 @@ -%__perl_requires %{_rpmconfigdir}/perl.req +# disabled for now +#%__perl_requires %{_rpmconfigdir}/perl.req %__perl_magic ^.*perl .*$ %__perl_flags exeonly -Index: fileattrs/perllib.attr -=================================================================== ---- fileattrs/perllib.attr.orig 2011-06-06 16:15:01.591403879 +0200 -+++ fileattrs/perllib.attr 2011-06-06 16:16:00.855820310 +0200 +--- ./fileattrs/perllib.attr.orig 2011-05-19 09:59:05.000000000 +0000 ++++ ./fileattrs/perllib.attr 2011-05-19 09:58:29.000000000 +0000 @@ -1,3 +1,4 @@ %__perllib_provides %{_rpmconfigdir}/perl.prov -%__perllib_requires %{_rpmconfigdir}/perl.req +#disabled for now +#%__perllib_requires %{_rpmconfigdir}/perl.req %__perllib_magic ^Perl[[:digit:]] module source.* -Index: fileattrs/sysvinit.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/sysvinit.attr 2011-06-06 16:16:00.856820216 +0200 +--- ./fileattrs/sysvinit.attr.orig 2011-05-18 09:27:44.000000000 +0000 ++++ ./fileattrs/sysvinit.attr 2011-05-18 09:27:58.000000000 +0000 @@ -0,0 +1,2 @@ +%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides +%__sysvinit_path ^/etc/init\.d/ diff --git a/firmware.diff b/firmware.diff index 13f7bae..2ba7522 100644 --- a/firmware.diff +++ b/firmware.diff @@ -1,17 +1,17 @@ Index: autodeps/linux.prov =================================================================== ---- autodeps/linux.prov.orig 2011-06-08 13:28:10.000000000 +0200 -+++ autodeps/linux.prov 2011-06-08 13:28:51.755445342 +0200 -@@ -11,6 +11,7 @@ solist=($(printf "%s\n" "${filelist[@]}" - pythonlist= +--- autodeps/linux.prov.orig ++++ autodeps/linux.prov +@@ -12,6 +12,7 @@ pythonlist= tcllist= monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) +firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) # # --- Alpha does not mark 64bit dependencies -@@ -59,6 +60,11 @@ done | sort -u - printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.prov | sort -u +@@ -65,6 +66,11 @@ done | sort -u + printf "%s\n" "${mimetypelist[@]}" | /usr/lib/rpm/mimetypes.prov | sort -u # +# --- firmware files @@ -24,8 +24,8 @@ Index: autodeps/linux.prov if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then Index: scripts/firmware.prov =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ scripts/firmware.prov 2011-06-08 13:28:33.117204009 +0200 +--- /dev/null ++++ scripts/firmware.prov @@ -0,0 +1,8 @@ +#!/bin/sh +# Add firmware files in /lib/firmware into RPM provides diff --git a/fontprovides.diff b/fontprovides.diff index a22cb85..cc60af8 100644 --- a/fontprovides.diff +++ b/fontprovides.diff @@ -1,17 +1,15 @@ -Index: autodeps/linux.prov -=================================================================== ---- autodeps/linux.prov.orig 2011-06-08 13:37:46.951974468 +0200 -+++ autodeps/linux.prov 2011-06-08 13:37:46.967972960 +0200 -@@ -15,6 +15,8 @@ pythonlist=($(printf "%s\n" "${filelist[ - tcllist= +--- ./autodeps/linux.prov.orig 2011-05-11 16:39:09.000000000 +0000 ++++ ./autodeps/linux.prov 2011-05-11 16:40:49.000000000 +0000 +@@ -16,6 +16,8 @@ tcllist= monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) +pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$')) +fontlist=($(printf "%s\n" "${filelist[@]}" | egrep -i "/usr/share/fonts/.*\.(ttf|otf|pfa)$")) # # --- Alpha does not mark 64bit dependencies -@@ -80,6 +82,16 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo +@@ -86,6 +88,16 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo fi # @@ -28,10 +26,8 @@ Index: autodeps/linux.prov # --- Kernel module exported symbols [ -x /usr/lib/rpm/find-provides.ksyms ] && printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" -Index: autodeps/linux.req -=================================================================== ---- autodeps/linux.req.orig 2011-06-08 13:37:46.951974468 +0200 -+++ autodeps/linux.req 2011-06-08 13:37:46.968972865 +0200 +--- ./autodeps/linux.req.orig 2011-05-11 16:39:09.000000000 +0000 ++++ ./autodeps/linux.req 2011-05-11 16:40:49.000000000 +0000 @@ -34,6 +34,7 @@ perllist=() pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) tcllist=() diff --git a/mimetype.diff b/mimetype.diff new file mode 100644 index 0000000..886cf38 --- /dev/null +++ b/mimetype.diff @@ -0,0 +1,24 @@ +Index: autodeps/linux.prov +=================================================================== +--- autodeps/linux.prov.orig ++++ autodeps/linux.prov +@@ -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/pythondeps.diff b/pythondeps.diff index af85219..c8882ef 100644 --- a/pythondeps.diff +++ b/pythondeps.diff @@ -1,7 +1,5 @@ -Index: autodeps/linux.prov -=================================================================== ---- autodeps/linux.prov.orig 2011-06-08 13:31:39.000000000 +0200 -+++ autodeps/linux.prov 2011-06-08 13:31:39.191646314 +0200 +--- ./autodeps/linux.prov.orig 2011-05-11 15:59:31.000000000 +0000 ++++ ./autodeps/linux.prov 2011-05-11 16:39:09.000000000 +0000 @@ -11,7 +11,7 @@ filelist=($(printf "%s\n" "${filelist[@] solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \ tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \ @@ -10,8 +8,8 @@ Index: autodeps/linux.prov +pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/bin/python.\..$')) tcllist= monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) - firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) -@@ -54,8 +54,8 @@ done | sort -u + mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) +@@ -55,8 +55,8 @@ done | sort -u # # --- Python modules. @@ -22,10 +20,8 @@ Index: autodeps/linux.prov # # --- Tcl modules. -Index: autodeps/linux.req -=================================================================== ---- autodeps/linux.req.orig 2011-06-08 13:31:38.000000000 +0200 -+++ autodeps/linux.req 2011-06-08 13:31:39.191646314 +0200 +--- ./autodeps/linux.req.orig 2011-05-11 14:28:45.000000000 +0000 ++++ ./autodeps/linux.req 2011-05-11 16:39:09.000000000 +0000 @@ -31,7 +31,7 @@ liblist=($(printf "%s\0" "${filelist[@]} interplist=() diff --git a/rpm-python.spec b/rpm-python.spec index 60aa95f..f9b1795 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -26,7 +26,7 @@ License: GPLv2+ Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.9.0 -Release: 7 +Release: 6 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm.changes b/rpm.changes index 9426b3c..c1ae9c3 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,14 +1,3 @@ -------------------------------------------------------------------- -Wed Jun 8 12:02:51 CEST 2011 - mls@suse.de - -- change sigpipe fix so that the code really reads everything - from the pipe - -------------------------------------------------------------------- -Mon Jun 6 14:16:49 UTC 2011 - coolo@novell.com - -- move desktop.attr to update-desktop-files - ------------------------------------------------------------------- Mon Jun 6 13:30:05 CEST 2011 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 32484a7..5e35d82 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.0 -Release: 13 +Release: 11 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -83,6 +83,7 @@ Patch45: debugsource-package.diff Patch46: whatrequires-doc.diff Patch47: remove-brp-strips.diff Patch48: requires-ge-macro.diff +Patch49: mimetype.diff Patch50: debugedit-canon-fix.diff Patch51: finddebuginfo-absolute-links.diff Patch52: firmware.diff @@ -177,7 +178,7 @@ rm -f rpmdb/db.h %patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19 %patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 %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 +%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