diff --git a/www-apps/jellyfin-bin/Manifest b/www-apps/jellyfin-bin/Manifest new file mode 100644 index 0000000..d722e36 --- /dev/null +++ b/www-apps/jellyfin-bin/Manifest @@ -0,0 +1,9 @@ +AUX jellyfin.confd 620 BLAKE2B 6e34eee798741ca3057f1f2163a4281f96cf1c0063ccfddb72d34a1d8f079e6b4a8c20e26d9c281a885a0810cddfef276c60382f3a2095aa27c469a7da321023 SHA512 ac70b53422fda386a3b6a871055b38b98c2c0b17dfd15973d9e0f8822cb3bd843cbc52dc3407c76231f8b58846b0a7618c8ecb427b2dc6dc49264ea99471784d +AUX jellyfin.init-r1 864 BLAKE2B 6e63339c0018b2db6a9661836c1665ff932738ee3509a0b3f39ebd1f344d3c9c69d3a824832fc21dc7c825c7fd3efc462b6270be27300b843d533dfe6785d982 SHA512 f221aa9806c37d8f3214c7305bc4589487f462c07058a71fbf0129a1e6ea0544956c752108cfc34d8e89494e91e1313fc5a96c75f194575284f65591fe324d00 +AUX jellyfin.service 859 BLAKE2B 2eba62033723ca123b3078d4b760d8e8f5bb1cb3316c3cbec541b8b74279115969bff1dea7f40bc32973c2d6bad1e8b40c40caa96fc5154005becd5221a6a7a8 SHA512 4c63747afc63796d58d2e2679f3316a2fcd464240c8897aafc708815c866f067fa075350270151ce76f3166f2c61f3da43e7106d1d91a518fe43d45b163ada65 +DIST jellyfin_10.11.0-amd64-musl.tar.xz 85862604 BLAKE2B 176301918816ca9b05e4fb758b00d6ca0ce193f95f6ca772118c75c64a8105c026d6514c6f4a8fa68f0a51a646c3162780aef5dffc399c49c1807d18e1876b09 SHA512 927677ddb7b8bdb9684fc52853615b52d423a878175c6958d8be288c2c1bf022ba6db8898cb16a5a246f5a8304d6b268194a841288766392af63403cdd6e740a +DIST jellyfin_10.11.0-amd64.tar.xz 85772524 BLAKE2B 467ff024f636a232a3ba0a67bb4994025964dd0c8a654078b818eb239b4818b42dbfe28ff67aede0e7b1687a8fbd798da3d740ae69015c17c151a4baf91af71a SHA512 a979fa1a51b367cf667c1531a0af5da11e448466ab3d82a8b0b6a0488c496dd79f8001701f3809742a24a98bc011d41c7e27865813f9d1db23d1b1331efd956e +DIST jellyfin_10.11.0-arm64-musl.tar.xz 81416376 BLAKE2B 77ec9c6cf4d9b64f78bb6383c6e0bbdaaf2da576d1f61b309991370bd2f6ff78be864adbfa9e51081b92667ab13b0187bb442f31db651d0636f9992c24c54da9 SHA512 391126529848066e3fbd6b7c29bd0dd07b772b1b7d6e1ecd885d7eb26e14b10953f8c23b67e28c343750668df60cdb354b598a15dc2dab1f7390881e7cc330be +DIST jellyfin_10.11.0-arm64.tar.xz 81374520 BLAKE2B 51e05339198d5a7695c8bcea4b62a55f1402d9abd20f19c6c64ec511f2cdd52d8ee0ee0eaa41bbe0a805f5b1e6d5288b557a7e498b65c6604ea1af766244fb2e SHA512 5853b81df338a943863fc43e200fe7cae2bfe96dc23fb635b0a1de4fe543f8b8e79cd425ed82bd6d37900c5b07ef5b4382aaec1e6067af1d61152d54c2dc4596 +EBUILD jellyfin-bin-10.11.0.ebuild 3178 BLAKE2B f3777493c75a755139a29b16701fa5fc3efa14b0cddeabf7919781384f0299be0d41753ee8ee2acf509dd3769e1f4baf27e000256b9027e04b01fc791d532929 SHA512 730b694df6c5c58b2dedfbfa59b039bfea0f85116b06cf8be36c5ca7734987314ca943538b6eaeb7f936c8af879e436ab9d1879985bb2486bbb6c50a2a068524 +MISC metadata.xml 649 BLAKE2B 29ce34c89c1300d32c3ff30990ec92e49cfab21d74340d1cd6893650ffda87920348ac5feda5ee68feff3e8adbd8cd6e58548d73879025a206dc82756a99c383 SHA512 d8a36b27ee99f29cf9dfea5cc4a9735732bb11cc5931adb4bfe1d1942378d2477f63417b6a2a694e9691c217d20c5ce84bc8d46af5155c46b99b850c0f561315 diff --git a/www-apps/jellyfin-bin/files/jellyfin.confd b/www-apps/jellyfin-bin/files/jellyfin.confd new file mode 100644 index 0000000..310bef3 --- /dev/null +++ b/www-apps/jellyfin-bin/files/jellyfin.confd @@ -0,0 +1,15 @@ +# This is the directory that will hold all Jellyfin data, and is also used as a default base directory for some other paths below. +#JELLYFIN_DATA_DIR=/var/lib/jellyfin + +# This is the directory where the Jellyfin logs will be stored. +#JELLYFIN_LOG_DIR=/var/log/jellyfin + +# This is the directory containing the server cache. +#JELLYFIN_CACHE_DIR=/var/cache/jellyfin + +# This is the directory containing the server configuration files. +#JELLYFIN_CONFIG_DIR=/etc/jellyfin + +# To configure Jellyfin to use a proxy, set http_proxy and/or https_proxy +# export http_proxy=192.168.33.10:3128 +# export https_proxy=192.168.33.10:3129 diff --git a/www-apps/jellyfin-bin/files/jellyfin.init-r1 b/www-apps/jellyfin-bin/files/jellyfin.init-r1 new file mode 100644 index 0000000..c45a532 --- /dev/null +++ b/www-apps/jellyfin-bin/files/jellyfin.init-r1 @@ -0,0 +1,24 @@ +#!/sbin/openrc-run + +: ${JELLYFIN_CACHE_DIR:=/var/cache/jellyfin} +: ${JELLYFIN_LOG_DIR:=/var/log/jellyfin} +: ${JELLYFIN_DATA_DIR:=/var/lib/jellyfin} +: ${JELLYFIN_CONFIG_DIR:=/etc/jellyfin} + +pidfile="/run/${RC_SVCNAME}.pid" +command="/opt/jellyfin/jellyfin" +command_args="--logdir ${JELLYFIN_LOG_DIR} --cachedir ${JELLYFIN_CACHE_DIR} --configdir ${JELLYFIN_CONFIG_DIR} --datadir ${JELLYFIN_DATA_DIR}" +command_user="${RC_SVCNAME}:${RC_SVCNAME}" +command_background=true + +start_pre() { + # Ensure that our dirs are correct + checkpath --directory --owner jellyfin:jellyfin --mode 0775 \ + ${JELLYFIN_LOG_DIR} + checkpath --directory --owner jellyfin:jellyfin --mode 0775 \ + ${JELLYFIN_CACHE_DIR} + checkpath --directory --owner jellyfin:jellyfin --mode 0775 \ + ${JELLYFIN_CONFIG_DIR} + checkpath --directory --owner jellyfin:jellyfin --mode 0775 \ + ${JELLYFIN_DATA_DIR} +} diff --git a/www-apps/jellyfin-bin/files/jellyfin.service b/www-apps/jellyfin-bin/files/jellyfin.service new file mode 100644 index 0000000..6698745 --- /dev/null +++ b/www-apps/jellyfin-bin/files/jellyfin.service @@ -0,0 +1,39 @@ +[Unit] +Description = Jellyfin Media Server +After=syslog.target network.target + +[Service] +User=jellyfin +Group=jellyfin + +Type=simple +StateDirectory=jellyfin +CacheDirectory=jellyfin +LogsDirectory=jellyfin +ConfigurationDirectory=jellyfin +ExecStart=/opt/jellyfin/jellyfin --logdir "$LOGS_DIRECTORY" --cachedir "$CACHE_DIRECTORY" --configdir "$CONFIGURATION_DIRECTORY" --datadir "$STATE_DIRECTORY" +TimeoutStopSec=20 +KillMode=process +Restart=always + +PrivateTmp=yes +PrivateMounts=yes +ProtectHome=yes +ProtectSystem=full +NoNewPrivileges=yes +ProtectHostname=yes +ProtectClock=yes +ProtectKernelTunables=yes +ProtectKernelModules=yes +ProtectKernelLogs=yes +ProtectControlGroups=yes +RemoveIPC=true +RestrictRealtime=yes +DeviceAllow=char-drm rw +DeviceAllow=char-nvidia-frontend rw +DeviceAllow=char-nvidia-uvm rw +DeviceAllow=char-nvidia rw + +[Install] +WantedBy=multi-user.target + diff --git a/www-apps/jellyfin-bin/jellyfin-bin-10.11.0.ebuild b/www-apps/jellyfin-bin/jellyfin-bin-10.11.0.ebuild new file mode 100644 index 0000000..7b88357 --- /dev/null +++ b/www-apps/jellyfin-bin/jellyfin-bin-10.11.0.ebuild @@ -0,0 +1,104 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit pax-utils systemd tmpfiles eapi9-ver + +DESCRIPTION="Jellyfin puts you in control of managing and streaming your media" +HOMEPAGE="https://jellyfin.org/ + https://github.com/jellyfin/jellyfin/" +MY_PV="${PV//_rc/-rc}" +MINOR_VER=$(ver_cut 1-2) +if [[ ${PV} == *rc* ]]; then + MY_TYPE="preview" +else + MY_TYPE="stable" + KEYWORDS="-* ~amd64 ~arm64" +fi +SRC_URI=" + arm64? ( + elibc_glibc? ( + https://repo.jellyfin.org/files/server/linux/${MY_TYPE}/v${MY_PV}/arm64/jellyfin_${MY_PV}-arm64.tar.xz + ) + elibc_musl? ( + https://repo.jellyfin.org/files/server/linux/${MY_TYPE}/v${MY_PV}/arm64-musl/jellyfin_${MY_PV}-arm64-musl.tar.xz + ) + ) + amd64? ( + elibc_glibc? ( + https://repo.jellyfin.org/files/server/linux/${MY_TYPE}/v${MY_PV}/amd64/jellyfin_${MY_PV}-amd64.tar.xz + ) + elibc_musl? ( + https://repo.jellyfin.org/files/server/linux/${MY_TYPE}/v${MY_PV}/amd64-musl/jellyfin_${MY_PV}-amd64-musl.tar.xz + ) + )" + +LICENSE="GPL-2" +SLOT="0" +RESTRICT="mirror test" + +DEPEND="acct-user/jellyfin + media-libs/fontconfig + sys-libs/zlib" +RDEPEND="${DEPEND} + dev-libs/icu + media-video/ffmpeg[vpx,x264]" +BDEPEND="acct-user/jellyfin" + +INST_DIR="/opt/jellyfin" +QA_PREBUILT="${INST_DIR#/}/*.so ${INST_DIR#/}/*.so.* ${INST_DIR#/}/jellyfin ${INST_DIR#/}/createdump" + +src_unpack() { + unpack ${A} + mv jellyfin ${P} || die +} + +src_prepare() { + default + + # https://github.com/jellyfin/jellyfin/issues/7471 + # https://github.com/dotnet/runtime/issues/57784 + rm libcoreclrtraceptprovider.so || die +} + +src_install() { + keepdir /var/log/jellyfin + fowners jellyfin:jellyfin /var/log/jellyfin + keepdir /etc/jellyfin + fowners jellyfin:jellyfin /etc/jellyfin + insinto ${INST_DIR} + dodir ${INST_DIR} + doins -r "${S}"/* + newtmpfiles - jellyfin.conf <<<"d /var/cache/jellyfin 0775 jellyfin jellyfin -" + chmod 755 "${D}${INST_DIR}/jellyfin" + newinitd "${FILESDIR}/jellyfin.init-r1" "jellyfin" + newconfd "${FILESDIR}"/jellyfin.confd "jellyfin" + systemd_dounit "${FILESDIR}/jellyfin.service" + pax-mark -m "${ED}${INST_DIR}/jellyfin" +} + +pkg_preinst() { + if ver_replacing -gt $MINOR_VER.99; then + eerror "Downgrading jellyfin from one minor version to a previous one is not supported." + eerror "If you wish to downgrade you must uninstall jellyfin-bin, restore the database" + eerror "from a backup and then reinstall jellyfin-bin." + die "Downgrade path not supported" + fi +} + +pkg_postinst() { + tmpfiles_process jellyfin.conf + + if ver_replacing -lt $MINOR_VER; then + ewarn "Jellyfin usually makes backward incompatible database changes in new minor" + ewarn "releases. At first startup after an upgrade jellyfin will start a database" + ewarn "migration. This may take a long time but must not be aborted or the database" + ewarn "could be left in an inconsistant state and must be recreated or restored from" + ewarn "backup. Once the migration has started it is no longer possible to downgrade" + ewarn "jellyfin without restoring the database from a backup." + ewarn "" + ewarn "The migration progress can be followed in the startup UI in the web browser" + ewarn "or in the jellyfin logs." + fi +} diff --git a/www-apps/jellyfin-bin/metadata.xml b/www-apps/jellyfin-bin/metadata.xml new file mode 100644 index 0000000..8500bdb --- /dev/null +++ b/www-apps/jellyfin-bin/metadata.xml @@ -0,0 +1,20 @@ + + + + + gentoo@wb9.se + Fredrik Eriksson + + + proxy-maint@gentoo.org + Proxy Maintainers + + + candrews@gentoo.org + Craig Andrews + + + jellyfin/jellyfin + https://github.com/jellyfin/jellyfin/issues + +