From d9c69a38839b0e095101c9dcc96a0e90bf52945c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 28 Nov 2023 19:51:50 +0100 Subject: [PATCH 01/15] Fix another C compatibility issue (upstream PR #242) --- amanda-c99.patch | 30 ++++++++++++++++++++++++++++++ amanda.spec | 1 + 2 files changed, 31 insertions(+) create mode 100644 amanda-c99.patch diff --git a/amanda-c99.patch b/amanda-c99.patch new file mode 100644 index 0000000..6db3c84 --- /dev/null +++ b/amanda-c99.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: + +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)) { diff --git a/amanda.spec b/amanda.spec index fce8145..043a607 100644 --- a/amanda.spec +++ b/amanda.spec @@ -41,6 +41,7 @@ Patch5: patch-tirpc # https://bugzilla.redhat.com/show_bug.cgi?id=1671117 Patch6: patch-xfsrestore-housekeeping Patch7: amanda-configure-c99.patch +Patch8: amanda-c99.patch License: BSD-3-Clause AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only URL: http://www.amanda.org From 365459cb2f82294dcd3c4919fb20829ece03aaab Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 12:48:12 +0000 Subject: [PATCH 02/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e9e40fa558f6f9bd158667f31161fc7f75d83a4e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 22:57:59 +0000 Subject: [PATCH 03/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 72e9d5ca09215e28c0f92c475a8805e8ed37492a Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 10 Jun 2024 20:57:13 +0200 Subject: [PATCH 04/15] Perl 5.40 rebuild From 7e86a805119ed074d930983df788e025c0234aa9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 16:54:31 +0000 Subject: [PATCH 05/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 2cad74e5bc02b2ef8735a0e758b8af24f314a091 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 11 Nov 2024 21:29:58 -0700 Subject: [PATCH 06/15] Drop nonexistent -s option from aflush man page (rhbz#1943909) --- 273.patch | 36 ++++++++++++++++++++++++++++++++++++ amanda.spec | 3 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 273.patch diff --git a/273.patch b/273.patch new file mode 100644 index 0000000..34a0a80 --- /dev/null +++ b/273.patch @@ -0,0 +1,36 @@ +From 403656a684d8c934866721ca0e1674997deb4eeb Mon Sep 17 00:00:00 2001 +From: Orion Poplawski +Date: Mon, 11 Nov 2024 21:19:54 -0700 +Subject: [PATCH] Drop non-existant -s option from amflush man page + +--- + man/xml-source/amflush.8.xml | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/man/xml-source/amflush.8.xml b/man/xml-source/amflush.8.xml +index e3b1360afd..f09f4a46b6 100644 +--- a/man/xml-source/amflush.8.xml ++++ b/man/xml-source/amflush.8.xml +@@ -32,7 +32,6 @@ + -b + -f + --exact-match +- -s + -D datestamp + &configoverride.synopsis; + config +@@ -90,14 +89,6 @@ This is useful if + amflush + is run as part of another script that, for example, advances the tape + after the flush is completed. +- +- +- +- +- +-Write log to stdout/stderr instead of the amflush log file. Requires the +- +-option. + + + diff --git a/amanda.spec b/amanda.spec index 043a607..1661734 100644 --- a/amanda.spec +++ b/amanda.spec @@ -36,12 +36,13 @@ Patch3: amanda-3.2.0-config-dir.patch Patch4: amanda-3.4.5-no-xinetd.patch # Support tirpc Patch5: patch-tirpc - # Specify the location or the xfs housekeeping directory # https://bugzilla.redhat.com/show_bug.cgi?id=1671117 Patch6: patch-xfsrestore-housekeeping Patch7: amanda-configure-c99.patch Patch8: amanda-c99.patch +# Drop nonexistent -s option from aflush man page (#1943909) +Patch9: https://github.com/zmanda/amanda/pull/273.patch License: BSD-3-Clause AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only URL: http://www.amanda.org From 7d8defb7adaae2f6883fa024bdd5be9309a13c48 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 11 Nov 2024 21:42:07 -0700 Subject: [PATCH 07/15] Perl 5.40 support (rhbz#2322518) --- 270.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++ amanda.spec | 4 +++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 270.patch diff --git a/270.patch b/270.patch new file mode 100644 index 0000000..15e043b --- /dev/null +++ b/270.patch @@ -0,0 +1,45 @@ +From bd9ef8e5c004911b529d55b521d18d4d66c4e9b7 Mon Sep 17 00:00:00 2001 +From: Peter Bieringer +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 +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/amanda.spec b/amanda.spec index 1661734..1fa5b50 100644 --- a/amanda.spec +++ b/amanda.spec @@ -42,7 +42,9 @@ Patch6: patch-xfsrestore-housekeeping Patch7: amanda-configure-c99.patch Patch8: amanda-c99.patch # Drop nonexistent -s option from aflush man page (#1943909) -Patch9: https://github.com/zmanda/amanda/pull/273.patch +Patch9: https://github.com/zmanda/amanda/pull/273.patch +# Perl 5.40 support (rhbz#2322518) +Patch10: https://github.com/zmanda/amanda/pull/270.patch License: BSD-3-Clause AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only URL: http://www.amanda.org From 7156f615df72bb69ca80908c34da4b55649a1af2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 10:56:20 +0000 Subject: [PATCH 08/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From a7570179e3a4107b3d9f3608045c503dd6600179 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 11 Feb 2025 18:42:36 -0600 Subject: [PATCH 09/15] Build with -std=c17. The code in ndmp-src is quite old and has many failures when built as C23. Fixing these will take some effort so the quick fix of building as C17 will work for now. An alternate quick fix would be to pass --without-ndmp to configure. --- amanda.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amanda.spec b/amanda.spec index 1fa5b50..5fd9ff0 100644 --- a/amanda.spec +++ b/amanda.spec @@ -131,7 +131,7 @@ server also needs to have the amanda-client package installed. %build ./autogen -export MAILER=/usr/bin/mail CFLAGS="$RPM_OPT_FLAGS -fPIE" LDFLAGS="$RPM_LD_FLAGS -pie" +export MAILER=/usr/bin/mail CFLAGS="$RPM_OPT_FLAGS -fPIE -std=c17" LDFLAGS="$RPM_LD_FLAGS -pie" %configure --enable-shared \ --enable-manpage-build \ --disable-rpath \ From 3c88249265c6474f388a1481957e19317a63e991 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 11 Feb 2025 19:55:32 -0600 Subject: [PATCH 10/15] Fix absolute symlink This should silence the rpm complaint at the end of the build. --- amanda.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/amanda.spec b/amanda.spec index 5fd9ff0..045acfd 100644 --- a/amanda.spec +++ b/amanda.spec @@ -202,6 +202,11 @@ popd rm -rf $RPM_BUILD_ROOT/usr/share/amanda find $RPM_BUILD_ROOT -name \*.la | xargs rm +pushd $RPM_BUILD_ROOT/usr/bin +rm amandad +ln -s ../%_lib/amandad +popd + %check make check From f89594ead811ae6a658438d84abb83f1f7de61fc Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Thu, 13 Feb 2025 12:56:08 -0600 Subject: [PATCH 11/15] Fix unfortunate typo. --- amanda.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amanda.spec b/amanda.spec index 045acfd..e2c5b7e 100644 --- a/amanda.spec +++ b/amanda.spec @@ -204,7 +204,7 @@ find $RPM_BUILD_ROOT -name \*.la | xargs rm pushd $RPM_BUILD_ROOT/usr/bin rm amandad -ln -s ../%_lib/amandad +ln -s ../%_lib/amanda/amandad popd %check From 0803777d47b7171779dc8e5af1c7a6cfd5779664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 11 Feb 2025 14:36:18 +0100 Subject: [PATCH 12/15] Add sysusers.d config file to allow rpm to create users/groups automatically See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers. --- amanda.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/amanda.spec b/amanda.spec index e2c5b7e..73f8e9c 100644 --- a/amanda.spec +++ b/amanda.spec @@ -128,6 +128,12 @@ server also needs to have the amanda-client package installed. %prep %autosetup -p1 -n %{name}-tag-community-%{version} +# Create a sysusers.d config file +cat >amanda.sysusers.conf </dev/null 2>&1 || : -/usr/bin/gpasswd -a %amanda_user tape >/dev/null 2>&1 || : %post %{?ldconfig} @@ -299,6 +303,7 @@ make check %attr(600,%amanda_user,%amanda_group) %config(noreplace) %{_localstatedir}/lib/amanda/.amandahosts %attr(02770,%amanda_user,%amanda_group) %dir /var/log/amanda %attr(02770,%amanda_user,%amanda_group) %dir /var/log/amanda/amandad +%{_sysusersdir}/amanda.conf %files libs %{_libdir}/libamdevice*.so From e3de39913ac43747d1590124235b9e4574990bcd Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 7 Jul 2025 16:24:46 +0200 Subject: [PATCH 13/15] Perl 5.42 rebuild From 656b46e5ce4cb00b6d60ebb8486c9e3f6244972f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 16:56:06 +0000 Subject: [PATCH 14/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From b6b3c04ef57382423cca429cdc2f522df194c4d0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 03:37:36 +0000 Subject: [PATCH 15/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild