summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Elsing <david.elsing@posteo.net>2025-07-16 21:26:45 +0200
committerAndreas Enge <andreas@enge.fr>2025-07-17 22:21:16 +0200
commit2d3e9ad5e344eb91dbef1560e6c0265f43f38448 (patch)
tree366573e4aba5bae3f4a68692fb4cb356f5050e41
parent8e6be6e823e530826a3433781fcfedbb82829cac (diff)
gnu: strace: Update to 6.15.
Also switch to the Git source because the tarball contains autogenerated files and enable libunwind support. Fixes guix/guix#1248. * gnu/packages/linux.scm (strace): Update to 6.15. [source]: Switch to git-fetch. [inputs]: New field. [native-input]: Add autoconf, automake, m4 and util-linux. * gnu/packages/patches/strace-readlink-tests.patch: Adjust patch. [properties]: Remove field. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/linux.scm74
-rw-r--r--gnu/packages/patches/strace-readlink-tests.patch22
2 files changed, 40 insertions, 56 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 18c4ea0c74..74ca0db312 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -3420,46 +3420,52 @@ Zerofree requires the file system to be unmounted or mounted read-only.")
(define-public strace
(package
(name "strace")
- (version "6.4")
- (home-page "https://strace.io")
- (source (origin
- (method url-fetch)
- (uri (string-append home-page "/files/" version
- "/strace-" version ".tar.xz"))
- (sha256
- (base32
- "0f4jxgsdr76mf51kv2kwhv39ap7kilrchkfvqrhd5pvzqnx7v617"))
- (patches (search-patches "strace-readlink-tests.patch"))))
+ (version "6.15")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/strace/strace")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1a4xq7lji9iazrjdm0anqg2xgkypl3a9pjcm9j71s9q84ggjgwqm"))
+ (patches (search-patches "strace-readlink-tests.patch"))))
(build-system gnu-build-system)
(arguments
- '(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-/bin/sh
- (lambda _
- (substitute* "src/strace.c"
- (("/bin/sh") (which "sh")))))
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (substitute* "tests/Makefile.in"
- ;; XXX: These hang forever even if the test time-out is
- ;; extended.
- (("^\tstrace-DD?D?\\.test \\\\.*") "")
- (("^\tpidns-cache.test \\\\.*") "")
- (("^\t.*--pidns-translation.test \\\\.*") "")
- ;; This one fails with an encoding error.
- (("^\t.*net-yy-unix.test \\\\.*") "")))))
- ;; Don't fail if the architecture doesn't support different
- ;; personalities.
- #:configure-flags '("--enable-mpers=check")
- ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
- #:parallel-tests? #f)) ; undeterministic failures
- (native-inputs (list perl))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Needed for the 'bootstrap phase.
+ (add-after 'unpack 'patch-source-shebangs-initial
+ (assoc-ref %standard-phases 'patch-source-shebangs))
+ (add-after 'unpack 'patch-test-shebangs
+ (lambda _
+ (substitute* '("tests/detach-vfork.test"
+ "tests/gen_tests.sh"
+ "tests/kill-on-exit.sh")
+ (("#!/bin/sh")
+ (string-append "#!" (which "sh")))))))
+ #:configure-flags
+ ''("--with-libunwind"
+ ;; Don't fail if the architecture doesn't support different
+ ;; personalities.
+ "--enable-mpers=check")
+ ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
+ #:parallel-tests? #f)) ; undeterministic failures
+ (inputs (list libunwind))
+ (native-inputs
+ (list autoconf
+ automake
+ perl
+ m4
+ ;; For some tests
+ util-linux))
+ (home-page "https://strace.io")
(synopsis "System call tracer for Linux")
(description
"strace is a system call tracer, i.e. a debugging tool which prints out a
trace of all the system calls made by a another process/program.")
- (properties
- '((release-monitoring-url . "https://github.com/strace/strace/releases")))
(license license:lgpl2.1+)))
(define-public ltrace
diff --git a/gnu/packages/patches/strace-readlink-tests.patch b/gnu/packages/patches/strace-readlink-tests.patch
index dd5ee98703..9828dd2f4c 100644
--- a/gnu/packages/patches/strace-readlink-tests.patch
+++ b/gnu/packages/patches/strace-readlink-tests.patch
@@ -22,25 +22,3 @@ index 8b4e2e9..cc3ca63 100644
reboot -s 256
recv-MSG_TRUNC -a26 -e trace=recv
recvfrom -a35
-diff --git a/tests/readlink.gen.test b/tests/readlink.gen.test
-index 4263234..418691b 100755
---- a/tests/readlink.gen.test
-+++ b/tests/readlink.gen.test
-@@ -1,4 +1,4 @@
- #!/bin/sh -efu
--# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlink -xx ); do not edit.
-+# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlink -xx --trace-path=test.readlink.link); do not edit.
- . "${srcdir=.}/init.sh"
--run_strace_match_diff -xx
-+run_strace_match_diff -xx --trace-path=test.readlink.link
-diff --git a/tests/readlinkat.gen.test b/tests/readlinkat.gen.test
-index d7de993..a48d590 100755
---- a/tests/readlinkat.gen.test
-+++ b/tests/readlinkat.gen.test
-@@ -1,4 +1,4 @@
- #!/bin/sh -efu
--# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlinkat -xx ); do not edit.
-+# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlinkat -xx --trace-path=test.readlinkat.link); do not edit.
- . "${srcdir=.}/init.sh"
--run_strace_match_diff -xx
-+run_strace_match_diff -xx --trace-path=test.readlinkat.link