diff options
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux')
12 files changed, 239 insertions, 51 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/decklink/default.nix b/nixpkgs/pkgs/os-specific/linux/decklink/default.nix new file mode 100644 index 000000000000..63bfe4a63af2 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/decklink/default.nix @@ -0,0 +1,52 @@ +{ stdenv +, lib +, blackmagic-desktop-video +, kernel +}: + +stdenv.mkDerivation rec { + pname = "decklink"; + + # the download is a horrible curl mess. we reuse it between the kernel module + # and desktop service, since the version of the two have to match anyways. + # See pkgs/tools/video/blackmagic-desktop-video/default.nix for more. + inherit (blackmagic-desktop-video) src version; + + KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; + INSTALL_MOD_PATH = placeholder "out"; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + postUnpack = '' + tar xf Blackmagic_Desktop_Video_Linux_${lib.versions.majorMinor version}/other/${stdenv.hostPlatform.uname.processor}/desktopvideo-${version}-${stdenv.hostPlatform.uname.processor}.tar.gz + moduleRoot=$NIX_BUILD_TOP/desktopvideo-${version}-${stdenv.hostPlatform.uname.processor}/usr/src + ''; + + + buildPhase = '' + runHook preBuild + + make -C $moduleRoot/blackmagic-${version} -j$NIX_BUILD_CORES + make -C $moduleRoot/blackmagic-io-${version} -j$NIX_BUILD_CORES + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + make -C $KERNELDIR M=$moduleRoot/blackmagic-${version} modules_install + make -C $KERNELDIR M=$moduleRoot/blackmagic-io-${version} modules_install + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://www.blackmagicdesign.com/support/family/capture-and-playback"; + maintainers = [ maintainers.hexchen ]; + license = licenses.unfree; + description = "Kernel module for the Blackmagic Design Decklink cards"; + sourceProvenance = with lib.sourceTypes; [ binaryFirmware ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/os-specific/linux/fw-ectool/default.nix b/nixpkgs/pkgs/os-specific/linux/fw-ectool/default.nix new file mode 100644 index 000000000000..a73cc1896ecd --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/fw-ectool/default.nix @@ -0,0 +1,41 @@ +{ stdenv +, lib +, fetchFromGitHub +, pkg-config +, hostname +}: + +stdenv.mkDerivation { + pname = "fw-ectool"; + version = "unstable-2022-12-03"; + + src = fetchFromGitHub { + owner = "DHowett"; + repo = "fw-ectool"; + rev = "54c140399bbc3e6a3dce6c9f842727c4128367be"; + hash = "sha256-2teJFz4zcA+USpbVPXMEIHLdmMLem8ik7YrmrSxr/n0="; + }; + + nativeBuildInputs = [ + pkg-config + hostname + ]; + + buildPhase = '' + patchShebangs util + make out=out utils + ''; + + installPhase = '' + install -D out/util/ectool $out/bin/ectool + ''; + + meta = with lib; { + description = "EC-Tool adjusted for usage with framework embedded controller"; + homepage = "https://github.com/DHowett/framework-ec"; + license = licenses.bsd3; + maintainers = [ maintainers.mkg20001 ]; + platforms = platforms.linux; + mainProgram = "ectool"; + }; +} diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json b/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json index f3ffbde6f1d9..ab62028af7bc 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/nixpkgs/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -2,71 +2,71 @@ "4.14": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-4.14.323-hardened1.patch", - "sha256": "0id59byd331mz8ga02gbs3g1q0y4n2wz6mi9s0dmp1yjagjd9m70", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.323-hardened1/linux-hardened-4.14.323-hardened1.patch" + "name": "linux-hardened-4.14.325-hardened1.patch", + "sha256": "1mc1pyjjksg2f4189wyas55ax8czzhai2i3jc6n7l9jmfwj7xr9q", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.325-hardened1/linux-hardened-4.14.325-hardened1.patch" }, - "sha256": "1g2fh0mn1sv0kq2hh3pynmx2fjai7hdwhf4fnaspl7j5n88902kg", - "version": "4.14.323" + "sha256": "117p1mdha57f6d3kdwac9jrbmib7g77q4xhir8ghl6fmrs1f2sav", + "version": "4.14.325" }, "4.19": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-4.19.292-hardened1.patch", - "sha256": "1na729sricp347jqp3y2j4yxxg84haa62mwmj9zq0pa1k6f037ph", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.292-hardened1/linux-hardened-4.19.292-hardened1.patch" + "name": "linux-hardened-4.19.294-hardened1.patch", + "sha256": "1s70vz8rai1z440rmwzipwpq7wa7p2bvri43zmkbisrfggm1lz2r", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.294-hardened1/linux-hardened-4.19.294-hardened1.patch" }, - "sha256": "0dr12v4jqmzxcqdghqqjny5zp3g4dx9lxqrl9d4fxz23s79ji5rl", - "version": "4.19.292" + "sha256": "03x0xsb8a369zdr81hg6xdl5n5v48k6iwnhj6r29725777lvvbfc", + "version": "4.19.294" }, "5.10": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.10.191-hardened1.patch", - "sha256": "02949v0qrr4b76g9rl1z8lkdfv3mc1pfb4h14z9bd0dqg5shlz0j", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.191-hardened1/linux-hardened-5.10.191-hardened1.patch" + "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" }, - "sha256": "1hk2x5dgvfq9v6161v25wz5qpzgyvqbx34xbm7ww8z4ish76cm6b", - "version": "5.10.191" + "sha256": "15fr7krhpmqz0xqjg78m2xvfllbni3xh8xyhxh9ni31ppd3mw394", + "version": "5.10.194" }, "5.15": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.15.127-hardened1.patch", - "sha256": "13z0x45jig81f3vhb5w3lvb554b78888grp7w60sqgglx7bckspb", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.127-hardened1/linux-hardened-5.15.127-hardened1.patch" + "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" }, - "sha256": "09lgj9hs1cjxg84hb7avras4rlsx18igr69mx433l9hv6issbl5d", - "version": "5.15.127" + "sha256": "0qix62jsn3z9yccakac7fvqnip19zi05qn0w5wkgb7rj0x0lwimb", + "version": "5.15.130" }, "5.4": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.4.254-hardened1.patch", - "sha256": "0yh5kb23lp89qnk90lz73j101bg20npr7clx0y8zmg6dihls764z", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.254-hardened1/linux-hardened-5.4.254-hardened1.patch" + "name": "linux-hardened-5.4.256-hardened1.patch", + "sha256": "1rsp30g5xry5y95mz0i6walkcxj6abyrsaq3fwhz0ka6nq6g7w82", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.256-hardened1/linux-hardened-5.4.256-hardened1.patch" }, - "sha256": "1iyrm2xql15ifhy2b939ywrrc44yd41b79sjjim4vqxmc6lqsq2i", - "version": "5.4.254" + "sha256": "0fim5q9xakwnjfg48bpsic9r2r8dvrjlalqqkm9vh1rml9mhi967", + "version": "5.4.256" }, "6.1": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-6.1.47-hardened1.patch", - "sha256": "0wgsjb05m9f0fgv4vj0m0ll9bx22z894qlpwb45b33mq66fvbgwn", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.1.47-hardened1/linux-hardened-6.1.47-hardened1.patch" + "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" }, - "sha256": "1azwvlzyp1s2adm17ic0jfmv3ph70wqzycb8s96z9987y1m8pmck", - "version": "6.1.47" + "sha256": "0fqhmb6v28rssd44z7jw57mwvvskpl4kabjylck0pg54irnl9c2q", + "version": "6.1.51" }, "6.4": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-6.4.12-hardened1.patch", - "sha256": "0xkcvyy2ii5wfdw8h21svcsz3s3q0qk4yx7dxzbrisap10d79l51", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.4.12-hardened1/linux-hardened-6.4.12-hardened1.patch" + "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" }, - "sha256": "0x56b4hslm730ghvggz41fjkbzlnxp6k8857dn7iy27yavlipafc", - "version": "6.4.12" + "sha256": "1rjh0jrn5qvxwzmyg478n08vckkld8r52nkc102ppqvsfhiy7skm", + "version": "6.4.14" } } diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.15.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.15.nix index 905ce00cfc43..e189e7201088 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.15.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-5.15.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.15.130"; + version = "5.15.131"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0qix62jsn3z9yccakac7fvqnip19zi05qn0w5wkgb7rj0x0lwimb"; + sha256 = "0sacnbw48lblnqaj56nybh588sq4k84gwf0r5zinzyrryj8k6z4r"; }; } // (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 index 75e3abd118e6..9e14c7a6117e 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.1.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.1.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "6.1.51"; + version = "6.1.52"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "0fqhmb6v28rssd44z7jw57mwvvskpl4kabjylck0pg54irnl9c2q"; + 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 index 1cf9f26ba8ae..b5d9d6451324 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.4.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.4.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "6.4.14"; + version = "6.4.15"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "1rjh0jrn5qvxwzmyg478n08vckkld8r52nkc102ppqvsfhiy7skm"; + 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 index 3c2badfc6272..341cc84be74d 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.5.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-6.5.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "6.5.1"; + version = "6.5.2"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - hash = "sha256-I3Zd1EQlRizZKtvuUmcGCP1/P9GDqDslunp7SIPQRRs="; + hash = "sha256-ICfhQFfVaK093BANrfTIhTpJsDEnBHimHYj2ARVyZQ8="; }; } // (args.argsOverride or { })) diff --git a/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix b/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix index fb7f410db8dc..e5a1443d3225 100644 --- a/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/linuxptp/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { pname = "linuxptp"; - version = "4.0"; + version = "4.1"; src = fetchurl { url = "mirror://sourceforge/linuxptp/${pname}-${version}.tgz"; - hash = "sha256-0n1e8pa7PSheIuafda4CO0tCovRlUTDW05DYr8vD2TM="; + hash = "sha256-4XQ9RPggiJfjCJXaNXnmcP+Rm5FP60talJ8+Qh3d5TU="; }; postPatch = '' diff --git a/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/default.nix b/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/default.nix index b871c63e36d3..c6ec0866791e 100644 --- a/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/default.nix @@ -3,6 +3,8 @@ , coreutils , gnused , gnugrep +, jq +, util-linux , nix , lib , nixosTests @@ -20,7 +22,7 @@ substituteAll { nix_x86_64_linux = fallback.x86_64-linux; nix_i686_linux = fallback.i686-linux; nix_aarch64_linux = fallback.aarch64-linux; - path = lib.makeBinPath [ coreutils gnused gnugrep ]; + path = lib.makeBinPath [ coreutils gnused gnugrep jq util-linux ]; nativeBuildInputs = [ installShellFiles ]; diff --git a/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.8 b/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.8 index 64bbbee411d7..b0ff5b0a672f 100644 --- a/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.8 +++ b/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.8 @@ -10,7 +10,7 @@ .Sh SYNOPSIS .Nm .Bro -.Cm switch | boot | test | build | dry-build | dry-activate | edit | build-vm | build-vm-with-bootloader +.Cm switch | boot | test | build | dry-build | dry-activate | edit | build-vm | build-vm-with-bootloader | list-generations Op Fl -json .Brc .br .Op Fl -upgrade | -upgrade-all @@ -196,6 +196,14 @@ The boot loader is installed on an automatically generated virtual disk containing a .Pa /boot partition. +. +.It Cm list-generations Op Fl -json +List the available generations in a similar manner to the boot loader +menu. It shows the generation number, build date and time, NixOS version, +kernel version and the configuration revision. This is useful to get +information e.g. for which generation to roll back to with +.Ic nixos-rebuild switch Fl -generation Ar N +There is also a json version of output available. .El . . diff --git a/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 89871056c482..2f89642845e2 100755 --- a/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/nixpkgs/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -36,6 +36,7 @@ verboseScript= noFlake= # comma separated list of vars to preserve when using sudo preservedSudoVars=NIXOS_INSTALL_BOOTLOADER +json= # log the given argument to stderr log() { @@ -48,7 +49,7 @@ while [ "$#" -gt 0 ]; do --help) showSyntax ;; - switch|boot|test|build|edit|dry-build|dry-run|dry-activate|build-vm|build-vm-with-bootloader) + switch|boot|test|build|edit|dry-build|dry-run|dry-activate|build-vm|build-vm-with-bootloader|list-generations) if [ "$i" = dry-run ]; then i=dry-build; fi # exactly one action mandatory, bail out if multiple are given if [ -n "$action" ]; then showSyntax; fi @@ -146,6 +147,9 @@ while [ "$#" -gt 0 ]; do k="$1"; shift 1 lockFlags+=("$i" "$j" "$k") ;; + --json) + json=1 + ;; *) log "$0: unknown option \`$i'" exit 1 @@ -507,6 +511,87 @@ if [ "$action" = dry-build ]; then extraBuildFlags+=(--dry-run) fi +if [ "$action" = list-generations ]; then + if [ ! -L "$profile" ]; then + log "No profile \`$(basename "$profile")' found" + exit 1 + fi + + generation_from_dir() { + generation_dir="$1" + generation_base="$(basename "$generation_dir")" # Has the format "system-123-link" for generation 123 + no_link_gen="${generation_base%-link}" # remove the "-link" + echo "${no_link_gen##*-}" # remove everything before the last dash + } + describe_generation(){ + generation_dir="$1" + generation_number="$(generation_from_dir "$generation_dir")" + nixos_version="$(cat "$generation_dir/nixos-version" 2> /dev/null || echo "Unknown")" + + kernel_dir="$(dirname "$(realpath "$generation_dir/kernel")")" + kernel_version="$(ls "$kernel_dir/lib/modules" || echo "Unknown")" + + configurationRevision="$("$generation_dir/sw/bin/nixos-version" --configuration-revision 2> /dev/null || true)" + + # Old nixos-version output ignored unknown flags and just printed the version + # therefore the following workaround is done not to show the default output + nixos_version_default="$("$generation_dir/sw/bin/nixos-version")" + if [ "$configurationRevision" == "$nixos_version_default" ]; then + configurationRevision="" + fi + + # jq automatically quotes the output => don't try to quote it in output! + build_date="$(stat "$generation_dir" --format=%W | jq 'todate')" + + pushd "$generation_dir/specialisation/" > /dev/null || : + specialisation_list=(*) + popd > /dev/null || : + + specialisations="$(jq --compact-output --null-input '$ARGS.positional' --args -- "${specialisation_list[@]}")" + + if [ "$(basename "$generation_dir")" = "$(readlink "$profile")" ]; then + current_generation_tag="true" + else + current_generation_tag="false" + fi + + # Escape userdefined strings + nixos_version="$(jq -aR <<< "$nixos_version")" + kernel_version="$(jq -aR <<< "$kernel_version")" + configurationRevision="$(jq -aR <<< "$configurationRevision")" + cat << EOF +{ + "generation": $generation_number, + "date": $build_date, + "nixosVersion": $nixos_version, + "kernelVersion": $kernel_version, + "configurationRevision": $configurationRevision, + "specialisations": $specialisations, + "current": $current_generation_tag +} +EOF + } + + find "$(dirname "$profile")" -regex "$profile-[0-9]+-link" | + sort -Vr | + while read -r generation_dir; do + describe_generation "$generation_dir" + done | + if [ -z "$json" ]; then + jq --slurp -r '.[] | [ + ([.generation, (if .current == true then "current" else "" end)] | join(" ")), + (.date | fromdate | strflocaltime("%Y-%m-%d %H:%M:%S")), + .nixosVersion, .kernelVersion, .configurationRevision, + (.specialisations | join(" ")) + ] | @tsv' | + column --separator $'\t' --table --table-columns "Generation,Build-date,NixOS version,Kernel,Configuration Revision,Specialisation" | + ${PAGER:cat} + else + jq --slurp . + fi + exit 0 +fi + # Either upgrade the configuration in the system profile (for "switch" # or "boot"), or just build it and create a symlink "result" in the diff --git a/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix index 1613e11e0280..2ed6829f3614 100644 --- a/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/pam_mount/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "pam_mount"; - version = "2.19"; + version = "2.20"; src = fetchurl { - url = "mirror://sourceforge/pam-mount/pam_mount/${pname}-${version}.tar.xz"; - sha256 = "02m6w04xhgv2yx69yxph8giw0sp39s9lvvlffslyna46fnr64qvb"; + url = "https://inai.de/files/pam_mount/${pname}-${version}.tar.xz"; + hash = "sha256-VCYgekhWgPjhdkukBbs4w5pODIMGvIJxkQ8bgZozbO0="; }; patches = [ |