diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ca9919f46729..047fe343043f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4957,6 +4957,12 @@ githubId = 25955146; name = "eyJhb"; }; + f2k1de = { + name = "f2k1de"; + email = "hi@f2k1.de"; + github = "f2k1de"; + githubId = 11199213; + }; f4814n = { email = "me@f4814n.de"; github = "f4814"; diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 1e869cf14401..2e257cff6213 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -182,6 +182,8 @@ In addition to numerous new and upgraded packages, this release has the followin - `git-bug` has been updated to at least version 0.8.0, which includes backwards incompatible changes. The `git-bug-migration` package can be used to upgrade existing repositories. +- `graylog` has been updated to version 5, which can not be upgraded directly from the previously packaged version 3.3. If you had installed the previously packaged version 3.3, please follow the [upgrade path](https://go2docs.graylog.org/5-0/upgrading_graylog/upgrade_path.htm) from 3.3 to 4.0 to 4.3 to 5.0. + - `nushell` has been updated to at least version 0.77.0, which includes potential breaking changes in aliases. The old aliases are now available as `old-alias` but it is recommended you migrate to the new format. See [Reworked aliases](https://www.nushell.sh/blog/2023-03-14-nushell_0_77.html#reworked-aliases-breaking-changes-kubouch). - `keepassx` and `keepassx2` have been removed, due to upstream [stopping development](https://www.keepassx.org/index.html%3Fp=636.html). Consider [KeePassXC](https://keepassxc.org) as a maintained alternative. diff --git a/nixos/modules/services/logging/graylog.nix b/nixos/modules/services/logging/graylog.nix index 70c3ca50888c..1eb51c50ff79 100644 --- a/nixos/modules/services/logging/graylog.nix +++ b/nixos/modules/services/logging/graylog.nix @@ -37,8 +37,8 @@ in package = mkOption { type = types.package; - default = pkgs.graylog; - defaultText = literalExpression "pkgs.graylog"; + default = if versionOlder config.system.stateVersion "23.05" then pkgs.graylog-3_3 else pkgs.graylog-5_0; + defaultText = literalExpression (if versionOlder config.system.stateVersion "23.05" then "pkgs.graylog-3_3" else "pkgs.graylog-5_0"); description = lib.mdDoc "Graylog package to use."; }; diff --git a/pkgs/tools/misc/graylog/3.3.nix b/pkgs/tools/misc/graylog/3.3.nix new file mode 100644 index 000000000000..fc93b9fc5829 --- /dev/null +++ b/pkgs/tools/misc/graylog/3.3.nix @@ -0,0 +1,9 @@ +{ callPackage, lib }: +let + buildGraylog = callPackage ./graylog.nix {}; +in buildGraylog { + version = "3.3.16"; + sha256 = "sha256-P/cnfYKnMSnDD4otEyirKlLaFduyfSO9sao4BY3c3Z4="; + maintainers = [ lib.maintainers.fadenb ]; + license = lib.licenses.gpl3; +} diff --git a/pkgs/tools/misc/graylog/4.0.nix b/pkgs/tools/misc/graylog/4.0.nix new file mode 100644 index 000000000000..cae23dd431d7 --- /dev/null +++ b/pkgs/tools/misc/graylog/4.0.nix @@ -0,0 +1,9 @@ +{ callPackage, lib, ...}: +let + buildGraylog = callPackage ./graylog.nix {}; +in buildGraylog { + version = "4.0.8"; + sha256 = "sha256-1JlJNJSU1wJiztLhYD87YM/7p3YCBXBKerEo/xfumUg="; + maintainers = [ lib.maintainers.f2k1de ]; + license = lib.licenses.sspl; +} diff --git a/pkgs/tools/misc/graylog/4.3.nix b/pkgs/tools/misc/graylog/4.3.nix new file mode 100644 index 000000000000..1bd2ed3ec70d --- /dev/null +++ b/pkgs/tools/misc/graylog/4.3.nix @@ -0,0 +1,9 @@ +{ callPackage, lib, ...}: +let + buildGraylog = callPackage ./graylog.nix {}; +in buildGraylog { + version = "4.3.9"; + sha256 = "sha256-BMw6U47LQQFFVM34rgadMetpYTtj6R3E+uU0dtTcH64="; + maintainers = [ lib.maintainers.f2k1de ]; + license = lib.licenses.sspl; +} diff --git a/pkgs/tools/misc/graylog/5.0.nix b/pkgs/tools/misc/graylog/5.0.nix new file mode 100644 index 000000000000..d13c682d7c75 --- /dev/null +++ b/pkgs/tools/misc/graylog/5.0.nix @@ -0,0 +1,9 @@ +{ callPackage, lib, ...}: +let + buildGraylog = callPackage ./graylog.nix {}; +in buildGraylog { + version = "5.0.6"; + sha256 = "sha256-GOxiGx2BU4x4A9W0k94gqXlhRwoixm0WK0UZN+LXkyQ="; + maintainers = [ lib.maintainers.f2k1de ]; + license = lib.licenses.sspl; +} diff --git a/pkgs/tools/misc/graylog/default.nix b/pkgs/tools/misc/graylog/default.nix deleted file mode 100644 index 99f130b3e5df..000000000000 --- a/pkgs/tools/misc/graylog/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ lib, stdenv, fetchurl, makeWrapper, openjdk11_headless, nixosTests }: - -stdenv.mkDerivation rec { - pname = "graylog"; - version = "3.3.16"; - - src = fetchurl { - url = "https://packages.graylog2.org/releases/graylog/graylog-${version}.tgz"; - sha256 = "sha256-P/cnfYKnMSnDD4otEyirKlLaFduyfSO9sao4BY3c3Z4="; - }; - - dontBuild = true; - dontStrip = true; - - nativeBuildInputs = [ makeWrapper ]; - makeWrapperArgs = [ "--set-default" "JAVA_HOME" "${openjdk11_headless}" ]; - - passthru.tests = { inherit (nixosTests) graylog; }; - - installPhase = '' - mkdir -p $out - cp -r {graylog.jar,lib,bin,plugin} $out - wrapProgram $out/bin/graylogctl $makeWrapperArgs - ''; - - meta = with lib; { - description = "Open source log management solution"; - homepage = "https://www.graylog.org/"; - sourceProvenance = with sourceTypes; [ binaryBytecode ]; - license = licenses.gpl3; - maintainers = [ maintainers.fadenb ]; - mainProgram = "graylogctl"; - platforms = platforms.unix; - }; -} diff --git a/pkgs/tools/misc/graylog/graylog.nix b/pkgs/tools/misc/graylog/graylog.nix new file mode 100644 index 000000000000..4608d6fa3f57 --- /dev/null +++ b/pkgs/tools/misc/graylog/graylog.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchurl, makeWrapper, openjdk11_headless, openjdk17_headless, systemd, nixosTests}: + +{ version, sha256, maintainers, license }: +stdenv.mkDerivation rec { + pname = "graylog_${lib.versions.majorMinor version}"; + inherit version; + + src = fetchurl { + url = "https://packages.graylog2.org/releases/graylog/graylog-${version}.tgz"; + inherit sha256; + }; + + dontBuild = true; + + nativeBuildInputs = [ makeWrapper ]; + makeWrapperArgs = [ + "--set-default" "JAVA_HOME" "${if (lib.versionAtLeast version "5.0") then openjdk17_headless else openjdk11_headless}" + "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ systemd ]}" + ]; + + passthru.tests = { inherit (nixosTests) graylog; }; + + installPhase = '' + mkdir -p $out + cp -r {graylog.jar,bin,plugin} $out + '' + lib.optionalString (lib.versionOlder version "4.3") '' + cp -r lib $out + '' + '' + wrapProgram $out/bin/graylogctl $makeWrapperArgs + ''; + + meta = with lib; { + description = "Open source log management solution"; + homepage = "https://www.graylog.org/"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + inherit license; + inherit maintainers; + mainProgram = "graylogctl"; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/misc/graylog/plugins.nix b/pkgs/tools/misc/graylog/plugins.nix index 756484234d6e..205576584581 100644 --- a/pkgs/tools/misc/graylog/plugins.nix +++ b/pkgs/tools/misc/graylog/plugins.nix @@ -1,6 +1,6 @@ -{ pkgs, lib, stdenv, fetchurl, unzip, graylog }: +{ lib, stdenv, fetchurl, unzip, graylog-5_0 }: -with pkgs.lib; +with lib; let glPlugin = a@{ @@ -17,7 +17,7 @@ let dontUnpack = true; nativeBuildInputs = [ unzip ]; meta = a.meta // { - platforms = graylog.meta.platforms; + platforms = graylog-5_0.meta.platforms; maintainers = (a.meta.maintainers or []) ++ [ maintainers.fadenb ]; sourceProvenance = with sourceTypes; [ binaryBytecode ]; }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 35a380785875..19f9ced8fc8c 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -641,6 +641,7 @@ mapAliases ({ grafana-mimir = throw "'grafana-mimir' has been renamed to/replaced by 'mimir'"; # Added 2022-06-07 gr-ais = gnuradio3_7.pkgs.ais; # Added 2019-05-27, changed 2020-10-16 grantlee5 = throw "'grantlee5' has been renamed to/replaced by 'libsForQt5.grantlee'"; # Converted to throw 2022-02-22 + graylog = throw "graylog is now available in versions 3.3 up to 5.0. Please mind the upgrade path and choose the appropriate version. Direct upgrading from 3.3 to 4.3 or above is not supported"; # Added 2023-04-24 gr-gsm = gnuradio3_7.pkgs.gsm; # Added 2019-05-27, changed 2020-10-16 grib-api = throw "grib-api has been replaced by ecCodes => https://confluence.ecmwf.int/display/ECC/GRIB-API+migration"; # Added 2022-01-05 gringo = clingo; # added 2022-11-27 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b186a403ab7c..879b71698fb8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8112,7 +8112,14 @@ with pkgs; grails = callPackage ../development/web/grails { jdk = null; }; - graylog = callPackage ../tools/misc/graylog { }; + graylog-3_3 = callPackage ../tools/misc/graylog/3.3.nix { }; + + graylog-4_0 = callPackage ../tools/misc/graylog/4.0.nix { }; + + graylog-4_3 = callPackage ../tools/misc/graylog/4.3.nix { }; + + graylog-5_0 = callPackage ../tools/misc/graylog/5.0.nix { }; + graylogPlugins = recurseIntoAttrs ( callPackage ../tools/misc/graylog/plugins.nix { } );