commit:     c018e504275b5e4745d50900d6f244f9660e22fe
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 19 16:30:42 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Nov 19 16:30:42 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c018e504

app-arch/bzip2: sync

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
Package-Manager: Portage-2.3.40.3-prefix, Repoman-2.3.9

 ...zip2-1.0.6-r8.ebuild => bzip2-1.0.6-r10.ebuild} | 22 ++++++------
 app-arch/bzip2/files/bzip2-1.0.3-no-test.patch     |  4 +--
 app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch |  4 +--
 .../bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch  |  8 ++---
 app-arch/bzip2/files/bzip2-1.0.4-man-links.patch   |  4 +--
 .../bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch    |  4 +--
 app-arch/bzip2/files/bzip2-1.0.6-prefix.patch      | 42 ----------------------
 app-arch/bzip2/files/bzip2-1.0.6-progress.patch    |  8 ++---
 app-arch/bzip2/files/bzip2-1.0.6-r7-checkenv.patch |  4 +--
 app-arch/bzip2/files/bzip2-1.0.6-saneso.patch      |  4 +--
 app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch | 24 +++++++++++++
 11 files changed, 56 insertions(+), 72 deletions(-)

diff --git a/app-arch/bzip2/bzip2-1.0.6-r8.ebuild 
b/app-arch/bzip2/bzip2-1.0.6-r10.ebuild
similarity index 91%
rename from app-arch/bzip2/bzip2-1.0.6-r8.ebuild
rename to app-arch/bzip2/bzip2-1.0.6-r10.ebuild
index 498b5bb32c..ee2e4b825a 100644
--- a/app-arch/bzip2/bzip2-1.0.6-r8.ebuild
+++ b/app-arch/bzip2/bzip2-1.0.6-r10.ebuild
@@ -1,16 +1,16 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
 #      (since we're building shared libs) ...
 
-EAPI=5
+EAPI=6
 
-inherit eutils toolchain-funcs multilib multilib-minimal prefix
+inherit toolchain-funcs multilib-minimal prefix
 
 DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
-HOMEPAGE="http://www.bzip.org/";
-SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz";
+HOMEPAGE="https://sourceware.org/bzip2/";
+SRC_URI="mirror://gentoo/${P}.tar.gz"
 
 LICENSE="BZIP2"
 SLOT="0/1" # subslot = SONAME
@@ -27,13 +27,16 @@ PATCHES=(
        "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
        "${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch
        "${FILESDIR}"/${PN}-1.0.6-CVE-2016-3189.patch #620466
+       "${FILESDIR}"/${PN}-1.0.6-ubsan-error.patch
 
        "${FILESDIR}"/${PN}-1.0.6-r7-checkenv.patch # for AIX, Darwin?
-       "${FILESDIR}"/${PN}-1.0.6-prefix.patch
 )
 
+DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf )
+HTML_DOCS=( manual.html )
+
 src_prepare() {
-       epatch "${PATCHES[@]}"
+       default
 
        # - Use right man path
        # - Generate symlinks instead of hardlinks
@@ -44,7 +47,7 @@ src_prepare() {
                -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
                Makefile || die
 
-       eprefixify bz{diff,grep,more}
+       hprefixify -w "/^PATH=/" bz{diff,grep,more}
        # this a makefile for Darwin, which already "includes" saneso
        cp "${FILESDIR}"/${P}-Makefile-libbz2_dylib Makefile-libbz2_dylib || die
 
@@ -148,8 +151,7 @@ multilib_src_install_all() {
                dosym bzgrep.1 /usr/share/man/man1/${x}.1
        done
 
-       dodoc README* CHANGES manual.pdf
-       dohtml manual.html
+       einstalldocs
 
        # move "important" bzip2 binaries to /bin and use the shared libbz2.so
        dosym bzip2 /bin/bzcat

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
index 672c89dfbd..9e554f7951 100644
--- a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch
+++ b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch
@@ -1,5 +1,5 @@
---- Makefile
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -23,5 +23,5 @@
        bzlib.o
  

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
index b31cc061db..74f8df000b 100644
--- a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch
+++ b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch
@@ -3,8 +3,8 @@ with calls to sed so POSIX shells work
 
 http://bugs.gentoo.org/193365
 
---- bzgrep
-+++ bzgrep
+--- a/bzgrep
++++ b/bzgrep
 @@ -63,10 +63,9 @@
      bzip2 -cdfq "$i" | $grep $opt "$pat"
      r=$?

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
index 5a95ed68b2..04bd0d9abd 100644
--- a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch
+++ b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch
@@ -1,5 +1,5 @@
---- Makefile
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -18,10 +18,9 @@
  CC=gcc
  AR=ar
@@ -12,8 +12,8 @@
  
  # Where you want it installed when you do 'make install'
  PREFIX=/usr/local
---- Makefile-libbz2_so
-+++ Makefile-libbz2_so
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
 @@ -24,7 +24,7 @@
  SHELL=/bin/sh
  CC=gcc

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
index 308f5f9b3e..deaa981adc 100644
--- a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch
+++ b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch
@@ -1,7 +1,7 @@
 http://bugs.gentoo.org/172986
 
---- bzip2-1.0.4/Makefile
-+++ bzip2-1.0.4/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -85,4 +85,7 @@
        cp -f bzip2.1 $(PREFIX)/share/man/man1
        chmod a+r $(PREFIX)/share/man/man1/bzip2.1

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
index 1d0c3a6dd3..b031c808fe 100644
--- 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
@@ -6,8 +6,8 @@ Signed-off-by: Armin Kuster <[email protected]>
 
 Index: bzip2-1.0.6/bzip2recover.c
 ===================================================================
---- bzip2-1.0.6.orig/bzip2recover.c
-+++ bzip2-1.0.6/bzip2recover.c
+--- a/bzip2recover.c
++++ b/bzip2recover.c
 @@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv )
              bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
              bsPutUInt32 ( bsWr, blockCRC );

diff --git a/app-arch/bzip2/files/bzip2-1.0.6-prefix.patch 
b/app-arch/bzip2/files/bzip2-1.0.6-prefix.patch
deleted file mode 100644
index 2092efe098..0000000000
--- a/app-arch/bzip2/files/bzip2-1.0.6-prefix.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- bzdiff
-+++ bzdiff
-@@ -12,7 +12,7 @@
- # necessary) and fed to cmp or diff.  The exit status from cmp
- # or diff is preserved.
- 
--PATH="/usr/bin:/bin:$PATH"; export PATH
-+PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/bin:$PATH"; 
export PATH
- prog=`echo $0 | sed 's|.*/||'`
- case "$prog" in
-   *cmp) comp=${CMP-cmp}   ;;
-@@ -56,7 +56,7 @@
-                         bzip2 -cdfq "$2" > $tmp
-                         bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
-                         STAT="$?"
--                      /bin/rm -f $tmp;;
-+                      rm -f $tmp;;
- 
-                 *)      bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
-                         STAT="$?";;
---- bzgrep
-+++ bzgrep
-@@ -6,7 +6,7 @@
- ## zgrep -- a wrapper around a grep program that decompresses files as needed
- ## Adapted from a version sent by Charles Levert <[email protected]>
- 
--PATH="/usr/bin:$PATH"; export PATH
-+PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:$PATH"; export PATH
- 
- prog=`echo $0 | sed 's|.*/||'`
- case "$prog" in
---- bzmore
-+++ bzmore
-@@ -3,7 +3,7 @@
- # Bzmore wrapped for bzip2, 
- # adapted from zmore by Philippe Troin <[email protected]> for Debian GNU/Linux.
- 
--PATH="/usr/bin:$PATH"; export PATH
-+PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:$PATH"; export PATH
- 
- prog=`echo $0 | sed 's|.*/||'`
- case "$prog" in

diff --git a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch 
b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch
index 7691d63e27..8369597714 100644
--- a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch
+++ b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch
@@ -2,8 +2,8 @@ Ripped from Mandrake
 
 http://bugs.gentoo.org/82192
 
---- bzip2-1.0.6/bzip2.1
-+++ bzip2-1.0.6/bzip2.1
+--- a/bzip2.1
++++ b/bzip2.1
 @@ -235,6 +235,10 @@
  Suppress non-essential warning messages.  Messages pertaining to
  I/O errors and other critical events will not be suppressed.
@@ -15,8 +15,8 @@ http://bugs.gentoo.org/82192
  .B \-v --verbose
  Verbose mode -- show the compression ratio for each file processed.
  Further \-v's increase the verbosity level, spewing out lots of
---- bzip2-1.0.6/bzip2.c
-+++ bzip2-1.0.6/bzip2.c
+--- a/bzip2.c
++++ b/bzip2.c
 @@ -145,6 +145,7 @@
  #include <signal.h>
  #include <math.h>

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
index 205515adc4..3df7b09610 100644
--- a/app-arch/bzip2/files/bzip2-1.0.6-r7-checkenv.patch
+++ b/app-arch/bzip2/files/bzip2-1.0.6-r7-checkenv.patch
@@ -1,5 +1,5 @@
---- Makefile   2005-02-17 05:28:24.000000000 -0600
-+++ Makefile-new       2005-10-12 20:26:29.000000000 -0500
+--- a/Makefile 2005-02-17 05:28:24.000000000 -0600
++++ b/Makefile 2005-10-12 20:26:29.000000000 -0500
 @@ -42,12 +42,12 @@
  
  check: test

diff --git a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch 
b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch
index 9c4ddf0530..52ea791ce3 100644
--- a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch
+++ b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch
@@ -1,5 +1,5 @@
---- Makefile-libbz2_so
-+++ Makefile-libbz2_so
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
 @@ -35,8 +35,8 @@
        bzlib.o
  

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
new file mode 100644
index 0000000000..84b811177e
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch
@@ -0,0 +1,24 @@
+Author: Manoj Gupta <[email protected]>
+
+Use unsigned 1 for shifting instead of signed 1.
+
+This fixed an issue with shift caught by undefined behavior
+sanitizer in clang.
+bzip2-1.0.6/blocksort.c:255:7
+runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
+
+--- a/blocksort.c
++++ b/blocksort.c
+@@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap,
+       bhtab [ 0 .. 2+(nblock/32) ] destroyed
+ */
+ 
+-#define       SET_BH(zz)  bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
+-#define     CLEAR_BH(zz)  bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
+-#define     ISSET_BH(zz)  (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
++#define       SET_BH(zz)  bhtab[(zz) >> 5] |= (1u << ((zz) & 31))
++#define     CLEAR_BH(zz)  bhtab[(zz) >> 5] &= ~(1u << ((zz) & 31))
++#define     ISSET_BH(zz)  (bhtab[(zz) >> 5] & (1u << ((zz) & 31)))
+ #define      WORD_BH(zz)  bhtab[(zz) >> 5]
+ #define UNALIGNED_BH(zz)  ((zz) & 0x01f)
+ 

Reply via email to