From b9ac1c6d85c79c85ef9f9b644168f07618340525 Mon Sep 17 00:00:00 2001 From: Henrik Riomar Date: Tue, 24 Jul 2018 12:45:21 +0000 Subject: testing/ding-libs: add check-dev to checkdepends check-dev needed to run the full test suite Add a backport from upstream and a musl integration patch --- testing/ding-libs/APKBUILD | 17 ++++++---- testing/ding-libs/musl-fixes.patch | 31 +++++++++++++++++++ .../path_utils_ut-allow-single-as-well.patch | 36 ++++++++++++++++++++++ 3 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 testing/ding-libs/musl-fixes.patch create mode 100644 testing/ding-libs/path_utils_ut-allow-single-as-well.patch diff --git a/testing/ding-libs/APKBUILD b/testing/ding-libs/APKBUILD index 3a96c5210b..0b82bcb17e 100644 --- a/testing/ding-libs/APKBUILD +++ b/testing/ding-libs/APKBUILD @@ -2,18 +2,21 @@ # Maintainer: Vince Mele pkgname=ding-libs pkgver=0.6.1 -pkgrel=1 +pkgrel=2 pkgdesc="'D is not GLib' utility libraries" url="https://pagure.io/SSSD/ding-libs/" arch="all" license="GPL-3.0 LGPL-3.0" # TODO: add check-dev to checkdepends -checkdepends="diffutils" # need option -b to cmp +checkdepends="check-dev diffutils" # need option -b to cmp depends="" makedepends="icu-dev gettext-dev libintl" install="" subpackages="$pkgname-dev" -source="https://releases.pagure.org/SSSD/$pkgname/$pkgname-$pkgver.tar.gz" +source="https://releases.pagure.org/SSSD/$pkgname/$pkgname-$pkgver.tar.gz + musl-fixes.patch + path_utils_ut-allow-single-as-well.patch + " builddir="$srcdir/$pkgname-$pkgver" build() { @@ -25,14 +28,16 @@ build() { check() { cd "$builddir" - make check + make -j1 check } package() { cd "$builddir" - make DESTDIR="$pkgdir/" install + make -j1 DESTDIR="$pkgdir/" install rm -rf $pkgdir/usr/share } -sha512sums="335a0925bfa7cc113e86c91ad3f2c8aac12711879d5c9b62660140a4b749335a74024c987fcd2304dd78176362997b3e0ebd745193aaffab7a368e2873118628 ding-libs-0.6.1.tar.gz" +sha512sums="335a0925bfa7cc113e86c91ad3f2c8aac12711879d5c9b62660140a4b749335a74024c987fcd2304dd78176362997b3e0ebd745193aaffab7a368e2873118628 ding-libs-0.6.1.tar.gz +e0333f963d32963b863d0d1f78b27d385ee909d1f118586c789814d7d63870dfc206f8cd14aee71ee95fc1a44ce01b88873a9f5b2ea3ccc2f018b1b6a1eca2a5 musl-fixes.patch +f9b1cb90081652d286d1a0bb853c04dbd98a6b39da235bd9eb3c095631033e2d967f8d81e2284bafbf905caadc63873b96a69744939463343c677458d851cef0 path_utils_ut-allow-single-as-well.patch" diff --git a/testing/ding-libs/musl-fixes.patch b/testing/ding-libs/musl-fixes.patch new file mode 100644 index 0000000000..6855a3b86c --- /dev/null +++ b/testing/ding-libs/musl-fixes.patch @@ -0,0 +1,31 @@ +--- ding-libs-0.6.1/ini/ini_validators_ut_check.c ++++ ding-libs-0.6.1-musl/ini/ini_validators_ut_check.c +@@ -606,7 +606,7 @@ + ret = strcmp(errmsg, + "[rule/options_for_foo]: Cannot compile regular expression " + "from option 'section_re'. " +- "Error: 'Unmatched [ or [^'"); ++ "Error: 'Missing ']''"); + fail_unless(ret == 0, "Got msg: [%s]", errmsg); + ini_errobj_next(errobj); + +@@ -1027,7 +1027,7 @@ + errmsg = ini_errobj_get_msg(errobj); + ret = strcmp(errmsg, + "[rule/section_list]: Validator failed to use regex " +- "[^foo\\(*$]:[Unmatched ( or \\(]"); ++ "[^foo\\(*$]:[Missing ')']"); + fail_unless(ret == 0, "Got msg: [%s]", errmsg); + ini_errobj_next(errobj); + +--- ding-libs-0.6.1/path_utils/path_utils.c ++++ ding-libs-0.6.1-musl/path_utils/path_utils.c +@@ -31,7 +31,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include diff --git a/testing/ding-libs/path_utils_ut-allow-single-as-well.patch b/testing/ding-libs/path_utils_ut-allow-single-as-well.patch new file mode 100644 index 0000000000..08cfe09b82 --- /dev/null +++ b/testing/ding-libs/path_utils_ut-allow-single-as-well.patch @@ -0,0 +1,36 @@ +From 4236e323e8ab4f13770e1ac9e94666b304b693fb Mon Sep 17 00:00:00 2001 +From: Henrik Riomar +Date: Tue, 24 Jul 2018 21:59:36 +0000 +Subject: [PATCH] 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 +--- + 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.18.0 + -- cgit v1.2.3