[main] upgrading libarchive to v3.6.0 (#2515)

* upgrading libarchive to v3.6.0

* removing patch file

* adding missing URL

* fixing URL
This commit is contained in:
Max Brodeur-Urbas 2022-03-18 16:08:26 -08:00 коммит произвёл GitHub
Родитель d7d7fd9129
Коммит c104e7f7ad
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
11 изменённых файлов: 25 добавлений и 91 удалений

Просмотреть файл

@ -1,69 +0,0 @@
From 56c095bef0a892dbaf18e45efbec2087d6878a54 Mon Sep 17 00:00:00 2001
From: Martin Matuska <martin@matuska.org>
Date: Fri, 22 May 2020 11:43:43 +0200
Subject: [PATCH] test_write_disk_secure: properly check if lchmod() is
supported
Fixes #1379
Backported by mfrw from upstream.
Signed-off-by: Muhammad Falak Wani <mwani@microsoft.com>
---
libarchive/test/test_write_disk_secure.c | 33 +++++++++++++++++++++---
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/libarchive/test/test_write_disk_secure.c b/libarchive/test/test_write_disk_secure.c
index 7cd66c41..ff2922a3 100644
--- a/libarchive/test/test_write_disk_secure.c
+++ b/libarchive/test/test_write_disk_secure.c
@@ -40,6 +40,9 @@ DEFINE_TEST(test_write_disk_secure)
struct archive *a;
struct archive_entry *ae;
struct stat st;
+#if defined(HAVE_LCHMOD) && defined(HAVE_SYMLINK)
+ int working_lchmod;
+#endif
/* Start with a known umask. */
assertUmask(UMASK);
@@ -251,10 +254,32 @@ DEFINE_TEST(test_write_disk_secure)
assert(0 == lstat("link_to_dir", &st));
failure("link_to_dir: st.st_mode=%o", st.st_mode);
assert(S_ISLNK(st.st_mode));
-#if HAVE_LCHMOD
- /* Systems that lack lchmod() can't set symlink perms, so skip this. */
- failure("link_to_dir: st.st_mode=%o", st.st_mode);
- assert((st.st_mode & 07777) == 0755);
+#if defined(HAVE_SYMLINK) && defined(HAVE_LCHMOD) && \
+ defined(S_IRUSR) && defined(S_IWUSR) && defined(S_IXUSR)
+ /* Verify if we are able to lchmod() */
+ if (symlink("dir", "testlink_to_dir") == 0) {
+ if (lchmod("testlink_to_dir",
+ S_IRUSR | S_IWUSR | S_IXUSR) != 0) {
+ switch (errno) {
+ case ENOTSUP:
+ case ENOSYS:
+#if ENOTSUP != EOPNOTSUPP
+ case EOPNOTSUPP:
+#endif
+ working_lchmod = 0;
+ break;
+ default:
+ working_lchmod = 1;
+ }
+ } else
+ working_lchmod = 1;
+ } else
+ working_lchmod = 0;
+
+ if (working_lchmod) {
+ failure("link_to_dir: st.st_mode=%o", st.st_mode);
+ assert((st.st_mode & 07777) == 0755);
+ }
#endif
assert(0 == lstat("dir/filea", &st));
--
2.17.1

Просмотреть файл

@ -1,5 +1,5 @@
{
"Signatures": {
"libarchive-3.4.2.tar.gz": "b60d58d12632ecf1e8fad7316dc82c6b9738a35625746b47ecdcaf4aed176176"
"libarchive-3.6.0.tar.gz": "a36613695ffa2905fdedc997b6df04a3006ccfd71d747a339b78aa8412c3d852"
}
}

Просмотреть файл

@ -1,13 +1,13 @@
Summary: Multi-format archive and compression library
Name: libarchive
Version: 3.4.2
Release: 5%{?dist}
Version: 3.6.0
Release: 1%{?dist}
# Certain files have individual licenses. For more details see contents of "COPYING".
License: BSD AND Public Domain AND (ASL 2.0 OR CC0 1.0 OR OpenSSL)
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://www.libarchive.org/
Source0: https://github.com/libarchive/libarchive/releases/download/v%{version}/%{name}-%{version}.tar.gz
Patch0: 0001-test_write_disk_secure-properly-check-if-lchmod-is-s.patch
Provides: bsdtar = %{version}-%{release}
BuildRequires: xz-libs
@ -60,6 +60,9 @@ make %{?_smp_mflags} check
%{_libdir}/pkgconfig/*.pc
%changelog
* Tue Mar 15 2022 Max Brodeur-Urbas <maxbr@microsoft.com> - 3.6.0-1
- Upgrading to v3.6.0
* Thu Feb 03 2022 Muhammad Falak <mwani@microsoft.com> - 3.4.2-5
- Backport patch from upstream to fix 'test_write_disk_secure'

Просмотреть файл

@ -8831,8 +8831,8 @@
"type": "other",
"other": {
"name": "libarchive",
"version": "3.4.2",
"downloadUrl": "https://github.com/libarchive/libarchive/releases/download/v3.4.2/libarchive-3.4.2.tar.gz"
"version": "3.6.0",
"downloadUrl": "https://github.com/libarchive/libarchive/releases/download/v3.6.0/libarchive-3.6.0.tar.gz"
}
}
},

Просмотреть файл

@ -173,8 +173,8 @@ openssl-static-1.1.1k-12.cm2.aarch64.rpm
libcap-2.26-2.cm2.aarch64.rpm
libcap-devel-2.26-2.cm2.aarch64.rpm
debugedit-5.0-1.cm2.aarch64.rpm
libarchive-3.4.2-5.cm2.aarch64.rpm
libarchive-devel-3.4.2-5.cm2.aarch64.rpm
libarchive-3.6.0-1.cm2.aarch64.rpm
libarchive-devel-3.6.0-1.cm2.aarch64.rpm
rpm-4.17.0-3.cm2.aarch64.rpm
rpm-build-4.17.0-3.cm2.aarch64.rpm
rpm-build-libs-4.17.0-3.cm2.aarch64.rpm

Просмотреть файл

@ -173,8 +173,8 @@ openssl-debuginfo-1.1.1k-12.cm2.x86_64.rpm
libcap-2.26-2.cm2.x86_64.rpm
libcap-devel-2.26-2.cm2.x86_64.rpm
debugedit-5.0-1.cm2.x86_64.rpm
libarchive-3.4.2-5.cm2.x86_64.rpm
libarchive-devel-3.4.2-5.cm2.x86_64.rpm
libarchive-3.6.0-1.cm2.x86_64.rpm
libarchive-devel-3.6.0-1.cm2.x86_64.rpm
rpm-4.17.0-3.cm2.x86_64.rpm
rpm-build-4.17.0-3.cm2.x86_64.rpm
rpm-build-libs-4.17.0-3.cm2.x86_64.rpm

Просмотреть файл

@ -140,9 +140,9 @@ krb5-1.19.2-1.cm2.aarch64.rpm
krb5-debuginfo-1.19.2-1.cm2.aarch64.rpm
krb5-devel-1.19.2-1.cm2.aarch64.rpm
krb5-lang-1.19.2-1.cm2.aarch64.rpm
libarchive-3.4.2-5.cm2.aarch64.rpm
libarchive-debuginfo-3.4.2-5.cm2.aarch64.rpm
libarchive-devel-3.4.2-5.cm2.aarch64.rpm
libarchive-3.6.0-1.cm2.aarch64.rpm
libarchive-debuginfo-3.6.0-1.cm2.aarch64.rpm
libarchive-devel-3.6.0-1.cm2.aarch64.rpm
libassuan-2.5.5-2.cm2.aarch64.rpm
libassuan-debuginfo-2.5.5-2.cm2.aarch64.rpm
libassuan-devel-2.5.5-2.cm2.aarch64.rpm

Просмотреть файл

@ -140,9 +140,9 @@ krb5-1.19.2-1.cm2.x86_64.rpm
krb5-debuginfo-1.19.2-1.cm2.x86_64.rpm
krb5-devel-1.19.2-1.cm2.x86_64.rpm
krb5-lang-1.19.2-1.cm2.x86_64.rpm
libarchive-3.4.2-5.cm2.x86_64.rpm
libarchive-debuginfo-3.4.2-5.cm2.x86_64.rpm
libarchive-devel-3.4.2-5.cm2.x86_64.rpm
libarchive-3.6.0-1.cm2.x86_64.rpm
libarchive-debuginfo-3.6.0-1.cm2.x86_64.rpm
libarchive-devel-3.6.0-1.cm2.x86_64.rpm
libassuan-2.5.5-2.cm2.x86_64.rpm
libassuan-debuginfo-2.5.5-2.cm2.x86_64.rpm
libassuan-devel-2.5.5-2.cm2.x86_64.rpm

Просмотреть файл

@ -24,7 +24,7 @@ https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tar.xz
https://tukaani.org/xz/xz-5.2.5.tar.xz
https://zlib.net/zlib-1.2.11.tar.xz
https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.bz2
https://github.com/libarchive/libarchive/releases/download/v3.4.2/libarchive-3.4.2.tar.gz
https://github.com/libarchive/libarchive/releases/download/v3.6.0/libarchive-3.6.0.tar.gz
http://www.lua.org/ftp/lua-5.4.3.tar.gz
http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.18.tar.gz
https://github.com/rpm-software-management/rpm/archive/rpm-4.17.0-release.tar.gz

Просмотреть файл

@ -27,7 +27,7 @@ fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 gmp-6.2.1.tar.
3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5 groff-1.22.3.tar.gz
9b9a95d68fdcb936849a4d6fada8bf8686cddf58b9b26c9c4289ed0c92a77907 gzip-1.11.tar.xz
2cbcede7448516beb64a94220bf1b60937956a433cecd7a0ecb244e1bfeeae21 kernel-5.15.26.1.tar.gz
b60d58d12632ecf1e8fad7316dc82c6b9738a35625746b47ecdcaf4aed176176 libarchive-3.4.2.tar.gz
a36613695ffa2905fdedc997b6df04a3006ccfd71d747a339b78aa8412c3d852 libarchive-3.6.0.tar.gz
b630b7c484271b3ba867680d6a14b10a86cfa67247a14631b14c06731d5a458b libcap-2.26.tar.xz
0d72e12e4f2afff67fd7b9df0a24d7ba42b5a7c9211ac5b3dcccc5cd8b286f2b libpipeline-1.5.0.tar.gz
7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f libtool-2.4.6.tar.xz

Просмотреть файл

@ -1061,14 +1061,14 @@ popd
rm -rf cpio-2.13
touch /logs/status_cpio_complete
echo libarchive-3.4.2
tar xf libarchive-3.4.2.tar.gz
pushd libarchive-3.4.2
echo libarchive-3.6.0
tar xf libarchive-3.6.0.tar.gz
pushd libarchive-3.6.0
./configure --prefix=/usr --disable-static
make -j$(nproc)
make install
popd
rm -rf libarchive-3.4.2
rm -rf libarchive-3.6.0
touch /logs/status_libarchive_complete
echo lua-5.4.3