+++ /dev/null
------BEGIN PGP PUBLIC KEY BLOCK-----
-
-mQENBF/OvmYBCADRVCaEupDXAInsCG5h09GynNepvVDzSCsy01u3SxTTNM5T6rd9
-mfQl7fpqf/QtBOKx5AW+bZ6yCUMeQUownFIDITxZoGUagckWlLTHSc4TtIz+l/Ge
-Q3ukHNc4ERCE85n3iUdBgmvedSCRGMc43iVUNUl4pEncj/bAUK+M6RoWCEXdilUi
-l8xSvkwdyopIdY1r5Ly0ckDNm3jdOyMYuerc6JHBHWiR+V9V5tshp2XDROGxTH4R
-Ld2rOe0vVhHPJsqKd6mjNEvlw/MrqR3k5aJYpJrEd1kWwjrm7wK5V44NYVsYhF3g
-EWl2nwIdl7mYPLBhCnkg9Gtjk7VuxE3SZbC9ABEBAAG0IVRMRCBMaW51eCA8Y29u
-dGFjdEB0bGQtbGludXgub3JnPokBTgQTAQgAOBYhBD/Z76KNYuEe1u7s/K7s7CJR
-0DQMBQJfzr5mAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEK7s7CJR0DQM
-TxoIAIj6fp3oCyxrj4tnkaAX/cBBvHLSKwjnebVe6Ik4OHEGnKoV4aJ+NhgVxFQ9
-cRY+Z1sPEz/h/3UkQr8hjHx4+nMf90OJ26W5M8bZOsuUuMJ63SsSgbVnxeIam++8
-53MuOx0OlaujhIsN+dg0P5QenHUaqCWU87ccG19fTahH5k9zI42kXdyXGEeOrQde
-yRUchMeF01Rc3QuepMNIRyaDNesGjS88KwAlfzsS3LH/Ip94cgk7/+PMzl3HnA1M
-5gJhQ5/a4mAvYOKqYtqeEPq0FSQAYxSDgrvKLtY+gOuEZWxIzHcrGwApPLtUdnE4
-nRHa3dq8S78/h8qajOxjTaSVGfw=
-=YCZK
------END PGP PUBLIC KEY BLOCK-----
--- /dev/null
+--- rpm-4.16.0/build/files.c.orig 2020-12-18 19:36:49.000000000 +0100
++++ rpm-4.16.0/build/files.c 2020-12-18 19:48:35.711529643 +0100
+@@ -2394,14 +2394,16 @@
+ appendStringBuf(docScript, efn);
+ appendStringBuf(docScript, " $");
+ appendStringBuf(docScript, sdenv);
+- appendLineStringBuf(docScript, " ||:");
+ free(efn);
+ }
+
+ if (install) {
++ int _missing_doc_files_terminate_build =
++ rpmExpandNumeric("%{?_missing_doc_files_terminate_build}");
+ if (doScript(spec, RPMBUILD_STRINGBUF, sdname,
+ getStringBuf(docScript), test, NULL)) {
+- fl->processingFailed = 1;
++ if (_missing_doc_files_terminate_build)
++ fl->processingFailed = 1;
+ }
+ }
+
--- /dev/null
+--- rpm-4.16.0/build/files.c~ 2020-12-18 19:15:59.000000000 +0100
++++ rpm-4.16.0/build/files.c 2020-12-18 19:34:33.456509321 +0100
+@@ -1401,7 +1401,6 @@
+ * various cases, preserving historical behavior wrt %dev():
+ * - for %dev() entries we fake it up whether the file exists or not
+ * - otherwise try to grab the data by lstat()
+- * - %ghost entries might not exist, fake it up
+ */
+ if (statp == NULL) {
+ memset(&statbuf, 0, sizeof(statbuf));
+@@ -1410,8 +1409,6 @@
+ statp = fakeStat(&(fl->cur), &statbuf);
+ } else if (lstat(diskPath, &statbuf) == 0) {
+ statp = &statbuf;
+- } else if (fl->cur.attrFlags & RPMFILE_GHOST) {
+- statp = fakeStat(&(fl->cur), &statbuf);
+ } else {
+ int lvl = RPMLOG_ERR;
+ int ignore = 0;
--- /dev/null
+diff -ur rpm-4.16.0/build/parseChangelog.c rpm-4.16.0-noexpand/build/parseChangelog.c
+--- rpm-4.16.0/build/parseChangelog.c 2020-12-18 20:09:28.341535424 +0100
++++ rpm-4.16.0-noexpand/build/parseChangelog.c 2020-12-18 20:01:53.963847399 +0100
+@@ -321,7 +321,7 @@
+ goto exit;
+ }
+
+- if ((res = parseLines(spec, STRIP_COMMENTS, &sb, NULL)) == PART_ERROR)
++ if ((res = parseLines(spec, STRIP_COMMENTS | STRIP_NOEXPAND, &sb, NULL)) == PART_ERROR)
+ goto exit;
+
+ if (sb && addChangelog(spec->packages->header, sb)) {
+diff -ur rpm-4.16.0/build/parseSpec.c rpm-4.16.0-noexpand/build/parseSpec.c
+--- rpm-4.16.0/build/parseSpec.c 2020-05-28 12:04:25.007136522 +0200
++++ rpm-4.16.0-noexpand/build/parseSpec.c 2020-12-18 20:08:13.791373996 +0100
+@@ -242,6 +242,9 @@
+ if (!spec->readStack->reading)
+ return 0;
+ }
++ /* Also don't expand macros in %changelog and %description, where we set STRIP_NOEXPAND flag */
++ if (strip & STRIP_NOEXPAND)
++ return 0;
+
+ if (specExpand(spec, ofi->lineNum, spec->lbuf, &lbuf))
+ return 1;
+@@ -476,7 +476,7 @@
+ lineType = copyNextLineFinish(spec, strip);
+ s = spec->line;
+ SKIPSPACE(s);
+- if (!lineType)
++ if (!lineType || (strip & STRIP_NOEXPAND))
+ goto after_classification;
+
+ /* check ordering of the conditional */
+diff -ur rpm-4.16.0/build/rpmbuild_internal.h rpm-4.16.0-noexpand/build/rpmbuild_internal.h
+--- rpm-4.16.0/build/rpmbuild_internal.h 2020-12-18 20:09:28.354868788 +0100
++++ rpm-4.16.0-noexpand/build/rpmbuild_internal.h 2020-12-18 20:09:09.054827168 +0100
+@@ -246,6 +246,7 @@
+ #define STRIP_NOTHING 0
+ #define STRIP_TRAILINGSPACE (1 << 0)
+ #define STRIP_COMMENTS (1 << 1)
++#define STRIP_NOEXPAND (1 << 2)
+
+ #define ALLOW_EMPTY (1 << 16)
+
--- /dev/null
+diff --color -urN rpm-4.16.0.orig/fileattrs/pythondist.attr rpm-4.16.0/fileattrs/pythondist.attr
+--- rpm-4.16.0.orig/fileattrs/pythondist.attr 2020-12-09 12:38:21.203961862 +0100
++++ rpm-4.16.0/fileattrs/pythondist.attr 2020-12-09 12:58:43.178952892 +0100
+@@ -1,3 +1,3 @@
+ %__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
+ %__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
+-%__pythondist_path /lib(64|x32)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
++%__pythondist_path /(lib(64|x32)?|share)/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
%define db_ver 5.3.28.0
%define popt_ver 1.15
-%define sover 9.1.0
+%define sover 9.1.2
%if "%{_rpmversion}" >= "4.12" && "%{_rpmversion}" < "5"
%define with_recommends_tags 1
Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
-Version: 4.16.0
-Release: 0.10
+Version: 4.16.1.2
+Release: 0.1
Epoch: 1
License: GPL v2 / LGPL v2.1
Group: Base
Source0: http://ftp.rpm.org/releases/rpm-4.16.x/%{name}-%{version}.tar.bz2
-# Source0-md5: 434e166a812e35ef181f6dd176326920
-Source1: ftp://ftp.pld-linux.org/dists/th/TLD-Linux.asc
+# Source0-md5: 0d10f63a0a4c9517cf3808a601378399
+Source1: https://ftp.tld-linux.org/TLD/TLD-Linux.asc
+# Source1-md5: 5b5caff8c570489ad5bf950734546c24
Source2: macros.local
Source3: macros.lang
Source4: %{name}.sysconfig
Patch26: allow-at-in-ver-rel.patch
Patch27: no-exeonly-for-elf-reqprov.patch
Patch28: default-patch-flags.patch
+Patch29: %{name}-noarch_py_prov.patch
+Patch30: missing-ghost-terminate-build.patch
+Patch31: missing-doc-terminate-build.patch
+Patch32: noexpand.patch
Patch100: build-id-links.patch
URL: https://rpm.org/
BuildRequires: acl-devel
%patch26 -p1
%patch27 -p1
%patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
%patch100 -p1
install %{SOURCE15} scripts/perl.prov.in
+ ISANAME=x86
+ ISABITS=x32
+ CANONARCH=x32
-+ CANONCOLOR=4
++ CANONCOLOR=7
+ FORCE_RPMRC_GNU="${RPMRC_GNU}x32"
+ TARGETCPU="x86_64"
;;
buildarchtranslate: sh3: sh3
buildarchtranslate: sh4: sh4
buildarchtranslate: sh4a: sh4
-@@ -490,6 +496,8 @@
+@@ -486,10 +492,12 @@
+
+ arch_compat: ia64: noarch
+
+-arch_compat: x86_64: amd64 em64t athlon noarch
++arch_compat: x86_64: amd64 em64t athlon x32 noarch
arch_compat: amd64: x86_64 em64t athlon noarch
arch_compat: ia32e: x86_64 em64t athlon noarch
-+arch_compat: x32: x32 noarch
++arch_compat: x32: x32 x86_64 noarch
+
arch_compat: sh3: noarch
arch_compat: sh4: noarch