Merge remote-tracking branch 'origin/staging-next' into staging

This commit is contained in:
K900
2025-01-15 10:54:04 +03:00
95 changed files with 2679 additions and 704 deletions
-6
View File
@@ -395,12 +395,6 @@ pkgs/by-name/fo/forgejo/ @adamcstephens @bendlas @emilylange
/pkgs/development/compilers/ocaml @ulrikstrid
/pkgs/development/ocaml-modules @ulrikstrid
# ZFS
pkgs/os-specific/linux/zfs/2_1.nix @raitobezarius
pkgs/os-specific/linux/zfs/generic.nix @raitobezarius
nixos/modules/tasks/filesystems/zfs.nix @raitobezarius
nixos/tests/zfs.nix @raitobezarius
# Zig
/pkgs/development/compilers/zig @figsoda
/doc/hooks/zig.section.md @figsoda
@@ -6,11 +6,13 @@ It uses Linux' namespaces feature to create temporary lightweight environments w
Accepted arguments are:
- `name`
The name of the environment, and the wrapper executable if `pname` is unset.
The name of the environment.
- `pname`
The pname of the environment and the wrapper executable.
The pname of the environment.
- `version`
The version of the environment.
- `executableName`
The name of the wrapper executable. Defaults to `pname` if set, or `name` otherwise.
- `targetPkgs`
Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
- `multiPkgs`
+6
View File
@@ -19461,6 +19461,12 @@
githubId = 807447;
name = "Robert Scott";
};
Rishik-Y = {
name = "Rishik Yalamanchili";
email = "202301258@daiict.ac.in";
github = "Rishik-Y";
githubId = 73787402;
};
risson = {
name = "Marc Schmitt";
email = "marc.schmitt@risson.space";
+3
View File
@@ -84,6 +84,9 @@ Reviewing process:
- Ensure that the introduced options are correct.
- Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
- Description, default and example should be provided.
- Defaults may only be omitted if both:
1. The user is required to set the default in order to properly use the service.
2. The lack of a default does not break evaluation when the module is not enabled.
- Ensure that module `meta` field is present
- Maintainers should be declared in `meta.maintainers`.
- Module documentation should be declared with `meta.doc`.
+6
View File
@@ -1,3 +1,5 @@
# Tests: ./tests.nix
/**
Generates documentation for [nix modules](https://nix.dev/tutorials/module-system/index.html).
@@ -193,12 +195,16 @@ rec {
optionsCommonMark =
pkgs.runCommand "options.md"
{
__structuredAttrs = true;
nativeBuildInputs = [ pkgs.nixos-render-docs ];
# For overriding
extraArgs = [ ];
}
''
nixos-render-docs -j $NIX_BUILD_CORES options commonmark \
--manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \
--revision ${lib.escapeShellArg revision} \
''${extraArgs[@]} \
${optionsJSON}/share/doc/nixos/options.json \
$out
'';
+59
View File
@@ -0,0 +1,59 @@
# Run tests: nix-build -A tests.nixosOptionsDoc
{
lib,
nixosOptionsDoc,
runCommand,
}:
let
inherit (lib) mkOption types;
eval = lib.evalModules {
modules = [
{
options.foo.bar.enable = mkOption {
type = types.bool;
default = false;
description = ''
Enable the foo bar feature.
'';
};
}
];
};
doc = nixosOptionsDoc {
inherit (eval) options;
};
in
{
/**
Test that
- the `nixosOptionsDoc` function can be invoked
- integration of the module system and `nixosOptionsDoc` (limited coverage)
The more interesting tests happen in the `nixos-render-docs` package.
*/
commonMark =
runCommand "test-nixosOptionsDoc-commonMark"
{
commonMarkDefault = doc.optionsCommonMark;
commonMarkAnchors = doc.optionsCommonMark.overrideAttrs {
extraArgs = [
"--anchor-prefix"
"my-opt-"
"--anchor-style"
"legacy"
];
};
}
''
env | grep ^commonMark | sed -e 's/=/ = /'
(
set -x
grep -F 'foo\.bar\.enable' $commonMarkDefault >/dev/null
grep -F '{#my-opt-foo.bar.enable}' $commonMarkAnchors >/dev/null
)
touch $out
'';
}
+4 -5
View File
@@ -191,14 +191,13 @@ let
in {
# maintainer: @raitobezarius
series_2_1 = makeZfsTest {
zfsPackage = pkgs.zfs_2_1;
series_2_2 = makeZfsTest {
zfsPackage = pkgs.zfs_2_2;
kernelPackages = pkgs.linuxPackages;
};
series_2_2 = makeZfsTest {
zfsPackage = pkgs.zfs_2_2;
series_2_3 = makeZfsTest {
zfsPackage = pkgs.zfs_2_3;
kernelPackages = pkgs.linuxPackages;
};
@@ -3,6 +3,7 @@
stdenv,
fetchFromGitHub,
autoreconfHook,
automake,
fftw,
ladspaH,
libxml2,
@@ -21,8 +22,19 @@ stdenv.mkDerivation rec {
sha256 = "sha256-eOtIhNcuItREUShI8JRlBVKfMfovpdfIYu+m37v4KLE=";
};
preBuild = ''
shopt -s globstar
for f in **/Makefile; do
substituteInPlace "$f" \
--replace-quiet 'ranlib' '${stdenv.cc.targetPrefix}ranlib'
done
shopt -u globstar
'';
nativeBuildInputs = [
autoreconfHook
perlPackages.perl
perlPackages.XMLParser
pkg-config
perlPackages.perl
perlPackages.XMLParser
@@ -34,10 +46,8 @@ stdenv.mkDerivation rec {
];
postPatch = ''
patchShebangs .
substituteInPlace util/Makefile.am --replace-fail "ranlib" "$RANLIB"
substituteInPlace gsm/Makefile.am --replace-fail "ranlib" "$RANLIB"
substituteInPlace gverb/Makefile.am --replace-fail "ranlib" "$RANLIB"
patchShebangs --build . ./metadata/ makestub.pl
cp ${automake}/share/automake-*/mkinstalldirs .
'';
meta = with lib; {
+2 -13
View File
@@ -1,7 +1,6 @@
{
lib,
fetchFromGitHub,
fetchpatch,
rofi-unwrapped,
wayland-scanner,
pkg-config,
@@ -11,26 +10,16 @@
rofi-unwrapped.overrideAttrs (oldAttrs: rec {
pname = "rofi-wayland-unwrapped";
version = "1.7.5+wayland3";
version = "1.7.7+wayland1";
src = fetchFromGitHub {
owner = "lbonn";
repo = "rofi";
rev = version;
fetchSubmodules = true;
hash = "sha256-pKxraG3fhBh53m+bLPzCigRr6dBcH/A9vbdf67CO2d8=";
hash = "sha256-wGBB7h2gZRQNmHV0NIbD0vvHtKZqnT5hd2gz5smKGoU=";
};
patches = [
# Fix use on niri window manager
# ref. https://github.com/davatorium/rofi/discussions/2008
# this was merged upstream, and can be removed on next release
(fetchpatch {
url = "https://github.com/lbonn/rofi/commit/55425f72ff913eb72f5ba5f5d422b905d87577d0.patch";
hash = "sha256-vTUxtJs4SuyPk0PgnGlDIe/GVm/w1qZirEhKdBp4bHI=";
})
];
depsBuildBuild = oldAttrs.depsBuildBuild ++ [ pkg-config ];
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
wayland-protocols
@@ -9,13 +9,13 @@
buildMozillaMach rec {
pname = "firefox-devedition";
version = "133.0b1";
version = "135.0b4";
applicationName = "Mozilla Firefox Developer Edition";
requireSigning = false;
branding = "browser/branding/aurora";
src = fetchurl {
url = "mirror://mozilla/devedition/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "dced4aba71b07b68ee31c283945e7d62a7032f08f5cf71aa261fc7ba32f58277acbe9fdbdd28777d7f4b824e411815b069cab0ce791438088c9ad19c3d2de62e";
sha512 = "d3ee20d264c4c26308b814f4cc997349a6df32da17b9a29514b0504f7548606f4b6793ccd2e7464babf6588f13bfcc0e0641f9ac8d620f7da7d7e45684fdf775";
};
meta = {
@@ -0,0 +1,151 @@
From 0902b52f6687b1f7952422080d50b93108742e53 Mon Sep 17 00:00:00 2001
From: Wayne Davison <wayne@opencoder.net>
Date: Tue, 29 Oct 2024 22:55:29 -0700
Subject: [PATCH 1/2] Some checksum buffer fixes.
- Put sum2_array into sum_struct to hold an array of sum2 checksums
that are each xfer_sum_len bytes.
- Remove sum2 buf from sum_buf.
- Add macro sum2_at() to access each sum2 array element.
- Throw an error if a sums header has an s2length larger than
xfer_sum_len.
---
io.c | 3 ++-
match.c | 8 ++++----
rsync.c | 5 ++++-
rsync.h | 4 +++-
sender.c | 4 +++-
5 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/io.c b/io.c
index a99ac0ec..bb60eeca 100644
--- a/io.c
+++ b/io.c
@@ -55,6 +55,7 @@ extern int read_batch;
extern int compat_flags;
extern int protect_args;
extern int checksum_seed;
+extern int xfer_sum_len;
extern int daemon_connection;
extern int protocol_version;
extern int remove_source_files;
@@ -1977,7 +1978,7 @@ void read_sum_head(int f, struct sum_struct *sum)
exit_cleanup(RERR_PROTOCOL);
}
sum->s2length = protocol_version < 27 ? csum_length : (int)read_int(f);
- if (sum->s2length < 0 || sum->s2length > MAX_DIGEST_LEN) {
+ if (sum->s2length < 0 || sum->s2length > xfer_sum_len) {
rprintf(FERROR, "Invalid checksum length %d [%s]\n",
sum->s2length, who_am_i());
exit_cleanup(RERR_PROTOCOL);
diff --git a/match.c b/match.c
index cdb30a15..36e78ed2 100644
--- a/match.c
+++ b/match.c
@@ -232,7 +232,7 @@ static void hash_search(int f,struct sum_struct *s,
done_csum2 = 1;
}
- if (memcmp(sum2,s->sums[i].sum2,s->s2length) != 0) {
+ if (memcmp(sum2, sum2_at(s, i), s->s2length) != 0) {
false_alarms++;
continue;
}
@@ -252,7 +252,7 @@ static void hash_search(int f,struct sum_struct *s,
if (i != aligned_i) {
if (sum != s->sums[aligned_i].sum1
|| l != s->sums[aligned_i].len
- || memcmp(sum2, s->sums[aligned_i].sum2, s->s2length) != 0)
+ || memcmp(sum2, sum2_at(s, aligned_i), s->s2length) != 0)
goto check_want_i;
i = aligned_i;
}
@@ -271,7 +271,7 @@ static void hash_search(int f,struct sum_struct *s,
if (sum != s->sums[i].sum1)
goto check_want_i;
get_checksum2((char *)map, l, sum2);
- if (memcmp(sum2, s->sums[i].sum2, s->s2length) != 0)
+ if (memcmp(sum2, sum2_at(s, i), s->s2length) != 0)
goto check_want_i;
/* OK, we have a re-alignment match. Bump the offset
* forward to the new match point. */
@@ -290,7 +290,7 @@ static void hash_search(int f,struct sum_struct *s,
&& (!updating_basis_file || s->sums[want_i].offset >= offset
|| s->sums[want_i].flags & SUMFLG_SAME_OFFSET)
&& sum == s->sums[want_i].sum1
- && memcmp(sum2, s->sums[want_i].sum2, s->s2length) == 0) {
+ && memcmp(sum2, sum2_at(s, want_i), s->s2length) == 0) {
/* we've found an adjacent match - the RLL coder
* will be happy */
i = want_i;
diff --git a/rsync.c b/rsync.c
index cd288f57..b130aba5 100644
--- a/rsync.c
+++ b/rsync.c
@@ -437,7 +437,10 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr, cha
*/
void free_sums(struct sum_struct *s)
{
- if (s->sums) free(s->sums);
+ if (s->sums) {
+ free(s->sums);
+ free(s->sum2_array);
+ }
free(s);
}
diff --git a/rsync.h b/rsync.h
index d3709fe0..8ddbe702 100644
--- a/rsync.h
+++ b/rsync.h
@@ -958,12 +958,12 @@ struct sum_buf {
uint32 sum1; /**< simple checksum */
int32 chain; /**< next hash-table collision */
short flags; /**< flag bits */
- char sum2[SUM_LENGTH]; /**< checksum */
};
struct sum_struct {
OFF_T flength; /**< total file length */
struct sum_buf *sums; /**< points to info for each chunk */
+ char *sum2_array; /**< checksums of length xfer_sum_len */
int32 count; /**< how many chunks */
int32 blength; /**< block_length */
int32 remainder; /**< flength % block_length */
@@ -982,6 +982,8 @@ struct map_struct {
int status; /* first errno from read errors */
};
+#define sum2_at(s, i) ((s)->sum2_array + ((OFF_T)(i) * xfer_sum_len))
+
#define NAME_IS_FILE (0) /* filter name as a file */
#define NAME_IS_DIR (1<<0) /* filter name as a dir */
#define NAME_IS_XATTR (1<<2) /* filter name as an xattr */
diff --git a/sender.c b/sender.c
index 3d4f052e..ab205341 100644
--- a/sender.c
+++ b/sender.c
@@ -31,6 +31,7 @@ extern int log_before_transfer;
extern int stdout_format_has_i;
extern int logfile_format_has_i;
extern int want_xattr_optim;
+extern int xfer_sum_len;
extern int csum_length;
extern int append_mode;
extern int copy_links;
@@ -94,10 +95,11 @@ static struct sum_struct *receive_sums(int f)
return(s);
s->sums = new_array(struct sum_buf, s->count);
+ s->sum2_array = new_array(char, s->count * xfer_sum_len);
for (i = 0; i < s->count; i++) {
s->sums[i].sum1 = read_int(f);
- read_buf(f, s->sums[i].sum2, s->s2length);
+ read_buf(f, sum2_at(s, i), s->s2length);
s->sums[i].offset = offset;
s->sums[i].flags = 0;
--
2.34.1
@@ -0,0 +1,39 @@
From 42e2b56c4ede3ab164f9a5c6dae02aa84606a6c1 Mon Sep 17 00:00:00 2001
From: Wayne Davison <wayne@opencoder.net>
Date: Tue, 5 Nov 2024 11:01:03 -0800
Subject: [PATCH 2/2] Another cast when multiplying integers.
---
rsync.h | 2 +-
sender.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rsync.h b/rsync.h
index 8ddbe702..0f9e277f 100644
--- a/rsync.h
+++ b/rsync.h
@@ -982,7 +982,7 @@ struct map_struct {
int status; /* first errno from read errors */
};
-#define sum2_at(s, i) ((s)->sum2_array + ((OFF_T)(i) * xfer_sum_len))
+#define sum2_at(s, i) ((s)->sum2_array + ((size_t)(i) * xfer_sum_len))
#define NAME_IS_FILE (0) /* filter name as a file */
#define NAME_IS_DIR (1<<0) /* filter name as a dir */
diff --git a/sender.c b/sender.c
index ab205341..2bbff2fa 100644
--- a/sender.c
+++ b/sender.c
@@ -95,7 +95,7 @@ static struct sum_struct *receive_sums(int f)
return(s);
s->sums = new_array(struct sum_buf, s->count);
- s->sum2_array = new_array(char, s->count * xfer_sum_len);
+ s->sum2_array = new_array(char, (size_t)s->count * xfer_sum_len);
for (i = 0; i < s->count; i++) {
s->sums[i].sum1 = read_int(f);
--
2.34.1
@@ -0,0 +1,27 @@
From cf620065502f065d4ea44f5df4f81295a738aa21 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Thu, 14 Nov 2024 09:57:08 +1100
Subject: [PATCH] prevent information leak off the stack
prevent leak of uninitialised stack data in hash_search
---
match.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/match.c b/match.c
index 36e78ed2..dfd6af2c 100644
--- a/match.c
+++ b/match.c
@@ -147,6 +147,9 @@ static void hash_search(int f,struct sum_struct *s,
int more;
schar *map;
+ // prevent possible memory leaks
+ memset(sum2, 0, sizeof sum2);
+
/* want_i is used to encourage adjacent matches, allowing the RLL
* coding of the output to work more efficiently. */
want_i = 0;
--
2.34.1
@@ -0,0 +1,37 @@
From 3feb8669d875d03c9ceb82e208ef40ddda8eb908 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Sat, 23 Nov 2024 11:08:03 +1100
Subject: [PATCH 1/4] refuse fuzzy options when fuzzy not selected
this prevents a malicious server providing a file to compare to when
the user has not given the fuzzy option
---
receiver.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/receiver.c b/receiver.c
index 6b4b369e..2d7f6033 100644
--- a/receiver.c
+++ b/receiver.c
@@ -66,6 +66,7 @@ extern char sender_file_sum[MAX_DIGEST_LEN];
extern struct file_list *cur_flist, *first_flist, *dir_flist;
extern filter_rule_list daemon_filter_list;
extern OFF_T preallocated_len;
+extern int fuzzy_basis;
extern struct name_num_item *xfer_sum_nni;
extern int xfer_sum_len;
@@ -716,6 +717,10 @@ int recv_files(int f_in, int f_out, char *local_name)
fnamecmp = get_backup_name(fname);
break;
case FNAMECMP_FUZZY:
+ if (fuzzy_basis == 0) {
+ rprintf(FERROR_XFER, "rsync: refusing malicious fuzzy operation for %s\n", xname);
+ exit_cleanup(RERR_PROTOCOL);
+ }
if (file->dirname) {
pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, file->dirname, xname);
fnamecmp = fnamecmpbuf;
--
2.34.1
@@ -0,0 +1,103 @@
From 33385aefe4773e7a3982d41995681eb079c92d12 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Sat, 23 Nov 2024 12:26:10 +1100
Subject: [PATCH 2/4] added secure_relative_open()
this is an open that enforces no symlink following for all path
components in a relative path
---
syscall.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/syscall.c b/syscall.c
index d92074aa..a4b7f542 100644
--- a/syscall.c
+++ b/syscall.c
@@ -33,6 +33,8 @@
#include <sys/syscall.h>
#endif
+#include "ifuncs.h"
+
extern int dry_run;
extern int am_root;
extern int am_sender;
@@ -712,3 +714,75 @@ int do_open_nofollow(const char *pathname, int flags)
return fd;
}
+
+/*
+ open a file relative to a base directory. The basedir can be NULL,
+ in which case the current working directory is used. The relpath
+ must be a relative path, and the relpath must not contain any
+ elements in the path which follow symlinks (ie. like O_NOFOLLOW, but
+ applies to all path components, not just the last component)
+*/
+int secure_relative_open(const char *basedir, const char *relpath, int flags, mode_t mode)
+{
+ if (!relpath || relpath[0] == '/') {
+ // must be a relative path
+ errno = EINVAL;
+ return -1;
+ }
+
+#if !defined(O_NOFOLLOW) || !defined(O_DIRECTORY)
+ // really old system, all we can do is live with the risks
+ if (!basedir) {
+ return open(relpath, flags, mode);
+ }
+ char fullpath[MAXPATHLEN];
+ pathjoin(fullpath, sizeof fullpath, basedir, relpath);
+ return open(fullpath, flags, mode);
+#else
+ int dirfd = AT_FDCWD;
+ if (basedir != NULL) {
+ dirfd = openat(AT_FDCWD, basedir, O_RDONLY | O_DIRECTORY);
+ if (dirfd == -1) {
+ return -1;
+ }
+ }
+ int retfd = -1;
+
+ char *path_copy = my_strdup(relpath, __FILE__, __LINE__);
+ if (!path_copy) {
+ return -1;
+ }
+
+ for (const char *part = strtok(path_copy, "/");
+ part != NULL;
+ part = strtok(NULL, "/"))
+ {
+ int next_fd = openat(dirfd, part, O_RDONLY | O_DIRECTORY | O_NOFOLLOW);
+ if (next_fd == -1 && errno == ENOTDIR) {
+ if (strtok(NULL, "/") != NULL) {
+ // this is not the last component of the path
+ errno = ELOOP;
+ goto cleanup;
+ }
+ // this could be the last component of the path, try as a file
+ retfd = openat(dirfd, part, flags | O_NOFOLLOW, mode);
+ goto cleanup;
+ }
+ if (next_fd == -1) {
+ goto cleanup;
+ }
+ if (dirfd != AT_FDCWD) close(dirfd);
+ dirfd = next_fd;
+ }
+
+ // the path must be a directory
+ errno = EINVAL;
+
+cleanup:
+ free(path_copy);
+ if (dirfd != AT_FDCWD) {
+ close(dirfd);
+ }
+ return retfd;
+#endif // O_NOFOLLOW, O_DIRECTORY
+}
--
2.34.1
@@ -0,0 +1,103 @@
From e59ef9939d3f0ccc8f9bab51442989a81be0c914 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Sat, 23 Nov 2024 12:28:13 +1100
Subject: [PATCH 3/4] receiver: use secure_relative_open() for basis file
this prevents attacks where the basis file is manipulated by a
malicious sender to gain information about files outside the
destination tree
---
receiver.c | 42 ++++++++++++++++++++++++++----------------
1 file changed, 26 insertions(+), 16 deletions(-)
diff --git a/receiver.c b/receiver.c
index 2d7f6033..8031b8f4 100644
--- a/receiver.c
+++ b/receiver.c
@@ -552,6 +552,8 @@ int recv_files(int f_in, int f_out, char *local_name)
progress_init();
while (1) {
+ const char *basedir = NULL;
+
cleanup_disable();
/* This call also sets cur_flist. */
@@ -722,27 +724,29 @@ int recv_files(int f_in, int f_out, char *local_name)
exit_cleanup(RERR_PROTOCOL);
}
if (file->dirname) {
- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, file->dirname, xname);
- fnamecmp = fnamecmpbuf;
- } else
- fnamecmp = xname;
+ basedir = file->dirname;
+ }
+ fnamecmp = xname;
break;
default:
if (fnamecmp_type > FNAMECMP_FUZZY && fnamecmp_type-FNAMECMP_FUZZY <= basis_dir_cnt) {
fnamecmp_type -= FNAMECMP_FUZZY + 1;
if (file->dirname) {
- stringjoin(fnamecmpbuf, sizeof fnamecmpbuf,
- basis_dir[fnamecmp_type], "/", file->dirname, "/", xname, NULL);
- } else
- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basis_dir[fnamecmp_type], xname);
+ pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basis_dir[fnamecmp_type], file->dirname);
+ basedir = fnamecmpbuf;
+ } else {
+ basedir = basis_dir[fnamecmp_type];
+ }
+ fnamecmp = xname;
} else if (fnamecmp_type >= basis_dir_cnt) {
rprintf(FERROR,
"invalid basis_dir index: %d.\n",
fnamecmp_type);
exit_cleanup(RERR_PROTOCOL);
- } else
- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basis_dir[fnamecmp_type], fname);
- fnamecmp = fnamecmpbuf;
+ } else {
+ basedir = basis_dir[fnamecmp_type];
+ fnamecmp = fname;
+ }
break;
}
if (!fnamecmp || (daemon_filter_list.head
@@ -765,7 +769,7 @@ int recv_files(int f_in, int f_out, char *local_name)
}
/* open the file */
- fd1 = do_open(fnamecmp, O_RDONLY, 0);
+ fd1 = secure_relative_open(basedir, fnamecmp, O_RDONLY, 0);
if (fd1 == -1 && protocol_version < 29) {
if (fnamecmp != fname) {
@@ -776,14 +780,20 @@ int recv_files(int f_in, int f_out, char *local_name)
if (fd1 == -1 && basis_dir[0]) {
/* pre-29 allowed only one alternate basis */
- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
- basis_dir[0], fname);
- fnamecmp = fnamecmpbuf;
+ basedir = basis_dir[0];
+ fnamecmp = fname;
fnamecmp_type = FNAMECMP_BASIS_DIR_LOW;
- fd1 = do_open(fnamecmp, O_RDONLY, 0);
+ fd1 = secure_relative_open(basedir, fnamecmp, O_RDONLY, 0);
}
}
+ if (basedir) {
+ // for the following code we need the full
+ // path name as a single string
+ pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basedir, fnamecmp);
+ fnamecmp = fnamecmpbuf;
+ }
+
one_inplace = inplace_partial && fnamecmp_type == FNAMECMP_PARTIAL_DIR;
updating_basis_or_equiv = one_inplace
|| (inplace && (fnamecmp == fname || fnamecmp_type == FNAMECMP_BACKUP));
--
2.34.1
@@ -0,0 +1,37 @@
From c78e53edb802d04f7e4e070fe8314f2544749e7a Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Tue, 26 Nov 2024 09:16:31 +1100
Subject: [PATCH 4/4] disallow ../ elements in relpath for secure_relative_open
---
syscall.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/syscall.c b/syscall.c
index a4b7f542..47c5ea57 100644
--- a/syscall.c
+++ b/syscall.c
@@ -721,6 +721,8 @@ int do_open_nofollow(const char *pathname, int flags)
must be a relative path, and the relpath must not contain any
elements in the path which follow symlinks (ie. like O_NOFOLLOW, but
applies to all path components, not just the last component)
+
+ The relpath must also not contain any ../ elements in the path
*/
int secure_relative_open(const char *basedir, const char *relpath, int flags, mode_t mode)
{
@@ -729,6 +731,11 @@ int secure_relative_open(const char *basedir, const char *relpath, int flags, mo
errno = EINVAL;
return -1;
}
+ if (strncmp(relpath, "../", 3) == 0 || strstr(relpath, "/../")) {
+ // no ../ elements allowed in the relpath
+ errno = EINVAL;
+ return -1;
+ }
#if !defined(O_NOFOLLOW) || !defined(O_DIRECTORY)
// really old system, all we can do is live with the risks
--
2.34.1
@@ -0,0 +1,45 @@
From 0ebc19ee486a8e928a68d8f98d07d40f176770aa Mon Sep 17 00:00:00 2001
From: Wayne Davison <wayne@opencoder.net>
Date: Thu, 14 Nov 2024 15:46:50 -0800
Subject: [PATCH 1/2] Refuse a duplicate dirlist.
---
flist.c | 9 +++++++++
rsync.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/flist.c b/flist.c
index 464d556e..847b1054 100644
--- a/flist.c
+++ b/flist.c
@@ -2584,6 +2584,15 @@ struct file_list *recv_file_list(int f, int dir_ndx)
init_hard_links();
#endif
+ if (inc_recurse && dir_ndx >= 0) {
+ struct file_struct *file = dir_flist->files[dir_ndx];
+ if (file->flags & FLAG_GOT_DIR_FLIST) {
+ rprintf(FERROR_XFER, "rsync: refusing malicious duplicate flist for dir %d\n", dir_ndx);
+ exit_cleanup(RERR_PROTOCOL);
+ }
+ file->flags |= FLAG_GOT_DIR_FLIST;
+ }
+
flist = flist_new(0, "recv_file_list");
flist_expand(flist, FLIST_START_LARGE);
diff --git a/rsync.h b/rsync.h
index 0f9e277f..b9a7101a 100644
--- a/rsync.h
+++ b/rsync.h
@@ -84,6 +84,7 @@
#define FLAG_DUPLICATE (1<<4) /* sender */
#define FLAG_MISSING_DIR (1<<4) /* generator */
#define FLAG_HLINKED (1<<5) /* receiver/generator (checked on all types) */
+#define FLAG_GOT_DIR_FLIST (1<<5)/* sender/receiver/generator - dir_flist only */
#define FLAG_HLINK_FIRST (1<<6) /* receiver/generator (w/FLAG_HLINKED) */
#define FLAG_IMPLIED_DIR (1<<6) /* sender/receiver/generator (dirs only) */
#define FLAG_HLINK_LAST (1<<7) /* receiver/generator */
--
2.34.1
@@ -0,0 +1,27 @@
From b3e16be18d582dac1513c0a932d146b36e867b1b Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Tue, 26 Nov 2024 16:12:45 +1100
Subject: [PATCH 2/2] range check dir_ndx before use
---
flist.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/flist.c b/flist.c
index 847b1054..087f9da6 100644
--- a/flist.c
+++ b/flist.c
@@ -2585,6 +2585,10 @@ struct file_list *recv_file_list(int f, int dir_ndx)
#endif
if (inc_recurse && dir_ndx >= 0) {
+ if (dir_ndx >= dir_flist->used) {
+ rprintf(FERROR_XFER, "rsync: refusing invalid dir_ndx %u >= %u\n", dir_ndx, dir_flist->used);
+ exit_cleanup(RERR_PROTOCOL);
+ }
struct file_struct *file = dir_flist->files[dir_ndx];
if (file->flags & FLAG_GOT_DIR_FLIST) {
rprintf(FERROR_XFER, "rsync: refusing malicious duplicate flist for dir %d\n", dir_ndx);
--
2.34.1
@@ -0,0 +1,136 @@
From 535f8f816539ba681ef0f12015d2cb587ae61b6d Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Sat, 23 Nov 2024 15:15:53 +1100
Subject: [PATCH] make --safe-links stricter
when --safe-links is used also reject links where a '../' component is
included in the destination as other than the leading part of the
filename
---
testsuite/safe-links.test | 55 ++++++++++++++++++++++++++++++++++++
testsuite/unsafe-byname.test | 2 +-
util1.c | 26 ++++++++++++++++-
3 files changed, 81 insertions(+), 2 deletions(-)
create mode 100644 testsuite/safe-links.test
diff --git a/testsuite/safe-links.test b/testsuite/safe-links.test
new file mode 100644
index 00000000..6e95a4b9
--- /dev/null
+++ b/testsuite/safe-links.test
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+. "$suitedir/rsync.fns"
+
+test_symlink() {
+ is_a_link "$1" || test_fail "File $1 is not a symlink"
+}
+
+test_regular() {
+ if [ ! -f "$1" ]; then
+ test_fail "File $1 is not regular file or not exists"
+ fi
+}
+
+test_notexist() {
+ if [ -e "$1" ]; then
+ test_fail "File $1 exists"
+ fi
+ if [ -h "$1" ]; then
+ test_fail "File $1 exists as a symlink"
+ fi
+}
+
+cd "$tmpdir"
+
+mkdir from
+
+mkdir "from/safe"
+mkdir "from/unsafe"
+
+mkdir "from/safe/files"
+mkdir "from/safe/links"
+
+touch "from/safe/files/file1"
+touch "from/safe/files/file2"
+touch "from/unsafe/unsafefile"
+
+ln -s ../files/file1 "from/safe/links/"
+ln -s ../files/file2 "from/safe/links/"
+ln -s ../../unsafe/unsafefile "from/safe/links/"
+ln -s a/a/a/../../../unsafe2 "from/safe/links/"
+
+#echo "LISTING FROM"
+#ls -lR from
+
+echo "rsync with relative path and just -a"
+$RSYNC -avv --safe-links from/safe/ to
+
+#echo "LISTING TO"
+#ls -lR to
+
+test_symlink to/links/file1
+test_symlink to/links/file2
+test_notexist to/links/unsafefile
+test_notexist to/links/unsafe2
diff --git a/testsuite/unsafe-byname.test b/testsuite/unsafe-byname.test
index 75e72014..d2e318ef 100644
--- a/testsuite/unsafe-byname.test
+++ b/testsuite/unsafe-byname.test
@@ -40,7 +40,7 @@ test_unsafe ..//../dest from/dir unsafe
test_unsafe .. from/file safe
test_unsafe ../.. from/file unsafe
test_unsafe ..//.. from//file unsafe
-test_unsafe dir/.. from safe
+test_unsafe dir/.. from unsafe
test_unsafe dir/../.. from unsafe
test_unsafe dir/..//.. from unsafe
diff --git a/util1.c b/util1.c
index da50ff1e..f260d398 100644
--- a/util1.c
+++ b/util1.c
@@ -1318,7 +1318,14 @@ int handle_partial_dir(const char *fname, int create)
*
* "src" is the top source directory currently applicable at the level
* of the referenced symlink. This is usually the symlink's full path
- * (including its name), as referenced from the root of the transfer. */
+ * (including its name), as referenced from the root of the transfer.
+ *
+ * NOTE: this also rejects dest names with a .. component in other
+ * than the first component of the name ie. it rejects names such as
+ * a/b/../x/y. This needs to be done as the leading subpaths 'a' or
+ * 'b' could later be replaced with symlinks such as a link to '.'
+ * resulting in the link being transferred now becoming unsafe
+ */
int unsafe_symlink(const char *dest, const char *src)
{
const char *name, *slash;
@@ -1328,6 +1335,23 @@ int unsafe_symlink(const char *dest, const char *src)
if (!dest || !*dest || *dest == '/')
return 1;
+ // reject destinations with /../ in the name other than at the start of the name
+ const char *dest2 = dest;
+ while (strncmp(dest2, "../", 3) == 0) {
+ dest2 += 3;
+ while (*dest2 == '/') {
+ // allow for ..//..///../foo
+ dest2++;
+ }
+ }
+ if (strstr(dest2, "/../"))
+ return 1;
+
+ // reject if the destination ends in /..
+ const size_t dlen = strlen(dest);
+ if (dlen > 3 && strcmp(&dest[dlen-3], "/..") == 0)
+ return 1;
+
/* find out what our safety margin is */
for (name = src; (slash = strchr(name, '/')) != 0; name = slash+1) {
/* ".." segment starts the count over. "." segment is ignored. */
--
2.34.1
@@ -0,0 +1,187 @@
From f45f48055e548851bc7230f454dfeba139be6c04 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Wed, 18 Dec 2024 08:59:42 +1100
Subject: [PATCH] fixed symlink race condition in sender
when we open a file that we don't expect to be a symlink use
O_NOFOLLOW to prevent a race condition where an attacker could change
a file between being a normal file and a symlink
---
checksum.c | 2 +-
flist.c | 2 +-
generator.c | 4 ++--
receiver.c | 2 +-
sender.c | 2 +-
syscall.c | 20 ++++++++++++++++++++
t_unsafe.c | 3 +++
tls.c | 3 +++
trimslash.c | 2 ++
util1.c | 2 +-
10 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/checksum.c b/checksum.c
index cb21882c..66e80896 100644
--- a/checksum.c
+++ b/checksum.c
@@ -406,7 +406,7 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
int32 remainder;
int fd;
- fd = do_open(fname, O_RDONLY, 0);
+ fd = do_open_checklinks(fname);
if (fd == -1) {
memset(sum, 0, file_sum_len);
return;
diff --git a/flist.c b/flist.c
index 087f9da6..17832533 100644
--- a/flist.c
+++ b/flist.c
@@ -1390,7 +1390,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
if (copy_devices && am_sender && IS_DEVICE(st.st_mode)) {
if (st.st_size == 0) {
- int fd = do_open(fname, O_RDONLY, 0);
+ int fd = do_open_checklinks(fname);
if (fd >= 0) {
st.st_size = get_device_size(fd, fname);
close(fd);
diff --git a/generator.c b/generator.c
index 110db28f..3f13bb95 100644
--- a/generator.c
+++ b/generator.c
@@ -1798,7 +1798,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
if (write_devices && IS_DEVICE(sx.st.st_mode) && sx.st.st_size == 0) {
/* This early open into fd skips the regular open below. */
- if ((fd = do_open(fnamecmp, O_RDONLY, 0)) >= 0)
+ if ((fd = do_open_nofollow(fnamecmp, O_RDONLY)) >= 0)
real_sx.st.st_size = sx.st.st_size = get_device_size(fd, fnamecmp);
}
@@ -1867,7 +1867,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
/* open the file */
- if (fd < 0 && (fd = do_open(fnamecmp, O_RDONLY, 0)) < 0) {
+ if (fd < 0 && (fd = do_open_checklinks(fnamecmp)) < 0) {
rsyserr(FERROR, errno, "failed to open %s, continuing",
full_fname(fnamecmp));
pretend_missing:
diff --git a/receiver.c b/receiver.c
index 8031b8f4..edfbb210 100644
--- a/receiver.c
+++ b/receiver.c
@@ -775,7 +775,7 @@ int recv_files(int f_in, int f_out, char *local_name)
if (fnamecmp != fname) {
fnamecmp = fname;
fnamecmp_type = FNAMECMP_FNAME;
- fd1 = do_open(fnamecmp, O_RDONLY, 0);
+ fd1 = do_open_nofollow(fnamecmp, O_RDONLY);
}
if (fd1 == -1 && basis_dir[0]) {
diff --git a/sender.c b/sender.c
index 2bbff2fa..a4d46c39 100644
--- a/sender.c
+++ b/sender.c
@@ -350,7 +350,7 @@ void send_files(int f_in, int f_out)
exit_cleanup(RERR_PROTOCOL);
}
- fd = do_open(fname, O_RDONLY, 0);
+ fd = do_open_checklinks(fname);
if (fd == -1) {
if (errno == ENOENT) {
enum logcode c = am_daemon && protocol_version < 28 ? FERROR : FWARNING;
diff --git a/syscall.c b/syscall.c
index 081357bb..8cea2900 100644
--- a/syscall.c
+++ b/syscall.c
@@ -45,6 +45,8 @@ extern int preallocate_files;
extern int preserve_perms;
extern int preserve_executability;
extern int open_noatime;
+extern int copy_links;
+extern int copy_unsafe_links;
#ifndef S_BLKSIZE
# if defined hpux || defined __hpux__ || defined __hpux
@@ -788,3 +790,21 @@ cleanup:
return retfd;
#endif // O_NOFOLLOW, O_DIRECTORY
}
+
+/*
+ varient of do_open/do_open_nofollow which does do_open() if the
+ copy_links or copy_unsafe_links options are set and does
+ do_open_nofollow() otherwise
+
+ This is used to prevent a race condition where an attacker could be
+ switching a file between being a symlink and being a normal file
+
+ The open is always done with O_RDONLY flags
+ */
+int do_open_checklinks(const char *pathname)
+{
+ if (copy_links || copy_unsafe_links) {
+ return do_open(pathname, O_RDONLY, 0);
+ }
+ return do_open_nofollow(pathname, O_RDONLY);
+}
diff --git a/t_unsafe.c b/t_unsafe.c
index 010cac50..e10619a2 100644
--- a/t_unsafe.c
+++ b/t_unsafe.c
@@ -28,6 +28,9 @@ int am_root = 0;
int am_sender = 1;
int read_only = 0;
int list_only = 0;
+int copy_links = 0;
+int copy_unsafe_links = 0;
+
short info_levels[COUNT_INFO], debug_levels[COUNT_DEBUG];
int
diff --git a/tls.c b/tls.c
index e6b0708a..858f8f10 100644
--- a/tls.c
+++ b/tls.c
@@ -49,6 +49,9 @@ int list_only = 0;
int link_times = 0;
int link_owner = 0;
int nsec_times = 0;
+int safe_symlinks = 0;
+int copy_links = 0;
+int copy_unsafe_links = 0;
#ifdef SUPPORT_XATTRS
diff --git a/trimslash.c b/trimslash.c
index 1ec928ca..f2774cd7 100644
--- a/trimslash.c
+++ b/trimslash.c
@@ -26,6 +26,8 @@ int am_root = 0;
int am_sender = 1;
int read_only = 1;
int list_only = 0;
+int copy_links = 0;
+int copy_unsafe_links = 0;
int
main(int argc, char **argv)
diff --git a/util1.c b/util1.c
index f260d398..d84bc414 100644
--- a/util1.c
+++ b/util1.c
@@ -365,7 +365,7 @@ int copy_file(const char *source, const char *dest, int tmpfilefd, mode_t mode)
int len; /* Number of bytes read into `buf'. */
OFF_T prealloc_len = 0, offset = 0;
- if ((ifd = do_open(source, O_RDONLY, 0)) < 0) {
+ if ((ifd = do_open_nofollow(source, O_RDONLY)) < 0) {
int save_errno = errno;
rsyserr(FERROR_XFER, errno, "open %s", full_fname(source));
errno = save_errno;
--
2.34.1
@@ -38,6 +38,18 @@ stdenv.mkDerivation rec {
patches = [
# https://github.com/WayneD/rsync/pull/558
./configure.ac-fix-failing-IPv6-check.patch
./CVE-2024-12084/0001-Some-checksum-buffer-fixes.patch
./CVE-2024-12084/0002-Another-cast-when-multiplying-integers.patch
./CVE-2024-12085/0001-prevent-information-leak-off-the-stack.patch
./CVE-2024-12086/0001-refuse-fuzzy-options-when-fuzzy-not-selected.patch
./CVE-2024-12086/0002-added-secure_relative_open.patch
./CVE-2024-12086/0003-receiver-use-secure_relative_open-for-basis-file.patch
./CVE-2024-12086/0004-disallow-.-elements-in-relpath-for-secure_relative_o.patch
./CVE-2024-12087/0001-Refuse-a-duplicate-dirlist.patch
./CVE-2024-12087/0002-range-check-dir_ndx-before-use.patch
./CVE-2024-12088/0001-make-safe-links-stricter.patch
./CVE-2024-12747/0001-fixed-symlink-race-condition-in-sender.patch
./raise-protocol-version-to-32.patch
];
buildInputs =
@@ -0,0 +1,26 @@
From 163e05b1680c4a3b448fa68d03c3fca9589f3bc4 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Tue, 10 Dec 2024 13:34:01 +1100
Subject: [PATCH 1/3] raise protocol version to 32
make it easier to spot unpatched servers
---
rsync.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rsync.h b/rsync.h
index b9a7101a..9be1297b 100644
--- a/rsync.h
+++ b/rsync.h
@@ -111,7 +111,7 @@
/* Update this if you make incompatible changes and ALSO update the
* SUBPROTOCOL_VERSION if it is not a final (official) release. */
-#define PROTOCOL_VERSION 31
+#define PROTOCOL_VERSION 32
/* This is used when working on a new protocol version or for any unofficial
* protocol tweaks. It should be a non-zero value for each pre-release repo
--
2.34.1
@@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "obs-transition-table";
version = "0.2.7";
version = "0.2.7-unstable-2024-11-27";
src = fetchFromGitHub {
owner = "exeldro";
repo = "obs-transition-table";
rev = version;
sha256 = "sha256-rGF7hugC5ybpZBAIIXDiy3YDooMawf/yYX2YucQm2/U=";
rev = "976fe236dac7082b6c953f950fcb9e50495ce624";
sha256 = "sha256-TPRqKjEXdvjv+RfHTaeeO4GHur2j/+onehcu0I/HdD0=";
};
nativeBuildInputs = [ cmake ];
@@ -24,10 +24,6 @@ stdenv.mkDerivation rec {
qtbase
];
cmakeFlags = [
"-DBUILD_OUT_OF_TREE=On"
];
dontWrapQtApps = true;
postInstall = ''
@@ -12,9 +12,13 @@
}:
{
pname ? throw "You must provide either `name` or `pname`",
version ? throw "You must provide either `name` or `version`",
name ? "${pname}-${version}",
runScript ? "bash",
nativeBuildInputs ? [ ],
extraInstallCommands ? "",
executableName ? args.pname or name,
meta ? { },
passthru ? { },
extraPreBwrapCmds ? "",
@@ -30,7 +34,12 @@
...
}@args:
assert (!args ? pname || !args ? version) -> (args ? name); # You must provide name if pname or version (preferred) is missing.
# NOTE:
# `pname` and `version` will throw if they were not provided.
# Use `name` instead of directly evaluating `pname` or `version`.
#
# If you need `pname` or `version` sepcifically, use `args` instead:
# e.g. `args.pname or ...`.
let
inherit (lib)
@@ -48,8 +57,6 @@ let
# explicit about which package set it's coming from.
inherit (pkgsHostTarget) pkgsi686Linux;
name = args.name or "${args.pname}-${args.version}";
executableName = args.pname or args.name;
# we don't know which have been supplied, and want to avoid defaulting missing attrs to null. Passed into runCommandLocal
nameAttrs = lib.filterAttrs (
key: value:
+2 -2
View File
@@ -12,13 +12,13 @@
stdenv.mkDerivation rec {
pname = "aerospike-server";
version = "7.2.0.4";
version = "7.2.0.6";
src = fetchFromGitHub {
owner = "aerospike";
repo = "aerospike-server";
rev = version;
hash = "sha256-g07rfQabjfvfl8rkLDgeTGq1J0pczdasTXIsWqUvz7w=";
hash = "sha256-YjX/2+0n+nrtNwQaZSY5PPYAOnhR+jrIMp02STcJHRY=";
fetchSubmodules = true;
};
+2 -2
View File
@@ -15,13 +15,13 @@
}:
let
version = "2024.12.1";
version = "2024.12.2";
src = fetchFromGitHub {
owner = "goauthentik";
repo = "authentik";
rev = "version/${version}";
hash = "sha256-CkUmsVKzAQ/VWIhtxWxlcGtrWVa8hxqsMqvfcsG5ktA=";
hash = "sha256-Z3rFFrXrOKaF9NpY/fInsEbzdOWnWqLfEYl7YX9hFEU=";
};
meta = with lib; {
+63 -26
View File
@@ -9,21 +9,32 @@
let
pname = "cursor";
version = "0.44.11";
appKey = "230313mzl4w4u92";
src = fetchurl {
url = "https://download.todesktop.com/230313mzl4w4u92/cursor-0.44.11-build-250103fqxdt5u9z-x86_64.AppImage";
hash = "sha256-eOZuofnpED9F6wic0S9m933Tb7Gq7cb/v0kRDltvFVg=";
sources = {
x86_64-linux = fetchurl {
url = "https://download.todesktop.com/230313mzl4w4u92/cursor-0.44.11-build-250103fqxdt5u9z-x86_64.AppImage";
hash = "sha256-eOZuofnpED9F6wic0S9m933Tb7Gq7cb/v0kRDltvFVg=";
};
aarch64-linux = fetchurl {
url = "https://download.todesktop.com/230313mzl4w4u92/cursor-0.44.11-build-250103fqxdt5u9z-arm64.AppImage";
hash = "sha256-mxq7tQJfDccE0QsZDZbaFUKO0Xc141N00ntX3oEYRcc=";
};
};
appimageContents = appimageTools.extractType2 { inherit version pname src; };
in
stdenvNoCC.mkDerivation {
inherit pname version;
src = appimageTools.wrapType2 { inherit version pname src; };
supportedPlatforms = [
"x86_64-linux"
"aarch64-linux"
];
nativeBuildInputs = [ makeWrapper ];
src = sources.${stdenvNoCC.hostPlatform.system};
installPhase = ''
appimageContents = appimageTools.extractType2 {
inherit version pname src;
};
wrappedAppImage = appimageTools.wrapType2 { inherit version pname src; };
appimageInstall = ''
runHook preInstall
mkdir -p $out/
@@ -43,21 +54,47 @@ stdenvNoCC.mkDerivation {
runHook postInstall
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl yq coreutils gnused common-updater-scripts
set -eu -o pipefail
latestLinux="$(curl -s https://download.todesktop.com/${appKey}/latest-linux.yml)"
version="$(echo "$latestLinux" | yq -r .version)"
filename="$(echo "$latestLinux" | yq -r '.files[] | .url | select(. | endswith(".AppImage"))')"
url="https://download.todesktop.com/${appKey}/$filename"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; code-cursor.version or (lib.getVersion code-cursor)" | tr -d '"')
in
stdenvNoCC.mkDerivation {
inherit pname version;
if [[ "$version" != "$currentVersion" ]]; then
hash=$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url "$url")")
update-source-version code-cursor "$version" "$hash" "$url" --source-key=src.src
fi
'';
src = wrappedAppImage;
nativeBuildInputs = [ makeWrapper ];
installPhase = appimageInstall;
passthru = {
inherit sources;
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl yq coreutils gnused common-updater-scripts
set -eu -o pipefail
baseUrl="https://download.todesktop.com/230313mzl4w4u92"
latestLinux="$(curl -s $baseUrl/latest-linux.yml)"
version="$(echo "$latestLinux" | yq -r .version)"
filename="$(echo "$latestLinux" | yq -r '.files[] | .url | select(. | endswith(".AppImage"))')"
linuxStem="$(echo "$filename" | sed -E s/^\(cursor-.+-build-.*\)-.+$/\\1/)"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; code-cursor.version or (lib.getVersion code-cursor)" | tr -d '"')
if [[ "$version" != "$currentVersion" ]]; then
for platform in ${lib.escapeShellArgs supportedPlatforms}; do
if [ $platform = "x86_64-linux" ]; then
url="$baseUrl/$linuxStem-x86_64.AppImage"
elif [ $platform = "aarch64-linux" ]; then
url="$baseUrl/$linuxStem-arm64.AppImage"
else
echo "Unsupported platform: $platform"
exit 1
fi
hash=$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url "$url")")
update-source-version code-cursor $version $hash $url --system=$platform --ignore-same-version --source-key="sources.$platform"
done
fi
'';
};
meta = {
description = "AI-powered code editor built on vscode";
@@ -66,7 +103,7 @@ stdenvNoCC.mkDerivation {
license = lib.licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ sarahec ];
platforms = [ "x86_64-linux" ];
platforms = lib.platforms.linux;
mainProgram = "cursor";
};
}
+3 -3
View File
@@ -16,7 +16,7 @@
buildGoModule rec {
pname = "containerd";
version = "2.0.1";
version = "2.0.2";
outputs = [
"out"
@@ -27,7 +27,7 @@ buildGoModule rec {
owner = "containerd";
repo = "containerd";
tag = "v${version}";
hash = "sha256-gD0XRZThU/T8qxLyyboyE6GsX911ylt7hH59S+rB7vQ=";
hash = "sha256-aCC6nH+bxjk6dUIzUva4ILH0FD6QkWiJmdrcMLA18Jw=";
};
postPatch = "patchShebangs .";
@@ -89,7 +89,7 @@ buildGoModule rec {
meta = {
description = "Daemon to control runC";
homepage = "https://containerd.io/";
changelog = "https://github.com/containerd/containerd/releases/tag/${version}";
changelog = "https://github.com/containerd/containerd/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
offline
+11 -6
View File
@@ -1,8 +1,10 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchFromGitea,
cmake,
git,
pkg-config,
boost,
eigen,
glm,
@@ -17,19 +19,22 @@
stdenv.mkDerivation rec {
pname = "curv";
version = "0.5";
version = "0.5-unstable-2025-01-06";
src = fetchFromGitHub {
owner = "curv3d";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "doug-moen";
repo = "curv";
tag = version;
hash = "sha256-m4p5uxRk6kEJUilmbQ1zJcQDRvRCV7pkxnqupZJxyjo=";
rev = "a496d98459b65d15feae8e69036944dafb7ec26e";
hash = "sha256-2pe76fBU78xRvHxol8O1xv0bBVwbpKDVPLQqqUCTO0Y=";
fetchSubmodules = true;
};
strictDeps = true;
nativeBuildInputs = [
cmake
git
pkg-config
];
buildInputs =
+1
View File
@@ -126,6 +126,7 @@ stdenv.mkDerivation (finalAttrs: {
[
zlib
cyrus_sasl
sqlite
]
# Darwin doesn't have libuuid, try to build without it
++ lib.optional (!stdenv.hostPlatform.isDarwin) libuuid;
+3 -3
View File
@@ -6,16 +6,16 @@
buildGoModule rec {
pname = "ddns-go";
version = "6.7.7";
version = "6.8.0";
src = fetchFromGitHub {
owner = "jeessy2";
repo = pname;
rev = "v${version}";
hash = "sha256-MzhZ9u4noPLdtrbALi42GI9i+nb4rRdugMzd20rJ6b0=";
hash = "sha256-zVNlsFPSLI8mXBUOo8z7nM4nShNd0ZwG5lZL2VyeGi8=";
};
vendorHash = "sha256-e8/z1vriyHXPY1OvkGFqeZHJhz5ssOlqD/Uwt5xq8Uw=";
vendorHash = "sha256-D66uremGVcTcyBlCA9vrQM5zGPFR96FqVak6tATEdI0=";
ldflags = [
"-X main.version=${version}"
+2 -2
View File
@@ -71,8 +71,8 @@ stdenv.mkDerivation rec {
domain = "salsa.debian.org";
owner = "pkg-security-team";
repo = "dsniff";
rev = "debian/${version}+debian-30";
sha256 = "1fk2k0sfdp5g27i11g0sbzm7al52raz5yr1aibzssnysv7l9xgzh";
rev = "debian/${version}+debian-34";
sha256 = "sha256-CY0+G09KZXtAwKuaYh5/qcmZjuNhdGis3zCG14hWtqw=";
name = "dsniff.tar.gz";
};
+51
View File
@@ -0,0 +1,51 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
libgit2,
openssl,
zlib,
}:
rustPlatform.buildRustPackage rec {
pname = "ffizer";
version = "2.13.1";
buildFeatures = [ "cli" ];
src = fetchFromGitHub {
owner = "ffizer";
repo = "ffizer";
rev = version;
hash = "sha256-ZX6Zv6ioAO33Cc5WCVBgJWlOmNvbVgckMylRnphpOdw=";
};
cargoHash = "sha256-4fZLL4vQxAeyqQssmEd1C72fzMXCGHtUPCGpaVupy6Q=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libgit2
openssl
zlib
];
env.OPENSSL_NO_VENDOR = true;
checkFlags = [
# requires internet access
"--skip=run_test_samples_tests_data_template_2"
];
meta = {
description = "Files and folders initializer / generator based on templates";
homepage = "https://github.com/ffizer/ffizer";
changelog = "https://github.com/ffizer/ffizer/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.cc0;
maintainers = with lib.maintainers; [ XBagon ];
mainProgram = "ffizer";
};
}
@@ -142,6 +142,8 @@ stdenv.mkDerivation (finalAttrs: {
gappsWrapperArgs+=(
# For sysprof-agent
--prefix PATH : "${sysprof}/bin"
# libpanel icons
--prefix XDG_DATA_DIRS : "${libpanel}/share"
)
# Ensure that all plugins get their interpreter paths fixed up.
+3 -3
View File
@@ -6,16 +6,16 @@
buildGoModule rec {
pname = "gogup";
version = "0.27.5";
version = "0.27.6";
src = fetchFromGitHub {
owner = "nao1215";
repo = "gup";
rev = "v${version}";
hash = "sha256-I4l/sDqafc/ZO8kKc4iOSMFLS0YZrAqRFOXn0N7Myo4=";
hash = "sha256-d+VN3BBhGiVdLpCHP08vi7lYSeL6QovswtPNvEbS9fc=";
};
vendorHash = "sha256-rtdbPwVZHwofpGccYU8NBiaikzNMIwSDggbRdnGTBu8=";
vendorHash = "sha256-jvVtwA7563ptWat/YS8klRnG3+NO3PeW0vl17yt8q8M=";
doCheck = false;
ldflags = [
+4 -4
View File
@@ -9,15 +9,15 @@
buildGoModule rec {
pname = "goperf";
version = "0-unstable-2024-12-04";
version = "0-unstable-2025-01-06";
src = fetchgit {
url = "https://go.googlesource.com/perf";
rev = "711ff2ab72314f5a878a356d9ff7ab8460de731f";
hash = "sha256-T0LHlO9ObVJ68pERkY+6eJCxY+Lj9eHvOxlCRevwbuE=";
rev = "400946f43c825f133ced1d2662be611959d1335c";
hash = "sha256-w7HUDDfsZ60ZNryewh83mJ6ZMfMpnvW6ehhijKss7B0=";
};
vendorHash = "sha256-OrrciJqJLTMM+yF9SD/eRucwOrfcZuuyR+xE6+DlYpo=";
vendorHash = "sha256-WHkeLS8Sdq2oP7hD0MKVrcENclaOWTeSVCXm+aimqIU=";
passthru.updateScript = writeShellScript "update-goperf" ''
export UPDATE_NIX_ATTR_PATH=goperf
@@ -0,0 +1,67 @@
{
fetchFromGitHub,
lib,
stdenv,
unstableGitUpdater,
cairo,
glib,
json_c,
libGL,
libepoxy,
libpng,
libxkbcommon,
meson,
ninja,
pango,
pkg-config,
scdoc,
wayland,
wayland-protocols,
wayland-scanner,
}:
stdenv.mkDerivation {
pname = "greetd-mini-wl-greeter";
version = "0-unstable-2024-12-27";
src = fetchFromGitHub {
owner = "philj56";
repo = "greetd-mini-wl-greeter";
rev = "61f25ed34a1a35a061c2f3605fc3d4b37a7d0d8e";
hash = "sha256-ifeQbzMA9O+yhLveTXpEmgG2BsSp4lxbd3yo8o69fxA=";
};
nativeBuildInputs = [
libGL
cairo
glib
json_c
libepoxy
libpng
libxkbcommon
pango
wayland
wayland-protocols
wayland-scanner
];
# https://github.com/philj56/greetd-mini-wl-greeter/issues/2
mesonBuildType = "release";
buildInputs = [
meson
ninja
pkg-config
scdoc
];
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Extremely minimal raw Wayland greeter for greetd";
license = lib.licenses.mit;
homepage = "https://github.com/philj56/greetd-mini-wl-greeter";
mainProgram = "greetd-mini-wl-greeter";
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ _0x5a4 ];
};
}
+3 -12
View File
@@ -2,7 +2,7 @@
lib,
stdenv,
cmake,
llvmPackages_17,
llvm,
fetchFromGitHub,
mbedtls,
gtk3,
@@ -24,21 +24,12 @@
nix-update-script,
autoPatchelfHook,
makeWrapper,
overrideSDK,
}:
let
version = "1.36.2";
patterns_version = "1.36.2";
llvmPackages = llvmPackages_17;
stdenv' =
let
baseStdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
in
if stdenv.hostPlatform.isDarwin then overrideSDK baseStdenv "11.0" else baseStdenv;
patterns_src = fetchFromGitHub {
name = "ImHex-Patterns-source-${patterns_version}";
owner = "WerWolv";
@@ -48,7 +39,7 @@ let
};
in
stdenv'.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: {
pname = "imhex";
inherit version;
@@ -65,7 +56,7 @@ stdenv'.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
llvmPackages.llvm
llvm
python3
perl
pkg-config
@@ -7,13 +7,13 @@
stdenvNoCC.mkDerivation {
pname = "jawiki-all-titles-in-ns0";
version = "0-unstable-2024-12-01";
version = "0-unstable-2025-01-01";
src = fetchFromGitHub {
owner = "musjj";
repo = "jawiki-archive";
rev = "a4146faaca34c37a36f26e1e75990187cac40954";
hash = "sha256-FuLtXgyEpHZWeZbbrKXalXeycf7gtkfWMYoM7j2mOds=";
rev = "dbd1e032f8685387c0dbeb1a472ab9215250d11f";
hash = "sha256-2GjbXjsf8OV/9EuX675hBXTWQsf+KhKhh1IiAxbzqfU=";
};
installPhase = ''
+3 -3
View File
@@ -7,15 +7,15 @@
stdenvNoCC.mkDerivation {
pname = "jp-zip-code";
version = "0-unstable-2024-12-01";
version = "0-unstable-2025-01-01";
# This package uses a mirror as the source because the
# original provider uses the same URL for updated content.
src = fetchFromGitHub {
owner = "musjj";
repo = "jp-zip-codes";
rev = "94071d5f73bcea043694d1e9a557f6e526b44096";
hash = "sha256-RyXJZOwZmtW9vP0lEctE3t1DItBFOop7vdTi0IAH8E8=";
rev = "45aa11f1f60515893b0eb8f533f540632b394564";
hash = "sha256-qcP1lc5E1RS+n7e3hmZwaHtnf9ErOYprW+/w0r65ZuI=";
};
installPhase = ''
+2 -2
View File
@@ -33,13 +33,13 @@ let
in
stdenv.mkDerivation rec {
pname = "justbuild";
version = "1.4.1";
version = "1.4.2";
src = fetchFromGitHub {
owner = "just-buildsystem";
repo = "justbuild";
rev = "refs/tags/v${version}";
hash = "sha256-asbJdm50srMinr8sguGR3rWT7YXm75Zjm2Dvj53PpMc=";
hash = "sha256-oMl+hY7E4vYB4J/5LXq6sw9bafYwhXY8lkEWwU6j0Fk=";
};
bazelapi = fetchurl {
+2 -2
View File
@@ -8,13 +8,13 @@
buildGoModule rec {
pname = "k6";
version = "0.55.2";
version = "0.56.0";
src = fetchFromGitHub {
owner = "grafana";
repo = pname;
rev = "v${version}";
hash = "sha256-BuZsz5+vp4obL/Gj/gJSgA0xxdYmqd+MKggS62Jo+bM=";
hash = "sha256-QU/FJZqyodwUGxb3MjaQXIGWZSlrkxKe4bh6r/p7jrQ=";
};
subPackages = [ "./" ];
+2 -2
View File
@@ -24,11 +24,11 @@ let
in
stdenv.mkDerivation rec {
pname = "keycloak";
version = "26.0.7";
version = "26.0.8";
src = fetchzip {
url = "https://github.com/keycloak/keycloak/releases/download/${version}/keycloak-${version}.zip";
hash = "sha256-yIv9gAjCfzjWDLZHQbgGEjhMefY1idzZTEbqVyXjFdw=";
hash = "sha256-o4Yken4PlitebEBNI+BrQqYM+RtsURj0LvYFBSjuQIE=";
};
nativeBuildInputs = [
+3 -3
View File
@@ -18,17 +18,17 @@ let
in
rustPlatform.buildRustPackage rec {
pname = "lockbook-desktop";
version = "0.9.15";
version = "0.9.16";
src = fetchFromGitHub {
owner = "lockbook";
repo = "lockbook";
tag = version;
hash = "sha256-hqBjA/6MWlhVjV4m+cIcnoRTApHuzbPzivMsaQHfRcc=";
hash = "sha256-FHD84IJ2ahxB8L75xep+TSb8e+DtUsjEyHc6P/SFi9c=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-+M+wL26KDbLKhcujPyWAsTlXwLrQVCUbTnnu/7sXul4=";
cargoHash = "sha256-z00WBA/51zmqFCBX1hD3dLKvuvxQvuyvtBGrxxAr7FE=";
nativeBuildInputs = [
pkg-config
+3 -3
View File
@@ -7,17 +7,17 @@
}:
rustPlatform.buildRustPackage rec {
pname = "lockbook";
version = "0.9.15";
version = "0.9.16";
src = fetchFromGitHub {
owner = "lockbook";
repo = "lockbook";
tag = version;
hash = "sha256-hqBjA/6MWlhVjV4m+cIcnoRTApHuzbPzivMsaQHfRcc=";
hash = "sha256-FHD84IJ2ahxB8L75xep+TSb8e+DtUsjEyHc6P/SFi9c=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-+M+wL26KDbLKhcujPyWAsTlXwLrQVCUbTnnu/7sXul4=";
cargoHash = "sha256-z00WBA/51zmqFCBX1hD3dLKvuvxQvuyvtBGrxxAr7FE=";
doCheck = false; # there are no cli tests
cargoBuildFlags = [
+2 -2
View File
@@ -8,7 +8,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "lzlib";
version = "1.14";
version = "1.15";
outputs = [
"out"
"info"
@@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchurl {
url = "mirror://savannah/lzip/lzlib/lzlib-${finalAttrs.version}.tar.lz";
hash = "sha256-42LszNgtTdKX32pRuVLGXSFy+b9BpcRZDTYE2DqlGdM=";
hash = "sha256-nUVIDnyBccZPodW+7iy9guaf6+kQ8M5ii4dqj+IUFTQ=";
# hash from release email
};
+3 -3
View File
@@ -9,18 +9,18 @@
buildGoModule rec {
pname = "mercure";
version = "0.17.1";
version = "0.18.1";
src = fetchFromGitHub {
owner = "dunglas";
repo = "mercure";
rev = "v${version}";
hash = "sha256-TRKlX4dNCvD9wBp+JNpmB9J1lt0Eyc0pQ/ucvtiDGto=";
hash = "sha256-BJVCVvz8AdkQwLD37oQc7YPaZ7l74o9Dik9u/ZBSRro=";
};
sourceRoot = "${src.name}/caddy";
vendorHash = "sha256-0tyvb11rBtrTbA+eAV1E5Y2tZeAwtrpONHBOLaVxuaQ=";
vendorHash = "sha256-QqG8rxGQW+Lmd2L+wKiKUV+GXcxoO04yhJhDvMqwTVc=";
subPackages = [ "mercure" ];
excludedPackages = [ "../cmd/mercure" ];
+2 -2
View File
@@ -6,14 +6,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "mqtt-exporter";
version = "1.5.0";
version = "1.6.1";
pyproject = true;
src = fetchFromGitHub {
owner = "kpetremann";
repo = "mqtt-exporter";
tag = "v${version}";
hash = "sha256-3gUAiujfBXJpVailx8cMmSJS7l69XpE4UGK/aebcQqY=";
hash = "sha256-XTgnD3H48KKclPhfmBPiWQPaJkfiBxjq2YQusOPLFJQ=";
};
pythonRelaxDeps = [ "prometheus-client" ];
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b7320bb..d7169da 100644
index 3dd3e19..4290041 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -143,25 +143,6 @@ check_function_exists (strtoull HAVE_STRTOULL)
@@ -84,7 +84,7 @@ index 40ed515..00da327 100644
if to_spawn:
command += ' &'
- sudo_prefix += ' /usr/bin/nohup'
+ sudo_prefix += ' @nohup@'
+ sudo_prefix += ' @coreutils@/bin/nohup'
# If as_user is the CURRENT then there's no need to sudo
if as_user != Users.CURRENT:
@@ -102,10 +102,10 @@ index 40ed515..00da327 100644
def get_file_owner(self, path, as_user = Users.CURRENT, user_password = None):
if self.target_os == wbaOS.linux:
- command = 'LC_ALL=C stat -c %U '
+ command = 'LC_ALL=C @stat@ -c %U '
+ command = 'LC_ALL=C @coreutils@/bin/stat -c %U '
else:
- command = 'LC_ALL=C /usr/bin/stat -f "%Su" '
+ command = 'LC_ALL=C @stat@ -f "%Su" '
+ command = 'LC_ALL=C @coreutils@/bin/stat -f "%Su" '
output = io.StringIO()
command = command + quote_path(path)
@@ -114,10 +114,10 @@ index 40ed515..00da327 100644
raise PermissionDeniedError("Cannot set owner of directory %s" % path)
else:
- command = "/bin/mkdir %s && chown %s %s" % (quote_path(path), with_owner, quote_path(path))
+ command = "@mkdir@ %s && chown %s %s" % (quote_path(path), with_owner, quote_path(path))
+ command = "@coreutils@/bin/mkdir %s && chown %s %s" % (quote_path(path), with_owner, quote_path(path))
else:
- command = "/bin/mkdir %s" % (quote_path(path))
+ command = "@mkdir@ %s" % (quote_path(path))
+ command = "@coreutils@/bin/mkdir %s" % (quote_path(path))
res = self.process_ops.exec_cmd(command,
as_user = as_user,
@@ -126,7 +126,7 @@ index 40ed515..00da327 100644
def remove_directory(self, path, as_user = Users.CURRENT, user_password = None):
output = io.StringIO()
- res = self.process_ops.exec_cmd('/bin/rmdir ' + quote_path(path),
+ res = self.process_ops.exec_cmd('@rmdir@ ' + quote_path(path),
+ res = self.process_ops.exec_cmd('@coreutils@/bin/rmdir ' + quote_path(path),
as_user = as_user,
user_password = user_password,
output_handler = output.write,
@@ -135,7 +135,7 @@ index 40ed515..00da327 100644
def remove_directory_recursive(self, path, as_user = Users.CURRENT, user_password = None):
output = io.StringIO()
- res = self.process_ops.exec_cmd('/bin/rm -R ' + quote_path(path),
+ res = self.process_ops.exec_cmd('@rm@ -R ' + quote_path(path),
+ res = self.process_ops.exec_cmd('@coreutils@/bin/rm -R ' + quote_path(path),
as_user = as_user,
user_password = user_password,
output_handler = output.write,
@@ -144,7 +144,7 @@ index 40ed515..00da327 100644
def delete_file(self, path, as_user = Users.CURRENT, user_password = None):
output = io.StringIO()
- res = self.process_ops.exec_cmd("/bin/rm " + quote_path(path),
+ res = self.process_ops.exec_cmd("@rm@ " + quote_path(path),
+ res = self.process_ops.exec_cmd("@coreutils@/bin/rm " + quote_path(path),
as_user = as_user,
user_password = user_password,
output_handler = output.write,
@@ -153,7 +153,7 @@ index 40ed515..00da327 100644
output = io.StringIO()
- res = self.process_ops.exec_cmd("LC_ALL=C /bin/cp " + quote_path(source) + " " + quote_path(dest),
+ res = self.process_ops.exec_cmd("LC_ALL=C @cp@ " + quote_path(source) + " " + quote_path(dest),
+ res = self.process_ops.exec_cmd("LC_ALL=C @coreutils@/bin/cp " + quote_path(source) + " " + quote_path(dest),
as_user = as_user,
user_password = user_password,
output_handler = output.write,
@@ -162,10 +162,10 @@ index 40ed515..00da327 100644
# since both cases are possible, we need to handle both at the same time (1st line being total <nnnn> or not)
# the good news is that if the line is there, then it will always start with total, regardless of the locale
- command = 'LC_ALL=C /bin/ls -l -p %s' % quote_path(path)
+ command = 'LC_ALL=C @ls@ -l -p %s' % quote_path(path)
+ command = 'LC_ALL=C @coreutils@/bin/ls -l -p %s' % quote_path(path)
else:
- command = 'LC_ALL=C /bin/ls -1 -p %s' % quote_path(path)
+ command = 'LC_ALL=C @ls@ -1 -p %s' % quote_path(path)
+ command = 'LC_ALL=C @coreutils@/bin/ls -1 -p %s' % quote_path(path)
output = io.StringIO()
res = self.process_ops.exec_cmd(command,
@@ -174,10 +174,10 @@ index 40ed515..00da327 100644
f = io.StringIO()
if not self._need_sudo:
- ret = self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
+ ret = self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
+ ret = self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
else:
- ret = self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.ADMIN, user_password=self.get_password, output_handler=f.write)
+ ret = self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.ADMIN, user_password=self.get_password, output_handler=f.write)
+ ret = self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.ADMIN, user_password=self.get_password, output_handler=f.write)
if ret != 0:
raise RuntimeError("Could not get data from file %s" % self.path)
@@ -186,10 +186,10 @@ index 40ed515..00da327 100644
def read_task(self, offset, file):
if not self._need_sudo:
- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=file.write)
+ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=file.write)
+ self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=file.write)
else:
- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self.get_password, output_handler=file.write)
+ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self.get_password, output_handler=file.write)
+ self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self.get_password, output_handler=file.write)
# this will signal the reader end that there's no more data
file.close()
@@ -198,10 +198,10 @@ index 40ed515..00da327 100644
f = io.StringIO()
if not self._need_sudo:
- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
+ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
+ self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
else:
- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self._password, output_handler=f.write)
+ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self._password, output_handler=f.write)
+ self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self._password, output_handler=f.write)
self.data = f
self.data.seek(0)
if self.skip_first_newline:
+1 -10
View File
@@ -46,8 +46,6 @@ let
};
});
getCoreExe = lib.getExe' coreutils;
inherit (python3Packages) paramiko pycairo pyodbc;
in
stdenv.mkDerivation (finalAttrs: {
@@ -63,14 +61,7 @@ stdenv.mkDerivation (finalAttrs: {
(replaceVars ./hardcode-paths.patch {
bash = lib.getExe bash;
catchsegv = lib.getExe' glibc "catchsegv";
cp = getCoreExe "cp";
dd = getCoreExe "dd";
ls = getCoreExe "ls";
mkdir = getCoreExe "mkdir";
nohup = getCoreExe "nohup";
rm = getCoreExe "rm";
rmdir = getCoreExe "rmdir";
stat = getCoreExe "stat";
coreutils = lib.getBin coreutils;
sudo = lib.getExe sudo;
})
+3 -3
View File
@@ -16,18 +16,18 @@
stdenv.mkDerivation (finalAttrs: {
pname = "n8n";
version = "1.72.1";
version = "1.73.1";
src = fetchFromGitHub {
owner = "n8n-io";
repo = "n8n";
tag = "n8n@${finalAttrs.version}";
hash = "sha256-GIA2y81nuKWe1zuZQ99oczQtQWStyT1Qh3bZ1oe8me4=";
hash = "sha256-gPdJKVOZlizdS0o+2nBgCImnIhtHzRjE2xk0zJA52go=";
};
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-riuN7o+uUXS5G7fMgE7cZhGWHZtGwSHm4CP7G46R5Cw=";
hash = "sha256-Am9R2rfQiw1IPd22/UraqzEqvVeB5XuSrrLSYXWsWfU=";
};
nativeBuildInputs = [
+3 -3
View File
@@ -24,16 +24,16 @@ let
in
buildGoModule rec {
pname = "nixos-facter";
version = "0.3.0";
version = "0.3.1";
src = fetchFromGitHub {
owner = "numtide";
repo = "nixos-facter";
rev = "v${version}";
hash = "sha256-T7x9xU/Tr2BKfrHQHrP6Mm6rNUWYASjEPzHIKgyS7aE=";
hash = "sha256-HJt6FEQbzwlVMow47p1DtqXdmCxLYA6g3D1EgGnKcUo=";
};
vendorHash = "sha256-qDzd+aq08PN9kl1YkvNLGvWaFVh7xFXJhGdx/ELwYGY=";
vendorHash = "sha256-WCItbRbGgclXGtJyHCkDgaPe3Mobe4mT/4c16AEdF5o=";
env.CGO_ENABLED = 1;
@@ -21,7 +21,7 @@ from .html import HTMLRenderer
from .manpage import ManpageRenderer, man_escape
from .manual_structure import make_xml_id, XrefTarget
from .md import Converter, md_escape, md_make_code
from .types import OptionLoc, Option, RenderedOption
from .types import OptionLoc, Option, RenderedOption, AnchorStyle
def option_is(option: Option, key: str, typ: str) -> Optional[dict[str, str]]:
if key not in option:
@@ -317,10 +317,15 @@ class OptionsCommonMarkRenderer(OptionDocsRestrictions, CommonMarkRenderer):
class CommonMarkConverter(BaseConverter[OptionsCommonMarkRenderer]):
__option_block_separator__ = ""
_anchor_style: AnchorStyle
_anchor_prefix: str
def __init__(self, manpage_urls: Mapping[str, str], revision: str):
def __init__(self, manpage_urls: Mapping[str, str], revision: str, anchor_style: AnchorStyle = AnchorStyle.NONE, anchor_prefix: str = ""):
super().__init__(revision)
self._renderer = OptionsCommonMarkRenderer(manpage_urls)
self._anchor_style = anchor_style
self._anchor_prefix = anchor_prefix
def _parallel_render_prepare(self) -> Any:
return (self._renderer._manpage_urls, self._revision)
@@ -342,11 +347,21 @@ class CommonMarkConverter(BaseConverter[OptionsCommonMarkRenderer]):
def _decl_def_footer(self) -> list[str]:
return []
def _make_anchor_suffix(self, loc: list[str]) -> str:
if self._anchor_style == AnchorStyle.NONE:
return ""
elif self._anchor_style == AnchorStyle.LEGACY:
sanitized = ".".join(map(make_xml_id, loc))
return f" {{#{self._anchor_prefix}{sanitized}}}"
else:
raise RuntimeError("unhandled anchor style", self._anchor_style)
def finalize(self) -> str:
result = []
for (name, opt) in self._sorted_options():
result.append(f"## {md_escape(name)}\n")
anchor_suffix = self._make_anchor_suffix(opt.loc)
result.append(f"## {md_escape(name)}{anchor_suffix}\n")
result += opt.lines
result.append("\n\n")
@@ -490,9 +505,30 @@ def _build_cli_manpage(p: argparse.ArgumentParser) -> None:
p.add_argument("infile")
p.add_argument("outfile")
def parse_anchor_style(value: str|AnchorStyle) -> AnchorStyle:
if isinstance(value, AnchorStyle):
# Used by `argparse.add_argument`'s `default`
return value
try:
return AnchorStyle(value.lower())
except ValueError:
raise argparse.ArgumentTypeError(f"Invalid value {value}\nExpected one of {', '.join(style.value for style in AnchorStyle)}")
def _build_cli_commonmark(p: argparse.ArgumentParser) -> None:
p.add_argument('--manpage-urls', required=True)
p.add_argument('--revision', required=True)
p.add_argument(
'--anchor-style',
required=False,
default=AnchorStyle.NONE.value,
choices = [style.value for style in AnchorStyle],
help = "(default: %(default)s) Anchor style to use for links to options. \nOnly none is standard CommonMark."
)
p.add_argument('--anchor-prefix',
required=False,
default="",
help="(default: no prefix) String to prepend to anchor ids. Not used when anchor style is none."
)
p.add_argument("infile")
p.add_argument("outfile")
@@ -527,7 +563,10 @@ def _run_cli_manpage(args: argparse.Namespace) -> None:
def _run_cli_commonmark(args: argparse.Namespace) -> None:
with open(args.manpage_urls, 'r') as manpage_urls:
md = CommonMarkConverter(json.load(manpage_urls), revision = args.revision)
md = CommonMarkConverter(json.load(manpage_urls),
revision = args.revision,
anchor_style = parse_anchor_style(args.anchor_style),
anchor_prefix = args.anchor_prefix)
with open(args.infile, 'r') as f:
md.add_options(json.load(f))
@@ -1,4 +1,5 @@
from collections.abc import Sequence
from enum import Enum
from typing import Callable, Optional, NamedTuple
from markdown_it.token import Token
@@ -12,3 +13,7 @@ class RenderedOption(NamedTuple):
links: Optional[list[str]] = None
RenderFn = Callable[[Token, Sequence[Token], int], str]
class AnchorStyle(Enum):
NONE = "none"
LEGACY = "legacy"
@@ -0,0 +1,17 @@
{
"services.frobnicator.types.<name>.enable": {
"declarations": [
"nixos/modules/services/frobnicator.nix"
],
"description": "Whether to enable the frobnication of this (`<name>`) type.",
"loc": [
"services",
"frobnicator",
"types",
"<name>",
"enable"
],
"readOnly": false,
"type": "boolean"
}
}
@@ -0,0 +1,13 @@
## services\.frobnicator\.types\.\<name>\.enable
Whether to enable the frobnication of this (` <name> `) type\.
*Type:*
boolean
*Declared by:*
- [\<nixpkgs/nixos/modules/services/frobnicator\.nix>](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/frobnicator.nix)
@@ -0,0 +1,13 @@
## services\.frobnicator\.types\.\<name>\.enable {#opt-services.frobnicator.types._name_.enable}
Whether to enable the frobnication of this (` <name> `) type\.
*Type:*
boolean
*Declared by:*
- [\<nixpkgs/nixos/modules/services/frobnicator\.nix>](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/frobnicator.nix)
@@ -1,6 +1,9 @@
import nixos_render_docs
from nixos_render_docs.options import AnchorStyle
import json
from markdown_it.token import Token
from pathlib import Path
import pytest
def test_option_headings() -> None:
@@ -12,3 +15,27 @@ def test_option_headings() -> None:
type='heading_open', tag='h1', nesting=1, attrs={}, map=[0, 1], level=0, children=None,
content='', markup='#', info='', meta={}, block=True, hidden=False
)
def test_options_commonmark() -> None:
c = nixos_render_docs.options.CommonMarkConverter({}, 'local')
with Path('tests/sample_options_simple.json').open() as f:
opts = json.load(f)
assert opts is not None
with Path('tests/sample_options_simple_default.md').open() as f:
expected = f.read()
c.add_options(opts)
s = c.finalize()
assert s == expected
def test_options_commonmark_legacy_anchors() -> None:
c = nixos_render_docs.options.CommonMarkConverter({}, 'local', anchor_style = AnchorStyle.LEGACY, anchor_prefix = 'opt-')
with Path('tests/sample_options_simple.json').open() as f:
opts = json.load(f)
assert opts is not None
with Path('tests/sample_options_simple_legacy.md').open() as f:
expected = f.read()
c.add_options(opts)
s = c.finalize()
assert s == expected
+4 -2
View File
@@ -26,13 +26,15 @@ stdenv.mkDerivation {
hash = "sha256-SV8E+4qu5J7MueHmdsdTDKNx4CH085fidgIJyewj8RQ=";
};
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
python3
];
buildInputs = [
glm
jsoncpp
libGL
python3
vulkan-headers
vulkan-loader
xorg.libX11
+2 -2
View File
@@ -20,13 +20,13 @@ let
in
stdenv.mkDerivation rec {
pname = "p2pool";
version = "4.2";
version = "4.3";
src = fetchFromGitHub {
owner = "SChernykh";
repo = "p2pool";
rev = "v${version}";
hash = "sha256-zowRQeFrT0sY9L5XJQ10f8tRnEchjKVdBixtPbAQyvo=";
hash = "sha256-PHrmTkmpYOPKx9q+/mhjr8MIbFqmljKs2F26tqyCzcE=";
fetchSubmodules = true;
};
+1
View File
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://www.zlib.net/pigz/";
description = "Parallel implementation of gzip for multi-core machines";
mainProgram = "pigz";
maintainers = [ ];
license = licenses.zlib;
platforms = platforms.unix;
+5 -2
View File
@@ -12,20 +12,23 @@
makeWrapper,
makeDesktopItem,
copyDesktopItems,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "poptracker";
version = "0.27.0";
version = "0.29.0";
src = fetchFromGitHub {
owner = "black-sliver";
repo = "PopTracker";
rev = "v${finalAttrs.version}";
hash = "sha256-Tz3rVbaHw5RfFKuLih4BEEnn3uNeLrtDQpBD2yYUzkM=";
hash = "sha256-rkEaq8YLt0NhspXVgEqZ/9FF7GDlTU5fKgWGXeA6UX4=";
fetchSubmodules = true;
};
passthru.updateScript = nix-update-script { };
patches = [ ./assets-path.diff ];
postPatch = ''
+4 -4
View File
@@ -24,15 +24,15 @@ let
."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
hash =
{
x64-linux_hash = "sha256-ijBsMc/37cpw1WJ36vIUm1d0wzHjpTsBX9mZRkL91BU=";
arm64-linux_hash = "sha256-oTA1O6M/P7kGI/YCoWzTw6kvmMg+QGhpn/jWrOc4rug=";
x64-osx_hash = "sha256-ZAZ0Y5O64llljc/NjnOHynEP7wXB/U4J5T1n5Pe+2A4=";
x64-linux_hash = "sha256-dYYvrsYR+xsS9N/btJPCaCg4mS2UVgZs5FaBbWU4ytM=";
arm64-linux_hash = "sha256-Vfdq6Mngr3Cbq844Upq84k6gH0SnbpdPK0dU7LBnJO8=";
x64-osx_hash = "sha256-7mtnnbEQ+70qY5iSfX7pDUYPqKQG2JdzGRFgm1CEhs4=";
}
."${arch}-${os}_hash";
in
stdenv.mkDerivation rec {
pname = "readarr";
version = "0.4.6.2711";
version = "0.4.8.2726";
src = fetchurl {
url = "https://github.com/Readarr/Readarr/releases/download/v${version}/Readarr.develop.${version}.${os}-core-${arch}.tar.gz";
+914 -295
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -24,14 +24,14 @@
stdenv.mkDerivation (finalAttrs: {
pname = "recordbox";
version = "0.8.3";
version = "0.9.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "edestcroix";
repo = "Recordbox";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-/yg/75LswCj3HhsUhMXgIDpx2tlNkdTuImkqMwU6uio=";
hash = "sha256-KfIlh9ORqjJ5V8mNOx7Q9jsYg4OJDX6q+ht+eckxMRU=";
};
# Patch in our Cargo.lock and ensure AppStream tests don't use the network
@@ -2,6 +2,7 @@
stdenv,
lib,
fetchFromGitHub,
fetchpatch,
pkg-config,
python3,
autoreconfHook,
@@ -69,6 +70,14 @@ stdenv.mkDerivation {
oniguruma
];
patches = [
# https://github.com/haiwen/seafile-server/pull/658
(fetchpatch {
url = "https://github.com/haiwen/seafile-server/commit/8029a11a731bfe142af43f230f47b93811ebaaaa.patch";
hash = "sha256-AWNDXIyrKXgqgq3p0m8+s3YH8dKxWnf7uEMYzSsjmX4=";
})
];
postInstall = ''
mkdir -p $out/share/seafile/sql
cp -r scripts/sql $out/share/seafile
+2 -2
View File
@@ -8,13 +8,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "simdutf";
version = "5.7.2";
version = "6.0.3";
src = fetchFromGitHub {
owner = "simdutf";
repo = "simdutf";
rev = "v${finalAttrs.version}";
hash = "sha256-rSEl5g9FZiOrYRoHkBAUbMWE1kZvl3pbhkskzoMbIb0=";
hash = "sha256-BTnj7SUKgbJ2LM2gzw+8bSJ4+Zd6Z/KZy9B46fxIvsg=";
};
# Fix build on darwin
@@ -23,9 +23,6 @@
wxGTK,
xz,
zstd,
Carbon,
Cocoa,
IOKit,
}:
stdenv.mkDerivation rec {
@@ -41,33 +38,27 @@ stdenv.mkDerivation rec {
pkg-config
] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle;
buildInputs =
[
curl
freexl
geos
librasterlite2
librttopo
libspatialite
libwebp
libxlsxwriter
libxml2
lz4
minizip
openjpeg
postgresql
proj
sqlite
virtualpg
wxGTK
xz
zstd
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Carbon
Cocoa
IOKit
];
buildInputs = [
curl
freexl
geos
librasterlite2
librttopo
libspatialite
libwebp
libxlsxwriter
libxml2
lz4
minizip
openjpeg
postgresql
proj
sqlite
virtualpg
wxGTK
xz
zstd
];
enableParallelBuilding = true;
+2 -2
View File
@@ -8,11 +8,11 @@
}:
stdenvNoCC.mkDerivation rec {
pname = "swiftlint";
version = "0.57.1";
version = "0.58.0";
src = fetchurl {
url = "https://github.com/realm/SwiftLint/releases/download/${version}/portable_swiftlint.zip";
hash = "sha256-qi4Pj4JyVF5Vk+vt14cttREy/OxOrXbQAbvhevaceuU=";
hash = "sha256-Mp8S0f/xn3XHF4/doLF5s/kvhE+X6KiswY+3lZ/J4wc=";
};
dontPatch = true;
+7 -6
View File
@@ -1,21 +1,20 @@
{
lib,
buildGo122Module,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
# Does not build with Go 1.23
# FIXME: check again for next release
buildGo122Module rec {
buildGoModule rec {
pname = "tempo";
version = "2.6.0";
version = "2.7.0";
src = fetchFromGitHub {
owner = "grafana";
repo = "tempo";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-jWoGKY+kC9VAK7jPFaGMJQkC/JeAiUjzqKhE2XjuJio=";
hash = "sha256-aCtITq5qT0a1DuoSDK3F46cPvfVsvXOPkZELEuRYi5w=";
};
vendorHash = null;
@@ -39,6 +38,8 @@ buildGo122Module rec {
# tests use docker
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "High volume, minimal dependency trace storage";
license = licenses.asl20;
+2 -2
View File
@@ -16,11 +16,11 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ticktick";
version = "6.0.10";
version = "6.0.20";
src = fetchurl {
url = "https://d2atcrkye2ik4e.cloudfront.net/download/linux/linux_deb_x64/ticktick-${finalAttrs.version}-amd64.deb";
hash = "sha256-/SaQJFaz8quuFk4bLmRrvfYpqyDNTV/dJBrAJpOT4S4=";
hash = "sha256-aKUK0/9Y/ac9ISYJnWDUdwmvN8UYKzTY0f94nd8ofGw=";
};
nativeBuildInputs = [
+2 -2
View File
@@ -6,13 +6,13 @@
}:
stdenvNoCC.mkDerivation rec {
pname = "traccar";
version = "6.5";
version = "6.6";
nativeBuildInputs = [ pkgs.makeWrapper ];
src = fetchzip {
stripRoot = false;
url = "https://github.com/traccar/traccar/releases/download/v${version}/traccar-other-${version}.zip";
hash = "sha256-XCG3G24oe/qR6LiMJASb9STOnyTCtw+2HigaPawcQvU=";
hash = "sha256-NhsIp6u9XIMZC5PMTYBPAqpW4iNJWC0J4zxbG3c12cs=";
};
installPhase = ''
+2 -2
View File
@@ -13,13 +13,13 @@
stdenv.mkDerivation rec {
pname = "vokoscreen-ng";
version = "4.3.0";
version = "4.4.0";
src = fetchFromGitHub {
owner = "vkohaupt";
repo = "vokoscreenNG";
tag = version;
hash = "sha256-efgvq/jl/ecjtINy5BdqtYRp2gxEvOsMzQVyCZ3ig+Q=";
hash = "sha256-5rESTLIvjc/Jztc7LAPl74fxgDsam9SfBa6B5yTXb8E=";
};
qmakeFlags = [ "src/vokoscreenNG.pro" ];
+6 -6
View File
@@ -2,24 +2,24 @@
buildGo123Module rec {
pname = "webdav";
version = "5.7.0";
version = "5.7.1";
src = fetchFromGitHub {
owner = "hacdias";
repo = "webdav";
rev = "v${version}";
sha256 = "sha256-vQLYg7qqNO3b/93fO6/zydsakfvyfYSsCUGwNPF6PXY=";
tag = "v${version}";
hash = "sha256-nLQ77RuOGYaL+U3X3yb4Kq47NA1A3SSUMKBbFnRP6o4=";
};
vendorHash = "sha256-x5CUy46c4SunzMw/v2DWpdahuXFZnJdGInQ0lSho/es=";
__darwinAllowLocalNetworking = true;
meta = with lib; {
meta = {
description = "Simple WebDAV server";
homepage = "https://github.com/hacdias/webdav";
license = licenses.mit;
maintainers = with maintainers; [
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
pmy
pbsds
];
+4 -3
View File
@@ -17,13 +17,13 @@
rustPlatform.buildRustPackage rec {
pname = "wluma";
version = "4.5.1";
version = "4.6.0";
src = fetchFromGitHub {
owner = "maximbaz";
repo = "wluma";
rev = version;
sha256 = "sha256-5uSExmh1a88kZDly4VrHzI8YwfTDB8wm2mMGZyvKsk4=";
sha256 = "sha256-Z4sd2v6Ukr0bLGMiG/oBi0uic87Y1Ag9C3ZgyrR4VmI=";
};
postPatch = ''
@@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec {
'ExecStart=/usr/bin/wluma' 'ExecStart=${placeholder "out"}/bin/wluma'
'';
cargoHash = "sha256-hKxKEs88tB05AiWC/LuC/0jJ1RxeUnpp35A6UTQK4xw=";
cargoHash = "sha256-QyRGKhKsCVt6ykzzr+WJdiLpIZHVvL5sRzNucg/3llk=";
nativeBuildInputs = [
makeWrapper
@@ -77,6 +77,7 @@ rustPlatform.buildRustPackage rec {
yshym
jmc-figueira
atemu
Rishik-Y
];
platforms = platforms.linux;
mainProgram = "wluma";
+2 -2
View File
@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "xssproxy";
version = "1.1.0";
version = "1.1.1";
src = fetchFromGitHub {
owner = "vincentbernat";
repo = "xssproxy";
rev = "v${version}";
sha256 = "sha256-BE/v1CJAwKwxlK3Xg3ezD+IXyT7ZFGz3bQzGxFQfEnU=";
sha256 = "sha256-OPzFI1ifbV/DJo0hC2xybHKaWTprictN0muKtuq1JaY=";
};
nativeBuildInputs = [ pkg-config ];
@@ -9,13 +9,13 @@
# https://gitlab.com/ente76/guillotine/-/issues/17
stdenv.mkDerivation (finalAttrs: {
pname = "gnome-shell-extension-guillotine";
version = "24";
version = "25";
src = fetchFromGitLab {
owner = "ente76";
repo = "guillotine";
rev = "v${finalAttrs.version}";
hash = "sha256-eNhK3h9luPGXHR3lPkfu/mUN9+ixma64rbCk0cjF4Fc=";
hash = "sha256-HEk1owolLIea4kymoVVeviZ1Ms0kSuHWUda+u+uIh0A=";
};
nativeBuildInputs = [ glib ];
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
--replace 'OCIO_ADD_TEST(Config, virtual_display_with_active_displays)' 'static void _skip_virtual_display_with_active_displays()'
'';
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake ] ++ lib.optionals pythonBindings [ python3Packages.python ];
buildInputs =
[
expat
@@ -39,6 +39,13 @@ buildPythonPackage rec {
url = "https://github.com/mmatl/pyrender/commit/7c613e8aed7142df9ff40767a8f10b7a19b6255c.patch";
hash = "sha256-SXRV9RC3PfQGjjIQ+n97HZrSDPae3rAHnTBiHXSFLaY=";
})
# fix on numpy 2.0 (np.infty -> np.inf)
# https://github.com/mmatl/pyrender/pull/292
(fetchpatch {
name = "fix-numpy2.patch";
url = "https://github.com/mmatl/pyrender/commit/5408c7b45261473511d2399ab625efe11f0b6991.patch";
hash = "sha256-RIv6lMpxMmops5Tb1itzYdT7GkhPScVWslBXITR3IBM=";
})
];
# trimesh too new
@@ -45,6 +45,11 @@ buildPythonPackage rec {
pythonImportsCheck = [ "pyunpack" ];
disabledTests = [
# pinning test of `--help` sensitive to python version
"test_help"
];
disabledTestPaths = [
# unfree
"tests/test_rar.py"
@@ -2,9 +2,11 @@
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
pytestCheckHook,
matplotlib,
legacy-cgi,
python-snap7,
opencv4,
}:
@@ -43,9 +45,13 @@ buildPythonPackage rec {
build-system = [ setuptools ];
dependencies = [
setuptools # pkg_resources is referenced at runtime
];
dependencies =
[
setuptools # pkg_resources is referenced at runtime
]
++ lib.optionals (!pythonOlder "3.13") [
legacy-cgi
];
nativeCheckInputs = [
pytestCheckHook
@@ -17,6 +17,7 @@
freefont_ttf,
wrapQtAppsHook,
qtwayland,
fetchpatch,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -28,6 +29,13 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-KV8ahV2koX7OL1C42H5If14e7m54jv0DlZ1dNsVRUWE=";
};
patches = [
(fetchpatch {
url = "https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/patch/?id=9e33324644fff49b7aa15d34f836e72af8b32c78";
hash = "sha256-2XtEQ4WscLlUiEQYG2HiHuysMzVzlG05PVreLRVM8Lc=";
})
];
outputs = [ "out" ];
nativeBuildInputs = [
-30
View File
@@ -1,30 +0,0 @@
{ callPackage
, kernel ? null
, stdenv
, lib
, nixosTests
, ...
} @ args:
let
stdenv' = if kernel == null then stdenv else kernel.stdenv;
in
callPackage ./generic.nix args {
# You have to ensure that in `pkgs/top-level/linux-kernels.nix`
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfs_2_1";
# check the release notes for compatible kernels
kernelCompatible = kernel: kernel.kernelOlder "6.8";
# This is a fixed version to the 2.1.x series, move only
# if the 2.1.x series moves.
version = "2.1.16";
hash = "sha256-egs7paAOdbRAJH4QwIjlK3jAL/le51kDQrdW4deHfAI=";
tests = {
inherit (nixosTests.zfs) series_2_1;
};
maintainers = [ lib.maintainers.raitobezarius ];
}
+33
View File
@@ -0,0 +1,33 @@
{
callPackage,
kernel ? null,
stdenv,
lib,
nixosTests,
...
}@args:
let
stdenv' = if kernel == null then stdenv else kernel.stdenv;
in
callPackage ./generic.nix args {
# You have to ensure that in `pkgs/top-level/linux-kernels.nix`
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfs_2_3";
# check the release notes for compatible kernels
kernelCompatible = kernel: kernel.kernelOlder "6.13";
# this package should point to the latest release.
version = "2.3.0";
tests = {
inherit (nixosTests.zfs) installer series_2_3;
};
maintainers = with lib.maintainers; [
adamcstephens
amarshall
];
hash = "sha256-ZWWrVwMP/DSSIxuXp6GuHCD0wiRekHbRXFGaclqd/ns=";
}
+2 -2
View File
@@ -21,14 +21,14 @@ callPackage ./generic.nix args {
# IMPORTANT: Always use a tagged release candidate or commits from the
# zfs-<version>-staging branch, because this is tested by the OpenZFS
# maintainers.
version = "2.3.0-rc5";
version = "2.3.0";
# rev = "";
tests = {
inherit (nixosTests.zfs) unstable;
};
hash = "sha256-gTpj1hYEkx+f/VvvfgeZeqwUhBVQyOIMKic8AaiwYzg=";
hash = "sha256-ZWWrVwMP/DSSIxuXp6GuHCD0wiRekHbRXFGaclqd/ns=";
extraLongDescription = ''
This is "unstable" ZFS, and will usually be a pre-release version of ZFS.
@@ -6,7 +6,7 @@
stdenv.mkDerivation rec {
pname = "bubble-card";
version = "2.3.3";
version = "2.3.4";
dontBuild = true;
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
owner = "Clooos";
repo = "Bubble-Card";
rev = "v${version}";
hash = "sha256-fBkiOhUwXa7Fy8Q7n2DBrTek7SQF37exQkvBREWx0Zk=";
hash = "sha256-90If8QKlxacJZoEG3+IFHPd9cuFJS5Ki9XMdTaq67IA=";
};
installPhase = ''
+3 -3
View File
@@ -6,16 +6,16 @@
buildGoModule rec {
pname = "zed";
version = "0.21.2";
version = "0.24.0";
src = fetchFromGitHub {
owner = "authzed";
repo = "zed";
rev = "v${version}";
hash = "sha256-nSvWNelmqzgwf7M+9drqahwwo+YoQLgEscnigsBUwdI=";
hash = "sha256-gaTTHkJkKO3MY5tAVJNHEq6ZkcS1iSBSEh1eyPzsXQY=";
};
vendorHash = "sha256-uTuI8rYmRUkbRf46+hZm1xHflFDcro6hVG8aI2C4eWs=";
vendorHash = "sha256-7UwpkmFwYT8XP00pTlOK25WDweaalQfA4zX7yvlFWow=";
ldflags = [
"-X 'github.com/jzelinskie/cobrautil/v2.Version=${src.rev}'"
+2
View File
@@ -155,6 +155,8 @@ with pkgs;
nixos-functions = callPackage ./nixos-functions { };
nixosOptionsDoc = callPackage ../../nixos/lib/make-options-doc/tests.nix { };
overriding = callPackage ./overriding.nix { };
texlive = callPackage ./texlive { };
+169 -121
View File
@@ -1,15 +1,47 @@
{ lib, pkgs, stdenvNoCC }:
{
lib,
pkgs,
stdenvNoCC,
}:
let
tests =
tests = tests-stdenv // tests-go // tests-python;
tests-stdenv =
let
p = pkgs.python3Packages.xpybutil.overridePythonAttrs (_: { dontWrapPythonPrograms = true; });
addEntangled =
origOverrideAttrs: f:
origOverrideAttrs (
lib.composeExtensions f (
self: super: {
passthru = super.passthru // {
entangled = super.passthru.entangled.overrideAttrs f;
overrideAttrs = addEntangled self.overrideAttrs;
};
}
)
);
entangle =
pkg1: pkg2:
pkg1.overrideAttrs (
self: super: {
passthru = super.passthru // {
entangled = pkg2;
overrideAttrs = addEntangled self.overrideAttrs;
};
}
);
example = entangle pkgs.hello pkgs.figlet;
overrides1 = example.overrideAttrs (_: super: { pname = "a-better-${super.pname}"; });
repeatedOverrides = overrides1.overrideAttrs (
_: super: { pname = "${super.pname}-with-blackjack"; }
);
in
{
overridePythonAttrs = {
expr = !lib.hasInfix "wrapPythonPrograms" p.postFixup;
expected = true;
};
repeatedOverrides-pname = {
expr = repeatedOverrides.pname == "a-better-hello-with-blackjack";
expected = true;
@@ -24,31 +56,120 @@ let
};
overriding-using-only-attrset-no-final-attrs = {
name = "overriding-using-only-attrset-no-final-attrs";
expr = ((stdenvNoCC.mkDerivation { pname = "hello-no-final-attrs"; }).overrideAttrs { pname = "hello-no-final-attrs-overridden"; }).pname == "hello-no-final-attrs-overridden";
expr =
((stdenvNoCC.mkDerivation { pname = "hello-no-final-attrs"; }).overrideAttrs {
pname = "hello-no-final-attrs-overridden";
}).pname == "hello-no-final-attrs-overridden";
expected = true;
};
};
tests-go =
let
pet_0_3_4 = pkgs.buildGoModule rec {
pname = "pet";
version = "0.3.4";
src = pkgs.fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
hash = "sha256-Gjw1dRrgM8D3G7v6WIM2+50r4HmTXvx0Xxme2fH9TlQ=";
};
vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
meta = {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kalbasit ];
};
};
pet_0_4_0 = pkgs.buildGoModule rec {
pname = "pet";
version = "0.4.0";
src = pkgs.fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
hash = "sha256-gVTpzmXekQxGMucDKskGi+e+34nJwwsXwvQTjRO6Gdg=";
};
vendorHash = "sha256-dUvp7FEW09V0xMuhewPGw3TuAic/sD7xyXEYviZ2Ivs=";
meta = {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kalbasit ];
};
};
pet_0_4_0-overridden = pet_0_3_4.overrideAttrs (
finalAttrs: previousAttrs: {
version = "0.4.0";
src = pkgs.fetchFromGitHub {
inherit (previousAttrs.src) owner repo;
rev = "v${finalAttrs.version}";
hash = "sha256-gVTpzmXekQxGMucDKskGi+e+34nJwwsXwvQTjRO6Gdg=";
};
vendorHash = "sha256-dUvp7FEW09V0xMuhewPGw3TuAic/sD7xyXEYviZ2Ivs=";
}
);
pet-foo = pet_0_3_4.overrideAttrs (
finalAttrs: previousAttrs: {
passthru = previousAttrs.passthru // {
overrideModAttrs = lib.composeExtensions previousAttrs.passthru.overrideModAttrs (
finalModAttrs: previousModAttrs: {
FOO = "foo";
}
);
};
}
);
pet-vendored = pet-foo.overrideAttrs { vendorHash = null; };
in
{
buildGoModule-overrideAttrs = {
expr = lib.all (
attrPath:
let
attrPathPretty = lib.concatStringsSep "." attrPath;
valueNative = lib.getAttrFromPath attrPath pet_0_4_0;
valueOverridden = lib.getAttrFromPath attrPath pet_0_4_0-overridden;
in
lib.warnIfNot
(valueNative == valueOverridden)
"pet_0_4_0.${attrPathPretty} (${valueNative}) does not equal pet_0_4_0-overridden.${attrPathPretty} (${valueOverridden})"
true
) [
[ "drvPath" ]
[ "name" ]
[ "pname" ]
[ "version" ]
[ "vendorHash" ]
[ "goModules" "drvPath" ]
[ "goModules" "name" ]
[ "goModules" "outputHash" ]
];
expr =
lib.all
(
attrPath:
let
attrPathPretty = lib.concatStringsSep "." attrPath;
valueNative = lib.getAttrFromPath attrPath pet_0_4_0;
valueOverridden = lib.getAttrFromPath attrPath pet_0_4_0-overridden;
in
lib.warnIfNot (valueNative == valueOverridden)
"pet_0_4_0.${attrPathPretty} (${valueNative}) does not equal pet_0_4_0-overridden.${attrPathPretty} (${valueOverridden})"
true
)
[
[ "drvPath" ]
[ "name" ]
[ "pname" ]
[ "version" ]
[ "vendorHash" ]
[
"goModules"
"drvPath"
]
[
"goModules"
"name"
]
[
"goModules"
"outputHash"
]
];
expected = true;
};
buildGoModule-goModules-overrideAttrs = {
@@ -61,102 +182,29 @@ let
};
};
addEntangled = origOverrideAttrs: f:
origOverrideAttrs (
lib.composeExtensions f (self: super: {
passthru = super.passthru // {
entangled = super.passthru.entangled.overrideAttrs f;
overrideAttrs = addEntangled self.overrideAttrs;
};
})
);
entangle = pkg1: pkg2: pkg1.overrideAttrs (self: super: {
passthru = super.passthru // {
entangled = pkg2;
overrideAttrs = addEntangled self.overrideAttrs;
};
});
example = entangle pkgs.hello pkgs.figlet;
overrides1 = example.overrideAttrs (_: super: { pname = "a-better-${super.pname}"; });
repeatedOverrides = overrides1.overrideAttrs (_: super: { pname = "${super.pname}-with-blackjack"; });
pet_0_3_4 = pkgs.buildGoModule rec {
pname = "pet";
version = "0.3.4";
src = pkgs.fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
hash = "sha256-Gjw1dRrgM8D3G7v6WIM2+50r4HmTXvx0Xxme2fH9TlQ=";
};
vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
meta = {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kalbasit ];
};
};
pet_0_4_0 = pkgs.buildGoModule rec {
pname = "pet";
version = "0.4.0";
src = pkgs.fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
hash = "sha256-gVTpzmXekQxGMucDKskGi+e+34nJwwsXwvQTjRO6Gdg=";
};
vendorHash = "sha256-dUvp7FEW09V0xMuhewPGw3TuAic/sD7xyXEYviZ2Ivs=";
meta = {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kalbasit ];
};
};
pet_0_4_0-overridden = pet_0_3_4.overrideAttrs (finalAttrs: previousAttrs: {
version = "0.4.0";
src = pkgs.fetchFromGitHub {
inherit (previousAttrs.src) owner repo;
rev = "v${finalAttrs.version}";
hash = "sha256-gVTpzmXekQxGMucDKskGi+e+34nJwwsXwvQTjRO6Gdg=";
};
vendorHash = "sha256-dUvp7FEW09V0xMuhewPGw3TuAic/sD7xyXEYviZ2Ivs=";
});
pet-foo = pet_0_3_4.overrideAttrs (
finalAttrs: previousAttrs: {
passthru = previousAttrs.passthru // {
overrideModAttrs = lib.composeExtensions previousAttrs.passthru.overrideModAttrs (
finalModAttrs: previousModAttrs: {
FOO = "foo";
}
);
tests-python =
let
p = pkgs.python3Packages.xpybutil.overridePythonAttrs (_: {
dontWrapPythonPrograms = true;
});
in
{
overridePythonAttrs = {
expr = !lib.hasInfix "wrapPythonPrograms" p.postFixup;
expected = true;
};
}
);
pet-vendored = pet-foo.overrideAttrs { vendorHash = null; };
};
in
stdenvNoCC.mkDerivation {
name = "test-overriding";
passthru = { inherit tests; };
buildCommand = ''
touch $out
'' + lib.concatMapAttrsStringSep "\n" (name: t: "([[ ${lib.boolToString t.expr} == ${lib.boolToString t.expected} ]] && echo '${name} success') || (echo '${name} fail' && exit 1)") tests;
buildCommand =
''
touch $out
''
+ lib.concatMapAttrsStringSep "\n" (
name: t:
"([[ ${lib.boolToString t.expr} == ${lib.boolToString t.expected} ]] && echo '${name} success') || (echo '${name} fail' && exit 1)"
) tests;
}
@@ -31,6 +31,13 @@ stdenv.mkDerivation rec {
})
];
# clang > 17 dropped support for `-export-dynamic` but `-rdynamic` does the
# same thing
postPatch = ''
substituteInPlace platform.m4 \
--replace-fail -export-dynamic -rdynamic
'';
nativeBuildInputs = [
autoreconfHook
gnustep.base
+2
View File
@@ -1228,6 +1228,7 @@ mapAliases {
SP800-90B_EntropyAssessment = sp800-90b-entropyassessment; # Added on 2024-06-12
SPAdes = spades; # Added 2024-06-12
spark2014 = gnatprove; # Added 2024-02-25
spatialite_gui = throw "spatialite_gui has been renamed to spatialite-gui"; # Added 2025-01-12
# Added 2020-02-10
sourceHanSansPackages = {
@@ -1496,6 +1497,7 @@ mapAliases {
zeromq4 = zeromq; # Added 2024-11-03
zfsStable = zfs; # Added 2024-02-26
zfsUnstable = zfs_unstable; # Added 2024-02-26
zfs_2_1 = throw "zfs 2.1 has been removed as it is EOL. Please upgrade to a newer version"; # Added 2024-12-25
zinc = zincsearch; # Added 2023-05-28
zk-shell = throw "zk-shell has been removed as it was broken and unmaintained"; # Added 2024-08-10
zkg = throw "'zkg' has been replaced by 'zeek'";
+5 -6
View File
@@ -4539,7 +4539,7 @@ with pkgs;
openvpn_learnaddress = callPackage ../tools/networking/openvpn/openvpn_learnaddress.nix { };
openvpn-auth-ldap = callPackage ../tools/networking/openvpn/openvpn-auth-ldap.nix {
inherit (llvmPackages_17) stdenv;
inherit (llvmPackages) stdenv;
};
namespaced-openvpn = python3Packages.callPackage ../tools/networking/namespaced-openvpn { };
@@ -12545,18 +12545,18 @@ with pkgs;
inherit
({
zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix {
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
configFile = "user";
};
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
zfs_2_3 = callPackage ../os-specific/linux/zfs/2_3.nix {
configFile = "user";
};
zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix {
configFile = "user";
};
})
zfs_2_1
zfs_2_2
zfs_2_3
zfs_unstable;
zfs = zfs_2_2;
@@ -12855,8 +12855,7 @@ with pkgs;
qmapshack = libsForQt5.callPackage ../applications/gis/qmapshack { };
spatialite_gui = callPackage ../applications/gis/spatialite-gui {
inherit (darwin.apple_sdk.frameworks) Carbon Cocoa IOKit;
spatialite-gui = callPackage ../by-name/sp/spatialite-gui/package.nix {
wxGTK = wxGTK32;
};
+3 -2
View File
@@ -585,11 +585,11 @@ in {
zenpower = callPackage ../os-specific/linux/zenpower { };
zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix {
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
configFile = "kernel";
inherit pkgs kernel;
};
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
zfs_2_3 = callPackage ../os-specific/linux/zfs/2_3.nix {
configFile = "kernel";
inherit pkgs kernel;
};
@@ -620,6 +620,7 @@ in {
tsme-test = callPackage ../os-specific/linux/tsme-test { };
} // lib.optionalAttrs config.allowAliases {
zfs_2_1 = throw "zfs_2_1 has been removed"; # added 2024-12-25;
ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18;
hid-nintendo = throw "hid-nintendo was added in mainline kernel version 5.16"; # Added 2023-07-30
sch_cake = throw "sch_cake was added in mainline kernel version 4.19"; # Added 2023-06-14