From 3daea5fa9be672031f97fe3b2c360257821165e5 Mon Sep 17 00:00:00 2001 From: Philip Munksgaard Date: Thu, 4 Aug 2022 13:49:00 +0200 Subject: [PATCH 01/10] nixos-containers: Make sure same version of nixos-container is used Fixes #185126 (I hope) --- nixos/modules/virtualisation/nixos-containers.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix index e2fb28ed6332..f3324b3fe79c 100644 --- a/nixos/modules/virtualisation/nixos-containers.nix +++ b/nixos/modules/virtualisation/nixos-containers.nix @@ -9,6 +9,10 @@ let configurationDirectory = "/etc/${configurationDirectoryName}"; stateDirectory = "/var/lib/${configurationPrefix}containers"; + nixos-container = pkgs.nixos-container.override { + inherit stateDirectory configurationDirectory; + }; + # The container's init script, a small wrapper around the regular # NixOS stage-2 init script. containerInit = (cfg: @@ -248,7 +252,7 @@ let ExecReload = pkgs.writeScript "reload-container" '' #! ${pkgs.runtimeShell} -e - ${pkgs.nixos-container}/bin/nixos-container run "$INSTANCE" -- \ + ${nixos-container}/bin/nixos-container run "$INSTANCE" -- \ bash --login -c "''${SYSTEM_PATH:-/nix/var/nix/profiles/system}/bin/switch-to-configuration test" ''; @@ -866,9 +870,7 @@ in ''; environment.systemPackages = [ - (pkgs.nixos-container.override { - inherit stateDirectory configurationDirectory; - }) + nixos-container ]; boot.kernelModules = [ From 99e0091caea00bbf2e6b39cf15cc4186eeb5eec4 Mon Sep 17 00:00:00 2001 From: alyaeanyx Date: Wed, 2 Nov 2022 09:27:50 +0100 Subject: [PATCH 02/10] freetube: 0.17.1 -> 0.18.0 --- pkgs/applications/video/freetube/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/freetube/default.nix b/pkgs/applications/video/freetube/default.nix index b507c0d31947..dd35fc784731 100644 --- a/pkgs/applications/video/freetube/default.nix +++ b/pkgs/applications/video/freetube/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "freetube"; - version = "0.17.1"; + version = "0.18.0"; src = fetchurl { url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${version}-beta/freetube_${version}_amd64.AppImage"; - sha256 = "1n5r1h2khjwdsckiviv8f2pflxibk8rs68fs08jak0kbm0kkyj18"; + sha256 = "sha256-7IxmlkExM8Q1yyq44ajZ6on4EMPyGt23QmzmBZmofts="; }; appimageContents = appimageTools.extractType2 { From 2ec4eec9fa46bfb5a9ce1489f49d1b3138c72fe4 Mon Sep 17 00:00:00 2001 From: Dmitry Ivankov Date: Tue, 8 Nov 2022 22:19:11 +0100 Subject: [PATCH 03/10] firmware-updater: update hashes Was able to build this package after updating hashes. Hydra failures don't mention hash mismatch, but maybe update will still help. ZHF: #199919 --- .../os-specific/linux/firmware/firmware-updater/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/firmware/firmware-updater/default.nix b/pkgs/os-specific/linux/firmware/firmware-updater/default.nix index cc906b763e8e..1fbf649f0630 100644 --- a/pkgs/os-specific/linux/firmware/firmware-updater/default.nix +++ b/pkgs/os-specific/linux/firmware/firmware-updater/default.nix @@ -1,13 +1,17 @@ { lib , flutter2 , fetchFromGitHub +, stdenv }: flutter2.mkFlutterApp { pname = "firmware-updater"; version = "unstable"; - vendorHash = "sha256-7uOiebGBcX61oUyNCi1h9KldTRTrCfYaHUQSH4J5OoQ="; + vendorHash = + if stdenv.system == "aarch64-linux" + then "sha256-2eleXBlg2jxDDBF5rInyqZa3n14X6UdQn6ND7FTieVA=" + else "sha256-nPblucEpNCBJYpIqx1My6SWq8CjXYuHDG/uphdcrWjQ="; src = fetchFromGitHub { owner = "canonical"; From f9254f470cea648cfb5783f1c6ef691eda037190 Mon Sep 17 00:00:00 2001 From: divanorama Date: Tue, 8 Nov 2022 22:52:57 +0100 Subject: [PATCH 04/10] Update pkgs/os-specific/linux/firmware/firmware-updater/default.nix --- pkgs/os-specific/linux/firmware/firmware-updater/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/firmware/firmware-updater/default.nix b/pkgs/os-specific/linux/firmware/firmware-updater/default.nix index 1fbf649f0630..04fb8b0fe379 100644 --- a/pkgs/os-specific/linux/firmware/firmware-updater/default.nix +++ b/pkgs/os-specific/linux/firmware/firmware-updater/default.nix @@ -10,7 +10,7 @@ flutter2.mkFlutterApp { vendorHash = if stdenv.system == "aarch64-linux" - then "sha256-2eleXBlg2jxDDBF5rInyqZa3n14X6UdQn6ND7FTieVA=" + then "sha256-+ACmcIKXtGtaYBuwc7jY9hEdIS9qxQCbuxRKJQohX5A=" else "sha256-nPblucEpNCBJYpIqx1My6SWq8CjXYuHDG/uphdcrWjQ="; src = fetchFromGitHub { From 1682b3d09480122da4c69928a9122a7647ccbf69 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 13 Nov 2022 22:38:18 +0200 Subject: [PATCH 05/10] libutempter: 1.1.6 -> 1.2.1 refresh the patch to use utempter in path so patching the reverse dependencies won't be needed anymore ('pkgs/tools/networking/mosh/utempter_path.patch') --- .../libraries/libutempter/default.nix | 9 ++++-- .../libraries/libutempter/exec_path.patch | 31 ++++++++++++------- pkgs/tools/networking/mosh/default.nix | 1 - .../tools/networking/mosh/utempter_path.patch | 14 --------- 4 files changed, 25 insertions(+), 30 deletions(-) delete mode 100644 pkgs/tools/networking/mosh/utempter_path.patch diff --git a/pkgs/development/libraries/libutempter/default.nix b/pkgs/development/libraries/libutempter/default.nix index 6c0406bf4013..3b63ef9386b3 100644 --- a/pkgs/development/libraries/libutempter/default.nix +++ b/pkgs/development/libraries/libutempter/default.nix @@ -4,17 +4,19 @@ with lib; stdenv.mkDerivation rec { pname = "libutempter"; - version = "1.1.6"; + version = "1.2.1"; src = fetchurl { - url = "mirror://ubuntu/pool/main/libu/libutempter/libutempter_${version}.orig.tar.bz2"; - sha256 = "15y3xbgznjxnfmix4xg3bwmqdvghdw7slbhazb0ybmyf65gmd65q"; + url = "http://ftp.altlinux.org/pub/people/ldv/utempter/libutempter-${version}.tar.gz"; + sha256 = "sha256-ln/vNy85HeUBhDrYdXDGz12r2WUfAPF4MJD7wSsqNMs="; }; buildInputs = [ glib ]; patches = [ ./exec_path.patch ]; + patchFlags = [ "-p2" ]; + prePatch = '' substituteInPlace Makefile --replace 2711 0711 ''; @@ -27,6 +29,7 @@ stdenv.mkDerivation rec { ]; meta = { + homepage = "https://github.com/altlinux/libutempter"; description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files"; longDescription = '' The bundled utempter binary must be able to run as a user belonging to group utmp. diff --git a/pkgs/development/libraries/libutempter/exec_path.patch b/pkgs/development/libraries/libutempter/exec_path.patch index bd5f56611ef9..da3fe110fb67 100644 --- a/pkgs/development/libraries/libutempter/exec_path.patch +++ b/pkgs/development/libraries/libutempter/exec_path.patch @@ -1,19 +1,28 @@ -diff -ur libutempter-1.1.6/iface.c libutempter-1.1.6.patched/iface.c ---- libutempter-1.1.6/iface.c 2010-11-04 18:14:53.000000000 +0100 -+++ libutempter-1.1.6.patched/iface.c 2018-06-06 15:09:11.417755549 +0200 -@@ -60,9 +60,9 @@ +diff --git a/libutempter/iface.c b/libutempter/iface.c +index 37c74a8..6f44c9a 100644 +--- a/libutempter/iface.c ++++ b/libutempter/iface.c +@@ -43,7 +43,7 @@ + __result; })) + #endif + +-#define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter" ++#define UTEMPTER_DEFAULT_PATHNAME "utempter" + + static const char *utempter_pathname; + static int saved_fd = -1; +@@ -57,8 +57,8 @@ do_child(int master_fd, const char *path, char *const *argv) _exit(EXIT_FAILURE); } - execv(path, argv); +- print_dbg("execv: %s", strerror(errno)); + execvp(path, argv); - #ifdef UTEMPTER_DEBUG -- fprintf(stderr, "libutempter: execv: %s\n", strerror(errno)); -+ fprintf(stderr, "libutempter: execvp: %s\n", strerror(errno)); - #endif ++ print_dbg("execvp: %s", strerror(errno)); - while (EACCES == errno) -@@ -79,7 +79,7 @@ + while (EACCES == errno) { + /* try saved group ID */ +@@ -73,7 +73,7 @@ do_child(int master_fd, const char *path, char *const *argv) if (setgid(sgid)) break; @@ -21,5 +30,3 @@ diff -ur libutempter-1.1.6/iface.c libutempter-1.1.6.patched/iface.c + (void) execvp(path, argv); break; } - -Only in libutempter-1.1.6.patched: result diff --git a/pkgs/tools/networking/mosh/default.nix b/pkgs/tools/networking/mosh/default.nix index bea16b809d19..45ef93462aee 100644 --- a/pkgs/tools/networking/mosh/default.nix +++ b/pkgs/tools/networking/mosh/default.nix @@ -24,7 +24,6 @@ stdenv.mkDerivation rec { patches = [ ./ssh_path.patch ./mosh-client_path.patch - ./utempter_path.patch # Fix build with bash-completion 2.10 ./bash_completion_datadir.patch ]; diff --git a/pkgs/tools/networking/mosh/utempter_path.patch b/pkgs/tools/networking/mosh/utempter_path.patch deleted file mode 100644 index a981708ffadf..000000000000 --- a/pkgs/tools/networking/mosh/utempter_path.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ur mosh-1.3.2/src/frontend/mosh-server.cc mosh-1.3.2.patched/src/frontend/mosh-server.cc ---- mosh-1.3.2/src/frontend/mosh-server.cc 2017-07-22 23:14:53.000000000 +0200 -+++ mosh-1.3.2.patched/src/frontend/mosh-server.cc 2018-06-06 10:45:50.725352804 +0200 -@@ -351,6 +351,10 @@ - } - } - -+#ifdef HAVE_UTEMPTER -+ utempter_set_helper( "utempter" ); -+#endif -+ - try { - return run_server( desired_ip, desired_port, command_path, command_argv, colors, verbose, with_motd ); - } catch ( const Network::NetworkException &e ) { From 56a574567998855b5f46d6107edf64ed3e66fd3d Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 13 Nov 2022 23:04:45 +0200 Subject: [PATCH 06/10] tmux: build with utempter with utempter tmux will be shown in who fixes issue 155446 withUtempter argument copied from mosh --- pkgs/tools/misc/tmux/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix index 0602f9d19d83..73837f0ef644 100644 --- a/pkgs/tools/misc/tmux/default.nix +++ b/pkgs/tools/misc/tmux/default.nix @@ -8,6 +8,7 @@ , pkg-config , withSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isStatic, systemd , utf8proc +, withUtempter ? stdenv.isLinux && !stdenv.hostPlatform.isMusl, libutempter }: let @@ -44,12 +45,14 @@ stdenv.mkDerivation rec { ncurses libevent ] ++ lib.optionals withSystemd [ systemd ] - ++ lib.optionals stdenv.isDarwin [ utf8proc ]; + ++ lib.optionals stdenv.isDarwin [ utf8proc ] + ++ lib.optionals withUtempter [ libutempter ]; configureFlags = [ "--sysconfdir=/etc" "--localstatedir=/var" ] ++ lib.optionals withSystemd [ "--enable-systemd" ] + ++ lib.optionals withUtempter [ "--enable-utempter" ] ++ lib.optionals stdenv.isDarwin [ "--enable-utf8proc" ]; enableParallelBuilding = true; From 2af809015a65810571e7e8d8541b4ca7ba25b8d4 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 13 Nov 2022 23:21:50 +0200 Subject: [PATCH 07/10] nixos/tmux: add withUtempter option --- nixos/modules/programs/tmux.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/nixos/modules/programs/tmux.nix b/nixos/modules/programs/tmux.nix index cf7ea4cfcf76..4fb9175fb8d2 100644 --- a/nixos/modules/programs/tmux.nix +++ b/nixos/modules/programs/tmux.nix @@ -178,6 +178,16 @@ in { description = lib.mdDoc "List of plugins to install."; example = lib.literalExpression "[ pkgs.tmuxPlugins.nord ]"; }; + + withUtempter = mkOption { + description = lib.mdDoc '' + Whether to enable libutempter for tmux. + This is required so that tmux can write to /var/run/utmp (which can be queried with `who` to display currently connected user sessions). + Note, this will add a guid wrapper for the group utmp! + ''; + default = true; + type = types.bool; + }; }; }; @@ -193,6 +203,15 @@ in { TMUX_TMPDIR = lib.optional cfg.secureSocket ''''${XDG_RUNTIME_DIR:-"/run/user/$(id -u)"}''; }; }; + security.wrappers = mkIf cfg.withUtempter { + utempter = { + source = "${pkgs.libutempter}/lib/utempter/utempter"; + owner = "root"; + group = "utmp"; + setuid = false; + setgid = true; + }; + }; }; imports = [ From 8a1e1572089b254583a9b5e5fcb80ce7f7e13bf0 Mon Sep 17 00:00:00 2001 From: sg2002 Date: Wed, 16 Nov 2022 19:47:55 +0300 Subject: [PATCH 08/10] exempi: remove gcc6Stdenv override on i686 --- pkgs/top-level/all-packages.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 753c5d237ff0..4638dff7b813 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6468,7 +6468,6 @@ with pkgs; exempi = callPackage ../development/libraries/exempi { stdenv = if stdenv.isDarwin then stdenv - else if stdenv.isi686 then gcc6Stdenv else gcc9Stdenv; boost = if stdenv.isDarwin then boost else boost15x; }; From 8d3254afaf432a3d9861e90cebdbd049699270e6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 17 Nov 2022 03:41:58 +0000 Subject: [PATCH 09/10] ssh-to-age: 1.0.2 -> 1.0.3 --- pkgs/tools/security/ssh-to-age/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/ssh-to-age/default.nix b/pkgs/tools/security/ssh-to-age/default.nix index d6a26dc957f5..fc966655faac 100644 --- a/pkgs/tools/security/ssh-to-age/default.nix +++ b/pkgs/tools/security/ssh-to-age/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "ssh-to-age"; - version = "1.0.2"; + version = "1.0.3"; src = fetchFromGitHub { owner = "Mic92"; repo = "ssh-to-age"; rev = version; - sha256 = "sha256-sjiOmIoFyl1Kr4RKg1TqXJNIq2/HF91oxDLtRDa+eWw="; + sha256 = "sha256-tasR0p+8Y315zngWbDPUmn4O/SaIw+gKGPLT5FGymuo="; }; - vendorSha256 = "sha256-Xi5aJAYgbtrDq7KBAfZR1LT5/jbslwEa70qaFqW4vcQ="; + vendorSha256 = "sha256-1iDFM6KNsvvwOTg05TAJZvHVTv+Gc0nG0STzNdk0NB4="; checkPhase = '' runHook preCheck From 54be84c3ac0122c2b2272fc68a9015304bc0bb73 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Nov 2022 18:30:43 +0000 Subject: [PATCH 10/10] pass2csv: 0.3.2 -> 1.0.0 --- pkgs/tools/security/pass2csv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/pass2csv/default.nix b/pkgs/tools/security/pass2csv/default.nix index 2e48f541ca84..95649695bfff 100644 --- a/pkgs/tools/security/pass2csv/default.nix +++ b/pkgs/tools/security/pass2csv/default.nix @@ -7,12 +7,12 @@ buildPythonApplication rec { pname = "pass2csv"; - version = "0.3.2"; + version = "1.0.0"; format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "03a11bd0b0905737f4adb21d87aa1653d84cc1d9b5dcfdfb8a29092245d65db8"; + sha256 = "sha256-a/PQl/nqdj9xOM2hfAIiLuGy5F4KmEWFJihZ4gilaJw="; }; nativeBuildInputs = [