Skip to content

Commit

Permalink
redis: update and DSM7 compatibility (#4727)
Browse files Browse the repository at this point in the history
- update redis to v5.0.12
- adjust redis.conf for DSM7
- update installer for DSM5 and DSM6 to create link for DSM7 var folder
  • Loading branch information
hgy59 committed Jul 10, 2021
1 parent ff18cdd commit 885967a
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cross/redis/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions cross/redis/digests
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions mk/spksrc.service.installer.dsm5
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 3 additions & 0 deletions mk/spksrc.service.installer.dsm6
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 8 additions & 10 deletions spk/redis/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions spk/redis/src/redis.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 #################################

Expand Down
7 changes: 3 additions & 4 deletions spk/redis/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,4 +14,3 @@ service_postinst ()
sed -i -e "s/@maxmemory@/${MEMORY}mb/g" ${CFG_FILE}
}


0 comments on commit 885967a

Please sign in to comment.