Accepting request 36638 from Base:System

Copy from Base:System/rpm based on submit request 36638 from user oertel

OBS-URL: https://build.opensuse.org/request/show/36638
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=95
This commit is contained in:
OBS User autobuild 2010-04-01 16:15:26 +00:00 committed by Git OBS Bridge
commit e109c41404
31 changed files with 1219 additions and 1171 deletions

View File

@ -1,19 +1,17 @@
Index: build/pack.c --- ./build/pack.c.orig 2010-03-25 15:18:23.000000000 +0000
=================================================================== +++ ./build/pack.c 2010-03-25 15:23:54.000000000 +0000
--- build/pack.c.orig @@ -375,7 +375,9 @@ rpmRC writeRPM(Header *hdrp, unsigned ch
+++ build/pack.c
@@ -379,7 +379,9 @@ rpmRC writeRPM(Header *hdrp, unsigned ch
const char *compr = NULL; const char *compr = NULL;
headerPutString(h, RPMTAG_PAYLOADFORMAT, "cpio"); headerPutString(h, RPMTAG_PAYLOADFORMAT, "cpio");
- if (strcmp(s+1, "gzdio") == 0) { - if (rstreq(s+1, "gzdio")) {
+ if (strcmp(s+1, "ufdio") == 0) { + if (rstreq(s+1, "ufdio")) {
+ compr = NULL; + compr = NULL;
+ } else if (strcmp(s+1, "gzdio") == 0) { + } else if (rstreq(s+1, "gzdio")) {
compr = "gzip"; compr = "gzip";
#if HAVE_BZLIB_H #if HAVE_BZLIB_H
} else if (strcmp(s+1, "bzdio") == 0) { } else if (rstreq(s+1, "bzdio")) {
@@ -402,7 +404,8 @@ rpmRC writeRPM(Header *hdrp, unsigned ch @@ -398,7 +400,8 @@ rpmRC writeRPM(Header *hdrp, unsigned ch
goto exit; goto exit;
} }

View File

@ -1,8 +1,11 @@
make brp-compress deal correctly with hardlinked man pages --- ./scripts/brp-compress.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./scripts/brp-compress 2010-03-25 15:11:29.000000000 +0000
--- ./scripts/brp-compress.orig 2004-10-17 18:49:52.000000000 +0000 @@ -1,16 +1,43 @@
+++ ./scripts/brp-compress 2005-12-15 14:03:58.000000000 +0000 -#!/bin/sh
@@ -5,12 +5,38 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD +#!/bin/bash
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
exit 0 exit 0
fi fi
@ -20,7 +23,6 @@ make brp-compress deal correctly with hardlinked man pages
+{ +{
+ dir=$1 + dir=$1
+ b=$2 + b=$2
+ type=$3
+ +
+ inode=`ls -i $b | awk '{ print $1 }'` + inode=`ls -i $b | awk '{ print $1 }'`
+ others=`find $dir -type f -inum $inode` + others=`find $dir -type f -inum $inode`
@ -28,11 +30,13 @@ make brp-compress deal correctly with hardlinked man pages
+ [ "$afile" != "$b" ] && rm -f $afile + [ "$afile" != "$b" ] && rm -f $afile
+ done + done
+ +
+ case $type in + case $b in
+ Z|gz) gunzip $b ;; + *.Z|*.gz) gunzip $b ;;
+ bz2) bunzip2 $b ;; + *.bz2) bunzip2 $b ;;
+ *.xz|*.lzma) unxz $b ;;
+ esac + esac
+ +
+ type=${b##*.}
+ for afile in $others ; do + for afile in $others ; do
+ [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type} + [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type}
+ done + done
@ -41,16 +45,16 @@ make brp-compress deal correctly with hardlinked man pages
for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \
./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \
./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \
@@ -23,9 +49,9 @@ do @@ -23,9 +50,9 @@ do
[ "`basename $f`" = "dir" ] && continue [ "`basename $f`" = "dir" ] && continue
case "$f" in case "$f" in
- *.Z) gunzip $f; b=`echo $f | sed -e 's/\.Z$//'`;; - *.gz|*.Z) gunzip $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
- *.gz) gunzip $f; b=`echo $f | sed -e 's/\.gz$//'`;; - *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
- *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; - *.xz|*.lzma) unxz $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
+ *.Z) gunzip $f || check_for_hard_link $d $f Z; b=`echo $f | sed -e 's/\.Z$//'`;; + *.gz|*.Z) gunzip $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(gz\|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; b=`echo $f | sed -e 's/\.bz2$//'`;;
+ *.bz2) bunzip2 $f || check_for_hard_link $d $f bz2; b=`echo $f | sed -e 's/\.bz2$//'`;; + *.xz|*.lzma) unxz $f || check_for_hard_link $d $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
*) b=$f;; *) b=$f;;
esac esac

View File

@ -1,25 +1,9 @@
Many changes to Makefiles/autogen and the like to make it build Many changes to Makefiles/autogen and the like to make it build
on SUSE systems. on SUSE systems.
--- --- ./configure.ac.orig 2010-03-24 16:35:40.000000000 +0000
autogen.sh | 16 +++-- +++ ./configure.ac 2010-03-25 15:16:21.000000000 +0000
build/Makefile.am | 2 @@ -1006,6 +1006,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm
configure.ac | 153 ++++++++++++++++++++++++++++++++-------------------
db3/configure | 6 +-
file/src/Makefile.am | 2
installplatform | 9 ++-
lib/Makefile.am | 2
popt/autogen.sh | 2
rpmdb/Makefile.am | 4 -
rpmio/Makefile.am | 10 +--
scripts/Makefile.am | 8 ++
11 files changed, 132 insertions(+), 82 deletions(-)
Index: configure.ac
===================================================================
--- configure.ac.orig
+++ configure.ac
@@ -1009,6 +1009,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm
mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;; mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;; mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;; m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
@ -27,7 +11,7 @@ Index: configure.ac
sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;; sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;;
sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;; sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;;
*) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;;
@@ -1019,6 +1020,7 @@ esac @@ -1016,6 +1017,7 @@ esac
RPMCANONVENDOR="$build_vendor" RPMCANONVENDOR="$build_vendor"
case "${build_vendor}" in case "${build_vendor}" in
unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse)
@ -35,7 +19,7 @@ Index: configure.ac
test -f /etc/redhat-release && RPMCANONVENDOR=redhat test -f /etc/redhat-release && RPMCANONVENDOR=redhat
test -f /etc/SuSE-release && RPMCANONVENDOR=suse test -f /etc/SuSE-release && RPMCANONVENDOR=suse
test -f /etc/pld-release && RPMCANONVENDOR=pld test -f /etc/pld-release && RPMCANONVENDOR=pld
@@ -1031,6 +1033,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec @@ -1028,6 +1030,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec
esac esac
RPMCANONOS="$host_os_noversion" RPMCANONOS="$host_os_noversion"
RPMCANONGNU="$host_os_gnu" RPMCANONGNU="$host_os_gnu"
@ -45,28 +29,23 @@ Index: configure.ac
AC_SUBST(RPMCANONCOLOR) AC_SUBST(RPMCANONCOLOR)
AC_SUBST(RPMCANONARCH) AC_SUBST(RPMCANONARCH)
AC_SUBST(RPMCANONVENDOR) AC_SUBST(RPMCANONVENDOR)
Index: db3/configure --- ./db3/configure.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./db3/configure 2010-03-25 15:17:41.000000000 +0000
--- db3/configure.orig
+++ db3/configure
@@ -10,9 +10,9 @@ rm -f config.cache @@ -10,9 +10,9 @@ rm -f config.cache
# XXX edit CFLAGS= ... out of invocation args ??? # XXX edit CFLAGS= ... out of invocation args ???
ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`" ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`"
-CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \ -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 \ +CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure \
+ --enable-shared --enable-static --enable-rpc \ --enable-shared --enable-static \
- --with-uniquename=_rpmdb --srcdir=$db_dist
+ --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS + --with-uniquename=_rpmdb --srcdir=$db_dist $ARGS
mv Makefile Makefile.orig mv Makefile Makefile.orig
cat Makefile.orig | sed -e '/^install[:-]/c\ cat Makefile.orig | sed -e '/^install[:-]/c\
Index: installplatform --- ./installplatform.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./installplatform 2010-03-25 15:16:21.000000000 +0000
--- installplatform.orig @@ -47,9 +47,9 @@ for SUBST in $SUBSTS ; do
+++ installplatform
@@ -54,9 +54,9 @@ for SUBST in $SUBSTS ; do
ARCH_INSTALL_POST='%{nil}' ARCH_INSTALL_POST='%{nil}'
case "${ARCH}-${OS}" in case "${ARCH}-${OS}" in
sparc64*-linux) LIB=lib64 ;; sparc64*-linux) LIB=lib64 ;;
@ -79,7 +58,7 @@ Index: installplatform
*) LIB=lib;; *) LIB=lib;;
esac esac
@@ -136,6 +136,9 @@ for SUBST in $SUBSTS ; do @@ -129,6 +129,9 @@ for SUBST in $SUBSTS ; do
apple) apple)
VENDORSED='-e s,^@apple@,,' VENDORSED='-e s,^@apple@,,'
;; ;;

View File

@ -1,10 +1,8 @@
Support a database-local fsync setting. Needs berkeley db patch. Support a database-local fsync setting. Needs berkeley db patch.
Index: lib/backend/db3.c --- ./lib/backend/db3.c.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./lib/backend/db3.c 2010-03-25 14:35:39.000000000 +0000
--- lib/backend/db3.c.orig @@ -62,10 +62,12 @@ static int db_fini(dbiIndex dbi, const c
+++ lib/backend/db3.c
@@ -191,10 +191,12 @@ static int db_fini(dbiIndex dbi, const c
return rc; return rc;
} }
@ -17,9 +15,9 @@ Index: lib/backend/db3.c
#if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 5) #if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 5)
/* /*
@@ -357,10 +359,12 @@ static int db_init(dbiIndex dbi, const c @@ -168,10 +170,12 @@ static int db_init(dbiIndex dbi, const c
/* dbenv->set_rep_transport(???) */ xx = cvtdberr(dbi, "dbenv->set_cachesize", xx, _debug);
/* dbenv->set_rep_limit(???) */ }
+#if 0 +#if 0
if (dbi->dbi_no_fsync) { if (dbi->dbi_no_fsync) {
@ -30,11 +28,9 @@ Index: lib/backend/db3.c
if (dbi->dbi_shmkey) { if (dbi->dbi_shmkey) {
xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey); xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey);
Index: lib/backend/dbconfig.c --- ./lib/backend/dbconfig.c.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./lib/backend/dbconfig.c 2010-03-25 14:35:39.000000000 +0000
--- lib/backend/dbconfig.c.orig @@ -72,6 +72,8 @@ static const struct poptOption rdbOption
+++ lib/backend/dbconfig.c
@@ -94,6 +94,8 @@ struct poptOption rdbOptions[] = {
NULL, NULL }, NULL, NULL },
{ "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING, { "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING,
NULL, NULL }, NULL, NULL },
@ -43,7 +39,7 @@ Index: lib/backend/dbconfig.c
{ "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE, { "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE,
NULL, NULL }, NULL, NULL },
@@ -140,8 +142,6 @@ struct poptOption rdbOptions[] = { @@ -101,8 +103,6 @@ static const struct poptOption rdbOption
NULL, NULL }, NULL, NULL },
{ "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0, { "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0,
NULL, NULL }, NULL, NULL },

View File

@ -1,7 +1,5 @@
Index: build/files.c --- ./build/files.c.orig 2010-03-25 15:18:05.000000000 +0000
=================================================================== +++ ./build/files.c 2010-03-25 15:21:26.000000000 +0000
--- build/files.c.orig
+++ build/files.c
@@ -17,6 +17,10 @@ @@ -17,6 +17,10 @@
#include <rpm/rpmfileutil.h> /* rpmDoDigest() */ #include <rpm/rpmfileutil.h> /* rpmDoDigest() */
#include <rpm/rpmlog.h> #include <rpm/rpmlog.h>
@ -13,7 +11,7 @@ Index: build/files.c
#include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */ #include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */
#include "rpmio/base64.h" #include "rpmio/base64.h"
#include "rpmio/fts.h" #include "rpmio/fts.h"
@@ -2220,12 +2224,136 @@ exit: @@ -2230,12 +2234,136 @@ exit:
return rc; return rc;
} }
@ -150,9 +148,9 @@ Index: build/files.c
genSourceRpmName(spec); genSourceRpmName(spec);
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
@@ -2238,8 +2366,109 @@ int processBinaryFiles(rpmSpec spec, int @@ -2250,8 +2378,110 @@ int processBinaryFiles(rpmSpec spec, int
(void) headerNEVRA(pkg->header, &n, NULL, &v, &r, &a); rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr);
rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s.%s\n"), n, v, r, a); free(nvr);
- if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK || - if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK ||
- (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) - (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
@ -162,6 +160,7 @@ Index: build/files.c
+ /* BEGIN DEBUGPKG */ + /* BEGIN DEBUGPKG */
+#if HAVE_GELF_H && HAVE_LIBELF +#if HAVE_GELF_H && HAVE_LIBELF
+ elf_version(EV_CURRENT); + elf_version(EV_CURRENT);
+ a = headerGetString(pkg->header, RPMTAG_ARCH);
+ if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0) + if (strcmp(a, "noarch") != 0 && strcmp(a, "src") != 0 && strcmp(a, "nosrc") != 0)
+ { + {
+ Package dbg; + Package dbg;
@ -261,11 +260,9 @@ Index: build/files.c
+ if ((rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK) + if ((rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
goto exit; goto exit;
if (strcmp(a, "noarch") == 0 && headerGetColor(pkg->header) != 0) { a = headerGetString(pkg->header, RPMTAG_ARCH);
Index: macros.in --- ./macros.in.orig 2010-03-25 15:21:20.000000000 +0000
=================================================================== +++ ./macros.in 2010-03-25 15:21:26.000000000 +0000
--- macros.in.orig
+++ macros.in
@@ -176,24 +176,10 @@ @@ -176,24 +176,10 @@
# Template for debug information sub-package. # Template for debug information sub-package.
%debug_package \ %debug_package \
@ -291,11 +288,9 @@ Index: macros.in
%description debugsource\ %description debugsource\
This package provides debug sources for package %{name}.\ This package provides debug sources for package %{name}.\
Debug sources are useful when developing applications that use this\ Debug sources are useful when developing applications that use this\
Index: scripts/find-debuginfo.sh --- ./scripts/find-debuginfo.sh.orig 2010-03-25 15:19:04.000000000 +0000
=================================================================== +++ ./scripts/find-debuginfo.sh 2010-03-25 15:21:26.000000000 +0000
--- scripts/find-debuginfo.sh.orig @@ -275,19 +275,11 @@ while read nlinks inum f; do
+++ scripts/find-debuginfo.sh
@@ -274,19 +274,11 @@ while read nlinks inum f; do
fi fi
done || exit done || exit

View File

@ -1,10 +1,8 @@
Index: build/parseSpec.c --- ./build/parseSpec.c.orig 2010-03-25 15:19:16.000000000 +0000
=================================================================== +++ ./build/parseSpec.c 2010-03-25 15:45:25.000000000 +0000
--- build/parseSpec.c.orig @@ -562,6 +562,13 @@ int parseSpec(rpmts ts, const char *spec
+++ build/parseSpec.c free(body);
@@ -569,6 +569,13 @@ int parseSpec(rpmts ts, const char *spec
} }
/* LCL: parsePart is modified @*/
+ if (spec->clean == NULL) { + if (spec->clean == NULL) {
+ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL); + char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL);

View File

@ -2,24 +2,23 @@ Make the numbers reported for diskspace problems more user
friendly. Probably a bad idea, as it changes the semantics. Instead, friendly. Probably a bad idea, as it changes the semantics. Instead,
the messages should be changed. the messages should be changed.
Index: lib/rpmts.c --- ./lib/transaction.c.orig 2010-03-25 14:37:50.000000000 +0000
=================================================================== +++ ./lib/transaction.c 2010-03-25 14:38:27.000000000 +0000
--- lib/rpmts.c.orig @@ -212,7 +212,7 @@ static void rpmtsCheckDSIProblems(const
+++ lib/rpmts.c rpmpsAppend(ps, RPMPROB_DISKSPACE,
@@ -924,14 +924,14 @@ void rpmtsCheckDSIProblems(const rpmts t
rpmpsAppend(ps, RPMPROB_DISKSPACE,
rpmteNEVRA(te), rpmteKey(te), rpmteNEVRA(te), rpmteKey(te),
ts->filesystems[i], NULL, NULL, ts->filesystems[i], NULL, NULL,
- (adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize); - (adj_fs_blocks(dsi->bneeded) - dsi->bavail) * dsi->bsize);
+ (adj_fs_blocks(dsi->bneeded)) * dsi->bsize); + (adj_fs_blocks(dsi->bneeded)) * dsi->bsize);
dsi->obneeded = dsi->bneeded;
}
} }
@@ -222,7 +222,7 @@ static void rpmtsCheckDSIProblems(const
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) { rpmpsAppend(ps, RPMPROB_DISKNODES,
rpmpsAppend(ps, RPMPROB_DISKNODES,
rpmteNEVRA(te), rpmteKey(te), rpmteNEVRA(te), rpmteKey(te),
ts->filesystems[i], NULL, NULL, ts->filesystems[i], NULL, NULL,
- (adj_fs_blocks(dsi->ineeded) - dsi->iavail)); - (adj_fs_blocks(dsi->ineeded) - dsi->iavail));
+ (adj_fs_blocks(dsi->ineeded))); + (adj_fs_blocks(dsi->ineeded)));
dsi->oineeded = dsi->ineeded;
}
} }
}
ps = rpmpsFree(ps);

View File

@ -1,22 +1,18 @@
Index: build/parsePreamble.c --- ./build/parsePreamble.c.orig 2010-03-25 14:56:24.000000000 +0000
=================================================================== +++ ./build/parsePreamble.c 2010-03-25 15:20:35.000000000 +0000
--- build/parsePreamble.c.orig @@ -312,6 +312,7 @@ static struct optionalTag {
+++ build/parsePreamble.c
@@ -311,6 +311,7 @@ static struct optionalTag {
{ RPMTAG_PACKAGER, "%{packager}" }, { RPMTAG_PACKAGER, "%{packager}" },
{ RPMTAG_DISTRIBUTION, "%{distribution}" }, { RPMTAG_DISTRIBUTION, "%{distribution}" },
{ RPMTAG_DISTURL, "%{disturl}" }, { RPMTAG_DISTURL, "%{disturl}" },
+ { RPMTAG_DISTTAG, "%{disttag}" }, + { RPMTAG_DISTTAG, "%{disttag}" },
{ RPMTAG_BUGURL, "%{bugurl}" },
{ -1, NULL } { -1, NULL }
}; };
--- ./macros.in.orig 2010-03-25 15:18:50.000000000 +0000
Index: macros.in +++ ./macros.in 2010-03-25 15:19:25.000000000 +0000
=================================================================== @@ -279,6 +279,16 @@ package or when debugging this package.\
--- macros.in.orig
+++ macros.in
@@ -276,6 +276,16 @@ package or when debugging this package.\
# #
#%disturl #%bugurl
+# Configurable distribution tag, same as Disttag: tag in a specfile. +# Configurable distribution tag, same as Disttag: tag in a specfile.
+# The tag will be used to supply reliable information to tools like +# The tag will be used to supply reliable information to tools like

View File

@ -1,14 +1,25 @@
SUSE specific kernel provides/requires scripts SUSE specific kernel provides/requires scripts
--- --- ./scripts/Makefile.am.orig 2010-03-25 16:39:30.000000000 +0000
scripts/find-provides.ksyms | 41 +++++++++++++++++++++++++++++++ +++ ./scripts/Makefile.am 2010-03-25 16:39:56.000000000 +0000
scripts/find-requires.ksyms | 57 ++++++++++++++++++++++++++++++++++++++++++++ @@ -18,6 +18,7 @@ EXTRA_DIST = \
2 files changed, 98 insertions(+) rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
tcl.req tgpg vpkg-provides.sh \
Index: scripts/find-provides.ksyms find-requires.php find-provides.php \
=================================================================== + find-requires.ksyms find-provides.ksyms \
--- /dev/null find-php-provides find-php-requires \
+++ scripts/find-provides.ksyms mono-find-requires mono-find-provides \
ocaml-find-requires.sh ocaml-find-provides.sh \
@@ -34,6 +35,7 @@ rpmconfig_SCRIPTS = \
check-buildroot check-rpaths check-rpaths-worker \
find-lang.sh \
perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \
+ find-requires.ksyms find-provides.ksyms \
mono-find-requires mono-find-provides \
pkgconfigdeps.sh libtooldeps.sh \
ocaml-find-requires.sh ocaml-find-provides.sh \
--- ./scripts/find-provides.ksyms.orig 2010-03-25 16:39:56.000000000 +0000
+++ ./scripts/find-provides.ksyms 2010-03-25 16:39:56.000000000 +0000
@@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
+#! /bin/sh +#! /bin/sh
+ +
@ -51,10 +62,8 @@ Index: scripts/find-provides.ksyms
+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p" + | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p"
+done \ +done \
+| sort -u +| sort -u
Index: scripts/find-requires.ksyms --- ./scripts/find-requires.ksyms.orig 2010-03-25 16:39:56.000000000 +0000
=================================================================== +++ ./scripts/find-requires.ksyms 2010-03-25 16:39:56.000000000 +0000
--- /dev/null
+++ scripts/find-requires.ksyms
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
+#! /bin/bash +#! /bin/bash
+ +
@ -113,23 +122,3 @@ Index: scripts/find-requires.ksyms
+ { print "ksym(" flavor ":" arr[3] ") = " arr[2] } + { print "ksym(" flavor ":" arr[3] ") = " arr[2] }
+ ' + '
+fi +fi
Index: scripts/Makefile.am
===================================================================
--- scripts/Makefile.am.orig
+++ scripts/Makefile.am
@@ -19,6 +19,7 @@ EXTRA_DIST = \
tcl.req tgpg u_pkg.sh \
vpkg-provides.sh vpkg-provides2.sh \
find-requires.php find-provides.php \
+ find-requires.ksyms find-provides.ksyms \
find-php-provides find-php-requires \
mono-find-requires mono-find-provides \
pkgconfigdeps.sh libtooldeps.sh
@@ -33,6 +34,7 @@ rpmconfig_SCRIPTS = \
check-buildroot check-rpaths check-rpaths-worker \
find-lang.sh \
perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \
+ find-requires.ksyms find-provides.ksyms \
mono-find-requires mono-find-provides \
pkgconfigdeps.sh libtooldeps.sh \
rpmdb_loadcvt rpmdiff rpm2cpio.sh tcl.req tgpg

View File

@ -1,21 +0,0 @@
Index: build/files.c
===================================================================
--- build/files.c.orig
+++ build/files.c
@@ -1742,9 +1742,13 @@ static rpmRC processPackageFiles(rpmSpec
argvSplit(&filelists, getStringBuf(pkg->fileFile), "\n");
for (fp = filelists; *fp != NULL; fp++) {
- ffn = rpmGetPath("%{_builddir}/",
- (spec->buildSubdir ? spec->buildSubdir : "") ,
- "/", *fp, NULL);
+ if (**fp == '/') {
+ ffn = rpmGetPath(*fp, NULL);
+ } else {
+ ffn = rpmGetPath("%{_builddir}/",
+ (spec->buildSubdir ? spec->buildSubdir : "") ,
+ "/", *fp, NULL);
+ }
fd = fopen(ffn, "r");
if (fd == NULL || ferror(fd)) {

View File

@ -1,13 +0,0 @@
Index: lib/query.c
===================================================================
--- lib/query.c.orig
+++ lib/query.c
@@ -283,7 +283,7 @@ static int rpmgiShowMatches(QVA_t qva, r
if (qva->qva_source == RPMQV_DBOFFSET)
break;
}
- return rpmgiNumErrors(gi);
+ return ec + rpmgiNumErrors(gi);
}
int rpmcliShowMatches(QVA_t qva, rpmts ts)

View File

@ -1,257 +1,6 @@
Index: lib/rpmts.c --- ./configure.ac.orig 2010-03-25 15:16:21.000000000 +0000
=================================================================== +++ ./configure.ac 2010-03-25 15:27:47.000000000 +0000
--- lib/rpmts.c.orig @@ -510,25 +510,25 @@ dnl
+++ lib/rpmts.c
@@ -779,83 +779,102 @@ rpmdb rpmtsGetRdb(rpmts ts)
int rpmtsInitDSI(const rpmts ts)
{
- rpmDiskSpaceInfo dsi;
- struct stat sb;
- int rc;
- int i;
-
if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE)
return 0;
-
- rpmlog(RPMLOG_DEBUG, "mounted filesystems:\n");
- rpmlog(RPMLOG_DEBUG,
- " i dev bsize bavail iavail mount point\n");
-
- rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
- if (rc || ts->filesystems == NULL || ts->filesystemCount <= 0)
- return rc;
-
- /* Get available space on mounted file systems. */
-
ts->dsi = _free(ts->dsi);
- ts->dsi = xcalloc((ts->filesystemCount + 1), sizeof(*ts->dsi));
+ ts->dsi = xcalloc(1, sizeof(*ts->dsi));
+ return 0;
+}
- dsi = ts->dsi;
+static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, const char *dirName, int count)
+{
+ rpmDiskSpaceInfo dsi;
+ struct stat sb;
+ int rc;
- if (dsi != NULL)
- for (i = 0; (i < ts->filesystemCount) && dsi; i++, dsi++) {
#if STATFS_IN_SYS_STATVFS
- struct statvfs sfb;
- memset(&sfb, 0, sizeof(sfb));
- rc = statvfs(ts->filesystems[i], &sfb);
+ struct statvfs sfb;
+ memset(&sfb, 0, sizeof(sfb));
+ rc = statvfs(dirName, &sfb);
#else
- struct statfs sfb;
- memset(&sfb, 0, sizeof(sfb));
+ struct statfs sfb;
+ memset(&sfb, 0, sizeof(sfb));
# if STAT_STATFS4
/* This platform has the 4-argument version of the statfs call. The last two
* should be the size of struct statfs and 0, respectively. The 0 is the
* filesystem type, and is always 0 when statfs is called on a mounted
* filesystem, as we're doing.
*/
- rc = statfs(ts->filesystems[i], &sfb, sizeof(sfb), 0);
+ rc = statfs(dirName, &sfb, sizeof(sfb), 0);
# else
- rc = statfs(ts->filesystems[i], &sfb);
+ rc = statfs(dirName, &sfb);
# endif
#endif
- if (rc)
- break;
-
- rc = stat(ts->filesystems[i], &sb);
- if (rc)
- break;
- dsi->dev = sb.st_dev;
+ if (rc)
+ return NULL;
- dsi->bsize = sfb.f_bsize;
- dsi->bneeded = 0;
- dsi->ineeded = 0;
+ rc = stat(dirName, &sb);
+ if (rc)
+ return NULL;
+ if (sb.st_dev != dev)
+ return NULL;
+
+ ts->dsi = xrealloc(ts->dsi, (count + 2) * sizeof(*ts->dsi));
+ dsi = ts->dsi + count;
+ memset(dsi, 0, 2 * sizeof(*dsi));
+ dsi->dev = dev;
+ dsi->bsize = sfb.f_bsize;
+ if (!dsi->bsize)
+ dsi->bsize = 512; /* we need a bsize */
+ dsi->bneeded = 0;
+ dsi->ineeded = 0;
#ifdef STATFS_HAS_F_BAVAIL
- dsi->bavail = sfb.f_bavail;
+ dsi->bavail = sfb.f_bavail;
#else
/* FIXME: the statfs struct doesn't have a member to tell how many blocks are
* available for non-superusers. f_blocks - f_bfree is probably too big, but
* it's about all we can do.
*/
- dsi->bavail = sfb.f_blocks - sfb.f_bfree;
+ dsi->bavail = sfb.f_blocks - sfb.f_bfree;
#endif
- /* XXX Avoid FAT and other file systems that have not inodes. */
- /* XXX assigning negative value to unsigned type */
- dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
- ? sfb.f_ffree : -1;
- rpmlog(RPMLOG_DEBUG,
- "%5d 0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n",
- i, (unsigned) dsi->dev, dsi->bsize,
- dsi->bavail, dsi->iavail,
- ts->filesystems[i]);
+ /* XXX Avoid FAT and other file systems that have not inodes. */
+ /* XXX assigning negative value to unsigned type */
+ dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
+ ? sfb.f_ffree : -1;
+
+ return dsi;
+}
+
+static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi)
+{
+ int i;
+ struct stat sb;
+
+ /* must leave chroot for this */
+ if (rpmtsChrootDone(ts)) {
+ chroot(".");
+ }
+ if (!ts->filesystemCount)
+ rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
+ for (i = 0; i < ts->filesystemCount; i++) {
+ if (stat(ts->filesystems[i], &sb))
+ continue;
+ if (sb.st_dev == dsi->dev) {
+ dsi->mntPoint = ts->filesystems[i];
+ break;
+ }
+ }
+ if (i == ts->filesystemCount) {
+ /* file system not found, create something to display */
+ dsi->mntPoint = xmalloc(20);
+ sprintf(dsi->mntPoint, "dev 0x%08x", (unsigned)dsi->dev);
+ }
+ if (rpmtsChrootDone(ts)) {
+ chroot(ts->rootDir);
}
- return rc;
}
-void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
+void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize,
rpmFileAction action)
{
@@ -866,8 +885,10 @@ void rpmtsUpdateDSI(const rpmts ts, dev_
if (dsi) {
while (dsi->bsize && dsi->dev != dev)
dsi++;
- if (dsi->bsize == 0)
- dsi = NULL;
+ if (dsi->bsize == 0) {
+ /* create new entry */
+ dsi = rpmtsCreateDSI(ts, dev, dirName, dsi - ts->dsi);
+ }
}
if (dsi == NULL)
return;
@@ -910,32 +931,32 @@ void rpmtsCheckDSIProblems(const rpmts t
rpmDiskSpaceInfo dsi;
rpmps ps;
int fc;
- int i;
-
- if (ts->filesystems == NULL || ts->filesystemCount <= 0)
- return;
dsi = ts->dsi;
- if (dsi == NULL)
+ if (dsi == NULL || !dsi->bsize)
return;
fc = rpmfiFC(rpmteFI(te));
if (fc <= 0)
return;
ps = rpmtsProblems(ts);
- for (i = 0; i < ts->filesystemCount; i++, dsi++) {
+ for (; dsi->bsize; dsi++) {
if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
+ if (!dsi->mntPoint)
+ rpmtsFindDSIMount(ts, dsi);
rpmpsAppend(ps, RPMPROB_DISKSPACE,
rpmteNEVRA(te), rpmteKey(te),
- ts->filesystems[i], NULL, NULL,
+ dsi->mntPoint, NULL, NULL,
(adj_fs_blocks(dsi->bneeded)) * dsi->bsize);
}
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
+ if (!dsi->mntPoint)
+ rpmtsFindDSIMount(ts, dsi);
rpmpsAppend(ps, RPMPROB_DISKNODES,
rpmteNEVRA(te), rpmteKey(te),
- ts->filesystems[i], NULL, NULL,
+ dsi->mntPoint, NULL, NULL,
(adj_fs_blocks(dsi->ineeded)));
}
}
Index: lib/rpmts.h
===================================================================
--- lib/rpmts.h.orig
+++ lib/rpmts.h
@@ -485,7 +485,7 @@ int rpmtsSuspendResumeDBLock(rpmts ts, i
* @param fixupSize long size difference
* @param action file disposition
*/
-void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
+void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize,
rpmFileAction action);
Index: lib/rpmts_internal.h
===================================================================
--- lib/rpmts_internal.h.orig
+++ lib/rpmts_internal.h
@@ -14,6 +14,7 @@ typedef struct diskspaceInfo_s * rpmDisk
/** \ingroup rpmts
*/
struct diskspaceInfo_s {
+ const char *mntPoint; /*!< File system mount point */
dev_t dev; /*!< File system device number. */
int64_t bneeded; /*!< No. of blocks needed. */
int64_t ineeded; /*!< No. of inodes needed. */
Index: lib/transaction.c
===================================================================
--- lib/transaction.c.orig
+++ lib/transaction.c
@@ -343,7 +343,7 @@ assert(otherFi != NULL);
}
/* Update disk space info for a file. */
- rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi),
+ rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName, rpmfiFSize(fi),
rpmfiFReplacedSize(fi), fixupSize, rpmfsGetAction(fs, i));
}
Index: configure.ac
===================================================================
--- configure.ac.orig
+++ configure.ac
@@ -511,25 +511,25 @@ dnl
found_struct_statfs=no found_struct_statfs=no
if test X$found_struct_statfs = Xno ; then if test X$found_struct_statfs = Xno ; then
@ -284,3 +33,242 @@ Index: configure.ac
found_struct_statfs=yes],[]) found_struct_statfs=yes],[])
fi fi
--- ./lib/transaction.c.orig 2010-03-25 15:14:38.000000000 +0000
+++ ./lib/transaction.c 2010-03-25 15:44:25.000000000 +0000
@@ -45,6 +45,7 @@
#include "debug.h"
struct diskspaceInfo_s {
+ const char *mntPoint; /*!< File system mount point */
dev_t dev; /*!< File system device number. */
int64_t bneeded; /*!< No. of blocks needed. */
int64_t ineeded; /*!< No. of inodes needed. */
@@ -61,83 +62,78 @@ struct diskspaceInfo_s {
static int rpmtsInitDSI(const rpmts ts)
{
- rpmDiskSpaceInfo dsi;
- struct stat sb;
- int rc;
- int i;
-
if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE)
return 0;
- rpmlog(RPMLOG_DEBUG, "mounted filesystems:\n");
- rpmlog(RPMLOG_DEBUG,
- " i dev bsize bavail iavail mount point\n");
-
- rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
- if (rc || ts->filesystems == NULL || ts->filesystemCount <= 0)
- return rc;
-
- /* Get available space on mounted file systems. */
-
ts->dsi = _free(ts->dsi);
- ts->dsi = xcalloc((ts->filesystemCount + 1), sizeof(*ts->dsi));
+ ts->dsi = xcalloc(1, sizeof(*ts->dsi));
+ return 0;
+}
- dsi = ts->dsi;
+static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, const char *dirName, int count)
+{
+ rpmDiskSpaceInfo dsi;
+ struct stat sb;
+ int rc;
- if (dsi != NULL)
- for (i = 0; (i < ts->filesystemCount) && dsi; i++, dsi++) {
#if STATFS_IN_SYS_STATVFS
- struct statvfs sfb;
- memset(&sfb, 0, sizeof(sfb));
- rc = statvfs(ts->filesystems[i], &sfb);
+ struct statvfs sfb;
+ memset(&sfb, 0, sizeof(sfb));
+ rc = statvfs(ts->filesystems[i], &sfb);
#else
- struct statfs sfb;
- memset(&sfb, 0, sizeof(sfb));
+ struct statfs sfb;
+ memset(&sfb, 0, sizeof(sfb));
# if STAT_STATFS4
/* This platform has the 4-argument version of the statfs call. The last two
* should be the size of struct statfs and 0, respectively. The 0 is the
* filesystem type, and is always 0 when statfs is called on a mounted
* filesystem, as we're doing.
*/
- rc = statfs(ts->filesystems[i], &sfb, sizeof(sfb), 0);
+ rc = statfs(dirName, &sfb, sizeof(sfb), 0);
# else
- rc = statfs(ts->filesystems[i], &sfb);
+ rc = statfs(dirName, &sfb);
# endif
#endif
- if (rc)
- break;
+ if (rc)
+ return NULL;
- rc = stat(ts->filesystems[i], &sb);
- if (rc)
- break;
- dsi->dev = sb.st_dev;
+ rc = stat(dirName, &sb);
+ if (rc)
+ return NULL;
+ if (sb.st_dev != dev)
+ return NULL;
- dsi->bsize = sfb.f_bsize;
- dsi->bneeded = 0;
- dsi->ineeded = 0;
+ ts->dsi = xrealloc(ts->dsi, (count + 2) * sizeof(*ts->dsi));
+ dsi = ts->dsi + count;
+ memset(dsi, 0, 2 * sizeof(*dsi));
+
+ dsi->dev = sb.st_dev;
+ dsi->bsize = sfb.f_bsize;
+ if (!dsi->bsize)
+ dsi->bsize = 512; /* we need a bsize */
+ dsi->bneeded = 0;
+ dsi->ineeded = 0;
#ifdef STATFS_HAS_F_BAVAIL
- dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail;
+# ifdef ST_RDONLY
+ dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail;
+# else
+ dsi->bavail = sfb.f_bavail;
+# endif
#else
/* FIXME: the statfs struct doesn't have a member to tell how many blocks are
* available for non-superusers. f_blocks - f_bfree is probably too big, but
* it's about all we can do.
*/
- dsi->bavail = sfb.f_blocks - sfb.f_bfree;
+ dsi->bavail = sfb.f_blocks - sfb.f_bfree;
#endif
- /* XXX Avoid FAT and other file systems that have not inodes. */
- /* XXX assigning negative value to unsigned type */
- dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
- ? sfb.f_ffree : -1;
- rpmlog(RPMLOG_DEBUG,
- "%5d 0x%08x %8" PRId64 " %12" PRId64 " %12" PRId64" %s\n",
- i, (unsigned) dsi->dev, dsi->bsize,
- dsi->bavail, dsi->iavail,
- ts->filesystems[i]);
- }
- return rc;
+ /* XXX Avoid FAT and other file systems that have not inodes. */
+ /* XXX assigning negative value to unsigned type */
+ dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
+ ? sfb.f_ffree : -1;
+ return dsi;
}
-static void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
+static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
rpm_loff_t fileSize, rpm_loff_t prevSize, rpm_loff_t fixupSize,
rpmFileAction action)
{
@@ -148,8 +140,10 @@ static void rpmtsUpdateDSI(const rpmts t
if (dsi) {
while (dsi->bsize && dsi->dev != dev)
dsi++;
- if (dsi->bsize == 0)
- dsi = NULL;
+ if (dsi->bsize == 0) {
+ /* create new entry */
+ dsi = rpmtsCreateDSI(ts, dev, dirName, dsi - ts->dsi);
+ }
}
if (dsi == NULL)
return;
@@ -187,31 +181,58 @@ static void rpmtsUpdateDSI(const rpmts t
dsi->bneeded -= BLOCK_ROUND(fixupSize, dsi->bsize);
}
+static void rpmtsFindDSIMount(const rpmts ts, rpmDiskSpaceInfo dsi)
+{
+ int i;
+ struct stat sb;
+
+ /* must leave chroot for this */
+ if (rpmtsChrootDone(ts)) {
+ chroot(".");
+ }
+ if (!ts->filesystemCount)
+ rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
+ for (i = 0; i < ts->filesystemCount; i++) {
+ if (stat(ts->filesystems[i], &sb))
+ continue;
+ if (sb.st_dev == dsi->dev) {
+ dsi->mntPoint = ts->filesystems[i];
+ break;
+ }
+ }
+ if (i == ts->filesystemCount) {
+ /* file system not found, create something to display */
+ dsi->mntPoint = xmalloc(20);
+ sprintf((char *)dsi->mntPoint, "dev 0x%08x", (unsigned)dsi->dev);
+ }
+ if (rpmtsChrootDone(ts)) {
+ chroot(ts->rootDir);
+ }
+}
+
static void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
{
rpmDiskSpaceInfo dsi;
rpmps ps;
int fc;
- int i;
-
- if (ts->filesystems == NULL || ts->filesystemCount <= 0)
- return;
dsi = ts->dsi;
- if (dsi == NULL)
+ if (dsi == NULL || !dsi->bsize)
return;
fc = rpmfiFC(rpmteFI(te));
if (fc <= 0)
return;
ps = rpmtsProblems(ts);
- for (i = 0; i < ts->filesystemCount; i++, dsi++) {
+ for (; dsi->bsize; dsi++) {
if (dsi->bavail >= 0 && adj_fs_blocks(dsi->bneeded) > dsi->bavail) {
if (dsi->bneeded != dsi->obneeded) {
+ if (!dsi->mntPoint)
+ rpmtsFindDSIMount(ts, dsi);
rpmpsAppend(ps, RPMPROB_DISKSPACE,
rpmteNEVRA(te), rpmteKey(te),
- ts->filesystems[i], NULL, NULL,
+ dsi->mntPoint, NULL, NULL,
(adj_fs_blocks(dsi->bneeded)) * dsi->bsize);
dsi->obneeded = dsi->bneeded;
}
@@ -219,9 +240,11 @@ static void rpmtsCheckDSIProblems(const
if (dsi->iavail >= 0 && adj_fs_blocks(dsi->ineeded) > dsi->iavail) {
if (dsi->ineeded != dsi->oineeded) {
+ if (!dsi->mntPoint)
+ rpmtsFindDSIMount(ts, dsi);
rpmpsAppend(ps, RPMPROB_DISKNODES,
rpmteNEVRA(te), rpmteKey(te),
- ts->filesystems[i], NULL, NULL,
+ dsi->mntPoint, NULL, NULL,
(adj_fs_blocks(dsi->ineeded)));
dsi->oineeded = dsi->ineeded;
}
@@ -543,7 +566,7 @@ assert(otherFi != NULL);
}
/* Update disk space info for a file. */
- rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi),
+ rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName, rpmfiFSize(fi),
rpmfiFReplacedSize(fi), fixupSize, rpmfsGetAction(fs, i));
}

View File

@ -1,10 +1,5 @@
Convert changelog and i18n header elements to current locale. --- ./lib/tagexts.c.orig 2010-01-08 08:14:37.000000000 +0000
[#43347], rh#140050 +++ ./lib/tagexts.c 2010-03-24 16:46:03.000000000 +0000
Index: lib/tagexts.c
===================================================================
--- lib/tagexts.c.orig
+++ lib/tagexts.c
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
* \file lib/formats.c * \file lib/formats.c
*/ */
@ -13,7 +8,7 @@ Index: lib/tagexts.c
#include "system.h" #include "system.h"
#include <rpm/rpmtypes.h> #include <rpm/rpmtypes.h>
@@ -156,6 +157,114 @@ exit: @@ -157,6 +158,114 @@ exit:
return rc; return rc;
} }
@ -128,31 +123,27 @@ Index: lib/tagexts.c
/** /**
* Retrieve mounted file system paths. * Retrieve mounted file system paths.
* @param h header * @param h header
@@ -534,9 +643,43 @@ static int i18nTag(Header h, rpmTag tag, @@ -533,10 +642,41 @@ static int i18nTag(Header h, rpmTag tag,
dstring = _free(dstring); dstring = _free(dstring);
rc = headerGet(h, tag, td, HEADERGET_DEFAULT); rc = headerGet(h, tag, td, HEADERGET_ALLOC);
+ if (rc && td->data) { + if (rc && td->data) {
+ td->data = xstrdup(td->data);
+ td->data = strtolocale(td->data); + td->data = strtolocale(td->data);
+ td->flags = RPMTD_ALLOCED;
+ } + }
+ return rc; return rc;
+} }
+
+/** /**
+ * Retrieve text and convert to locale. + * Retrieve text and convert to locale.
+ */ + */
+static int localeTag(Header h, rpmTag tag, rpmtd td) +static int localeTag(Header h, rpmTag tag, rpmtd td)
+{ +{
+ int rc; + int rc;
+ rc = headerGet(h, tag, td, HEADERGET_DEFAULT); + rc = headerGet(h, tag, td, HEADERGET_ALLOC);
+ if (!rc) + if (!rc)
+ return 0; + return 0;
+ if (td->type == RPM_STRING_TYPE) { + if (td->type == RPM_STRING_TYPE) {
+ td->data = xstrdup(td->data);
+ td->data = strtolocale(td->data); + td->data = strtolocale(td->data);
+ td->flags = RPMTD_ALLOCED;
+ td->count = 1; + td->count = 1;
+ } else if (td->type == RPM_STRING_ARRAY_TYPE) { + } else if (td->type == RPM_STRING_ARRAY_TYPE) {
+ char **arr; + char **arr;
@ -162,18 +153,20 @@ Index: lib/tagexts.c
+ arr[i] = xstrdup(((char **)td->data)[i]); + arr[i] = xstrdup(((char **)td->data)[i]);
+ arr[i] = strtolocale(arr[i]); + arr[i] = strtolocale(arr[i]);
+ } + }
+ _free(td->data);
+ td->data = arr; + td->data = arr;
+ td->flags = RPMTD_ALLOCED | RPMTD_PTR_ALLOCED; + td->flags = RPMTD_ALLOCED | RPMTD_PTR_ALLOCED;
+ } + }
return rc; + return rc;
} +}
+ +
/** +
+/**
* Retrieve summary text. * Retrieve summary text.
* @param h header * @param h header
@@ -559,6 +702,16 @@ static int descriptionTag(Header h, rpmt * @retval td tag data container
return i18nTag(h, RPMTAG_DESCRIPTION, td); @@ -558,6 +698,16 @@ static int descriptionTag(Header h, rpmt
return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags);
} }
+static int changelognameTag(Header h, rpmtd td) +static int changelognameTag(Header h, rpmtd td)
@ -189,12 +182,12 @@ Index: lib/tagexts.c
/** /**
* Retrieve group text. * Retrieve group text.
* @param h header * @param h header
@@ -663,6 +816,8 @@ static const struct headerTagFunc_s rpmH @@ -791,6 +941,8 @@ static const struct headerTagFunc_s rpmH
{ RPMTAG_LONGARCHIVESIZE, longarchivesizeTag }, { RPMTAG_LONGARCHIVESIZE, longarchivesizeTag },
{ RPMTAG_LONGSIZE, longsizeTag }, { RPMTAG_LONGSIZE, longsizeTag },
{ RPMTAG_LONGSIGSIZE, longsigsizeTag }, { RPMTAG_LONGSIGSIZE, longsigsizeTag },
+ { RPMTAG_CHANGELOGNAME, changelognameTag }, + { RPMTAG_CHANGELOGNAME, changelognameTag },
+ { RPMTAG_CHANGELOGTEXT, changelogtextTag }, + { RPMTAG_CHANGELOGTEXT, changelogtextTag },
{ 0, NULL } { RPMTAG_DBINSTANCE, dbinstanceTag },
}; { RPMTAG_EVR, evrTag },
{ RPMTAG_NVR, nvrTag },

View File

@ -1,8 +1,6 @@
Index: lib/psm.c --- ./lib/psm.c.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./lib/psm.c 2010-03-25 14:42:52.000000000 +0000
--- lib/psm.c.orig @@ -455,6 +455,8 @@ static rpmRC runLuaScript(rpmpsm psm, He
+++ lib/psm.c
@@ -441,6 +441,8 @@ static rpmRC runLuaScript(rpmpsm psm, He
#ifdef WITH_LUA #ifdef WITH_LUA
char *sname = NULL; char *sname = NULL;
int rootFd = -1; int rootFd = -1;
@ -11,16 +9,10 @@ Index: lib/psm.c
int xx; int xx;
rpmlua lua = NULL; /* Global state. */ rpmlua lua = NULL; /* Global state. */
rpmluav var; rpmluav var;
@@ -449,16 +451,21 @@ static rpmRC runLuaScript(rpmpsm psm, He @@ -463,6 +465,22 @@ static rpmRC runLuaScript(rpmpsm psm, He
rpmlog(RPMLOG_DEBUG, "%s: %s running <lua> scriptlet.\n", rpmlog(RPMLOG_DEBUG, "%s: %s running <lua> scriptlet.\n",
psm->stepName, sname); psm->stepName, sname);
- if (!rpmtsChrootDone(ts)) {
- const char *rootDir = rpmtsRootDir(ts);
- xx = chdir("/");
- rootFd = open(".", O_RDONLY, 0);
- if (rootFd >= 0) {
- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
+ chroot_done = rpmtsChrootDone(ts); + chroot_done = rpmtsChrootDone(ts);
+ rootDir = rpmtsRootDir(ts); + rootDir = rpmtsRootDir(ts);
+ if (!chroot_done) { + if (!chroot_done) {
@ -28,26 +20,26 @@ Index: lib/psm.c
+ xx = chdir("/"); + xx = chdir("/");
+ rootFd = open(".", O_RDONLY, 0); + rootFd = open(".", O_RDONLY, 0);
+ if (rootFd >= 0) { + if (rootFd >= 0) {
xx = chroot(rootDir); + xx = chroot(rootDir);
- xx = rpmtsSetChrootDone(ts, 1);
+ xx = rpmtsSetChrootDone(ts, 1); + xx = rpmtsSetChrootDone(ts, 1);
+ } + }
} + }
+ } else { + } else {
+ rootFd = open(".", O_RDONLY, 0); + rootFd = open(".", O_RDONLY, 0);
} + }
+ xx = chdir("/"); + xx = chdir("/");
+
/* Create arg variable */ if (!rpmtsChrootDone(ts)) {
rpmluaPushTable(lua, "arg"); const char *rootDir = rpmtsRootDir(ts);
@@ -491,12 +498,17 @@ static rpmRC runLuaScript(rpmpsm psm, He xx = chdir("/");
@@ -505,12 +523,17 @@ static rpmRC runLuaScript(rpmpsm psm, He
rpmluaDelVar(lua, "arg"); rpmluaDelVar(lua, "arg");
if (rootFd >= 0) { if (rootFd >= 0) {
- const char *rootDir = rpmtsRootDir(ts); - const char *rootDir = rpmtsRootDir(ts);
xx = fchdir(rootFd); xx = fchdir(rootFd);
xx = close(rootFd); xx = close(rootFd);
- if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') - if (rootDir != NULL && !rstreq(rootDir, "/") && *rootDir == '/')
+ if (!chroot_done) { + if (!chroot_done) {
xx = chroot("."); xx = chroot(".");
- xx = rpmtsSetChrootDone(ts, 0); - xx = rpmtsSetChrootDone(ts, 0);

View File

@ -1,9 +1,5 @@
SUSE specific macro changes. --- ./macros.in.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./macros.in 2010-03-25 15:13:43.000000000 +0000
Index: macros.in
===================================================================
--- macros.in.orig
+++ macros.in
@@ -175,22 +175,22 @@ @@ -175,22 +175,22 @@
# Template for debug information sub-package. # Template for debug information sub-package.
@ -33,7 +29,7 @@ Index: macros.in
# The path to the gzip executable (legacy, use %{__gzip} instead). # The path to the gzip executable (legacy, use %{__gzip} instead).
%_gzipbin %{__gzip} %_gzipbin %{__gzip}
@@ -233,7 +233,7 @@ package or when debugging this package.\ @@ -230,7 +230,7 @@ package or when debugging this package.\
%_tmppath %{_var}/tmp %_tmppath %{_var}/tmp
# Path to top of build area. # Path to top of build area.
@ -42,7 +38,7 @@ Index: macros.in
# The path to the unzip executable (legacy, use %{__unzip} instead). # The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip} %_unzipbin %{__unzip}
@@ -330,7 +330,7 @@ package or when debugging this package.\ @@ -333,7 +333,7 @@ package or when debugging this package.\
# "w7.lzdio" lzma-alone level 7, lzma's default # "w7.lzdio" lzma-alone level 7, lzma's default
# #
#%_source_payload w9.gzdio #%_source_payload w9.gzdio
@ -51,7 +47,7 @@ Index: macros.in
# Algorithm to use for generating file checksum digests on build. # Algorithm to use for generating file checksum digests on build.
# If not specified or 0, MD5 is used. # If not specified or 0, MD5 is used.
@@ -420,7 +420,7 @@ package or when debugging this package.\ @@ -417,7 +417,7 @@ package or when debugging this package.\
# #
# Use internal dependency generator rather than external helpers? # Use internal dependency generator rather than external helpers?
@ -60,7 +56,7 @@ Index: macros.in
# #
# Filter GLIBC_PRIVATE Provides: and Requires: # Filter GLIBC_PRIVATE Provides: and Requires:
@@ -466,16 +466,22 @@ print (t)\ @@ -463,16 +463,22 @@ print (t)\
# Undefined, missing or %{nil} will use package content (if available). # Undefined, missing or %{nil} will use package content (if available).
%_verify_file_context_path %{__file_context_path} %_verify_file_context_path %{__file_context_path}
@ -84,8 +80,8 @@ Index: macros.in
+#%__find_enhances ??? +#%__find_enhances ???
# #
# Path to scripts to autogenerate per-interpreter package dependencies, # Path to scripts to autogenerate per-interpreter package dependencies.
@@ -638,15 +644,15 @@ print (t)\ @@ -644,15 +650,15 @@ print (t)\
%_dbi_config_Packages %{_dbi_htconfig} lockdbfd %_dbi_config_Packages %{_dbi_htconfig} lockdbfd
# "Depends" is a per-transaction cache of known dependency resolutions. # "Depends" is a per-transaction cache of known dependency resolutions.
@ -108,7 +104,7 @@ Index: macros.in
# XXX legacy configuration. # XXX legacy configuration.
# Choose db interface: # Choose db interface:
@@ -1008,7 +1014,7 @@ print (t)\ @@ -991,7 +997,7 @@ print (t)\
%_build_vendor %{_host_vendor} %_build_vendor %{_host_vendor}
%_build_os %{_host_os} %_build_os %{_host_os}
%_host @host@ %_host @host@
@ -117,9 +113,9 @@ Index: macros.in
%_host_cpu @host_cpu@ %_host_cpu @host_cpu@
%_host_vendor @host_vendor@ %_host_vendor @host_vendor@
%_host_os @host_os@ %_host_os @host_os@
@@ -1168,6 +1174,181 @@ done \ @@ -1154,6 +1160,181 @@ done \
%perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib) %python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")
%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) %python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")
+# More useful perl macros (from Raul Dias <rsd@swi.com.br>) +# More useful perl macros (from Raul Dias <rsd@swi.com.br>)
+# +#
@ -299,7 +295,7 @@ Index: macros.in
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# arch macro for all Intel i?86 compatibile processors # arch macro for all Intel i?86 compatibile processors
# (Note: This macro (and it's analogues) will probably be obsoleted when # (Note: This macro (and it's analogues) will probably be obsoleted when
@@ -1178,7 +1359,9 @@ done \ @@ -1164,7 +1345,9 @@ done \
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# arch macro for all supported ARM processors # arch macro for all supported ARM processors
@ -310,7 +306,7 @@ Index: macros.in
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# arch macro for all supported Sparc processors # arch macro for all supported Sparc processors
@@ -1207,3 +1390,26 @@ done \ @@ -1197,3 +1380,26 @@ done \
# \endverbatim # \endverbatim
#*/ #*/

View File

@ -1,10 +1,6 @@
Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7. --- ./lib/depends.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/depends.c 2010-03-24 16:47:28.000000000 +0000
Index: lib/depends.c @@ -450,8 +450,13 @@ retry:
===================================================================
--- lib/depends.c.orig
+++ lib/depends.c
@@ -518,8 +518,13 @@ retry:
} }
unsatisfied: unsatisfied:
@ -19,20 +15,9 @@ Index: lib/depends.c
+ } + }
exit: exit:
/* if (cacheThis) {
@@ -827,6 +832,8 @@ static inline const char * identifyDepen --- ./lib/rpmds.h.orig 2009-12-07 14:36:49.000000000 +0000
return "Requires(postun):"; +++ ./lib/rpmds.h 2010-03-24 16:47:28.000000000 +0000
if (f & RPMSENSE_SCRIPT_VERIFY)
return "Requires(verify):";
+ if (f & RPMSENSE_MISSINGOK)
+ return "Requires(hint):";
if (f & RPMSENSE_FIND_REQUIRES)
return "Requires(auto):";
return "Requires:";
Index: lib/rpmds.h
===================================================================
--- lib/rpmds.h.orig
+++ lib/rpmds.h
@@ -73,6 +73,7 @@ typedef enum rpmsenseFlags_e { @@ -73,6 +73,7 @@ typedef enum rpmsenseFlags_e {
RPMSENSE_SCRIPT_POSTUN | \ RPMSENSE_SCRIPT_POSTUN | \
RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_SCRIPT_VERIFY | \

16
modemuncher.diff Normal file
View File

@ -0,0 +1,16 @@
--- luaext/modemuncher.c.orig 2010-03-26 09:43:45.000000000 +0000
+++ luaext/modemuncher.c 2010-03-26 09:44:54.000000000 +0000
@@ -245,11 +245,11 @@ printf("modemuncher: doneflag = %u\n", d
if (ch_mode) switch (op)
{
case '+':
- *mode = *mode |= ch_mode & affected_bits;
+ *mode |= ch_mode & affected_bits;
break;
case '-':
- *mode = *mode &= ~(ch_mode & affected_bits);
+ *mode &= ~(ch_mode & affected_bits);
break;
case '=':

View File

@ -1,11 +1,9 @@
Also compare the name and not only the version when checking if Also compare the name and not only the version when checking if
two packages are the same. rh#104066 two packages are the same. rh#104066
Index: lib/depends.c --- ./lib/depends.c.orig 2010-03-24 16:47:28.000000000 +0000
=================================================================== +++ ./lib/depends.c 2010-03-24 16:52:00.000000000 +0000
--- lib/depends.c.orig @@ -100,6 +100,24 @@ static int removePackage(rpmts ts, Heade
+++ lib/depends.c
@@ -102,6 +102,24 @@ static int removePackage(rpmts ts, Heade
return 0; return 0;
} }
@ -30,7 +28,7 @@ Index: lib/depends.c
int rpmtsAddInstallElement(rpmts ts, Header h, int rpmtsAddInstallElement(rpmts ts, Header h,
fnpyKey key, int upgrade, rpmRelocation * relocs) fnpyKey key, int upgrade, rpmRelocation * relocs)
{ {
@@ -291,7 +309,7 @@ addheader: @@ -275,7 +293,7 @@ addheader:
continue; continue;
/* Skip packages that contain identical NEVR. */ /* Skip packages that contain identical NEVR. */
@ -38,18 +36,18 @@ Index: lib/depends.c
+ if (rpmNameVersionCompare(h, oh) == 0) + if (rpmNameVersionCompare(h, oh) == 0)
continue; continue;
xx = removePackage(ts, oh, pkgKey); xx = removePackage(ts, oh, p);
@@ -342,11 +360,9 @@ addheader: @@ -316,11 +334,9 @@ addheader:
* If no obsoletes version info is available, match all names. * If no obsoletes version info is available, match all names.
*/ */
if (rpmdsEVR(obsoletes) == NULL if (rpmdsEVR(obsoletes) == NULL
- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { - || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
+ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) { + || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
char * ohNEVRA = headerGetNEVRA(oh, NULL); char * ohNEVRA = headerGetAsString(oh, RPMTAG_NEVRA);
-#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */ -#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */
- if (rpmVersionCompare(h, oh)) - if (rpmVersionCompare(h, oh))
-#endif -#endif
+ if (rpmNameVersionCompare(h, oh)) + if (rpmNameVersionCompare(h, oh))
xx = removePackage(ts, oh, pkgKey); xx = removePackage(ts, oh, p);
rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n", rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n",
rpmdsDNEVR(obsoletes)+2, ohNEVRA); rpmdsDNEVR(obsoletes)+2, ohNEVRA);

29
repackage-nomd5.diff Normal file
View File

@ -0,0 +1,29 @@
--- ./lib/psm.c.orig 2010-03-26 15:06:20.000000000 +0000
+++ ./lib/psm.c 2010-03-26 15:11:27.000000000 +0000
@@ -1318,6 +1318,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
if (psm->goal == PSM_PKGINSTALL) {
FD_t payload = NULL;
+ rpmtransFlags oldtsflags;
if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB) break;
@@ -1343,6 +1344,9 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
break;
}
+ oldtsflags = rpmtsFlags(ts);
+ if (headerIsEntry(fi->h, RPMTAG_REMOVETID))
+ (void) rpmtsSetFlags(ts, oldtsflags | RPMTRANS_FLAG_NOMD5);
rc = fsmSetup(rpmfiFSM(fi), FSM_PKGINSTALL, ts, psm->te, fi,
payload, NULL, &psm->failedFile);
(void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS),
@@ -1350,6 +1354,8 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
(void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST),
fdOp(payload, FDSTAT_DIGEST));
xx = fsmTeardown(rpmfiFSM(fi));
+ if (headerIsEntry(fi->h, RPMTAG_REMOVETID))
+ (void) rpmtsSetFlags(ts, oldtsflags);
saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
xx = Fclose(payload);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b0af1f507b342eda33f9ef113b645048034fb7fef3b4ff3c084532af12b6f70d
size 3410587

3
rpm-4.8.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3b4bb2d78eaf1f5200fdcd51372ca9cedce64e030046372e6a13e361cb82b64
size 3692408

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
# #
# spec file for package rpm-python (Version 4.7.1) # spec file for package rpm-python (Version 4.8.0)
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -24,8 +24,8 @@ BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel
License: GPLv2+ License: GPLv2+
Group: System/Packages Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages Summary: Python Bindings for Manipulating RPM Packages
Version: 4.7.1 Version: 4.8.0
Release: 9 Release: 1
Requires: rpm = %{version} Requires: rpm = %{version}
%py_requires %py_requires
Source99: rpm.spec Source99: rpm.spec

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Mar 26 16:29:36 CET 2010 - mls@suse.de
- port sles11-sp1 repackage-nomd5.diff and safeugid.diff
-------------------------------------------------------------------
Fri Mar 26 11:49:59 CET 2010 - mls@suse.de
- update to rpm-4.8.0
* updated python bindings
* new transaction ordering code
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 24 11:57:30 CET 2010 - mls@suse.de Wed Feb 24 11:57:30 CET 2010 - mls@suse.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package rpm (Version 4.7.1) # spec file for package rpm (Version 4.8.0)
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -27,8 +27,8 @@ Provides: rpminst
PreReq: %insserv_prereq %fillup_prereq permissions PreReq: %insserv_prereq %fillup_prereq permissions
AutoReqProv: on AutoReqProv: on
Summary: The RPM Package Manager Summary: The RPM Package Manager
Version: 4.7.1 Version: 4.8.0
Release: 9 Release: 1
Source: rpm-%{version}.tar.bz2 Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2 Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2 Source2: RPM-Tips.html.tar.bz2
@ -98,11 +98,13 @@ Patch61: debugsubpkg.diff
Patch62: debuglink.diff Patch62: debuglink.diff
Patch63: debuginfo-mono.patch Patch63: debuginfo-mono.patch
Patch64: allowufdio.diff Patch64: allowufdio.diff
Patch65: fixabsfilelists.diff Patch65: lazystatfs.diff
Patch66: fixqueryreturn.diff Patch66: defclean.diff
Patch67: lazystatfs.diff Patch67: readlineofi.diff
Patch68: defclean.diff Patch68: rpmdb-no-svc.diff
Patch69: readlineofi.diff Patch69: modemuncher.diff
Patch70: repackage-nomd5.diff
Patch71: safeugid.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
# #
# avoid bootstrapping problem # avoid bootstrapping problem
@ -163,6 +165,7 @@ rm -f rpmdb/db.h
%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49 %patch -P 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 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 70 -P 71
#chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-supplements{,.ksyms}
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
#chmod 755 scripts/firmware.prov #chmod 755 scripts/firmware.prov
@ -180,7 +183,7 @@ export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections"
%ifarch alpha %ifarch alpha
export CFLAGS="-g -O0 -fno-strict-aliasing" export CFLAGS="-g -O0 -fno-strict-aliasing"
%endif %endif
cp /usr/share/gettext/config.rpath . #cp -p /usr/share/gettext/config.rpath .
cp autogen.sh beecrypt cp autogen.sh beecrypt
pushd beecrypt pushd beecrypt
./autogen.sh --with-pic ./autogen.sh --with-pic

19
rpmdb-no-svc.diff Normal file
View File

@ -0,0 +1,19 @@
--- lib/Makefile.am.orig 2010-03-26 09:34:16.000000000 +0000
+++ lib/Makefile.am 2010-03-26 09:34:39.000000000 +0000
@@ -148,16 +148,6 @@ rpmdb_stat_LDADD = \
$(top_builddir)/db3/util_sig.o \
librpm.la
-rpmlibexec_PROGRAMS += rpmdb_svc
-rpmdb_svc_SOURCES =
-rpmdb_svc_LDADD = \
- $(top_builddir)/db3/db_server_proc.o \
- $(top_builddir)/db3/db_server_svc.o \
- $(top_builddir)/db3/db_server_util.o \
- $(top_builddir)/db3/gen_db_server.o \
- $(top_builddir)/db3/util_log.o \
- librpm.la
-
rpmlibexec_PROGRAMS += rpmdb_upgrade
rpmdb_upgrade_SOURCES =
rpmdb_upgrade_LDADD = \

236
safeugid.diff Normal file
View File

@ -0,0 +1,236 @@
--- lib/fsm.c.orig 2010-03-26 15:06:20.000000000 +0000
+++ lib/fsm.c 2010-03-26 15:16:31.000000000 +0000
@@ -736,22 +736,26 @@ static int fsmMapAttrs(FSM_t fsm)
/* this check is pretty moot, rpmfi accessors check array bounds etc */
if (fi && i >= 0 && i < rpmfiFC(fi)) {
+ rpmts ts = fsmGetTs(fsm);
mode_t finalMode = rpmfiFModeIndex(fi, i);
dev_t finalRdev = rpmfiFRdevIndex(fi, i);
time_t finalMtime = rpmfiFMtimeIndex(fi, i);
const char *user = rpmfiFUserIndex(fi, i);
const char *group = rpmfiFGroupIndex(fi, i);
+ int safe = rpmtsChrootDone(ts);
+ extern int unameToUid_safe(const char *, gid_t *, int);
+ extern int gnameToGid_safe(const char *, gid_t *, int);
uid_t uid = 0;
gid_t gid = 0;
- if (user && unameToUid(user, &uid)) {
+ if (user && unameToUid_safe(user, &uid, safe)) {
if (fsm->goal == FSM_PKGINSTALL)
rpmlog(RPMLOG_WARNING,
_("user %s does not exist - using root\n"), user);
finalMode &= ~S_ISUID; /* turn off suid bit */
}
- if (group && gnameToGid(group, &gid)) {
+ if (group && gnameToGid_safe(group, &gid, safe)) {
if (fsm->goal == FSM_PKGINSTALL)
rpmlog(RPMLOG_WARNING,
_("group %s does not exist - using root\n"), group);
@@ -773,8 +777,7 @@ static int fsmMapAttrs(FSM_t fsm)
if (fsm->mapFlags & CPIO_MAP_GID)
st->st_gid = gid;
- { rpmts ts = fsmGetTs(fsm);
-
+ {
/*
* Set file digest (if not disabled).
*/
--- lib/misc.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ lib/misc.c 2010-03-26 15:26:05.000000000 +0000
@@ -14,6 +14,42 @@ const char * const RPMVERSION = VERSION;
#include "debug.h"
+/*
+ * Unfortunatelly glibc caches nss/nscd data and there is no
+ * good way to flush those caches when we did a chroot(). Thus
+ * we need to parse /etc/passwd and /etc/group ourselfs.
+ */
+static int safe_lookup(const char * file, const char * name)
+{
+ FILE *fp;
+ int l;
+ char buf[4096], *p;
+
+ if (!name || !*name)
+ return -1;
+ l = strlen(name);
+ if ((fp = fopen(file, "r")) == 0)
+ return -1;
+ while ((p = fgets(buf, sizeof(buf), fp)) != 0) {
+ if (*p == '#')
+ continue;
+ while (*p && (*p == ' ' || *p == '\t'))
+ p++;
+ if (strncmp(p, name, l) != 0 || p[l] != ':')
+ continue;
+ p = strchr(p + l + 1, ':');
+ if (!p)
+ continue;
+ fclose(fp);
+ p++;
+ while (*p && (*p == ' ' || *p == '\t'))
+ p++;
+ return atoi(p);
+ }
+ fclose(fp);
+ return -1;
+}
+
/* unameToUid(), uidTouname() and the group variants are really poorly
implemented. They really ought to use hash tables. I just made the
guess that most files would be owned by root or the same person/group
@@ -21,11 +57,12 @@ const char * const RPMVERSION = VERSION;
is looked up via getpw() and getgr() functions. If this performs
too poorly I'll have to implement it properly :-( */
-int unameToUid(const char * thisUname, uid_t * uid)
+int unameToUid_safe(const char * thisUname, uid_t * uid, int safe)
{
static char * lastUname = NULL;
static size_t lastUnameLen = 0;
static size_t lastUnameAlloced;
+ static int lastUnameSafe;
static uid_t lastUid;
struct passwd * pwent;
size_t thisUnameLen;
@@ -38,6 +75,11 @@ static char * lastUname = NULL;
return 0;
}
+ if (safe != lastUnameSafe) {
+ lastUnameLen = 0;
+ lastUnameSafe = safe;
+ }
+
thisUnameLen = strlen(thisUname);
if (lastUname == NULL || thisUnameLen != lastUnameLen ||
!rstreq(thisUname, lastUname))
@@ -48,15 +90,21 @@ static char * lastUname = NULL;
}
strcpy(lastUname, thisUname);
- pwent = getpwnam(thisUname);
- if (pwent == NULL) {
- /* FIX: shrug */
- endpwent();
+ if (safe) {
+ int uid = safe_lookup("/etc/passwd", thisUname);
+ if (uid < 0)
+ return -1;
+ lastUid = (uid_t)uid;
+ } else {
pwent = getpwnam(thisUname);
- if (pwent == NULL) return -1;
+ if (pwent == NULL) {
+ /* FIX: shrug */
+ endpwent();
+ pwent = getpwnam(thisUname);
+ if (pwent == NULL) return -1;
+ }
+ lastUid = pwent->pw_uid;
}
-
- lastUid = pwent->pw_uid;
}
*uid = lastUid;
@@ -64,11 +112,18 @@ static char * lastUname = NULL;
return 0;
}
-int gnameToGid(const char * thisGname, gid_t * gid)
+int unameToUid(const char * thisUname, uid_t * uid)
+{
+ return unameToUid_safe(thisUname, uid, 0);
+}
+
+
+int gnameToGid_safe(const char * thisGname, gid_t * gid, int safe)
{
static char * lastGname = NULL;
static size_t lastGnameLen = 0;
static size_t lastGnameAlloced;
+ static int lastGnameSafe;
static gid_t lastGid;
size_t thisGnameLen;
struct group * grent;
@@ -81,6 +136,11 @@ static char * lastGname = NULL;
return 0;
}
+ if (safe != lastGnameSafe) {
+ lastGnameLen = 0;
+ lastGnameSafe = safe;
+ }
+
thisGnameLen = strlen(thisGname);
if (lastGname == NULL || thisGnameLen != lastGnameLen ||
!rstreq(thisGname, lastGname))
@@ -91,25 +151,34 @@ static char * lastGname = NULL;
}
strcpy(lastGname, thisGname);
- grent = getgrnam(thisGname);
- if (grent == NULL) {
- /* FIX: shrug */
- endgrent();
+ if (safe) {
+ int gid = safe_lookup("/etc/group", thisGname);
+ if (gid < 0)
+ return -1;
+ lastGid = (gid_t)gid;
+ } else {
grent = getgrnam(thisGname);
if (grent == NULL) {
- /* XXX The filesystem package needs group/lock w/o getgrnam. */
- if (rstreq(thisGname, "lock")) {
- *gid = lastGid = 54;
- return 0;
- } else
- if (rstreq(thisGname, "mail")) {
- *gid = lastGid = 12;
- return 0;
- } else
- return -1;
+ /* FIX: shrug */
+ endgrent();
+ grent = getgrnam(thisGname);
+ if (grent == NULL) {
+#ifdef STRANGE_FEDORA_HACKS
+ /* XXX The filesystem package needs group/lock w/o getgrnam. */
+ if (rstreq(thisGname, "lock")) {
+ *gid = lastGid = 54;
+ return 0;
+ } else
+ if (rstreq(thisGname, "mail")) {
+ *gid = lastGid = 12;
+ return 0;
+ } else
+#endif
+ return -1;
+ }
}
+ lastGid = grent->gr_gid;
}
- lastGid = grent->gr_gid;
}
*gid = lastGid;
@@ -117,6 +186,12 @@ static char * lastGname = NULL;
return 0;
}
+int gnameToGid(const char * thisGname, gid_t * gid)
+{
+ return gnameToGid_safe(thisGname, gid, 0);
+}
+
+
const char * uidToUname(uid_t uid)
{
static uid_t lastUid = (uid_t) -1;

View File

@ -5,64 +5,9 @@ locking.
I hijacked the dbiSync function for this because I did not want I hijacked the dbiSync function for this because I did not want
to change the ABI. to change the ABI.
Index: lib/psm.c --- ./lib/backend/db3.c.orig 2010-03-25 14:35:39.000000000 +0000
=================================================================== +++ ./lib/backend/db3.c 2010-03-25 14:44:42.000000000 +0000
--- lib/psm.c.orig @@ -208,11 +208,17 @@ errxit:
+++ lib/psm.c
@@ -756,6 +756,8 @@ static rpmRC runScript(rpmpsm psm, Heade
goto exit;
}
+ rpmtsSuspendResumeDBLock(psm->ts, 0);
+
xx = rpmsqFork(&psm->sq);
if (psm->sq.child == 0) {
rpmlog(RPMLOG_DEBUG, "%s: %s\texecv(%s) pid %d\n",
@@ -770,6 +772,8 @@ static rpmRC runScript(rpmpsm psm, Heade
(void) psmWait(psm);
+ rpmtsSuspendResumeDBLock(psm->ts, 1);
+
if (psm->sq.reaped < 0) {
rpmlog(RPMLOG_ERR, _("%s scriptlet failed, waitpid(%d) rc %d: %s\n"),
sname, psm->sq.child, psm->sq.reaped, strerror(errno));
Index: lib/rpmts.c
===================================================================
--- lib/rpmts.c.orig
+++ lib/rpmts.c
@@ -108,6 +108,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode)
return rc;
}
+int rpmtsSuspendResumeDBLock(rpmts ts, int mode)
+{
+ return rpmdbSuspendResumeDBLock(ts->rdb, mode);
+}
+
int rpmtsInitDB(rpmts ts, int dbmode)
{
void *lock = rpmtsAcquireLock(ts);
Index: lib/rpmts.h
===================================================================
--- lib/rpmts.h.orig
+++ lib/rpmts.h
@@ -472,6 +472,10 @@ rpmdb rpmtsGetRdb(rpmts ts);
*/
int rpmtsInitDSI(const rpmts ts);
+int rpmtsSuspendResumeDBLock(rpmts ts, int mode)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/;
+
/** \ingroup rpmts
* Update disk space info for a file.
* @param ts transaction set
Index: lib/backend/db3.c
===================================================================
--- lib/backend/db3.c.orig
+++ lib/backend/db3.c
@@ -398,12 +398,18 @@ errxit:
return rc; return rc;
} }
@ -72,16 +17,15 @@ Index: lib/backend/db3.c
{ {
DB * db = dbi->dbi_db; DB * db = dbi->dbi_db;
int rc = 0; int rc = 0;
int _printit;
+ if (flags == (unsigned int)-1) + if (flags == (unsigned int)-1)
+ return db3SuspendResumeLock(dbi, 0); + return db3SuspendResumeLock(dbi, 0);
+ if (flags == (unsigned int)-2) + if (flags == (unsigned int)-2)
+ return db3SuspendResumeLock(dbi, 1); + return db3SuspendResumeLock(dbi, 1);
if (db != NULL) if (db != NULL) {
rc = db->sync(db, flags); rc = db->sync(db, flags);
/* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */ rc = cvtdberr(dbi, "db->sync", rc, _debug);
@@ -1122,6 +1128,50 @@ static int db3open(rpmdb rpmdb, rpmTag r @@ -848,6 +854,48 @@ static int db3open(rpmdb rpmdb, rpmTag r
return rc; return rc;
} }
@ -97,8 +41,6 @@ Index: lib/backend/db3.c
+ return 0; + return 0;
+ if (!(dbi->dbi_mode & (O_RDWR|O_WRONLY))) + if (!(dbi->dbi_mode & (O_RDWR|O_WRONLY)))
+ return 0; + return 0;
+ if ((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host)
+ return 0;
+ if (dbi->dbi_use_dbenv && _lockdbfd == 0) + if (dbi->dbi_use_dbenv && _lockdbfd == 0)
+ return 0; + return 0;
+ if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0)) + if (!(dbi->dbi_db->fd(dbi->dbi_db, &fdno) == 0 && fdno >= 0))
@ -132,11 +74,29 @@ Index: lib/backend/db3.c
/** \ingroup db3 /** \ingroup db3
*/ */
RPM_GNUC_INTERNAL RPM_GNUC_INTERNAL
Index: lib/rpmdb.c --- ./lib/psm.c.orig 2010-03-25 14:43:29.000000000 +0000
=================================================================== +++ ./lib/psm.c 2010-03-25 14:43:41.000000000 +0000
--- lib/rpmdb.c.orig @@ -754,6 +754,8 @@ static rpmRC runScript(rpmpsm psm, Heade
+++ lib/rpmdb.c goto exit;
@@ -886,6 +886,21 @@ int rpmdbSync(rpmdb db) }
+ rpmtsSuspendResumeDBLock(psm->ts, 0);
+
xx = rpmsqFork(&psm->sq);
if (psm->sq.child == 0) {
rpmlog(RPMLOG_DEBUG, "%s: %s\texecv(%s) pid %d\n",
@@ -768,6 +770,8 @@ static rpmRC runScript(rpmpsm psm, Heade
(void) psmWait(psm);
+ rpmtsSuspendResumeDBLock(psm->ts, 1);
+
if (psm->sq.reaped < 0) {
rpmlog(RPMLOG_ERR, _("%s scriptlet failed, waitpid(%d) rc %d: %s\n"),
sname, psm->sq.child, psm->sq.reaped, strerror(errno));
--- ./lib/rpmdb.c.orig 2010-03-25 14:36:57.000000000 +0000
+++ ./lib/rpmdb.c 2010-03-25 14:43:41.000000000 +0000
@@ -903,6 +903,21 @@ int rpmdbSync(rpmdb db)
return rc; return rc;
} }
@ -158,3 +118,30 @@ Index: lib/rpmdb.c
/* FIX: dbTemplate structure assignment */ /* FIX: dbTemplate structure assignment */
static static
rpmdb newRpmdb(const char * root, rpmdb newRpmdb(const char * root,
--- ./lib/rpmts.c.orig 2009-12-17 09:05:37.000000000 +0000
+++ ./lib/rpmts.c 2010-03-25 14:43:41.000000000 +0000
@@ -89,6 +89,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode)
return rc;
}
+int rpmtsSuspendResumeDBLock(rpmts ts, int mode)
+{
+ return rpmdbSuspendResumeDBLock(ts->rdb, mode);
+}
+
int rpmtsInitDB(rpmts ts, int dbmode)
{
void *lock = rpmtsAcquireLock(ts);
--- ./lib/rpmts.h.orig 2009-12-17 09:05:37.000000000 +0000
+++ ./lib/rpmts.h 2010-03-25 14:43:41.000000000 +0000
@@ -469,6 +469,10 @@ rpmdb rpmtsGetRdb(rpmts ts);
void * rpmtsNotify(rpmts ts, rpmte te,
rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total);
+int rpmtsSuspendResumeDBLock(rpmts ts, int mode)
+ /*@globals fileSystem @*/
+ /*@modifies fileSystem @*/;
+
/** \ingroup rpmts
* Return number of (ordered) transaction set elements.
* @param ts transaction set

View File

@ -2,11 +2,9 @@ The taggedfileindex patch. Speeds up database searches, but breaks
fingerprint semantics. fingerprint semantics.
rh#103204 rh#103204
Index: lib/rpmdb.c --- ./lib/rpmdb.c.orig 2010-03-25 14:43:41.000000000 +0000
=================================================================== +++ ./lib/rpmdb.c 2010-03-25 15:15:14.000000000 +0000
--- lib/rpmdb.c.orig @@ -1122,6 +1122,16 @@ int rpmdbVerify(const char * prefix)
+++ lib/rpmdb.c
@@ -1107,6 +1107,16 @@ int rpmdbVerify(const char * prefix)
return rc; return rc;
} }
@ -23,7 +21,7 @@ Index: lib/rpmdb.c
/** /**
* Find file matches in database. * Find file matches in database.
* @param db rpm database * @param db rpm database
@@ -1169,6 +1179,11 @@ static int rpmdbFindByFile(rpmdb db, con @@ -1181,6 +1191,11 @@ static int rpmdbFindByFile(rpmdb db, con
if (rc == 0) if (rc == 0)
(void) dbt2set(dbi, data, &allMatches); (void) dbt2set(dbi, data, &allMatches);
@ -35,16 +33,16 @@ Index: lib/rpmdb.c
xx = dbiCclose(dbi, dbcursor, 0); xx = dbiCclose(dbi, dbcursor, 0);
dbcursor = NULL; dbcursor = NULL;
} else } else
@@ -2172,7 +2187,7 @@ void rpmdbSortIterator(rpmdbMatchIterato @@ -2182,7 +2197,7 @@ void rpmdbSortIterator(rpmdbMatchIterato
}
} }
/* LCL: segfault */
-static int rpmdbGrowIterator(rpmdbMatchIterator mi) -static int rpmdbGrowIterator(rpmdbMatchIterator mi)
+static int rpmdbGrowIterator(rpmdbMatchIterator mi, unsigned int tag) +static int rpmdbGrowIterator(rpmdbMatchIterator mi, unsigned int tag)
{ {
DBC * dbcursor; DBC * dbcursor;
DBT * key; DBT * key;
@@ -2222,6 +2237,27 @@ static int rpmdbGrowIterator(rpmdbMatchI @@ -2232,6 +2247,27 @@ static int rpmdbGrowIterator(rpmdbMatchI
dbcursor = NULL; dbcursor = NULL;
#endif #endif
@ -72,7 +70,7 @@ Index: lib/rpmdb.c
if (mi->mi_set == NULL) { if (mi->mi_set == NULL) {
mi->mi_set = set; mi->mi_set = set;
} else { } else {
@@ -2403,7 +2439,15 @@ int rpmdbExtendIterator(rpmdbMatchIterat @@ -2413,7 +2449,15 @@ int rpmdbExtendIterator(rpmdbMatchIterat
{ {
mi->mi_key.data = (void *) keyp; mi->mi_key.data = (void *) keyp;
mi->mi_key.size = keylen ? keylen : strlen(keyp); mi->mi_key.size = keylen ? keylen : strlen(keyp);
@ -89,7 +87,7 @@ Index: lib/rpmdb.c
} }
/* /*
@@ -2798,8 +2842,16 @@ int rpmdbAdd(rpmdb db, int iid, Header h @@ -2808,8 +2852,16 @@ int rpmdbAdd(rpmdb db, int iid, Header h
if (hdrNum) if (hdrNum)
{ {
@ -106,7 +104,7 @@ Index: lib/rpmdb.c
if (dbiTags.tags != NULL) if (dbiTags.tags != NULL)
for (dbix = 0; dbix < dbiTags.max; dbix++) { for (dbix = 0; dbix < dbiTags.max; dbix++) {
rpmTag rpmtag; rpmTag rpmtag;
@@ -2891,6 +2943,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h @@ -2901,6 +2953,10 @@ int rpmdbAdd(rpmdb db, int iid, Header h
*/ */
i = rec->tagNum = rpmtdGetIndex(&tagdata); i = rec->tagNum = rpmtdGetIndex(&tagdata);
switch (rpmtag) { switch (rpmtag) {
@ -117,7 +115,7 @@ Index: lib/rpmdb.c
case RPMTAG_REQUIRENAME: { case RPMTAG_REQUIRENAME: {
/* Filter out install prerequisites. */ /* Filter out install prerequisites. */
rpm_flag_t *rflag = rpmtdNextUint32(&reqflags); rpm_flag_t *rflag = rpmtdNextUint32(&reqflags);
@@ -2976,6 +3032,9 @@ cont: @@ -2986,6 +3042,9 @@ cont:
if (ret == 0) { if (ret == 0) {
headerSetInstance(h, hdrNum); headerSetInstance(h, hdrNum);
} }
@ -127,11 +125,9 @@ Index: lib/rpmdb.c
} }
exit: exit:
Index: lib/rpmdb_internal.h --- ./lib/rpmdb_internal.h.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./lib/rpmdb_internal.h 2010-03-25 15:14:38.000000000 +0000
--- lib/rpmdb_internal.h.orig @@ -542,6 +542,9 @@ const char *rpmdbHome(rpmdb db);
+++ lib/rpmdb_internal.h
@@ -540,6 +540,9 @@ unsigned int dbiIndexRecordFileNumber(db
int rpmdbExtendIterator(rpmdbMatchIterator mi, int rpmdbExtendIterator(rpmdbMatchIterator mi,
const void * keyp, size_t keylen); const void * keyp, size_t keylen);
@ -141,13 +137,11 @@ Index: lib/rpmdb_internal.h
/** \ingroup rpmdb /** \ingroup rpmdb
* sort the iterator by (recnum, filenum) * sort the iterator by (recnum, filenum)
* Return database iterator. * Return database iterator.
Index: lib/transaction.c --- ./lib/transaction.c.orig 2010-03-25 14:38:27.000000000 +0000
=================================================================== +++ ./lib/transaction.c 2010-03-25 15:14:38.000000000 +0000
--- lib/transaction.c.orig @@ -848,9 +848,12 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(
+++ lib/transaction.c
@@ -609,9 +609,12 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(
rpmdbMatchIterator mi; rpmdbMatchIterator mi;
int i, xx; int xx;
const char * baseName; const char * baseName;
+ const char * dirName; + const char * dirName;
@ -158,8 +152,8 @@ Index: lib/transaction.c
mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMTAG_BASENAMES, NULL, 0); mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMTAG_BASENAMES, NULL, 0);
@@ -629,18 +632,25 @@ rpmdbMatchIterator rpmFindBaseNamesInDB( @@ -868,18 +871,25 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(
while ((i = rpmfiNext(fi)) >= 0) { while (rpmfiNext(fi) >= 0) {
size_t keylen; size_t keylen;
baseName = rpmfiBN(fi); baseName = rpmfiBN(fi);
+ dirName = rpmfiDN(fi); + dirName = rpmfiDN(fi);

View File

@ -1,10 +1,9 @@
Fix global (DB_PRIVATE) lock code: fix recursion counter, retry Fix global (DB_PRIVATE) lock code: fix recursion counter, retry
failed lock operations for up to 3 minutes. failed lock operations for up to 3 minutes.
Index: lib/backend/db3.c
=================================================================== --- ./lib/backend/db3.c.orig 2010-03-25 14:44:42.000000000 +0000
--- lib/backend/db3.c.orig +++ ./lib/backend/db3.c 2010-03-25 14:52:05.000000000 +0000
+++ lib/backend/db3.c @@ -394,6 +394,8 @@ static int db3stat(dbiIndex dbi, unsigne
@@ -586,6 +586,8 @@ static int db3stat(dbiIndex dbi, unsigne
return rc; return rc;
} }
@ -13,18 +12,17 @@ Index: lib/backend/db3.c
static int db3close(dbiIndex dbi, unsigned int flags) static int db3close(dbiIndex dbi, unsigned int flags)
{ {
rpmdb rpmdb = dbi->dbi_rpmdb; rpmdb rpmdb = dbi->dbi_rpmdb;
@@ -632,6 +634,10 @@ static int db3close(dbiIndex dbi, unsign @@ -414,6 +416,9 @@ static int db3close(dbiIndex dbi, unsign
rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n", rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n",
dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag))); dbhome, dbi->dbi_file);
+ if (dbi->dbi_lockdbfd && + if (dbi->dbi_lockdbfd &&
+ !((dbi->dbi_ecflags & DB_CLIENT) && dbi->dbi_host) &&
+ _lockdbfd) + _lockdbfd)
+ _lockdbfd--; + _lockdbfd--;
} }
if (rpmdb->db_dbenv != NULL && dbi->dbi_use_dbenv) { if (rpmdb->db_dbenv != NULL && dbi->dbi_use_dbenv) {
@@ -899,8 +905,6 @@ static int db3open(rpmdb rpmdb, rpmTag r @@ -645,8 +651,6 @@ static int db3open(rpmdb rpmdb, rpmTag r
} }
if (rc == 0) { if (rc == 0) {
@ -33,7 +31,7 @@ Index: lib/backend/db3.c
rc = db_create(&db, dbenv, dbi->dbi_cflags); rc = db_create(&db, dbenv, dbi->dbi_cflags);
rc = cvtdberr(dbi, "db_create", rc, _debug); rc = cvtdberr(dbi, "db_create", rc, _debug);
if (rc == 0 && db != NULL) { if (rc == 0 && db != NULL) {
@@ -1082,6 +1086,7 @@ static int db3open(rpmdb rpmdb, rpmTag r @@ -810,6 +814,7 @@ static int db3open(rpmdb rpmdb, rpmTag r
if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) { if (!(db->fd(db, &fdno) == 0 && fdno >= 0)) {
rc = 1; rc = 1;
} else { } else {
@ -41,7 +39,7 @@ Index: lib/backend/db3.c
struct flock l; struct flock l;
memset(&l, 0, sizeof(l)); memset(&l, 0, sizeof(l));
l.l_whence = 0; l.l_whence = 0;
@@ -1091,24 +1096,40 @@ static int db3open(rpmdb rpmdb, rpmTag r @@ -819,24 +824,39 @@ static int db3open(rpmdb rpmdb, rpmTag r
? F_RDLCK : F_WRLCK; ? F_RDLCK : F_WRLCK;
l.l_pid = 0; l.l_pid = 0;
@ -49,27 +47,29 @@ Index: lib/backend/db3.c
- if (rc) { - if (rc) {
- /* Warning iff using non-private CDB locking. */ - /* Warning iff using non-private CDB locking. */
- rc = ((dbi->dbi_use_dbenv && - rc = ((dbi->dbi_use_dbenv &&
+ for (tries = 0; ; tries++) { - (dbi->dbi_eflags & DB_INIT_CDB) &&
+ rc = fcntl(fdno, F_SETLK, (void *) &l); - !(dbi->dbi_eflags & DB_PRIVATE))
+ if (rc) {
+ rc = ((dbi->dbi_use_dbenv &&
(dbi->dbi_eflags & DB_INIT_CDB) &&
!(dbi->dbi_eflags & DB_PRIVATE))
- ? 0 : 1); - ? 0 : 1);
- rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING), - rpmlog( (rc ? RPMLOG_ERR : RPMLOG_WARNING),
- _("cannot get %s lock on %s/%s\n"), - _("cannot get %s lock on %s/%s\n"),
- ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY) - ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY)
- ? _("shared") : _("exclusive"), - ? _("shared") : _("exclusive"),
- dbhome, (dbfile ? dbfile : "")); - dbhome, dbi->dbi_file);
- } else if (dbfile) { - } else {
- rpmlog(RPMLOG_DEBUG, - rpmlog(RPMLOG_DEBUG,
- "locked db index %s/%s\n", - "locked db index %s/%s\n",
- dbhome, dbfile); - dbhome, dbi->dbi_file);
+ for (tries = 0; ; tries++) {
+ rc = fcntl(fdno, F_SETLK, (void *) &l);
+ if (rc) {
+ rc = ((dbi->dbi_use_dbenv &&
+ (dbi->dbi_eflags & DB_INIT_CDB) &&
+ !(dbi->dbi_eflags & DB_PRIVATE))
+ ? 0 : 1); + ? 0 : 1);
+ if (errno == EAGAIN && rc) { + if (errno == EAGAIN && rc) {
+ struct timespec ts; + struct timespec ts;
+ if (tries == 0) + if (tries == 0)
+ rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, (dbfile ? dbfile : "")); + rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s/%s\n"), ((dbi->dbi_mode & (O_RDWR|O_WRONLY)) ? _("exclusive") : _("shared")), dbhome, dbi->dbi_file);
+ ts.tv_sec = (time_t)0; + ts.tv_sec = (time_t)0;
+ ts.tv_nsec = 100000000; + ts.tv_nsec = 100000000;
+ if (tries < 10*60*3) { + if (tries < 10*60*3) {
@ -81,14 +81,13 @@ Index: lib/backend/db3.c
+ _("cannot get %s lock on %s/%s\n"), + _("cannot get %s lock on %s/%s\n"),
+ ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY) + ((dbi->dbi_mode & O_ACCMODE) == O_RDONLY)
+ ? _("shared") : _("exclusive"), + ? _("shared") : _("exclusive"),
+ dbhome, (dbfile ? dbfile : "")); + dbhome, dbi->dbi_file);
+ } else if (dbfile) { + } else {
+ rpmlog(RPMLOG_DEBUG, + rpmlog(RPMLOG_DEBUG,
+ "locked db index %s/%s\n", + "locked db index %s/%s\n",
+ dbhome, dbfile); + dbhome, dbi->dbi_file);
+ break;
+ } + }
+ + break;
} }
} }
+ if (rc && dbi->dbi_use_dbenv) + if (rc && dbi->dbi_use_dbenv)

View File

@ -14,11 +14,9 @@ B) use RPMSENSE_STRONG to support a "strong" version, "Recommends"
Needs extcond.diff for query operations. Needs extcond.diff for query operations.
Index: build/parsePreamble.c --- ./build/parsePreamble.c.orig 2009-12-17 09:05:55.000000000 +0000
=================================================================== +++ ./build/parsePreamble.c 2010-03-25 14:56:24.000000000 +0000
--- build/parsePreamble.c.orig @@ -124,6 +124,8 @@ static struct tokenBits_s const installS
+++ build/parsePreamble.c
@@ -122,6 +122,8 @@ static struct tokenBits_s const installS
{ "post", RPMSENSE_SCRIPT_POST }, { "post", RPMSENSE_SCRIPT_POST },
{ "rpmlib", RPMSENSE_RPMLIB }, { "rpmlib", RPMSENSE_RPMLIB },
{ "verify", RPMSENSE_SCRIPT_VERIFY }, { "verify", RPMSENSE_SCRIPT_VERIFY },
@ -27,7 +25,7 @@ Index: build/parsePreamble.c
{ NULL, 0 } { NULL, 0 }
}; };
@@ -132,6 +134,8 @@ static const struct tokenBits_s const bu @@ -134,6 +136,8 @@ static const struct tokenBits_s const bu
{ "build", RPMSENSE_SCRIPT_BUILD }, { "build", RPMSENSE_SCRIPT_BUILD },
{ "install", RPMSENSE_SCRIPT_INSTALL }, { "install", RPMSENSE_SCRIPT_INSTALL },
{ "clean", RPMSENSE_SCRIPT_CLEAN }, { "clean", RPMSENSE_SCRIPT_CLEAN },
@ -36,7 +34,7 @@ Index: build/parsePreamble.c
{ NULL, 0 } { NULL, 0 }
}; };
@@ -637,6 +641,18 @@ static int handlePreambleTag(rpmSpec spe @@ -649,6 +653,18 @@ static int handlePreambleTag(rpmSpec spe
if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags)))
return rc; return rc;
break; break;
@ -55,26 +53,24 @@ Index: build/parsePreamble.c
case RPMTAG_EXCLUDEARCH: case RPMTAG_EXCLUDEARCH:
case RPMTAG_EXCLUSIVEARCH: case RPMTAG_EXCLUSIVEARCH:
case RPMTAG_EXCLUDEOS: case RPMTAG_EXCLUDEOS:
@@ -734,6 +750,14 @@ static struct PreambleRec_s preambleList @@ -748,6 +764,14 @@ static struct PreambleRec_s const preamb
{RPMTAG_AUTOPROV, 0, 0, 0, "autoprov"}, {RPMTAG_DOCDIR, 0, 0, LEN_AND_STR("docdir")},
{RPMTAG_DOCDIR, 0, 0, 0, "docdir"}, {RPMTAG_DISTTAG, 0, 0, LEN_AND_STR("disttag")},
{RPMTAG_DISTTAG, 0, 0, 0, "disttag"}, {RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")},
+ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "recommends"}, + {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("recommends")},
+ {RPMTAG_SUGGESTSFLAGS, 0, 0, 0, "suggests"}, + {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("suggests")},
+ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "supplements"}, + {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("supplements")},
+ {RPMTAG_ENHANCESFLAGS, 0, 0, 0, "enhances"}, + {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("enhances")},
+ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildrecommends"}, + {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildrecommends")},
+ {RPMTAG_BUILDSUGGESTS, 0, 0, 0, "buildsuggests"}, + {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildsuggests")},
+ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildsupplements"}, + {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildsupplements")},
+ {RPMTAG_BUILDENHANCES, 0, 0, 0, "buildenhances"}, + {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildenhances")},
/* LCL: can't add null annotation */ {0, 0, 0, 0}
{0, 0, 0, 0, 0}
}; };
Index: build/parseReqs.c
=================================================================== --- ./build/parseReqs.c.orig 2009-12-17 09:05:55.000000000 +0000
--- build/parseReqs.c.orig +++ ./build/parseReqs.c 2010-03-25 14:53:47.000000000 +0000
+++ build/parseReqs.c @@ -85,6 +85,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
@@ -84,6 +84,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
tagflags |= RPMSENSE_ANY; tagflags |= RPMSENSE_ANY;
h = spec->buildRestrictions; h = spec->buildRestrictions;
break; break;
@ -89,11 +85,9 @@ Index: build/parseReqs.c
default: default:
case RPMTAG_REQUIREFLAGS: case RPMTAG_REQUIREFLAGS:
tagflags |= RPMSENSE_ANY; tagflags |= RPMSENSE_ANY;
Index: build/reqprov.c --- ./build/reqprov.c.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./build/reqprov.c 2010-03-25 14:53:47.000000000 +0000
--- build/reqprov.c.orig @@ -75,6 +75,16 @@ int addReqProv(rpmSpec spec, Header h, r
+++ build/reqprov.c
@@ -43,6 +43,16 @@ int addReqProv(rpmSpec spec, Header h, r
flagtag = RPMTAG_TRIGGERFLAGS; flagtag = RPMTAG_TRIGGERFLAGS;
indextag = RPMTAG_TRIGGERINDEX; indextag = RPMTAG_TRIGGERINDEX;
extra = Flags & RPMSENSE_TRIGGER; extra = Flags & RPMSENSE_TRIGGER;
@ -110,11 +104,9 @@ Index: build/reqprov.c
} else { } else {
nametag = RPMTAG_REQUIRENAME; nametag = RPMTAG_REQUIRENAME;
versiontag = RPMTAG_REQUIREVERSION; versiontag = RPMTAG_REQUIREVERSION;
Index: build/rpmfc.c --- ./build/rpmfc.c.orig 2009-12-09 13:37:25.000000000 +0000
=================================================================== +++ ./build/rpmfc.c 2010-03-25 14:53:47.000000000 +0000
--- build/rpmfc.c.orig @@ -1405,6 +1405,12 @@ static struct DepMsg_s depMsgs[] = {
+++ build/rpmfc.c
@@ -1377,6 +1377,12 @@ static struct DepMsg_s depMsgs[] = {
{ "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL },
RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS,
0, -1 }, 0, -1 },
@ -127,7 +119,7 @@ Index: build/rpmfc.c
{ NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 }
}; };
@@ -1467,6 +1473,14 @@ static int rpmfcGenerateDependsHelper(co @@ -1490,6 +1496,14 @@ static int rpmfcGenerateDependsHelper(co
failnonzero = 0; failnonzero = 0;
tagflags = RPMSENSE_FIND_REQUIRES; tagflags = RPMSENSE_FIND_REQUIRES;
break; break;
@ -142,66 +134,9 @@ Index: build/rpmfc.c
default: default:
continue; continue;
break; break;
Index: python/rpmmodule.c --- ./lib/formats.c.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./lib/formats.c 2010-03-25 15:00:15.000000000 +0000
--- python/rpmmodule.c.orig @@ -601,6 +601,24 @@ static char * depflagsFormat(rpmtd td, c
+++ python/rpmmodule.c
@@ -387,7 +387,7 @@ void init_rpm(void)
REGISTER_ENUM(RPMSENSE_RPMLIB);
REGISTER_ENUM(RPMSENSE_TRIGGERPREIN);
REGISTER_ENUM(RPMSENSE_KEYRING);
- REGISTER_ENUM(RPMSENSE_PATCHES);
+ REGISTER_ENUM(RPMSENSE_STRONG);
REGISTER_ENUM(RPMSENSE_CONFIG);
REGISTER_ENUM(RPMTRANS_FLAG_TEST);
Index: lib/rpmds.c
===================================================================
--- lib/rpmds.c.orig
+++ lib/rpmds.c
@@ -73,6 +73,10 @@ static int dsType(rpmTag tag,
t = "Trigger";
evr = RPMTAG_TRIGGERVERSION;
f = RPMTAG_TRIGGERFLAGS;
+ } else if (tag == RPMTAG_ENHANCESNAME) {
+ t = "Enhances";
+ evr = RPMTAG_ENHANCESVERSION;
+ f = RPMTAG_ENHANCESFLAGS;
} else {
rc = 1;
}
Index: rpmpopt.in
===================================================================
--- rpmpopt.in.orig
+++ rpmpopt.in
@@ -65,6 +65,22 @@ rpm alias --requires --qf \
--POPTdesc=$"list capabilities required by package(s)"
rpm alias -R --requires
+rpm alias --suggests --qf \
+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package suggests"
+
+rpm alias --recommends --qf \
+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package recommends"
+
+rpm alias --enhances --qf \
+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package enhances"
+
+rpm alias --supplements --qf \
+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package supplements"
+
rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\
Index: lib/formats.c
===================================================================
--- lib/formats.c.orig
+++ lib/formats.c
@@ -601,6 +601,25 @@ static char * depflagsFormat(rpmtd td, c
return val; return val;
} }
@ -220,24 +155,34 @@ Index: lib/formats.c
+ strcat(formatPrefix, "s"); + strcat(formatPrefix, "s");
+ rasprintf(&val, formatPrefix, buf); + rasprintf(&val, formatPrefix, buf);
+ } + }
+
+ return val; + return val;
+} +}
+ +
/** /**
* Return tag container array size. * Return tag container array size.
* @param td tag data container * @param td tag data container
@@ -661,5 +680,6 @@ static const struct headerFormatFunc_s r @@ -738,5 +756,6 @@ static const struct headerFormatFunc_s r
{ RPMTD_FORMAT_DAY, "day", dayFormat },
{ RPMTD_FORMAT_SHESCAPE, "shescape", shescapeFormat },
{ RPMTD_FORMAT_ARRAYSIZE, "arraysize", arraysizeFormat }, { RPMTD_FORMAT_ARRAYSIZE, "arraysize", arraysizeFormat },
+ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", { depflag_strongFormat } }, { RPMTD_FORMAT_FSTATE, "fstate", fstateFormat },
{ RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat },
+ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", depflag_strongFormat },
{ -1, NULL, NULL } { -1, NULL, NULL }
}; };
Index: lib/rpmds.h --- ./lib/rpmds.c.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./lib/rpmds.c 2010-03-25 14:53:47.000000000 +0000
--- lib/rpmds.h.orig @@ -66,6 +66,10 @@ static int dsType(rpmTag tag,
+++ lib/rpmds.h t = "Trigger";
evr = RPMTAG_TRIGGERVERSION;
f = RPMTAG_TRIGGERFLAGS;
+ } else if (tag == RPMTAG_ENHANCESNAME) {
+ t = "Enhances";
+ evr = RPMTAG_ENHANCESVERSION;
+ f = RPMTAG_ENHANCESFLAGS;
} else {
rc = 1;
}
--- ./lib/rpmds.h.orig 2010-03-24 16:47:28.000000000 +0000
+++ ./lib/rpmds.h 2010-03-25 14:53:47.000000000 +0000
@@ -55,7 +55,7 @@ typedef enum rpmsenseFlags_e { @@ -55,7 +55,7 @@ typedef enum rpmsenseFlags_e {
RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */
RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */
@ -255,22 +200,8 @@ Index: lib/rpmds.h
RPMSENSE_SCRIPT_PREP | \ RPMSENSE_SCRIPT_PREP | \
RPMSENSE_SCRIPT_BUILD | \ RPMSENSE_SCRIPT_BUILD | \
RPMSENSE_SCRIPT_INSTALL | \ RPMSENSE_SCRIPT_INSTALL | \
Index: lib/rpmtd.h --- ./lib/rpmtag.h.orig 2009-12-07 14:36:49.000000000 +0000
=================================================================== +++ ./lib/rpmtag.h 2010-03-25 14:53:47.000000000 +0000
--- lib/rpmtd.h.orig
+++ lib/rpmtd.h
@@ -214,6 +214,7 @@ typedef enum rpmtdFormats_e {
RPMTD_FORMAT_SHESCAPE = 13, /* shell escaped (any type) */
RPMTD_FORMAT_ARRAYSIZE = 14, /* size of contained array (any type) */
RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int32 types) */
+ RPMTD_FORMAT_DEPFLAG_STRONG = 16, /* strong dependency */
} rpmtdFormats;
/** \ingroup rpmtd
Index: lib/rpmtag.h
===================================================================
--- lib/rpmtag.h.orig
+++ lib/rpmtag.h
@@ -228,14 +228,14 @@ typedef enum rpmTag_e { @@ -228,14 +228,14 @@ typedef enum rpmTag_e {
RPMTAG_PRETRANSPROG = 1153, /* s */ RPMTAG_PRETRANSPROG = 1153, /* s */
RPMTAG_POSTTRANSPROG = 1154, /* s */ RPMTAG_POSTTRANSPROG = 1154, /* s */
@ -294,3 +225,49 @@ Index: lib/rpmtag.h
RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */
RPMTAG_CVSID = 1163, /* s (unimplemented) */ RPMTAG_CVSID = 1163, /* s (unimplemented) */
#define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */
--- ./lib/rpmtd.h.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./lib/rpmtd.h 2010-03-25 14:58:31.000000000 +0000
@@ -216,6 +216,7 @@ typedef enum rpmtdFormats_e {
RPMTD_FORMAT_DEPTYPE = 15, /* dependency types (int types) */
RPMTD_FORMAT_FSTATE = 16, /* file states (int types) */
RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int types) */
+ RPMTD_FORMAT_DEPFLAG_STRONG = 18, /* strong dependency */
} rpmtdFormats;
/** \ingroup rpmtd
--- ./python/rpmmodule.c.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./python/rpmmodule.c 2010-03-25 14:53:47.000000000 +0000
@@ -373,7 +373,7 @@ static int initModule(PyObject *m)
REGISTER_ENUM(RPMSENSE_RPMLIB);
REGISTER_ENUM(RPMSENSE_TRIGGERPREIN);
REGISTER_ENUM(RPMSENSE_KEYRING);
- REGISTER_ENUM(RPMSENSE_PATCHES);
+ REGISTER_ENUM(RPMSENSE_STRONG);
REGISTER_ENUM(RPMSENSE_CONFIG);
REGISTER_ENUM(RPMTRANS_FLAG_TEST);
--- ./rpmpopt.in.orig 2009-12-07 14:36:49.000000000 +0000
+++ ./rpmpopt.in 2010-03-25 14:53:47.000000000 +0000
@@ -65,6 +65,22 @@ rpm alias --requires --qf \
--POPTdesc=$"list capabilities required by package(s)"
rpm alias -R --requires
+rpm alias --suggests --qf \
+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package suggests"
+
+rpm alias --recommends --qf \
+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package recommends"
+
+rpm alias --enhances --qf \
+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package enhances"
+
+rpm alias --supplements --qf \
+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
+ --POPTdesc=$"list capabilities this package supplements"
+
rpm alias --info --qf 'Name : %-27{NAME} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocatable)}|\n\
Version : %-27{VERSION} Vendor: %{VENDOR}\n\
Release : %-27{RELEASE} Build Date: %{BUILDTIME:date}\n\