diff --git a/backport.diff b/backport.diff new file mode 100644 index 0000000..734f84f --- /dev/null +++ b/backport.diff @@ -0,0 +1,55 @@ +A couple of fixes picked from upstream. + +--- ./lib/rpminstall.c.orig 2010-04-08 12:35:48.000000000 +0000 ++++ ./lib/rpminstall.c 2010-04-08 12:36:00.000000000 +0000 +@@ -458,7 +458,7 @@ restart: + case URL_IS_HTTPS: + case URL_IS_HTTP: + case URL_IS_FTP: +- { char *tfn; ++ { char *tfn = NULL; + FD_t tfd; + + if (rpmIsVerbose()) +--- ./lib/transaction.c.orig 2010-04-08 12:33:22.000000000 +0000 ++++ ./lib/transaction.c 2010-04-08 12:35:00.000000000 +0000 +@@ -183,6 +183,10 @@ static void rpmtsUpdateDSI(const rpmts t + + if (fixupSize) + dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize); ++ ++ /* adjust bookkeeping when requirements shrink */ ++ if (dsi->bneeded < dsi->obneeded) dsi->obneeded = dsi->bneeded; ++ if (dsi->ineeded < dsi->oineeded) dsi->oineeded = dsi->ineeded; + } + + static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi) +@@ -231,7 +235,7 @@ static void rpmtsCheckDSIProblems(const + for (; dsi->bsize; dsi++) { + + if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) { +- if (dsi->bneeded != dsi->obneeded) { ++ if (dsi->bneeded > dsi->obneeded) { + if (!dsi->mntPoint) + rpmtsFindDSIMount(ts, dsi); + rpmpsAppend(ps, RPMPROB_DISKSPACE, +@@ -243,7 +247,7 @@ static void rpmtsCheckDSIProblems(const + } + + if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { +- if (dsi->ineeded != dsi->oineeded) { ++ if (dsi->ineeded > dsi->oineeded) { + if (!dsi->mntPoint) + rpmtsFindDSIMount(ts, dsi); + rpmpsAppend(ps, RPMPROB_DISKNODES, +--- ./lib/verify.c.orig 2010-04-08 12:36:09.000000000 +0000 ++++ ./lib/verify.c 2010-04-08 12:37:37.000000000 +0000 +@@ -348,7 +348,7 @@ static int verifyHeader(QVA_t qva, const + static const char *const aok = "."; + static const char *const unknown = "?"; + +- ec = (verifyResult != 0); ++ if (verifyResult) ec = 1; + + #define _verify(_RPMVERIFY_F, _C) \ + ((verifyResult & _RPMVERIFY_F) ? _C : aok) diff --git a/fontprovides.diff b/fontprovides.diff new file mode 100644 index 0000000..70d7537 --- /dev/null +++ b/fontprovides.diff @@ -0,0 +1,64 @@ +--- ./autodeps/linux.prov.orig 2010-04-08 14:52:42.000000000 +0000 ++++ ./autodeps/linux.prov 2010-04-08 15:04:37.000000000 +0000 +@@ -16,6 +16,8 @@ tcllist= + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) + firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/")) ++pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$')) ++fontlist=($(printf "%s\n" "${filelist[@]}" | egrep -i "/usr/share/fonts/.*\.(ttf|otf|pfa)$")) + + # + # --- Alpha does not mark 64bit dependencies +@@ -86,6 +88,16 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo + fi + + # ++# --- pkgconfig provides ++[ -x /usr/lib/rpm/pkgconfigdeps.sh -a -n "$pkgconfiglist" ] && ++ printf "%s\n" "${pkgconfiglist[@]}" | /usr/lib/rpm/pkgconfigdeps.sh -P | sort -u ++ ++# ++# --- font provides ++[ -x /usr/lib/rpm/fontconfig.prov -a -n "$fontlist" ] && ++ printf "%s\n" "${fontlist[@]}" | /usr/lib/rpm/fontconfig.prov | sort -u ++ ++# + # --- Kernel module exported symbols + [ -x /usr/lib/rpm/find-provides.ksyms ] && + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides.ksyms "$@" +--- ./autodeps/linux.req.orig 2010-04-08 15:01:18.000000000 +0000 ++++ ./autodeps/linux.req 2010-04-08 15:04:20.000000000 +0000 +@@ -35,6 +35,7 @@ perllist=() + pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) + tcllist=() + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) ++pkgconfiglist=($(printf "%s\n" "${filelist[@]}" | egrep '\.pc$')) + + # + # --- Alpha does not mark 64bit dependencies +@@ -144,6 +145,11 @@ if [ -x $MONO_PREFIX/bin/mono -a -n "$mo + fi + + # ++# --- pkgconfig requires ++[ -x /usr/lib/rpm/pkgconfigdeps.sh -a -n "$pkgconfiglist" ] && ++ printf "%s\n" "${pkgconfiglist[@]}" | /usr/lib/rpm/pkgconfigdeps.sh -R | sort -u ++ ++# + # --- Kernel module imported symbols + [ -x ${0%/*}/find-requires.ksyms ] && + printf "%s\n" "${filelist[@]}" | ${0%/*}/find-requires.ksyms "$@" +--- ./scripts/fontconfig.prov.orig 2010-04-08 14:57:21.000000000 +0000 ++++ ./scripts/fontconfig.prov 2010-04-08 14:57:42.000000000 +0000 +@@ -12,7 +12,10 @@ + + fcquery=/usr/bin/fc-query + +-[ -x $fcquery ] || exit 0 ++[ -x $fcquery ] || { ++ cat > /dev/null ++ exit 0 ++} + + # filter out anything outside main fontconfig path + grep /usr/share/fonts/ | diff --git a/pythondeps.diff b/pythondeps.diff new file mode 100644 index 0000000..6f07ea7 --- /dev/null +++ b/pythondeps.diff @@ -0,0 +1,69 @@ +--- ./autodeps/linux.prov.orig 2010-04-08 13:32:56.000000000 +0000 ++++ ./autodeps/linux.prov 2010-04-08 13:38:44.000000000 +0000 +@@ -11,7 +11,7 @@ filelist=($(printf "%s\n" "${filelist[@] + solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \ + tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \ + cut -d: -f1)) +-pythonlist= ++pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/bin/python.\..$')) + tcllist= + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + mimetypelist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(desktop)\$")) +@@ -55,8 +55,8 @@ done | sort -u + + # + # --- Python modules. +-[ -x /usr/lib/rpm/python.prov -a -n "$pythonlist" ] && +- printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.prov | sort -u ++[ -x /usr/lib/rpm/pythondeps.sh -a -n "$pythonlist" ] && ++ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/pythondeps.sh -P | sort -u + + # + # --- Tcl modules. +--- ./autodeps/linux.req.orig 2010-04-08 13:36:47.000000000 +0000 ++++ ./autodeps/linux.req 2010-04-08 13:40:25.000000000 +0000 +@@ -32,7 +32,7 @@ liblist=($(printf "%s\0" "${filelist[@]} + + interplist=() + perllist=() +-pythonlist=() ++pythonlist=($(printf "%s\n" "${filelist[@]}" | egrep '/usr/lib[^/]*/python.\..')) + tcllist=() + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)(\\.config)?\$")) + +@@ -128,8 +128,8 @@ done | sort -u + + # + # --- Python modules. +-[ -x /usr/lib/rpm/python.req -a -n "$pythonlist" ] && \ +- printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/python.req | sort -u ++[ -x /usr/lib/rpm/pythondeps.sh -a -n "$pythonlist" ] && \ ++ printf "%s\n" "${pythonlist[@]}" | /usr/lib/rpm/pythondeps.sh -R | sort -u + + # + # --- Tcl modules. +--- ./scripts/pythondeps.sh.orig 2010-04-08 13:40:34.000000000 +0000 ++++ ./scripts/pythondeps.sh 2010-04-08 13:42:19.000000000 +0000 +@@ -5,17 +5,17 @@ + exit 0 + } + +-PYVER=`python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v"` + case $1 in + -P|--provides) + shift +- grep "/usr/bin/python\*\$" >& /dev/null && echo "python(abi) = ${PYVER}" +- exit 0 ++ grep "/usr/bin/python.\..$" \ ++ | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|" + ;; + -R|--requires) + shift +- grep "/usr/lib[^/]*/python${PYVER}/" >& /dev/null && echo "python(abi) = ${PYVER}" +- exit 0 ++ grep "/usr/lib[^/]*/python.\../.*" \ ++ | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \ ++ | sort | uniq + ;; + esac + diff --git a/rpm.changes b/rpm.changes index b4e072f..d42feac 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 8 17:11:08 CEST 2010 - mls@suse.de + +- backport some fixes from upstream +- add generation of python/font/pkgconfig dependencies + ------------------------------------------------------------------- Wed Apr 7 16:59:58 CEST 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index f60f189..1abc7f7 100644 --- a/rpm.spec +++ b/rpm.spec @@ -108,6 +108,9 @@ Patch71: safeugid.diff Patch72: resetdefattr.diff Patch73: noprereqdeprec.diff Patch74: tarrecordsize.diff +Patch75: backport.diff +Patch76: pythondeps.diff +Patch77: fontprovides.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -168,7 +171,7 @@ rm -f rpmdb/db.h %patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49 %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 -%patch -P 70 -P 71 -P 72 -P 73 -P 74 +%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov