From e56b042e3aa3c1ff937bc994ab6bb2019260bfb6 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sun, 27 Dec 2020 17:56:43 +0100 Subject: [PATCH] - 4.16.1.2 and fixes from PLD --- TLD-Linux.asc | 18 ------------ missing-doc-terminate-build.patch | 21 ++++++++++++++ missing-ghost-terminate-build.patch | 19 ++++++++++++ noexpand.patch | 45 +++++++++++++++++++++++++++++ rpm-noarch_py_prov.patch | 8 +++++ rpm.spec | 19 ++++++++---- x32.patch | 11 +++++-- 7 files changed, 115 insertions(+), 26 deletions(-) delete mode 100644 TLD-Linux.asc create mode 100644 missing-doc-terminate-build.patch create mode 100644 missing-ghost-terminate-build.patch create mode 100644 noexpand.patch create mode 100644 rpm-noarch_py_prov.patch diff --git a/TLD-Linux.asc b/TLD-Linux.asc deleted file mode 100644 index fd3298e..0000000 --- a/TLD-Linux.asc +++ /dev/null @@ -1,18 +0,0 @@ ------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----- diff --git a/missing-doc-terminate-build.patch b/missing-doc-terminate-build.patch new file mode 100644 index 0000000..6cc7732 --- /dev/null +++ b/missing-doc-terminate-build.patch @@ -0,0 +1,21 @@ +--- 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; + } + } + diff --git a/missing-ghost-terminate-build.patch b/missing-ghost-terminate-build.patch new file mode 100644 index 0000000..9e7ef7a --- /dev/null +++ b/missing-ghost-terminate-build.patch @@ -0,0 +1,19 @@ +--- 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; diff --git a/noexpand.patch b/noexpand.patch new file mode 100644 index 0000000..e75a513 --- /dev/null +++ b/noexpand.patch @@ -0,0 +1,45 @@ +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) + diff --git a/rpm-noarch_py_prov.patch b/rpm-noarch_py_prov.patch new file mode 100644 index 0000000..7c42050 --- /dev/null +++ b/rpm-noarch_py_prov.patch @@ -0,0 +1,8 @@ +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)$ diff --git a/rpm.spec b/rpm.spec index 02dfc75..97ab2c8 100644 --- a/rpm.spec +++ b/rpm.spec @@ -11,7 +11,7 @@ %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 @@ -25,14 +25,15 @@ Summary(pt_BR.UTF-8): Gerenciador de pacotes RPM 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 @@ -78,6 +79,10 @@ Patch25: rpmio-read-proc-files.patch 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 @@ -573,6 +578,10 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze %patch26 -p1 %patch27 -p1 %patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 %patch100 -p1 install %{SOURCE15} scripts/perl.prov.in diff --git a/x32.patch b/x32.patch index 1da7bd5..43b2f2b 100644 --- a/x32.patch +++ b/x32.patch @@ -83,7 +83,7 @@ diff -ur rpm-4.15.1.orig/installplatform rpm-4.15.1/installplatform + ISANAME=x86 + ISABITS=x32 + CANONARCH=x32 -+ CANONCOLOR=4 ++ CANONCOLOR=7 + FORCE_RPMRC_GNU="${RPMRC_GNU}x32" + TARGETCPU="x86_64" ;; @@ -173,11 +173,16 @@ diff -ur rpm-4.15.1.orig/rpmrc.in rpm-4.15.1/rpmrc.in 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 -- 2.44.0