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/files/, sys-libs/libcap/
Date: Sun, 28 Nov 2021 14:02:05
Message-Id: 1638108112.73fd546a43034e66b7eac249a047e504fa903dd6.soap@gentoo
1 commit: 73fd546a43034e66b7eac249a047e504fa903dd6
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 28 14:01:52 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 28 14:01:52 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73fd546a
7
8 sys-libs/libcap: drop 2.60, 2.60-r1
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 sys-libs/libcap/Manifest | 1 -
13 .../files/libcap-2.60-libcap-alignment.patch | 105 ---------------------
14 sys-libs/libcap/libcap-2.60-r1.ebuild | 90 ------------------
15 sys-libs/libcap/libcap-2.60.ebuild | 88 -----------------
16 4 files changed, 284 deletions(-)
17
18 diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
19 index a96b565578d0..b783ac2f611d 100644
20 --- a/sys-libs/libcap/Manifest
21 +++ b/sys-libs/libcap/Manifest
22 @@ -1,3 +1,2 @@
23 DIST libcap-2.49.tar.xz 139568 BLAKE2B 5746dcdf2a737e747450bd50a701ee8543277b17b7fbf1304b79f707a088ea74dc6dc79c61ff89b55b718a460a7b0814f960f44d07944a97b832b78f4e14e07f SHA512 2934a2ded1370edeb9603dbf43d8ca23a2eb5d67efc5cec5d4ba96c707a8db2702da8aa9be0cb86c5ff100d37ec96115c7777a7566ad0ab2e0b4a288bbe357d0
24 -DIST libcap-2.60.tar.xz 170744 BLAKE2B 858b5133a5cb2f3b30dab569a6c9f2097034318c90419fa2372e0b28c891160f5e84b54b302b2d98664df8f7c44df78eb3cb4e47b328cecd4c27e7ab223045ae SHA512 f2ff0d81df7251c05decda706ccc6463ce58df6a3c542fe479328dce5416f77aa5c6a09a1ab05a1d1a3638e6dae5c0e546aaa4824843a570700a8927fb7f73e6
25 DIST libcap-2.61.tar.xz 173892 BLAKE2B 50874d3510ab2476aaceb775314d98744736aacd7364a23827756caa160c101e8bc890b7c33b5e19df8b30bb6b3b1c2be323e4b6a963f97e9ee557e86b4f13a0 SHA512 40096bf511d1c45e36f5d7f24e49c709528f3f01fcadd47b6ac40a7e8d5f1705b29b4cc56356b030639f67d0641b9f4e7c19449c3c7f4f77a4070c35745b465c
26
27 diff --git a/sys-libs/libcap/files/libcap-2.60-libcap-alignment.patch b/sys-libs/libcap/files/libcap-2.60-libcap-alignment.patch
28 deleted file mode 100644
29 index 6081c7dc76e6..000000000000
30 --- a/sys-libs/libcap/files/libcap-2.60-libcap-alignment.patch
31 +++ /dev/null
32 @@ -1,105 +0,0 @@
33 -https://bugs.gentoo.org/820071
34 -https://git.kernel.org/pub/scm/libs/libcap/libcap.git/patch/?id=c234bf90839f19e0332b586335411cb626a25a18
35 -https://git.kernel.org/pub/scm/libs/libcap/libcap.git/patch/?id=e9414f540a82b5348a12cfaddff229241564e1f3
36 -
37 -From: "Andrew G. Morgan" <morgan@××××××.org>
38 -Date: Sat, 13 Nov 2021 20:38:18 -0800
39 -Subject: Work around a __i386__ compilation issue for runnable .so files.
40 -
41 -This was reported by Sam James and debugged with respect to:
42 -
43 - https://bugs.gentoo.org/show_bug.cgi?id=820071
44 -
45 -Modern versions of glibc employ SSE instructions that require the
46 -stack to be aligned to 16 bytes in order to execute movaps and
47 -friends to stack stored memory. The ABI for x86_64 requires this
48 -alignment so we'd not seen this issue before being cc:d into the
49 -bug.
50 -
51 -Signed-off-by: Andrew G. Morgan <morgan@××××××.org>
52 ---- a/libcap/execable.h
53 -+++ b/libcap/execable.h
54 -@@ -74,20 +74,26 @@ static void __execable_parse_args(int *argc_p, char ***argv_p)
55 - * Note, to avoid any runtime confusion, SO_MAIN is a void static
56 - * function.
57 - */
58 -+#if defined(__i386__)
59 -+#define __SO_FORCE_ARG_ALIGNMENT __attribute__((force_align_arg_pointer))
60 -+#else
61 -+#define __SO_FORCE_ARG_ALIGNMENT
62 -+#endif /* def __i386 */
63 -
64 --#define SO_MAIN \
65 --static void __execable_main(int, char**); \
66 --extern void __so_start(void); \
67 --void __so_start(void) \
68 --{ \
69 -- int argc; \
70 -- char **argv; \
71 -- __execable_parse_args(&argc, &argv); \
72 -+#define SO_MAIN \
73 -+static void __execable_main(int, char**); \
74 -+extern void __so_start(void); \
75 -+__SO_FORCE_ARG_ALIGNMENT \
76 -+void __so_start(void) \
77 -+{ \
78 -+ int argc; \
79 -+ char **argv; \
80 -+ __execable_parse_args(&argc, &argv); \
81 - __execable_main(argc, argv); \
82 -- if (argc != 0) { \
83 -- free(argv[0]); \
84 -- free(argv); \
85 -- } \
86 -- exit(0); \
87 --} \
88 -+ if (argc != 0) { \
89 -+ free(argv[0]); \
90 -+ free(argv); \
91 -+ } \
92 -+ exit(0); \
93 -+} \
94 - static void __execable_main
95 -
96 -From: "Andrew G. Morgan" <morgan@××××××.org>
97 -Date: Sun, 14 Nov 2021 20:38:30 -0800
98 -Subject: Work around musl not hard-coding the ABI for Linux x86_64.
99 -
100 -There seems to be a subtle difference between glibc and musl over
101 -whether or not a runnable *.so needs to start out with its stack
102 -aligned to 16 bytes or not. Since Linux ABIs for x86 (both 32 and
103 -64 bit varieties) require 16 byte alignment, just force it on both
104 -these architectures.
105 -
106 -This addresses:
107 -
108 - https://bugzilla.kernel.org/show_bug.cgi?id=215009
109 -
110 -Signed-off-by: Andrew G. Morgan <morgan@××××××.org>
111 ---- a/libcap/execable.h
112 -+++ b/libcap/execable.h
113 -@@ -71,15 +71,19 @@ static void __execable_parse_args(int *argc_p, char ***argv_p)
114 - }
115 -
116 - /*
117 -- * Note, to avoid any runtime confusion, SO_MAIN is a void static
118 -- * function.
119 -+ * Linux x86 ABI requires the stack be 16 byte aligned. Keep things
120 -+ * simple and just force it.
121 - */
122 --#if defined(__i386__)
123 -+#if defined(__i386__) || defined(__x86_64__)
124 - #define __SO_FORCE_ARG_ALIGNMENT __attribute__((force_align_arg_pointer))
125 - #else
126 - #define __SO_FORCE_ARG_ALIGNMENT
127 --#endif /* def __i386 */
128 -+#endif /* def some x86 */
129 -
130 -+/*
131 -+ * Note, to avoid any runtime confusion, SO_MAIN is a void static
132 -+ * function.
133 -+ */
134 - #define SO_MAIN \
135 - static void __execable_main(int, char**); \
136 - extern void __so_start(void); \
137 -cgit 1.2.3-1.el7
138
139 diff --git a/sys-libs/libcap/libcap-2.60-r1.ebuild b/sys-libs/libcap/libcap-2.60-r1.ebuild
140 deleted file mode 100644
141 index 35fb94d44a0f..000000000000
142 --- a/sys-libs/libcap/libcap-2.60-r1.ebuild
143 +++ /dev/null
144 @@ -1,90 +0,0 @@
145 -# Copyright 1999-2021 Gentoo Authors
146 -# Distributed under the terms of the GNU General Public License v2
147 -
148 -EAPI=7
149 -
150 -inherit multilib-minimal toolchain-funcs pam usr-ldscript
151 -
152 -DESCRIPTION="POSIX 1003.1e capabilities"
153 -HOMEPAGE="https://sites.google.com/site/fullycapable/"
154 -SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
155 -
156 -# it's available under either of the licenses
157 -LICENSE="|| ( GPL-2 BSD )"
158 -SLOT="0"
159 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
160 -IUSE="pam static-libs tools"
161 -
162 -# While the build system optionally uses gperf, we don't DEPEND on it because
163 -# the build automatically falls back when it's unavailable. #604802
164 -PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
165 -DEPEND="${PDEPEND}
166 - sys-kernel/linux-headers"
167 -BDEPEND="sys-apps/diffutils
168 - tools? ( dev-lang/go )"
169 -
170 -PATCHES=(
171 - "${FILESDIR}"/${PN}-2.38-no_perl.patch
172 - "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
173 - "${FILESDIR}"/${PN}-2.60-libcap-alignment.patch
174 -)
175 -
176 -QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
177 -
178 -src_prepare() {
179 - default
180 - multilib_copy_sources
181 -}
182 -
183 -run_emake() {
184 - local args=(
185 - AR="$(tc-getAR)"
186 - CC="$(tc-getCC)"
187 - OBJCOPY="$(tc-getOBJCOPY)"
188 - RANLIB="$(tc-getRANLIB)"
189 - exec_prefix="${EPREFIX}"
190 - lib_prefix="${EPREFIX}/usr"
191 - lib="$(get_libdir)"
192 - prefix="${EPREFIX}/usr"
193 - PAM_CAP="$(usex pam yes no)"
194 - DYNAMIC=yes
195 - GOLANG="$(multilib_native_usex tools yes no)"
196 - )
197 - emake "${args[@]}" "$@"
198 -}
199 -
200 -src_configure() {
201 - tc-export_build_env BUILD_CC
202 - multilib-minimal_src_configure
203 -}
204 -
205 -multilib_src_compile() {
206 - run_emake
207 -}
208 -
209 -multilib_src_test() {
210 - run_emake test
211 -}
212 -
213 -multilib_src_install() {
214 - # no configure, needs explicit install line #444724#c3
215 - run_emake DESTDIR="${D}" install
216 -
217 - gen_usr_ldscript -a cap
218 - gen_usr_ldscript -a psx
219 - if ! use static-libs ; then
220 - rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
221 - fi
222 -
223 - # install pam plugins ourselves
224 - rm -rf "${ED}"/usr/$(get_libdir)/security || die
225 -
226 - if use pam ; then
227 - dopammod pam_cap/pam_cap.so
228 - dopamsecurity '' pam_cap/capability.conf
229 - fi
230 -}
231 -
232 -multilib_src_install_all() {
233 - dodoc CHANGELOG README doc/capability.notes
234 -}
235
236 diff --git a/sys-libs/libcap/libcap-2.60.ebuild b/sys-libs/libcap/libcap-2.60.ebuild
237 deleted file mode 100644
238 index ea1e6af49768..000000000000
239 --- a/sys-libs/libcap/libcap-2.60.ebuild
240 +++ /dev/null
241 @@ -1,88 +0,0 @@
242 -# Copyright 1999-2021 Gentoo Authors
243 -# Distributed under the terms of the GNU General Public License v2
244 -
245 -EAPI=7
246 -
247 -inherit multilib-minimal toolchain-funcs pam usr-ldscript
248 -
249 -DESCRIPTION="POSIX 1003.1e capabilities"
250 -HOMEPAGE="https://sites.google.com/site/fullycapable/"
251 -SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
252 -
253 -# it's available under either of the licenses
254 -LICENSE="|| ( GPL-2 BSD )"
255 -SLOT="0"
256 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
257 -IUSE="pam static-libs tools"
258 -
259 -# While the build system optionally uses gperf, we don't DEPEND on it because
260 -# the build automatically falls back when it's unavailable. #604802
261 -PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
262 -DEPEND="${PDEPEND}
263 - sys-kernel/linux-headers"
264 -BDEPEND="tools? ( dev-lang/go )"
265 -
266 -PATCHES=(
267 - "${FILESDIR}"/${PN}-2.38-no_perl.patch
268 - "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
269 -)
270 -
271 -QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
272 -
273 -src_prepare() {
274 - default
275 - multilib_copy_sources
276 -}
277 -
278 -run_emake() {
279 - local args=(
280 - AR="$(tc-getAR)"
281 - CC="$(tc-getCC)"
282 - OBJCOPY="$(tc-getOBJCOPY)"
283 - RANLIB="$(tc-getRANLIB)"
284 - exec_prefix="${EPREFIX}"
285 - lib_prefix="${EPREFIX}/usr"
286 - lib="$(get_libdir)"
287 - prefix="${EPREFIX}/usr"
288 - PAM_CAP="$(usex pam yes no)"
289 - DYNAMIC=yes
290 - GOLANG="$(multilib_native_usex tools yes no)"
291 - )
292 - emake "${args[@]}" "$@"
293 -}
294 -
295 -src_configure() {
296 - tc-export_build_env BUILD_CC
297 - multilib-minimal_src_configure
298 -}
299 -
300 -multilib_src_compile() {
301 - run_emake
302 -}
303 -
304 -multilib_src_test() {
305 - run_emake test
306 -}
307 -
308 -multilib_src_install() {
309 - # no configure, needs explicit install line #444724#c3
310 - run_emake DESTDIR="${D}" install
311 -
312 - gen_usr_ldscript -a cap
313 - gen_usr_ldscript -a psx
314 - if ! use static-libs ; then
315 - rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die
316 - fi
317 -
318 - # install pam plugins ourselves
319 - rm -rf "${ED}"/usr/$(get_libdir)/security || die
320 -
321 - if use pam ; then
322 - dopammod pam_cap/pam_cap.so
323 - dopamsecurity '' pam_cap/capability.conf
324 - fi
325 -}
326 -
327 -multilib_src_install_all() {
328 - dodoc CHANGELOG README doc/capability.notes
329 -}