Skip to content

Commit

Permalink
add workaround for mono bug with armv5
Browse files Browse the repository at this point in the history
  • Loading branch information
hgy59 committed Feb 4, 2020
1 parent e62d5b4 commit 9dc589a
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 15 deletions.
4 changes: 2 additions & 2 deletions spk/jackett/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = jackett
SPK_VERS = 0.11.43
SPK_REV = 8
SPK_REV = 9
SPK_ICON = src/jackett.png
DSM_UI_DIR = app

Expand All @@ -14,7 +14,7 @@ RELOAD_UI = yes
DISPLAY_NAME = Jackett
BETA = 1
STARTABLE = yes
CHANGELOG = "Update Jackett to version 0.11.43"
CHANGELOG = "Add workaround for mono bug with armv5/88f6281"
HOMEPAGE = https://github.com/Jackett/Jackett
LICENSE = GPLv2

Expand Down
8 changes: 6 additions & 2 deletions spk/jackett/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
service_prestart ()
{
# Replace generic service startup

MONO_PATH="${SYNOPKG_PKGDEST}/../mono/bin"
PATH="${SYNOPKG_PKGDEST}/bin:${MONO_PATH}:${PATH}"
MONO="${MONO_PATH}/mono"
JACKETT="${SYNOPKG_PKGDEST}/share/${SYNOPKG_PKGNAME}/JackettConsole.exe"
HOME_DIR="${SYNOPKG_PKGDEST}/var"

# workaround for mono bug with armv5 (https://github.com/mono/mono/issues/12537)
if [ "$SYNOPKG_DSM_ARCH" == "88f8621" -o "$SYNOPKG_DSM_ARCH" == "88f8622" ]; then
MONO="MONO_ENV_OPTIONS='-O=-aot,-float32' ${MONO_PATH}/mono"
fi

echo "Starting Jackett as user ${EFF_USER}" >> ${LOG_FILE}
COMMAND="env HOME=${HOME_DIR} PATH=${PATH} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${MONO} ${JACKETT} --PIDFile ${PID_FILE}"

Expand All @@ -30,5 +34,5 @@ service_postinst ()
$BIN/delgroup "${USER}" "users" >> ${INST_LOG}
$BIN/deluser "${USER}" >> ${INST_LOG}

echo "service_postinst ${SYNOPKG_PKG_STATUS}" >> $INST_LOG
echo "service_postinst ${SYNOPKG_PKG_STATUS}" >> ${INST_LOG}
}
4 changes: 2 additions & 2 deletions spk/lidarr/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = lidarr
SPK_VERS = $(shell date +%Y%m%d)
SPK_REV = 2
SPK_REV = 3
SPK_ICON = src/lidarr.png

REQUIRED_DSM = 5.0
Expand All @@ -16,7 +16,7 @@ DESCRIPTION = Lidarr is a music collection manager for Usenet and BitTorrent us
RELOAD_UI = yes
STARTABLE = yes
DISPLAY_NAME = Lidarr
CHANGELOG = "Update Lidarr to v0.5.0.583"
CHANGELOG = "Add workaround for mono bug with armv5/88f6281"

HOMEPAGE = http://lidarr.audio/
LICENSE = GPLv3
Expand Down
9 changes: 7 additions & 2 deletions spk/lidarr/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PATH="${SYNOPKG_PKGDEST}/bin:${PATH}"
MONO_PATH="/usr/local/mono/bin"
MONO_PATH="${SYNOPKG_PKGDEST}/../mono/bin"
MONO="${MONO_PATH}/mono"

# Check versions during upgrade
Expand All @@ -14,6 +14,11 @@ PID_FILE="${CONFIG_DIR}/Lidarr/lidarr.pid"
# Some have it stored in the root of package
LEGACY_CONFIG_DIR="${SYNOPKG_PKGDEST}/.config"

# workaround for mono bug with armv5 (https://github.com/mono/mono/issues/12537)
if [ "$SYNOPKG_DSM_ARCH" == "88f8621" -o "$SYNOPKG_DSM_ARCH" == "88f8622" ]; then
MONO="MONO_ENV_OPTIONS='-O=-aot,-float32' ${MONO_PATH}/mono"
fi

GROUP="sc-download"

SERVICE_COMMAND="env PATH=${MONO_PATH}:${PATH} HOME=${HOME_DIR} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${MONO} ${LIDARR}"
Expand Down Expand Up @@ -46,7 +51,7 @@ service_preupgrade ()

service_postupgrade ()
{
# Restore Current Lidarr Binary If Current Ver. >= SPK Ver.
# Restore Current Lidarr Binary if Current Ver. >= SPK Ver.
. ${CONFIG_DIR}/KEEP_VAR
if [ "$KEEP_CUR" == "yes" ]; then
echo "Restoring Lidarr version from before upgrade" >> ${INST_LOG}
Expand Down
4 changes: 2 additions & 2 deletions spk/radarr/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = radarr
SPK_VERS = $(shell date +%Y%m%d)
SPK_REV = 8
SPK_REV = 9
SPK_ICON = src/radarr.png

REQUIRED_DSM = 5.0
Expand All @@ -16,7 +16,7 @@ DESCRIPTION = Radarr is a movie manager like Couchpotato, but based on the Sona
RELOAD_UI = yes
STARTABLE = yes
DISPLAY_NAME = Radarr
CHANGELOG = "Update Radarr to v0.2.0.1293."
CHANGELOG = "Add workaround for mono bug with armv5/88f6281"

HOMEPAGE = https://radarr.video/
LICENSE = GPLv3
Expand Down
9 changes: 7 additions & 2 deletions spk/radarr/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PATH="${SYNOPKG_PKGDEST}/bin:${PATH}"
MONO_PATH="/usr/local/mono/bin"
MONO_PATH="${SYNOPKG_PKGDEST}/../mono/bin"
MONO="${MONO_PATH}/mono"

# Check versions during upgrade
Expand All @@ -14,6 +14,11 @@ PID_FILE="${CONFIG_DIR}/Radarr/nzbdrone.pid"
# Some have it stored in the root of package
LEGACY_CONFIG_DIR="${SYNOPKG_PKGDEST}/.config"

# workaround for mono bug with armv5 (https://github.com/mono/mono/issues/12537)
if [ "$SYNOPKG_DSM_ARCH" == "88f8621" -o "$SYNOPKG_DSM_ARCH" == "88f8622" ]; then
MONO="MONO_ENV_OPTIONS='-O=-aot,-float32' ${MONO_PATH}/mono"
fi

GROUP="sc-download"
LEGACY_GROUP="sc-media"

Expand Down Expand Up @@ -68,7 +73,7 @@ service_preupgrade ()

service_postupgrade ()
{
# Restore Current Radarr Binary If Current Ver. >= SPK Ver.
# Restore Current Radarr Binary if Current Ver. >= SPK Ver.
. ${CONFIG_DIR}/KEEP_VAR
if [ "$KEEP_CUR" == "yes" ]; then
echo "Restoring Radarr version from before upgrade" >> ${INST_LOG}
Expand Down
4 changes: 2 additions & 2 deletions spk/sonarr/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = nzbdrone
SPK_VERS = $(shell date +%Y%m%d)
SPK_REV = 15
SPK_REV = 16
SPK_ICON = src/sonarr.png

REQUIRED_DSM = 5.0
Expand All @@ -18,7 +18,7 @@ DESCRIPTION_SPN = Sonarr es un PVR para los usuarios de grupos de noticias y tor
RELOAD_UI = yes
DISPLAY_NAME = Sonarr
STARTABLE = yes
CHANGELOG = "Update Sonarr to v2.0.0.5301."
CHANGELOG = "Add workaround for mono bug with armv5/88f6281"

HOMEPAGE = https://sonarr.tv
LICENSE = GPLv3
Expand Down
7 changes: 6 additions & 1 deletion spk/sonarr/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PATH="${SYNOPKG_PKGDEST}/bin:${PATH}"
MONO_PATH="/usr/local/mono/bin"
MONO_PATH="${SYNOPKG_PKGDEST}/../mono/bin"
MONO="${MONO_PATH}/mono"

# Sonarr uses the home directory to store it's ".config"
Expand Down Expand Up @@ -29,6 +29,11 @@ fi
# Some have it stored in the root of package
LEGACY_CONFIG_DIR="${SYNOPKG_PKGDEST}/.config"

# workaround for mono bug with armv5 (https://github.com/mono/mono/issues/12537)
if [ "$SYNOPKG_DSM_ARCH" == "88f8621" -o "$SYNOPKG_DSM_ARCH" == "88f8622" ]; then
MONO="MONO_ENV_OPTIONS='-O=-aot,-float32' ${MONO_PATH}/mono"
fi

GROUP="sc-download"
LEGACY_GROUP="sc-media"

Expand Down

0 comments on commit 9dc589a

Please sign in to comment.