Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jellyfin/jellyfin-web: 10.8.13 -> 10.9.1 #310932

Merged
merged 2 commits into from
May 13, 2024
Merged

Conversation

minijackson
Copy link
Member

@minijackson minijackson commented May 11, 2024

Description of changes

This release fixes some security vulnerabilities (see GitHub changelog).

Tested using the NixOS test, and a bit inside a clean VM, everything seems to work fine.

They have removed the DLNA feature from the core jellyfin, in favor of a DLNA plugin. Not sure if we should consider this a breaking change.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

cc @nyanloutre @purcell @jojosch


Add a 👍 reaction to pull requests you find important.

Copy link
Member

@uncenter uncenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title should be jellyfin: 10.8.13 -> 10.9.0?

@minijackson minijackson changed the title Jellyfin 10.9.0 jellyfin/jellyfin-web: 10.8.13 -> 10.9.0 May 11, 2024
@minijackson
Copy link
Member Author

Ah yes, I forgot to change the PR title. Note that the contributing rules do not enforce any convention on the PR title (except backports), this convention is for commit messages.

@uncenter
Copy link
Member

Ah yes, I forgot to change the PR title. Note that the contributing rules do not enforce any convention on the PR title (except backports), this convention is for commit messages.

Fair enough, thanks for noting that. Does make it easier to search through and filter though :)

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on aarch64-darwin 1

2 packages failed to build:
  • jellyfin
  • jellyfin-web

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on x86_64-darwin 1

3 packages failed to build:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on x86_64-linux 1

3 packages built:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on aarch64-linux 1

3 packages built:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@minijackson
Copy link
Member Author

Thanks for the nixpkgs-reviews @GaetanLepage! Would you be willing to help on the Darwin side of things? I've looked at the ofborg logs, but I couldn't make any sense out of it, and I don't have access to any Darwin machines.

@GaetanLepage
Copy link
Contributor

GaetanLepage commented May 12, 2024

Here are the relevant logs for darwin:

npm ERR! code 1
npm ERR! path /private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --update-binary
npm ERR! make: Entering directory '/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/build'
npm ERR!   SOLINK_MODULE(target) Release/canvas-postbuild.node
npm ERR!   CXX(target) Release/obj.target/canvas/src/backend/Backend.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/backend/ImageBackend.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/backend/PdfBackend.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/backend/SvgBackend.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/bmp/BMPParser.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/Backends.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/Canvas.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/closure.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/color.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/Image.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/ImageData.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/init.o
npm ERR!   CXX(target) Release/obj.target/canvas/src/register_font.o
npm ERR! make: Leaving directory '/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/build'
npm ERR! Failed to execute '/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/bin/node /nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --update-binary --module=/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/build/Release --napi_version=9 -->
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10
npm ERR! node-pre-gyp info using node@20.12.2 | darwin | arm64
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install request to https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-darwin-unknown-arm64.tar.gz failed, reason: getaddrinfo ENOTFOUND github.com 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.11.2 and node@20.12.2 (node-v115 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error request to https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v115-darwin-unknown-arm64.tar.gz failed, reason: getaddrinfo ENOTFOUND github.com 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.12.2 | darwin | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.12.2 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.9 found at "/nix/store/mqdc5233rdz150n1crdyl2cirpa7b6qg-python3-3.11.9/bin/python3"
npm ERR! gyp WARN read config.gypi ENOENT: no such file or directory, open '/nix/store/9xxrz0qiz9fdgqzyss53bhdz9ibzxp72-nodejs-20.12.2-source/include/node/config.gypi'
npm ERR! gyp info spawn /nix/store/mqdc5233rdz150n1crdyl2cirpa7b6qg-python3-3.11.9/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/nix/store/9xxrz0qiz9fdgqzyss53bhdz9ibzxp72-nodejs-20.12.2-source/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/nix/store/9xxrz0qiz9fdgqzyss53bhdz9ibzxp72-nodejs-20.12.2-source',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/nix/store/9xxrz0qiz9fdgqzyss53bhdz9ibzxp72-nodejs-20.12.2-source/$(Configuration)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.12.2 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/backend/Backend.cc:1:
npm ERR! ../src/backend/Backend.h:60:14: warning: private field 'backend' is not used [-Wunused-private-field]
npm ERR!     Backend* backend;
npm ERR!              ^
npm ERR! 1 warning generated.
npm ERR! ../src/CanvasRenderingContext2d.cc:2500:11: warning: enumeration values 'TEXT_ALIGNMENT_START' and 'TEXT_ALIGNMENT_LEFT' not handled in switch [-Wswitch]
npm ERR!   switch (state->textAlignment) {
npm ERR!           ^~~~~~~~~~~~~~~~~~~~
npm ERR! 1 warning generated.
npm ERR! ../src/Image.cc:15:22: warning: unused variable 'canvas_max_side' [-Wunused-const-variable]
npm ERR! static constexpr int canvas_max_side = (1 << 15) - 1;
npm ERR!                      ^
npm ERR! 1 warning generated.
npm ERR! ../src/register_font.cc:9:10: fatal error: 'CoreText/CoreText.h' file not found
npm ERR! #include <CoreText/CoreText.h>
npm ERR!          ^~~~~~~~~~~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [canvas.target.mk:155: Release/obj.target/canvas/src/register_font.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Darwin 23.4.0
npm ERR! gyp ERR! command "/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/bin/node" "/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--update-binary" "--module=/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/build/Release" "--na>
npm ERR! gyp ERR! cwd /private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas
npm ERR! gyp ERR! node -v v20.12.2
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/bin/node /nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --update-binary --module=/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas/bu>
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! node-pre-gyp ERR! System Darwin 23.4.0
npm ERR! node-pre-gyp ERR! command "/nix/store/844n9zrm2sindml9hvla57shgwavwyjn-nodejs-20.12.2/bin/node" "/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm ERR! node-pre-gyp ERR! cwd /private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v20.12.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

npm ERR! Log files were not written due to an error writing to the directory: /nix/store/ybvvzd1bi4snnpsln9s2qxfjiwg7qav7-jellyfin-web-10.9.0-npm-deps/_logs
npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal

It looks like it is missing CoreText.h:

../src/register_font.cc:9:10: fatal error: 'CoreText/CoreText.h' file not found

@minijackson
Copy link
Member Author

Thanks! I've added the CoreText dependencies, and some others, inspired by the paperless-ngx package, which also depends on node-canvas. Note sure if every dependencies are needed, but I'll need a Darwin user to tell me that.

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on aarch64-darwin 1

2 packages built:
  • jellyfin
  • jellyfin-web

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on aarch64-linux 1

3 packages built:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on x86_64-darwin 1

3 packages failed to build:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on x86_64-linux 1

3 packages built:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@GaetanLepage
Copy link
Contributor

It now builds fine on aarch64-darwin but fails on x86_64-darwin:

npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.12.2 | darwin | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/backend/Backend.cc:1:
npm ERR! In file included from ../src/backend/Backend.h:6:
npm ERR! In file included from ../../nan/nan.h:60:
npm ERR! In file included from /nix/store/yi7j6spqqz6zigyfrqkd3kwmzx7n75qn-nodejs-20.12.2-source/src/node.h:73:
npm ERR! In file included from /nix/store/yi7j6spqqz6zigyfrqkd3kwmzx7n75qn-nodejs-20.12.2-source/deps/v8/include/v8.h:21:
npm ERR! In file included from /nix/store/8kv4c66q885l6bd3z72s55r2fm7bkzwa-libcxx-16.0.6-dev/include/c++/v1/memory:884:
npm ERR! In file included from /nix/store/8kv4c66q885l6bd3z72s55r2fm7bkzwa-libcxx-16.0.6-dev/include/c++/v1/__memory/allocate_at_least.h:13:
npm ERR! In file included from /nix/store/8kv4c66q885l6bd3z72s55r2fm7bkzwa-libcxx-16.0.6-dev/include/c++/v1/__memory/allocator_traits.h:14:
npm ERR! In file included from /nix/store/8kv4c66q885l6bd3z72s55r2fm7bkzwa-libcxx-16.0.6-dev/include/c++/v1/__memory/construct_at.h:23:
npm ERR! /nix/store/8kv4c66q885l6bd3z72s55r2fm7bkzwa-libcxx-16.0.6-dev/include/c++/v1/new:355:14: error: no member named 'aligned_alloc' in the global namespace
npm ERR!     return ::aligned_alloc(__alignment, __size > __rounded_size ? __size : __rounded_size);
npm ERR!            ~~^
npm ERR! In file included from ../src/backend/Backend.cc:1:
npm ERR! ../src/backend/Backend.h:60:14: warning: private field 'backend' is not used [-Wunused-private-field]
npm ERR!     Backend* backend;
npm ERR!              ^
npm ERR! 1 warning and 1 error generated.
npm ERR! make: *** [canvas.target.mk:155: Release/obj.target/canvas/src/backend/Backend.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/nix/store/wyxhqm3ayhsdfzg87rppmjiy3z7xjy6m-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Darwin 23.4.0
npm ERR! gyp ERR! command "/nix/store/wyxhqm3ayhsdfzg87rppmjiy3z7xjy6m-nodejs-20.12.2/bin/node" "/nix/store/wyxhqm3ayhsdfzg87rppmjiy3z7xjy6m-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--update>
npm ERR! gyp ERR! cwd /private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas
npm ERR! gyp ERR! node -v v20.12.2
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/nix/store/wyxhqm3ayhsdfzg87rppmjiy3z7xjy6m-nodejs-20.12.2/bin/node /nix/store/wyxhqm3ayhsdfzg87rppmjiy3z7xjy6m-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fa>
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! node-pre-gyp ERR! System Darwin 23.4.0
npm ERR! node-pre-gyp ERR! command "/nix/store/wyxhqm3ayhsdfzg87rppmjiy3z7xjy6m-nodejs-20.12.2/bin/node" "/private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm ERR! node-pre-gyp ERR! cwd /private/tmp/nix-build-jellyfin-web-10.9.0.drv-0/source/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v20.12.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

@minijackson
Copy link
Member Author

Welp, I'm definitely not familiar enough with the Darwin specifics to debug that…

@reckenrode
Copy link
Contributor

aligned_alloc requires at least the 10.15 SDK. Since that’s not (yet) available in nixpkgs, you need to use the 11.0 SDK. The following stdenv override for Darwin should let it build on x86_64-darwin.

overrideSDK stdenv {
  darwinMinVersion = "10.15";
  darwinSdkVersion = "11.0";
}

@minijackson
Copy link
Member Author

Thanks a lot @reckenrode! I've attempted to use your suggestion. Let's see if I understood it correctly, and if it works.

@Scrumplex
Copy link
Member

Result of nixpkgs-review pr 310932 run on x86_64-linux 1

3 packages built:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on x86_64-darwin 1

3 packages built:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@pyrox0
Copy link
Member

pyrox0 commented May 13, 2024

10.9.1 has already been released, could this PR be updated for that?

@minijackson
Copy link
Member Author

@pyrox0 done

@minijackson minijackson changed the title jellyfin/jellyfin-web: 10.8.13 -> 10.9.0 jellyfin/jellyfin-web: 10.8.13 -> 10.9.1 May 13, 2024
@GaetanLepage
Copy link
Contributor

Result of nixpkgs-review pr 310932 run on x86_64-linux 1

3 packages built:
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web

@K900 K900 merged commit 2b9358c into NixOS:master May 13, 2024
7 of 9 checks passed
Copy link
Contributor

Successfully created backport PR for release-23.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants