Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/psmisc/, sys-process/psmisc/files/
Date: Sat, 06 Feb 2021 15:18:29
Message-Id: 1612624538.731cf3127ec50eb0ae786a923387b67842f4cf4c.polynomial-c@gentoo
1 commit: 731cf3127ec50eb0ae786a923387b67842f4cf4c
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 6 15:15:38 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 6 15:15:38 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=731cf312
7
8 sys-process/psmisc: Removed old
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-process/psmisc/Manifest | 2 -
14 ...misc-23.2-killall_check_truncated_16_char.patch | 122 ---------------------
15 .../psmisc/files/psmisc-23.2-old_comm_len.patch | 28 -----
16 sys-process/psmisc/psmisc-23.1-r1.ebuild | 51 ---------
17 sys-process/psmisc/psmisc-23.2-r2.ebuild | 50 ---------
18 5 files changed, 253 deletions(-)
19
20 diff --git a/sys-process/psmisc/Manifest b/sys-process/psmisc/Manifest
21 index 1230542d82c..972c7e944d8 100644
22 --- a/sys-process/psmisc/Manifest
23 +++ b/sys-process/psmisc/Manifest
24 @@ -1,4 +1,2 @@
25 -DIST psmisc-23.1.tar.xz 296136 BLAKE2B e53f7b80f1106622d652dad772d4236a62a1eb58e277f078cf0392d5a0bd7963c66805e28f6d1300999f2e2e5dcb692b1ecb3f6d39cefa77ebbc87302cd730be SHA512 f678869ea555986a2538ada9630b74ce79304f3ee85cc9d69a3912d8d30ad491829eac0dcb69aae7003ee9b5de9645d2135b80a9e0b77824e60c417dc0be5f95
26 -DIST psmisc-23.2.tar.xz 303820 BLAKE2B 6c63a54b91e1e31f812bc47c10937e8767fa2990bef66ee779bf44887625719e7342da05137222a6636df7a0e520c39318faba3e7a1022c54fd9f3f172ecc851 SHA512 a8d4e91443b66de1c4418fd74b5eb6dd42caddc937e75dfb35a4e49b9b35236db779e2a480c1693bcc7feaf0957b1028850134040685e88e6ff7ffcb572e20e8
27 DIST psmisc-23.3.tar.xz 311896 BLAKE2B f38360dfb037a758633a8ff25af1de70be83ae5b2f2afe856ce237ade7bd2720f7c270c5af884313177022aa70f408dfce0c39e5d847057a6fdba98e3363561c SHA512 791ffef78d87b092d653da98710b338017466a9e1e1935968b9f0194ccef8da941317aa0c39d821d46b20d95d6539ccf78e5ebb71ad1032ae62337a397180d58
28 DIST psmisc-23.4.tar.xz 370000 BLAKE2B e762171c4d3252421a49b352fadb3e892f66862f003a313a0cc692f973364b06d2652a51d331314462784d94ad55189e74c4d7a023d5d7c917c5e5c05009f46b SHA512 b05781fdb283a6f132bd385d64437f8080e6bc0e11cd2e3e02227678682bb67b3c89edec34a6d067d77312811d072dc60b47ebb32b168c4c69bbc36df643a471
29
30 diff --git a/sys-process/psmisc/files/psmisc-23.2-killall_check_truncated_16_char.patch b/sys-process/psmisc/files/psmisc-23.2-killall_check_truncated_16_char.patch
31 deleted file mode 100644
32 index bfc2a24d5de..00000000000
33 --- a/sys-process/psmisc/files/psmisc-23.2-killall_check_truncated_16_char.patch
34 +++ /dev/null
35 @@ -1,122 +0,0 @@
36 -From 1188315cd037d73bf946a0003b70c6423cc330d2 Mon Sep 17 00:00:00 2001
37 -From: Craig Small <csmall@×××××××.au>
38 -Date: Wed, 7 Nov 2018 20:13:09 +1100
39 -Subject: [PATCH] killall: match on 16 character commlen too
40 -
41 -The comm length increase meant killall could accomodate the
42 -larger comm name given out by newer kernels but it meant that
43 -if a user relied on the previous 16 character truncation then
44 -processes that used to match would fail.
45 -
46 -killall now checks to see if the the comm is the old COMM_LEN
47 -length and the given name is longer than old COMM_LEN and does
48 -a truncated match as well.
49 -
50 -References:
51 - https://bugs.debian.org/912748
52 ----
53 - ChangeLog | 3 +++
54 - src/killall.c | 69 +++++++++++++++++++++++++++++++++++----------------
55 - 2 files changed, 50 insertions(+), 22 deletions(-)
56 -
57 -diff --git a/ChangeLog b/ChangeLog
58 -index 7fd2abd..37962cb 100644
59 ---- a/ChangeLog
60 -+++ b/ChangeLog
61 -@@ -1,3 +1,6 @@
62 -+Changes in 23.4
63 -+===============
64 -+ * killall: check also truncated 16 char comm names Debian #912748
65 - Changes in 23.2
66 - ===============
67 - * misc: Command names increased from 16 to 64 characters
68 -diff --git a/src/killall.c b/src/killall.c
69 -index 2715515..09212a4 100644
70 ---- a/src/killall.c
71 -+++ b/src/killall.c
72 -@@ -492,6 +492,49 @@ create_pid_table(int *max_pids, int *pids)
73 - return pid_table;
74 - }
75 -
76 -+#define strcmp2(A,B,I) (I? strcasecmp((A),(B)):strcmp((A),(B)))
77 -+#define strncmp2(A,B,L,I) (I? strncasecmp((A),(B),(L)):strncmp((A),(B),(L)))
78 -+static int match_process_name(
79 -+ const char *proc_comm,
80 -+ const int comm_len,
81 -+ const char *proc_cmdline,
82 -+ const char *match_name,
83 -+ const int match_len,
84 -+ const int got_long
85 -+ )
86 -+{
87 -+ /* process is old length but matching longer */
88 -+ if (comm_len == OLD_COMM_LEN - 1 && match_len >= OLD_COMM_LEN - 1)
89 -+ {
90 -+ if (got_long)
91 -+ {
92 -+ return (0 == strncmp2 (match_name, proc_cmdline, OLD_COMM_LEN - 1,
93 -+ ignore_case));
94 -+ } else {
95 -+ return (0 == strncmp2 (match_name, proc_comm, OLD_COMM_LEN - 1,
96 -+ ignore_case));
97 -+ }
98 -+ }
99 -+
100 -+ if (comm_len == COMM_LEN - 1 && match_len >= COMM_LEN - 1)
101 -+ {
102 -+ if (got_long)
103 -+ {
104 -+ return (0 == strncmp2 (match_name, proc_cmdline, COMM_LEN - 1,
105 -+ ignore_case));
106 -+ } else {
107 -+ return (0 == strncmp2 (match_name, proc_comm, COMM_LEN - 1,
108 -+ ignore_case));
109 -+ }
110 -+ }
111 -+ /* Not old new COMM_LEN so we match all of it */
112 -+ if (got_long)
113 -+ {
114 -+ return (0 == strcmp2 (match_name, proc_cmdline, ignore_case));
115 -+ }
116 -+ return (0 == strcmp2 (match_name, proc_comm, ignore_case));
117 -+}
118 -+
119 - #ifdef WITH_SELINUX
120 - static int
121 - kill_all(int signal, int name_count, char **namelist, struct passwd *pwent,
122 -@@ -599,28 +642,10 @@ kill_all (int signal, int name_count, char **namelist, struct passwd *pwent)
123 - {
124 - if (!name_info[j].st.st_dev)
125 - {
126 -- if (length != COMM_LEN - 1 || name_info[j].name_length < COMM_LEN - 1)
127 -- {
128 -- if (ignore_case == 1)
129 -- {
130 -- if (strcasecmp (namelist[j], comm))
131 -- continue;
132 -- } else {
133 -- if (strcmp(namelist[j], comm))
134 -- continue;
135 -- }
136 -- } else {
137 -- if (ignore_case == 1)
138 -- {
139 -- if (got_long ? strcasecmp (namelist[j], command) :
140 -- strncasecmp (namelist[j], comm, COMM_LEN - 1))
141 -- continue;
142 -- } else {
143 -- if (got_long ? strcmp (namelist[j], command) :
144 -- strncmp (namelist[j], comm, COMM_LEN - 1))
145 -- continue;
146 -- }
147 -- }
148 -+ if (!match_process_name(comm, length, command, namelist[j],
149 -+ name_info[j].name_length, got_long))
150 -+ continue;
151 -+
152 - } else {
153 - int ok = 1;
154 - if (asprintf (&path, PROC_BASE "/%d/exe", pid_table[i]) < 0)
155 ---
156 -2.18.1
157 -
158
159 diff --git a/sys-process/psmisc/files/psmisc-23.2-old_comm_len.patch b/sys-process/psmisc/files/psmisc-23.2-old_comm_len.patch
160 deleted file mode 100644
161 index ae237e69109..00000000000
162 --- a/sys-process/psmisc/files/psmisc-23.2-old_comm_len.patch
163 +++ /dev/null
164 @@ -1,28 +0,0 @@
165 -From e2cf9f3e83e0fc0278ff39a4dfc8e3f2730eebca Mon Sep 17 00:00:00 2001
166 -From: Craig Small <csmall@×××××××.au>
167 -Date: Wed, 7 Nov 2018 20:19:38 +1100
168 -Subject: [PATCH] misc: Remember to add comm.h too
169 -
170 -The previous commit should have included comm.h too
171 ----
172 - src/comm.h | 6 ++++++
173 - 1 file changed, 6 insertions(+)
174 -
175 -diff --git a/src/comm.h b/src/comm.h
176 -index b54b998..b10eb36 100644
177 ---- a/src/comm.h
178 -+++ b/src/comm.h
179 -@@ -33,4 +33,10 @@
180 - */
181 - #define COMM_LEN 64
182 -
183 -+/*
184 -+ * Older kernels had only 16 characters, which means we may have to check this
185 -+ * too
186 -+ */
187 -+#define OLD_COMM_LEN 16
188 -+
189 - #endif
190 ---
191 -2.18.1
192 -
193
194 diff --git a/sys-process/psmisc/psmisc-23.1-r1.ebuild b/sys-process/psmisc/psmisc-23.1-r1.ebuild
195 deleted file mode 100644
196 index 1f826b2f6c3..00000000000
197 --- a/sys-process/psmisc/psmisc-23.1-r1.ebuild
198 +++ /dev/null
199 @@ -1,51 +0,0 @@
200 -# Copyright 1999-2020 Gentoo Authors
201 -# Distributed under the terms of the GNU General Public License v2
202 -
203 -EAPI=6
204 -
205 -DESCRIPTION="A set of tools that use the proc filesystem"
206 -HOMEPAGE="http://psmisc.sourceforge.net/"
207 -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
208 -
209 -LICENSE="GPL-2"
210 -SLOT="0"
211 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
212 -IUSE="ipv6 nls selinux X"
213 -
214 -RDEPEND=">=sys-libs/ncurses-5.7-r7:0=
215 - nls? ( virtual/libintl )
216 - selinux? ( sys-libs/libselinux )"
217 -DEPEND="${RDEPEND}
218 - >=sys-devel/libtool-2.2.6b
219 - nls? ( sys-devel/gettext )"
220 -
221 -DOCS=( AUTHORS ChangeLog NEWS README )
222 -
223 -src_configure() {
224 - local myeconfargs=(
225 - $(use_enable selinux)
226 - --disable-harden-flags
227 - $(use_enable ipv6)
228 - $(use_enable nls)
229 - )
230 - econf "${myeconfargs[@]}"
231 -}
232 -
233 -src_compile() {
234 - # peekfd is a fragile crap hack #330631
235 - nonfatal emake -C src peekfd || touch src/peekfd{.o,}
236 - emake
237 -}
238 -
239 -src_install() {
240 - default
241 -
242 - use X || rm -f "${ED%/}"/usr/bin/pstree.x11
243 -
244 - [[ -s ${ED%/}/usr/bin/peekfd ]] || rm -f "${ED%/}"/usr/bin/peekfd
245 - [[ -e ${ED%/}/usr/bin/peekfd ]] || rm -f "${ED%/}"/usr/share/man/man1/peekfd.1
246 -
247 - # fuser is needed by init.d scripts; use * wildcard for #458250
248 - dodir /bin
249 - mv "${ED%/}"/usr/bin/*fuser "${ED%/}"/bin || die
250 -}
251
252 diff --git a/sys-process/psmisc/psmisc-23.2-r2.ebuild b/sys-process/psmisc/psmisc-23.2-r2.ebuild
253 deleted file mode 100644
254 index c06e9f526a8..00000000000
255 --- a/sys-process/psmisc/psmisc-23.2-r2.ebuild
256 +++ /dev/null
257 @@ -1,50 +0,0 @@
258 -# Copyright 1999-2020 Gentoo Authors
259 -# Distributed under the terms of the GNU General Public License v2
260 -
261 -EAPI=6
262 -
263 -DESCRIPTION="A set of tools that use the proc filesystem"
264 -HOMEPAGE="http://psmisc.sourceforge.net/"
265 -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
266 -
267 -LICENSE="GPL-2"
268 -SLOT="0"
269 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
270 -IUSE="ipv6 nls selinux X"
271 -
272 -RDEPEND=">=sys-libs/ncurses-5.7-r7:0=
273 - nls? ( virtual/libintl )
274 - selinux? ( sys-libs/libselinux )"
275 -DEPEND="${RDEPEND}
276 - >=sys-devel/libtool-2.2.6b
277 - nls? ( sys-devel/gettext )"
278 -
279 -DOCS=( AUTHORS ChangeLog NEWS README )
280 -
281 -PATCHES=(
282 - "${FILESDIR}/${P}-old_comm_len.patch"
283 - "${FILESDIR}/${P}-killall_check_truncated_16_char.patch"
284 -)
285 -
286 -src_configure() {
287 - local myeconfargs=(
288 - --disable-harden-flags
289 - $(use_enable ipv6)
290 - $(use_enable nls)
291 - $(use_enable selinux)
292 - )
293 - econf "${myeconfargs[@]}"
294 -}
295 -
296 -src_install() {
297 - default
298 -
299 - use X || rm -f "${ED%/}"/usr/bin/pstree.x11
300 -
301 - [[ -s ${ED%/}/usr/bin/peekfd ]] || rm -f "${ED%/}"/usr/bin/peekfd
302 - [[ -e ${ED%/}/usr/bin/peekfd ]] || rm -f "${ED%/}"/usr/share/man/man1/peekfd.1
303 -
304 - # fuser is needed by init.d scripts; use * wildcard for #458250
305 - dodir /bin
306 - mv "${ED%/}"/usr/bin/*fuser "${ED%/}"/bin || die
307 -}