Merge pull request #192 from kinvolk/sayan/update-libarchive-3.5.1

Sync libarchive to 3.5.1, xz-utils to 5.2.5 with Gentoo upstream
This commit is contained in:
Sayan Chowdhury 2021-08-03 20:15:00 +05:30 committed by GitHub
commit a3be6bfecf
9 changed files with 89 additions and 151 deletions

View File

@ -1 +1 @@
DIST libarchive-3.4.2.tar.gz 6979481 BLAKE2B eea90e4751ae487cd1a9b0eecd16598d1b81ffff665ae97a160e3858c8ffe60b82003f081af644f3f32260d0e1d3f3077240125e8279bf8111a79d93c68ac25d SHA512 a8922e54f2e985889d205ee8a0594c1d30dad950438b602a5be6bb1b274a735ad20a48ed484efd458013a0810d26ee4ae76e3a6c820823243d24ea0593ed7021
DIST libarchive-3.5.1.tar.gz 7008338 BLAKE2B 243dfda2bd4582bbc20679328b89aae0c530475c822dcf9ff25c65df2017b8f18bb616142d6ab016ccea4a5aa1b410d46b913c2ee0afefd2fdb1a41cf51585d9 SHA512 08ddd74bef4cef0981739da202879f36cf7ca33a8f6d438724588efe3ab8477f2f1d0cccf7b8ed0bedfc0c8d0cab16ee3ae5c0c6e83b6811bc650d7d7471a996

View File

@ -1,12 +0,0 @@
--- a/libarchive/archive_openssl_evp_private.h
+++ b/libarchive/archive_openssl_evp_private.h
@@ -28,7 +28,8 @@
#include <openssl/evp.h>
#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */
static inline EVP_MD_CTX *EVP_MD_CTX_new(void)

View File

@ -0,0 +1,27 @@
https://github.com/macports/macports-ports/blob/master/archivers/libarchive/files/patch-libarchive-3.5-strnlen.diff
next release should have a fix for this
--- a/libarchive/archive_read_support_format_mtree.c
+++ b/libarchive/archive_read_support_format_mtree.c
@@ -65,6 +65,20 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_mtree.c 2011
#define O_CLOEXEC 0
#endif
+#ifdef __APPLE__
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070
+static size_t strnlen(const char *s, size_t maxlen) {
+ size_t l = 0;
+ while (l < maxlen && *s) {
+ l++;
+ s++;
+ }
+ return l;
+}
+#endif
+#endif
+
+
#define MTREE_HAS_DEVICE 0x0001
#define MTREE_HAS_FFLAGS 0x0002
#define MTREE_HAS_GID 0x0004

View File

@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -10,8 +10,8 @@ SRC_URI="https://www.libarchive.org/downloads/${P}.tar.gz"
LICENSE="BSD BSD-2 BSD-4 public-domain"
SLOT="0/13"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs +threads xattr +zlib zstd"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv kernel_linux lz4 +lzma lzo nettle static-libs xattr +zlib zstd"
RDEPEND="
acl? ( virtual/acl[${MULTILIB_USEDEP}] )
@ -23,10 +23,9 @@ RDEPEND="
kernel_linux? (
xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
)
!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
dev-libs/openssl:0=[${MULTILIB_USEDEP}]
lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
lzma? ( app-arch/xz-utils[threads=,${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.2.5-r1[${MULTILIB_USEDEP}] )
lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
@ -38,13 +37,9 @@ DEPEND="${RDEPEND}
)"
PATCHES=(
"${FILESDIR}"/${PN}-3.3.3-libressl.patch
"${FILESDIR}"/${PN}-3.5.0-darwin-strnlen.patch # drop on next release
)
# Various test problems, starting with the fact that sandbox
# explodes on long paths. https://bugs.gentoo.org/598806
RESTRICT="test"
src_prepare() {
default
elibtoolize # is required for Solaris sol2_ld linker fix
@ -97,9 +92,21 @@ multilib_src_compile() {
fi
}
src_test() {
mkdir -p "${T}"/bin || die
# tests fail when lbzip2[symlink] is used in place of ref bunzip2
ln -s "${BROOT}/bin/bunzip2" "${T}"/bin || die
local -x PATH=${T}/bin:${PATH}
multilib-minimal_src_test
}
multilib_src_test() {
# Replace the default src_test so that it builds tests in parallel
multilib_is_native_abi && emake check
# sandbox is breaking long symlink behavior
local -x SANDBOX_ON=0
local -x LD_PRELOAD=
# some locales trigger different output that breaks tests
local -x LC_ALL=C
emake check
}
multilib_src_install() {

View File

@ -1,2 +1 @@
DIST xz-5.2.3.tar.gz 1490665 BLAKE2B 470791a67fe635165559b0364c9c0e968f3fc32ba7af53d0173d620ca65c68428e0d4d18ada341a063ea3eabb1b51a71cf873218ca0622fd41e01c20a6f04078 SHA512 a5eb4f707cf31579d166a6f95dbac45cf7ea181036d1632b4f123a4072f502f8d57cd6e7d0588f0bf831a07b8fc4065d26589a25c399b95ddcf5f73435163da6
DIST xz-5.2.4.tar.gz 1572354 BLAKE2B 877242324afd3c7eb21d3a9414c53843f4d1bb089206e8e545e280b32ff5372f7fb4a1b0c27cb6fdf0d0a27a668e9772ecc3fffc181df95d081ca9c2e987b83b SHA512 e5bf6eb88365d2dbdc774db49261fb9fae0544ed297891fc20f1ed223f4072cb0357cbd98146ac35b6d29410a12b6739bbd111cd57d4a225bef255ed46988578
DIST xz-5.2.5.tar.gz 1791345 BLAKE2B aded57324e129572c41646b3cc3b0b59a459452d9338d9245663b63dac2a463fb1f1b2b1d2d4ad3c09cb71fb8439df52cd94f24db99e782fc899b94a288a3043 SHA512 7443674247deda2935220fbc4dfc7665e5bb5a260be8ad858c8bd7d7b9f0f868f04ea45e62eb17c0a5e6a2de7c7500ad2d201e2d668c48ca29bd9eea5a73a3ce

View File

@ -6,8 +6,11 @@
<name>Gentoo Base System</name>
</maintainer>
<use>
<flag name='extra-filters'>Build additional filters that are not
<flag name="extra-filters">Build additional filters that are not
used in any of the default xz presets. This includes delta
and BCJ coders, additional match finders and SHA256 checks.</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:tukaani:xz</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,91 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Remember: we cannot leverage autotools in this ebuild in order
# to avoid circular deps with autotools
EAPI=5
inherit multilib toolchain-funcs libtool multilib-minimal preserve-libs
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://git.tukaani.org/xz.git"
inherit git-r3 autotools
SRC_URI=""
EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
else
MY_P="${PN/-utils}-${PV/_}"
SRC_URI="https://tukaani.org/xz/${MY_P}.tar.gz"
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"
S=${WORKDIR}/${MY_P}
EXTRA_DEPEND=
fi
DESCRIPTION="utils for managing LZMA compressed files"
HOMEPAGE="https://tukaani.org/xz/"
# See top-level COPYING file as it outlines the various pieces and their licenses.
LICENSE="public-domain LGPL-2.1+ GPL-2+"
SLOT="0"
IUSE="elibc_FreeBSD +extra-filters nls static-libs +threads"
RDEPEND="!<app-arch/lzma-4.63
!app-arch/lzma-utils
!<app-arch/p7zip-4.57"
DEPEND="${RDEPEND}
${EXTRA_DEPEND}"
# Tests currently do not account for smaller feature set
RESTRICT="!extra-filters? ( test )"
src_prepare() {
if [[ ${PV} == "9999" ]] ; then
eautopoint
eautoreconf
else
elibtoolize # to allow building shared libs on Solaris/x64
fi
}
multilib_src_configure() {
local myconf=(
$(use_enable nls)
$(use_enable threads)
$(use_enable static-libs static)
)
multilib_is_native_abi ||
myconf+=( --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts} )
if ! use extra-filters; then
myconf+=(
# LZMA1 + LZMA2 for standard .lzma & .xz files
--enable-encoders=lzma1,lzma2
--enable-decoders=lzma1,lzma2
# those are used by default, depending on preset
--enable-match-finders=hc3,hc4,bt4
# CRC64 is used by default, though some (old?) files use CRC32
--enable-checks=crc32,crc64
)
fi
use elibc_FreeBSD && export ac_cv_header_sha256_h=no #545714
ECONF_SOURCE="${S}" econf "${myconf[@]}"
}
multilib_src_install() {
default
gen_usr_ldscript -a lzma
}
multilib_src_install_all() {
prune_libtool_files --all
rm "${ED}"/usr/share/doc/xz/COPYING* || die
mv "${ED}"/usr/share/doc/{xz,${PF}} || die
}
pkg_preinst() {
preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
}
pkg_postinst() {
preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
}

View File

@ -1,25 +1,24 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Remember: we cannot leverage autotools in this ebuild in order
# to avoid circular deps with autotools
EAPI=6
EAPI=7
inherit multilib toolchain-funcs libtool multilib-minimal preserve-libs
inherit libtool multilib multilib-minimal preserve-libs usr-ldscript
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://git.tukaani.org/xz.git"
inherit git-r3 autotools
SRC_URI=""
EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
BDEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
else
MY_P="${PN/-utils}-${PV/_}"
SRC_URI="https://tukaani.org/xz/${MY_P}.tar.gz"
[[ "${PV}" == *_alpha* ]] || [[ "${PV}" == *_beta* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
S="${WORKDIR}/${MY_P}"
EXTRA_DEPEND=
fi
DESCRIPTION="utils for managing LZMA compressed files"
@ -28,13 +27,12 @@ HOMEPAGE="https://tukaani.org/xz/"
# See top-level COPYING file as it outlines the various pieces and their licenses.
LICENSE="public-domain LGPL-2.1+ GPL-2+"
SLOT="0"
IUSE="elibc_FreeBSD +extra-filters nls static-libs +threads"
IUSE="elibc_FreeBSD +extra-filters nls static-libs"
RDEPEND="!<app-arch/lzma-4.63
!app-arch/lzma-utils
!<app-arch/p7zip-4.57"
DEPEND="${RDEPEND}
${EXTRA_DEPEND}"
!<app-arch/p7zip-4.57
!<app-i18n/man-pages-de-2.16"
DEPEND="${RDEPEND}"
# Tests currently do not account for smaller feature set
RESTRICT="!extra-filters? ( test )"
@ -51,8 +49,8 @@ src_prepare() {
multilib_src_configure() {
local myconf=(
--enable-threads
$(use_enable nls)
$(use_enable threads)
$(use_enable static-libs static)
)
multilib_is_native_abi ||
@ -69,6 +67,12 @@ multilib_src_configure() {
)
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# undo Solaris-based defaults pointing to /usr/xpg5/bin
myconf+=( --disable-path-for-script )
export gl_cv_posix_shell=${EPREFIX}/bin/sh
fi
use elibc_FreeBSD && export ac_cv_header_sha256_h=no #545714
ECONF_SOURCE="${S}" econf "${myconf[@]}"
}
@ -79,11 +83,8 @@ multilib_src_install() {
}
multilib_src_install_all() {
find "${ED}" -name '*.la' -delete || die
if ! use static-libs ; then
find "${ED}" -name "*.a" -delete || die
fi
rm "${ED%/}"/usr/share/doc/${PF}/COPYING* || die
find "${ED}" -type f -name '*.la' -delete || die
rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
}
pkg_preinst() {

View File

@ -1,25 +1,24 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Remember: we cannot leverage autotools in this ebuild in order
# to avoid circular deps with autotools
EAPI=6
EAPI=7
inherit multilib toolchain-funcs libtool multilib-minimal preserve-libs
inherit libtool multilib multilib-minimal preserve-libs usr-ldscript
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://git.tukaani.org/xz.git"
inherit git-r3 autotools
SRC_URI=""
EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
BDEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068
else
MY_P="${PN/-utils}-${PV/_}"
SRC_URI="https://tukaani.org/xz/${MY_P}.tar.gz"
[[ "${PV}" == *_alpha* ]] || [[ "${PV}" == *_beta* ]] || \
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
S="${WORKDIR}/${MY_P}"
EXTRA_DEPEND=
fi
DESCRIPTION="utils for managing LZMA compressed files"
@ -28,13 +27,12 @@ HOMEPAGE="https://tukaani.org/xz/"
# See top-level COPYING file as it outlines the various pieces and their licenses.
LICENSE="public-domain LGPL-2.1+ GPL-2+"
SLOT="0"
IUSE="elibc_FreeBSD +extra-filters nls static-libs +threads"
IUSE="elibc_FreeBSD +extra-filters nls static-libs"
RDEPEND="!<app-arch/lzma-4.63
!app-arch/lzma-utils
!<app-arch/p7zip-4.57"
DEPEND="${RDEPEND}
${EXTRA_DEPEND}"
!<app-arch/p7zip-4.57
!<app-i18n/man-pages-de-2.16"
DEPEND="${RDEPEND}"
# Tests currently do not account for smaller feature set
RESTRICT="!extra-filters? ( test )"
@ -51,8 +49,8 @@ src_prepare() {
multilib_src_configure() {
local myconf=(
--enable-threads
$(use_enable nls)
$(use_enable threads)
$(use_enable static-libs static)
)
multilib_is_native_abi ||
@ -69,6 +67,12 @@ multilib_src_configure() {
)
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# undo Solaris-based defaults pointing to /usr/xpg5/bin
myconf+=( --disable-path-for-script )
export gl_cv_posix_shell=${EPREFIX}/bin/sh
fi
use elibc_FreeBSD && export ac_cv_header_sha256_h=no #545714
ECONF_SOURCE="${S}" econf "${myconf[@]}"
}
@ -79,8 +83,8 @@ multilib_src_install() {
}
multilib_src_install_all() {
find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
rm "${ED%/}"/usr/share/doc/${PF}/COPYING* || die
find "${ED}" -type f -name '*.la' -delete || die
rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
}
pkg_preinst() {