1 |
commit: c018e504275b5e4745d50900d6f244f9660e22fe |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 19 16:30:42 2018 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 19 16:30:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c018e504 |
7 |
|
8 |
app-arch/bzip2: sync |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.40.3-prefix, Repoman-2.3.9 |
12 |
|
13 |
...zip2-1.0.6-r8.ebuild => bzip2-1.0.6-r10.ebuild} | 22 ++++++------ |
14 |
app-arch/bzip2/files/bzip2-1.0.3-no-test.patch | 4 +-- |
15 |
app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch | 4 +-- |
16 |
.../bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch | 8 ++--- |
17 |
app-arch/bzip2/files/bzip2-1.0.4-man-links.patch | 4 +-- |
18 |
.../bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch | 4 +-- |
19 |
app-arch/bzip2/files/bzip2-1.0.6-prefix.patch | 42 ---------------------- |
20 |
app-arch/bzip2/files/bzip2-1.0.6-progress.patch | 8 ++--- |
21 |
app-arch/bzip2/files/bzip2-1.0.6-r7-checkenv.patch | 4 +-- |
22 |
app-arch/bzip2/files/bzip2-1.0.6-saneso.patch | 4 +-- |
23 |
app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch | 24 +++++++++++++ |
24 |
11 files changed, 56 insertions(+), 72 deletions(-) |
25 |
|
26 |
diff --git a/app-arch/bzip2/bzip2-1.0.6-r8.ebuild b/app-arch/bzip2/bzip2-1.0.6-r10.ebuild |
27 |
similarity index 91% |
28 |
rename from app-arch/bzip2/bzip2-1.0.6-r8.ebuild |
29 |
rename to app-arch/bzip2/bzip2-1.0.6-r10.ebuild |
30 |
index 498b5bb32c..ee2e4b825a 100644 |
31 |
--- a/app-arch/bzip2/bzip2-1.0.6-r8.ebuild |
32 |
+++ b/app-arch/bzip2/bzip2-1.0.6-r10.ebuild |
33 |
@@ -1,16 +1,16 @@ |
34 |
-# Copyright 1999-2017 Gentoo Foundation |
35 |
+# Copyright 1999-2018 Gentoo Foundation |
36 |
# Distributed under the terms of the GNU General Public License v2 |
37 |
|
38 |
# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly |
39 |
# (since we're building shared libs) ... |
40 |
|
41 |
-EAPI=5 |
42 |
+EAPI=6 |
43 |
|
44 |
-inherit eutils toolchain-funcs multilib multilib-minimal prefix |
45 |
+inherit toolchain-funcs multilib-minimal prefix |
46 |
|
47 |
DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux" |
48 |
-HOMEPAGE="http://www.bzip.org/" |
49 |
-SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz" |
50 |
+HOMEPAGE="https://sourceware.org/bzip2/" |
51 |
+SRC_URI="mirror://gentoo/${P}.tar.gz" |
52 |
|
53 |
LICENSE="BZIP2" |
54 |
SLOT="0/1" # subslot = SONAME |
55 |
@@ -27,13 +27,16 @@ PATCHES=( |
56 |
"${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573 |
57 |
"${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch |
58 |
"${FILESDIR}"/${PN}-1.0.6-CVE-2016-3189.patch #620466 |
59 |
+ "${FILESDIR}"/${PN}-1.0.6-ubsan-error.patch |
60 |
|
61 |
"${FILESDIR}"/${PN}-1.0.6-r7-checkenv.patch # for AIX, Darwin? |
62 |
- "${FILESDIR}"/${PN}-1.0.6-prefix.patch |
63 |
) |
64 |
|
65 |
+DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf ) |
66 |
+HTML_DOCS=( manual.html ) |
67 |
+ |
68 |
src_prepare() { |
69 |
- epatch "${PATCHES[@]}" |
70 |
+ default |
71 |
|
72 |
# - Use right man path |
73 |
# - Generate symlinks instead of hardlinks |
74 |
@@ -44,7 +47,7 @@ src_prepare() { |
75 |
-e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \ |
76 |
Makefile || die |
77 |
|
78 |
- eprefixify bz{diff,grep,more} |
79 |
+ hprefixify -w "/^PATH=/" bz{diff,grep,more} |
80 |
# this a makefile for Darwin, which already "includes" saneso |
81 |
cp "${FILESDIR}"/${P}-Makefile-libbz2_dylib Makefile-libbz2_dylib || die |
82 |
|
83 |
@@ -148,8 +151,7 @@ multilib_src_install_all() { |
84 |
dosym bzgrep.1 /usr/share/man/man1/${x}.1 |
85 |
done |
86 |
|
87 |
- dodoc README* CHANGES manual.pdf |
88 |
- dohtml manual.html |
89 |
+ einstalldocs |
90 |
|
91 |
# move "important" bzip2 binaries to /bin and use the shared libbz2.so |
92 |
dosym bzip2 /bin/bzcat |
93 |
|
94 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch |
95 |
index 672c89dfbd..9e554f7951 100644 |
96 |
--- a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch |
97 |
+++ b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch |
98 |
@@ -1,5 +1,5 @@ |
99 |
---- Makefile |
100 |
-+++ Makefile |
101 |
+--- a/Makefile |
102 |
++++ b/Makefile |
103 |
@@ -23,5 +23,5 @@ |
104 |
bzlib.o |
105 |
|
106 |
|
107 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch |
108 |
index b31cc061db..74f8df000b 100644 |
109 |
--- a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch |
110 |
+++ b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch |
111 |
@@ -3,8 +3,8 @@ with calls to sed so POSIX shells work |
112 |
|
113 |
http://bugs.gentoo.org/193365 |
114 |
|
115 |
---- bzgrep |
116 |
-+++ bzgrep |
117 |
+--- a/bzgrep |
118 |
++++ b/bzgrep |
119 |
@@ -63,10 +63,9 @@ |
120 |
bzip2 -cdfq "$i" | $grep $opt "$pat" |
121 |
r=$? |
122 |
|
123 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch |
124 |
index 5a95ed68b2..04bd0d9abd 100644 |
125 |
--- a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch |
126 |
+++ b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch |
127 |
@@ -1,5 +1,5 @@ |
128 |
---- Makefile |
129 |
-+++ Makefile |
130 |
+--- a/Makefile |
131 |
++++ b/Makefile |
132 |
@@ -18,10 +18,9 @@ |
133 |
CC=gcc |
134 |
AR=ar |
135 |
@@ -12,8 +12,8 @@ |
136 |
|
137 |
# Where you want it installed when you do 'make install' |
138 |
PREFIX=/usr/local |
139 |
---- Makefile-libbz2_so |
140 |
-+++ Makefile-libbz2_so |
141 |
+--- a/Makefile-libbz2_so |
142 |
++++ b/Makefile-libbz2_so |
143 |
@@ -24,7 +24,7 @@ |
144 |
SHELL=/bin/sh |
145 |
CC=gcc |
146 |
|
147 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch |
148 |
index 308f5f9b3e..deaa981adc 100644 |
149 |
--- a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch |
150 |
+++ b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch |
151 |
@@ -1,7 +1,7 @@ |
152 |
http://bugs.gentoo.org/172986 |
153 |
|
154 |
---- bzip2-1.0.4/Makefile |
155 |
-+++ bzip2-1.0.4/Makefile |
156 |
+--- a/Makefile |
157 |
++++ b/Makefile |
158 |
@@ -85,4 +85,7 @@ |
159 |
cp -f bzip2.1 $(PREFIX)/share/man/man1 |
160 |
chmod a+r $(PREFIX)/share/man/man1/bzip2.1 |
161 |
|
162 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch b/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch |
163 |
index 1d0c3a6dd3..b031c808fe 100644 |
164 |
--- a/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch |
165 |
+++ b/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch |
166 |
@@ -6,8 +6,8 @@ Signed-off-by: Armin Kuster <akuster@××××××.com> |
167 |
|
168 |
Index: bzip2-1.0.6/bzip2recover.c |
169 |
=================================================================== |
170 |
---- bzip2-1.0.6.orig/bzip2recover.c |
171 |
-+++ bzip2-1.0.6/bzip2recover.c |
172 |
+--- a/bzip2recover.c |
173 |
++++ b/bzip2recover.c |
174 |
@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv ) |
175 |
bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); |
176 |
bsPutUInt32 ( bsWr, blockCRC ); |
177 |
|
178 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-prefix.patch b/app-arch/bzip2/files/bzip2-1.0.6-prefix.patch |
179 |
deleted file mode 100644 |
180 |
index 2092efe098..0000000000 |
181 |
--- a/app-arch/bzip2/files/bzip2-1.0.6-prefix.patch |
182 |
+++ /dev/null |
183 |
@@ -1,42 +0,0 @@ |
184 |
---- bzdiff |
185 |
-+++ bzdiff |
186 |
-@@ -12,7 +12,7 @@ |
187 |
- # necessary) and fed to cmp or diff. The exit status from cmp |
188 |
- # or diff is preserved. |
189 |
- |
190 |
--PATH="/usr/bin:/bin:$PATH"; export PATH |
191 |
-+PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/bin:$PATH"; export PATH |
192 |
- prog=`echo $0 | sed 's|.*/||'` |
193 |
- case "$prog" in |
194 |
- *cmp) comp=${CMP-cmp} ;; |
195 |
-@@ -56,7 +56,7 @@ |
196 |
- bzip2 -cdfq "$2" > $tmp |
197 |
- bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp |
198 |
- STAT="$?" |
199 |
-- /bin/rm -f $tmp;; |
200 |
-+ rm -f $tmp;; |
201 |
- |
202 |
- *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2" |
203 |
- STAT="$?";; |
204 |
---- bzgrep |
205 |
-+++ bzgrep |
206 |
-@@ -6,7 +6,7 @@ |
207 |
- ## zgrep -- a wrapper around a grep program that decompresses files as needed |
208 |
- ## Adapted from a version sent by Charles Levert <charles@××××××××××××.ca> |
209 |
- |
210 |
--PATH="/usr/bin:$PATH"; export PATH |
211 |
-+PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:$PATH"; export PATH |
212 |
- |
213 |
- prog=`echo $0 | sed 's|.*/||'` |
214 |
- case "$prog" in |
215 |
---- bzmore |
216 |
-+++ bzmore |
217 |
-@@ -3,7 +3,7 @@ |
218 |
- # Bzmore wrapped for bzip2, |
219 |
- # adapted from zmore by Philippe Troin <phil@××××.org> for Debian GNU/Linux. |
220 |
- |
221 |
--PATH="/usr/bin:$PATH"; export PATH |
222 |
-+PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:$PATH"; export PATH |
223 |
- |
224 |
- prog=`echo $0 | sed 's|.*/||'` |
225 |
- case "$prog" in |
226 |
|
227 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch |
228 |
index 7691d63e27..8369597714 100644 |
229 |
--- a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch |
230 |
+++ b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch |
231 |
@@ -2,8 +2,8 @@ Ripped from Mandrake |
232 |
|
233 |
http://bugs.gentoo.org/82192 |
234 |
|
235 |
---- bzip2-1.0.6/bzip2.1 |
236 |
-+++ bzip2-1.0.6/bzip2.1 |
237 |
+--- a/bzip2.1 |
238 |
++++ b/bzip2.1 |
239 |
@@ -235,6 +235,10 @@ |
240 |
Suppress non-essential warning messages. Messages pertaining to |
241 |
I/O errors and other critical events will not be suppressed. |
242 |
@@ -15,8 +15,8 @@ http://bugs.gentoo.org/82192 |
243 |
.B \-v --verbose |
244 |
Verbose mode -- show the compression ratio for each file processed. |
245 |
Further \-v's increase the verbosity level, spewing out lots of |
246 |
---- bzip2-1.0.6/bzip2.c |
247 |
-+++ bzip2-1.0.6/bzip2.c |
248 |
+--- a/bzip2.c |
249 |
++++ b/bzip2.c |
250 |
@@ -145,6 +145,7 @@ |
251 |
#include <signal.h> |
252 |
#include <math.h> |
253 |
|
254 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-r7-checkenv.patch b/app-arch/bzip2/files/bzip2-1.0.6-r7-checkenv.patch |
255 |
index 205515adc4..3df7b09610 100644 |
256 |
--- a/app-arch/bzip2/files/bzip2-1.0.6-r7-checkenv.patch |
257 |
+++ b/app-arch/bzip2/files/bzip2-1.0.6-r7-checkenv.patch |
258 |
@@ -1,5 +1,5 @@ |
259 |
---- Makefile 2005-02-17 05:28:24.000000000 -0600 |
260 |
-+++ Makefile-new 2005-10-12 20:26:29.000000000 -0500 |
261 |
+--- a/Makefile 2005-02-17 05:28:24.000000000 -0600 |
262 |
++++ b/Makefile 2005-10-12 20:26:29.000000000 -0500 |
263 |
@@ -42,12 +42,12 @@ |
264 |
|
265 |
check: test |
266 |
|
267 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch |
268 |
index 9c4ddf0530..52ea791ce3 100644 |
269 |
--- a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch |
270 |
+++ b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch |
271 |
@@ -1,5 +1,5 @@ |
272 |
---- Makefile-libbz2_so |
273 |
-+++ Makefile-libbz2_so |
274 |
+--- a/Makefile-libbz2_so |
275 |
++++ b/Makefile-libbz2_so |
276 |
@@ -35,8 +35,8 @@ |
277 |
bzlib.o |
278 |
|
279 |
|
280 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch b/app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch |
281 |
new file mode 100644 |
282 |
index 0000000000..84b811177e |
283 |
--- /dev/null |
284 |
+++ b/app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch |
285 |
@@ -0,0 +1,24 @@ |
286 |
+Author: Manoj Gupta <manojgupta@××××××.com> |
287 |
+ |
288 |
+Use unsigned 1 for shifting instead of signed 1. |
289 |
+ |
290 |
+This fixed an issue with shift caught by undefined behavior |
291 |
+sanitizer in clang. |
292 |
+bzip2-1.0.6/blocksort.c:255:7 |
293 |
+runtime error: left shift of 1 by 31 places cannot be represented in type 'int' |
294 |
+ |
295 |
+--- a/blocksort.c |
296 |
++++ b/blocksort.c |
297 |
+@@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap, |
298 |
+ bhtab [ 0 .. 2+(nblock/32) ] destroyed |
299 |
+ */ |
300 |
+ |
301 |
+-#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) |
302 |
+-#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) |
303 |
+-#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) |
304 |
++#define SET_BH(zz) bhtab[(zz) >> 5] |= (1u << ((zz) & 31)) |
305 |
++#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1u << ((zz) & 31)) |
306 |
++#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1u << ((zz) & 31))) |
307 |
+ #define WORD_BH(zz) bhtab[(zz) >> 5] |
308 |
+ #define UNALIGNED_BH(zz) ((zz) & 0x01f) |
309 |
+ |