From 2854df32616703a01c393ddb505764267e185c15 Mon Sep 17 00:00:00 2001 From: Michal Židek Date: Aug 14 2018 10:34:45 +0000 Subject: Resolves: rhbz#1603785 - ding-libs: FTBFS in Fedora rawhide --- diff --git a/INI-Fix-detection-of-error-messages.patch b/INI-Fix-detection-of-error-messages.patch new file mode 100644 index 0000000..d5cdcac --- /dev/null +++ b/INI-Fix-detection-of-error-messages.patch @@ -0,0 +1,47 @@ +From 72c19bd018b107ecf5a80963b433e9922f7243fd Mon Sep 17 00:00:00 2001 +From: Lukas Slebodnik +Date: Wed, 3 Jan 2018 18:03:44 +0100 +Subject: [PATCH 01/11] INI: Fix detection of error messages +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libc on BSD returns different error messages. + +Reviewed-by: Michal Židek +--- + ini/ini_validators_ut_check.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/ini/ini_validators_ut_check.c b/ini/ini_validators_ut_check.c +index fa7105a..9ecde75 100644 +--- a/ini/ini_validators_ut_check.c ++++ b/ini/ini_validators_ut_check.c +@@ -607,6 +607,12 @@ START_TEST(test_ini_allowed_options_wrong_regex) + "[rule/options_for_foo]: Cannot compile regular expression " + "from option 'section_re'. " + "Error: 'Unmatched [ or [^'"); ++ if (ret != 0) { ++ ret = strcmp(errmsg, ++ "[rule/options_for_foo]: Cannot compile regular expression " ++ "from option 'section_re'. " ++ "Error: 'brackets ([ ]) not balanced'"); ++ } + fail_unless(ret == 0, "Got msg: [%s]", errmsg); + ini_errobj_next(errobj); + +@@ -1028,6 +1034,11 @@ START_TEST(test_ini_allowed_sections_wrong_regex) + ret = strcmp(errmsg, + "[rule/section_list]: Validator failed to use regex " + "[^foo\\(*$]:[Unmatched ( or \\(]"); ++ if (ret !=0) { ++ ret = strcmp(errmsg, ++ "[rule/section_list]: Validator failed to use regex " ++ "[^foo\\(*$]:[parentheses not balanced]"); ++ } + fail_unless(ret == 0, "Got msg: [%s]", errmsg); + ini_errobj_next(errobj); + +-- +2.9.5 + diff --git a/TEST-validators_ut_check-Fix-fail-with-new-glibc.patch b/TEST-validators_ut_check-Fix-fail-with-new-glibc.patch new file mode 100644 index 0000000..be49fa0 --- /dev/null +++ b/TEST-validators_ut_check-Fix-fail-with-new-glibc.patch @@ -0,0 +1,49 @@ +From 9f9a3ded23cc2bb917468939b745cc498cec523a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20=C5=BDidek?= +Date: Wed, 1 Aug 2018 17:48:10 +0200 +Subject: [PATCH] validators_ut_check: Fix fail with new glibc + +Error message was slightly change from previous version +of glibc which caused fails in validators unit tests. + +Reviewed-by: Jakub Hrozek +--- + ini/ini_validators_ut_check.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/ini/ini_validators_ut_check.c b/ini/ini_validators_ut_check.c +index 9ecde75..3af8551 100644 +--- a/ini/ini_validators_ut_check.c ++++ b/ini/ini_validators_ut_check.c +@@ -602,6 +602,8 @@ START_TEST(test_ini_allowed_options_wrong_regex) + fail_unless(ret == 0, "Got msg: [%s]", errmsg); + ini_errobj_next(errobj); + ++ /* Different versions of libc produce slightly different error strings ++ * in this case. For simplicity compare against all of them. */ + errmsg = ini_errobj_get_msg(errobj); + ret = strcmp(errmsg, + "[rule/options_for_foo]: Cannot compile regular expression " +@@ -609,10 +611,17 @@ START_TEST(test_ini_allowed_options_wrong_regex) + "Error: 'Unmatched [ or [^'"); + if (ret != 0) { + ret = strcmp(errmsg, +- "[rule/options_for_foo]: Cannot compile regular expression " +- "from option 'section_re'. " ++ "[rule/options_for_foo]: Cannot compile regular " ++ "expression from option 'section_re'. " + "Error: 'brackets ([ ]) not balanced'"); + } ++ ++ if (ret != 0) { ++ ret = strcmp(errmsg, ++ "[rule/options_for_foo]: Cannot compile regular " ++ "expression from option 'section_re'. " ++ "Error: 'Unmatched [, [^, [:, [., or [='"); ++ } + fail_unless(ret == 0, "Got msg: [%s]", errmsg); + ini_errobj_next(errobj); + +-- +2.9.5 + diff --git a/ding-libs.spec b/ding-libs.spec index 4db726b..3d86b4b 100644 --- a/ding-libs.spec +++ b/ding-libs.spec @@ -1,6 +1,6 @@ Name: ding-libs Version: 0.6.1 -Release: 40%{?dist} +Release: 41%{?dist} Summary: "Ding is not GLib" assorted utility libraries Group: Development/Libraries License: LGPLv3+ @@ -20,6 +20,8 @@ Source0: https://releases.pagure.org/SSSD/ding-libs/%{name}-%{version}.tar.gz ### Patches ### Patch0: INI-Silence-ini_augment-match-failures.patch Patch1: INI-Remove-definiton-of-TRACE_LEVEL.patch +Patch2: INI-Fix-detection-of-error-messages.patch +Patch3: TEST-validators_ut_check-Fix-fail-with-new-glibc.patch ### Dependencies ### # ding-libs is a meta-package that will pull in all of its own @@ -341,6 +343,9 @@ rm -f \ rm -f */doc/html/installdox %changelog +* Tue Aug 14 2018 Michal Židek - 0.6.1-41 +- Resolves: rhbz#1603785 - ding-libs: FTBFS in Fedora rawhide + * Fri Jul 20 2018 Jakub Hrozek - 0.6.1-40 - BuildRequires: gcc - Resolves: rhbz#1603785 - ding-libs: FTBFS in Fedora rawhide