From 6301ac0eabb6d288c3127c6eb852671bf6c0c920 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sat, 24 Apr 2021 14:01:47 +0200 Subject: [PATCH] jellyfin_10_5: remove unmaintained version This version contains a vulnerability[1], and isn't maintained. The original reason to have two jellyfin versions was to allow end-users to backup the database before the layout was upgraded, but these backups should be done periodically. [1]: (cherry picked from commit 2ad8aa72ae32d1890a94fbb3c26cc51b2661b88b) --- nixos/modules/services/misc/jellyfin.nix | 6 +-- pkgs/servers/jellyfin/10.5.x.nix | 61 ------------------------ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 4 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 pkgs/servers/jellyfin/10.5.x.nix diff --git a/nixos/modules/services/misc/jellyfin.nix b/nixos/modules/services/misc/jellyfin.nix index 0493dadea94e..7b10947fadd7 100644 --- a/nixos/modules/services/misc/jellyfin.nix +++ b/nixos/modules/services/misc/jellyfin.nix @@ -18,6 +18,7 @@ in package = mkOption { type = types.package; + default = pkgs.jellyfin; example = literalExample "pkgs.jellyfin"; description = '' Jellyfin package to use. @@ -48,11 +49,6 @@ in }; }; - services.jellyfin.package = mkDefault ( - if versionAtLeast config.system.stateVersion "20.09" then pkgs.jellyfin - else pkgs.jellyfin_10_5 - ); - users.users = mkIf (cfg.user == "jellyfin") { jellyfin = { group = cfg.group; diff --git a/pkgs/servers/jellyfin/10.5.x.nix b/pkgs/servers/jellyfin/10.5.x.nix deleted file mode 100644 index 17903871c8d7..000000000000 --- a/pkgs/servers/jellyfin/10.5.x.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ stdenv, lib, fetchurl, unzip, sqlite, makeWrapper, dotnetCorePackages, ffmpeg, - fontconfig, freetype, nixosTests }: - -let - os = if stdenv.isDarwin then "osx" else "linux"; - arch = - with stdenv.hostPlatform; - if isx86_32 then "x86" - else if isx86_64 then "x64" - else if isAarch32 then "arm" - else if isAarch64 then "arm64" - else lib.warn "Unsupported architecture, some image processing features might be unavailable" "unknown"; - musl = lib.optionalString stdenv.hostPlatform.isMusl - (if (arch != "x64") - then lib.warn "Some image processing features might be unavailable for non x86-64 with Musl" "musl-" - else "musl-"); - runtimeDir = "${os}-${musl}${arch}"; - -in stdenv.mkDerivation rec { - pname = "jellyfin"; - version = "10.5.5"; - - # Impossible to build anything offline with dotnet - src = fetchurl { - url = "https://github.com/jellyfin/jellyfin/releases/download/v${version}/jellyfin_${version}_portable.tar.gz"; - sha256 = "1s3hva1j5w74qc9wyqnmr5clk4smzfi7wvx8qrzrwy81mx7r5w27"; - }; - - buildInputs = [ - unzip - makeWrapper - ]; - - propagatedBuildInputs = [ - dotnetCorePackages.aspnetcore_3_1 - sqlite - ]; - - preferLocalBuild = true; - - installPhase = '' - install -dm 755 "$out/opt/jellyfin" - cp -r * "$out/opt/jellyfin" - makeWrapper "${dotnetCorePackages.aspnetcore_3_1}/bin/dotnet" $out/bin/jellyfin \ - --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ - sqlite fontconfig freetype stdenv.cc.cc.lib - ]}:$out/opt/jellyfin/runtimes/${runtimeDir}/native/" \ - --add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg" - ''; - - passthru.tests = { - smoke-test = nixosTests.jellyfin; - }; - - meta = with stdenv.lib; { - description = "The Free Software Media System"; - homepage = "https://jellyfin.org/"; - license = licenses.gpl2; - maintainers = with maintainers; [ nyanloutre minijackson ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 4bf57b973160..e2e0b2d66c4b 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -220,6 +220,7 @@ mapAliases ({ joseki = apache-jena-fuseki; # added 2016-02-28 json_glib = json-glib; # added 2018-02-25 kdecoration-viewer = throw "kdecoration-viewer has been removed from nixpkgs, as there is no upstream activity"; # 2020-06-16 + jellyfin_10_5 = throw "Jellyfin 10.5 is no longer supported and contains a security vulnerability. Please upgrade to a newer version."; # added 2021-04-26 julia_07 = throw "deprecated in favor of julia_10 LTS"; # added 2020-09-15 julia_11 = throw "deprecated in favor of latest Julia version"; # added 2020-09-15 kdeconnect = kdeApplications.kdeconnect-kde; # added 2020-10-28 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 029f9a4ed664..8e07f1e3e7a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2111,8 +2111,6 @@ in jellyfin = callPackage ../servers/jellyfin { }; - jellyfin_10_5 = callPackage ../servers/jellyfin/10.5.x.nix { }; - jellyfin-mpv-shim = python3Packages.callPackage ../applications/video/jellyfin-mpv-shim { }; jotta-cli = callPackage ../applications/misc/jotta-cli { };