aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-07-25 01:40:47 +0900
committerOphestra <cat@gensokyo.uk>2026-07-25 01:40:47 +0900
commitb647170d0ccb4652dab914f641d21110581d7d12 (patch)
treeaf6967ed693d2c3893d50f1248331c4c628b6a87 /internal
parent5e655a0bf6eb8234ee57eec08e1b3ecf089b7606 (diff)
internal/rosa/package/strace: build from git sources
This removes xz input. This change also enables tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/package/strace.az38
-rw-r--r--internal/rosa/package/strace/package.az35
-rw-r--r--internal/rosa/package/strace/skip-broken-tests.patch26
-rw-r--r--internal/rosa/package/strace/tests-musl.patch65
4 files changed, 126 insertions, 38 deletions
diff --git a/internal/rosa/package/strace.az b/internal/rosa/package/strace.az
deleted file mode 100644
index 6266483a..00000000
--- a/internal/rosa/package/strace.az
+++ /dev/null
@@ -1,38 +0,0 @@
-package strace {
- description = "a diagnostic, debugging and instructional userspace utility";
- website = "https://strace.io";
- anitya = 4897;
-
- version# = "7.1";
- source = remoteFile {
- url = "https://strace.io/files/"+version+"/strace-"+version+".tar.xz";
- checksum = "PR-JLYgVLyzRqRCFi2yvfip_LRP_Cksd04d7H2oAx820qt_H-vj7rbW5xyzdMTat";
- };
-
- early = `
-sed -i 's/off64_t/off_t/g' \
- tests/readahead.c \
- tests/sync_file_range.c \
- tests/sync_file_range2.c
-sed -i 's/unsigned int msg_len;$/uint32_t msg_len;/g' \
- tests/nlattr.c
-`;
-
- exec = make {
- configure = {
- // tests broken on clang
- "disable-gcc-Werror";
-
- "enable-mpers": "no";
- };
-
- // does not compile on musl
- skipCheck = true;
- };
-
- inputs = [
- xz,
-
- kernel-headers,
- ];
-}
diff --git a/internal/rosa/package/strace/package.az b/internal/rosa/package/strace/package.az
new file mode 100644
index 00000000..9bbf279e
--- /dev/null
+++ b/internal/rosa/package/strace/package.az
@@ -0,0 +1,35 @@
+package strace {
+ description = "a diagnostic, debugging and instructional userspace utility";
+ website = "https://strace.io";
+ anitya = 4897;
+
+ version# = "7.1";
+ source = remoteGit {
+ url = "https://github.com/strace/strace.git";
+ tag = "v"+version;
+ checksum = "vGwgAAi_mGsoICDYHK9Vhbn2hBR0JIoUEkCKhLA2JHFg8NFvGsYEWGIafdnsN0_v";
+ };
+ patches = [
+ "tests-musl.patch",
+ "skip-broken-tests.patch",
+ ];
+
+ exec = make {
+ generate = "tee .version .tarball-version <<< '"+version+"' > /dev/null && "+
+ "./bootstrap";
+ configure = {
+ // tests broken on clang
+ "disable-gcc-Werror";
+
+ "enable-mpers": "no";
+ };
+ };
+
+ inputs = [
+ bash,
+ gawk,
+ automake,
+
+ kernel-headers,
+ ];
+}
diff --git a/internal/rosa/package/strace/skip-broken-tests.patch b/internal/rosa/package/strace/skip-broken-tests.patch
new file mode 100644
index 00000000..ce74b0e2
--- /dev/null
+++ b/internal/rosa/package/strace/skip-broken-tests.patch
@@ -0,0 +1,26 @@
+diff --git a/tests/attach-p-eperm-already-traced.test b/tests/attach-p-eperm-already-traced.test
+index 54428c539..a0fa049c4 100755
+--- a/tests/attach-p-eperm-already-traced.test
++++ b/tests/attach-p-eperm-already-traced.test
+@@ -10,6 +10,8 @@
+
+ . "${srcdir=.}/init.sh"
+
++skip_ "broken test"
++
+ $STRACE -q --trace=none --signal=none -- \
+ sh -c "echo \$\$; sleep $TIMEOUT_DURATION" > "$OUT" 2>/dev/null &
+ tracer_pid=$!
+diff --git a/tests/int_0x80.c b/tests/int_0x80.c
+index d46e51584..f0cb88b0f 100644
+--- a/tests/int_0x80.c
++++ b/tests/int_0x80.c
+@@ -9,7 +9,7 @@
+
+ #include "tests.h"
+
+-#if defined __x86_64__ || defined __i386__
++#if 0
+
+ # include <stdio.h>
+ # include <unistd.h>
diff --git a/internal/rosa/package/strace/tests-musl.patch b/internal/rosa/package/strace/tests-musl.patch
new file mode 100644
index 00000000..2ca7c633
--- /dev/null
+++ b/internal/rosa/package/strace/tests-musl.patch
@@ -0,0 +1,65 @@
+diff --git a/tests/nlattr.c b/tests/nlattr.c
+index 7e47f4e8f..3eb9c53da 100644
+--- a/tests/nlattr.c
++++ b/tests/nlattr.c
+@@ -43,7 +43,7 @@ test_nlattr(const int fd)
+ };
+ struct msg *msg;
+ struct nlattr *nla;
+- unsigned int msg_len;
++ uint32_t msg_len;
+ long rc;
+
+ /* fetch fail: len < sizeof(struct nlattr) */
+@@ -250,7 +250,7 @@ test_nla_type(const int fd)
+ };
+ struct msg *msg;
+ struct nlattr *nla;
+- unsigned int msg_len;
++ uint32_t msg_len;
+ long rc;
+
+ msg_len = NLMSG_SPACE(sizeof(msg->udm)) + sizeof(*nla);
+diff --git a/tests/readahead.c b/tests/readahead.c
+index 10723785c..b9597e697 100644
+--- a/tests/readahead.c
++++ b/tests/readahead.c
+@@ -42,7 +42,7 @@ static const int fds[] = {
+ 0x7fffffff,
+ };
+
+-static const off64_t offsets[] = {
++static const off_t offsets[] = {
+ -0x8000000000000000LL,
+ -0x5060708090a0b0c0LL,
+ -1LL,
+diff --git a/tests/sync_file_range.c b/tests/sync_file_range.c
+index e93ab6cf0..dc76865af 100644
+--- a/tests/sync_file_range.c
++++ b/tests/sync_file_range.c
+@@ -20,8 +20,8 @@ int
+ main(void)
+ {
+ const int fd = -1;
+- const off64_t offset = 0xdeadbeefbadc0dedULL;
+- const off64_t nbytes = 0xfacefeedcafef00dULL;
++ const off_t offset = 0xdeadbeefbadc0dedULL;
++ const off_t nbytes = 0xfacefeedcafef00dULL;
+ const unsigned int flags = -1;
+
+ int rc = sync_file_range(fd, offset, nbytes, flags);
+diff --git a/tests/sync_file_range2.c b/tests/sync_file_range2.c
+index b8dc71219..e4b003c4d 100644
+--- a/tests/sync_file_range2.c
++++ b/tests/sync_file_range2.c
+@@ -20,8 +20,8 @@ int
+ main(void)
+ {
+ const int fd = -1;
+- const off64_t offset = 0xdeadbeefbadc0ded;
+- const off64_t nbytes = 0xfacefeedcafef00d;
++ const off_t offset = 0xdeadbeefbadc0ded;
++ const off_t nbytes = 0xfacefeedcafef00d;
+ const unsigned int flags = -1;
+
+ int rc = sync_file_range(fd, offset, nbytes, flags);