From 8b76109c7262ca1040299d93c97f71f6402e2904 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Mon, 17 Sep 2018 13:22:07 +0200 Subject: core/ding-libs: backported fix for test ini_validators_ut_check --- core/ding-libs/PKGBUILD | 10 +++++++ ...-0.6.1-ini_validators_ut_check-glibc-2.28.patch | 35 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 core/ding-libs/PKGBUILD create mode 100644 core/ding-libs/ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28.patch (limited to 'core') diff --git a/core/ding-libs/PKGBUILD b/core/ding-libs/PKGBUILD new file mode 100644 index 00000000..ef562218 --- /dev/null +++ b/core/ding-libs/PKGBUILD @@ -0,0 +1,10 @@ +# already fixed upstream, see https://github.com/SSSD/ding-libs/issues/7 + +source+=('ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28.patch') +sha1sums+=('bec66945c3524a9edf4956f794e99ca4d3d144e0') + +prepare() { + cd $pkgname-$pkgver + + patch -Np1 -i ../ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28.patch +} diff --git a/core/ding-libs/ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28.patch b/core/ding-libs/ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28.patch new file mode 100644 index 00000000..29234a70 --- /dev/null +++ b/core/ding-libs/ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28.patch @@ -0,0 +1,35 @@ +diff -rauN ding-libs-0.6.1/ini/ini_validators_ut_check.c ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28-patch/ini/ini_validators_ut_check.c +--- ding-libs-0.6.1/ini/ini_validators_ut_check.c 2017-09-07 17:24:13.000000000 +0200 ++++ ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28-patch/ini/ini_validators_ut_check.c 2018-09-17 13:13:29.989999949 +0200 +@@ -602,11 +602,31 @@ + 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 " + "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'. " ++ "[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); ++ ++ + fail_unless(ret == 0, "Got msg: [%s]", errmsg); + ini_errobj_next(errobj); + -- cgit v1.2.3-70-g09d2