diff --git a/srcpkgs/ctags/patches/0001-sandbox-fix-seccomp-sandbox-with-musl-libc.patch b/srcpkgs/ctags/patches/0001-sandbox-fix-seccomp-sandbox-with-musl-libc.patch new file mode 100644 index 00000000000000..e834827036fbb2 --- /dev/null +++ b/srcpkgs/ctags/patches/0001-sandbox-fix-seccomp-sandbox-with-musl-libc.patch @@ -0,0 +1,46 @@ +From 045528cd43c9d57ab2eafd1523764c60038079f6 Mon Sep 17 00:00:00 2001 +From: Duncan Overbruck +Date: Wed, 22 Jul 2026 00:01:43 +0200 +Subject: [PATCH] sandbox: fix seccomp sandbox with musl libc + +musl uses readv and writev for stdio read and writes, so allow them like +normal read and write. + +musl also checks whether stdout is a tty when writing to stdout, for +that it uses ioctl with TIOCGWINSZ. + +https://git.musl-libc.org/cgit/musl/commit/?id=2de85a985654d2c944931267645d9a0686242dfe +--- + main/seccomp.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/main/seccomp.c b/main/seccomp.c +index d60133d45..f44da3c5a 100644 +--- a/main/seccomp.c ++++ b/main/seccomp.c +@@ -15,6 +15,7 @@ + + #ifdef HAVE_SECCOMP + #include ++#include + + + int installSyscallFilter (void) +@@ -34,7 +35,14 @@ int installSyscallFilter (void) + + // I/O + seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (read), 0); ++ seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (readv), 0); + seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (write), 0); ++ seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (writev), 0); ++ ++ // musl libc uses this to check whether stdout is a tty when writing to it ++ seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (ioctl), 2, ++ SCMP_CMP (0, SCMP_CMP_EQ, 1), // fd == 1 ++ SCMP_CMP (1, SCMP_CMP_EQ, TIOCGWINSZ)); // request == TIOCGWINSZ + + // Clean exit + seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (exit), 0); +-- +2.55.0 + diff --git a/srcpkgs/ctags/patches/disable-check-genfile.patch b/srcpkgs/ctags/patches/disable-check-genfile.patch deleted file mode 100644 index b278430df89a26..00000000000000 --- a/srcpkgs/ctags/patches/disable-check-genfile.patch +++ /dev/null @@ -1,21 +0,0 @@ -from https://gitlab.alpinelinux.org/alpine/aports/-/commit/eac1c6220f1e95f23af11941ce3362494a5ed3a7 - -The check-genfile target only works when run from inside a Git -repository. Since we build ctags from a tagged tarball and not from the -Git repository, invoking `git diff` fails with a usage error and causes -`make check` to fail. - -This should be reported upstream. - -diff -upr a/makefiles/testing.mak b/makefiles/testing.mak ---- a/makefiles/testing.mak 2021-10-02 15:48:41.000000000 +0200 -+++ b/makefiles/testing.mak 2021-10-10 12:07:32.081801888 +0200 -@@ -5,7 +5,7 @@ EXTRA_DIST += misc/units misc/units.py m - EXTRA_DIST += misc/tlib misc/mini-geany.expected - MAN_TEST_TMPDIR = ManTest - --check: tmain units tlib man-test check-genfile -+check: tmain units tlib man-test - - # We may use CLEANFILES, DISTCLEANFILES, or etc. - # clean-tlib and clean-gcov are not included diff --git a/srcpkgs/ctags/template b/srcpkgs/ctags/template index ab2608c3357321..7313bbb599be42 100644 --- a/srcpkgs/ctags/template +++ b/srcpkgs/ctags/template @@ -1,17 +1,17 @@ # Template file for 'ctags' pkgname=ctags -version=5.9.20221002.0 +version=6.2.1 revision=1 build_style=gnu-configure hostmakedepends="pkg-config automake python3-docutils" -makedepends="jansson-devel libseccomp-devel libxml2-devel libyaml-devel - pcre2-devel" +makedepends="jansson-devel libxml2-devel libyaml-devel pcre2-devel libseccomp-devel" short_desc="Generates an index file of language objects found in source files" maintainer="Orphaned " license="GPL-2.0-only" homepage="https://ctags.io/" -distfiles="https://github.com/universal-ctags/ctags/archive/p${version}.tar.gz" -checksum=d2b2b382f8035d4bdfb73a2f6995e85c744bc8121135e0f77060d2429ec459bd +changelog="https://github.com/universal-ctags/ctags/releases" +distfiles="https://github.com/universal-ctags/ctags/archive/refs/tags/v${version}.tar.gz" +checksum=f56829e9a576025e98955597ee967099a871987b3476fbd8dbbc2b9dc921f824 pre_configure() { ./autogen.sh