Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-apps/sandbox/, sys-apps/sandbox/files/
Date: Wed, 05 May 2021 06:38:09
Message-Id: 1620196654.7da24d9ed143ec0e45b07e7769c9b724d51ee120.grobian@gentoo
1 commit: 7da24d9ed143ec0e45b07e7769c9b724d51ee120
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 5 06:37:34 2021 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Wed May 5 06:37:34 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=7da24d9e
7
8 sys-devel/sandbox: drop in favour of gx86 version
9
10 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
11
12 sys-apps/sandbox/Manifest | 3 -
13 .../0001-libsandbox-handle-more-at-functions.patch | 42 -----
14 sys-apps/sandbox/files/09sandbox | 1 -
15 sys-apps/sandbox/files/sandbox-1.2.17-prefix.patch | 209 ---------------------
16 .../files/sandbox-1.2.18.1-open-cloexec.patch | 15 --
17 .../files/sandbox-1.2.18.1-open-normal-fail.patch | 99 ----------
18 .../files/sandbox-1.2.18.1-rtld-validation.patch | 43 -----
19 .../files/sandbox-1.2.20_alpha2-parallel.patch | 12 --
20 .../files/sandbox-1.6-disable-pthread.patch | 37 ----
21 .../files/sandbox-1.6-disable-qa-static.patch | 13 --
22 .../sandbox/files/sandbox-1.9-setoptions.patch | 15 --
23 sys-apps/sandbox/files/sandbox-2.0-prefix.patch | 37 ----
24 .../sandbox/files/sandbox-2.0-setoptions.patch | 11 --
25 sys-apps/sandbox/files/sandbox-2.2-prefix.patch | 26 ---
26 .../sandbox/files/sandbox-2.6-trace-hppa.patch | 27 ---
27 sys-apps/sandbox/metadata.xml | 11 --
28 sys-apps/sandbox/sandbox-1.6-r2.ebuild | 104 ----------
29 sys-apps/sandbox/sandbox-2.5.ebuild | 126 -------------
30 sys-apps/sandbox/sandbox-2.6.ebuild | 132 -------------
31 19 files changed, 963 deletions(-)
32
33 diff --git a/sys-apps/sandbox/Manifest b/sys-apps/sandbox/Manifest
34 deleted file mode 100644
35 index a4df30f468..0000000000
36 --- a/sys-apps/sandbox/Manifest
37 +++ /dev/null
38 @@ -1,3 +0,0 @@
39 -DIST sandbox-1.6.tar.lzma 307014 BLAKE2B ba61be101af826a7b1a717f943e93b073a23728ec5f33c2f65c3a7ba0ba8b3e96861e2a23405e501ed9115091bf04d11b952bb670ca9a7c597c85b03cf7f3931 SHA512 f470599a67443fa107612fef1cc73b64b3146003ae21bb5ae5abd852c4c37aec93ac09be646fda9d55d4c3aeef0cf28a42fa675f2acbb53c1d903e400538ba4c
40 -DIST sandbox-2.5.tar.xz 355680 BLAKE2B b6c85e2a23d43c21a43efd2f9c3ea2459a7d76e2580e4f74d63d29645b41652711b869d21ae7c36c70cd4b4c2ad739772fb3c06fa5fd93b63d63b07b62d8e8e0 SHA512 7b870295bb78c1da5550b650a3983d93e503935a8e8452a29a5c6310cc2c2d569a898ea1534e2c670b4a3e5607504fac55f69da6878e0adc9c2c65a5476b4fb0
41 -DIST sandbox-2.6.tar.xz 366356 BLAKE2B 9dbd92176a239743e877c174bdb547672a020e92ed661e239f29c75c79320e9b15733aaba532389435ffc2d2927d80c1192ff7f603236dacedf88b33686da197 SHA512 32ba7fb675c67fdc8bc52da1db7ed6878e5fea8753accb30d9aca00f708e0dde03287b5962caf5ef031bea6934d6ef3e18404b015c70ebd551d3fd8109ad2371
42
43 diff --git a/sys-apps/sandbox/files/0001-libsandbox-handle-more-at-functions.patch b/sys-apps/sandbox/files/0001-libsandbox-handle-more-at-functions.patch
44 deleted file mode 100644
45 index 09462b7e1b..0000000000
46 --- a/sys-apps/sandbox/files/0001-libsandbox-handle-more-at-functions.patch
47 +++ /dev/null
48 @@ -1,42 +0,0 @@
49 -From 25425878243c5ca1ff21e6f479e585c60b943930 Mon Sep 17 00:00:00 2001
50 -From: Mike Frysinger <vapier@g.o>
51 -Date: Mon, 30 Mar 2009 19:56:29 -0400
52 -Subject: [PATCH] libsandbox: handle more *at functions
53 -
54 -Add some more *at functions to the main checking code.
55 -
56 -URL: http://bugs.gentoo.org/264320
57 -Signed-off-by: Mike Frysinger <vapier@g.o>
58 -Reported-by: Harald van Dijk <truedfx@g.o>
59 ----
60 - libsandbox/libsandbox.c | 5 +++++
61 - 1 files changed, 5 insertions(+), 0 deletions(-)
62 -
63 -diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
64 -index 88248af..c3f0b55 100644
65 ---- a/libsandbox/libsandbox.c
66 -+++ b/libsandbox/libsandbox.c
67 -@@ -681,15 +681,20 @@ static int check_access(sbcontext_t *sbcontext, int sb_nr, const char *func,
68 - sb_nr == SB_NR_CREAT ||
69 - sb_nr == SB_NR_CREAT64 ||
70 - sb_nr == SB_NR_MKDIR ||
71 -+ sb_nr == SB_NR_MKDIRAT ||
72 - sb_nr == SB_NR_MKNOD ||
73 - sb_nr == SB_NR_MKNODAT ||
74 - sb_nr == SB_NR__XMKNOD ||
75 - sb_nr == SB_NR___XMKNOD ||
76 - sb_nr == SB_NR___XMKNODAT ||
77 - sb_nr == SB_NR_MKFIFO ||
78 -+ sb_nr == SB_NR_MKFIFOAT ||
79 - sb_nr == SB_NR_LINK ||
80 -+ sb_nr == SB_NR_LINKAT ||
81 - sb_nr == SB_NR_SYMLINK ||
82 -+ sb_nr == SB_NR_SYMLINKAT ||
83 - sb_nr == SB_NR_RENAME ||
84 -+ sb_nr == SB_NR_RENAMEAT ||
85 - sb_nr == SB_NR_LUTIMES ||
86 - sb_nr == SB_NR_UTIMENSAT ||
87 - sb_nr == SB_NR_UTIME ||
88 ---
89 -1.6.2
90 -
91
92 diff --git a/sys-apps/sandbox/files/09sandbox b/sys-apps/sandbox/files/09sandbox
93 deleted file mode 100644
94 index 9181eb068c..0000000000
95 --- a/sys-apps/sandbox/files/09sandbox
96 +++ /dev/null
97 @@ -1 +0,0 @@
98 -CONFIG_PROTECT_MASK="/etc/sandbox.d"
99
100 diff --git a/sys-apps/sandbox/files/sandbox-1.2.17-prefix.patch b/sys-apps/sandbox/files/sandbox-1.2.17-prefix.patch
101 deleted file mode 100644
102 index 98348553d5..0000000000
103 --- a/sys-apps/sandbox/files/sandbox-1.2.17-prefix.patch
104 +++ /dev/null
105 @@ -1,209 +0,0 @@
106 -* Michael Haubenwallner <michael.haubenwallner@×××××××.at>
107 - Prefix awareness for sandbox
108 -
109 -diff -ruN sandbox-1.2.17.orig/configure.ac sandbox-1.2.17/configure.ac
110 ---- sandbox-1.2.17.orig/configure.ac 2005-12-05 15:03:35.000000000 +0100
111 -+++ sandbox-1.2.17/configure.ac 2006-07-27 16:14:28.000000000 +0200
112 -@@ -156,5 +156,7 @@
113 - Makefile
114 - scripts/Makefile
115 - data/Makefile
116 -+ data/sandbox.bashrc
117 -+ data/sandbox.profile
118 - src/Makefile
119 - ])
120 -diff -ruN sandbox-1.2.17.orig/data/sandbox.bashrc sandbox-1.2.17/data/sandbox.bashrc
121 ---- sandbox-1.2.17.orig/data/sandbox.bashrc 2005-12-01 00:14:28.000000000 +0100
122 -+++ sandbox-1.2.17/data/sandbox.bashrc 1970-01-01 01:00:00.000000000 +0100
123 -@@ -1,18 +0,0 @@
124 --# Copyright (C) 2001 Geert Bevin, Uwyn, http://www.uwyn.com
125 --# Distributed under the terms of the GNU General Public License, v2 or later
126 --# Author : Geert Bevin <gbevin@××××.com>
127 --# $Header$
128 --source /etc/profile
129 --
130 --if [[ -n ${LD_PRELOAD} && ${LD_PRELOAD} != *$SANDBOX_LIB* ]] ; then
131 -- export LD_PRELOAD="${SANDBOX_LIB} ${LD_PRELOAD}"
132 --elif [[ -z ${LD_PRELOAD} ]] ; then
133 -- export LD_PRELOAD="${SANDBOX_LIB}"
134 --fi
135 --
136 --export BASH_ENV="${SANDBOX_BASHRC}"
137 --
138 --alias make="make LD_PRELOAD=${LD_PRELOAD}"
139 --alias su="su -c '/bin/bash -rcfile ${SANDBOX_BASHRC}'"
140 --
141 --declare -r SANDBOX_ACTIVE
142 -diff -ruN sandbox-1.2.17.orig/data/sandbox.bashrc.in sandbox-1.2.17/data/sandbox.bashrc.in
143 ---- sandbox-1.2.17.orig/data/sandbox.bashrc.in 1970-01-01 01:00:00.000000000 +0100
144 -+++ sandbox-1.2.17/data/sandbox.bashrc.in 2006-07-27 16:13:40.000000000 +0200
145 -@@ -0,0 +1,17 @@
146 -+# Copyright (C) 2001 Geert Bevin, Uwyn, http://www.uwyn.com
147 -+# Distributed under the terms of the GNU General Public License, v2 or later
148 -+# Author : Geert Bevin <gbevin@××××.com>
149 -+# $Header$
150 -+
151 -+if [[ -n ${LD_PRELOAD} && ${LD_PRELOAD} != *$SANDBOX_LIB* ]] ; then
152 -+ export LD_PRELOAD="${SANDBOX_LIB} ${LD_PRELOAD}"
153 -+elif [[ -z ${LD_PRELOAD} ]] ; then
154 -+ export LD_PRELOAD="${SANDBOX_LIB}"
155 -+fi
156 -+
157 -+export BASH_ENV="${SANDBOX_BASHRC}"
158 -+
159 -+alias make="make LD_PRELOAD=${LD_PRELOAD}"
160 -+alias su="su -c '@CU_BASH@ -rcfile ${SANDBOX_PROFILE}'"
161 -+
162 -+declare -r SANDBOX_ACTIVE
163 -diff -ruN sandbox-1.2.17.orig/data/sandbox.profile.in sandbox-1.2.17/data/sandbox.profile.in
164 ---- sandbox-1.2.17.orig/data/sandbox.profile.in 1970-01-01 01:00:00.000000000 +0100
165 -+++ sandbox-1.2.17/data/sandbox.profile.in 2006-07-27 16:12:05.000000000 +0200
166 -@@ -0,0 +1,7 @@
167 -+# Copyright (C) 2001 Michael Haubenwallner, Salomon Automation, http://www.salomon.at
168 -+# Distributed under the terms of the GNU General Public License, v2 or later
169 -+# Author : Michael Haubenwallner <michael.haubenwallner@×××××××.at>
170 -+# $Header$
171 -+
172 -+source @sysconfdir@/profile
173 -+source "${SANDBOX_BASHRC}"
174 -diff -ruN sandbox-1.2.17.orig/src/Makefile.am sandbox-1.2.17/src/Makefile.am
175 ---- sandbox-1.2.17.orig/src/Makefile.am 2005-12-05 14:16:52.000000000 +0100
176 -+++ sandbox-1.2.17/src/Makefile.am 2006-07-27 16:12:05.000000000 +0200
177 -@@ -7,6 +7,7 @@
178 - -DPIC -fPIC -D_REENTRANT \
179 - -DLIBSANDBOX_PATH=\"$(libdir)\" \
180 - -DSANDBOX_BASHRC_PATH=\"$(pkgdatadir)\" \
181 -+ -DLOCALSTATEDIR=\"$(localstatedir)\" \
182 - -I$(top_srcdir) -Wall
183 -
184 - LOCAL_INCLUDES = $(top_srcdir)/localdecls.h
185 -diff -ruN sandbox-1.2.17.orig/src/sandbox.c sandbox-1.2.17/src/sandbox.c
186 ---- sandbox-1.2.17.orig/src/sandbox.c 2005-12-05 14:15:45.000000000 +0100
187 -+++ sandbox-1.2.17/src/sandbox.c 2006-07-27 16:12:05.000000000 +0200
188 -@@ -33,6 +33,7 @@
189 - char sandbox_debug_log[SB_PATH_MAX];
190 - char sandbox_lib[SB_PATH_MAX];
191 - char sandbox_rc[SB_PATH_MAX];
192 -+ char sandbox_profile[SB_PATH_MAX];
193 - char work_dir[SB_PATH_MAX];
194 - char var_tmp_dir[SB_PATH_MAX];
195 - char tmp_dir[SB_PATH_MAX];
196 -@@ -81,6 +82,9 @@
197 - /* Generate sandbox bashrc path */
198 - get_sandbox_rc(sandbox_info->sandbox_rc);
199 -
200 -+ /* Generate sandbox bashprofile path */
201 -+ get_sandbox_profile(sandbox_info->sandbox_profile);
202 -+
203 - /* Generate sandbox log full path */
204 - get_sandbox_log(sandbox_info->sandbox_log);
205 - if (1 == exists(sandbox_info->sandbox_log)) {
206 -@@ -278,6 +282,7 @@
207 - unsetenv(ENV_SANDBOX_ON);
208 - unsetenv(ENV_SANDBOX_LIB);
209 - unsetenv(ENV_SANDBOX_BASHRC);
210 -+ unsetenv(ENV_SANDBOX_PROFILE);
211 - unsetenv(ENV_SANDBOX_LOG);
212 - unsetenv(ENV_SANDBOX_DEBUG_LOG);
213 -
214 -@@ -322,6 +327,7 @@
215 - sandbox_setenv(new_environ, ENV_SANDBOX_ON, "1");
216 - sandbox_setenv(new_environ, ENV_SANDBOX_LIB, sandbox_info->sandbox_lib);
217 - sandbox_setenv(new_environ, ENV_SANDBOX_BASHRC, sandbox_info->sandbox_rc);
218 -+ sandbox_setenv(new_environ, ENV_SANDBOX_PROFILE, sandbox_info->sandbox_profile);
219 - sandbox_setenv(new_environ, ENV_SANDBOX_LOG, sandbox_info->sandbox_log);
220 - sandbox_setenv(new_environ, ENV_SANDBOX_DEBUG_LOG,
221 - sandbox_info->sandbox_debug_log);
222 -@@ -458,6 +464,11 @@
223 - exit(EXIT_FAILURE);
224 - }
225 -
226 -+ if (0 >= exists(sandbox_info.sandbox_profile)) {
227 -+ perror("sandbox: Could not open the sandbox profile file");
228 -+ exit(EXIT_FAILURE);
229 -+ }
230 -+
231 - /* set up the required environment variables */
232 - if (print_debug)
233 - printf("Setting up the required environment variables.\n");
234 -@@ -476,7 +487,7 @@
235 - argv_bash = (char **)malloc(6 * sizeof(char *));
236 - argv_bash[0] = strdup("/bin/bash");
237 - argv_bash[1] = strdup("-rcfile");
238 -- argv_bash[2] = strdup(sandbox_info.sandbox_rc);
239 -+ argv_bash[2] = strdup(sandbox_info.sandbox_profile);
240 -
241 - if (argc < 2)
242 - argv_bash[3] = NULL;
243 -diff -ruN sandbox-1.2.17.orig/src/sandbox.h sandbox-1.2.17/src/sandbox.h
244 ---- sandbox-1.2.17.orig/src/sandbox.h 2005-12-05 14:23:13.000000000 +0100
245 -+++ sandbox-1.2.17/src/sandbox.h 2006-07-27 16:12:05.000000000 +0200
246 -@@ -17,10 +17,11 @@
247 - #define LD_PRELOAD_FILE "/etc/ld.so.preload"
248 - #define LIB_NAME "libsandbox.so"
249 - #define BASHRC_NAME "sandbox.bashrc"
250 -+#define BASHPROFILE_NAME "sandbox.profile"
251 - #define TMPDIR "/tmp"
252 --#define VAR_TMPDIR "/var/tmp"
253 --#define PORTAGE_TMPDIR "/var/tmp/portage"
254 --#define SANDBOX_LOG_LOCATION "/var/log/sandbox"
255 -+#define VAR_TMPDIR LOCALSTATEDIR "/tmp"
256 -+#define PORTAGE_TMPDIR VAR_TMPDIR "/portage"
257 -+#define SANDBOX_LOG_LOCATION LOCALSTATEDIR "/log/sandbox"
258 - #define LOG_FILE_PREFIX "/sandbox-"
259 - #define DEBUG_LOG_FILE_PREFIX "/sandbox-debug-"
260 - #define LOG_FILE_EXT ".log"
261 -@@ -38,6 +39,7 @@
262 -
263 - #define ENV_SANDBOX_LIB "SANDBOX_LIB"
264 - #define ENV_SANDBOX_BASHRC "SANDBOX_BASHRC"
265 -+#define ENV_SANDBOX_PROFILE "SANDBOX_PROFILE"
266 - #define ENV_SANDBOX_LOG "SANDBOX_LOG"
267 - #define ENV_SANDBOX_DEBUG_LOG "SANDBOX_DEBUG_LOG"
268 -
269 -diff -ruN sandbox-1.2.17.orig/src/sandbox_utils.c sandbox-1.2.17/src/sandbox_utils.c
270 ---- sandbox-1.2.17.orig/src/sandbox_utils.c 2005-12-05 09:36:32.000000000 +0100
271 -+++ sandbox-1.2.17/src/sandbox_utils.c 2006-07-27 16:12:05.000000000 +0200
272 -@@ -42,6 +42,11 @@
273 - snprintf(path, SB_PATH_MAX, "%s/%s", SANDBOX_BASHRC_PATH, BASHRC_NAME);
274 - }
275 -
276 -+void get_sandbox_profile(char *path)
277 -+{
278 -+ snprintf(path, SB_PATH_MAX, "%s/%s", SANDBOX_BASHRC_PATH, BASHPROFILE_NAME);
279 -+}
280 -+
281 - void get_sandbox_log(char *path)
282 - {
283 - char *sandbox_log_env = NULL;
284 ---- sandbox-1.2.17/data/Makefile.am.orig 2006-07-27 16:25:09.000000000 +0200
285 -+++ sandbox-1.2.17/data/Makefile.am 2006-07-27 16:25:18.000000000 +0200
286 -@@ -1,3 +1 @@
287 --dist_pkgdata_DATA = sandbox.bashrc
288 --
289 --EXTRA_DIST = sandbox.bashrc
290 -+dist_pkgdata_DATA = sandbox.bashrc sandbox.profile
291 -diff -ru sandbox-1.2.17.orig/configure.ac sandbox-1.2.17/configure.ac
292 ---- sandbox-1.2.17.orig/configure.ac 2005-12-05 15:03:35.000000000 +0100
293 -+++ sandbox-1.2.17/configure.ac 2006-07-21 13:12:39.000000000 +0200
294 -@@ -10,6 +10,8 @@
295 - AC_PROG_MAKE_SET
296 - AC_PROG_AWK
297 - AC_CHECK_PROGS([READELF], [readelf], [false])
298 -+AC_PATH_PROGS([CU_BASH], [bash], [/bin/bash])
299 -+AC_DEFINE_UNQUOTED([CU_BASH], ["${CU_BASH}"], [path to bash binary])
300 -
301 - AC_ENABLE_SHARED
302 - AC_DISABLE_STATIC
303 -diff -ru sandbox-1.2.17.orig/src/sandbox.c sandbox-1.2.17/src/sandbox.c
304 ---- sandbox-1.2.17.orig/src/sandbox.c 2005-12-05 14:15:45.000000000 +0100
305 -+++ sandbox-1.2.17/src/sandbox.c 2006-07-21 13:15:29.000000000 +0200
306 -@@ -474,7 +474,7 @@
307 - chdir(sandbox_info.work_dir);
308 -
309 - argv_bash = (char **)malloc(6 * sizeof(char *));
310 -- argv_bash[0] = strdup("/bin/bash");
311 -+ argv_bash[0] = strdup(CU_BASH);
312 - argv_bash[1] = strdup("-rcfile");
313 - argv_bash[2] = strdup(sandbox_info.sandbox_rc);
314 -
315
316 diff --git a/sys-apps/sandbox/files/sandbox-1.2.18.1-open-cloexec.patch b/sys-apps/sandbox/files/sandbox-1.2.18.1-open-cloexec.patch
317 deleted file mode 100644
318 index 806f1a3a67..0000000000
319 --- a/sys-apps/sandbox/files/sandbox-1.2.18.1-open-cloexec.patch
320 +++ /dev/null
321 @@ -1,15 +0,0 @@
322 -http://bugs.gentoo.org/196720
323 -
324 -mark the new "e" fopen() flag as safe
325 -
326 ---- sandbox-1.2.18.1/src/libsandbox.c
327 -+++ sandbox-1.2.18.1/src/libsandbox.c
328 -@@ -1595,7 +1595,7 @@
329 - {
330 - if (*mode == 'r' && (0 == (strcmp(mode, "r")) ||
331 - /* The strspn accept args are known non-writable modifiers */
332 -- (strlen(++mode) == strspn(mode, "xbtmc")))) {
333 -+ (strlen(++mode) == strspn(mode, "xbtmce")))) {
334 - return before_syscall("open_rd", file);
335 - } else {
336 - return before_syscall("open_wr", file);
337
338 diff --git a/sys-apps/sandbox/files/sandbox-1.2.18.1-open-normal-fail.patch b/sys-apps/sandbox/files/sandbox-1.2.18.1-open-normal-fail.patch
339 deleted file mode 100644
340 index 49b57e41a1..0000000000
341 --- a/sys-apps/sandbox/files/sandbox-1.2.18.1-open-normal-fail.patch
342 +++ /dev/null
343 @@ -1,99 +0,0 @@
344 -Patch from Kevin F. Quinn at https://bugs.gentoo.org/show_bug.cgi?id=135745
345 -Already applied in sandbox svn
346 -
347 -Makes sandboxed open() calls return the normal error conditions if the
348 -file in question does not exist, without causing a sandbox violation.
349 -This allows programs to use open() to test for file existance, regardless
350 -of read-write flags. This is not revealing any further information about
351 -the backing system because this data was already available through stat().
352 -
353 -Index: src/libsandbox.c
354 -===================================================================
355 ---- src/libsandbox.c.orig
356 -+++ src/libsandbox.c
357 -@@ -80,6 +80,9 @@
358 - #define FUNCTION_SANDBOX_SAFE_ACCESS(_func, _path, _flags) \
359 - ((0 == is_sandbox_on()) || (1 == before_syscall_access(_func, _path, _flags)))
360 -
361 -+#define FUNCTION_SANDBOX_FAIL_OPEN_INT(_func, _path, _flags) \
362 -+ ((0 == is_sandbox_on()) || (1 == before_syscall_open_int(_func, _path, _flags)))
363 -+
364 - #define FUNCTION_SANDBOX_SAFE_OPEN_INT(_func, _path, _flags) \
365 - ((0 == is_sandbox_on()) || (1 == before_syscall_open_int(_func, _path, _flags)))
366 -
367 -@@ -388,6 +391,16 @@ static FILE * (*true_ ## _name) (const c
368 - FILE *_name(const char *pathname, const char *mode) \
369 - { \
370 - FILE *result = NULL; \
371 -+ int my_errno = errno; \
372 -+ struct stat st; \
373 -+\
374 -+ if (mode!=NULL && mode[0]=='r') { \
375 -+ /* If we're trying to read, fail normally if file does not stat */\
376 -+ if (-1 == stat(pathname, &st)) { \
377 -+ return NULL; \
378 -+ } \
379 -+ } \
380 -+ errno = my_errno; \
381 - \
382 - if FUNCTION_SANDBOX_SAFE_OPEN_CHAR("fopen", pathname, mode) { \
383 - check_dlsym(_name); \
384 -@@ -561,12 +574,20 @@ int _name(const char *pathname, int flag
385 - va_list ap; \
386 - int mode = 0; \
387 - int result = -1; \
388 -+ int my_errno = errno; \
389 -+ struct stat st; \
390 - \
391 - if (flags & O_CREAT) { \
392 - va_start(ap, flags); \
393 - mode = va_arg(ap, int); \
394 - va_end(ap); \
395 -+ } else { \
396 -+ /* If we're not trying to create, fail normally if file does not stat */\
397 -+ if (-1 == stat(pathname, &st)) { \
398 -+ return -1; \
399 -+ } \
400 - } \
401 -+ errno = my_errno; \
402 - \
403 - if FUNCTION_SANDBOX_SAFE_OPEN_INT("open", pathname, flags) { \
404 - check_dlsym(_name); \
405 -@@ -726,6 +747,16 @@ static FILE * (*true_ ## _name) (const c
406 - FILE *_name(const char *pathname, const char *mode) \
407 - { \
408 - FILE *result = NULL; \
409 -+ int my_errno = errno; \
410 -+ struct stat64 st; \
411 -+\
412 -+ if (mode!=NULL && mode[0]=='r') { \
413 -+ /* If we're trying to read, fail normally if file does not stat */\
414 -+ if (-1 == stat64(pathname, &st)) { \
415 -+ return NULL; \
416 -+ } \
417 -+ } \
418 -+ errno = my_errno; \
419 - \
420 - if FUNCTION_SANDBOX_SAFE_OPEN_CHAR("fopen64", pathname, mode) { \
421 - check_dlsym(_name); \
422 -@@ -746,12 +777,20 @@ int _name(const char *pathname, int flag
423 - va_list ap; \
424 - int mode = 0; \
425 - int result = -1; \
426 -+ int my_errno = errno; \
427 -+ struct stat64 st; \
428 - \
429 - if (flags & O_CREAT) { \
430 - va_start(ap, flags); \
431 - mode = va_arg(ap, int); \
432 - va_end(ap); \
433 -+ } else { \
434 -+ /* If we're not trying to create, fail normally if file does not stat */\
435 -+ if (-1 == stat64(pathname, &st)) { \
436 -+ return -1; \
437 -+ } \
438 - } \
439 -+ errno = my_errno; \
440 - \
441 - if FUNCTION_SANDBOX_SAFE_OPEN_INT("open64", pathname, flags) { \
442 - check_dlsym(_name); \
443
444 diff --git a/sys-apps/sandbox/files/sandbox-1.2.18.1-rtld-validation.patch b/sys-apps/sandbox/files/sandbox-1.2.18.1-rtld-validation.patch
445 deleted file mode 100644
446 index 36e96f5779..0000000000
447 --- a/sys-apps/sandbox/files/sandbox-1.2.18.1-rtld-validation.patch
448 +++ /dev/null
449 @@ -1,43 +0,0 @@
450 -From: Robin H. Johnson <robbat2@g.o>
451 -Gentoo-Bug: 206678
452 -X-Gentoo-URL: http://bugs.gentoo.org/show_bug.cgi?id=206678
453 -Signed-off-by: Robin H. Johnson <robbat2@g.o>
454 -
455 -Based on a previous revision by solar@g.o.
456 -It seems that on hardened systems, USE_RTLD_NEXT is not always usable, and this
457 -trips up sandbox.
458 -
459 -diff -Nuar sandbox-1.2.18.1.orig/src/libsandbox.c sandbox-1.2.18.1/src/libsandbox.c
460 ---- sandbox-1.2.18.1.orig/src/libsandbox.c 2008-06-27 16:15:53.000000000 +0000
461 -+++ sandbox-1.2.18.1/src/libsandbox.c 2008-06-27 16:20:26.000000000 +0000
462 -@@ -192,18 +192,24 @@
463 - {
464 - void *symaddr = NULL;
465 -
466 -- if (NULL == libc_handle) {
467 --#if !defined(USE_RTLD_NEXT)
468 -+#if defined(USE_RTLD_NEXT)
469 -+ libc_handle = RTLD_NEXT;
470 -+#endif
471 -+
472 -+ /* Checking for -1UL is significent on hardened!
473 -+ * USE_RTLD_NEXT returns it as a sign of being unusable.
474 -+ * However using !x or NULL checks does NOT pick it up!
475 -+ */
476 -+#define INVALID_LIBC_HANDLE(x) (!x || NULL == x || -1UL == x)
477 -+ if (INVALID_LIBC_HANDLE(libc_handle)) {
478 - libc_handle = dlopen(LIBC_VERSION, RTLD_LAZY);
479 -- if (!libc_handle) {
480 -+ if (INVALID_LIBC_HANDLE(libc_handle)) {
481 - fprintf(stderr, "libsandbox: Can't dlopen libc: %s\n",
482 - dlerror());
483 - exit(EXIT_FAILURE);
484 - }
485 --#else
486 -- libc_handle = RTLD_NEXT;
487 --#endif
488 - }
489 -+#undef INVALID_LIBC_HANDLE
490 -
491 - if (NULL == symver)
492 - symaddr = dlsym(libc_handle, symname);
493
494 diff --git a/sys-apps/sandbox/files/sandbox-1.2.20_alpha2-parallel.patch b/sys-apps/sandbox/files/sandbox-1.2.20_alpha2-parallel.patch
495 deleted file mode 100644
496 index cbf769fc4e..0000000000
497 --- a/sys-apps/sandbox/files/sandbox-1.2.20_alpha2-parallel.patch
498 +++ /dev/null
499 @@ -1,12 +0,0 @@
500 -http://bugs.gentooorg/190051
501 -
502 ---- libsandbox/Makefile.in
503 -+++ libsandbox/Makefile.in
504 -@@ -517,6 +517,7 @@
505 -
506 -
507 - libsandbox.c: libsandbox.map symbols.h
508 -+wrappers.c: symbols.h
509 -
510 - libsandbox.map: $(SYMBOLS_FILE) $(GEN_VERSION_MAP_SCRIPT)
511 - @echo "Generating $@"; \
512
513 diff --git a/sys-apps/sandbox/files/sandbox-1.6-disable-pthread.patch b/sys-apps/sandbox/files/sandbox-1.6-disable-pthread.patch
514 deleted file mode 100644
515 index 490bc41c0e..0000000000
516 --- a/sys-apps/sandbox/files/sandbox-1.6-disable-pthread.patch
517 +++ /dev/null
518 @@ -1,37 +0,0 @@
519 -http://bugs.gentoo.org/263657
520 -
521 -disable pthread locks ... this is how stable has always worked, so there
522 -wont be any regressions ...
523 -
524 -diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
525 -index 034d0e7..595d17f 100644
526 ---- a/libsandbox/libsandbox.c
527 -+++ b/libsandbox/libsandbox.c
528 -@@ -814,9 +814,6 @@
529 - return result;
530 - }
531 -
532 --/* Need to protect the global sbcontext structure */
533 --static pthread_mutex_t sb_syscall_lock = PTHREAD_MUTEX_INITIALIZER;
534 --
535 - bool before_syscall(int dirfd, int sb_nr, const char *func, const char *file, int flags)
536 - {
537 - int old_errno = errno;
538 -@@ -843,8 +840,6 @@
539 - file = at_file_buf;
540 - }
541 -
542 -- pthread_mutex_lock(&sb_syscall_lock);
543 --
544 - if (!sb_init) {
545 - init_context(&sbcontext);
546 - sb_init = true;
547 -@@ -885,8 +880,6 @@
548 -
549 - result = check_syscall(&sbcontext, sb_nr, func, file, flags);
550 -
551 -- pthread_mutex_unlock(&sb_syscall_lock);
552 --
553 - if (0 == result) {
554 - if ((NULL != getenv(ENV_SANDBOX_PID)) && (is_env_on(ENV_SANDBOX_ABORT)))
555 -
556
557 diff --git a/sys-apps/sandbox/files/sandbox-1.6-disable-qa-static.patch b/sys-apps/sandbox/files/sandbox-1.6-disable-qa-static.patch
558 deleted file mode 100644
559 index 754ef01968..0000000000
560 --- a/sys-apps/sandbox/files/sandbox-1.6-disable-qa-static.patch
561 +++ /dev/null
562 @@ -1,13 +0,0 @@
563 -sandbox-1.7 traces static apps so disable the qa notice as it just scares
564 -users ... dont want scary stuff in stable!
565 -
566 ---- libsandbox/wrapper-funcs/__wrapper_exec.c
567 -+++ libsandbox/wrapper-funcs/__wrapper_exec.c
568 -@@ -221,7 +221,6 @@
569 - if (!FUNCTION_SANDBOX_SAFE(path))
570 - return result;
571 -
572 -- sb_check_exec(path, argv);
573 - }
574 - #endif
575 -
576
577 diff --git a/sys-apps/sandbox/files/sandbox-1.9-setoptions.patch b/sys-apps/sandbox/files/sandbox-1.9-setoptions.patch
578 deleted file mode 100644
579 index 34e8722697..0000000000
580 --- a/sys-apps/sandbox/files/sandbox-1.9-setoptions.patch
581 +++ /dev/null
582 @@ -1,15 +0,0 @@
583 - Fix undefined PTRACE_SETOPTIONS error, patch by grobian
584 -
585 -diff --git a/libsandbox/trace.c b/libsandbox/trace.c
586 -index 7c5ec17..eaf520f 100644
587 ---- a/libsandbox/trace.c
588 -+++ b/libsandbox/trace.c
589 -@@ -425,7 +425,7 @@ void trace_main(const char *filename, char *const argv[])
590 - SB_DEBUG("parent waiting for child (pid=%i) to signal", trace_pid);
591 - while (!child_stopped)
592 - sched_yield();
593 --#ifdef PTRACE_O_TRACESYSGOOD
594 -+#if defined(PTRACE_O_TRACESYSGOOD) && defined(PTRACE_SETOPTIONS)
595 - /* Not all kernel versions support this, so ignore return */
596 - ptrace(PTRACE_SETOPTIONS, trace_pid, NULL, (void *)PTRACE_O_TRACESYSGOOD);
597 - #endif
598
599 diff --git a/sys-apps/sandbox/files/sandbox-2.0-prefix.patch b/sys-apps/sandbox/files/sandbox-2.0-prefix.patch
600 deleted file mode 100644
601 index 5e32912f6b..0000000000
602 --- a/sys-apps/sandbox/files/sandbox-2.0-prefix.patch
603 +++ /dev/null
604 @@ -1,37 +0,0 @@
605 -* heiko's way of getting this thing going
606 -http://repo.or.cz/w/heikos-i-prolly-break-your-prefix-overlay.git?a=blob;f=sys-apps/sandbox/files/sandbox-2.0-prefix.patch;h=7b4f568679522682ba784853829a0f2b1272b21d;hb=HEAD
607 -
608 -diff --git a/libsbutil/get_sandbox_lib.c b/libsbutil/get_sandbox_lib.c
609 -index b64a5ac..1cf4832 100644
610 ---- a/libsbutil/get_sandbox_lib.c
611 -+++ b/libsbutil/get_sandbox_lib.c
612 -@@ -22,6 +22,7 @@
613 - void get_sandbox_lib(char *path)
614 - {
615 - save_errno();
616 -+#ifndef GENTOO_PREFIX
617 - strcpy(path, LIB_NAME);
618 - if (strncmp("/usr/lib", LIBSANDBOX_PATH, 8)) {
619 - void *hndl = dlopen(path, RTLD_LAZY);
620 -@@ -30,5 +31,10 @@ void get_sandbox_lib(char *path)
621 - else
622 - dlclose(hndl);
623 - }
624 -+#else
625 -+ /* Gentoo Prefix always needs the absolute path due to DT_R*PATH usage
626 -+ * within dlopen(). */
627 -+ snprintf(path, SB_PATH_MAX, "%s/%s", LIBSANDBOX_PATH, LIB_NAME);
628 -+#endif
629 - restore_errno();
630 - }
631 ---- a/etc/sandbox.d/00default.orig 2009-06-22 14:10:30.000000000 +0200
632 -+++ a/etc/sandbox.d/00default 2009-06-22 14:11:41.000000000 +0200
633 -@@ -14,7 +14,7 @@
634 - # Finally add current directory if interactive
635 - SANDBOX_WRITE="${SANDBOX_WORKDIR}"
636 - # Needed for configure tests
637 --SANDBOX_WRITE="/usr/tmp/conftest:/usr/lib/conftest:/usr/lib32/conftest:/usr/lib64/conftest:/usr/tmp/cf:/usr/lib/cf:/usr/lib32/cf:/usr/lib64/cf"
638 -+SANDBOX_WRITE="@GENTOO_PORTAGE_EPREFIX@/usr/tmp/conftest:@GENTOO_PORTAGE_EPREFIX@/usr/lib/conftest:@GENTOO_PORTAGE_EPREFIX@/usr/lib32/conftest:@GENTOO_PORTAGE_EPREFIX@/usr/lib64/conftest:@GENTOO_PORTAGE_EPREFIX@/usr/tmp/cf:@GENTOO_PORTAGE_EPREFIX@/usr/lib/cf:@GENTOO_PORTAGE_EPREFIX@/usr/lib32/cf:@GENTOO_PORTAGE_EPREFIX@/usr/lib64/cf"
639 -
640 - # Usually writes in /home should not cause violations
641 - SANDBOX_PREDICT="${HOME}"
642
643 diff --git a/sys-apps/sandbox/files/sandbox-2.0-setoptions.patch b/sys-apps/sandbox/files/sandbox-2.0-setoptions.patch
644 deleted file mode 100644
645 index 9430dbb9e8..0000000000
646 --- a/sys-apps/sandbox/files/sandbox-2.0-setoptions.patch
647 +++ /dev/null
648 @@ -1,11 +0,0 @@
649 ---- libsandbox/trace.c.old 2009-06-30 10:11:40.000000000 -0500
650 -+++ libsandbox/trace.c 2009-06-30 10:11:58.000000000 -0500
651 -@@ -476,7 +476,7 @@
652 - } else if (trace_pid) {
653 - SB_DEBUG("parent waiting for child (pid=%i) to signal", trace_pid);
654 - waitpid(trace_pid, NULL, 0);
655 --#ifdef PTRACE_O_TRACESYSGOOD
656 -+#if defined(PTRACE_SETOPTIONS) && defined(PTRACE_O_TRACESYSGOOD)
657 - /* Not all kernel versions support this, so ignore return */
658 - ptrace(PTRACE_SETOPTIONS, trace_pid, NULL, (void *)PTRACE_O_TRACESYSGOOD);
659 - #endif
660
661 diff --git a/sys-apps/sandbox/files/sandbox-2.2-prefix.patch b/sys-apps/sandbox/files/sandbox-2.2-prefix.patch
662 deleted file mode 100644
663 index 0cd5f3fbf1..0000000000
664 --- a/sys-apps/sandbox/files/sandbox-2.2-prefix.patch
665 +++ /dev/null
666 @@ -1,26 +0,0 @@
667 -* heiko's way of getting this thing going
668 -http://repo.or.cz/w/heikos-i-prolly-break-your-prefix-overlay.git?a=blob;f=sys-apps/sandbox/files/sandbox-2.0-prefix.patch;h=7b4f568679522682ba784853829a0f2b1272b21d;hb=HEAD
669 -
670 -diff --git a/libsbutil/get_sandbox_lib.c b/libsbutil/get_sandbox_lib.c
671 -index b64a5ac..1cf4832 100644
672 ---- a/libsbutil/get_sandbox_lib.c
673 -+++ b/libsbutil/get_sandbox_lib.c
674 -@@ -22,6 +22,7 @@
675 - void get_sandbox_lib(char *path)
676 - {
677 - save_errno();
678 -+#ifndef GENTOO_PREFIX
679 - strcpy(path, LIB_NAME);
680 - if (strncmp("/usr/lib", LIBSANDBOX_PATH, 8)) {
681 - void *hndl = dlopen(path, RTLD_LAZY);
682 -@@ -30,5 +31,10 @@ void get_sandbox_lib(char *path)
683 - else
684 - dlclose(hndl);
685 - }
686 -+#else
687 -+ /* Gentoo Prefix always needs the absolute path due to DT_R*PATH usage
688 -+ * within dlopen(). */
689 -+ snprintf(path, SB_PATH_MAX, "%s/%s", LIBSANDBOX_PATH, LIB_NAME);
690 -+#endif
691 - restore_errno();
692 - }
693
694 diff --git a/sys-apps/sandbox/files/sandbox-2.6-trace-hppa.patch b/sys-apps/sandbox/files/sandbox-2.6-trace-hppa.patch
695 deleted file mode 100644
696 index 7e73822865..0000000000
697 --- a/sys-apps/sandbox/files/sandbox-2.6-trace-hppa.patch
698 +++ /dev/null
699 @@ -1,27 +0,0 @@
700 -From 7b01f6103a9baddaf0252e7f850a4cef91a48b67 Mon Sep 17 00:00:00 2001
701 -From: Mike Frysinger <vapier@g.o>
702 -Date: Fri, 6 Jul 2012 14:58:16 -0400
703 -Subject: [PATCH] libsandbox: fix hppa trace code
704 -
705 -URL: https://bugs.gentoo.org/425062
706 -Reported-by: Jeroen Roovers <jer@g.o>
707 -Signed-off-by: Mike Frysinger <vapier@g.o>
708 ----
709 - libsandbox/trace/linux/hppa.c | 4 ++--
710 - 1 file changed, 2 insertions(+), 2 deletions(-)
711 -
712 -diff --git a/libsandbox/trace/linux/hppa.c b/libsandbox/trace/linux/hppa.c
713 -index d23b0d1..5414354 100644
714 ---- a/libsandbox/trace/linux/hppa.c
715 -+++ b/libsandbox/trace/linux/hppa.c
716 -@@ -1,5 +1,5 @@
717 --#define trace_reg_sysnum (20 * 4) /* PT_GR20 */
718 --#define trace_reg_ret (28 * 4) /* PT_GR28 */
719 -+#define trace_reg_sysnum gr[20]
720 -+#define trace_reg_ret gr[28]
721 -
722 - static unsigned long trace_arg(void *vregs, int num)
723 - {
724 ---
725 -1.7.9.7
726 -
727
728 diff --git a/sys-apps/sandbox/metadata.xml b/sys-apps/sandbox/metadata.xml
729 deleted file mode 100644
730 index ebbf8300de..0000000000
731 --- a/sys-apps/sandbox/metadata.xml
732 +++ /dev/null
733 @@ -1,11 +0,0 @@
734 -<?xml version="1.0" encoding="UTF-8"?>
735 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
736 -<pkgmetadata>
737 -
738 -<!-- portage lacks a herd. correct this when we have one. -->
739 -
740 -<maintainer type="project">
741 - <email>sandbox@g.o</email>
742 - <description>Sandbox Maintainers</description>
743 -</maintainer>
744 -</pkgmetadata>
745
746 diff --git a/sys-apps/sandbox/sandbox-1.6-r2.ebuild b/sys-apps/sandbox/sandbox-1.6-r2.ebuild
747 deleted file mode 100644
748 index cdf0643ff5..0000000000
749 --- a/sys-apps/sandbox/sandbox-1.6-r2.ebuild
750 +++ /dev/null
751 @@ -1,104 +0,0 @@
752 -# Copyright 1999-2017 Gentoo Foundation
753 -# Distributed under the terms of the GNU General Public License v2
754 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sandbox/sandbox-1.6-r2.ebuild,v 1.17 2012/03/30 15:58:53 aballier Exp $
755 -
756 -#
757 -# don't monkey with this ebuild unless contacting portage devs.
758 -# period.
759 -#
760 -
761 -inherit eutils flag-o-matic toolchain-funcs multilib unpacker
762 -
763 -DESCRIPTION="sandbox'd LD_PRELOAD hack"
764 -HOMEPAGE="http://www.gentoo.org/"
765 -SRC_URI="mirror://gentoo/${P}.tar.lzma
766 - http://dev.gentoo.org/~vapier/dist/${P}.tar.lzma"
767 -
768 -LICENSE="GPL-2"
769 -SLOT="0"
770 -KEYWORDS="~amd64-linux ~x86-linux"
771 -IUSE=""
772 -
773 -DEPEND="app-arch/xz-utils
774 - >=app-misc/pax-utils-0.1.19" #265376
775 -RDEPEND=""
776 -
777 -EMULTILIB_PKG="true"
778 -has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice"
779 -
780 -sandbox_death_notice() {
781 - ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:"
782 - ewarn "FEATURES=-sandbox emerge sandbox"
783 -}
784 -
785 -src_unpack() {
786 - unpacker_src_unpack
787 - cd "${S}"
788 - epatch "${FILESDIR}"/${P}-disable-qa-static.patch
789 - epatch "${FILESDIR}"/${P}-disable-pthread.patch
790 - epatch "${FILESDIR}"/0001-libsandbox-handle-more-at-functions.patch
791 -}
792 -
793 -src_compile() {
794 - filter-lfs-flags #90228
795 -
796 - local OABI=${ABI}
797 - for ABI in $(get_install_abis) ; do
798 - mkdir "${WORKDIR}/build-${ABI}"
799 - cd "${WORKDIR}/build-${ABI}"
800 -
801 - multilib_toolchain_setup ${ABI}
802 -
803 - einfo "Configuring sandbox for ABI=${ABI}..."
804 - ECONF_SOURCE="../${P}/" \
805 - econf ${myconf} || die
806 - einfo "Building sandbox for ABI=${ABI}..."
807 - emake || die
808 - done
809 - ABI=${OABI}
810 -}
811 -
812 -src_test() {
813 - local OABI=${ABI}
814 - for ABI in $(get_install_abis) ; do
815 - cd "${WORKDIR}/build-${ABI}"
816 - einfo "Checking sandbox for ABI=${ABI}..."
817 - emake check || die "make check failed for ${ABI}"
818 - done
819 - ABI=${OABI}
820 -}
821 -
822 -src_install() {
823 - local OABI=${ABI}
824 - for ABI in $(get_install_abis) ; do
825 - cd "${WORKDIR}/build-${ABI}"
826 - einfo "Installing sandbox for ABI=${ABI}..."
827 - emake DESTDIR="${D}" install || die "make install failed for ${ABI}"
828 - done
829 - ABI=${OABI}
830 -
831 - doenvd "${FILESDIR}"/09sandbox
832 -
833 - keepdir /var/log/sandbox
834 - use prefix || fowners root:portage /var/log/sandbox
835 - fperms 0770 /var/log/sandbox
836 -
837 - cd "${S}"
838 - dodoc AUTHORS ChangeLog* NEWS README
839 -}
840 -
841 -pkg_preinst() {
842 - use prefix || chown root:portage "${ED}"/var/log/sandbox
843 - chmod 0770 "${ED}"/var/log/sandbox
844 -
845 - local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*')
846 - if [[ -n ${old} ]] ; then
847 - elog "Removing old sandbox libraries for you:"
848 - elog ${old//${EROOT}}
849 - find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -exec rm -fv {} \;
850 - fi
851 -}
852 -
853 -pkg_postinst() {
854 - chmod 0755 "${EROOT}"/etc/sandbox.d #265376
855 -}
856
857 diff --git a/sys-apps/sandbox/sandbox-2.5.ebuild b/sys-apps/sandbox/sandbox-2.5.ebuild
858 deleted file mode 100644
859 index 6f4b7035a9..0000000000
860 --- a/sys-apps/sandbox/sandbox-2.5.ebuild
861 +++ /dev/null
862 @@ -1,126 +0,0 @@
863 -# Copyright 1999-2017 Gentoo Foundation
864 -# Distributed under the terms of the GNU General Public License v2
865 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sandbox/sandbox-2.5.ebuild,v 1.10 2012/06/24 05:35:02 vapier Exp $
866 -
867 -#
868 -# don't monkey with this ebuild unless contacting portage devs.
869 -# period.
870 -#
871 -
872 -inherit eutils flag-o-matic toolchain-funcs multilib unpacker multiprocessing prefix
873 -
874 -DESCRIPTION="sandbox'd LD_PRELOAD hack"
875 -HOMEPAGE="http://www.gentoo.org/"
876 -SRC_URI="mirror://gentoo/${P}.tar.xz
877 - http://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
878 -
879 -LICENSE="GPL-2"
880 -SLOT="0"
881 -KEYWORDS="~amd64-linux ~x86-linux"
882 -IUSE="multilib"
883 -
884 -DEPEND="app-arch/xz-utils
885 - >=app-misc/pax-utils-0.1.19" #265376
886 -RDEPEND=""
887 -
888 -EMULTILIB_PKG="true"
889 -has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice"
890 -
891 -sandbox_death_notice() {
892 - ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:"
893 - ewarn "FEATURES=-sandbox emerge sandbox"
894 -}
895 -
896 -sb_get_install_abis() { use multilib && get_install_abis || echo ${ABI:-default} ; }
897 -
898 -src_unpack() {
899 - unpacker_src_unpack
900 - cd "${S}"
901 - epatch "${FILESDIR}"/${PN}-2.2-prefix.patch
902 -}
903 -
904 -sb_foreach_abi() {
905 - # enable usage of absolute libpath in prefix
906 - use prefix && append-flags -DGENTOO_PREFIX
907 -
908 - local OABI=${ABI}
909 - for ABI in $(sb_get_install_abis) ; do
910 - cd "${WORKDIR}/build-${ABI}"
911 - einfo "Running $1 for ABI=${ABI}..."
912 - "$@"
913 - done
914 - ABI=${OABI}
915 -}
916 -
917 -sb_configure() {
918 - mkdir "${WORKDIR}/build-${ABI}"
919 - cd "${WORKDIR}/build-${ABI}"
920 -
921 - use multilib && multilib_toolchain_setup ${ABI}
922 -
923 - einfo "Configuring sandbox for ABI=${ABI}..."
924 - ECONF_SOURCE="../${P}/" \
925 - econf ${myconf} || die
926 -}
927 -
928 -sb_compile() {
929 - emake || die
930 -}
931 -
932 -src_compile() {
933 - filter-lfs-flags #90228
934 -
935 - # Run configures in parallel!
936 - multijob_init
937 - local OABI=${ABI}
938 - for ABI in $(sb_get_install_abis) ; do
939 - multijob_child_init sb_configure
940 - done
941 - ABI=${OABI}
942 - multijob_finish
943 -
944 - sb_foreach_abi sb_compile
945 -}
946 -
947 -sb_test() {
948 - emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" || die
949 -}
950 -
951 -src_test() {
952 - sb_foreach_abi sb_test
953 -}
954 -
955 -sb_install() {
956 - emake DESTDIR="${D}" install || die
957 - insinto /etc/sandbox.d #333131
958 - doins etc/sandbox.d/00default || die
959 -}
960 -
961 -src_install() {
962 - sb_foreach_abi sb_install
963 -
964 - doenvd "${FILESDIR}"/09sandbox
965 -
966 - keepdir /var/log/sandbox
967 - use prefix || fowners root:portage /var/log/sandbox
968 - fperms 0770 /var/log/sandbox
969 -
970 - cd "${S}"
971 - dodoc AUTHORS ChangeLog* NEWS README
972 -}
973 -
974 -pkg_preinst() {
975 - use prefix || chown root:portage "${ED}"/var/log/sandbox
976 - chmod 0770 "${ED}"/var/log/sandbox
977 -
978 - local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*')
979 - if [[ -n ${old} ]] ; then
980 - elog "Removing old sandbox libraries for you:"
981 - elog ${old//${EROOT}}
982 - find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -exec rm -fv {} \;
983 - fi
984 -}
985 -
986 -pkg_postinst() {
987 - chmod 0755 "${EROOT}"/etc/sandbox.d #265376
988 -}
989
990 diff --git a/sys-apps/sandbox/sandbox-2.6.ebuild b/sys-apps/sandbox/sandbox-2.6.ebuild
991 deleted file mode 100644
992 index 641076f31c..0000000000
993 --- a/sys-apps/sandbox/sandbox-2.6.ebuild
994 +++ /dev/null
995 @@ -1,132 +0,0 @@
996 -# Copyright 1999-2017 Gentoo Foundation
997 -# Distributed under the terms of the GNU General Public License v2
998 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sandbox/sandbox-2.6.ebuild,v 1.2 2012/07/06 19:53:10 vapier Exp $
999 -
1000 -#
1001 -# don't monkey with this ebuild unless contacting portage devs.
1002 -# period.
1003 -#
1004 -
1005 -inherit eutils flag-o-matic toolchain-funcs multilib unpacker multiprocessing prefix
1006 -
1007 -DESCRIPTION="sandbox'd LD_PRELOAD hack"
1008 -HOMEPAGE="http://www.gentoo.org/"
1009 -SRC_URI="mirror://gentoo/${P}.tar.xz
1010 - http://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
1011 -
1012 -LICENSE="GPL-2"
1013 -SLOT="0"
1014 -KEYWORDS="~amd64-linux ~x86-linux"
1015 -IUSE="multilib"
1016 -
1017 -DEPEND="app-arch/xz-utils
1018 - >=app-misc/pax-utils-0.1.19" #265376
1019 -RDEPEND=""
1020 -
1021 -EMULTILIB_PKG="true"
1022 -has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice"
1023 -
1024 -sandbox_death_notice() {
1025 - ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:"
1026 - ewarn "FEATURES=-sandbox emerge sandbox"
1027 -}
1028 -
1029 -sb_get_install_abis() { use multilib && get_install_abis || echo ${ABI:-default} ; }
1030 -
1031 -src_unpack() {
1032 - unpacker_src_unpack
1033 - cd "${S}"
1034 - epatch "${FILESDIR}"/${PN}-2.2-prefix.patch
1035 -}
1036 -
1037 -sb_foreach_abi() {
1038 - # enable usage of absolute libpath in prefix
1039 - use prefix && append-flags -DGENTOO_PREFIX
1040 -
1041 - local OABI=${ABI}
1042 - for ABI in $(sb_get_install_abis) ; do
1043 - cd "${WORKDIR}/build-${ABI}"
1044 - einfo "Running $1 for ABI=${ABI}..."
1045 - "$@"
1046 - done
1047 - ABI=${OABI}
1048 -}
1049 -
1050 -src_unpack() {
1051 - unpacker
1052 - cd "${S}"
1053 - epatch "${FILESDIR}"/${P}-trace-hppa.patch #425062
1054 -}
1055 -
1056 -sb_configure() {
1057 - mkdir "${WORKDIR}/build-${ABI}"
1058 - cd "${WORKDIR}/build-${ABI}"
1059 -
1060 - use multilib && multilib_toolchain_setup ${ABI}
1061 -
1062 - einfo "Configuring sandbox for ABI=${ABI}..."
1063 - ECONF_SOURCE="../${P}/" \
1064 - econf ${myconf} || die
1065 -}
1066 -
1067 -sb_compile() {
1068 - emake || die
1069 -}
1070 -
1071 -src_compile() {
1072 - filter-lfs-flags #90228
1073 -
1074 - # Run configures in parallel!
1075 - multijob_init
1076 - local OABI=${ABI}
1077 - for ABI in $(sb_get_install_abis) ; do
1078 - multijob_child_init sb_configure
1079 - done
1080 - ABI=${OABI}
1081 - multijob_finish
1082 -
1083 - sb_foreach_abi sb_compile
1084 -}
1085 -
1086 -sb_test() {
1087 - emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" || die
1088 -}
1089 -
1090 -src_test() {
1091 - sb_foreach_abi sb_test
1092 -}
1093 -
1094 -sb_install() {
1095 - emake DESTDIR="${D}" install || die
1096 - insinto /etc/sandbox.d #333131
1097 - doins etc/sandbox.d/00default || die
1098 -}
1099 -
1100 -src_install() {
1101 - sb_foreach_abi sb_install
1102 -
1103 - doenvd "${FILESDIR}"/09sandbox
1104 -
1105 - keepdir /var/log/sandbox
1106 - use prefix || fowners root:portage /var/log/sandbox
1107 - fperms 0770 /var/log/sandbox
1108 -
1109 - cd "${S}"
1110 - dodoc AUTHORS ChangeLog* NEWS README
1111 -}
1112 -
1113 -pkg_preinst() {
1114 - use prefix || chown root:portage "${ED}"/var/log/sandbox
1115 - chmod 0770 "${ED}"/var/log/sandbox
1116 -
1117 - local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*')
1118 - if [[ -n ${old} ]] ; then
1119 - elog "Removing old sandbox libraries for you:"
1120 - elog ${old//${EROOT}}
1121 - find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -exec rm -fv {} \;
1122 - fi
1123 -}
1124 -
1125 -pkg_postinst() {
1126 - chmod 0755 "${EROOT}"/etc/sandbox.d #265376
1127 -}