From 885967a9b1dd05db04d07bcc7c978dd83dca53ac Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 10 Jul 2021 23:43:22 +0200 Subject: [PATCH] redis: update and DSM7 compatibility (#4727) - update redis to v5.0.12 - adjust redis.conf for DSM7 - update installer for DSM5 and DSM6 to create link for DSM7 var folder --- cross/redis/Makefile | 2 +- cross/redis/digests | 6 +++--- mk/spksrc.service.installer.dsm5 | 3 +++ mk/spksrc.service.installer.dsm6 | 3 +++ spk/redis/Makefile | 18 ++++++++---------- spk/redis/src/redis.conf | 6 +++--- spk/redis/src/service-setup.sh | 7 +++---- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/cross/redis/Makefile b/cross/redis/Makefile index de1389e6082..d56ca6e939e 100644 --- a/cross/redis/Makefile +++ b/cross/redis/Makefile @@ -1,5 +1,5 @@ PKG_NAME = redis -PKG_VERS = 5.0.7 +PKG_VERS = 5.0.12 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://download.redis.io/releases diff --git a/cross/redis/digests b/cross/redis/digests index 494a981eab9..838d0498360 100644 --- a/cross/redis/digests +++ b/cross/redis/digests @@ -1,3 +1,3 @@ -redis-5.0.7.tar.gz SHA1 f21bcc123b4c707c5a486034be4cf6e5ba1438e7 -redis-5.0.7.tar.gz SHA256 61db74eabf6801f057fd24b590232f2f337d422280fd19486eca03be87d3a82b -redis-5.0.7.tar.gz MD5 612ec43075a888bc8b8a7dd8ccb2e0f7 +redis-5.0.12.tar.gz SHA1 e492cc3432b4741f2e3d5134a6067f7b7bb0be55 +redis-5.0.12.tar.gz SHA256 7040eba5910f7c3d38f05ea5a1d88b480488215bdbd2e10ec70d18380108e31e +redis-5.0.12.tar.gz MD5 269077a49ee9fdcc880e777170408ee3 diff --git a/mk/spksrc.service.installer.dsm5 b/mk/spksrc.service.installer.dsm5 index ea5e9afa344..fe6811b5375 100644 --- a/mk/spksrc.service.installer.dsm5 +++ b/mk/spksrc.service.installer.dsm5 @@ -273,6 +273,9 @@ postinst () # Link for backward compatibility of binaries location $LN "${SYNOPKG_PKGDEST}" "/usr/local/${SYNOPKG_PKGNAME}" 2>&1 | install_log + # Link for DSM7 forward compatibility of var location + $LN "${SYNOPKG_PKGDEST}/var" "/var/packages/${SYNOPKG_PKGNAME}/var" 2>&1 | install_log + # Add firewall config if [ -r "${FWPORTS_FILE}" ]; then install_log "Installing service configuration ${FWPORTS_FILE}" diff --git a/mk/spksrc.service.installer.dsm6 b/mk/spksrc.service.installer.dsm6 index fe732190886..b57c067b84c 100644 --- a/mk/spksrc.service.installer.dsm6 +++ b/mk/spksrc.service.installer.dsm6 @@ -277,6 +277,9 @@ postinst () # Link for backward compatibility of binaries location $LN "${SYNOPKG_PKGDEST}" "/usr/local/${SYNOPKG_PKGNAME}" 2>&1 | install_log + # Link for DSM7 forward compatibility of var location + $LN "${SYNOPKG_PKGDEST}/var" "/var/packages/${SYNOPKG_PKGNAME}/var" 2>&1 | install_log + # Service user management if [ -n "${EFF_USER}" ]; then # Register service in "users" group to access any content diff --git a/spk/redis/Makefile b/spk/redis/Makefile index b36e2e95669..b156a6037aa 100644 --- a/spk/redis/Makefile +++ b/spk/redis/Makefile @@ -1,34 +1,32 @@ SPK_NAME = redis -SPK_VERS = 5.0.7 -SPK_REV = 6 +SPK_VERS = 5.0.12 +SPK_REV = 7 SPK_ICON = src/redis.png -DSM_UI_DIR = app DEPENDS = cross/$(SPK_NAME) MAINTAINER = DigitalBox98 DESCRIPTION = Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. -RELOAD_UI = yes -STARTABLE = yes DISPLAY_NAME = redis -CHANGELOG = "Update to 5.0.7" +CHANGELOG = "Update redis to v5.0.12" # PPC archs except qoriq are not supported anymore -UNSUPPORTED_ARCHS = $(OLD_PCC_ARCHS) +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) HOMEPAGE = https://redis.io LICENSE = 3-clause BSD +STARTABLE = yes SERVICE_USER = auto SERVICE_SETUP = src/service-setup.sh -NO_SERVICE_SHORTCUT = yes - -INSTALL_PREFIX = /usr/local/$(SPK_NAME) POST_STRIP_TARGET = redis_extra_install +# add links for tools +SPK_COMMANDS = bin/redis-benchmark bin/redis-check-aof bin/redis-check-rdb bin/redis-cli + include ../../mk/spksrc.spk.mk .PHONY: redis_extra_install diff --git a/spk/redis/src/redis.conf b/spk/redis/src/redis.conf index d4d903405ad..38a57f455b8 100644 --- a/spk/redis/src/redis.conf +++ b/spk/redis/src/redis.conf @@ -43,7 +43,7 @@ daemonize yes # When running daemonized, Redis writes a pid file in /var/run/redis.pid by # default. You can specify a custom pid file location here. -pidfile /usr/local/redis/var/redis.pid +pidfile /var/packages/redis/var/redis.pid # Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. @@ -105,7 +105,7 @@ loglevel notice # Specify the log file name. Also the empty string can be used to force # Redis to log on the standard output. Note that if you use standard # output for logging but daemonize, logs will be sent to /dev/null -logfile /usr/local/redis/var/redis.log +logfile /var/packages/redis/var/redis.log # To enable logging to the system logger, just set 'syslog-enabled' to yes, # and optionally update the other syslog parameters to suit your needs. @@ -189,7 +189,7 @@ dbfilename dump.rdb # The Append Only File will also be created inside this directory. # # Note that you must specify a directory here, not a file name. -dir /usr/local/redis/var/ +dir /var/packages/redis/var/ ################################# REPLICATION ################################# diff --git a/spk/redis/src/service-setup.sh b/spk/redis/src/service-setup.sh index 2850e83eb01..7a9e17e0bc9 100644 --- a/spk/redis/src/service-setup.sh +++ b/spk/redis/src/service-setup.sh @@ -1,10 +1,10 @@ -CFG_FILE="${SYNOPKG_PKGDEST}/var/redis.conf" -PATH="${SYNOPKG_PKGDEST}:${PATH}" + +# redis service setup +CFG_FILE="${SYNOPKG_PKGVAR}/redis.conf" SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/redis-server ${CFG_FILE}" SVC_BACKGROUND=y SVC_WRITE_PID=y - service_postinst () { # Use 15% of total physical memory with maximum of 64MB @@ -14,4 +14,3 @@ service_postinst () sed -i -e "s/@maxmemory@/${MEMORY}mb/g" ${CFG_FILE} } -