From a8974597cc94b4c4e80b67ac8660c81362a50ae2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Feb 2023 18:42:18 +0100 Subject: gnu: libchop: Fix build and test. * gnu/packages/backup.scm (libchop)[source]: Adjust snippet to work around build error in Gnulib's . [arguments]: Remove 'skip-test' phase and add 'adjust-test' phase. --- gnu/packages/backup.scm | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 10512cc1cd..6815b0e337 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -564,6 +564,13 @@ rsnapshot uses hard links to deduplicate identical files.") (modules '((guix build utils))) (snippet '(begin + ;; Gnulib's refers to 'gets' for the purposes of + ;; warning against its use, but 'gets' is no longer declared + ;; in glibc's . Remove that warning. + (substitute* "lib/stdio.in.h" + (("_GL_WARN_ON_USE \\(gets,.*") + "\n/* 'gets' is gone, rejoice! */\n")) + ;; Include all the libtirpc headers necessary to get the ;; definitions of 'u_int', etc. (substitute* '("src/block-server.c" @@ -572,8 +579,7 @@ rsnapshot uses hard links to deduplicate identical files.") (("#include " _ header) (string-append "#include \n" "#include \n" - "#include \n"))) - #t)))) + "#include \n"))))))) (build-system gnu-build-system) (arguments '(;; Link against libtirpc. @@ -598,12 +604,16 @@ rsnapshot uses hard links to deduplicate identical files.") (string-append (getenv "CPATH") ":" tirpc)) (setenv "CPATH" tirpc))))) - (add-before 'check 'skip-test + (add-before 'check 'adjust-test (lambda _ - ;; XXX: This test fails (1) because current GnuTLS no - ;; longer supports OpenPGP authentication, and (2) for - ;; some obscure reason. Better skip it. - (setenv "XFAIL_TESTS" "utils/block-server")))))) + ;; This test uses a weird construct to spawn + ;; 'chop-block-server' in the background. Replace it + ;; with something that actually works. + (substitute* "tests/utils/block-server" + (("chop_fail_if ! chop-block-server") + "chop-block-server") + (("'&'") + "&"))))))) (native-inputs (list guile-2.0 gperf-3.0 ;see pkg-config rpcsvc-proto)) ;for 'rpcgen' -- cgit v1.2.3