From 2ff6e037a94045f63ebd161236f37740d83e911b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Tue, 13 Jul 2021 18:10:33 +0200 Subject: [PATCH 1/4] icingaweb2: 2.8.3 -> 2.9.0 --- pkgs/servers/icingaweb2/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/icingaweb2/default.nix b/pkgs/servers/icingaweb2/default.nix index 6e8cdd5dca41..7923674a3b76 100644 --- a/pkgs/servers/icingaweb2/default.nix +++ b/pkgs/servers/icingaweb2/default.nix @@ -1,14 +1,14 @@ -{ stdenv, lib, fetchFromGitHub, makeWrapper, php }: +{ stdenvNoCC, lib, fetchFromGitHub, makeWrapper, php }: -stdenv.mkDerivation rec { +stdenvNoCC.mkDerivation rec { pname = "icingaweb2"; - version = "2.8.3"; + version = "2.9.0"; src = fetchFromGitHub { owner = "Icinga"; repo = "icingaweb2"; rev = "v${version}"; - sha256 = "sha256-wk6rTEYRS0q0HpQRbFAmfeYVrF/xLP/HchEXNqqNpYg="; + sha256 = "1vp2gdvgvw960178yaqql6iza0rg2h8japsnass3kkrwrmb2liq5"; }; nativeBuildInputs = [ makeWrapper ]; @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { Analyse problems and act on them. ''; homepage = "https://www.icinga.com/products/icinga-web-2/"; - license = licenses.gpl2; + license = licenses.gpl2Only; platforms = platforms.all; maintainers = with maintainers; [ das_j ]; }; From aae29c6e10d033894bd1568f3e272b73edf75b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Tue, 13 Jul 2021 18:21:44 +0200 Subject: [PATCH 2/4] icingaweb2-ipl: Init at 0.6.0 --- pkgs/servers/icingaweb2/ipl.nix | 26 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 pkgs/servers/icingaweb2/ipl.nix diff --git a/pkgs/servers/icingaweb2/ipl.nix b/pkgs/servers/icingaweb2/ipl.nix new file mode 100644 index 000000000000..35b9357009c4 --- /dev/null +++ b/pkgs/servers/icingaweb2/ipl.nix @@ -0,0 +1,26 @@ +{ stdenvNoCC, lib, fetchFromGitHub }: + +stdenvNoCC.mkDerivation rec { + pname = "icingaweb2-ipl"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "Icinga"; + repo = "icinga-php-library"; + rev = "v${version}"; + sha256 = "0nzvd84r9f1mypfhq4p37hsvkrbd5wzgs1m9qhj45ncvf5rq49f1"; + }; + + installPhase = '' + mkdir -p "$out" + cp -r * "$out" + ''; + + meta = { + description = "PHP library package for Icingaweb 2"; + homepage = "https://github.com/Icinga/icinga-php-library"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ das_j ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 280283e07619..777680a2e8a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19491,6 +19491,7 @@ in icecream = callPackage ../servers/icecream { }; + icingaweb2-ipl = callPackage ../servers/icingaweb2/ipl.nix { }; icingaweb2 = callPackage ../servers/icingaweb2 { }; icingaweb2Modules = { theme-april = callPackage ../servers/icingaweb2/theme-april { }; From 3af5d881e0576325c572655a90c7604739804acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Tue, 13 Jul 2021 18:22:12 +0200 Subject: [PATCH 3/4] icingaweb2-thirdparty: Init at 0.10.0 --- pkgs/servers/icingaweb2/thirdparty.nix | 26 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 pkgs/servers/icingaweb2/thirdparty.nix diff --git a/pkgs/servers/icingaweb2/thirdparty.nix b/pkgs/servers/icingaweb2/thirdparty.nix new file mode 100644 index 000000000000..ae3ce9538c95 --- /dev/null +++ b/pkgs/servers/icingaweb2/thirdparty.nix @@ -0,0 +1,26 @@ +{ stdenvNoCC, lib, fetchFromGitHub }: + +stdenvNoCC.mkDerivation rec { + pname = "icingaweb2-thirdparty"; + version = "0.10.0"; + + src = fetchFromGitHub { + owner = "Icinga"; + repo = "icinga-php-thirdparty"; + rev = "v${version}"; + sha256 = "03zq6p2xyjrln8hdfks70hg8mwa51d3pnkswnzavpbxlbk83vzz5"; + }; + + installPhase = '' + mkdir -p "$out" + cp -r * "$out" + ''; + + meta = { + description = "Third party dependencies for Icingaweb 2"; + homepage = "https://github.com/Icinga/icinga-php-thirdparty"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ das_j ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 777680a2e8a2..88fec1492145 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19492,6 +19492,7 @@ in icecream = callPackage ../servers/icecream { }; icingaweb2-ipl = callPackage ../servers/icingaweb2/ipl.nix { }; + icingaweb2-thirdparty = callPackage ../servers/icingaweb2/thirdparty.nix { }; icingaweb2 = callPackage ../servers/icingaweb2 { }; icingaweb2Modules = { theme-april = callPackage ../servers/icingaweb2/theme-april { }; From 6d203a68c624bbedaa7995f88d2e1e091bdb97f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Tue, 13 Jul 2021 18:22:28 +0200 Subject: [PATCH 4/4] nixos/icingaweb2: Add ipl and thirdparty libraries These are required since 2.9.0 --- .../from_md/release-notes/rl-2111.section.xml | 10 +++++++++- .../manual/release-notes/rl-2111.section.md | 2 ++ .../web-apps/icingaweb2/icingaweb2.nix | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml index 53c1a18a507b..66a3f908129b 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml @@ -479,7 +479,7 @@ - + yggdrasil was upgraded to a new major @@ -488,6 +488,14 @@ changelog. + + + icingaweb2 was upgraded to a new release + which requires a manual database upgrade, see + upstream + changelog. + +
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md index ad56b5cd7d72..d270a362079e 100644 --- a/nixos/doc/manual/release-notes/rl-2111.section.md +++ b/nixos/doc/manual/release-notes/rl-2111.section.md @@ -120,6 +120,8 @@ In addition to numerous new and upgraded packages, this release has the followin - `yggdrasil` was upgraded to a new major release with breaking changes, see [upstream changelog](https://github.com/yggdrasil-network/yggdrasil-go/releases/tag/v0.4.0). +- `icingaweb2` was upgraded to a new release which requires a manual database upgrade, see [upstream changelog](https://github.com/Icinga/icingaweb2/releases/tag/v2.9.0). + ## Other Notable Changes {#sec-release-21.11-notable-changes} - The setting [`services.openssh.logLevel`](options.html#opt-services.openssh.logLevel) `"VERBOSE"` `"INFO"`. This brings NixOS in line with upstream and other Linux distributions, and reduces log spam on servers due to bruteforcing botnets. diff --git a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix index eea49bda283b..f8f0854f1bcb 100644 --- a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix +++ b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix @@ -23,6 +23,16 @@ in { ''; }; + libraryPaths = mkOption { + type = attrsOf package; + default = { }; + description = '' + Libraries to add to the Icingaweb2 library path. + The name of the attribute is the name of the library, the value + is the package to add. + ''; + }; + virtualHost = mkOption { type = nullOr str; default = "icingaweb2"; @@ -167,6 +177,9 @@ in { services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") { ${poolName} = { user = "icingaweb2"; + phpEnv = { + ICINGAWEB_LIBDIR = toString (pkgs.linkFarm "icingaweb2-libdir" (mapAttrsToList (name: path: { inherit name path; }) cfg.libraryPaths)); + }; phpPackage = pkgs.php.withExtensions ({ enabled, all }: [ all.imagick ] ++ enabled); phpOptions = '' date.timezone = "${cfg.timezone}" @@ -184,6 +197,11 @@ in { }; }; + services.icingaweb2.libraryPaths = { + ipl = pkgs.icingaweb2-ipl; + thirdparty = pkgs.icingaweb2-thirdparty; + }; + systemd.services."phpfpm-${poolName}".serviceConfig.ReadWritePaths = [ "/etc/icingaweb2" ]; services.nginx = {