From 4edec94842f9513ac016c9b8294e0aff79097738 Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Fri, 30 Jul 2021 10:11:20 +0000 Subject: [PATCH] app-arch/libarchive: Sync with Gentoo upstream; updates to 3.5.1 Signed-off-by: Sayan Chowdhury --- .../app-arch/libarchive/Manifest | 2 +- .../files/libarchive-3.3.3-libressl.patch | 12 ------- .../libarchive-3.5.0-darwin-strnlen.patch | 27 +++++++++++++++ ....4.2.ebuild => libarchive-3.5.1-r1.ebuild} | 33 +++++++++++-------- 4 files changed, 48 insertions(+), 26 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.3.3-libressl.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch rename sdk_container/src/third_party/portage-stable/app-arch/libarchive/{libarchive-3.4.2.ebuild => libarchive-3.5.1-r1.ebuild} (77%) diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/Manifest index dc4b48a9a9..5a2008cb79 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/Manifest @@ -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 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.3.3-libressl.patch b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.3.3-libressl.patch deleted file mode 100644 index 4d7c0ec7cf..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.3.3-libressl.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libarchive/archive_openssl_evp_private.h -+++ b/libarchive/archive_openssl_evp_private.h -@@ -28,7 +28,8 @@ - #include - #include - --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ -+(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) - #include /* malloc, free */ - #include /* memset */ - static inline EVP_MD_CTX *EVP_MD_CTX_new(void) diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch new file mode 100644 index 0000000000..8f540e4aa0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch @@ -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 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.4.2.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.5.1-r1.ebuild similarity index 77% rename from sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.4.2.ebuild rename to sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.5.1-r1.ebuild index d9f9a71caa..495a49a99a 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.4.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.5.1-r1.ebuild @@ -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() {