[bug#77765,core-updates] gnu: socat: Update to 1.8.0.3 and enable tests.
Commit Message
* gnu/packages/networking.scm (socat): Update to 1.8.0.3.
[arguments]: Remove #:tests? and add #:test-target, #:make-flags and #:phases.
[native-inputs]: New field.
Change-Id: Ice251af89ce1757aeb17c70debfcf38515fac1e8
---
gnu/packages/networking.scm | 41 +++++++++++++++++++++++++++++++++----
1 file changed, 37 insertions(+), 4 deletions(-)
base-commit: e839cd1108626a6db6c47915f0efa4ab41c6a01c
@@ -26,7 +26,7 @@
;;; Copyright © 2018, 2020-2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018, 2020, 2021, 2022 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2019, 2020, 2021, 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019-2025 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com>
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
@@ -1234,7 +1234,7 @@ (define-public pproxy
(define-public socat
(package
(name "socat")
- (version "1.7.4.4")
+ (version "1.8.0.3")
(source (origin
(method url-fetch)
(uri (string-append
@@ -1242,9 +1242,42 @@ (define-public socat
version ".tar.bz2"))
(sha256
(base32
- "1b40ccdvxq5kaghsbwg4q3dq5aw4acw1bpqvs3v3ljp5y392pm7v"))))
+ "1580dbns45ibs171bx1dz6mkyfj6wichp10yjjkb6nyrc5rh3sq1"))))
(build-system gnu-build-system)
- (arguments '(#:tests? #f)) ; no test suite
+ (arguments
+ (list
+ #:make-flags
+ #~(list (string-append "SHELL="
+ (search-input-file %build-inputs "bin/sh")))
+ #:test-target "test"
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-commands
+ (lambda _
+ (substitute* "test.sh"
+ (("/bin/rm")
+ (which "rm"))
+ (("/usr/bin/env")
+ (which "env"))
+ (("/sbin/ifconfig")
+ (which "ifconfig")))))
+ (add-after 'unpack 'disable-problematic-tests
+ (lambda _
+ ;; Wholly skip tests 418 and 503, which fail
+ ;; non-deterministically.
+ (invoke "sed"
+ "-e" "/NAME=ABSTRACT_USER/{n;s/$TESTS/SKIP/}"
+ "-e" "/NAME=SYSTEM_SIGINT/{n;s/$TESTS/SKIP/}"
+ "-i" "test.sh")
+ (substitute* "Makefile.in"
+ (("./test.sh")
+ (string-append
+ "./test.sh --expect-fail "
+ (string-join
+ '("228,467,468" ;requires /etc/services
+ "478" ;pkill: only one pattern can be provided
+ "528") ;requires tty
+ ",")))))))))
+ (native-inputs (list net-tools procps))
(inputs (list openssl readline))
(home-page "http://www.dest-unreach.org/socat/")
(synopsis