From b3b0fef6a459288f46a645c9a7e9b58a7bb2e67f Mon Sep 17 00:00:00 2001 From: Skye J Date: Thu, 12 Feb 2026 13:16:28 -0500 Subject: [PATCH 1/3] inetutils: fix darwin builds not working due to warning Co-authored-by: Ryan Hendrickson --- pkgs/by-name/in/inetutils/package.nix | 2 +- .../by-name/in/inetutils/tests-libls.sh.patch | 43 +++++++++++++++++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/in/inetutils/package.nix b/pkgs/by-name/in/inetutils/package.nix index 2a24e641e991..7a96ba52479a 100644 --- a/pkgs/by-name/in/inetutils/package.nix +++ b/pkgs/by-name/in/inetutils/package.nix @@ -10,7 +10,6 @@ libxcrypt, util-linux, }: - stdenv.mkDerivation rec { pname = "inetutils"; version = "2.7"; @@ -78,6 +77,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-servers"; + hardeningDisable = lib.optional stdenv.hostPlatform.isDarwin "format"; doCheck = true; installFlags = [ "SUIDMODE=" ]; diff --git a/pkgs/by-name/in/inetutils/tests-libls.sh.patch b/pkgs/by-name/in/inetutils/tests-libls.sh.patch index d3fc7c68fae5..49925a5a8e4e 100644 --- a/pkgs/by-name/in/inetutils/tests-libls.sh.patch +++ b/pkgs/by-name/in/inetutils/tests-libls.sh.patch @@ -1,12 +1,49 @@ -tests: Remove bogus test for unsorted file listing +tests: Remove bogus test for unsorted file listing and tests for -u and -c, which fail on apfs. Minimized from what Debian applies: https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/local/0006-tests-Remove-bogus-test-for-unsorted-file-listing.patch?id=8ab7f49fe5cf194e989ae6ae6a78eb65397c5778 --- a/tests/libls.sh +++ b/tests/libls.sh -@@ -91,1 +91,0 @@ +@@ -91,7 +91,6 @@ REPLY_a1=`$LS -a1 $LSDIR` + REPLY_A1=`$LS -A1 $LSDIR` + + REPLY_C=`$LS -C $LSDIR` -REPLY_Cf=`$LS -Cf $LSDIR` -@@ -130,3 +129,0 @@ + REPLY_Cr=`$LS -Cr $LSDIR` + REPLY_Ct=`$LS -Ct $LSDIR` + REPLY_x=`$LS -x $LSDIR` +@@ -101,13 +100,6 @@ REPLY_l=`$LS -l $LSDIR` + REPLY_lT=`$LS -l $LSDIR` + REPLY_n=`$LS -n $LSDIR` + +-# In an attempt to counteract lack of subsecond accuracy, +-# probe the parent directory where timing is known to be more +-# varied, than in the subdirectory "tests/". +-# +-REPLY_Ccts=`$LS -Ccts $LSDIR` +-REPLY_Cuts=`$LS -Cuts $LSDIR` +- + # All the following failure causes are checked and possibly + # brought to attention, independently of the other instances. + # +@@ -130,9 +122,6 @@ test `echo "$diff" | $GREP -c -v '^[.]\{1,2\}$'` -eq 0 || + fi + } + -test x"$REPLY_C" != x"$REPLY_Cf" || - { errno=1; echo >&2 'Failed to disable sorting with "-f".'; } - + test x"$REPLY_C" != x"$REPLY_Cr" || + { errno=1; echo >&2 'Failed to reverse sorting with "-r".'; } + +@@ -150,9 +139,6 @@ test x"$REPLY_l" != x"$REPLY_n" || + { id -u && ! id -u -n ;} || + { errno=1; echo >&2 'Failed to distinguish "-l" from "-n".'; } + +-test x"$REPLY_Ccts" != x"$REPLY_Cuts" || +- { errno=1; echo >&2 'Failed to distinguish "-u" from "-c".'; } +- + test $errno -ne 0 || $silence echo "Successful testing". + + exit $errno + From 729a807f194c2133aa149867b0632b204a326182 Mon Sep 17 00:00:00 2001 From: Skye J Date: Mon, 16 Feb 2026 14:27:20 -0500 Subject: [PATCH 2/3] inetutils: Remove context from libls.sh patch --- .../by-name/in/inetutils/tests-libls.sh.patch | 39 ++----------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/pkgs/by-name/in/inetutils/tests-libls.sh.patch b/pkgs/by-name/in/inetutils/tests-libls.sh.patch index 49925a5a8e4e..41c566811cac 100644 --- a/pkgs/by-name/in/inetutils/tests-libls.sh.patch +++ b/pkgs/by-name/in/inetutils/tests-libls.sh.patch @@ -4,46 +4,15 @@ Minimized from what Debian applies: https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/local/0006-tests-Remove-bogus-test-for-unsorted-file-listing.patch?id=8ab7f49fe5cf194e989ae6ae6a78eb65397c5778 --- a/tests/libls.sh +++ b/tests/libls.sh -@@ -91,7 +91,6 @@ REPLY_a1=`$LS -a1 $LSDIR` - REPLY_A1=`$LS -A1 $LSDIR` - - REPLY_C=`$LS -C $LSDIR` +@@ -94 +93,0 @@ REPLY_C=`$LS -C $LSDIR` -REPLY_Cf=`$LS -Cf $LSDIR` - REPLY_Cr=`$LS -Cr $LSDIR` - REPLY_Ct=`$LS -Ct $LSDIR` - REPLY_x=`$LS -x $LSDIR` -@@ -101,13 +100,6 @@ REPLY_l=`$LS -l $LSDIR` - REPLY_lT=`$LS -l $LSDIR` - REPLY_n=`$LS -n $LSDIR` - --# In an attempt to counteract lack of subsecond accuracy, --# probe the parent directory where timing is known to be more --# varied, than in the subdirectory "tests/". --# +@@ -108,2 +106,0 @@ REPLY_n=`$LS -n $LSDIR` -REPLY_Ccts=`$LS -Ccts $LSDIR` -REPLY_Cuts=`$LS -Cuts $LSDIR` -- - # All the following failure causes are checked and possibly - # brought to attention, independently of the other instances. - # -@@ -130,9 +122,6 @@ test `echo "$diff" | $GREP -c -v '^[.]\{1,2\}$'` -eq 0 || - fi - } - +@@ -133,2 +129,0 @@ test `echo "$diff" | $GREP -c -v '^[.]\{1,2\}$'` -eq 0 || -test x"$REPLY_C" != x"$REPLY_Cf" || - { errno=1; echo >&2 'Failed to disable sorting with "-f".'; } -- - test x"$REPLY_C" != x"$REPLY_Cr" || - { errno=1; echo >&2 'Failed to reverse sorting with "-r".'; } - -@@ -150,9 +139,6 @@ test x"$REPLY_l" != x"$REPLY_n" || - { id -u && ! id -u -n ;} || - { errno=1; echo >&2 'Failed to distinguish "-l" from "-n".'; } - +@@ -153,3 +146,0 @@ test x"$REPLY_l" != x"$REPLY_n" || -test x"$REPLY_Ccts" != x"$REPLY_Cuts" || - { errno=1; echo >&2 'Failed to distinguish "-u" from "-c".'; } - - test $errno -ne 0 || $silence echo "Successful testing". - - exit $errno - From 7940c44603fdd8f78a3e16dffbf140731c120cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 16 Feb 2026 21:49:15 +0100 Subject: [PATCH 3/3] inetutils: avoid rebuild on linux for now --- pkgs/by-name/in/inetutils/package.nix | 5 +++-- .../in/inetutils/tests-libls-2.sh.patch | 18 ++++++++++++++++++ pkgs/by-name/in/inetutils/tests-libls.sh.patch | 12 +++--------- 3 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 pkgs/by-name/in/inetutils/tests-libls-2.sh.patch diff --git a/pkgs/by-name/in/inetutils/package.nix b/pkgs/by-name/in/inetutils/package.nix index 7a96ba52479a..07f2c3d67e26 100644 --- a/pkgs/by-name/in/inetutils/package.nix +++ b/pkgs/by-name/in/inetutils/package.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { # https://git.congatec.com/yocto/meta-openembedded/commit/3402bfac6b595c622e4590a8ff5eaaa854e2a2a3 ./inetutils-1_9-PATH_PROCNET_DEV.patch - ./tests-libls.sh.patch + (if stdenv.isDarwin then ./tests-libls-2.sh.patch else ./tests-libls.sh.patch) (fetchpatch { name = "CVE-2026-24061_1.patch"; @@ -77,7 +77,8 @@ stdenv.mkDerivation rec { ] ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-servers"; - hardeningDisable = lib.optional stdenv.hostPlatform.isDarwin "format"; + ${if stdenv.isDarwin then "hardeningDisable" else null} = [ "format" ]; + doCheck = true; installFlags = [ "SUIDMODE=" ]; diff --git a/pkgs/by-name/in/inetutils/tests-libls-2.sh.patch b/pkgs/by-name/in/inetutils/tests-libls-2.sh.patch new file mode 100644 index 000000000000..41c566811cac --- /dev/null +++ b/pkgs/by-name/in/inetutils/tests-libls-2.sh.patch @@ -0,0 +1,18 @@ +tests: Remove bogus test for unsorted file listing and tests for -u and -c, which fail on apfs. + +Minimized from what Debian applies: +https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/local/0006-tests-Remove-bogus-test-for-unsorted-file-listing.patch?id=8ab7f49fe5cf194e989ae6ae6a78eb65397c5778 +--- a/tests/libls.sh ++++ b/tests/libls.sh +@@ -94 +93,0 @@ REPLY_C=`$LS -C $LSDIR` +-REPLY_Cf=`$LS -Cf $LSDIR` +@@ -108,2 +106,0 @@ REPLY_n=`$LS -n $LSDIR` +-REPLY_Ccts=`$LS -Ccts $LSDIR` +-REPLY_Cuts=`$LS -Cuts $LSDIR` +@@ -133,2 +129,0 @@ test `echo "$diff" | $GREP -c -v '^[.]\{1,2\}$'` -eq 0 || +-test x"$REPLY_C" != x"$REPLY_Cf" || +- { errno=1; echo >&2 'Failed to disable sorting with "-f".'; } +@@ -153,3 +146,0 @@ test x"$REPLY_l" != x"$REPLY_n" || +-test x"$REPLY_Ccts" != x"$REPLY_Cuts" || +- { errno=1; echo >&2 'Failed to distinguish "-u" from "-c".'; } +- diff --git a/pkgs/by-name/in/inetutils/tests-libls.sh.patch b/pkgs/by-name/in/inetutils/tests-libls.sh.patch index 41c566811cac..d3fc7c68fae5 100644 --- a/pkgs/by-name/in/inetutils/tests-libls.sh.patch +++ b/pkgs/by-name/in/inetutils/tests-libls.sh.patch @@ -1,18 +1,12 @@ -tests: Remove bogus test for unsorted file listing and tests for -u and -c, which fail on apfs. +tests: Remove bogus test for unsorted file listing Minimized from what Debian applies: https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/local/0006-tests-Remove-bogus-test-for-unsorted-file-listing.patch?id=8ab7f49fe5cf194e989ae6ae6a78eb65397c5778 --- a/tests/libls.sh +++ b/tests/libls.sh -@@ -94 +93,0 @@ REPLY_C=`$LS -C $LSDIR` +@@ -91,1 +91,0 @@ -REPLY_Cf=`$LS -Cf $LSDIR` -@@ -108,2 +106,0 @@ REPLY_n=`$LS -n $LSDIR` --REPLY_Ccts=`$LS -Ccts $LSDIR` --REPLY_Cuts=`$LS -Cuts $LSDIR` -@@ -133,2 +129,0 @@ test `echo "$diff" | $GREP -c -v '^[.]\{1,2\}$'` -eq 0 || +@@ -130,3 +129,0 @@ -test x"$REPLY_C" != x"$REPLY_Cf" || - { errno=1; echo >&2 'Failed to disable sorting with "-f".'; } -@@ -153,3 +146,0 @@ test x"$REPLY_l" != x"$REPLY_n" || --test x"$REPLY_Ccts" != x"$REPLY_Cuts" || -- { errno=1; echo >&2 'Failed to distinguish "-u" from "-c".'; } -