From 14c11acbc36f34913916380085462ade8a0f3d23 Mon Sep 17 00:00:00 2001 From: Ingvar Hagelund Date: Thu, 14 Feb 2019 13:02:18 +0100 Subject: [PATCH] Adding a patch from upstream fixing a simple formatting bug on gcc-9 --- varnish-6.1.1_fix_upstrbug_2879.patch | 39 +++++++++++++++++++++++++++ varnish.spec | 9 ++++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 varnish-6.1.1_fix_upstrbug_2879.patch diff --git a/varnish-6.1.1_fix_upstrbug_2879.patch b/varnish-6.1.1_fix_upstrbug_2879.patch new file mode 100644 index 0000000..376175f --- /dev/null +++ b/varnish-6.1.1_fix_upstrbug_2879.patch @@ -0,0 +1,39 @@ +commit 7119d790b590e7fb560ad602cedfda5185c7e841 +Author: Poul-Henning Kamp +Date: Fri Jan 11 10:26:44 2019 +0000 + + Avoid printing %s,NULL in case of errors we do not expect. + + Fixes #2879 + +diff --git a/lib/libvarnish/vnum.c b/lib/libvarnish/vnum.c +index b619199c6..59e804ec8 100644 +--- a/lib/libvarnish/vnum.c ++++ b/lib/libvarnish/vnum.c +@@ -349,15 +349,17 @@ main(int argc, char *argv[]) + + for (tc = test_cases; tc->str; ++tc) { + e = VNUM_2bytes(tc->str, &val, tc->rel); +- if (e != tc->err) { +- printf("%s: VNUM_2bytes(\"%s\", %ju) (%s) != (%s)\n", +- *argv, tc->str, tc->rel, tc->err, e); +- ++ec; +- } else if (e == NULL && val != tc->val) { +- printf("%s: VNUM_2bytes(\"%s\", %ju) %ju != %ju (%s)\n", +- *argv, tc->str, tc->rel, val, tc->val, e); +- ++ec; +- } ++ if (e != NULL) ++ val = 0; ++ if (e == tc->err && val == tc->val) ++ continue; ++ ++ec; ++ printf("%s: VNUM_2bytes(\"%s\", %ju)\n", ++ *argv, tc->str, tc->rel); ++ printf("\tExpected:\tstatus %s - value %ju\n", ++ tc->err ? tc->err : "Success", tc->val); ++ printf("\tGot:\t\tstatus %s - value %ju\n", ++ e ? e : "Success", val); + } + if (!isnan(VNUM_duration(NULL))) { + printf("%s: VNUM_Duration(NULL) fail\n", *argv); diff --git a/varnish.spec b/varnish.spec index 07fb15c..b4c8dc8 100644 --- a/varnish.spec +++ b/varnish.spec @@ -21,7 +21,7 @@ Summary: High-performance HTTP accelerator Name: varnish Version: 6.1.1 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD URL: https://www.varnish-cache.org/ Source0: http://varnish-cache.org/_downloads/%{name}-%{version}%{?vd_rc}.tgz @@ -36,6 +36,9 @@ Patch12: varnish-6.0.1_fix_bug2668.patch # Just a simple formatting error Patch13: varnish-6.1.0_fix_testu00008.patch +# Another formatting error fixed upstream +Patch14: varnish-6.1.1_fix_upstrbug_2879.patch + %if 0%{?fedora} > 29 Provides: varnish%{_isa} = %{version}-%{release} Provides: varnishd(abi)%{_isa} = %{abi} @@ -156,6 +159,7 @@ sed -i '8 i\RPM_BUILD_ROOT=%{buildroot}' find-provides %endif #patch12 -p1 %patch13 -p0 +%patch14 -p1 %build %if 0%{?rhel} == 6 @@ -396,6 +400,9 @@ fi %changelog +* Thu Feb 14 2019 Ingvar Hagelund - 6.1.1-4 +- Adding a patch from upstream fixing a simple formatting bug on gcc-9 + * Sun Feb 03 2019 Fedora Release Engineering - 6.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild