From 5264329acd97790fc8dbbaa301c14269c8ce47cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 13 Aug 2021 09:48:40 +0200 Subject: [PATCH 1/5] linuxPackages_zen: 5.13.9 -> 5.13.10-zen1 (cherry picked from commit 27edf4ccb48ca48375064d5fc964b8ad9b7c0578) --- pkgs/os-specific/linux/kernel/linux-zen.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index 712f3f08895..70a9ecc6028 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -1,20 +1,25 @@ { lib, fetchFromGitHub, buildLinux, ... } @ args: let - version = "5.13.9"; - suffix = "zen1"; + # having the full version string here makes it easier to update + modDirVersion = "5.13.10-zen1"; + parts = lib.splitString "-" modDirVersion; + version = lib.elemAt parts 0; + suffix = lib.elemAt parts 1; + + numbers = lib.splitString "." version; + branch = "${lib.elemAt numbers 0}.${lib.elemAt numbers 1}"; in buildLinux (args // { - modDirVersion = "${version}-${suffix}"; - inherit version; + inherit version modDirVersion; isZen = true; src = fetchFromGitHub { owner = "zen-kernel"; repo = "zen-kernel"; - rev = "v${version}-${suffix}"; - sha256 = "sha256-RuY6ZIIKU56R+IGMtQDV6mIubGDqonRpsIdlrpAHFXM="; + rev = "v${modDirVersion}"; + sha256 = "sha256-0QNRWKB7tAWZR3wuKJf+es6WqjScSKnDrMwH74o2oOA="; }; structuredExtraConfig = with lib.kernel; { @@ -22,7 +27,7 @@ buildLinux (args // { }; extraMeta = { - branch = "5.13"; + inherit branch; maintainers = with lib.maintainers; [ atemu andresilva ]; description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads."; }; From a0a2f6b6ef28330ea9a97c798688d0d3a8a465d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 18 Aug 2021 22:23:56 +0200 Subject: [PATCH 2/5] linux_zen: add update script (cherry picked from commit e4db1c88471229f71aa529ff388e490e087f2cfe) --- pkgs/os-specific/linux/kernel/update-zen.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 pkgs/os-specific/linux/kernel/update-zen.sh diff --git a/pkgs/os-specific/linux/kernel/update-zen.sh b/pkgs/os-specific/linux/kernel/update-zen.sh new file mode 100755 index 00000000000..1532d7be02b --- /dev/null +++ b/pkgs/os-specific/linux/kernel/update-zen.sh @@ -0,0 +1,21 @@ +#! /usr/bin/env nix-shell +#! nix-shell -I nixpkgs=../../../.. -i bash -p nix-prefetch git gnused gnugrep nix curl +set -euo pipefail -x + +nixpkgs="$(git rev-parse --show-toplevel)" +old=$(nix-instantiate --eval -A linuxPackages_zen.kernel.modDirVersion "$nixpkgs") +old="${old%\"}" +old="${old#\"}" +new=$(curl https://github.com/zen-kernel/zen-kernel/releases.atom | grep -m1 -o -E '[0-9.]+-zen[0-9]+') +if [[ "$new" == "$old" ]]; then + echo "already up-to-date" + exit 0 +fi + +path="$nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix" + +sed -i -e "s!modDirVersion = \".*\"!modDirVersion = \"${new}\"!" "$path" +checksum=$(nix-prefetch "(import ${nixpkgs} {}).linuxPackages_zen.kernel") +sed -i -e "s!sha256 = \".*\"!sha256 = \"${checksum}\"!" "$path" + +git commit -m "linux_zen: ${old} -> ${new}" $path From c07d3055cabb076a1f09c990ac39b17f4ffb42b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 22 Aug 2021 16:36:23 +0200 Subject: [PATCH 3/5] linux_zen: 5.13.10-zen1 -> 5.13.12-zen1 (cherry picked from commit 5e6958fa75696085384f60f7d10f9b4c03822565) --- pkgs/os-specific/linux/kernel/linux-zen.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index 70a9ecc6028..f35b5ad8e42 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -2,7 +2,7 @@ let # having the full version string here makes it easier to update - modDirVersion = "5.13.10-zen1"; + modDirVersion = "5.13.12-zen1"; parts = lib.splitString "-" modDirVersion; version = lib.elemAt parts 0; suffix = lib.elemAt parts 1; @@ -19,7 +19,7 @@ buildLinux (args // { owner = "zen-kernel"; repo = "zen-kernel"; rev = "v${modDirVersion}"; - sha256 = "sha256-0QNRWKB7tAWZR3wuKJf+es6WqjScSKnDrMwH74o2oOA="; + sha256 = "sha256-UHcQZlQ164oVMVK/Fqggoi+aTDFrLv9Tngsy/q74+Bc="; }; structuredExtraConfig = with lib.kernel; { From 846fa972d53852874696075d5ae7322754b16f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 26 Aug 2021 19:35:17 +0200 Subject: [PATCH 4/5] linux_zen: 5.13.12-zen1 -> 5.13.13-zen1 (cherry picked from commit 093349c14ef3b8985154d878d793a3b7a7292eff) --- pkgs/os-specific/linux/kernel/linux-zen.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index f35b5ad8e42..7750b776575 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -2,7 +2,7 @@ let # having the full version string here makes it easier to update - modDirVersion = "5.13.12-zen1"; + modDirVersion = "5.13.13-zen1"; parts = lib.splitString "-" modDirVersion; version = lib.elemAt parts 0; suffix = lib.elemAt parts 1; @@ -19,7 +19,7 @@ buildLinux (args // { owner = "zen-kernel"; repo = "zen-kernel"; rev = "v${modDirVersion}"; - sha256 = "sha256-UHcQZlQ164oVMVK/Fqggoi+aTDFrLv9Tngsy/q74+Bc="; + sha256 = "sha256-aTTbhXy0wsDDCSbX1k27l9g3FliqwE6TbRq2zkI3mnw="; }; structuredExtraConfig = with lib.kernel; { From 0db1a5ee44f05c7aeb2d18f7e97a7e49a23cd5c6 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 27 Aug 2021 20:21:25 +0200 Subject: [PATCH 5/5] nixos/nextcloud: remove invalid `--database-table-prefix` option This doesn't work anymore and thus breaks the installation leaving a broken `/var/lib/nextcloud`. It isn't a big deal since we set this value in the override config before, so the correct table-prefix is still used. In order to confirm that, I decided to add a custom prefix to the basic test. (cherry picked from commit eaeb4fe04ee5a5ffae4f7dc03d3f072d59d80337) --- nixos/modules/services/web-apps/nextcloud.nix | 2 -- nixos/tests/nextcloud/basic.nix | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index c4a31c481ae..4b9b0806bac 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -502,8 +502,6 @@ in { ${if c.dbport != null then "--database-port" else null} = ''"${toString c.dbport}"''; ${if c.dbuser != null then "--database-user" else null} = ''"${c.dbuser}"''; "--database-pass" = dbpass; - ${if c.dbtableprefix != null - then "--database-table-prefix" else null} = ''"${toString c.dbtableprefix}"''; "--admin-user" = ''"${c.adminuser}"''; "--admin-pass" = adminpass; "--data-dir" = ''"${cfg.home}/data"''; diff --git a/nixos/tests/nextcloud/basic.nix b/nixos/tests/nextcloud/basic.nix index 76f7f68dc96..c4ce34748ac 100644 --- a/nixos/tests/nextcloud/basic.nix +++ b/nixos/tests/nextcloud/basic.nix @@ -37,6 +37,7 @@ in { config = { # Don't inherit adminuser since "root" is supposed to be the default inherit adminpass; + dbtableprefix = "nixos_"; }; autoUpdateApps = { enable = true;