Merge pull request #440 from joshuaboniface/debian-packaging

Debian packaging for 10.0.0
pull/1154/head
Joshua M. Boniface 6 years ago committed by GitHub
commit 1273da5af9

2
.gitignore vendored

@ -247,6 +247,8 @@ MediaBrowser.WebDashboard/dashboard-ui/.idea/
#########################
debian/.debhelper/
debian/*.debhelper
debian/debhelper-build-stamp
debian/files
debian/jellyfin.substvars
debian/jellyfin/

23
debian/changelog vendored

@ -1,3 +1,13 @@
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
@ -34,16 +44,3 @@ 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
emby-server (3.5.2-unlocked) unstable; urgency=medium
* Taking changes from upstream 3.5.2, beautifying some JS files
-- Vasily <just.one.man@yandex.ru> Mon, 22 Oct 2018 03:45:13 +0400
emby-server (3.4.1.18-unlocked) unstable; urgency=medium
* Hard fork of Emby 3.4.1.18 including premium unlock
-- Joshua Boniface <joshua@boniface.me> Thu, 9 Aug 2018 00:33:19 -0400

@ -15,8 +15,10 @@
# General options
#
# Data directory
JELLYFIN_DATA="/var/lib/jellyfin"
# 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
@ -29,4 +31,4 @@ JELLYFIN_ADD_OPTS=""
# Application username
JELLYFIN_USER="jellyfin"
# Full application command
JELLYFIN_ARGS="-programdata $JELLYFIN_DATA -restartpath $JELLYFIN_RESTART_SCRIPT $JELLYFIN_ADD_OPTS"
JELLYFIN_ARGS="-programdata $JELLYFIN_DATA_DIRECTORY -configdir $JELLYFIN_CONFIG_DIRECTORY -logdir $JELLYFIN_LOG_DIRECTORY -restartpath $JELLYFIN_RESTART_SCRIPT $JELLYFIN_ADD_OPTS"

@ -0,0 +1,29 @@
{
"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}"
}
}
]
}
}
]
}
}

3
debian/control vendored

@ -9,6 +9,9 @@ Build-Depends: debhelper (>= 9),
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

1
debian/install vendored

@ -1,5 +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/

@ -6,7 +6,7 @@ After = network.target
Type = simple
EnvironmentFile = /etc/default/jellyfin
User = jellyfin
ExecStart = /usr/bin/jellyfin -programdata ${JELLYFIN_DATA} -restartpath ${JELLYFIN_RESTART_SCRIPT} ${JELLYFIN_ADD_OPTS}
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

24
debian/postinst vendored

@ -2,7 +2,6 @@
set -e
NAME=jellyfin
CONF_FILE=/etc/${NAME}.conf
DEFAULT_FILE=/etc/default/${NAME}
# Source Jellyfin default configuration
@ -10,13 +9,10 @@ if [[ -f $DEFAULT_FILE ]]; then
. $DEFAULT_FILE
fi
# Source Jellyfin user configuration overrides
if [[ -f $CONF_FILE ]]; then
. $CONF_FILE
fi
# Data directory where Jellyfin database, cache and logs are stored
PROGRAMDATA=${JELLYFIN_DATA-/var/lib/$NAME}
# 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)
@ -34,8 +30,18 @@ case "$1" in
mkdir $PROGRAMDATA
chown -R jellyfin:jellyfin $PROGRAMDATA
fi
# ensure $JELLYFIN_CONFIG_DIRECTORY has appropriate permissions
if [[ -n $JELLYFIN_CONFIG_DIRECTORY && ! -d $JELLYFIN_CONFIG_DIRECTORY ]]; then
mkdir $JELLYFIN_CONFIG_DIRECTORY
chown -R jellyfin:jellyfin $JELLYFIN_CONFIG_DIRECTORY
fi
# ensure $JELLYFIN_LOG_DIRECTORY has appropriate permissions
if [[ -n $JELLYFIN_LOG_DIRECTORY && ! -d $JELLYFIN_LOG_DIRECTORY ]]; then
mkdir $JELLYFIN_LOG_DIRECTORY
chown -R jellyfin:jellyfin $JELLYFIN_LOG_DIRECTORY
fi
chmod +x ${JELLYFIN_DIR}/restart.sh > /dev/null 2>&1 || true
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

29
debian/postrm vendored

@ -2,7 +2,6 @@
set -e
NAME=jellyfin
CONF_FILE=/etc/${NAME}.conf
DEFAULT_FILE=/etc/default/${NAME}
# Source Jellyfin default configuration
@ -10,13 +9,10 @@ if [[ -f $DEFAULT_FILE ]]; then
. $DEFAULT_FILE
fi
# Source Jellyfin user configuration overrides
if [[ -f $CONF_FILE ]]; then
. $CONF_FILE
fi
# Data directory where Jellyfin database, cache and logs are stored
PROGRAMDATA=${JELLYFIN_DATA-/var/lib/$NAME}
# 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.
@ -37,14 +33,29 @@ case "$1" in
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
[[ -d /var/lib/jellyfin ]] && rm -rf /var/lib/jellyfin
# 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

20
debian/preinst vendored

@ -2,7 +2,6 @@
set -e
NAME=jellyfin
CONF_FILE=/etc/${NAME}.conf
DEFAULT_FILE=/etc/default/${NAME}
# Source Jellyfin default configuration
@ -10,13 +9,10 @@ if [[ -f $DEFAULT_FILE ]]; then
. $DEFAULT_FILE
fi
# Source Jellyfin user configuration overrides
if [[ -f $CONF_FILE ]]; then
. $CONF_FILE
fi
# Data directory where Jellyfin database, cache and logs are stored
PROGRAMDATA=${JELLYFIN_DATA-/var/lib/$NAME}
# 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.
@ -57,6 +53,14 @@ case "$1" in
# 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)
;;

12
debian/prerm vendored

@ -2,7 +2,6 @@
set -e
NAME=jellyfin
CONF_FILE=/etc/${NAME}.conf
DEFAULT_FILE=/etc/default/${NAME}
# Source Jellyfin default configuration
@ -10,13 +9,10 @@ if [[ -f $DEFAULT_FILE ]]; then
. $DEFAULT_FILE
fi
# Source Jellyfin user configuration overrides
if [[ -f $CONF_FILE ]]; then
. $CONF_FILE
fi
# Data directory where Jellyfin database, cache and logs are stored
PROGRAMDATA=${JELLYFIN_DATA-/var/lib/$NAME}
# 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)

Loading…
Cancel
Save