commit 9ec2b86984dbfea8f41b12098c6119b5017f328c
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Oct 15 00:52:53 2026 +0200
up to 3.8.10
libarchive-nettle2.patch | 101 -----------------------------------------------
libarchive.spec | 13 +++---
libxml2-config.patch | 29 ++++++++++++++
3 files changed, 36 insertions(+), 107 deletions(-)
---
diff --git a/libarchive.spec b/libarchive.spec
index 8fb3927..653d8cb 100644
--- a/libarchive.spec
+++ b/libarchive.spec
@@ -5,16 +5,16 @@
Summary: Multi-format archive and compression library
Summary(pl.UTF-8): Biblioteka do archiwizacji i kompresji w wielu formatach
Name: libarchive
-Version: 3.8.9
+Version: 3.8.10
Release: 1
License: BSD
Group: Libraries
# see main page, downloads index may be out of date
#Source0Download: http://www.libarchive.org/
Source0: https://www.libarchive.org/downloads/%{name}-%{version}.tar.xz
-# Source0-md5: 535e3afec5f61d493f0b1b9e8bcf7539
+# Source0-md5: 7ca38379cb296edf27fe950b9c092a6e
Patch0: %{name}-man_progname.patch
-Patch1: %{name}-nettle2.patch
+Patch1: libxml2-config.patch
URL: http://www.libarchive.org/
BuildRequires: acl-devel
BuildRequires: attr-devel
@@ -25,7 +25,7 @@ BuildRequires: bzip2-devel
BuildRequires: e2fsprogs-devel
BuildRequires: libb2-devel
BuildRequires: libtool
-BuildRequires: libxml2-devel >= 2
+BuildRequires: libxml2-devel >= 1:2.7.3
BuildRequires: lz4-devel >= r131
BuildRequires: lzo-devel >= 2
# also possible: mbedtls, openssl
@@ -37,6 +37,7 @@ BuildRequires: xz
BuildRequires: xz-devel >= 1:5.2
BuildRequires: zlib-devel >= 1.2.1
BuildRequires: zstd-devel
+Requires: libxml2 >= 1:2.7.3
Requires: lz4-libs >= r131
Requires: xz-libs >= 1:5.2
Requires: zlib >= 1.2.1
@@ -69,7 +70,7 @@ Requires: acl-devel
Requires: attr-devel
Requires: bzip2-devel
Requires: libb2-devel
-Requires: libxml2-devel
+Requires: libxml2-devel >= 1:2.7.3
Requires: lz4-devel >= r131
Requires: nettle-devel
Requires: richacl-devel
@@ -146,7 +147,7 @@ bsdunzip - implementacja programu unzip(1), oparta na libarchive.
%prep
%setup -q
%patch -P0 -p1
-%patch -P1 -p1 -b .orig
+%patch -P1 -p1
%build
%{__libtoolize}
diff --git a/libarchive-nettle2.patch b/libarchive-nettle2.patch
deleted file mode 100644
index 4458747..0000000
--- a/libarchive-nettle2.patch
+++ /dev/null
@@ -1,101 +0,0 @@
---- libarchive-3.8.5/libarchive/archive_digest.c.orig 2026-01-05 11:30:19.000000000 +0100
-+++ libarchive-3.8.5/libarchive/archive_digest.c 2026-02-22 17:23:18.331360134 +0100
-@@ -320,7 +320,11 @@ __archive_md5update(archive_md5_ctx *ctx
- static int
- __archive_md5final(archive_md5_ctx *ctx, void *md)
- {
-+#if NETTLE_VERSION_MAJOR < 4
- md5_digest(ctx, MD5_DIGEST_SIZE, md);
-+#else
-+ md5_digest(ctx, md);
-+#endif
- return (ARCHIVE_OK);
- }
-
-@@ -503,7 +507,11 @@ __archive_ripemd160update(archive_rmd160
- static int
- __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md)
- {
-+#if NETTLE_VERSION_MAJOR < 4
- ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md);
-+#else
-+ ripemd160_digest(ctx, md);
-+#endif
- return (ARCHIVE_OK);
- }
-
-@@ -731,7 +739,11 @@ __archive_sha1update(archive_sha1_ctx *c
- static int
- __archive_sha1final(archive_sha1_ctx *ctx, void *md)
- {
-+#if NETTLE_VERSION_MAJOR < 4
- sha1_digest(ctx, SHA1_DIGEST_SIZE, md);
-+#else
-+ sha1_digest(ctx, md);
-+#endif
- return (ARCHIVE_OK);
- }
-
-@@ -1011,7 +1023,11 @@ __archive_sha256update(archive_sha256_ct
- static int
- __archive_sha256final(archive_sha256_ctx *ctx, void *md)
- {
-+#if NETTLE_VERSION_MAJOR < 4
- sha256_digest(ctx, SHA256_DIGEST_SIZE, md);
-+#else
-+ sha256_digest(ctx, md);
-+#endif
- return (ARCHIVE_OK);
- }
-
-@@ -1263,7 +1279,11 @@ __archive_sha384update(archive_sha384_ct
- static int
- __archive_sha384final(archive_sha384_ctx *ctx, void *md)
- {
-+#if NETTLE_VERSION_MAJOR < 4
- sha384_digest(ctx, SHA384_DIGEST_SIZE, md);
-+#else
-+ sha384_digest(ctx, md);
-+#endif
- return (ARCHIVE_OK);
- }
-
-@@ -1539,7 +1559,11 @@ __archive_sha512update(archive_sha512_ct
- static int
- __archive_sha512final(archive_sha512_ctx *ctx, void *md)
- {
-+#if NETTLE_VERSION_MAJOR < 4
- sha512_digest(ctx, SHA512_DIGEST_SIZE, md);
-+#else
-+ sha512_digest(ctx, md);
-+#endif
- return (ARCHIVE_OK);
- }
-
---- libarchive-3.8.5/libarchive/archive_digest_private.h.orig 2026-01-05 11:30:19.000000000 +0100
-+++ libarchive-3.8.5/libarchive/archive_digest_private.h 2026-02-22 18:08:18.496732082 +0100
-@@ -137,15 +137,21 @@
- /* Nettle crypto headers */
- #if defined(ARCHIVE_CRYPTO_MD5_NETTLE)
- #include <nettle/md5.h>
-+#include <nettle/version.h>
- #endif
- #if defined(ARCHIVE_CRYPTO_RMD160_NETTLE)
- #include <nettle/ripemd160.h>
-+#include <nettle/version.h>
- #endif
--#if defined(ARCHIVE_CRYPTO_SHA1_NETTLE) ||\
-- defined(ARCHIVE_CRYPTO_SHA256_NETTLE) ||\
-+#if defined(ARCHIVE_CRYPTO_SHA1_NETTLE)
-+#include <nettle/sha1.h>
-+#include <nettle/version.h>
-+#endif
-+#if defined(ARCHIVE_CRYPTO_SHA256_NETTLE) ||\
- defined(ARCHIVE_CRYPTO_SHA384_NETTLE) ||\
- defined(ARCHIVE_CRYPTO_SHA512_NETTLE)
--#include <nettle/sha.h>
-+#include <nettle/sha2.h>
-+#include <nettle/version.h>
- #endif
-
- /* OpenSSL crypto headers */
diff --git a/libxml2-config.patch b/libxml2-config.patch
new file mode 100644
index 0000000..4e88b02
--- /dev/null
+++ b/libxml2-config.patch
@@ -0,0 +1,29 @@
+From 572494547b6ab34fc624f9efda0b3b28fcf4a4cd Mon Sep 17 00:00:00 2001
+From: datauwu <209150516+datauwu at users.noreply.github.com>
+Date: Wed, 14 Oct 2026 23:14:40 +0800
+Subject: [PATCH] autotools: fix libxml2 linking
+
+The custom AC_CHECK_LIB success action prevents HAVE_LIBXML2 from
+being defined, even when libxml2 is detected.
+
+Explicitly define HAVE_LIBXML2 on success to restore libxml2
+support and linking.
+---
+ configure.ac | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 02ca370bcf..b00eed1367 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -585,7 +585,9 @@ if test "x$with_xml2" != "xno"; then
+ PKG_CHECK_MODULES(LIBXML2_PC, [libxml-2.0 >= 2.7.3], [
+ CPPFLAGS="${CPPFLAGS} ${LIBXML2_PC_CFLAGS}"
+ LIBS="${LIBS} ${LIBXML2_PC_LIBS}"
+- AC_CHECK_LIB(xml2,xmlInitParser,[true],AC_MSG_FAILURE(Missing xml2 library))
++ AC_CHECK_LIB(xml2,xmlInitParser,
++ [AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have the 'xml2' library.])],
++ [AC_MSG_FAILURE([Missing xml2 library])])
+ ], [
+ AC_CHECK_LIB(xml2,xmlInitParser)
+ ])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libarchive.git/commitdiff/9ec2b86984dbfea8f41b12098c6119b5017f328c