Commit b9ac1c6d authored by Henrik Riomar's avatar Henrik Riomar

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
parent ce06ce31
......@@ -2,18 +2,21 @@
# Maintainer: Vince Mele <vmele@inoc.com>
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"
--- 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 <stdlib.h>
#include <unistd.h>
#include <dirent.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/stat.h>
#include <libgen.h>
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] 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.18.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment