Skip to content

Commit 31b5cec

Browse files
maxrogerspublicarrayhgy59
committed
Update Sonarr to v3 (SynoCommunity#3803)
* Update Sonarr to v3-stable * Sonarr: remove busybox * Sonarr: fix file doesn't exists and file exists errors * Add https Co-authored-by: Sebastian Schmidt <[email protected]> * change to PKG_NAME Co-authored-by: hgy59 <[email protected]> * Sonarr: Smooth migration from nzbdrone Framework: add install_replace_packages, install_break_packages and checkport Note: In the future (DSM7) prereplace and postreplace scrips should be used instead * Revert "Sonarr: Smooth migration from nzbdrone" This reverts commit 4d88fa9. Co-authored-by: Sebastian Schmidt <[email protected]> Co-authored-by: hgy59 <[email protected]>
1 parent 4098fa6 commit 31b5cec

File tree

7 files changed

+37
-34
lines changed

7 files changed

+37
-34
lines changed

cross/sonarr/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
PKG_NAME = NzbDrone
2-
PKG_VERS = 2.0.0.5344
1+
PKG_NAME = Sonarr
2+
PKG_VERS = 3.0.5.1144
33
PKG_EXT = tar.gz
4-
PKG_DIST_NAME = $(PKG_NAME).master.$(PKG_VERS).mono.$(PKG_EXT)
5-
PKG_DIST_SITE = https://download.sonarr.tv/v2/master/mono
6-
PKG_DIR = NzbDrone
4+
PKG_DIST_NAME = $(PKG_NAME).main.$(PKG_VERS).linux.$(PKG_EXT)
5+
PKG_DIST_SITE = https://download.sonarr.tv/v3/main/$(PKG_VERS)
6+
PKG_DIR = $(PKG_NAME)
77

88
DEPENDS =
99

cross/sonarr/PLIST

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rsc:share/NzbDrone
1+
rsc:share/Sonarr

cross/sonarr/digests

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
NzbDrone.master.2.0.0.5344.mono.tar.gz SHA1 223ea825e9968a25d4b376fe529eba2258a5a326
2-
NzbDrone.master.2.0.0.5344.mono.tar.gz SHA256 2a15cb9dfa45eb34558fccdc9a1611028790b56a1b59c7407c27c726ea715d2f
3-
NzbDrone.master.2.0.0.5344.mono.tar.gz MD5 cad83d5f4885af1f62f802899903c6f8
1+
Sonarr.main.3.0.5.1144.linux.tar.gz SHA1 2335133139a46f1ce0d1b2cb1f566d30285d3d1e
2+
Sonarr.main.3.0.5.1144.linux.tar.gz SHA256 77aff6978d4dc80027979c815bd5a79579dd9bb50d39b1b2d14b3bb9e18058aa
3+
Sonarr.main.3.0.5.1144.linux.tar.gz MD5 675ce0ab2f1e643860ab1daab45b2842

spk/sonarr/Makefile

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
SPK_NAME = nzbdrone
22
SPK_VERS = $(shell date +%Y%m%d)
3-
SPK_REV = 18
3+
SPK_REV = 19
44
SPK_ICON = src/sonarr.png
55

66
# Mono not supported on ppc platforms. C.f. cross/mono/Makefile and references therein for details.
77
UNSUPPORTED_ARCHS = $(PPC_ARCHS)
88

9-
DEPENDS = cross/busybox cross/curl cross/mediainfo cross/sqlite cross/sonarr
9+
DEPENDS = cross/curl cross/mediainfo cross/sqlite cross/sonarr
1010

1111
SPK_DEPENDS = "mono>3.6"
1212

@@ -17,7 +17,7 @@ DESCRIPTION_SPN = Sonarr es un PVR para los usuarios de grupos de noticias y tor
1717
RELOAD_UI = yes
1818
DISPLAY_NAME = Sonarr
1919
STARTABLE = yes
20-
CHANGELOG = "Update openssl to 1.1."
20+
CHANGELOG = "Update Sonarr to v3.0.5.1144"
2121

2222
HOMEPAGE = https://sonarr.tv
2323
LICENSE = GPLv3
@@ -34,9 +34,6 @@ WIZARDS_DIR = src/wizard/
3434

3535
POST_STRIP_TARGET = sonarr_extra_install
3636

37-
BUSYBOX_CONFIG = usrmng
38-
ENV += BUSYBOX_CONFIG="$(BUSYBOX_CONFIG)"
39-
4037
include ../../mk/spksrc.spk.mk
4138

4239
.PHONY: sonarr_extra_install

spk/sonarr/src/service-setup.sh

+13-17
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,8 @@ SVC_BACKGROUND=y
4242

4343
service_postinst ()
4444
{
45+
mkdir -p ${CONFIG_DIR}
4546
set_unix_permissions "${CONFIG_DIR}"
46-
47-
# If necessary, add user also to the old group before removing it
48-
syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "${LEGACY_GROUP}"
49-
syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "users"
50-
51-
# Discard legacy obsolete busybox user account
52-
BIN=${SYNOPKG_PKGDEST}/bin
53-
$BIN/busybox --install $BIN >> ${INST_LOG}
54-
$BIN/delgroup "${USER}" "users" >> ${INST_LOG}
55-
$BIN/deluser "${USER}" >> ${INST_LOG}
5647
}
5748

5849
service_preupgrade ()
@@ -62,10 +53,11 @@ service_preupgrade ()
6253
# The /var/ folder gets automatically copied by service-installer after this
6354
if [ -d "${LEGACY_CONFIG_DIR}" ]; then
6455
echo "Moving ${LEGACY_CONFIG_DIR} to ${INST_VAR}" >> ${INST_LOG}
65-
mv ${LEGACY_CONFIG_DIR} ${CONFIG_DIR} >> ${LOG_FILE} 2>&1
66-
else
56+
mv ${LEGACY_CONFIG_DIR} ${CONFIG_DIR} >> ${INST_LOG} 2>&1
57+
fi
58+
if [ ! -d ${CONFIG_DIR} ]; then
6759
# Create, in case it's missing for some reason
68-
mkdir ${CONFIG_DIR} >> ${LOG_FILE} 2>&1
60+
mkdir -p ${CONFIG_DIR} >> ${INST_LOG} 2>&1
6961
fi
7062

7163
# Is Installed Sonarr Binary Ver. >= SPK Sonarr Binary Ver.?
@@ -90,17 +82,21 @@ service_postupgrade ()
9082
. ${CONFIG_DIR}/KEEP_VAR
9183
if [ "$KEEP_CUR" == "yes" ]; then
9284
echo "Restoring Sonarr version from before upgrade" >> ${INST_LOG}
93-
rm -fr ${SYNOPKG_PKGDEST}/share >> $INST_LOG 2>&1
94-
mv ${INST_VAR}/share ${SYNOPKG_PKGDEST}/ >> $INST_LOG 2>&1
85+
rm -fr ${SYNOPKG_PKGDEST}/share >> ${INST_LOG} 2>&1
86+
mv ${INST_VAR}/share ${SYNOPKG_PKGDEST}/ >> ${INST_LOG} 2>&1
9587
set_unix_permissions "${SYNOPKG_PKGDEST}/share"
9688
fi
9789

9890
set_unix_permissions "${CONFIG_DIR}"
9991

10092
# If backup was created before new-style packages
10193
# new updates/backups will fail due to permissions (see #3185)
102-
set_unix_permissions "/tmp/nzbdrone_backup"
103-
set_unix_permissions "/tmp/nzbdrone_update"
94+
if [ -d "/tmp/nzbdrone_backup" ] || [ -d "/tmp/nzbdrone_update" ] || [ -d "/tmp/sonarr_backup" ] || [ -d "/tmp/sonarr_update" ]; then
95+
set_unix_permissions "/tmp/nzbdrone_backup"
96+
set_unix_permissions "/tmp/nzbdrone_update"
97+
set_unix_permissions "/tmp/sonarr_backup"
98+
set_unix_permissions "/tmp/sonarr_update"
99+
fi
104100

105101
# Remove upgrade Flag
106102
rm ${CONFIG_DIR}/KEEP_VAR

spk/sonarr/src/wizard/upgrade_uifile

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[{
2+
"step_title": "RECOMMENDATION: Download A Backup Before Upgrading",
3+
"items": [{
4+
"desc": "<strong style='color:red'>IMPORTANT:</strong> This update is an upgrade to Sonarr v3. We suggest that you download a manual backup as a precautionary measure before installing this update.<br><br>You can download a backup via Sonarr's built-in web-interface.<br>To do this, navigate to <b>System>Backup</b> in the Sonarr UI.<br><br>Create a backup and then download a copy of that backup before installing this upgrade."
5+
}]
6+
},{
27
"step_title": "Updating Sonarr",
38
"items": [{
4-
"desc": "Keep Sonarr up-to-date by using Sonarr's built-in updater.<br>Navigate to System>Updates in the Sonarr UI."
9+
"desc": "Keep Sonarr up-to-date by using Sonarr's built-in updater.<br>Navigate to <b>System>Updates</b> in the Sonarr UI."
510
}]
611
},{
712
"step_title": "Attention! DSM Permissions",

spk/sonarr/src/wizard/upgrade_uifile_fre

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[{
2+
"step_title": "RECOMMENDATION: Télécharger une sauvegarde avant la mise à niveau",
3+
"items": [{
4+
"desc": "<strong style='color:red'>IMPORTANT:</strong> Cette mise à jour est une mise à niveau vers Sonarr v3. Nous vous suggérons de télécharger une sauvegarde manuelle par mesure de précaution avant d'installer cette mise à jour.<br><br>Vous pouvez télécharger une sauvegarde via l'interface Web intégrée de Sonarr.<br>Pour ce faire, accédez à <b>System>Backup</b> dans l'interface utilisateur Sonarr.<br><br>Créez une sauvegarde, puis téléchargez une copie de cette sauvegarde avant d'installer cette mise à niveau."
5+
}]
6+
},{
27
"step_title": "Mettre à jour Sonarr",
38
"items": [{
4-
"desc": "Garder Sonarr à jour en utilisant System>Updates dans l'interface Sonarr."
9+
"desc": "Garder Sonarr à jour en utilisant <b>System>Updates</b> dans l'interface Sonarr."
510
}]
611
},{
712
"step_title": "Attention! Permissions DSM",

0 commit comments

Comments
 (0)