diff --git a/brp.diff b/brp.diff index 8f6f59e..bc3aab2 100644 --- a/brp.diff +++ b/brp.diff @@ -1,26 +1,36 @@ ---- scripts/brp-strip -+++ scripts/brp-strip -@@ -15,6 +15,7 @@ - for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ - grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ - grep -v ' shared object,' | \ -+ grep -v '/lib/modules/' | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - $STRIP -g "$f" || : - done ---- scripts/brp-strip-comment-note -+++ scripts/brp-strip-comment-note -@@ -16,6 +16,8 @@ +--- ./scripts/Makefile.am.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./scripts/Makefile.am 2012-06-01 11:39:13.000000000 +0000 +@@ -25,6 +25,7 @@ EXTRA_DIST = \ + rpmconfig_SCRIPTS = \ + brp-compress brp-python-bytecompile brp-java-gcjcompile \ + brp-strip brp-strip-comment-note brp-python-hardlink \ ++ brp-suse \ + brp-strip-shared brp-strip-static-archive \ + check-files check-prereqs \ + check-buildroot check-rpaths check-rpaths-worker \ +--- ./scripts/brp-strip-comment-note.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./scripts/brp-strip-comment-note 2012-06-01 11:39:13.000000000 +0000 +@@ -16,6 +16,8 @@ esac # for already stripped elf files in the build root - for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ + for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ + grep -v ' shared object,' | \ + grep -v '/lib/modules/' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do note="-R .note" if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ ---- scripts/brp-suse -+++ scripts/brp-suse +--- ./scripts/brp-strip.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./scripts/brp-strip 2012-06-01 11:39:13.000000000 +0000 +@@ -15,6 +15,7 @@ esac + for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ + grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ + grep -v ' shared object,' | \ ++ grep -v '/lib/modules/' | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do + $STRIP -g "$f" || : + done +--- ./scripts/brp-suse.orig 2012-06-01 11:39:13.000000000 +0000 ++++ ./scripts/brp-suse 2012-06-01 11:39:13.000000000 +0000 @@ -0,0 +1,13 @@ +#! /bin/sh + @@ -35,13 +45,3 @@ + $script || exit 1 + fi +done ---- scripts/Makefile.am -+++ scripts/Makefile.am -@@ -25,6 +25,7 @@ - rpmconfig_SCRIPTS = \ - brp-compress brp-python-bytecompile brp-java-gcjcompile \ - brp-strip brp-strip-comment-note brp-python-hardlink \ -+ brp-suse \ - brp-strip-shared brp-strip-static-archive \ - check-files check-prereqs \ - check-buildroot check-rpaths check-rpaths-worker \ diff --git a/brpcompress.diff b/brpcompress.diff index 07e5174..475265b 100644 --- a/brpcompress.diff +++ b/brpcompress.diff @@ -8,7 +8,7 @@ +LANG= +LC_TIME=POSIX + - cd $RPM_BUILD_ROOT + cd "$RPM_BUILD_ROOT" # Compress man pages COMPRESS="gzip -9 -n" diff --git a/build.diff b/build.diff index 4522672..b464985 100644 --- a/build.diff +++ b/build.diff @@ -1,40 +1,5 @@ -Many changes to Makefiles/autogen and the like to make it build -on SUSE systems. - -Index: configure.ac -=================================================================== ---- configure.ac.orig 2011-12-11 09:36:44.163526074 +0100 -+++ configure.ac 2011-12-11 09:36:44.826494708 +0100 -@@ -849,6 +849,7 @@ arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm - mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;; - mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;; - m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;; -+parisc*|hppa*) RPMCANONCOLOR=0; RPMCANONARCH=hppa ;; - sh3*) RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;; - sh4*) RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;; - *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;; -@@ -859,6 +860,7 @@ esac - RPMCANONVENDOR="$build_vendor" - case "${build_vendor}" in - unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse) -+ RPMCANONVENDOR=suse - test -f /etc/redhat-release && RPMCANONVENDOR=redhat - test -f /etc/SuSE-release && RPMCANONVENDOR=suse - test -f /etc/pld-release && RPMCANONVENDOR=pld -@@ -871,6 +873,9 @@ unknown|pc|ibm|redhat|pld|mandrake|conec - esac - RPMCANONOS="$host_os_noversion" - RPMCANONGNU="$host_os_gnu" -+if test "$RPMCANONVENDOR" = suse ; then -+ RPMCANONCOLOR=0 -+fi - AC_SUBST(RPMCANONCOLOR) - AC_SUBST(RPMCANONARCH) - AC_SUBST(RPMCANONVENDOR) -Index: db3/configure -=================================================================== ---- db3/configure.orig 2011-12-11 09:34:48.129015541 +0100 -+++ db3/configure 2011-12-11 09:36:44.826494708 +0100 +--- ./db3/configure.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./db3/configure 2012-06-01 12:55:07.000000000 +0000 @@ -10,9 +10,9 @@ rm -f config.cache # XXX edit CFLAGS= ... out of invocation args ??? ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`" @@ -47,26 +12,17 @@ Index: db3/configure mv Makefile Makefile.orig cat Makefile.orig | sed -e '/^install[:-]/c\ -Index: installplatform -=================================================================== ---- installplatform.orig 2011-12-11 09:34:48.139015072 +0100 -+++ installplatform 2011-12-11 09:37:38.621949601 +0100 -@@ -19,7 +19,7 @@ RPMRC_GNU="`$RPM --eval '%{_gnu}'`" - case "$arch" in - i[3456]86|pentium[34]|athlon|geode) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_pentium3_ s_i386_pentium4_ s_i386_athlon_ s_i386_geode_' ;; - alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;; -- arm*) SUBSTS='s_arm_arm_ s_arm_armv3l_ s_arm_armv4l_ s_arm_armv4tl_ s_arm_armv5tel_ s_arm_armv5tejl_ s_arm_armv6l_ s_arm_armv7l_' ;; -+ arm*) SUBSTS='s_arm_arm_ s_arm_armv3l_ s_arm_armv4l_ s_arm_armv4tl_ s_arm_armv5tel_ s_arm_armv5tejl_ s_arm_armv6l_ s_arm_armv7l_ s_arm_armv7hl_' ;; - sh4*) SUBSTS='s_sh4_sh4_ s_sh4_sh4a_' ;; - sparc*) SUBSTS='s_sparc\(64\|64v\|v9v\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;; - powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;; -@@ -129,6 +129,9 @@ for SUBST in $SUBSTS ; do - apple) - VENDORSED='-e s,^@apple@,,' - ;; -+ suse) -+ VENDORSED='-e s,^@SuSE@,,' -+ ;; - esac +--- ./installplatform.orig 2012-03-30 07:05:20.000000000 +0000 ++++ ./installplatform 2012-06-01 13:03:48.000000000 +0000 +@@ -118,6 +118,11 @@ for ARCH in noarch `grep ^arch_canon $RP + PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}" + [ -d $PPD ] || mkdir -p $PPD - CANONARCH="`echo $ARCH|sed -e "$canonarch_sed"`" ++ if [ "$VENDOR" = suse ] ; then ++ # suse doesn't do colors ++ CANONCOLOR=0 ++ fi ++ + cat $PLATFORM \ + | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \ + -e "s,@RPMCANONARCH@,$CANONARCH,g" \ diff --git a/buildpipe.diff b/buildpipe.diff deleted file mode 100644 index 1867bda..0000000 --- a/buildpipe.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- ./build/rpmfc.c.orig 2011-07-18 17:40:37.000000000 +0000 -+++ ./build/rpmfc.c 2011-07-18 17:40:56.000000000 +0000 -@@ -182,12 +182,14 @@ static int sigpipe_init(void) - fcntl(_sigpipe[1], F_SETFD, (fcntl(_sigpipe[1], F_GETFD)|FD_CLOEXEC)); - /* XXX SIGPIPE too, but NSPR disables it already, dont mess with it */ - signal(SIGCHLD, sigpipe_handler); -+ signal(SIGPIPE, SIG_IGN); - return _sigpipe[0]; - } - - static void sigpipe_finish(void) - { - signal(SIGCHLD, SIG_DFL); -+ signal(SIGPIPE, SIG_DFL); - close(_sigpipe[0]); - close(_sigpipe[1]); - _sigpipe[0] = -1; diff --git a/dbprivate.diff b/dbprivate.diff index 48d3912..c92bafe 100644 --- a/dbprivate.diff +++ b/dbprivate.diff @@ -1,11 +1,11 @@ Always use DB_PRIVATE. Unfortunately no longer configurable in the macros file. ---- lib/backend/db3.c.orig 2011-05-12 15:38:18.000000000 +0000 -+++ lib/backend/db3.c 2011-05-12 15:38:41.000000000 +0000 -@@ -119,7 +119,7 @@ static int db_init(rpmdb rdb, const char +--- ./lib/backend/db3.c.orig 2012-06-01 13:34:25.000000000 +0000 ++++ ./lib/backend/db3.c 2012-06-01 13:34:32.000000000 +0000 +@@ -124,7 +124,7 @@ static int db_init(rpmdb rdb, const char int retry_open = 2; - struct _dbConfig * cfg = &rdb->cfg; + struct dbConfig_s * cfg = &rdb->cfg; /* This is our setup, thou shall not have other setups before us */ - uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB); + uint32_t eflags = (DB_CREATE|DB_INIT_MPOOL|DB_INIT_CDB|DB_PRIVATE); diff --git a/debugedit-stabs-warning.diff b/debugedit-stabs-warning.diff deleted file mode 100644 index 24fea63..0000000 --- a/debugedit-stabs-warning.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- tools/debugedit.c.stabs 2011-07-29 14:32:45.000000000 +0200 -+++ tools/debugedit.c 2011-07-29 14:32:50.000000000 +0200 -@@ -1657,7 +1657,7 @@ - if (strcmp (name, ".stab") == 0) - { - fprintf (stderr, "Stabs debuginfo not supported: %s\n", file); -- exit (1); -+ break; - } - if (strcmp (name, ".debug_info") == 0) - edit_dwarf2 (dso); diff --git a/debugedit.diff b/debugedit.diff index ad9ec99..e4d3736 100644 --- a/debugedit.diff +++ b/debugedit.diff @@ -1,8 +1,8 @@ Make debugedit build without dwarf.h ---- ./Makefile.am.orig 2010-12-22 11:17:20.000000000 +0000 -+++ ./Makefile.am 2011-05-10 16:03:49.000000000 +0000 -@@ -143,7 +143,6 @@ rpm2cpio_LDADD += @WITH_NSS_LIB@ @WITH_P +--- ./Makefile.am.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./Makefile.am 2012-06-01 10:05:04.000000000 +0000 +@@ -149,7 +149,6 @@ rpm2cpio_LDADD += @WITH_NSS_LIB@ @WITH_P if LIBELF @@ -10,16 +10,16 @@ Make debugedit build without dwarf.h rpmconfig_SCRIPTS += scripts/find-debuginfo.sh rpmlibexec_PROGRAMS += debugedit -@@ -156,7 +155,6 @@ elfdeps_SOURCES = tools/elfdeps.c +@@ -162,7 +161,6 @@ elfdeps_SOURCES = tools/elfdeps.c elfdeps_LDADD = rpmio/librpmio.la elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@ endif -endif - rpmlibexec_PROGRAMS += javadeps - javadeps_SOURCES = tools/javadeps.c ---- ./tools/debugedit.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./tools/debugedit.c 2011-05-10 16:03:49.000000000 +0000 + rpmlibexec_PROGRAMS += rpmdeps + rpmdeps_SOURCES = tools/rpmdeps.c +--- ./tools/debugedit.c.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./tools/debugedit.c 2012-06-01 10:05:04.000000000 +0000 @@ -37,7 +37,37 @@ #include diff --git a/debugsubpkg.diff b/debugsubpkg.diff index 2f9157e..4a57d05 100644 --- a/debugsubpkg.diff +++ b/debugsubpkg.diff @@ -1,19 +1,19 @@ Create a debuginfo package for each subpackage. ---- ./build/files.c.orig 2011-05-13 15:34:01.000000000 +0000 -+++ ./build/files.c 2011-05-13 15:35:42.000000000 +0000 -@@ -20,6 +20,10 @@ - #include /* rpmDoDigest() */ +--- ./build/files.c.orig 2012-06-01 13:13:45.000000000 +0000 ++++ ./build/files.c 2012-06-01 13:14:18.000000000 +0000 +@@ -21,6 +21,10 @@ #include + #include +#if HAVE_GELF_H +#include +#endif + #include "rpmio/rpmio_internal.h" /* XXX rpmioSlurp */ - #include "rpmio/base64.h" #include "misc/fts.h" -@@ -2105,13 +2109,237 @@ exit: + #include "lib/cpio.h" +@@ -2097,13 +2101,237 @@ exit: return rc; } @@ -251,7 +251,7 @@ Create a debuginfo package for each subpackage. genSourceRpmName(spec); for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -@@ -2127,8 +2355,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r +@@ -2119,8 +2347,12 @@ rpmRC processBinaryFiles(rpmSpec spec, r rpmlog(RPMLOG_NOTICE, _("Processing files: %s\n"), nvr); free(nvr); @@ -266,9 +266,9 @@ Create a debuginfo package for each subpackage. goto exit; a = headerGetString(pkg->header, RPMTAG_ARCH); ---- ./macros.in.orig 2011-05-13 15:34:01.000000000 +0000 -+++ ./macros.in 2011-05-13 15:34:10.000000000 +0000 -@@ -179,24 +179,10 @@ +--- ./macros.in.orig 2012-06-01 13:13:45.000000000 +0000 ++++ ./macros.in 2012-06-01 13:14:18.000000000 +0000 +@@ -182,24 +182,10 @@ # Template for debug information sub-package. %debug_package \ %global __debug_package 1\ @@ -293,15 +293,15 @@ Create a debuginfo package for each subpackage. %description debugsource\ This package provides debug sources for package %{name}.\ Debug sources are useful when developing applications that use this\ ---- ./scripts/find-debuginfo.sh.orig 2011-05-13 15:34:01.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-13 15:34:10.000000000 +0000 -@@ -277,19 +277,11 @@ while read nlinks inum f; do +--- ./scripts/find-debuginfo.sh.orig 2012-06-01 13:13:45.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2012-06-01 13:15:56.000000000 +0000 +@@ -311,19 +311,11 @@ while read nlinks inum f; do fi done || exit -# For each symlink whose target has a .debug file, -# make a .debug symlink to that file. --find $RPM_BUILD_ROOT ! -path "${debugdir}/*" -type l -print | +-find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print | -while read f -do - t=$(readlink -m "$f").debug diff --git a/fileattrs.diff b/fileattrs.diff index 35f2335..6cfb0c5 100644 --- a/fileattrs.diff +++ b/fileattrs.diff @@ -1,50 +1,5 @@ -Index: fileattrs/debuginfo.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/debuginfo.attr 2011-12-15 13:47:26.745458876 +0100 -@@ -0,0 +1,2 @@ -+%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov -+%__debuginfo_path ^/usr/lib/debug/ -Index: fileattrs/elf.attr -=================================================================== ---- fileattrs/elf.attr.orig 2011-07-15 11:32:41.000000000 +0200 -+++ fileattrs/elf.attr 2011-12-15 13:47:26.786456954 +0100 -@@ -1,4 +1,5 @@ - %__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} - %__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} --%__elf_magic ^(sticky )?ELF (32|64)-bit.*$ -+%__elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*executable - %__elf_flags exeonly -+%__elf_exclude_path ^/usr/lib/debug/ -Index: fileattrs/elflib.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/elflib.attr 2011-12-15 13:47:26.786456954 +0100 -@@ -0,0 +1,4 @@ -+%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private} -+%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private} -+%__elflib_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*shared object -+%__elflib_exclude_path ^/usr/lib/debug/ -Index: fileattrs/firmware.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/firmware.attr 2011-12-15 13:47:26.787456907 +0100 -@@ -0,0 +1,2 @@ -+%__firmware_provides %{_rpmconfigdir}/firmware.prov -+%__firmware_path /lib/firmware/ -Index: fileattrs/ksyms.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/ksyms.attr 2011-12-15 13:47:26.787456907 +0100 -@@ -0,0 +1,4 @@ -+%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name -+%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name -+%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name -+%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$ -Index: fileattrs/Makefile.am -=================================================================== ---- fileattrs/Makefile.am.orig 2011-07-12 13:28:13.000000000 +0200 -+++ fileattrs/Makefile.am 2011-12-15 13:47:42.690700975 +0100 +--- ./fileattrs/Makefile.am.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./fileattrs/Makefile.am 2012-06-01 13:39:16.000000000 +0000 @@ -6,6 +6,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs fattrs_DATA = \ @@ -54,30 +9,57 @@ Index: fileattrs/Makefile.am + debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr EXTRA_DIST = $(fattrs_DATA) -Index: fileattrs/perl.attr -=================================================================== ---- fileattrs/perl.attr.orig 2011-07-12 13:28:13.000000000 +0200 -+++ fileattrs/perl.attr 2011-12-15 13:47:26.788456860 +0100 +--- ./fileattrs/debuginfo.attr.orig 2012-06-01 13:39:16.000000000 +0000 ++++ ./fileattrs/debuginfo.attr 2012-06-01 13:39:16.000000000 +0000 +@@ -0,0 +1,2 @@ ++%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov ++%__debuginfo_path ^/usr/lib/debug/ +--- ./fileattrs/elf.attr.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./fileattrs/elf.attr 2012-06-01 13:40:16.000000000 +0000 +@@ -1,4 +1,5 @@ + %__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private} + %__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private} +-%__elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*$ ++%__elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*executable + %__elf_flags exeonly ++%__elf_exclude_path ^/usr/lib/debug/ +--- ./fileattrs/elflib.attr.orig 2012-06-01 13:39:16.000000000 +0000 ++++ ./fileattrs/elflib.attr 2012-06-01 13:39:16.000000000 +0000 +@@ -0,0 +1,4 @@ ++%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private} ++%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private} ++%__elflib_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*shared object ++%__elflib_exclude_path ^/usr/lib/debug/ +--- ./fileattrs/firmware.attr.orig 2012-06-01 13:39:16.000000000 +0000 ++++ ./fileattrs/firmware.attr 2012-06-01 13:39:16.000000000 +0000 +@@ -0,0 +1,2 @@ ++%__firmware_provides %{_rpmconfigdir}/firmware.prov ++%__firmware_path /lib/firmware/ +--- ./fileattrs/ksyms.attr.orig 2012-06-01 13:39:16.000000000 +0000 ++++ ./fileattrs/ksyms.attr 2012-06-01 13:39:16.000000000 +0000 +@@ -0,0 +1,4 @@ ++%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name ++%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name ++%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name ++%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$ +--- ./fileattrs/perl.attr.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./fileattrs/perl.attr 2012-06-01 13:39:16.000000000 +0000 @@ -1,3 +1,4 @@ -%__perl_requires %{_rpmconfigdir}/perl.req +# disabled for now +#%__perl_requires %{_rpmconfigdir}/perl.req - %__perl_magic ^.*perl .*$ + %__perl_magic ^.*[Pp]erl .*$ %__perl_flags exeonly -Index: fileattrs/perllib.attr -=================================================================== ---- fileattrs/perllib.attr.orig 2011-07-12 13:28:13.000000000 +0200 -+++ fileattrs/perllib.attr 2011-12-15 13:47:26.915450823 +0100 +--- ./fileattrs/perllib.attr.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./fileattrs/perllib.attr 2012-06-01 13:39:16.000000000 +0000 @@ -1,3 +1,4 @@ %__perllib_provides %{_rpmconfigdir}/perl.prov -%__perllib_requires %{_rpmconfigdir}/perl.req +#disabled for now +#%__perllib_requires %{_rpmconfigdir}/perl.req %__perllib_magic ^Perl[[:digit:]] module source.* -Index: fileattrs/sysvinit.attr -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ fileattrs/sysvinit.attr 2011-12-15 13:47:26.915450823 +0100 +--- ./fileattrs/sysvinit.attr.orig 2012-06-01 13:39:16.000000000 +0000 ++++ ./fileattrs/sysvinit.attr 2012-06-01 13:39:16.000000000 +0000 @@ -0,0 +1,2 @@ +%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides +%__sysvinit_path ^/etc/init\.d/ diff --git a/finddebuginfo-absolute-links.diff b/finddebuginfo-absolute-links.diff index 9cd08c7..34917f5 100644 --- a/finddebuginfo-absolute-links.diff +++ b/finddebuginfo-absolute-links.diff @@ -7,9 +7,9 @@ behavior to reflect that policy. Signed-off-by: Jan Blunck ---- ./scripts/find-debuginfo.sh.orig 2011-05-11 15:36:05.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-11 15:58:17.000000000 +0000 -@@ -124,7 +124,17 @@ debug_link() +--- ./scripts/find-debuginfo.sh.orig 2012-06-01 13:12:04.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2012-06-01 13:12:17.000000000 +0000 +@@ -133,7 +133,17 @@ debug_link() local l="/usr/lib/debug$2" local t="$1" echo >> "$LINKSFILE" "$l $t" @@ -27,8 +27,8 @@ Signed-off-by: Jan Blunck + esac } - # Compare two binaries but ignore the .note.gnu.build-id section -@@ -158,8 +168,8 @@ make_id_link() + # Provide .2, .3, ... symlinks to all filename instances of this build-id. +@@ -186,8 +196,8 @@ make_id_link() local other=$(readlink -m "$root_idfile") other=${other#$RPM_BUILD_ROOT} diff --git a/finddebuginfo.diff b/finddebuginfo.diff index d382d24..11be196 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -1,7 +1,7 @@ ---- ./scripts/find-debuginfo.sh.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./scripts/find-debuginfo.sh 2011-05-11 14:46:18.000000000 +0000 -@@ -127,6 +127,20 @@ debug_link() - link_relative "$t" "$l" "$RPM_BUILD_ROOT" +--- ./scripts/find-debuginfo.sh.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./scripts/find-debuginfo.sh 2012-06-01 12:26:12.000000000 +0000 +@@ -153,6 +153,20 @@ make_id_dup_link() + debug_link "$file" "/$idfile" } +# Compare two binaries but ignore the .note.gnu.build-id section @@ -21,7 +21,7 @@ # Make a build-id symlink for id $1 with suffix $3 to file $2. make_id_link() { -@@ -145,7 +159,7 @@ make_id_link() +@@ -173,7 +187,7 @@ make_id_link() local other=$(readlink -m "$root_idfile") other=${other#$RPM_BUILD_ROOT} if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" || @@ -30,7 +30,7 @@ # Two copies. Maybe one has to be setuid or something. echo >&2 "*** WARNING: identical binaries are copied, not linked:" echo >&2 " $file" -@@ -174,12 +188,18 @@ strict_error=ERROR +@@ -202,12 +216,18 @@ strict_error=ERROR $strict || strict_error=WARNING # Strip ELF binaries @@ -54,7 +54,7 @@ get_debugfn "$f" [ -f "${debugfn}" ] && continue -@@ -200,8 +220,11 @@ while read nlinks inum f; do +@@ -231,8 +251,11 @@ while read nlinks inum f; do fi echo "extracting debug info from $f" @@ -63,12 +63,12 @@ + mode=$(stat -c %a "$f") + chmod +w "$f" + id=$($(DEBUGEDIT=$(which debugedit 2>/dev/null); \ -+ echo ${DEBUGEDIT:-/usr/lib/rpm/debugedit}) -b "$RPM_BUILD_DIR" \ -+ -d /usr/src/debug -i -l "$SOURCEFILE" "$f") || exit - if [ -z "$id" ]; then - echo >&2 "*** ${strict_error}: No build ID note found in $f" - $strict && exit 2 -@@ -218,13 +241,25 @@ while read nlinks inum f; do ++ echo ${DEBUGEDIT:-/usr/lib/rpm/debugedit}) -b "$RPM_BUILD_DIR" \ ++ -d /usr/src/debug -i -l "$SOURCEFILE" "$f") || exit + if [ $nlinks -gt 1 ]; then + eval linkedid_$inum=\$id + fi +@@ -252,13 +275,25 @@ while read nlinks inum f; do esac mkdir -p "${debugdn}" @@ -101,7 +101,7 @@ if [ -n "$id" ]; then make_id_link "$id" "$dn/$(basename $f)" -@@ -253,12 +288,14 @@ if [ -s "$SOURCEFILE" ]; then +@@ -287,12 +322,14 @@ if [ -s "$SOURCEFILE" ]; then # stupid cpio creates new directories in mode 0700, fixup find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 | xargs --no-run-if-empty -0 chmod a+rx diff --git a/findlang-new-help-fix.diff b/findlang-new-help-fix.diff deleted file mode 100644 index 3ef04b2..0000000 --- a/findlang-new-help-fix.diff +++ /dev/null @@ -1,15 +0,0 @@ -Index: scripts/find-lang.sh -=================================================================== ---- scripts/find-lang.sh.orig -+++ scripts/find-lang.sh -@@ -139,8 +139,8 @@ s:%lang(C) :: - - find $TOP_DIR -type d|sed ' - s:'"$TOP_DIR"':: --'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3/: --'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3/: -+'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/: -+'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/: - s:^\([^%].*\):: - s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW diff --git a/findlang-new-help.diff b/findlang-new-help.diff deleted file mode 100644 index 32b24b2..0000000 --- a/findlang-new-help.diff +++ /dev/null @@ -1,28 +0,0 @@ -From 6047ddf6aa984a65e334450e04d272631894b039 Mon Sep 17 00:00:00 2001 -From: Panu Matilainen -Date: Wed, 7 Mar 2012 11:31:15 +0200 -Subject: [PATCH] Teach find-lang about the new gnome help layout (RhBug:736523) - ---- - scripts/find-lang.sh | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) - -Index: scripts/find-lang.sh -=================================================================== ---- scripts/find-lang.sh.orig -+++ scripts/find-lang.sh -@@ -122,6 +122,14 @@ s:%lang(C) :: - - find $TOP_DIR -type d|sed ' - s:'"$TOP_DIR"':: -+'"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3/: -+'"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3/: -+s:^\([^%].*\):: -+s:%lang(C) :: -+/^$/d' >> $MO_NAME_NEW -+ -+find $TOP_DIR -type d|sed ' -+s:'"$TOP_DIR"':: - '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1: - '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\):: - '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) %doc \1\2: diff --git a/findlang.diff b/findlang.diff index 129b2c1..c7784e8 100644 --- a/findlang.diff +++ b/findlang.diff @@ -1,7 +1,5 @@ -Index: scripts/find-lang.sh -=================================================================== ---- scripts/find-lang.sh.orig -+++ scripts/find-lang.sh +--- ./scripts/find-lang.sh.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./scripts/find-lang.sh 2012-06-01 12:35:41.000000000 +0000 @@ -28,10 +28,10 @@ the top of the tree containing the files PACKAGE_NAME is the %{name} of the package. This should also be the basename of the .mo files. the output is written to @@ -42,27 +40,35 @@ Index: scripts/find-lang.sh --with-qt ) QT= shift -@@ -97,33 +105,40 @@ while test $# -gt 0 ; do +@@ -97,13 +105,19 @@ while test $# -gt 0 ; do esac done +if ! test -s $MO_NAME ; then + echo "%defattr (644, root, root, 755)" > $MO_NAME +fi -+ +MO_NAME_NEW=$MO_NAME.tmp.$$ +rm -f $MO_NAME_NEW + - find $TOP_DIR -type f -o -type l|sed ' + find "$TOP_DIR" -type f -o -type l|sed ' s:'"$TOP_DIR"':: '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: '"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' > $MO_NAME ++/^$/d' > $MO_NAME_NEW + + find "$TOP_DIR" -type d|sed ' + s:'"$TOP_DIR"':: +@@ -111,27 +125,27 @@ s:'"$TOP_DIR"':: + '"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/: + s:^\([^%].*\):: + s:%lang(C) :: +-/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW - find $TOP_DIR -type d|sed ' + find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: -'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1: +'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1: @@ -80,7 +86,7 @@ Index: scripts/find-lang.sh -/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW - find $TOP_DIR -type d|sed ' + find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1: '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1: @@ -88,9 +94,9 @@ Index: scripts/find-lang.sh -/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW - find $TOP_DIR -type f|sed ' + find "$TOP_DIR" -type f|sed ' s:'"$TOP_DIR"':: -@@ -131,7 +146,7 @@ s:'"$TOP_DIR"':: +@@ -139,7 +153,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: @@ -99,7 +105,7 @@ Index: scripts/find-lang.sh KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null` if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then -@@ -143,7 +158,7 @@ s:'"$TOP_DIR"':: +@@ -151,7 +165,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -108,7 +114,7 @@ Index: scripts/find-lang.sh fi KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null` -@@ -156,7 +171,7 @@ s:'"$TOP_DIR"':: +@@ -164,7 +178,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: @@ -116,24 +122,24 @@ Index: scripts/find-lang.sh +/^$/d' >> $MO_NAME_NEW fi - find $TOP_DIR -type f -o -type l|sed ' -@@ -168,7 +183,7 @@ s:'"$TOP_DIR"':: + find "$TOP_DIR" -type f -o -type l|sed ' +@@ -176,7 +190,7 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: -/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW - find $TOP_DIR -type d|sed ' + find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: -@@ -176,17 +191,22 @@ s:'"$TOP_DIR"':: +@@ -184,17 +198,22 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: s:%lang(C) :: -/^$/d' >> $MO_NAME +/^$/d' >> $MO_NAME_NEW - find $TOP_DIR -type f -o -type l|sed ' + find "$TOP_DIR" -type f -o -type l|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*: s:^\([^%].*\):: diff --git a/findsupplements.diff b/findsupplements.diff index 63cdcff..c1365bc 100644 --- a/findsupplements.diff +++ b/findsupplements.diff @@ -1,10 +1,7 @@ -Add support for supplements to the internal dependency -generator. +Add support for supplements to the internal dependency generator. -Index: build/rpmfc.c -=================================================================== ---- build/rpmfc.c.orig 2011-12-09 14:46:56.296892644 +0100 -+++ build/rpmfc.c 2011-12-09 14:47:08.510313829 +0100 +--- ./build/rpmfc.c.orig 2012-06-01 13:44:21.000000000 +0000 ++++ ./build/rpmfc.c 2012-06-01 14:00:45.000000000 +0000 @@ -57,6 +57,7 @@ struct rpmfc_s { rpmds provides; /*!< (no. provides) package provides */ @@ -13,40 +10,60 @@ Index: build/rpmfc.c }; struct rpmfcTokens_s { -@@ -504,6 +505,14 @@ static int rpmfcHelper(rpmfc fc, unsigne - dsContext = RPMSENSE_FIND_REQUIRES; - tagN = RPMTAG_REQUIRENAME; - break; -+ case 'S': -+ if (fc->skipProv) -+ return 0; -+ depname = "supplements"; -+ depsp = &fc->supplements; -+ dsContext = RPMSENSE_FIND_REQUIRES|RPMSENSE_STRONG|RPMSENSE_MISSINGOK; -+ tagN = RPMTAG_ENHANCESNAME; -+ break; - } +@@ -545,6 +546,22 @@ static int rpmfcHelperRequires(rpmfc fc, + return 0; + } - /* If the entire path is filtered out, there's nothing more to do */ -@@ -779,6 +788,7 @@ rpmfc rpmfcFree(rpmfc fc) ++/** ++ * Run per-interpreter Supplements: dependency helper. ++ * @param fc file classifier ++ * @param nsdep class name for interpreter (e.g. "perl") ++ * @return 0 ++ */ ++static int rpmfcHelperSupplements(rpmfc fc, const char * nsdep) ++{ ++ if (fc->skipReq) ++ return 0; ++ ++ rpmfcHelper(fc, nsdep, "supplements", &fc->supplements, RPMSENSE_FIND_REQUIRES|RPMSENSE_STRONG|RPMSENSE_MISSINGOK, RPMTAG_ENHANCESNAME); ++ ++ return 0; ++} ++ + /* Only used for elf coloring and controlling RPMTAG_FILECLASS inclusion now */ + static const struct rpmfcTokens_s rpmfcTokens[] = { + { "directory", RPMFC_INCLUDE }, +@@ -762,6 +779,7 @@ rpmfc rpmfcFree(rpmfc fc) - fc->provides = rpmdsFree(fc->provides); - fc->requires = rpmdsFree(fc->requires); -+ fc->supplements = rpmdsFree(fc->supplements); + rpmdsFree(fc->provides); + rpmdsFree(fc->requires); ++ rpmdsFree(fc->supplements); + memset(fc, 0, sizeof(*fc)); /* trash and burn */ + free(fc); } - fc = _free(fc); - return NULL; -@@ -831,6 +841,7 @@ rpmRC rpmfcApply(rpmfc fc) +@@ -793,6 +811,11 @@ rpmds rpmfcRequires(rpmfc fc) + return (fc != NULL ? fc->requires : NULL); + } + ++rpmds rpmfcSupplements(rpmfc fc) ++{ ++ return (fc != NULL ? fc->supplements : NULL); ++} ++ + rpmRC rpmfcApply(rpmfc fc) + { + const char * s; +@@ -814,6 +837,7 @@ rpmRC rpmfcApply(rpmfc fc) for (ARGV_t fattr = fc->fattrs[fc->ix]; fattr && *fattr; fattr++) { - xx += rpmfcHelper(fc, 'P', *fattr); - xx += rpmfcHelper(fc, 'R', *fattr); -+ xx += rpmfcHelper(fc, 'S', *fattr); + rpmfcHelperProvides(fc, *fattr); + rpmfcHelperRequires(fc, *fattr); ++ rpmfcHelperSupplements(fc, *fattr); } } -@@ -873,6 +884,11 @@ rpmRC rpmfcApply(rpmfc fc) +@@ -856,6 +880,11 @@ rpmRC rpmfcApply(rpmfc fc) dix = rpmdsFind(fc->requires, ds); - ds = rpmdsFree(ds); + rpmdsFree(ds); break; + case 'S': + ds = rpmdsSingle(RPMTAG_ENHANCESNAME, N, EVR, Flags); @@ -55,13 +72,13 @@ Index: build/rpmfc.c + break; } - /* XXX assertion incorrect while generating -debuginfo deps. */ -@@ -1384,6 +1400,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec + if (dix < 0) +@@ -1347,6 +1376,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec } } + /* Add Supplements: */ -+ if (fc->supplements != NULL && rpmdsCount(fc->supplements) > 0 && !fc->skipReq) { ++ if (!fc->skipReq) { + rpmds pi = rpmdsInit(fc->supplements); + while (rpmdsNext(pi) >= 0) { + rpmsenseFlags flags = rpmdsFlags(pi); @@ -74,4 +91,20 @@ Index: build/rpmfc.c + /* Add dependency dictionary(#dependencies) */ if (rpmtdFromArgi(&td, RPMTAG_DEPENDSDICT, fc->ddictx)) { - assert(rpmtdType(&td) == RPM_INT32_TYPE); + headerPut(pkg->header, &td, HEADERPUT_DEFAULT); +--- ./build/rpmfc.h.orig 2012-06-01 13:53:12.000000000 +0000 ++++ ./build/rpmfc.h 2012-06-01 13:53:44.000000000 +0000 +@@ -106,6 +106,13 @@ rpmds rpmfcProvides(rpmfc fc); + */ + rpmds rpmfcRequires(rpmfc fc); + ++/** \ingroup rpmfc ++ * Retrieve file classification supplements ++ * @param fc file classifier ++ * @return rpmds dependency set of fc requires ++ */ ++rpmds rpmfcSupplements(rpmfc fc); ++ + #ifdef __cplusplus + } + #endif diff --git a/headerchk.diff b/headerchk.diff deleted file mode 100644 index 7e446c1..0000000 --- a/headerchk.diff +++ /dev/null @@ -1,53 +0,0 @@ ---- ./lib/header.c.orig 2011-10-19 15:08:41.000000000 +0000 -+++ ./lib/header.c 2011-10-19 15:11:40.000000000 +0000 -@@ -904,6 +904,10 @@ Header headerLoad(void * uh) - h->indexUsed += ne; - } - } -+ rdlen += REGION_TAG_COUNT; -+ /* XXX should be equality test, but dribbles are sometimes a bit off? */ -+ if (rdlen > dl) -+ goto errxit; - } - - h->flags &= ~HEADERFLAG_SORTED; ---- ./rpmio/rpmpgp.c.orig 2011-10-19 15:12:17.000000000 +0000 -+++ ./rpmio/rpmpgp.c 2011-10-19 15:13:46.000000000 +0000 -@@ -402,6 +402,8 @@ static int pgpPrtSubType(const uint8_t * - - while (hlen > 0) { - i = pgpLen(p, &plen); -+ if (i + plen > hlen) -+ break; - p += i; - hlen -= i; - -@@ -484,7 +486,7 @@ static int pgpPrtSubType(const uint8_t * - p += plen; - hlen -= plen; - } -- return 0; -+ return (hlen != 0); /* non-zero hlen is an error */ - } - - static const char * const pgpSigRSA[] = { -@@ -608,7 +610,8 @@ fprintf(stderr, " hash[%zu] -- %s\n", - _digp->hashlen = sizeof(*v) + plen; - _digp->hash = memcpy(xmalloc(_digp->hashlen), v, _digp->hashlen); - } -- (void) pgpPrtSubType(p, plen, v->sigtype, _digp); -+ if (pgpPrtSubType(p, plen, v->sigtype, _digp)) -+ return 1; - p += plen; - - plen = pgpGrab(p,2); -@@ -619,7 +622,8 @@ fprintf(stderr, " hash[%zu] -- %s\n", - - if (_debug && _print) - fprintf(stderr, " unhash[%zu] -- %s\n", plen, pgpHexStr(p, plen)); -- (void) pgpPrtSubType(p, plen, v->sigtype, _digp); -+ if (pgpPrtSubType(p, plen, v->sigtype, _digp)) -+ return 1; - p += plen; - - plen = pgpGrab(p,2); diff --git a/headerchk2.diff b/headerchk2.diff index bc495ec..51b2cf9 100644 --- a/headerchk2.diff +++ b/headerchk2.diff @@ -1,147 +1,12 @@ ---- lib/header.c.orig 2012-04-17 16:16:29.000000000 +0000 -+++ lib/header.c 2012-04-17 16:53:32.000000000 +0000 -@@ -197,7 +197,7 @@ int headerVerifyInfo(int il, int dl, con - return i; - if (hdrchkAlign(info->type, info->offset)) - return i; -- if (!negate && hdrchkRange(dl, info->offset)) -+ if (hdrchkRange(dl, info->offset)) - return i; - if (hdrchkData(info->count)) - return i; -@@ -837,10 +837,13 @@ Header headerLoad(void * uh) +--- lib/header.c.orig 2012-04-03 13:29:24.000000000 +0000 ++++ lib/header.c 2012-06-01 14:22:12.000000000 +0000 +@@ -900,7 +900,8 @@ Header headerImport(void * blob, unsigne - entry->info.type = htonl(pe->type); - entry->info.count = htonl(pe->count); -+ entry->info.tag = htonl(pe->tag); - -- if (hdrchkType(entry->info.type)) -+ if (!ENTRY_IS_REGION(entry)) - goto errxit; -- if (hdrchkTags(entry->info.count)) -+ if (entry->info.type != REGION_TAG_TYPE) -+ goto errxit; -+ if (entry->info.count != REGION_TAG_COUNT) - goto errxit; - - { int off = ntohl(pe->offset); -@@ -856,7 +859,6 @@ Header headerLoad(void * uh) - ril = rdl/sizeof(*pe); - if (hdrchkTags(ril) || hdrchkData(rdl)) - goto errxit; -- entry->info.tag = htonl(pe->tag); - } else { - ril = il; - rdl = (ril * sizeof(struct entryInfo_s)); -@@ -876,13 +878,12 @@ Header headerLoad(void * uh) - indexEntry newEntry = entry + ril; - int ne = (h->indexUsed - ril); - int rid = entry->info.offset+1; -- int rc; - - /* Load dribble entries from region. */ -- rc = regionSwab(newEntry, ne, 0, pe+ril, dataStart, dataEnd, rid); -- if (rc < 0) -+ rdlen = regionSwab(newEntry, ne, rdlen, pe+ril, -+ dataStart, dataEnd, rid); -+ if (rdlen < 0) - goto errxit; -- rdlen += rc; - - { indexEntry firstEntry = newEntry; - int save = h->indexUsed; -@@ -905,7 +906,7 @@ Header headerLoad(void * uh) - } - } rdlen += REGION_TAG_COUNT; -- /* XXX should be equality test, but dribbles are sometimes a bit off? */ + +- if (rdlen != dl) + /* should be equality test, but can be off if entries are not perfectly aligned */ - if (rdlen > dl) ++ if (rdlen > dl) goto errxit; } ---- lib/package.c.orig 2012-04-17 16:26:00.000000000 +0000 -+++ lib/package.c 2012-04-17 16:26:05.000000000 +0000 -@@ -241,16 +241,23 @@ static rpmRC headerVerify(rpmKeyring key - } - /* Is there an immutable header region tag? */ -- if (!(entry.info.tag == RPMTAG_HEADERIMMUTABLE -- && entry.info.type == RPM_BIN_TYPE -- && entry.info.count == REGION_TAG_COUNT)) -- { -+ if (!(entry.info.tag == RPMTAG_HEADERIMMUTABLE)) { - rc = RPMRC_NOTFOUND; - goto exit; - } - -- /* Is the offset within the data area? */ -- if (entry.info.offset >= dl) { -+ /* Is the region tag sane? */ -+ if (!(entry.info.type == REGION_TAG_TYPE && -+ entry.info.count == REGION_TAG_COUNT)) { -+ rasprintf(&buf, -+ _("region tag: BAD, tag %d type %d offset %d count %d\n"), -+ entry.info.tag, entry.info.type, -+ entry.info.offset, entry.info.count); -+ goto exit; -+ } -+ -+ /* Is the trailer within the data area? */ -+ if (entry.info.offset + REGION_TAG_COUNT > dl) { - rasprintf(&buf, - _("region offset: BAD, tag %d type %d offset %d count %d\n"), - entry.info.tag, entry.info.type, -@@ -263,10 +270,10 @@ static rpmRC headerVerify(rpmKeyring key - (void) memcpy(&info, regionEnd, REGION_TAG_COUNT); - regionEnd += REGION_TAG_COUNT; - -- xx = headerVerifyInfo(1, dl, &info, &entry.info, 1); -+ xx = headerVerifyInfo(1, il * sizeof(*pe), &info, &entry.info, 1); - if (xx != -1 || - !(entry.info.tag == RPMTAG_HEADERIMMUTABLE -- && entry.info.type == RPM_BIN_TYPE -+ && entry.info.type == REGION_TAG_TYPE - && entry.info.count == REGION_TAG_COUNT)) - { - rasprintf(&buf, ---- lib/signature.c.orig 2012-04-17 16:25:52.000000000 +0000 -+++ lib/signature.c 2012-04-17 16:26:05.000000000 +0000 -@@ -133,12 +133,19 @@ rpmRC rpmReadSignature(FD_t fd, Header * - } - - /* Is there an immutable header region tag? */ -- if (entry.info.tag == RPMTAG_HEADERSIGNATURES -- && entry.info.type == RPM_BIN_TYPE -- && entry.info.count == REGION_TAG_COUNT) -- { -- -- if (entry.info.offset >= dl) { -+ if (entry.info.tag == RPMTAG_HEADERSIGNATURES) { -+ /* Is the region tag sane? */ -+ if (!(entry.info.type == REGION_TAG_TYPE && -+ entry.info.count == REGION_TAG_COUNT)) { -+ rasprintf(&buf, -+ _("region tag: BAD, tag %d type %d offset %d count %d\n"), -+ entry.info.tag, entry.info.type, -+ entry.info.offset, entry.info.count); -+ goto exit; -+ } -+ -+ /* Is the trailer within the data area? */ -+ if (entry.info.offset + REGION_TAG_COUNT > dl) { - rasprintf(&buf, - _("region offset: BAD, tag %d type %d offset %d count %d\n"), - entry.info.tag, entry.info.type, -@@ -157,10 +164,10 @@ rpmRC rpmReadSignature(FD_t fd, Header * - } - dataEnd += REGION_TAG_COUNT; - -- xx = headerVerifyInfo(1, dl, &info, &entry.info, 1); -+ xx = headerVerifyInfo(1, il * sizeof(*pe), &info, &entry.info, 1); - if (xx != -1 || - !((entry.info.tag == RPMTAG_HEADERSIGNATURES || entry.info.tag == RPMTAG_HEADERIMAGE) -- && entry.info.type == RPM_BIN_TYPE -+ && entry.info.type == REGION_TAG_TYPE - && entry.info.count == REGION_TAG_COUNT)) - { - rasprintf(&buf, diff --git a/langnoc.diff b/langnoc.diff index be3e1fc..95a5604 100644 --- a/langnoc.diff +++ b/langnoc.diff @@ -1,8 +1,6 @@ -Index: macros.in -=================================================================== ---- macros.in.orig -+++ macros.in -@@ -1253,6 +1253,7 @@ EOF +--- ./macros.in.orig 2012-06-01 14:10:18.000000000 +0000 ++++ ./macros.in 2012-06-01 14:10:29.000000000 +0000 +@@ -1204,6 +1204,7 @@ EOF # %files -f %{name}.lang # %find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot} @@ -10,10 +8,8 @@ Index: macros.in # Commands + opts to use for retrieving remote files # Proxy opts can be set through --httpproxy/--httpport popt aliases, -Index: scripts/find-lang.sh -=================================================================== ---- scripts/find-lang.sh.orig -+++ scripts/find-lang.sh +--- ./scripts/find-lang.sh.orig 2012-06-01 14:10:18.000000000 +0000 ++++ ./scripts/find-lang.sh 2012-06-01 14:14:47.000000000 +0000 @@ -62,6 +62,8 @@ MO= MO_NAME=$NAME.lang ALL_NAME=# @@ -38,16 +34,16 @@ Index: scripts/find-lang.sh * ) MO_NAME=${1} shift -@@ -134,6 +144,8 @@ s:'"$TOP_DIR"':: +@@ -133,6 +143,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: '"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: s:^\([^%].*\):: +'"$ONLY_C"'/%lang(C)/!d +'"$NO_C"'/%lang(C)/d s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW + /^$/d' > $MO_NAME_NEW -@@ -142,27 +154,32 @@ s:'"$TOP_DIR"':: +@@ -141,19 +153,23 @@ s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/: '"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/: s:^\([^%].*\):: @@ -56,7 +52,7 @@ Index: scripts/find-lang.sh s:%lang(C) :: /^$/d' >> $MO_NAME_NEW - find $TOP_DIR -type d|sed ' + find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: -'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir %doc \1: +'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%lang(C) %dir %doc \1: @@ -73,18 +69,7 @@ Index: scripts/find-lang.sh s:%lang(C) :: /^$/d' >> $MO_NAME_NEW - find $TOP_DIR -type d|sed ' - s:'"$TOP_DIR"':: --'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1: --'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1: -+'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%lang(C) %dir \1: -+'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%lang(C) %dir \1: - s:^\([^%].*\):: -+s:%lang(C) :: - /^$/d' >> $MO_NAME_NEW - - find $TOP_DIR -type f|sed ' -@@ -170,6 +187,8 @@ s:'"$TOP_DIR"':: +@@ -169,6 +185,8 @@ s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1: '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: s:^[^%].*:: @@ -93,7 +78,7 @@ Index: scripts/find-lang.sh s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -182,6 +201,8 @@ s:'"$TOP_DIR"':: +@@ -181,6 +199,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: @@ -102,7 +87,7 @@ Index: scripts/find-lang.sh s:%lang(C) :: /^$/d' >> $MO_NAME_NEW fi -@@ -195,6 +216,8 @@ s:'"$TOP_DIR"':: +@@ -194,6 +214,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: @@ -111,7 +96,7 @@ Index: scripts/find-lang.sh s:%lang(C) :: /^$/d' >> $MO_NAME_NEW fi -@@ -207,6 +230,8 @@ s:'"$TOP_DIR"':: +@@ -206,6 +228,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1: s:^[^%].*:: @@ -120,7 +105,7 @@ Index: scripts/find-lang.sh s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -215,6 +240,8 @@ s:'"$TOP_DIR"':: +@@ -214,6 +238,8 @@ s:'"$TOP_DIR"':: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\):: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: @@ -129,7 +114,7 @@ Index: scripts/find-lang.sh s:%lang(C) :: /^$/d' >> $MO_NAME_NEW -@@ -222,6 +249,8 @@ find $TOP_DIR -type f -o -type l|sed ' +@@ -221,6 +247,8 @@ find "$TOP_DIR" -type f -o -type l|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*: s:^\([^%].*\):: diff --git a/macrosin.diff b/macrosin.diff index bd762d2..5508b3d 100644 --- a/macrosin.diff +++ b/macrosin.diff @@ -1,6 +1,6 @@ ---- macros.in 2011-07-15 11:32:41.000000000 +0200 -+++ macros.in 2012-01-20 11:02:19.809126991 +0100 -@@ -180,22 +180,22 @@ +--- ./macros.in.orig 2012-05-22 10:53:51.000000000 +0000 ++++ ./macros.in 2012-06-01 12:39:35.000000000 +0000 +@@ -181,22 +181,22 @@ # Template for debug information sub-package. %debug_package \ @@ -29,7 +29,7 @@ # The path to the gzip executable (legacy, use %{__gzip} instead). %_gzipbin %{__gzip} -@@ -232,7 +232,8 @@ +@@ -233,7 +233,8 @@ package or when debugging this package.\ %_tmppath %{_var}/tmp # Path to top of build area. @@ -39,7 +39,7 @@ # The path to the unzip executable (legacy, use %{__unzip} instead). %_unzipbin %{__unzip} -@@ -335,7 +336,7 @@ +@@ -336,7 +337,7 @@ package or when debugging this package.\ # "w7.lzdio" lzma-alone level 7, lzma's default # #%_source_payload w9.gzdio @@ -48,9 +48,9 @@ # Algorithm to use for generating file checksum digests on build. # If not specified or 0, MD5 is used. -@@ -465,16 +466,22 @@ - # Undefined, missing or %{nil} will use package content (if available). - %_verify_file_context_path %{__file_context_path} +@@ -435,16 +436,22 @@ package or when debugging this package.\ + # Directories whose contents should be considered as documentation. + %__docdir_path %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man +# maxnum,cuttime,minnum +# 2009/03/01 (SLES11 GA) @@ -73,9 +73,9 @@ # # Path to file attribute classifications for automatic dependency -@@ -537,10 +544,10 @@ +@@ -507,10 +514,10 @@ package or when debugging this package.\ # Misc BDB tuning options - %__dbi_other mp_mmapsize=128Mb mp_size=64Mb + %__dbi_other mp_mmapsize=128Mb mp_size=1Mb -%_dbi_config %{?__dbi_other} +%_dbi_config %{?__dbi_other} nofsync @@ -86,7 +86,7 @@ #============================================================================== # ---- GPG/PGP/PGP5 signature macros. -@@ -859,7 +866,7 @@ +@@ -809,7 +816,7 @@ package or when debugging this package.\ %_build_vendor %{_host_vendor} %_build_os %{_host_os} %_host @host@ @@ -95,7 +95,7 @@ %_host_cpu @host_cpu@ %_host_vendor @host_vendor@ %_host_os @host_os@ -@@ -1022,6 +1029,183 @@ +@@ -973,6 +980,183 @@ done \ %python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))") %python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])") @@ -279,7 +279,7 @@ #------------------------------------------------------------------------------ # arch macro for all Intel i?86 compatibile processors # (Note: This macro (and it's analogues) will probably be obsoleted when -@@ -1032,7 +1216,9 @@ +@@ -983,7 +1167,9 @@ done \ #------------------------------------------------------------------------------ # arch macro for all supported ARM processors @@ -290,7 +290,7 @@ #------------------------------------------------------------------------------ # arch macro for all supported Sparc processors -@@ -1072,3 +1258,26 @@ +@@ -1023,3 +1209,26 @@ done \ # \endverbatim #*/ diff --git a/nameversioncompare.diff b/nameversioncompare.diff index ebede1f..d63af57 100644 --- a/nameversioncompare.diff +++ b/nameversioncompare.diff @@ -1,10 +1,10 @@ Also compare the name and not only the version when checking if two packages are the same. rh#104066 ---- ./lib/depends.c.orig 2011-05-12 12:20:01.000000000 +0000 -+++ ./lib/depends.c 2011-05-12 12:26:25.000000000 +0000 -@@ -95,6 +95,24 @@ static rpmdbMatchIterator rpmtsPrunedIte - return mi; +--- ./lib/depends.c.orig 2012-06-01 10:07:12.000000000 +0000 ++++ ./lib/depends.c 2012-06-01 10:16:13.000000000 +0000 +@@ -144,6 +144,24 @@ static int skipColor(rpm_color_t tscolor + return tscolor && color && ocolor && !(color & ocolor); } +static int rpmNameVersionCompare(Header first, Header second) @@ -25,24 +25,17 @@ two packages are the same. rh#104066 + return rpmVersionCompare(first, second); +} + - #define skipColor(_tscolor, _color, _ocolor) \ - ((_tscolor) && (_color) && (_ocolor) && !((_color) & (_ocolor))) - -@@ -111,7 +129,7 @@ static void addUpgradeErasures(rpmts ts, + /* Add erase elements for older packages of same color (if any). */ + static int addUpgradeErasures(rpmts ts, rpm_color_t tscolor, + rpmte p, rpm_color_t hcolor, Header h) +@@ -157,8 +175,8 @@ static int addUpgradeErasures(rpmts ts, + if (skipColor(tscolor, hcolor, headerGetNumber(oh, RPMTAG_HEADERCOLOR))) continue; - /* Skip packages that contain identical NEVR. */ +- /* Skip packages that contain identical NEVR. */ - if (rpmVersionCompare(h, oh) == 0) ++ /* Skip packages that contain identical NEVRA. */ + if (rpmNameVersionCompare(h, oh) == 0) continue; - removePackage(ts, oh, p); -@@ -150,7 +168,7 @@ static void addObsoleteErasures(rpmts ts - * If no obsoletes version info is available, match all names. - */ - if (rpmdsEVR(obsoletes) == NULL -- || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { -+ || rpmdsNVRMatchesDep(oh, obsoletes, _rpmds_nopromote)) { - char * ohNEVRA = headerGetAsString(oh, RPMTAG_NEVRA); - rpmlog(RPMLOG_DEBUG, " Obsoletes: %s\t\terases %s\n", - rpmdsDNEVR(obsoletes)+2, ohNEVRA); + if (removePackage(ts, oh, p)) { diff --git a/no_rep_autop.diff b/no_rep_autop.diff deleted file mode 100644 index 4027c96..0000000 --- a/no_rep_autop.diff +++ /dev/null @@ -1,12 +0,0 @@ -It seems to be gone... - ---- lib/Makefile.am.orig 2011-05-12 12:59:42.000000000 +0000 -+++ lib/Makefile.am 2011-05-12 12:59:59.000000000 +0000 -@@ -126,7 +126,6 @@ rpmdb_printlog_LDADD = \ - $(top_builddir)/db3/fileops_autop.o \ - $(top_builddir)/db3/hash_autop.o \ - $(top_builddir)/db3/qam_autop.o \ -- $(top_builddir)/db3/rep_autop.o \ - $(top_builddir)/db3/txn_autop.o \ - $(top_builddir)/db3/util_sig.o \ - librpm.la diff --git a/nobuildcolor.diff b/nobuildcolor.diff index ed58d0d..ca307df 100644 --- a/nobuildcolor.diff +++ b/nobuildcolor.diff @@ -1,13 +1,13 @@ Disable file coloring for SUSE systems ---- build/rpmfc.c.orig 2011-05-13 12:35:29.000000000 +0000 -+++ build/rpmfc.c 2011-05-13 13:49:37.000000000 +0000 -@@ -1312,7 +1312,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec +--- build/rpmfc.c.orig 2012-06-01 13:37:51.000000000 +0000 ++++ build/rpmfc.c 2012-06-01 13:37:21.000000000 +0000 +@@ -1304,7 +1304,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec goto exit; /* Add per-file colors(#files) */ - if (rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) { + if (rpmExpandNumeric("%{?_transaction_color}") != 0 && rpmtdFromArgi(&td, RPMTAG_FILECOLORS, fc->fcolor)) { rpm_color_t *fcolor; - assert(rpmtdType(&td) == RPM_INT32_TYPE); /* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */ + while ((fcolor = rpmtdNextUint32(&td))) { diff --git a/nomagiccheck.diff b/nomagiccheck.diff index 1ae6ccf..ab4cece 100644 --- a/nomagiccheck.diff +++ b/nomagiccheck.diff @@ -1,11 +1,11 @@ Don't let rpm complain about a missing /etc/magic.mgc file ---- build/rpmfc.c.orig 2011-05-13 16:33:20.000000000 +0000 -+++ build/rpmfc.c 2011-05-13 16:33:55.000000000 +0000 -@@ -896,7 +896,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t arg +--- ./build/rpmfc.c.orig 2012-06-01 13:42:06.000000000 +0000 ++++ ./build/rpmfc.c 2012-06-01 13:42:30.000000000 +0000 +@@ -900,7 +900,7 @@ static int initAttrs(rpmfc fc) + rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) { ARGV_t fcav = NULL; - int xx; - int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS; + int msflags = MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS; magic_t ms = NULL; diff --git a/perl-python-attr.patch b/perl-python-attr.patch deleted file mode 100644 index 4d422e2..0000000 --- a/perl-python-attr.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 9ddcc23d2b7ecaf5336530dbe37195b0057d0396 -Author: Ville Skyttä -Date: Tue Jan 10 10:48:13 2012 +0200 - - Adapt perl and python fileattrs to file 5.10 magics - - - file 5.10 has changed magics at least for perl and python scripts, samples: - - 5.09: a /usr/bin/perl -w script, ASCII text executable, with very long lines - 5.10: Perl script, ASCII text executable, with very long lines - - 5.09: a /usr/bin/python script, ASCII text executable - 5.10: Python script, ASCII text executable - - Signed-off-by: Panu Matilainen - ---- fileattrs/perl.attr -+++ fileattrs/perl.attr 2012-01-16 14:09:35.455146647 +0000 -@@ -1,4 +1,4 @@ - # disabled for now - #%__perl_requires %{_rpmconfigdir}/perl.req --%__perl_magic ^.*perl .*$ -+%__perl_magic ^.*[Pp]erl .*$ - %__perl_flags exeonly ---- fileattrs/python.attr -+++ fileattrs/python.attr 2012-01-16 14:09:35.455146647 +0000 -@@ -1,4 +1,4 @@ - %__python_provides %{_rpmconfigdir}/pythondeps.sh --provides - %__python_requires %{_rpmconfigdir}/pythondeps.sh --requires - %__python_path ^((/usr/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$ --%__python_magic ^python.*(executable|byte-compiled)$ -+%__python_magic ^[Pp]ython.*(executable|byte-compiled)$ diff --git a/platformin.diff b/platformin.diff index a011649..4de1e10 100644 --- a/platformin.diff +++ b/platformin.diff @@ -1,10 +1,8 @@ SUSE specific platform changes. -Index: platform.in -=================================================================== ---- platform.in.orig 2011-12-11 09:27:18.000000000 +0100 -+++ platform.in 2011-12-11 09:29:47.564232873 +0100 -@@ -21,7 +21,7 @@ +--- ./platform.in.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./platform.in 2012-06-01 12:42:30.000000000 +0000 +@@ -29,7 +29,7 @@ %_exec_prefix @exec_prefix@ %_bindir @bindir@ %_sbindir @sbindir@ @@ -13,7 +11,7 @@ Index: platform.in %_datarootdir @datarootdir@ %_datadir @datadir@ %_sysconfdir @sysconfdir@ -@@ -33,7 +33,7 @@ +@@ -41,7 +41,7 @@ %_oldincludedir @oldincludedir@ %_infodir @infodir@ %_mandir @mandir@ @@ -22,25 +20,25 @@ Index: platform.in # Deprecated misspelling, present for backwards compatibility. %_initrddir %{_initddir} -@@ -143,3 +143,21 @@ - @mandrake@%_gamesdir games - @mandrake@%_gamesbindir %{_prefix}/%{_gamesdir} - @mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir} -+@SuSE@#--------------------------------------------------------------------- -+@SuSE@# Expanded at end of %prep -+@SuSE@# -+@SuSE@%__id_u %{__id} -u -+@SuSE@%__chown_Rhf %{__chown} -Rhf -+@SuSE@%__chgrp_Rhf %{__chgrp} -Rhf -+@SuSE@%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root -+@SuSE@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root -+@SuSE@%_fixperms %{__chmod} -Rf @FIXPERMS@ -+@SuSE@ -+@SuSE@#--------------------------------------------------------------------- -+@SuSE@# Expanded at start of %build -+@SuSE@# -+@SuSE@%__spec_build_pre %{___build_pre}\ -+@SuSE@%{?buildroot: %__rm -rf "$RPM_BUILD_ROOT"\ -+@SuSE@ %__mkdir_p `dirname "$RPM_BUILD_ROOT"`\ -+@SuSE@ %__mkdir "$RPM_BUILD_ROOT"\ -+@SuSE@} +@@ -78,3 +78,21 @@ + @apple@# + @apple@%_use_internal_dependency_generator 0 + @apple@%__so dylib ++@suse@#--------------------------------------------------------------------- ++@suse@# Expanded at end of %prep ++@suse@# ++@suse@%__id_u %{__id} -u ++@suse@%__chown_Rhf %{__chown} -Rhf ++@suse@%__chgrp_Rhf %{__chgrp} -Rhf ++@suse@%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root ++@suse@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root ++@suse@%_fixperms %{__chmod} -Rf @FIXPERMS@ ++@suse@ ++@suse@#--------------------------------------------------------------------- ++@suse@# Expanded at start of %build ++@suse@# ++@suse@%__spec_build_pre %{___build_pre}\ ++@suse@%{?buildroot: %__rm -rf "$RPM_BUILD_ROOT"\ ++@suse@ %__mkdir_p `dirname "$RPM_BUILD_ROOT"`\ ++@suse@ %__mkdir "$RPM_BUILD_ROOT"\ ++@suse@} diff --git a/python3-rpm.spec b/python3-rpm.spec index 5b826aa..25367fd 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: python3-rpm Version: 4.9.1.2 Release: 0 diff --git a/refreshtestarch.diff b/refreshtestarch.diff index 12642dd..694ef6d 100644 --- a/refreshtestarch.diff +++ b/refreshtestarch.diff @@ -1,25 +1,21 @@ Also test architecture in "refresh" test when not colored. This allows updates to different architectures. ---- ./lib/psm.c.orig 2010-12-21 09:50:23.000000000 +0000 -+++ ./lib/psm.c 2011-05-11 12:47:13.000000000 +0000 -@@ -723,6 +723,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg +--- ./lib/psm.c.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./lib/psm.c 2012-06-01 10:22:24.000000000 +0000 +@@ -680,13 +680,14 @@ void rpmpsmNotify(rpmpsm psm, int what, + */ + static void markReplacedInstance(rpmts ts, rpmte te) + { ++ /* this must match rpmNameVersionCompare in depends.c */ + rpmdbMatchIterator mi = rpmtsInitIterator(ts, RPMDBI_NAME, rpmteN(te), 0); + rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, rpmteE(te)); + rpmdbSetIteratorRE(mi, RPMTAG_VERSION, RPMMIRE_STRCMP, rpmteV(te)); + rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, rpmteR(te)); ++ rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, rpmteA(te)); + /* XXX shouldn't we also do this on colorless transactions? */ + if (rpmtsColor(ts)) { +- rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, rpmteA(te)); + rpmdbSetIteratorRE(mi, RPMTAG_OS, RPMMIRE_STRCMP, rpmteO(te)); + } - psm->scriptArg = psm->npkgs_installed + 1; - -+ /* this must match rpmNameVersionCompare in depends.c */ - mi = rpmtsInitIterator(ts, RPMDBI_NAME, rpmteN(psm->te), 0); - xx = rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, - rpmteE(psm->te)); -@@ -730,9 +731,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - rpmteV(psm->te)); - xx = rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, - rpmteR(psm->te)); -+ xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, -+ rpmteA(psm->te)); - if (tscolor) { -- xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, -- rpmteA(psm->te)); - xx = rpmdbSetIteratorRE(mi, RPMTAG_OS, RPMMIRE_STRCMP, - rpmteO(psm->te)); - } diff --git a/remove-translations.diff b/remove-translations.diff index c121a5c..3585c40 100644 --- a/remove-translations.diff +++ b/remove-translations.diff @@ -1,17 +1,15 @@ -Index: scripts/find-lang.sh -=================================================================== ---- scripts/find-lang.sh.orig -+++ scripts/find-lang.sh -@@ -112,6 +112,23 @@ fi +--- ./scripts/find-lang.sh.orig 2012-06-01 13:28:40.000000000 +0000 ++++ ./scripts/find-lang.sh 2012-06-01 13:30:43.000000000 +0000 +@@ -111,6 +111,23 @@ fi MO_NAME_NEW=$MO_NAME.tmp.$$ rm -f $MO_NAME_NEW +# remove languages we do not yet support - but give out statistics -+find $TOP_DIR/usr/share/locale/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/share/locale/'::; /^$/d' | while read dir; do ++find "$TOP_DIR/usr/share/locale/" -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/share/locale/'::; /^$/d' | while read dir; do + if ! rpm -ql filesystem | egrep -q "/usr/share/locale/$dir"$; then + find $TOP_DIR/usr/share/locale/$dir -name *.mo | sed 's:'"$TOP_DIR"'::' | while read file; do -+ echo -n "removing translation $file: " -+ msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null - ++ echo -n "removing translation $file: " ++ msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null - + done + rm -rf $TOP_DIR/usr/share/locale/$dir + fi @@ -23,6 +21,6 @@ Index: scripts/find-lang.sh + fi +done + - find $TOP_DIR -type f -o -type l|sed ' + find "$TOP_DIR" -type f -o -type l|sed ' s:'"$TOP_DIR"':: '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: diff --git a/repackage-nomd5.diff b/repackage-nomd5.diff index 16e243e..f6451e8 100644 --- a/repackage-nomd5.diff +++ b/repackage-nomd5.diff @@ -1,31 +1,32 @@ Don't complain about a bad md5 sum for repackaged rpms. ---- ./lib/psm.c.orig 2011-05-11 14:27:32.000000000 +0000 -+++ ./lib/psm.c 2011-05-11 16:32:11.000000000 +0000 -@@ -811,6 +811,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - case PSM_PROCESS: - if (psm->goal == PKG_INSTALL) { - FD_t payload = NULL; -+ rpmtransFlags oldtsflags; +--- ./lib/psm.c.orig 2012-06-01 13:18:24.000000000 +0000 ++++ ./lib/psm.c 2012-06-01 13:22:48.000000000 +0000 +@@ -813,12 +813,17 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg + rpmpsmNotify(psm, RPMCALLBACK_INST_PROGRESS, 0); - if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB) break; + if (rpmfiFC(fi) > 0 && !(rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB)) { ++ rpmtransFlags oldtsflags; + FD_t payload = rpmtePayload(psm->te); + if (payload == NULL) { + rc = RPMRC_FAIL; + break; + } -@@ -828,6 +829,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - break; ++ oldtsflags = rpmtsFlags(ts); ++ if (headerIsEntry(fi->h, RPMTAG_REMOVETID)) ++ (void) rpmtsSetFlags(ts, oldtsflags | RPMTRANS_FLAG_NOMD5); ++ + fsmrc = rpmfsmRun(FSM_PKGINSTALL, psm->ts, psm->te, psm->fi, + payload, psm, NULL, &psm->failedFile); + +@@ -827,6 +832,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg + rpmswAdd(rpmtsOp(psm->ts, RPMTS_OP_DIGEST), + fdOp(payload, FDSTAT_DIGEST)); + ++ if (headerIsEntry(fi->h, RPMTAG_REMOVETID)) ++ (void) rpmtsSetFlags(ts, oldtsflags); ++ + Fclose(payload); } -+ oldtsflags = rpmtsFlags(ts); -+ if (headerIsEntry(fi->h, RPMTAG_REMOVETID)) -+ (void) rpmtsSetFlags(ts, oldtsflags | RPMTRANS_FLAG_NOMD5); - rc = fsmSetup(rpmfiFSM(fi), FSM_PKGINSTALL, ts, psm->te, fi, - payload, NULL, &psm->failedFile); - (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS), -@@ -835,6 +839,8 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg - (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST), - fdOp(payload, FDSTAT_DIGEST)); - xx = fsmTeardown(rpmfiFSM(fi)); -+ if (headerIsEntry(fi->h, RPMTAG_REMOVETID)) -+ (void) rpmtsSetFlags(ts, oldtsflags); - - saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ - xx = Fclose(payload); diff --git a/rpm-4.10.0.tar.bz2 b/rpm-4.10.0.tar.bz2 new file mode 100644 index 0000000..bc666d7 --- /dev/null +++ b/rpm-4.10.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e2e237235b64c07ee4a4152e4eb77aad4eb559737eac9b6713c5e1bcabfe4a9 +size 3530378 diff --git a/rpm-4.9.1.2.tar.bz2 b/rpm-4.9.1.2.tar.bz2 deleted file mode 100644 index 3affb51..0000000 --- a/rpm-4.9.1.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea55e5c5b70703a3fea33e5debec27a694816ae86d1bf5ce99bc9e27db84b60a -size 3500371 diff --git a/rpm-beecrypt.diff b/rpm-beecrypt.diff index 355c391..2c36a4b 100644 --- a/rpm-beecrypt.diff +++ b/rpm-beecrypt.diff @@ -1,5 +1,5 @@ ---- ./config.h.in.orig 2011-07-15 09:37:41.000000000 +0000 -+++ ./config.h.in 2011-07-18 16:34:29.000000000 +0000 +--- ./config.h.in.orig 2012-05-22 10:55:46.000000000 +0000 ++++ ./config.h.in 2012-05-31 16:41:07.000000000 +0000 @@ -13,6 +13,9 @@ /* Define to 1 if you have the `basename' function. */ #undef HAVE_BASENAME @@ -7,19 +7,10 @@ +/* Define to 1 if you have the header file. */ +#undef HAVE_BEECRYPT_API_H + - /* Define as 1 if you bzip2 1.0 */ - #undef HAVE_BZ2_1_0 + /* Define to 1 if you have the header file. */ + #undef HAVE_BZLIB_H -@@ -77,7 +80,7 @@ - /* Define as 1 if your zlib has gzseek() */ - #undef HAVE_GZSEEK - --/* Define if you have the iconv() function. */ -+/* Define if you have the iconv() function and it works. */ - #undef HAVE_ICONV - - /* Define to 1 if you have the header file. */ -@@ -227,6 +230,10 @@ +@@ -206,6 +209,10 @@ */ #undef LT_OBJDIR @@ -30,7 +21,7 @@ /* Define to 1 if `major', `minor', and `makedev' are declared in . */ #undef MAJOR_IN_MKDEV -@@ -311,6 +318,9 @@ +@@ -290,6 +297,9 @@ /* Build with acl support? */ #undef WITH_ACL @@ -40,9 +31,9 @@ /* Build with capability support? */ #undef WITH_CAP ---- ./configure.ac.orig 2011-07-15 09:37:20.000000000 +0000 -+++ ./configure.ac 2011-07-18 16:34:29.000000000 +0000 -@@ -252,12 +252,43 @@ AC_CHECK_HEADERS([dwarf.h], [ +--- ./configure.ac.orig 2012-05-22 10:55:31.000000000 +0000 ++++ ./configure.ac 2012-05-31 16:37:32.000000000 +0000 +@@ -239,12 +239,43 @@ AC_CHECK_HEADERS([dwarf.h], [ AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes]) #================= @@ -86,7 +77,7 @@ AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [ AC_MSG_ERROR([missing required NSPR / NSS header]) ]) -@@ -266,6 +297,7 @@ AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ +@@ -253,6 +284,7 @@ AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ ], [ AC_MSG_ERROR([missing required NSS library 'nss3']) ]) @@ -94,8 +85,8 @@ AC_SUBST(WITH_NSS_INCLUDE) AC_SUBST(WITH_NSS_LIB) ---- ./rpmio/Makefile.am.orig 2011-07-15 09:36:33.000000000 +0000 -+++ ./rpmio/Makefile.am 2011-07-18 16:36:35.000000000 +0000 +--- ./rpmio/Makefile.am.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./rpmio/Makefile.am 2012-05-31 16:39:58.000000000 +0000 @@ -2,6 +2,7 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ @@ -104,17 +95,18 @@ AM_CPPFLAGS += @WITH_POPT_INCLUDE@ AM_CPPFLAGS += -I$(top_srcdir)/misc AM_CPPFLAGS += -DRPMCONFIGDIR="\"@RPMCONFIGDIR@\"" -@@ -17,10 +18,17 @@ librpmio_la_SOURCES = \ +@@ -17,12 +18,18 @@ librpmio_la_SOURCES = \ rpmstring.c rpmfileutil.c \ rpmkeyring.c +if WITH_BEECRYPT +librpmio_la_SOURCES += digest_beecrypt.c +else -+librpmio_la_SOURCES += digest_nss.c + librpmio_la_SOURCES += digest_nss.c +endif + - librpmio_la_LDFLAGS = -version-info 2:1:0 + + librpmio_la_LDFLAGS = -version-info 3:0:0 librpmio_la_LIBADD = \ ../misc/libmisc.la \ @WITH_NSS_LIB@ \ @@ -122,7 +114,7 @@ @WITH_BZ2_LIB@ \ @WITH_ZLIB_LIB@ \ @WITH_LIBELF_LIB@ \ -@@ -28,6 +36,15 @@ librpmio_la_LIBADD = \ +@@ -30,6 +37,15 @@ librpmio_la_LIBADD = \ @WITH_LZMA_LIB@ \ -lpthread @@ -138,232 +130,9 @@ if WITH_LUA AM_CPPFLAGS += -I$(top_srcdir)/luaext/ AM_CPPFLAGS += @LUA_CFLAGS@ ---- ./rpmio/base64.c.orig 2011-07-12 11:28:13.000000000 +0000 -+++ ./rpmio/base64.c 2011-07-18 16:34:29.000000000 +0000 -@@ -4,8 +4,11 @@ - #include - #include - -+#include "system.h" -+ - #include "rpmio/base64.h" - -+#ifndef WITH_BEECRYPT - - static char base64_encode_value(char value_in) - { -@@ -253,3 +256,4 @@ int main(int argc, char *argv[]) - } - #endif - -+#endif /* WITH_BEECRYPT */ ---- ./rpmio/digest.c.orig 2011-07-12 11:28:13.000000000 +0000 -+++ ./rpmio/digest.c 2011-07-18 16:34:29.000000000 +0000 -@@ -4,25 +4,12 @@ - - #include "system.h" - -+#include - #include "rpmio/digest.h" -+#include "rpmio/rpmio_internal.h" - - #include "debug.h" - --#ifdef SHA_DEBUG --#define DPRINTF(_a) fprintf _a --#else --#define DPRINTF(_a) --#endif -- -- --/** -- * MD5/SHA1 digest private data. -- */ --struct DIGEST_CTX_s { -- rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ -- HASHContext *hashctx; /*!< Internal NSS hash context. */ -- int algo; /*!< Used hash algorithm */ --}; - - #define DIGESTS_MAX 11 - struct rpmDigestBundle_s { -@@ -109,138 +96,3 @@ DIGEST_CTX rpmDigestBundleDupCtx(rpmDige - return dup; - } - --DIGEST_CTX --rpmDigestDup(DIGEST_CTX octx) --{ -- DIGEST_CTX nctx = NULL; -- if (octx) { -- HASHContext *hctx = HASH_Clone(octx->hashctx); -- if (hctx) { -- nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); -- nctx->hashctx = hctx; -- } -- } -- return nctx; --} -- --RPM_GNUC_PURE --static HASH_HashType getHashType(int hashalgo) --{ -- switch (hashalgo) { -- case PGPHASHALGO_MD5: -- return HASH_AlgMD5; -- break; -- case PGPHASHALGO_MD2: -- return HASH_AlgMD2; -- break; -- case PGPHASHALGO_SHA1: -- return HASH_AlgSHA1; -- break; -- case PGPHASHALGO_SHA256: -- return HASH_AlgSHA256; -- break; -- case PGPHASHALGO_SHA384: -- return HASH_AlgSHA384; -- break; -- case PGPHASHALGO_SHA512: -- return HASH_AlgSHA512; -- break; -- case PGPHASHALGO_RIPEMD160: -- case PGPHASHALGO_TIGER192: -- case PGPHASHALGO_HAVAL_5_160: -- default: -- return HASH_AlgNULL; -- break; -- } --} -- --size_t --rpmDigestLength(int hashalgo) --{ -- return HASH_ResultLen(getHashType(hashalgo)); --} -- --DIGEST_CTX --rpmDigestInit(int hashalgo, rpmDigestFlags flags) --{ -- HASH_HashType type = getHashType(hashalgo); -- HASHContext *hashctx = NULL; -- DIGEST_CTX ctx = NULL; -- -- if (type == HASH_AlgNULL || rpmInitCrypto() < 0) -- goto exit; -- -- if ((hashctx = HASH_Create(type)) != NULL) { -- ctx = xcalloc(1, sizeof(*ctx)); -- ctx->flags = flags; -- ctx->algo = hashalgo; -- ctx->hashctx = hashctx; -- HASH_Begin(ctx->hashctx); -- } -- --DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); --exit: -- return ctx; --} -- --int --rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) --{ -- size_t partlen; -- const unsigned char *ptr = data; -- -- if (ctx == NULL) -- return -1; -- --DPRINTF((stderr, "*** Update(%p,%p,%zd) hashctx %p \"%s\"\n", ctx, data, len, ctx->hashctx, ((char *)data))); -- partlen = ~(unsigned int)0xFF; -- while (len > 0) { -- if (len < partlen) { -- partlen = len; -- } -- HASH_Update(ctx->hashctx, ptr, partlen); -- ptr += partlen; -- len -= partlen; -- } -- return 0; --} -- --int --rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) --{ -- unsigned char * digest; -- unsigned int digestlen; -- -- if (ctx == NULL) -- return -1; -- digestlen = HASH_ResultLenContext(ctx->hashctx); -- digest = xmalloc(digestlen); -- --DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); --/* FIX: check rc */ -- HASH_End(ctx->hashctx, digest, (unsigned int *) &digestlen, digestlen); -- -- /* Return final digest. */ -- if (!asAscii) { -- if (lenp) *lenp = digestlen; -- if (datap) { -- *datap = digest; -- digest = NULL; -- } -- } else { -- if (lenp) *lenp = (2*digestlen) + 1; -- if (datap) { -- const uint8_t * s = (const uint8_t *) digest; -- *datap = pgpHexStr(s, digestlen); -- } -- } -- if (digest) { -- memset(digest, 0, digestlen); /* In case it's sensitive */ -- free(digest); -- } -- HASH_Destroy(ctx->hashctx); -- memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ -- free(ctx); -- return 0; --} -- ---- ./rpmio/digest.h.orig 2011-07-12 11:28:13.000000000 +0000 -+++ ./rpmio/digest.h 2011-07-18 16:34:29.000000000 +0000 -@@ -1,11 +1,6 @@ - #ifndef _RPMDIGEST_H - #define _RPMDIGEST_H - --#include --#include --#include --#include -- - #include - #include "rpmio/base64.h" - -@@ -42,8 +37,18 @@ struct pgpDig_s { - struct pgpDigParams_s pubkey; - - /* DSA/RSA parameters */ -- SECKEYPublicKey *keydata; -- SECItem *sigdata; -+ void *keydata; -+ void *sigdata; - }; - -+void pgpCleanRSADSA(pgpDig dig); -+ -+int pgpSetSigMpiRSA(pgpDig dig, int num, const uint8_t *p); -+int pgpSetPubMpiRSA(pgpDig dig, int num, const uint8_t *p); -+int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen); -+ -+int pgpSetSigMpiDSA(pgpDig dig, int num, const uint8_t *p); -+int pgpSetPubMpiDSA(pgpDig dig, int num, const uint8_t *p); -+int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen); -+ - #endif /* _RPMDIGEST_H */ ---- ./rpmio/digest_beecrypt.c.orig 2011-07-18 16:34:29.000000000 +0000 -+++ ./rpmio/digest_beecrypt.c 2011-07-18 16:34:29.000000000 +0000 -@@ -0,0 +1,493 @@ +--- ./rpmio/digest_beecrypt.c.orig 2012-05-31 16:42:01.000000000 +0000 ++++ ./rpmio/digest_beecrypt.c 2012-05-31 17:33:28.000000000 +0000 +@@ -0,0 +1,526 @@ +#include "system.h" + +#include @@ -383,303 +152,8 @@ +#include +#include "rpmio/digest.h" +#include "rpmio/rpmio_internal.h" -+ +#include "debug.h" + -+/* interface to beecrpyt crypto framework */ -+ -+/**************************** init ************************************/ -+ -+int rpmInitCrypto(void) { -+ return 0; -+} -+ -+int rpmFreeCrypto(void) { -+ return 0; -+} -+ -+/**************************** helpers ************************************/ -+ -+static inline unsigned int pgpMpiBits(const uint8_t *p) -+{ -+ return ((p[0] << 8) | p[1]); -+} -+ -+static inline size_t pgpMpiLen(const uint8_t *p) -+{ -+ return (2 + ((pgpMpiBits(p)+7)>>3)); -+} -+ -+static inline char * pgpHexCvt(char *t, const byte *s, int nbytes) -+ /*@modifies *t @*/ -+{ -+ static char hex[] = "0123456789abcdef"; -+ while (nbytes-- > 0) { -+ unsigned int i; -+ i = *s++; -+ *t++ = hex[ (i >> 4) & 0xf ]; -+ *t++ = hex[ (i ) & 0xf ]; -+ } -+ *t = '\0'; -+ return t; -+} -+ -+static const char * pgpMpiHex(const byte *p) -+{ -+ static char prbuf[2048]; -+ char *t = prbuf; -+ t = pgpHexCvt(t, p+2, pgpMpiLen(p)-2); -+ return prbuf; -+} -+ -+static int pgpHexSet(int lbits, mpnumber * mpn, const byte * p) -+{ -+ unsigned int mbits = pgpMpiBits(p); -+ unsigned int nbits; -+ unsigned int nbytes; -+ char *t; -+ unsigned int ix; -+ -+ nbits = (lbits > mbits ? lbits : mbits); -+ nbytes = ((nbits + 7) >> 3); -+ t = xmalloc(2*nbytes+1); -+ ix = 2 * ((nbits - mbits) >> 3); -+ -+ if (ix > 0) memset(t, (int)'0', ix); -+ strcpy(t+ix, pgpMpiHex(p)); -+ (void) mpnsethex(mpn, t); -+ t = _free(t); -+ return 0; -+} -+ -+void pgpCleanRSADSA(pgpDig dig) -+{ -+ if (!dig) -+ return; -+ if (dig->keydata) { -+ dig->keydata= _free(dig->keydata); -+ } -+ if (dig->sigdata) { -+ dig->sigdata = _free(dig->sigdata); -+ } -+} -+ -+ -+/****************************** RSA **************************************/ -+ -+struct pgpDigSigRSA_s { -+ mpnumber c; -+}; -+ -+struct pgpDigPubRSA_s { -+ rsapk rsa_pk; -+}; -+ -+int -+pgpSetSigMpiRSA(pgpDig dig, int num, const uint8_t *p) -+{ -+ struct pgpDigSigRSA_s *sig; -+ if (num != 0) -+ return 1; -+ if (!dig->sigdata) -+ dig->sigdata = xcalloc(1, sizeof(*sig)); -+ sig = dig->sigdata; -+ if (!sig) -+ return 1; -+ (void) mpnsethex(&sig->c, pgpMpiHex(p)); -+ return 0; -+} -+ -+int -+pgpSetPubMpiRSA(pgpDig dig, int num, const uint8_t *p) -+{ -+ struct pgpDigPubRSA_s *pub; -+ -+ if (!dig->keydata) -+ dig->keydata = xcalloc(1, sizeof(*pub)); -+ pub = dig->keydata; -+ if (!pub) -+ return 1; -+ switch(num) { -+ case 0: -+ (void) mpbsethex(&pub->rsa_pk.n, pgpMpiHex(p)); -+ return 0; -+ case 1: -+ (void) mpnsethex(&pub->rsa_pk.e, pgpMpiHex(p)); -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+static inline unsigned char nibble(char c) -+{ -+ if (c >= '0' && c <= '9') -+ return (c - '0'); -+ if (c >= 'A' && c <= 'F') -+ return (c - 'A') + 10; -+ if (c >= 'a' && c <= 'f') -+ return (c - 'a') + 10; -+ return 0; -+} -+ -+int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen) -+{ -+ const char * prefix = NULL; -+ int res; -+ mpnumber rsahm; -+ struct pgpDigSigRSA_s *sig; -+ struct pgpDigPubRSA_s *pub; -+ -+ sig = dig->sigdata; -+ pub = dig->keydata; -+ if (!sig || !pub) -+ return 1; -+ -+ switch (dig->signature.hash_algo) { -+ case PGPHASHALGO_MD5: -+ prefix = "3020300c06082a864886f70d020505000410"; -+ break; -+ case PGPHASHALGO_SHA1: -+ prefix = "3021300906052b0e03021a05000414"; -+ break; -+ case PGPHASHALGO_MD2: -+ prefix = "3020300c06082a864886f70d020205000410"; -+ break; -+ case PGPHASHALGO_SHA256: -+ prefix = "3031300d060960864801650304020105000420"; -+ break; -+ case PGPHASHALGO_SHA384: -+ prefix = "3041300d060960864801650304020205000430"; -+ break; -+ case PGPHASHALGO_SHA512: -+ prefix = "3051300d060960864801650304020305000440"; -+ break; -+ /* fallthrough for unsupported / unknown types */ -+ default: -+ return 1; -+ } -+ -+ /* Generate RSA modulus parameter. */ -+ { unsigned int nbits = MP_WORDS_TO_BITS(sig->c.size); -+ unsigned int nb = (nbits + 7) >> 3; -+ byte *buf, *bp; -+ -+ if (nb < 3) -+ return 1; -+ buf = xmalloc(nb); -+ memset(buf, 0xff, nb); -+ buf[0] = 0x00; -+ buf[1] = 0x01; -+ bp = buf + nb - strlen(prefix)/2 - hashlen - 1; -+ if (bp < buf) -+ return 1; -+ *bp++ = 0; -+ for (; *prefix; prefix += 2) -+ *bp++ = (nibble(prefix[0]) << 4) | nibble(prefix[1]); -+ memcpy(bp, hash, hashlen); -+ mpnzero(&rsahm); -+ (void) mpnsetbin(&rsahm, buf, nb); -+ buf = _free(buf); -+ } -+#if HAVE_BEECRYPT_API_H -+ res = rsavrfy(&pub->rsa_pk.n, &pub->rsa_pk.e, &sig->c, &rsahm) == 1 ? 0 : 1; -+#else -+ res = rsavrfy(&pub->rsa_pk, &rsahm, &sig->c) == 1 ? 0 : 1; -+#endif -+ mpnfree(&rsahm); -+ return res; -+} -+ -+ -+/****************************** DSA **************************************/ -+ -+struct pgpDigSigDSA_s { -+ mpnumber r; -+ mpnumber s; -+}; -+ -+struct pgpDigPubDSA_s { -+ mpbarrett p; -+ mpbarrett q; -+ mpnumber g; -+ mpnumber y; -+}; -+ -+int -+pgpSetSigMpiDSA(pgpDig dig, int num, const uint8_t *p) -+{ -+ struct pgpDigSigDSA_s *sig; -+ -+ if (!dig->sigdata) -+ dig->sigdata = xcalloc(1, sizeof(*sig)); -+ sig = dig->sigdata; -+ if (!sig) -+ return 1; -+ switch(num) { -+ case 0: -+ return pgpHexSet(160, &sig->r, p); -+ case 1: -+ return pgpHexSet(160, &sig->s, p); -+ default: -+ return 1; -+ } -+} -+ -+int -+pgpSetPubMpiDSA(pgpDig dig, int num, const uint8_t *p) -+{ -+ struct pgpDigPubDSA_s *pub; -+ -+ if (!dig->keydata) -+ dig->keydata = xcalloc(1, sizeof(*pub)); -+ pub = dig->keydata; -+ if (!pub) -+ return 1; -+ switch(num) { -+ case 0: -+ mpbsethex(&pub->p, pgpMpiHex(p)); -+ return 0; -+ case 1: -+ mpbsethex(&pub->q, pgpMpiHex(p)); -+ return 0; -+ case 2: -+ mpnsethex(&pub->g, pgpMpiHex(p)); -+ return 0; -+ case 3: -+ mpnsethex(&pub->y, pgpMpiHex(p)); -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen) -+{ -+ struct pgpDigSigDSA_s *sig; -+ struct pgpDigPubDSA_s *pub; -+ mpnumber hm; -+ int res; -+ -+ sig = dig->sigdata; -+ pub = dig->keydata; -+ if (!sig || !pub) -+ return 1; -+ mpnzero(&hm); -+ mpnsetbin(&hm, hash, hashlen); -+ res = dsavrfy(&pub->p, &pub->q, &pub->g, &hm, &pub->y, &sig->r, &sig->s) == 1 ? 0 : 1; -+ mpnfree(&hm); -+ return res; -+} -+ -+/**************************** digest ************************************/ -+ -+#ifdef SHA_DEBUG -+#define DPRINTF(_a) fprintf _a -+#else -+#define DPRINTF(_a) -+#endif -+ +/** + * MD5/SHA1 digest private data. + */ @@ -690,25 +164,35 @@ + uint32_t paramlen; /*!< No. bytes of digest parameters. */ + uint32_t digestlen; /*!< No. bytes of digest. */ + void * param; /*!< Digest parameters. */ -+ int (*Reset) (void * param) -+ /*@modifies param @*/; /*!< Digest initialize. */ -+ int (*Update) (void * param, const byte * data, size_t size) -+ /*@modifies param @*/; /*!< Digest transform. */ -+ int (*Digest) (void * param, /*@out@*/ byte * digest) -+ /*@modifies param, digest @*/; /*!< Digest finish. */ ++ int (*Reset) (void * param); /*!< Digest initialize. */ ++ int (*Update) (void * param, const byte * data, size_t size); /*!< Digest transform. */ ++ int (*Digest) (void * param, byte * digest); /*!< Digest finish. */ +}; + -+DIGEST_CTX -+rpmDigestDup(DIGEST_CTX octx) ++ ++/**************************** init ************************************/ ++ ++int rpmInitCrypto(void) { ++ return 0; ++} ++ ++int rpmFreeCrypto(void) { ++ return 0; ++} ++ ++/**************************** digest ************************************/ ++ ++DIGEST_CTX rpmDigestDup(DIGEST_CTX octx) +{ -+ DIGEST_CTX nctx; -+ nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); -+ nctx->param = memcpy(xcalloc(1, nctx->paramlen), octx->param, nctx->paramlen); ++ DIGEST_CTX nctx = NULL; ++ if (octx) { ++ nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); ++ nctx->param = memcpy(xcalloc(1, nctx->paramlen), octx->param, nctx->paramlen); ++ } + return nctx; +} + -+size_t -+rpmDigestLength(int hashalgo) ++size_t rpmDigestLength(int hashalgo) +{ + switch (hashalgo) { + case PGPHASHALGO_MD5: @@ -728,11 +212,9 @@ + } +} + -+DIGEST_CTX -+rpmDigestInit(int hashalgo, rpmDigestFlags flags) ++DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags) +{ + DIGEST_CTX ctx = xcalloc(1, sizeof(*ctx)); -+ int xx; + + ctx->flags = flags; + ctx->algo = hashalgo; @@ -794,25 +276,19 @@ + return NULL; + } + -+ xx = (*ctx->Reset) (ctx->param); -+ -+DPRINTF((stderr, "*** Init(%x) ctx %p param %p\n", flags, ctx, ctx->param)); ++ (*ctx->Reset)(ctx->param); + return ctx; +} + -+/* LCL: ctx->param may be modified, but ctx is abstract @*/ -+int -+rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) ++int rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) +{ + if (ctx == NULL) + return -1; + -+DPRINTF((stderr, "*** Update(%p,%p,%d) param %p \"%s\"\n", ctx, data, len, ctx->param, ((char *)data))); + return (*ctx->Update) (ctx->param, data, len); +} + -+int -+rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) ++int rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) +{ + byte * digest; + char * t; @@ -822,7 +298,6 @@ + return -1; + digest = xmalloc(ctx->digestlen); + -+DPRINTF((stderr, "*** Final(%p,%p,%p,%d) param %p digest %p\n", ctx, datap, lenp, asAscii, ctx->param, digest)); + /* FIX: check rc */ + (void) (*ctx->Digest) (ctx->param, digest); + @@ -857,869 +332,330 @@ + free(ctx); + return 0; +} ---- ./rpmio/digest_nss.c.orig 2011-07-18 16:34:29.000000000 +0000 -+++ ./rpmio/digest_nss.c 2011-07-18 16:34:29.000000000 +0000 -@@ -0,0 +1,500 @@ -+#include -+#include -+#include -+#include -+ -+#include "system.h" -+ -+#include -+#include "rpmio/rpmio_internal.h" -+#include "rpmio/digest.h" -+ -+#include "debug.h" -+ -+/* interface to nss crypto framework */ -+ -+/**************************** init ************************************/ -+ -+static int _crypto_initialized = 0; -+static int _new_process = 1; -+ -+/* -+ * Only flag for re-initialization here, in the common case the child -+ * exec()'s something else shutting down NSS here would be waste of time. -+ */ -+static void at_forkchild(void) { -+ _new_process = 1; -+} -+ -+int rpmInitCrypto(void) { -+ int rc = 0; -+ -+ /* Lazy NSS shutdown for re-initialization after fork() */ -+ if (_new_process && _crypto_initialized) { -+ rpmFreeCrypto(); -+ } -+ -+ /* Initialize NSS if not already done */ -+ if (!_crypto_initialized) { -+ if (NSS_NoDB_Init(NULL) != SECSuccess) { -+ rc = -1; -+ } else { -+ _crypto_initialized = 1; -+ } -+ } -+ -+ /* Register one post-fork handler per process */ -+ if (_new_process) { -+ if (pthread_atfork(NULL, NULL, at_forkchild) != 0) { -+ rpmlog(RPMLOG_WARNING, _("Failed to register fork handler: %m\n")); -+ } -+ _new_process = 0; -+ } -+ return rc; -+} -+ -+int rpmInitCrypto(void) { -+ int rc = 0; -+ -+ if (!_crypto_initialized) { -+ if (NSS_NoDB_Init(NULL) != SECSuccess) { -+ rc = -1; -+ } else { -+ _crypto_initialized = 1; -+ } -+ } -+ return rc; -+} -+ -+int rpmFreeCrypto(void) -+{ -+ int rc = 0; -+ if (_crypto_initialized) { -+ rc = (NSS_Shutdown() != SECSuccess); -+ _crypto_initialized = 0; -+ } -+ return rc; -+} + +/**************************** helpers ************************************/ + -+static SECKEYPublicKey *pgpNewPublicKey(KeyType type) ++static inline char * pgpHexCvt(char *t, const byte *s, int nbytes) +{ -+ PRArenaPool *arena; -+ SECKEYPublicKey *key; -+ -+ arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); -+ if (arena == NULL) -+ return NULL; -+ -+ key = PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey)); -+ -+ if (key == NULL) { -+ PORT_FreeArena(arena, PR_FALSE); -+ return NULL; ++ static char hex[] = "0123456789abcdef"; ++ while (nbytes-- > 0) { ++ unsigned int i; ++ i = *s++; ++ *t++ = hex[ (i >> 4) & 0xf ]; ++ *t++ = hex[ (i ) & 0xf ]; + } -+ -+ key->keyType = type; -+ key->pkcs11ID = CK_INVALID_HANDLE; -+ key->pkcs11Slot = NULL; -+ key->arena = arena; -+ return key; ++ *t = '\0'; ++ return t; +} + -+static SECItem *pgpMpiItem(PRArenaPool *arena, SECItem *item, const uint8_t *p) ++static const char * pgpMpiHex(const byte *p, const byte *pend) +{ -+ size_t nbytes = pgpMpiLen(p)-2; -+ -+ if (item == NULL) { -+ if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL) -+ return item; -+ } else { -+ if (arena != NULL) -+ item->data = PORT_ArenaGrow(arena, item->data, item->len, nbytes); -+ else -+ item->data = PORT_Realloc(item->data, nbytes); -+ -+ if (item->data == NULL) { -+ if (arena == NULL) -+ SECITEM_FreeItem(item, PR_TRUE); -+ return NULL; -+ } -+ } -+ -+ memcpy(item->data, p+2, nbytes); -+ item->len = nbytes; -+ return item; ++ static char prbuf[2048]; ++ char *t = prbuf; ++ int nbytes = pgpMpiLen(p) - 2; ++ if (nbytes > 1024 || nbytes > pend - (p + 2)) ++ return NULL; ++ t = pgpHexCvt(t, p+2, nbytes); ++ return prbuf; +} + -+static int pgpMpiSet(unsigned int lbits, -+ void *dest, const uint8_t * p, const uint8_t * pend) ++static int pgpHexSet(int lbits, mpnumber * mpn, const byte * p, const byte * pend) +{ + unsigned int mbits = pgpMpiBits(p); + unsigned int nbits; -+ size_t nbytes; -+ char *t = dest; ++ unsigned int nbytes; ++ char *t; + unsigned int ix; + -+ if ((p + ((mbits+7) >> 3)) > pend) -+ return 1; -+ -+ if (mbits > lbits) -+ return 1; -+ + nbits = (lbits > mbits ? lbits : mbits); + nbytes = ((nbits + 7) >> 3); -+ ix = (nbits - mbits) >> 3; -+ -+ if (ix > 0) memset(t, '\0', ix); -+ memcpy(t+ix, p+2, nbytes-ix); ++ t = xmalloc(2*nbytes+1); ++ ix = 2 * ((nbits - mbits) >> 3); + ++ if (ix > 0) memset(t, (int)'0', ix); ++ strcpy(t+ix, pgpMpiHex(p, pend)); ++ (void) mpnsethex(mpn, t); ++ t = _free(t); + return 0; +} + -+void pgpCleanRSADSA(pgpDig dig) ++static void pgpFreeSigRSADSA(pgpDigAlg sa) +{ -+ if (!dig) -+ return; -+ if (dig->keydata) { -+ SECKEY_DestroyPublicKey(dig->keydata); -+ dig->keydata = NULL; -+ } -+ if (dig->sigdata) { -+ SECITEM_ZfreeItem(dig->sigdata, PR_TRUE); -+ dig->sigdata = NULL; -+ } ++ if (sa->data) ++ free(sa->data); ++ sa->data = 0; +} + ++static void pgpFreeKeyRSADSA(pgpDigAlg sa) ++{ ++ if (sa->data) ++ free(sa->data); ++ sa->data = 0; ++} ++ ++ +/****************************** RSA **************************************/ + -+int -+pgpSetSigMpiRSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) -+{ -+ SECItem *sig; ++struct pgpDigSigRSA_s { ++ mpnumber c; ++}; + -+ if (num != 0) -+ return 1; -+ sig = dig->rsasigdata; -+ sig = pgpMpiItem(NULL, sig, p); -+ dig->rsasigdata = sig; -+ if (sig == NULL) -+ return 1; ++struct pgpDigKeyRSA_s { ++ rsapk rsa_pk; ++}; ++ ++static int pgpSetSigMpiRSA(pgpDigAlg pgpsig, int num, ++ const uint8_t *p, const uint8_t *pend) ++{ ++ struct pgpDigSigRSA_s *sig = pgpsig->data; ++ int rc = 1; ++ ++ switch (num) { ++ case 0: ++ sig = pgpsig->data = xcalloc(1, sizeof(*sig)); ++ (void) mpnsethex(&sig->c, pgpMpiHex(p, pend)); ++ rc = 0; ++ break; ++ } ++ return rc; ++} ++ ++static int pgpSetKeyMpiRSA(pgpDigAlg pgpkey, int num, ++ const uint8_t *p, const uint8_t *pend) ++{ ++ struct pgpDigKeyRSA_s *key = pgpkey->data; ++ int rc = 1; ++ ++ if (!key) ++ key = pgpkey->data = xcalloc(1, sizeof(*key)); ++ switch (num) { ++ case 0: ++ (void) mpbsethex(&key->rsa_pk.n, pgpMpiHex(p, pend)); ++ rc = 0; ++ break; ++ case 1: ++ (void) mpnsethex(&key->rsa_pk.e, pgpMpiHex(p, pend)); ++ rc = 0; ++ break; ++ } ++ return rc; ++} ++ ++static inline unsigned char nibble(char c) ++{ ++ if (c >= '0' && c <= '9') ++ return (c - '0'); ++ if (c >= 'A' && c <= 'F') ++ return (c - 'A') + 10; ++ if (c >= 'a' && c <= 'f') ++ return (c - 'a') + 10; + return 0; +} + -+int -+pgpSetPubMpiRSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) ++static int pgpVerifySigRSA(pgpDigAlg pgpkey, pgpDigAlg pgpsig, uint8_t *hash, size_t hashlen, int hash_algo) +{ -+ SECKEYPublicKey *pub; ++ struct pgpDigKeyRSA_s *key = pgpkey->data; ++ struct pgpDigSigRSA_s *sig = pgpsig->data; ++ const char * prefix = NULL; ++ mpnumber rsahm; ++ int rc = 1; + -+ if (!dig->keydata) -+ dig->keydata = pgpNewPublicKey(rsaKey); -+ pub = dig->keydata; -+ if (!pub) -+ return 1; -+ switch(num) { -+ case 0: -+ pgpMpiItem(pub->arena, &pub->u.rsa.modulus, p); -+ return 0; -+ case 1: -+ pgpMpiItem(pub->arena, &pub->u.rsa.publicExponent, p); -+ return 0; -+ default: -+ return 1; -+ } -+} ++ if (!sig || !key) ++ return rc; + -+int pgpVerifyRSA(pgpDig dig, uint8_t *hash, size_t hashlen) -+{ -+ SECOidTag sigalg; -+ SECItem digest; -+ SECKEYPublicKey *pub; -+ SECItem *sig; -+ SECItem *newsig = NULL; -+ size_t siglen; -+ int res; -+ -+ switch (dig->hash_algo) { ++ switch (hash_algo) { + case PGPHASHALGO_MD5: -+ sigalg = SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION; ++ prefix = "3020300c06082a864886f70d020505000410"; + break; + case PGPHASHALGO_SHA1: -+ sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; ++ prefix = "3021300906052b0e03021a05000414"; + break; + case PGPHASHALGO_MD2: -+ sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION; ++ prefix = "3020300c06082a864886f70d020205000410"; + break; + case PGPHASHALGO_SHA256: -+ sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; ++ prefix = "3031300d060960864801650304020105000420"; + break; + case PGPHASHALGO_SHA384: -+ sigalg = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; ++ prefix = "3041300d060960864801650304020205000430"; + break; + case PGPHASHALGO_SHA512: -+ sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; ++ prefix = "3051300d060960864801650304020305000440"; + break; -+ /* fallthrough for unsupported / unknown types */ + default: -+ sigalg = SEC_OID_UNKNOWN; -+ break; ++ return 1; + } -+ digest.type = siBuffer; -+ digest.data = hash; -+ digest.len = hashlen; + -+ pub = dig->keydata; -+ sig = dig->sigdata; -+ siglen = SECKEY_SignatureLen(dig->keydata); ++ /* Generate RSA modulus parameter. */ ++ { unsigned int nbits = MP_WORDS_TO_BITS(sig->c.size); ++ unsigned int nb = (nbits + 7) >> 3; ++ byte *buf, *bp; + -+ /* Zero-pad signature data up to expected size if necessary */ -+ if (siglen > sig->len) { -+ size_t pad = siglen - sig->len; -+ if ((newsig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { ++ if (nb < 3) + return 1; -+ } -+ memset(newsig->data, 0, pad); -+ memcpy(newsig->data+pad, sig->data, sig->len); -+ sig = newsig; ++ buf = xmalloc(nb); ++ memset(buf, 0xff, nb); ++ buf[0] = 0x00; ++ buf[1] = 0x01; ++ bp = buf + nb - strlen(prefix)/2 - hashlen - 1; ++ if (bp < buf) ++ return 1; ++ *bp++ = 0; ++ for (; *prefix; prefix += 2) ++ *bp++ = (nibble(prefix[0]) << 4) | nibble(prefix[1]); ++ memcpy(bp, hash, hashlen); ++ mpnzero(&rsahm); ++ (void) mpnsetbin(&rsahm, buf, nb); ++ buf = _free(buf); + } -+ -+ if (VFY_VerifyDigest(&digest, pub, sig, sigalg, NULL) == SECSuccess) -+ res = 0; -+ else -+ res = 1; -+ -+ if (newsig) { -+ SECITEM_ZfreeItem(newsig, 1); -+ } -+ return res; ++#if HAVE_BEECRYPT_API_H ++ rc = rsavrfy(&key->rsa_pk.n, &key->rsa_pk.e, &sig->c, &rsahm) == 1 ? 0 : 1; ++#else ++ rc = rsavrfy(&key->rsa_pk, &rsahm, &sig->c) == 1 ? 0 : 1; ++#endif ++ mpnfree(&rsahm); ++ return rc; +} + + +/****************************** DSA **************************************/ + -+int -+pgpSetSigMpiDSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) -+{ -+ SECItem *sig, *new; -+ -+ switch(num) { -+ case 0: -+ sig = SECITEM_AllocItem(NULL, NULL, 2*DSA_SUBPRIME_LEN); -+ dig->sigdata = sig; -+ memset(sig->data, 0, 2*DSA_SUBPRIME_LEN); -+ pgpMpiSet(DSA_SUBPRIME_LEN*8, sig->data, p, pend); -+ return 0; -+ case 1: -+ sig = dig->sigdata; -+ if (!sig) -+ return 1; -+ pgpMpiSet(DSA_SUBPRIME_LEN*8, sig->data + DSA_SUBPRIME_LEN, p, pend); -+ new = SECITEM_AllocItem(NULL, NULL, 0); -+ if (!new) -+ return 1; -+ if (DSAU_EncodeDerSig(new, sig) != SECSuccess) -+ return 1; -+ SECITEM_FreeItem(sig, PR_TRUE); -+ dig->sigdata = new; -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+int -+pgpSetPubMpiDSA(struct pgpDig_s *dig, int num, const uint8_t *p, const uint8_t *pend) -+{ -+ SECKEYPublicKey *pub; -+ -+ if (!dig->keydata) -+ dig->keydata = pgpNewPublicKey(dsaKey); -+ pub = dig->keydata; -+ if (!pub) -+ return 1; -+ switch(num) { -+ case 0: -+ pgpMpiItem(pub->arena, &pub->u.dsa.params.prime, p); -+ return 0; -+ case 1: -+ pgpMpiItem(pub->arena, &pub->u.dsa.params.subPrime, p); -+ return 0; -+ case 2: -+ pgpMpiItem(pub->arena, &pub->u.dsa.params.base, p); -+ return 0; -+ case 3: -+ pgpMpiItem(pub->arena, &pub->u.dsa.publicValue, p); -+ return 0; -+ default: -+ return 1; -+ } -+} -+ -+int pgpVerifyDSA(pgpDig dig, uint8_t *hash, size_t hashlen) -+{ -+ SECItem digest; -+ SECKEYPublicKey *pub; -+ SECItem *sig; -+ -+ sig = dig->sigdata; -+ pub = dig->keydata; -+ digest.type = siBuffer; -+ digest.data = hash; -+ digest.len = hashlen; -+ if (VFY_VerifyDigest(&digest, pub, sig, SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, NULL) == SECSuccess) -+ return 0; -+ else -+ return 1; -+} -+ -+ -+/**************************** digest ************************************/ -+ -+ -+#ifdef SHA_DEBUG -+#define DPRINTF(_a) fprintf _a -+#else -+#define DPRINTF(_a) -+#endif -+ -+ -+/** -+ * MD5/SHA1 digest private data. -+ */ -+struct DIGEST_CTX_s { -+ rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */ -+ HASHContext *hashctx; /*!< Internal NSS hash context. */ -+ int algo; /*!< Used hash algorithm */ ++struct pgpDigSigDSA_s { ++ mpnumber r; ++ mpnumber s; +}; + -+DIGEST_CTX -+rpmDigestDup(DIGEST_CTX octx) ++struct pgpDigKeyDSA_s { ++ mpbarrett p; ++ mpbarrett q; ++ mpnumber g; ++ mpnumber y; ++}; ++ ++static int pgpSetSigMpiDSA(pgpDigAlg pgpsig, int num, ++ const uint8_t *p, const uint8_t *pend) +{ -+ DIGEST_CTX nctx; -+ nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); -+ nctx->hashctx = HASH_Clone(octx->hashctx); -+ if (nctx->hashctx == NULL) { -+ fprintf(stderr, "HASH_Clone failed\n"); -+ exit(EXIT_FAILURE); /* FIX: callers do not bother checking error return */ ++ struct pgpDigSigDSA_s *sig = pgpsig->data; ++ int rc = 1; ++ ++ switch (num) { ++ case 0: ++ sig = pgpsig->data = xcalloc(1, sizeof(*sig)); ++ rc = pgpHexSet(160, &sig->r, p, pend); ++ break; ++ case 1: ++ rc = pgpHexSet(160, &sig->s, p, pend); ++ break; + } -+ return nctx; ++ return rc; +} + -+RPM_GNUC_PURE -+static HASH_HashType getHashType(int hashalgo) ++static int pgpSetKeyMpiDSA(pgpDigAlg pgpkey, int num, ++ const uint8_t *p, const uint8_t *pend) +{ -+ switch (hashalgo) { -+ case PGPHASHALGO_MD5: -+ return HASH_AlgMD5; ++ struct pgpDigKeyDSA_s *key = pgpkey->data; ++ int rc = 1; ++ ++ if (!key) ++ key = pgpkey->data = xcalloc(1, sizeof(*key)); ++ ++ switch (num) { ++ case 0: ++ mpbsethex(&key->p, pgpMpiHex(p, pend)); ++ rc = 0; + break; -+ case PGPHASHALGO_MD2: -+ return HASH_AlgMD2; ++ case 1: ++ mpbsethex(&key->q, pgpMpiHex(p, pend)); ++ rc = 0; + break; -+ case PGPHASHALGO_SHA1: -+ return HASH_AlgSHA1; ++ case 2: ++ mpnsethex(&key->g, pgpMpiHex(p, pend)); ++ rc = 0; + break; -+ case PGPHASHALGO_SHA256: -+ return HASH_AlgSHA256; ++ case 3: ++ mpnsethex(&key->y, pgpMpiHex(p, pend)); ++ rc = 0; + break; -+ case PGPHASHALGO_SHA384: -+ return HASH_AlgSHA384; -+ break; -+ case PGPHASHALGO_SHA512: -+ return HASH_AlgSHA512; -+ break; -+ case PGPHASHALGO_RIPEMD160: -+ case PGPHASHALGO_TIGER192: -+ case PGPHASHALGO_HAVAL_5_160: ++ } ++ return rc; ++} ++ ++static int pgpVerifySigDSA(pgpDigAlg pgpkey, pgpDigAlg pgpsig, uint8_t *hash, size_t hashlen, int hash_algo) ++{ ++ struct pgpDigKeyDSA_s *key = pgpkey->data; ++ struct pgpDigSigDSA_s *sig = pgpsig->data; ++ mpnumber hm; ++ int rc = 1; ++ ++ if (sig && key) { ++ mpnzero(&hm); ++ mpnsetbin(&hm, hash, hashlen); ++ rc = dsavrfy(&key->p, &key->q, &key->g, &hm, &key->y, &sig->r, &sig->s) == 1 ? 0 : 1; ++ mpnfree(&hm); ++ } ++ return rc; ++} ++ ++static int pgpSetMpiNULL(pgpDigAlg pgpkey, int num, ++ const uint8_t *p, const uint8_t *pend) ++{ ++ return 1; ++} ++ ++static int pgpVerifyNULL(pgpDigAlg pgpkey, pgpDigAlg pgpsig, ++ uint8_t *hash, size_t hashlen, int hash_algo) ++{ ++ return 1; ++} ++ ++pgpDigAlg pgpPubkeyNew(int algo) ++{ ++ pgpDigAlg ka = xcalloc(1, sizeof(*ka));; ++ ++ switch (algo) { ++ case PGPPUBKEYALGO_RSA: ++ ka->setmpi = pgpSetKeyMpiRSA; ++ ka->free = pgpFreeKeyRSADSA; ++ ka->mpis = 2; ++ break; ++ case PGPPUBKEYALGO_DSA: ++ ka->setmpi = pgpSetKeyMpiDSA; ++ ka->free = pgpFreeKeyRSADSA; ++ ka->mpis = 4; ++ break; + default: -+ return HASH_AlgNULL; -+ break; ++ ka->setmpi = pgpSetMpiNULL; ++ ka->mpis = -1; ++ break; + } ++ ++ ka->verify = pgpVerifyNULL; /* keys can't be verified */ ++ ++ return ka; +} + -+size_t -+rpmDigestLength(int hashalgo) ++pgpDigAlg pgpSignatureNew(int algo) +{ -+ return HASH_ResultLen(getHashType(hashalgo)); -+} ++ pgpDigAlg sa = xcalloc(1, sizeof(*sa)); + -+DIGEST_CTX -+rpmDigestInit(int hashalgo, rpmDigestFlags flags) -+{ -+ HASH_HashType type; -+ HASHContext *hashctx = NULL; -+ DIGEST_CTX ctx = NULL; -+ -+ if (type == HASH_AlgNULL || rpmInitCrypto() < 0) -+ return NULL; -+ -+ if ((hashctx = HASH_Create(type)) == NULL) -+ return NULL; -+ ctx = xcalloc(1, sizeof(*ctx)); -+ ctx->flags = flags; -+ ctx->algo = hashalgo; -+ ctx->hashctx = hashctx; -+ HASH_Begin(ctx->hashctx); -+ -+DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); -+ return ctx; -+} -+ -+int -+rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) -+{ -+ size_t partlen; -+ const unsigned char *ptr = data; -+ -+ if (ctx == NULL) -+ return -1; -+ -+DPRINTF((stderr, "*** Update(%p,%p,%zd) hashctx %p \"%s\"\n", ctx, data, len, ctx->hashctx, ((char *)data))); -+ partlen = ~(unsigned int)0xFF; -+ while (len > 0) { -+ if (len < partlen) { -+ partlen = len; -+ } -+ HASH_Update(ctx->hashctx, ptr, partlen); -+ ptr += partlen; -+ len -= partlen; -+ } -+ return 0; -+} -+ -+int -+rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) -+{ -+ unsigned char * digest; -+ unsigned int digestlen; -+ -+ if (ctx == NULL) -+ return -1; -+ digestlen = HASH_ResultLenContext(ctx->hashctx); -+ digest = xmalloc(digestlen); -+ -+DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); -+/* FIX: check rc */ -+ HASH_End(ctx->hashctx, digest, (unsigned int *) &digestlen, digestlen); -+ -+ /* Return final digest. */ -+ if (!asAscii) { -+ if (lenp) *lenp = digestlen; -+ if (datap) { -+ *datap = digest; -+ digest = NULL; -+ } -+ } else { -+ if (lenp) *lenp = (2*digestlen) + 1; -+ if (datap) { -+ const uint8_t * s = (const uint8_t *) digest; -+ *datap = pgpHexStr(s, digestlen); -+ } ++ switch (algo) { ++ case PGPPUBKEYALGO_RSA: ++ sa->setmpi = pgpSetSigMpiRSA; ++ sa->free = pgpFreeSigRSADSA; ++ sa->verify = pgpVerifySigRSA; ++ sa->mpis = 1; ++ break; ++ case PGPPUBKEYALGO_DSA: ++ sa->setmpi = pgpSetSigMpiDSA; ++ sa->free = pgpFreeSigRSADSA; ++ sa->verify = pgpVerifySigDSA; ++ sa->mpis = 2; ++ break; ++ default: ++ sa->setmpi = pgpSetMpiNULL; ++ sa->verify = pgpVerifyNULL; ++ sa->mpis = -1; ++ break; + } -+ if (digest) { -+ memset(digest, 0, digestlen); /* In case it's sensitive */ -+ free(digest); -+ } -+ HASH_Destroy(ctx->hashctx); -+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ -+ free(ctx); -+ return 0; ++ return sa; +} ---- ./rpmio/rpmpgp.c.orig 2011-07-15 09:32:41.000000000 +0000 -+++ ./rpmio/rpmpgp.c 2011-07-18 16:42:25.000000000 +0000 -@@ -20,9 +20,6 @@ static int _debug = 0; - - static int _print = 0; - --static int _crypto_initialized = 0; --static int _new_process = 1; -- - typedef const struct pgpValTbl_s { - int val; - char const * const str; -@@ -315,89 +312,6 @@ int pgpValTok(pgpValTbl vs, const char * - } while ((++vs)->val != -1); - return vs->val; - } --/** -- * @return 0 on success -- */ --static int pgpMpiSet(const char * pre, unsigned int lbits, -- uint8_t *dest, const uint8_t * p, const uint8_t * pend) --{ -- unsigned int mbits = pgpMpiBits(p); -- unsigned int nbits; -- size_t nbytes; -- uint8_t *t = dest; -- unsigned int ix; -- -- if ((p + ((mbits+7) >> 3)) > pend) -- return 1; -- -- if (mbits > lbits) -- return 1; -- -- nbits = (lbits > mbits ? lbits : mbits); -- nbytes = ((nbits + 7) >> 3); -- ix = (nbits - mbits) >> 3; -- --if (_debug) --fprintf(stderr, "*** mbits %u nbits %u nbytes %zu ix %u\n", mbits, nbits, nbytes, ix); -- if (ix > 0) memset(t, '\0', ix); -- memcpy(t+ix, p+2, nbytes-ix); --if (_debug) --fprintf(stderr, "*** %s %s\n", pre, pgpHexStr(dest, nbytes)); -- -- return 0; --} -- --/** -- * @return NULL on error -- */ --static SECItem *pgpMpiItem(PRArenaPool *arena, SECItem *item, const uint8_t *p) --{ -- size_t nbytes = pgpMpiLen(p)-2; -- -- if (item == NULL) { -- if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL) -- return item; -- } else { -- if (arena != NULL) -- item->data = PORT_ArenaGrow(arena, item->data, item->len, nbytes); -- else -- item->data = PORT_Realloc(item->data, nbytes); -- -- if (item->data == NULL) { -- if (arena == NULL) -- SECITEM_FreeItem(item, PR_TRUE); -- return NULL; -- } -- } -- -- memcpy(item->data, p+2, nbytes); -- item->len = nbytes; -- return item; --} --/*@=boundswrite@*/ -- --static SECKEYPublicKey *pgpNewPublicKey(KeyType type) --{ -- PRArenaPool *arena; -- SECKEYPublicKey *key; -- -- arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); -- if (arena == NULL) -- return NULL; -- -- key = PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey)); -- -- if (key == NULL) { -- PORT_FreeArena(arena, PR_FALSE); -- return NULL; -- } -- -- key->keyType = type; -- key->pkcs11ID = CK_INVALID_HANDLE; -- key->pkcs11Slot = NULL; -- key->arena = arena; -- return key; --} - - /** \ingroup rpmpgp - * Is buffer at beginning of an OpenPGP packet? -@@ -593,29 +507,16 @@ static int pgpPrtSigParams(pgpTag tag, u - { - const uint8_t * pend = h + hlen; - size_t i; -- SECItem dsaraw; -- unsigned char dsabuf[2*DSA_SUBPRIME_LEN]; - char *mpi; - -- dsaraw.type = 0; -- dsaraw.data = dsabuf; -- dsaraw.len = sizeof(dsabuf); -- - for (i = 0; p < pend; i++, p += pgpMpiLen(p)) { - if (pubkey_algo == PGPPUBKEYALGO_RSA) { - if (i >= 1) break; - if (_dig && - (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT)) - { -- switch (i) { -- case 0: /* m**d */ -- _dig->sigdata = pgpMpiItem(NULL, _dig->sigdata, p); -- if (_dig->sigdata == NULL) -- return 1; -- break; -- default: -- break; -- } -+ if (pgpSetSigMpiRSA(_dig, i, p)) -+ return 1; - } - pgpPrtStr("", pgpSigRSA[i]); - } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { -@@ -623,30 +524,8 @@ static int pgpPrtSigParams(pgpTag tag, u - if (_dig && - (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT)) - { -- int xx; -- xx = 0; -- switch (i) { -- case 0: -- memset(dsaraw.data, '\0', 2*DSA_SUBPRIME_LEN); -- /* r */ -- xx = pgpMpiSet(pgpSigDSA[i], DSA_SUBPRIME_LEN*8, dsaraw.data, p, pend); -- break; -- case 1: /* s */ -- xx = pgpMpiSet(pgpSigDSA[i], DSA_SUBPRIME_LEN*8, dsaraw.data + DSA_SUBPRIME_LEN, p, pend); -- if (_dig->sigdata != NULL) -- SECITEM_FreeItem(_dig->sigdata, PR_FALSE); -- else if ((_dig->sigdata=SECITEM_AllocItem(NULL, NULL, 0)) == NULL) { -- xx = 1; -- break; -- } -- if (DSAU_EncodeDerSig(_dig->sigdata, &dsaraw) != SECSuccess) -- xx = 1; -- break; -- default: -- xx = 1; -- break; -- } -- if (xx) return xx; -+ if (pgpSetSigMpiDSA(_dig, i, p)) -+ return 1; - } - pgpPrtStr("", pgpSigDSA[i]); - } else { -@@ -842,49 +721,11 @@ static const uint8_t * pgpPrtPubkeyParam - char * mpi; - if (pubkey_algo == PGPPUBKEYALGO_RSA) { - if (i >= 2) break; -- if (_dig) { -- if (_dig->keydata == NULL) { -- _dig->keydata = pgpNewPublicKey(rsaKey); -- if (_dig->keydata == NULL) -- return NULL; -- } -- switch (i) { -- case 0: /* n */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.rsa.modulus, p); -- break; -- case 1: /* e */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.rsa.publicExponent, p); -- break; -- default: -- break; -- } -- } -+ pgpSetPubMpiRSA(_dig, i, p); - pgpPrtStr("", pgpPublicRSA[i]); - } else if (pubkey_algo == PGPPUBKEYALGO_DSA) { - if (i >= 4) break; -- if (_dig) { -- if (_dig->keydata == NULL) { -- _dig->keydata = pgpNewPublicKey(dsaKey); -- if (_dig->keydata == NULL) -- return NULL; -- } -- switch (i) { -- case 0: /* p */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.prime, p); -- break; -- case 1: /* q */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.subPrime, p); -- break; -- case 2: /* g */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.params.base, p); -- break; -- case 3: /* y */ -- pgpMpiItem(_dig->keydata->arena, &_dig->keydata->u.dsa.publicValue, p); -- break; -- default: -- break; -- } -- } -+ pgpSetPubMpiDSA(_dig, i, p); - pgpPrtStr("", pgpPublicDSA[i]); - } else if (pubkey_algo == PGPPUBKEYALGO_ELGAMAL_ENCRYPT) { - if (i >= 3) break; -@@ -1269,15 +1110,7 @@ void pgpCleanDig(pgpDig dig) - memset(&dig->signature, 0, sizeof(dig->signature)); - memset(&dig->pubkey, 0, sizeof(dig->pubkey)); - -- if (dig->keydata != NULL) { -- SECKEY_DestroyPublicKey(dig->keydata); -- dig->keydata = NULL; -- } -- -- if (dig->sigdata != NULL) { -- SECITEM_ZfreeItem(dig->sigdata, PR_TRUE); -- dig->sigdata = NULL; -- } -+ pgpCleanRSADSA(dig); - } - return; - } -@@ -1319,39 +1152,6 @@ int pgpPrtPkts(const uint8_t * pkts, siz - return 0; - } - --static SECOidTag getSigAlg(pgpDigParams sigp) --{ -- SECOidTag sigalg = SEC_OID_UNKNOWN; -- if (sigp->pubkey_algo == PGPPUBKEYALGO_DSA) { -- /* assume SHA1 for now, NSS doesn't have SECOID's for other types */ -- sigalg = SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST; -- } else if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { -- switch (sigp->hash_algo) { -- case PGPHASHALGO_MD5: -- sigalg = SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_MD2: -- sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_SHA1: -- sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_SHA256: -- sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_SHA384: -- sigalg = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; -- break; -- case PGPHASHALGO_SHA512: -- sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; -- break; -- default: -- break; -- } -- } -- return sigalg; --} -- - char *pgpIdentItem(pgpDigParams digp) - { - char *id = NULL; -@@ -1409,30 +1209,12 @@ rpmRC pgpVerifySig(pgpDig dig, DIGEST_CT - if (dig->keydata == NULL) { - res = RPMRC_NOKEY; - } else { -- SECItem digest = { .type = siBuffer, .data = hash, .len = hashlen }; -- SECItem *sig = dig->sigdata; -- -- /* Zero-pad RSA signature to expected size if necessary */ - if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { -- size_t siglen = SECKEY_SignatureLen(dig->keydata); -- if (siglen > sig->len) { -- size_t pad = siglen - sig->len; -- if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { -- goto exit; -- } -- memset(sig->data, 0, pad); -- memcpy(sig->data+pad, dig->sigdata->data, dig->sigdata->len); -- } -- } -- -- /* XXX VFY_VerifyDigest() is deprecated in NSS 3.12 */ -- if (VFY_VerifyDigest(&digest, dig->keydata, sig, -- getSigAlg(sigp), NULL) == SECSuccess) { -- res = RPMRC_OK; -- } -- -- if (sig != dig->sigdata) { -- SECITEM_ZfreeItem(sig, 1); -+ if (!pgpVerifyRSA(dig, hash, hashlen)) -+ res = RPMRC_OK; -+ } else if (sigp->pubkey_algo == PGPPUBKEYALGO_DSA) { -+ if (!pgpVerifyDSA(dig, hash, hashlen)) -+ res = RPMRC_OK; - } - } - -@@ -1620,50 +1402,3 @@ char * pgpArmorWrap(int atype, const uns - return val; - } - --/* -- * Only flag for re-initialization here, in the common case the child -- * exec()'s something else shutting down NSS here would be waste of time. -- */ --static void at_forkchild(void) --{ -- _new_process = 1; --} -- --int rpmInitCrypto(void) { -- int rc = 0; -- -- /* Lazy NSS shutdown for re-initialization after fork() */ -- if (_new_process && _crypto_initialized) { -- rpmFreeCrypto(); -- } -- -- /* Initialize NSS if not already done */ -- if (!_crypto_initialized) { -- if (NSS_NoDB_Init(NULL) != SECSuccess) { -- rc = -1; -- } else { -- _crypto_initialized = 1; -- } -- } -- -- /* Register one post-fork handler per process */ -- if (_new_process) { -- if (pthread_atfork(NULL, NULL, at_forkchild) != 0) { -- rpmlog(RPMLOG_WARNING, _("Failed to register fork handler: %m\n")); -- } -- _new_process = 0; -- } -- return rc; --} -- --int rpmFreeCrypto(void) --{ -- int rc = 0; -- if (_crypto_initialized) { -- rc = (NSS_Shutdown() != SECSuccess); -- _crypto_initialized = 0; -- } -- return rc; --} -- -- diff --git a/rpm-gcc47.patch b/rpm-gcc47.patch deleted file mode 100644 index 051137a..0000000 --- a/rpm-gcc47.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: rpmio/rpmio.c -=================================================================== ---- rpmio/rpmio.c.orig -+++ rpmio/rpmio.c -@@ -1576,8 +1576,8 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n" - if (stdio[0] == '\0') - return NULL; - zstdio[0] = '\0'; -- strncat(zstdio, stdio, sizeof(zstdio) - strlen(zstdio)); -- strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio)); -+ strncat(zstdio, stdio, sizeof(zstdio) - strlen(zstdio) - 1); -+ strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio) - 1); - - if (end == NULL && other[0] == '\0') - return fd; -Index: lib/signature.c -=================================================================== ---- lib/signature.c.orig -+++ lib/signature.c -@@ -5,6 +5,7 @@ - #include "system.h" - - #include -+#include - - #include - #include diff --git a/rpm-python.spec b/rpm-python.spec index 5af67c9..b1125b1 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,9 +15,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: rpm-python -Version: 4.9.1.2 +Version: 4.10.0 Release: 0 #!BuildIgnore: rpmlint-Factory Summary: Python Bindings for Manipulating RPM Packages diff --git a/rpm.changes b/rpm.changes index 3d847c1..2fd416c 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 28 15:30:47 CEST 2012 - mls@suse.de + +- update to rpm-4.10.0 + * get rid of a couple of patches + ------------------------------------------------------------------- Wed Aug 8 10:59:14 UTC 2012 - pgajdos@suse.com diff --git a/rpm.spec b/rpm.spec index 9d02462..80d1b2f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: rpm BuildRequires: binutils BuildRequires: bzip2 @@ -46,7 +45,7 @@ PreReq: %insserv_prereq %fillup_prereq Summary: The RPM Package Manager License: GPL-2.0+ Group: System/Packages -Version: 4.9.1.2 +Version: 4.10.0 Release: 0 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 @@ -117,33 +116,21 @@ Patch61: noprereqdeprec.diff Patch62: pythondeps.diff Patch63: fontprovides.diff Patch64: rpm-gst-provides.patch -Patch65: findlang-new-help.diff -Patch66: initscriptsprov.diff -Patch67: remove-translations.diff -Patch68: no_rep_autop.diff -Patch69: headeradddb.diff -Patch70: dbprivate.diff -Patch71: nobuildcolor.diff -Patch72: fileattrs.diff -Patch73: nomagiccheck.diff -Patch74: findsupplements.diff -Patch75: assumeexec.diff -Patch76: buildpipe.diff -Patch77: mono-find-requires.diff -Patch78: debugedit-stabs-warning.diff -Patch79: headerchk.diff -Patch80: rpm-deptracking.patch -Patch81: python3-abi-kind.diff -Patch82: perl-python-attr.patch -Patch83: findlang-new-help-fix.diff -Patch84: langnoc.diff -Patch85: rpm-gcc47.patch -Patch86: headerchk2.diff -Patch87: pythonhardlink.diff -Patch88: helperenv.diff -Patch89: instobscheck.diff -Patch90: tilde.diff -Patch91: python-capsule-api.diff +Patch65: initscriptsprov.diff +Patch66: remove-translations.diff +Patch67: headeradddb.diff +Patch68: dbprivate.diff +Patch69: nobuildcolor.diff +Patch70: fileattrs.diff +Patch71: nomagiccheck.diff +Patch72: findsupplements.diff +Patch73: assumeexec.diff +Patch74: mono-find-requires.diff +Patch75: rpm-deptracking.patch +Patch76: python3-abi-kind.diff +Patch77: langnoc.diff +Patch78: headerchk2.diff +Patch79: helperenv.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -160,7 +147,6 @@ all installed packages. RPM also supports database queries. %package devel Summary: Include Files and Libraries mandatory for Development -Group: System/Packages Requires: rpm = %{version} # for people confusing the one with the other Recommends: rpm-build = %{version} @@ -175,7 +161,6 @@ need an intimate knowledge of RPM packages in order to function. %package build Summary: Tools and Scripts to create rpm packages -Group: System/Packages Requires: rpm = %{version} Provides: rpm:%_bindir/rpmbuild Provides: rpmbuild @@ -212,14 +197,13 @@ chmod -R u+w db/* rm -f rpmdb/db.h %patch -P 1 -P 2 %patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19 -%patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 -%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39 -%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49 -%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 -%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 -%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 -%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 -P 89 -%patch -P 90 -P 91 +%patch -P 20 -P 21 -P 22 +#%patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 +#%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39 +#%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49 +#%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 +#%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 +#%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov @@ -257,6 +241,7 @@ popd ./autogen.sh --disable-dependency-tracking --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --with-lua \ +--with-vendor=suse \ --with-selinux --with-internal-beecrypt \ --with-acl --with-cap --enable-shared %{?with_python: --enable-python} $BUILDTARGET diff --git a/rpmrc.diff b/rpmrc.diff index 6436a88..50bdcb2 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -1,5 +1,5 @@ ---- rpmrc.in.orig 2011-09-30 08:38:11.410453344 +0200 -+++ rpmrc.in 2011-09-30 14:10:00.149253193 +0200 +--- ./rpmrc.in.orig 2012-04-20 06:46:30.000000000 +0000 ++++ ./rpmrc.in 2012-06-01 12:46:22.000000000 +0000 @@ -12,16 +12,16 @@ # "fat" binary with both archs, for Darwin optflags: fat -O2 -g -arch i386 -arch ppc @@ -26,7 +26,7 @@ optflags: amd64 -O2 -g optflags: ia32e -O2 -g -@@ -41,15 +41,16 @@ +@@ -41,16 +41,17 @@ optflags: sparc64v -O2 -g -m64 -mtune=ni optflags: m68k -O2 -g -fomit-frame-pointer @@ -37,6 +37,7 @@ -optflags: ppciseries -O2 -g -fsigned-char -optflags: ppcpseries -O2 -g -fsigned-char -optflags: ppc64 -O2 -g -fsigned-char +-optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fsigned-char +optflags: ppc -O2 -g -m32 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: ppc8260 -O2 -g -m32 +optflags: ppc8560 -O2 -g -m32 @@ -44,13 +45,14 @@ +optflags: ppciseries -O2 -g -m32 +optflags: ppcpseries -O2 -g -m32 +optflags: ppc64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ++optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: parisc -O2 -g -mpa-risc-1-0 +optflags: hppa -O2 -g -mpa-risc-1-0 optflags: hppa1.0 -O2 -g -mpa-risc-1-0 optflags: hppa1.1 -O2 -g -mpa-risc-1-0 optflags: hppa1.2 -O2 -g -mpa-risc-1-0 -@@ -66,6 +67,7 @@ +@@ -67,6 +68,7 @@ optflags: armv5tel -O2 -g -march=armv5te optflags: armv5tejl -O2 -g -march=armv5te optflags: armv6l -O2 -g -march=armv6 optflags: armv7l -O2 -g -march=armv7 @@ -58,7 +60,7 @@ optflags: atarist -O2 -g -fomit-frame-pointer optflags: atariste -O2 -g -fomit-frame-pointer -@@ -75,8 +77,8 @@ +@@ -76,8 +78,8 @@ optflags: atariclone -O2 -g -fomit-frame optflags: milan -O2 -g -fomit-frame-pointer optflags: hades -O2 -g -fomit-frame-pointer @@ -69,7 +71,7 @@ optflags: sh3 -O2 -g optflags: sh4 -O2 -g -mieee -@@ -140,6 +142,7 @@ +@@ -141,6 +143,7 @@ arch_canon: armv5tel: armv5tel 12 arch_canon: armv5tejl: armv5tejl 12 arch_canon: armv6l: armv6l 12 arch_canon: armv7l: armv7l 12 @@ -77,7 +79,7 @@ arch_canon: m68kmint: m68kmint 13 arch_canon: atarist: m68kmint 13 -@@ -200,17 +203,17 @@ +@@ -202,17 +205,17 @@ os_canon: MacOSX: macosx 21 ############################################################# # For a given uname().machine, the default build arch @@ -103,15 +105,15 @@ buildarchtranslate: i486: i386 buildarchtranslate: i386: i386 -@@ -239,6 +242,7 @@ - buildarchtranslate: ppcpseries: ppc +@@ -242,6 +245,7 @@ buildarchtranslate: ppcpseries: ppc buildarchtranslate: ppc64iseries: ppc64 buildarchtranslate: ppc64pseries: ppc64 + buildarchtranslate: ppc64p7: ppc64 +buildarchtranslate: powerpc64: ppc64 buildarchtranslate: armv3l: armv3l buildarchtranslate: armv4b: armv4b -@@ -248,6 +252,7 @@ +@@ -251,6 +255,7 @@ buildarchtranslate: armv5tel: armv5tel buildarchtranslate: armv5tejl: armv5tejl buildarchtranslate: armv6l: armv6l buildarchtranslate: armv7l: armv7l @@ -119,7 +121,7 @@ buildarchtranslate: atarist: m68kmint buildarchtranslate: atariste: m68kmint -@@ -270,6 +275,15 @@ +@@ -273,6 +278,15 @@ buildarchtranslate: sh3: sh3 buildarchtranslate: sh4: sh4 buildarchtranslate: sh4a: sh4 @@ -135,7 +137,7 @@ ############################################################# # Architecture compatibility -@@ -325,14 +339,19 @@ +@@ -329,14 +343,19 @@ arch_compat: mipsel: noarch arch_compat: hppa2.0: hppa1.2 arch_compat: hppa1.2: hppa1.1 arch_compat: hppa1.1: hppa1.0 @@ -157,7 +159,7 @@ arch_compat: armv4tl: armv4l arch_compat: armv4l: armv3l arch_compat: armv3l: noarch -@@ -349,9 +368,9 @@ +@@ -353,9 +372,9 @@ arch_compat: i370: noarch arch_compat: s390: noarch arch_compat: s390x: s390 noarch @@ -169,7 +171,7 @@ arch_compat: amd64: x86_64 athlon noarch arch_compat: ia32e: x86_64 athlon noarch -@@ -433,6 +452,7 @@ +@@ -438,6 +457,7 @@ buildarch_compat: mips: noarch buildarch_compat: mipsel: noarch buildarch_compat: armv4b: noarch @@ -177,7 +179,7 @@ buildarch_compat: armv7l: armv6l buildarch_compat: armv6l: armv5tejl buildarch_compat: armv5tejl: armv5tel -@@ -444,7 +464,8 @@ +@@ -449,7 +469,8 @@ buildarch_compat: armv3l: noarch buildarch_compat: hppa2.0: hppa1.2 buildarch_compat: hppa1.2: hppa1.1 buildarch_compat: hppa1.1: hppa1.0 diff --git a/rpmrctests.diff b/rpmrctests.diff index 34e42fe..d7e86bd 100644 --- a/rpmrctests.diff +++ b/rpmrctests.diff @@ -1,57 +1,32 @@ Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713] ---- ./lib/rpmrc.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./lib/rpmrc.c 2011-05-11 12:48:02.000000000 +0000 -@@ -1,9 +1,6 @@ - #include "system.h" - - #include --#if defined(__linux__) && defined(__powerpc__) --#include --#endif - - #if HAVE_SYS_UTSNAME_H - #include -@@ -788,6 +785,14 @@ static inline int RPMClass(void) +--- ./lib/rpmrc.c.orig 2012-06-01 10:38:24.000000000 +0000 ++++ ./lib/rpmrc.c 2012-06-01 10:44:59.000000000 +0000 +@@ -786,6 +786,14 @@ static inline int RPMClass(void) cpu = (tfms>>8)&15; + if (cpu == 5 -+ && cpuid_ecx(0)=='68xM' -+ && cpuid_edx(0)=='Teni' ++ && cpuid_ecx(0) == '68xM' ++ && cpuid_edx(0) == 'Teni' + && (cpuid_edx(1) & ((1<<8)|(1<<15))) == ((1<<8)|(1<<15))) { + sigaction(SIGILL, &oldsa, NULL); -+ return 6; /* has CX8 and CMOV */ ++ return 6; /* has CX8 and CMOV */ + } + sigaction(SIGILL, &oldsa, NULL); if (cpu < 6) -@@ -924,15 +929,6 @@ static int is_geode() - } - #endif - --#if defined(__linux__) && defined(__powerpc__) --static jmp_buf mfspr_jmpbuf; -- --static void mfspr_ill(int notused) --{ -- longjmp(mfspr_jmpbuf, -1); --} --#endif -- - /** - */ - static void defaultMachine(const char ** arch, -@@ -1059,6 +1055,11 @@ static void defaultMachine(const char ** - /* big endian */ +@@ -1023,6 +1031,12 @@ static void defaultMachine(const char ** strcpy(un.machine, "mips"); # endif -+ /* in linux, lets rename parisc to hppa */ -+#if defined(__linux__) -+ if (!strcmp(un.machine,"parisc")) -+ strcpy(un.machine,"hppa"); -+#endif ++#if defined(__linux__) ++ /* in linux, lets rename parisc to hppa */ ++ if (rstreq(un.machine, "parisc")) ++ strcpy(un.machine, "hppa"); ++#endif ++ # if defined(__hpux) && defined(_SC_CPU_VERSION) { + # if !defined(CPU_PA_RISC1_2) diff --git a/suspendlock.diff b/suspendlock.diff index f4c981b..6727481 100644 --- a/suspendlock.diff +++ b/suspendlock.diff @@ -2,9 +2,9 @@ Suspend exclusive database lock when scriptlets get called, allowing read access in scriptlets. Only needed for DB_PRIVATE (aka global) locking. ---- ./lib/backend/db3.c.orig 2011-05-12 10:24:20.000000000 +0000 -+++ ./lib/backend/db3.c 2011-05-12 10:26:14.000000000 +0000 -@@ -640,3 +640,59 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt +--- ./lib/backend/db3.c.orig 2012-06-01 10:50:11.000000000 +0000 ++++ ./lib/backend/db3.c 2012-06-01 10:50:19.000000000 +0000 +@@ -628,3 +628,59 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt return rc; } @@ -64,11 +64,11 @@ locking. + return rc; +} + ---- ./lib/backend/dbi.h.orig 2010-12-21 09:48:21.000000000 +0000 -+++ ./lib/backend/dbi.h 2011-05-12 10:24:57.000000000 +0000 -@@ -263,6 +263,24 @@ int dbiFlags(dbiIndex dbi); - RPM_GNUC_INTERNAL - const char * dbiName(dbiIndex dbi); +--- ./lib/backend/dbi.h.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./lib/backend/dbi.h 2012-06-01 10:53:43.000000000 +0000 +@@ -90,6 +90,24 @@ struct dbiIndex_s { + extern "C" { + #endif +/** \ingroup dbi + * Suspend the exclusive lock on the dbi @@ -88,27 +88,27 @@ locking. +RPM_GNUC_INTERNAL +int dbiResumeDBLock(dbiIndex dbi, unsigned int flags); + - #ifdef __cplusplus - } - #endif ---- ./lib/psm.c.orig 2011-05-12 10:23:47.000000000 +0000 -+++ ./lib/psm.c 2011-05-12 10:24:57.000000000 +0000 -@@ -412,10 +412,12 @@ static rpmRC runScript(rpmpsm psm, ARGV_ - script->tag != RPMTAG_VERIFYSCRIPT); - int selinux = !(rpmtsFlags(psm->ts) & RPMTRANS_FLAG_NOCONTEXTS); + + RPM_GNUC_INTERNAL + /* Globally enable/disable fsync in the backend */ +--- ./lib/psm.c.orig 2012-06-01 10:50:11.000000000 +0000 ++++ ./lib/psm.c 2012-06-01 10:51:34.000000000 +0000 +@@ -419,10 +419,12 @@ static rpmRC runScript(rpmpsm psm, ARGV_ + if (sfd == NULL) + sfd = rpmtsScriptFd(psm->ts); + rpmtsSuspendResumeDBLock(psm->ts, 0); rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); - rc = rpmScriptRun(script, arg1, arg2, rpmtsScriptFd(psm->ts), + rc = rpmScriptRun(script, arg1, arg2, sfd, prefixes, warn_only, selinux); rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); + rpmtsSuspendResumeDBLock(psm->ts, 1); - /* - * Notify callback for all errors. "total" abused for warning/error, ---- ./lib/rpmdb.c.orig 2011-05-12 10:23:47.000000000 +0000 -+++ ./lib/rpmdb.c 2011-05-12 10:24:57.000000000 +0000 -@@ -674,6 +674,12 @@ int rpmdbSync(rpmdb db) + /* Map warn-only errors to "notfound" for script stop callback */ + stoprc = (rc != RPMRC_OK && warn_only) ? RPMRC_NOTFOUND : rc; +--- ./lib/rpmdb.c.orig 2012-06-01 10:50:11.000000000 +0000 ++++ ./lib/rpmdb.c 2012-06-01 10:50:19.000000000 +0000 +@@ -769,6 +769,12 @@ int rpmdbSync(rpmdb db) return dbiForeach(db->_dbi, dbiSync, 0); } @@ -121,8 +121,8 @@ locking. static rpmdb newRpmdb(const char * root, const char * home, int mode, int perms, int flags) { ---- ./lib/rpmts.c.orig 2010-12-22 11:17:20.000000000 +0000 -+++ ./lib/rpmts.c 2011-05-12 10:24:57.000000000 +0000 +--- ./lib/rpmts.c.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./lib/rpmts.c 2012-06-01 10:50:19.000000000 +0000 @@ -95,6 +95,11 @@ int rpmtsOpenDB(rpmts ts, int dbmode) return rc; } @@ -135,8 +135,8 @@ locking. int rpmtsInitDB(rpmts ts, int dbmode) { rpmlock lock = rpmtsAcquireLock(ts); ---- ./lib/rpmts.h.orig 2010-12-21 09:50:50.000000000 +0000 -+++ ./lib/rpmts.h 2011-05-12 10:24:57.000000000 +0000 +--- ./lib/rpmts.h.orig 2012-03-20 08:07:25.000000000 +0000 ++++ ./lib/rpmts.h 2012-06-01 10:50:19.000000000 +0000 @@ -423,6 +423,8 @@ rpmdb rpmtsGetRdb(rpmts ts); void * rpmtsNotify(rpmts ts, rpmte te, rpmCallbackType what, rpm_loff_t amount, rpm_loff_t total); diff --git a/tilde.diff b/tilde.diff deleted file mode 100644 index 771eca7..0000000 --- a/tilde.diff +++ /dev/null @@ -1,116 +0,0 @@ ---- ./build/pack.c.orig 2012-04-20 13:43:49.000000000 +0000 -+++ ./build/pack.c 2012-04-20 14:23:57.000000000 +0000 -@@ -308,6 +308,44 @@ static rpmRC processScriptFiles(rpmSpec - return RPMRC_OK; - } - -+/** -+ */ -+static int depContainsTilde(Header h, rpmTagVal tagEVR) -+{ -+ struct rpmtd_s evrs; -+ const char *evr = NULL; -+ -+ if (headerGet(h, tagEVR, &evrs, HEADERGET_MINMEM)) { -+ while ((evr = rpmtdNextString(&evrs)) != NULL) -+ if (strchr(evr, '~')) -+ break; -+ rpmtdFreeData(&evrs); -+ } -+ return evr != NULL; -+} -+ -+static rpmTagVal depevrtags[] = { -+ RPMTAG_PROVIDEVERSION, -+ RPMTAG_REQUIREVERSION, -+ RPMTAG_OBSOLETEVERSION, -+ RPMTAG_CONFLICTVERSION, -+ RPMTAG_ORDERVERSION, -+ RPMTAG_TRIGGERVERSION, -+ RPMTAG_SUGGESTSVERSION, -+ RPMTAG_ENHANCESVERSION, -+ 0 -+}; -+ -+static int haveTildeDep(Header h) -+{ -+ int i; -+ -+ for (i = 0; depevrtags[i] != 0; i++) -+ if (depContainsTilde(h, depevrtags[i])) -+ return 1; -+ return 0; -+} -+ - static rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, - CSA_t csa, char **cookie) - { -@@ -382,6 +420,10 @@ static rpmRC writeRPM(Header *hdrp, unsi - free(buf); - } - -+ /* check if the package has a dependency with a '~' */ -+ if (haveTildeDep(h)) -+ (void) rpmlibNeedsFeature(h, "TildeInVersions", "4.10.0-1"); -+ - /* Create and add the cookie */ - if (cookie) { - rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime())); ---- ./build/parsePreamble.c.orig 2012-04-20 14:29:26.000000000 +0000 -+++ ./build/parsePreamble.c 2012-04-20 14:30:18.000000000 +0000 -@@ -671,7 +671,7 @@ static int handlePreambleTag(rpmSpec spe - case RPMTAG_VERSION: - case RPMTAG_RELEASE: - SINGLE_TOKEN_ONLY; -- if (rpmCharCheck(spec, field, strlen(field), "._+%{}") != RPMRC_OK) return RPMRC_FAIL; -+ if (rpmCharCheck(spec, field, strlen(field), "._+%{}~") != RPMRC_OK) return RPMRC_FAIL; - headerPutString(pkg->header, tag, field); - break; - case RPMTAG_URL: ---- ./build/parseReqs.c.orig 2012-04-20 14:29:22.000000000 +0000 -+++ ./build/parseReqs.c 2012-04-20 14:29:57.000000000 +0000 -@@ -170,7 +170,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package p - } - EVR = xmalloc((ve-v) + 1); - rstrlcpy(EVR, v, (ve-v) + 1); -- if (rpmCharCheck(spec, EVR, ve-v, ".-_+:%{}")) goto exit; -+ if (rpmCharCheck(spec, EVR, ve-v, ".-_+:%{}~")) goto exit; - re = ve; /* ==> next token after EVR string starts here */ - } else - EVR = NULL; ---- ./lib/rpmds.c.orig 2012-04-20 13:44:06.000000000 +0000 -+++ ./lib/rpmds.c 2012-04-20 13:44:12.000000000 +0000 -@@ -913,6 +913,9 @@ static const struct rpmlibProvides_s rpm - { "rpmlib(ScriptletExpansion)", "4.9.0-1", - ( RPMSENSE_EQUAL), - N_("package scriptlets can be expanded at install time.") }, -+ { "rpmlib(TildeInVersions)", "4.10.0-1", -+ ( RPMSENSE_EQUAL), -+ N_("dependency comparison supports versions with tilde.") }, - { NULL, NULL, 0, NULL } - }; - ---- ./lib/rpmvercmp.c.orig 2012-04-20 13:44:06.000000000 +0000 -+++ ./lib/rpmvercmp.c 2012-04-20 13:44:12.000000000 +0000 -@@ -32,9 +32,18 @@ int rpmvercmp(const char * a, const char - two = str2; - - /* loop through each version segment of str1 and str2 and compare them */ -- while (*one && *two) { -- while (*one && !risalnum(*one)) one++; -- while (*two && !risalnum(*two)) two++; -+ while (*one || *two) { -+ while (*one && !risalnum(*one) && *one != '~') one++; -+ while (*two && !risalnum(*two) && *two != '~') two++; -+ -+ /* handle the tilde separator, it sorts before everthing else */ -+ if (*one == '~' || *two == '~') { -+ if (*one != '~') return 1; -+ if (*two != '~') return -1; -+ one++; -+ two++; -+ continue; -+ } - - /* If we ran to the end of either, we are finished with the loop */ - if (!(*one && *two)) break; diff --git a/waitlock.diff b/waitlock.diff index 8a811c5..4fd6314 100644 --- a/waitlock.diff +++ b/waitlock.diff @@ -1,9 +1,9 @@ Fix global (DB_PRIVATE) lock code: fix recursion counter, retry failed lock operations for up to 3 minutes. ---- ./lib/backend/db3.c.orig 2011-03-02 06:40:10.000000000 +0000 -+++ ./lib/backend/db3.c 2011-05-12 10:24:20.000000000 +0000 -@@ -432,6 +432,8 @@ int dbiVerify(dbiIndex dbi, unsigned int +--- ./lib/backend/db3.c.orig 2012-05-04 09:47:17.000000000 +0000 ++++ ./lib/backend/db3.c 2012-06-01 10:47:01.000000000 +0000 +@@ -422,6 +422,8 @@ int dbiVerify(dbiIndex dbi, unsigned int return rc; } @@ -12,7 +12,7 @@ failed lock operations for up to 3 minutes. int dbiClose(dbiIndex dbi, unsigned int flags) { rpmdb rdb = dbi->dbi_rpmdb; -@@ -451,6 +453,8 @@ int dbiClose(dbiIndex dbi, unsigned int +@@ -439,6 +441,8 @@ int dbiClose(dbiIndex dbi, unsigned int rpmlog(RPMLOG_DEBUG, "closed db index %s/%s\n", dbhome, dbi->dbi_file); @@ -20,8 +20,8 @@ failed lock operations for up to 3 minutes. + _lockdbfd--; } - xx = db_fini(rdb, dbhome ? dbhome : ""); -@@ -490,6 +494,7 @@ static int dbiFlock(dbiIndex dbi, int mo + db_fini(rdb, dbhome ? dbhome : ""); +@@ -478,6 +482,7 @@ static int dbiFlock(dbiIndex dbi, int mo rc = 1; } else { const char *dbhome = rpmdbHome(dbi->dbi_rpmdb); @@ -29,7 +29,7 @@ failed lock operations for up to 3 minutes. struct flock l; memset(&l, 0, sizeof(l)); l.l_whence = 0; -@@ -499,20 +504,38 @@ static int dbiFlock(dbiIndex dbi, int mo +@@ -487,20 +492,38 @@ static int dbiFlock(dbiIndex dbi, int mo ? F_RDLCK : F_WRLCK; l.l_pid = 0; @@ -82,7 +82,7 @@ failed lock operations for up to 3 minutes. } } return rc; -@@ -529,7 +552,6 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt +@@ -517,7 +540,6 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt DB * db = NULL; DBTYPE dbtype = DB_UNKNOWN; uint32_t oflags; @@ -90,7 +90,7 @@ failed lock operations for up to 3 minutes. if (dbip) *dbip = NULL; -@@ -603,7 +625,10 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt +@@ -591,7 +613,10 @@ int dbiOpen(rpmdb rdb, rpmDbiTagVal rpmt dbi->dbi_db = db; dbi->dbi_oflags = oflags; diff --git a/weakdeps.diff b/weakdeps.diff index f46e0cc..c912f95 100644 --- a/weakdeps.diff +++ b/weakdeps.diff @@ -14,9 +14,9 @@ B) use RPMSENSE_STRONG to support a "strong" version, "Recommends" Needs extcond.diff for query operations. ---- ./build/parsePreamble.c.orig 2011-01-25 13:52:28.000000000 +0000 -+++ ./build/parsePreamble.c 2011-05-11 14:09:07.000000000 +0000 -@@ -310,6 +310,8 @@ static struct tokenBits_s const installS +--- ./build/parsePreamble.c.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./build/parsePreamble.c 2012-08-28 13:25:59.000000000 +0000 +@@ -342,6 +342,8 @@ static struct tokenBits_s const installS { "verify", RPMSENSE_SCRIPT_VERIFY }, { "pretrans", RPMSENSE_PRETRANS }, { "posttrans", RPMSENSE_POSTTRANS }, @@ -25,9 +25,9 @@ Needs extcond.diff for query operations. { NULL, 0 } }; -@@ -790,6 +792,18 @@ static int handlePreambleTag(rpmSpec spe - if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) - return rc; +@@ -816,6 +818,18 @@ static rpmRC handlePreambleTag(rpmSpec s + if (parseRCPOT(spec, pkg, field, tag, 0, tagflags)) + goto exit; break; + case RPMTAG_SUGGESTSFLAGS: + case RPMTAG_ENHANCESFLAGS: @@ -44,7 +44,7 @@ Needs extcond.diff for query operations. case RPMTAG_EXCLUDEARCH: case RPMTAG_EXCLUSIVEARCH: case RPMTAG_EXCLUDEOS: -@@ -895,6 +909,14 @@ static struct PreambleRec_s const preamb +@@ -924,6 +938,14 @@ static struct PreambleRec_s const preamb {RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")}, {RPMTAG_COLLECTIONS, 0, 0, LEN_AND_STR("collections")}, {RPMTAG_ORDERFLAGS, 2, 0, LEN_AND_STR("orderwithrequires")}, @@ -59,8 +59,8 @@ Needs extcond.diff for query operations. {0, 0, 0, 0} }; ---- ./build/parseReqs.c.orig 2010-12-13 14:01:56.000000000 +0000 -+++ ./build/parseReqs.c 2011-05-11 14:16:43.000000000 +0000 +--- ./build/parseReqs.c.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./build/parseReqs.c 2012-08-28 13:25:59.000000000 +0000 @@ -95,6 +95,20 @@ rpmRC parseRCPOT(rpmSpec spec, Package p nametag = RPMTAG_CONFLICTNAME; h = spec->buildRestrictions; @@ -82,8 +82,8 @@ Needs extcond.diff for query operations. } for (r = field; *r != '\0'; r = re) { ---- ./build/reqprov.c.orig 2010-12-13 14:01:56.000000000 +0000 -+++ ./build/reqprov.c 2011-05-11 14:15:02.000000000 +0000 +--- ./build/reqprov.c.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./build/reqprov.c 2012-08-28 13:25:59.000000000 +0000 @@ -75,6 +75,16 @@ int addReqProv(Header h, rpmTagVal tagN, indextag = RPMTAG_TRIGGERINDEX; extra = Flags & RPMSENSE_TRIGGER; @@ -101,9 +101,9 @@ Needs extcond.diff for query operations. case RPMTAG_REQUIRENAME: default: tagN = RPMTAG_REQUIRENAME; ---- ./build/rpmfc.c.orig 2011-02-28 09:57:21.000000000 +0000 -+++ ./build/rpmfc.c 2011-05-11 13:58:33.000000000 +0000 -@@ -1075,6 +1075,12 @@ static struct DepMsg_s depMsgs[] = { +--- ./build/rpmfc.c.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./build/rpmfc.c 2012-08-28 13:25:59.000000000 +0000 +@@ -1084,6 +1084,12 @@ static struct DepMsg_s depMsgs[] = { { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, 0, -1 }, @@ -117,7 +117,7 @@ Needs extcond.diff for query operations. }; @@ -1160,6 +1166,14 @@ static rpmRC rpmfcGenerateDependsHelper( - failnonzero = 0; + continue; tagflags = RPMSENSE_FIND_REQUIRES; break; + case RPMTAG_ENHANCESFLAGS: @@ -131,13 +131,13 @@ Needs extcond.diff for query operations. default: continue; break; ---- ./lib/formats.c.orig 2011-01-25 13:52:28.000000000 +0000 -+++ ./lib/formats.c 2011-05-11 14:02:09.000000000 +0000 -@@ -560,6 +560,24 @@ static char * depflagsFormat(rpmtd td, c +--- ./lib/formats.c.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./lib/formats.c 2012-08-28 13:27:31.000000000 +0000 +@@ -482,6 +482,19 @@ static char * depflagsFormat(rpmtd td) return val; } -+static char * depflag_strongFormat(rpmtd td, char * formatPrefix) ++static char * depflag_strongFormat(rpmtd td) +{ + char * val = NULL; + @@ -145,12 +145,7 @@ Needs extcond.diff for query operations. + val = xstrdup(_("(not a number)")); + } else { + uint64_t anint = rpmtdGetNumber(td); -+ char buf[10]; -+ buf[0] = '\0'; -+ if (anint & RPMSENSE_STRONG) -+ strcat(buf, "strong"); -+ strcat(formatPrefix, "s"); -+ rasprintf(&val, formatPrefix, buf); ++ val = xstrdup(anint & RPMSENSE_STRONG ? "strong" : ""); + } + return val; +} @@ -158,7 +153,7 @@ Needs extcond.diff for query operations. /** * Return tag container array size. * @param td tag data container -@@ -672,6 +690,7 @@ static const struct headerFormatFunc_s r +@@ -587,6 +600,7 @@ static const struct headerFormatFunc_s r { RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat }, { RPMTD_FORMAT_EXPAND, "expand", expandFormat }, { RPMTD_FORMAT_FSTATUS, "fstatus", fstatusFormat }, @@ -166,8 +161,8 @@ Needs extcond.diff for query operations. { -1, NULL, NULL } }; ---- ./lib/rpmds.c.orig 2011-02-15 13:04:04.000000000 +0000 -+++ ./lib/rpmds.c 2011-05-11 13:58:33.000000000 +0000 +--- ./lib/rpmds.c.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./lib/rpmds.c 2012-08-28 13:25:59.000000000 +0000 @@ -69,6 +69,10 @@ static int dsType(rpmTagVal tag, t = "Trigger"; evr = RPMTAG_TRIGGERVERSION; @@ -179,8 +174,8 @@ Needs extcond.diff for query operations. } else { rc = 1; } ---- ./lib/rpmds.h.orig 2011-05-11 09:15:33.000000000 +0000 -+++ ./lib/rpmds.h 2011-05-11 14:01:07.000000000 +0000 +--- ./lib/rpmds.h.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./lib/rpmds.h 2012-08-28 13:25:59.000000000 +0000 @@ -48,7 +48,7 @@ enum rpmsenseFlags_e { RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ @@ -198,11 +193,11 @@ Needs extcond.diff for query operations. RPMSENSE_RPMLIB | \ RPMSENSE_KEYRING | \ RPMSENSE_PRETRANS | \ ---- ./lib/rpmtag.h.orig 2010-12-13 14:01:56.000000000 +0000 -+++ ./lib/rpmtag.h 2011-05-11 13:58:33.000000000 +0000 +--- ./lib/rpmtag.h.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./lib/rpmtag.h 2012-08-28 13:25:59.000000000 +0000 @@ -217,14 +217,14 @@ typedef enum rpmTag_e { - RPMTAG_PRETRANSPROG = 1153, /* s */ - RPMTAG_POSTTRANSPROG = 1154, /* s */ + RPMTAG_PRETRANSPROG = 1153, /* s[] */ + RPMTAG_POSTTRANSPROG = 1154, /* s[] */ RPMTAG_DISTTAG = 1155, /* s */ - RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */ -#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */ @@ -223,9 +218,9 @@ Needs extcond.diff for query operations. RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ RPMTAG_CVSID = 1163, /* s (unimplemented) */ #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ ---- ./lib/rpmtd.h.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./lib/rpmtd.h 2011-05-11 14:00:06.000000000 +0000 -@@ -220,6 +220,7 @@ typedef enum rpmtdFormats_e { +--- ./lib/rpmtd.h.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./lib/rpmtd.h 2012-08-28 13:25:59.000000000 +0000 +@@ -228,6 +228,7 @@ typedef enum rpmtdFormats_e { RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int types) */ RPMTD_FORMAT_EXPAND = 18, /* macro expansion (string types) */ RPMTD_FORMAT_FSTATUS = 19, /* file verify status (int types) */ @@ -233,9 +228,9 @@ Needs extcond.diff for query operations. } rpmtdFormats; /** \ingroup rpmtd ---- ./python/rpmmodule.c.orig 2010-12-03 12:11:57.000000000 +0000 -+++ ./python/rpmmodule.c 2011-05-11 14:19:37.000000000 +0000 -@@ -376,6 +376,7 @@ static int initModule(PyObject *m) +--- ./python/rpmmodule.c.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./python/rpmmodule.c 2012-08-28 13:25:59.000000000 +0000 +@@ -395,6 +395,7 @@ static int initModule(PyObject *m) REGISTER_ENUM(RPMSENSE_RPMLIB); REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); REGISTER_ENUM(RPMSENSE_KEYRING); @@ -243,9 +238,9 @@ Needs extcond.diff for query operations. REGISTER_ENUM(RPMSENSE_CONFIG); REGISTER_ENUM(RPMTRANS_FLAG_TEST); ---- ./rpmpopt.in.orig 2011-01-11 07:04:51.000000000 +0000 -+++ ./rpmpopt.in 2011-05-11 14:18:47.000000000 +0000 -@@ -65,6 +65,22 @@ rpm alias --requires --qf \ +--- ./rpmpopt.in.orig 2012-08-28 13:25:49.000000000 +0000 ++++ ./rpmpopt.in 2012-08-28 13:25:59.000000000 +0000 +@@ -67,6 +67,22 @@ rpm alias --requires --qf \ --POPTdesc=$"list capabilities required by package(s)" rpm alias -R --requires @@ -268,3 +263,27 @@ Needs extcond.diff for query operations. rpm alias --info --qf '\ Name : %{NAME}\n\ %|EPOCH?{Epoch : %{EPOCH}\n}|\ +--- ./tests/rpmgeneral.at.orig 2012-08-28 13:27:44.000000000 +0000 ++++ ./tests/rpmgeneral.at 2012-08-28 13:28:26.000000000 +0000 +@@ -79,6 +79,10 @@ DISTTAG + DISTURL + DSAHEADER + E ++ENHANCES ++ENHANCESFLAGS ++ENHANCESNAME ++ENHANCESVERSION + EPOCH + EPOCHNUM + EVR +@@ -219,6 +223,10 @@ SOURCE + SOURCEPACKAGE + SOURCEPKGID + SOURCERPM ++SUGGESTS ++SUGGESTSFLAGS ++SUGGESTSNAME ++SUGGESTSVERSION + SUMMARY + TRIGGERCONDS + TRIGGERFLAGS