public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Drop some leftover, unused patches
@ 2026-11-23 9:35 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:35 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : e494e20099dc2f2ab5f4dcc1c3f5f4e558b68e38
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2025-05-12T09:37:31+03:00
Stats : +0/-359 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/e494e20099dc2f2ab5f4dcc1c3f5f4e558b68e38?branch=pmatilai-v6
Log:
Drop some leftover, unused patches
---
diff --git a/0001-Fix-division-by-zero-in-elfdeps-RhBug-2299414.patch b/0001-Fix-division-by-zero-in-elfdeps-RhBug-2299414.patch
deleted file mode 100644
index c540f00..0000000
--- a/0001-Fix-division-by-zero-in-elfdeps-RhBug-2299414.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 02ffc5158d1ad270e0b5c7ce6dfe4414a6ec029f Mon Sep 17 00:00:00 2001
-From: Michal Domonkos <mdomonko@redhat.com>
-Date: Wed, 31 Jul 2024 16:19:40 +0200
-Subject: [PATCH] Fix division by zero in elfdeps (RhBug:2299414)
-
-Assume that the section does not hold a table if sh_entsize is 0 (as
-specified in the elf(5) man page) and just skip it if that's the case.
----
- tools/elfdeps.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tools/elfdeps.c b/tools/elfdeps.c
-index cb388f08d..822359ab9 100644
---- a/tools/elfdeps.c
-+++ b/tools/elfdeps.c
-@@ -196,6 +196,8 @@ static void processVerNeed(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
- static void processDynamic(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
- {
- Elf_Data *data = NULL;
-+ if (shdr->sh_entsize == 0)
-+ return;
- while ((data = elf_getdata(scn, data)) != NULL) {
- for (int i = 0; i < (shdr->sh_size / shdr->sh_entsize); i++) {
- const char *s = NULL;
---
-2.45.2
-
diff --git a/0001-Revert-Replace-dbiset-internals-with-STL-vector-algo.patch b/0001-Revert-Replace-dbiset-internals-with-STL-vector-algo.patch
deleted file mode 100644
index cf1d3e5..0000000
--- a/0001-Revert-Replace-dbiset-internals-with-STL-vector-algo.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-From 3135ac8a8a12bd2cfd88a4933aa9b5540efcb3de Mon Sep 17 00:00:00 2001
-Message-ID: <3135ac8a8a12bd2cfd88a4933aa9b5540efcb3de.1744874925.git.pmatilai@redhat.com>
-From: Panu Matilainen <pmatilai@redhat.com>
-Date: Thu, 17 Apr 2025 10:21:11 +0300
-Subject: [PATCH] Revert "Replace dbiset internals with STL vector +
- algorithms"
-
-This is the cause of https://bugzilla.redhat.com/show_bug.cgi?id=2360342
-
-This reverts commit 52f311e224254d7cb28bf2ced22db7b50e1a2653.
----
- lib/backend/dbiset.cc | 145 +++++++++++++++++++++++++++---------------
- lib/backend/dbiset.hh | 3 -
- 2 files changed, 94 insertions(+), 54 deletions(-)
-
-diff --git a/lib/backend/dbiset.cc b/lib/backend/dbiset.cc
-index 14b6d7857..f6ee8ac44 100644
---- a/lib/backend/dbiset.cc
-+++ b/lib/backend/dbiset.cc
-@@ -1,30 +1,14 @@
- #include "system.h"
--
--#include <vector>
--#include <algorithm>
--
- #include <string.h>
- #include <stdlib.h>
- #include "dbiset.hh"
- #include "debug.h"
-
--using std::vector;
--
--bool dbiIndexItem_s::operator < (const dbiIndexItem_s & other) const
--{
-- if (hdrNum == other.hdrNum)
-- return tagNum < other.tagNum;
-- return hdrNum < other.hdrNum;
--}
--
--bool dbiIndexItem_s::operator == (const dbiIndexItem_s & other) const
--{
-- return (hdrNum == other.hdrNum && tagNum == other.tagNum);
--}
--
- /* Items retrieved from the index database.*/
- struct RPM_GNUC_INTERNAL dbiIndexSet_s {
-- vector<dbiIndexItem_s> recs; /*!< array of records */
-+ dbiIndexItem recs; /*!< array of records */
-+ unsigned int count; /*!< number of records */
-+ size_t alloced; /*!< alloced size */
- };
-
- dbiIndexSet dbiIndexSetNew(unsigned int sizehint)
-@@ -35,38 +19,76 @@ dbiIndexSet dbiIndexSetNew(unsigned int sizehint)
- return set;
- }
-
-+/*
-+ * Ensure sufficient memory for nrecs of new records in dbiIndexSet.
-+ * Allocate in power of two sizes to avoid memory fragmentation, so
-+ * realloc is not always needed.
-+ */
- void dbiIndexSetGrow(dbiIndexSet set, unsigned int nrecs)
- {
-- set->recs.reserve(nrecs);
-+ size_t need = (set->count + nrecs) * sizeof(*(set->recs));
-+ size_t alloced = set->alloced ? set->alloced : 1 << 4;
-+
-+ while (alloced < need)
-+ alloced <<= 1;
-+
-+ if (alloced != set->alloced) {
-+ set->recs = xrealloc(set->recs, alloced);
-+ set->alloced = alloced;
-+ }
- }
-
- void dbiIndexSetClear(dbiIndexSet set)
- {
- if (set)
-- set->recs.clear();
-+ set->count = 0;
- }
-
--void dbiIndexSetSort(dbiIndexSet set)
-+static int hdrNumCmp(const void * one, const void * two)
- {
-- if (set)
-- std::sort(set->recs.begin(), set->recs.end());
-+ const struct dbiIndexItem_s *a = (const struct dbiIndexItem_s *)one;
-+ const struct dbiIndexItem_s *b = (const struct dbiIndexItem_s *)two;
-+ if (a->hdrNum - b->hdrNum != 0)
-+ return a->hdrNum - b->hdrNum;
-+ return a->tagNum - b->tagNum;
- }
-
--static bool hdrNumCmp(const dbiIndexItem_s & a, const dbiIndexItem_s & b)
-+void dbiIndexSetSort(dbiIndexSet set)
- {
-- return (a.hdrNum == b.hdrNum);
-+ /*
-+ * mergesort is much (~10x with lots of identical basenames) faster
-+ * than pure quicksort, but glibc uses msort_with_tmp() on stack.
-+ */
-+ if (set && set->recs && set->count > 1) {
-+#ifdef HAVE_MERGESORT
-+ mergesort(set->recs, set->count, sizeof(*set->recs), hdrNumCmp);
-+#else
-+ qsort(set->recs, set->count, sizeof(*set->recs), hdrNumCmp);
-+#endif
-+ }
- }
-
- void dbiIndexSetUniq(dbiIndexSet set, int sorted)
- {
-- if (set->recs.size() < 2)
-+ unsigned int from;
-+ unsigned int to = 0;
-+ unsigned int num = set->count;
-+
-+ if (set->count < 2)
- return;
-
- if (!sorted)
- dbiIndexSetSort(set);
-
-- auto it = std::unique(set->recs.begin(), set->recs.end(), hdrNumCmp);
-- set->recs.resize(std::distance(set->recs.begin(), it));
-+ for (from = 0; from < num; from++) {
-+ if (from > 0 && set->recs[from - 1].hdrNum == set->recs[from].hdrNum) {
-+ set->count--;
-+ continue;
-+ }
-+ if (from != to)
-+ set->recs[to] = set->recs[from]; /* structure assignment */
-+ to++;
-+ }
- }
-
- int dbiIndexSetAppendSet(dbiIndexSet set, dbiIndexSet oset, int sortset)
-@@ -74,9 +96,13 @@ int dbiIndexSetAppendSet(dbiIndexSet set, dbiIndexSet oset, int sortset)
- if (set == NULL || oset == NULL)
- return 1;
-
-- set->recs.insert(set->recs.end(), oset->recs.begin(), oset->recs.end());
-+ if (oset->count) {
-+ dbiIndexSetGrow(set, oset->count);
-+ memcpy(set->recs + set->count, oset->recs, oset->count * sizeof(*(set->recs)));
-+ set->count += oset->count;
-+ }
-
-- if (sortset && set->recs.size() > 1)
-+ if (sortset && set->count > 1)
- dbiIndexSetSort(set);
-
- return 0;
-@@ -87,53 +113,69 @@ int dbiIndexSetAppendOne(dbiIndexSet set, unsigned int hdrNum,
- {
- if (set == NULL)
- return 1;
-+ dbiIndexSetGrow(set, 1);
-
-- set->recs.emplace_back() = { hdrNum, tagNum };
-+ set->recs[set->count].hdrNum = hdrNum;
-+ set->recs[set->count].tagNum = tagNum;
-+ set->count += 1;
-
-- if (sortset && set->recs.size() > 1)
-+ if (sortset && set->count > 1)
- dbiIndexSetSort(set);
-
- return 0;
- }
-
-+/* op 0 to prune, 1 to filter */
-+static int dbiIndexSetPrune(dbiIndexSet set, dbiIndexSet oset, int op)
-+{
-+ unsigned int from;
-+ unsigned int to = 0;
-+ unsigned int num = set->count;
-+ unsigned int numCopied = 0;
-+ size_t recsize = sizeof(*oset->recs);
-+
-+ for (from = 0; from < num; from++) {
-+ if ((bsearch(&set->recs[from], oset->recs, oset->count, recsize, hdrNumCmp) != NULL) == op) {
-+ set->count--;
-+ continue;
-+ }
-+ if (from != to)
-+ set->recs[to] = set->recs[from]; /* structure assignment */
-+ to++;
-+ numCopied++;
-+ }
-+ return (numCopied == num);
-+}
-+
- int dbiIndexSetPruneSet(dbiIndexSet set, dbiIndexSet oset, int sorted)
- {
-- if (set->recs.empty() || oset == NULL || oset->recs.empty())
-+
-+ if (set->count == 0 || oset->count == 0)
- return 1;
-
-- if (oset->recs.size() > 1 && !sorted)
-+ if (oset->count > 1 && !sorted)
- dbiIndexSetSort(oset);
-
-- vector<dbiIndexItem_s> diff;
-- std::set_difference(set->recs.begin(), set->recs.end(),
-- oset->recs.begin(), oset->recs.end(),
-- std::back_inserter(diff));
-- set->recs = diff;
-- return 0;
-+ return dbiIndexSetPrune(set, oset, 1);
- }
-
- int dbiIndexSetFilterSet(dbiIndexSet set, dbiIndexSet oset, int sorted)
- {
-- if (set->recs.empty() || oset == NULL || oset->recs.empty()) {
-- unsigned int num = set->recs.size();
-+ if (set->count == 0 || oset->count == 0) {
-+ unsigned int num = set->count;
- dbiIndexSetClear(set);
- return num ? 0 : 1;
- }
-
-- if (oset->recs.size() > 1 && !sorted)
-+ if (oset->count > 1 && !sorted)
- dbiIndexSetSort(oset);
-
-- vector<dbiIndexItem_s> isect;
-- std::set_intersection(set->recs.begin(), set->recs.end(),
-- oset->recs.begin(), oset->recs.end(),
-- std::back_inserter(isect));
-- set->recs = isect;
-- return 0;
-+ return dbiIndexSetPrune(set, oset, 0);
- }
-
- unsigned int dbiIndexSetCount(dbiIndexSet set)
- {
-- return (set != NULL) ? set->recs.size() : 0;
-+ return (set != NULL) ? set->count : 0;
- }
-
- unsigned int dbiIndexRecordOffset(dbiIndexSet set, unsigned int recno)
-@@ -149,6 +191,7 @@ unsigned int dbiIndexRecordFileNumber(dbiIndexSet set, unsigned int recno)
- dbiIndexSet dbiIndexSetFree(dbiIndexSet set)
- {
- if (set) {
-+ free(set->recs);
- delete set;
- }
- return NULL;
-diff --git a/lib/backend/dbiset.hh b/lib/backend/dbiset.hh
-index fdb28e96d..e8b06c078 100644
---- a/lib/backend/dbiset.hh
-+++ b/lib/backend/dbiset.hh
-@@ -7,9 +7,6 @@
- typedef struct RPM_GNUC_INTERNAL dbiIndexItem_s {
- unsigned int hdrNum; /*!< header instance in db */
- unsigned int tagNum; /*!< tag index in header */
--
-- bool operator < (const dbiIndexItem_s & other) const;
-- bool operator == (const dbiIndexItem_s & other) const;
- } * dbiIndexItem;
-
- typedef struct dbiIndexSet_s * dbiIndexSet;
---
-2.49.0
-
diff --git a/0001-Silence-extra-output-on-rpmspec-query-on-Buildsystem.patch b/0001-Silence-extra-output-on-rpmspec-query-on-Buildsystem.patch
deleted file mode 100644
index 93422ec..0000000
--- a/0001-Silence-extra-output-on-rpmspec-query-on-Buildsystem.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 71a6aa9349d5846115fa09bdf4506328802ffa7f Mon Sep 17 00:00:00 2001
-From: Panu Matilainen <pmatilai@redhat.com>
-Date: Wed, 30 Oct 2024 09:10:14 +0200
-Subject: [PATCH] Silence extra output on rpmspec query on Buildsystem specs
-
-Dynamic spec parsing emits "Reading <path>" messages to make it clear
-something out of the ordinary is going on, but this is undesireable
-on rpmspec queries. Luckily there's a trivial solution: rpmbuild where
-you want these messages runs in verbose mode by default whereas rpmspec
-does not. So just moving the message to INFO level does exactly the
-right thing in both the above cases. Add a test to go.
-
-Fies: #3413
----
- build/parseSpec.c | 2 +-
- tests/rpmbuild.at | 9 ++++++++-
- 2 files changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/build/parseSpec.c b/build/parseSpec.c
-index df08575ec..0d4605366 100644
---- a/build/parseSpec.c
-+++ b/build/parseSpec.c
-@@ -1426,7 +1426,7 @@ static rpmRC parseSpecParts(rpmSpec spec, const char *pattern,
- /* rpmGlob returns files sorted */
- if (rpmGlob(pattern, &argc, &argv) == 0) {
- for (int i = 0; i < argc; i++) {
-- rpmlog(RPMLOG_NOTICE, "Reading %s\n", argv[i]);
-+ rpmlog(RPMLOG_INFO, "Reading %s\n", argv[i]);
- pushOFI(spec, argv[i]);
- snprintf(spec->fileStack->readBuf, spec->fileStack->readBufLen,
- "# Spec part read from %s\n\n", argv[i]);
-diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
-index 6c86e6eb5..3fa90bb9b 100644
---- a/tests/rpmbuild.at
-+++ b/tests/rpmbuild.at
-@@ -78,7 +78,7 @@ runroot rpm -q --qf "%{packager}\n" /build/SRPMS/hello-1.0-1.src.rpm
- RPMTEST_CLEANUP
-
- AT_SETUP([rpmbuild -b buildsystem])
--AT_KEYWORDS([build])
-+AT_KEYWORDS([build buildsystem])
- RPMDB_INIT
-
- cp "${RPMTEST}/data/macros.buildsystem" "${RPMTEST}/${RPM_CONFIGDIR_PATH}/macros.d/"
-@@ -185,6 +185,13 @@ runroot rpmbuild -bb \
- [error: line 11: Required parametric macro %buildsystem_autotools_build not defined for buildsystem autotools
- ])
-
-+RPMTEST_CHECK([
-+runroot rpmspec -q --qf "%{nvr}\n" /data/SPECS/amhello.spec
-+],
-+[0],
-+[amhello-1.0-1
-+],
-+[])
- RPMTEST_CLEANUP
-
- AT_SETUP([rpmbuild -b steps])
---
-2.47.1
-
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:35 [rpms/rpm] pmatilai-v6: Drop some leftover, unused patches Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox