diff options
| author | LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> | 2019-01-23 00:31:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-23 00:31:35 -0800 |
| commit | 404bd04cbc17dc8c8bf4a5c9aa3ca9c5cd85aa68 (patch) | |
| tree | 3d267c6ceef9439a034c113095e10e4d619e7c70 /deployment/debian-package-x64/pkg-src | |
| parent | 8ff89fdc0c30f595a171ffc550f907ef22b6212a (diff) | |
| parent | e05e002b8bb4d13eb2b80b56a0aad8903ddb701e (diff) | |
Merge pull request #8 from jellyfin/master
rebase to latest master
Diffstat (limited to 'deployment/debian-package-x64/pkg-src')
24 files changed, 818 insertions, 0 deletions
diff --git a/deployment/debian-package-x64/pkg-src/bin/jellyfin-sudoers b/deployment/debian-package-x64/pkg-src/bin/jellyfin-sudoers new file mode 100644 index 000000000..4eb91366b --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/bin/jellyfin-sudoers @@ -0,0 +1,37 @@ +#Allow jellyfin group to start, stop and restart itself +Cmnd_Alias RESTARTSERVER_SYSV = /sbin/service jellyfin restart, /usr/sbin/service jellyfin restart +Cmnd_Alias STARTSERVER_SYSV = /sbin/service jellyfin start, /usr/sbin/service jellyfin start +Cmnd_Alias STOPSERVER_SYSV = /sbin/service jellyfin stop, /usr/sbin/service jellyfin stop +Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemctl restart jellyfin, /bin/systemctl restart jellyfin +Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemctl start jellyfin, /bin/systemctl start jellyfin +Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemctl stop jellyfin, /bin/systemctl stop jellyfin +Cmnd_Alias RESTARTSERVER_INITD = /etc/init.d/jellyfin restart +Cmnd_Alias STARTSERVER_INITD = /etc/init.d/jellyfin start +Cmnd_Alias STOPSERVER_INITD = /etc/init.d/jellyfin stop + + +%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSV +%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSV +%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSV +%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD +%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD +%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD +%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_INITD +%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_INITD +%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_INITD + +Defaults!RESTARTSERVER_SYSV !requiretty +Defaults!STARTSERVER_SYSV !requiretty +Defaults!STOPSERVER_SYSV !requiretty +Defaults!RESTARTSERVER_SYSTEMD !requiretty +Defaults!STARTSERVER_SYSTEMD !requiretty +Defaults!STOPSERVER_SYSTEMD !requiretty +Defaults!RESTARTSERVER_INITD !requiretty +Defaults!STARTSERVER_INITD !requiretty +Defaults!STOPSERVER_INITD !requiretty + +#Allow the server to mount iso images +%jellyfin ALL=(ALL) NOPASSWD: /bin/mount +%jellyfin ALL=(ALL) NOPASSWD: /bin/umount + +Defaults:%jellyfin !requiretty diff --git a/deployment/debian-package-x64/pkg-src/bin/restart.sh b/deployment/debian-package-x64/pkg-src/bin/restart.sh new file mode 100644 index 000000000..a6f4632ba --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/bin/restart.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +NAME=jellyfin + +restart_cmds=("s6-svc -t /var/run/s6/services/${NAME}" \ + "systemctl restart ${NAME}" \ + "service ${NAME} restart" \ + "/etc/init.d/${NAME} restart") + +for restart_cmd in "${restart_cmds[@]}"; do + cmd=$(echo "$restart_cmd" | awk '{print $1}') + cmd_loc=$(command -v ${cmd}) + if [[ -n "$cmd_loc" ]]; then + restart_cmd=$(echo "$restart_cmd" | sed -e "s%${cmd}%${cmd_loc}%") + echo "sleep 2; sudo $restart_cmd > /dev/null 2>&1" | at now > /dev/null 2>&1 + exit 0 + fi +done diff --git a/deployment/debian-package-x64/pkg-src/changelog b/deployment/debian-package-x64/pkg-src/changelog new file mode 100644 index 000000000..7f3f12b00 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/changelog @@ -0,0 +1,152 @@ +jellyfin (10.1.0-1) unstable; urgency=medium + + * jellyfin: + * PR335 Build scripts and build system consolidation. + * PR424 add jellyfin-web as submodule + * PR455 Cleanup some small things + * PR458 Clean up several minor issues and add TODOs + * PR506 Removing tabs and trailing whitespace + * PR508 Update internal versioning and user agents. + * PR516 Remove useless properties from IEnvironmentInfo + * PR520 Fix potential bug where aspect ratio would be incorrectly calculated + * PR534 Add linux-arm and linux-arm64 native NuGet dependency. + * PR540 Update Emby API keys to our own + * PR541 Change ItemId to Guid in ProviderManager + * PR556 Fix "Password Reset by PIN" page + * PR562 Fix error with uppercase photo extension and fix typo in a log line + * PR563 Update dev from master + * PR566 Avoid printing stacktrace when bind to port 1900 fails + * PR567 Shutdown gracefully when recieving a termination signal + * PR571 Add more NuGet metadata properties + * PR575 Reformat all C# server code to conform with code standards + * PR576 Add code analysers for debug builds + * PR580 Fix Docker build + * PR582 Replace custom image parser with Skia + * PR587 Add nuget info to Emby.Naming + * PR589 Ensure config and log folders exist + * PR596 Fix indentation for xml files + * PR598 Remove MediaBrowser.Text for license violations and hackiness + * PR606 Slim down docker image + * PR613 Update MediaEncoding + * PR616 Add Swagger documentation + * PR619 Really slim down Docker container + * PR621 Minor improvements to library scan code + * PR622 Add unified build script and bump_version script + * PR623 Replaced injections of ILogger with ILoggerFactory + * PR625 Update taglib-sharp + * PR626 Fix extra type name in parameter, add out keyword + * PR627 Use string for ApplicationVersion + * PR628 Update Product Name (User-Agent) + * PR629 Fix subtitle converter misinterpreting 0 valued endTimeTicks + * PR631 Cleanup ImageProcessor and SkiaEncoder + * PR634 Replace our TVDB key with @drakus72's which is V1 + * PR636 Allow subtitle extraction and conversion in direct streaming + * PR637 Remove unused font + * PR638 Removed XmlTv testfiles and nuget install + * PR646: Fix infinite loop bug on subtitle.m3u8 request + * PR655: Support trying local branches in submodule + * PR661: Fix NullRef from progress report + * PR666: Add cross-platform build for arm64 + * jellyfin-web: + * PR1: Change webcomponents to non-minified version + * PR4: Fix user profile regression + * PR6: Make icon into proper ico and large PNG + * PR7: Fix firefox failing to set password for users with no password set + * PR8: Remove premiere stuff and fix crashes caused by earlier removals + * PR12: Fix return from PIN reset to index.html + * PR13: Send android clients to select server before login + * PR14: Reimplement page to add server + * PR16: Fix spinning circle at the end of config wizard + * PR17: Fix directorybrower not resetting scroll + * PR19: Set union merge for CONTRIBUTORS.md + * PR20: Show album thumbnail and artist image in page itemdetail + * PR26: Make the card titles clickable + * PR27: Stop pagination and adding a library from being able to trigger multiple times + * PR28: Add transparent nav bar to BlueRadiance theme CSS + * PR29: Clean up imageuploader + * PR30: Remove iap and simplify registrationservices + * PR36: Open videos in fullscreen on android devices + * PR37: Remove broken features from web interface + * PR38: Fix inconsistent UI coloring around settings drawer + * PR39: Remove back button from dashboard and metadata manager + * PR42: Fix Home backdrop not loading + * PR43: Filter videos by audio stream language + * PR44: Remove filter from library collection type options + * PR45: Fix data-backbutton logic + * PR46: Minor changes to navbar elements + * PR48: Remove Sync code + * PR52: Fix progress color + * PR53: Fix user tabs color + * PR54: Add back button to server dashboard + + -- Jellyfin Packaging Team <packaging@jellyfin.org> Sun, 20 Jan 2019 23:19:46 -0500 + +jellyfin (10.0.2-1) unstable; urgency=medium + + * Hotfix release + * jellyfin/jellyfin-web#23: Update Chromecast app ID [via direct commit] + * #540: Update Emby API keys to our own + * #541: Change ItemId to Guid in ProviderManager + * #566: Avoid printing stacktrace when bind to port 1900 fails + + -- Joshua Boniface <joshua@boniface.me> Sat, 19 Jan 2019 01:19:59 -0500 + +jellyfin (10.0.1-1) unstable; urgency=medium + + * Hotfix release, corrects several small bugs from 10.0.0 + * #512: Fix CONTRIBUTORS.md formatting + * #501: Fix regression in integer divisions in latest movies category + * #498: Change contributing link in settings to readthedocs.io + * #493: Remove unused values.txt resource + * #491: Fix userprofile.js crash + * #519: Fix the DecodeJfif function to get proper image sizes + * #486: Add NuGet package info to plugin projects + + -- Joshua Boniface <joshua@boniface.me> Tue, 08 Jan 2019 20:06:01 -0500 + +jellyfin (10.0.0-1) unstable; urgency=medium + + * The first Jellyfin release under our new versioning scheme + * Numerous bugfixes and code readability improvements + * Updated logging configuration, including flag for it and configdir + * Updated theming including logo + * Dozens of other improvements as documented in GitHub pull request #419 + + -- Joshua Boniface <joshua@boniface.me> Sat, 05 Jan 2019 15:39:25 -0500 + +jellyfin (3.5.2-5) unstable; urgency=medium + + * Fully GPL'd release - remove tainted code from MediaBrowser.Common + * Several code cleanups and tweaks + + -- Joshua Boniface <joshua@boniface.me> Fri, 28 Dec 2018 10:26:30 -0500 + +jellyfin (3.5.2-4) unstable; urgency=medium + + * Correct manifest.json bug and vdpau + + -- Joshua Boniface <joshua@boniface.me> Thu, 20 Dec 2018 18:31:43 -0500 + +jellyfin (3.5.2-3) unstable; urgency=medium + + * Correct several bugs in 3.5.2-2 packaging + + -- Joshua Boniface <joshua@boniface.me> Sat, 15 Dec 2018 18:17:32 -0500 + +jellyfin (3.5.2-2) unstable; urgency=medium + + * Major code updates related to rebranding and cleanup + + -- Joshua Boniface <joshua@boniface.me> Fri, 14 Dec 2018 00:07:46 -0500 + +jellyfin (3.5.2-1) unstable; urgency=medium + + * Add ffmpeg dependency and cleanup work + + -- Joshua Boniface <joshua@boniface.me> Tue, 11 Dec 2018 20:55:32 -0500 + +jellyfin (3.5.2) unstable; urgency=medium + + * Rename from emby-server on version 3.5.2 + + -- Joshua Boniface <joshua@boniface.me> Sun, 9 Dec 2018 15:20:58 -0400 diff --git a/deployment/debian-package-x64/pkg-src/compat b/deployment/debian-package-x64/pkg-src/compat new file mode 100644 index 000000000..45a4fb75d --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/compat @@ -0,0 +1 @@ +8 diff --git a/deployment/debian-package-x64/pkg-src/conf/jellyfin b/deployment/debian-package-x64/pkg-src/conf/jellyfin new file mode 100644 index 000000000..861865aae --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/conf/jellyfin @@ -0,0 +1,34 @@ +# Jellyfin default configuration options + +# Use this file to override the default configurations; add additional +# options with JELLYFIN_ADD_OPTS. + +# Under systemd, use +# /etc/systemd/system/jellyfin.service.d/jellyfin.service.conf +# to override the user or this config file's location. + +# +# This is a POSIX shell fragment +# + +# +# General options +# + +# Program directories +JELLYFIN_DATA_DIRECTORY="/var/lib/jellyfin" +JELLYFIN_CONFIG_DIRECTORY="/etc/jellyfin" +JELLYFIN_LOG_DIRECTORY="/var/log/jellyfin" +# Restart script for in-app server control +JELLYFIN_RESTART_SCRIPT="/usr/lib/jellyfin/restart.sh" +# Additional options for the binary +JELLYFIN_ADD_OPTS="" + +# +# SysV init/Upstart options +# + +# Application username +JELLYFIN_USER="jellyfin" +# Full application command +JELLYFIN_ARGS="-programdata $JELLYFIN_DATA_DIRECTORY -configdir $JELLYFIN_CONFIG_DIRECTORY -logdir $JELLYFIN_LOG_DIRECTORY -restartpath $JELLYFIN_RESTART_SCRIPT $JELLYFIN_ADD_OPTS" diff --git a/deployment/debian-package-x64/pkg-src/conf/jellyfin.service.conf b/deployment/debian-package-x64/pkg-src/conf/jellyfin.service.conf new file mode 100644 index 000000000..1b69dd74e --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/conf/jellyfin.service.conf @@ -0,0 +1,7 @@ +# Jellyfin systemd configuration options + +# Use this file to override the user or environment file location. + +[Service] +#User = jellyfin +#EnvironmentFile = /etc/default/jellyfin diff --git a/deployment/debian-package-x64/pkg-src/conf/logging.json b/deployment/debian-package-x64/pkg-src/conf/logging.json new file mode 100644 index 000000000..f32b2089e --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/conf/logging.json @@ -0,0 +1,30 @@ +{ + "Serilog": { + "MinimumLevel": "Information", + "WriteTo": [ + { + "Name": "Console", + "Args": { + "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u3}] {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "File", + "Args": { + "path": "%JELLYFIN_LOG_DIR%//jellyfin.log", + "fileSizeLimitBytes": 10485700, + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 10, + "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] {Message}{NewLine}{Exception}" + } + } + ] + } + } + ] + } +} diff --git a/deployment/debian-package-x64/pkg-src/control b/deployment/debian-package-x64/pkg-src/control new file mode 100644 index 000000000..74bebeaf1 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/control @@ -0,0 +1,23 @@ +Source: jellyfin +Section: misc +Priority: optional +Maintainer: Jellyfin Team <team@jellyfin.org> +Build-Depends: debhelper (>= 9), + dotnet-sdk-2.2, + libc6-dev, + libcurl4-openssl-dev, + libfontconfig1-dev, + libfreetype6-dev +Standards-Version: 3.9.4 +Homepage: https://jellyfin.media/ +Vcs-Git: https://github.org/jellyfin/jellyfin.git +Vcs-Browser: https://github.org/jellyfin/jellyfin + +Package: jellyfin +Replaces: mediabrowser, emby, emby-server-beta, jellyfin-dev, emby-server +Breaks: mediabrowser, emby, emby-server-beta, jellyfin-dev, emby-server +Conflicts: mediabrowser, emby, emby-server-beta, jellyfin-dev, emby-server +Architecture: any +Depends: at, libsqlite3-0, ffmpeg, libfontconfig1, libfreetype6, libssl1.0.0 | libssl1.0.2 +Description: Jellyfin is a home media server. + It is built on top of other popular open source technologies such as Service Stack, jQuery, jQuery mobile, and Mono. It features a REST-based api with built-in documentation to facilitate client development. We also have client libraries for our api to enable rapid development. diff --git a/deployment/debian-package-x64/pkg-src/copyright b/deployment/debian-package-x64/pkg-src/copyright new file mode 100644 index 000000000..0d7a2a600 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/copyright @@ -0,0 +1,29 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: jellyfin +Source: https://github.com/jellyfin/jellyfin + +Files: * +Copyright: 2018 Jellyfin Team +License: GPL-2.0+ + +Files: debian/* +Copyright: 2018 Joshua Boniface <joshua@boniface.me> +Copyright: 2014 Carlos Hernandez <carlos@techbyte.ca> +License: GPL-2.0+ + +License: GPL-2.0+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/> + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/deployment/debian-package-x64/pkg-src/gbp.conf b/deployment/debian-package-x64/pkg-src/gbp.conf new file mode 100644 index 000000000..60b3d2872 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/gbp.conf @@ -0,0 +1,6 @@ +[DEFAULT] +pristine-tar = False +cleaner = fakeroot debian/rules clean + +[import-orig] +filter = [ ".git*", ".hg*", ".vs*", ".vscode*" ] diff --git a/deployment/debian-package-x64/pkg-src/install b/deployment/debian-package-x64/pkg-src/install new file mode 100644 index 000000000..adaff7b26 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/install @@ -0,0 +1,6 @@ +usr/lib/jellyfin usr/lib/ +debian/conf/jellyfin etc/default/ +debian/conf/logging.json etc/jellyfin/ +debian/conf/jellyfin.service.conf etc/systemd/system/jellyfin.service.d/ +debian/bin/jellyfin-sudoers etc/sudoers.d/ +debian/bin/restart.sh usr/lib/jellyfin/ diff --git a/deployment/debian-package-x64/pkg-src/jellyfin.init b/deployment/debian-package-x64/pkg-src/jellyfin.init new file mode 100644 index 000000000..d103fb0f1 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/jellyfin.init @@ -0,0 +1,49 @@ +### BEGIN INIT INFO +# Provides: Jellyfin Media Server +# Required-Start: $local_fs $network +# Required-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Jellyfin Media Server +# Description: Runs Jellyfin Server +### END INIT INFO + +# Carry out specific functions when asked to by the system + +pidfile="/var/run/jellyfin.pid" +pid=`cat $pidfile` + +case "$1" in + start) + if [ "$pid" == "" ]; then + echo "Starting Jellyfin..." + . /etc/default/jellyfin + nohup su -u $JELLYFIN_USER -c /usr/bin/jellyfin $JELLYFIN_ARGS + echo ?? > $pidfile + else + echo "Jellyfin already running" + fi + ;; + stop) + if [ "$pid" != "" ]; then + echo "Stopping Jellyfin..." + kill $pid + sleep 2 + rm -f $pidfile + else + echo "Jellyfin not running" + fi + ;; + status) + if [ "$pid" != "" ]; then + echo "Jellyfin running as $pid" + ps -f $pid + else + echo "Jellyfin is not running" + fi + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac diff --git a/deployment/debian-package-x64/pkg-src/jellyfin.service b/deployment/debian-package-x64/pkg-src/jellyfin.service new file mode 100644 index 000000000..c17422029 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/jellyfin.service @@ -0,0 +1,14 @@ +[Unit] +Description = Jellyfin Media Server +After = network.target + +[Service] +Type = simple +EnvironmentFile = /etc/default/jellyfin +User = jellyfin +ExecStart = /usr/bin/jellyfin -programdata ${JELLYFIN_DATA_DIRECTORY} -configdir ${JELLYFIN_CONFIG_DIRECTORY} -logdir ${JELLYFIN_LOG_DIRECTORY} -restartpath ${JELLYFIN_RESTART_SCRIPT} ${JELLYFIN_ADD_OPTS} +Restart = on-failure +TimeoutSec = 15 + +[Install] +WantedBy = multi-user.target diff --git a/deployment/debian-package-x64/pkg-src/jellyfin.upstart b/deployment/debian-package-x64/pkg-src/jellyfin.upstart new file mode 100644 index 000000000..ef5bc9bca --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/jellyfin.upstart @@ -0,0 +1,20 @@ +description "jellyfin daemon" + +start on (local-filesystems and net-device-up IFACE!=lo) +stop on runlevel [!2345] + +console log +respawn +respawn limit 10 5 + +kill timeout 20 + +script + set -x + echo "Starting $UPSTART_JOB" + + # Log file + logger -t "$0" "DEBUG: `set`" + . /etc/default/jellyfin + exec su -u $JELLYFIN_USER -c /usr/bin/jellyfin $JELLYFIN_ARGS +end script diff --git a/deployment/debian-package-x64/pkg-src/po/POTFILES.in b/deployment/debian-package-x64/pkg-src/po/POTFILES.in new file mode 100644 index 000000000..cef83a340 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/deployment/debian-package-x64/pkg-src/po/templates.pot b/deployment/debian-package-x64/pkg-src/po/templates.pot new file mode 100644 index 000000000..2cdcae417 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/po/templates.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: jellyfin-server\n" +"Report-Msgid-Bugs-To: jellyfin-server@packages.debian.org\n" +"POT-Creation-Date: 2015-06-12 20:51-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../templates:1001 +msgid "Jellyfin permission info:" +msgstr "" + +#. Type: note +#. Description +#: ../templates:1001 +msgid "" +"Jellyfin by default runs under a user named \"jellyfin\". Please ensure that the " +"user jellyfin has read and write access to any folders you wish to add to your " +"library. Otherwise please run jellyfin under a different user." +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Username to run Jellyfin as:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The user that jellyfin will run as." +msgstr "" + +#. Type: note +#. Description +#: ../templates:3001 +msgid "Jellyfin still running" +msgstr "" + +#. Type: note +#. Description +#: ../templates:3001 +msgid "Jellyfin is currently running. Please close it and try again." +msgstr "" diff --git a/deployment/debian-package-x64/pkg-src/postinst b/deployment/debian-package-x64/pkg-src/postinst new file mode 100644 index 000000000..3690d20ba --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/postinst @@ -0,0 +1,87 @@ +#!/bin/bash +set -e + +NAME=jellyfin +DEFAULT_FILE=/etc/default/${NAME} + +# Source Jellyfin default configuration +if [[ -f $DEFAULT_FILE ]]; then + . $DEFAULT_FILE +fi + +# Data directories for program data (cache, db), configs, and logs +PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME} +CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME} +LOGDATA=${JELLYFIN_LOG_DIRECTORY-/var/log/$NAME} + +case "$1" in + configure) + # create jellyfin group if it does not exist + if [[ -z "$(getent group jellyfin)" ]]; then + addgroup --quiet --system jellyfin > /dev/null 2>&1 + fi + # create jellyfin user if it does not exist + if [[ -z "$(getent passwd jellyfin)" ]]; then + adduser --system --ingroup jellyfin --shell /bin/false jellyfin --no-create-home --home ${PROGRAMDATA} \ + --gecos "Jellyfin default user" > /dev/null 2>&1 + fi + # ensure $PROGRAMDATA exists + if [[ ! -d $PROGRAMDATA ]]; then + mkdir $PROGRAMDATA + fi + # ensure $CONFIGDATA exists + if [[ ! -d $CONFIGDATA ]]; then + mkdir $CONFIGDATA + fi + # ensure $LOGDATA exists + if [[ ! -d $LOGDATA ]]; then + mkdir $LOGDATA + fi + # Ensure permissions are correct on all config directories + chown -R jellyfin:jellyfin $PROGRAMDATA + chown -R jellyfin:jellyfin $CONFIGDATA + chown -R jellyfin:jellyfin $LOGDATA + + chmod +x /usr/lib/jellyfin/restart.sh > /dev/null 2>&1 || true + + # Install jellyfin symlink into /usr/bin + ln -sf /usr/lib/jellyfin/bin/jellyfin /usr/bin/jellyfin + + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER + +if [[ -x "/usr/bin/deb-systemd-helper" ]]; then + # Manual init script handling + deb-systemd-helper unmask jellyfin.service >/dev/null || true + # was-enabled defaults to true, so new installations run enable. + if deb-systemd-helper --quiet was-enabled jellyfin.service; then + # Enables the unit on first installation, creates new + # symlinks on upgrades if the unit file has changed. + deb-systemd-helper enable jellyfin.service >/dev/null || true + else + # Update the statefile to add new symlinks (if any), which need to be + # cleaned up on purge. Also remove old symlinks. + deb-systemd-helper update-state jellyfin.service >/dev/null || true + fi +fi + +# End automatically added section +# Automatically added by dh_installinit +if [[ "$1" == "configure" ]] || [[ "$1" == "abort-upgrade" ]]; then + if [[ -d "/run/systemd/systemd" ]]; then + systemctl --system daemon-reload >/dev/null || true + deb-systemd-invoke start jellyfin >/dev/null || true + elif [[ -x "/etc/init.d/jellyfin" ]] || [[ -e "/etc/init/jellyfin.conf" ]]; then + update-rc.d jellyfin defaults >/dev/null + invoke-rc.d jellyfin start || exit $? + fi +fi +exit 0 diff --git a/deployment/debian-package-x64/pkg-src/postrm b/deployment/debian-package-x64/pkg-src/postrm new file mode 100644 index 000000000..690f5d587 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/postrm @@ -0,0 +1,75 @@ +#!/bin/bash +set -e + +NAME=jellyfin +DEFAULT_FILE=/etc/default/${NAME} + +# Source Jellyfin default configuration +if [[ -f $DEFAULT_FILE ]]; then + . $DEFAULT_FILE +fi + +# Data directories for program data (cache, db), configs, and logs +PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME} +CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME} +LOGDATA=${JELLYFIN_DATA_DIRECTORY-/var/log/$NAME} + +# In case this system is running systemd, we make systemd reload the unit files +# to pick up changes. +if [[ -d /run/systemd/system ]] ; then + systemctl --system daemon-reload >/dev/null || true +fi + +case "$1" in + purge) + echo PURGE | debconf-communicate $NAME > /dev/null 2>&1 || true + + if [[ -x "/etc/init.d/jellyfin" ]] || [[ -e "/etc/init/jellyfin.connf" ]]; then + update-rc.d jellyfin remove >/dev/null 2>&1 || true + fi + + if [[ -x "/usr/bin/deb-systemd-helper" ]]; then + deb-systemd-helper purge jellyfin.service >/dev/null + deb-systemd-helper unmask jellyfin.service >/dev/null + fi + + # Remove user and group + userdel jellyfin > /dev/null 2>&1 || true + delgroup --quiet jellyfin > /dev/null 2>&1 || true + # Remove config dir + if [[ -d $CONFIGDATA ]]; then + rm -rf $CONFIGDATA + fi + # Remove log dir + if [[ -d $LOGDATA ]]; then + rm -rf $LOGDATA + fi + # Remove program data dir + if [[ -d $PROGRAMDATA ]]; then + rm -rf $PROGRAMDATA + fi + # Remove binary symlink + [[ -f /usr/bin/jellyfin ]] && rm /usr/bin/jellyfin + # Remove sudoers config + [[ -f /etc/sudoers.d/jellyfin-sudoers ]] && rm /etc/sudoers.d/jellyfin-sudoers + # Remove anything at the default locations; catches situations where the user moved the defaults + [[ -e /etc/jellyfin ]] && rm -rf /etc/jellyfin + [[ -e /var/log/jellyfin ]] && rm -rf /var/log/jellyfin + [[ -e /var/lib/jellyfin ]] && rm -rf /var/lib/jellyfin + ;; + remove) + if [[ -x "/usr/bin/deb-systemd-helper" ]]; then + deb-systemd-helper mask jellyfin.service >/dev/null + fi + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/deployment/debian-package-x64/pkg-src/preinst b/deployment/debian-package-x64/pkg-src/preinst new file mode 100644 index 000000000..0063e0e63 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/preinst @@ -0,0 +1,74 @@ +#!/bin/bash +set -e + +NAME=jellyfin +DEFAULT_FILE=/etc/default/${NAME} + +# Source Jellyfin default configuration +if [[ -f $DEFAULT_FILE ]]; then + . $DEFAULT_FILE +fi + +# Data directories for program data (cache, db), configs, and logs +PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME} +CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME} +LOGDATA=${JELLYFIN_DATA_DIRECTORY-/var/log/$NAME} + +# In case this system is running systemd, we make systemd reload the unit files +# to pick up changes. +if [[ -d /run/systemd/system ]] ; then + systemctl --system daemon-reload >/dev/null || true +fi + +case "$1" in + install|upgrade) + # try graceful termination; + if [[ -d /run/systemd/system ]]; then + deb-systemd-invoke stop ${NAME}.service > /dev/null 2>&1 || true + elif [ -x "/etc/init.d/${NAME}" ] || [ -e "/etc/init/${NAME}.conf" ]; then + invoke-rc.d ${NAME} stop > /dev/null 2>&1 || true + fi + # try and figure out if jellyfin is running + PIDFILE=$(find /var/run/ -maxdepth 1 -mindepth 1 -name "jellyfin*.pid" -print -quit) + [[ -n "$PIDFILE" ]] && [[ -s "$PIDFILE" ]] && JELLYFIN_PID=$(cat ${PIDFILE}) + # if its running, let's stop it + if [[ -n "$JELLYFIN_PID" ]]; then + echo "Stopping Jellyfin!" + # if jellyfin is still running, kill it + if [[ -n "$(ps -p $JELLYFIN_PID -o pid=)" ]]; then + CPIDS=$(pgrep -P $JELLYFIN_PID) + sleep 2 && kill -KILL $CPIDS + kill -TERM $CPIDS > /dev/null 2>&1 + fi + sleep 1 + # if it's still running, show error + if [[ -n "$(ps -p $JELLYFIN_PID -o pid=)" ]]; then + echo "Could not successfully stop JellyfinServer, please do so before uninstalling." + exit 1 + else + [[ -f $PIDFILE ]] && rm $PIDFILE + fi + fi + + # Clean up old Emby cruft that can break the user's system + [[ -f /etc/sudoers.d/emby ]] && rm -f /etc/sudoers.d/emby + + # If we have existing config or log dirs in /var/lib/jellyfin, move them into the right place + if [[ -d $PROGRAMDATA/config ]]; then + mv $PROGRAMDATA/config $CONFIGDATA + fi + if [[ -d $PROGRAMDATA/logs ]]; then + mv $PROGRAMDATA/logs $LOGDATA + fi + + ;; + abort-upgrade) + ;; + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac +#DEBHELPER# + +exit 0 diff --git a/deployment/debian-package-x64/pkg-src/prerm b/deployment/debian-package-x64/pkg-src/prerm new file mode 100644 index 000000000..4770c03c4 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/prerm @@ -0,0 +1,60 @@ +#!/bin/bash +set -e + +NAME=jellyfin +DEFAULT_FILE=/etc/default/${NAME} + +# Source Jellyfin default configuration +if [[ -f $DEFAULT_FILE ]]; then + . $DEFAULT_FILE +fi + +# Data directories for program data (cache, db), configs, and logs +PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME} +CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME} +LOGDATA=${JELLYFIN_DATA_DIRECTORY-/var/log/$NAME} + +case "$1" in + remove|upgrade|deconfigure) + echo "Stopping Jellyfin!" + # try graceful termination; + if [[ -d /run/systemd/system ]]; then + deb-systemd-invoke stop ${NAME}.service > /dev/null 2>&1 || true + elif [ -x "/etc/init.d/${NAME}" ] || [ -e "/etc/init/${NAME}.conf" ]; then + invoke-rc.d ${NAME} stop > /dev/null 2>&1 || true + fi + # Ensure that it is shutdown + PIDFILE=$(find /var/run/ -maxdepth 1 -mindepth 1 -name "jellyfin*.pid" -print -quit) + [[ -n "$PIDFILE" ]] && [[ -s "$PIDFILE" ]] && JELLYFIN_PID=$(cat ${PIDFILE}) + # if its running, let's stop it + if [[ -n "$JELLYFIN_PID" ]]; then + # if jellyfin is still running, kill it + if [[ -n "$(ps -p $JELLYFIN_PID -o pid=)" ]]; then + CPIDS=$(pgrep -P $JELLYFIN_PID) + sleep 2 && kill -KILL $CPIDS + kill -TERM $CPIDS > /dev/null 2>&1 + fi + sleep 1 + # if it's still running, show error + if [[ -n "$(ps -p $JELLYFIN_PID -o pid=)" ]]; then + echo "Could not successfully stop Jellyfin, please do so before uninstalling." + exit 1 + else + [[ -f $PIDFILE ]] && rm $PIDFILE + fi + fi + if [[ -f /usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe.so ]]; then + rm /usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe.so + fi + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/deployment/debian-package-x64/pkg-src/rules b/deployment/debian-package-x64/pkg-src/rules new file mode 100644 index 000000000..ce98cb8f8 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/rules @@ -0,0 +1,23 @@ +#! /usr/bin/make -f +CONFIG := Release +TERM := xterm +SHELL := /bin/bash +DOTNETRUNTIME := debian-x64 +export DH_VERBOSE=1 +export DOTNET_CLI_TELEMETRY_OPTOUT=1 + +%: + dh $@ + +# disable "make check" +override_dh_auto_test: + +# disable stripping debugging symbols +override_dh_clistrip: + +override_dh_auto_build: + dotnet publish --configuration $(CONFIG) --output='$(CURDIR)/usr/lib/jellyfin/bin' --self-contained --runtime $(DOTNETRUNTIME) Jellyfin.Server + +override_dh_auto_clean: + dotnet clean -maxcpucount:1 --configuration $(CONFIG) Jellyfin.Server || true + rm -rf '$(CURDIR)/usr' diff --git a/deployment/debian-package-x64/pkg-src/source.lintian-overrides b/deployment/debian-package-x64/pkg-src/source.lintian-overrides new file mode 100644 index 000000000..aeb332f13 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/source.lintian-overrides @@ -0,0 +1,3 @@ +# This is an override for the following lintian errors: +jellyfin source: license-problem-md5sum-non-free-file Emby.Drawing/ImageMagick/fonts/webdings.ttf* +jellyfin source: source-is-missing diff --git a/deployment/debian-package-x64/pkg-src/source/format b/deployment/debian-package-x64/pkg-src/source/format new file mode 100644 index 000000000..d3827e75a --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/source/format @@ -0,0 +1 @@ +1.0 diff --git a/deployment/debian-package-x64/pkg-src/source/options b/deployment/debian-package-x64/pkg-src/source/options new file mode 100644 index 000000000..17b5373d5 --- /dev/null +++ b/deployment/debian-package-x64/pkg-src/source/options @@ -0,0 +1,11 @@ +tar-ignore='.git*' +tar-ignore='**/.git' +tar-ignore='**/.hg' +tar-ignore='**/.vs' +tar-ignore='**/.vscode' +tar-ignore='deployment' +tar-ignore='**/bin' +tar-ignore='**/obj' +tar-ignore='**/.nuget' +tar-ignore='*.deb' +tar-ignore='ThirdParty' |
