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-libs/libcap/files/, sys-libs/libcap/
Date: Thu, 04 Jun 2020 17:45:37
Message-Id: 1591291486.6b8d59e79ff1c1b53298e2b86f3cce54a4726440.polynomial-c@gentoo
1 commit: 6b8d59e79ff1c1b53298e2b86f3cce54a4726440
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 4 17:24:46 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 4 17:24:46 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b8d59e7
7
8 sys-libs/libcap: Removed old
9
10 Package-Manager: Portage-2.3.100, Repoman-2.3.22
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-libs/libcap/Manifest | 1 -
14 .../files/libcap-2.33-build-system-fixes.patch | 214 ---------------------
15 sys-libs/libcap/libcap-2.33.ebuild | 85 --------
16 3 files changed, 300 deletions(-)
17
18 diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
19 index 796100f8d33..6bf4782b366 100644
20 --- a/sys-libs/libcap/Manifest
21 +++ b/sys-libs/libcap/Manifest
22 @@ -1,5 +1,4 @@
23 DIST libcap-2.26.tar.xz 67172 BLAKE2B 9d1952bd03e1bba5ffa225a5088b8d841c2007219bbb9524f979ac65e472bf932db496acf93984fa77fe42e71d45b85cd603ca461a071fb4742526dfbc5f66eb SHA512 1c2d59f007226405a924950b2c2090393527e06f0692a84e6463e33915a070df61a9070b8f30a624d5630ddd39290eac117e5d440577d1edd48510195b9d12f0
24 DIST libcap-2.27.tar.xz 67780 BLAKE2B 7b58d7afdd90281771a302cd9554f067b9e3636b0c052935973d8a0d890490c3933b3513874b788a8c10e37ab5ad9cfa766408c9629b7c8562cb17bfdef87747 SHA512 e32335fd3e0d1564574acc73df7030b5b0fd98875217bffabd76f2765f1a7a6f1369f03df2ee22a1782776838784e342378c10613ea1163d53ae5055ab6a62b6
25 -DIST libcap-2.33.tar.xz 111280 BLAKE2B 9a34b6e871c6175da5ef665ab7a5ed8b9889f598875f58a6e0b7aef9b6b2737f2a85bb0a6e259a730a3fcea3b8ebbec793b52ee5dec7d11fcf236dfb2148eb83 SHA512 bb5bdc1318b524ee607026038dff7c1c621f1710fa07f8c341b1f86761cb086d32b93d7a12dbe4256d4440ee984143db8659d2679330e221ce184d7048c142b4
26 DIST libcap-2.34.tar.xz 111556 BLAKE2B 083599a899e5cc8942aedc3c932627d8608ea9cdc4eefe716e5fe2fb195276be26373697aa5bb3e84b801ccabb08f78c44f67ed82ea5c383a7c6a4d86f9e06b4 SHA512 6604aeab3de547e16e3c63e35cf41a5aaacf0cb52ffc818c822ada88595437986df731990d4b288eb72f9150de41fb8a93a6a727b936058e88b49b86352c4771
27 DIST libcap-2.36.tar.xz 112612 BLAKE2B fec0997eba7af6e9df83ce91235bdd96e98d7284268f0e3d3f4ef41e7b5e0621649a90069f2a162bcecf387c156ff481be379012fc57bbbc59309b850fe879ae SHA512 0193bd1b1b6223260a629458a37db581a0ff61f1d23f439fd2bdd0e6f3acb30ce996fb0f4f86c59670183d9f42932ae1e817e44e6b64f4ff49d61ea3a4a10aa5
28
29 diff --git a/sys-libs/libcap/files/libcap-2.33-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.33-build-system-fixes.patch
30 deleted file mode 100644
31 index a5d96780231..00000000000
32 --- a/sys-libs/libcap/files/libcap-2.33-build-system-fixes.patch
33 +++ /dev/null
34 @@ -1,214 +0,0 @@
35 -From 17e5e3e7f647343dafa701b95628b5160790e2a4 Mon Sep 17 00:00:00 2001
36 -From: Mike Frysinger <vapier@g.o>
37 -Date: Wed, 10 Feb 2016 09:47:27 +0100
38 -Subject: [PATCH] build system fixes
39 -
40 -This touches up the homebrewed build system to work much better "out of the
41 -box" for people. Specifically:
42 - - allow toolchain vars to be set via environment
43 - - CC / BUILD_CC / AR / RANLIB
44 - - CFLAGS / CPPFLAGS / LDFLAGS
45 - - split CPPFLAGS out of CFLAGS
46 - - break -fPIC out of global CFLAGS and only use where needed
47 - - use LDLIBS for libraries, not LDFLAGS
48 -
49 -Signed-off-by: Mike Frysinger <vapier@g.o>
50 -
51 -Forward ported from libcap-2.24 to libcap-2.25
52 -Forward ported from libcap-2.25 to libcap-2.28
53 -Forward ported from libcap-2.28 to libcap-2.29
54 -Forward ported from libcap-2.29 to libcap-2.33
55 -
56 -Signed-off-by: Lars Wendler <polynomial-c@g.o>
57 ----
58 - Make.Rules | 27 +++++++++++++++------------
59 - Makefile | 1 -
60 - libcap/Makefile | 7 ++++---
61 - pam_cap/Makefile | 8 +++++---
62 - progs/Makefile | 2 +-
63 - tests/Makefile | 8 +++++---
64 - 6 files changed, 30 insertions(+), 23 deletions(-)
65 -
66 -diff --git a/Make.Rules b/Make.Rules
67 -index 948435f..5a5184d 100644
68 ---- a/Make.Rules
69 -+++ b/Make.Rules
70 -@@ -47,35 +47,38 @@ MINOR=33
71 - # Compilation specifics
72 -
73 - KERNEL_HEADERS := $(topdir)/libcap/include/uapi
74 --IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
75 --
76 --CC := gcc # -std=c99
77 --CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
78 --BUILD_CC := $(CC)
79 --BUILD_CFLAGS := $(CFLAGS) $(IPATH)
80 --AR := ar
81 --RANLIB := ranlib
82 -+
83 -+CC ?= gcc # -std=c99
84 -+CFLAGS ?= -O2
85 -+BUILD_CC ?= $(CC)
86 -+BUILD_CFLAGS ?= $(CFLAGS)
87 -+AR ?= ar
88 -+RANLIB ?= ranlib
89 - DEBUG = -g #-DDEBUG
90 - WARNINGS=-Wall -Wwrite-strings \
91 - -Wpointer-arith -Wcast-qual -Wcast-align \
92 - -Wstrict-prototypes -Wmissing-prototypes \
93 - -Wnested-externs -Winline -Wshadow
94 - LD=$(CC) -Wl,-x -shared
95 --LDFLAGS := #-g
96 -+LDFLAGS ?= #-g
97 - LIBCAPLIB := -L$(topdir)/libcap -lcap
98 - LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread
99 -
100 - BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
101 -
102 --SYSTEM_HEADERS = /usr/include
103 -+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
104 -+LIBCAP_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
105 -+CPPFLAGS += $(LIBCAP_CPPFLAGS)
106 -+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
107 - INCS=$(topdir)/libcap/include/sys/capability.h
108 - LDFLAGS += -L$(topdir)/libcap
109 --CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
110 -+CPPFLAGS += -Dlinux
111 -+CFLAGS += $(WARNINGS) $(DEBUG)
112 - PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
113 - INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
114 - DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
115 -
116 --GOLANG := $(shell if [ -n "$(shell go version 2>/dev/null)" ]; then echo yes ; else echo no ; fi)
117 -+GOLANG ?= $(shell if [ -n "$(shell go version 2>/dev/null)" ]; then echo yes ; else echo no ; fi)
118 - ifeq ($(GOLANG),yes)
119 - GOROOT := $(shell go env GOROOT)
120 - GOCGO := $(shell if [ "$(shell go env CGO_ENABLED)" = 1 ]; then echo yes ; else echo no ; fi)
121 -diff --git a/Makefile b/Makefile
122 -index d8cf49c..c0b10a0 100644
123 ---- a/Makefile
124 -+++ b/Makefile
125 -@@ -16,7 +16,6 @@ endif
126 - ifeq ($(GOLANG),yes)
127 - $(MAKE) -C go $@
128 - endif
129 -- $(MAKE) -C tests $@
130 - $(MAKE) -C progs $@
131 - $(MAKE) -C doc $@
132 - $(MAKE) -C kdebug $@
133 -diff --git a/libcap/Makefile b/libcap/Makefile
134 -index c2cb0d1..406dfe5 100644
135 ---- a/libcap/Makefile
136 -+++ b/libcap/Makefile
137 -@@ -21,6 +21,7 @@ PSXOBJS=$(addsuffix .o, $(PSXFILES))
138 - MAJLIBNAME=$(LIBNAME).$(VERSION)
139 - MINLIBNAME=$(MAJLIBNAME).$(MINOR)
140 - GPERF_OUTPUT = _caps_output.gperf
141 -+CFLAGS += -fPIC
142 -
143 - all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc libpsx.pc $(STAPSXLIBNAME)
144 -
145 -@@ -48,7 +49,7 @@ libpsx.pc: libpsx.pc.in
146 - $< >$@
147 -
148 - _makenames: _makenames.c cap_names.list.h
149 -- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
150 -+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
151 -
152 - cap_names.h: _makenames
153 - ./_makenames > cap_names.h
154 -@@ -75,10 +76,10 @@ $(MINLIBNAME): $(CAPOBJS)
155 - ln -sf $(MAJLIBNAME) $(LIBNAME)
156 -
157 - %.o: %.c $(INCLS)
158 -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
159 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
160 -
161 - cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
162 -- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
163 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
164 -
165 - cap_test: cap_test.c libcap.h
166 - $(CC) $(CFLAGS) $(IPATH) $< -o $@
167 -diff --git a/pam_cap/Makefile b/pam_cap/Makefile
168 -index 56604fd..2da4674 100644
169 ---- a/pam_cap/Makefile
170 -+++ b/pam_cap/Makefile
171 -@@ -3,6 +3,8 @@
172 - topdir=$(shell pwd)/..
173 - include ../Make.Rules
174 -
175 -+CFLAGS += -fPIC
176 -+
177 - all: pam_cap.so
178 - $(MAKE) testlink
179 -
180 -@@ -16,16 +18,16 @@ install: all
181 - # written (and you know why it fails), email me and explain why. Thanks!
182 -
183 - pam_cap.so: pam_cap.o
184 -- $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
185 -+ $(LD) $(CFLAGS) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
186 -
187 - pam_cap.o: pam_cap.c
188 -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
189 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
190 -
191 - test_pam_cap: test_pam_cap.c pam_cap.c
192 - $(CC) $(CFLAGS) $(IPATH) -o $@ test_pam_cap.c $(LIBCAPLIB) $(LDFLAGS) --static
193 -
194 - testlink: test.c pam_cap.o
195 -- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
196 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
197 -
198 - test: pam_cap.so
199 - make testlink
200 -diff --git a/progs/Makefile b/progs/Makefile
201 -index 4c24f16..a3bbbd4 100644
202 ---- a/progs/Makefile
203 -+++ b/progs/Makefile
204 -@@ -23,7 +23,7 @@ $(BUILD): %: %.o $(DEPS)
205 - $(CC) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
206 -
207 - %.o: %.c $(INCS)
208 -- $(CC) $(IPATH) $(CFLAGS) -c $< -o $@
209 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
210 -
211 - install: all
212 - mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
213 -diff --git a/tests/Makefile b/tests/Makefile
214 -index 3fedeca..3645ddd 100644
215 ---- a/tests/Makefile
216 -+++ b/tests/Makefile
217 -@@ -16,6 +16,8 @@ test: run_psx_test run_libcap_psx_test
218 -
219 - sudotest: test run_libcap_launch_test run_libcap_launch_test
220 -
221 -+CFLAGS += -fPIC
222 -+
223 - install: all
224 -
225 - run_psx_test: psx_test psx_test_wrap
226 -@@ -23,16 +25,16 @@ run_psx_test: psx_test psx_test_wrap
227 - ./psx_test_wrap
228 -
229 - psx_test: psx_test.c $(DEPS)
230 -- $(CC) $(CFLAGS) $(IPATH) -DNOWRAP $< -o $@ $(LIBPSXLIB)
231 -+ $(CC) $(CFLAGS) $(CPPFLAGS) -DNOWRAP $< -o $@ $(LIBPSXLIB)
232 -
233 - psx_test_wrap: psx_test.c $(DEPS)
234 -- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
235 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
236 -
237 - run_libcap_psx_test: libcap_psx_test
238 - ./libcap_psx_test
239 -
240 - libcap_psx_test: libcap_psx_test.c $(DEPS)
241 -- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
242 -+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
243 -
244 - run_libcap_launch_test: libcap_launch_test libcap_psx_launch_test noop
245 - sudo ./libcap_launch_test
246 ---
247 -2.25.1
248 -
249
250 diff --git a/sys-libs/libcap/libcap-2.33.ebuild b/sys-libs/libcap/libcap-2.33.ebuild
251 deleted file mode 100644
252 index 1242ea1ed91..00000000000
253 --- a/sys-libs/libcap/libcap-2.33.ebuild
254 +++ /dev/null
255 @@ -1,85 +0,0 @@
256 -# Copyright 1999-2020 Gentoo Authors
257 -# Distributed under the terms of the GNU General Public License v2
258 -
259 -EAPI=7
260 -
261 -inherit multilib multilib-minimal toolchain-funcs pam usr-ldscript
262 -
263 -DESCRIPTION="POSIX 1003.1e capabilities"
264 -HOMEPAGE="https://sites.google.com/site/fullycapable/"
265 -SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
266 -
267 -# it's available under either of the licenses
268 -LICENSE="|| ( GPL-2 BSD )"
269 -SLOT="0"
270 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
271 -IUSE="pam static-libs"
272 -
273 -# While the build system optionally uses gperf, we don't DEPEND on it because
274 -# the build automatically falls back when it's unavailable. #604802
275 -RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
276 -PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
277 -DEPEND="${RDEPEND}
278 - ${PDEPEND}
279 - sys-kernel/linux-headers"
280 -
281 -# Requires test suite being run as root (via sudo)
282 -RESTRICT="test"
283 -
284 -PATCHES=(
285 - "${FILESDIR}"/${PN}-2.33-build-system-fixes.patch
286 - "${FILESDIR}"/${PN}-2.28-no_perl.patch
287 - "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
288 - "${FILESDIR}"/${PN}-2.21-include.patch
289 -)
290 -
291 -src_prepare() {
292 - default
293 - multilib_copy_sources
294 -}
295 -
296 -run_emake() {
297 - local args=(
298 - exec_prefix="${EPREFIX}"
299 - lib_prefix="${EPREFIX}/usr"
300 - lib="$(get_libdir)"
301 - prefix="${EPREFIX}/usr"
302 - PAM_CAP="$(usex pam yes no)"
303 - DYNAMIC=yes
304 - GOLANG=no
305 - )
306 - emake "${args[@]}" "$@"
307 -}
308 -
309 -multilib_src_compile() {
310 - tc-export AR CC RANLIB
311 - local BUILD_CC
312 - tc-export_build_env BUILD_CC
313 -
314 - run_emake
315 -}
316 -
317 -multilib_src_install() {
318 - # no configure, needs explicit install line #444724#c3
319 - run_emake DESTDIR="${D}" install
320 -
321 - gen_usr_ldscript -a cap
322 - if ! use static-libs ; then
323 - # Don't remove libpsx.a!
324 - # See https://bugs.gentoo.org/703912
325 - rm "${ED}"/usr/$(get_libdir)/libcap.a || die
326 - fi
327 -
328 - if [[ -d "${ED}"/usr/$(get_libdir)/security ]] ; then
329 - rm -r "${ED}"/usr/$(get_libdir)/security || die
330 - fi
331 -
332 - if use pam; then
333 - dopammod pam_cap/pam_cap.so
334 - dopamsecurity '' pam_cap/capability.conf
335 - fi
336 -}
337 -
338 -multilib_src_install_all() {
339 - dodoc CHANGELOG README doc/capability.notes
340 -}