Compare commits

..

1 Commits
master ... f27

Author SHA1 Message Date
Panu Matilainen c1247bc7c6 Rebase to 4.14.1 2018-02-01 13:39:06 +02:00
13 changed files with 1849 additions and 633 deletions

12
.gitignore vendored
View File

@ -28,15 +28,3 @@
/rpm-4.14.0-rc2.tar.bz2
/rpm-4.14.0.tar.bz2
/rpm-4.14.1.tar.bz2
/rpm-4.14.2-rc1.tar.bz2
/rpm-4.14.2-rc2.tar.bz2
/rpm-4.14.2.tar.bz2
/rpm-4.14.2.1.tar.bz2
/rpm-4.14.90-git14653.tar.bz2
/rpm-4.15.0-beta.tar.bz2
/rpm-4.15.0-rc1.tar.bz2
/rpm-4.15.0.tar.bz2
/rpm-4.15.1.tar.bz2
/rpm-4.15.90-git14971.tar.bz2
/rpm-4.16.0-beta1.tar.bz2
/rpm-4.16.0-beta3.tar.bz2

View File

@ -1,95 +0,0 @@
From 2426c2a066e44f4d9a342585e76cdbdb0a8a2db1 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 23 Oct 2019 20:22:19 +0100
Subject: [PATCH] Revert "Improve ARM detection"
This reverts commit 8c3a7b8fa92b49a811fe36b60857b12f5d7db8a8.
This is the final piece in fixing rhbz 1691430. It's a clean revert
so let's do that for F-31 and we can discuss the details later.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
lib/rpmrc.c | 37 +++++++++----------------------------
1 file changed, 9 insertions(+), 28 deletions(-)
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 0806e1b07..cada3f788 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -82,7 +82,6 @@ struct rpmOption {
static struct rpmat_s {
const char *platform;
uint64_t hwcap;
- uint64_t hwcap2;
} rpmat;
typedef struct defaultEntry_s {
@@ -951,9 +950,6 @@ static int is_geode(void)
#if defined(__linux__)
-#ifndef AT_HWCAP2 /* glibc < 2.18 */
-#define AT_HWCAP2 26
-#endif
/**
* Populate rpmat structure with auxv values
*/
@@ -967,7 +963,6 @@ static void read_auxv(void)
if (!rpmat.platform)
rpmat.platform = "";
rpmat.hwcap = getauxval(AT_HWCAP);
- rpmat.hwcap2 = getauxval(AT_HWCAP2);
#else
rpmat.platform = "";
int fd = open("/proc/self/auxv", O_RDONLY);
@@ -989,9 +984,6 @@ static void read_auxv(void)
case AT_HWCAP:
rpmat.hwcap = auxv.a_un.a_val;
break;
- case AT_HWCAP2:
- rpmat.hwcap2 = auxv.a_un.a_val;
- break;
}
}
close(fd);
@@ -1225,27 +1217,16 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
# if !defined(HWCAP_ARM_VFPv3)
# define HWCAP_ARM_VFPv3 (1 << 13)
# endif
-# if !defined(HWCAP2_AES)
-# define HWCAP2_AES (1 << 0)
-# endif
- /*
- * un.machine is armvXE, where X is version number and E is
- * endianness (b or l)
- */
- if (rstreqn(un.machine, "armv", 4)) {
- char endian = un.machine[strlen(un.machine)-1];
- char *modifier = un.machine + 5;
- /* keep armv7, armv8, armv9, armv10, ... */
- while(risdigit(*modifier))
- modifier++;
- if (rpmat.hwcap & HWCAP_ARM_VFPv3)
- *modifier++ = 'h';
- if (rpmat.hwcap2 & HWCAP2_AES)
- *modifier++ = 'c';
+ if (rstreq(un.machine, "armv7l")) {
+ if (rpmat.hwcap & HWCAP_ARM_VFPv3) {
if (rpmat.hwcap & HWCAP_ARM_NEON)
- *modifier++ = 'n';
- *modifier++ = endian;
- *modifier++ = 0;
+ strcpy(un.machine, "armv7hnl");
+ else
+ strcpy(un.machine, "armv7hl");
+ }
+ } else if (rstreq(un.machine, "armv6l")) {
+ if (rpmat.hwcap & HWCAP_ARM_VFP)
+ strcpy(un.machine, "armv6hl");
}
# endif /* arm*-linux */
--
2.23.0

View File

@ -1,30 +0,0 @@
From f2bc669cd0a080792522dd1bb7f50ef7025f16f0 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 21 Jul 2018 10:13:04 +0200
Subject: [PATCH] find-debuginfo.sh: decompress DWARF compressed ELF sections
debugedit and dwz do not support DWARF compressed ELF sections, let's
just decompress those before extracting debuginfo.
Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
scripts/find-debuginfo.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 90a44942d..7b01bc036 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -357,6 +357,9 @@ do_file()
get_debugfn "$f"
[ -f "${debugfn}" ] && return
+ echo "explicitly decompress any DWARF compressed ELF sections in $f"
+ eu-elfcompress -q -p -t none "$f"
+
echo "extracting debug info from $f"
# See also cpio SOURCEFILE copy. Directories must match up.
debug_base_name="$RPM_BUILD_DIR"
--
2.18.0

39
platform-python-abi.patch Normal file
View File

@ -0,0 +1,39 @@
From fef3b646f3facd26dc04cfccdc27c061cfe0ee37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 7 Aug 2017 16:28:59 +0200
Subject: [PATCH] Generate requires and provides for platform-python(abi)
See https://fedoraproject.org/wiki/Changes/Platform_Python_Stack
---
scripts/pythondeps.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/pythondeps.sh b/scripts/pythondeps.sh
index 10a060aac..a6d97ef4f 100755
--- a/scripts/pythondeps.sh
+++ b/scripts/pythondeps.sh
@@ -13,8 +13,8 @@ case $1 in
# generating a line of the form
# python(abi) = MAJOR.MINOR
# (Don't match against -config tools e.g. /usr/bin/python2.6-config)
- grep "/usr/bin/python.\..$" \
- | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
+ egrep '/usr/(bin/|libexec/platform-)python.\..$' \
+ | sed -r -e "s@.*/usr/(bin/|libexec/(platform-))python(.\..)@\2python(abi) = \3@"
;;
-R|--requires)
shift
@@ -23,8 +23,8 @@ case $1 in
# /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
# generating (uniqely) lines of the form:
# python(abi) = MAJOR.MINOR
- grep "/usr/lib[^/]*/python.\../.*" \
- | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
+ egrep '/usr/lib[^/]*/(platform-|)python.\../.*' \
+ | sed -r -e "s@.*/usr/lib[^/]*/(platform-|)python(.\..)/.*@\1python(abi) = \2@g" \
| sort | uniq
;;
esac
--
2.13.3

View File

@ -0,0 +1,52 @@
From cc1a08b4a5222e74cae46ee17d4ef297ed63c2a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Tue, 8 Aug 2017 12:27:48 +0200
Subject: [PATCH] Bytecompile stuff in /usr/lib*/platform-python with
platform-python
---
scripts/brp-python-bytecompile | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile
index 894fa3459..92460b982 100644
--- a/scripts/brp-python-bytecompile
+++ b/scripts/brp-python-bytecompile
@@ -57,9 +57,15 @@ EOF
# and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1
shopt -s nullglob
-for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/python[0-9]\.[0-9]$"`;
+for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/(platform-)?python[0-9]\.[0-9]$"`;
do
- python_binary=/usr/bin/$(basename $python_libdir)
+ python_basename=$(basename $python_libdir)
+ if [[ $python_basename == platform* ]];
+ then
+ python_binary=/usr/libexec/$python_basename
+ else
+ python_binary=/usr/bin/$python_basename
+ fi
real_libdir=${python_libdir/$RPM_BUILD_ROOT/}
echo "Bytecompiling .py files below $python_libdir using $python_binary"
@@ -88,14 +94,14 @@ if [ ! -x "$default_python" ]; then
fi
# Generate normal (.pyc) byte-compiled files.
-python_bytecompile "" $default_python "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
+python_bytecompile "" $default_python "/bin/|/sbin/|/usr/lib(64)?/(platform-)?python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
# One or more of the files had a syntax error
exit 1
fi
# Generate optimized (.pyo) byte-compiled files.
-python_bytecompile "-O" $default_python "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
+python_bytecompile "-O" $default_python "/bin/|/sbin/|/usr/lib(64)?/(platform-)?python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
# One or more of the files had a syntax error
exit 1
--
2.13.3

View File

@ -0,0 +1,42 @@
From eb48f08dd30324f960b8e404b80eb885b2bbb593 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 24 Aug 2017 13:45:49 +0200
Subject: [PATCH] Do not provide pythonXdist for platform-python packages
---
scripts/pythondistdeps.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
index 2abb59f49..f624fdbb7 100755
--- a/scripts/pythondistdeps.py
+++ b/scripts/pythondistdeps.py
@@ -16,6 +16,7 @@ from os.path import basename, dirname, isdir, sep
from sys import argv, stdin, version
from distutils.sysconfig import get_python_lib
from warnings import warn
+import re
opts, args = getopt(
@@ -78,6 +79,9 @@ for f in files:
f = f.strip()
lower = f.lower()
name = 'python(abi)'
+ if re.search(r'/usr/lib(64)?/platform-python\d\.\d', lower):
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1484607
+ continue
# add dependency based on path, versioned if within versioned python directory
if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')):
if name not in py_deps:
@@ -115,7 +119,6 @@ for f in files:
if not dist.py_version:
# Try to parse the Python version from the path the metadata
# resides at (e.g. /usr/lib/pythonX.Y/site-packages/...)
- import re
res = re.search(r"/python(?P<pyver>\d+\.\d)/", path_item)
if res:
dist.py_version = res.group('pyver')
--
2.13.5

View File

@ -8,5 +8,5 @@ diff -up rpm-4.11.1-rc1/macros.in.siteconfig rpm-4.11.1-rc1/macros.in
+ CONFIG_SITE=${CONFIG_SITE:-NONE}\
+ export CONFIG_SITE\
\
%{verbose:set -x}\
%{verbose:set -x}%{!verbose:exec > /dev/null}\
umask 022\

View File

@ -0,0 +1,95 @@
diff --git a/lib/tagexts.c b/lib/tagexts.c
index f72ff60..2c0b179 100644
--- a/lib/tagexts.c
+++ b/lib/tagexts.c
@@ -535,15 +535,6 @@ static int filerequireTag(Header h, rpmtd td, headerGetFlags hgflags)
return filedepTag(h, RPMTAG_REQUIRENAME, td, hgflags);
}
-/* I18N look aside diversions */
-
-#if defined(ENABLE_NLS)
-extern int _nl_msg_cat_cntr; /* XXX GNU gettext voodoo */
-#endif
-static const char * const language = "LANGUAGE";
-
-static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
-
/**
* Retrieve i18n text.
* @param h header
@@ -554,59 +545,30 @@ static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
*/
static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags)
{
- int rc;
+ int rc = headerGet(h, tag, td, HEADERGET_ALLOC);
#if defined(ENABLE_NLS)
- char * dstring = rpmExpand(_macro_i18ndomains, NULL);
-
- td->type = RPM_STRING_TYPE;
- td->data = NULL;
- td->count = 0;
-
- if (dstring && *dstring) {
- char *domain, *de;
- const char * langval;
- char * msgkey;
- const char * msgid;
+ if (rc) {
+ static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
+ char *de, *dstring = rpmExpand(_macro_i18ndomains, NULL);
+ const char *domain;
- rasprintf(&msgkey, "%s(%s)", headerGetString(h, RPMTAG_NAME),
- rpmTagGetName(tag));
-
- /* change to en_US for msgkey -> msgid resolution */
- langval = getenv(language);
- (void) setenv(language, "en_US", 1);
- ++_nl_msg_cat_cntr;
-
- msgid = NULL;
for (domain = dstring; domain != NULL; domain = de) {
+ const char *msgid = td->data;
+ const char *msg = NULL;
+
de = strchr(domain, ':');
if (de) *de++ = '\0';
- msgid = dgettext(domain, msgkey);
- if (msgid != msgkey) break;
- }
-
- /* restore previous environment for msgid -> msgstr resolution */
- if (langval)
- (void) setenv(language, langval, 1);
- else
- unsetenv(language);
- ++_nl_msg_cat_cntr;
-
- if (domain && msgid) {
- td->data = dgettext(domain, msgid);
- td->data = xstrdup(td->data); /* XXX xstrdup has side effects. */
- td->count = 1;
- td->flags = RPMTD_ALLOCED;
+ msg = dgettext(domain, td->data);
+ if (msg != msgid) {
+ free(td->data);
+ td->data = xstrdup(msg);
+ break;
+ }
}
- dstring = _free(dstring);
- free(msgkey);
- if (td->data)
- return 1;
+ free(dstring);
}
-
- free(dstring);
#endif
- rc = headerGet(h, tag, td, HEADERGET_ALLOC);
return rc;
}

View File

@ -2,14 +2,14 @@ diff -up rpm-4.9.1.1/macros.in.jx rpm-4.9.1.1/macros.in
--- rpm-4.9.1.1/macros.in.jx 2011-08-03 16:19:05.000000000 -0400
+++ rpm-4.9.1.1/macros.in 2011-08-08 09:41:52.981064316 -0400
@@ -674,9 +674,10 @@ print (t)\
RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
+ RPM_LD_FLAGS=\"%{?build_ldflags}\"\
+ RPM_LD_FLAGS=\"%{?__global_ldflags}\"\
RPM_ARCH=\"%{_arch}\"\
RPM_OS=\"%{_os}\"\
RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\
- export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS\
+ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_LD_FLAGS\
- export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
+ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
RPM_PACKAGE_NAME=\"%{NAME}\"\

12
rpm-4.8.1-use-gpg2.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up rpm-4.8.1/macros.in.gpg2 rpm-4.8.1/macros.in
--- rpm-4.8.0/macros.in.gpg2 2011-01-17 12:17:38.000000000 +0200
+++ rpm-4.8.0/macros.in 2011-01-17 12:17:59.000000000 +0200
@@ -40,7 +40,7 @@
%__cp @__CP@
%__cpio @__CPIO@
%__file @__FILE@
-%__gpg @__GPG@
+%__gpg /usr/bin/gpg2
%__grep @__GREP@
%__gzip @__GZIP@
%__id @__ID@

2074
rpm.spec

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
[Unit]
Description=RPM database rebuild
ConditionPathExists=/var/lib/rpm/.rebuilddb
# This should run before any daemons that may open the rpmdb
DefaultDependencies=no
After=sysinit.target
Before=basic.target shutdown.target
Conflicts=shutdown.target
# In case /var is remote-mounted
RequiresMountsFor=/var
[Service]
Type=oneshot
ExecStart=/usr/bin/rpmdb --rebuilddb
ExecStartPost=rm -f /var/lib/rpm/.rebuilddb
[Install]
WantedBy=basic.target

View File

@ -1 +1 @@
SHA512 (rpm-4.16.0-beta3.tar.bz2) = 20efa638a7fe85b1b4d3d42fb07172c20a1f3c62024a29e4184b67a2d52ff3f94a186f178e9a5bfee9bf6c826a1023995d970b5c0ddaffe8b61fd2c888b44032
SHA512 (rpm-4.14.1.tar.bz2) = 29e95eaaf40a6ddf7f23446ea6cb8a1dcd12a45d4965595a705cb9130890d772a40ecfa475b189865da51248b3d2414e4f4b1a40cbfd7ca538c482d87c50a218