From 621aa87bba7266e7fd1bcd8a85e5d25004721f61 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Jun 24 2020 08:37:24 +0000 Subject: Rebase to rpm 4.16.0 beta3 --- diff --git a/.gitignore b/.gitignore index b96ea90..5ed553f 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ /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 diff --git a/0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch b/0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch deleted file mode 100644 index 888d17b..0000000 --- a/0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ca78aff0bcf36b480e9776535ab3e74dbb5a8f50 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Panu Matilainen -Date: Wed, 3 Jun 2020 10:17:33 +0300 -Subject: [PATCH] Don't auto-enable IO flushing on non-rotational disks - -Commit 47e2463d8a98a7535e141d59d17be17d5a30862c added logic to enable -%_flush_io automatically on non-rotational disks to avoid trashing system -caches and IO peaks on the grounds that this isn't so expensive on SSD, -but real world experience suggests otherwise. Install times go from -seconds to minutes which might not matter for the random individual system -but for build systems and the like churning away continuously... ---- - lib/transaction.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/lib/transaction.c b/lib/transaction.c -index 49b564f8d..1156bb9f5 100644 ---- a/lib/transaction.c -+++ b/lib/transaction.c -@@ -1478,10 +1478,8 @@ static void setSSD(int enable) - if (enable) { - rpmlog(RPMLOG_DEBUG, "optimizing for non-rotational disks\n"); - ensureMacro("_minimize_writes", "1"); -- ensureMacro("_flush_io", "1"); - } else { - rpmPopMacro(NULL, "_minimize_writes"); -- rpmPopMacro(NULL, "_flush_io"); - } - } - --- -2.26.2 - diff --git a/0001-Fix-completely-broken-prefix-search-on-sqlite-backen.patch b/0001-Fix-completely-broken-prefix-search-on-sqlite-backen.patch deleted file mode 100644 index ab1e2be..0000000 --- a/0001-Fix-completely-broken-prefix-search-on-sqlite-backen.patch +++ /dev/null @@ -1,114 +0,0 @@ -From cc897d03255e2a5aa672c40c043ca3fde88b8480 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Panu Matilainen -Date: Wed, 10 Jun 2020 10:33:06 +0300 -Subject: [PATCH] Fix completely broken prefix search on sqlite backend - -The prefix search was so wrong it's a small miracle it ever did anything -at all. What have I been thinking? Well, I do remember thinking this -prefix stuff looks kinda fishy but then it seems to work so... - -The prefix search belongs to the keyed iterator fetch case of course, -not the case where we're otherwise iterating over all keys. - -Fixes: #1260 ---- - lib/backend/sqlite.c | 51 +++++++++++++++++++++++--------------------- - 1 file changed, 27 insertions(+), 24 deletions(-) - -diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c -index 8520838df..ee9c62706 100644 ---- a/lib/backend/sqlite.c -+++ b/lib/backend/sqlite.c -@@ -548,13 +548,24 @@ static unsigned int sqlite_pkgdbKey(dbiIndex dbi, dbiCursor dbc) - return sqlite3_column_int(dbc->stmt, 0); - } - --static rpmRC sqlite_idxdbByKey(dbiIndex dbi, dbiCursor dbc, const char *keyp, size_t keylen, dbiIndexSet *set) -+static rpmRC sqlite_idxdbByKey(dbiIndex dbi, dbiCursor dbc, -+ const char *keyp, size_t keylen, int searchType, -+ dbiIndexSet *set) - { -- int rc = dbiCursorPrep(dbc, "SELECT hnum, idx FROM '%q' WHERE key=?", -+ int rc = RPMRC_NOTFOUND; -+ -+ if (searchType == DBC_PREFIX_SEARCH) { -+ rc = dbiCursorPrep(dbc, "SELECT hnum, idx FROM '%q' " -+ "WHERE MATCH(key,'%q',%d) " -+ "ORDER BY key", -+ dbi->dbi_file, keyp, keylen); -+ } else { -+ rc = dbiCursorPrep(dbc, "SELECT hnum, idx FROM '%q' WHERE key=?", - dbi->dbi_file); -+ if (!rc) -+ rc = dbiCursorBindIdx(dbc, keyp, keylen, NULL); -+ } - -- if (!rc) -- rc = dbiCursorBindIdx(dbc, keyp, keylen, NULL); - - if (!rc) { - while ((rc = sqlite3_step(dbc->stmt)) == SQLITE_ROW) { -@@ -576,21 +587,13 @@ static rpmRC sqlite_idxdbByKey(dbiIndex dbi, dbiCursor dbc, const char *keyp, si - return rc; - } - --static rpmRC sqlite_idxdbIter(dbiIndex dbi, dbiCursor dbc, const char *keyp, size_t keylen, dbiIndexSet *set, int searchType) -+static rpmRC sqlite_idxdbIter(dbiIndex dbi, dbiCursor dbc, dbiIndexSet *set) - { - int rc = RPMRC_OK; - - if (dbc->stmt == NULL) { -- if (searchType == DBC_PREFIX_SEARCH) { -- rc = dbiCursorPrep(dbc, "SELECT DISTINCT key FROM '%q' " -- "WHERE MATCH(key,'%q',%d) " -- "ORDER BY key", -- dbi->dbi_file, keyp, keylen); -- } else { -- rc = dbiCursorPrep(dbc, "SELECT DISTINCT key FROM '%q' " -- "ORDER BY key", -+ rc = dbiCursorPrep(dbc, "SELECT DISTINCT key FROM '%q' ORDER BY key", - dbi->dbi_file); -- } - if (set) - dbc->subc = dbiCursorInit(dbi, 0); - } -@@ -605,14 +608,14 @@ static rpmRC sqlite_idxdbIter(dbiIndex dbi, dbiCursor dbc, const char *keyp, siz - dbc->key = sqlite3_column_blob(dbc->stmt, 0); - } - dbc->keylen = sqlite3_column_bytes(dbc->stmt, 0); -- if (set) -- rc = sqlite_idxdbByKey(dbi, dbc->subc, dbc->key, dbc->keylen, set); -- rc = RPMRC_OK; -- } else if (rc == SQLITE_DONE) { -- if (searchType == DBC_PREFIX_SEARCH && (*set)) -+ if (dbc->subc) { -+ rc = sqlite_idxdbByKey(dbi, dbc->subc, dbc->key, dbc->keylen, -+ DBC_NORMAL_SEARCH, set); -+ } else { - rc = RPMRC_OK; -- else -- rc = RPMRC_NOTFOUND; -+ } -+ } else if (rc == SQLITE_DONE) { -+ rc = RPMRC_NOTFOUND; - } else { - rc = dbiCursorResult(dbc); - } -@@ -623,10 +626,10 @@ static rpmRC sqlite_idxdbIter(dbiIndex dbi, dbiCursor dbc, const char *keyp, siz - static rpmRC sqlite_idxdbGet(dbiIndex dbi, dbiCursor dbc, const char *keyp, size_t keylen, dbiIndexSet *set, int searchType) - { - int rc; -- if (keyp && searchType != DBC_PREFIX_SEARCH) { -- rc = sqlite_idxdbByKey(dbi, dbc, keyp, keylen, set); -+ if (keyp) { -+ rc = sqlite_idxdbByKey(dbi, dbc, keyp, keylen, searchType, set); - } else { -- rc = sqlite_idxdbIter(dbi, dbc, keyp, keylen, set, searchType); -+ rc = sqlite_idxdbIter(dbi, dbc, set); - } - - return rc; --- -2.26.2 - diff --git a/0001-metainfo.attr-Fix-execution-of-the-generator.patch b/0001-metainfo.attr-Fix-execution-of-the-generator.patch deleted file mode 100644 index cadf770..0000000 --- a/0001-metainfo.attr-Fix-execution-of-the-generator.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2ac60753c90ba4579b13425064e3df3d1421d61e Mon Sep 17 00:00:00 2001 -Message-Id: <2ac60753c90ba4579b13425064e3df3d1421d61e.1591606680.git.pmatilai@redhat.com> -From: Igor Raits -Date: Sun, 7 Jun 2020 14:31:19 +0200 -Subject: [PATCH] metainfo.attr: Fix execution of the generator - -Somehow it wasn't noticed before. - -Fixes: 9464926456125dacb8046767f1fe4235471986e9 -Signed-off-by: Igor Raits ---- - fileattrs/metainfo.attr | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fileattrs/metainfo.attr b/fileattrs/metainfo.attr -index 1a2c3d544..d0819dabe 100644 ---- a/fileattrs/metainfo.attr -+++ b/fileattrs/metainfo.attr -@@ -1,4 +1,4 @@ --%__metainfo_provides %{lua: -+%__metainfo_provides() %{lua: - print("metainfo()\\n") - print(string.format("metainfo(%s)\\n", rpm.expand("%{basename:%1}"))) - } --- -2.26.2 - diff --git a/rpm.spec b/rpm.spec index 60efa97..59e0a61 100644 --- a/rpm.spec +++ b/rpm.spec @@ -24,8 +24,8 @@ %define rpmhome /usr/lib/rpm %global rpmver 4.16.0 -%global snapver beta1 -%global rel 4 +%global snapver beta3 +%global rel 1 %global srcver %{rpmver}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x} @@ -59,9 +59,6 @@ Patch5: rpm-4.12.0-rpm2cpio-hack.patch Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch # Patches already upstream: -Patch100: 0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch -Patch101: 0001-metainfo.attr-Fix-execution-of-the-generator.patch -Patch102: 0001-Fix-completely-broken-prefix-search-on-sqlite-backen.patch # These are not yet upstream Patch906: rpm-4.7.1-geode-i686.patch @@ -555,6 +552,9 @@ fi %doc doc/librpm/html/* %changelog +* Wed Jun 24 2020 Panu Matilainen - 4.16.0-0.beta3.1 +- Rebase to beta3 + * Wed Jun 10 2020 Panu Matilainen - 4.16.0-0.beta1.4 - Fix prefix search on sqlite backend (many file triggers not running) diff --git a/sources b/sources index a68ef89..555ec08 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpm-4.16.0-beta1.tar.bz2) = f0c4e1148129bee7c83837556013dc497344167871d5aab6941012f377be86fbb51482b894a0ced27b97ba8900fe39d8bceba4ee12d90f6e7cbf7268e2183211 +SHA512 (rpm-4.16.0-beta3.tar.bz2) = 20efa638a7fe85b1b4d3d42fb07172c20a1f3c62024a29e4184b67a2d52ff3f94a186f178e9a5bfee9bf6c826a1023995d970b5c0ddaffe8b61fd2c888b44032