From 88246d12116afd38ca2863f689a5c0417ab474a7 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Jul 08 2022 04:46:12 +0000 Subject: Add patch to fix bug which caused a failing test. Add patch from https://github.com/zmanda/amanda/pull/176 which fixes a bug that caused the hexencode test to fail. Thanks to Peter Bieringer. --- diff --git a/176.patch b/176.patch new file mode 100644 index 0000000..b9fd40a --- /dev/null +++ b/176.patch @@ -0,0 +1,26 @@ +From 262c05b20c7de243542e7502e00152cdafb573d4 Mon Sep 17 00:00:00 2001 +From: Peter Bieringer +Date: Wed, 6 Jul 2022 22:53:12 +0200 +Subject: [PATCH] fix for https://github.com/zmanda/amanda/issues/167 + +--- + common-src/amutil.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/common-src/amutil.c b/common-src/amutil.c +index 20454ab73c..371d38e433 100644 +--- a/common-src/amutil.c ++++ b/common-src/amutil.c +@@ -1132,6 +1132,12 @@ char *hexdecode_string(const char *str, GError **err) + new_len = orig_len = strlen(str); + for (i = 0; i < orig_len; i++) { + if (str[i] == '%') { ++ if (new_len < 2) { ++ g_set_error(err, am_util_error_quark(), AM_UTIL_ERROR_HEXDECODEINVAL, ++ "Invalid hexcode string: %s", str); ++ s = g_string_sized_new(0); ++ goto cleanup; ++ } + new_len -= 2; + } + } diff --git a/amanda.spec b/amanda.spec index 1e9812f..5e2a4bb 100644 --- a/amanda.spec +++ b/amanda.spec @@ -16,7 +16,7 @@ Summary: A network-capable tape backup solution Name: amanda Version: 3.5.1 -Release: 35%{?dist} +Release: 36%{?dist} Source: http://downloads.sourceforge.net/amanda/amanda-%{version}.tar.gz Source1: amanda.crontab Source4: disklist @@ -44,6 +44,11 @@ Patch6: patch-xfsrestore-housekeeping # Add missing extern keyword to global vars in header files Patch7: amanda-missing-extern.patch + +# Patch from upstream pull request https://github.com/zmanda/amanda/pull/176 +# to fix a bug which appears as a failing test case +Patch8: https://patch-diff.githubusercontent.com/raw/zmanda/amanda/pull/176.patch + License: BSD and GPLv3+ and GPLv2+ and GPLv2 URL: http://www.amanda.org BuildRequires: automake autoconf libtool @@ -453,6 +458,10 @@ make check %changelog +* Thu Jul 07 2022 Jason L Tibbitts III - 3.5.1-36 +- Add patch to fix bug which caused a failing test. Thanks to Peter Bieringer + for the patch. + * Wed Jun 01 2022 Jitka Plesnikova - 3.5.1-35 - Perl 5.36 rebuild