diff options
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/lsof.scm | 4 | ||||
-rw-r--r-- | gnu/packages/patches/lsof-fatal-test-failures.patch | 58 |
3 files changed, 62 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index f0a5560b8f..f105f559f7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1313,6 +1313,7 @@ dist_patch_DATA = \ %D%/packages/patches/lrcalc-includes.patch \ %D%/packages/patches/lrzip-CVE-2017-8842.patch \ %D%/packages/patches/lsh-fix-x11-forwarding.patch \ + %D%/packages/patches/lsof-fatal-test-failures.patch \ %D%/packages/patches/lua-CVE-2014-5461.patch \ %D%/packages/patches/lua-pkgconfig.patch \ %D%/packages/patches/lua51-liblua-so.patch \ diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm index 0421ca7e9d..77d93e99c7 100644 --- a/gnu/packages/lsof.scm +++ b/gnu/packages/lsof.scm @@ -24,6 +24,7 @@ #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (gnu packages) #:use-module (gnu packages groff) #:use-module (gnu packages perl)) @@ -39,7 +40,8 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp")))) + (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp")) + (patches (search-patches "lsof-fatal-test-failures.patch")))) (build-system gnu-build-system) (native-inputs `(("groff" ,groff) ; for soelim diff --git a/gnu/packages/patches/lsof-fatal-test-failures.patch b/gnu/packages/patches/lsof-fatal-test-failures.patch new file mode 100644 index 0000000000..e874ba6ad4 --- /dev/null +++ b/gnu/packages/patches/lsof-fatal-test-failures.patch @@ -0,0 +1,58 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Mon, 23 Nov 2020 05:36:53 +0100 +Subject: [PATCH] gnu: lsof: Make test failures fatal. + +Submitted upstream[0]. + +[0]: https://github.com/lsof-org/lsof/pull/144 + +diff --git a/tests/Makefile b/tests/Makefile +index 08574a0..2923bb8 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -27,7 +27,7 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC + exit 1 ;\ + fi + @rm -f config.LT* +- -@err=0; \ ++ @err=0; \ + echo ""; \ + echo "Basic test:"; \ + ./${BASTST}; \ +@@ -54,8 +54,11 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC + echo "Suggestion: try the optional tests: \"make opt\""; \ + echo ""; \ + fi; \ +- fi; +- @rm -f config.LT* ++ fi; \ ++ rm -f config.LT*; \ ++ if [ $$err -ne 0 ]; then \ ++ exit 1; \ ++ fi + + auto: ckDB silent FRC + +@@ -112,7 +115,7 @@ LTunix: LTunix.c ${CONFIG} ${LIBOBJ} ${HDR} config.ldflags + + opt: ${CKTSTDB} ${OPTTST} FRC + @rm -f config.LT* +- -@err=0; \ ++ @err=0; \ + echo ""; \ + echo "Optional tests:"; \ + for i in ${OPTTST}; do \ +@@ -126,8 +129,11 @@ opt: ${CKTSTDB} ${OPTTST} FRC + else \ + echo "All optional tests succeeded."; \ + fi; \ +- echo ""; +- @rm -f config.LT* ++ echo ""; \ ++ rm -f config.LT*; \ ++ if [ $$err -ne 0 ]; then \ ++ exit 1; \ ++ fi + + optional: opt + |