Various fixes

pull/2789/head
Taloth Saldono 6 years ago
parent 241c26e099
commit fb6e4c0130

@ -1,15 +1,19 @@
fromdos ./debian/* fromdos ./debian/*
echo Version: "$dependent_build_number" Branch: "$dependent_build_branch"
BuildVersion=${dependent_build_number:-3.10.0.999}
BuildBranch=${dependent_build_branch:-master}
echo Version: "$BuildVersion" Branch: "$BuildBranch"
rm -r ./sonarr_bin/Sonarr.Update rm -r ./sonarr_bin/Sonarr.Update
rm ./sonarr_bin/System.Runtime.InteropServices.RuntimeInformation.dll rm ./sonarr_bin/System.Runtime.InteropServices.RuntimeInformation.dll
rm ./sonarr_bin/UI/*.map ./sonarr_bin/UI/Content/*.map
chmod -R ugo-x,ugo+rwX,go-w ./sonarr_bin/* chmod -R ugo-x,ugo+rwX,go-w ./sonarr_bin/*
echo Updating changelog echo Updating changelog for $BuildVersion
sed -i "s/{version}/$dependent_build_number/g" debian/changelog sed -i "s:{version}:$BuildVersion:g; s:{branch}:$BuildBranch:g;" debian/changelog
sed -i "s/{branch}/$dependent_build_branch/g" debian/changelog
echo Running debuild echo Running debuild for $BuildVersion
debuild -b debuild -b
echo Moving stuff around echo Moving stuff around
@ -18,7 +22,7 @@ mv ../sonarr_*.changes ./
rm ../sonarr_*.build rm ../sonarr_*.build
echo Signing Package echo Signing Package
dpkg-sig -k 884589CE --sign builder "sonarr_${dependent_build_number}_all.deb" dpkg-sig -k 884589CE --sign builder "sonarr_${BuildVersion}_all.deb"
echo running alien echo running alien
alien -r -v ./*.deb alien -r -v ./*.deb

@ -0,0 +1,7 @@
[*]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2

@ -16,7 +16,6 @@ Architecture: all
Provides: nzbdrone Provides: nzbdrone
Conflicts: nzbdrone Conflicts: nzbdrone
Replaces: nzbdrone Replaces: nzbdrone
Depends: adduser, libsqlite3-0 (>= 3.7), libmediainfo0v5 (>= 0.7.52), mono-runtime (>= 5.4), ${shlibs:Depends}, ${cli:Depends}, ${misc:Depends} Depends: adduser, libsqlite3-0 (>= 3.7), libmediainfo0v5 (>= 0.7.52), mono-runtime (>= 5.4), ${cli:Depends}, ${misc:Depends}
Recommends: sqlite3 (>= 3.7), mediainfo (>= 0.7.52), ${shlibs:Recommends}, ${cli:Recommends}, ${misc:Recommends} Recommends: sqlite3 (>= 3.7), mediainfo (>= 0.7.52), ${cli:Recommends}
Suggests: ${shlibs:Suggests}, ${cli:Suggests}, ${misc:Suggests}
Description: Internet PVR Description: Internet PVR

@ -1,10 +1,8 @@
#!/bin/sh #!/bin/sh
set -e set -e
# Source debconf library.
. /usr/share/debconf/confmodule
SYSTEMD_UNIT=/lib/systemd/system/sonarr.service . /usr/share/debconf/confmodule
db_get sonarr/owning_user db_get sonarr/owning_user
USER="$RET" USER="$RET"
db_get sonarr/owning_group db_get sonarr/owning_group
@ -20,15 +18,18 @@ if ! getent passwd "$USER" >/dev/null; then
adduser --system --no-create-home --ingroup "$GROUP" "$USER" adduser --system --no-create-home --ingroup "$GROUP" "$USER"
fi fi
# Migrate old data dir (Sonarr v3 alpha) if [ $1 = "configure" ]; then
if [ -d "/var/opt/sonarr" ] && [ "$CONFDIR" != "/var/opt/sonarr" ]; then # Migrate old Sonarr v3 alpha data dir
if [ ! -f "/var/opt/sonarr/sonarr.db" ] && [ -f "/var/opt/sonarr/.config/Sonarr/sonarr.db" ]; then if [ -d "/var/opt/sonarr" ] && [ "$CONFDIR" != "/var/opt/sonarr" ] && [ ! -d "$CONFDIR" ]; then
mv "/var/opt/sonarr/.config/Sonarr" "$CONFDIR" if [ ! -f "/var/opt/sonarr/sonarr.db" ] && [ -f "/var/opt/sonarr/.config/Sonarr/sonarr.db" ]; then
rm -rf "/var/opt/sonarr" mv "/var/opt/sonarr/.config/Sonarr" "$CONFDIR"
else rm -rf "/var/opt/sonarr"
mv "/var/opt/sonarr" "$CONFDIR" else
mv "/var/opt/sonarr" "$CONFDIR"
fi
chown -R $USER:$GROUP "$CONFDIR"
chmod -R 775 "$CONFDIR"
fi fi
chown -R $USER:$GROUP "$CONFDIR"
fi fi
# Create data directory # Create data directory
@ -41,7 +42,7 @@ fi
chown -R $USER:$GROUP /usr/lib/sonarr chown -R $USER:$GROUP /usr/lib/sonarr
# Update sonarr.service file # Update sonarr.service file
sed -i "s:User=sonarr:User=$USER:g; s:Group=sonarr:Group=$GROUP:g; s:-data=/var/lib/sonarr:-data=$CONFDIR:g" $SYSTEMD_UNIT sed -i "s:User=sonarr:User=$USER:g; s:Group=sonarr:Group=$GROUP:g; s:-data=/var/lib/sonarr:-data=$CONFDIR:g" /lib/systemd/system/sonarr.service
#DEBHELPER# #DEBHELPER#

@ -1,21 +1,26 @@
#!/bin/sh #!/bin/sh
set -e set -e
if [ "$1" = "abort-install" ]; then if [ $1 = "abort-install" ]; then
# preinst was aborted, possibly due to NzbDrone still running. # preinst was aborted, possibly due to NzbDrone still running.
# Nothing to do here # Nothing to do here
: :
fi
# The bin directory is expected to be empty, unless the BuiltIn updater added files.
if [ $1 = "remove" ] && [ -d /usr/lib/sonarr/bin ]; then
rm -rf /usr/lib/sonarr/bin
fi fi
# Purge the entire sonarr configuration directory. # Purge the entire sonarr configuration directory.
# TODO: Maybe move a minimal backup to tmp? # TODO: Maybe move a minimal backup to tmp?
if [ "$1" = "purge" ] && [ -e /usr/share/debconf/confmodule ]; then if [ $1 = "purge" ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
db_get sonarr/config_directory db_get sonarr/config_directory
CONFDIR="$RET" CONFDIR="$RET"
if [ -d "$CONFDIR" ]; then if [ -d "$CONFDIR" ]; then
rm -rf "$CONFDIR" rm -rf "$CONFDIR"
fi fi
fi fi
#DEBHELPER# #DEBHELPER#

@ -9,8 +9,7 @@
# Uncomment this to turn on verbose mode. # Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1 #export DH_VERBOSE=1
EXCLUDE_MODULEREFS = crypt32 httpapi ntdll api-ms-win-core-sysinfo-l1-1-0 api-ms-win-core-sysinfo-l1-2-0 \ EXCLUDE_MODULEREFS = crypt32 httpapi
libcurl3 msbuild
%: %:
dh $@ --with=systemd --with=cli dh $@ --with=systemd --with=cli

@ -2,18 +2,19 @@ Template: sonarr/owning_user
Type: string Type: string
Default: sonarr Default: sonarr
Description: Sonarr user: Description: Sonarr user:
Specify the user that Sonarr must run as. The user will be created if it does not already exist. Specify the user that Sonarr must run as. The user will be created if it does not already exist.
Template: sonarr/owning_group Template: sonarr/owning_group
Type: string Type: string
Default: sonarr Default: sonarr
Description: Sonarr group: Description: Sonarr group:
Specify the group that Sonarr must run as. The group will be created if it does not already exist. Specify the group that Sonarr must run as. The group will be created if it does not already exist.
If the user doesn't already exist then this group will be specified as the user's primary group. If the user doesn't already exist then this group will be specified as the user's primary group.
Any media files created by Sonarr will be writeable by this group. Any media files created by Sonarr will be writeable by this group.
It's advisable to keep the group the same between download client, Sonarr and media centers.
Template: sonarr/config_directory Template: sonarr/config_directory
Type: string Type: string
Default: /var/lib/sonarr Default: /var/lib/sonarr
Description: Config directory: Description: Config directory:
Specify the directory where Sonarr stores the internal database and metadata. Media content will be stored elsewhere. Specify the directory where Sonarr stores the internal database and metadata. Media content will be stored elsewhere.

Loading…
Cancel
Save