diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-22 19:21:26 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-22 19:21:26 +0000 |
commit | ea2acbed493e218f696673a004a95829392c5e33 (patch) | |
tree | c5716552f205bbf4d4addfa4675ea5073786bd06 /nixpkgs/pkgs/os-specific | |
parent | 06ba6c84f858b011fb1132721e5d5e28fcda4a8a (diff) | |
parent | 8aa8cd68f4745eb92f003666bfd300f3e67cd9c1 (diff) | |
download | nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.gz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.bz2 nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.lz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.xz nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.zst nixlib-ea2acbed493e218f696673a004a95829392c5e33.zip |
Merge branch 'staging' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/os-specific')
67 files changed, 509 insertions, 575 deletions
diff --git a/nixpkgs/pkgs/os-specific/darwin/rectangle/default.nix b/nixpkgs/pkgs/os-specific/darwin/rectangle/default.nix index 3eb75ab432fc..b59c6051de72 100644 --- a/nixpkgs/pkgs/os-specific/darwin/rectangle/default.nix +++ b/nixpkgs/pkgs/os-specific/darwin/rectangle/default.nix @@ -7,11 +7,11 @@ stdenvNoCC.mkDerivation rec { pname = "rectangle"; - version = "0.70"; + version = "0.71"; src = fetchurl { url = "https://github.com/rxhanson/Rectangle/releases/download/v${version}/Rectangle${version}.dmg"; - hash = "sha256-YJYDzmFfLlXDupyEjoEAin5qynyLjXjuav1DSS/Q5zU="; + hash = "sha256-QsvEBTuLh5GyVzNTKaJAVwPNtYCc/3yH+U8VgXE4nk0="; }; sourceRoot = "."; @@ -37,7 +37,7 @@ stdenvNoCC.mkDerivation rec { homepage = "https://rectangleapp.com/"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; platforms = platforms.darwin; - maintainers = with maintainers; [ Enzime Intuinewin ]; + maintainers = with maintainers; [ Enzime Intuinewin wegank ]; license = licenses.mit; }; } diff --git a/nixpkgs/pkgs/os-specific/darwin/sketchybar/default.nix b/nixpkgs/pkgs/os-specific/darwin/sketchybar/default.nix index b2b4186b7eb8..069fac3d59f1 100644 --- a/nixpkgs/pkgs/os-specific/darwin/sketchybar/default.nix +++ b/nixpkgs/pkgs/os-specific/darwin/sketchybar/default.nix @@ -9,6 +9,7 @@ , IOKit , MediaRemote , SkyLight +, testers }: let @@ -53,6 +54,11 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; + passthru.tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + version = "sketchybar-v${finalAttrs.version}"; + }; + meta = { description = "A highly customizable macOS status bar replacement"; homepage = "https://github.com/FelixKratz/SketchyBar"; diff --git a/nixpkgs/pkgs/os-specific/darwin/skhd/default.nix b/nixpkgs/pkgs/os-specific/darwin/skhd/default.nix index be70e1c8bcd7..fa6e1aa01e9f 100644 --- a/nixpkgs/pkgs/os-specific/darwin/skhd/default.nix +++ b/nixpkgs/pkgs/os-specific/darwin/skhd/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , Carbon , Cocoa +, testers }: stdenv.mkDerivation (finalAttrs: { @@ -31,6 +32,11 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace $out/Library/LaunchDaemons/org.nixos.skhd.plist --subst-var out ''; + passthru.tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + version = "skhd-v${finalAttrs.version}"; + }; + meta = { description = "Simple hotkey daemon for macOS"; homepage = "https://github.com/koekeishiya/skhd"; diff --git a/nixpkgs/pkgs/os-specific/darwin/utm/default.nix b/nixpkgs/pkgs/os-specific/darwin/utm/default.nix index 2a9879085b0c..d3aea9209727 100644 --- a/nixpkgs/pkgs/os-specific/darwin/utm/default.nix +++ b/nixpkgs/pkgs/os-specific/darwin/utm/default.nix @@ -7,11 +7,11 @@ stdenvNoCC.mkDerivation rec { pname = "utm"; - version = "4.2.5"; + version = "4.3.5"; src = fetchurl { url = "https://github.com/utmapp/UTM/releases/download/v${version}/UTM.dmg"; - hash = "sha256-T3TA+CwddNtUL80xASRCSczGA2LLTwPEA2+jnc9m6jY="; + hash = "sha256-aDIjf4TqhSIgYaJulI5FgXxlNiZ1qcNY+Typ7+S5Hc8="; }; nativeBuildInputs = [ undmg makeWrapper ]; @@ -62,6 +62,6 @@ stdenvNoCC.mkDerivation rec { license = licenses.asl20; platforms = platforms.darwin; # 11.3 is the minimum supported version as of UTM 4. sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - maintainers = with maintainers; [ rrbutani ]; + maintainers = with maintainers; [ rrbutani wegank ]; }; } diff --git a/nixpkgs/pkgs/os-specific/linux/apfs/default.nix b/nixpkgs/pkgs/os-specific/linux/apfs/default.nix index d03bd14d81a6..dc46c790c3af 100644 --- a/nixpkgs/pkgs/os-specific/linux/apfs/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/apfs/default.nix @@ -6,7 +6,7 @@ }: let - tag = "0.3.3"; + tag = "0.3.4"; in stdenv.mkDerivation { pname = "apfs"; @@ -16,7 +16,7 @@ stdenv.mkDerivation { owner = "linux-apfs"; repo = "linux-apfs-rw"; rev = "v${tag}"; - hash = "sha256-dxbpJ9Jdn8u16yD001zCZxrr/nPbxdpF7JvU+oD+hTw="; + hash = "sha256-EeVOrZtmKi5VfPerW9IntjRvdU3AbFPHG+pyAI4ciGk="; }; hardeningDisable = [ "pic" ]; diff --git a/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix b/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix index 044d0509b50b..e1fcf832f315 100644 --- a/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/bpftrace/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "bpftrace"; - version = "0.18.1"; + version = "0.19.0"; src = fetchFromGitHub { owner = "iovisor"; repo = "bpftrace"; rev = "v${version}"; - hash = "sha256-hwxArrTdjJoab7Twf57PRmRhghV/9EcjRXI0lKRQC0k="; + hash = "sha256-+aU27mxK4R0SHSsdGQzv02fK0L/m9uCIv7AkLyLSGQY="; }; @@ -44,10 +44,14 @@ stdenv.mkDerivation rec { "-DUSE_SYSTEM_BPF_BCC=ON" ]; + # Pull BPF scripts into $PATH (next to their bcc program equivalents), but do # not move them to keep `${pkgs.bpftrace}/share/bpftrace/tools/...` working. postInstall = '' - ln -s $out/share/bpftrace/tools/*.bt $out/bin/ + ln -sr $out/share/bpftrace/tools/*.bt $out/bin/ + # do not use /usr/bin/env for shipped tools + # If someone can get patchShebangs to work here please fix. + sed -i -e "1s:#!/usr/bin/env bpftrace:#!$out/bin/bpftrace:" $out/share/bpftrace/tools/*.bt ''; outputs = [ "out" "man" ]; diff --git a/nixpkgs/pkgs/os-specific/linux/bpftune/default.nix b/nixpkgs/pkgs/os-specific/linux/bpftune/default.nix index b9daff531a56..c2fd9d3f6a5e 100644 --- a/nixpkgs/pkgs/os-specific/linux/bpftune/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/bpftune/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "bpftune"; - version = "unstable-2023-08-22"; + version = "unstable-2023-09-11"; src = fetchFromGitHub { owner = "oracle"; repo = "bpftune"; - rev = "ae3047976d6ba8c3ec7c21ec8c85b92d11c64169"; - hash = "sha256-yXfS3zrUxRlmWsXyDpPhvYDqgYFQTAZ2dlmiQp6/zVQ="; + rev = "22926812a555eac910eac0699100bac0f8776f1b"; + hash = "sha256-BflJc5lYWYFIo9LzKfb34F4V1qOI8ywVjnzOLz605DI="; }; postPatch = '' @@ -32,6 +32,8 @@ stdenv.mkDerivation rec { substituteInPlace include/bpftune/libbpftune.h \ --replace /usr/lib64/bpftune/ "$out/lib/bpftune/" \ --replace /usr/local/lib64/bpftune/ "$out/lib/bpftune/" + substituteInPlace src/libbpftune.c \ + --replace /lib/modules /run/booted-system/kernel-modules/lib/modules substituteInPlace src/Makefile sample_tuner/Makefile \ --replace 'BPF_INCLUDE := /usr/include' 'BPF_INCLUDE := ${lib.getDev libbpf}/include' \ diff --git a/nixpkgs/pkgs/os-specific/linux/ddcci/default.nix b/nixpkgs/pkgs/os-specific/linux/ddcci/default.nix index f9a71fece748..ce435b3874f3 100644 --- a/nixpkgs/pkgs/os-specific/linux/ddcci/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/ddcci/default.nix @@ -1,26 +1,17 @@ -{ lib, stdenv, fetchFromGitLab, kernel, fetchpatch }: +{ lib, stdenv, fetchFromGitLab, kernel }: stdenv.mkDerivation rec { pname = "ddcci-driver"; - version = "0.4.3"; + version = "0.4.4"; name = "${pname}-${kernel.version}-${version}"; src = fetchFromGitLab { owner = "${pname}-linux"; repo = "${pname}-linux"; rev = "v${version}"; - hash = "sha256-1Z6V/AorD4aslLKaaCZpmkD2OiQnmpu3iroOPlNPtLE="; + hash = "sha256-4pCfXJcteWwU6cK8OOSph4XlhKTk289QqLxsSWY7cac="; }; - patches = [ - # https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux/-/merge_requests/12 - (fetchpatch { - name = "kernel-6.2-6.3.patch"; - url = "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux/-/commit/1ef6079679acc455f75057dd7097b5b494a241dc.patch"; - hash = "sha256-2C2leS20egGY3J2tq96gsUQXYw13wBJ3ZWrdIXxmEYs="; - }) - ]; - hardeningDisable = [ "pic" ]; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix b/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix index a6f0adc5df30..463795936e72 100644 --- a/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/displaylink/default.nix @@ -8,7 +8,9 @@ , makeWrapper , requireFile , substituteAll +, nixosTests }: + let arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" @@ -20,22 +22,22 @@ let in stdenv.mkDerivation rec { pname = "displaylink"; - version = "5.7.0-61.129"; + version = "5.8.0-63.33"; src = requireFile rec { - name = "displaylink-570.zip"; - sha256 = "807f1c203ac1e71c6f1f826493b9bb32e277f07cb2cf48537bf8cfdc68dd1515"; + name = "displaylink-580.zip"; + sha256 = "05m8vm6i9pc9pmvar021lw3ls60inlmq92nling0vj28skm55i92"; message = '' In order to install the DisplayLink drivers, you must first comply with DisplayLink's EULA and download the binaries and sources from here: - https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu-5.7 + https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu-5.8 Once you have downloaded the file, please use the following commands and re-run the installation: - mv \$PWD/"DisplayLink USB Graphics Software for Ubuntu5.7-EXE.zip" \$PWD/${name} + mv \$PWD/"DisplayLink USB Graphics Software for Ubuntu5.8-EXE.zip" \$PWD/${name} nix-prefetch-url file://\$PWD/${name} ''; }; @@ -67,6 +69,12 @@ stdenv.mkDerivation rec { dontStrip = true; dontPatchELF = true; + passthru = { + tests = { + inherit (nixosTests) displaylink; + }; + }; + meta = with lib; { description = "DisplayLink DL-5xxx, DL-41xx and DL-3x00 Driver for Linux"; homepage = "https://www.displaylink.com/"; @@ -74,5 +82,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ abbradar ]; platforms = [ "x86_64-linux" "i686-linux" ]; hydraPlatforms = []; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; } diff --git a/nixpkgs/pkgs/os-specific/linux/ell/default.nix b/nixpkgs/pkgs/os-specific/linux/ell/default.nix index 230f73ef416d..c85a75d1f17f 100644 --- a/nixpkgs/pkgs/os-specific/linux/ell/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/ell/default.nix @@ -3,18 +3,20 @@ , autoreconfHook , pkg-config , dbus +, fetchpatch +, sysctl }: stdenv.mkDerivation rec { pname = "ell"; - version = "0.57"; + version = "0.58"; outputs = [ "out" "dev" ]; src = fetchgit { url = "https://git.kernel.org/pub/scm/libs/ell/ell.git"; rev = version; - sha256 = "sha256-9d9WMCByQ1TKWpzWe5msts1LG+BKKqwCgaMBbD74/+4="; + hash = "sha256-CwUwwvyT541aIvypVMqRhHkVJLna121Cme+v7c0FLWo="; }; nativeBuildInputs = [ @@ -24,8 +26,18 @@ stdenv.mkDerivation rec { nativeCheckInputs = [ dbus + # required as the sysctl test works on some machines + sysctl ]; + patches = [ + # /proc/sys/net/core/somaxconn doesn't always exist in the nix build environment + (fetchpatch { + name = "skip-sysctl-test-if-sysfs-not-available.patch"; + url = "https://patchwork.kernel.org/project/ell/patch/526DA75D-01AB-4D85-BF5C-5F25E5C39480@kloenk.dev/raw/"; + hash = "sha256-YYGYWQ67cbMLt6RnqZmHt+tpvVIDKPbSCqPIouk6alU="; + }) + ]; enableParallelBuilding = true; # tests sporadically fail on musl diff --git a/nixpkgs/pkgs/os-specific/linux/evdi/0000-fix-drm-path.patch b/nixpkgs/pkgs/os-specific/linux/evdi/0000-fix-drm-path.patch deleted file mode 100644 index a389b73185dd..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/evdi/0000-fix-drm-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/module/Makefile b/module/Makefile -index fe573de..c8022c8 100644 ---- a/module/Makefile -+++ b/module/Makefile -@@ -50,7 +50,7 @@ ifneq ($(KERNELRELEASE),) - # inside kbuild - # Note: this can be removed once it is in kernel tree and Kconfig is properly used - CONFIG_DRM_EVDI := m --ccflags-y := -isystem include/uapi/drm include/drm $(CFLAGS) $(EL8FLAG) $(EL9FLAG) $(RPIFLAG) -+ccflags-y := -isystem include/uapi/drm $(CFLAGS) $(EL8FLAG) $(EL9FLAG) $(RPIFLAG) - evdi-y := evdi_platform_drv.o evdi_platform_dev.o evdi_sysfs.o evdi_modeset.o evdi_connector.o evdi_encoder.o evdi_drm_drv.o evdi_fb.o evdi_gem.o evdi_painter.o evdi_params.o evdi_cursor.o evdi_debug.o evdi_i2c.o - evdi-$(CONFIG_COMPAT) += evdi_ioc32.o - obj-$(CONFIG_DRM_EVDI) := evdi.o -diff --git a/module/evdi_drm.h b/module/evdi_drm.h -index 29b8427..5012693 100644 ---- a/module/evdi_drm.h -+++ b/module/evdi_drm.h -@@ -12,12 +12,11 @@ - - #ifdef __KERNEL__ - #include <linux/types.h> -+#include <drm/drm.h> - #else - #include <stdint.h> - #endif - --#include "drm.h" -- - /* Output events sent from driver to evdi lib */ - #define DRM_EVDI_EVENT_UPDATE_READY 0x80000000 - #define DRM_EVDI_EVENT_DPMS 0x80000001 diff --git a/nixpkgs/pkgs/os-specific/linux/evdi/default.nix b/nixpkgs/pkgs/os-specific/linux/evdi/default.nix index 71ab8bea79e0..ebb6fbe2cc6b 100644 --- a/nixpkgs/pkgs/os-specific/linux/evdi/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/evdi/default.nix @@ -1,4 +1,5 @@ { lib, stdenv, fetchFromGitHub, kernel, libdrm, python3 }: + let python3WithLibs = python3.withPackages (ps: with ps; [ pybind11 @@ -6,13 +7,13 @@ let in stdenv.mkDerivation rec { pname = "evdi"; - version = "1.13.1"; + version = "1.14.1"; src = fetchFromGitHub { owner = "DisplayLink"; repo = pname; rev = "v${version}"; - hash = "sha256-Or4hhnFOtC8vmB4kFUHbFHn2wg/NsUMY3d2Tiea6YbY="; + hash = "sha256-em3Y56saB7K3Wr31Y0boc38xGb57gdveN0Cstgy8y20="; }; env.NIX_CFLAGS_COMPILE = "-Wno-error -Wno-error=sign-compare"; @@ -35,11 +36,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - patches = [ - ./0000-fix-drm-path.patch - ]; - meta = with lib; { + changelog = "https://github.com/DisplayLink/evdi/releases/tag/v${version}"; description = "Extensible Virtual Display Interface"; maintainers = with maintainers; [ ]; platforms = platforms.linux; diff --git a/nixpkgs/pkgs/os-specific/linux/fan2go/default.nix b/nixpkgs/pkgs/os-specific/linux/fan2go/default.nix index 48da98cf5912..c7176183018a 100644 --- a/nixpkgs/pkgs/os-specific/linux/fan2go/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/fan2go/default.nix @@ -8,10 +8,10 @@ buildGoModule rec { owner = "markusressel"; repo = pname; rev = version; - sha256 = "w2Qwu3ZmBkoA86xa7V6pnIBAbfG9mtkAHePkQjefRW8="; + hash = "sha256-w2Qwu3ZmBkoA86xa7V6pnIBAbfG9mtkAHePkQjefRW8="; }; - vendorSha256 = "6OEdl7ie0dTjXrG//Fvcg4ZyTW/mhrUievDljY2zi/4="; + vendorHash = "sha256-6OEdl7ie0dTjXrG//Fvcg4ZyTW/mhrUievDljY2zi/4="; postConfigure = '' substituteInPlace vendor/github.com/md14454/gosensors/gosensors.go \ diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix index 25bce432bc5f..5472cce05656 100644 --- a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -54,6 +54,7 @@ , libcbor , xz , enableFlashrom ? false +, enablePassim ? false }: let @@ -123,7 +124,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "fwupd"; - version = "1.9.4"; + version = "1.9.5"; # libfwupd goes to lib # daemon, plug-ins and libfwupdplugin go to out @@ -134,7 +135,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "fwupd"; repo = "fwupd"; rev = finalAttrs.version; - hash = "sha256-xjN6nHqg7sQzgojClySQEjLQBdI5291TxPhgLjKzKvk="; + hash = "sha256-dqbFgVgG2RQM5ZHIEIIJOmrjtwlaRXEyY+2OdDs4PGo="; }; patches = [ @@ -220,9 +221,10 @@ stdenv.mkDerivation (finalAttrs: { "-Dsysconfdir_install=${placeholder "out"}/etc" "-Defi_os_dir=nixos" "-Dplugin_modem_manager=enabled" - # We do not want to place the daemon into lib (cyclic reference) "--libexecdir=${placeholder "out"}/libexec" + ] ++ lib.optionals (!enablePassim) [ + "-Dpassim=disabled" ] ++ lib.optionals (!haveDell) [ "-Dplugin_dell=disabled" "-Dplugin_synaptics_mst=disabled" diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/linux-firmware/source.nix b/nixpkgs/pkgs/os-specific/linux/firmware/linux-firmware/source.nix index 30f10faab30a..09f14bc729bc 100644 --- a/nixpkgs/pkgs/os-specific/linux/firmware/linux-firmware/source.nix +++ b/nixpkgs/pkgs/os-specific/linux/firmware/linux-firmware/source.nix @@ -1,7 +1,7 @@ # This file is autogenerated! Run ./update.sh to regenerate. { - version = "20230809"; - revision = "f2eb058afc57348cde66852272d6bf11da1eef8f"; - sourceHash = "sha256-tflH32hvHstFNZe1wJMV7gekekbhiUGkBUIUy1n203Q="; - outputHash = "sha256-OkqLvefP+KNk/zYPIiYOUA9i9evy9bX36No8Kw03RP0="; + version = "20230919"; + revision = "20230919"; + sourceHash = "sha256-xcGEaWCcCAhN4gnnaj03u7LekP4+cRtcioTYhvAOQtg="; + outputHash = "sha256-6W9QTShp/UzlcILwyyn56wppQORUGPff2TodEt4qhwQ="; } diff --git a/nixpkgs/pkgs/os-specific/linux/hwdata/default.nix b/nixpkgs/pkgs/os-specific/linux/hwdata/default.nix index 6c7afffd9cec..a64a0574d8ff 100644 --- a/nixpkgs/pkgs/os-specific/linux/hwdata/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/hwdata/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "hwdata"; - version = "0.373"; + version = "0.374"; src = fetchFromGitHub { owner = "vcrhonek"; repo = "hwdata"; rev = "v${version}"; - hash = "sha256-KXZodSvY4Szt/gp0iRkx+ngziCaUYvkjnkvjwPj3OwI="; + hash = "sha256-RvjYd8iD6JkGhh6TDy/Qo+UzLxbhPvIJvhl/Rw14lbk="; }; postPatch = '' diff --git a/nixpkgs/pkgs/os-specific/linux/ifmetric/default.nix b/nixpkgs/pkgs/os-specific/linux/ifmetric/default.nix index f5d55db5e41b..d4672b9be21b 100644 --- a/nixpkgs/pkgs/os-specific/linux/ifmetric/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/ifmetric/default.nix @@ -32,5 +32,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; maintainers = [ maintainers.anna328p ]; platforms = platforms.linux; + mainProgram = "ifmetric"; }; } diff --git a/nixpkgs/pkgs/os-specific/linux/iwd/default.nix b/nixpkgs/pkgs/os-specific/linux/iwd/default.nix index 792fef69cbd2..1b983bb90e1e 100644 --- a/nixpkgs/pkgs/os-specific/linux/iwd/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/iwd/default.nix @@ -12,12 +12,12 @@ stdenv.mkDerivation rec { pname = "iwd"; - version = "2.7"; + version = "2.8"; src = fetchgit { url = "https://git.kernel.org/pub/scm/network/wireless/iwd.git"; rev = version; - sha256 = "sha256-UsyJYQB6YzwcL6H1nyCW8ZTpBzacZMAp39mCfsZqwHY="; + sha256 = "sha256-i+2R8smgLXooApj0Z5e03FybhYgw1X/kIsJkrDzW8y4="; }; outputs = [ "out" "man" "doc" ] diff --git a/nixpkgs/pkgs/os-specific/linux/kbd/default.nix b/nixpkgs/pkgs/os-specific/linux/kbd/default.nix index 1c38f4b7f491..9d97f73780d5 100644 --- a/nixpkgs/pkgs/os-specific/linux/kbd/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/kbd/default.nix @@ -17,11 +17,11 @@ stdenv.mkDerivation rec { pname = "kbd"; - version = "2.6.2"; + version = "2.6.3"; src = fetchurl { url = "mirror://kernel/linux/utils/kbd/${pname}-${version}.tar.xz"; - sha256 = "sha256-M+O7PD9VkzsQ8FOxS19pouJMKFQ+nsdpAkb+R2KN2U8="; + sha256 = "sha256-BJlsCNfRxGCWb7JEo9OIM1LCZ0t61SIAPZ9Oy4q0jes="; }; # vlock is moved into its own output, since it depends on pam. This diff --git a/nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch b/nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch index fad33be45bdc..61e8918017c2 100644 --- a/nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch +++ b/nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch @@ -18,34 +18,30 @@ Without this patch, kbd will only look inside DATADIR "/" KEYMAPDIR "/mac/include/", --- a/src/libkfont/context.c +++ b/src/libkfont/context.c -@@ -13,6 +13,7 @@ +@@ -13,5 +13,6 @@ /* search for the map file in these directories (with trailing /) */ static const char *const mapdirpath[] = { - "", + "/etc/kbd/" TRANSDIR "/", DATADIR "/" TRANSDIR "/", NULL }; -@@ -28,6 +29,7 @@ static const char *const mapsuffixes[] = { +@@ -28,5 +29,6 @@ static const char *const mapsuffixes[] = { /* search for the font in these directories (with trailing /) */ static const char *const fontdirpath[] = { - "", + "/etc/kbd/" FONTDIR "/", DATADIR "/" FONTDIR "/", NULL }; -@@ -42,6 +44,7 @@ static char const *const fontsuffixes[] = { +@@ -42,5 +44,6 @@ static char const *const fontsuffixes[] = { static const char *const unidirpath[] = { - "", + "/etc/kbd/" UNIMAPDIR "/", DATADIR "/" UNIMAPDIR "/", NULL }; -@@ -55,6 +58,7 @@ static const char *const unisuffixes[] = { +@@ -55,5 +58,6 @@ static const char *const unisuffixes[] = { /* hide partial fonts a bit - loading a single one is a bad idea */ const char *const partfontdirpath[] = { - "", + "/etc/kbd/" FONTDIR "/" PARTIALDIR "/", DATADIR "/" FONTDIR "/" PARTIALDIR "/", NULL diff --git a/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix b/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix index b1c0d3ba50db..ff40e585b1d8 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix @@ -111,12 +111,12 @@ let in { inherit makeLinuxHeaders; - linuxHeaders = let version = "6.4"; in + linuxHeaders = let version = "6.5"; in makeLinuxHeaders { inherit version; src = fetchurl { url = "mirror://kernel/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz"; - hash = "sha256-j6BYjwws7KRMrHeg45ukjJ8AprncaXYcAqXT76yNp/M="; + hash = "sha256-eldLvCCALqdrUsp/rwcmf3IEXoYbGJFcUnKpjCer+IQ="; }; patches = [ ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json b/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json index ab62028af7bc..c7893abad213 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -22,22 +22,22 @@ "5.10": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.10.194-hardened1.patch", - "sha256": "1ba8ridhjz9y8ap1wgp7z41jmwzx8j0bxkyp1zjfls1z7mqq4vpf", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.194-hardened1/linux-hardened-5.10.194-hardened1.patch" + "name": "linux-hardened-5.10.195-hardened1.patch", + "sha256": "15liin3i9wh7hwr97pyc8rl79ri7frsprssl50si9z810zvc9chb", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.195-hardened1/linux-hardened-5.10.195-hardened1.patch" }, - "sha256": "15fr7krhpmqz0xqjg78m2xvfllbni3xh8xyhxh9ni31ppd3mw394", - "version": "5.10.194" + "sha256": "0n4vg2i9sq89wnz85arlyvwysh9s83cgzs5bk2wh98bivi5fwfs1", + "version": "5.10.195" }, "5.15": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.15.130-hardened1.patch", - "sha256": "12wm6kyg63rg1lk1w9208vpcm71cjy236rjp9gf8mfx7iraqssl7", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.130-hardened1/linux-hardened-5.15.130-hardened1.patch" + "name": "linux-hardened-5.15.132-hardened1.patch", + "sha256": "06wkcbhkdm8vnk1cqwngy9gdknqm4pb4za9lbh2q5j1f2nkcn7pq", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.132-hardened1/linux-hardened-5.15.132-hardened1.patch" }, - "sha256": "0qix62jsn3z9yccakac7fvqnip19zi05qn0w5wkgb7rj0x0lwimb", - "version": "5.15.130" + "sha256": "1b0qjsaqjw2rk86shmmrj2aasblkn27acjmc761vnjg7sv2baxs1", + "version": "5.15.132" }, "5.4": { "patch": { @@ -52,21 +52,31 @@ "6.1": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-6.1.51-hardened1.patch", - "sha256": "0nbf7j3hwlsvh8f4mmc9w2gqdcj8lyx1hxrz91y2hwlqlqjx7w4p", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.1.51-hardened1/linux-hardened-6.1.51-hardened1.patch" + "name": "linux-hardened-6.1.54-hardened1.patch", + "sha256": "0c8dmgciwc02pzhnx2mj5xlhds7mmicm8r6668di2zfw772rjgr4", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.1.54-hardened1/linux-hardened-6.1.54-hardened1.patch" }, - "sha256": "0fqhmb6v28rssd44z7jw57mwvvskpl4kabjylck0pg54irnl9c2q", - "version": "6.1.51" + "sha256": "09sfrq2l8f777mx2n9mhb6bgz1064bl04921byqnmk87si31w653", + "version": "6.1.54" }, "6.4": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-6.4.14-hardened1.patch", - "sha256": "1cw0zyjxbfprb2m2kjrpz8s56axbzhnwj8hg9b0486nsqz5s66bs", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.4.14-hardened1/linux-hardened-6.4.14-hardened1.patch" + "name": "linux-hardened-6.4.16-hardened1.patch", + "sha256": "10lydnnhhq9ynng1gfaqh1mncsb0dmr27zzcbygs1xigy2bl70n9", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.4.16-hardened1/linux-hardened-6.4.16-hardened1.patch" }, - "sha256": "1rjh0jrn5qvxwzmyg478n08vckkld8r52nkc102ppqvsfhiy7skm", - "version": "6.4.14" + "sha256": "0zgj1z97jyx7wf12zrnlcp0mj4cl43ais9qsy6dh1jwylf2fq9ln", + "version": "6.4.16" + }, + "6.5": { + "patch": { + "extra": "-hardened1", + "name": "linux-hardened-6.5.4-hardened1.patch", + "sha256": "0r411dgp17am2bnfpk8lbzmymp6w9d5raz7hni0mw0kpcq6z996n", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.5.4-hardened1/linux-hardened-6.5.4-hardened1.patch" + }, + "sha256": "0s8nzd8yaq06bq8byk7aakbk95gh0rhlif26h1biw94v48anrxxx", + "version": "6.5.4" } } diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/kernels-org.json b/nixpkgs/pkgs/os-specific/linux/kernel/kernels-org.json new file mode 100644 index 000000000000..b2d4b1fa83b8 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/kernel/kernels-org.json @@ -0,0 +1,38 @@ +{ + "testing": { + "version": "6.6-rc1", + "hash": "02zh3dnikyhhlas9xccia963d4yqmzq0m4b8s10x8mjng3na45hd" + }, + "6.5": { + "version": "6.5.4", + "hash": "0s8nzd8yaq06bq8byk7aakbk95gh0rhlif26h1biw94v48anrxxx" + }, + "6.4": { + "version": "6.4.16", + "hash": "0zgj1z97jyx7wf12zrnlcp0mj4cl43ais9qsy6dh1jwylf2fq9ln" + }, + "6.1": { + "version": "6.1.54", + "hash": "09sfrq2l8f777mx2n9mhb6bgz1064bl04921byqnmk87si31w653" + }, + "5.15": { + "version": "5.15.132", + "hash": "1b0qjsaqjw2rk86shmmrj2aasblkn27acjmc761vnjg7sv2baxs1" + }, + "5.10": { + "version": "5.10.195", + "hash": "0n4vg2i9sq89wnz85arlyvwysh9s83cgzs5bk2wh98bivi5fwfs1" + }, + "5.4": { + "version": "5.4.256", + "hash": "0fim5q9xakwnjfg48bpsic9r2r8dvrjlalqqkm9vh1rml9mhi967" + }, + "4.19": { + "version": "4.19.294", + "hash": "03x0xsb8a369zdr81hg6xdl5n5v48k6iwnhj6r29725777lvvbfc" + }, + "4.14": { + "version": "4.14.325", + "hash": "117p1mdha57f6d3kdwac9jrbmib7g77q4xhir8ghl6fmrs1f2sav" + } +} diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.14.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.14.nix deleted file mode 100644 index dc0ead44be43..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "4.14.325"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = versions.pad 3 version; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "117p1mdha57f6d3kdwac9jrbmib7g77q4xhir8ghl6fmrs1f2sav"; - }; -} // (args.argsOverride or {})) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.19.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.19.nix deleted file mode 100644 index 6048caf8fa86..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-4.19.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "4.19.294"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = versions.pad 3 version; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "03x0xsb8a369zdr81hg6xdl5n5v48k6iwnhj6r29725777lvvbfc"; - }; -} // (args.argsOverride or {})) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.10.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.10.nix deleted file mode 100644 index f340b5d9f5d2..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.10.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "5.10.194"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = versions.pad 3 version; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "15fr7krhpmqz0xqjg78m2xvfllbni3xh8xyhxh9ni31ppd3mw394"; - }; -} // (args.argsOverride or {})) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.15.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.15.nix deleted file mode 100644 index e189e7201088..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.15.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "5.15.131"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = versions.pad 3 version; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0sacnbw48lblnqaj56nybh588sq4k84gwf0r5zinzyrryj8k6z4r"; - }; -} // (args.argsOverride or { })) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.4.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.4.nix deleted file mode 100644 index 0013636076a0..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.4.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "5.4.256"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = versions.pad 3 version; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0fim5q9xakwnjfg48bpsic9r2r8dvrjlalqqkm9vh1rml9mhi967"; - }; -} // (args.argsOverride or {})) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.1.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.1.nix deleted file mode 100644 index 9e14c7a6117e..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.1.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "6.1.52"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = versions.pad 3 version; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "0lis73mxnl7hxz8lyja6sfgmbym944l3k1h7dab6b4mw1nckfxsn"; - }; -} // (args.argsOverride or { })) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.4.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.4.nix deleted file mode 100644 index b5d9d6451324..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.4.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, fetchurl, buildLinux, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "6.4.15"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = versions.pad 3 version; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "1phlx375ln5pslw5vjqm029cdv6pzf4ang10xlrf90x5sb4fgy93"; - }; -} // (args.argsOverride or { })) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.5.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.5.nix deleted file mode 100644 index 341cc84be74d..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.5.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, fetchurl, buildLinux, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "6.5.2"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = versions.pad 3 version; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - hash = "sha256-ICfhQFfVaK093BANrfTIhTpJsDEnBHimHYj2ARVyZQ8="; - }; -} // (args.argsOverride or { })) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix index 6a0f7c2325e0..ef020b7eb56c 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -1,8 +1,8 @@ { stdenv, lib, fetchsvn, linux , scripts ? fetchsvn { url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; - rev = "19397"; - sha256 = "130q08my839kwbi1v8lqwvs6w8s6328ki7s243as4yz4kfrlymr3"; + rev = "19408"; + sha256 = "1bfpzdfd7k859ids5d5ixzn36c7f62gh2lw6gv4szwakw032gh9i"; } , ... }: diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix index cfb84c25f275..d599c3bda311 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "6.1.46-rt13"; # updated by ./update-rt.sh + version = "6.1.46-rt14"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -25,7 +25,7 @@ in buildLinux (args // { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "00pj02mvamxvlkwrca1j3baaa18rg6dra7al1xsvgw3ypckwyafz"; + sha256 = "0mrpsy175iz0b51hwgqbj15w83lm3m57il3gqwb489gln7mpzy17"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix deleted file mode 100644 index 9a3b32a7f2d2..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, buildPackages, fetchzip, perl, buildLinux, nixosTests, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "6.6-rc1"; - extraMeta.branch = lib.versions.majorMinor version; - - # modDirVersion needs to be x.y.z, will always add .0 - modDirVersion = versions.pad 3 version; - - src = fetchzip { - url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz"; - hash = "sha256-DRai7HhWVtRB0GiRCvCv2JM2TFKRsZ60ohD6GW0b8As="; - }; - - # Should the testing kernels ever be built on Hydra? - extraMeta.hydraPlatforms = []; - -} // (args.argsOverride or {})) diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/mainline.nix b/nixpkgs/pkgs/os-specific/linux/kernel/mainline.nix new file mode 100644 index 000000000000..50053e620e46 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/kernel/mainline.nix @@ -0,0 +1,18 @@ +{ branch, lib, fetchurl, buildLinux, ... } @ args: + +let + allKernels = builtins.fromJSON (builtins.readFile ./kernels-org.json); + thisKernel = allKernels.${branch}; + + args' = (builtins.removeAttrs args ["branch"]) // rec { + inherit (thisKernel) version; + modDirVersion = lib.versions.pad 3 version; + extraMeta.branch = branch; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz"; + sha256 = thisKernel.hash; + }; + } // (args.argsOverride or {}); +in +buildLinux args' diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/patches.nix b/nixpkgs/pkgs/os-specific/linux/kernel/patches.nix index f941ca9f007a..ab3b4e56066e 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/patches.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel/patches.nix @@ -19,6 +19,16 @@ patch = ./bridge-stp-helper.patch; }; + # Reverts the buggy commit causing https://bugzilla.kernel.org/show_bug.cgi?id=217802 + dell_xps_regression = { + name = "dell_xps_regression"; + patch = fetchpatch { + name = "Revert-101bd907b424-misc-rtsx-judge-ASPM-Mode-to-set.patch"; + url = "https://raw.githubusercontent.com/openSUSE/kernel-source/1b02b1528a26f4e9b577e215c114d8c5e773ee10/patches.suse/Revert-101bd907b424-misc-rtsx-judge-ASPM-Mode-to-set.patch"; + sha256 = "sha256-RHJdQ4p0msTOVPR+/dYiKuwwEoG9IpIBqT4dc5cJjf8="; + }; + }; + request_key_helper = { name = "request-key-helper"; patch = ./request-key-helper.patch; diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/update-mainline.py b/nixpkgs/pkgs/os-specific/linux/kernel/update-mainline.py new file mode 100755 index 000000000000..e7c37e9ab999 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/kernel/update-mainline.py @@ -0,0 +1,104 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.beautifulsoup4 ps.lxml ])" +from enum import Enum +from bs4 import BeautifulSoup, NavigableString, Tag +from dataclasses import dataclass +import json +import pathlib +import re +import subprocess +import urllib.request +import sys + + +HERE = pathlib.Path(__file__).parent +ROOT = HERE.parent.parent.parent.parent +VERSIONS_FILE = HERE / "kernels-org.json" + +class KernelNature(Enum): + MAINLINE = 1 + STABLE = 2 + LONGTERM = 3 + +@dataclass +class KernelRelease: + nature: KernelNature + version: str + date: str + link: str + eol: bool = False + +def parse_release(release: Tag) -> KernelRelease | None: + columns: list[Tag] = list(release.find_all('td')) + try: + nature = KernelNature[columns[0].get_text().rstrip(':').upper()] + except KeyError: + return None + + version = columns[1].get_text().rstrip(' [EOL]') + date = columns[2].get_text() + link = columns[3].find('a') + if link is not None and isinstance(link, Tag): + link = link.attrs.get('href') + assert link is not None, f'link for kernel {version} is non-existent' + eol = bool(release.find(class_='eolkernel')) + + return KernelRelease(nature=nature, version=version, date=date, link=link, eol=eol) + +def get_branch(version: str): + # This is a testing kernel. + if 'rc' in version: + return 'testing' + else: + major, minor, *_ = version.split(".") + return f"{major}.{minor}" + + +def get_hash(url: str): + return subprocess.check_output(["nix-prefetch-url", url]).decode().strip() + + +def commit(message): + return subprocess.check_call(["git", "commit", "-m", message, VERSIONS_FILE]) + + +def main(): + kernel_org = urllib.request.urlopen("https://kernel.org/") + soup = BeautifulSoup(kernel_org.read().decode(), "lxml") + release_table = soup.find(id='releases') + if not release_table or isinstance(release_table, NavigableString): + print(release_table) + print('Failed to find the release table on https://kernel.org') + sys.exit(1) + + releases = release_table.find_all('tr') + parsed_releases = filter(None, [parse_release(release) for release in releases]) + all_kernels = json.load(VERSIONS_FILE.open()) + + for kernel in parsed_releases: + branch = get_branch(kernel.version) + nixpkgs_branch = branch.replace('.', '_') + + old_version = all_kernels.get(branch, {}).get("version") + if old_version == kernel.version: + print(f"linux_{nixpkgs_branch}: {kernel.version} is latest, skipping...") + continue + + if old_version is None: + message = f"linux_{nixpkgs_branch}: init at {kernel.version}" + else: + message = f"linux_{nixpkgs_branch}: {old_version} -> {kernel.version}" + + print(message) + + all_kernels[branch] = {"version": kernel.version, "hash": get_hash(kernel.link)} + + with VERSIONS_FILE.open("w") as fd: + json.dump(all_kernels, fd, indent=4) + fd.write("\n") # makes editorconfig happy + + commit(message) + + +if __name__ == "__main__": + main() diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/update.sh b/nixpkgs/pkgs/os-specific/linux/kernel/update.sh index 4171b7492b7b..37e1cc1a5cd4 100755 --- a/nixpkgs/pkgs/os-specific/linux/kernel/update.sh +++ b/nixpkgs/pkgs/os-specific/linux/kernel/update.sh @@ -1,72 +1,14 @@ #!/usr/bin/env bash -set -e +cd "$(dirname "$(readlink -f "$0")")" || exit -# Get the latest versions from kernel.org -LINUXSED='s/.*linux-\([0-9]\+\(.[0-9]\+\)*\).*/\1/p' -KDATA="$(curl -s https://www.kernel.org | sed -n -e '/Download complete/p')" -VERSIONS=($(sed -n -e $LINUXSED <<< "$KDATA" | sort -Vr)) +echo "Update linux (mainline)" +COMMIT=1 ./update-mainline.py || echo "update-mainline failed with exit code $?" -# Remove mainline version if there is a stable update -# Note due to sorting these two will always exist at the bottom -if grep -q "^${VERSIONS[1]}" <<< "${VERSIONS[0]}"; then - VERSIONS=(${VERSIONS[@]:0:1} ${VERSIONS[@]:2}) -fi +echo "Update linux-rt" +COMMIT=1 ./update-rt.sh || echo "update-rt failed with exit code $?" -# Inspect each file and see if it has the latest version -NIXPKGS="$(git rev-parse --show-toplevel)" -ls $NIXPKGS/pkgs/os-specific/linux/kernel | while read FILE; do - KERNEL="$(sed -n -e $LINUXSED <<< "$FILE")" - [ -z "$KERNEL" ] && continue +echo "Update linux-libre" +COMMIT=1 ./update-libre.sh || echo "update-libre failed with exit code $?" - # Find the matching new kernel version - MATCHING="" - for V in "${VERSIONS[@]}"; do - if grep -q "^$KERNEL" <<< "$V"; then - MATCHING="$V" - break - fi - done - if [ -z "$MATCHING" ]; then - echo "Out-of-support $KERNEL" - continue - fi - - # Inspect the nix expression to check for changes - DATA="$(<$NIXPKGS/pkgs/os-specific/linux/kernel/$FILE)" - URL="$(sed -n -e 's/.*url = "\(.*\)";.*/\1/p' <<< "$DATA" | sed -e "s/\${version}/$MATCHING/g")" - OLDVER=$(sed -n -e 's/.*version = "\(.*\)".*/\1/p' <<< "$DATA") - if [ "$OLDVER" = "$V" ]; then - echo "No updates for $KERNEL" - continue - fi - - # Download the new file for the hash - if ! HASH="$(nix-prefetch-url $URL 2>/dev/null)"; then - echo "Failed to get hash of $URL" - continue - fi - sed -i -e "s/sha256 = \".*\"/sha256 = \"$HASH\"/g" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE - - # Rewrite the expression - sed -i -e '/version = /d' $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE - sed -i -e "\#buildLinux (args // rec {#a \ version = \"$V\";" $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE - - # Commit the changes - git add -u $NIXPKGS/pkgs/os-specific/linux/kernel/$FILE - git commit -m "linux: $OLDVER -> $V" >/dev/null 2>&1 - - echo "Updated $OLDVER -> $V" -done - -# Allowing errors again: one broken update script shouldn't inhibit the -# update of other kernel variants. -set +e - -echo Update linux-rt -COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-rt.sh || echo "update-rt failed with exit code $?" - -echo Update linux-libre -COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-libre.sh || echo "update-libre failed with exit code $?" - -echo Update linux-hardened -COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/hardened/update.py || echo "update-hardened failed with exit code $?" +echo "Update linux-hardened" +COMMIT=1 ./hardened/update.py || echo "update-hardened failed with exit code $?" diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/zen-kernels.nix b/nixpkgs/pkgs/os-specific/linux/kernel/zen-kernels.nix index 28e0158394fb..0d73b00d1205 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/zen-kernels.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel/zen-kernels.nix @@ -4,16 +4,16 @@ let # comments with variant added for update script # ./update-zen.py zen zenVariant = { - version = "6.5.3"; #zen - suffix = "zen1"; #zen - sha256 = "0jc50cb30dzysqdhm91ykcg5xhy062dc69gwak6q33bn56n7dw3m"; #zen + version = "6.5.4"; #zen + suffix = "zen2"; #zen + sha256 = "0p67v2rhkf0q61cvf310nkg08dpwgmkabid71qp01ig3sdp6rcsy"; #zen isLqx = false; }; # ./update-zen.py lqx lqxVariant = { - version = "6.4.15"; #lqx - suffix = "lqx1"; #lqx - sha256 = "1xhm73z074niz1dd0w24q5lxlpma6xraqil5kzp3j4qsyr5wg8hz"; #lqx + version = "6.5.4"; #lqx + suffix = "lqx2"; #lqx + sha256 = "0zz7jn2fic7llppv4ih91jfz0k0q6c04xsyqljhiw6279dsv8h7c"; #lqx isLqx = true; }; zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // { diff --git a/nixpkgs/pkgs/os-specific/linux/microcode/amd.nix b/nixpkgs/pkgs/os-specific/linux/microcode/amd.nix index 051ad131be93..3c82cdec29fb 100644 --- a/nixpkgs/pkgs/os-specific/linux/microcode/amd.nix +++ b/nixpkgs/pkgs/os-specific/linux/microcode/amd.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { sourceRoot = "."; - buildInputs = [ libarchive ]; + nativeBuildInputs = [ libarchive ]; buildPhase = '' mkdir -p kernel/x86/microcode diff --git a/nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix b/nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix index bb753e70aa98..5ec8197451cf 100644 --- a/nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix @@ -2,28 +2,32 @@ , stdenv , fetchFromGitHub , coreutils -, pkg-config + , perl -, lvm2 +, pkg-config + +, json_c , libaio -, readline -, systemd , liburcu -, json_c , linuxHeaders +, lvm2 +, readline +, systemd +, util-linuxMinimal + , cmocka , nixosTests }: stdenv.mkDerivation rec { pname = "multipath-tools"; - version = "0.9.4"; + version = "0.9.6"; src = fetchFromGitHub { owner = "opensvc"; repo = "multipath-tools"; rev = "refs/tags/${version}"; - sha256 = "sha256-CPvtnjzkyxKXrT8+YXaIgDA548h8X61+jCxMHKFfEyg="; + sha256 = "sha256-X4sAMGn4oBMY3cQkVj1dMcrDF7FgMl8SbZeUnCCOY6Q="; }; postPatch = '' @@ -44,8 +48,20 @@ stdenv.mkDerivation rec { sed '1i#include <assert.h>' -i tests/{util,vpd}.c ''; - nativeBuildInputs = [ pkg-config perl ]; - buildInputs = [ systemd lvm2 libaio readline liburcu json_c linuxHeaders ]; + nativeBuildInputs = [ + perl + pkg-config + ]; + buildInputs = [ + json_c + libaio + liburcu + linuxHeaders + lvm2 + readline + systemd + util-linuxMinimal # for libmount + ]; makeFlags = [ "LIB=lib" diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix index 24e0ed5adbb1..69e4ae8729d8 100644 --- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -27,12 +27,12 @@ rec { stable = if stdenv.hostPlatform.system == "i686-linux" then legacy_390 else latest; production = generic { - version = "535.104.05"; - sha256_64bit = "sha256-L51gnR2ncL7udXY2Y1xG5+2CU63oh7h8elSC4z/L7ck="; - sha256_aarch64 = "sha256-J4uEQQ5WK50rVTI2JysBBHLpmBEWQcQ0CihgEM6xuvk="; - openSha256 = "sha256-0ng4hyiUt0rHZkNveFTo+dSaqkMFO4UPXh85/js9Zbw="; - settingsSha256 = "sha256-pS9W5LMenX0Rrwmpg1cszmpAYPt0Mx+apVQmOmLWTog="; - persistencedSha256 = "sha256-uqT++w0gZRNbzyqbvP3GBqgb4g18r6VM3O8AMEfM7GU="; + version = "535.113.01"; + sha256_64bit = "sha256-KOME2N/oG39en2BAS/OMYvyjVXjZdSLjxwoOjyMWdIE="; + sha256_aarch64 = "sha256-mw/p5ELGTNcM4P94soJIGqpLMBJHSPf+z9qsGnISuCk="; + openSha256 = "sha256-SePRFb5S2T0pOmkSGflYfJkJBjG3Dx/Z0MjwnWccfcI="; + settingsSha256 = "sha256-hiX5Nc4JhiYYt0jaRgQzfnmlEQikQjuO0kHnqGdDa04="; + persistencedSha256 = "sha256-V5Wu8a7EhwZarGsflAhEQDE9s9PjuQ3JNMU1nWvNNsQ="; }; latest = selectHighestVersion production (generic { @@ -106,6 +106,11 @@ rec { url = "https://gist.github.com/joanbm/dfe8dc59af1c83e2530a1376b77be8ba/raw/37ff2b5ccf99f295ff958c9a44ca4ed4f42503b4/nvidia-470xx-fix-linux-6.5.patch"; hash = "sha256-s5r7nwuMva0BLy2qJBVKqNtnUN9am5+PptnVwNdzdbk="; }) + # source: https://gist.github.com/joanbm/2ec3c512a1ac21f5f5c6b3c1a4dbef35 + (fetchpatch { + url = "https://gist.github.com/joanbm/2ec3c512a1ac21f5f5c6b3c1a4dbef35/raw/615feaefed2de3a28bd12fe9783894b84a7c86e4/nvidia-470xx-fix-linux-6.6.patch"; + hash = "sha256-gdV+a+JFzQX8MzRz9eb4gVbnOfTWN+Ds9sOeyIBN5y0="; + }) ]; }; @@ -125,8 +130,8 @@ rec { aurPatches = fetchFromGitHub { owner = "archlinux-jerry"; repo = "nvidia-340xx"; - rev = "f472f9297fe2ae285b954cd3f88abd8e2e255e4f"; - hash = "sha256-tMA69Wlhi14DMS3O3nfwMX3EiT8pKa6McLxFpAayoEI="; + rev = "fa434fb5da47e9423db2b19577817eb8c65d2f4e"; + hash = "sha256-KeMTYHGuZSAPGnYaERZSMu/4lWyB25ZCIv4nJhXxABY="; }; patchset = [ "0001-kernel-5.7.patch" @@ -142,6 +147,7 @@ rec { "0011-kernel-6.0.patch" "0012-kernel-6.2.patch" "0013-kernel-6.3.patch" + "0014-kernel-6.5.patch" ]; in generic { version = "340.108"; @@ -151,7 +157,7 @@ rec { persistencedSha256 = "1ax4xn3nmxg1y6immq933cqzw6cj04x93saiasdc0kjlv0pvvnkn"; useGLVND = false; - broken = kernel.kernelAtLeast "6.4"; + broken = kernel.kernelAtLeast "6.6"; patches = map (patch: "${aurPatches}/${patch}") patchset; }; } diff --git a/nixpkgs/pkgs/os-specific/linux/pam_rssh/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_rssh/default.nix index d19457bf3762..2da53d462790 100644 --- a/nixpkgs/pkgs/os-specific/linux/pam_rssh/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/pam_rssh/default.nix @@ -1,25 +1,32 @@ { lib , rustPlatform , fetchFromGitHub +, coreutils , pkg-config , openssl , pam , openssh }: -rustPlatform.buildRustPackage { +rustPlatform.buildRustPackage rec { pname = "pam_rssh"; version = "1.1.0"; src = fetchFromGitHub { owner = "z4yx"; repo = "pam_rssh"; - rev = "92c240bd079e9711c7afa8bacfcf01de48f42577"; - hash = "sha256-mIQeItPh6RrF3cFbAth2Kmb2E/Xj+lOgatvjcLE4Yag="; + rev = "v${version}"; + hash = "sha256-SDtMqGy2zhq9jEQVwSEl4EwRp2jgXfTVLrCX7k/kBeU="; fetchSubmodules = true; }; - cargoHash = "sha256-QMyMqsjZ91WimIaaSCXtbRScS3BoB+yFtHjx3xViq7U="; + cargoHash = "sha256-gNy1tcHDUOG1XduGAIMapvx5dlq+U1LitUQkccGfb9o="; + + postPatch = '' + substituteInPlace src/auth_keys.rs \ + --replace '/bin/echo' '${coreutils}/bin/echo' \ + --replace '/bin/false' '${coreutils}/bin/false' + ''; nativeBuildInputs = [ pkg-config diff --git a/nixpkgs/pkgs/os-specific/linux/shadow/default.nix b/nixpkgs/pkgs/os-specific/linux/shadow/default.nix index f0e2c281aa56..746f9b17a698 100644 --- a/nixpkgs/pkgs/os-specific/linux/shadow/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/shadow/default.nix @@ -1,9 +1,9 @@ { lib, stdenv, fetchFromGitHub -, runtimeShell, nixosTests, fetchpatch +, runtimeShell, nixosTests , autoreconfHook, bison, flex , docbook_xml_dtd_45, docbook_xsl -, itstool , libxml2, libxslt -, libxcrypt +, itstool, libbsd, libxml2, libxslt +, libxcrypt, pkg-config , glibcCross ? null , pam ? null , withTcb ? lib.meta.availableOn stdenv.hostPlatform tcb, tcb @@ -17,13 +17,13 @@ in stdenv.mkDerivation rec { pname = "shadow"; - version = "4.13"; + version = "4.14.0"; src = fetchFromGitHub { owner = "shadow-maint"; repo = pname; rev = version; - sha256 = "sha256-L54DhdBYthfB9436t/XWXiqKhW7rfd0GLS7pYGB32rA="; + hash = "sha256-zopJevCv7ot8RLp/rSQGKO05eF4FjkLaOEMo9aq9Afo="; }; outputs = [ "out" "su" "dev" "man" ]; @@ -34,9 +34,10 @@ stdenv.mkDerivation rec { autoreconfHook bison flex docbook_xml_dtd_45 docbook_xsl itstool libxml2 libxslt + pkg-config ]; - buildInputs = [ libxcrypt ] + buildInputs = [ libbsd libxcrypt ] ++ lib.optional (pam != null && stdenv.isLinux) pam ++ lib.optional withTcb tcb; @@ -46,11 +47,6 @@ stdenv.mkDerivation rec { ./respect-xml-catalog-files-var.patch ./runtime-shell.patch ./fix-install-with-tcb.patch - # Fix HAVE_SHADOWGRP configure check - (fetchpatch { - url = "https://github.com/shadow-maint/shadow/commit/a281f241b592aec636d1b93a99e764499d68c7ef.patch"; - sha256 = "sha256-GJWg/8ggTnrbIgjI+HYa26DdVbjTHTk/IHhy7GU9G5w="; - }) ]; # The nix daemon often forbids even creating set[ug]id files. diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch index a5cb7ba6bf78..104a9dad959a 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch @@ -13,7 +13,7 @@ unit. (However, this ignores the fsck unit, so it's not perfect...) 1 file changed, 4 deletions(-) diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in -index 3dbba1f850..40d367d1c8 100644 +index c0defc31de..8f80235731 100644 --- a/rules.d/99-systemd.rules.in +++ b/rules.d/99-systemd.rules.in @@ -20,10 +20,6 @@ SUBSYSTEM=="block", TAG+="systemd" diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch index 138823ec68f5..dda8524c498d 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch @@ -1,21 +1,23 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Eelco Dolstra <eelco.dolstra@logicblox.com> -Date: Fri, 12 Apr 2013 13:16:57 +0200 +From: Raito Bezarius <masterancpp@gmail.com> +Date: Mon, 19 Jun 2023 02:11:35 +0200 Subject: [PATCH] Don't try to unmount /nix or /nix/store They'll still be remounted read-only. https://github.com/NixOS/nixos/issues/126 + +Original-Author: Eelco Dolstra <eelco.dolstra@logicblox.com> --- src/shared/fstab-util.c | 2 ++ - src/shutdown/umount.c | 2 ++ - 2 files changed, 4 insertions(+) + src/shutdown/umount.c | 6 ++++-- + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c -index 164e71a150..68e0766594 100644 +index 4ffec25c75..b99031c54e 100644 --- a/src/shared/fstab-util.c +++ b/src/shared/fstab-util.c -@@ -41,6 +41,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) { +@@ -43,6 +43,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) { /* Don't bother with the OS data itself */ if (PATH_IN_SET(mount, "/", @@ -25,15 +27,19 @@ index 164e71a150..68e0766594 100644 "/etc")) return true; diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c -index 61bd9d2601..a6243da417 100644 +index 1586c2e214..fcae95f824 100644 --- a/src/shutdown/umount.c +++ b/src/shutdown/umount.c -@@ -531,6 +531,8 @@ static int delete_md(MountPoint *m) { - +@@ -170,8 +170,10 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) { static bool nonunmountable_path(const char *path) { - return path_equal(path, "/") + assert(path); + +- return PATH_IN_SET(path, "/", "/usr") || +- path_startswith(path, "/run/initramfs"); ++ return PATH_IN_SET(path, "/", "/usr") + || path_equal(path, "/nix") + || path_equal(path, "/nix/store") - #if ! HAVE_SPLIT_USR - || path_equal(path, "/usr") - #endif ++ || path_startswith(path, "/run/initramfs"); + } + + static void log_umount_blockers(const char *mnt) { diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch index 08499a228344..2d86d1e6957a 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch @@ -10,10 +10,10 @@ container, so checking early whether it exists will fail. 1 file changed, 2 insertions(+) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 3dabe12672..e5aa4feb1e 100644 +index e170958fc5..898a674631 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -5638,6 +5638,7 @@ static int run(int argc, char *argv[]) { +@@ -5648,6 +5648,7 @@ static int run(int argc, char *argv[]) { goto finish; } } else { @@ -21,7 +21,7 @@ index 3dabe12672..e5aa4feb1e 100644 _cleanup_free_ char *p = NULL; if (arg_pivot_root_new) -@@ -5652,6 +5653,7 @@ static int run(int argc, char *argv[]) { +@@ -5662,6 +5663,7 @@ static int run(int argc, char *argv[]) { "Directory %s doesn't look like it has an OS tree (/usr/ directory is missing). Refusing.", arg_directory); goto finish; } diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch index b4a0da30c8f6..c905a4d812af 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Eelco Dolstra <eelco.dolstra@logicblox.com> -Date: Fri, 19 Dec 2014 14:46:17 +0100 +From: Raito Bezarius <masterancpp@gmail.com> +Date: Mon, 19 Jun 2023 02:13:42 +0200 Subject: [PATCH] Add some NixOS-specific unit directories Look in `/nix/var/nix/profiles/default/lib/systemd/{system,user}` for @@ -8,13 +8,15 @@ units provided by packages installed into the default profile via `nix-env -iA nixos.$package`. Also, remove /usr and /lib as these don't exist on NixOS. + +Original-Author: Eelco Dolstra <eelco.dolstra@logicblox.com> --- src/basic/path-lookup.c | 17 ++--------------- src/core/systemd.pc.in | 8 ++++---- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c -index c99e9d8786..b9f85d1f8c 100644 +index 7d158a8295..f9bd62b631 100644 --- a/src/basic/path-lookup.c +++ b/src/basic/path-lookup.c @@ -92,11 +92,7 @@ int xdg_user_data_dir(char **ret, const char *suffix) { @@ -62,35 +64,37 @@ index c99e9d8786..b9f85d1f8c 100644 STRV_IFNOTNULL(generator_late)); break; -@@ -808,7 +799,6 @@ char **generator_binary_paths(LookupScope scope) { - case LOOKUP_SCOPE_SYSTEM: +@@ -808,7 +799,6 @@ char **generator_binary_paths(RuntimeScope scope) { + case RUNTIME_SCOPE_SYSTEM: add = strv_new("/run/systemd/system-generators", "/etc/systemd/system-generators", - "/usr/local/lib/systemd/system-generators", SYSTEM_GENERATOR_DIR); break; -@@ -816,7 +806,6 @@ char **generator_binary_paths(LookupScope scope) { - case LOOKUP_SCOPE_USER: +@@ -816,7 +806,6 @@ char **generator_binary_paths(RuntimeScope scope) { + case RUNTIME_SCOPE_USER: add = strv_new("/run/systemd/user-generators", "/etc/systemd/user-generators", - "/usr/local/lib/systemd/user-generators", USER_GENERATOR_DIR); break; -@@ -855,12 +844,10 @@ char **env_generator_binary_paths(bool is_system) { - if (is_system) +@@ -855,14 +844,12 @@ char **env_generator_binary_paths(RuntimeScope runtime_scope) { + case RUNTIME_SCOPE_SYSTEM: add = strv_new("/run/systemd/system-environment-generators", "/etc/systemd/system-environment-generators", - "/usr/local/lib/systemd/system-environment-generators", SYSTEM_ENV_GENERATOR_DIR); - else + break; + + case RUNTIME_SCOPE_USER: add = strv_new("/run/systemd/user-environment-generators", "/etc/systemd/user-environment-generators", - "/usr/local/lib/systemd/user-environment-generators", USER_ENV_GENERATOR_DIR); + break; - if (!add) diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in index 693433b34b..5932a21b5b 100644 --- a/src/core/systemd.pc.in diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch index e9f73d7c7726..0a80d5ac4e83 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch @@ -13,10 +13,10 @@ in containers. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/manager.c b/src/core/manager.c -index 4bc8a06bd2..342892490e 100644 +index 22ec6e79b1..771e8e7f16 100644 --- a/src/core/manager.c +++ b/src/core/manager.c -@@ -1486,7 +1486,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) { +@@ -1559,7 +1559,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) { if (!unit_is_bound_by_inactive(u, &culprit)) continue; diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch index 2c4c3f6564e1..abc6c24dbf51 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch @@ -11,10 +11,10 @@ Subject: [PATCH] hostnamed, localed, timedated: disable methods that change 3 files changed, 25 insertions(+) diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c -index 36ab0148b9..7d458d196d 100644 +index 9ef45f8e75..99b1ec2e36 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c -@@ -1028,6 +1028,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_ +@@ -1053,6 +1053,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_ if (r < 0) return r; @@ -24,7 +24,7 @@ index 36ab0148b9..7d458d196d 100644 name = empty_to_null(name); context_read_etc_hostname(c); -@@ -1091,6 +1094,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess +@@ -1116,6 +1119,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess if (r < 0) return r; @@ -35,10 +35,10 @@ index 36ab0148b9..7d458d196d 100644 context_read_machine_info(c); diff --git a/src/locale/localed.c b/src/locale/localed.c -index 841e5e3e91..a21e34430b 100644 +index f544a73580..ce00c262cc 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c -@@ -264,6 +264,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er +@@ -229,6 +229,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er use_localegen = locale_gen_check_available(); @@ -48,7 +48,7 @@ index 841e5e3e91..a21e34430b 100644 /* If single locale without variable name is provided, then we assume it is LANG=. */ if (strv_length(l) == 1 && !strchr(l[0], '=')) { if (!locale_is_valid(l[0])) -@@ -382,6 +385,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro +@@ -347,6 +350,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro if (r < 0) return bus_log_parse_error(r); @@ -57,8 +57,8 @@ index 841e5e3e91..a21e34430b 100644 + vc_context_empty_to_null(&in); - FOREACH_STRING(name, in.keymap ?: in.toggle, in.keymap ? in.toggle : NULL) { -@@ -607,6 +613,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err + r = vc_context_verify_and_warn(&in, LOG_ERR, error); +@@ -465,6 +471,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err if (r < 0) return bus_log_parse_error(r); @@ -67,9 +67,9 @@ index 841e5e3e91..a21e34430b 100644 + x11_context_empty_to_null(&in); - if (!x11_context_is_safe(&in)) + r = x11_context_verify_and_warn(&in, LOG_ERR, error); diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c -index ad483301ef..31ed86955b 100644 +index ad1d492d6b..331af34505 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -665,6 +665,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error * diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0008-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0008-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch index 300906be04d9..3150d97be2e1 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0008-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0008-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch @@ -35,10 +35,10 @@ index e486474c44..5f373d0723 100644 <literal>Etc/UTC</literal>. The resulting link should lead to the corresponding binary diff --git a/src/basic/time-util.c b/src/basic/time-util.c -index 0bea149324..4b16115d43 100644 +index 1db630003a..31744c3e68 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c -@@ -1283,7 +1283,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) { +@@ -1350,7 +1350,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) { assert(ret); @@ -47,16 +47,16 @@ index 0bea149324..4b16115d43 100644 if (!f) return -errno; -@@ -1322,7 +1322,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) { - _cleanup_strv_free_ char **zones = NULL; - int r; +@@ -1391,7 +1391,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) { + + assert(ret); - f = fopen("/usr/share/zoneinfo/tzdata.zi", "re"); + f = fopen("/etc/zoneinfo/tzdata.zi", "re"); if (!f) return -errno; -@@ -1434,7 +1434,7 @@ int verify_timezone(const char *name, int log_level) { +@@ -1503,7 +1503,7 @@ int verify_timezone(const char *name, int log_level) { if (p - name >= PATH_MAX) return -ENAMETOOLONG; @@ -65,7 +65,7 @@ index 0bea149324..4b16115d43 100644 fd = open(t, O_RDONLY|O_CLOEXEC); if (fd < 0) -@@ -1492,7 +1492,7 @@ int get_timezone(char **ret) { +@@ -1563,7 +1563,7 @@ int get_timezone(char **ret) { if (r < 0) return r; /* returns EINVAL if not a symlink */ @@ -75,23 +75,23 @@ index 0bea149324..4b16115d43 100644 return -EINVAL; diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c -index 9e79f84691..1a1c75718c 100644 +index 1956ab3b13..9ef356f8af 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c -@@ -512,7 +512,7 @@ static int process_timezone(void) { +@@ -630,7 +630,7 @@ static int process_timezone(int rfd) { if (isempty(arg_timezone)) return 0; - e = strjoina("../usr/share/zoneinfo/", arg_timezone); + e = strjoina("zoneinfo/", arg_timezone); - (void) mkdir_parents(etc_localtime, 0755); - r = symlink_atomic(e, etc_localtime); + r = symlinkat_atomic_full(e, pfd, f, /* make_relative= */ false); + if (r < 0) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index e5aa4feb1e..a7a8fae860 100644 +index 898a674631..c41a416e04 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -1918,8 +1918,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid +@@ -1924,8 +1924,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid static const char *timezone_from_path(const char *path) { return PATH_STARTSWITH_SET( path, @@ -103,7 +103,7 @@ index e5aa4feb1e..a7a8fae860 100644 static bool etc_writable(void) { diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c -index 31ed86955b..8db8d8c288 100644 +index 331af34505..722c4b5b4f 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -282,7 +282,7 @@ static int context_read_data(Context *c) { diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0009-localectl-use-etc-X11-xkb-for-list-x11.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0009-localectl-use-etc-X11-xkb-for-list-x11.patch index fac9916cf3b4..c0f6afd7fc7b 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0009-localectl-use-etc-X11-xkb-for-list-x11.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0009-localectl-use-etc-X11-xkb-for-list-x11.patch @@ -10,7 +10,7 @@ NixOS has an option to link the xkb data files to /etc/X11, but not to 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locale/localectl.c b/src/locale/localectl.c -index fb83881cc7..c47a33134a 100644 +index d8db9d9d22..4601bb5431 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -297,7 +297,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) { diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch index eec57111b913..b8f97308acfb 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch @@ -8,10 +8,10 @@ Subject: [PATCH] build: don't create statedir and don't touch prefixdir 1 file changed, 3 deletions(-) diff --git a/meson.build b/meson.build -index b1f5477836..1a39484855 100644 +index 395eca1943..082cd748bb 100644 --- a/meson.build +++ b/meson.build -@@ -4278,9 +4278,6 @@ install_data('LICENSE.GPL2', +@@ -4707,9 +4707,6 @@ install_data('LICENSE.GPL2', install_subdir('LICENSES', install_dir : docdir) diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0011-add-rootprefix-to-lookup-dir-paths.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0011-add-rootprefix-to-lookup-dir-paths.patch index 6e07928d5fbd..fa201126ae27 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0011-add-rootprefix-to-lookup-dir-paths.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0011-add-rootprefix-to-lookup-dir-paths.patch @@ -12,10 +12,10 @@ files that I might have missed. 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/basic/constants.h b/src/basic/constants.h -index 5d68cc6332..33c06c1f65 100644 +index 3f96786da9..6e8fb40c08 100644 --- a/src/basic/constants.h +++ b/src/basic/constants.h -@@ -73,13 +73,15 @@ +@@ -74,13 +74,15 @@ "/run/" n "\0" \ "/usr/local/lib/" n "\0" \ "/usr/lib/" n "\0" \ diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0012-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0012-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch index 9d0565a6e767..fde1e2b276c5 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0012-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0012-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch @@ -10,10 +10,10 @@ This is needed for NixOS to use such scripts as systemd directory is immutable. 1 file changed, 1 insertion(+) diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c -index 5dee1b3a92..c08cf80548 100644 +index 8395bb429d..14fbc85bb4 100644 --- a/src/shutdown/shutdown.c +++ b/src/shutdown/shutdown.c -@@ -339,6 +339,7 @@ static void init_watchdog(void) { +@@ -334,6 +334,7 @@ static void init_watchdog(void) { int main(int argc, char *argv[]) { static const char* const dirs[] = { SYSTEM_SHUTDOWN_PATH, diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0013-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0013-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch index 5fa3fb14f1ff..d91150cfc490 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0013-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0013-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch @@ -9,10 +9,10 @@ This is needed for NixOS to use such scripts as systemd directory is immutable. 1 file changed, 1 insertion(+) diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 288fa4ae84..07deb19d7c 100644 +index de1f6c7ec1..d0cdebd80a 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c -@@ -186,6 +186,7 @@ static int execute( +@@ -224,6 +224,7 @@ static int execute( }; static const char* const dirs[] = { SYSTEM_SLEEP_PATH, diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0014-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0014-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch index b3d1db340ef8..13dec1070ffc 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0014-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0014-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch @@ -10,10 +10,10 @@ systemd itself uses extensively. 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/basic/path-util.h b/src/basic/path-util.h -index 56f01f41d8..f9b8627388 100644 +index 97175bee11..3839704901 100644 --- a/src/basic/path-util.h +++ b/src/basic/path-util.h -@@ -24,11 +24,11 @@ +@@ -25,11 +25,11 @@ # define PATH_SBIN_BIN_NULSTR(x) PATH_NORMAL_SBIN_BIN_NULSTR(x) #endif diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0016-inherit-systemd-environment-when-calling-generators.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0016-inherit-systemd-environment-when-calling-generators.patch index 0f67abe795c3..d6640c87454a 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0016-inherit-systemd-environment-when-calling-generators.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0016-inherit-systemd-environment-when-calling-generators.patch @@ -16,10 +16,10 @@ executables that are being called from managers. 1 file changed, 8 insertions(+) diff --git a/src/core/manager.c b/src/core/manager.c -index 342892490e..1117251fe0 100644 +index 771e8e7f16..acf3ead8d7 100644 --- a/src/core/manager.c +++ b/src/core/manager.c -@@ -3771,9 +3771,17 @@ static int build_generator_environment(Manager *m, char ***ret) { +@@ -3899,9 +3899,17 @@ static int build_generator_environment(Manager *m, char ***ret) { * adjust generated units to that. Let's pass down some bits of information that are easy for us to * determine (but a bit harder for generator scripts to determine), as environment variables. */ @@ -35,5 +35,5 @@ index 342892490e..1117251fe0 100644 return -ENOMEM; +#endif - r = strv_env_assign(&nl, "SYSTEMD_SCOPE", MANAGER_IS_SYSTEM(m) ? "system" : "user"); + r = strv_env_assign(&nl, "SYSTEMD_SCOPE", runtime_scope_to_string(m->runtime_scope)); if (r < 0) diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0017-core-don-t-taint-on-unmerged-usr.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0017-core-don-t-taint-on-unmerged-usr.patch index f509eb39ece5..73b237a29602 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0017-core-don-t-taint-on-unmerged-usr.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0017-core-don-t-taint-on-unmerged-usr.patch @@ -17,10 +17,10 @@ See also: https://github.com/systemd/systemd/issues/24191 1 file changed, 4 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c -index 1117251fe0..bf5600a6cf 100644 +index acf3ead8d7..bdbab16829 100644 --- a/src/core/manager.c +++ b/src/core/manager.c -@@ -4617,10 +4617,6 @@ char* manager_taint_string(const Manager *m) { +@@ -4754,10 +4754,6 @@ char* manager_taint_string(const Manager *m) { if (m->taint_usr) stage[n++] = "split-usr"; diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0018-tpm2_context_init-fix-driver-name-checking.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0018-tpm2_context_init-fix-driver-name-checking.patch index 8d6eab5ed847..6de01a0ae802 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0018-tpm2_context_init-fix-driver-name-checking.patch +++ b/nixpkgs/pkgs/os-specific/linux/systemd/0018-tpm2_context_init-fix-driver-name-checking.patch @@ -27,10 +27,10 @@ filename_is_valid with path_is_valid. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c -index 4345b95106..424a334df1 100644 +index ae8a8bc073..c284b244f8 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c -@@ -176,7 +176,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) { +@@ -582,7 +582,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) { fn = strjoina("libtss2-tcti-", driver, ".so.0"); /* Better safe than sorry, let's refuse strings that cannot possibly be valid driver early, before going to disk. */ diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/0019-bootctl-also-print-efi-files-not-owned-by-systemd-in.patch b/nixpkgs/pkgs/os-specific/linux/systemd/0019-bootctl-also-print-efi-files-not-owned-by-systemd-in.patch deleted file mode 100644 index 84fc6528b984..000000000000 --- a/nixpkgs/pkgs/os-specific/linux/systemd/0019-bootctl-also-print-efi-files-not-owned-by-systemd-in.patch +++ /dev/null @@ -1,46 +0,0 @@ -From bc0f378a1149b59e88e9345e579d62fec7f50cdf Mon Sep 17 00:00:00 2001 -From: Arian van Putten <arian.vanputten@gmail.com> -Date: Wed, 31 May 2023 13:27:13 +0200 -Subject: [PATCH] bootctl: also print efi files not owned by systemd in status - -We should not skip over unknown entries in EFI/BOOT/ but -also print them out in status so people are aware that they are there. - -(cherry picked from commit a680d4fb87bad829989949e5ea4fc6db90453456) ---- - src/boot/bootctl-status.c | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/src/boot/bootctl-status.c b/src/boot/bootctl-status.c -index 2e2bf1f7e1..f1ac4a9c8a 100644 ---- a/src/boot/bootctl-status.c -+++ b/src/boot/bootctl-status.c -@@ -225,9 +225,8 @@ static int enumerate_binaries( - return log_error_errno(errno, "Failed to open file '%s' for reading: %m", filename); - - r = get_file_version(fd, &v); -- if (r == -ESRCH) /* Not the file we are looking for. */ -- continue; -- if (r < 0) -+ -+ if (r < 0 && r != -ESRCH) - return r; - - if (*previous) { /* Let's output the previous entry now, since now we know that there will be -@@ -242,10 +241,10 @@ static int enumerate_binaries( - /* Do not output this entry immediately, but store what should be printed in a state - * variable, because we only will know the tree glyph to print (branch or final edge) once we - * read one more entry */ -- if (r > 0) -- r = asprintf(previous, "/%s/%s (%s%s%s)", path, de->d_name, ansi_highlight(), v, ansi_normal()); -- else -+ if (r == -ESRCH) /* No systemd-owned file but still interesting to print */ - r = asprintf(previous, "/%s/%s", path, de->d_name); -+ else /* if (r >= 0) */ -+ r = asprintf(previous, "/%s/%s (%s%s%s)", path, de->d_name, ansi_highlight(), v, ansi_normal()); - if (r < 0) - return log_oom(); - --- -2.39.2 (Apple Git-143) - diff --git a/nixpkgs/pkgs/os-specific/linux/systemd/default.nix b/nixpkgs/pkgs/os-specific/linux/systemd/default.nix index 338f0c7463c0..a938a98f2417 100644 --- a/nixpkgs/pkgs/os-specific/linux/systemd/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/systemd/default.nix @@ -55,7 +55,6 @@ , e2fsprogs , elfutils , linuxHeaders ? stdenv.cc.libc.linuxHeaders -, gnu-efi , iptables , withSelinux ? false , libselinux @@ -89,9 +88,11 @@ , withAnalyze ? true , withApparmor ? true , withAudit ? true +, withBootloader ? true # compiles systemd-boot, assumes EFI is available. , withCompression ? true # adds bzip2, lz4, xz and zstd , withCoredump ? true , withCryptsetup ? true +, withRepart ? true , withDocumentation ? true , withEfi ? stdenv.hostPlatform.isEfi , withFido2 ? true @@ -116,6 +117,7 @@ , withNss ? !stdenv.hostPlatform.isMusl , withOomd ? true , withPam ? true +, withPasswordQuality ? false , withPCRE2 ? true , withPolkit ? true , withPortabled ? !stdenv.hostPlatform.isMusl @@ -123,6 +125,7 @@ , withResolved ? true , withShellCompletions ? true , withSysusers ? false # conflicts with the NixOS user management +, withSysupdate ? true , withTimedated ? true , withTimesyncd ? true , withTpm2Tss ? true @@ -146,17 +149,21 @@ assert withCoredump -> withCompression; assert withHomed -> withCryptsetup; assert withHomed -> withPam; assert withUkify -> withEfi; +assert withRepart -> withCryptsetup; +assert withBootloader -> withEfi; +# passwdqc is not packaged in nixpkgs yet, if you want to fix this, please submit a PR. +assert !withPasswordQuality; let wantCurl = withRemote || withImportd; wantGcrypt = withResolved || withImportd; - version = "253.6"; + version = "254.3"; # Bump this variable on every (major) version change. See below (in the meson options list) for why. # command: # $ curl -s https://api.github.com/repos/systemd/systemd/releases/latest | \ # jq '.created_at|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime' - releaseTimestamp = "1676488940"; + releaseTimestamp = "1690536449"; in stdenv.mkDerivation (finalAttrs: { inherit pname version; @@ -167,7 +174,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "systemd"; repo = "systemd-stable"; rev = "v${version}"; - hash = "sha256-LZs6QuBe23W643bTuz+MD2pzHiapsBJBHoFXi/QjzG4="; + hash = "sha256-ObnsAiKwhwEb4ti611eS/wGpg3Sss/pUy/gANPAbXbs="; }; # On major changes, or when otherwise required, you *must* reformat the patches, @@ -194,7 +201,6 @@ stdenv.mkDerivation (finalAttrs: { ./0016-inherit-systemd-environment-when-calling-generators.patch ./0017-core-don-t-taint-on-unmerged-usr.patch ./0018-tpm2_context_init-fix-driver-name-checking.patch - ./0019-bootctl-also-print-efi-files-not-owned-by-systemd-in.patch ] ++ lib.optional stdenv.hostPlatform.isMusl ( let oe-core = fetchzip { @@ -229,26 +235,14 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace src/basic/path-util.h --replace "@defaultPathNormal@" "${placeholder "out"}/bin/" - substituteInPlace src/boot/efi/meson.build \ - --replace \ - "run_command(cc.cmd_array(), '-print-prog-name=objcopy', check: true).stdout().strip()" \ - "'${stdenv.cc.bintools.targetPrefix}objcopy'" '' + lib.optionalString withLibBPF '' substituteInPlace meson.build \ --replace "find_program('clang'" "find_program('${stdenv.cc.targetPrefix}clang'" - # BPF does not work with stack protector - substituteInPlace src/core/bpf/meson.build \ - --replace "clang_flags = [" "clang_flags = [ '-fno-stack-protector'," '' + lib.optionalString withUkify '' substituteInPlace src/ukify/ukify.py \ --replace \ "'readelf'" \ "'${targetPackages.stdenv.cc.bintools.targetPrefix}readelf'" - # The objcopy dependency is removed in v254 - substituteInPlace src/ukify/ukify.py \ - --replace \ - "'objcopy'" \ - "'${targetPackages.stdenv.cc.bintools.targetPrefix}objcopy'" '' + ( let # The following patches references to dynamic libraries to ensure that @@ -325,6 +319,9 @@ stdenv.mkDerivation (finalAttrs: { # Support for PKCS#11 in systemd-cryptsetup, systemd-cryptenroll and systemd-homed { name = "libp11-kit.so.0"; pkg = opt (withHomed || withCryptsetup) p11-kit; } + + # Password quality support + { name = "libpasswdqc.so.1"; pkg = opt withPasswordQuality null; } ]; patchDlOpen = dl: @@ -395,7 +392,7 @@ stdenv.mkDerivation (finalAttrs: { docbook_xml_dtd_42 docbook_xml_dtd_45 bash - (buildPackages.python3Packages.python.withPackages (ps: with ps; [ lxml jinja2 ])) + (buildPackages.python3Packages.python.withPackages (ps: with ps; [ lxml jinja2 ] ++ lib.optional withEfi ps.pyelftools)) ] ++ lib.optionals withLibBPF [ bpftools @@ -422,7 +419,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals withCompression [ bzip2 lz4 xz zstd ] ++ lib.optional withCoredump elfutils ++ lib.optional withCryptsetup (lib.getDev cryptsetup.dev) - ++ lib.optional withEfi gnu-efi ++ lib.optional withKexectools kexec-tools ++ lib.optional withKmod kmod ++ lib.optional withLibidn2 libidn2 @@ -498,6 +494,8 @@ stdenv.mkDerivation (finalAttrs: { "-Dlibidn2=${lib.boolToString withLibidn2}" "-Dfirstboot=${lib.boolToString withFirstboot}" "-Dsysusers=${lib.boolToString withSysusers}" + "-Drepart=${lib.boolToString withRepart}" + "-Dsysupdate=${lib.boolToString withSysupdate}" "-Dquotacheck=false" "-Dldconfig=false" "-Dsmack=true" @@ -537,12 +535,9 @@ stdenv.mkDerivation (finalAttrs: { "-Dman=true" "-Defi=${lib.boolToString withEfi}" - "-Dgnu-efi=${lib.boolToString withEfi}" + "-Dbootloader=${lib.boolToString withBootloader}" "-Dukify=${lib.boolToString withUkify}" - ] ++ lib.optionals withEfi [ - "-Defi-libdir=${toString gnu-efi}/lib" - "-Defi-includedir=${toString gnu-efi}/include/efi" ] ++ lib.optionals (withShellCompletions == false) [ "-Dbashcompletiondir=no" "-Dzshcompletiondir=no" @@ -586,6 +581,7 @@ stdenv.mkDerivation (finalAttrs: { where = [ "man/systemd-analyze.xml" "man/systemd.service.xml" + "man/systemd-run.xml" "src/analyze/test-verify.c" "src/test/test-env-file.c" "src/test/test-fileio.c" @@ -595,7 +591,7 @@ stdenv.mkDerivation (finalAttrs: { { search = "/bin/cat"; replacement = "${coreutils}/bin/cat"; - where = [ "test/create-busybox-container" "test/test-execute/exec-noexecpaths-simple.service" "src/journal/cat.c" ]; + where = [ "test/test-execute/exec-noexecpaths-simple.service" "src/journal/cat.c" ]; } { search = "/usr/lib/systemd/systemd-fsck"; diff --git a/nixpkgs/pkgs/os-specific/linux/wiringpi/default.nix b/nixpkgs/pkgs/os-specific/linux/wiringpi/default.nix index e2412b37aab5..bc80e2a33543 100644 --- a/nixpkgs/pkgs/os-specific/linux/wiringpi/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/wiringpi/default.nix @@ -15,7 +15,7 @@ let rev = version; sha256 = "sha256-VxAaPhaPXd9xYt663Ju6SLblqiSLizauhhuFqCqbO5M="; } - }: stdenv.mkDerivation rec { + }: stdenv.mkDerivation (finalAttrs: { pname = "wiringpi-${subprj}"; inherit version src; sourceRoot = "${src.name}/${subprj}"; @@ -31,7 +31,7 @@ let # On NixOS we don't need to run ldconfig during build: "LDCONFIG=echo" ]; - }; + }); passthru = { inherit mkSubProject; wiringPi = mkSubProject { diff --git a/nixpkgs/pkgs/os-specific/linux/zfs/generic.nix b/nixpkgs/pkgs/os-specific/linux/zfs/generic.nix index 347b4a299710..41aa909532fd 100644 --- a/nixpkgs/pkgs/os-specific/linux/zfs/generic.nix +++ b/nixpkgs/pkgs/os-specific/linux/zfs/generic.nix @@ -54,13 +54,7 @@ stdenv'.mkDerivation { inherit rev sha256; }; - patches = [ - (fetchpatch { - name = "musl.patch"; - url = "https://github.com/openzfs/zfs/commit/1f19826c9ac85835cbde61a7439d9d1fefe43a4a.patch"; - sha256 = "XEaK227ubfOwlB2s851UvZ6xp/QOtYUWYsKTkEHzmo0="; - }) - ] ++ extraPatches; + patches = extraPatches; postPatch = optionalString buildKernel '' patchShebangs scripts @@ -82,31 +76,22 @@ stdenv'.mkDerivation { substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d" substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" \ --replace "/etc/default" "$out/etc/default" - substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc" - - substituteInPlace ./contrib/initramfs/hooks/Makefile.am \ - --replace "/usr/share/initramfs-tools/hooks" "$out/usr/share/initramfs-tools/hooks" - substituteInPlace ./contrib/initramfs/Makefile.am \ - --replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools" - substituteInPlace ./contrib/initramfs/scripts/Makefile.am \ - --replace "/usr/share/initramfs-tools/scripts" "$out/usr/share/initramfs-tools/scripts" - substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \ - --replace "/usr/share/initramfs-tools/scripts/local-top" "$out/usr/share/initramfs-tools/scripts/local-top" - substituteInPlace ./contrib/initramfs/scripts/Makefile.am \ - --replace "/usr/share/initramfs-tools/scripts" "$out/usr/share/initramfs-tools/scripts" - substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \ - --replace "/usr/share/initramfs-tools/scripts/local-top" "$out/usr/share/initramfs-tools/scripts/local-top" - substituteInPlace ./etc/systemd/system/Makefile.am \ - --replace '$(DESTDIR)$(systemdunitdir)' "$out"'$(DESTDIR)$(systemdunitdir)' - - substituteInPlace ./contrib/initramfs/conf.d/Makefile.am \ - --replace "/usr/share/initramfs-tools/conf.d" "$out/usr/share/initramfs-tools/conf.d" - substituteInPlace ./contrib/initramfs/conf-hooks.d/Makefile.am \ - --replace "/usr/share/initramfs-tools/conf-hooks.d" "$out/usr/share/initramfs-tools/conf-hooks.d" - - substituteInPlace ./cmd/vdev_id/vdev_id \ - --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ - "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" + # TODO: drop when upgrading to 2.2.0 + ${if isUnstable then '' + substituteInPlace ./contrib/initramfs/Makefile.am \ + --replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools" + substituteInPlace ./udev/vdev_id \ + --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ + "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" + '' else '' + substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)/zfs" "$out/etc/zfs" + + find ./contrib/initramfs -name Makefile.am -exec sed -i -e 's|/usr/share/initramfs-tools|'$out'/share/initramfs-tools|g' {} \; + + substituteInPlace ./cmd/vdev_id/vdev_id \ + --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ + "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" + ''} ''; nativeBuildInputs = [ autoreconfHook269 nukeReferences ] @@ -168,10 +153,12 @@ stdenv'.mkDerivation { # Remove provided services as they are buggy rm $out/etc/systemd/system/zfs-import-*.service - sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/* - for i in $out/etc/systemd/system/*; do - substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target" + if [ -L $i ]; then + continue + fi + sed -i '/zfs-import-scan.service/d' $i + substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target" done # Remove tests because they add a runtime dependency on gcc @@ -232,3 +219,4 @@ stdenv'.mkDerivation { broken = buildKernel && (kernelCompatible != null) && !kernelCompatible; }; } + diff --git a/nixpkgs/pkgs/os-specific/linux/zfs/stable.nix b/nixpkgs/pkgs/os-specific/linux/zfs/stable.nix index 5680f93e21a0..14cda12e6f32 100644 --- a/nixpkgs/pkgs/os-specific/linux/zfs/stable.nix +++ b/nixpkgs/pkgs/os-specific/linux/zfs/stable.nix @@ -3,6 +3,7 @@ , stdenv , linuxKernel , removeLinuxDRM ? false +, fetchpatch , ... } @ args: @@ -16,6 +17,13 @@ callPackage ./generic.nix args { then kernel.kernelOlder "6.4" else kernel.kernelOlder "6.2"; latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_1; + extraPatches = [ + (fetchpatch { + name = "musl.patch"; + url = "https://github.com/openzfs/zfs/commit/1f19826c9ac85835cbde61a7439d9d1fefe43a4a.patch"; + sha256 = "XEaK227ubfOwlB2s851UvZ6xp/QOtYUWYsKTkEHzmo0="; + }) + ]; # this package should point to the latest release. version = "2.1.12"; diff --git a/nixpkgs/pkgs/os-specific/linux/zfs/unstable.nix b/nixpkgs/pkgs/os-specific/linux/zfs/unstable.nix index 1bb882de7125..592d94b0030a 100644 --- a/nixpkgs/pkgs/os-specific/linux/zfs/unstable.nix +++ b/nixpkgs/pkgs/os-specific/linux/zfs/unstable.nix @@ -16,17 +16,16 @@ callPackage ./generic.nix args { else kernel.kernelOlder "6.2"; latestCompatibleLinuxPackages = if stdenv'.isx86_64 || removeLinuxDRM - then linuxKernel.packages.linux_6_4 - else linuxKernel.packages.linux_6_1; + then linuxKernel.packages.linux_6_4 + else linuxKernel.packages.linux_6_1; # this package should point to a version / git revision compatible with the latest kernel release # 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.1.13-unstable-2023-08-02"; - rev = "245850b66c1e93ec19744ca55aae143d007d2c32"; + version = "2.2.0-rc4"; - sha256 = "TtgKV02W8OfU6hssULF/IoFXAPHBTvTKXn5hJ/RGAc0="; + sha256 = "sha256-zTG6iujlWB2H8j6i+t59zdyztoDFk373AjgHzC8x5mQ="; isUnstable = true; } diff --git a/nixpkgs/pkgs/os-specific/windows/npiperelay/default.nix b/nixpkgs/pkgs/os-specific/windows/npiperelay/default.nix index edc83a27e551..d2347edcbaff 100644 --- a/nixpkgs/pkgs/os-specific/windows/npiperelay/default.nix +++ b/nixpkgs/pkgs/os-specific/windows/npiperelay/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "sha256-cg4aZmpTysc8m1euxIO2XPv8OMnBk1DwhFcuIFHF/1o="; }; - vendorSha256 = null; + vendorHash = null; meta = { description = "Access Windows named pipes from WSL"; |