1 |
commit: 1f0405a690df6ae774c957b63089d90a62c388c9 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 3 06:45:00 2023 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 3 06:45:18 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f0405a6 |
7 |
|
8 |
app-arch/dpkg: update sed with proper patch. |
9 |
|
10 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
11 |
|
12 |
app-arch/dpkg/dpkg-1.21.15.ebuild | 6 +---- |
13 |
app-arch/dpkg/files/dpkg-1.21.15-buf-lengh.patch | 34 ++++++++++++++++++++++++ |
14 |
2 files changed, 35 insertions(+), 5 deletions(-) |
15 |
|
16 |
diff --git a/app-arch/dpkg/dpkg-1.21.15.ebuild b/app-arch/dpkg/dpkg-1.21.15.ebuild |
17 |
index 2a5678759150..02e4f4a95589 100644 |
18 |
--- a/app-arch/dpkg/dpkg-1.21.15.ebuild |
19 |
+++ b/app-arch/dpkg/dpkg-1.21.15.ebuild |
20 |
@@ -46,6 +46,7 @@ BDEPEND=" |
21 |
|
22 |
PATCHES=( |
23 |
"${FILESDIR}"/${PN}-1.18.12-flags.patch |
24 |
+ "${FILESDIR}"/${PN}-1.21.15-buf-lengh.patch # sent upstream |
25 |
) |
26 |
|
27 |
src_prepare() { |
28 |
@@ -53,11 +54,6 @@ src_prepare() { |
29 |
|
30 |
sed -i -e 's|\<ar\>|${AR}|g' src/at/deb-format.at src/at/testsuite || die |
31 |
|
32 |
- # upstream sets 200, that's a bit too short. |
33 |
- # it may not fail in real usage, but fails with /var/tmp/portage/$cat/pkg added. |
34 |
- # on my system it's exactly 201 characters. |
35 |
- sed -i -e 's/char\ buf\[200\]/char\ buf\[300\]/' src/deb/extract.c || die |
36 |
- |
37 |
eautoreconf |
38 |
} |
39 |
|
40 |
|
41 |
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 |
42 |
new file mode 100644 |
43 |
index 000000000000..1ab28d1df5a0 |
44 |
--- /dev/null |
45 |
+++ b/app-arch/dpkg/files/dpkg-1.21.15-buf-lengh.patch |
46 |
@@ -0,0 +1,34 @@ |
47 |
+From 7caf70b6cda200e1bad77c26e46e465a4ad76d71 Mon Sep 17 00:00:00 2001 |
48 |
+From: Georgy Yakovlev <gyakovlev@g.o> |
49 |
+Date: Mon, 2 Jan 2023 21:57:29 -0800 |
50 |
+Subject: [PATCH] dpkg-deb: increase buf lengh in movecontrolfiles |
51 |
+ |
52 |
+In some cases limit of 200 is too short. |
53 |
+For example, on gentoo we build in /var/tmp/portage (user configurable) |
54 |
+ |
55 |
+the buf contents end up exactly 201 characters: |
56 |
+e.g.: "mv /long/path /another/long/path && rmdir /yet/another/long/path" |
57 |
+ |
58 |
+so we only catch it in testsuite and dpkg-deb tests fail sometimes. |
59 |
+ |
60 |
+Signed-off-by: Georgy Yakovlev <gyakovlev@g.o> |
61 |
+--- |
62 |
+ src/deb/extract.c | 2 +- |
63 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
64 |
+ |
65 |
+diff --git a/src/deb/extract.c b/src/deb/extract.c |
66 |
+index a098539..332c664 100644 |
67 |
+--- a/src/deb/extract.c |
68 |
++++ b/src/deb/extract.c |
69 |
+@@ -53,7 +53,7 @@ |
70 |
+ static void |
71 |
+ movecontrolfiles(const char *dir, const char *thing) |
72 |
+ { |
73 |
+- char buf[200]; |
74 |
++ char buf[512]; |
75 |
+ pid_t pid; |
76 |
+ |
77 |
+ sprintf(buf, "mv %s/%s/* %s/ && rmdir %s/%s", dir, thing, dir, dir, thing); |
78 |
+-- |
79 |
+2.39.0 |
80 |
+ |