Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
|
f8de97529b | |
|
99a58c7873 | |
|
b00ec5cf69 | |
|
074cc434a3 | |
|
7a20d1f47a | |
|
46fcd24c85 | |
|
4e36c2ed98 | |
|
82cab847ba | |
|
79ffddb45a | |
|
f686f71af8 | |
|
82de465ada | |
|
1149cd0ac5 | |
|
850ff7d23b | |
|
5123e762e6 | |
|
74d17c17f7 | |
|
6536d6c3d4 |
|
@ -23,20 +23,4 @@
|
|||
/rpm-4.13.0-rc2.tar.bz2
|
||||
/rpm-4.13.0.tar.bz2
|
||||
/rpm-4.13.0.1.tar.bz2
|
||||
/rpm-4.13.90-git14002.tar.bz2
|
||||
/rpm-4.14.0-rc1.tar.bz2
|
||||
/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
|
||||
/rpm-4.13.0.2.tar.bz2
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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\
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
--- rpm-4.13.0-rc1/scripts/Makefile.am.orig 2015-09-01 19:45:43.896822977 +0200
|
||||
+++ rpm-4.13.0-rc1/scripts/Makefile.am 2016-06-13 15:46:34.281390084 +0200
|
||||
@@ -11,7 +11,7 @@
|
||||
check-files check-prereqs \
|
||||
check-buildroot check-rpaths check-rpaths-worker \
|
||||
find-debuginfo.sh find-lang.sh \
|
||||
- perl.prov perl.req pythondeps.sh \
|
||||
+ perl.prov perl.req pythondeps.sh pythondistdeps.py \
|
||||
rpmdb_loadcvt rpm.daily rpm.log rpm.supp rpm2cpio.sh \
|
||||
tgpg vpkg-provides.sh \
|
||||
find-requires find-provides \
|
||||
@@ -30,7 +30,7 @@
|
||||
check-files check-prereqs \
|
||||
check-buildroot check-rpaths check-rpaths-worker \
|
||||
find-lang.sh find-requires find-provides \
|
||||
- perl.prov perl.req pythondeps.sh \
|
||||
+ perl.prov perl.req pythondeps.sh pythondistdeps.py \
|
||||
mono-find-requires mono-find-provides \
|
||||
pkgconfigdeps.sh libtooldeps.sh \
|
||||
ocaml-find-requires.sh ocaml-find-provides.sh \
|
|
@ -0,0 +1,9 @@
|
|||
--- rpm-4.13.0-rc1/fileattrs/python.attr.orig 2016-06-13 15:49:10.072832164 +0200
|
||||
+++ rpm-4.13.0-rc1/fileattrs/python.attr 2016-06-13 15:50:46.687106846 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-%__python_provides %{_rpmconfigdir}/pythondeps.sh --provides
|
||||
+%__python_provides %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
|
||||
%__python_requires %{_rpmconfigdir}/pythondeps.sh --requires
|
||||
-%__python_path ^((/usr/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$
|
||||
+%__python_path ^((/usr/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*))|(%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$
|
||||
%__python_magic [Pp]ython.*(executable|byte-compiled)
|
|
@ -0,0 +1,229 @@
|
|||
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
|
||||
new file mode 100755
|
||||
index 0000000..8a2f43d
|
||||
--- /dev/null
|
||||
+++ b/scripts/pythondistdeps.py
|
||||
@@ -0,0 +1,223 @@
|
||||
+#!/usr/bin/python
|
||||
+# -*- coding: utf-8 -*-
|
||||
+#
|
||||
+# Copyright 2010 Per Øyvind Karlsen <proyvind@moondrake.org>
|
||||
+# Copyright 2015 Neal Gompa <ngompa13@gmail.com>
|
||||
+#
|
||||
+# This program is free software. It may be redistributed and/or modified under
|
||||
+# the terms of the LGPL version 2.1 (or later).
|
||||
+#
|
||||
+# RPM python dependency generator, using .egg-info/.egg-link/.dist-info data
|
||||
+#
|
||||
+
|
||||
+from __future__ import print_function
|
||||
+from getopt import getopt
|
||||
+from os.path import basename, dirname, isdir, sep
|
||||
+from sys import argv, stdin, version
|
||||
+from distutils.sysconfig import get_python_lib
|
||||
+
|
||||
+
|
||||
+opts, args = getopt(
|
||||
+ argv[1:], 'hPRrCEMLl:',
|
||||
+ ['help', 'provides', 'requires', 'recommends', 'conflicts', 'extras', 'majorver-provides', 'legacy-provides' , 'legacy'])
|
||||
+
|
||||
+Provides = False
|
||||
+Requires = False
|
||||
+Recommends = False
|
||||
+Conflicts = False
|
||||
+Extras = False
|
||||
+Provides_PyMajorVer_Variant = False
|
||||
+legacy_Provides = False
|
||||
+legacy = False
|
||||
+
|
||||
+for o, a in opts:
|
||||
+ if o in ('-h', '--help'):
|
||||
+ print('-h, --help\tPrint help')
|
||||
+ print('-P, --provides\tPrint Provides')
|
||||
+ print('-R, --requires\tPrint Requires')
|
||||
+ print('-r, --recommends\tPrint Recommends')
|
||||
+ print('-C, --conflicts\tPrint Conflicts')
|
||||
+ print('-E, --extras\tPrint Extras ')
|
||||
+ print('-M, --majorver-provides\tPrint extra Provides with Python major version only')
|
||||
+ print('-L, --legacy-provides\tPrint extra legacy pythonegg Provides')
|
||||
+ print('-l, --legacy\tPrint legacy pythonegg Provides/Requires instead')
|
||||
+ exit(1)
|
||||
+ elif o in ('-P', '--provides'):
|
||||
+ Provides = True
|
||||
+ elif o in ('-R', '--requires'):
|
||||
+ Requires = True
|
||||
+ elif o in ('-r', '--recommends'):
|
||||
+ Recommends = True
|
||||
+ elif o in ('-C', '--conflicts'):
|
||||
+ Conflicts = True
|
||||
+ elif o in ('-E', '--extras'):
|
||||
+ Extras = True
|
||||
+ elif o in ('-M', '--majorver-provides'):
|
||||
+ Provides_PyMajorVer_Variant = True
|
||||
+ elif o in ('-L', '--legacy-provides'):
|
||||
+ legacy_Provides = True
|
||||
+ elif o in ('-l', '--legacy'):
|
||||
+ legacy = True
|
||||
+
|
||||
+if Requires:
|
||||
+ py_abi = True
|
||||
+else:
|
||||
+ py_abi = False
|
||||
+py_deps = {}
|
||||
+if args:
|
||||
+ files = args
|
||||
+else:
|
||||
+ files = stdin.readlines()
|
||||
+
|
||||
+for f in files:
|
||||
+ f = f.strip()
|
||||
+ lower = f.lower()
|
||||
+ name = 'python(abi)'
|
||||
+ # 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:
|
||||
+ py_deps[name] = []
|
||||
+ purelib = get_python_lib(standard_lib=1, plat_specific=0).split(version[:3])[0]
|
||||
+ platlib = get_python_lib(standard_lib=1, plat_specific=1).split(version[:3])[0]
|
||||
+ for lib in (purelib, platlib):
|
||||
+ if lib in f:
|
||||
+ spec = ('==', f.split(lib)[1].split(sep)[0])
|
||||
+ if spec not in py_deps[name]:
|
||||
+ py_deps[name].append(spec)
|
||||
+
|
||||
+ # XXX: hack to workaround RPM internal dependency generator not passing directories
|
||||
+ lower_dir = dirname(lower)
|
||||
+ if lower_dir.endswith('.egg') or \
|
||||
+ lower_dir.endswith('.egg-info') or \
|
||||
+ lower_dir.endswith('.egg-link') or \
|
||||
+ lower_dir.endswith('.dist-info'):
|
||||
+ lower = lower_dir
|
||||
+ f = dirname(f)
|
||||
+ # Determine provide, requires, conflicts & recommends based on egg/dist metadata
|
||||
+ if lower.endswith('.egg') or \
|
||||
+ lower.endswith('.egg-info') or \
|
||||
+ lower.endswith('.egg-link') or \
|
||||
+ lower.endswith('.dist-info'):
|
||||
+ # This import is very slow, so only do it if needed
|
||||
+ from pkg_resources import Distribution, FileMetadata, PathMetadata
|
||||
+ dist_name = basename(f)
|
||||
+ if isdir(f):
|
||||
+ path_item = dirname(f)
|
||||
+ metadata = PathMetadata(path_item, f)
|
||||
+ else:
|
||||
+ path_item = f
|
||||
+ metadata = FileMetadata(f)
|
||||
+ dist = Distribution.from_location(path_item, dist_name, metadata)
|
||||
+ if (Provides_PyMajorVer_Variant or legacy_Provides or legacy) and Provides:
|
||||
+ # Get the Python major version
|
||||
+ pyver_major = dist.py_version.split('.')[0]
|
||||
+ if Provides:
|
||||
+ # If egg/dist metadata says package name is python, we provide python(abi)
|
||||
+ if dist.key == 'python':
|
||||
+ name = 'python(abi)'
|
||||
+ if name not in py_deps:
|
||||
+ py_deps[name] = []
|
||||
+ py_deps[name].append(('==', dist.py_version))
|
||||
+ if not legacy:
|
||||
+ name = 'python{}dist({})'.format(dist.py_version, dist.key)
|
||||
+ if name not in py_deps:
|
||||
+ py_deps[name] = []
|
||||
+ if Provides_PyMajorVer_Variant:
|
||||
+ pymajor_name = 'python{}dist({})'.format(pyver_major, dist.key)
|
||||
+ if pymajor_name not in py_deps:
|
||||
+ py_deps[pymajor_name] = []
|
||||
+ if legacy or legacy_Provides:
|
||||
+ legacy_name = 'pythonegg({})({})'.format(pyver_major, dist.key)
|
||||
+ if legacy_name not in py_deps:
|
||||
+ py_deps[legacy_name] = []
|
||||
+ if dist.version:
|
||||
+ spec = ('==', dist.version)
|
||||
+ if spec not in py_deps[name]:
|
||||
+ if not legacy:
|
||||
+ py_deps[name].append(spec)
|
||||
+ if Provides_PyMajorVer_Variant:
|
||||
+ py_deps[pymajor_name].append(spec)
|
||||
+ if legacy or legacy_Provides:
|
||||
+ py_deps[legacy_name].append(spec)
|
||||
+ if Requires or (Recommends and dist.extras):
|
||||
+ name = 'python(abi)'
|
||||
+ # If egg/dist metadata says package name is python, we don't add dependency on python(abi)
|
||||
+ if dist.key == 'python':
|
||||
+ py_abi = False
|
||||
+ if name in py_deps:
|
||||
+ py_deps.pop(name)
|
||||
+ elif py_abi and dist.py_version:
|
||||
+ if name not in py_deps:
|
||||
+ py_deps[name] = []
|
||||
+ spec = ('==', dist.py_version)
|
||||
+ if spec not in py_deps[name]:
|
||||
+ py_deps[name].append(spec)
|
||||
+ deps = dist.requires()
|
||||
+ if Recommends:
|
||||
+ depsextras = dist.requires(extras=dist.extras)
|
||||
+ if not Requires:
|
||||
+ for dep in reversed(depsextras):
|
||||
+ if dep in deps:
|
||||
+ depsextras.remove(dep)
|
||||
+ deps = depsextras
|
||||
+ # add requires/recommends based on egg/dist metadata
|
||||
+ for dep in deps:
|
||||
+ if legacy:
|
||||
+ name = 'pythonegg({})({})'.format(pyver_major, dep.key)
|
||||
+ else:
|
||||
+ name = 'python{}dist({})'.format(dist.py_version, dep.key)
|
||||
+ for spec in dep.specs:
|
||||
+ if spec[0] != '!=':
|
||||
+ if name not in py_deps:
|
||||
+ py_deps[name] = []
|
||||
+ if spec not in py_deps[name]:
|
||||
+ py_deps[name].append(spec)
|
||||
+ if not dep.specs:
|
||||
+ py_deps[name] = []
|
||||
+ # Unused, for automatic sub-package generation based on 'extras' from egg/dist metadata
|
||||
+ # TODO: implement in rpm later, or...?
|
||||
+ if Extras:
|
||||
+ deps = dist.requires()
|
||||
+ extras = dist.extras
|
||||
+ print(extras)
|
||||
+ for extra in extras:
|
||||
+ print('%%package\textras-{}'.format(extra))
|
||||
+ print('Summary:\t{} extra for {} python package'.format(extra, dist.key))
|
||||
+ print('Group:\t\tDevelopment/Python')
|
||||
+ depsextras = dist.requires(extras=[extra])
|
||||
+ for dep in reversed(depsextras):
|
||||
+ if dep in deps:
|
||||
+ depsextras.remove(dep)
|
||||
+ deps = depsextras
|
||||
+ for dep in deps:
|
||||
+ for spec in dep.specs:
|
||||
+ if spec[0] == '!=':
|
||||
+ print('Conflicts:\t{} {} {}'.format(dep.key, '==', spec[1]))
|
||||
+ else:
|
||||
+ print('Requires:\t{} {} {}'.format(dep.key, spec[0], spec[1]))
|
||||
+ print('%%description\t{}'.format(extra))
|
||||
+ print('{} extra for {} python package'.format(extra, dist.key))
|
||||
+ print('%%files\t\textras-{}\n'.format(extra))
|
||||
+ if Conflicts:
|
||||
+ # Should we really add conflicts for extras?
|
||||
+ # Creating a meta package per extra with recommends on, which has
|
||||
+ # the requires/conflicts in stead might be a better solution...
|
||||
+ for dep in dist.requires(extras=dist.extras):
|
||||
+ name = dep.key
|
||||
+ for spec in dep.specs:
|
||||
+ if spec[0] == '!=':
|
||||
+ if name not in py_deps:
|
||||
+ py_deps[name] = []
|
||||
+ spec = ('==', spec[1])
|
||||
+ if spec not in py_deps[name]:
|
||||
+ py_deps[name].append(spec)
|
||||
+names = list(py_deps.keys())
|
||||
+names.sort()
|
||||
+for name in names:
|
||||
+ if py_deps[name]:
|
||||
+ # Print out versioned provides, requires, recommends, conflicts
|
||||
+ for spec in py_deps[name]:
|
||||
+ print('{} {} {}'.format(name, spec[0], spec[1]))
|
||||
+ else:
|
||||
+ # Print out unversioned provides, requires, recommends, conflicts
|
||||
+ print(name)
|
|
@ -0,0 +1,34 @@
|
|||
From 30d472c8af086df077e6cf047a87fdaf93c9b21b Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <ignatenko@redhat.com>
|
||||
Date: Wed, 24 Aug 2016 15:37:16 +0200
|
||||
Subject: [PATCH] pythondistdeps.py: add forgotten import
|
||||
|
||||
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
|
||||
---
|
||||
scripts/pythondistdeps.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
|
||||
index 76017f3..e4b99e2 100755
|
||||
--- a/scripts/pythondistdeps.py
|
||||
+++ b/scripts/pythondistdeps.py
|
||||
@@ -15,6 +15,7 @@ from getopt import getopt
|
||||
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
|
||||
|
||||
|
||||
opts, args = getopt(
|
||||
@@ -108,7 +109,7 @@ for f in files:
|
||||
dist = Distribution.from_location(path_item, dist_name, metadata)
|
||||
# Check if py_version is defined in the file
|
||||
if not dist.py_version:
|
||||
- warnings.warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
|
||||
+ warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
|
||||
continue
|
||||
if (Provides_PyMajorVer_Variant or legacy_Provides or legacy) and Provides:
|
||||
# Get the Python major version
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
From ff395f4a820497a443baa6cd0198c49b06207c3f Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Orsava <torsava@redhat.com>
|
||||
Date: Thu, 16 Feb 2017 11:36:29 +0100
|
||||
Subject: [PATCH] Fix pythondistdeps.py --provides for Python wheels
|
||||
|
||||
As Python wheels do not contain targetted Python version in the directory/file
|
||||
name of their metadata like Python eggs do, and since the Python version is not
|
||||
contained in the metadata either, it is necessary to get it from elsewhere.
|
||||
|
||||
Here it is parsed from the path the metadata resides at
|
||||
(e.g. /usr/lib/pythonX.Y/site-packages/...)
|
||||
---
|
||||
scripts/pythondistdeps.py | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
|
||||
index e4b99e2..d44210c 100644
|
||||
--- a/scripts/pythondistdeps.py
|
||||
+++ b/scripts/pythondistdeps.py
|
||||
@@ -107,10 +107,17 @@ for f in files:
|
||||
path_item = f
|
||||
metadata = FileMetadata(f)
|
||||
dist = Distribution.from_location(path_item, dist_name, metadata)
|
||||
- # Check if py_version is defined in the file
|
||||
+ # Check if py_version is defined in the metadata file/directory name
|
||||
if not dist.py_version:
|
||||
- warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
|
||||
- continue
|
||||
+ # 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')
|
||||
+ else:
|
||||
+ warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
|
||||
+ continue
|
||||
if (Provides_PyMajorVer_Variant or legacy_Provides or legacy) and Provides:
|
||||
# Get the Python major version
|
||||
pyver_major = dist.py_version.split('.')[0]
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From 2f51022e1586a9b3ac8036b23995074b00910475 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <ignatenko@redhat.com>
|
||||
Date: Mon, 22 Aug 2016 12:55:50 +0200
|
||||
Subject: [PATCH 2/3] pythondistdeps.py: show warning if version is not found
|
||||
in metadata
|
||||
|
||||
In 49197c930bb6090d0fca4089ea75ec9d10e62f99 we introduced skipping
|
||||
metadata which has no version, but it's better to show some warning.
|
||||
|
||||
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
|
||||
---
|
||||
scripts/pythondistdeps.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
|
||||
index 54905c3..d7226e0 100755
|
||||
--- a/scripts/pythondistdeps.py
|
||||
+++ b/scripts/pythondistdeps.py
|
||||
@@ -110,6 +110,7 @@ for f in files:
|
||||
dist = Distribution.from_location(path_item, dist_name, metadata)
|
||||
# Check if py_version is defined in the file
|
||||
if not dist.py_version:
|
||||
+ warnings.warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
|
||||
continue
|
||||
if (Provides_PyMajorVer_Variant or legacy_Provides or legacy) and Provides:
|
||||
# Get the Python major version
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
From 83e4d44b802d39dfbd407488c0d9f629799b809c Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <ignatenko@redhat.com>
|
||||
Date: Mon, 22 Aug 2016 12:56:05 +0200
|
||||
Subject: [PATCH 3/3] pythondistdeps.py: skip .egg-link files
|
||||
|
||||
From setuptools's documentation:
|
||||
These files are not eggs, strictly speaking. They simply provide a way
|
||||
to reference an egg that is not physically installed in the desired
|
||||
location. They exist primarily as a cross-platform alternative to
|
||||
symbolic links, to support "installing" code that is being developed in
|
||||
a different location than the desired installation location.
|
||||
|
||||
If we read .egg-link using pkg_resources.Distribution it will
|
||||
never have version as it is just list of directories which should be
|
||||
taken into account.
|
||||
|
||||
We could change into that directories and add eggs from those locations
|
||||
for parsing, but RPM's dependency generator already passing all files
|
||||
from built RPM so it just does not make any sense to traverse those
|
||||
directories.
|
||||
|
||||
After all written above, let's just ignore .egg-link files.
|
||||
|
||||
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
|
||||
---
|
||||
scripts/pythondistdeps.py | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
|
||||
index d7226e0..76017f3 100755
|
||||
--- a/scripts/pythondistdeps.py
|
||||
+++ b/scripts/pythondistdeps.py
|
||||
@@ -89,14 +89,12 @@ for f in files:
|
||||
lower_dir = dirname(lower)
|
||||
if lower_dir.endswith('.egg') or \
|
||||
lower_dir.endswith('.egg-info') or \
|
||||
- lower_dir.endswith('.egg-link') or \
|
||||
lower_dir.endswith('.dist-info'):
|
||||
lower = lower_dir
|
||||
f = dirname(f)
|
||||
# Determine provide, requires, conflicts & recommends based on egg/dist metadata
|
||||
if lower.endswith('.egg') or \
|
||||
lower.endswith('.egg-info') or \
|
||||
- lower.endswith('.egg-link') or \
|
||||
lower.endswith('.dist-info'):
|
||||
# This import is very slow, so only do it if needed
|
||||
from pkg_resources import Distribution, FileMetadata, PathMetadata
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
From 49197c930bb6090d0fca4089ea75ec9d10e62f99 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?=
|
||||
=?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?=
|
||||
<ngompa13@gmail.com>
|
||||
Date: Sat, 20 Aug 2016 11:01:06 -0400
|
||||
Subject: [PATCH 1/3] pythondistdeps.py: skip distribution metadata if there is
|
||||
no version
|
||||
|
||||
For example, reading .egg-link using pkg_resources.Distribution returns
|
||||
actual metadata, but it does not contain version. It returns traceback like:
|
||||
|
||||
File "/usr/lib/rpm/pythondistdeps.py", line 113, in <module>
|
||||
pyver_major = dist.py_version.split('.')[0]
|
||||
AttributeError: 'NoneType' object has no attribute 'split'
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/rpm/pythondistdeps.py", line 113, in <module>
|
||||
pyver_major = dist.py_version.split('.')[0]
|
||||
AttributeError: 'NoneType' object has no attribute 'split'
|
||||
|
||||
Let's just skip such errors as we can't do much about that.
|
||||
|
||||
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1368673
|
||||
Reported-and-tested-by: Igor Gnatenko <ignatenko@redhat.com>
|
||||
---
|
||||
scripts/pythondistdeps.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
|
||||
index 8a2f43d..54905c3 100755
|
||||
--- a/scripts/pythondistdeps.py
|
||||
+++ b/scripts/pythondistdeps.py
|
||||
@@ -108,6 +108,9 @@ for f in files:
|
||||
path_item = f
|
||||
metadata = FileMetadata(f)
|
||||
dist = Distribution.from_location(path_item, dist_name, metadata)
|
||||
+ # Check if py_version is defined in the file
|
||||
+ if not dist.py_version:
|
||||
+ continue
|
||||
if (Provides_PyMajorVer_Variant or legacy_Provides or legacy) and Provides:
|
||||
# Get the Python major version
|
||||
pyver_major = dist.py_version.split('.')[0]
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
commit c707ab26362e795d3f9dba4eb87dc7ed99a28bcb
|
||||
Author: Robin Lee <cheeselee@fedoraproject.org>
|
||||
Date: Sat Apr 8 21:21:39 2017 +0800
|
||||
|
||||
Fix non-standard inherented modes of directories in debuginfo
|
||||
|
||||
In case that binary compiled from source generated in /tmp, a
|
||||
/usr/src/debug/tmp directory will be created with the same mode as
|
||||
/tmp, a.k.a 777, which should be avoided.
|
||||
|
||||
Fixes: rhbz#641022
|
||||
|
||||
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 547dbd9..6f38e19
|
||||
--- a/scripts/find-debuginfo.sh
|
||||
+++ b/scripts/find-debuginfo.sh
|
||||
@@ -396,9 +396,10 @@
|
||||
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug"
|
||||
LC_ALL=C sort -z -u "$SOURCEFILE" | grep -E -v -z '(<internal>|<built-in>)$' |
|
||||
(cd "$RPM_BUILD_DIR"; cpio -pd0mL "${RPM_BUILD_ROOT}/usr/src/debug")
|
||||
- # stupid cpio creates new directories in mode 0700, fixup
|
||||
+ # stupid cpio creates new directories in mode 0700,
|
||||
+ # and non-standard modes may be inherented from original directories, fixup
|
||||
find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 |
|
||||
- xargs --no-run-if-empty -0 chmod a+rx
|
||||
+ xargs --no-run-if-empty -0 chmod 0755
|
||||
fi
|
||||
|
||||
if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then
|
||||
|
||||
commit e795899780337dea751d85db8f381eff3fe75275
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Fri Apr 21 17:33:26 2017 +0200
|
||||
|
||||
debugedit: Only output comp_dir under build dir (once).
|
||||
|
||||
The fix for rhbz#444310 (commit c1a5eb - Include empty CU current dirs)
|
||||
was a little greedy. It would also include comp_dirs outside the build
|
||||
root. Those are unnecessary and we don't have a good way to store them.
|
||||
Such dirs (e.g. /tmp) would then show up at the root of /usr/src/debug.
|
||||
|
||||
Fix this by including only comp_dirs under base_dir. Also only output
|
||||
all dirs once (during phase zero) and don't output empty dirs (which
|
||||
was harmless but would produce a warning from cpio).
|
||||
|
||||
This still includes all empty dirs from the original rhbz#444310
|
||||
nodir testcase and it is an alternative fix for rhbz#641022
|
||||
(commit c707ab).
|
||||
|
||||
Both fixes are necessary in case of an unexpected mode for a directory
|
||||
actually in the build root that we want to include in the source list.
|
||||
|
||||
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
||||
|
||||
diff --git a/tools/debugedit.c b/tools/debugedit.c
|
||||
index 8444e03..bf11513 100644
|
||||
--- a/tools/debugedit.c
|
||||
+++ b/tools/debugedit.c
|
||||
@@ -926,27 +926,29 @@
|
||||
/* Ensure the CU current directory will exist even if only empty. Source
|
||||
filenames possibly located in its parent directories refer relatively to
|
||||
it and the debugger (GDB) cannot safely optimize out the missing
|
||||
- CU current dir subdirectories. */
|
||||
- if (comp_dir && list_file_fd != -1)
|
||||
+ CU current dir subdirectories. Only do this once in phase one. And
|
||||
+ only do this for dirs under our build/base_dir. Don't output the
|
||||
+ empty string (in case the comp_dir == base_dir). */
|
||||
+ if (phase == 0 && base_dir && comp_dir && list_file_fd != -1)
|
||||
{
|
||||
char *p;
|
||||
size_t size;
|
||||
|
||||
- if (base_dir && has_prefix (comp_dir, base_dir))
|
||||
- p = comp_dir + strlen (base_dir);
|
||||
- else if (dest_dir && has_prefix (comp_dir, dest_dir))
|
||||
- p = comp_dir + strlen (dest_dir);
|
||||
- else
|
||||
- p = comp_dir;
|
||||
-
|
||||
- size = strlen (p) + 1;
|
||||
- while (size > 0)
|
||||
+ if (has_prefix (comp_dir, base_dir))
|
||||
{
|
||||
- ssize_t ret = write (list_file_fd, p, size);
|
||||
- if (ret == -1)
|
||||
- break;
|
||||
- size -= ret;
|
||||
- p += ret;
|
||||
+ char *p = comp_dir + strlen (base_dir);
|
||||
+ if (p[0] != '\0')
|
||||
+ {
|
||||
+ size_t size = strlen (p) + 1;
|
||||
+ while (size > 0)
|
||||
+ {
|
||||
+ ssize_t ret = write (list_file_fd, p, size);
|
||||
+ if (ret == -1)
|
||||
+ break;
|
||||
+ size -= ret;
|
||||
+ p += ret;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
|
@ -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 %{_bindir}/gpg2
|
||||
%__grep @__GREP@
|
||||
%__gzip @__GZIP@
|
||||
%__id @__ID@
|
|
@ -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}\"\
|
||||
RPM_PACKAGE_NAME=\"%{name}\"\
|
|
@ -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
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (rpm-4.16.0-beta3.tar.bz2) = 20efa638a7fe85b1b4d3d42fb07172c20a1f3c62024a29e4184b67a2d52ff3f94a186f178e9a5bfee9bf6c826a1023995d970b5c0ddaffe8b61fd2c888b44032
|
||||
SHA512 (rpm-4.13.0.2.tar.bz2) = 9b15acb2684bc963f7164763568615b2484478eaec0cea8b3bd4ddb94b862a70b2f4b4ab432d896e5885c9a191c4d7d2ede573a5feabc8ec290108956a8a4917
|
||||
|
|
Loading…
Reference in New Issue