#17 Rebase to version 3.7.0
Merged 10 months ago by ljavorsk. Opened a year ago by ljavorsk.
rpms/ ljavorsk/libarchive rawhide  into  rawhide

@@ -1,29 +1,24 @@ 

- From ec97aebcd2a3c4ed3a2fbb0037364b349bf9e84a Mon Sep 17 00:00:00 2001

- From: Stephen Gallagher <sgallagh@redhat.com>

- Date: Fri, 3 Dec 2021 11:07:55 -0500

+ From 375bbe7d20284f205ebb73652ef61ae6fceac344 Mon Sep 17 00:00:00 2001

+ From: Lukas Javorsky <ljavorsk@redhat.com>

+ Date: Tue, 18 Jul 2023 10:29:22 +0000

  Subject: [PATCH] Drop rmd160 from OpenSSL

  

- Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

  ---

   configure.ac | 1 -

   1 file changed, 1 deletion(-)

  

  diff --git a/configure.ac b/configure.ac

- index cb89c3ee81530e63e18f12aec2bbf04e8c0a1a34..b4d8ceabba4131a93589c0cf6bcd29bed8bdc774 100644

+ index 7f5dbdf..179fb2d 100644

  --- a/configure.ac

  +++ b/configure.ac

- @@ -1205,11 +1205,10 @@ if test "x$with_openssl" != "xno"; then

-        *)

-          AC_CHECK_LIB(crypto,OPENSSL_config)

-          ;;

-      esac

+ @@ -1300,7 +1300,6 @@ if test "x$with_openssl" != "xno"; then

+      LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }libcrypto"

+      AC_CHECK_LIB(crypto,OPENSSL_config)

       CRYPTO_CHECK(MD5, OPENSSL, md5)

  -    CRYPTO_CHECK(RMD160, OPENSSL, rmd160)

       CRYPTO_CHECK(SHA1, OPENSSL, sha1)

       CRYPTO_CHECK(SHA256, OPENSSL, sha256)

       CRYPTO_CHECK(SHA384, OPENSSL, sha384)

-      CRYPTO_CHECK(SHA512, OPENSSL, sha512)

-      AC_CHECK_FUNCS([PKCS5_PBKDF2_HMAC_SHA1])

  -- 

- 2.33.1

+ 2.41.0

  

@@ -1,44 +0,0 @@ 

- From d6248d2640efe3e40a1a9c0bb7bd8903f6beef98 Mon Sep 17 00:00:00 2001

- From: John Reiser <jreiser@BitWagon.com>

- Date: Fri, 26 Aug 2022 09:51:19 -0700

- Subject: [PATCH] archive_entry_pathname() tries UTF-8 if MBS returns EILSEQ

- 

- For better pathname portability across OS, in particular Windows to Linux.

- Original bug: unrar in https://bugzilla.redhat.com/show_bug.cgi?id=2120926

-         modified:   libarchive/archive_entry.c

- ---

-  libarchive/archive_entry.c | 14 ++++++++++++++

-  1 file changed, 14 insertions(+)

- 

- diff --git a/libarchive/archive_entry.c b/libarchive/archive_entry.c

- index ca7a4bdb5..ae6dc3336 100644

- --- a/libarchive/archive_entry.c

- +++ b/libarchive/archive_entry.c

- @@ -568,6 +568,13 @@ archive_entry_nlink(struct archive_entry *entry)

-  	return (entry->ae_stat.aest_nlink);

-  }

-  

- +/* Instead, our caller could have chosen a specific encoding

- + * (archive_mstring_get_mbs, archive_mstring_get_utf8,

- + * archive_mstring_get_wcs).  So we should try multiple

- + * encodings.  Try mbs first because of history, even though

- + * utf8 might be better for pathname portability.

- + * Also omit wcs because of type mismatch (char * versus wchar *)

- + */

-  const char *

-  archive_entry_pathname(struct archive_entry *entry)

-  {

- @@ -575,6 +582,13 @@ archive_entry_pathname(struct archive_entry *entry)

-  	if (archive_mstring_get_mbs(

-  	    entry->archive, &entry->ae_pathname, &p) == 0)

-  		return (p);

- +#if HAVE_EILSEQ  /*{*/

- +    if (errno == EILSEQ) {

- +	    if (archive_mstring_get_utf8(

- +	        entry->archive, &entry->ae_pathname, &p) == 0)

- +		    return (p);

- +    }

- +#endif  /*}*/

-  	if (errno == ENOMEM)

-  		__archive_errx(1, "No memory");

-  	return (NULL);

@@ -1,38 +0,0 @@ 

- From bff38efe8c110469c5080d387bec62a6ca15b1a5 Mon Sep 17 00:00:00 2001

- From: obiwac <obiwac@gmail.com>

- Date: Fri, 22 Jul 2022 22:41:10 +0200

- Subject: [PATCH] libarchive: Handle a `calloc` returning NULL (fixes #1754)

- 

- ---

-  libarchive/archive_write.c | 8 ++++++++

-  1 file changed, 8 insertions(+)

- 

- diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c

- index 66592e82..27626b54 100644

- --- a/libarchive/archive_write.c

- +++ b/libarchive/archive_write.c

- @@ -201,6 +201,10 @@ __archive_write_allocate_filter(struct archive *_a)

-  	struct archive_write_filter *f;

-  

-  	f = calloc(1, sizeof(*f));

- +

- +	if (f == NULL)

- +		return (NULL);

- +

-  	f->archive = _a;

-  	f->state = ARCHIVE_WRITE_FILTER_STATE_NEW;

-  	if (a->filter_first == NULL)

- @@ -548,6 +552,10 @@ archive_write_open2(struct archive *_a, void *client_data,

-  	a->client_data = client_data;

-  

-  	client_filter = __archive_write_allocate_filter(_a);

- +

- +	if (client_filter == NULL)

- +		return (ARCHIVE_FATAL);

- +

-  	client_filter->open = archive_write_client_open;

-  	client_filter->write = archive_write_client_write;

-  	client_filter->close = archive_write_client_close;

- -- 

- 2.37.3

- 

file modified
+20 -10
@@ -1,8 +1,8 @@ 

  %bcond_without check

  

  Name:           libarchive

- Version:        3.6.1

- Release:        6%{?dist}

+ Version:        3.7.0

+ Release:        1%{?dist}

  Summary:        A library for handling streaming archive formats

  

  License:        BSD 2-Clause License AND BSD 2-clause NetBSD License BSD 2-Clause License
@@ -38,14 +38,6 @@ 

  # support explicitly.

  Patch0001: 0001-Drop-rmd160-from-OpenSSL.patch

  

- # Source: https://github.com/libarchive/libarchive/commit/fd180c36036df7181a64931264732a10ad8cd024

- Patch2:                %{name}-3.6.1-Fix-CVE-2022-36227.patch

- 

- # For better pathname portability across OS, in particular Windows to Linux

- # archive_entry_pathname() tries UTF-8 if MBS returns EILSEQ

- # Source: https://github.com/libarchive/libarchive/commit/06a4b1018ee843cd491f6ff92813e67962fa0335

- Patch3:                %{name}-3.6.1-Better-pathname-portability.patch

- 

  %description

  Libarchive is a programming library that can create and read several different

  streaming archive formats, including most popular tar variants, several cpio
@@ -89,6 +81,14 @@ 

  input when used in a pipe.  In both cases decompressed data it written to

  standard output.

  

+ %package -n bsdunzip

+ Summary:        Extract files from a ZIP archive

+ Requires:       %{name}%{?_isa} = %{version}-%{release}

+ 

+ %description -n bsdunzip

+ The bsdunzip package contains standalone bsdunzip utility split off regular

+ libarchive packages. It is designed to provide an interface compatible with Info-ZIP's.

+ 

  

  %prep

  %autosetup -p1
@@ -226,9 +226,19 @@ 

  %{_bindir}/bsdcat

  %{_mandir}/*/bsdcat*

  

+ %files -n bsdunzip

+ %{!?_licensedir:%global license %%doc}

+ %license COPYING

+ %doc NEWS README.md

+ %{_bindir}/bsdunzip

+ %{_mandir}/*/bsdunzip*

  

  

  %changelog

+ * Tue Jul 25 2023 Lukas Javorsky <ljavorsk@redhat.com> - 3.7.0-1

+ - Rebase to version 3.7.0

+ - Add new bsdunzip subpackage

+ 

  * Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.1-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (libarchive-3.6.1.tar.gz) = 58f7ac0c52116f73326a07dec10ff232be33b318862078785dc39f1fb2f8773b5194eabfa14764bb51ce6a5a1aa8820526e7f4c76087a6f4fcbe7789a22275b4

+ SHA512 (libarchive-3.7.0.tar.gz) = ed65e35e37d74791a480c0ed6f67ecbaa9f40ffaae38ae8388e0c6e4ff1e9f8d833345bfa3b4de7c5a2142c54adb53523a4f3fe2bcbc1079e71cc3545358cb9e