diff --git a/0001-Fix-ancient-python-GIL-locking-bug-on-callback-RhBug.patch b/0001-Fix-ancient-python-GIL-locking-bug-on-callback-RhBug.patch new file mode 100644 index 0000000000000000000000000000000000000000..bd6ae5eab06c0f7560d37ac208577ddfcc01f65b --- /dev/null +++ b/0001-Fix-ancient-python-GIL-locking-bug-on-callback-RhBug.patch @@ -0,0 +1,39 @@ +From 3570c9beb5398541ea7423639891ef6a9de27087 Mon Sep 17 00:00:00 2001 +From: Panu Matilainen +Date: Wed, 3 Oct 2018 11:51:38 +0300 +Subject: [PATCH 1/4] Fix ancient python GIL locking bug on callback + (RhBug:1632488) + +Introduced in commit c7881d801745b4c156a8aa2afc17b95f97481e34 back in 2002, +synthesizing a python object for the callback occurs before retaking +the GIL lock, which is not allowed. Somehow this has managed to stay +latent all these years, and even now requires fairly specific conditions: +when the callback gets called without an associated key, such as erasures +or file trigger script start/stop events (in the case of RhBug:1632488), +when Python 3 is running in PYTHONMALLOC=debug mode, +it crashes with "Python memory allocator called without holding the GIL". + +Simply retake the lock before any Python operations take place to fix. + +(cherry picked from commit 531dc8495cd3aabd3f659ecab604106fdbacbe98) + +diff -urNp a/python/rpmts-py.c b/python/rpmts-py.c +--- a/python/rpmts-py.c 2019-04-22 21:07:26.880000000 +0800 ++++ b/python/rpmts-py.c 2019-04-22 21:18:05.020000000 +0800 +@@ -494,6 +494,8 @@ rpmtsCallback(const void * hd, const rpm + static FD_t fd; + + if (cbInfo->cb == Py_None) return NULL; ++ ++ PyEval_RestoreThread(cbInfo->_save); + + /* Synthesize a python object for callback (if necessary). */ + if (pkgObj == NULL) { +@@ -506,7 +508,6 @@ rpmtsCallback(const void * hd, const rpm + } else + Py_INCREF(pkgObj); + +- PyEval_RestoreThread(cbInfo->_save); + + args = Py_BuildValue("(iLLOO)", what, amount, total, pkgObj, cbInfo->data); + result = PyEval_CallObject(cbInfo->cb, args); diff --git a/0001-Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch b/0001-Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch deleted file mode 100644 index e7fe49257863577dafc84c2d3c3334e14ae9ccaa..0000000000000000000000000000000000000000 --- a/0001-Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch +++ /dev/null @@ -1,38 +0,0 @@ -From eee654b9652fb9387018f9653431a11401a354fd Mon Sep 17 00:00:00 2001 -From: openeuler-basic -Date: Thu, 9 Jan 2020 19:16:58 +0800 -Subject: [PATCH] Unbundle config site and add RPM LD FLAGS macro - ---- - macros.in | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/macros.in b/macros.in -index fe9803a..4027493 100644 ---- a/macros.in -+++ b/macros.in -@@ -794,10 +794,11 @@ package or when debugging this package.\ - RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\ - RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\ - RPM_OPT_FLAGS=\"%{optflags}\"\ -+ RPM_LD_FLAGS=\"%{?build_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_ARCH RPM_OS RPM_BUILD_NCPUS RPM_OPT_FLAGS\ - RPM_DOC_DIR=\"%{_docdir}\"\ - export RPM_DOC_DIR\ - RPM_PACKAGE_NAME=\"%{NAME}\"\ -@@ -813,6 +814,8 @@ package or when debugging this package.\ - export CLASSPATH}\ - PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\ - export PKG_CONFIG_PATH\ -+ CONFIG_SITE=${CONFIG_SITE:-NONE}\ -+ export CONFIG_SITE\ - \ - %{verbose:set -x}\ - umask 022\ --- -1.8.3.1 - diff --git a/0002-Resurrect-long-since-broken-Lua-library-path.patch b/0002-Resurrect-long-since-broken-Lua-library-path.patch new file mode 100644 index 0000000000000000000000000000000000000000..e30d07aa984fdb13467238ca108bd3a1d1885a37 --- /dev/null +++ b/0002-Resurrect-long-since-broken-Lua-library-path.patch @@ -0,0 +1,114 @@ +From ddc1d06c45994b40aea3dfefc60436e409fce08c Mon Sep 17 00:00:00 2001 +From: Panu Matilainen +Date: Tue, 16 Oct 2018 11:26:46 +0300 +Subject: [PATCH 2/4] Resurrect long since broken Lua library path + +LUA_PATH global variable is not consulted when loading libraries in +Lua >= 5.1, package.path has replaced it. Rpm's Lua library path +was always supposed to be /usr/lib/rpm/lua/ but this has been broken +for the last ten years or so, oops. Make the directory a first-class +citizen: create it on install, add a macro for it, make it actually +work and ensure it stays that way by adding a test for it. + +(cherry picked from commit dd6c65044c41922193f520ace668e2c5e55f1004) +--- + Makefile.am | 2 ++ + macros.in | 2 ++ + rpmio/rpmlua.c | 13 ++++++------- + tests/rpmmacro.at | 17 ++++++++++++++++- + 4 files changed, 26 insertions(+), 8 deletions(-) + +diff -urNp a/macros.in b/macros.in +--- a/macros.in 2019-04-23 12:06:08.066000000 -0400 ++++ b/macros.in 2019-04-23 12:11:29.225000000 -0400 +@@ -149,6 +149,8 @@ + %_rpmconfigdir %{getconfdir} + # The directory where rpm's macro files live + %_rpmmacrodir %{_rpmconfigdir}/macros.d ++# The directory where rpm's addon lua libraries live ++%_rpmluadir %{_rpmconfigdir}/lua + + # The directory where sources/patches will be unpacked and built. + %_builddir %{_topdir}/BUILD +diff -urNp a/Makefile.am b/Makefile.am +--- a/Makefile.am 2019-04-23 12:05:54.541000000 -0400 ++++ b/Makefile.am 2019-04-23 12:10:32.959000000 -0400 +@@ -253,6 +253,7 @@ install-data-local: + $(RPMCANONVENDOR) $(RPMCANONOS) $(RPMCANONGNU) + @$(MKDIR_P) $(DESTDIR)$(localstatedir)/tmp + @$(MKDIR_P) $(DESTDIR)$(rpmconfigdir)/macros.d ++ @$(MKDIR_P) $(DESTDIR)$(rpmconfigdir)/lua + + # XXX to appease distcheck we need to remove "stuff" here... + uninstall-local: +@@ -261,6 +262,7 @@ uninstall-local: + @rm -rf $(DESTDIR)$(rpmconfigdir)/platform/ + @rm -f $(DESTDIR)$(rpmconfigdir)/macros + @rm -rf $(DESTDIR)$(rpmconfigdir)/macros.d ++ @rm -rf $(DESTDIR)$(rpmconfigdir)/lua + + MAINTAINERCLEANFILES = ChangeLog + +diff -urNp a/rpmio/rpmlua.c b/rpmio/rpmlua.c +--- a/rpmio/rpmlua.c 2019-04-23 12:06:27.928000000 -0400 ++++ b/rpmio/rpmlua.c 2019-04-23 12:18:35.940000000 -0400 +@@ -100,13 +100,6 @@ rpmlua rpmluaNew() + #ifndef LUA_GLOBALSINDEX + lua_pushglobaltable(L); + #endif +- lua_pushliteral(L, "LUA_PATH"); +- lua_pushfstring(L, "%s/%s", rpmConfigDir(), "/lua/?.lua"); +-#ifdef LUA_GLOBALSINDEX +- lua_rawset(L, LUA_GLOBALSINDEX); +-#else +- lua_settable(L, -3); +-#endif + lua_pushliteral(L, "print"); + lua_pushcfunction(L, rpm_print); + #ifdef LUA_GLOBALSINDEX +@@ -117,6 +110,12 @@ rpmlua rpmluaNew() + #ifndef LUA_GLOBALSINDEX + lua_pop(L, 1); + #endif ++ ++ lua_getglobal(L, "package"); ++ lua_pushfstring(L, "%s/%s", rpmConfigDir(), "/lua/?.lua"); ++ lua_setfield(L, -2, "path"); ++ lua_pop(L, 1); ++ + rpmluaSetData(lua, "lua", lua); + if (stat(initlua, &st) != -1) + (void)rpmluaRunScriptFile(lua, initlua); +diff -urNp a/tests/rpmmacro.at b/tests/rpmmacro.at +--- a/tests/rpmmacro.at 2019-04-23 12:06:50.426000000 -0400 ++++ b/tests/rpmmacro.at 2019-04-23 12:39:31.867000000 -0400 +@@ -297,6 +297,22 @@ runroot rpm \ + ) + AT_CLEANUP + ++AT_SETUP([lua library path]) ++AT_KEYWORDS([macros lua]) ++AT_CHECK([ ++AT_SKIP_IF([$LUA_DISABLED]) ++f=$(rpm --eval "%{_rpmconfigdir}/lua/foo.lua") ++echo "bar = 'graak'" > ${f} ++runroot rpm \ ++ --eval '%{lua:require "foo"; print(bar)}' ++rm -f ${f} ++], ++[0], ++[graak ++]) ++AT_CLEANUP ++ ++ + AT_SETUP([%define + %undefine in nested levels 1]) + AT_KEYWORDS([macros define undefine]) + AT_CHECK([ +@@ -432,4 +448,4 @@ runroot rpm --macros "/data/macros.testf + + macro_2 + ]) +-AT_CLEANUP +\ No newline at end of file ++AT_CLEANUP diff --git a/0003-Fix-nasty-setperms-setugids-regression-in-4.14.2-RhB.patch b/0003-Fix-nasty-setperms-setugids-regression-in-4.14.2-RhB.patch new file mode 100644 index 0000000000000000000000000000000000000000..74e9d287e39c22773b6188e60fff4596ea5761bf --- /dev/null +++ b/0003-Fix-nasty-setperms-setugids-regression-in-4.14.2-RhB.patch @@ -0,0 +1,49 @@ +From a7f3748d006d1b1057a791f2a7c790d3ec09cc09 Mon Sep 17 00:00:00 2001 +From: Panu Matilainen +Date: Mon, 22 Oct 2018 10:52:39 +0300 +Subject: [PATCH 3/4] Fix nasty --setperms/--setugids regression in 4.14.2 + (RhBug: 1640470) + +Commit 38c2f6e160d5ed3e9c3a266139c7eb2632724c15 causes --setperms and +--setugids follow symlinks instead of skipping them. + +In case of --setperms, all encountered symlinks will have their +target file/directory permissions set to the 0777 of the link itself +(so world writable etc but suid/sgid stripped), temporarily or permanently, +depending on whether the symlink occurs before or after it's target in the +package file list. When the link occurs before its target, there's a short +window where the target is world writable before having it's permissions +reset to original, making it particularly bad for suid/sgid binaries. + +--setugids is similarly affected with link targets owner/group changing +to that of the symlink. + +Add missing parentheses to the conditions introduced in commit +38c2f6e160d5ed3e9c3a266139c7eb2632724c15 to fix. +Reported by Karel Srot, patch by Pavlina Moravcova Varekova. + +(cherry picked from commit 0d83637769b8a122b1e80f2e960ea1bbae8b4f10) +--- + rpmpopt.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff -urNp a/rpmpopt.in b/rpmpopt.in +--- a/rpmpopt.in 2019-04-23 13:00:05.090000000 -0400 ++++ b/rpmpopt.in 2019-04-23 13:05:33.326000000 -0400 +@@ -44,14 +44,14 @@ rpm alias --scripts --qf '\ + --POPTdesc=$"list install/erase scriptlets from package(s)" + + rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || \ +- \[ $((%{FILEFLAGS} & 2#1001000)) != 0 \] && \[ ! -e %{FILENAMES:shescape} \] || \ ++ ( \[ $((%{FILEFLAGS} & 2#1001000)) != 0 \] && \[ ! -e %{FILENAMES:shescape} \] ) || \ + chmod %7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \ + --pipe "grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | sh" \ + --POPTdesc=$"set permissions of files in a package" + + rpm alias --setugids -q --qf \ + '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape} %{FILEFLAGS}\n]' \ +- --pipe "(echo 'ch() { \[ $(($4 & 2#1001000)) != 0 \] && \[ ! -e \"$3\" \] || \ ++ --pipe "(echo 'ch() { ( \[ $(($4 & 2#1001000)) != 0 \] && \[ ! -e \"$3\" \] ) || \ + (chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\";) }'; \ + grep '^ch '|grep -v \(none\))|sh" \ + --POPTdesc=$"set user/group ownership of files in a package" diff --git a/0001-bugfix-rpm-4.14.2-fix-tty-failed.patch b/bugfix-rpm-4.14.2-fix-tty-failed.patch similarity index 51% rename from 0001-bugfix-rpm-4.14.2-fix-tty-failed.patch rename to bugfix-rpm-4.14.2-fix-tty-failed.patch index 8803f94a1b7eec2559a875568453837bccdd6c60..c2934be24ee68e950d8e139bcaa777aae2df3a2b 100644 --- a/0001-bugfix-rpm-4.14.2-fix-tty-failed.patch +++ b/bugfix-rpm-4.14.2-fix-tty-failed.patch @@ -1,25 +1,26 @@ -From 733a0997ba5608f6b37d0b6d47c7bbd6f9d62381 Mon Sep 17 00:00:00 2001 -From: openeuler-basic -Date: Fri, 10 Jan 2020 10:29:16 +0800 -Subject: [PATCH] bugfix rpm 4.14.2 fix tty failed +From ee69dbae3660da4b1d0649eeeed1a8321d17a685 Mon Sep 17 00:00:00 2001 +From: wangqing +Date: Wed, 12 Dec 2018 19:00:41 +0800 +Subject: [PATCH 2/2] backport-bugfix-rpm-4.14.2-fix-tty-failed --- rpmpopt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmpopt.in b/rpmpopt.in -index 8e4ef02..9585422 100644 +index 3e44937..d9d7848 100644 --- a/rpmpopt.in +++ b/rpmpopt.in -@@ -219,7 +219,7 @@ rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!# +@@ -216,7 +216,7 @@ rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!# --POPTargs=$"" # Minimally preserve rpmbuild's --sign functionality rpmbuild alias --sign \ - --pipe 'rpm --addsign `grep ".*: .*\.rpm$"|cut -d: -f2` < "/dev/"`ps -p $$ -o tty | tail -n 1`' \ -+ --pipe "grep '.*: .*\.rpm$'|cut -d: -f2|xargs -r rpm --addsign" \ ++ --pipe "grep '.*: .*\.rpm$'|cut -d: -f2|xargs -r rpm --addsign" \ --POPTdesc=$"generate GPG signature (deprecated, use command rpmsign instead)" - rpmbuild alias --trace --eval '%trace' \ - --POPTdesc=$"trace macro expansion" + # [--trace] "trace macro expansion" + rpmbuild alias --trace --eval '%trace' -- 1.8.3.1 + diff --git a/rpm-4.11.x-siteconfig.patch b/rpm-4.11.x-siteconfig.patch new file mode 100644 index 0000000000000000000000000000000000000000..f32f85912d5a7ec44cbce7385e82bee648f864de --- /dev/null +++ b/rpm-4.11.x-siteconfig.patch @@ -0,0 +1,12 @@ +diff -up rpm-4.11.1-rc1/macros.in.siteconfig rpm-4.11.1-rc1/macros.in +--- rpm-4.11.1-rc1/macros.in.siteconfig 2013-06-07 13:19:21.000000000 +0300 ++++ rpm-4.11.1-rc1/macros.in 2013-06-11 15:06:59.525747503 +0300 +@@ -647,6 +647,8 @@ package or when debugging this package.\ + export CLASSPATH}\ + PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\ + export PKG_CONFIG_PATH\ ++ CONFIG_SITE=${CONFIG_SITE:-NONE}\ ++ export CONFIG_SITE\ + \ + %{verbose:set -x}%{!verbose:exec > /dev/null}\ + umask 022\ diff --git a/rpm-4.13.0-fedora-specspo.patch b/rpm-4.13.0-fedora-specspo.patch new file mode 100644 index 0000000000000000000000000000000000000000..64416c79f895a84b82862052f7e28f60e310fe36 --- /dev/null +++ b/rpm-4.13.0-fedora-specspo.patch @@ -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; + } + diff --git a/rpm-4.13.90-ldflags.patch b/rpm-4.13.90-ldflags.patch new file mode 100644 index 0000000000000000000000000000000000000000..ad6543017728489026996e17e888d370528af0f8 --- /dev/null +++ b/rpm-4.13.90-ldflags.patch @@ -0,0 +1,15 @@ +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=\"%{?__global_ldflags}\"\ + RPM_ARCH=\"%{_arch}\"\ + RPM_OS=\"%{_os}\"\ +- 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}\"\ diff --git a/rpm-4.15.1.tar.bz2 b/rpm-4.14.2.tar.bz2 similarity index 36% rename from rpm-4.15.1.tar.bz2 rename to rpm-4.14.2.tar.bz2 index 3e4c5f9d5bb95558eb11a128cfdf5b810c368a4b..b278ddee59d1c052e97e685c0182b15b2c9617ba 100644 Binary files a/rpm-4.15.1.tar.bz2 and b/rpm-4.14.2.tar.bz2 differ diff --git a/rpm-4.7.1-geode-i686.patch b/rpm-4.7.1-geode-i686.patch new file mode 100644 index 0000000000000000000000000000000000000000..2e8692a61e600d31181230dda2acc1aba3f51db6 --- /dev/null +++ b/rpm-4.7.1-geode-i686.patch @@ -0,0 +1,14 @@ +diff --git a/rpmrc.in b/rpmrc.in +index 4a6cca9..d62ddaf 100644 +--- a/rpmrc.in ++++ b/rpmrc.in +@@ -281,7 +281,7 @@ arch_compat: alphaev5: alpha + arch_compat: alpha: axp noarch + + arch_compat: athlon: i686 +-arch_compat: geode: i586 ++arch_compat: geode: i686 + arch_compat: pentium4: pentium3 + arch_compat: pentium3: i686 + arch_compat: i686: i586 + diff --git a/rpm-4.8.1-use-gpg2.patch b/rpm-4.8.1-use-gpg2.patch new file mode 100644 index 0000000000000000000000000000000000000000..61ef55e25df9b278f4c2a6dcd6bbd18b7265b726 --- /dev/null +++ b/rpm-4.8.1-use-gpg2.patch @@ -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@ diff --git a/rpm-4.9.90-no-man-dirs.patch b/rpm-4.9.90-no-man-dirs.patch new file mode 100644 index 0000000000000000000000000000000000000000..04f276a9c04c6a179d3d9532f31117a9ba33f68d --- /dev/null +++ b/rpm-4.9.90-no-man-dirs.patch @@ -0,0 +1,12 @@ +diff -up rpm-4.9.90.git11486/scripts/find-lang.sh.no-man-dirs rpm-4.9.90.git11486/scripts/find-lang.sh +--- rpm-4.9.90.git11486/scripts/find-lang.sh.no-man-dirs 2012-03-07 11:31:10.000000000 +0200 ++++ rpm-4.9.90.git11486/scripts/find-lang.sh 2012-03-07 15:11:57.465801075 +0200 +@@ -181,7 +181,7 @@ s:%lang(C) :: + find "$TOP_DIR" -type d|sed ' + s:'"$TOP_DIR"':: + '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\):: +-'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: ++'"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1/*: + s:^\([^%].*\):: + s:%lang(C) :: + /^$/d' >> $MO_NAME diff --git a/rpm.spec b/rpm.spec index 4e9defa2d0f7e91b3d0491f41cf3dfe8171e1164..ea041ffcec4b4550de8d6d9366c697d9fa0a4b96 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,25 +1,34 @@ Name: rpm -Version: 4.15.1 -Release: 5 +Version: 4.14.2 +Release: 6 Summary: RPM Package Manager License: GPLv2+ URL: http://www.rpm.org/ -Source0: http://ftp.rpm.org/releases/rpm-4.15.x/%{name}-%{version}.tar.bz2 +Source0: http://ftp.rpm.org/releases/rpm-4.14.x/%{name}-%{version}.tar.bz2 -Patch1: 0001-Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch -Patch2: rpm-4.12.0-rpm2cpio-hack.patch -Patch3: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch +Patch1: rpm-4.11.x-siteconfig.patch +Patch2: rpm-4.13.0-fedora-specspo.patch +Patch3: rpm-4.9.90-no-man-dirs.patch +Patch4: rpm-4.8.1-use-gpg2.patch +Patch5: rpm-4.12.0-rpm2cpio-hack.patch +Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch +Patch906: rpm-4.7.1-geode-i686.patch +Patch907: rpm-4.13.90-ldflags.patch -Patch9000: bugfix-rpm-4.11.3-add-aarch64_ilp32-arch.patch -Patch9001: 0001-bugfix-rpm-4.14.2-fix-tty-failed.patch -Patch9002: bugfix-rpm-4.14.2-wait-once-get-rpmlock-fail.patch +Patch6000: bugfix-rpm-4.11.3-add-aarch64_ilp32-arch.patch +Patch6001: bugfix-rpm-4.14.2-fix-tty-failed.patch +Patch6002: 0001-Fix-ancient-python-GIL-locking-bug-on-callback-RhBug.patch +Patch6003: 0002-Resurrect-long-since-broken-Lua-library-path.patch +Patch6004: 0003-Fix-nasty-setperms-setugids-regression-in-4.14.2-RhB.patch + +Patch9000: bugfix-rpm-4.14.2-wait-once-get-rpmlock-fail.patch BuildRequires: gcc autoconf automake libtool make gawk popt-devel openssl-devel readline-devel libdb-devel -BuildRequires: system-rpm-config rpm system-rpm-config ima-evm-utils +BuildRequires: system-rpm-config librpm8 rpm BuildRequires: zlib-devel libzstd-devel xz-devel bzip2-devel libarchive-devel ima-evm-utils-devel -BuildRequires: dbus-devel fakechroot elfutils-devel elfutils-libelf-devel librpm8 +BuildRequires: dbus-devel fakechroot elfutils-devel elfutils-libelf-devel BuildRequires: lua-devel libcap-devel libacl-devel libselinux-devel file-devel gettext-devel ncurses-devel -Requires: coreutils popt curl zstd libcap gnupg2 crontabs logrotate libdb-utils librpm9 +Requires: coreutils popt curl zstd libcap gnupg2 crontabs logrotate libdb-utils librpm8 Obsoletes: %{name}-libs %{name}-build-libs %{name}-sign-libs %{name}-sign %{name}-cron Provides: %{name}-libs %{name}-build-libs %{name}-sign-libs %{name}-sign %{name}-cron Obsoletes: %{name}-plugin-selinux %{name}-plugin-syslog %{name}-plugin-systemd-inhibit %{name}-plugin-ima %{name}-plugin-prioreset @@ -170,15 +179,13 @@ do touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi done -#./rpmdb --dbpath=$RPM_BUILD_ROOT/var/lib/rpm --initdb +cp -a %{_libdir}/librpm*.so.* %{buildroot}%{_libdir} for dbutil in dump load recover stat upgrade verify do ln -s ../../bin/db_${dbutil} $RPM_BUILD_ROOT/usr/lib/rpm/rpmdb_${dbutil} done -cp -a %{_libdir}/librpm*.so.8* %{buildroot}%{_libdir} - %find_lang %{name} find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f @@ -187,10 +194,10 @@ rm -f $RPM_BUILD_ROOT/%{_rpmconfigdir}/{perldeps.pl,perl.*,pythond*} rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/{perl*,python*} rm -f $RPM_BUILD_ROOT/%{_rpmconfigdir}/{tcl.req,osgideps.pl} -#chmod a-x $RPM_BUILD_ROOT/%{_rpmconfigdir}/python-macro-helper +chmod a-x $RPM_BUILD_ROOT/%{_rpmconfigdir}/python-macro-helper %check -make check || (cat tests/rpmtests.log; exit 0) +make check || cat tests/rpmtests.log %post -p /sbin/ldconfig @@ -224,6 +231,7 @@ make check || (cat tests/rpmtests.log; exit 0) %{_rpmconfigdir}/rpm.supp %{_rpmconfigdir}/rpm2cpio.sh %{_rpmconfigdir}/tgpg +%{_rpmconfigdir}/python-macro-helper %{_rpmconfigdir}/platform %{_libdir}/rpm-plugins/ %dir %{_rpmconfigdir}/fileattrs @@ -261,6 +269,7 @@ make check || (cat tests/rpmtests.log; exit 0) %{_rpmconfigdir}/*.req %{_rpmconfigdir}/config.* %{_rpmconfigdir}/mkinstalldirs +%{_rpmconfigdir}/macros.p* %{_rpmconfigdir}/fileattrs/* %files -n python2-%{name} @@ -288,35 +297,11 @@ make check || (cat tests/rpmtests.log; exit 0) %{_mandir}/man1/gendiff.1* %changelog -* Tue Jan 14 2020 openEuler Buildteam - 4.15.1-5 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:change requires to build requires - -* Tue Jan 14 2020 openEuler Buildteam - 4.15.1-4 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:add build requires of ima-evm-utils and old shared library - -* Mon Jan 13 2020 openEuler Buildteam - 4.15.1-3 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:add requires of shared library - -* Mon Jan 13 2020 openEuler Buildteam - 4.15.1-2 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:add subpack of librpm8 and librpm9 to support update - -* Fri Jan 10 2020 openEuler Buildteam - 4.15.1-1 +* Wed Jan 15 2020 openEuler Buildteam - 4.14.2-6 - Type:bugfix - ID:NA - SUG:NA -- DESC:update version to 4.15.1 +- DESC:revert versiont to 4.14.2 * Tue Dec 24 2019 openEuler Buildteam - 4.14.2-5 - Type:bugfix