1 |
commit: de933339703cdb66aa0298c231b9d4fe0e54e106 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 16 06:44:49 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 16 06:44:49 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de933339 |
7 |
|
8 |
app-arch/tar: Removed old. |
9 |
|
10 |
Package-Manager: Portage-2.3.42, Repoman-2.3.9 |
11 |
|
12 |
app-arch/tar/Manifest | 1 - |
13 |
app-arch/tar/files/tar-1.29-add-files.patch | 194 --------------------- |
14 |
...tar-1.29-extract-pathname-bypass-upstream.patch | 60 ------- |
15 |
.../files/tar-1.29-extract-pathname-bypass.patch | 27 --- |
16 |
app-arch/tar/tar-1.29-r1.ebuild | 80 --------- |
17 |
app-arch/tar/tar-1.29-r3.ebuild | 81 --------- |
18 |
6 files changed, 443 deletions(-) |
19 |
|
20 |
diff --git a/app-arch/tar/Manifest b/app-arch/tar/Manifest |
21 |
index c087d7a3260..4d3b42f1260 100644 |
22 |
--- a/app-arch/tar/Manifest |
23 |
+++ b/app-arch/tar/Manifest |
24 |
@@ -1,2 +1 @@ |
25 |
-DIST tar-1.29.tar.bz2 2715993 BLAKE2B 656b77a49c463ec7ade87a97b71469dadbf01551131bdf0cfa895b7b2a7d073a4cd51e9bec4169b134d83155aca18af1a89ddb5d14cb1dc0d9968184870d69f3 SHA512 d2cea9892892dfa0c8efd390303b75dccc085c4895e07ced684074592d69729916d6ea12475aa6aff873d076a729bb7dc2499c233edcfb9c7e8e8995481eef3b |
26 |
DIST tar-1.30.tar.bz2 2858639 BLAKE2B 82a8b1fbf1eb5c0347b2f8cf35854498e2955eb85eaf041ec44a38bbd9bc82cc7184d5cb858f9905f503c9178ec6d0ed50be2dc27be9933b29e0a18b8e6c0b8f SHA512 07a1157430898fee1a2c6fd3853d59d4ae13998db685669c8c702f73d2466eeb9892f84a5f0495bfe088c8190a643a99ac9f2cb16b85c9fe3ae0d83cc0f338e8 |
27 |
|
28 |
diff --git a/app-arch/tar/files/tar-1.29-add-files.patch b/app-arch/tar/files/tar-1.29-add-files.patch |
29 |
deleted file mode 100644 |
30 |
index 8ab15ac32af..00000000000 |
31 |
--- a/app-arch/tar/files/tar-1.29-add-files.patch |
32 |
+++ /dev/null |
33 |
@@ -1,194 +0,0 @@ |
34 |
-From 3a283cfe9f8f1f127e8dc5597a5ea1d249985a54 Mon Sep 17 00:00:00 2001 |
35 |
-From: Sergey Poznyakoff <gray@×××.org> |
36 |
-Date: Sat, 12 Nov 2016 11:20:47 +0200 |
37 |
-Subject: [PATCH] Fix the --add-file option. |
38 |
- |
39 |
-* src/common.h (name_more_files): New proto. |
40 |
-(files_from_option): Remove. |
41 |
-* src/names.c (name_more_files): New file. |
42 |
-(names_options): Fix declaration of the |
43 |
-add-file option. |
44 |
-(names_parse_opt): Handle --add-file. |
45 |
-* src/tar.c (struct tar_args): Remove the input_files member. |
46 |
-Change all uses: use name_more_files() instead. |
47 |
-* tests/Makefile.am: Add new test. |
48 |
-* tests/add-file.at: New testcase. |
49 |
-* tests/testsuite.at: Add new test. |
50 |
---- |
51 |
- src/common.h | 4 +--- |
52 |
- src/names.c | 24 ++++++++++++------- |
53 |
- src/tar.c | 16 ++++--------- |
54 |
- tests/Makefile.am | 3 ++- |
55 |
- tests/add-file.at | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
56 |
- tests/testsuite.at | 1 + |
57 |
- 6 files changed, 92 insertions(+), 23 deletions(-) |
58 |
- create mode 100644 tests/add-file.at |
59 |
- |
60 |
-diff --git a/src/common.h b/src/common.h |
61 |
-index 50c34cc7c09b..6fdb6225f18b 100644 |
62 |
---- a/src/common.h |
63 |
-+++ b/src/common.h |
64 |
-@@ -414,9 +414,6 @@ GLOBAL bool show_transformed_names_option; |
65 |
- timestamps from archives with an unusual member order. It is automatically |
66 |
- set for incremental archives. */ |
67 |
- GLOBAL bool delay_directory_restore_option; |
68 |
-- |
69 |
--/* When set, tar will not refuse to create empty archives */ |
70 |
--GLOBAL bool files_from_option; |
71 |
- |
72 |
- /* Declarations for each module. */ |
73 |
- |
74 |
-@@ -738,6 +735,7 @@ void uid_to_uname (uid_t uid, char **uname); |
75 |
- int uname_to_uid (char const *uname, uid_t *puid); |
76 |
- |
77 |
- void name_init (void); |
78 |
-+bool name_more_files (void); |
79 |
- void name_add_name (const char *name); |
80 |
- void name_term (void); |
81 |
- const char *name_next (int change_dirs); |
82 |
-diff --git a/src/names.c b/src/names.c |
83 |
-index 219aa77a4356..1a9465667cd3 100644 |
84 |
---- a/src/names.c |
85 |
-+++ b/src/names.c |
86 |
-@@ -32,7 +32,8 @@ static void name_add_file (const char *name); |
87 |
- |
88 |
- enum |
89 |
- { |
90 |
-- EXCLUDE_BACKUPS_OPTION = 256, |
91 |
-+ ADD_FILE_OPTION = 256, |
92 |
-+ EXCLUDE_BACKUPS_OPTION, |
93 |
- EXCLUDE_CACHES_OPTION, |
94 |
- EXCLUDE_CACHES_UNDER_OPTION, |
95 |
- EXCLUDE_CACHES_ALL_OPTION, |
96 |
-@@ -67,7 +68,7 @@ static struct argp_option names_options[] = { |
97 |
- {NULL, 0, NULL, 0, |
98 |
- N_("Local file name selection:"), GRID }, |
99 |
- |
100 |
-- {"add-file", ARGP_KEY_ARG, N_("FILE"), 0, |
101 |
-+ {"add-file", ADD_FILE_OPTION, N_("FILE"), 0, |
102 |
- N_("add given FILE to the archive (useful if its name starts with a dash)"), GRID+1 }, |
103 |
- {"directory", 'C', N_("DIR"), 0, |
104 |
- N_("change to directory DIR"), GRID+1 }, |
105 |
-@@ -190,10 +191,10 @@ names_parse_opt (int key, char *arg, struct argp_state *state) |
106 |
- |
107 |
- case 'T': |
108 |
- name_add_file (arg); |
109 |
-- /* Indicate we've been given -T option. This is for backward |
110 |
-- compatibility only, so that `tar cfT archive /dev/null will |
111 |
-- succeed */ |
112 |
-- files_from_option = true; |
113 |
-+ break; |
114 |
-+ |
115 |
-+ case ADD_FILE_OPTION: |
116 |
-+ name_add_name (arg); |
117 |
- break; |
118 |
- |
119 |
- default: |
120 |
-@@ -651,8 +652,8 @@ struct name_elt /* A name_array element. */ |
121 |
- } v; |
122 |
- }; |
123 |
- |
124 |
--static struct name_elt *name_head; /* store a list of names */ |
125 |
--size_t name_count; /* how many of the entries are names? */ |
126 |
-+static struct name_elt *name_head;/* store a list of names */ |
127 |
-+size_t name_count; /* how many of the entries are file names? */ |
128 |
- |
129 |
- static struct name_elt * |
130 |
- name_elt_alloc (void) |
131 |
-@@ -784,6 +785,12 @@ name_list_advance (void) |
132 |
- } |
133 |
- } |
134 |
- |
135 |
-+/* Return true if there are names or options in the list */ |
136 |
-+bool |
137 |
-+name_more_files (void) |
138 |
-+{ |
139 |
-+ return name_count > 0; |
140 |
-+} |
141 |
- |
142 |
- /* Add to name_array the file NAME with fnmatch options MATFLAGS */ |
143 |
- void |
144 |
-@@ -823,6 +830,7 @@ name_add_file (const char *name) |
145 |
- ep->v.file.name = name; |
146 |
- ep->v.file.line = 0; |
147 |
- ep->v.file.fp = NULL; |
148 |
-+ name_count++; |
149 |
- } |
150 |
- |
151 |
- /* Names from external name file. */ |
152 |
-diff --git a/src/tar.c b/src/tar.c |
153 |
-index 35bac38c2793..a361fc2c607f 100644 |
154 |
---- a/src/tar.c |
155 |
-+++ b/src/tar.c |
156 |
-@@ -813,7 +813,6 @@ struct tar_args /* Variables used during option parsing */ |
157 |
- bool pax_option; /* True if --pax-option was given */ |
158 |
- char const *backup_suffix_string; /* --suffix option argument */ |
159 |
- char const *version_control_string; /* --backup option argument */ |
160 |
-- bool input_files; /* True if some input files where given */ |
161 |
- int compress_autodetect; /* True if compression autodetection should |
162 |
- be attempted when creating archives */ |
163 |
- }; |
164 |
-@@ -1322,7 +1321,6 @@ parse_opt (int key, char *arg, struct argp_state *state) |
165 |
- case ARGP_KEY_ARG: |
166 |
- /* File name or non-parsed option, because of ARGP_IN_ORDER */ |
167 |
- name_add_name (arg); |
168 |
-- args->input_files = true; |
169 |
- break; |
170 |
- |
171 |
- case 'A': |
172 |
-@@ -2179,7 +2177,7 @@ more_options (int argc, char **argv, struct option_locus *loc) |
173 |
- args.loc = loc; |
174 |
- if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER|ARGP_NO_EXIT, &idx, &args)) |
175 |
- abort (); /* shouldn't happen */ |
176 |
-- if (loc->source == OPTS_ENVIRON && args.input_files) |
177 |
-+ if (loc->source == OPTS_ENVIRON && name_more_files ()) |
178 |
- USAGE_ERROR ((0, 0, _("non-option arguments in %s"), loc->name)); |
179 |
- } |
180 |
- |
181 |
-@@ -2221,7 +2219,6 @@ decode_options (int argc, char **argv) |
182 |
- args.pax_option = false; |
183 |
- args.backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX"); |
184 |
- args.version_control_string = 0; |
185 |
-- args.input_files = false; |
186 |
- args.compress_autodetect = false; |
187 |
- |
188 |
- subcommand_option = UNKNOWN_SUBCOMMAND; |
189 |
-@@ -2340,10 +2337,7 @@ decode_options (int argc, char **argv) |
190 |
- |
191 |
- /* Handle operands after any "--" argument. */ |
192 |
- for (; idx < argc; idx++) |
193 |
-- { |
194 |
-- name_add_name (argv[idx]); |
195 |
-- args.input_files = true; |
196 |
-- } |
197 |
-+ name_add_name (argv[idx]); |
198 |
- |
199 |
- /* Derive option values and check option consistency. */ |
200 |
- |
201 |
-@@ -2365,7 +2359,7 @@ decode_options (int argc, char **argv) |
202 |
- |
203 |
- if (occurrence_option) |
204 |
- { |
205 |
-- if (!args.input_files) |
206 |
-+ if (!name_more_files ()) |
207 |
- USAGE_ERROR ((0, 0, |
208 |
- _("--occurrence is meaningless without a file list"))); |
209 |
- if (!IS_SUBCOMMAND_CLASS (SUBCL_OCCUR)) |
210 |
-@@ -2569,7 +2563,7 @@ decode_options (int argc, char **argv) |
211 |
- { |
212 |
- /* --test-label is silent if the user has specified the label name to |
213 |
- compare against. */ |
214 |
-- if (!args.input_files) |
215 |
-+ if (!name_more_files ()) |
216 |
- verbose_option++; |
217 |
- } |
218 |
- else if (utc_option) |
219 |
-@@ -2598,7 +2592,7 @@ decode_options (int argc, char **argv) |
220 |
- switch (subcommand_option) |
221 |
- { |
222 |
- case CREATE_SUBCOMMAND: |
223 |
-- if (!args.input_files && !files_from_option) |
224 |
-+ if (!name_more_files ()) |
225 |
- USAGE_ERROR ((0, 0, |
226 |
- _("Cowardly refusing to create an empty archive"))); |
227 |
- if (args.compress_autodetect && archive_names |
228 |
|
229 |
diff --git a/app-arch/tar/files/tar-1.29-extract-pathname-bypass-upstream.patch b/app-arch/tar/files/tar-1.29-extract-pathname-bypass-upstream.patch |
230 |
deleted file mode 100644 |
231 |
index 2030ca6d2bd..00000000000 |
232 |
--- a/app-arch/tar/files/tar-1.29-extract-pathname-bypass-upstream.patch |
233 |
+++ /dev/null |
234 |
@@ -1,60 +0,0 @@ |
235 |
-https://bugs.gentoo.org/598334 |
236 |
- |
237 |
-From 7340f67b9860ea0531c1450e5aa261c50f67165d Mon Sep 17 00:00:00 2001 |
238 |
-From: Paul Eggert <eggert@×××××××××××××××.EDU> |
239 |
-Date: Sat, 29 Oct 2016 21:04:40 -0700 |
240 |
-Subject: [PATCH] When extracting, skip ".." members |
241 |
- |
242 |
-* NEWS: Document this. |
243 |
-* src/extract.c (extract_archive): Skip members whose names |
244 |
-contain "..". |
245 |
---- |
246 |
- NEWS | 8 +++++++- |
247 |
- src/extract.c | 8 ++++++++ |
248 |
- 2 files changed, 15 insertions(+), 1 deletion(-) |
249 |
- |
250 |
---- a/NEWS |
251 |
-+++ b/NEWS |
252 |
-@@ -1,6 +1,16 @@ |
253 |
- GNU tar NEWS - User visible changes. 2016-05-16 |
254 |
- Please send GNU tar bug reports to <bug-tar@×××.org> |
255 |
- |
256 |
-+ |
257 |
-+ |
258 |
-+version 1.29-r2+ Gentoo |
259 |
-+ |
260 |
-+* Member names containing '..' components are now skipped when extracting. |
261 |
-+ |
262 |
-+This fixes tar's behavior to match its documentation, and is a bit |
263 |
-+safer when extracting untrusted archives over old files (an unsafe |
264 |
-+practice that the tar manual has long recommended against). |
265 |
-+ |
266 |
- |
267 |
- version 1.29 - Sergey Poznyakoff, 2016-05-16 |
268 |
- |
269 |
---- a/src/extract.c |
270 |
-+++ b/src/extract.c |
271 |
-@@ -1629,12 +1629,20 @@ |
272 |
- { |
273 |
- char typeflag; |
274 |
- tar_extractor_t fun; |
275 |
-+ bool skip_dotdot_name; |
276 |
- |
277 |
- fatal_exit_hook = extract_finish; |
278 |
- |
279 |
- set_next_block_after (current_header); |
280 |
- |
281 |
-+ skip_dotdot_name = (!absolute_names_option |
282 |
-+ && contains_dot_dot (current_stat_info.orig_file_name)); |
283 |
-+ if (skip_dotdot_name) |
284 |
-+ ERROR ((0, 0, _("%s: Member name contains '..'"), |
285 |
-+ quotearg_colon (current_stat_info.orig_file_name))); |
286 |
-+ |
287 |
- if (!current_stat_info.file_name[0] |
288 |
-+ || skip_dotdot_name |
289 |
- || (interactive_option |
290 |
- && !confirm ("extract", current_stat_info.file_name))) |
291 |
- { |
292 |
--- |
293 |
-2.11.0.rc2 |
294 |
- |
295 |
|
296 |
diff --git a/app-arch/tar/files/tar-1.29-extract-pathname-bypass.patch b/app-arch/tar/files/tar-1.29-extract-pathname-bypass.patch |
297 |
deleted file mode 100644 |
298 |
index 6470fe082bd..00000000000 |
299 |
--- a/app-arch/tar/files/tar-1.29-extract-pathname-bypass.patch |
300 |
+++ /dev/null |
301 |
@@ -1,27 +0,0 @@ |
302 |
---- a/lib/paxnames.c 2016-04-06 00:04:47.314860045 +0300 |
303 |
-+++ b/lib/paxnames.c 2016-04-06 02:08:44.962297881 +0300 |
304 |
-@@ -18,6 +18,7 @@ |
305 |
- #include <system.h> |
306 |
- #include <hash.h> |
307 |
- #include <paxlib.h> |
308 |
-+#include <quotearg.h> |
309 |
- |
310 |
- |
311 |
- /* Hash tables of strings. */ |
312 |
-@@ -114,7 +115,15 @@ |
313 |
- for (p = file_name + prefix_len; *p; ) |
314 |
- { |
315 |
- if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2])) |
316 |
-- prefix_len = p + 2 - file_name; |
317 |
-+ { |
318 |
-+ static char const *const diagnostic[] = |
319 |
-+ { |
320 |
-+ N_("%s: Member name contains '..'"), |
321 |
-+ N_("%s: Hard link target contains '..'") |
322 |
-+ }; |
323 |
-+ ERROR ((0, 0, _(diagnostic[link_target]), |
324 |
-+ quotearg_colon (file_name))); |
325 |
-+ } |
326 |
- |
327 |
- do |
328 |
- { |
329 |
|
330 |
diff --git a/app-arch/tar/tar-1.29-r1.ebuild b/app-arch/tar/tar-1.29-r1.ebuild |
331 |
deleted file mode 100644 |
332 |
index cc4cfe9bcbe..00000000000 |
333 |
--- a/app-arch/tar/tar-1.29-r1.ebuild |
334 |
+++ /dev/null |
335 |
@@ -1,80 +0,0 @@ |
336 |
-# Copyright 1999-2017 Gentoo Foundation |
337 |
-# Distributed under the terms of the GNU General Public License v2 |
338 |
- |
339 |
-EAPI=5 |
340 |
- |
341 |
-inherit flag-o-matic eutils |
342 |
- |
343 |
-DESCRIPTION="Use this to make tarballs :)" |
344 |
-HOMEPAGE="https://www.gnu.org/software/tar/" |
345 |
-SRC_URI="mirror://gnu/tar/${P}.tar.bz2 |
346 |
- mirror://gnu-alpha/tar/${P}.tar.bz2" |
347 |
- |
348 |
-LICENSE="GPL-3+" |
349 |
-SLOT="0" |
350 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
351 |
-IUSE="acl elibc_glibc minimal nls selinux static userland_GNU xattr" |
352 |
- |
353 |
-RDEPEND="acl? ( virtual/acl ) |
354 |
- selinux? ( sys-libs/libselinux )" |
355 |
-DEPEND="${RDEPEND} |
356 |
- nls? ( >=sys-devel/gettext-0.10.35 ) |
357 |
- xattr? ( elibc_glibc? ( sys-apps/attr ) )" |
358 |
- |
359 |
-PATCHES=( |
360 |
- "${FILESDIR}/${P}-extract-pathname-bypass.patch" |
361 |
-) |
362 |
- |
363 |
-src_prepare() { |
364 |
- epatch "${PATCHES[@]}" |
365 |
- epatch_user |
366 |
- |
367 |
- if ! use userland_GNU ; then |
368 |
- sed -i \ |
369 |
- -e 's:/backup\.sh:/gbackup.sh:' \ |
370 |
- scripts/{backup,dump-remind,restore}.in \ |
371 |
- || die "sed non-GNU" |
372 |
- fi |
373 |
-} |
374 |
- |
375 |
-src_configure() { |
376 |
- use static && append-ldflags -static |
377 |
- FORCE_UNSAFE_CONFIGURE=1 \ |
378 |
- econf \ |
379 |
- --enable-backup-scripts \ |
380 |
- --bindir="${EPREFIX}"/bin \ |
381 |
- --libexecdir="${EPREFIX}"/usr/sbin \ |
382 |
- $(usex userland_GNU "" "--program-prefix=g") \ |
383 |
- $(use_with acl posix-acls) \ |
384 |
- $(use_enable nls) \ |
385 |
- $(use_with selinux) \ |
386 |
- $(use_with xattr xattrs) |
387 |
-} |
388 |
- |
389 |
-src_install() { |
390 |
- default |
391 |
- |
392 |
- local p=$(usex userland_GNU "" "g") |
393 |
- if [[ -z ${p} ]] ; then |
394 |
- # a nasty yet required piece of baggage |
395 |
- exeinto /etc |
396 |
- doexe "${FILESDIR}"/rmt |
397 |
- fi |
398 |
- |
399 |
- # autoconf looks for gtar before tar (in configure scripts), hence |
400 |
- # in Prefix it is important that it is there, otherwise, a gtar from |
401 |
- # the host system (FreeBSD, Solaris, Darwin) will be found instead |
402 |
- # of the Prefix provided (GNU) tar |
403 |
- if use prefix ; then |
404 |
- dosym tar /bin/gtar |
405 |
- fi |
406 |
- |
407 |
- mv "${ED}"/usr/sbin/${p}backup{,-tar} || die |
408 |
- mv "${ED}"/usr/sbin/${p}restore{,-tar} || die |
409 |
- |
410 |
- if use minimal ; then |
411 |
- find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \ |
412 |
- -type f -a '!' '(' -name tar -o -name ${p}tar ')' \ |
413 |
- -delete || die |
414 |
- fi |
415 |
-} |
416 |
|
417 |
diff --git a/app-arch/tar/tar-1.29-r3.ebuild b/app-arch/tar/tar-1.29-r3.ebuild |
418 |
deleted file mode 100644 |
419 |
index 7f8e1ba1631..00000000000 |
420 |
--- a/app-arch/tar/tar-1.29-r3.ebuild |
421 |
+++ /dev/null |
422 |
@@ -1,81 +0,0 @@ |
423 |
-# Copyright 1999-2018 Gentoo Foundation |
424 |
-# Distributed under the terms of the GNU General Public License v2 |
425 |
- |
426 |
-EAPI="5" |
427 |
- |
428 |
-inherit flag-o-matic eutils |
429 |
- |
430 |
-DESCRIPTION="Use this to make tarballs :)" |
431 |
-HOMEPAGE="https://www.gnu.org/software/tar/" |
432 |
-SRC_URI="mirror://gnu/tar/${P}.tar.bz2 |
433 |
- mirror://gnu-alpha/tar/${P}.tar.bz2" |
434 |
- |
435 |
-LICENSE="GPL-3+" |
436 |
-SLOT="0" |
437 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
438 |
-IUSE="acl elibc_glibc minimal nls selinux static userland_GNU xattr" |
439 |
- |
440 |
-RDEPEND="acl? ( virtual/acl ) |
441 |
- selinux? ( sys-libs/libselinux )" |
442 |
-DEPEND="${RDEPEND} |
443 |
- nls? ( >=sys-devel/gettext-0.10.35 ) |
444 |
- xattr? ( elibc_glibc? ( sys-apps/attr ) )" |
445 |
- |
446 |
-PATCHES=( |
447 |
- "${FILESDIR}/${P}-extract-pathname-bypass-upstream.patch" #598334 |
448 |
- "${FILESDIR}/${P}-add-files.patch" |
449 |
-) |
450 |
- |
451 |
-src_prepare() { |
452 |
- epatch "${PATCHES[@]}" |
453 |
- epatch_user |
454 |
- |
455 |
- if ! use userland_GNU ; then |
456 |
- sed -i \ |
457 |
- -e 's:/backup\.sh:/gbackup.sh:' \ |
458 |
- scripts/{backup,dump-remind,restore}.in \ |
459 |
- || die "sed non-GNU" |
460 |
- fi |
461 |
-} |
462 |
- |
463 |
-src_configure() { |
464 |
- use static && append-ldflags -static |
465 |
- FORCE_UNSAFE_CONFIGURE=1 \ |
466 |
- econf \ |
467 |
- --enable-backup-scripts \ |
468 |
- --bindir="${EPREFIX}"/bin \ |
469 |
- --libexecdir="${EPREFIX}"/usr/sbin \ |
470 |
- $(usex userland_GNU "" "--program-prefix=g") \ |
471 |
- $(use_with acl posix-acls) \ |
472 |
- $(use_enable nls) \ |
473 |
- $(use_with selinux) \ |
474 |
- $(use_with xattr xattrs) |
475 |
-} |
476 |
- |
477 |
-src_install() { |
478 |
- default |
479 |
- |
480 |
- local p=$(usex userland_GNU "" "g") |
481 |
- if [[ -z ${p} ]] ; then |
482 |
- # a nasty yet required piece of baggage |
483 |
- exeinto /etc |
484 |
- doexe "${FILESDIR}"/rmt |
485 |
- fi |
486 |
- |
487 |
- # autoconf looks for gtar before tar (in configure scripts), hence |
488 |
- # in Prefix it is important that it is there, otherwise, a gtar from |
489 |
- # the host system (FreeBSD, Solaris, Darwin) will be found instead |
490 |
- # of the Prefix provided (GNU) tar |
491 |
- if use prefix ; then |
492 |
- dosym tar /bin/gtar |
493 |
- fi |
494 |
- |
495 |
- mv "${ED}"/usr/sbin/${p}backup{,-tar} || die |
496 |
- mv "${ED}"/usr/sbin/${p}restore{,-tar} || die |
497 |
- |
498 |
- if use minimal ; then |
499 |
- find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \ |
500 |
- -type f -a '!' '(' -name tar -o -name ${p}tar ')' \ |
501 |
- -delete || die |
502 |
- fi |
503 |
-} |