1 |
commit: 9ba2efa16a703d1ec7ddb3a9af80d3945b8be4bf |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 14 20:39:56 2019 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 14 20:40:46 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ba2efa1 |
7 |
|
8 |
sys-apps/findutils: Drop old |
9 |
|
10 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
sys-apps/findutils/Manifest | 2 - |
14 |
.../files/findutils-4.4.2-gnulib-date-x32.patch | 26 -- |
15 |
.../findutils/files/findutils-4.4.2-selinux.diff | 464 --------------------- |
16 |
sys-apps/findutils/findutils-4.4.2-r2.ebuild | 55 --- |
17 |
sys-apps/findutils/findutils-4.5.18.ebuild | 54 --- |
18 |
5 files changed, 601 deletions(-) |
19 |
|
20 |
diff --git a/sys-apps/findutils/Manifest b/sys-apps/findutils/Manifest |
21 |
index b758d6d8a67..5643ce25844 100644 |
22 |
--- a/sys-apps/findutils/Manifest |
23 |
+++ b/sys-apps/findutils/Manifest |
24 |
@@ -1,3 +1 @@ |
25 |
-DIST findutils-4.4.2.tar.gz 2149838 BLAKE2B be061487c8b50bbb8aa1e085dc46f9b71dcc465c884417531d56bda6dcf35746ec9c25f940ec660d83431787b88a3cb6931382326fdc3ab82575f236e9543163 SHA512 262d0a8301158e6541b9f24e4e043d8d8c1b196b18dbe59c3bedcf17b50c95708e33ab23a07e3bfb947ad495faafffdca3c296fb525794ca60f2dfd682f228c1 |
26 |
-DIST findutils-4.5.18.tar.gz 3870196 BLAKE2B 766c072aed143313460facf8179ff3645f441e8f1253a5e7b59d67e20207a060c074f17f0a839e60027810fed739839ffe066ff40e2e07fb23c6f20d326ec8d8 SHA512 2ae70cef9aee81d4402298db11890efa0ec38dba561dfc11afc9c91af7c1c6a7cca221f669c45b00e65eba53a8b08f5124ed4e862d9e26bcf69c48a927e6b398 |
27 |
DIST findutils-4.6.0.tar.gz 3780154 BLAKE2B cae93c4e6bac93fa374ffba18ada95b783335fa7f9f9491cdd1848cd9bb6781a98e7b0ae3677c88bb3052afca2e90e066e072ee0f67c407cb7b087b49831d799 SHA512 41fcd4197c1efbd77f7420e5754e2cf9332dfef19f90c65a8fa1844bb4bc5d529c8393ee0ff979a054e9ac65ff71d7fe3921ea079f9960843412fc9a71f8afd4 |
28 |
|
29 |
diff --git a/sys-apps/findutils/files/findutils-4.4.2-gnulib-date-x32.patch b/sys-apps/findutils/files/findutils-4.4.2-gnulib-date-x32.patch |
30 |
deleted file mode 100644 |
31 |
index 9ff86f6b84a..00000000000 |
32 |
--- a/sys-apps/findutils/files/findutils-4.4.2-gnulib-date-x32.patch |
33 |
+++ /dev/null |
34 |
@@ -1,26 +0,0 @@ |
35 |
-newer gnulib has rewritten these checks in a way that works for the x32, |
36 |
-and for the targets we care about, these checks won't return false. so |
37 |
-just drop them to make our life simpler. |
38 |
- |
39 |
-https://sites.google.com/site/x32abi/x32-patches |
40 |
- |
41 |
---- findutils-4.4.2/gnulib/lib/getdate.c.x32 2009-05-10 14:23:57.000000000 -0700 |
42 |
-+++ findutils-4.4.2/gnulib/lib/getdate.c 2011-12-05 11:41:18.130675712 -0800 |
43 |
-@@ -114,7 +114,6 @@ |
44 |
- wraps around, but there's no portable way to check for that at |
45 |
- compile-time. */ |
46 |
- verify (TYPE_IS_INTEGER (time_t)); |
47 |
--verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX); |
48 |
- |
49 |
- /* An integer value, and the number of digits in its textual |
50 |
- representation. */ |
51 |
---- findutils-4.4.2/gnulib/lib/mktime.c.x32 2009-05-10 14:25:13.000000000 -0700 |
52 |
-+++ findutils-4.4.2/gnulib/lib/mktime.c 2011-12-05 11:49:38.368589386 -0800 |
53 |
-@@ -166,7 +166,5 @@ ydhms_diff (long int year1, long int yda |
54 |
- { |
55 |
- verify (C99_integer_division, -1 / 2 == 0); |
56 |
-- verify (long_int_year_and_yday_are_wide_enough, |
57 |
-- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); |
58 |
- |
59 |
- /* Compute intervening leap days correctly even if year is negative. |
60 |
- Take care to avoid integer overflow here. */ |
61 |
|
62 |
diff --git a/sys-apps/findutils/files/findutils-4.4.2-selinux.diff b/sys-apps/findutils/files/findutils-4.4.2-selinux.diff |
63 |
deleted file mode 100644 |
64 |
index 66c9c412a0a..00000000000 |
65 |
--- a/sys-apps/findutils/files/findutils-4.4.2-selinux.diff |
66 |
+++ /dev/null |
67 |
@@ -1,464 +0,0 @@ |
68 |
-diff -purN findutils-4.4.2.orig/find/Makefile.am findutils-4.4.2/find/Makefile.am |
69 |
---- findutils-4.4.2.orig/find/Makefile.am 2009-05-16 15:17:01.000000000 +0000 |
70 |
-+++ findutils-4.4.2/find/Makefile.am 2010-04-25 03:58:33.762402367 +0000 |
71 |
-@@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS = std-options |
72 |
- localedir = $(datadir)/locale |
73 |
- # noinst_PROGRAMS = regexprops |
74 |
- # regexprops_SOURCES = regexprops.c |
75 |
-+DEFS = @DEFS@ -I. -I$(srcdir) -I.. -DWITH_SELINUX |
76 |
- |
77 |
- noinst_LIBRARIES = libfindtools.a |
78 |
- libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c |
79 |
-@@ -26,7 +27,7 @@ endif |
80 |
- |
81 |
- EXTRA_DIST = defs.h $(man_MANS) |
82 |
- INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\" |
83 |
--LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ |
84 |
-+LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ -lselinux |
85 |
- man_MANS = find.1 |
86 |
- SUBDIRS = . testsuite |
87 |
- |
88 |
-diff -purN findutils-4.4.2.orig/find/Makefile.in findutils-4.4.2/find/Makefile.in |
89 |
---- findutils-4.4.2.orig/find/Makefile.in 2009-05-16 15:28:13.000000000 +0000 |
90 |
-+++ findutils-4.4.2/find/Makefile.in 2010-04-25 03:58:33.762402367 +0000 |
91 |
-@@ -275,7 +275,7 @@ CPP = @CPP@ |
92 |
- CPPFLAGS = @CPPFLAGS@ |
93 |
- CYGPATH_W = @CYGPATH_W@ |
94 |
- DEFAULT_ARG_SIZE = @DEFAULT_ARG_SIZE@ |
95 |
--DEFS = @DEFS@ |
96 |
-+DEFS = @DEFS@ -I. -I$(srcdir) -I.. -DWITH_SELINUX |
97 |
- DEPDIR = @DEPDIR@ |
98 |
- DIRENT_H = @DIRENT_H@ |
99 |
- ECHO_C = @ECHO_C@ |
100 |
-@@ -607,7 +607,7 @@ libfindtools_a_SOURCES = finddata.c fsty |
101 |
- @WITH_FTS_TRUE@oldfind_SOURCES = find.c |
102 |
- @WITH_FTS_FALSE@ftsfind_SOURCES = ftsfind.c |
103 |
- EXTRA_DIST = defs.h $(man_MANS) |
104 |
--LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ |
105 |
-+LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ -lselinux |
106 |
- man_MANS = find.1 |
107 |
- SUBDIRS = . testsuite |
108 |
- all: all-recursive |
109 |
-diff -purN findutils-4.4.2.orig/find/defs.h findutils-4.4.2/find/defs.h |
110 |
---- findutils-4.4.2.orig/find/defs.h 2009-05-16 15:17:01.000000000 +0000 |
111 |
-+++ findutils-4.4.2/find/defs.h 2010-04-25 03:58:33.762402367 +0000 |
112 |
-@@ -91,6 +91,9 @@ int get_statinfo PARAMS((const char *pat |
113 |
- #define MODE_RWX (S_IXUSR | S_IXGRP | S_IXOTH | MODE_RW) |
114 |
- #define MODE_ALL (S_ISUID | S_ISGID | S_ISVTX | MODE_RWX) |
115 |
- |
116 |
-+#ifdef WITH_SELINUX |
117 |
-+#include <selinux/selinux.h> |
118 |
-+#endif /*WITH_SELINUX*/ |
119 |
- |
120 |
- struct predicate; |
121 |
- struct options; |
122 |
-@@ -315,6 +318,9 @@ struct predicate |
123 |
- struct samefile_file_id samefileid; /* samefile */ |
124 |
- mode_t type; /* type */ |
125 |
- struct format_val printf_vec; /* printf fprintf fprint ls fls print0 fprint0 print */ |
126 |
-+#ifdef WITH_SELINUX |
127 |
-+ security_context_t scontext; /* scontext */ |
128 |
-+#endif /*WITH_SELINUX*/ |
129 |
- } args; |
130 |
- |
131 |
- /* The next predicate in the user input sequence, |
132 |
-@@ -459,7 +465,9 @@ PREDICATEFUNCTION pred_used; |
133 |
- PREDICATEFUNCTION pred_user; |
134 |
- PREDICATEFUNCTION pred_writable; |
135 |
- PREDICATEFUNCTION pred_xtype; |
136 |
-- |
137 |
-+#ifdef WITH_SELINUX |
138 |
-+PREDICATEFUNCTION pred_scontext; |
139 |
-+#endif /* WITH_SELINUX */ |
140 |
- |
141 |
- |
142 |
- int launch PARAMS((const struct buildcmd_control *ctl, |
143 |
-@@ -605,10 +613,13 @@ struct options |
144 |
- */ |
145 |
- unsigned short optimisation_level; |
146 |
- |
147 |
-- |
148 |
- /* How should we quote filenames in error messages and so forth? |
149 |
- */ |
150 |
- enum quoting_style err_quoting_style; |
151 |
-+ |
152 |
-+#ifdef WITH_SELINUX |
153 |
-+ int (*x_getfilecon)(); |
154 |
-+#endif /* WITH_SELINUX */ |
155 |
- }; |
156 |
- extern struct options options; |
157 |
- |
158 |
-diff -purN findutils-4.4.2.orig/find/find.1 findutils-4.4.2/find/find.1 |
159 |
---- findutils-4.4.2.orig/find/find.1 2009-05-16 15:17:01.000000000 +0000 |
160 |
-+++ findutils-4.4.2/find/find.1 2010-04-25 03:58:33.762402367 +0000 |
161 |
-@@ -934,6 +934,10 @@ checks the type of the file that |
162 |
- .B \-type |
163 |
- does not check. |
164 |
- |
165 |
-+.IP "\-context \fIscontext\fR" |
166 |
-+.IP "\--context \fIscontext\fR" |
167 |
-+(SELinux only) File has the security context \fIscontext\fR. |
168 |
-+ |
169 |
- .SS ACTIONS |
170 |
- .IP "\-delete\fR" |
171 |
- Delete files; true if removal succeeded. If the removal failed, an |
172 |
-@@ -1354,6 +1358,8 @@ File's type (like in |
173 |
- U=unknown type (shouldn't happen) |
174 |
- .IP %Y |
175 |
- File's type (like %y), plus follow symlinks: L=loop, N=nonexistent |
176 |
-+.IP %Z |
177 |
-+(SELinux only) file's security context. |
178 |
- .PP |
179 |
- A `%' character followed by any other character is discarded, but the |
180 |
- other character is printed (don't rely on this, as further format |
181 |
-diff -purN findutils-4.4.2.orig/find/find.c findutils-4.4.2/find/find.c |
182 |
---- findutils-4.4.2.orig/find/find.c 2009-05-16 15:17:01.000000000 +0000 |
183 |
-+++ findutils-4.4.2/find/find.c 2010-04-25 03:58:33.764899827 +0000 |
184 |
-@@ -1270,7 +1270,7 @@ process_path (char *pathname, char *name |
185 |
- static void |
186 |
- process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, char *parent) |
187 |
- { |
188 |
-- int subdirs_left; /* Number of unexamined subdirs in PATHNAME. */ |
189 |
-+ int subdirs_left=0; /* Number of unexamined subdirs in PATHNAME. */ |
190 |
- boolean subdirs_unreliable; /* if true, cannot use dir link count as subdir limif (if false, it may STILL be unreliable) */ |
191 |
- unsigned int idx; /* Which entry are we on? */ |
192 |
- struct stat stat_buf; |
193 |
-diff -purN findutils-4.4.2.orig/find/parser.c findutils-4.4.2/find/parser.c |
194 |
---- findutils-4.4.2.orig/find/parser.c 2009-05-16 15:17:01.000000000 +0000 |
195 |
-+++ findutils-4.4.2/find/parser.c 2010-04-25 03:58:33.764899827 +0000 |
196 |
-@@ -53,6 +53,13 @@ |
197 |
- #include <unistd.h> |
198 |
- #include <sys/stat.h> |
199 |
- |
200 |
-+#ifdef WITH_SELINUX |
201 |
-+#include <selinux/selinux.h> |
202 |
-+int optionh_getfilecon(const char *name, security_context_t *p); |
203 |
-+int optionl_getfilecon(const char *name, security_context_t *p); |
204 |
-+int optionp_getfilecon(const char *name, security_context_t *p); |
205 |
-+#endif /*WITH_SELINUX*/ |
206 |
-+ |
207 |
- #if ENABLE_NLS |
208 |
- # include <libintl.h> |
209 |
- # define _(Text) gettext (Text) |
210 |
-@@ -155,6 +162,9 @@ static boolean parse_noignore_race PARAM |
211 |
- static boolean parse_warn PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); |
212 |
- static boolean parse_xtype PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); |
213 |
- static boolean parse_quit PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); |
214 |
-+#ifdef WITH_SELINUX |
215 |
-+static boolean parse_scontext PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); |
216 |
-+#endif /*WITH_SELINUX*/ |
217 |
- |
218 |
- boolean parse_print PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); |
219 |
- |
220 |
-@@ -340,6 +350,8 @@ static struct parser_table const parse_t |
221 |
- {ARG_TEST, "-help", parse_help, NULL}, /* GNU */ |
222 |
- {ARG_TEST, "version", parse_version, NULL}, /* GNU */ |
223 |
- {ARG_TEST, "-version", parse_version, NULL}, /* GNU */ |
224 |
-+ {ARG_TEST, "context", parse_scontext, pred_scontext}, /* SELinux */ |
225 |
-+ {ARG_TEST, "-context", parse_scontext, pred_scontext}, /* SELinux */ |
226 |
- {0, 0, 0, 0} |
227 |
- }; |
228 |
- |
229 |
-@@ -451,10 +463,16 @@ set_follow_state(enum SymlinkOption opt) |
230 |
- case SYMLINK_ALWAYS_DEREF: /* -L */ |
231 |
- options.xstat = optionl_stat; |
232 |
- options.no_leaf_check = true; |
233 |
-+#ifdef WITH_SELINUX |
234 |
-+ options.x_getfilecon = optionl_getfilecon; |
235 |
-+#endif /* WITH_SELINUX */ |
236 |
- break; |
237 |
- |
238 |
- case SYMLINK_NEVER_DEREF: /* -P (default) */ |
239 |
- options.xstat = optionp_stat; |
240 |
-+#ifdef WITH_SELINUX |
241 |
-+ options.x_getfilecon = optionp_getfilecon; |
242 |
-+#endif /* WITH_SELINUX */ |
243 |
- /* Can't turn no_leaf_check off because the user might have specified |
244 |
- * -noleaf anyway |
245 |
- */ |
246 |
-@@ -463,6 +481,9 @@ set_follow_state(enum SymlinkOption opt) |
247 |
- case SYMLINK_DEREF_ARGSONLY: /* -H */ |
248 |
- options.xstat = optionh_stat; |
249 |
- options.no_leaf_check = true; |
250 |
-+#ifdef WITH_SELINUX |
251 |
-+ options.x_getfilecon = optionh_getfilecon; |
252 |
-+#endif /* WITH_SELINUX */ |
253 |
- } |
254 |
- } |
255 |
- options.symlink_handling = opt; |
256 |
-@@ -670,6 +691,94 @@ collect_arg_stat_info(char **argv, int * |
257 |
- |
258 |
- The predicate structure is updated with the new information. */ |
259 |
- |
260 |
-+#ifdef WITH_SELINUX |
261 |
-+ |
262 |
-+static int |
263 |
-+fallback_getfilecon(const char *name, security_context_t *p, int prev_rv) |
264 |
-+{ |
265 |
-+ /* Our original getfilecon() call failed. Perhaps we can't follow a |
266 |
-+ * symbolic link. If that might be the problem, lgetfilecon() the link. |
267 |
-+ * Otherwise, admit defeat. |
268 |
-+ */ |
269 |
-+ switch (errno) |
270 |
-+ { |
271 |
-+ case ENOENT: |
272 |
-+ case ENOTDIR: |
273 |
-+#ifdef DEBUG_STAT |
274 |
-+ fprintf(stderr, "fallback_getfilecon(): getfilecon(%s) failed; falling back on lgetfilecon()\n", name); |
275 |
-+#endif |
276 |
-+ return lgetfilecon(name, p); |
277 |
-+ |
278 |
-+ case EACCES: |
279 |
-+ case EIO: |
280 |
-+ case ELOOP: |
281 |
-+ case ENAMETOOLONG: |
282 |
-+#ifdef EOVERFLOW |
283 |
-+ case EOVERFLOW: /* EOVERFLOW is not #defined on UNICOS. */ |
284 |
-+#endif |
285 |
-+ default: |
286 |
-+ return prev_rv; |
287 |
-+ } |
288 |
-+} |
289 |
-+ |
290 |
-+ |
291 |
-+/* optionh_getfilecon() implements the getfilecon operation when the |
292 |
-+ * -H option is in effect. |
293 |
-+ * |
294 |
-+ * If the item to be examined is a command-line argument, we follow |
295 |
-+ * symbolic links. If the getfilecon() call fails on the command-line |
296 |
-+ * item, we fall back on the properties of the symbolic link. |
297 |
-+ * |
298 |
-+ * If the item to be examined is not a command-line argument, we |
299 |
-+ * examine the link itself. |
300 |
-+ */ |
301 |
-+int |
302 |
-+optionh_getfilecon(const char *name, security_context_t *p) |
303 |
-+{ |
304 |
-+ if (0 == state.curdepth) |
305 |
-+ { |
306 |
-+ /* This file is from the command line; deference the link (if it |
307 |
-+ * is a link). |
308 |
-+ */ |
309 |
-+ int rv = getfilecon(name, p); |
310 |
-+ if (0 == rv) |
311 |
-+ return 0; /* success */ |
312 |
-+ else |
313 |
-+ return fallback_getfilecon(name, p, rv); |
314 |
-+ } |
315 |
-+ else |
316 |
-+ { |
317 |
-+ /* Not a file on the command line; do not derefernce the link. |
318 |
-+ */ |
319 |
-+ return lgetfilecon(name, p); |
320 |
-+ } |
321 |
-+} |
322 |
-+ |
323 |
-+/* optionl_getfilecon() implements the getfilecon operation when the |
324 |
-+ * -L option is in effect. That option makes us examine the thing the |
325 |
-+ * symbolic link points to, not the symbolic link itself. |
326 |
-+ */ |
327 |
-+int |
328 |
-+optionl_getfilecon(const char *name, security_context_t *p) |
329 |
-+{ |
330 |
-+ int rv = getfilecon(name, p); |
331 |
-+ if (0 == rv) |
332 |
-+ return 0; /* normal case. */ |
333 |
-+ else |
334 |
-+ return fallback_getfilecon(name, p, rv); |
335 |
-+} |
336 |
-+ |
337 |
-+/* optionp_getfilecon() implements the stat operation when the -P |
338 |
-+ * option is in effect (this is also the default). That option makes |
339 |
-+ * us examine the symbolic link itself, not the thing it points to. |
340 |
-+ */ |
341 |
-+int |
342 |
-+optionp_getfilecon(const char *name, security_context_t *p) |
343 |
-+{ |
344 |
-+ return lgetfilecon(name, p); |
345 |
-+} |
346 |
-+#endif /* WITH_SELINUX */ |
347 |
-+ |
348 |
- |
349 |
- static boolean |
350 |
- parse_and (const struct parser_table* entry, char **argv, int *arg_ptr) |
351 |
-@@ -1128,6 +1237,10 @@ tests (N can be +N or -N or N): -amin N |
352 |
- -readable -writable -executable\n\ |
353 |
- -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n\ |
354 |
- -used N -user NAME -xtype [bcdpfls]\n")); |
355 |
-+#ifdef WITH_SELINUX |
356 |
-+ puts (_("\ |
357 |
-+ -context CONTEXT\n")); |
358 |
-+#endif /*WITH_SELINUX*/ |
359 |
- puts (_("\ |
360 |
- actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n\ |
361 |
- -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n\ |
362 |
-@@ -2552,6 +2665,29 @@ parse_version (const struct parser_table |
363 |
- exit (0); |
364 |
- } |
365 |
- |
366 |
-+#ifdef WITH_SELINUX |
367 |
-+ |
368 |
-+static boolean |
369 |
-+parse_scontext ( const struct parser_table* entry, char **argv, int *arg_ptr) |
370 |
-+{ |
371 |
-+ struct predicate *our_pred; |
372 |
-+ |
373 |
-+ if ( (argv == NULL) || (argv[*arg_ptr] == NULL) ) |
374 |
-+ return( false ); |
375 |
-+ |
376 |
-+ our_pred = insert_primary(entry); |
377 |
-+ our_pred->need_stat = false; |
378 |
-+#ifdef DEBUG |
379 |
-+ our_pred->p_name = find_pred_name (pred_scontext); |
380 |
-+#endif /*DEBUG*/ |
381 |
-+ our_pred->args.scontext = argv[*arg_ptr];; |
382 |
-+ |
383 |
-+ (*arg_ptr)++; |
384 |
-+ return( true ); |
385 |
-+} |
386 |
-+ |
387 |
-+#endif /*WITH_SELINUX*/ |
388 |
-+ |
389 |
- static boolean |
390 |
- parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr) |
391 |
- { |
392 |
-@@ -2803,7 +2939,11 @@ insert_fprintf (struct format_val *vec, |
393 |
- if (*scan2 == '.') |
394 |
- for (scan2++; ISDIGIT (*scan2); scan2++) |
395 |
- /* Do nothing. */ ; |
396 |
-+#ifdef WITH_SELINUX |
397 |
-+ if (strchr ("abcdDfFgGhHiklmMnpPsStuUyYZ", *scan2)) |
398 |
-+#else |
399 |
- if (strchr ("abcdDfFgGhHiklmMnpPsStuUyY", *scan2)) |
400 |
-+#endif |
401 |
- { |
402 |
- segmentp = make_segment (segmentp, format, scan2 - format, |
403 |
- KIND_FORMAT, *scan2, 0, |
404 |
-diff -purN findutils-4.4.2.orig/find/pred.c findutils-4.4.2/find/pred.c |
405 |
---- findutils-4.4.2.orig/find/pred.c 2009-05-16 15:17:01.000000000 +0000 |
406 |
-+++ findutils-4.4.2/find/pred.c 2010-04-25 03:58:33.764899827 +0000 |
407 |
-@@ -48,6 +48,14 @@ |
408 |
- #include "error.h" |
409 |
- #include "verify.h" |
410 |
- |
411 |
-+#ifdef WITH_SELINUX |
412 |
-+#include <selinux/selinux.h> |
413 |
-+#endif /*WITH_SELINUX*/ |
414 |
-+ |
415 |
-+#ifndef FNM_CASEFOLD |
416 |
-+#define FNM_CASEFOLD (1<<4) |
417 |
-+#endif /*FNM_CASEFOLD*/ |
418 |
-+ |
419 |
- #if ENABLE_NLS |
420 |
- # include <libintl.h> |
421 |
- # define _(Text) gettext (Text) |
422 |
-@@ -230,6 +238,9 @@ struct pred_assoc pred_table[] = |
423 |
- {pred_user, "user "}, |
424 |
- {pred_writable, "writable "}, |
425 |
- {pred_xtype, "xtype "}, |
426 |
-+#ifdef WITH_SELINUX |
427 |
-+ {pred_scontext, "context"}, |
428 |
-+#endif /*WITH_SELINUX*/ |
429 |
- {0, "none "} |
430 |
- }; |
431 |
- #endif |
432 |
-@@ -1054,6 +1065,26 @@ do_fprintf(struct format_val *dest, |
433 |
- mode_to_filetype(stat_buf->st_mode & S_IFMT)); |
434 |
- } |
435 |
- break; |
436 |
-+#ifdef WITH_SELINUX |
437 |
-+ case 'Z': /* SELinux security context */ |
438 |
-+ { |
439 |
-+ security_context_t scontext; |
440 |
-+ int rv; |
441 |
-+ rv = (*options.x_getfilecon)(state.rel_pathname, &scontext); |
442 |
-+ |
443 |
-+ if ( rv < 0 ) { |
444 |
-+ fprintf(stderr, "getfileconf(%s): %s", |
445 |
-+ pathname, strerror(errno)); |
446 |
-+ fflush(stderr); |
447 |
-+ } |
448 |
-+ else { |
449 |
-+ segment->text[segment->text_len] = 's'; |
450 |
-+ checked_fprintf (dest, segment->text, scontext); |
451 |
-+ freecon(scontext); |
452 |
-+ } |
453 |
-+ } |
454 |
-+ break ; |
455 |
-+#endif /* WITH_SELINUX */ |
456 |
- } |
457 |
- /* end of KIND_FORMAT case */ |
458 |
- break; |
459 |
-@@ -1844,6 +1875,31 @@ pred_xtype (const char *pathname, struct |
460 |
- */ |
461 |
- return (pred_type (pathname, &sbuf, pred_ptr)); |
462 |
- } |
463 |
-+ |
464 |
-+ |
465 |
-+#ifdef WITH_SELINUX |
466 |
-+ |
467 |
-+boolean |
468 |
-+pred_scontext (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) |
469 |
-+{ |
470 |
-+ int rv; |
471 |
-+ security_context_t scontext; |
472 |
-+ |
473 |
-+ rv = (* options.x_getfilecon)(state.rel_pathname, &scontext); |
474 |
-+ |
475 |
-+ if ( rv < 0 ) { |
476 |
-+ (void) fprintf(stderr, "getfilecon(%s): %s\n", pathname, strerror(errno)); |
477 |
-+ (void) fflush(stderr); |
478 |
-+ return ( false ); |
479 |
-+ } |
480 |
-+ |
481 |
-+ rv = (fnmatch(pred_ptr->args.scontext, scontext,0)==0); |
482 |
-+ freecon(scontext); |
483 |
-+ return rv; |
484 |
-+} |
485 |
-+ |
486 |
-+#endif /*WITH_SELINUX*/ |
487 |
-+ |
488 |
- |
489 |
- /* 1) fork to get a child; parent remembers the child pid |
490 |
- 2) child execs the command requested |
491 |
-diff -purN findutils-4.4.2.orig/find/tree.c findutils-4.4.2/find/tree.c |
492 |
---- findutils-4.4.2.orig/find/tree.c 2009-05-16 15:17:01.000000000 +0000 |
493 |
-+++ findutils-4.4.2/find/tree.c 2010-04-25 03:58:33.764899827 +0000 |
494 |
-@@ -1195,6 +1195,10 @@ build_expression_tree(int argc, char *ar |
495 |
- const struct parser_table *entry_close, *entry_print, *entry_open; |
496 |
- int i, oldi; |
497 |
- |
498 |
-+#ifdef WITH_SELINUX |
499 |
-+ int is_selinux_enabled_flag = is_selinux_enabled()>0; |
500 |
-+#endif /* WITH_SELINUX */ |
501 |
-+ |
502 |
- predicates = NULL; |
503 |
- |
504 |
- /* Find where in ARGV the predicates begin by skipping the list of |
505 |
-@@ -1230,6 +1234,16 @@ build_expression_tree(int argc, char *ar |
506 |
- } |
507 |
- |
508 |
- predicate_name = argv[i]; |
509 |
-+ |
510 |
-+#ifdef WITH_SELINUX |
511 |
-+ if (! is_selinux_enabled_flag) { |
512 |
-+ if ((strncmp(predicate_name,"-context",strlen("-context"))==0) || |
513 |
-+ (strncmp(predicate_name,"--context",strlen("--context"))==0)) { |
514 |
-+ error (1, 0,_("Error: invalid predicate %s: the kernel is not selinux-enabled.\n"),predicate_name); |
515 |
-+ } |
516 |
-+ } |
517 |
-+#endif |
518 |
-+ |
519 |
- parse_entry = find_parser (predicate_name); |
520 |
- if (parse_entry == NULL) |
521 |
- { |
522 |
-@@ -1434,6 +1448,9 @@ get_new_pred (const struct parser_table |
523 |
- last_pred->need_stat = true; |
524 |
- last_pred->need_type = true; |
525 |
- last_pred->args.str = NULL; |
526 |
-+#ifdef WITH_SELINUX |
527 |
-+ last_pred->args.scontext = NULL; |
528 |
-+#endif |
529 |
- last_pred->pred_next = NULL; |
530 |
- last_pred->pred_left = NULL; |
531 |
- last_pred->pred_right = NULL; |
532 |
|
533 |
diff --git a/sys-apps/findutils/findutils-4.4.2-r2.ebuild b/sys-apps/findutils/findutils-4.4.2-r2.ebuild |
534 |
deleted file mode 100644 |
535 |
index 3208b910b59..00000000000 |
536 |
--- a/sys-apps/findutils/findutils-4.4.2-r2.ebuild |
537 |
+++ /dev/null |
538 |
@@ -1,55 +0,0 @@ |
539 |
-# Copyright 1999-2014 Gentoo Foundation |
540 |
-# Distributed under the terms of the GNU General Public License v2 |
541 |
- |
542 |
-EAPI="4" |
543 |
- |
544 |
-inherit eutils flag-o-matic toolchain-funcs |
545 |
- |
546 |
-SELINUX_PATCH="findutils-4.4.2-selinux.diff" |
547 |
- |
548 |
-DESCRIPTION="GNU utilities for finding files" |
549 |
-HOMEPAGE="https://www.gnu.org/software/findutils/" |
550 |
-SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz |
551 |
- mirror://gnu/${PN}/${P}.tar.gz" |
552 |
- |
553 |
-LICENSE="GPL-3+" |
554 |
-SLOT="0" |
555 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
556 |
-IUSE="debug nls selinux static" |
557 |
- |
558 |
-RDEPEND="selinux? ( sys-libs/libselinux ) |
559 |
- nls? ( virtual/libintl )" |
560 |
-DEPEND="${RDEPEND} |
561 |
- nls? ( sys-devel/gettext )" |
562 |
- |
563 |
-src_prepare() { |
564 |
- epatch "${FILESDIR}"/${P}-gnulib-date-x32.patch |
565 |
- |
566 |
- # Don't build or install locate because it conflicts with slocate, |
567 |
- # which is a secure version of locate. See bug 18729 |
568 |
- sed -i '/^SUBDIRS/s/locate//' Makefile.in |
569 |
- |
570 |
- use selinux && epatch "${FILESDIR}/${SELINUX_PATCH}" |
571 |
-} |
572 |
- |
573 |
-src_configure() { |
574 |
- use static && append-ldflags -static |
575 |
- |
576 |
- program_prefix=$(usex userland_GNU '' g) |
577 |
- econf \ |
578 |
- --program-prefix=${program_prefix} \ |
579 |
- $(use_enable debug) \ |
580 |
- $(use_enable nls) \ |
581 |
- --libexecdir='$(libdir)'/find |
582 |
-} |
583 |
- |
584 |
-src_compile() { |
585 |
- emake AR="$(tc-getAR)" |
586 |
-} |
587 |
- |
588 |
-src_install() { |
589 |
- default |
590 |
- |
591 |
- # We don't need this, so punt it. |
592 |
- rm "${ED}"/usr/bin/${program_prefix}oldfind || die |
593 |
-} |
594 |
|
595 |
diff --git a/sys-apps/findutils/findutils-4.5.18.ebuild b/sys-apps/findutils/findutils-4.5.18.ebuild |
596 |
deleted file mode 100644 |
597 |
index 355715d5cb1..00000000000 |
598 |
--- a/sys-apps/findutils/findutils-4.5.18.ebuild |
599 |
+++ /dev/null |
600 |
@@ -1,54 +0,0 @@ |
601 |
-# Copyright 1999-2018 Gentoo Foundation |
602 |
-# Distributed under the terms of the GNU General Public License v2 |
603 |
- |
604 |
-EAPI="5" |
605 |
- |
606 |
-PYTHON_COMPAT=( python{2_7,3_4} ) |
607 |
- |
608 |
-inherit eutils flag-o-matic toolchain-funcs python-any-r1 |
609 |
- |
610 |
-DESCRIPTION="GNU utilities for finding files" |
611 |
-HOMEPAGE="https://www.gnu.org/software/findutils/" |
612 |
-SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz" |
613 |
- |
614 |
-LICENSE="GPL-3+" |
615 |
-SLOT="0" |
616 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
617 |
-IUSE="debug nls selinux static test" |
618 |
- |
619 |
-RDEPEND="selinux? ( sys-libs/libselinux ) |
620 |
- nls? ( virtual/libintl )" |
621 |
-DEPEND="${RDEPEND} |
622 |
- test? ( ${PYTHON_DEPS} ) |
623 |
- nls? ( sys-devel/gettext )" |
624 |
- |
625 |
-pkg_setup() { |
626 |
- use test && python-any-r1_pkg_setup |
627 |
-} |
628 |
- |
629 |
-src_prepare() { |
630 |
- # Don't build or install locate because it conflicts with slocate, |
631 |
- # which is a secure version of locate. See bug 18729 |
632 |
- sed -i '/^SUBDIRS/s/locate//' Makefile.in |
633 |
-} |
634 |
- |
635 |
-src_configure() { |
636 |
- use static && append-ldflags -static |
637 |
- |
638 |
- program_prefix=$(usex userland_GNU '' g) |
639 |
- econf \ |
640 |
- --with-packager="Gentoo" \ |
641 |
- --with-packager-version="${PVR}" \ |
642 |
- --with-packager-bug-reports="https://bugs.gentoo.org/" \ |
643 |
- --program-prefix=${program_prefix} \ |
644 |
- $(use_enable debug) \ |
645 |
- $(use_enable nls) \ |
646 |
- $(use_with selinux) \ |
647 |
- --libexecdir='$(libdir)'/find |
648 |
-} |
649 |
- |
650 |
-src_compile() { |
651 |
- # We don't build locate, but the docs want a file in there. |
652 |
- emake -C locate dblocation.texi |
653 |
- default |
654 |
-} |