Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/tar/files/, app-arch/tar/
Date: Sun, 10 Mar 2019 16:16:24
Message-Id: 1552234563.d13df079ae17e4dd7ddc114185e835920a52882f.zlogene@gentoo
1 commit: d13df079ae17e4dd7ddc114185e835920a52882f
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 10 16:16:03 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 10 16:16:03 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d13df079
7
8 app-arch/tar: Security cleanup
9
10 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 app-arch/tar/Manifest | 1 -
14 .../tar/files/tar-1.30-fix-test-117-and-118.patch | 89 ----------------------
15 app-arch/tar/files/tar-1.30-fix-test-92.patch | 13 ----
16 app-arch/tar/tar-1.30.ebuild | 81 --------------------
17 4 files changed, 184 deletions(-)
18
19 diff --git a/app-arch/tar/Manifest b/app-arch/tar/Manifest
20 index dcb20a1e807..eeff245a6f1 100644
21 --- a/app-arch/tar/Manifest
22 +++ b/app-arch/tar/Manifest
23 @@ -1,3 +1,2 @@
24 -DIST tar-1.30.tar.bz2 2858639 BLAKE2B 82a8b1fbf1eb5c0347b2f8cf35854498e2955eb85eaf041ec44a38bbd9bc82cc7184d5cb858f9905f503c9178ec6d0ed50be2dc27be9933b29e0a18b8e6c0b8f SHA512 07a1157430898fee1a2c6fd3853d59d4ae13998db685669c8c702f73d2466eeb9892f84a5f0495bfe088c8190a643a99ac9f2cb16b85c9fe3ae0d83cc0f338e8
25 DIST tar-1.31.tar.bz2 2946047 BLAKE2B c85c17740e4cd3e8c93d10d93b070cd80629b7f052d020c0513cdddd377f3f90e229a6fa10dfbb43e1006f8202c674f2df854b864c0947f49339a52964d65c1c SHA512 0f4d00e08d56a8f8c32aac0afa2845397efb8ad72eaa6af47334cef9612adb1a4b91406bdc2c3a2cf1b9cc8b92c12735a331e0d137b24f66703f6af6219464f6
26 DIST tar-1.32.tar.bz2 2947264 BLAKE2B 4e380a9a2f84a2af5130464e1b298ae6acf02ee459cbca20dd0991c2859785e5aac789d57b87b32e8b45d89985b6414af9dd37161385da9568d6030c5aa42c0e SHA512 3139e87112123269ee0600243b3ea081687cc93667bef5832bfe3c785c1be622f520f00fcfbdf44ad1d3247866d0ecfe347a85bbfec38eb38fa1014baef566f6
27
28 diff --git a/app-arch/tar/files/tar-1.30-fix-test-117-and-118.patch b/app-arch/tar/files/tar-1.30-fix-test-117-and-118.patch
29 deleted file mode 100644
30 index 2f75da6cd24..00000000000
31 --- a/app-arch/tar/files/tar-1.30-fix-test-117-and-118.patch
32 +++ /dev/null
33 @@ -1,89 +0,0 @@
34 -tests: fix race in dirrem01 and dirrem02
35 -
36 -Previously the '--checkpoint-action=echo' was triggered after
37 -'--checkpoint-action=sleep=1' - so the order of events *usually*
38 -was (for --format='gnu'):
39 -
40 - ...
41 - 1. checkpoint handler before write of 'dir/sub' member
42 - 2. one-second delay
43 - 3. stderr write: 'tar: Write checkpoint 3'
44 - 4. write the member 'dir/sub' into the archive
45 - 5. check that the member's ctime has not been changed
46 - 6. genfile's detecting 'Write checkpoint', doing unlink
47 - ...
48 -
49 -But sometimes, the genfile was fast enough to win the race and
50 -unlinked the directory before the member was written into the
51 -archive (IOW, the order was 1-2-3-6-4-5). This led to the
52 -occasional warning 'tar: dir/sub: file changed as we read it'.
53 -
54 -Swap the order of 'sleep=1' and 'echo' actions so the genfile
55 -utility has (hopefully) enough time to do the unlink before
56 -writing the file into the archive (enforce 1-2-3-6-4-5 order).
57 -
58 -* tests/dirrem01.at: Swap 'sleep=1' and 'echo' actions.
59 -* tests/dirrem02.at: Likewise.
60 -
61 -Origin: https://lists.gnu.org/archive/html/bug-tar/2018-01/msg00000.html
62 ----
63 - tests/dirrem01.at | 5 +++--
64 - tests/dirrem02.at | 7 ++++---
65 - 2 files changed, 7 insertions(+), 5 deletions(-)
66 -
67 -diff --git a/tests/dirrem01.at b/tests/dirrem01.at
68 -index 40344dc..dabc206 100644
69 ---- a/tests/dirrem01.at
70 -+++ b/tests/dirrem01.at
71 -@@ -47,14 +47,15 @@ gnu) CPT=3;;
72 - esac
73 -
74 - genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
75 -- tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
76 -- --checkpoint-action='echo' -c -f archive.tar \
77 -+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='echo' \
78 -+ --checkpoint-action='sleep=1' -c -f archive.tar \
79 - --listed-incremental db -v dir >/dev/null
80 - ],
81 - [1],
82 - [ignore],
83 - [tar: dir: Directory is new
84 - tar: dir/sub: Directory is new
85 -+tar: dir/sub: file changed as we read it
86 - tar: dir/sub: File removed before we read it
87 - ],[],[],[gnu,posix])
88 -
89 -diff --git a/tests/dirrem02.at b/tests/dirrem02.at
90 -index e1cf9ef..924454f 100644
91 ---- a/tests/dirrem02.at
92 -+++ b/tests/dirrem02.at
93 -@@ -20,7 +20,7 @@
94 -
95 - # Description:
96 - #
97 --# When an explicitley named directory disappears during creation
98 -+# When an explicitly named directory disappears during creation
99 - # of incremental dump, tar should still exit with TAREXIT_FAILURE (2).
100 - #
101 - # For further details see dirrem01.at
102 -@@ -44,14 +44,15 @@ gnu) CPT=3;;
103 - esac
104 -
105 - genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
106 -- tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
107 -- --checkpoint-action='echo' -c -f archive.tar \
108 -+ tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='echo' \
109 -+ --checkpoint-action='sleep=1' -c -f archive.tar \
110 - --listed-incremental db -v dir dir/sub >/dev/null
111 - ],
112 - [2],
113 - [ignore],
114 - [tar: dir: Directory is new
115 - tar: dir/sub: Directory is new
116 -+tar: dir/sub: file changed as we read it
117 - tar: dir/sub: Cannot open: No such file or directory
118 - tar: Exiting with failure status due to previous errors
119 - ],[],[],[gnu,posix])
120 ---
121 -cgit v1.0-41-gc330
122 -
123
124 diff --git a/app-arch/tar/files/tar-1.30-fix-test-92.patch b/app-arch/tar/files/tar-1.30-fix-test-92.patch
125 deleted file mode 100644
126 index d5a63e4ab35..00000000000
127 --- a/app-arch/tar/files/tar-1.30-fix-test-92.patch
128 +++ /dev/null
129 @@ -1,13 +0,0 @@
130 -http://lists.gnu.org/archive/html/bug-tar/2017-12/msg00027.html
131 -
132 ---- a/tests/difflink.at
133 -+++ b/tests/difflink.at
134 -@@ -21,7 +21,7 @@ mkdir a
135 - genfile -f a/x
136 - ln -s x a/y
137 - ln a/y a/z
138 --tar cf a.tar a
139 -+tar cf a.tar a/x a/y a/z
140 - rm a/z
141 - ln -s x a/z
142 - tar df a.tar
143
144 diff --git a/app-arch/tar/tar-1.30.ebuild b/app-arch/tar/tar-1.30.ebuild
145 deleted file mode 100644
146 index 613884f9f5d..00000000000
147 --- a/app-arch/tar/tar-1.30.ebuild
148 +++ /dev/null
149 @@ -1,81 +0,0 @@
150 -# Copyright 1999-2018 Gentoo Foundation
151 -# Distributed under the terms of the GNU General Public License v2
152 -
153 -EAPI=6
154 -
155 -inherit flag-o-matic
156 -
157 -DESCRIPTION="Use this to make tarballs :)"
158 -HOMEPAGE="https://www.gnu.org/software/tar/"
159 -SRC_URI="mirror://gnu/tar/${P}.tar.bz2
160 - mirror://gnu-alpha/tar/${P}.tar.bz2"
161 -
162 -LICENSE="GPL-3+"
163 -SLOT="0"
164 -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 ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
165 -IUSE="acl elibc_glibc minimal nls selinux static userland_GNU xattr"
166 -
167 -RDEPEND="acl? ( virtual/acl )
168 - selinux? ( sys-libs/libselinux )"
169 -DEPEND="${RDEPEND}
170 - nls? ( >=sys-devel/gettext-0.10.35 )
171 - xattr? ( elibc_glibc? ( sys-apps/attr ) )"
172 -
173 -PATCHES=(
174 - "${FILESDIR}"/${P}-fix-test-92.patch
175 - "${FILESDIR}"/${P}-fix-test-117-and-118.patch
176 -)
177 -
178 -src_prepare() {
179 - default
180 -
181 - if ! use userland_GNU ; then
182 - sed -i \
183 - -e 's:/backup\.sh:/gbackup.sh:' \
184 - scripts/{backup,dump-remind,restore}.in \
185 - || die "sed non-GNU"
186 - fi
187 -}
188 -
189 -src_configure() {
190 - use static && append-ldflags -static
191 - local myeconfargs=(
192 - --bindir="${EPREFIX}"/bin
193 - --enable-backup-scripts
194 - --libexecdir="${EPREFIX}"/usr/sbin
195 - $(usex userland_GNU "" "--program-prefix=g")
196 - $(use_with acl posix-acls)
197 - $(use_enable nls)
198 - $(use_with selinux)
199 - $(use_with xattr xattrs)
200 - )
201 - FORCE_UNSAFE_CONFIGURE=1 econf "${myeconfargs[@]}"
202 -}
203 -
204 -src_install() {
205 - default
206 -
207 - local p=$(usex userland_GNU "" "g")
208 - if [[ -z ${p} ]] ; then
209 - # a nasty yet required piece of baggage
210 - exeinto /etc
211 - doexe "${FILESDIR}"/rmt
212 - fi
213 -
214 - # autoconf looks for gtar before tar (in configure scripts), hence
215 - # in Prefix it is important that it is there, otherwise, a gtar from
216 - # the host system (FreeBSD, Solaris, Darwin) will be found instead
217 - # of the Prefix provided (GNU) tar
218 - if use prefix ; then
219 - dosym tar /bin/gtar
220 - fi
221 -
222 - mv "${ED%/}"/usr/sbin/${p}backup{,-tar} || die
223 - mv "${ED%/}"/usr/sbin/${p}restore{,-tar} || die
224 -
225 - if use minimal ; then
226 - find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \
227 - -type f -a '!' '(' -name tar -o -name ${p}tar ')' \
228 - -delete || die
229 - fi
230 -}