push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,107 @@
{
lib,
stdenv,
fetchpatch,
fetchurl,
updateAutotoolsGnuConfigScriptsHook,
perl,
libiconv,
zlib,
popt,
enableACLs ? lib.meta.availableOn stdenv.hostPlatform acl,
acl,
enableLZ4 ? true,
lz4,
enableOpenSSL ? true,
openssl,
enableXXHash ? true,
xxHash,
enableZstd ? true,
zstd,
nixosTests,
fakeroot,
}:
stdenv.mkDerivation rec {
pname = "rsync";
version = "3.4.1";
src = fetchurl {
# signed with key 9FEF 112D CE19 A0DC 7E88 2CB8 1BB2 4997 A853 5F6F
url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
hash = "sha256-KSS8s6Hti1UfwQH3QLnw/gogKxFQJ2R89phQ1l/YjFI=";
};
patches = [
# See: <https://github.com/RsyncProject/rsync/pull/790>
./fix-tests-in-darwin-sandbox.patch
# fix compilation with gcc15
(fetchpatch {
url = "https://github.com/RsyncProject/rsync/commit/a4b926dcdce96b0f2cc0dc7744e95747b233500a.patch";
hash = "sha256-UiEQJ+p2gtIDYNJqnxx4qKgItKIZzCpkHnvsgoxBmSE=";
})
];
nativeBuildInputs = [
updateAutotoolsGnuConfigScriptsHook
perl
];
buildInputs = [
libiconv
zlib
popt
]
++ lib.optional enableACLs acl
++ lib.optional enableZstd zstd
++ lib.optional enableLZ4 lz4
++ lib.optional enableOpenSSL openssl
++ lib.optional enableXXHash xxHash;
# fakeroot doesn't work well on darwin anymore, apparently
checkInputs = lib.optionals (!stdenv.isDarwin) [ fakeroot ];
configureFlags = [
(lib.enableFeature enableLZ4 "lz4")
(lib.enableFeature enableOpenSSL "openssl")
(lib.enableFeature enableXXHash "xxhash")
(lib.enableFeature enableZstd "zstd")
# Feature detection does a runtime check which varies according to ipv6
# availability, so force it on to make reproducible, see #360152.
(lib.enableFeature true "ipv6")
"--with-nobody-group=nogroup"
# disable the included zlib explicitly as it otherwise still compiles and
# links them even.
"--with-included-zlib=no"
]
++ lib.optionals (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_64) [
# fix `multiversioning needs 'ifunc' which is not supported on this target` error
"--disable-roll-simd"
];
enableParallelBuilding = true;
passthru.tests = { inherit (nixosTests) rsyncd; };
doCheck = true;
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Fast incremental file transfer utility";
homepage = "https://rsync.samba.org/";
license = licenses.gpl3Plus;
mainProgram = "rsync";
maintainers = with lib.maintainers; [
kampfschlaefer
ivan
];
platforms = platforms.unix;
identifiers.cpeParts = {
vendor = "samba";
inherit version;
update = "-";
};
};
}

View File

@@ -0,0 +1,56 @@
From 9b104ed9859f17b6ed4c4ad01806c75a0c197dd7 Mon Sep 17 00:00:00 2001
From: Emily <hello@emily.moe>
Date: Tue, 5 Aug 2025 15:55:24 +0100
Subject: [PATCH] Allow `ls(1)` to fail in test setup
This can happen when the tests are unable to `stat(2)` some files in
`/etc`, `/bin`, or `/`, due to Unix permissions or other sandboxing. We
still guard against serious errors, which use exit code 2.
---
testsuite/longdir.test | 4 ++--
testsuite/rsync.fns | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/testsuite/longdir.test b/testsuite/longdir.test
index 8d66bb5f..26747292 100644
--- a/testsuite/longdir.test
+++ b/testsuite/longdir.test
@@ -16,9 +16,9 @@ makepath "$longdir" || test_skipped "unable to create long directory"
touch "$longdir/1" || test_skipped "unable to create files in long directory"
date > "$longdir/1"
if [ -r /etc ]; then
- ls -la /etc >"$longdir/2"
+ ls -la /etc >"$longdir/2" || [ $? -eq 1 ]
else
- ls -la / >"$longdir/2"
+ ls -la / >"$longdir/2" || [ $? -eq 1 ]
fi
checkit "$RSYNC --delete -avH '$fromdir/' '$todir'" "$fromdir/" "$todir"
diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
index 2ab97b69..f7da363f 100644
--- a/testsuite/rsync.fns
+++ b/testsuite/rsync.fns
@@ -195,15 +195,15 @@ hands_setup() {
echo some data > "$fromdir/dir/subdir/foobar.baz"
mkdir "$fromdir/dir/subdir/subsubdir"
if [ -r /etc ]; then
- ls -ltr /etc > "$fromdir/dir/subdir/subsubdir/etc-ltr-list"
+ ls -ltr /etc > "$fromdir/dir/subdir/subsubdir/etc-ltr-list" || [ $? -eq 1 ]
else
- ls -ltr / > "$fromdir/dir/subdir/subsubdir/etc-ltr-list"
+ ls -ltr / > "$fromdir/dir/subdir/subsubdir/etc-ltr-list" || [ $? -eq 1 ]
fi
mkdir "$fromdir/dir/subdir/subsubdir2"
if [ -r /bin ]; then
- ls -lt /bin > "$fromdir/dir/subdir/subsubdir2/bin-lt-list"
+ ls -lt /bin > "$fromdir/dir/subdir/subsubdir2/bin-lt-list" || [ $? -eq 1 ]
else
- ls -lt / > "$fromdir/dir/subdir/subsubdir2/bin-lt-list"
+ ls -lt / > "$fromdir/dir/subdir/subsubdir2/bin-lt-list" || [ $? -eq 1 ]
fi
# echo testing head:
--
2.50.1

View File

@@ -0,0 +1,36 @@
{
stdenv,
python3,
rsync,
}:
stdenv.mkDerivation {
pname = "rrsync";
inherit (rsync) version src;
buildInputs = [
rsync
(python3.withPackages (pythonPackages: with pythonPackages; [ braceexpand ]))
];
# Skip configure and build phases.
# We just want something from the support directory
dontConfigure = true;
dontBuild = true;
inherit (rsync) patches;
postPatch = ''
substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
'';
installPhase = ''
mkdir -p $out/bin
cp support/rrsync $out/bin
chmod a+x $out/bin/rrsync
'';
meta = rsync.meta // {
description = "Helper to run rsync-only environments from ssh-logins";
mainProgram = "rrsync";
};
}