From aa248752074d7951745b67a2789ee183f827504d Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 16 Oct 2020 00:04:51 -0400 Subject: [PATCH 1/5] ipfs: prepare to add 0.9 in addition (cherry picked from commit 27949d611a7cca14e21438df725f7c6356f458ac) --- .../networking/ipfs/{default.nix => 0.8.nix} | 0 pkgs/applications/networking/ipfs/0.9.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) rename pkgs/applications/networking/ipfs/{default.nix => 0.8.nix} (100%) create mode 100644 pkgs/applications/networking/ipfs/0.9.nix diff --git a/pkgs/applications/networking/ipfs/default.nix b/pkgs/applications/networking/ipfs/0.8.nix similarity index 100% rename from pkgs/applications/networking/ipfs/default.nix rename to pkgs/applications/networking/ipfs/0.8.nix diff --git a/pkgs/applications/networking/ipfs/0.9.nix b/pkgs/applications/networking/ipfs/0.9.nix new file mode 100644 index 00000000000..1b648108e78 --- /dev/null +++ b/pkgs/applications/networking/ipfs/0.9.nix @@ -0,0 +1,45 @@ +{ lib, buildGoModule, fetchurl, nixosTests }: + +buildGoModule rec { + pname = "ipfs"; + version = "0.8.0"; + rev = "v${version}"; + + # go-ipfs makes changes to it's source tarball that don't match the git source. + src = fetchurl { + url = "https://github.com/ipfs/go-ipfs/releases/download/${rev}/go-ipfs-source.tar.gz"; + sha256 = "sha256-uK3+Ekr5AM6mmGmjFSj1Rotm5pbH657BYUlP9B39WEw="; + }; + + # tarball contains multiple files/directories + postUnpack = '' + mkdir ipfs-src + shopt -s extglob + mv !(ipfs-src) ipfs-src || true + cd ipfs-src + ''; + + sourceRoot = "."; + + subPackages = [ "cmd/ipfs" ]; + + passthru.tests.ipfs = nixosTests.ipfs; + + vendorSha256 = null; + + postInstall = '' + install --mode=444 -D misc/systemd/ipfs.service $out/etc/systemd/system/ipfs.service + install --mode=444 -D misc/systemd/ipfs-api.socket $out/etc/systemd/system/ipfs-api.socket + install --mode=444 -D misc/systemd/ipfs-gateway.socket $out/etc/systemd/system/ipfs-gateway.socket + substituteInPlace $out/etc/systemd/system/ipfs.service \ + --replace /usr/bin/ipfs $out/bin/ipfs + ''; + + meta = with lib; { + description = "A global, versioned, peer-to-peer filesystem"; + homepage = "https://ipfs.io/"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ fpletz ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25cb7fb4a94..9189d746894 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5802,7 +5802,7 @@ in iperf3 = callPackage ../tools/networking/iperf/3.nix { }; iperf = iperf3; - ipfs = callPackage ../applications/networking/ipfs { }; + ipfs = callPackage ../applications/networking/ipfs/0.8.nix { }; ipfs-migrator = callPackage ../applications/networking/ipfs-migrator { }; ipfs-cluster = callPackage ../applications/networking/ipfs-cluster { }; From 0b2fbb2feffbb67c4d34718dc6aa818a2de364c2 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 2 Jul 2021 14:41:23 +0000 Subject: [PATCH 2/5] ipfs: Add 0.9.0 in addition IPFS evolves quite fast. The network protocol is compatible, but we don't want to force migrations on stable, so we add a new version instead. See #100676 for last time we did this. (Adapted from from commit d96ccfaf16c5454aaa920ff39b38c81bcf104a3a) --- pkgs/applications/networking/ipfs/0.9.nix | 4 ++-- pkgs/top-level/all-packages.nix | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/ipfs/0.9.nix b/pkgs/applications/networking/ipfs/0.9.nix index 1b648108e78..e96602a54c5 100644 --- a/pkgs/applications/networking/ipfs/0.9.nix +++ b/pkgs/applications/networking/ipfs/0.9.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "ipfs"; - version = "0.8.0"; + version = "0.9.0"; rev = "v${version}"; # go-ipfs makes changes to it's source tarball that don't match the git source. src = fetchurl { url = "https://github.com/ipfs/go-ipfs/releases/download/${rev}/go-ipfs-source.tar.gz"; - sha256 = "sha256-uK3+Ekr5AM6mmGmjFSj1Rotm5pbH657BYUlP9B39WEw="; + sha256 = "sha256:1fyffnw1d860w7gwm6ijbgrh68297z5bmvww8yqfshm3xgvcs6bf"; }; # tarball contains multiple files/directories diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9189d746894..93967ff85c8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5802,7 +5802,11 @@ in iperf3 = callPackage ../tools/networking/iperf/3.nix { }; iperf = iperf3; - ipfs = callPackage ../applications/networking/ipfs/0.8.nix { }; + ipfs = ipfs_0_8; + ipfs_latest = ipfs_0_9; + ipfs_0_8 = callPackage ../applications/networking/ipfs/0.8.nix { }; + ipfs_0_9 = callPackage ../applications/networking/ipfs/0.9.nix { }; + ipfs-migrator = callPackage ../applications/networking/ipfs-migrator { }; ipfs-cluster = callPackage ../applications/networking/ipfs-cluster { }; From db3b901f0bd4a8de3cc9c830bc141a51d8baea11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lengyel=20Bal=C3=A1zs?= Date: Mon, 14 Jun 2021 14:25:02 +0200 Subject: [PATCH 3/5] linux-kernel: update config for 5.13 (cherry picked from commit 2ac508d578a99c447fabf97fa7b788062da70b95) --- pkgs/os-specific/linux/kernel/common-config.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 776a422df73..26bb9f82063 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -248,7 +248,7 @@ let DRM_LOAD_EDID_FIRMWARE = yes; VGA_SWITCHEROO = yes; # Hybrid graphics support DRM_GMA500 = whenAtLeast "5.12" module; - DRM_GMA600 = yes; + DRM_GMA600 = whenOlder "5.13" yes; DRM_GMA3600 = whenOlder "5.12" yes; DRM_VMWGFX_FBCON = yes; # necessary for amdgpu polaris support @@ -443,7 +443,7 @@ let SECURITY_SELINUX_BOOTPARAM_VALUE = whenOlder "5.1" (freeform "0"); # Disable SELinux by default # Prevent processes from ptracing non-children processes SECURITY_YAMA = option yes; - DEVKMEM = no; # Disable /dev/kmem + DEVKMEM = whenOlder "5.13" no; # Disable /dev/kmem USER_NS = yes; # Support for user namespaces @@ -698,7 +698,7 @@ let THRUSTMASTER_FF = yes; ZEROPLUS_FF = yes; - MODULE_COMPRESS = yes; + MODULE_COMPRESS = whenOlder "5.13" yes; MODULE_COMPRESS_XZ = yes; SYSVIPC = yes; # System-V IPC From 23b6a0735bfd784666ed315952ad7540eb5b1832 Mon Sep 17 00:00:00 2001 From: Yurii Matsiuk Date: Mon, 28 Jun 2021 14:35:35 +0200 Subject: [PATCH 4/5] linux_5_13: init at 5.13 (cherry picked from commit 367a53a82b0a3ffe6c1ea4261c22764129994669) --- pkgs/os-specific/linux/kernel/linux-5.13.nix | 21 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 8 ++++++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/linux-5.13.nix diff --git a/pkgs/os-specific/linux/kernel/linux-5.13.nix b/pkgs/os-specific/linux/kernel/linux-5.13.nix new file mode 100644 index 00000000000..eb01fb6289c --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-5.13.nix @@ -0,0 +1,21 @@ +{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, modDirVersionArg ? null, ... } @ args: + +with lib; + +buildLinux (args // rec { + version = "5.13"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; + + # 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 = "sha256-P2uql/N1GEOfUd8uTz1lqCLKX/AWqo5g0sxTuVpsidk="; + }; + + kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_5_13 ]; +} // (args.argsOverride or { })) + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 93967ff85c8..d43b2d2d69f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20414,6 +20414,13 @@ in ]; }; + linux_5_13 = callPackage ../os-specific/linux/kernel/linux-5.13.nix { + kernelPatches = [ + kernelPatches.bridge_stp_helper + kernelPatches.request_key_helper + ]; + }; + linux-rt_5_10 = callPackage ../os-specific/linux/kernel/linux-rt-5.10.nix { kernelPatches = [ kernelPatches.bridge_stp_helper @@ -20720,6 +20727,7 @@ in linuxPackages_5_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_4); linuxPackages_5_10 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_10); linuxPackages_5_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_12); + linuxPackages_5_13 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_13); # When adding to the list above: # - Update linuxPackages_latest to the latest version From 917357a28796c3bb9f2f4810a72d1d67ea6401e1 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Mon, 28 Jun 2021 22:40:41 +0000 Subject: [PATCH 5/5] nixos/tests/kernel-generic: fix evaluation This is breaking the tarball build, because #128502 depends on this test existing. After this commit, nixpkgs.tarball once again evaluates. (cherry picked from commit 0dccbe2729efbaee995605bff8de3c83ca61860f) --- nixos/tests/kernel-generic.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/tests/kernel-generic.nix b/nixos/tests/kernel-generic.nix index cb23bb2fc2d..cd32049dff4 100644 --- a/nixos/tests/kernel-generic.nix +++ b/nixos/tests/kernel-generic.nix @@ -32,6 +32,7 @@ with pkgs; { linux_5_4 = makeKernelTest "5.4" linuxPackages_5_4; linux_5_10 = makeKernelTest "5.10" linuxPackages_5_10; linux_5_12 = makeKernelTest "5.12" linuxPackages_5_12; + linux_5_13 = makeKernelTest "5.13" linuxPackages_5_13; linux_testing = makeKernelTest "testing" linuxPackages_testing; }