summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2019-05-19 11:23:44 -0700
committerMatt Turner <mattst88@gentoo.org>2019-05-19 11:25:07 -0700
commite939ad605f5fb277eb556de72c952fd725766acf (patch)
tree32f5c69e1669b825252da642d785f6a3700c002c /dev-libs/ding-libs
parentsys-kernel/linux-firmware: stabilize (diff)
downloadgentoo-e939ad605f5fb277eb556de72c952fd725766acf.tar.gz
gentoo-e939ad605f5fb277eb556de72c952fd725766acf.tar.bz2
gentoo-e939ad605f5fb277eb556de72c952fd725766acf.zip
dev-libs/ding-libs: Include patches from upstream to fix test failures
Closes: https://bugs.gentoo.org/655084 Closes: https://bugs.gentoo.org/683324 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'dev-libs/ding-libs')
-rw-r--r--dev-libs/ding-libs/ding-libs-0.6.1.ebuild6
-rw-r--r--dev-libs/ding-libs/files/0000-INI-Fix-detection-of-error-messages.patch47
-rw-r--r--dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch36
-rw-r--r--dev-libs/ding-libs/files/0002-validators_ut_check-Fix-fail-with-new-glibc.patch49
4 files changed, 138 insertions, 0 deletions
diff --git a/dev-libs/ding-libs/ding-libs-0.6.1.ebuild b/dev-libs/ding-libs/ding-libs-0.6.1.ebuild
index d5e4cec20bf8..88d34677f297 100644
--- a/dev-libs/ding-libs/ding-libs-0.6.1.ebuild
+++ b/dev-libs/ding-libs/ding-libs-0.6.1.ebuild
@@ -19,6 +19,12 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
test? ( dev-libs/check )"
+PATCHES=(
+ "${FILESDIR}"/0000-INI-Fix-detection-of-error-messages.patch
+ "${FILESDIR}"/0001-path_utils_ut-allow-single-as-well.patch
+ "${FILESDIR}"/0002-validators_ut_check-Fix-fail-with-new-glibc.patch
+)
+
multilib_src_configure() {
ECONF_SOURCE="${S}" econf
}
diff --git a/dev-libs/ding-libs/files/0000-INI-Fix-detection-of-error-messages.patch b/dev-libs/ding-libs/files/0000-INI-Fix-detection-of-error-messages.patch
new file mode 100644
index 000000000000..62e436c7c92a
--- /dev/null
+++ b/dev-libs/ding-libs/files/0000-INI-Fix-detection-of-error-messages.patch
@@ -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] 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.21.0
+
diff --git a/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch b/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch
new file mode 100644
index 000000000000..a9ca8e9edc2b
--- /dev/null
+++ b/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch
@@ -0,0 +1,36 @@
+From 4236e323e8ab4f13770e1ac9e94666b304b693fb Mon Sep 17 00:00:00 2001
+From: Henrik Riomar <henrik.riomar@gmail.com>
+Date: Tue, 24 Jul 2018 21:59:36 +0000
+Subject: [PATCH 1/2] path_utils_ut: allow single / as well
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266
+ Multiple successive slashes are considered to be the same as one slash.
+
+When running the tests on a musl libc system
+ get_dirname(p, PATH_MAX, "//foo//")
+actually results in a / and not //
+
+Reviewed-by: Michal Židek <mzidek@redhat.com>
+---
+ path_utils/path_utils_ut.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/path_utils/path_utils_ut.c b/path_utils/path_utils_ut.c
+index 27c99b6..061abfb 100644
+--- a/path_utils/path_utils_ut.c
++++ b/path_utils/path_utils_ut.c
+@@ -62,7 +62,7 @@ START_TEST(test_dirname)
+ fail_unless_str_equal(p, "//foo");
+
+ fail_unless(get_dirname(p, PATH_MAX, "//foo//") == SUCCESS);
+- fail_unless_str_equal(p, "//");
++ fail_unless(!strcmp(p, "/") || !strcmp(p, "//"));
+
+ fail_unless(get_dirname(p, PATH_MAX, "foo//bar") == SUCCESS);
+ fail_unless_str_equal(p, "foo");
+--
+2.21.0
+
diff --git a/dev-libs/ding-libs/files/0002-validators_ut_check-Fix-fail-with-new-glibc.patch b/dev-libs/ding-libs/files/0002-validators_ut_check-Fix-fail-with-new-glibc.patch
new file mode 100644
index 000000000000..0524a128d620
--- /dev/null
+++ b/dev-libs/ding-libs/files/0002-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?= <mzidek@redhat.com>
+Date: Wed, 1 Aug 2018 17:48:10 +0200
+Subject: [PATCH 2/2] 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.21.0
+