Resolves: rhbz#1603785 - ding-libs: FTBFS in Fedora rawhide
This commit is contained in:
parent
fccf06f33b
commit
2854df3261
47
INI-Fix-detection-of-error-messages.patch
Normal file
47
INI-Fix-detection-of-error-messages.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From 72c19bd018b107ecf5a80963b433e9922f7243fd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lukas Slebodnik <lslebodn@redhat.com>
|
||||||
|
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 <mzidek@redhat.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
49
TEST-validators_ut_check-Fix-fail-with-new-glibc.patch
Normal file
49
TEST-validators_ut_check-Fix-fail-with-new-glibc.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 9f9a3ded23cc2bb917468939b745cc498cec523a Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com>
|
||||||
|
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 <jhrozek@redhat.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: ding-libs
|
Name: ding-libs
|
||||||
Version: 0.6.1
|
Version: 0.6.1
|
||||||
Release: 40%{?dist}
|
Release: 41%{?dist}
|
||||||
Summary: "Ding is not GLib" assorted utility libraries
|
Summary: "Ding is not GLib" assorted utility libraries
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: LGPLv3+
|
License: LGPLv3+
|
||||||
@ -20,6 +20,8 @@ Source0: https://releases.pagure.org/SSSD/ding-libs/%{name}-%{version}.tar.gz
|
|||||||
### Patches ###
|
### Patches ###
|
||||||
Patch0: INI-Silence-ini_augment-match-failures.patch
|
Patch0: INI-Silence-ini_augment-match-failures.patch
|
||||||
Patch1: INI-Remove-definiton-of-TRACE_LEVEL.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 ###
|
### Dependencies ###
|
||||||
# ding-libs is a meta-package that will pull in all of its own
|
# 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
|
rm -f */doc/html/installdox
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 14 2018 Michal Židek <mzidek@redhat.com> - 0.6.1-41
|
||||||
|
- Resolves: rhbz#1603785 - ding-libs: FTBFS in Fedora rawhide
|
||||||
|
|
||||||
* Fri Jul 20 2018 Jakub Hrozek <jhrozek@redhat.com> - 0.6.1-40
|
* Fri Jul 20 2018 Jakub Hrozek <jhrozek@redhat.com> - 0.6.1-40
|
||||||
- BuildRequires: gcc
|
- BuildRequires: gcc
|
||||||
- Resolves: rhbz#1603785 - ding-libs: FTBFS in Fedora rawhide
|
- Resolves: rhbz#1603785 - ding-libs: FTBFS in Fedora rawhide
|
||||||
|
Loading…
Reference in New Issue
Block a user