Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcap/, sys-libs/libcap/files/
Date: Tue, 04 Jan 2022 11:21:28
Message-Id: 1641295248.b7df2466d0b3dcdfc95886cc9a3005954c3f2c2e.soap@gentoo
1 commit: b7df2466d0b3dcdfc95886cc9a3005954c3f2c2e
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 4 11:20:48 2022 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 4 11:20:48 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7df2466
7
8 sys-libs/libcap: drop 2.49-r1
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 sys-libs/libcap/Manifest | 1 -
13 sys-libs/libcap/files/libcap-2.21-include.patch | 10 --
14 ....25-ignore-RAISE_SETFCAP-install-failures.patch | 24 ---
15 sys-libs/libcap/files/libcap-2.38-no_perl.patch | 62 --------
16 .../files/libcap-2.48-build-system-fixes.patch | 175 ---------------------
17 sys-libs/libcap/libcap-2.49-r1.ebuild | 87 ----------
18 6 files changed, 359 deletions(-)
19
20 diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
21 index 17b8bc94ee64..2f5d81e1e4b5 100644
22 --- a/sys-libs/libcap/Manifest
23 +++ b/sys-libs/libcap/Manifest
24 @@ -1,2 +1 @@
25 -DIST libcap-2.49.tar.xz 139568 BLAKE2B 5746dcdf2a737e747450bd50a701ee8543277b17b7fbf1304b79f707a088ea74dc6dc79c61ff89b55b718a460a7b0814f960f44d07944a97b832b78f4e14e07f SHA512 2934a2ded1370edeb9603dbf43d8ca23a2eb5d67efc5cec5d4ba96c707a8db2702da8aa9be0cb86c5ff100d37ec96115c7777a7566ad0ab2e0b4a288bbe357d0
26 DIST libcap-2.62.tar.xz 174772 BLAKE2B e3c86a5b88b9be932802ec8612f79e5f04912bf3e66f673eae2add85362292f4737c544d21b9e5adfd1a7a33c073568301b6532cdf0ea6c8b834d895b84323f1 SHA512 61ac004920c5cd3382a5443db2eacfc2041b7a8c0814b27084c1d111125639fe3950dea4325d0f7fb6bfb0d5de114452c3a62230cc958edb05ffdb83b213f9b3
27
28 diff --git a/sys-libs/libcap/files/libcap-2.21-include.patch b/sys-libs/libcap/files/libcap-2.21-include.patch
29 deleted file mode 100644
30 index 8ea6545659e3..000000000000
31 --- a/sys-libs/libcap/files/libcap-2.21-include.patch
32 +++ /dev/null
33 @@ -1,10 +0,0 @@
34 ---- a/libcap/libcap.h
35 -+++ b/libcap/libcap.h
36 -@@ -13,6 +13,7 @@
37 - #include <stdlib.h>
38 - #include <string.h>
39 - #include <sys/capability.h>
40 -+#include <sys/prctl.h> /* prctl() */
41 -
42 - #ifndef __u8
43 - #define __u8 unsigned char
44
45 diff --git a/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch b/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch
46 deleted file mode 100644
47 index e5455cd1ebb6..000000000000
48 --- a/sys-libs/libcap/files/libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch
49 +++ /dev/null
50 @@ -1,24 +0,0 @@
51 -From 8dfcdcfdcb9c462a05566aa8d3c6eca871f0ddbf Mon Sep 17 00:00:00 2001
52 -From: Mike Frysinger <vapier@g.o>
53 -Date: Wed, 10 Feb 2016 09:52:45 +0100
54 -Subject: [PATCH] ignore RAISE_SETFCAP install failures
55 -
56 -While the new RAISE_SETFCAP feature is nifty, its failure to run (often
57 -due to the fs not supporting it) shouldn't impair the default install.
58 -
59 -Signed-off-by: Mike Frysinger <vapier@g.o>
60 -
61 -Forward ported from libcap-2.20 to libcap-2.25
62 -
63 -Signed-off-by: Lars Wendler <polynomial-c@g.o>
64 ---- a/progs/Makefile
65 -+++ b/progs/Makefile
66 -@@ -27,7 +27,7 @@ install: all
67 - install -m 0755 $$p $(FAKEROOT)$(SBINDIR) ; \
68 - done
69 - ifeq ($(RAISE_SETFCAP),yes)
70 -- $(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap
71 -+ -$(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap
72 - endif
73 -
74 - clean:
75
76 diff --git a/sys-libs/libcap/files/libcap-2.38-no_perl.patch b/sys-libs/libcap/files/libcap-2.38-no_perl.patch
77 deleted file mode 100644
78 index 9104484d5770..000000000000
79 --- a/sys-libs/libcap/files/libcap-2.38-no_perl.patch
80 +++ /dev/null
81 @@ -1,62 +0,0 @@
82 -From 3f76418eaf73896489129c529fac021e4f3a03c0 Mon Sep 17 00:00:00 2001
83 -From: Mike Frysinger <vapier@g.o>
84 -Date: Wed, 21 Nov 2018 11:00:54 +0100
85 -Subject: [PATCH] use awk/sed instead of perl for creating header files
86 -
87 -More systems should have awk/sed than perl.
88 -
89 -Signed-off-by: Mike Frysinger <vapier@g.o>
90 -
91 -Forward ported from libcap-2.22 to libcap-2.26
92 -and incorporated the gperf-3.1 fix provided by Mike Gilbert
93 -<floppym@g.o>
94 -Forward ported from libcap-2.26 to libcap-2.28
95 -Forward ported from libcap-2.28 to libcap-2.38
96 -
97 -Signed-off-by: Lars Wendler <polynomial-c@g.o>
98 ---- a/libcap/Makefile
99 -+++ b/libcap/Makefile
100 -@@ -22,6 +22,8 @@ MAJLIBNAME=$(LIBNAME).$(VERSION)
101 - MINLIBNAME=$(MAJLIBNAME).$(MINOR)
102 - GPERF_OUTPUT = _caps_output.gperf
103 - CFLAGS += -fPIC
104 -+AWK = awk
105 -+SED = sed
106 -
107 - all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc libpsx.pc $(STAPSXLIBNAME)
108 -
109 -@@ -55,17 +57,27 @@ cap_names.h: _makenames
110 - ./_makenames > cap_names.h
111 -
112 - $(GPERF_OUTPUT): cap_names.list.h
113 -- perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, size_t);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
114 -- sed -e 's/unsigned int len/size_t len/' -i $@
115 -+ (printf "%b" "struct __cap_token_s { const char *name; int index; };\n%%\n"; \
116 -+ $(SED) -e 's:["{}]::g' -e 's:,$$::' $<) | \
117 -+ gperf \
118 -+ --ignore-case \
119 -+ --language=ANSI-C \
120 -+ --includes \
121 -+ --readonly \
122 -+ --null-strings \
123 -+ --global-table \
124 -+ --hash-function-name=__cap_hash_name \
125 -+ --lookup-function-name="__cap_lookup_name" \
126 -+ -c -t -m20 $(INDENT) > $@
127 -
128 --# Intention is that libcap keeps up with torvalds' tree, as reflected
129 --# by this maintained version of the kernel header. libcap dynamically
130 --# trims the meaning of "all" capabilities down to that of the running
131 --# kernel as of 2.30.
132 - UAPI_HEADER := $(topdir)/libcap/include/uapi/linux/capability.h
133 - cap_names.list.h: Makefile $(UAPI_HEADER)
134 - @echo "=> making $@ from $(UAPI_HEADER)"
135 -- perl -e 'while ($$l=<>) { if ($$l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$$/) { $$tok=$$1; $$val=$$2; $$tok =~ tr/A-Z/a-z/; print "{\"$$tok\",$$val},\n"; } }' $(UAPI_HEADER) | fgrep -v 0x > $@
136 -+ $(AWK) '($$0 ~ /^#define[[:space:]]+CAP[_A-Z]+[[:space:]]+[0-9]+[[:space:]]*$$/) { printf "{\"%s\",%s},\n", tolower($$2), $$3 }' $(UAPI_HEADER) > $@
137 -+
138 -+cap_names.list.h: $(KERNEL_HEADERS)/linux/capability.h Makefile
139 -+ @echo "=> making $@ from $<"
140 -+ $(AWK) '($$0 ~ /^#define[[:space:]]+CAP[_A-Z]+[[:space:]]+[0-9]+[[:space:]]*$$/) { printf "{\"%s\",%s},\n", tolower($$2), $$3 }' $< > $@
141 -
142 - $(STACAPLIBNAME): $(CAPOBJS)
143 - $(AR) rcs $@ $^
144
145 diff --git a/sys-libs/libcap/files/libcap-2.48-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.48-build-system-fixes.patch
146 deleted file mode 100644
147 index b3986e19546c..000000000000
148 --- a/sys-libs/libcap/files/libcap-2.48-build-system-fixes.patch
149 +++ /dev/null
150 @@ -1,175 +0,0 @@
151 -From d0e5c20fda92fcc48109bce7055d5fad458579ca Mon Sep 17 00:00:00 2001
152 -From: Mike Frysinger <vapier@g.o>
153 -Date: Wed, 4 Nov 2020 22:46:20 +0100
154 -Subject: [PATCH] build system fixes
155 -
156 -This touches up the homebrewed build system to work much better "out of the
157 -box" for people. Specifically:
158 - - allow toolchain vars to be set via environment
159 - - CC / BUILD_CC / AR / RANLIB
160 - - CFLAGS / CPPFLAGS / LDFLAGS
161 - - split CPPFLAGS out of CFLAGS
162 - - break -fPIC out of global CFLAGS and only use where needed
163 - - use LDLIBS for libraries, not LDFLAGS
164 -
165 -Signed-off-by: Mike Frysinger <vapier@g.o>
166 -
167 -Forward ported from libcap-2.24 to libcap-2.25
168 -Forward ported from libcap-2.25 to libcap-2.28
169 -Forward ported from libcap-2.28 to libcap-2.29
170 -Forward ported from libcap-2.29 to libcap-2.33
171 -Forward ported from libcap-2.33 to libcap-2.34
172 -Forward ported from libcap-2.34 to libcap-2.37
173 -Forward ported from libcap-2.37 to libcap-2.39
174 -Forward ported from libcap-2.39 to libcap-2.42
175 -Forward ported from libcap-2.42 to libcap-2.44
176 -Forward ported from libcap-2.44 to libcap-2.45
177 -Forward ported from libcap-2.45 to libcap-2.48
178 -
179 -Signed-off-by: Lars Wendler <polynomial-c@g.o>
180 ---- a/Make.Rules
181 -+++ b/Make.Rules
182 -@@ -52,7 +52,6 @@ GOMAJOR=0
183 - # Compilation specifics
184 -
185 - KERNEL_HEADERS := $(topdir)/libcap/include/uapi
186 --IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
187 -
188 - CC := $(CROSS_COMPILE)gcc
189 - DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
190 -@@ -60,7 +59,7 @@ COPTS ?= -O2
191 - CFLAGS ?= $(COPTS) $(DEFINES)
192 - BUILD_CC ?= $(CC)
193 - BUILD_COPTS ?= -O2
194 --BUILD_CFLAGS ?= $(BUILD_COPTS) $(DEFINES) $(IPATH)
195 -+BUILD_CFLAGS ?= $(CFLAGS)
196 - AR := $(CROSS_COMPILE)ar
197 - RANLIB := $(CROSS_COMPILE)ranlib
198 - DEBUG = -g #-DDEBUG
199 -@@ -76,10 +75,13 @@ LIBPSXLIB := -L$(topdir)/libcap -lpsx $(PSXLINKFLAGS)
200 -
201 - BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
202 -
203 --SYSTEM_HEADERS = /usr/include
204 -+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include $(DEFINES)
205 -+CPPFLAGS += $(LIBCAP_CPPFLAGS)
206 -+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
207 - INCS=$(topdir)/libcap/include/sys/capability.h
208 - LDFLAGS += -L$(topdir)/libcap
209 --CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
210 -+CPPFLAGS += -Dlinux
211 -+CFLAGS += $(WARNINGS) $(DEBUG)
212 - INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
213 -
214 - # SHARED tracks whether or not the SHARED libraries (libcap.so,
215 ---- a/Makefile
216 -+++ b/Makefile
217 -@@ -17,7 +17,6 @@ ifeq ($(GOLANG),yes)
218 - $(MAKE) -C go $@
219 - rm -f cap/go.sum
220 - endif
221 -- $(MAKE) -C tests $@
222 - $(MAKE) -C progs $@
223 - $(MAKE) -C doc $@
224 - $(MAKE) -C kdebug $@
225 ---- a/libcap/Makefile
226 -+++ b/libcap/Makefile
227 -@@ -25,6 +25,7 @@ MINCAPLIBNAME=$(MAJCAPLIBNAME).$(MINOR)
228 - PSXOBJS=$(addsuffix .o, $(PSXFILES))
229 - MAJPSXLIBNAME=$(PSXLIBNAME).$(VERSION)
230 - MINPSXLIBNAME=$(MAJPSXLIBNAME).$(MINOR)
231 -+CFLAGS += -fPIC
232 -
233 - all: pcs $(STACAPLIBNAME)
234 - ifeq ($(SHARED),yes)
235 -@@ -66,7 +67,7 @@ libpsx.pc: libpsx.pc.in
236 - $< >$@
237 -
238 - _makenames: _makenames.c cap_names.list.h
239 -- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
240 -+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
241 -
242 - cap_names.h: _makenames
243 - ./_makenames > cap_names.h
244 -@@ -105,10 +106,10 @@ $(PSXLIBNAME) $(MAJPSXLIBNAME) $(MINPSXLIBNAME): $(PSXOBJS) include/sys/psx_sysc
245 - endif
246 -
247 - %.o: %.c $(INCLS)
248 -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
249 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
250 -
251 - cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
252 -- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
253 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
254 -
255 - cap_test: cap_test.c libcap.h
256 - $(CC) $(CFLAGS) $(IPATH) $< -o $@
257 ---- a/pam_cap/Makefile
258 -+++ b/pam_cap/Makefile
259 -@@ -3,6 +3,8 @@
260 - topdir=$(shell pwd)/..
261 - include ../Make.Rules
262 -
263 -+CFLAGS += -fPIC
264 -+
265 - all: pam_cap.so
266 - $(MAKE) testlink
267 -
268 -@@ -16,16 +18,16 @@ install: all
269 - # written (and you know why it fails), email me and explain why. Thanks!
270 -
271 - pam_cap.so: pam_cap.o
272 -- $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
273 -+ $(LD) $(CFLAGS) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
274 -
275 - pam_cap.o: pam_cap.c
276 -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
277 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
278 -
279 - test_pam_cap: test_pam_cap.c pam_cap.c
280 - $(CC) $(CFLAGS) $(IPATH) -o $@ test_pam_cap.c $(LIBCAPLIB) $(LDFLAGS) --static
281 -
282 - testlink: test.c pam_cap.o
283 -- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
284 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
285 -
286 - test: pam_cap.so
287 - make testlink
288 ---- a/progs/Makefile
289 -+++ b/progs/Makefile
290 -@@ -28,7 +28,7 @@ $(BUILD): %: %.o $(DEPS)
291 - $(CC) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
292 -
293 - %.o: %.c $(INCS)
294 -- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -c $< -o $@
295 -+ $(CC) $(CAPSH_SHELL) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
296 -
297 - install: all
298 - mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
299 ---- a/tests/Makefile
300 -+++ b/tests/Makefile
301 -@@ -13,6 +13,8 @@ ifeq ($(PTHREADS),yes)
302 - make psx_test libcap_psx_test libcap_psx_launch_test
303 - endif
304 -
305 -+CFLAGS += -fPIC
306 -+
307 - install: all
308 -
309 - ifeq ($(DYNAMIC),yes)
310 -@@ -62,13 +64,13 @@ run_psx_test: psx_test
311 - ./psx_test
312 -
313 - psx_test: psx_test.c $(DEPS)
314 -- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS)
315 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS)
316 -
317 - run_libcap_psx_test: libcap_psx_test
318 - ./libcap_psx_test
319 -
320 - libcap_psx_test: libcap_psx_test.c $(DEPS)
321 -- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
322 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
323 -
324 - # privileged
325 - run_libcap_launch_test: libcap_launch_test noop ../progs/tcapsh-static
326
327 diff --git a/sys-libs/libcap/libcap-2.49-r1.ebuild b/sys-libs/libcap/libcap-2.49-r1.ebuild
328 deleted file mode 100644
329 index 993d6f47b1c0..000000000000
330 --- a/sys-libs/libcap/libcap-2.49-r1.ebuild
331 +++ /dev/null
332 @@ -1,87 +0,0 @@
333 -# Copyright 1999-2021 Gentoo Authors
334 -# Distributed under the terms of the GNU General Public License v2
335 -
336 -EAPI=7
337 -
338 -inherit multilib-minimal toolchain-funcs pam usr-ldscript
339 -
340 -DESCRIPTION="POSIX 1003.1e capabilities"
341 -HOMEPAGE="https://sites.google.com/site/fullycapable/"
342 -SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
343 -
344 -# it's available under either of the licenses
345 -LICENSE="|| ( GPL-2 BSD )"
346 -SLOT="0"
347 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
348 -IUSE="pam static-libs"
349 -
350 -# While the build system optionally uses gperf, we don't DEPEND on it because
351 -# the build automatically falls back when it's unavailable. #604802
352 -PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
353 -DEPEND="${PDEPEND}
354 - sys-kernel/linux-headers"
355 -
356 -# Requires test suite being run as root (via sudo)
357 -RESTRICT="test"
358 -
359 -PATCHES=(
360 - "${FILESDIR}"/${PN}-2.48-build-system-fixes.patch
361 - "${FILESDIR}"/${PN}-2.38-no_perl.patch
362 - "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
363 - "${FILESDIR}"/${PN}-2.21-include.patch
364 -)
365 -
366 -src_prepare() {
367 - default
368 - multilib_copy_sources
369 -}
370 -
371 -run_emake() {
372 - local args=(
373 - exec_prefix="${EPREFIX}"
374 - lib_prefix="${EPREFIX}/usr"
375 - lib="$(get_libdir)"
376 - prefix="${EPREFIX}/usr"
377 - PAM_CAP="$(usex pam yes no)"
378 - DYNAMIC=yes
379 - GOLANG=no
380 - CC="$(tc-getCC)"
381 - AR="$(tc-getAR)"
382 - RANLIB="$(tc-getRANLIB)"
383 - )
384 - emake "${args[@]}" "$@"
385 -}
386 -
387 -src_configure() {
388 - tc-export AR CC RANLIB
389 - tc-export_build_env BUILD_CC
390 - multilib-minimal_src_configure
391 -}
392 -
393 -multilib_src_compile() {
394 - run_emake
395 -}
396 -
397 -multilib_src_install() {
398 - # no configure, needs explicit install line #444724#c3
399 - run_emake DESTDIR="${D}" install
400 -
401 - gen_usr_ldscript -a cap
402 - gen_usr_ldscript -a psx
403 - if ! use static-libs ; then
404 - rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
405 - fi
406 -
407 - if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then
408 - rm -r "${ED}"/usr/$(get_libdir)/security || die
409 - fi
410 -
411 - if use pam ; then
412 - dopammod pam_cap/pam_cap.so
413 - dopamsecurity '' pam_cap/capability.conf
414 - fi
415 -}
416 -
417 -multilib_src_install_all() {
418 - dodoc CHANGELOG README doc/capability.notes
419 -}