- update to rpm 4.8.0-beta1
- drop patches + other sources now included upstream - add conflict for current ocaml-runtime
This commit is contained in:
parent
0b53f7cb09
commit
5e19ecce34
@ -1 +1 @@
|
||||
rpm-4.7.2.tar.bz2
|
||||
rpm-4.8.0-beta1.tar.bz2
|
||||
|
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Transform desktop mimetype info into RPM mimehandler(type) provides
|
||||
#
|
||||
# Author: Richard Hughes <richard@hughsie.com>
|
||||
# Based on other provides scripts from RPM
|
||||
|
||||
OLD_IFS="$IFS"
|
||||
while read instfile ; do
|
||||
case "$instfile" in
|
||||
*.desktop)
|
||||
mime=`cat $instfile | grep MimeType= | cut -d'=' -f2`
|
||||
IFS=';'
|
||||
for type in $mime ; do
|
||||
echo 'mimehandler('$type')'
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
IFS=$OLD_IFS
|
||||
|
@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script to install in:
|
||||
# /usr/lib/rpm/redhat/find-provides.d
|
||||
#
|
||||
# Transform font files into RPM provides
|
||||
# Requires fontconfig >= 2.6.90
|
||||
#
|
||||
# Author: Behdad Esfahbod <behdad@redhat.com>
|
||||
# Based on other provides scripts from RPM
|
||||
#
|
||||
|
||||
fcquery=/usr/bin/fc-query
|
||||
|
||||
[ -x $fcquery ] || exit 0
|
||||
|
||||
# filter out anything outside main fontconfig path
|
||||
grep /usr/share/fonts/ |
|
||||
while read fn; do
|
||||
$fcquery --format '%{=pkgkit}' "${fn}" 2> /dev/null
|
||||
done
|
@ -1,96 +0,0 @@
|
||||
diff --git a/build/rpmfc.c b/build/rpmfc.c
|
||||
index 1bb1c3b..4e57869 100644
|
||||
--- a/build/rpmfc.c
|
||||
+++ b/build/rpmfc.c
|
||||
@@ -484,6 +484,7 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
|
||||
{ "RPM v4", RPMFC_ARCHIVE|RPMFC_INCLUDE },
|
||||
|
||||
{ " image", RPMFC_IMAGE|RPMFC_INCLUDE },
|
||||
+ { " font metrics", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
{ " font", RPMFC_FONT|RPMFC_INCLUDE },
|
||||
{ " Font", RPMFC_FONT|RPMFC_INCLUDE },
|
||||
|
||||
@@ -496,19 +497,14 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
|
||||
{ "SGML", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
{ "XML", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
|
||||
- { " program text", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
{ " source", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
{ "GLS_BINARY_LSB_FIRST", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
{ " DB ", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
|
||||
- { "ASCII English text", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
- { "ASCII text", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
- { "ISO-8859 text", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
-
|
||||
{ "symbolic link to", RPMFC_SYMLINK|RPMFC_INCLUDE },
|
||||
{ "socket", RPMFC_DEVICE },
|
||||
{ "special", RPMFC_DEVICE },
|
||||
- { " text", RPMFC_TEXT },
|
||||
+ { " text", RPMFC_TEXT|RPMFC_INCLUDE },
|
||||
|
||||
{ "ASCII", RPMFC_WHITE },
|
||||
{ "ISO-8859", RPMFC_WHITE },
|
||||
@@ -1184,6 +1180,31 @@ exit:
|
||||
#endif
|
||||
}
|
||||
|
||||
+static int rpmfcMISC(rpmfc fc)
|
||||
+{
|
||||
+ struct stat st;
|
||||
+ int rc = -1;
|
||||
+ const char *what = NULL;
|
||||
+ const char * fn = fc->fn[fc->ix];
|
||||
+ /* this part is enumerated, compare equality not bit flags */
|
||||
+ int ftype = fc->fcolor->vals[fc->ix] & 0x000F0000;
|
||||
+
|
||||
+ if (ftype == RPMFC_FONT) {
|
||||
+ what = "fontconfig";
|
||||
+ } else if (ftype == RPMFC_TEXT && rpmFileHasSuffix(fn, ".desktop")) {
|
||||
+ what = "desktop";
|
||||
+ }
|
||||
+
|
||||
+ if (what == NULL || stat(fn, &st) < 0 || !S_ISREG(st.st_mode)) {
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ (void) rpmfcHelper(fc, 'P', what);
|
||||
+ rc = 0;
|
||||
+
|
||||
+exit:
|
||||
+ return rc;
|
||||
+}
|
||||
typedef const struct rpmfcApplyTbl_s {
|
||||
int (*func) (rpmfc fc);
|
||||
int colormask;
|
||||
@@ -1196,6 +1217,7 @@ static const struct rpmfcApplyTbl_s const rpmfcApplyTable[] = {
|
||||
{ rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_BOURNE|
|
||||
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|
|
||||
RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
|
||||
+ { rpmfcMISC, RPMFC_FONT|RPMFC_TEXT },
|
||||
{ rpmfcSYMLINK, RPMFC_SYMLINK },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
@@ -1315,7 +1337,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
|
||||
size_t slen;
|
||||
int fcolor;
|
||||
int xx;
|
||||
- int msflags = MAGIC_CHECK; /* XXX MAGIC_COMPRESS flag? */
|
||||
+ int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS;
|
||||
magic_t ms = NULL;
|
||||
|
||||
if (fc == NULL || argv == NULL)
|
||||
diff --git a/macros.in b/macros.in
|
||||
index c187f62..945e89b 100644
|
||||
--- a/macros.in
|
||||
+++ b/macros.in
|
||||
@@ -489,6 +489,9 @@ print (t)\
|
||||
%__pkgconfig_provides %{_rpmconfigdir}/pkgconfigdeps.sh --provides
|
||||
%__pkgconfig_requires %{_rpmconfigdir}/pkgconfigdeps.sh --requires
|
||||
|
||||
+%__fontconfig_provides %{_rpmconfigdir}/fontconfig.prov
|
||||
+%__desktop_provides %{_rpmconfigdir}/desktop-file.prov
|
||||
+
|
||||
#==============================================================================
|
||||
# ---- Database configuration macros.
|
||||
# Macros used to configure Berkley db parameters.
|
@ -1,95 +0,0 @@
|
||||
diff -up rpm-4.7.1/build/files.c.bugurl rpm-4.7.1/build/files.c
|
||||
--- rpm-4.7.1/build/files.c.bugurl 2009-07-21 09:42:51.000000000 +0300
|
||||
+++ rpm-4.7.1/build/files.c 2009-09-15 11:37:45.000000000 +0300
|
||||
@@ -1977,6 +1977,7 @@ static const rpmTag sourceTags[] = {
|
||||
RPMTAG_CHANGELOGNAME,
|
||||
RPMTAG_CHANGELOGTEXT,
|
||||
RPMTAG_URL,
|
||||
+ RPMTAG_BUGURL,
|
||||
HEADER_I18NTABLE,
|
||||
0
|
||||
};
|
||||
diff -up rpm-4.7.1/build/parsePreamble.c.bugurl rpm-4.7.1/build/parsePreamble.c
|
||||
--- rpm-4.7.1/build/parsePreamble.c.bugurl 2009-06-23 14:40:57.000000000 +0300
|
||||
+++ rpm-4.7.1/build/parsePreamble.c 2009-09-15 11:37:45.000000000 +0300
|
||||
@@ -32,6 +32,7 @@ static const rpmTag copyTagsDuringParse[
|
||||
RPMTAG_CHANGELOGTEXT,
|
||||
RPMTAG_PREFIXES,
|
||||
RPMTAG_DISTTAG,
|
||||
+ RPMTAG_BUGURL,
|
||||
0
|
||||
};
|
||||
|
||||
@@ -307,6 +308,7 @@ static struct optionalTag {
|
||||
{ RPMTAG_PACKAGER, "%{packager}" },
|
||||
{ RPMTAG_DISTRIBUTION, "%{distribution}" },
|
||||
{ RPMTAG_DISTURL, "%{disturl}" },
|
||||
+ { RPMTAG_BUGURL, "%{bugurl}" },
|
||||
{ -1, NULL }
|
||||
};
|
||||
|
||||
@@ -501,6 +503,7 @@ static int handlePreambleTag(rpmSpec spe
|
||||
}
|
||||
case RPMTAG_URL:
|
||||
case RPMTAG_DISTTAG:
|
||||
+ case RPMTAG_BUGURL:
|
||||
SINGLE_TOKEN_ONLY;
|
||||
/* These macros are for backward compatibility */
|
||||
if (tag == RPMTAG_VERSION) {
|
||||
@@ -734,6 +737,7 @@ static struct PreambleRec_s preambleList
|
||||
{RPMTAG_AUTOPROV, 0, 0, 0, "autoprov"},
|
||||
{RPMTAG_DOCDIR, 0, 0, 0, "docdir"},
|
||||
{RPMTAG_DISTTAG, 0, 0, 0, "disttag"},
|
||||
+ {RPMTAG_BUGURL, 0, 0, 0, "bugurl"},
|
||||
/* LCL: can't add null annotation */
|
||||
{0, 0, 0, 0, 0}
|
||||
};
|
||||
diff -up rpm-4.7.1/lib/rpmtag.h.bugurl rpm-4.7.1/lib/rpmtag.h
|
||||
--- rpm-4.7.1/lib/rpmtag.h.bugurl 2009-06-23 14:40:57.000000000 +0300
|
||||
+++ rpm-4.7.1/lib/rpmtag.h 2009-09-15 11:37:45.000000000 +0300
|
||||
@@ -282,6 +282,7 @@ typedef enum rpmTag_e {
|
||||
RPMTAG_LONGSIZE = 5009, /* l */
|
||||
RPMTAG_FILECAPS = 5010, /* s[] */
|
||||
RPMTAG_FILEDIGESTALGO = 5011, /* i file digest algorithm */
|
||||
+ RPMTAG_BUGURL = 5012, /* s */
|
||||
|
||||
RPMTAG_FIRSTFREE_TAG /*!< internal */
|
||||
} rpmTag;
|
||||
diff -up rpm-4.7.1/macros.in.bugurl rpm-4.7.1/macros.in
|
||||
--- rpm-4.7.1/macros.in.bugurl 2009-09-15 11:37:45.000000000 +0300
|
||||
+++ rpm-4.7.1/macros.in 2009-09-15 11:37:45.000000000 +0300
|
||||
@@ -264,6 +264,12 @@ package or when debugging this package.\
|
||||
#
|
||||
#%disturl
|
||||
|
||||
+# Configurable bug URL, same as BugURL: tag in a specfile.
|
||||
+# The URL will be used to supply reliable information to where
|
||||
+# to file bugs.
|
||||
+#
|
||||
+#%bugurl
|
||||
+
|
||||
# Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
|
||||
# marked as %doc should be installed.
|
||||
#%_excludedocs
|
||||
diff -up rpm-4.7.1/tests/rpmgeneral.at.bugurl rpm-4.7.1/tests/rpmgeneral.at
|
||||
--- rpm-4.7.1/tests/rpmgeneral.at.bugurl 2009-06-23 14:40:59.000000000 +0300
|
||||
+++ rpm-4.7.1/tests/rpmgeneral.at 2009-09-15 11:37:45.000000000 +0300
|
||||
@@ -71,6 +71,7 @@ AT_CHECK([run rpm --querytags],[0],
|
||||
[ARCH
|
||||
ARCHIVESIZE
|
||||
BASENAMES
|
||||
+BUGURL
|
||||
BUILDARCHS
|
||||
BUILDHOST
|
||||
BUILDTIME
|
||||
diff -up rpm-4.7.1/tests/rpmtests.bugurl rpm-4.7.1/tests/rpmtests
|
||||
--- rpm-4.7.1/tests/rpmtests.bugurl 2009-09-15 11:38:00.000000000 +0300
|
||||
+++ rpm-4.7.1/tests/rpmtests 2009-09-15 11:38:10.000000000 +0300
|
||||
@@ -2165,6 +2165,7 @@ at_func_diff_devnull "$at_stderr" || at_
|
||||
echo >>"$at_stdout"; $as_echo "ARCH
|
||||
ARCHIVESIZE
|
||||
BASENAMES
|
||||
+BUGURL
|
||||
BUILDARCHS
|
||||
BUILDHOST
|
||||
BUILDTIME
|
@ -1,74 +0,0 @@
|
||||
commit 5463570061a7ca9ed947885b516c2551778b636f
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Tue Oct 27 16:07:43 2009 +0200
|
||||
|
||||
Support multiple python versions in brp-python-bytecompile (RhBug:53117)
|
||||
- For *.py files in python library path, use matching python interpreter
|
||||
version for compiling, this is especially needed for Python 3 which
|
||||
is very different from Python 2 code. And even if the code compiled
|
||||
with a wrong version, it would be recompiled at run-time when invoked
|
||||
with the intended python version, causing verification errors etc.
|
||||
- For *.py files outside the library path, use "system python" which
|
||||
might not be always correct but we dont really know any better.
|
||||
- Patch from David Malcolm
|
||||
|
||||
diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile
|
||||
index 6405c5e..1faa6db 100644
|
||||
--- a/scripts/brp-python-bytecompile
|
||||
+++ b/scripts/brp-python-bytecompile
|
||||
@@ -6,8 +6,8 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
||||
fi
|
||||
|
||||
# If we don't have a python interpreter, avoid changing anything.
|
||||
-python=${1:-/usr/bin/python}
|
||||
-if [ ! -x "$python" ]; then
|
||||
+default_python=${1:-/usr/bin/python}
|
||||
+if [ ! -x "$default_python" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -19,8 +19,37 @@ if [ -z "$depth" -o "$depth" -le "1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
+# .pyc/.pyo files embed a "magic" value, identifying the ABI version of Python
|
||||
+# bytecode that they are for.
|
||||
+#
|
||||
+# The files below RPM_BUILD_ROOT could be targetting multiple versions of
|
||||
+# python (e.g. a single build that emits several subpackages e.g. a
|
||||
+# python26-foo subpackage, a python31-foo subpackage etc)
|
||||
+#
|
||||
+# Support this by assuming that below each /usr/lib/python$VERSION/, all
|
||||
+# .pyc/.pyo files are to be compiled for /usr/bin/python$VERSION.
|
||||
+#
|
||||
+# For example, below /usr/lib/python2.6/, we're targetting /usr/bin/python2.6
|
||||
+# and below /usr/lib/python3.1/, we're targetting /usr/bin/python3.1
|
||||
+
|
||||
+for python_libdir in $RPM_BUILD_ROOT/usr/lib*/python*/ ;
|
||||
+do
|
||||
+ python_binary=/usr/bin/$(basename $python_libdir)
|
||||
+ echo "Bytecompiling .py files below $python_libdir using $python_binary"
|
||||
+
|
||||
+ # Generate normal (.pyc) byte-compiled files.
|
||||
+ $python_binary -c 'import compileall; compileall.compile_dir("'"$python_libdir"'", '"$depth"', "/", force=1, quiet=1)'
|
||||
+
|
||||
+ # Generate optimized (.pyo) byte-compiled files.
|
||||
+ $python_binary -O -c 'import compileall; compileall.compile_dir("'"$python_libdir"'", '"$depth"', "/", force=1, quiet=1)'
|
||||
+done
|
||||
+
|
||||
+
|
||||
+# Handle other locations in the filesystem using the default python
|
||||
+# implementation:
|
||||
+
|
||||
# Generate normal (.pyc) byte-compiled files.
|
||||
-$python -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/"'"), quiet=1))'
|
||||
+$default_python -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/|/usr/lib.*/python.+/"'"), quiet=1))'
|
||||
if [ $? != 0 ]; then
|
||||
# One or more of the files had a syntax error
|
||||
# XXX TODO: parametrize the exit code, only warn for now
|
||||
@@ -28,4 +57,4 @@ if [ $? != 0 ]; then
|
||||
fi
|
||||
|
||||
# Generate optimized (.pyo) byte-compiled files.
|
||||
-$python -O -c 'import compileall, re; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/"'"))' > /dev/null
|
||||
+$default_python -O -c 'import compileall, re; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/|/usr/lib.*/python.+/"'"))' > /dev/null
|
@ -1,12 +0,0 @@
|
||||
diff -up rpm-4.7.2/configure.ac.chmod-test rpm-4.7.2/configure.ac
|
||||
--- rpm-4.7.2/configure.ac.chmod-test 2009-11-25 09:19:30.000000000 +0200
|
||||
+++ rpm-4.7.2/configure.ac 2009-12-04 11:23:39.000000000 +0200
|
||||
@@ -61,7 +61,7 @@ AC_MSG_CHECKING(POSIX chmod)
|
||||
touch foo.chmodtest
|
||||
chmod 744 foo.chmodtest
|
||||
chmod +X foo.chmodtest 2>/dev/null
|
||||
-a=`ls -l foo.chmodtest | awk '{print $1}'`
|
||||
+a=`ls -l foo.chmodtest | awk '{print substr($1,1,10)}'`
|
||||
rm -f foo.chmodtest
|
||||
if test "$a" = "-rwxr-xr-x"; then
|
||||
AC_MSG_RESULT(yes)
|
@ -1,37 +0,0 @@
|
||||
commit 6eeb0bb06466d9eb75eb55efd514d3ecfe089042
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Wed Nov 25 15:07:17 2009 +0200
|
||||
|
||||
We can't handle OpenPGP subkeys or secret keys, so dont even try
|
||||
- parsing subkeys ends up overwriting data in the main key, causing
|
||||
bogus signature checking failures
|
||||
- this is the final missing piece of RhBug:436812, short of adding
|
||||
proper support for subkeys (maybe someday...)
|
||||
(cherry picked from commit 98213fc4192c7af07037a0f3e9cce9e3b8509c02)
|
||||
|
||||
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
|
||||
index d7bbb5e..f76fc2b 100644
|
||||
--- a/rpmio/rpmpgp.c
|
||||
+++ b/rpmio/rpmpgp.c
|
||||
@@ -1190,11 +1190,6 @@ static int pgpPrtPkt(const uint8_t *pkt, size_t pleft,
|
||||
else
|
||||
memset(_digp->signid, 0, sizeof(_digp->signid));
|
||||
}
|
||||
- case PGPTAG_PUBLIC_SUBKEY:
|
||||
- rc = pgpPrtKey(tag, h, hlen, _dig, _digp);
|
||||
- break;
|
||||
- case PGPTAG_SECRET_KEY:
|
||||
- case PGPTAG_SECRET_SUBKEY:
|
||||
rc = pgpPrtKey(tag, h, hlen, _dig, _digp);
|
||||
break;
|
||||
case PGPTAG_USER_ID:
|
||||
@@ -1205,6 +1200,9 @@ static int pgpPrtPkt(const uint8_t *pkt, size_t pleft,
|
||||
rc = pgpPrtComment(tag, h, hlen);
|
||||
break;
|
||||
|
||||
+ case PGPTAG_PUBLIC_SUBKEY:
|
||||
+ case PGPTAG_SECRET_KEY:
|
||||
+ case PGPTAG_SECRET_SUBKEY:
|
||||
case PGPTAG_RESERVED:
|
||||
case PGPTAG_PUBLIC_SESSION_KEY:
|
||||
case PGPTAG_SYMMETRIC_SESSION_KEY:
|
@ -1,43 +0,0 @@
|
||||
commit fa9fcc89146f08bce3b51d96d0ec9d4175db6978
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Thu Nov 26 10:22:41 2009 +0200
|
||||
|
||||
Dont fail build on unrecognized non-executable files (ticket #105)
|
||||
- Generally only executable files are critical for dependency extraction,
|
||||
whereas oddball application data files can cause unnecessary build
|
||||
failure due to libmagic misdetections etc, so just let non-executables
|
||||
pass with a warning and mark them as unknown data
|
||||
(cherry picked from commit cfcd1f9bd98d5d0fc46a84931984efec3b9d47e2)
|
||||
|
||||
diff --git a/build/rpmfc.c b/build/rpmfc.c
|
||||
index bcb5383..e4ba6b2 100644
|
||||
--- a/build/rpmfc.c
|
||||
+++ b/build/rpmfc.c
|
||||
@@ -1245,6 +1245,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
|
||||
for (fc->ix = 0; fc->ix < fc->nfiles; fc->ix++) {
|
||||
const char * ftype;
|
||||
rpm_mode_t mode = (fmode ? fmode[fc->ix] : 0);
|
||||
+ int is_executable = (mode & (S_IXUSR|S_IXGRP|S_IXOTH));
|
||||
|
||||
s = argv[fc->ix];
|
||||
slen = strlen(s);
|
||||
@@ -1277,11 +1278,16 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
|
||||
ftype = magic_file(ms, s);
|
||||
|
||||
if (ftype == NULL) {
|
||||
- rpmlog(RPMLOG_ERR,
|
||||
+ rpmlog(is_executable ? RPMLOG_ERR : RPMLOG_WARNING,
|
||||
_("Recognition of file \"%s\" failed: mode %06o %s\n"),
|
||||
s, mode, magic_error(ms));
|
||||
- magic_close(ms);
|
||||
- return RPMRC_FAIL;
|
||||
+ /* only executable files are critical to dep extraction */
|
||||
+ if (is_executable) {
|
||||
+ magic_close(ms);
|
||||
+ return RPMRC_FAIL;
|
||||
+ }
|
||||
+ /* unrecognized non-executables get treated as "data" */
|
||||
+ ftype = "data";
|
||||
}
|
||||
}
|
||||
|
@ -1,34 +0,0 @@
|
||||
commit 31c5e0f9b7b09661611b50d84d26ba47ce97fffe
|
||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Wed Nov 25 16:42:43 2009 +0200
|
||||
|
||||
Fix signature password checking result on abnormal conditions (RhBug:496754)
|
||||
- Execve() failure wasn't returning an error code, causing rpm to
|
||||
think the password was ok when we couldn't even try verifying
|
||||
- Stricter return code checking from the password checking child:
|
||||
the password can only be ok if the child exits with WIFEXITED() *and*
|
||||
WIFEXITCODE() of 0. Also WIFEXITCODE() should only be called if
|
||||
WIFEXITED() returns true.
|
||||
(cherry picked from commit 2b41860984f0c4ebba5ebce93a18c9c0ca5e1065)
|
||||
|
||||
diff --git a/lib/signature.c b/lib/signature.c
|
||||
index a501f3e..a2eaf9b 100644
|
||||
--- a/lib/signature.c
|
||||
+++ b/lib/signature.c
|
||||
@@ -883,6 +883,7 @@ static int checkPassPhrase(const char * passPhrase, const rpmSigTag sigTag)
|
||||
|
||||
rpmlog(RPMLOG_ERR, _("Could not exec %s: %s\n"), "gpg",
|
||||
strerror(errno));
|
||||
+ _exit(EXIT_FAILURE);
|
||||
} break;
|
||||
case RPMSIGTAG_RSA:
|
||||
case RPMSIGTAG_PGP5: /* XXX legacy */
|
||||
@@ -932,7 +933,7 @@ static int checkPassPhrase(const char * passPhrase, const rpmSigTag sigTag)
|
||||
|
||||
(void) waitpid(pid, &status, 0);
|
||||
|
||||
- return ((!WIFEXITED(status) || WEXITSTATUS(status)) ? 1 : 0);
|
||||
+ return ((WIFEXITED(status) && WEXITSTATUS(status) == 0)) ? 0 : 1;
|
||||
}
|
||||
|
||||
char * rpmGetPassPhrase(const char * prompt, const rpmSigTag sigTag)
|
@ -1,16 +1,16 @@
|
||||
diff -up rpm-4.7.0.git9101/build/rpmfc.c.devel-autodep rpm-4.7.0.git9101/build/rpmfc.c
|
||||
--- rpm-4.7.0.git9101/build/rpmfc.c.devel-autodep 2009-04-03 09:26:59.000000000 +0300
|
||||
+++ rpm-4.7.0.git9101/build/rpmfc.c 2009-04-03 11:34:44.000000000 +0300
|
||||
@@ -505,7 +505,7 @@ static const struct rpmfcTokens_s const
|
||||
{ "ASCII text", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
{ "ISO-8859 text", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
diff -up rpm-4.7.90.git9278/build/rpmfc.c.devel-autodep rpm-4.7.90.git9278/build/rpmfc.c
|
||||
--- rpm-4.7.90.git9278/build/rpmfc.c.devel-autodep 2009-09-01 10:45:07.000000000 +0300
|
||||
+++ rpm-4.7.90.git9278/build/rpmfc.c 2009-09-01 11:00:15.000000000 +0300
|
||||
@@ -501,7 +501,7 @@ static const struct rpmfcTokens_s const
|
||||
{ "GLS_BINARY_LSB_FIRST", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
{ " DB ", RPMFC_WHITE|RPMFC_INCLUDE },
|
||||
|
||||
- { "symbolic link to", RPMFC_SYMLINK },
|
||||
+ { "symbolic link to", RPMFC_SYMLINK|RPMFC_INCLUDE },
|
||||
{ "socket", RPMFC_DEVICE },
|
||||
{ "special", RPMFC_DEVICE },
|
||||
{ " text", RPMFC_TEXT },
|
||||
@@ -667,6 +667,105 @@ rpmds rpmfcRequires(rpmfc fc)
|
||||
{ " text", RPMFC_TEXT|RPMFC_INCLUDE },
|
||||
@@ -663,6 +663,105 @@ rpmds rpmfcRequires(rpmfc fc)
|
||||
|
||||
|
||||
/**
|
||||
@ -116,15 +116,15 @@ diff -up rpm-4.7.0.git9101/build/rpmfc.c.devel-autodep rpm-4.7.0.git9101/build/r
|
||||
* Extract script dependencies.
|
||||
* @param fc file classifier
|
||||
* @return 0 on success
|
||||
@@ -1097,6 +1196,7 @@ static const struct rpmfcApplyTbl_s cons
|
||||
{ rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_BOURNE|
|
||||
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|
|
||||
@@ -1118,6 +1217,7 @@ static const struct rpmfcApplyTbl_s cons
|
||||
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|RPMFC_OCAML|
|
||||
RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
|
||||
{ rpmfcMISC, RPMFC_FONT|RPMFC_TEXT },
|
||||
+ { rpmfcSYMLINK, RPMFC_SYMLINK },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
@@ -1117,6 +1217,7 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
@@ -1138,6 +1238,7 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
int ix;
|
||||
int i;
|
||||
int xx;
|
||||
@ -132,7 +132,7 @@ diff -up rpm-4.7.0.git9101/build/rpmfc.c.devel-autodep rpm-4.7.0.git9101/build/r
|
||||
|
||||
/* Generate package and per-file dependencies. */
|
||||
for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
|
||||
@@ -1171,11 +1272,13 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
@@ -1192,11 +1293,13 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
default:
|
||||
break;
|
||||
case 'P':
|
||||
@ -146,7 +146,7 @@ diff -up rpm-4.7.0.git9101/build/rpmfc.c.devel-autodep rpm-4.7.0.git9101/build/r
|
||||
ds = rpmdsSingle(RPMTAG_REQUIRENAME, N, EVR, Flags);
|
||||
dix = rpmdsFind(fc->requires, ds);
|
||||
ds = rpmdsFree(ds);
|
||||
@@ -1197,7 +1300,7 @@ assert(dix >= 0);
|
||||
@@ -1218,7 +1321,7 @@ assert(dix >= 0);
|
||||
previx = ix;
|
||||
xx = argiAdd(&fc->fddictx, ix, argiCount(fc->ddictx)-1);
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
diff --git a/lib/tagexts.c b/lib/tagexts.c
|
||||
index 501d8ac..cf71639 100644
|
||||
--- a/lib/tagexts.c
|
||||
+++ b/lib/tagexts.c
|
||||
@@ -460,12 +460,6 @@ static int filerequireTag(Header h, rpmtd td)
|
||||
diff -up rpm-4.7.90.git9301/lib/tagexts.c.fedora-specspo rpm-4.7.90.git9301/lib/tagexts.c
|
||||
--- rpm-4.7.90.git9301/lib/tagexts.c.fedora-specspo 2009-09-02 13:59:38.000000000 +0300
|
||||
+++ rpm-4.7.90.git9301/lib/tagexts.c 2009-09-02 14:51:10.000000000 +0300
|
||||
@@ -460,12 +460,6 @@ static int filerequireTag(Header h, rpmt
|
||||
}
|
||||
|
||||
/* I18N look aside diversions */
|
||||
@ -15,17 +14,13 @@ index 501d8ac..cf71639 100644
|
||||
static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
|
||||
|
||||
/**
|
||||
@@ -477,63 +471,27 @@ static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
|
||||
@@ -477,61 +471,27 @@ static const char * const _macro_i18ndom
|
||||
*/
|
||||
static int i18nTag(Header h, rpmTag tag, rpmtd td)
|
||||
static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags)
|
||||
{
|
||||
- char * dstring = rpmExpand(_macro_i18ndomains, NULL);
|
||||
- int rc;
|
||||
+ int rc = headerGet(h, tag, td, HEADERGET_ALLOC);
|
||||
+ if (rc) {
|
||||
+ char *de, *dstring = rpmExpand(_macro_i18ndomains, NULL);
|
||||
+ const char *domain;
|
||||
|
||||
-
|
||||
- td->type = RPM_STRING_TYPE;
|
||||
- td->data = NULL;
|
||||
- td->count = 0;
|
||||
@ -35,11 +30,9 @@ index 501d8ac..cf71639 100644
|
||||
- const char * langval;
|
||||
- char * msgkey;
|
||||
- const char * msgid;
|
||||
- const char * n;
|
||||
- int xx;
|
||||
-
|
||||
- xx = headerNVR(h, &n, NULL, NULL);
|
||||
- rasprintf(&msgkey, "%s(%s)", n, rpmTagGetName(tag));
|
||||
- rasprintf(&msgkey, "%s(%s)", headerGetString(h, RPMTAG_NAME),
|
||||
- rpmTagGetName(tag));
|
||||
-
|
||||
- /* change to en_US for msgkey -> msgid resolution */
|
||||
- langval = getenv(language);
|
||||
@ -47,7 +40,11 @@ index 501d8ac..cf71639 100644
|
||||
-#if defined(ENABLE_NLS)
|
||||
- ++_nl_msg_cat_cntr;
|
||||
-#endif
|
||||
-
|
||||
+ int rc = headerGet(h, tag, td, HEADERGET_ALLOC);
|
||||
+ if (rc) {
|
||||
+ char *de, *dstring = rpmExpand(_macro_i18ndomains, NULL);
|
||||
+ const char *domain;
|
||||
|
||||
- msgid = NULL;
|
||||
for (domain = dstring; domain != NULL; domain = de) {
|
||||
+ const char *msgid = td->data;
|
||||
@ -86,11 +83,10 @@ index 501d8ac..cf71639 100644
|
||||
- return 1;
|
||||
+ free(dstring);
|
||||
}
|
||||
-
|
||||
|
||||
- dstring = _free(dstring);
|
||||
-
|
||||
- rc = headerGet(h, tag, td, HEADERGET_DEFAULT);
|
||||
+
|
||||
- rc = headerGet(h, tag, td, HEADERGET_ALLOC);
|
||||
return rc;
|
||||
}
|
||||
|
47
rpm.spec
47
rpm.spec
@ -11,9 +11,9 @@
|
||||
|
||||
%define rpmhome /usr/lib/rpm
|
||||
|
||||
%define rpmver 4.7.2
|
||||
%define snapver {nil}
|
||||
%define srcver %{rpmver}
|
||||
%define rpmver 4.8.0
|
||||
%define snapver beta1
|
||||
%define srcver %{rpmver}-%{snapver}
|
||||
|
||||
%define bdbver 4.8.24
|
||||
%define dbprefix db
|
||||
@ -21,31 +21,22 @@
|
||||
Summary: The RPM package management system
|
||||
Name: rpm
|
||||
Version: %{rpmver}
|
||||
Release: 2%{?dist}
|
||||
Release: 0.%{snapver}.1
|
||||
Group: System Environment/Base
|
||||
Url: http://www.rpm.org/
|
||||
Source0: http://rpm.org/releases/rpm-4.7.x/%{name}-%{srcver}.tar.bz2
|
||||
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
|
||||
%if %{with int_bdb}
|
||||
Source1: db-%{bdbver}.tar.gz
|
||||
%endif
|
||||
Source10: desktop-file.prov
|
||||
Source11: fontconfig.prov
|
||||
|
||||
Patch0: rpm-4.7.0-devel-autodep.patch
|
||||
Patch0: rpm-4.7.90-devel-autodep.patch
|
||||
Patch1: rpm-4.5.90-pkgconfig-path.patch
|
||||
Patch2: rpm-4.5.90-gstreamer-provides.patch
|
||||
# Fedora specspo is setup differently than what rpm expects, considering
|
||||
# this as Fedora-specific patch for now
|
||||
Patch3: rpm-4.6.0-fedora-specspo.patch
|
||||
Patch3: rpm-4.7.90-fedora-specspo.patch
|
||||
|
||||
# Patches already in upstream (but not in 4.7.x)
|
||||
Patch200: rpm-4.7.1-bugurl.patch
|
||||
Patch201: rpm-4.7.0-extra-provides.patch
|
||||
Patch202: rpm-4.7.1-python-bytecompile.patch
|
||||
Patch203: rpm-4.7.2-sign-passcheck.patch
|
||||
Patch204: rpm-4.7.2-rpmfc-unknown.patch
|
||||
Patch205: rpm-4.7.2-pgp-subkey.patch
|
||||
Patch206: rpm-4.7.2-chmod-selinux.patch
|
||||
# Patches already in upstream
|
||||
|
||||
# These are not yet upstream
|
||||
Patch301: rpm-4.6.0-niagara.patch
|
||||
@ -97,9 +88,6 @@ BuildRequires: xz-devel >= 4.999.8
|
||||
BuildRequires: sqlite-devel
|
||||
%endif
|
||||
|
||||
# XXX temporarily for chmod-test patch
|
||||
BuildRequires: autoconf
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
@ -157,6 +145,7 @@ Requires: elfutils >= 0.128 binutils
|
||||
Requires: findutils sed grep gawk diffutils file patch >= 2.5
|
||||
Requires: unzip gzip bzip2 cpio lzma xz
|
||||
Requires: pkgconfig
|
||||
Conflicts: ocaml-runtime < 3.11.1-7
|
||||
|
||||
%description build
|
||||
The rpm-build package contains the scripts and executable programs
|
||||
@ -201,14 +190,6 @@ packages on a system.
|
||||
%patch2 -p1 -b .gstreamer-prov
|
||||
%patch3 -p1 -b .fedora-specspo
|
||||
|
||||
%patch200 -p1 -b .bugurl
|
||||
%patch201 -p1 -b .extra-prov
|
||||
%patch202 -p1 -b .python-bytecompile
|
||||
%patch203 -p1 -b .sign-passcheck
|
||||
%patch204 -p1 -b .rpmfc-unknown
|
||||
%patch205 -p1 -b .pgp-subkey
|
||||
%patch206 -p1 -b .chmod-test
|
||||
|
||||
%patch301 -p1 -b .niagara
|
||||
%patch302 -p1 -b .geode
|
||||
|
||||
@ -255,15 +236,13 @@ install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
|
||||
install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/rpm
|
||||
|
||||
install -p -m 755 %{SOURCE10} %{SOURCE11} ${RPM_BUILD_ROOT}%{rpmhome}/
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
|
||||
for dbi in \
|
||||
Basenames Conflictname Dirnames Group Installtid Name Packages \
|
||||
Providename Provideversion Requirename Requireversion Triggername \
|
||||
Filedigests Pubkeys Sha1header Sigmd5 \
|
||||
Filedigests Pubkeys Sha1header Sigmd5 Obsoletename \
|
||||
__db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \
|
||||
__db.008 __db.009
|
||||
do
|
||||
@ -377,6 +356,8 @@ exit 0
|
||||
%{rpmhome}/javadeps
|
||||
%{rpmhome}/mono-find-provides
|
||||
%{rpmhome}/mono-find-requires
|
||||
%{rpmhome}/ocaml-find-provides.sh
|
||||
%{rpmhome}/ocaml-find-requires.sh
|
||||
%{rpmhome}/osgideps.pl
|
||||
%{rpmhome}/perldeps.pl
|
||||
%{rpmhome}/libtooldeps.sh
|
||||
@ -422,6 +403,10 @@ exit 0
|
||||
%doc doc/librpm/html/*
|
||||
|
||||
%changelog
|
||||
* Mon Dec 07 2009 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-0.beta1.1
|
||||
- update to 4.8.0-beta1 (http://rpm.org/wiki/Releases/4.8.0)
|
||||
- rpm-build conflicts with current ocaml-runtime
|
||||
|
||||
* Fri Dec 04 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.2-2
|
||||
- missing error exit code from signing password checking (#496754)
|
||||
- dont fail build on unrecognized data files (#532489)
|
||||
|
Loading…
Reference in New Issue
Block a user