commit 3c349e916500c5be0a0f6850054bea43e9a8d1bce478be8cce6d8d8a0c9d2fca Author: OBS User unknown Date: Mon Dec 18 23:17:44 2006 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc 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/RPM-HOWTO.tar.bz2 b/RPM-HOWTO.tar.bz2 new file mode 100644 index 0000000..15c84f8 --- /dev/null +++ b/RPM-HOWTO.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a1341b0686afa37681ccf2ebacc25bfec0ae96c5f05b4bcf5840d14fd9a29f0 +size 18681 diff --git a/RPM-Tips.html.tar.bz2 b/RPM-Tips.html.tar.bz2 new file mode 100644 index 0000000..a352a51 --- /dev/null +++ b/RPM-Tips.html.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20f81d1ea9e4c64dddba197d8717f9e2d082814c806f722280d3ea34854c728a +size 3206 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/autodeps.diff b/autodeps.diff new file mode 100644 index 0000000..eb8e567 --- /dev/null +++ b/autodeps.diff @@ -0,0 +1,262 @@ +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. ++IFS=$'\n' ++filelist=($(cat)) + +-filelist=`sed "s/['\"]/\\\&/g"` +- +-solist=$(echo $filelist | grep "\\.so" | grep -v "^/lib/ld.so" | \ +- xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1) ++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= + tcllist= ++monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + + # + # --- Alpha does not mark 64bit dependencies + case `uname -m` in +- alpha*) mark64="" ;; +- *) mark64="()(64bit)" ;; ++ alpha*) mark64=false ;; ++ *) mark64=true ;; + esac + + # + # --- Library sonames and weak symbol versions (from glibc). +-for f in $solist; do +- soname=$(objdump -p $f | awk '/SONAME/ {print $2}') ++for f in "${solist[@]}"; do ++ soname=$(objdump -p "$f" | awk '/SONAME/ {print $2}') ++ [ -n "$soname" -a -L "$f" ] && continue ++ [ -z "$soname" ] && soname="${f##*/}" + +- lib64=`if file -L $f 2>/dev/null | \ +- grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` +- if [ "$soname" != "" ]; then +- if [ ! -L $f ]; then +- echo $soname$lib64 +- objdump -p $f | awk ' +- BEGIN { START=0 ; } +- /Version definitions:/ { START=1; } +- /^[0-9]/ && (START==1) { print $4; } +- /^$/ { START=0; } +- ' | \ +- grep -v $soname | \ +- while read symbol ; do +- echo "$soname($symbol)`echo $lib64 | sed 's/()//'`" +- done +- fi ++ if $mark64 && file -L "$f" 2>/dev/null | grep "ELF 64-bit" >/dev/null; then ++ lib64="()(64bit)" slib64="(64bit)" + else +- echo ${f##*/}$lib64 ++ lib64= slib64= + fi ++ echo "$soname$lib64" ++ objdump -p "$f" | awk ' ++ BEGIN { START=0 ; } ++ /Version definitions:/ { START=1; } ++ /^[0-9]/ && (START==1) { print $4; } ++ /^$/ { START=0; } ++ ' | \ ++ while read symbol ; do ++ echo "$soname($symbol)$slib64" ++ done + done | sort -u + + # + # --- Perl modules. + [ -x /usr/lib/rpm/perl.prov ] && +- echo $filelist | tr '[:blank:]' \\n | grep '\.pm$' | /usr/lib/rpm/perl.prov | sort -u ++ printf "%s\n" "${filelist[@]}" | grep '\.pm$' | /usr/lib/rpm/perl.prov | sort -u + + # + # --- Python modules. + [ -x /usr/lib/rpm/python.prov -a -n "$pythonlist" ] && +- echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/python.prov | sort -u ++ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.prov | sort -u + + # + # --- Tcl modules. + [ -x /usr/lib/rpm/tcl.prov -a -n "$tcllist" ] && +- echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/tcl.prov | sort -u ++ printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.prov | sort -u ++ ++# ++# --- 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 ++ ++# ++# --- Kernel module exported symbols ++[ -x /usr/lib/rpm/find-provides.ksyms ] && ++ 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 +@@ -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 | egrep -v ":.* (commands|script) " | \ +- grep ":.*executable" | cut -d: -f1` +-scriptlist=`echo $filelist | xargs -r file | \ +- 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) " | \ ++ grep ":.*executable" | cut -d: -f1)) ++scriptlist=($(printf "%s\0" "${filelist[@]}" | xargs -0 -r file | \ ++ 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=() ++monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + + # + # --- Alpha does not mark 64bit dependencies +@@ -42,12 +46,12 @@ esac + if [ "$needed" -eq 0 ]; then + # + # --- Executable dependency sonames. +- for f in $exelist; do +- [ -r $f -a -x $f ] || continue +- lib64=`if file -L $f 2>/dev/null | \ ++ for f in "${exelist[@]}"; do ++ [ -r "$f" -a -x "$f" ] || continue ++ lib64=`if file -L "$f" 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` +- ldd $f | awk '/=>/ { +- if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) { ++ ldd "$f" | awk '/=>/ { ++ if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /linux-gate.so/) { + gsub(/'\''"/,"\\&",$1); + printf "%s'$lib64'\n", $1 + } +@@ -56,12 +60,12 @@ if [ "$needed" -eq 0 ]; then + + # + # --- Library dependency sonames. +- for f in $liblist; do +- [ -r $f ] || continue +- lib64=`if file -L $f 2>/dev/null | \ ++ for f in "${liblist[@]}"; do ++ [ -r "$f" ] || continue ++ lib64=`if file -L "$f" 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` +- ldd $f | awk '/=>/ { +- if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) { ++ ldd "$f" | awk '/=>/ { ++ if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /linux-gate.so/) { + gsub(/'\''"/,"\\&",$1); + printf "%s'$lib64'\n", $1 + } +@@ -71,30 +75,30 @@ fi + + # + # --- Script interpreters. +-for f in $scriptlist; do +- [ -r $f -a -x $f ] || continue +- interp=`head -n 1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1` +- interplist="$interplist $interp" ++for f in "${scriptlist[@]}"; do ++ [ -r "$f" -a -x "$f" ] || continue ++ interp=`head -n 1 "$f" | sed -ne 's/^\#\![ ]*//p' | cut -d" " -f1` ++ interplist=("${interplist[@]}" "$interp") + case $interp in +- */perl) perllist="$perllist $f" ;; ++ */perl) perllist=("${perllist[@]}" "$f") ;; + esac + done +-[ -n "$interplist" ] && { echo "$interplist" | tr '[:blank:]' \\n | sort -u ; } ++[ -n "$interplist" ] && { printf "%s\n" "${interplist[@]}" | sort -u ; } + + # + # --- Add perl module files to perllist. +-for f in $filelist; do +- [ -r $f -a "${f%.pm}" != "${f}" ] && perllist="$perllist $f" ++for f in "${filelist[@]}"; do ++ [ -r "$f" -a "${f%.pm}" != "${f}" ] && perllist=("${perllist[@]}" "$f") + done + + # + # --- Weak symbol versions (from glibc). + [ -n "$mark64" ] && mark64="(64bit)" +-for f in $liblist $exelist ; do +- [ -r $f ] || continue +- lib64=`if file -L $f 2>/dev/null | \ ++for f in "${liblist[@]}" "${exelist[@]}" ; do ++ [ -r "$f" ] || continue ++ lib64=`if file -L "$f" 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` +- objdump -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; } ++ objdump -p "$f" | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; } + /^$/ { START=0; } + /^Dynamic Section:$/ { START=1; } + (START==1) && /NEEDED/ { +@@ -110,7 +114,7 @@ for f in $liblist $exelist ; do + sub(/:/, "", $3); + LIBNAME=$3; + } +- (START==2) && (LIBNAME!="") && ($4!="") && (($4~/^GLIBC_*/) || ($4~/^GCC_*/)) { ++ (START==2) && (LIBNAME!="") && ($4!="") { + print LIBNAME "(" $4 ")'$lib64'"; + } + ' +@@ -118,17 +122,28 @@ done | sort -u + + # + # --- Perl modules. +-[ -x /usr/lib/rpm/perl.req -a -n "$perllist" ] && \ +- echo $perllist | tr '[:blank:]' \\n | /usr/lib/rpm/perl.req | sort -u ++#[ -x /usr/lib/rpm/perl.req -a -n "$perllist" ] && \ ++# printf "%s\n" "${perllist[@]}" | /usr/lib/rpm/perl.req | sort -u + + # + # --- Python modules. + [ -x /usr/lib/rpm/python.req -a -n "$pythonlist" ] && \ +- echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/python.req | sort -u ++ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.req | sort -u + + # + # --- Tcl modules. + [ -x /usr/lib/rpm/tcl.req -a -n "$tcllist" ] && \ +- echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/tcl.req | sort -u ++ printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.req | sort -u ++ ++# ++# --- 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 ++ ++# ++# --- Kernel module imported symbols ++[ -x ${0%/*}/find-requires.ksyms ] && ++ printf "%s\n" "${filelist[@]}" | ${0%/*}/find-requires.ksyms "$@" + + exit 0 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/beecrypt-4.1.2.diff b/beecrypt-4.1.2.diff new file mode 100644 index 0000000..cff3eba --- /dev/null +++ b/beecrypt-4.1.2.diff @@ -0,0 +1,46 @@ +--- beecrypt-4.1.2/Makefile.am.orig 2004-12-22 07:06:31.000000000 +0000 ++++ beecrypt-4.1.2/Makefile.am 2006-11-24 14:08:27.000000000 +0000 +@@ -49,7 +49,7 @@ libaltdir=$(prefix)/lib@LIBALT@ + + libalt_LTLIBRARIES = libbeecrypt.la + +-libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhaes.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha256.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c rsa.c rsakp.c rsapk.c sha1.c sha256.c sha384.c sha512.c sha_k.c timestamp.c cppglue.cxx ++libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhaes.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha256.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c rsa.c rsakp.c rsapk.c sha1.c sha256.c sha384.c sha512.c sha_k.c timestamp.c + libbeecrypt_la_DEPENDENCIES = $(BEECRYPT_OBJECTS) + libbeecrypt_la_LIBADD = aesopt.lo blowfishopt.lo mpopt.lo sha1opt.lo + libbeecrypt_la_LDFLAGS = -no-undefined -version-info $(LIBBEECRYPT_LT_CURRENT):$(LIBBEECRYPT_LT_REVISION):$(LIBBEECRYPT_LT_AGE) +@@ -62,5 +62,11 @@ EXTRA_DIST = BENCHMARKS BUGS CONTRIBUTOR + + DISTCLEANFILES = mpopt.s aesopt.s blowfishopt.s sha1opt.s + ++BUILT_SOURCES = listobjs ++ ++.PHONY: listobjs ++listobjs: ++ @echo $(libbeecrypt_la_OBJECTS) $(libbeecrypt_la_LIBADD) > $@ ++ + bench: + (cd tests && $(MAKE) $(AM_MAKEFLAGS) bench) +--- beecrypt-4.1.2/base64.c.orig 2004-12-19 20:21:04.000000000 +0000 ++++ beecrypt-4.1.2/base64.c 2006-11-24 14:08:27.000000000 +0000 +@@ -253,7 +253,6 @@ char* b64encode(const void* data, size_t + unsigned c; + + if (s == NULL) return NULL; +- if (*s == '\0') return calloc(1, sizeof(*t)); + + if (ns == 0) ns = strlen((const char*) s); + nt = ((ns + 2) / 3) * 4; +--- beecrypt-4.1.2/c++/io/DataOutputStream.cxx.orig 2004-11-04 12:38:15.000000000 +0000 ++++ beecrypt-4.1.2/c++/io/DataOutputStream.cxx 2006-11-24 14:09:35.000000000 +0000 +@@ -126,8 +126,8 @@ void DataOutputStream::writeLong(javalon + void DataOutputStream::writeChar(javaint v) throw (IOException) + { + _lock.lock(); +- out.write((v >> 8) && 0xff); +- out.write((v ) && 0xff); ++ out.write((v >> 8) & 0xff); ++ out.write((v ) & 0xff); + written += 2; + _lock.unlock(); + } diff --git a/beecrypt-4.1.2.tar.bz2 b/beecrypt-4.1.2.tar.bz2 new file mode 100644 index 0000000..e67e3c2 --- /dev/null +++ b/beecrypt-4.1.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67ef64715912e978b426ad514567e189039016b9f04d52783865a2dafb27b578 +size 563414 diff --git a/brp.diff b/brp.diff new file mode 100644 index 0000000..fdaf8c5 --- /dev/null +++ b/brp.diff @@ -0,0 +1,263 @@ +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 +@@ -0,0 +1,42 @@ ++#!/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" ++# If using normal root, avoid changing anything: ++if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then ++ exit 0 ++fi ++files= ++tfiles= ++LC_ALL= ++LANG= ++# check for 64-bit libs in */lib ++for p in `grep -v 'lib64' /etc/ld.so.conf` ++do ++ if test -d $RPM_BUILD_ROOT$p ; then ++ for f in `find $RPM_BUILD_ROOT$p \ ++ -maxdepth 1 -type f -name \*.so\* -o -name \*.a -follow 2>/dev/null` ++ do ++ [ $HOSTTYPE = s390x ] && case $f in */lib/ld64.so.1) continue; esac ++ objdump -f $f 2>/dev/null | grep 'format elf64' \ ++ && { echo "$f: should be in */lib64"; exit 1; } ++ ++ done ++ fi ++done ++ ++# check for 64 bit libs that have an rpath to a 32 bit Library ++ ++for p in `grep 'lib64' /etc/ld.so.conf` ++do ++ if test -d $RPM_BUILD_ROOT$p ; then ++ for f in `find $RPM_BUILD_ROOT$p \ ++ -maxdepth 1 -type f -name \*.so\* -o -name \*.a -follow 2>/dev/null` ++ do ++ # check for rpath to 32bit libs ++ objdump -x $f 2>/dev/null | grep -v "lib64" | grep -i 'rpath.*lib$' \ ++ && { echo "$f: rpath to 32bit lib"; exit 1; } ++ done ++ 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 +@@ -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" | \ ++ grep -v ' shared object,' | \ ++ 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 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 +@@ -0,0 +1,182 @@ ++#!/bin/sh ++ ++# Task: go through the files in $RPM_BUILD_ROOT and ++# relink symbolic links so that: ++# links crossing top level directory boundaries (/usr/* -> /etc/*) ++# are absolute links ++# links below one top level directory (/usr/bin/* -> /usr/lib/*) ++# are relative links ++# NOTE: we're not doing this to fix a problem (as no matter how you ++# do it you fix one problem by creating another). We're doing it ++# so we can document this as policy - so you can rely on it ++ ++# Additional Task: check some usual errors arround symlinks e.g. ++# dangling symlinks or symlinks to init scripts in wrong location ++ ++# Author: Stephan Kulow ++ ++# If using normal root, avoid changing anything. ++if [ -z "$RPM_BUILD_ROOT" ]; then ++ exit 0 ++fi ++ ++LC_ALL= ++LANG= ++LC_TIME=POSIX ++ ++BASENAME=/usr/bin/basename ++DIRNAME=/usr/bin/dirname ++READLINK=/usr/bin/readlink ++ ++cd $RPM_BUILD_ROOT ++ ++had_errors=0 ++ ++links=`find . -type l | sed -e "s,^./,/,"` ++for link in $links ++do ++ link_dest=`$READLINK ./$link` ++ orig_link_dest=$link_dest ++ ++ new_link_dest=NONE ++ link_dir=`$DIRNAME $link` ++ ++ case $link_dest in ++ .|..|../..) # link to current dir ++ continue ;; ++ .*) # relative links up ++ link_dest="$link_dir/$link_dest" ++ ;; ++ /*) # absolute links ++ ;; ++ */*) # relative links down ++ link_dest="$link_dir/$link_dest" ++ ;; ++ *) # the rest ++ continue ++ esac ++ ++ # cleaning out double slash ++ link_dest=`echo $link_dest | sed -e 's,//*,/,g; s,/\.$,/,; s,/$,,'` ++ ++ # eliminating /./ components ++ link_dest=`echo $link_dest | sed -e "s,/\./,/,g"`; ++ ++ counter=0 ++ # eliminating back references ++ while echo $link_dest | egrep -q '/\.\.'; do ++ link_dest=`echo $link_dest | sed -e "s,/[^/]*/\.\.,,"`; ++ case $link_dest in ++ /..*) # this is very mean ++ echo "ERROR: $link points to illegal $link_dest" ++ exit 1 ++ ;; ++ esac ++ counter=$((counter + 1)) ++ if test $counter -gt 10; then ++ echo "ERROR: more than 10 back references in $link?" ++ exit 1 ++ fi ++ done ++ ++ # black list ++ case "$link,$link_dest" in ++ *,/var/lib/named*) ++ continue;; ++ /usr/etc,*|/usr/tmp,*) ++ continue;; ++ */share/texmf/*|/usr/share/terminfo/*) ++ continue;; ++ *share/automake-*) ++ echo "ERROR: link target $link points into automake directory" ++ echo " You might want to add a -c to the automake call (or just" ++ echo " skip the files from packaging)" ++ exit 1 ++ ;; ++ *,/opt/kde3/share/doc/HTML/*/common) # white listed for not existant ++ ;; ++ *,/proc/*) # links pointing into /proc file system ++ ;; ++ *) ++ if test ! -L ./$link_dest && test ! -e $link_dest && test ! -e ./$link_dest; then ++ echo "ERROR: link target doesn't exist (neither in build root nor in installed system):" ++ echo " $link -> $link_dest" ++ echo "Add the package providing the target to neededforbuild and Requires" ++ test "$NO_BRP_STALE_LINK_ERROR" != "yes" && had_errors=1 ++ fi ++ ;; ++ esac ++ ++ forced_absolute=0 ++ for prefix in /usr/X11R6/lib/X11 /usr/X11R6/include/X11 /usr/X11R6/lib/X11/app-defaults ; do ++ if echo $link | grep -q "^$prefix/"; then ++ if echo $link_dest | grep -q "^$prefix/"; then ++ # if it's below it, it's fine ++ : ++ else ++ forced_absolute=1 ++ fi ++ fi ++ done ++ ++ dest_dir=`$DIRNAME $link_dest` ++ ++ # figuring out (currently) correct destination ++ if test "$link_dir" = "$dest_dir" || test "$dest_dir" = "."; then ++ new_link_dest=`$BASENAME $link_dest` ++ else ++ # figuring out top level directory ++ top_link=`echo $link | sed -e 's,^\(/[^/]*\)/.*,\1,'` ++ top_dest=`echo $link_dest | sed -e 's,^\(/[^/]*\)/.*,\1,'` ++ if test "$forced_absolute" = 0 && test "$top_link" = "$top_dest"; then # supposed to be relative ++ ++ # first we need to cut out the common prefix ++ link_tmp=$link ++ while test "$top_link" = "$top_dest"; do ++ link_orig=$link_tmp ++ dest_orig=$link_dest ++ link_tmp=`echo $link_tmp | sed -e 's,^\(/[^/]*\)/,/,'` ++ link_dest=`echo $link_dest | sed -e 's,^\(/[^/]*\)/,/,'` ++ top_link=`echo $link_tmp | sed -e 's,^\(/[^/]*\)/.*,\1,'` ++ top_dest=`echo $link_dest | sed -e 's,^\(/[^/]*\)/.*,\1,'` ++ ++ if test "$top_dest" = "$dest_orig" || test "$top_link" = "$link_orig"; then ++ link_tmp=$link_orig ++ link_dest=$dest_orig ++ break ++ fi ++ done ++ ++ # now we add a .. for every directory component ++ link_tmp=`$DIRNAME $link_tmp` ++ ++ if test "$link_tmp" = "$link_dest"; then ++ new_link_dest=. ++ elif test "$link_tmp" != "/"; then # we have a directory component ++ link_rel= ++ ++ while test -n "$link_tmp"; do ++ link_tmp=`echo $link_tmp | sed -e 's,^\(/[^/]*\),,'` ++ link_rel="../$link_rel" ++ done ++ ++ new_link_dest=`echo $link_rel/$link_dest | sed -e "s,//*,/,g"` ++ else ++ # get rid of the slash ++ link_dest=`echo $link_dest | sed -e 's,^/,,'` ++ new_link_dest=$link_dest ++ fi ++ else ++ new_link_dest=$link_dest ++ fi ++ fi ++ ++ if test "$new_link_dest" != NONE && test "$new_link_dest" != "$orig_link_dest"; then ++ echo "INFO: relinking $link -> $new_link_dest (was $orig_link_dest)" ++ rm ./$link && ln -s $new_link_dest ./$link ++ fi ++done ++ ++if test "$had_errors" = 1; then ++ exit 1 ++fi 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/build.diff b/build.diff new file mode 100644 index 0000000..b050cfd --- /dev/null +++ b/build.diff @@ -0,0 +1,574 @@ +Many changes to Makefiles/autogen and the like to make it build +on SUSE systems. + +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 ;; + *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; + 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) ++unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|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 + +-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%--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 +@@ -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 + + if [ -n "$MULTILIBNO" ]; then +@@ -96,6 +96,9 @@ for SUBST in $SUBSTS ; do + apple) + VENDORSED='-e s,^@apple@,,' + ;; ++ suse) ++ VENDORSED='-e s,^@SuSE@,,' ++ ;; + esac + + 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/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 new file mode 100644 index 0000000..48821b9 --- /dev/null +++ b/checkfilesnoinfodir.diff @@ -0,0 +1,16 @@ +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 + + 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" ++ fi + done + + rm -f $FILES_DISK diff --git a/chownwarn.diff b/chownwarn.diff new file mode 100644 index 0000000..c435432 --- /dev/null +++ b/chownwarn.diff @@ -0,0 +1,26 @@ +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 + 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 && (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 && (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 new file mode 100644 index 0000000..52caaf5 --- /dev/null +++ b/convertdb1static.diff @@ -0,0 +1,35 @@ +Build convertdb1 as static binary so that it always works. + +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 @@ + + 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.diff b/db.diff new file mode 100644 index 0000000..121ae44 --- /dev/null +++ b/db.diff @@ -0,0 +1,111 @@ +--- 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); + + 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_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); + 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 */ + 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 +@@ -553,7 +553,7 @@ done: /* + if (ret == 0 && (op == DB_SYNC_CACHE || op == DB_SYNC_FILE)) { + if (dbmfp == NULL) + ret = __memp_sync_files(dbenv, dbmp); +- else ++ else if (!dbmfp->mfp || !F_ISSET(dbmfp->mfp, MP_NOFSYNC)) + ret = __os_fsync(dbenv, 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) + + dbenv = dbmp->dbenv; + ++ 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. +--- 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 new file mode 100644 index 0000000..00da14c --- /dev/null +++ b/dbfsync.diff @@ -0,0 +1,54 @@ +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 + return rc; + } + ++#if 0 + static int db3_fsync_disable(/*@unused@*/ int fd) + /*@*/ + { + return 0; + } ++#endif + + #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 }, + { "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING, + NULL, NULL }, ++ { "nofsync", 0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_NOFSYNC, ++ NULL, NULL }, + + { "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 new file mode 100644 index 0000000..28aeda3 --- /dev/null +++ b/dbprivate.diff @@ -0,0 +1,14 @@ +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 + #endif + #endif + ++ /* 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 new file mode 100644 index 0000000..7a59346 --- /dev/null +++ b/dbrointerruptable.diff @@ -0,0 +1,57 @@ +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) + rpmdb * prev, next; + int dbix; + int rc = 0; ++ int dbmode; + + if (db == NULL) + goto exit; + ++ dbmode = db->db_mode; + (void) rpmdbUnlink(db, "rpmdbClose"); + + /*@-usereleased@*/ +@@ -886,12 +915,14 @@ int rpmdbClose(rpmdb db) + /*@-refcounttrans@*/ db = _free(db); /*@=refcounttrans@*/ + /*@=usereleased@*/ + ++ if ((dbmode & (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); ++ } + 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; + +- (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; + diff --git a/debugedit.diff b/debugedit.diff new file mode 100644 index 0000000..5a3bc06 --- /dev/null +++ b/debugedit.diff @@ -0,0 +1,52 @@ +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 +@@ -34,7 +34,37 @@ + #include + + #include +-#include ++ ++ ++/* some defines taken from the dwarf standard */ ++ ++#define DW_TAG_compile_unit 0x11 ++ ++#define DW_AT_name 0x03 ++#define DW_AT_stmt_list 0x10 ++#define DW_AT_comp_dir 0x1b ++ ++#define DW_FORM_addr 0x01 ++#define DW_FORM_block2 0x03 ++#define DW_FORM_block4 0x04 ++#define DW_FORM_data2 0x05 ++#define DW_FORM_data4 0x06 ++#define DW_FORM_data8 0x07 ++#define DW_FORM_string 0x08 ++#define DW_FORM_block 0x09 ++#define DW_FORM_block1 0x0a ++#define DW_FORM_data1 0x0b ++#define DW_FORM_flag 0x0c ++#define DW_FORM_sdata 0x0d ++#define DW_FORM_strp 0x0e ++#define DW_FORM_udata 0x0f ++#define DW_FORM_ref_addr 0x10 ++#define DW_FORM_ref1 0x11 ++#define DW_FORM_ref2 0x12 ++#define DW_FORM_ref4 0x13 ++#define DW_FORM_ref8 0x14 ++#define DW_FORM_ref_udata 0x15 ++#define DW_FORM_indirect 0x16 + + #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/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/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/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/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 new file mode 100644 index 0000000..bd5055c --- /dev/null +++ b/extcond.diff @@ -0,0 +1,78 @@ +This patch supports an extension in the condition evaluation. +If the condition is a format and returns an nonempty string, it is +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 + + *endPtr = chptr; + ++ token->u.cond.tag.type = NULL; ++ token->u.cond.tag.format = ""; + token->type = PTOK_COND; + ++ if ((token->u.cond.tag.type = strchr(str, ':')) != 0) ++ *token->u.cond.tag.type++ = 0; + (void) findTag(hsa, token, str); + + return 0; +@@ -3239,6 +3243,7 @@ static char * singleSprintf(headerSprint + int_32 type; + int_32 count; + sprintfToken spft; ++ sprintfTag stag; + int condNumFormats; + size_t need; + +@@ -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) { ++ /* check if format creates output */ ++ size_t vallen = hsa->vallen; ++ formatValue(hsa, &token->u.cond.tag, element); ++ if (hsa->vallen == vallen) { ++ spft = token->u.cond.elseFormat; ++ condNumFormats = token->u.cond.numElseTokens; ++ } else { ++ hsa->vallen = vallen; ++ hsa->val[hsa->vallen] = 0; ++ } ++ } + } else { + spft = token->u.cond.elseFormat; + condNumFormats = token->u.cond.numElseTokens; +@@ -3291,19 +3308,22 @@ static char * singleSprintf(headerSprint + spft = token->u.array.format; + for (i = 0; i < token->u.array.numTokens; i++, spft++) + { +- 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) ++ 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/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/finddebuginfo.diff b/finddebuginfo.diff new file mode 100644 index 0000000..f53501f --- /dev/null +++ b/finddebuginfo.diff @@ -0,0 +1,102 @@ +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 +-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 + +@@ -25,6 +34,8 @@ do + [ -f "${debugfn}" ] && continue + + 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" + + # A binary already copied into /usr/lib/debug doesn't get stripped, +@@ -34,19 +45,56 @@ do + esac + + 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 + ++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 + +-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 new file mode 100644 index 0000000..88d4f02 --- /dev/null +++ b/findksyms.diff @@ -0,0 +1,90 @@ +SUSE specific kernel provides/requires scripts + +Index: scripts/find-provides.ksyms +=================================================================== +--- /dev/null ++++ scripts/find-provides.ksyms +@@ -0,0 +1,20 @@ ++#! /bin/sh ++ ++IFS=$'\n' ++ ++case "$1" in ++kernel-module-*) ;; # Fedora kernel module package names start with ++ # kernel-module. ++kernel*) is_kernel_package=1 ;; ++esac ++ ++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 +Index: scripts/find-requires.ksyms +=================================================================== +--- /dev/null ++++ scripts/find-requires.ksyms +@@ -0,0 +1,58 @@ ++#! /bin/bash ++ ++IFS=$'\n' ++ ++case "$1" in ++kernel-module-*) ;; # Fedora kernel module package names start with ++ # kernel-module. ++kernel*) is_kernel_package=1 ;; ++esac ++ ++all_provides() { ++ for module in "$@"; do ++ nm "$module" ++ done \ ++ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):\1\t\2:p' \ ++ | sort -k2 -u ++} ++ ++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" \ ++ | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':' ++ fi ++ done \ ++ | sort -k2 -u ++} ++ ++if ! [ -z "$is_kernel_package" -a -e /sbin/modinfo -a -e /sbin/modprobe ]; then ++ cat > /dev/null ++ exit 0 ++fi ++ ++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 ++ ++ join -t $'\t' -j 1 -a 2 $symset_table <( ++ # Filter out requirements that we fulfill ourself. ++ join -t $'\t' -j 2 -v 1 \ ++ <(all_requires "${modules[@]}") \ ++ <(all_provides "${modules[@]}") \ ++ | awk ' ++ BEGIN { FS = "\t" ; OFS = "\t" } ++ { print $3 "/" $2 "/" $1 } ++ ' \ ++ | sort -u) \ ++ | sort -u \ ++ | awk ' ++ { FS = "\t" ; OFS = "\t" } ++ NF == 3 { print "kernel(" $2 ") = " $3 ++ next } ++ { split($1, arr, "/") ++ print "ksym(" arr[3] ") = " arr[2] } ++ ' ++fi diff --git a/findlang.diff b/findlang.diff new file mode 100644 index 0000000..235d1a8 --- /dev/null +++ b/findlang.diff @@ -0,0 +1,119 @@ +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). + 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 + --all-name match all package/domain names + --without-mo not find locales files + EOF +@@ -52,8 +52,8 @@ else NAME=$1 + fi + shift + +-GNOME=# +-KDE=# ++GNOME= ++KDE= + MO= + 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 + ;; +- --with-kde ) +- KDE= ++ --without-kde ) ++ KDE=# + shift + ;; + --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 ++fi ++ ++MO_NAME_NEW=$MO_NAME.tmp.$$ ++rm -f $MO_NAME_NEW ++ ++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: + 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"':: +-'"$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: +-'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir \1: ++'"$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: ++'"$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:^\([^%].*\):: + s:%lang(C) :: +-/^$/d' >> $MO_NAME ++/^ *$/d' >> $MO_NAME_NEW + + find $TOP_DIR -type d|sed ' + s:'"$TOP_DIR"':: +@@ -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 + +-if ! grep -q / $MO_NAME; 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 + exit 0 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/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/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 new file mode 100644 index 0000000..3a2e0fa --- /dev/null +++ b/localetag.diff @@ -0,0 +1,225 @@ +Convert changelog and i18n header elements to current locale. +[#43347], rh#140050 + +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 @*/ + ++static const char * strtolocale(const char *str) ++{ ++ wchar_t *wstr, *wp; ++ const unsigned char *cp; ++ char *cc; ++ int state = 0; ++ int c; ++ int ccl, cca, mb_cur_max; ++ size_t l; ++ mbstate_t ps; ++ int strisutf8 = 1; ++ int locisutf8 = 1; ++ ++ if (!str) ++ return 0; ++ if (!*str) ++ return str; ++ wstr = (wchar_t *)xmalloc((strlen(str) + 1) * sizeof(*wstr)); ++ wp = wstr; ++ cp = (const unsigned char *)str; ++ while ((c = *cp++) != 0) { ++ if (state) { ++ if ((c & 0xc0) != 0x80) { ++ /* encoding error */ ++ break; ++ } ++ c = (c & 0x3f) | (state << 6); ++ if (!(state & 0x40000000)) { ++ /* check for overlong sequences */ ++ if ((c & 0x820823e0) == 0x80000000) ++ c = 0xfdffffff; ++ else if ((c & 0x020821f0) == 0x02000000) ++ c = 0xfff7ffff; ++ else if ((c & 0x000820f8) == 0x00080000) ++ c = 0xffffd000; ++ else if ((c & 0x0000207c) == 0x00002000) ++ c = 0xffffff70; ++ } ++ } else { ++ /* new sequence */ ++ if (c >= 0xfe) ++ c = 0xfffd; ++ else if (c >= 0xfc) ++ c = (c & 0x01) | 0xbffffffc; /* 5 bytes to follow */ ++ else if (c >= 0xf8) ++ c = (c & 0x03) | 0xbfffff00; /* 4 */ ++ else if (c >= 0xf0) ++ c = (c & 0x07) | 0xbfffc000; /* 3 */ ++ else if (c >= 0xe0) ++ c = (c & 0x0f) | 0xbff00000; /* 2 */ ++ else if (c >= 0xc2) ++ c = (c & 0x1f) | 0xfc000000; /* 1 */ ++ else if (c >= 0xc0) ++ c = 0xfdffffff; /* overlong */ ++ else if (c >= 0x80) ++ c = 0xfffd; ++ } ++ state = (c & 0x80000000) ? c : 0; ++ if (state) ++ continue; ++ *wp++ = (wchar_t)c; ++ } ++ if (state) { ++ /* encoding error, assume latin1 */ ++ strisutf8 = 0; ++ cp = (const unsigned char *)str; ++ wp = wstr; ++ while ((c = *cp++) != 0) { ++ *wp++ = (wchar_t)c; ++ } ++ } ++ *wp = 0; ++ mb_cur_max = MB_CUR_MAX; ++ memset(&ps, 0, sizeof(ps)); ++ cc = xmalloc(mb_cur_max); ++ /* test locale encoding */ ++ if (wcrtomb(cc, 0x20ac, &ps) != 3 || memcmp(cc, "\342\202\254", 3)) ++ locisutf8 = 0; ++ if (locisutf8 == strisutf8) { ++ wstr = _free(wstr); ++ return str; ++ } ++ str = _free(str); ++ memset(&ps, 0, sizeof(ps)); ++ ccl = cca = 0; ++ for (wp = wstr; ; wp++) { ++ l = wcrtomb(cc + ccl, *wp, &ps); ++ if (*wp == 0) ++ break; ++ if (l == (size_t)-1) { ++ if (*wp < (wchar_t)256 && mbsinit(&ps)) { ++ cc[ccl] = *wp; ++ l = 1; ++ } else ++ l = wcrtomb(cc + ccl, (wchar_t)'?', &ps); ++ } ++ if (l == 0 || l == (size_t)-1) ++ continue; ++ ccl += l; ++ if (ccl > cca) { ++ cca = ccl + 16; ++ cc = xrealloc(cc, cca + mb_cur_max); ++ } ++ } ++ wstr = _free(wstr); ++ return (const char *)cc; ++} ++ + /** + * Identify type of trigger. + * @param type tag type +@@ -1077,6 +1220,7 @@ static int i18nTag(Header h, int_32 tag, + + 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, 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; ++ } ++ 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 *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, /*@out@*/ rpmTagType * type, ++ /*@out@*/ const void ** data, /*@out@*/ int_32 * count, ++ /*@out@*/ int * freeData) ++{ ++ return localeTag(h, RPMTAG_CHANGELOGNAME, type, data, count, freeData); ++} ++ ++static int changelogtextTag(Header h, /*@out@*/ rpmTagType * type, ++ /*@out@*/ const void ** data, /*@out@*/ int_32 * count, ++ /*@out@*/ int * freeData) ++{ ++ return localeTag(h, RPMTAG_CHANGELOGTEXT, type, data, count, freeData); ++} ++ + /** + * Retrieve group text. + * @param h header +@@ -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 new file mode 100644 index 0000000..f8fb3e9 --- /dev/null +++ b/macrosin.diff @@ -0,0 +1,425 @@ +SUSE specific macro changes. + +Index: macros.in +=================================================================== +--- macros.in.orig ++++ macros.in +@@ -166,22 +166,22 @@ + + # Template for debug information sub-package. + %debug_package \ +-%ifnarch noarch\ + %global __debug_package 1\ +-%package debug\ ++%package debuginfo\ + Summary: Debug information for package %{name}\ + Group: Development/Debug\ + AutoReqProv: 0\ +-%description debug\ ++Requires: %{name} = %{version}-%{release}\ ++%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 debug -f debugfiles.list\ ++%files debuginfo -f debugfiles.list\ + %defattr(-,root,root)\ +-%endif\ + %{nil} + +-%_defaultdocdir %{_usr}/doc ++%_defaultdocdir %{_usr}/doc/packages ++%_docdir_fmt %%{NAME} + + # The path to the gzip executable (legacy, use %{__gzip} instead). + %_gzipbin %{__gzip} +@@ -218,7 +218,7 @@ package or when debugging this package.\ + %_tmppath %{_var}/tmp + + # Path to top of build area. +-%_topdir %{_usrsrc}/redhat ++%_topdir %{_usrsrc}/packages + + # The path to the unzip executable (legacy, use %{__unzip} instead). + %_unzipbin %{__unzip} +@@ -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 w9.bzdio + + # 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 0 + + # + # Filter GLIBC_PRIVATE Provides: and Requires: +@@ -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_conflicts ??? + #%__find_obsoletes ??? ++#%__find_supplements ??? ++#%__find_enhances ??? + + # + # 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)\ + %_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 + +-%_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 + + #============================================================================== + # ---- 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@ +-%_host_alias @host_alias@%{nil} ++%_host_alias @host@%{nil} + %_host_cpu @host_cpu@ + %_host_vendor @host_vendor@ + %_host_os @host_os@ +@@ -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!'.*!!") ++%perl_man1ext %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!") ++%perl_man3ext %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!") ++%perl_man1dir %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!") ++%perl_man3dir %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!") ++%perl_installman1dir %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!") ++%perl_installman3dir %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!") ++%perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!") ++%perl_prefix %{buildroot} ++ ++#------------------------------------------------------------------------------ ++# Python specific macro definitions (originally from PLD). ++# ++%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND) ++%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND) ++%py_libdir %{py_prefix}/%{_lib}/python%{py_ver} ++%py_incdir %{py_prefix}/include/python%{py_ver} ++%py_sitedir %{py_libdir}/site-packages ++%py_compile(O) \ ++find %1 -name '*.pyc' -exec rm -f {} \\; \ ++python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ ++%{-O: \ ++find %1 -name '*.pyo' -exec rm -f {} \\; \ ++python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ ++} ++%py_requires(d) \ ++%define minver %py_ver \ ++%define maxver %(python -c "import sys; a,b=sys.version_info[:2]; print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \ ++BuildRequires: python %{-d:python-devel} \ ++PreReq: python >= %minver, python < %maxver ++ ++#------------------------------------------------------------------------------ ++# ++# RPM macros for Java applications. ++# ++# JPackage Project ++# David Walluck ++# Ville Skyttä ++# Nicolas Mailhot ++# ++# $Id: macros.jpackage,v 1.1.2.5 2003/08/30 13:24:58 scop Exp $ ++# ++ ++# ---- default Java directories ++ ++# ++# Root directory where all Java VMs/SDK/JREs are installed. ++# ++%_jvmdir %{_libdir}/jvm ++ ++# ++# Root directory where all Java VMs/SDK/JREs expose their jars ++# ++%_jvmjardir %{_libdir}/jvm-exports ++ ++# ++# Root directory for all Java VM/SDK/JRE's private things. ++# ++%_jvmprivdir %{_libdir}/jvm-private ++ ++# ++# Directory where arch and version independent jars are installed. ++# This has already been integrated in RH macros following our request. ++# ++# By extension: ++# %{_javadir}-ext: ++# - version dependent jars ++# %{_javadir}-x.y.z: ++# - jars for Java standard x.y.z (usually symlinks to %{_javadir}-ext) ++# %{_javadir}-utils: ++# - Java-related scripts ++# ++# To simplify things only %{_javadir} is defined. ++# ++%_javadir %{_datadir}/java ++ ++# ++# Directory where arch-specific (JNI) version-independent jars are installed. ++# ++# By extension: ++# %{_jnidir}-ext: ++# - version dependent jars ++# %{_jnidir}-x.y.z: ++# - jars for Java standard x.y.z (usually symlinks to %{_jnidir}-ext) ++# To simplify things only %{_jnidir} is defined. ++# ++%_jnidir %{_libdir}/java ++ ++# ++# Root directory where all javadoc is installed. Also already in RH macros. ++# ++%_javadocdir %{_datadir}/javadoc ++ ++# ++# Current default JVM home. ++# ++%java_home %(. %{_javadir}-utils/java-functions; set_jvm; echo $JAVA_HOME) ++ ++# ---- default Java commands ++ ++%ant JAVA_HOME=%{java_home} ant ++%jar %{java_home}/bin/jar ++%java %(. %{_javadir}-utils/java-functions; set_javacmd; echo $JAVACMD) ++%javac %{java_home}/bin/javac ++%javadoc %{java_home}/bin/javadoc ++ ++# ---- Java extension handling macros ++ ++# ++# add_jvm_extension should be used in %install by extension packages to declare ++# what extension jars they provide. ++# ++# For example a package that provides foo.jar which is the bar extension ++# under java 1.2 and 1.3 should do a: ++# ++# %install ++# ... # create foo.jar in %{javadir}-ext ++# %add_jvm_extension foo bar 1.2 1.3 ++# ++# %files ++# %{javadir}-ext/foo.jar ++# %{javadir}-*/bar.jar ++# ++%add_jvm_extension JAVA_LIBDIR=%{buildroot}/%{_javadir} %{_bindir}/jvmjar -l ++ ++# ++# Standard JPackage script ++# ++# This is kind of tasteless and should be moved to an external template ++# ++# %1 main class ++# %2 flags ++# %3 options ++# %4 jars (separated by ':') ++# %5 the name of script you wish to create ++# ++%jpackage_script() \ ++install -d -m 755 $RPM_BUILD_ROOT%{_bindir}\ ++cat > $RPM_BUILD_ROOT%{_bindir}/%5 << EOF \ ++#!/bin/sh\ ++#\ ++# %{name} script\ ++# JPackage Project \ ++\ ++# Source functions library\ ++. %{_javadir}-utils/java-functions\ ++\ ++# Source system prefs\ ++if [ -f %{_sysconfdir}/java/%{name}.conf ] ; then\ ++ . %{_sysconfdir}/java/%{name}.conf\ ++fi\ ++\ ++# Source user prefs\ ++if [ -f \\$HOME/.%{name}rc ] ; then\ ++ . \\$HOME/.%{name}rc\ ++fi\ ++\ ++# Configuration\ ++MAIN_CLASS=%1\ ++BASE_FLAGS=%2\ ++BASE_OPTIONS=%3\ ++BASE_JARS="%(echo %4 | sed -e 's,:, ,g')"\ ++\ ++# Set parameters\ ++set_jvm\ ++set_classpath \\$BASE_JARS\ ++set_flags \\$BASE_FLAGS\ ++set_options \\$BASE_OPTIONS\ ++\ ++# Let's start\ ++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 + + #------------------------------------------------------------------------ + # Use in %install to generate locale specific file lists. For example, +@@ -1270,3 +1377,17 @@ done \ + + # \endverbatim + #*/ ++ ++ ++#------------------------------------------------------------------------ ++# standard build service macros ++# ++%ext_info .gz ++%ext_man .gz ++ ++%info_add() test -x /sbin/install-info -a -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \ ++%{nil} ++ ++%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} ++ diff --git a/missingok.diff b/missingok.diff new file mode 100644 index 0000000..96133c9 --- /dev/null +++ b/missingok.diff @@ -0,0 +1,39 @@ +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: + /*@=boundsread@*/ + + unsatisfied: +- rc = 1; /* dependency is unsatisfied */ +- rpmdsNotify(dep, NULL, rc); ++ if (rpmdsFlags(dep) & RPMSENSE_MISSINGOK) { ++ rc = 0; /* dependency is unsatisfied, but just a hint. */ ++ rpmdsNotify(dep, _("(hint skipped)"), rc); ++ } else { ++ rc = 1; /* dependency is unsatisfied */ ++ rpmdsNotify(dep, NULL, rc); ++ } + + exit: + /* +@@ -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_SCRIPT_PREP | \ + RPMSENSE_SCRIPT_BUILD | \ + RPMSENSE_SCRIPT_INSTALL | \ diff --git a/modalias-kernel_module.diff b/modalias-kernel_module.diff new file mode 100644 index 0000000..4add934 --- /dev/null +++ b/modalias-kernel_module.diff @@ -0,0 +1,61 @@ +Index: scripts/find-supplements.ksyms +=================================================================== +--- scripts/find-supplements.ksyms ++++ scripts/find-supplements.ksyms +@@ -1,5 +1,6 @@ + #! /bin/sh + ++RPM_SOURCE_DIR=/usr/src/packages/SOURCES + IFS=$'\n' + + case "$1" in +@@ -46,11 +47,43 @@ combine_modaliases() { + print_modaliases "$class" "$variants" "$pos" + } + +-for module in $(grep -E '/lib/modules/.+\.ko$'); do +- vermagic=$(/sbin/modinfo -F vermagic "$module") +- krel=${vermagic%% *} +- /sbin/modinfo -F alias "$module" \ +- | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" +-done \ ++aliases_of_filelist() { ++ for module in $(grep -E '/lib/modules/.+\.ko$'); do ++ vermagic=$(/sbin/modinfo -F vermagic "$module") ++ krel=${vermagic%% *} ++ /sbin/modinfo -F alias "$module" \ ++ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" ++ done ++} ++ ++aliases_of_specfile_macro() { ++ declare regex ++ ++ regex=$( ++ set -o noglob ++ set -- $(sed -ne 's:^%supplements_kernel_module[ \t]::p' \ ++ $RPM_SOURCE_DIR/$1.spec) ++ while [ $# -ge 1 ]; do ++ regex=$(echo "$1" \ ++ | sed -e 's:[.]:\\.:g' \ ++ -e 's:?:.:g' \ ++ -e 's:\*:.*:g' \ ++ -e 's:\\:\\\\:g') ++ echo -n "^$regex\$" ++ [ $# -ge 2 ] && echo -n "|" ++ shift ++ done ++ ) ++ ++ if [ -n "$regex" ]; then ++ awk ' ++ $1 == "alias" && $3 ~ regex { print $2 } ++ ' regex="$regex" /lib/modules/*/modules.alias ++ fi ++} ++ ++( aliases_of_filelist ++ aliases_of_specfile_macro "$1" ++) \ + | sort -u \ + | combine_modaliases diff --git a/modalias.diff b/modalias.diff new file mode 100644 index 0000000..ccfe6b6 --- /dev/null +++ b/modalias.diff @@ -0,0 +1,95 @@ +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 ++ ++IFS=$'\n' ++ ++case "$1" in ++kernel-module-*) ;; # Fedora kernel module package names start with ++ # kernel-module. ++kernel*) is_kernel_package=1 ;; ++esac ++ ++if ! [ -z "$is_kernel_package" ]; then ++ cat > /dev/null ++ exit 0 ++fi ++ ++print_modaliases() { ++ declare class=$1 variants=$2 pos=$3 ++ if [ -n "$variants" ]; then ++ echo "${class:0:pos}[$variants]${class:pos+1}" ++ else ++ [ -z "$class" ] || echo "$class" ++ fi ++} ++ ++combine_modaliases() { ++ declare tag class variants pos n ++ read class ++ while read tag; do ++ for ((n=0; n<${#class}; n++)); do ++ if [ "*" != "${class:n:1}" -a \ ++ "${class:0:n}" = "${tag:0:n}" -a \ ++ "${class:n+1}" = "${tag:n+1}" ] && ++ ( [ -z "$pos" ] || [ $n = $pos ] ); then ++ variants="${variants:-${class:n:1}}${tag:n:1}" ++ pos=$n ++ break ++ fi ++ done ++ if [ $n -eq ${#class} ]; then ++ print_modaliases "$class" "$variants" "$pos" ++ variants= ++ pos= ++ class=$tag ++ fi ++ done ++ print_modaliases "$class" "$variants" "$pos" ++} ++ ++for module in $(grep -E '/lib/modules/.+\.ko$'); do ++ vermagic=$(/sbin/modinfo -F vermagic "$module") ++ krel=${vermagic%% *} ++ /sbin/modinfo -F alias "$module" \ ++ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" ++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 new file mode 100644 index 0000000..0bd74c4 --- /dev/null +++ b/nameversioncompare.diff @@ -0,0 +1,53 @@ +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 +@@ -124,6 +124,24 @@ static int removePackage(rpmts ts, Heade + return 0; + } + ++static int rpmNameVersionCompare(Header first, Header second) ++{ ++ const char * one, * two; ++ int rc; ++ ++ 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; ++ 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); ++} ++ + int rpmtsAddInstallElement(rpmts ts, Header h, + fnpyKey key, int upgrade, rpmRelocation * relocs) + { +@@ -303,7 +322,7 @@ addheader: + continue; + + /* Skip packages that contain identical NEVR. */ +- if (rpmVersionCompare(h, oh) == 0) ++ if (rpmNameVersionCompare(h, oh) == 0) + continue; + + 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)) { + 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/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/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/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/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 new file mode 100644 index 0000000..43c96e1 --- /dev/null +++ b/platformin.diff @@ -0,0 +1,49 @@ +SUSE specific platform changes. The libexecdir definition is probably +wrong, LSB seems to demand "%{_exec_prefix}/lib". + +--- ./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 %{_libdir} + %_datadir @datadir@ + %_sysconfdir @sysconfdir@ + %_sharedstatedir @sharedstatedir@ + %_localstatedir @localstatedir@ + %_lib @LIB@ +-%_libdir @LIBDIR@ ++%_libdir %{_exec_prefix}/%{_lib} + %_includedir @includedir@ + %_oldincludedir @oldincludedir@ + %_infodir @infodir@ + %_mandir @mandir@ +-%_initrddir %{_sysconfdir}/rc.d/init.d ++%_initrddir %{_sysconfdir}/init.d + + %_defaultdocdir @DEFAULTDOCDIR@ + +@@ -148,3 +148,21 @@ + @mandrake@%_gamesdir games + @mandrake@%_gamesbindir %{_prefix}/%{_gamesdir} + @mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir} ++@SuSE@#--------------------------------------------------------------------- ++@SuSE@# Expanded at end of %prep ++@SuSE@# ++@SuSE@%__id_u @__ID_U@ ++@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@%_fixperms %{__chmod} -Rf @FIXPERMS@ ++@SuSE@ ++@SuSE@#--------------------------------------------------------------------- ++@SuSE@# Expanded at start of %build ++@SuSE@# ++@SuSE@%__spec_build_pre %{___build_pre}\ ++@SuSE@%{?buildroot: %__rm -rf "$RPM_BUILD_ROOT"\ ++@SuSE@ %__mkdir_p `dirname "$RPM_BUILD_ROOT"`\ ++@SuSE@ %__mkdir "$RPM_BUILD_ROOT"\ ++@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/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 new file mode 100644 index 0000000..161eae2 --- /dev/null +++ b/refreshtestarch.diff @@ -0,0 +1,24 @@ +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 + + 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, + rpmteE(psm->te)); + xx = rpmdbSetIteratorRE(psm->mi, RPMTAG_VERSION, RPMMIRE_STRCMP, + rpmteV(psm->te)); + xx = rpmdbSetIteratorRE(psm->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, + rpmteO(psm->te)); + } 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-python.changes b/rpm-python.changes new file mode 100644 index 0000000..0746aa6 --- /dev/null +++ b/rpm-python.changes @@ -0,0 +1,34 @@ +------------------------------------------------------------------- +Wed Oct 18 22:59:02 CEST 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 23:41:37 CEST 2006 - schwab@suse.de + +- Make sure config.rpath is present. + +------------------------------------------------------------------- +Fri Sep 22 08:58:57 CEST 2006 - aj@suse.de + +- Fix for python2.5. + +------------------------------------------------------------------- +Thu Sep 21 11:41:04 CEST 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 10:58:42 CEST 2006 - lnussel@suse.de + +- fix build with python 2.5 by overriding autodetection + +------------------------------------------------------------------- +Tue Sep 19 13:48:27 CEST 2006 - rguenther@suse.de + +- split from rpm package + diff --git a/rpm-python.spec b/rpm-python.spec new file mode 100644 index 0000000..ef05e37 --- /dev/null +++ b/rpm-python.spec @@ -0,0 +1,80 @@ +# +# spec file for package rpm-python (Version 4.4.2) +# +# 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. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: rpm-python +BuildRequires: python-devel +License: GNU General Public License (GPL) +Group: System/Packages +Summary: Python Bindings for Manipulating RPM Packages +Version: 4.4.2 +Release: 76 +Requires: rpm = %{version} + +%py_requires +Source99: rpm.spec +%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} + +%description +The rpm-python package contains a module that permits applications +written in the Python programming language to use the interface +supplied by RPM Package Manager libraries. + +This package should be installed if you want to develop Python programs +that will manipulate RPM packages and databases. + + + +Authors: +-------- + Erik Troan + Marc Ewing + +%prep +%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/lib +# 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 +pushd $RPM_BUILD_ROOT/%py_sitedir/rpm +rm -f _rpmmodule.a _rpmmodule.la +python %py_libdir/py_compile.py *.py +python -O %py_libdir/py_compile.py *.py +popd + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_libdir}/python* + +%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-suse_macros b/rpm-suse_macros new file mode 100644 index 0000000..12d409f --- /dev/null +++ b/rpm-suse_macros @@ -0,0 +1,459 @@ +%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 +%_mandir %{_prefix}/share/man +%_sysconfdir /etc +%_localstatedir /var +%_defaultdocdir %{_usr}/share/doc/packages + +# package build macros +%makeinstall make DESTDIR=%{buildroot} install +%tcl_version %(echo 'puts [package require Tcl]' | tclsh) +%insserv_prereq insserv +%fillup_prereq fillup fileutils +%install_info_prereq info + +%__os_install_post \ + %{suse_check} \ + /usr/lib/rpm/brp-compress \ +%{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 +# not running from YaST2 in instsys on update. +%restart_on_update() \ + test -n "$FIRST_ARG" || FIRST_ARG=$1 \ + if test "$FIRST_ARG" -ge 1 ; then \ + test -f /etc/sysconfig/services && . /etc/sysconfig/services \ + if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then \ + for service in %{?*} ; do \ + /etc/init.d/$service try-restart > /dev/null || : \ + done \ + fi \ + fi \ + %nil + +# macro: %stop_on_removal() +# Used to stop a service in preun section, if we are +# not running from YaST2 in instsys on removal of this package. +%stop_on_removal() \ + test -n "$FIRST_ARG" || FIRST_ARG=$1 \ + if test "$FIRST_ARG" = "0" ; then \ + test -f /etc/sysconfig/services && . /etc/sysconfig/services \ + if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_STOP_ON_REMOVAL" != yes ; then \ + for service in %{?*} ; do \ + /etc/init.d/$service stop > /dev/null \ + done \ + fi \ + fi \ + %nil +# macro: %configure_kernel_source +# +# +%configure_kernel_source() \ + if test -d /usr/src/linux ; then \ + pushd /usr/src/linux \ + test -f .config || cp arch/%_arch/defconfig.default .config \ + yes "" | make oldconfig \ + make dep \ + popd \ + fi \ + %nil + +%is_plus %(if test -f /.buildenv ; then source /.buildenv ; if [[ "$BUILD_BASENAME" == *+kde ]] ; then echo 1 ; else echo 0 ; fi ; else echo 0 ; fi) + +%run_permissions() \ + if test "$YAST_IS_RUNNING" != "instsys" ; then \ + if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.permissions ; then \ + /sbin/SuSEconfig --module permissions \ + fi \ + fi \ + %nil + +%run_suseconfig(m:) \ + %{!-m:echo -e "\\nERROR: missing parameter for macro run_suseconfig\\n" ; exit 1 ; } \ + if test "$YAST_IS_RUNNING" != "instsys" ; then \ + 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 \ + fi \ + fi \ + %nil + +%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 +# -l: no ltconfig,ltmain.sh +%suse_update_config(fcl) \ + AUTOMAKE_DIR=/usr/share/automake \ + [ -d $AUTOMAKE_DIR ] || AUTOMAKE_DIR=/usr/share/automake* \ + %{!-c:\ + [ -d $AUTOMAKE_DIR ] || { \ + echo 'Please, install automake.' \ + exit 1 \ + } \ + } \ + for d in . %{?*}; do \ + %{!-c:\ + for f in config.sub config.guess; do \ + if test -f $d/$f -a ! $d/$f -ef $AUTOMAKE_DIR/$f ; then \ + %{!-f:[ $d/$f -nt $AUTOMAKE_DIR/$f ] ||} cp -f $AUTOMAKE_DIR/$f $d/$f \ + fi \ + if test -d $d -a ! -f $d/depcomp -a -f $AUTOMAKE_DIR/depcomp ; then \ + cp -f $AUTOMAKE_DIR/depcomp $d/depcomp \ + echo "please add depcomp to sources for new automake!" \ + fi \ + if test -f $d/missing -a ! $d/missing -ef $AUTOMAKE_DIR/missing ; then \ + cp -f $AUTOMAKE_DIR/missing $d/missing \ + fi \ + done \ + } \ + %{!-l:\ + for f in ltconfig ltmain.sh; do \ + if test -f $d/$f; then \ + sed 's/linux-gnu\\([^*][^*]*\\)\\*/linux*\\1*/g; s/linux-gnu/linux/g; s,/lib\\\>,/%_lib,g; s,/%_lib\\([\$-]\\),/lib\\1,g' $d/$f > $d/$f-$$ && \ + mv -f $d/$f-$$ $d/$f \ + chmod +x $d/$f \ + fi \ + done \ + } \ + done \ + + +%suse_update_libdir() \ + if [ %_lib != lib ]; then \ + for file in %{?*} ; do \ + [ ! -e $file ] && echo "Error: $file does not exist!" && exit -1 \ + [ -e $file.nolib64 ] && echo "Error: $file.nolib64 already exists!" && exit -1 \ + cp $file $file.nolib64 \ + echo "patching $file" \ + sed -e "s,/lib\\\>,/%_lib,g" $file.nolib64 | sed -e "s,/%_lib/cpp,/lib/cpp,; s,/usr/%_lib/perl,/usr/lib/perl, ; s,/%_lib\\([\$-]\\),/lib\\1,g" > $file \ + rm -f $file.nolib64 \ + done; \ + fi ; \ + + +# macro: fillup_and_insserv +# do the fillup and insserv calls for postinstall +# options: +# -n (use first argument as name for fillup template filenames +# 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] +# Pairs of: +# main script name +# 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/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 } } + +# do_real_fillup: internal macro +# this part really calls fillup for the appropriate files +# +%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/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 -- %{?*} \ + while [ ${#*} -gt 0 ] ; do \ + SCRIPTNAME=$1 \ + STARTVAR=$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 \ + 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 + +# macro: fillup_only +# 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 +# NAME2: if needed (if more packages fill the +# same sysconfig file) the package name +# options: +# -n set sysconfig name manually +# -a use package name as $NAME2 +# -s use second arg as package-name +# -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 \ + 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/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 rc.config +# or with -f in the given file +%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 + +# macro: remove_and_set +# 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/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() \ + 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 ; + +%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 ; + +%suse_version 901 +%sles_version 0 +%ul_version 0 + + +%do_profiling 1 +%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 new file mode 100644 index 0000000..11db5f0 --- /dev/null +++ b/rpm.changes @@ -0,0 +1,2004 @@ +------------------------------------------------------------------- +Thu Nov 30 14:04:56 CET 2006 - mls@suse.de + +- disable noprovides patch [#224824] + +------------------------------------------------------------------- +Fri Nov 24 14:48:38 CET 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 16:51:26 CET 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 8 15:29:47 CET 2006 - agruen@suse.de + +- Move the Kernel Module specific macros into the kernel-source + package. + +------------------------------------------------------------------- +Fri Oct 20 17:53:30 CEST 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 22:56:36 CEST 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 17:46:38 CEST 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 23:41:37 CEST 2006 - schwab@suse.de + +- Make sure config.rpath is present. + +------------------------------------------------------------------- +Mon Oct 2 18:02:21 CEST 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 2 14:59:50 CEST 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 1 00:05:46 CEST 2006 - agruen@suse.de + +- Make find-*.ksyms more robust. + +------------------------------------------------------------------- +Tue Sep 19 13:47:56 CEST 2006 - rguenther@suse.de + +- split rpm-python to separate spec file +- remove python-devel BuildRequires + +------------------------------------------------------------------- +Tue Aug 15 00:59:12 CEST 2006 - ro@suse.de + +- workaround for gettext using MKINSTALLDIRS in configure.ac + +------------------------------------------------------------------- +Wed Jun 14 15:55:36 CEST 2006 - mls@suse.de + +- make rpmlib provide rpmlib(PatchRPMs) [#184856] + +------------------------------------------------------------------- +Wed Apr 26 01:14:33 CEST 2006 - agruen@suse.de + +- rpm-suse-kernel-module-subpackage: Use a temporary file location + that only root can write to (169378). + +------------------------------------------------------------------- +Fri Apr 21 16:05:54 CEST 2006 - mls@suse.de + +- copy suse_macros file back into source rpm + +------------------------------------------------------------------- +Mon Apr 10 18:31:32 CEST 2006 - agruen@suse.de + +- rpm-suse-kernel-module-subpackage: Arguments to -p and -f should + be relative to %_sourcedir. + +------------------------------------------------------------------- +Fri Mar 24 16:43:22 CET 2006 - mls@suse.de + +- fix uninitialized variable in unused file code [#160434] + +------------------------------------------------------------------- +Fri Mar 24 16:10:39 CET 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 19:00:50 CET 2006 - mls@suse.de + +- fix PGP signature checking when there is no RSA sig + +------------------------------------------------------------------- +Mon Mar 20 14:51:02 CET 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 20:27:11 CET 2006 - agruen@suse.de + +- Allow paths relative to %_sourcedir in + %suse_kernel_module_package. + +------------------------------------------------------------------- +Sat Mar 18 08:24:12 CET 2006 - agruen@suse.de + +- Clarify rpm --help texts. + +------------------------------------------------------------------- +Fri Mar 17 19:08:18 CET 2006 - mls@suse.de + +- fix cond queries that return no result + +------------------------------------------------------------------- +Fri Mar 17 16:30:49 CET 2006 - mls@suse.de + +- work around broken patchrpm database entries [#156347] +- add query support for suggests/recommends/enhances/supplements + [#155301] + +------------------------------------------------------------------- +Sun Mar 12 13:19:29 CET 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 12:46:51 CET 2006 - ro@suse.de + +- find-debuginfo: only "strip-debug" for static libs, + do not use "strip-all" there + +------------------------------------------------------------------- +Fri Mar 10 21:18:38 CET 2006 - agruen@suse.de + +- Make KMP sub-packages require kernel-$flavor instead of kernel + (mostly cosmetic). + +------------------------------------------------------------------- +Fri Mar 10 16:36:15 CET 2006 - dmueller@suse.de + +- patch for improved debuginfo extraction (#150940) + +------------------------------------------------------------------- +Thu Mar 9 16:23:23 CET 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 6 17:03:08 CET 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 1 21:57:08 CET 2006 - schwab@suse.de + +- Fix logic error in find_debuginfo.sh [#144629]. + +------------------------------------------------------------------- +Fri Feb 24 12:38:02 CET 2006 - mls@suse.de + +- fix cursor leak in rpmdbGrowIterator [#151953] +- print error message if scriptlet fork fails [#152779] + +------------------------------------------------------------------- +Sun Feb 19 13:35:40 CET 2006 - agruen@suse.de + +- scripts/find-requires.ksyms: Fix bug in last find-requires.ksyms + fix. + +------------------------------------------------------------------- +Sat Feb 18 15:17:50 CET 2006 - ro@suse.de + +- allow debuginfo packages also for noarch (for mono,java) + +------------------------------------------------------------------- +Fri Feb 17 15:00:28 CET 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 09:41:53 CET 2006 - agruen@suse.de + +- scripts/find-requires.ksyms: Tolerate kernel modules that have + more than one vermagic info entry (it happened!). + +------------------------------------------------------------------- +Mon Feb 13 14:33:40 CET 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 17:02:14 CET 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 4 23:23:06 CET 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 3 15:10:04 CET 2006 - mls@suse.de + +- use RPMSENSE_STRONG instead of RPMSENSE_WEAK +- drop support for EssentialFor + +------------------------------------------------------------------- +Wed Feb 1 23:11:19 CET 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 12:22:16 CET 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 22:24:45 CET 2006 - mls@suse.de + +- added support for EssentialFor and Supports +- enabled support for lua scripts + +------------------------------------------------------------------- +Fri Jan 27 20:38:25 CET 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 19:01:13 CET 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 21:30:55 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Jan 17 01:31:03 CET 2006 - agruen@suse.de + +- rpm-suse_macros: Add %suse_kernel_module_package macro for + building kernel module packages. + +------------------------------------------------------------------- +Wed Jan 11 16:11:00 CET 2006 - agruen@suse.de + +- rpm-4.4.2.diff: find-requires.ksyms must not print "Requires:". + Remove trailing whitespace. + +------------------------------------------------------------------- +Wed Dec 21 16:30:57 CET 2005 - mls@suse.de + +- make transaction lock --root aware + +------------------------------------------------------------------- +Mon Dec 19 18:53:47 CET 2005 - mls@suse.de + +- don't ignore getcwd return value in build.c + +------------------------------------------------------------------- +Mon Dec 19 18:06:49 CET 2005 - mls@suse.de + +- fix find-lang.sh script + +------------------------------------------------------------------- +Sun Dec 18 22:44:03 CET 2005 - mls@suse.de + +- fix find-debuginfo script + +------------------------------------------------------------------- +Sun Dec 18 17:26:28 CET 2005 - mls@suse.de + +- don't assume root:root defattr + +------------------------------------------------------------------- +Sun Dec 18 01:06:45 CET 2005 - agruen@suse.de + +- fix wrong buildsubdir macro name + +------------------------------------------------------------------- +Thu Dec 15 16:46:19 CET 2005 - mls@suse.de + +- update to version 4.4.2 + for now without lua, rpc, dav support + +------------------------------------------------------------------- +Wed Dec 7 04:27:28 CET 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 01:17:34 CET 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 13:05:33 CET 2005 - ro@suse.de + +- honor NO_BRP_STRIP_DEBUG in find-debuginfo.sh + +------------------------------------------------------------------- +Sat Oct 29 00:28:08 CEST 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 02:34:43 CEST 2005 - ro@suse.de + +- find-requires/find-provides: fix MONO_PATH + +------------------------------------------------------------------- +Thu Oct 20 17:57:28 CEST 2005 - ro@suse.de + +- find-requires/find-provides: update mono hooks + +------------------------------------------------------------------- +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] +- fix typo in man page [#114909] + +------------------------------------------------------------------- +Thu Aug 25 14:21:36 CEST 2005 - mls@suse.de + +- don't catch ignored signals [#74560] +- unblock all signals when running scripts + +------------------------------------------------------------------- +Mon Aug 22 13:51:49 CEST 2005 - mls@suse.de + +- do not try to mmap zero sized files in domd5() + +------------------------------------------------------------------- +Fri Aug 12 16:59:47 CEST 2005 - mls@suse.de + +- change -mcpu to -mtune and add -D_FORTIFY_SOURCE=2 [#104241] + +------------------------------------------------------------------- +Wed Aug 3 15:23:23 CEST 2005 - mls@suse.de + +- ignore /media when creating fdilesystem list +- allow --ignoresize when erasing packages + +------------------------------------------------------------------- +Fri Jul 1 15:11:33 CEST 2005 - schwab@suse.de + +- Fix ppc assembly syntax. + +------------------------------------------------------------------- +Wed Jun 8 12:08:09 CEST 2005 - matz@suse.de + +- add STRIP_KEEP_SYMTAB to find-debuginfo.sh + +------------------------------------------------------------------- +Sat May 21 22:20:28 CEST 2005 - schwab@suse.de + +- find-debuginfo.sh: make writable before extracting debug info, simplify. + +------------------------------------------------------------------- +Thu May 19 10:27:37 CEST 2005 - schwab@suse.de + +- Replace absolute symlinks when copying sources for debuginfo package. + +------------------------------------------------------------------- +Wed Apr 6 18:39:23 CEST 2005 - schwab@suse.de + +- Cleanup neededforbuild. + +------------------------------------------------------------------- +Wed Apr 6 08:01:58 CEST 2005 - meissner@suse.de + +- Added gettext-devel + +------------------------------------------------------------------- +Tue Apr 5 11:48:14 CEST 2005 - bg@suse.de + +- add noarch to valid hppa architectures + +------------------------------------------------------------------- +Thu Mar 24 15:53:12 CET 2005 - uli@suse.de + +- better ARM support + +------------------------------------------------------------------- +Sun Feb 20 03:23:09 CET 2005 - od@suse.de + +- fix debugedit for relocatable files (kernel modules) on ppc + +------------------------------------------------------------------- +Fri Feb 18 16:35:57 CET 2005 - mls@suse.de + +- update debugedit program + +------------------------------------------------------------------- +Fri Feb 18 14:16:15 CET 2005 - od@suse.de + +- make find-debuginfo.sh handle kernel modules + +------------------------------------------------------------------- +Wed Feb 16 15:50:42 CET 2005 - mls@suse.de + +- fix --rebuilddb with --root [#50993] + +------------------------------------------------------------------- +Fri Feb 11 17:46:08 CET 2005 - mls@suse.de + +- update to elfutils-0.97 [#47746], [#48471] +- update to db-4.2.52 [#44193] +- pack brp-symlink + +------------------------------------------------------------------- +Fri Feb 11 00:02:50 CET 2005 - ro@suse.de + +- remove -fsigned-char from rpmrc (#49877) + +------------------------------------------------------------------- +Sat Feb 5 18:45:58 CET 2005 - schwab@suse.de + +- Fix building with gcc 4. + +------------------------------------------------------------------- +Fri Feb 4 20:17:15 CET 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 4 00:50:00 CET 2005 - ro@suse.de + +- fix one regexp in find_lang change + +------------------------------------------------------------------- +Thu Feb 3 17:09:32 CET 2005 - ro@suse.de + +- hppa may install noarch + +------------------------------------------------------------------- +Wed Feb 2 01:09:53 CET 2005 - schwab@suse.de + +- Remove compatibility provides on ia64. + +------------------------------------------------------------------- +Mon Jan 31 16:41:54 CET 2005 - adrian@suse.de + +- handle also ??_?? languages in %find_lang. + +------------------------------------------------------------------- +Fri Jan 28 17:21:22 CET 2005 - coolo@suse.de + +- let the debuginfo packages work again + +------------------------------------------------------------------- +Fri Jan 21 16:30:25 CET 2005 - skh@suse.de + +- changed jpackage macros + +------------------------------------------------------------------- +Fri Jan 21 16:30:05 CET 2005 - coolo@suse.de + +- use binutils for debuginfo packages + +------------------------------------------------------------------- +Fri Jan 14 14:31:04 CET 2005 - coolo@suse.de + +- name the debug package -debuginfo to sync with redhat/fedora + +------------------------------------------------------------------- +Mon Dec 13 23:49:25 CET 2004 - sndirsch@suse.de + +- moved chinese popt mo file to correct directory (Bug #47262) + +------------------------------------------------------------------- +Fri Dec 3 16:11:03 CET 2004 - mls@suse.de + +- fix update of rpm with same name/version/release but different + architecture + +------------------------------------------------------------------- +Thu Nov 25 23:47:44 CET 2004 - ro@suse.de + +- fix build with python-2.4 + +------------------------------------------------------------------- +Tue Nov 16 00:26:15 CET 2004 - ro@suse.de + +- update permissions handling + +------------------------------------------------------------------- +Tue Oct 19 00:33:55 CEST 2004 - ro@suse.de + +- locale rename: no -> nb + +------------------------------------------------------------------- +Mon Sep 27 19:22:13 CEST 2004 - mls@suse.de + +- move TE type initializaten before the addTE call to make + relocations work [#34871, #43557] + +------------------------------------------------------------------- +Fri Sep 24 15:50:28 CEST 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 16:24:30 CEST 2004 - mls@suse.de + +- allow database read access in scripts + +------------------------------------------------------------------- +Wed Sep 22 19:57:17 CEST 2004 - mls@suse.de + +- only retry locking if errno is EAGAIN [#45704] + +------------------------------------------------------------------- +Fri Sep 17 12:16:21 CEST 2004 - mls@suse.de + +- fix isSpecfile fix +- reset SIGILL handler in RPMClass() + +------------------------------------------------------------------- +Mon Sep 13 21:10:29 CEST 2004 - mls@suse.de + +- glob.h: add workaround for invalid prototypes + +------------------------------------------------------------------- +Thu Sep 9 17:53:49 CEST 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 2 14:49:01 CEST 2004 - mls@suse.de + +- add jpackage macros + +------------------------------------------------------------------- +Fri Aug 6 17:45:37 CEST 2004 - mls@suse.de + +- make it build with new automake + +------------------------------------------------------------------- +Wed Jun 23 15:15:09 CEST 2004 - mls@suse.de + +- add support for mono provides/requires autodetection. + limited to *.exe and *.dll for now. + +------------------------------------------------------------------- +Sun May 23 01:10:14 CEST 2004 - schwab@suse.de + +- Don't record timestamp in compressed manpages. + +------------------------------------------------------------------- +Thu Apr 22 17:54:55 CEST 2004 - mls@suse.de + +- add DISABLE_RESTART_ON_UPDATE and DISABLE_STOP_ON_REMOVAL + sysconfig variables + +------------------------------------------------------------------- +Mon Apr 19 15:52:36 CEST 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 21:04:02 CEST 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 12:34:54 CEST 2004 - ke@suse.de + +- remove broken german translation file [#30665], + +------------------------------------------------------------------- +Fri Mar 26 17:13:29 CET 2004 - mls@suse.de + +- use the system's zlib, fixes python segfault [#36810] + +------------------------------------------------------------------- +Sun Mar 21 11:48:21 CET 2004 - aj@suse.de + +- Work around lvalue used as cast problems. + +------------------------------------------------------------------- +Thu Mar 18 16:15:56 CET 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 6 11:38:01 CET 2004 - ro@suse.de + +- readd lost patch hunk from last change: + set docdir default back to .../packages/%name (w/o version) + +------------------------------------------------------------------- +Fri Mar 5 16:50:47 CET 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 15:33:06 CET 2004 - schwab@suse.de + +- Remove anchor from pattern in find-requires. + +------------------------------------------------------------------- +Fri Feb 27 18:19:08 CET 2004 - schwab@suse.de + +- Silence error from find. + +------------------------------------------------------------------- +Fri Feb 27 14:18:49 CET 2004 - mls@suse.de + +- fix definition of _initrddir +- set sysconfdir to /etc +- set localstatedir to /var + +------------------------------------------------------------------- +Thu Feb 26 18:42:10 CET 2004 - schwab@suse.de + +- Handle more cases of filenames with spaces. + +------------------------------------------------------------------- +Thu Feb 26 12:36:04 CET 2004 - ro@suse.de + +- some fixes in linux.prov to survive filenames with spaces + +------------------------------------------------------------------- +Thu Feb 12 20:08:03 CET 2004 - mls@suse.de + +- fixed linux.req soname generation (#21664) +- disable nptl for now + +------------------------------------------------------------------- +Mon Feb 9 14:04:45 CET 2004 - kukuk@suse.de + +- linux.req: Fix finding of interpreters + +------------------------------------------------------------------- +Sat Feb 7 18:08:00 CET 2004 - olh@suse.de + +- disable redhat's uname hack for ppc + +------------------------------------------------------------------- +Thu Feb 5 16:37:03 CET 2004 - ro@suse.de + +- linux.prov: don't block soname in versioned-requires +- linux.req: disable perl-requires, it's broken + +------------------------------------------------------------------- +Tue Feb 3 23:44:41 CET 2004 - schwab@suse.de + +- Readd ia64 64bit provides hack. + +------------------------------------------------------------------- +Tue Feb 3 13:56:42 CET 2004 - kukuk@suse.de + +- Remove all special find-requires scripts and use the default one + +------------------------------------------------------------------- +Sat Jan 17 03:14:02 CET 2004 - schwab@suse.de + +- Filter out linux-gate.so. + +------------------------------------------------------------------- +Thu Jan 15 16:53:21 CET 2004 - schwab@suse.de + +- For ia64 require 64bit symbols and provide them both with and without + 64bit. + +------------------------------------------------------------------- +Tue Jan 13 09:14:30 CET 2004 - adrian@suse.de + +- call ldconfig +- add missing Requires in -devel packages +- add %defattr + +------------------------------------------------------------------- +Fri Jan 9 15:38:17 CET 2004 - kukuk@suse.de + +- Coompile with "-fno-strict-aliasing" + +------------------------------------------------------------------- +Fri Nov 14 13:21:17 CET 2003 - bg@suse.de + +- added changes for hppa +- fix build for hppa + +------------------------------------------------------------------- +Fri Oct 10 15:25:26 CEST 2003 - sf@suse.de + +- added alias 'amd64' for 'x86_64' + +------------------------------------------------------------------- +Fri Oct 10 01:26:57 CEST 2003 - ro@suse.de + +- ignore "linux-gate.so" in ldd output (on 2.6 systems) + +------------------------------------------------------------------- +Wed Oct 8 15:22:01 CEST 2003 - schwab@suse.de + +- Add popt to prerequires for rpm. + +------------------------------------------------------------------- +Tue Sep 23 16:28:12 CEST 2003 - mls@suse.de + +- really disable rpmconfigcheck + +------------------------------------------------------------------- +Sat Sep 20 15:58:59 CEST 2003 - kukuk@suse.de + +- Don't enable rpmconfigcheck per default + +------------------------------------------------------------------- +Fri Sep 19 23:47:44 CEST 2003 - schwab@suse.de + +- Fix descriptor leak [#31450]. + +------------------------------------------------------------------- +Mon Sep 15 14:04:25 CEST 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 5 21:30:06 CEST 2003 - mls@suse.de + +- fix rpmalMakeIndex and off by one error in rpmalAllSatisfiesDepend + +------------------------------------------------------------------- +Fri Sep 5 20:02:36 CEST 2003 - mls@suse.de + +- use mkstemp in build.c +- fix --noghost query option + +------------------------------------------------------------------- +Fri Sep 5 13:42:54 CEST 2003 - mls@suse.de + +- escape '+' in MIRE_DEFAULT iterator +- use MIRE_STRCMP when going for an exact match +- update rpmrc + +------------------------------------------------------------------- +Wed Sep 3 14:16:15 CEST 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 1 21:43:09 CEST 2003 - schwab@suse.de + +- Fix assembler routines to not clobber predicate registers. + +------------------------------------------------------------------- +Fri Aug 29 18:19:31 CEST 2003 - mcihar@suse.cz + +- rpm-python require same python version as it was built with + +------------------------------------------------------------------- +Fri Aug 22 17:58:40 CEST 2003 - mls@suse.de + +- make usage of / in post section consistent +- don't force the activation of rpmconfigcheck + +------------------------------------------------------------------- +Tue Aug 5 15:06:37 CEST 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 1 14:59:50 CEST 2003 - mls@suse.de + +- fix segfault in rpmdbFindByFile + +------------------------------------------------------------------- +Thu Jul 31 14:46:14 CEST 2003 - mls@suse.de + +- added directory tagging to speed up installation/updates + +------------------------------------------------------------------- +Tue Jul 29 12:33:50 CEST 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 15:04:35 CEST 2003 - mls@suse.de + +- add perl_vendorlib and perl_vendorarch +- integrate patches + +------------------------------------------------------------------- +Tue Jul 1 16:28:42 CEST 2003 - coolo@suse.de + +- update find-debuginfo.sh to fix permissions of copied files +- give warning on already stripped files + +------------------------------------------------------------------- +Fri Jun 27 15:55:19 CEST 2003 - schwab@suse.de + +- Fix configure scripts. +- Don't link rpm statically. + +------------------------------------------------------------------- +Fri Jun 20 11:13:46 CEST 2003 - kukuk@suse.de + +- use -fPIC, not -fpic to compile elfutils + +------------------------------------------------------------------- +Thu Jun 19 17:31:03 CEST 2003 - ro@suse.de + +- fix build (gettext and definition of mkinstalldirs) + +------------------------------------------------------------------- +Mon Jun 16 10:10:27 CEST 2003 - kukuk@suse.de + +- Don't call find on /usr/share/locale if directory does not exist. + +------------------------------------------------------------------- +Sat Jun 14 16:44:43 CEST 2003 - coolo@suse.de + +- avoid stale links in /usr/src/debug + +------------------------------------------------------------------- +Fri Jun 13 14:35:08 CEST 2003 - mls@suse.de + +- make PreReqs work again if --nodeps is used +- fix rpmconfigcheck +- apply find-debuginfo.sh patch from coolo + +------------------------------------------------------------------- +Thu Jun 12 23:37:15 CEST 2003 - kukuk@suse.de + +- Fix find-lang.sh (special /usr/share/locale handling) + +------------------------------------------------------------------- +Thu Jun 12 11:44:14 CEST 2003 - coolo@suse.de + +- enhancing find-lang.sh to take KDE/GNOME into account and label + them correctly + +------------------------------------------------------------------- +Wed Jun 11 16:05:40 CEST 2003 - kukuk@suse.de + +- Remove translated manual pages + +------------------------------------------------------------------- +Fri Jun 6 14:02:35 CEST 2003 - mls@suse.de + +- fix vendor for s390/s390x + +------------------------------------------------------------------- +Thu Jun 5 16:13:15 CEST 2003 - mls@suse.de + +- no longer build rpm static +- add --fileclass and --filecolor macros to rpmpopt + +------------------------------------------------------------------- +Thu Jun 5 09:35:31 CEST 2003 - ro@suse.de + +- remove dangling rpmpopt symlink + +------------------------------------------------------------------- +Mon Jun 2 17:35:22 CEST 2003 - mls@suse.de + +- convertdb1: call providePackageNVR to retrofit "Provide: name = EVR" + into converted headers + +------------------------------------------------------------------- +Fri May 23 15:53:38 CEST 2003 - ro@suse.de + +- fixed brp-compress to convert bzip2 man pages into gziped ones + (even if hardlinked). (#21121) (from ma) + +------------------------------------------------------------------- +Fri May 16 15:19:39 CEST 2003 - mls@suse.de + +- fixed x86_64 build + +------------------------------------------------------------------- +Thu May 15 12:38:07 CEST 2003 - mls@suse.de + +- update to rpm-4.1.1 + +------------------------------------------------------------------- +Tue May 13 19:18:34 CEST 2003 - mls@suse.de + +- don't obsolete own package when refreshing +- fix parsing of nested conditionals (again) + +------------------------------------------------------------------- +Tue May 13 12:10:35 CEST 2003 - mls@suse.de + +- created rpm-python subpackage +- fix check-files/fixowner, second try + +------------------------------------------------------------------- +Mon May 12 17:53:23 CEST 2003 - mls@suse.de + +- fix check-files to work without buildroot + +------------------------------------------------------------------- +Mon May 12 17:36:03 CEST 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 8 21:27:03 CEST 2003 - mls@suse.de + +- update to rpm-4.1 + +------------------------------------------------------------------- +Mon Apr 7 12:36:55 CEST 2003 - ro@suse.de + +- fix for new head(1) syntax + +------------------------------------------------------------------- +Mon Mar 10 10:55:29 CET 2003 - mls@suse.de + +- fix exit status if file to be installed is not a rpm package + +------------------------------------------------------------------- +Fri Feb 28 14:29:31 CET 2003 - mls@suse.de + +- use mkstemp instead of tempnam (#24478) + +------------------------------------------------------------------- +Thu Feb 20 13:33:41 CET 2003 - ma@suse.de + +- Work arround rpm2cpio wrongly reporting an error, if the rpm file + is read from stdin. (#16800) + +------------------------------------------------------------------- +Mon Feb 17 17:53:09 CET 2003 - mls@suse.de + +- made rpmconfigcheck add new files to /var/log/update-messages + +------------------------------------------------------------------- +Fri Feb 14 17:45:22 CET 2003 - schwab@suse.de + +- Save errno inside Fclose, its return value is never checked anyway. + +------------------------------------------------------------------- +Fri Feb 14 16:14:16 CET 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 13:35:04 CET 2003 - mls@suse.de + +- removed runlevels '1' and 'S' from rpmconfigcheck + +------------------------------------------------------------------- +Fri Feb 7 18:18:27 CET 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 15:44:04 CET 2003 - kukuk@suse.de + +- Remove wrong Provides "rpm-devel" and "rpm-python" from Provides + +------------------------------------------------------------------- +Sun Jan 26 21:22:09 CET 2003 - olh@suse.de + +- the official arch_canon value for ppc64 is 16, not 5 + +------------------------------------------------------------------- +Thu Jan 16 19:45:43 CET 2003 - ma@suse.de + +- update subpackage popt to 1.6.4 + +------------------------------------------------------------------- +Thu Dec 19 22:50:22 CET 2002 - schwab@suse.de + +- Update autogen patch. + +------------------------------------------------------------------- +Mon Nov 18 18:43:38 CET 2002 - stepan@suse.de + +- add m68k as chanonical architecture to configure.in + +------------------------------------------------------------------- +Mon Nov 18 17:01:03 CET 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 16:34:57 CET 2002 - ma@suse.de + +- let linux.prov list vrsion definitions in libraries/plugins without + soname. (find_provides.diff) (#21664) + +------------------------------------------------------------------- +Fri Oct 25 14:58:24 CEST 2002 - sf@suse.de + +- corrected %_libdir-macro (rpm-3.0.6-platform.diff) + +------------------------------------------------------------------- +Mon Oct 21 10:47:49 CEST 2002 - schwab@suse.de + +- Fix read beyond EOS. + +------------------------------------------------------------------- +Mon Oct 7 17:15:16 CEST 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 2 15:29:39 MEST 2002 - mls@suse.de + +- update unpatched files in patchrpms even if --nodeps is used + [Bug #20418] + +------------------------------------------------------------------- +Sat Aug 24 11:37:29 CEST 2002 - ro@suse.de + +- fix popt-devel requires + +------------------------------------------------------------------- +Sun Aug 18 10:19:51 CEST 2002 - olh@suse.de + +- adding -mminimal-toc to each package is a boring job + use it per default on ppc64 + +------------------------------------------------------------------- +Thu Aug 15 18:37:43 CEST 2002 - kukuk@suse.de + +- Add insserv PreRequires [Bug #17969] + +------------------------------------------------------------------- +Mon Aug 12 20:09:36 MEST 2002 - bk@suse.de + +- rpmrc/s390{,x}: change dummy -fomit-frame-pointer to -fsigned-char + +------------------------------------------------------------------- +Sat Aug 10 21:28:27 CEST 2002 - schwab@suse.de + +- Make ia64 arch_compat to i686. + +------------------------------------------------------------------- +Sat Aug 10 11:56:34 CEST 2002 - kukuk@suse.de + +- Fix version number of popt-devel + +------------------------------------------------------------------- +Fri Aug 9 21:15:53 CEST 2002 - kukuk@suse.de + +- Fix typo + +------------------------------------------------------------------- +Fri Aug 9 15:11:24 CEST 2002 - kukuk@suse.de + +- Fix requires of rpm-devel and popt-devel + +------------------------------------------------------------------- +Fri Aug 9 00:17:53 CEST 2002 - ro@suse.de + +- adapt automake version in configure + +------------------------------------------------------------------- +Fri Jul 26 12:38:39 CEST 2002 - mls@suse.de + +- Added perl/python macros from conectiva + +------------------------------------------------------------------- +Fri Jul 26 09:53:41 CEST 2002 - kukuk@suse.de + +- Create rpm-devel and popt-devel subpackages [Bug #17225] + +------------------------------------------------------------------- +Fri Jul 26 09:45:31 CEST 2002 - kukuk@suse.de + +- Change Requires for suse-build-key to build-key + +------------------------------------------------------------------- +Wed Jul 25 12:13:17 MEST 2002 - mls@suse.de + +- renamed rpmconfigscan to rpmconfigcheck +- fixed elf64-linux.req to ignore scripts without #! +- disabled tag check in rpmdbFindByFile, too dangerous + +------------------------------------------------------------------- +Tue Jul 18 12:05:55 MEST 2002 - mls@suse.de + +- fixed double free of header if the postinstall script failed +- return exit status when doing --initdb + +------------------------------------------------------------------- +Thu Jul 11 12:03:35 MEST 2002 - mls@suse.de + +- use "officially reserved" value of RPMFILE_UNPATCHED +- added rpmconfigcheck script to search for unresolved config + file changes + +------------------------------------------------------------------- +Mon Jul 8 14:01:31 MEST 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 2 16:36:05 CEST 2002 - ke@suse.de + +- Update German program messages using translations by Christian + Kirsch. Add as Source7; drop Patch19 [# 8442]. + +------------------------------------------------------------------- +Fri Jun 21 00:03:09 CEST 2002 - ro@suse.de + +- automake is 1.6.2 + +------------------------------------------------------------------- +Wed Jun 12 11:31:55 CEST 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 17:33:48 CEST 2002 - olh@suse.de + +- remove ppc64 hack + +------------------------------------------------------------------- +Mon May 27 14:58:27 CEST 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 18:25:34 CEST 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 14:15:41 CEST 2002 - ro@suse.de + +- update brp-x86_64-linux + +------------------------------------------------------------------- +Wed May 15 12:53:29 CEST 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 09:33:34 CEST 2002 - olh@suse.de + +- do not translate ppc64 to ppc anymore + +------------------------------------------------------------------- +Fri Apr 26 16:58:57 CEST 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 16:01:11 CEST 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 14:47:42 CEST 2002 - ke@suse.de + +- patch19: Fix 1 german message (3 strings) in de.po [# 8442]. + +------------------------------------------------------------------- +Mon Apr 22 12:26:12 CEST 2002 - kukuk@suse.de + +- Remove broken s390x try to fix lib64 library location + +------------------------------------------------------------------- +Thu Apr 18 08:22:22 CEST 2002 - kukuk@suse.de + +- x86_64 can also build noarch packages + +------------------------------------------------------------------- +Wed Apr 17 17:37:36 CEST 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 14:25:16 CEST 2002 - kukuk@suse.de + +- Don't apply s390x 64bit hacks on sparc64, sparc64 has a working + libtool + +------------------------------------------------------------------- +Thu Apr 11 15:40:54 MEST 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 18:22:23 CEST 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 18:20:59 CET 2002 - schwab@suse.de + +- Fix for new autotools. + +------------------------------------------------------------------- +Fri Mar 22 20:23:59 MET 2002 - mls@suse.de + +- added rpmqpack program to speed up susehelp + +------------------------------------------------------------------- +Wed Mar 20 00:16:36 CET 2002 - ro@suse.de + +- modified config.diff for currently used optflags (#15123) + +------------------------------------------------------------------- +Mon Mar 18 17:08:16 CET 2002 - schwab@suse.de + +- Don't lose errno. + +------------------------------------------------------------------- +Mon Mar 11 21:55:51 CET 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 + +------------------------------------------------------------------- +Fri Mar 9 20:12:44 CET 2002 - bk@suse.de + +- brp-s390x-linux: merge lib64 fix: patch .la files when moving + +------------------------------------------------------------------- +Fri Mar 8 16:20:51 CET 2002 - ma@suse.de + +- introduced x86_64 architecture in rpmrc (#14110) + +------------------------------------------------------------------- +Fri Mar 8 12:55:17 MET 2002 - mls@suse.de + +- backported rpm4 fix to get mtime right on s390x + +------------------------------------------------------------------- +Mon Feb 25 18:34:20 MET 2002 - mls@suse.de + +- added patchrpm support +- changed rpm -qi to include the distribution + +------------------------------------------------------------------- +Thu Feb 21 10:54:54 CET 2002 - schwab@suse.de + +- Fix to build with new gettext. + +------------------------------------------------------------------- +Mon Feb 18 18:10:49 CET 2002 - ro@suse.de + +- added requires for suse-build-key + +------------------------------------------------------------------- +Mon Feb 11 23:22:33 CET 2002 - ro@suse.de + +- tar option for bz2 is now "j" (re-added) + +------------------------------------------------------------------- +Mon Feb 11 22:16:33 CET 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 11:37:18 CET 2002 - ro@suse.de + +- apply configure-diff also on s390x + +------------------------------------------------------------------- +Mon Jan 21 22:34:19 CET 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 17:08:04 CET 2002 - schwab@suse.de + +- Fix parsing of nested conditionals. + +------------------------------------------------------------------- +Wed Jan 2 13:42:58 CET 2002 - schwab@suse.de + +- Remove wrong assertion. + +------------------------------------------------------------------- +Tue Dec 18 17:39:22 CET 2001 - adrian@suse.de + +- fix find-requires for objdump with private flags finaly + +------------------------------------------------------------------- +Mon Dec 17 16:27:14 CET 2001 - adrian@suse.de + +- apply mips patch only on mips architecture +- fix mips patch + +------------------------------------------------------------------- +Sun Dec 16 19:52:32 UTC 2001 - adrian@suse.de + +- fix find-requires script for mips + ( do not include private flags from objdump to dependencies ) + +------------------------------------------------------------------- +Wed Dec 5 16:59:42 CET 2001 - schwab@suse.de + +- Use optind = 0 to reset getopt in glibc. + +------------------------------------------------------------------- +Mon Dec 3 12:06:20 CET 2001 - schwab@suse.de + +- Fix another endian bug due to pointer mismatch. + +------------------------------------------------------------------- +Thu Nov 22 18:53:31 MET 2001 - mls@suse.de + +- reset getopt in grabArgs() macro expansion + +------------------------------------------------------------------- +Thu Nov 15 17:50:07 CET 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 8 13:42:24 CET 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 3 00:50:01 CET 2001 - ro@suse.de + +- accept automake 1.5 (still needs depcomp added) + +------------------------------------------------------------------- +Tue Sep 4 11:53:10 CEST 2001 - schwab@suse.de + +- Accept libtool 1.4.1. + +------------------------------------------------------------------- +Fri Aug 17 18:11:03 CEST 2001 - ro@suse.de + +- Exclude /usr/share/doc from Requires + +------------------------------------------------------------------- +Sat Jul 21 20:56:34 CEST 2001 - schwab@suse.de + +- Adapt for autoconf 2.52. +- Allow libtool version suffix. + +------------------------------------------------------------------- +Tue Jul 3 09:46:09 CEST 2001 - kukuk@suse.de + +- Fix typo in last change + +------------------------------------------------------------------- +Mon Jul 2 13:45:06 CEST 2001 - ma@suse.de + +- Change -m486 to -mcpu=i486 in optflags + +------------------------------------------------------------------- +Wed Jun 20 12:33:32 CEST 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 15:42:07 UTC 2001 - bk@suse.de + +- rpm-3.0.6.config.diff: add s390x support + +------------------------------------------------------------------- +Mon Jun 11 19:23:54 CEST 2001 - olh@suse.de + +- add ppc64 diff + +------------------------------------------------------------------- +Fri Jun 8 14:23:22 CEST 2001 - schwab@suse.de + +- Fix endian bugs. + +------------------------------------------------------------------- +Mon Jun 4 20:34:34 CEST 2001 - kukuk@suse.de + +- Fix requires/provides scripts for sparc64 + +------------------------------------------------------------------- +Fri Jun 1 16:53:54 CEST 2001 - schwab@suse.de + +- Fix for new configure tools. + +------------------------------------------------------------------- +Wed May 9 18:21:15 CEST 2001 - mfabian@suse.de + +- bzip2 sources + +------------------------------------------------------------------- +Thu May 3 12:57:56 CEST 2001 - ma@suse.de + +- provides script shouldn't block soname as version + +------------------------------------------------------------------- +Tue May 1 20:01:52 CEST 2001 - kukuk@suse.de + +- modify spec file for sparc64 + +------------------------------------------------------------------- +Thu Apr 12 16:46:53 CEST 2001 - ro@suse.de + +- gettextize to compile with new gettext + +------------------------------------------------------------------- +Fri Apr 6 18:33:29 CEST 2001 - kukuk@suse.de + +- Make some changes to the changes entries so rpm likes it again + +------------------------------------------------------------------- +Thu Mar 29 01:13:14 CEST 2001 - ro@suse.de + +- provides/requires script: add "-n200" to xargs arguments + +------------------------------------------------------------------- +Mon Feb 26 00:50:46 CET 2001 - ro@suse.de + +- no optimization for alpha for now ... + +------------------------------------------------------------------- +Wed Feb 14 11:23:56 CET 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 6 01:25:45 CET 2001 - ro@suse.de + +- popt: include float.h to make it compile + +------------------------------------------------------------------- +Wed Jan 17 12:10:47 CET 2001 - schwab@suse.de + +- Mark ia64 as compatible to i386. + +------------------------------------------------------------------- +Mon Jan 8 16:16:05 CET 2001 - ma@suse.de + +- fixed previous fix (error occuring outside %doc was lost) + +------------------------------------------------------------------- +Sat Jan 6 14:44:54 CET 2001 - ma@suse.de + +- fixed rpm does not abort build if %doc file is missing (#503) + +------------------------------------------------------------------- +Mon Nov 27 15:43:35 CET 2000 - ma@suse.de + +- wrongly free() after alloca() fixed + +------------------------------------------------------------------- +Thu Nov 23 14:19:47 CET 2000 - bk@suse.de + +- removed old s390 hack(not needed-breaks with new rpm and glibc) + +------------------------------------------------------------------- +Tue Nov 14 10:00:43 CET 2000 - ro@suse.de + +- added patch not to strip all shared libs and + files with "/lib/modules/" in path + +------------------------------------------------------------------- +Fri Nov 3 12:49:11 CET 2000 - ma@suse.de + +- let 'rpm -e --root ..' remove files/dirs chroot. + +------------------------------------------------------------------- +Wed Oct 25 12:26:36 CEST 2000 - ma@suse.de + +- update subpackage popt to 1.6 + +------------------------------------------------------------------- +Tue Oct 17 21:40:00 CEST 2000 - ma@suse.de + +- fixed missing libpopt.so in popt subpackage + +------------------------------------------------------------------- +Fri Oct 6 17:30:16 CEST 2000 - ma@suse.de + +- update to 3.0.6 + +------------------------------------------------------------------- +Fri Sep 29 17:00:17 CEST 2000 - schwab@suse.de + +- Fix last change to stay compatible with glibc < 2.2. + +------------------------------------------------------------------- +Fri Sep 29 12:18:13 CEST 2000 - schwab@suse.de + +- Fix libio cookie function pointer clash in rpmio. + +------------------------------------------------------------------- +Fri Jul 28 17:08:04 CEST 2000 - ma@suse.de + +- update to 3.0.5 (handles RPM v4 packages) +- ia64/s309 patches incorporated + +------------------------------------------------------------------- +Wed Jul 26 16:29:12 CEST 2000 - ma@suse.de + +- ignore chown() errors eg. if files are installed on a DOS partition + +------------------------------------------------------------------- +Fri Jul 14 11:32:06 CEST 2000 - ma@suse.de + +- fixed: ignore dependencies below /usr/share/doc. +- rpmrc: synced s390 entries with those in rpm-4.0. + +------------------------------------------------------------------- +Mon Jun 26 02:17:57 CEST 2000 - bk@suse.de + +- build static on s390 too. + +------------------------------------------------------------------- +Fri May 26 18:13:56 CEST 2000 - schwab@suse.de + +- For for new libbz2 API. + +------------------------------------------------------------------- +Thu May 18 17:13:47 CEST 2000 - kasal@suse.de + +- hope now rpm-3.0.4-macro-grabArgs.patch works + +------------------------------------------------------------------- +Wed May 17 18:09:32 MEST 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 10:35:49 CEST 2000 - kasal@suse.cz + +- fixed the bug with {?suse_update_config:%{suse_update_config -f}} + +------------------------------------------------------------------- +Fri May 12 14:52:40 CEST 2000 - schwab@suse.de + +- Make ia64 compatible with noarch. + +------------------------------------------------------------------- +Wed Apr 26 18:29:57 CEST 2000 - ma@suse.de + +- updated 3.0.4, removed obsolete patches, builds on + libc5 + +------------------------------------------------------------------- +Fri Apr 14 18:00:30 CEST 2000 - ma@suse.de + +- Update for RPM-HOWTO +- Fix in config.diff (use Makefile.am not Makefile.in) + +------------------------------------------------------------------- +Mon Apr 10 11:09:05 CEST 2000 - schwab@suse.de + +- Fix config patch. + +------------------------------------------------------------------- +Thu Apr 6 22:54:19 CEST 2000 - bk@suse.de + +- added /lib/libpopt.so* to filelist on s390 + +------------------------------------------------------------------- +Wed Apr 5 00:36:56 CEST 2000 - bk@suse.de + +- uses autoconf and automake now +- added /lib/libbz2.so* and /lib/libz.so* to filelist on s390 + +------------------------------------------------------------------- +Sat Apr 1 23:20:17 GMT 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 16:15:48 CEST 2000 - ma@suse.de + +- rpm.spec: avoid macro usage in 'Version:' entry + +------------------------------------------------------------------- +Thu Mar 2 16:23:41 CET 2000 - schwab@suse.de + +- Fix md5 for ia64. + +------------------------------------------------------------------- +Mon Feb 28 18:06:21 CET 2000 - ma@suse.de + +- remove 'libNoVersion' in find-requires + +------------------------------------------------------------------- +Wed Feb 23 21:28:01 CET 2000 - schwab@suse.de + +- recognize ia64 as architecture. + +------------------------------------------------------------------- +Mon Feb 7 17:07:57 CET 2000 - ma@suse.de + +- rebuilddb fix +- set info/mandir macros to /usr/share/... + +------------------------------------------------------------------- +Wed Feb 2 18:31:11 CET 2000 - ma@suse.de + +- update to 3.0.4 (popt-1.5) +- new subpackage: popt + +------------------------------------------------------------------- +Sat Nov 13 13:08:53 MET 1999 - kukuk@suse.de + +- Add sparc64 directory +- Fix installation into RPM_BUILD_ROOT directory + +------------------------------------------------------------------- +Mon Nov 8 19:58:14 MET 1999 - kukuk@suse.de + +- add directory /usr/src/packages/RPMS/sparc + +------------------------------------------------------------------- +Thu Nov 4 16:55:45 CET 1999 - bs@suse.de + +- fixed bug in find-requires regarding pseudo scripts + starting with "#! --" + +------------------------------------------------------------------- +Thu Oct 28 16:11:46 CEST 1999 - bs@suse.de + +- added directories /usr/src/packages/RPMS/{ppc,noarch} + +------------------------------------------------------------------- +Wed Oct 27 13:30:41 MEST 1999 - ma@suse.de + +- place suse_macrofile in source/binary package +- don't check reqires below /usr/doc/ + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Thu Sep 9 12:15:28 CEST 1999 - bs@suse.de + +- fixed call of Check at the end of %install section + +------------------------------------------------------------------- +Mon Jul 19 16:00:50 MEST 1999 - ma@suse.de + +- again rebuilddb.patch + +------------------------------------------------------------------- +Wed Jul 14 14:30:15 MEST 1999 - ro@suse.de + +- update to 3.0.3 + +------------------------------------------------------------------- +Mon Jun 28 00:05:14 MEST 1999 - ro@suse.de + +- changed macros.in for libc5 : no "h" parameter for chown,chmod + +------------------------------------------------------------------- +Fri Jun 25 01:00:19 MEST 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 20:22:48 MEST 1999 - ma@suse.de + +- fixed bug when --rebuilddb and --root where used + at the same time. + +------------------------------------------------------------------- +Wed May 26 11:43:53 MEST 1999 - ro@suse.de + +- update to 3.0.1 + +------------------------------------------------------------------- +Mon Apr 26 20:38:17 CEST 1999 - werner@suse.de + +- Speed up find-requires for linux + +------------------------------------------------------------------- +Mon Apr 26 18:00:01 MEST 1999 - ro@suse.de + +- update to 3.0 (noreplace fix has been incorporated) + +------------------------------------------------------------------- +Mon Apr 12 15:34:40 MEST 1999 - ro@suse.de + +- update to 2.93 + +------------------------------------------------------------------- +Fri Mar 19 00:46:37 MET 1999 - ro@suse.de + +- update to 2.92 + +------------------------------------------------------------------- +Thu Mar 18 02:03:59 MET 1999 - ro@suse.de + +- respect movement of libz to usr/lib + +------------------------------------------------------------------- +Sun Feb 28 11:07:27 MET 1999 - ro@suse.de + +- update to rpm-src from 99/02/25 + +------------------------------------------------------------------- +Sat Feb 27 11:56:52 MET 1999 - ro@suse.de + +- install both dirs RPM/i386 and RPM/alpha (since buildarch doesn't + seem to be defined now ?) + +------------------------------------------------------------------- +Tue Feb 23 11:49:52 MET 1999 - ro@suse.de + +- adapted macros file to SuSE +- fixed segfault when not using BuildRoot + +------------------------------------------------------------------- +Tue Feb 23 10:12:29 MET 1999 - ro@suse.de + +- modified diff-style +- use additional parameter "-h" on chown after unpacking in build + +------------------------------------------------------------------- +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 +- fixed in 2.5.5: find-requires/provides bug +- fixed in 2.5.5: rebuilddb + +------------------------------------------------------------------- +Wed Nov 18 21:49:22 MET 1998 - ma@suse.de + +- link rpm.dyn dynamic against libc only + +------------------------------------------------------------------- +Mon Nov 16 18:17:53 MET 1998 - ma@suse.de + +- shared binary (/usr/lib/rpm/rpm.dyn) added + +------------------------------------------------------------------- +Tue Nov 10 10:09:40 MET 1998 - ro@suse.de + +- fixed find-requires (linux.req) + +------------------------------------------------------------------- +Mon Nov 9 12:29:39 MET 1998 - ro@suse.de + +- added %post: do rpm --initdb if triggerindex.rpm doesn't exist +- do chown root.root for RPM-HOWTO + +------------------------------------------------------------------- +Thu Nov 5 18:41:54 MET 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 3 17:07:32 MET 1998 - ro@suse.de + +- disabled glibc-patch for build in glibc-2.0 + +------------------------------------------------------------------- +Sun Sep 20 17:35:29 MEST 1998 - ro@suse.de + +- use libdb185.a for rpm in glibc system + +------------------------------------------------------------------- +Thu Sep 3 18:50:06 MEST 1998 - ma@suse.de + +- glibc patches + +------------------------------------------------------------------- +Thu Feb 5 15:27:26 MET 1998 - ro@suse.de + +- update to 2.4.12 + +------------------------------------------------------------------- +Tue Dec 9 15:07:10 MET 1997 - bs@suse.de + +- skip *.SuSE-dynamic in find-requires + +------------------------------------------------------------------- +Wed Nov 12 16:15:46 MET 1997 - ma@suse.de + +- new version 2.4.10 + +------------------------------------------------------------------- +Sat Nov 8 16:51:29 MET 1997 - ma@suse.de + +- patch: rpmdbFindByFile() didn't work for "/". Thus "/" wasn't + handled correctly in querries and upon updates ("rmdir /"). + +------------------------------------------------------------------- +Mon Oct 27 15:29:41 MET 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 7 17:46:48 MEST 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 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 +- documentation (ascii,html) in usr/doc/packages/rpm + diff --git a/rpm.spec b/rpm.spec new file mode 100644 index 0000000..c32da45 --- /dev/null +++ b/rpm.spec @@ -0,0 +1,1335 @@ +# +# spec file for package rpm (Version 4.4.2) +# +# 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. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +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: 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: 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: 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 +# + +%description +RPM Package Manager is the main tool for managing the software packages +of the SuSE Linux distribution. + +RPM can be used to install and remove software packages. With rpm, it +is easy to update packages. RPM keeps track of all these manipulations +in a central database. This way it is possible to get an overview of +all installed packages. RPM also supports database queries. + + + +Authors: +-------- + Erik Troan + Marc Ewing + +%package devel +Summary: Include Files and Libraries mandatory for Development. +License: GNU General Public License (GPL) +Group: System/Packages +Requires: rpm = %{version} +Requires: popt-devel + +%description devel +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 + Marc Ewing + +%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 +# 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 -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 -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 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 +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 +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" +%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 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 %{?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 +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 +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 -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@@" > $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 +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 + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +%{fillup_only -an services} +%run_permissions +test -f var/lib/rpm/Packages || rpm --initdb +if test -s var/lib/rpm/packages.rpm ; then + echo "converting rpm-3 database to rpm-4 format..." + usr/lib/rpm/convertdb1 var/lib/rpm/packages.rpm + 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 + +%postun +%{insserv_cleanup} + +%verifyscript +%verify_permissions -f /usr/lib/rpm/permlist + +%files +%defattr(-,root,root) +%doc RPM-PGP-KEY RPM-GPG-KEY CHANGES COPYING GROUPS +%doc doc/manual +%doc RPM-HOWTO RPM-Tips RPM-Changes + /etc/rpm + /bin/rpm + /usr/bin/* + /etc/init.d/rpmconfigcheck + /usr/sbin/rcrpmconfigcheck + /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 +%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/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 +%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 +# + +%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 new file mode 100644 index 0000000..c7a1267 --- /dev/null +++ b/rpmconfigcheck @@ -0,0 +1,76 @@ +#! /bin/bash +# Copyright (c) 2002 SuSE GmbH Nuernberg, Germany. +# +# Author: Michael Schroeder +# +# /etc/init.d/rpmconfigcheck +# /usr/sbin/rcrpmconfigcheck +# +# Script to scan for unresolved .rpmnew, .rpmorig, and .rpmsave files +# +### BEGIN INIT INFO +# Provides: rpmconfigcheck +# Required-Start: $remote_fs +# Required-Stop: +# Default-Start: 2 3 5 +# Default-Stop: +# Description: rpm config file scan +### END INIT INFO + +. /etc/rc.status + +# First reset status of this service +rc_reset + +configcheckfile=/var/adm/rpmconfigcheck +packages=/var/lib/rpm/Packages + +test -z "$1" && set start + +case "$1" in + start|restart|try-restart|reload|force-reload) + if test -s $packages -a \( ! -e $configcheckfile -o -s $configcheckfile -o ! $packages -ot $configcheckfile \) ; then + echo -n "Searching for unresolved configuration files" + if test ! -e $configcheckfile -o ! $packages -ot $configcheckfile ; then + test -e $configcheckfile && mv -f $configcheckfile $configcheckfile.old + rpm -qalc | sort | perl -lne '-e "$_.rpmnew" and print "$_.rpmnew"; -e "$_.rpmorig" and print "$_.rpmorig"; -e "$_.rpmsave" and print "$_.rpmsave"' > $configcheckfile + else + mv -f $configcheckfile $configcheckfile.old + while read l; do + test -e $l && echo $l + done < $configcheckfile.old > $configcheckfile + true + fi + rc_status -v + if test -s $configcheckfile; then + echo "Please check the following files (see /var/adm/rpmconfigcheck):" + sed -e 's/^/ /' < $configcheckfile + touch $configcheckfile.old + cat $configcheckfile $configcheckfile.old | sort | uniq -d > $configcheckfile.dup + cat $configcheckfile $configcheckfile.dup | sort | uniq -u > $configcheckfile.new + if test -s $configcheckfile.new ; then + ( + echo "----------------------------------------------------------------------" + echo "----------------------------------------------------------------------" + echo "rpmconfigcheck" + date + echo "----------------------------------------" + echo "This is a warning message." + echo "rpmconfigcheck has found the following new unresolved config files" + echo "(all files are listed in /var/adm/rpmconfigcheck):" + cat $configcheckfile.new + echo "----------------------------------------" + ) >> /var/log/update-messages + fi + fi + rm -f $configcheckfile.old $configcheckfile.dup $configcheckfile.new + fi + ;; + stop|status) + ;; + *) + echo "Usage: $0 {start}" + exit 1 + ;; +esac +rc_exit diff --git a/rpmpopt.diff b/rpmpopt.diff new file mode 100644 index 0000000..6f88a93 --- /dev/null +++ b/rpmpopt.diff @@ -0,0 +1,89 @@ +Index: rpmpopt.in +=================================================================== +--- rpmpopt.in.orig ++++ rpmpopt.in +@@ -86,7 +86,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)" + + 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 new file mode 100644 index 0000000..3013c3a --- /dev/null +++ b/rpmqpack.diff @@ -0,0 +1,136 @@ +Provide rpmqpack, a fast way to list all installed packages are +check if some package is installed. This is a hack. + +--- Makefile.am ++++ Makefile.am +@@ -48,7 +48,7 @@ + bin_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@ + ++rpmqpack_SOURCES = rpmqpack.c ++rpmqpack_LDFLAGS = $(myLDFLAGS) ++rpmqpack_LDADD = $(top_builddir)/rpmdb/librpmdb.la \ ++ $(top_builddir)/rpmio/librpmio.la \ ++ $(top_builddir)/popt/libpopt.la ++ + $(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@ + + .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 @@ + + 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 ++rpmqpack \- check for installed rpm packages ++ ++.SH SYNOPSIS ++.B rpmqpack ++.RI [ pack1 "] [" pack2 ]... ++ ++.SH DESCRIPTION ++rpmqpack checks if packages given as arguments are installed in ++the system. It prints each installed package to stdout. ++If no arguments are given all installed packages are printed. ++ ++.SH EXIT STATUS ++rpmqpack returns 0 if all given packages are installed, otherwise ++1. ++ ++.SH SEE ALSO ++.BR rpm (1) ++ ++.SH COPYRIGHT ++2002 SuSE Linux AG Nuernberg, Germany. ++ ++.SH AUTHOR ++Michael Schroeder +--- rpmqpack.c ++++ rpmqpack.c +@@ -0,0 +1,59 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++DBT key; ++DBT data; ++ ++int ++main(int argc, char **argv) ++{ ++ DB *db = 0; ++ DBC *dbc = 0; ++ int ret = 0; ++ ++ if (db_create(&db, 0, 0)) ++ { ++ perror("db_create"); ++ exit(1); ++ } ++ if (db->open(db, 0, "/var/lib/rpm/Name", 0, DB_HASH, DB_RDONLY, 0664)) ++ { ++ perror("db->open"); ++ exit(1); ++ } ++ if (argc == 1) ++ { ++ if (db->cursor(db, NULL, &dbc, 0)) ++ { ++ perror("db->cursor"); ++ exit(1); ++ } ++ while (dbc->c_get(dbc, &key, &data, DB_NEXT) == 0) ++ printf("%*.*s\n", (int)key.size, (int)key.size, (char *)key.data); ++ dbc->c_close(dbc); ++ } ++ else ++ { ++ argc--; ++ while (argc--) ++ { ++ argv++; ++ key.data = (void *)*argv; ++ key.size = strlen(*argv); ++ data.data = NULL; ++ data.size = 0; ++ if (db->get(db, 0, &key, &data, 0) == 0) ++ printf("%s\n", *argv); ++ else ++ ret = 1; ++ } ++ } ++ db->close(db, 0); ++ return ret; ++} diff --git a/rpmrc.diff b/rpmrc.diff new file mode 100644 index 0000000..399a67a --- /dev/null +++ b/rpmrc.diff @@ -0,0 +1,195 @@ +SUSE specific rpmrc changes. + +Index: rpmrc.in +=================================================================== +--- rpmrc.in.orig ++++ rpmrc.in +@@ -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 -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=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 ++optflags: x86_64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 + optflags: amd64 -O2 -g + optflags: ia32e -O2 -g + + 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 + +-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: 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 + 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 + + ############################################################# + # Canonical arch names and numbers +@@ -181,16 +182,16 @@ os_canon: MacOSX: macosx 21 + ############################################################# + # For a given uname().machine, the default build arch + +-buildarchtranslate: osfmach3_i686: i386 +-buildarchtranslate: osfmach3_i586: i386 ++buildarchtranslate: osfmach3_i686: i586 ++buildarchtranslate: osfmach3_i586: i586 + buildarchtranslate: osfmach3_i486: i386 + buildarchtranslate: osfmach3_i386: i386 + +-buildarchtranslate: athlon: i386 +-buildarchtranslate: pentium4: i386 +-buildarchtranslate: pentium3: i386 +-buildarchtranslate: i686: i386 +-buildarchtranslate: i586: i386 ++buildarchtranslate: athlon: i586 ++buildarchtranslate: pentium4: i586 ++buildarchtranslate: pentium3: i586 ++buildarchtranslate: i686: i586 ++buildarchtranslate: i586: i586 + buildarchtranslate: i486: i386 + buildarchtranslate: i386: i386 + +@@ -217,6 +218,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: parisc: hppa ++buildarchtranslate: hppa2.0: hppa ++buildarchtranslate: hppa64: hppa ++ ++buildarchtranslate: armv5l: armv4l ++buildarchtranslate: armv5tel: armv4l ++buildarchtranslate: armv5b: armv4b ++buildarchtranslate: armv5teb: armv4b ++ + ############################################################# + # Architecture compatibility + +@@ -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 +-arch_compat: hppa1.0: parisc ++arch_compat: hppa1.0: hppa ++arch_compat: hppa: parisc + arch_compat: parisc: noarch + ++arch_compat: armv5teb: armv5b ++arch_compat: armv5b: armv4b + arch_compat: armv4b: noarch ++ ++arch_compat: armv5tel: armv5l ++arch_compat: armv5l: armv4l + arch_compat: armv4l: armv3l + arch_compat: armv3l: 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 + +@@ -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 +-buildarch_compat: hppa1.0: parisc ++buildarch_compat: hppa1.0: hppa ++buildarch_compat: hppa: parisc + 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 new file mode 100644 index 0000000..d756989 --- /dev/null +++ b/rpmrctests.diff @@ -0,0 +1,112 @@ +Patch machine detection code: always use "ppc", restore SIGILL +handler, detect transmeta. [#52713] + +--- ./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 +-#if defined(__linux__) && defined(__powerpc__) +-#include +-#endif + + #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; + ++ /* 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))) { ++ sigaction(SIGILL, &oldsa, NULL); ++ return 6; /* has CX8 and CMOV */ ++ } ++ ++ sigaction(SIGILL, &oldsa, NULL); ++ + if (cpu < 6) + return cpu; + +@@ -1076,15 +1091,6 @@ static int is_pentium4() + + #endif + +-#if defined(__linux__) && defined(__powerpc__) +-static jmp_buf mfspr_jmpbuf; +- +-static void mfspr_ill(int notused) +-{ +- longjmp(mfspr_jmpbuf, -1); +-} +-#endif +- + /** + */ + static void defaultMachine(/*@out@*/ const char ** arch, +@@ -1219,6 +1225,11 @@ static void defaultMachine(/*@out@*/ con + /* big endian */ + strcpy(un.machine, "mips"); + # endif ++ /* in linux, lets rename parisc to hppa */ ++#if defined(__linux__) ++ if (!strcmp(un.machine,"parisc")) ++ strcpy(un.machine,"hppa"); ++#endif + + # 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 new file mode 100644 index 0000000..a73478b --- /dev/null +++ b/rpmsort @@ -0,0 +1,76 @@ +#! /usr/bin/perl -w + +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +# USA. + +use Getopt::Long qw(:config gnu_getopt); + +sub rpm_cmp_versions { + my ($evr1, $evr2) = @_; + + sub _rpm_cmp { + my ($s1, $s2) = @_; + + return defined $s1 <=> defined $s2 + unless defined $s1 && defined $s2; + + my ($r, $x1, $x2); + do { + $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; + $r = length $x1 <=> length $x2 || $x1 cmp $x2; + } else { + $s1 =~ s/^([a-zA-Z]*)//; $x1 = $1; + $s2 =~ s/^([a-zA-Z]*)//; $x2 = $1; + return 0 + if $x1 eq '' && $x2 eq ''; + $r = $x1 cmp $x2; + } + } until $r; + return $r; + } + + my ($e1, $v1, $r1) = $evr1 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/; + my ($e2, $v2, $r2) = $evr2 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/; + my $r = _rpm_cmp($e1 || 0, $e2 || 0); + $r = _rpm_cmp($v1, $v2) + unless $r; + $r = _rpm_cmp($r1, $r2) + unless $r; + return $r; +} + +my $reorder = sub { return @_ }; +my $key = 0; + +GetOptions ("r|reverse" => sub { $reorder = sub { return reverse @_ } }, + "k|key=i" => \$key) +or do { + print STDERR "Usage\n"; + exit 1; +}; + +if ($key == 0) { + # Sort by entire lines + map { print } &$reorder(sort { rpm_cmp_versions($a, $b) } <>); +} else { + # Sort by field $key + my @data = map { [(split)[$key-1], $_] } <>; + map { print } &$reorder(map { $_->[1] } + sort { rpm_cmp_versions($a->[0], $b->[0]) } @data); +} 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/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 new file mode 100644 index 0000000..be5188f --- /dev/null +++ b/suspendlock.diff @@ -0,0 +1,161 @@ +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. + +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); ++ + /*@-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; + } + ++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 +@@ -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) ++ /*@globals fileSystem @*/ ++ /*@modifies fileSystem @*/; ++ + /** \ingroup rpmts + * 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/symset-table b/symset-table new file mode 100644 index 0000000..e9a5f2c --- /dev/null +++ b/symset-table @@ -0,0 +1,35 @@ +#! /bin/sh + +# Create a table of all symbol sets defined in all /boot/symsets*.tar.gz +# files. +# +# Format: +# kernelrelease/modver/symbol symset symset_hash +# +# This table is needed for computing the appropriate Requires: tags for +# kernel module packages. + +tmpdir=$(mktemp -t -d ${0##*/}.XXXXXX) +trap "cd / ; rm -rf $tmpdir" EXIT +cd $tmpdir + +shopt -s nullglob +for symsets in /boot/symsets-*.tar.gz; do + zcat $symsets \ + | tar xf - +done + +for symsets in *; do + krel=${symsets#symsets-} + for symset in $symsets/*; do + class=${symset##*/} ; class=${class%.*} + hash=${symset##*.} + awk ' + BEGIN { FS = "\t" ; OFS = "\t" } + { sub(/0x0*/, "", $1) + print krel "/" $1 "/" $2, class, hash } + ' krel="$krel" class="$class" hash="$hash" $symset + done +done + +# vim:shiftwidth=4 softtabstop=4 diff --git a/sysconfig.services-rpm b/sysconfig.services-rpm new file mode 100644 index 0000000..9247c81 --- /dev/null +++ b/sysconfig.services-rpm @@ -0,0 +1,17 @@ +## Path: System/Services + +## Type: yesno +## Default: no +# +# Do you want to disable the automatic restart of services when +# a new version gets installed? +# +DISABLE_RESTART_ON_UPDATE="no" + +## Type: yesno +## Default: no +# +# Do you want to disable the automatic shutdown of services when +# the corresponding package gets erased? +# +DISABLE_STOP_ON_REMOVAL="no" diff --git a/taggedfileindex.diff b/taggedfileindex.diff new file mode 100644 index 0000000..693e28d --- /dev/null +++ b/taggedfileindex.diff @@ -0,0 +1,119 @@ +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/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 new file mode 100644 index 0000000..79ae33d --- /dev/null +++ b/waitlock.diff @@ -0,0 +1,98 @@ +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); + } + /*@=mustmod@*/ + ++static int _lockdbfd = 0; ++ + /*@-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 + + 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--; + + } + +@@ -1138,8 +1157,6 @@ static int db3open(rpmdb rpmdb, rpmTag r + prDbiOpenFlags(oflags, 0), dbi->dbi_mode); + + 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--; + } + } + } diff --git a/weakdeps.diff b/weakdeps.diff new file mode 100644 index 0000000..b5ad2b6 --- /dev/null +++ b/weakdeps.diff @@ -0,0 +1,318 @@ +Add support for weak dependencies: + +A) use RPMTAG_SUGGESTS and RPMTAG_ENHANCES to store them. + + This is different to upstream, which uses RPMSENSE_MISSINGOK + and RPMTAG_REQUIRES/RPMTAG_PROVIDES instead. I chose different + tags because I wanted to be compatible. The point is that + applications that don't know about the new MISSINGOK semantics + will mis-interpret the provides/requires otherwise, which + I deemed to risky. + +B) use RPMSENSE_STRONG to support a "strong" version, "Recommends" + instead of "Suggests" and "Supplements" instead of "Enhances". + +Needs extcond.diff for query operations. + +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 }, ++ { "hint", RPMSENSE_MISSINGOK }, ++ { "strong", RPMSENSE_STRONG }, + { NULL, 0 } + }; + +@@ -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; ++ case RPMTAG_SUGGESTSFLAGS: ++ case RPMTAG_ENHANCESFLAGS: ++ case RPMTAG_BUILDSUGGESTS: ++ case RPMTAG_BUILDENHANCES: ++ tagflags = RPMSENSE_MISSINGOK; ++ if (macro && (!strcmp(macro, "recommends") || !strcmp(macro, "buildrecommends"))) ++ tagflags |= RPMSENSE_STRONG; ++ if (macro && (!strcmp(macro, "supplements") || !strcmp(macro, "buildsupplements"))) ++ tagflags |= RPMSENSE_STRONG; ++ if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) ++ return rc; ++ break; + case RPMTAG_EXCLUDEARCH: + case RPMTAG_EXCLUSIVEARCH: + case RPMTAG_EXCLUDEOS: +@@ -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: ++ case RPMTAG_ENHANCESFLAGS: ++ h = pkg->header; ++ break; ++ case RPMTAG_BUILDSUGGESTS: ++ case RPMTAG_BUILDENHANCES: ++ 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; ++ } else if (tagN == RPMTAG_SUGGESTSFLAGS || tagN == RPMTAG_BUILDSUGGESTS) { ++ nametag = RPMTAG_SUGGESTSNAME; ++ versiontag = RPMTAG_SUGGESTSVERSION; ++ flagtag = RPMTAG_SUGGESTSFLAGS; ++ extra = Flags & _ALL_REQUIRES_MASK; ++ } else if (tagN == RPMTAG_ENHANCESFLAGS || tagN == RPMTAG_BUILDENHANCES) { ++ nametag = RPMTAG_ENHANCESNAME; ++ versiontag = RPMTAG_ENHANCESVERSION; ++ flagtag = RPMTAG_ENHANCESFLAGS; ++ extra = Flags & _ALL_REQUIRES_MASK; + } 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 }, ++ { "Enhances", { "%{?__find_enhances}", NULL, NULL, NULL }, ++ RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS, ++ RPMSENSE_STRONG, RPMSENSE_STRONG }, ++ { "Supplements", { "%{?__find_supplements}", NULL, NULL, NULL }, ++ RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS, ++ RPMSENSE_STRONG, 0 }, + { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } + }; + +@@ -1445,6 +1451,14 @@ static int rpmfcGenerateDependsHelper(co + failnonzero = 0; + tagflags = RPMSENSE_FIND_REQUIRES; + /*@switchbreak@*/ break; ++ case RPMTAG_ENHANCESFLAGS: ++ if (!pkg->autoProv) ++ continue; ++ failnonzero = 0; ++ tagflags = RPMSENSE_FIND_REQUIRES | RPMSENSE_MISSINGOK; ++ if (strcmp(dm->msg, "Supplements") == 0) ++ tagflags |= RPMSENSE_STRONG; ++ /*@switchbreak@*/ 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 | \ +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); +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 \ ++ "[%|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\ +@@ -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 } },