summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2023-01-02 22:45:00 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2023-01-02 22:45:18 -0800
commit1f0405a690df6ae774c957b63089d90a62c388c9 (patch)
tree14fa25858969baed882e953b7918c5bd82cf3689 /app-arch/dpkg
parentxfce-extra/xfce4-screenshooter: Bump to 1.10.2 (diff)
downloadgentoo-1f0405a690df6ae774c957b63089d90a62c388c9.tar.gz
gentoo-1f0405a690df6ae774c957b63089d90a62c388c9.tar.bz2
gentoo-1f0405a690df6ae774c957b63089d90a62c388c9.zip
app-arch/dpkg: update sed with proper patch.
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-arch/dpkg')
-rw-r--r--app-arch/dpkg/dpkg-1.21.15.ebuild6
-rw-r--r--app-arch/dpkg/files/dpkg-1.21.15-buf-lengh.patch34
2 files changed, 35 insertions, 5 deletions
diff --git a/app-arch/dpkg/dpkg-1.21.15.ebuild b/app-arch/dpkg/dpkg-1.21.15.ebuild
index 2a5678759150..02e4f4a95589 100644
--- a/app-arch/dpkg/dpkg-1.21.15.ebuild
+++ b/app-arch/dpkg/dpkg-1.21.15.ebuild
@@ -46,6 +46,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-1.18.12-flags.patch
+ "${FILESDIR}"/${PN}-1.21.15-buf-lengh.patch # sent upstream
)
src_prepare() {
@@ -53,11 +54,6 @@ src_prepare() {
sed -i -e 's|\<ar\>|${AR}|g' src/at/deb-format.at src/at/testsuite || die
- # upstream sets 200, that's a bit too short.
- # it may not fail in real usage, but fails with /var/tmp/portage/$cat/pkg added.
- # on my system it's exactly 201 characters.
- sed -i -e 's/char\ buf\[200\]/char\ buf\[300\]/' src/deb/extract.c || die
-
eautoreconf
}
diff --git a/app-arch/dpkg/files/dpkg-1.21.15-buf-lengh.patch b/app-arch/dpkg/files/dpkg-1.21.15-buf-lengh.patch
new file mode 100644
index 000000000000..1ab28d1df5a0
--- /dev/null
+++ b/app-arch/dpkg/files/dpkg-1.21.15-buf-lengh.patch
@@ -0,0 +1,34 @@
+From 7caf70b6cda200e1bad77c26e46e465a4ad76d71 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Mon, 2 Jan 2023 21:57:29 -0800
+Subject: [PATCH] dpkg-deb: increase buf lengh in movecontrolfiles
+
+In some cases limit of 200 is too short.
+For example, on gentoo we build in /var/tmp/portage (user configurable)
+
+the buf contents end up exactly 201 characters:
+e.g.: "mv /long/path /another/long/path && rmdir /yet/another/long/path"
+
+so we only catch it in testsuite and dpkg-deb tests fail sometimes.
+
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ src/deb/extract.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/deb/extract.c b/src/deb/extract.c
+index a098539..332c664 100644
+--- a/src/deb/extract.c
++++ b/src/deb/extract.c
+@@ -53,7 +53,7 @@
+ static void
+ movecontrolfiles(const char *dir, const char *thing)
+ {
+- char buf[200];
++ char buf[512];
+ pid_t pid;
+
+ sprintf(buf, "mv %s/%s/* %s/ && rmdir %s/%s", dir, thing, dir, dir, thing);
+--
+2.39.0
+