From 517dbaaecbb7498a8f553001a49a8fabc69d3461 Mon Sep 17 00:00:00 2001
From: mreid-tt <943378+mreid-tt@users.noreply.github.com>
Date: Tue, 20 Dec 2022 09:54:42 -0400
Subject: [PATCH] Radarr: fix package update and version bump
Merge #5559 and exclusions for ARMv7 archs
Remove cross/libmediainfo dependency
---
cross/radarr/Makefile | 18 ++++++++++++++----
cross/radarr/digests | 21 ++++++++++++---------
spk/radarr/Makefile | 24 +++++++++++++++---------
spk/radarr/src/config.xml | 5 ++---
spk/radarr/src/service-setup.sh | 30 +++++++++++++++---------------
5 files changed, 58 insertions(+), 40 deletions(-)
diff --git a/cross/radarr/Makefile b/cross/radarr/Makefile
index 74062093df57..8578eed6ebdf 100644
--- a/cross/radarr/Makefile
+++ b/cross/radarr/Makefile
@@ -1,5 +1,5 @@
PKG_NAME = Radarr
-PKG_VERS = 3.2.2.5080
+PKG_VERS = 4.3.2.6857
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME).master.$(PKG_VERS).linux-core-$(PKG_DIST_ARCH).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/Radarr/Radarr/releases/download/v$(PKG_VERS)
@@ -7,7 +7,14 @@ PKG_DIR = Radarr
DEPENDS =
-UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS)
+UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS)
+# custom exclusions for dotNET 6 on ARMv7 archs
+include ../../mk/spksrc.common.mk
+ifeq ($(call version_lt, ${TCVERSION}, 7.0),1)
+UNSUPPORTED_ARCHS += $(ARMv7_ARCHS)
+else
+UNSUPPORTED_ARCHS += armada370
+endif
HOMEPAGE = https://radarr.video/
COMMENT = Radarr is a movie collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new movies and will interface with clients and indexers to grab, sort, and rename them. It can also be configured to automatically upgrade the quality of existing files in the library when a better quality format becomes available.
@@ -16,11 +23,14 @@ LICENSE = GPLv3
INSTALL_TARGET = radarr_install
# use digests with multiple files
-PKG_DIST_ARCH_LIST = x64 arm arm64
+PKG_DIST_ARCH_LIST = x86 x64 arm arm64
include ../../mk/spksrc.archs.mk
+ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH))
+PKG_DIST_ARCH = x86
+else ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
PKG_DIST_ARCH = x64
-ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
+else ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
PKG_DIST_ARCH = arm
else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
PKG_DIST_ARCH = arm64
diff --git a/cross/radarr/digests b/cross/radarr/digests
index 96a491c1cbfc..f3dab20f2e57 100644
--- a/cross/radarr/digests
+++ b/cross/radarr/digests
@@ -1,9 +1,12 @@
-Radarr.master.3.2.2.5080.linux-core-x64.tar.gz SHA1 32515f7da6a77a1ec460da0d2c5f93c2f974b77e
-Radarr.master.3.2.2.5080.linux-core-x64.tar.gz SHA256 2300fb3c5473ea68c48d44dba6a22da2bbc5301fe170c7118471bc5d01efd223
-Radarr.master.3.2.2.5080.linux-core-x64.tar.gz MD5 875c37b575a399acd0e3cd560b6e3d85
-Radarr.master.3.2.2.5080.linux-core-arm.tar.gz SHA1 6e88a900a9dc1d375541fb560f7625c8427c7c98
-Radarr.master.3.2.2.5080.linux-core-arm.tar.gz SHA256 7300be4d40037b08bdb10708a198eebb47d59fe868c119d51df3597257a39e11
-Radarr.master.3.2.2.5080.linux-core-arm.tar.gz MD5 128e56246e5666e9bc4f8a94860bee5e
-Radarr.master.3.2.2.5080.linux-core-arm64.tar.gz SHA1 b58fa6c6266254fac25c030a0f26615693a37899
-Radarr.master.3.2.2.5080.linux-core-arm64.tar.gz SHA256 f4ebb4f0f2371cd40ee836bbe99324cf1d50954fa86aaf53afebea3d3d39c67c
-Radarr.master.3.2.2.5080.linux-core-arm64.tar.gz MD5 baf77ea0f683d2a41f6dbca6d538015c
+Radarr.master.4.3.2.6857.linux-core-arm.tar.gz SHA1 6251092a2fcb717bdce1ce6b9f492691d52aa661
+Radarr.master.4.3.2.6857.linux-core-arm.tar.gz SHA256 20e8b2f3734327495af285e70b32fccb3c52a1794a723d2d69ef50973a2382d1
+Radarr.master.4.3.2.6857.linux-core-arm.tar.gz MD5 8b1aa9d6d2d067a591fcf6dcdb4e3e77
+Radarr.master.4.3.2.6857.linux-core-arm64.tar.gz SHA1 b22bf8a9cf0fb42b2507482ee9da8765942d1935
+Radarr.master.4.3.2.6857.linux-core-arm64.tar.gz SHA256 3aa4e2ae25cec14ebc911000d54f8764bcb4eb602dca495de5aa30e7a11cd37b
+Radarr.master.4.3.2.6857.linux-core-arm64.tar.gz MD5 a092e72a9b77675e717cf1a299674d16
+Radarr.master.4.3.2.6857.linux-core-x64.tar.gz SHA1 2133450662caa214f44b8ecd5019ad486c3accfe
+Radarr.master.4.3.2.6857.linux-core-x64.tar.gz SHA256 ece6681ef0c92015e88143c774aa6189a8ed08138ea2e48f7bfa60645df4b52f
+Radarr.master.4.3.2.6857.linux-core-x64.tar.gz MD5 51184436a69fc6aec5afb4bd7341e99e
+Radarr.master.4.3.2.6857.linux-core-x86.tar.gz SHA1 856d74f637b86669934d868a8a723af1982a7dff
+Radarr.master.4.3.2.6857.linux-core-x86.tar.gz SHA256 c8d75cc26f76333943eb57e2036396d93eeb72ad113f49c904fba06afb3120b3
+Radarr.master.4.3.2.6857.linux-core-x86.tar.gz MD5 3134a5b1844a060c0a8861cdfe60048c
diff --git a/spk/radarr/Makefile b/spk/radarr/Makefile
index 314ccbb77aba..7a0e24ddee3c 100644
--- a/spk/radarr/Makefile
+++ b/spk/radarr/Makefile
@@ -1,14 +1,18 @@
SPK_NAME = radarr
SPK_VERS = $(shell date +%Y%m%d)
-SPK_REV = 19
+SPK_REV = 20
SPK_ICON = src/radarr.png
-REQUIRED_MIN_DSM = 5.0
+DEPENDS = cross/libstdc++ cross/sqlite cross/radarr
-# .NET is not supported on PPC, ARM5, ARM7L and x86
-UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS)
-
-DEPENDS = cross/libstdc++ cross/libmediainfo cross/sqlite cross/radarr
+UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS)
+# custom exclusions for dotNET 6 on ARMv7 archs
+include ../../mk/spksrc.common.mk
+ifeq ($(call version_lt, ${TCVERSION}, 7.0),1)
+UNSUPPORTED_ARCHS += $(ARMv7_ARCHS)
+else
+UNSUPPORTED_ARCHS += armada370
+endif
MAINTAINER = Team Radarr
MAINTAINER_URL = https://radarr.video/
@@ -18,7 +22,7 @@ SUPPORTURL = https://radarr.video/\#support
DESCRIPTION = Radarr is a movie collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new movies and will interface with clients and indexers to grab, sort, and rename them. It can also be configured to automatically upgrade the quality of existing files in the library when a better quality format becomes available.
STARTABLE = yes
DISPLAY_NAME = Radarr
-CHANGELOG = "Enlarge the service start/stop timeout to 90 seconds."
+CHANGELOG = "1. Upgrade to Radarr 4.3.2.6857.
2. Fix package update.
3. Enlarge the service start/stop timeout to 90 seconds.
4. Add support for x86 (32-bit) architecture."
HOMEPAGE = https://radarr.video/
LICENSE = GPLv3
@@ -36,6 +40,7 @@ WIZARDS_DIR = src/wizard/
POST_STRIP_TARGET = radarr_extra_install
# use alternate TMPDIR as /tmp might be too small and not accessible on DSM >= 7.1.
+# TMPDIR is used for radarr built in backup and update
USE_ALTERNATE_TMPDIR = 1
include ../../mk/spksrc.spk.mk
@@ -45,6 +50,7 @@ PACKAGE_AUTHOR = [Team Radarr](https://radarr.video)
.PHONY: radarr_extra_install
radarr_extra_install:
- @install -m 755 -d $(STAGING_DIR)/app
- @install -m 644 src/config.xml $(STAGING_DIR)/app/config.xml
+ @$(MSG) "Install config.xml and provide package_info."
+ @install -m 755 -d $(STAGING_DIR)/var/.config/Radarr
+ @install -m 644 src/config.xml $(STAGING_DIR)/var/.config/Radarr/config.xml
@echo "PackageVersion=$(PACKAGE_VERSION)\nPackageAuthor=$(PACKAGE_AUTHOR)" > $(STAGING_DIR)/share/Radarr/package_info
diff --git a/spk/radarr/src/config.xml b/spk/radarr/src/config.xml
index 1f4a81999255..9adee5d2976f 100644
--- a/spk/radarr/src/config.xml
+++ b/spk/radarr/src/config.xml
@@ -1,8 +1,7 @@
-
master
- BuiltIn
False
8310
- 8311
+ True
+ BuiltIn
diff --git a/spk/radarr/src/service-setup.sh b/spk/radarr/src/service-setup.sh
index 68b9f59a2a88..88a4bb1db9b4 100644
--- a/spk/radarr/src/service-setup.sh
+++ b/spk/radarr/src/service-setup.sh
@@ -20,46 +20,46 @@ SVC_WAIT_TIMEOUT=90
service_postinst ()
{
- # Move config.xml to .config
- mkdir -p ${RADARR_CONFIG_DIR}
- mv ${SYNOPKG_PKGDEST}/app/config.xml ${RADARR_CONFIG_DIR}/config.xml
-
echo "Set update required"
# Make Radarr do an update check on start to avoid possible Radarr
# downgrade when synocommunity package is updated
- touch ${RADARR_CONFIG_DIR}/update_required 2>&1
+ touch "${RADARR_CONFIG_DIR}/update_required" 2>&1
- if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then
+ if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 7 ]; then
set_unix_permissions "${CONFIG_DIR}"
fi
}
service_preupgrade ()
{
- if [ ${SYNOPKG_DSM_VERSION_MAJOR} -ge 7 ]; then
+ if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -ge 7 ]; then
# ensure config is in @appdata folder
if [ -d "${LEGACY_CONFIG_DIR}" ]; then
- if [ "$(realpath ${LEGACY_CONFIG_DIR})" != "$(realpath ${CONFIG_DIR})" ]; then
+ if [ "$(realpath "${LEGACY_CONFIG_DIR}")" != "$(realpath "${CONFIG_DIR}")" ]; then
echo "Move ${LEGACY_CONFIG_DIR} to ${CONFIG_DIR}"
- mv ${LEGACY_CONFIG_DIR} ${CONFIG_DIR} 2>&1
+ mv "${LEGACY_CONFIG_DIR}" "${CONFIG_DIR}" 2>&1
fi
fi
fi
## never update Radarr distribution, use internal updater only
- [ -d ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup ] && rm -rf ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup
+ [ -d "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup" ] && rm -rf "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup"
echo "Backup existing distribution to ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup"
- mkdir -p ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup 2>&1
- rsync -aX ${SYNOPKG_PKGDEST}/share ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/ 2>&1
+ mkdir -p "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup" 2>&1
+ rsync -aX "${SYNOPKG_PKGDEST}/share" "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/" 2>&1
}
service_postupgrade ()
{
## restore Radarr distribution
- if [ -d ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/share ]; then
+ if [ -d "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/share" ]; then
echo "Restore previous distribution from ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup"
- rm -rf ${SYNOPKG_PKGDEST}/share/Radarr/bin 2>&1
+ rm -rf "${SYNOPKG_PKGDEST}/share/Radarr/bin" 2>&1
# prevent overwrite of updated package_info
- rsync -aX --exclude=package_info ${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/share/ ${SYNOPKG_PKGDEST}/share 2>&1
+ rsync -aX --exclude=package_info "${SYNOPKG_TEMP_UPGRADE_FOLDER}/backup/share/" "${SYNOPKG_PKGDEST}/share" 2>&1
+ fi
+
+ if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 7 ]; then
+ set_unix_permissions "${SYNOPKG_PKGDEST}/share"
fi
}