Accepting request 183537 from Base:System

->

OBS-URL: https://build.opensuse.org/request/show/183537
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=207
This commit is contained in:
Stephan Kulow 2013-07-18 14:07:55 +00:00 committed by Git OBS Bridge
commit abe5441fca
31 changed files with 420 additions and 2163 deletions

View File

@ -1,26 +1,26 @@
--- tools/elfdeps.c.orig 2011-06-03 13:12:32.000000000 +0000
+++ tools/elfdeps.c 2011-06-03 13:17:45.000000000 +0000
@@ -14,6 +14,7 @@
--- tools/elfdeps.c.orig 2013-01-30 15:33:12.000000000 +0000
+++ tools/elfdeps.c 2013-07-12 12:21:47.000000000 +0000
@@ -15,6 +15,7 @@
int filter_private = 0;
int soname_only = 0;
int fake_soname = 1;
+int assume_exec = 0;
typedef struct elfInfo_s {
Elf *elf;
@@ -226,7 +227,7 @@ static int processFile(const char *fn, i
ei->isElf64 = 0;
#endif
@@ -235,7 +236,7 @@ static int processFile(const char *fn, i
if (ehdr->e_type == ET_DYN || ehdr->e_type == ET_EXEC) {
ei->marker = mkmarker(ehdr);
ei->isDSO = (ehdr->e_type == ET_DYN);
- ei->isExec = (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH));
+ ei->isExec = assume_exec || (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH));
processSections(ei);
}
@@ -279,6 +280,7 @@ int main(int argc, char *argv[])
{ "requires", 'R', POPT_ARG_VAL, &requires, -1, NULL, NULL },
@@ -292,6 +293,7 @@ int main(int argc, char *argv[])
{ "filter-private", 0, POPT_ARG_VAL, &filter_private, -1, NULL, NULL },
{ "soname-only", 0, POPT_ARG_VAL, &soname_only, -1, NULL, NULL },
{ "no-fake-soname", 0, POPT_ARG_VAL, &fake_soname, 0, NULL, NULL },
+ { "assume-exec", 0, POPT_ARG_VAL, &assume_exec, -1, NULL, NULL },
POPT_AUTOHELP
POPT_TABLEEND

View File

@ -14,20 +14,7 @@
cat Makefile.orig | sed -e '/^install[:-]/c\
--- installplatform
+++ installplatform
@@ -95,6 +95,12 @@
CANONARCH=arm
CANONCOLOR=0
;;
+ aarch64*)
+ ISANAME=aarchh
+ ISABITS=64
+ CANONARCH=aarch64
+ CANONCOLOR=3
+ ;;
alpha*)
ISANAME=alpha
ISABITS=64
@@ -118,6 +124,11 @@
@@ -118,6 +118,11 @@
PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
[ -d $PPD ] || mkdir -p $PPD

View File

@ -1,18 +1,12 @@
Exclude /usr/share/info/dir from check-files. Probably only
interesting for SUSE.
Index: scripts/check-files
===================================================================
--- scripts/check-files.orig
+++ scripts/check-files
@@ -22,7 +22,9 @@ LC_ALL=C sort > $FILES_RPM
--- scripts/check-files.orig 2013-06-10 15:55:10.000000000 +0000
+++ scripts/check-files 2013-07-12 11:45:37.000000000 +0000
@@ -28,5 +28,5 @@ trap "rm -f \"${FILES_DISK}\"" 0 2 3 5 1
# Find non-directory files in the build root and compare to the manifest.
# TODO: regex chars in last sed(1) expression should be escaped
find "${RPM_BUILD_ROOT}" -type f -o -type l | LC_ALL=C sort > "${FILES_DISK}"
-LC_ALL=C sort | diff -d "${FILES_DISK}" - | sed -n 's|^< '"${RPM_BUILD_ROOT}"'\(.*\)$| \1|gp'
+LC_ALL=C sort | diff -d "${FILES_DISK}" - | sed -n -e 's|^< '"${RPM_BUILD_ROOT}"'/usr/share/info/dir$||' -e 's|^< '"${RPM_BUILD_ROOT}"'\(.*\)$| \1|gp'
diff -d "$FILES_DISK" "$FILES_RPM" | grep "^< " | cut -c3- |
while read f; do
- echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g"
+ if test "$RPM_BUILD_ROOT/usr/share/info/dir" != "$f" ; then
+ echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g"
+ fi
done
rm -f $FILES_DISK

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
Always use DB_PRIVATE. Unfortunately no longer configurable
in the macros file.
--- ./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;
--- ./lib/backend/db3.c.orig 2013-07-12 12:09:45.000000000 +0000
+++ ./lib/backend/db3.c 2013-07-12 12:11:07.000000000 +0000
@@ -164,7 +164,7 @@ static int db_init(rpmdb rdb, const char
int lockfd = -1;
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);

View File

@ -1,6 +1,6 @@
--- ./lib/rpmdb.c.orig 2011-09-19 10:02:08.000000000 +0000
+++ ./lib/rpmdb.c 2011-10-19 15:06:25.000000000 +0000
@@ -630,10 +630,12 @@ int rpmdbClose(rpmdb db)
--- ./lib/rpmdb.c.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./lib/rpmdb.c 2013-07-12 11:28:22.000000000 +0000
@@ -730,10 +730,12 @@ int rpmdbClose(rpmdb db)
{
rpmdb * prev, next;
int rc = 0;
@ -13,7 +13,7 @@
(void) rpmdbUnlink(db);
if (db->nrefs > 0)
@@ -661,7 +663,7 @@ int rpmdbClose(rpmdb db)
@@ -761,7 +763,7 @@ int rpmdbClose(rpmdb db)
db = _free(db);
@ -22,8 +22,8 @@
(void) rpmsqEnable(-SIGHUP, NULL);
(void) rpmsqEnable(-SIGINT, NULL);
(void) rpmsqEnable(-SIGTERM, NULL);
@@ -730,7 +732,7 @@ static int openDatabase(const char * pre
/* Try to ensure db home exists, error out if we cant even create */
@@ -830,7 +832,7 @@ static int openDatabase(const char * pre
/* Try to ensure db home exists, error out if we can't even create */
rc = rpmioMkpath(rpmdbHome(db), 0755, getuid(), getgid());
if (rc == 0) {
- if (rpmdbRock == NULL) {

View File

@ -1,15 +0,0 @@
Index: tools/debugedit.c
===================================================================
--- tools/debugedit.c.orig
+++ tools/debugedit.c
@@ -1223,6 +1223,10 @@ edit_dwarf2 (DSO *dso)
if (rtype != R_ALPHA_REFLONG)
goto fail;
break;
+ case EM_AARCH64:
+ if (rtype != R_AARCH64_ABS32)
+ goto fail;
+ break;
default:
fail:
error (1, 0, "%s: Unhandled relocation %d in .debug_info section",

View File

@ -219,7 +219,7 @@ Index: build/files.c
+ new debuginfo package. */
+ if (files)
+ {
+ dbg = newPackage (spec);
+ dbg = newPackage(NULL, spec->pool, &spec->packages);
+ headerNVR (pkg->header, &name, NULL, NULL);
+ /* Set name, summary and group. */
+ snprintf (tmp, 1024, "%s-debuginfo", name);

View File

@ -1,17 +0,0 @@
Print "unpackaged files" section even if there was an error
in the filelist.
--- ./build/files.c.orig 2011-05-11 15:27:11.000000000 +0000
+++ ./build/files.c 2011-05-11 15:29:12.000000000 +0000
@@ -2149,10 +2149,10 @@ rpmRC processBinaryFiles(rpmSpec spec, r
*/
+exit:
if (checkFiles(spec->buildRoot, check_fileList) > 0) {
rc = RPMRC_FAIL;
}
-exit:
check_fileList = freeStringBuf(check_fileList);
return rc;

View File

@ -1,109 +1,43 @@
SUSE specific kernel provides/requires scripts
--- scripts/find-provides.ksyms
+++ scripts/find-provides.ksyms
@@ -0,0 +1,41 @@
+#! /bin/sh
+
+IFS=$'\n'
+
+case "$1" in
+kernel-module-*) ;; # Fedora kernel module package names start with
+ # kernel-module.
+kernel*) kernel_flavor=${1#kernel-} ;;
+esac
+
+trap 'rm -f "$tmp"' EXIT
+tmp=$(mktemp)
+while read f; do
+ test -e "$f" || continue
+ case "$f" in
+ *.debug)
+ continue
+ ;;
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*)
+ ;;
+ *)
+ continue
+ esac
+ unzip=false
+ case "$f" in
+ *.gz | */boot/vmlinuz*)
+ unzip=true
+ esac
+ if $unzip && gzip -cd "$f" >"$tmp"; then
+ f=$tmp
+ fi
+ flavor=$(/sbin/modinfo -F vermagic "$f")
+ flavor=${flavor%% *}
+ flavor=${flavor##*-}
+ if test -z "$flavor"; then
+ flavor=$kernel_flavor
+ fi
+ nm "$f" \
+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p"
+done \
+| sort -u
--- scripts/find-requires.ksyms
+++ scripts/find-requires.ksyms
@@ -0,0 +1,57 @@
--- scripts/find-provides.ksyms.orig 2013-07-12 14:08:40.000000000 +0000
+++ scripts/find-provides.ksyms 2013-07-12 14:08:54.000000000 +0000
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+IFS=$'\n'
+
+case "$1" in
+kernel-module-*) ;; # Fedora kernel module package names start with
+ # kernel-module.
+kernel*) is_kernel_package=1 ;;
+esac
+while read f; do
+ test -e "$f" || continue
+ case "$f" in
+ *.debug)
+ ;;
+ */boot/vmlinu[xz]-*)
+ flavor=${f##*/vmlinu[xz]-}
+ flavor=${flavor%.gz}
+ echo "kernel-uname-r = $flavor"
+ ;;
+ esac
+done \
+| sort -u
--- scripts/find-requires.ksyms.orig 2013-07-12 14:08:45.000000000 +0000
+++ scripts/find-requires.ksyms 2013-07-12 14:08:33.000000000 +0000
@@ -0,0 +1,15 @@
+#! /bin/bash
+
+all_provides() {
+ for module in "$@"; do
+ nm "$module"
+ done \
+ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):\1\t\2:p' \
+ | sort -t $'\t' -k2 -u
+}
+IFS=$'\n'
+
+all_requires() {
+ for module in "$@"; do
+ set -- $(/sbin/modinfo -F vermagic "$module" | sed -e 's: .*::' -e q)
+ /sbin/modprobe --dump-modversions "$module" \
+ | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':'
+ done \
+ | sort -t $'\t' -k2 -u
+}
+
+if ! [ -z "$is_kernel_package" -a -e /sbin/modinfo -a -e /sbin/modprobe ]; then
+ cat > /dev/null
+ exit 0
+fi
+
+modules=($(grep -E '/lib/modules/.+\.ko$'))
+if [ ${#modules[@]} -gt 0 ]; then
+ symset_table=$(mktemp -t ${0##*/}.XXXXX)
+ /usr/lib/rpm/symset-table | sort -t $'\t' -k 1,1 > $symset_table
+
+ join -t $'\t' -j 1 -a 2 $symset_table <(
+ # Filter out requirements that we fulfill ourself.
+ join -t $'\t' -j 2 -v 1 \
+ <(all_requires "${modules[@]}") \
+ <(all_provides "${modules[@]}") \
+ | awk '
+ BEGIN { FS = "\t" ; OFS = "\t" }
+ { print $3 "/" $2 "/" $1 }
+ ' \
+ | sort -t $'\t' -k 1,1 -u) \
+ | sort -u \
+ | awk '
+ { FS = "\t" ; OFS = "\t" }
+ { split($1, arr, "/")
+ flavor = gensub(/.*-/, "", "", arr[1]) }
+ NF == 3 { print "kernel(" flavor ":" $2 ") = " $3
+ next }
+ { print "ksym(" flavor ":" arr[3] ") = " arr[2] }
+ '
+fi
+while read f; do
+ test -e "$f" || continue
+ case "$f" in
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz)
+ flavor=${f#*/lib/modules/}
+ flavor=${flavor%%/*}
+ echo "kernel-uname-r = $flavor"
+ ;;
+ esac
+done \
+| sort -u
--- scripts/Makefile.am
+++ scripts/Makefile.am
@@ -15,6 +15,7 @@

View File

@ -1,8 +1,8 @@
Add support for supplements to the internal dependency generator.
--- ./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 {
--- ./build/rpmfc.c.orig 2013-07-12 12:18:29.000000000 +0000
+++ ./build/rpmfc.c 2013-07-12 12:18:48.000000000 +0000
@@ -58,6 +58,7 @@ struct rpmfc_s {
rpmds provides; /*!< (no. provides) package provides */
rpmds requires; /*!< (no. requires) package requires */
@ -10,7 +10,7 @@ Add support for supplements to the internal dependency generator.
};
struct rpmfcTokens_s {
@@ -545,6 +546,22 @@ static int rpmfcHelperRequires(rpmfc fc,
@@ -546,6 +547,22 @@ static int rpmfcHelperRequires(rpmfc fc,
return 0;
}
@ -33,7 +33,7 @@ Add support for supplements to the internal dependency generator.
/* 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)
@@ -763,6 +780,7 @@ rpmfc rpmfcFree(rpmfc fc)
rpmdsFree(fc->provides);
rpmdsFree(fc->requires);
@ -41,7 +41,7 @@ Add support for supplements to the internal dependency generator.
memset(fc, 0, sizeof(*fc)); /* trash and burn */
free(fc);
}
@@ -793,6 +811,11 @@ rpmds rpmfcRequires(rpmfc fc)
@@ -794,6 +812,11 @@ rpmds rpmfcRequires(rpmfc fc)
return (fc != NULL ? fc->requires : NULL);
}
@ -60,8 +60,8 @@ Add support for supplements to the internal dependency generator.
+ rpmfcHelperSupplements(fc, *fattr);
}
}
@@ -856,6 +880,11 @@ rpmRC rpmfcApply(rpmfc fc)
/* No more additions after this, freeze pool to minimize memory use */
@@ -858,6 +882,11 @@ rpmRC rpmfcApply(rpmfc fc)
dix = rpmdsFind(fc->requires, ds);
rpmdsFree(ds);
break;
@ -73,7 +73,7 @@ Add support for supplements to the internal dependency generator.
}
if (dix < 0)
@@ -1347,6 +1376,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
@@ -1341,6 +1370,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
}
}
@ -92,8 +92,8 @@ Add support for supplements to the internal dependency generator.
/* Add dependency dictionary(#dependencies) */
if (rpmtdFromArgi(&td, RPMTAG_DEPENDSDICT, fc->ddictx)) {
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
--- ./build/rpmfc.h.orig 2012-11-18 08:21:06.000000000 +0000
+++ ./build/rpmfc.h 2013-07-12 12:18:48.000000000 +0000
@@ -106,6 +106,13 @@ rpmds rpmfcProvides(rpmfc fc);
*/
rpmds rpmfcRequires(rpmfc fc);

76
getauxval.diff Normal file
View File

@ -0,0 +1,76 @@
commit 60835b20180c1be351ff95fa8c8d930afada0e4c
Author: Kirill A. Shutemov <kirill@shutemov.name>
Date: Mon Jul 1 03:25:32 2013 +0300
Use getauxval(3) to read auxv data
glibc >= 2.16 provides getauxval(): a reliable way to retrieve a value
from the auxiliary vector. It doesn't rely on /proc filesystem.
Let's switch to it and get rid of /proc dependency.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
--- configure.ac.orig 2013-07-12 12:25:38.000000000 +0000
+++ configure.ac 2013-07-12 12:35:18.000000000 +0000
@@ -518,6 +518,7 @@ dnl Checks for library functions.
AC_CHECK_FUNCS(putenv)
AC_CHECK_FUNCS(mempcpy)
AC_CHECK_FUNCS(fdatasync)
+AC_CHECK_FUNCS(getauxval)
AC_REPLACE_FUNCS(stpcpy stpncpy)
--- lib/rpmrc.c.orig 2013-07-12 12:25:38.000000000 +0000
+++ lib/rpmrc.c 2013-07-12 12:34:34.000000000 +0000
@@ -20,6 +20,10 @@
#define __power_pc() 0
#endif
+#ifdef HAVE_GETAUXVAL
+#include <sys/auxv.h>
+#endif
+
#include <rpm/rpmlib.h> /* RPM_MACTABLE*, Rc-prototypes */
#include <rpm/rpmmacro.h>
#include <rpm/rpmfileutil.h>
@@ -922,13 +926,19 @@ static int is_geode(void)
#if defined(__linux__) && defined(__powerpc__)
/**
- * Populate rpmat structure with parsed info from /proc/self/auxv
+ * Populate rpmat structure with auxv values
*/
-static void parse_auxv(void)
+static void read_auxv(void)
{
static int oneshot = 1;
if (oneshot) {
+#ifdef HAVE_GETAUXVAL
+ rpmat.platform = (char *) getauxval(AT_PLATFORM);
+ if (!rpmat.platform)
+ rpmat.platform = "";
+ rpmat.hwcap = getauxval(AT_HWCAP);
+#else
rpmat.platform = "";
int fd = open("/proc/self/auxv", O_RDONLY);
@@ -953,6 +963,7 @@ static void parse_auxv(void)
}
close(fd);
}
+#endif
oneshot = 0; /* only try once even if it fails */
}
return;
@@ -972,7 +983,7 @@ static void defaultMachine(const char **
#if defined(__linux__) && defined(__powerpc__)
/* Populate rpmat struct with hw info */
- parse_auxv();
+ read_auxv();
#endif
while (!gotDefaults) {

View File

@ -1,35 +1,32 @@
--- ./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 @@
--- ./macros.in.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./macros.in 2013-07-12 11:53:07.000000000 +0000
@@ -185,22 +185,22 @@
# Template for debug information sub-package.
%debug_package \
-%ifnarch noarch\
%global __debug_package 1\
-%package debug\
+%package debuginfo\
%package debuginfo\
Summary: Debug information for package %{name}\
Group: Development/Debug\
AutoReqProv: 0\
-%description debug\
+#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\
+%description debuginfo\
%description debuginfo\
This package provides debug information for package %{name}.\
Debug information is useful when developing applications that use this\
package or when debugging this package.\
-%files debug -f debugfiles.list\
+%files debuginfo -f debugfiles.list\
%files debuginfo -f debugfiles.list\
%defattr(-,root,root)\
-%endif\
%{nil}
-%_defaultdocdir %{_datadir}/doc
+%_defaultdocdir %{_datadir}/doc/packages
+%_docdir_fmt %%{NAME}
+%_docdir_fmt %%{NAME}
%_defaultlicensedir %{_datadir}/licenses
# The path to the gzip executable (legacy, use %{__gzip} instead).
%_gzipbin %{__gzip}
@@ -233,7 +233,8 @@ package or when debugging this package.\
@@ -238,7 +238,8 @@ package or when debugging this package.\
%_tmppath %{_var}/tmp
# Path to top of build area.
@ -39,7 +36,7 @@
# The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip}
@@ -336,7 +337,7 @@ package or when debugging this package.\
@@ -341,7 +342,7 @@ package or when debugging this package.\
# "w7.lzdio" lzma-alone level 7, lzma's default
#
#%_source_payload w9.gzdio
@ -48,7 +45,7 @@
# Algorithm to use for generating file checksum digests on build.
# If not specified or 0, MD5 is used.
@@ -435,16 +436,22 @@ package or when debugging this package.\
@@ -440,16 +441,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
@ -73,7 +70,7 @@
#
# Path to file attribute classifications for automatic dependency
@@ -507,10 +514,10 @@ package or when debugging this package.\
@@ -512,10 +519,10 @@ package or when debugging this package.\
# Misc BDB tuning options
%__dbi_other mp_mmapsize=128Mb mp_size=1Mb
@ -86,7 +83,7 @@
#==============================================================================
# ---- GPG/PGP/PGP5 signature macros.
@@ -809,7 +816,7 @@ package or when debugging this package.\
@@ -816,7 +823,7 @@ package or when debugging this package.\
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_host @host@
@ -95,7 +92,7 @@
%_host_cpu @host_cpu@
%_host_vendor @host_vendor@
%_host_os @host_os@
@@ -973,6 +980,183 @@ done \
@@ -980,6 +987,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 +276,7 @@
#------------------------------------------------------------------------------
# arch macro for all Intel i?86 compatibile processors
# (Note: This macro (and it's analogues) will probably be obsoleted when
@@ -983,7 +1167,9 @@ done \
@@ -990,7 +1174,9 @@ done \
#------------------------------------------------------------------------------
# arch macro for all supported ARM processors
@ -290,7 +287,7 @@
#------------------------------------------------------------------------------
# arch macro for all supported Sparc processors
@@ -1023,3 +1209,26 @@ done \
@@ -1110,3 +1296,26 @@ end}
# \endverbatim
#*/

View File

@ -1,13 +1,14 @@
Disable file coloring for SUSE systems
--- 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;
/* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */
while ((fcolor = rpmtdNextUint32(&td))) {
--- build/rpmfc.c.orig 2013-07-12 12:12:45.000000000 +0000
+++ build/rpmfc.c 2013-07-12 12:15:51.000000000 +0000
@@ -1305,7 +1305,8 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
/* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */
for (int i = 0; i < fc->nfiles; i++)
fc->fcolor[i] &= 0x0f;
- headerPutUint32(pkg->header, RPMTAG_FILECOLORS, fc->fcolor, fc->nfiles);
+ if (rpmExpandNumeric("%{?_transaction_color}") != 0)
+ headerPutUint32(pkg->header, RPMTAG_FILECOLORS, fc->fcolor, fc->nfiles);
/* Add classes(#classes) */
for (rpmsid id = 1; id <= rpmstrPoolNumStr(fc->cdict); id++) {

View File

@ -1,11 +1,11 @@
Don't let rpm complain about a missing /etc/magic.mgc file
--- ./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)
--- build/rpmfc.c.orig 2013-07-12 12:16:40.000000000 +0000
+++ build/rpmfc.c 2013-07-12 12:17:15.000000000 +0000
@@ -901,7 +901,7 @@ static int initAttrs(rpmfc fc)
rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
{
ARGV_t fcav = NULL;
- int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS;
+ int msflags = MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS;
magic_t ms = NULL;

115
noposttrans.diff Normal file
View File

@ -0,0 +1,115 @@
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Wed Apr 10 11:31:41 2013 +0300
Add scriptlet-specific disablers for %pretrans and %posttrans
- Previously %pretrans and %posttrans were tied to --nopre and --nopost
disablers (since commit 0b2d7775c5e828652e45829f551352b93890bbc8)
because back then, there was no room new disablers in rpmtransFlags
bitfield. This is no longer the case as of rpm >= 4.9.x where
a bunch of obsolete flags were axed, so we can now add specific
--nopretrans and --noposttrans switches + corresponding flags.
- This is obviously a behavior change as --nopre and --nopost no
longer affect %pretrans and %posttrans, but --noscripts behavior
remains the same.
--- doc/rpm.8
+++ doc/rpm.8
@@ -278,6 +278,10 @@ packages would normally be reordered to satisfy dependencies.
\fB--nopreun\fR
.TP
\fB--nopostun\fR
+.TP
+\fB--nopretrans\fR
+.TP
+\fB--noposttrans\fR
Don't execute the scriptlet of the same name.
The \fB--noscripts\fR option is equivalent to
@@ -285,12 +289,16 @@ The \fB--noscripts\fR option is equivalent to
\fB--nopost\fR
\fB--nopreun\fR
\fB--nopostun\fR
+\fB--nopretrans\fR
+\fB--noposttrans\fR
and turns off the execution of the corresponding
\fB%pre\fR,
\fB%post\fR,
-\fB%preun\fR, and
+\fB%preun\fR,
\fB%postun\fR
+\fB%pretrans\fR, and
+\fB%posttrans\fR
scriptlet(s).
.TP
\fB--notriggers\fR
--- lib/poptI.c
+++ lib/poptI.c
@@ -202,6 +202,12 @@ struct poptOption rpmInstallPoptTable[] = {
{ "nopostun", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.transFlags,
RPMTRANS_FLAG_NOPOSTUN,
N_("do not execute %%postun scriptlet (if any)"), NULL },
+ { "nopretrans", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.transFlags,
+ RPMTRANS_FLAG_NOPRETRANS,
+ N_("do not execute %%pretrans scriptlet (if any)"), NULL },
+ { "noposttrans", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.transFlags,
+ RPMTRANS_FLAG_NOPOSTTRANS,
+ N_("do not execute %%posttrans scriptlet (if any)"), NULL },
{ "notriggers", '\0', POPT_BIT_SET, &rpmIArgs.transFlags, _noTransTriggers,
N_("do not execute any scriptlet(s) triggered by this package"), NULL},
--- lib/rpmts.h
+++ lib/rpmts.h
@@ -45,7 +45,8 @@ enum rpmtransFlags_e {
RPMTRANS_FLAG_NOPREUN = (1 << 21), /*!< from --nopreun */
RPMTRANS_FLAG_NOPOSTUN = (1 << 22), /*!< from --nopostun */
RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23), /*!< from --notriggerpostun */
- /* bits 24-25 unused */
+ RPMTRANS_FLAG_NOPRETRANS = (1 << 24), /*!< from --nopretrans */
+ RPMTRANS_FLAG_NOPOSTTRANS = (1 << 25), /*!< from --noposttrans */
RPMTRANS_FLAG_NOCOLLECTIONS = (1 << 26), /*!< from --nocollections */
RPMTRANS_FLAG_NOMD5 = (1 << 27), /*!< from --nomd5 */
RPMTRANS_FLAG_NOFILEDIGEST = (1 << 27), /*!< from --nofiledigest (alias to --nomd5) */
@@ -60,7 +61,9 @@ typedef rpmFlags rpmtransFlags;
( RPMTRANS_FLAG_NOPRE | \
RPMTRANS_FLAG_NOPOST | \
RPMTRANS_FLAG_NOPREUN | \
- RPMTRANS_FLAG_NOPOSTUN \
+ RPMTRANS_FLAG_NOPOSTUN | \
+ RPMTRANS_FLAG_NOPRETRANS | \
+ RPMTRANS_FLAG_NOPOSTTRANS \
)
#define _noTransTriggers \
--- lib/transaction.c
+++ lib/transaction.c
@@ -1496,7 +1496,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
/* Run pre-transaction scripts, but only if there are no known
* problems up to this point and not disabled otherwise. */
- if (!((rpmtsFlags(ts) & (RPMTRANS_FLAG_BUILD_PROBS|RPMTRANS_FLAG_NOPRE))
+ if (!((rpmtsFlags(ts) & (RPMTRANS_FLAG_BUILD_PROBS|RPMTRANS_FLAG_NOPRETRANS))
|| (rpmpsNumProblems(tsprobs)))) {
rpmlog(RPMLOG_DEBUG, "running pre-transaction scripts\n");
runTransScripts(ts, PKG_PRETRANS);
@@ -1532,7 +1532,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
rc = rpmtsProcess(ts) ? -1 : 0;
/* Run post-transaction scripts unless disabled */
- if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOST))) {
+ if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS))) {
rpmlog(RPMLOG_DEBUG, "running post-transaction scripts\n");
runTransScripts(ts, PKG_POSTTRANS);
}
--- python/rpmmodule.c
+++ python/rpmmodule.c
@@ -414,6 +414,8 @@ static int initModule(PyObject *m)
REGISTER_ENUM(RPMTRANS_FLAG_NOPREUN);
REGISTER_ENUM(RPMTRANS_FLAG_NOPOSTUN);
REGISTER_ENUM(RPMTRANS_FLAG_NOTRIGGERPOSTUN);
+ REGISTER_ENUM(RPMTRANS_FLAG_NOPRETRANS);
+ REGISTER_ENUM(RPMTRANS_FLAG_NOPOSTTRANS);
REGISTER_ENUM(RPMTRANS_FLAG_NOMD5);
REGISTER_ENUM(RPMTRANS_FLAG_NOFILEDIGEST);
REGISTER_ENUM(RPMTRANS_FLAG_NOSUGGEST);

View File

@ -1,7 +1,5 @@
Index: lib/psm.c
===================================================================
--- lib/psm.c
+++ lib/psm.c
--- lib/psm.c.orig 2013-07-12 12:25:38.000000000 +0000
+++ lib/psm.c 2013-07-12 12:27:01.000000000 +0000
@@ -807,6 +807,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
case PSM_PROCESS:
if (psm->goal == PKG_INSTALL) {
@ -12,8 +10,8 @@ Index: lib/psm.c
/* make sure first progress call gets made */
@@ -826,6 +827,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
fsmrc = rpmfsmRun(FSM_PKGINSTALL, psm->ts, psm->te, psm->fi,
payload, psm, NULL, &psm->failedFile);
fsmrc = rpmPackageFilesInstall(psm->ts, psm->te, psm->fi,
payload, psm, &psm->failedFile);
+ saved_errno = errno;
rpmswAdd(rpmtsOp(psm->ts, RPMTS_OP_UNCOMPRESS),

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jul 12 15:36:43 CEST 2013 - mls@suse.de
- update to rpm-4.11.1
-------------------------------------------------------------------
Wed Jan 2 14:25:09 UTC 2013 - dmueller@suse.com

View File

@ -17,7 +17,7 @@
Name: python3-rpm
Version: 4.10.3.1
Version: 4.11.1
Release: 0
Summary: Python Bindings for Manipulating RPM Packages
License: GPL-2.0+

View File

@ -1,7 +1,7 @@
Don't complain about a bad md5 sum for repackaged rpms.
--- ./lib/psm.c.orig 2012-06-01 13:18:24.000000000 +0000
+++ ./lib/psm.c 2012-06-01 13:22:48.000000000 +0000
--- ./lib/psm.c.orig 2013-07-12 12:05:15.000000000 +0000
+++ ./lib/psm.c 2013-07-12 12:07:59.000000000 +0000
@@ -813,12 +813,17 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
rpmpsmNotify(psm, RPMCALLBACK_INST_PROGRESS, 0);
@ -17,8 +17,8 @@ Don't complain about a bad md5 sum for repackaged rpms.
+ 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);
fsmrc = rpmPackageFilesInstall(psm->ts, psm->te, psm->fi,
payload, psm, &psm->failedFile);
@@ -827,6 +832,9 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
rpmswAdd(rpmtsOp(psm->ts, RPMTS_OP_DIGEST),

View File

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

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

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

View File

@ -1,660 +0,0 @@
--- config.h.in
+++ config.h.in
@@ -13,6 +13,9 @@
/* Define to 1 if you have the `basename' function. */
#undef HAVE_BASENAME
+/* Define to 1 if you have the <beecrypt/api.h> header file. */
+#undef HAVE_BEECRYPT_API_H
+
/* Define to 1 if you have the <bzlib.h> header file. */
#undef HAVE_BZLIB_H
@@ -206,6 +209,10 @@
*/
#undef LT_OBJDIR
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
*/
#undef MAJOR_IN_MKDEV
@@ -290,6 +297,9 @@
/* Build with acl support? */
#undef WITH_ACL
+/* Build with beecrypt instead of nss3 support? */
+#undef WITH_BEECRYPT
+
/* Build with capability support? */
#undef WITH_CAP
--- configure.ac
+++ configure.ac
@@ -239,12 +239,43 @@
AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes])
#=================
+# Check for beecrypt library if requested.
+AC_ARG_WITH(beecrypt, [ --with-beecrypt build with beecrypt support ],,[with_beecrypt=yes])
+AC_ARG_WITH(internal_beecrypt, [ --with-internal-beecrypt build with internal beecrypt library ],,[with_internal_beecrypt=yes])
+AM_CONDITIONAL([WITH_INTERNAL_BEECRYPT],[test "$with_internal_beecrypt" = yes])
+if test "$with_internal_beecrypt" = yes ; then
+ with_beecrypt=yes
+fi
+AM_CONDITIONAL([WITH_BEECRYPT],[test "$with_beecrypt" = yes])
+
+WITH_BEECRYPT_INCLUDE=
+WITH_BEECRYPT_LIB=
+if test "$with_beecrypt" = yes ; then
+ AC_DEFINE(WITH_BEECRYPT, 1, [Build with beecrypt instead of nss3 support?])
+ if test "$with_internal_beecrypt" = yes ; then
+ WITH_BEECRYPT_INCLUDE="-I\$(top_srcdir)/beecrypt"
+ AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
+ else
+ AC_CHECK_LIB(beecrypt, mpfprintln, [
+ WITH_BEECRYPT_LIB="-lbeecrypt"
+ ],[
+ AC_MSG_ERROR([missing required library 'beecrypt'])
+ ])
+ AC_CHECK_HEADER([beecrypt/api.h], [AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
+ ])
+ fi
+fi
+AC_SUBST(WITH_BEECRYPT_LIB)
+AC_SUBST(WITH_BEECRYPT_INCLUDE)
+
+#=================
# Check for NSS library.
# We need nss.h from NSS which needs nspr.h. Unfortunately both glibc and NSS
# have a header named nss.h... so make extra check for NSS's sechash.h
# which we use too and hopefully is slightly more unique to NSS.
WITH_NSS_INCLUDE=
WITH_NSS_LIB=
+if test "$with_beecrypt" != yes ; then
AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [
AC_MSG_ERROR([missing required NSPR / NSS header])
])
@@ -257,6 +288,7 @@
], [
AC_MSG_ERROR([missing required NSS library 'nss3'])
])
+fi
AC_SUBST(WITH_NSS_INCLUDE)
AC_SUBST(WITH_NSS_LIB)
--- rpmio/digest_beecrypt.c
+++ rpmio/digest_beecrypt.c
@@ -0,0 +1,526 @@
+#include "system.h"
+
+#include <beecrypt.h>
+#include <dsa.h>
+#include <endianness.h>
+#include <md5.h>
+#include <mp.h>
+#include <rsa.h>
+#include <rsapk.h>
+#include <sha1.h>
+#if HAVE_BEECRYPT_API_H
+#include <sha256.h>
+#include <sha384.h>
+#include <sha512.h>
+#endif
+
+#include <rpm/rpmpgp.h>
+#include "rpmio/digest.h"
+#include "rpmio/rpmio_internal.h"
+#include "debug.h"
+
+/**
+ * MD5/SHA1 digest private data.
+ */
+struct DIGEST_CTX_s {
+ rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */
+ int algo; /*!< Used hash algorithm */
+ uint32_t datalen; /*!< No. bytes in block of plaintext data. */
+ uint32_t paramlen; /*!< No. bytes of digest parameters. */
+ uint32_t digestlen; /*!< No. bytes of digest. */
+ void * param; /*!< Digest parameters. */
+ int (*Reset) (void * param); /*!< Digest initialize. */
+ int (*Update) (void * param, const byte * data, size_t size); /*!< Digest transform. */
+ int (*Digest) (void * param, byte * digest); /*!< Digest finish. */
+};
+
+
+/**************************** init ************************************/
+
+int rpmInitCrypto(void) {
+ return 0;
+}
+
+int rpmFreeCrypto(void) {
+ return 0;
+}
+
+/**************************** digest ************************************/
+
+DIGEST_CTX rpmDigestDup(DIGEST_CTX octx)
+{
+ 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)
+{
+ switch (hashalgo) {
+ case PGPHASHALGO_MD5:
+ return 16;
+ case PGPHASHALGO_SHA1:
+ return 20;
+#if HAVE_BEECRYPT_API_H
+ case PGPHASHALGO_SHA256:
+ return 32;
+ case PGPHASHALGO_SHA384:
+ return 48;
+ case PGPHASHALGO_SHA512:
+ return 64;
+#endif
+ default:
+ return 0;
+ }
+}
+
+DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags)
+{
+ DIGEST_CTX ctx = xcalloc(1, sizeof(*ctx));
+
+ ctx->flags = flags;
+ ctx->algo = hashalgo;
+
+ switch (hashalgo) {
+ case PGPHASHALGO_MD5:
+ ctx->digestlen = 16;
+ ctx->datalen = 64;
+ ctx->paramlen = sizeof(md5Param);
+ ctx->param = xcalloc(1, ctx->paramlen);
+ ctx->Reset = (void *) md5Reset;
+ ctx->Update = (void *) md5Update;
+ ctx->Digest = (void *) md5Digest;
+ break;
+ case PGPHASHALGO_SHA1:
+ ctx->digestlen = 20;
+ ctx->datalen = 64;
+ ctx->paramlen = sizeof(sha1Param);
+ ctx->param = xcalloc(1, ctx->paramlen);
+ ctx->Reset = (void *) sha1Reset;
+ ctx->Update = (void *) sha1Update;
+ ctx->Digest = (void *) sha1Digest;
+ break;
+#if HAVE_BEECRYPT_API_H
+ case PGPHASHALGO_SHA256:
+ ctx->digestlen = 32;
+ ctx->datalen = 64;
+ ctx->paramlen = sizeof(sha256Param);
+ ctx->param = xcalloc(1, ctx->paramlen);
+ ctx->Reset = (void *) sha256Reset;
+ ctx->Update = (void *) sha256Update;
+ ctx->Digest = (void *) sha256Digest;
+ break;
+ case PGPHASHALGO_SHA384:
+ ctx->digestlen = 48;
+ ctx->datalen = 128;
+ ctx->paramlen = sizeof(sha384Param);
+ ctx->param = xcalloc(1, ctx->paramlen);
+ ctx->Reset = (void *) sha384Reset;
+ ctx->Update = (void *) sha384Update;
+ ctx->Digest = (void *) sha384Digest;
+ break;
+ case PGPHASHALGO_SHA512:
+ ctx->digestlen = 64;
+ ctx->datalen = 128;
+ ctx->paramlen = sizeof(sha512Param);
+ ctx->param = xcalloc(1, ctx->paramlen);
+ ctx->Reset = (void *) sha512Reset;
+ ctx->Update = (void *) sha512Update;
+ ctx->Digest = (void *) sha512Digest;
+ break;
+#endif
+ case PGPHASHALGO_RIPEMD160:
+ case PGPHASHALGO_MD2:
+ case PGPHASHALGO_TIGER192:
+ case PGPHASHALGO_HAVAL_5_160:
+ default:
+ free(ctx);
+ return NULL;
+ }
+
+ (*ctx->Reset)(ctx->param);
+ return ctx;
+}
+
+int rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len)
+{
+ if (ctx == NULL)
+ return -1;
+
+ return (*ctx->Update) (ctx->param, data, len);
+}
+
+int rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii)
+{
+ byte * digest;
+ char * t;
+ int i;
+
+ if (ctx == NULL)
+ return -1;
+ digest = xmalloc(ctx->digestlen);
+
+ /* FIX: check rc */
+ (void) (*ctx->Digest) (ctx->param, digest);
+
+ /* Return final digest. */
+ if (!asAscii) {
+ if (lenp) *lenp = ctx->digestlen;
+ if (datap) {
+ *datap = digest;
+ digest = NULL;
+ }
+ } else {
+ if (lenp) *lenp = (2*ctx->digestlen) + 1;
+ if (datap) {
+ const byte * s = (const byte *) digest;
+ static const char hex[] = "0123456789abcdef";
+
+ *datap = t = xmalloc((2*ctx->digestlen) + 1);
+ for (i = 0 ; i < ctx->digestlen; i++) {
+ *t++ = hex[ (unsigned)((*s >> 4) & 0x0f) ];
+ *t++ = hex[ (unsigned)((*s++ ) & 0x0f) ];
+ }
+ *t = '\0';
+ }
+ }
+ if (digest) {
+ memset(digest, 0, ctx->digestlen); /* In case it's sensitive */
+ free(digest);
+ }
+ memset(ctx->param, 0, ctx->paramlen); /* In case it's sensitive */
+ free(ctx->param);
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
+ free(ctx);
+ return 0;
+}
+
+/**************************** helpers ************************************/
+
+static inline char * pgpHexCvt(char *t, const byte *s, int nbytes)
+{
+ 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, const byte *pend)
+{
+ 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 pgpHexSet(int lbits, mpnumber * mpn, const byte * p, const byte * pend)
+{
+ 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, pend));
+ (void) mpnsethex(mpn, t);
+ t = _free(t);
+ return 0;
+}
+
+static void pgpFreeSigRSADSA(pgpDigAlg sa)
+{
+ if (sa->data)
+ free(sa->data);
+ sa->data = 0;
+}
+
+static void pgpFreeKeyRSADSA(pgpDigAlg sa)
+{
+ if (sa->data)
+ free(sa->data);
+ sa->data = 0;
+}
+
+
+/****************************** RSA **************************************/
+
+struct pgpDigSigRSA_s {
+ mpnumber c;
+};
+
+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;
+}
+
+static int pgpVerifySigRSA(pgpDigAlg pgpkey, pgpDigAlg pgpsig, uint8_t *hash, size_t hashlen, int hash_algo)
+{
+ struct pgpDigKeyRSA_s *key = pgpkey->data;
+ struct pgpDigSigRSA_s *sig = pgpsig->data;
+ const char * prefix = NULL;
+ mpnumber rsahm;
+ int rc = 1;
+
+ if (!sig || !key)
+ return rc;
+
+ switch (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;
+ 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
+ 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 **************************************/
+
+struct pgpDigSigDSA_s {
+ mpnumber r;
+ mpnumber s;
+};
+
+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)
+{
+ 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 rc;
+}
+
+static int pgpSetKeyMpiDSA(pgpDigAlg pgpkey, int num,
+ const uint8_t *p, const uint8_t *pend)
+{
+ 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 1:
+ mpbsethex(&key->q, pgpMpiHex(p, pend));
+ rc = 0;
+ break;
+ case 2:
+ mpnsethex(&key->g, pgpMpiHex(p, pend));
+ rc = 0;
+ break;
+ case 3:
+ mpnsethex(&key->y, pgpMpiHex(p, pend));
+ rc = 0;
+ break;
+ }
+ 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:
+ ka->setmpi = pgpSetMpiNULL;
+ ka->mpis = -1;
+ break;
+ }
+
+ ka->verify = pgpVerifyNULL; /* keys can't be verified */
+
+ return ka;
+}
+
+pgpDigAlg pgpSignatureNew(int algo)
+{
+ pgpDigAlg sa = xcalloc(1, sizeof(*sa));
+
+ 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;
+ }
+ return sa;
+}
--- rpmio/Makefile.am
+++ rpmio/Makefile.am
@@ -2,6 +2,7 @@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/
AM_CPPFLAGS += @WITH_NSS_INCLUDE@
+AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@
AM_CPPFLAGS += @WITH_POPT_INCLUDE@
AM_CPPFLAGS += -I$(top_srcdir)/misc
AM_CPPFLAGS += -DRPMCONFIGDIR="\"@RPMCONFIGDIR@\""
@@ -17,12 +18,17 @@
rpmstring.c rpmfileutil.c \
rpmkeyring.c
+if WITH_BEECRYPT
+librpmio_la_SOURCES += digest_beecrypt.c
+else
librpmio_la_SOURCES += digest_nss.c
+endif
librpmio_la_LDFLAGS = -version-info 3:3:0
librpmio_la_LIBADD = \
../misc/libmisc.la \
@WITH_NSS_LIB@ \
+ @WITH_BEECRYPT_LIB@ \
@WITH_BZ2_LIB@ \
@WITH_ZLIB_LIB@ \
@WITH_LIBELF_LIB@ \
@@ -30,6 +36,15 @@
@WITH_LZMA_LIB@ \
-lpthread
+if WITH_INTERNAL_BEECRYPT
+librpmio_la_LIBADD += $(libbeecrypt_la)
+
+libbeecrypt_la = $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la
+
+$(top_builddir)/beecrypt/libbeecrypt_nolibdir.la: $(top_builddir)/beecrypt/libbeecrypt.la
+ sed -e 's/libdir=.*/libdir=/' < $(top_builddir)/beecrypt/libbeecrypt.la > $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la
+endif
+
if WITH_LUA
AM_CPPFLAGS += -I$(top_srcdir)/luaext/
AM_CPPFLAGS += @LUA_CFLAGS@

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jul 12 15:36:43 CEST 2013 - mls@suse.de
- update to rpm-4.11.1
-------------------------------------------------------------------
Wed Jan 2 14:25:20 UTC 2013 - dmueller@suse.com

View File

@ -17,7 +17,7 @@
Name: rpm-python
Version: 4.10.3.1
Version: 4.11.1
Release: 0
#!BuildIgnore: rpmlint-Factory
Summary: Python Bindings for Manipulating RPM Packages

View File

@ -1,6 +1,6 @@
--- build/pack.c
+++ build/pack.c
@@ -573,6 +573,63 @@
--- ./build/pack.c.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./build/pack.c 2013-07-12 11:59:37.000000000 +0000
@@ -540,6 +540,63 @@ static rpmRC checkPackages(char *pkgchec
return RPMRC_OK;
}
@ -63,8 +63,8 @@
+
rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
{
struct cpioSourceArchive_s csabuf;
@@ -582,6 +639,7 @@
rpmRC rc;
@@ -547,6 +604,7 @@ rpmRC packageBinaries(rpmSpec spec, cons
Package pkg;
char *pkglist = NULL;
@ -72,9 +72,9 @@
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
char *fn;
--- build/parseChangelog.c
+++ build/parseChangelog.c
@@ -168,6 +168,11 @@
--- ./build/parseChangelog.c.orig 2012-11-18 08:21:06.000000000 +0000
+++ ./build/parseChangelog.c 2013-07-12 11:59:37.000000000 +0000
@@ -183,6 +183,11 @@ static rpmRC addChangelog(Header h, ARGV
goto exit;
}

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Mon Jul 15 16:17:45 CEST 2013 - mls@suse.de
- backport noposttrans.diff from rpm master [bnc#773575]
-------------------------------------------------------------------
Fri Jul 12 15:36:43 CEST 2013 - mls@suse.de
- update to rpm-4.11.1
* fix bogus file conflict on symlink permissions
* fix replaced files not getting reported at all during verification
* fix explicit file conflicts in installed packages being ignored
* fix multiple corner cases in config file handling
* fix disk-space accounting bugs
* report replacing directories with non-directories as file conflict
- package rpmdb_* database tools
- get rid of kernel symbol requires/provides, instead add simple
package provides/requires like in Fedora
- delete files.diff patch, it caused more harm than good
-------------------------------------------------------------------
Tue Jul 2 09:53:02 UTC 2013 - dmueller@suse.com

View File

@ -47,9 +47,9 @@ PreReq: %fillup_prereq
Summary: The RPM Package Manager
License: GPL-2.0+
Group: System/Packages
Version: 4.10.3.1
Version: 4.11.1
Release: 0
Source: http://rpm.org/releases/rpm-4.10.x/rpm-%{version}.tar.bz2
Source: http://rpm.org/releases/rpm-4.11.x/rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
Source4: rpm-suse_macros
@ -63,7 +63,6 @@ Source12: baselibs.conf
Patch1: beecrypt-4.1.2.diff
Patch2: db.diff
# quilt patches start here
Patch10: rpm-beecrypt.diff
Patch11: debugedit.diff
Patch13: ignore-auxv.diff
Patch12: localetag.diff
@ -93,7 +92,6 @@ Patch36: rpmqpack.diff
Patch37: convertdb1static.diff
Patch38: build.diff
Patch39: modalias-kernel_module.diff
Patch40: files.diff
Patch41: debugedit-comp-dir.diff
Patch42: perlprov.diff
Patch43: rpm-shorten-changelog.diff
@ -133,9 +131,9 @@ Patch76: python3-abi-kind.diff
Patch77: langnoc.diff
Patch78: headerchk2.diff
Patch79: helperenv.diff
Patch80: config-guess-sub-update.diff
Patch81: debugedit-aarch64.diff
Patch82: psm-errno.patch
Patch80: psm-errno.diff
Patch81: getauxval.diff
Patch82: noposttrans.diff
Patch6464: auto-config-update-aarch64.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@ -213,15 +211,12 @@ tar xjf %{SOURCE11}
ln -s db-4.8.30 db
ln -s beecrypt-4.1.2 beecrypt
chmod -R u+w db/*
#tar xjf %{SOURCE12}
#ln -s neon-0.24.7 neon
# will get linked from db3
rm -f rpmdb/db.h
%patch -P 1 -P 2
%patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
%patch -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 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
@ -333,7 +328,7 @@ pushd %{buildroot}/usr/lib/rpm/
for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \
magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \
brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \
rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile
brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile
do
rm -f $f
done

View File

@ -1,5 +1,5 @@
--- rpmrc.in
+++ rpmrc.in
--- ./rpmrc.in.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./rpmrc.in 2013-07-12 11:56:53.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,16 +41,17 @@
@@ -41,16 +41,17 @@ optflags: sparc64v -O2 -g -m64 -mtune=ni
optflags: m68k -O2 -g -fomit-frame-pointer
@ -52,7 +52,7 @@
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,7 +67,9 @@
@@ -66,7 +67,9 @@ optflags: armv4tl -O2 -g -march=armv4t
optflags: armv5tel -O2 -g -march=armv5te
optflags: armv5tejl -O2 -g -march=armv5te
optflags: armv6l -O2 -g -march=armv6
@ -62,7 +62,7 @@
optflags: atarist -O2 -g -fomit-frame-pointer
optflags: atariste -O2 -g -fomit-frame-pointer
@@ -76,12 +79,13 @@
@@ -76,8 +79,8 @@ optflags: atariclone -O2 -g -fomit-frame
optflags: milan -O2 -g -fomit-frame-pointer
optflags: hades -O2 -g -fomit-frame-pointer
@ -73,12 +73,7 @@
optflags: sh3 -O2 -g
optflags: sh4 -O2 -g -mieee
optflags: sh4a -O2 -g -mieee
+optflags: aarch64 -O2 -g
#############################################################
# Canonical arch names and numbers
@@ -141,7 +145,9 @@
@@ -178,7 +181,9 @@ arch_canon: armv4l: armv4l 12
arch_canon: armv5tel: armv5tel 12
arch_canon: armv5tejl: armv5tejl 12
arch_canon: armv6l: armv6l 12
@ -88,15 +83,7 @@
arch_canon: m68kmint: m68kmint 13
arch_canon: atarist: m68kmint 13
@@ -166,6 +172,7 @@
arch_canon: sh4: sh4 17
arch_canon: sh4a: sh4a 17
arch_canon: xtensa: xtensa 18
+arch_canon: aarch64: aarch64 19
#############################################################
# Canonical OS names and numbers
@@ -203,17 +210,17 @@
@@ -241,17 +246,17 @@ os_canon: MacOSX: macosx 21
#############################################################
# For a given uname().machine, the default build arch
@ -122,7 +109,7 @@
buildarchtranslate: i486: i386
buildarchtranslate: i386: i386
@@ -243,6 +250,7 @@
@@ -281,6 +286,7 @@ buildarchtranslate: ppcpseries: ppc
buildarchtranslate: ppc64iseries: ppc64
buildarchtranslate: ppc64pseries: ppc64
buildarchtranslate: ppc64p7: ppc64
@ -130,20 +117,19 @@
buildarchtranslate: armv3l: armv3l
buildarchtranslate: armv4b: armv4b
@@ -251,7 +259,10 @@
@@ -289,7 +295,9 @@ buildarchtranslate: armv4tl: armv4tl
buildarchtranslate: armv5tel: armv5tel
buildarchtranslate: armv5tejl: armv5tejl
buildarchtranslate: armv6l: armv6l
+buildarchtranslate: armv6hl: armv6hl
buildarchtranslate: armv7l: armv7l
+buildarchtranslate: armv7hl: armv7hl
+buildarchtranslate: aarch64: aarch64
buildarchtranslate: atarist: m68kmint
buildarchtranslate: atariste: m68kmint
@@ -274,6 +285,15 @@
buildarchtranslate: sh4: sh4
buildarchtranslate: sh4a: sh4
@@ -314,6 +322,15 @@ buildarchtranslate: sh4a: sh4
buildarchtranslate: aarch64: aarch64
+buildarchtranslate: parisc: hppa
+buildarchtranslate: hppa2.0: hppa
@ -157,7 +143,7 @@
#############################################################
# Architecture compatibility
@@ -330,14 +350,20 @@
@@ -370,14 +387,20 @@ arch_compat: mipsel: noarch
arch_compat: hppa2.0: hppa1.2
arch_compat: hppa1.2: hppa1.1
arch_compat: hppa1.1: hppa1.0
@ -180,7 +166,7 @@
arch_compat: armv4tl: armv4l
arch_compat: armv4l: armv3l
arch_compat: armv3l: noarch
@@ -354,7 +380,7 @@
@@ -394,7 +417,7 @@ arch_compat: i370: noarch
arch_compat: s390: noarch
arch_compat: s390x: s390 noarch
@ -189,16 +175,7 @@
arch_compat: x86_64: amd64 em64t athlon noarch
arch_compat: amd64: x86_64 em64t athlon noarch
@@ -364,6 +390,8 @@
arch_compat: sh4: noarch
arch_compat: sh4a: sh4
+arch_compat: aarch64: noarch
+
os_compat: IRIX64: IRIX
os_compat: solaris2.7: solaris2.3 solaris2.4 solaris2.5 solaris2.6
os_compat: solaris2.6: solaris2.3 solaris2.4 solaris2.5
@@ -439,7 +467,9 @@
@@ -483,7 +506,9 @@ buildarch_compat: mips: noarch
buildarch_compat: mipsel: noarch
buildarch_compat: armv4b: noarch
@ -208,7 +185,7 @@
buildarch_compat: armv6l: armv5tejl
buildarch_compat: armv5tejl: armv5tel
buildarch_compat: armv5tel: armv4tl
@@ -450,7 +480,8 @@
@@ -494,7 +519,8 @@ buildarch_compat: armv3l: noarch
buildarch_compat: hppa2.0: hppa1.2
buildarch_compat: hppa1.2: hppa1.1
buildarch_compat: hppa1.1: hppa1.0
@ -218,11 +195,3 @@
buildarch_compat: parisc: noarch
buildarch_compat: atarist: m68kmint noarch
@@ -473,6 +504,7 @@
buildarch_compat: sh3: noarch
buildarch_compat: sh4: noarch
buildarch_compat: sh4a: sh4
+buildarch_compat: aarch64: noarch
# \endverbatim
#*/

View File

@ -1,10 +1,10 @@
--- ./build/parseSpec.c.orig 2010-12-03 12:11:57.000000000 +0000
+++ ./build/parseSpec.c 2011-05-11 15:58:37.000000000 +0000
@@ -519,6 +519,7 @@ static rpmSpec parseSpec(const char *spe
--- ./build/parseSpec.c.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./build/parseSpec.c 2013-07-12 12:04:11.000000000 +0000
@@ -561,6 +561,7 @@ static rpmSpec parseSpec(const char *spe
spec = newSpec();
spec->specFile = rpmGetPath(specFile, NULL);
+ addMacro(spec->macros, "_specfile", NULL, spec->specFile, RMIL_SPEC);
spec->fileStack = newOpenFileInfo();
spec->fileStack->fileName = xstrdup(spec->specFile);
pushOFI(spec, spec->specFile);
/* If buildRoot not specified, use default %{buildroot} */
if (buildRoot) {

View File

@ -14,9 +14,9 @@ B) use RPMSENSE_STRONG to support a "strong" version, "Recommends"
Needs extcond.diff for query operations.
--- build/parsePreamble.c
+++ build/parsePreamble.c
@@ -342,6 +342,8 @@
--- ./build/parsePreamble.c.orig 2013-06-27 09:28:49.000000000 +0000
+++ ./build/parsePreamble.c 2013-07-12 11:32:45.000000000 +0000
@@ -341,6 +341,8 @@ static struct tokenBits_s const installS
{ "verify", RPMSENSE_SCRIPT_VERIFY },
{ "pretrans", RPMSENSE_PRETRANS },
{ "posttrans", RPMSENSE_POSTTRANS },
@ -25,8 +25,8 @@ Needs extcond.diff for query operations.
{ NULL, 0 }
};
@@ -816,6 +818,18 @@
if (parseRCPOT(spec, pkg, field, tag, 0, tagflags))
@@ -795,6 +797,18 @@ static rpmRC handlePreambleTag(rpmSpec s
if (parseRCPOT(spec, spec->sourcePackage, field, tag, 0, tagflags))
goto exit;
break;
+ case RPMTAG_SUGGESTSFLAGS:
@ -44,7 +44,7 @@ Needs extcond.diff for query operations.
case RPMTAG_EXCLUDEARCH:
case RPMTAG_EXCLUSIVEARCH:
case RPMTAG_EXCLUDEOS:
@@ -924,6 +938,14 @@
@@ -903,6 +917,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,11 +59,11 @@ Needs extcond.diff for query operations.
{0, 0, 0, 0}
};
--- build/parseReqs.c
+++ build/parseReqs.c
@@ -95,6 +95,20 @@
--- ./build/parseReqs.c.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./build/parseReqs.c 2013-07-12 11:32:45.000000000 +0000
@@ -92,6 +92,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
case RPMTAG_BUILDCONFLICTS:
nametag = RPMTAG_CONFLICTNAME;
h = spec->buildRestrictions;
break;
+ case RPMTAG_SUGGESTSFLAGS:
+ nametag = RPMTAG_SUGGESTSNAME;
@ -73,20 +73,18 @@ Needs extcond.diff for query operations.
+ break;
+ case RPMTAG_BUILDSUGGESTS:
+ nametag = RPMTAG_SUGGESTSNAME;
+ h = spec->buildRestrictions;
+ break;
+ case RPMTAG_BUILDENHANCES:
+ nametag = RPMTAG_ENHANCESNAME;
+ h = spec->buildRestrictions;
+ break;
}
for (r = field; *r != '\0'; r = re) {
--- build/reqprov.c
+++ build/reqprov.c
@@ -75,6 +75,16 @@
indextag = RPMTAG_TRIGGERINDEX;
--- ./build/reqprov.c.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./build/reqprov.c 2013-07-12 11:32:45.000000000 +0000
@@ -81,6 +81,16 @@ int addReqProv(Package pkg, rpmTagVal ta
extra = Flags & RPMSENSE_TRIGGER;
dsp = &pkg->triggers;
break;
+ case RPMTAG_SUGGESTSNAME:
+ versiontag = RPMTAG_SUGGESTSVERSION;
@ -101,9 +99,9 @@ Needs extcond.diff for query operations.
case RPMTAG_REQUIRENAME:
default:
tagN = RPMTAG_REQUIRENAME;
--- build/rpmfc.c
+++ build/rpmfc.c
@@ -1084,6 +1084,12 @@
--- ./build/rpmfc.c.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./build/rpmfc.c 2013-07-12 11:32:45.000000000 +0000
@@ -1087,6 +1087,12 @@ static struct DepMsg_s depMsgs[] = {
{ "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL },
RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS,
0, -1 },
@ -116,7 +114,7 @@ Needs extcond.diff for query operations.
{ NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 }
};
@@ -1160,6 +1166,14 @@
@@ -1163,6 +1169,14 @@ static rpmRC rpmfcGenerateDependsHelper(
continue;
tagflags = RPMSENSE_FIND_REQUIRES;
break;
@ -131,9 +129,9 @@ Needs extcond.diff for query operations.
default:
continue;
break;
--- lib/formats.c
+++ lib/formats.c
@@ -486,6 +486,19 @@
--- ./lib/formats.c.orig 2012-11-18 08:21:06.000000000 +0000
+++ ./lib/formats.c 2013-07-12 11:32:45.000000000 +0000
@@ -486,6 +486,19 @@ static char * depflagsFormat(rpmtd td)
return val;
}
@ -153,7 +151,7 @@ Needs extcond.diff for query operations.
/**
* Return tag container array size.
* @param td tag data container
@@ -591,6 +604,7 @@
@@ -591,6 +604,7 @@ static const struct headerFormatFunc_s r
{ RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat },
{ RPMTD_FORMAT_EXPAND, "expand", expandFormat },
{ RPMTD_FORMAT_FSTATUS, "fstatus", fstatusFormat },
@ -161,9 +159,9 @@ Needs extcond.diff for query operations.
{ -1, NULL, NULL }
};
--- lib/rpmds.c
+++ lib/rpmds.c
@@ -69,6 +69,10 @@
--- ./lib/rpmds.c.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./lib/rpmds.c 2013-07-12 11:32:45.000000000 +0000
@@ -70,6 +70,10 @@ static int dsType(rpmTagVal tag,
t = "Trigger";
evr = RPMTAG_TRIGGERVERSION;
f = RPMTAG_TRIGGERFLAGS;
@ -174,9 +172,9 @@ Needs extcond.diff for query operations.
} else {
rc = 1;
}
--- lib/rpmds.h
+++ lib/rpmds.h
@@ -48,7 +48,7 @@
--- ./lib/rpmds.h.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./lib/rpmds.h 2013-07-12 11:32:45.000000000 +0000
@@ -48,7 +48,7 @@ enum rpmsenseFlags_e {
RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */
RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */
RPMSENSE_KEYRING = (1 << 26),
@ -185,7 +183,7 @@ Needs extcond.diff for query operations.
RPMSENSE_CONFIG = (1 << 28)
};
@@ -70,6 +70,7 @@
@@ -70,6 +70,7 @@ typedef rpmFlags rpmsenseFlags;
RPMSENSE_FIND_REQUIRES | \
RPMSENSE_RPMLIB | \
RPMSENSE_KEYRING | \
@ -193,9 +191,9 @@ Needs extcond.diff for query operations.
RPMSENSE_PRETRANS | \
RPMSENSE_POSTTRANS | \
RPMSENSE_PREREQ | \
--- lib/rpmtag.h
+++ lib/rpmtag.h
@@ -217,14 +217,14 @@
--- ./lib/rpmtag.h.orig 2012-11-18 08:21:06.000000000 +0000
+++ ./lib/rpmtag.h 2013-07-12 11:32:45.000000000 +0000
@@ -217,14 +217,14 @@ typedef enum rpmTag_e {
RPMTAG_PRETRANSPROG = 1153, /* s[] */
RPMTAG_POSTTRANSPROG = 1154, /* s[] */
RPMTAG_DISTTAG = 1155, /* s */
@ -218,9 +216,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
+++ lib/rpmtd.h
@@ -228,6 +228,7 @@
--- ./lib/rpmtd.h.orig 2012-11-18 08:21:06.000000000 +0000
+++ ./lib/rpmtd.h 2013-07-12 11:32:45.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) */
@ -228,9 +226,9 @@ Needs extcond.diff for query operations.
} rpmtdFormats;
/** \ingroup rpmtd
--- python/rpmmodule.c
+++ python/rpmmodule.c
@@ -395,6 +395,7 @@
--- ./python/rpmmodule.c.orig 2012-11-18 08:21:06.000000000 +0000
+++ ./python/rpmmodule.c 2013-07-12 11:32:45.000000000 +0000
@@ -393,6 +393,7 @@ static int initModule(PyObject *m)
REGISTER_ENUM(RPMSENSE_RPMLIB);
REGISTER_ENUM(RPMSENSE_TRIGGERPREIN);
REGISTER_ENUM(RPMSENSE_KEYRING);
@ -238,9 +236,9 @@ Needs extcond.diff for query operations.
REGISTER_ENUM(RPMSENSE_CONFIG);
REGISTER_ENUM(RPMTRANS_FLAG_TEST);
--- rpmpopt.in
+++ rpmpopt.in
@@ -67,6 +67,22 @@
--- ./rpmpopt.in.orig 2012-12-18 15:50:36.000000000 +0000
+++ ./rpmpopt.in 2013-07-12 11:32:45.000000000 +0000
@@ -67,6 +67,22 @@ rpm alias --requires --qf \
--POPTdesc=$"list capabilities required by package(s)"
rpm alias -R --requires
@ -263,9 +261,9 @@ Needs extcond.diff for query operations.
rpm alias --info --qf '\
Name : %{NAME}\n\
%|EPOCH?{Epoch : %{EPOCH}\n}|\
--- tests/rpmgeneral.at
+++ tests/rpmgeneral.at
@@ -79,6 +79,10 @@
--- ./tests/rpmgeneral.at.orig 2012-11-18 08:21:06.000000000 +0000
+++ ./tests/rpmgeneral.at 2013-07-12 11:32:45.000000000 +0000
@@ -79,6 +79,10 @@ DISTTAG
DISTURL
DSAHEADER
E
@ -276,7 +274,7 @@ Needs extcond.diff for query operations.
EPOCH
EPOCHNUM
EVR
@@ -219,6 +223,10 @@
@@ -219,6 +223,10 @@ SOURCE
SOURCEPACKAGE
SOURCEPKGID
SOURCERPM