public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/prefix:master commit in: app-arch/bzip2/, app-arch/bzip2/files/
@ 2017-11-15 15:51 Fabian Groffen
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Groffen @ 2017-11-15 15:51 UTC (permalink / raw
  To: gentoo-commits

commit:     ab12f95ca1503bbcf12964e3d4d5673993f422a1
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 15 15:31:41 2017 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Nov 15 15:31:41 2017 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ab12f95c

app-arch/bzip2: sync for CVE, bug #637572

Bug: https://bugs.gentoo.org/637572
Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4

 app-arch/bzip2/bzip2-1.0.6-r1.ebuild               | 113 -------------------
 app-arch/bzip2/bzip2-1.0.6-r3.ebuild               | 121 ---------------------
 ...bzip2-1.0.6-r7.ebuild => bzip2-1.0.6-r8.ebuild} |  65 +++++------
 .../bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch    |  18 +++
 4 files changed, 43 insertions(+), 274 deletions(-)

diff --git a/app-arch/bzip2/bzip2-1.0.6-r1.ebuild b/app-arch/bzip2/bzip2-1.0.6-r1.ebuild
deleted file mode 100644
index a88f13ce09..0000000000
--- a/app-arch/bzip2/bzip2-1.0.6-r1.ebuild
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/bzip2-1.0.6-r1.ebuild,v 1.1 2010/09/23 09:19:49 vapier Exp $
-
-inherit eutils multilib toolchain-funcs flag-o-matic 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"
-
-LICENSE="BZIP2"
-SLOT="0"
-KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="static"
-
-src_unpack() {
-	unpack ${A}
-	cd "${S}"
-	epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
-	epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
-	epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
-	epatch "${FILESDIR}"/${PN}-1.0.2-progress.patch
-	epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
-	epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
-	epatch "${FILESDIR}"/${PN}-1.0.5-checkenv.patch # for AIX, Darwin?
-	epatch "${FILESDIR}"/${PN}-1.0.4-prefix.patch
-	eprefixify bz{diff,grep,more}
-	# this a makefile for Darwin, which already "includes" saneso
-	cp "${FILESDIR}"/${P}-Makefile-libbz2_dylib Makefile-libbz2_dylib || die
-
-	# - Use right man path
-	# - Generate symlinks instead of hardlinks
-	# - pass custom variables to control libdir
-	sed -i \
-		-e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
-		-e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
-		-e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
-		Makefile || die
-
-	if [[ ${CHOST} == *-hpux* ]] ; then
-		sed -i -e 's,-soname,+h,' Makefile-libbz2_so || die "cannot replace -soname with +h"
-		if [[ ${CHOST} == hppa*-hpux* && ${CHOST} != hppa64*-hpux* ]] ; then
-			sed -i -e '/^SOEXT/s,so,sl,' Makefile-libbz2_so || die "cannot replace so with sl"
-			sed -i -e '/^SONAME/s,=,=${EPREFIX}/lib/,' Makefile-libbz2_so || die "cannt set soname"
-		fi
-	elif [[ ${CHOST} == *-interix* ]] ; then
-		sed -i -e 's,-soname,-h,' Makefile-libbz2_so || die "cannot replace -soname with -h"
-		sed -i -e 's,-fpic,,' -e 's,-fPIC,,' Makefile-libbz2_so || die "cannot replace pic options"
-	fi
-}
-
-bemake() {
-	emake \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)" \
-		RANLIB="$(tc-getRANLIB)" \
-		"$@" || die
-}
-src_compile() {
-	local checkopts=
-	case "${CHOST}" in
-		*-darwin*)
-			bemake PREFIX="${EPREFIX}"/usr -f Makefile-libbz2_dylib || die
-		;;
-		*-mint*)
-			# do nothing, no shared libraries
-			:
-		;;
-		*)
-			bemake -f Makefile-libbz2_so all || die
-		;;
-	esac
-	use static && append-flags -static
-	bemake all || die
-}
-
-src_install() {
-	make PREFIX="${D}${EPREFIX}"/usr LIBDIR="$(get_libdir)" install || die
-	dodoc README* CHANGES bzip2.txt manual.*
-
-	if [[ $(get_libname) != ".irrelevant" ]] ; then
-
-	# Install the shared lib manually.  We install:
-	#  .x.x.x - standard shared lib behavior
-	#  .x.x   - SONAME some distros use #338321
-	#  .x     - SONAME Gentoo uses
-	dolib.so libbz2$(get_libname ${PV}) || die
-	local s
-	for v in libbz2$(get_libname) libbz2$(get_libname ${PV%%.*}) libbz2$(get_libname ${PV%.*}) ; do
-		dosym libbz2$(get_libname ${PV}) /usr/$(get_libdir)/${v} || die
-	done
-	gen_usr_ldscript -a bz2
-
-	if ! use static ; then
-		newbin bzip2-shared bzip2 || die
-	fi
-
-	fi
-
-	# move "important" bzip2 binaries to /bin and use the shared libbz2.so
-	dodir /bin
-	mv "${ED}"/usr/bin/b{zip2,zcat,unzip2} "${ED}"/bin/ || die
-	dosym bzip2 /bin/bzcat || die
-	dosym bzip2 /bin/bunzip2 || die
-
-	if [[ ${CHOST} == *-winnt* ]]; then
-		dolib.so libbz2$(get_libname ${PV}).dll || die "dolib shared"
-
-		# on windows, we want to continue using bzip2 from interix.
-		# building bzip2 on windows gives the libraries only!
-		rm -rf "${ED}"/bin "${ED}"/usr/bin
-	fi
-}

diff --git a/app-arch/bzip2/bzip2-1.0.6-r3.ebuild b/app-arch/bzip2/bzip2-1.0.6-r3.ebuild
deleted file mode 100644
index a4a4c6147d..0000000000
--- a/app-arch/bzip2/bzip2-1.0.6-r3.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/bzip2-1.0.6-r3.ebuild,v 1.12 2014/01/18 01:43:22 vapier Exp $
-
-# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
-#      (since we're building shared libs) ...
-
-EAPI="2"
-
-inherit eutils multilib toolchain-funcs flag-o-matic 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"
-
-LICENSE="BZIP2"
-SLOT="0"
-KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="static static-libs"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
-	epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
-	epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
-	epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
-	epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
-	epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
-	epatch "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
-
-	epatch "${FILESDIR}"/${PN}-1.0.5-checkenv.patch # for AIX, Darwin?
-	epatch "${FILESDIR}"/${PN}-1.0.4-prefix.patch
-	eprefixify bz{diff,grep,more}
-	# this a makefile for Darwin, which already "includes" saneso
-	cp "${FILESDIR}"/${P}-Makefile-libbz2_dylib Makefile-libbz2_dylib || die
-
-	# - Use right man path
-	# - Generate symlinks instead of hardlinks
-	# - pass custom variables to control libdir
-	sed -i \
-		-e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
-		-e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
-		-e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
-		Makefile || die
-
-	if [[ ${CHOST} == *-hpux* ]] ; then
-		sed -i -e 's,-soname,+h,' Makefile-libbz2_so || die "cannot replace -soname with +h"
-		if [[ ${CHOST} == hppa*-hpux* && ${CHOST} != hppa64*-hpux* ]] ; then
-			sed -i -e '/^SOEXT/s,so,sl,' Makefile-libbz2_so || die "cannot replace so with sl"
-			sed -i -e '/^SONAME/s,=,=${EPREFIX}/lib/,' Makefile-libbz2_so || die "cannt set soname"
-		fi
-	elif [[ ${CHOST} == *-interix* ]] ; then
-		sed -i -e 's,-soname,-h,' Makefile-libbz2_so || die "cannot replace -soname with -h"
-		sed -i -e 's,-fpic,,' -e 's,-fPIC,,' Makefile-libbz2_so || die "cannot replace pic options"
-	fi
-}
-
-bemake() {
-	emake \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)" \
-		RANLIB="$(tc-getRANLIB)" \
-		"$@" || die
-}
-src_compile() {
-	local checkopts=
-	case "${CHOST}" in
-		*-darwin*)
-			bemake PREFIX="${EPREFIX}"/usr -f Makefile-libbz2_dylib || die
-		;;
-		*-mint*)
-			# do nothing, no shared libraries
-			:
-		;;
-		*)
-			bemake -f Makefile-libbz2_so all || die
-		;;
-	esac
-	use static && append-flags -static
-	bemake all || die
-}
-
-src_install() {
-	make PREFIX="${D}${EPREFIX}"/usr LIBDIR="$(get_libdir)" install || die
-	dodoc README* CHANGES bzip2.txt manual.*
-
-	if [[ $(get_libname) != ".irrelevant" ]] ; then
-
-	if ! use static ; then
-		newbin bzip2-shared bzip2 || die
-	fi
-	if ! use static-libs ; then
-		rm -f "${ED}"/usr/lib*/libbz2.a || die
-	fi
-
-	# move "important" bzip2 binaries to /bin and use the shared libbz2.so
-	dodir /bin
-	mv "${ED}"/usr/bin/b{zip2,zcat,unzip2} "${ED}"/bin/ || die
-	dosym bzip2 /bin/bzcat || die
-	dosym bzip2 /bin/bunzip2 || die
-
-	# Install the shared lib manually.  We install:
-	#  .x.x.x - standard shared lib behavior
-	#  .x.x   - SONAME some distros use #338321
-	#  .x     - SONAME Gentoo uses
-	dolib.so libbz2$(get_libname ${PV}) || die
-	local s
-	for v in libbz2$(get_libname) libbz2$(get_libname ${PV%%.*}) libbz2$(get_libname ${PV%.*}) ; do
-		dosym libbz2$(get_libname ${PV}) /usr/$(get_libdir)/${v} || die
-	done
-	gen_usr_ldscript -a bz2
-
-	fi
-
-	if [[ ${CHOST} == *-winnt* ]]; then
-		dolib.so libbz2$(get_libname ${PV}).dll || die "dolib shared"
-
-		# on windows, we want to continue using bzip2 from interix.
-		# building bzip2 on windows gives the libraries only!
-		rm -rf "${ED}"/bin "${ED}"/usr/bin
-	fi
-}

diff --git a/app-arch/bzip2/bzip2-1.0.6-r7.ebuild b/app-arch/bzip2/bzip2-1.0.6-r8.ebuild
similarity index 72%
rename from app-arch/bzip2/bzip2-1.0.6-r7.ebuild
rename to app-arch/bzip2/bzip2-1.0.6-r8.ebuild
index fa785fc384..eeb7f85da2 100644
--- a/app-arch/bzip2/bzip2-1.0.6-r7.ebuild
+++ b/app-arch/bzip2/bzip2-1.0.6-r8.ebuild
@@ -1,11 +1,10 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/bzip2-1.0.6-r7.ebuild,v 1.2 2014/04/28 17:18:31 mgorny Exp $
 
 # XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
 #      (since we're building shared libs) ...
 
-EAPI=4
+EAPI=5
 
 inherit eutils toolchain-funcs multilib multilib-minimal prefix
 
@@ -14,30 +13,27 @@ HOMEPAGE="http://www.bzip.org/"
 SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
 
 LICENSE="BZIP2"
-SLOT="0"
+SLOT="0/1" # subslot = SONAME
 KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
 IUSE="static static-libs"
 
-RDEPEND="abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20130224
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+	"${FILESDIR}"/${PN}-1.0.6-saneso.patch
+	"${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+	"${FILESDIR}"/${PN}-1.0.6-progress.patch
+	"${FILESDIR}"/${PN}-1.0.3-no-test.patch
+	"${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+	"${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-r7-checkenv.patch # for AIX, Darwin?
+	"${FILESDIR}"/${PN}-1.0.6-prefix.patch
+)
 
 src_prepare() {
-	epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
-	epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
-	epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
-	epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
-	epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
-	epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
-	epatch "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
-	epatch "${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch
-
-	epatch "${FILESDIR}"/${PN}-1.0.6-r7-checkenv.patch # for AIX, Darwin?
-	epatch "${FILESDIR}"/${PN}-1.0.4-prefix.patch
-	eprefixify bz{diff,grep,more}
-	# this a makefile for Darwin, which already "includes" saneso
-	cp "${FILESDIR}"/${P}-Makefile-libbz2_dylib Makefile-libbz2_dylib || die
+	epatch "${PATCHES[@]}"
 
 	# - Use right man path
 	# - Generate symlinks instead of hardlinks
@@ -48,6 +44,10 @@ src_prepare() {
 		-e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
 		Makefile || die
 
+	eprefixify bz{diff,grep,more}
+	# this a makefile for Darwin, which already "includes" saneso
+	cp "${FILESDIR}"/${P}-Makefile-libbz2_dylib Makefile-libbz2_dylib || die
+
 	if [[ ${CHOST} == *-hpux* ]] ; then
 		sed -i -e 's,-soname,+h,' Makefile-libbz2_so || die "cannot replace -soname with +h"
 		if [[ ${CHOST} == hppa*-hpux* && ${CHOST} != hppa64*-hpux* ]] ; then
@@ -73,24 +73,9 @@ bemake() {
 }
 
 multilib_src_compile() {
-	local checkopts=
-	case "${CHOST}" in
-		*-darwin*)
-			bemake PREFIX="${EPREFIX}"/usr -f "${S}"/Makefile-libbz2_dylib all
-			# FWIW, #504648 like for .so below
-			ln -sf libbz2.${PV}.dylib libbz2.dylib
-		;;
-		*-mint*)
-			# do nothing, no shared libraries
-			:
-		;;
-		*)
-			bemake -f "${S}"/Makefile-libbz2_so all
-			# Make sure we link against the shared lib #504648
-			[[ $(get_libname) != $(get_libname ${PV}) ]] &&
-			ln -sf libbz2$(get_libname ${PV}) libbz2$(get_libname)
-		;;
-	esac
+	bemake -f "${S}"/Makefile-libbz2_so all
+	# Make sure we link against the shared lib #504648
+	ln -sf libbz2.so.${PV} libbz2.so
 	bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
 }
 
@@ -111,7 +96,7 @@ multilib_src_install() {
 		dosym libbz2$(get_libname ${PV}) /usr/$(get_libdir)/${v}
 	done
 
-	fi
+	fi  # tc-is-static-only
 
 	use static-libs && dolib.a libbz2.a
 

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
new file mode 100644
index 0000000000..1d0c3a6dd3
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Backport
+https://bugzilla.suse.com/attachment.cgi?id=681334
+
+CVE: CVE-2016-3189
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: bzip2-1.0.6/bzip2recover.c
+===================================================================
+--- bzip2-1.0.6.orig/bzip2recover.c
++++ bzip2-1.0.6/bzip2recover.c
+@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv )
+             bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
+             bsPutUInt32 ( bsWr, blockCRC );
+             bsClose ( bsWr );
++            outFile = NULL;
+          }
+          if (wrBlock >= rbCtr) break;
+          wrBlock++;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/prefix:master commit in: app-arch/bzip2/, app-arch/bzip2/files/
@ 2018-11-19 16:30 Fabian Groffen
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Groffen @ 2018-11-19 16:30 UTC (permalink / raw
  To: gentoo-commits

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 <akuster@mvista.com>
 
 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 <charles@comm.polymtl.ca>
- 
--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 <phil@fifi.org> 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 <manojgupta@google.com>
+
+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)
+ 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-19 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-15 15:51 [gentoo-commits] repo/proj/prefix:master commit in: app-arch/bzip2/, app-arch/bzip2/files/ Fabian Groffen
  -- strict thread matches above, loose matches on Subject: below --
2018-11-19 16:30 Fabian Groffen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox