[packages/amanda] Up to 3.5.4
arekm
arekm at pld-linux.org
Wed Nov 11 23:33:53 CET 2026
commit 274e7ab7604a1eddfdf10729d9c8a77fb02bb16e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Nov 11 23:15:26 2026 +0100
Up to 3.5.4
Fixes CVE-2023-30577, CVE-2022-37705, CVE-2022-37704, CVE-2022-37703.
amanda.spec | 39 +++++++++++++++++++++--------------
docbook-xsl-version.patch | 52 +++++++++++++++++++++++++++++++++++++++++++++++
missing-extern.patch | 11 ----------
perl-5.40.patch | 45 ++++++++++++++++++++++++++++++++++++++++
perl-import-args.patch | 30 +++++++++++++++++++++++++++
runtar-const.patch | 30 +++++++++++++++++++++++++++
6 files changed, 181 insertions(+), 26 deletions(-)
---
diff --git a/amanda.spec b/amanda.spec
index 43e2879..a3e5201 100644
--- a/amanda.spec
+++ b/amanda.spec
@@ -11,12 +11,12 @@
Summary: A network-capable tape backup solution
Summary(pl.UTF-8): Sieciowo zorientowany system tworzenia kopii zapasowych
Name: amanda
-Version: 3.5.1
-Release: 11
+Version: 3.5.4
+Release: 1
License: BSD
Group: Networking/Utilities
-Source0: http://downloads.sourceforge.net/amanda/%{name}-%{version}.tar.gz
-# Source0-md5: f57307959f79e722b1dcb3f985ebb0d0
+Source0: https://github.com/zmanda/amanda/archive/tag-community-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 01c881b6b75f1ef07d6e75db05a0afb0
Source1: %{name}-srv.crontab
Source2: %{name}.inetd
Source3: %{name}idx.inetd
@@ -41,19 +41,27 @@ Patch8: %{name}-ac.patch
Patch9: %{name}-krb5-auth.patch
Patch10: swig.patch
Patch11: krb5-ac.patch
-Patch12: missing-extern.patch
+# https://github.com/zmanda/amanda/pull/270
+Patch12: perl-5.40.patch
Patch13: tirpc.patch
-URL: http://www.amanda.org/
+Patch14: docbook-xsl-version.patch
+# https://github.com/zmanda/amanda/pull/242
+Patch15: runtar-const.patch
+Patch16: perl-import-args.patch
+URL: https://www.amanda.org/
%{?with_samba:BuildRequires: /usr/bin/smbclient}
BuildRequires: autoconf >= 2.64
BuildRequires: automake
+BuildRequires: bison
BuildRequires: curl-devel >= 7.10.0
+BuildRequires: docbook-dtd412-xml
+BuildRequires: docbook-dtd42-xml
+BuildRequires: docbook-style-xsl-nons
BuildRequires: dump
BuildRequires: flex
BuildRequires: glib2-devel
BuildRequires: gnuplot
BuildRequires: heimdal-devel
-BuildRequires: rpmbuild(macros) >= 1.654
# curl is broken, see curl-config --libs (c8cba693)
BuildRequires: keyutils-devel
BuildRequires: libtirpc-devel
@@ -65,6 +73,7 @@ BuildRequires: openssl-devel
BuildRequires: perl-devel >= 5.6.0
BuildRequires: pkgconfig
BuildRequires: readline-devel >= 4.2
+BuildRequires: rpcsvc-proto
BuildRequires: rpm-perlprov
BuildRequires: rpmbuild(macros) >= 1.654
BuildRequires: swig
@@ -206,7 +215,7 @@ magazynowane kopie zapasowe (lub do których podpięte są urządzenia
typu streamer).
%prep
-%setup -q
+%setup -q -n %{name}-tag-community-%{version}
%patch -P0 -p1
%patch -P1 -p1
%patch -P2 -p1
@@ -221,15 +230,15 @@ typu streamer).
%patch -P11 -p1
%patch -P12 -p1
%patch -P13 -p1
+%patch -P14 -p1
+%patch -P15 -p1
+%patch -P16 -p1
cp -a %{SOURCE10} .
-find perl/ -name '*.swg' -print0 | xargs -0 touch
-
%build
%{__libtoolize}
-%{__aclocal} -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive
-%{__autoconf}
-%{__automake}
+# also generates the m4/automake file lists and FULL_VERSION missing from the git tarball
+./autogen
%configure \
DUMP=/sbin/dump \
GZIP=/bin/gzip \
@@ -241,6 +250,7 @@ find perl/ -name '*.swg' -print0 | xargs -0 touch
%{?with_xfs:XFSDUMP=/sbin/xfsdump} \
%{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
--disable-static \
+ --enable-manpage-build \
--enable-shared \
%{!?with_server:--without-server} \
%{!?with_client:--without-client} \
@@ -414,7 +424,7 @@ EOF
%files common
%defattr(644,root,root,755)
-%doc AUTHORS COPYRIGHT ChangeLog NEWS README ReleaseNotes UPGRADING amlvm-snapshot.README
+%doc AUTHORS COPYRIGHT ChangeLog NEWS README.md ReleaseNotes UPGRADING amlvm-snapshot.README
%attr(755,root,root) %{_libdir}/amanda/libamanda*.so
%attr(755,root,root) %{_libdir}/amanda/libamar*.so
%attr(755,root,root) %{_libdir}/amanda/libamdevice*.so
@@ -619,7 +629,6 @@ EOF
%{_libexecdir}/amanda/rest-server/public/dispatch.fcgi
%{_libexecdir}/amanda/rest-server/public/favicon.ico
%{_libexecdir}/amanda/rest-server/public/images
-%{_libexecdir}/amanda/rest-server/public/javascripts
%{_libexecdir}/amanda/rest-server/views
%attr(755,root,root) %{_sbindir}/activate-devpay
diff --git a/docbook-xsl-version.patch b/docbook-xsl-version.patch
new file mode 100644
index 0000000..0e8cf27
--- /dev/null
+++ b/docbook-xsl-version.patch
@@ -0,0 +1,52 @@
+# docbook-xsl >= 1.79.1 ships VERSION.xsl instead of VERSION, and the nons
+# 1.79.2 flavour calls itself "snapshot"; configure rejected both
+diff --git a/config/macro-archive/docbook-xslt-min.m4 b/config/macro-archive/docbook-xslt-min.m4
+index ebb5de2..5a8c9b4 100644
+--- a/config/macro-archive/docbook-xslt-min.m4
++++ b/config/macro-archive/docbook-xslt-min.m4
+@@ -74,16 +74,20 @@ AC_DEFUN([AC_CHECK_DOCBOOK_XSLT_MIN],
+ <xsl:template match="text()"/>
+ </xsl:stylesheet>
+ EOF
+- echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/current/VERSION' with input:" >&AS_MESSAGE_LOG_FD
+- echo "====" >&AS_MESSAGE_LOG_FD
+- cat conftest.xsl >&AS_MESSAGE_LOG_FD
+- echo "====" >&AS_MESSAGE_LOG_FD
++ # docbook-xsl 1.79.1 renamed VERSION to VERSION.xsl
++ for version_file in VERSION.xsl VERSION; do
++ echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/current/$version_file' with input:" >&AS_MESSAGE_LOG_FD
++ echo "====" >&AS_MESSAGE_LOG_FD
++ cat conftest.xsl >&AS_MESSAGE_LOG_FD
++ echo "====" >&AS_MESSAGE_LOG_FD
+
+- ac_cv_docbook_xslt_current_version=`$XSLTPROC $XSLTPROC_FLAGS conftest.xsl http://docbook.sourceforge.net/release/xsl/current/VERSION 2>&AS_MESSAGE_LOG_FD`
++ ac_cv_docbook_xslt_current_version=`$XSLTPROC $XSLTPROC_FLAGS conftest.xsl http://docbook.sourceforge.net/release/xsl/current/$version_file 2>&AS_MESSAGE_LOG_FD`
+
+- if test "$?" != 0; then
++ if test "$?" = 0 && test -n "$ac_cv_docbook_xslt_current_version"; then
++ break
++ fi
+ ac_cv_docbook_xslt_current_version='no'
+- fi
++ done
+
+ rm conftest.xsl
+ fi
+@@ -95,10 +99,13 @@ EOF
+ if test x"$DOCBOOK_XSLT_CURRENT_VERSION" = x"no"; then
+ AC_MSG_RESULT([no])
+ else
+- AX_COMPARE_VERSION([$DOCBOOK_XSLT_CURRENT_VERSION], [lt], [$1], [
+- # version is less than required, so mark it as "no"
+- DOCBOOK_XSLT_CURRENT_VERSION=no
+- ])
++ # docbook-xsl-nons 1.79.2 reports its version as "snapshot"
++ if test x"$DOCBOOK_XSLT_CURRENT_VERSION" != x"snapshot"; then
++ AX_COMPARE_VERSION([$DOCBOOK_XSLT_CURRENT_VERSION], [lt], [$1], [
++ # version is less than required, so mark it as "no"
++ DOCBOOK_XSLT_CURRENT_VERSION=no
++ ])
++ fi
+
+ if test x"$DOCBOOK_XSLT_CURRENT_VERSION" = x"no"; then
+ AC_MSG_RESULT([no])
diff --git a/missing-extern.patch b/missing-extern.patch
deleted file mode 100644
index be384ff..0000000
--- a/missing-extern.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- amanda-3.5.1/common-src/testutils.h~ 2017-12-01 14:26:28.000000000 +0100
-+++ amanda-3.5.1/common-src/testutils.h 2021-05-09 10:32:10.263953946 +0200
-@@ -75,7 +75,7 @@
- #define tu_dbg(...) if (tu_debugging_enabled) { g_fprintf(stderr, __VA_ARGS__); }
-
- /* Is debugging enabled for this test run? (set internally) */
--int tu_debugging_enabled;
-+extern int tu_debugging_enabled;
-
- /*
- * Main loop
diff --git a/perl-5.40.patch b/perl-5.40.patch
new file mode 100644
index 0000000..15e043b
--- /dev/null
+++ b/perl-5.40.patch
@@ -0,0 +1,45 @@
+From bd9ef8e5c004911b529d55b521d18d4d66c4e9b7 Mon Sep 17 00:00:00 2001
+From: Peter Bieringer <pb at bieringer.de>
+Date: Tue, 29 Oct 2024 21:42:32 +0100
+Subject: [PATCH 1/2] fixes https://github.com/zmanda/amanda/issues/262
+
+---
+ perl/Amanda/Taper/Scribe.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/perl/Amanda/Taper/Scribe.pm b/perl/Amanda/Taper/Scribe.pm
+index 8b21c77c0b..ecfd2a140a 100644
+--- a/perl/Amanda/Taper/Scribe.pm
++++ b/perl/Amanda/Taper/Scribe.pm
+@@ -1116,7 +1116,7 @@ sub _xmsg_no_space {
+ if ($chg->{'global_space'}) {
+ $chg->inventory(inventory_cb => $steps->{'got_inventory'});
+ } else {
+- return $finished_cb();
++ return $finished_cb->();
+ }
+ };
+
+
+From e083df9afaad61fc8772765d132a93ec8bc7ae5e Mon Sep 17 00:00:00 2001
+From: Peter Bieringer <pb at bieringer.de>
+Date: Tue, 29 Oct 2024 21:43:18 +0100
+Subject: [PATCH 2/2] fix for https://github.com/zmanda/amanda/issues/262
+
+---
+ perl/Amanda/Tapelist.swg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/perl/Amanda/Tapelist.swg b/perl/Amanda/Tapelist.swg
+index 9266961a4e..ba84c68ca0 100644
+--- a/perl/Amanda/Tapelist.swg
++++ b/perl/Amanda/Tapelist.swg
+@@ -36,7 +36,7 @@ use Amanda::Debug qw(:logging);
+ use Amanda::Config qw( config_dir_relative );
+ use File::Copy;
+ use Fcntl qw(:flock); # import LOCK_* constants
+-use Amanda::Message qw( :severity );
++use Amanda::Message;
+
+ ## package functions
+
diff --git a/perl-import-args.patch b/perl-import-args.patch
new file mode 100644
index 0000000..4989e15
--- /dev/null
+++ b/perl-import-args.patch
@@ -0,0 +1,30 @@
+# these packages define no import(), so the tags were always ignored;
+# perl >= 5.40 warns about it on every run of amtape and amvault
+diff --git a/perl/Amanda/Vault.pm b/perl/Amanda/Vault.pm
+index da0d680..aeb9187 100644
+--- a/perl/Amanda/Vault.pm
++++ b/perl/Amanda/Vault.pm
+@@ -105,8 +105,8 @@ use Amanda::Recovery::Scan;
+ use Amanda::Recovery::Clerk;
+ use Amanda::Taper::Scan;
+ use Amanda::Taper::Scribe qw( get_splitting_args_from_config );
+-use Amanda::Storage qw( :constants );
+-use Amanda::Changer qw( :constants );
++use Amanda::Storage;
++use Amanda::Changer;
+ use Amanda::Cmdline;
+ use Amanda::Cmdfile;
+ use Amanda::Paths;
+diff --git a/server-src/amtape.pl b/server-src/amtape.pl
+index cbad0cb..bb6a7bc 100644
+--- a/server-src/amtape.pl
++++ b/server-src/amtape.pl
+@@ -39,7 +39,7 @@ use Amanda::Taper::Scan;
+ use Amanda::Recovery::Scan;
+ use Amanda::Interactivity;
+ use Amanda::Tapelist;
+-use Amanda::Message qw( :severity );
++use Amanda::Message;
+
+ my $exit_status = 0;
+ my $tl;
diff --git a/runtar-const.patch b/runtar-const.patch
new file mode 100644
index 0000000..6db3c84
--- /dev/null
+++ b/runtar-const.patch
@@ -0,0 +1,30 @@
+Fix C type safety issue in CVE-2023-30547 change
+
+The types char ** and const char ** are distinct according to the
+C language. Future compilers will treat pointer type mismatches
+as errors.
+
+Submitted upstream: <https://github.com/zmanda/amanda/pull/242>
+
+diff --git a/client-src/runtar.c b/client-src/runtar.c
+index 454e9b9a9b96449b..4d2451dc84840fa9 100644
+--- a/client-src/runtar.c
++++ b/client-src/runtar.c
+@@ -54,7 +54,7 @@ main(
+ {
+ #ifdef GNUTAR
+ int i;
+- char **j;
++ const char **j;
+ char *e;
+ char *dbf;
+ char *cmdline;
+@@ -255,7 +255,7 @@ check_whitelist(
+ gchar* option)
+ {
+ bool result = TRUE;
+- char** i;
++ const char** i;
+
+ for(i=whitelisted_args; *i; i++) {
+ if (g_str_has_prefix(option, *i)) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/amanda.git/commitdiff/274e7ab7604a1eddfdf10729d9c8a77fb02bb16e
More information about the pld-cvs-commit
mailing list