[packages/poldek] Up to 0.46.0 git snapshot 2e6fbe79

arekm arekm at pld-linux.org
Sat Nov 7 23:21:04 CET 2026


commit f9edd63f66ee8bbe08d22d35f6909994961bc684
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Nov 2 12:58:57 2026 +0100

    Up to 0.46.0 git snapshot 2e6fbe79
    
    Drop the uninstall patch, merged upstream.

 poldek-uninstall-many-files.patch | 116 --------------------------------------
 poldek.spec                       |  10 ++--
 2 files changed, 4 insertions(+), 122 deletions(-)
---
diff --git a/poldek.spec b/poldek.spec
index 6f2f797..2a077e2 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -15,9 +15,9 @@
 # configure requires rpm.org 6.0 or later
 %define		ver_rpm		1:6.0
 
-%define		gitref	a82dd5f8db02518dee2b88891f681cdcd2edaed0
-%define		snap	20261031
-%define		rel	0.2
+%define		gitref	2e6fbe7971db9cc495c8c05129b300148cc696fc
+%define		snap	20261102
+%define		rel	0.1
 # poldek's autogen.sh and CI build against trurlib and tndb master
 %define		trurlib_gitref	c8e868cf50b8a67930bb6ff6945aa01b89734e15
 %define		tndb_gitref	27a90b4cca45533e84afc57e0a9654dfbf0120d1
@@ -30,7 +30,7 @@ Release:	0.%{snap}.%{rel}%{?with_snap:.%{SNAP}}
 License:	GPL v2
 Group:		Applications/System
 Source0:	https://github.com/poldek-pm/poldek/archive/%{gitref}/%{name}-%{snap}.tar.gz
-# Source0-md5:	0ed63fb7e825277d851377ee8ee6da3a
+# Source0-md5:	fbd7ffe86ee1ca8eaa4b1cc2a912fcdb
 Source1:	%{name}.conf
 Source2:	%{name}-multilib.conf
 Source3:	%{name}-config.sh
@@ -52,7 +52,6 @@ Source102:	%{name}-debuginfo-snap.conf
 Patch0:		%{name}-config.patch
 Patch1:		pm-hooks.patch
 Patch2:		%{name}-ext-down-enable.patch
-Patch3:		%{name}-uninstall-many-files.patch
 URL:		http://poldek.pld-linux.org/
 BuildRequires:	autoconf >= 2.63
 BuildRequires:	automake >= 1:1.11
@@ -234,7 +233,6 @@ cd ..
 %patch -P0 -p1
 %patch -P1 -p1
 %patch -P2 -p1
-%patch -P3 -p1
 
 # what upstream autogen.sh does besides autotools
 %{__make} -f Makefile.extra POTFILES_in
diff --git a/poldek-uninstall-many-files.patch b/poldek-uninstall-many-files.patch
deleted file mode 100644
index 102c29d..0000000
--- a/poldek-uninstall-many-files.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 9957007ba1ac5ed6466099701eb32bbc0be9614a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= <arekm at maven.pl>
-Date: Sun, 1 Nov 2026 14:51:28 +0100
-Subject: [PATCH] fix: removing a package with many files overflowed the stack
-
-Removing a package looks up what requires each of its files, and
---greedy does the same for each file of a requirement it may take along.
-Both loops made the capreq of each path with capreq_new_name_a(), with
-alloca(), which is freed only when the function returns, so the stack
-grew with every path. Removing aws-sdk-cpp-devel, 83,819 files with 5 MB
-of paths, overflowed the 8 MB stack and poldek died with SIGSEGV.
-
-Both loops now take the capreq from the heap and free it after the
-query, as install3/obsoletes.c does in the same kind of loop, and the
-macro says what its alloca() means for a loop.
----
- capreq.h        |  2 ++
- tests/sh/08-rpm | 34 ++++++++++++++++++++++++++++++++++
- uninstall.c     | 12 +++++++-----
- 3 files changed, 43 insertions(+), 5 deletions(-)
-
-diff --git a/capreq.h b/capreq.h
-index 6ae408d4..3a2be9d9 100644
---- a/capreq.h
-+++ b/capreq.h
-@@ -113,6 +113,8 @@ EXPORT struct capreq *capreq_new(tn_alloc *na, const char *name, int32_t epoch,
-                                  const char *version, const char *release,
-                                  int32_t relflags, int32_t flags);
- #ifndef SWIG
-+/* alloca(): the capreq lives until the caller returns, too long for a loop
-+   over a list of any length */
- #define capreq_new_name_a(nam, crptr)                              \
-     {                                                              \
-         struct capreq *__cr;                                       \
-diff --git a/tests/sh/08-rpm b/tests/sh/08-rpm
-index d17609d7..0a5eef35 100755
---- a/tests/sh/08-rpm
-+++ b/tests/sh/08-rpm
-@@ -768,6 +768,40 @@ testUpgradeMultipleInstalledWithDeps() {
-     try_install a "a-1.1.1k-1" "a-1.1.1j-1"
- }
- 
-+# poldek -e on a 512 kB stack: room enough for poldek, but not for a stack
-+# that grows with each file
-+uninstall_on_small_stack() {
-+    local expected="$1" out rc
-+    shift
-+
-+    out=$(ulimit -s 512; $RAW_POLDEK --root $DESTINATION_REPO -ev --test \
-+              --parsable-tr-summary "$@" 2>&1)
-+    rc=$?
-+    assertEquals "-e $*: exit code $rc: $(echo "$out" | tail -1)" "0" "$rc"
-+    out=$(echo "$out" | grep -E '^%[RD]' | sort | tr '\n' ' ')
-+    assertEquals "-e $*: removed" "$expected" "$out"
-+}
-+
-+# removal looks up what requires each file of a package it takes, and so does
-+# --greedy for each file of a requirement it may take along; neither may need
-+# stack for each file. The long names stay under the 255 bytes a file list
-+# keeps: longer ones are skipped, and the test would pass without the fix.
-+testUninstallManyFiles() {
-+    skip_if_rpm_testing_off && return
-+    local dir=/opt/zzmany/$(printf '%0200d' 0) files="" last i
-+
-+    for i in $(seq 1200); do
-+        last=$dir/$(printf '%0230d' $i)
-+        files="$files -f $last"
-+    done
-+    build_installed a 1-1 $files
-+    build_installed b 1-1 -r $last
-+
-+    uninstall_on_small_stack "%D b-1-1.noarch %R a-1-1.noarch " a
-+    uninstall_on_small_stack "%D a-1-1.noarch %D sh-1-1.noarch %R b-1-1.noarch " \
-+                             --greedy b
-+}
-+
- # poldek's rpmlog() hides rpm's notices such as "<file>: digests OK"
- testInstallRpmNoticesFiltered() {
-     skip_if_rpm_testing_off && return
-diff --git a/uninstall.c b/uninstall.c
-index 28626fa5..5a56a995 100644
---- a/uninstall.c
-+++ b/uninstall.c
-@@ -103,12 +103,12 @@ tn_array *get_orphanedby_pkg(struct uninstall_ctx *uctx, struct pkg *pkg)
- 
-         pkgfl_it_init(&it, pkg->fl);
-         while ((path = pkgfl_it_get(&it, NULL))) {
--            struct capreq *cap;
--            capreq_new_name_a(path, cap);
-+            struct capreq *cap = capreq_new(NULL, path, 0, NULL, NULL, 0, 0);
-             tracef(0, "%s of %s", pkg_id(pkg), path);
- 
-             pkgdb_q_what_requires(uctx->db, orphans, cap,
-                                   uctx->unpkgs, ldflags, 0);
-+            capreq_free(cap);
-         }
-     }
- 
-@@ -149,9 +149,11 @@ static int pkg_leave_orphans(struct uninstall_ctx *uctx, struct pkg *pkg)
- 
-         pkgfl_it_init(&it, pkg->fl);
-         while ((path = pkgfl_it_get(&it, NULL))) {
--            struct capreq *cap;
--            capreq_new_name_a(path, cap);
--            if (pkgdb_q_is_required(uctx->db, cap, exclude))
-+            struct capreq *cap = capreq_new(NULL, path, 0, NULL, NULL, 0, 0);
-+            int required = pkgdb_q_is_required(uctx->db, cap, exclude);
-+
-+            capreq_free(cap);
-+            if (required)
-                 goto l_yes;
-         }
-     }
--- 
-2.56.0
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/adce61b8e184aafe74877531b8d78097ae12539e



More information about the pld-cvs-commit mailing list