Skip to content

Commit 5ce6622

Browse files
smaarnhgy59
andauthored
memcached: upgrade 1.6.9 + DSM7 support (SynoCommunity#4522)
* memcached: bump 1.4.13 -> 1.6.9 + reworked to use standard "framework" * Add DSM 7 support logics * Fixed invalid no-arch switch * Added missing CONF_DIR parameter * Fixed setup to handle configuration file * Improve upgrade procedure * Cleanup unnecessary code * Fix upgrade procedure attempt #2 * Cleanup of enforced compilation parameters * Attemptive fix at configuration files * Fixing backup process * Fixed invalid WEB_DIR environment variable * Replace the default configuration file by a file provided upon package generation * Fixed restoration to be performed * Prefer using tar command to perform backups * Simplified web directory computing + fixed sc-memcecahed to be part of the http group * Remove verbosity on tar extraction commands * Added explicit service port informations * Fixed resource to include service port configuration * memcached: rework - update memcached to v1.6.15 - aarch64 patch is not required (memcached/memcached#743 is not an issue) - update phpMemcachedAdmin to include fix for 1.6.x - fix service user * memcached: rework (2) - use custom app/config file to link with phpMemcachdAdmin - update icon - set owner of config file on DSM < 7 * minor cleanup - update license - remove autoconf as configure script is included * activate DSM 7 webservice icon - avoid default DSM UI icon on DSM 7 * add diyspk/memaslap to test and benchmark memcached server - add cross/libmemcached - enable build of memaslap - fix build for DSM 7 (issue with newer compilers) - add patches for correct program name and faster build * memcachd: optimize code - use code optimization - fix build for OLD_PPC_ARCHS * fix phpmemcachedadmin configuration - update phpmemcachedadmin to store config in var folder and link as Config into web folder - fix folder permissions for phpmemcachedadmin - create Memcache.php on demand * framework: enhanced for custom app/config file - add Makefile variable DSM_UI_CONFIG for package specific app/config files * update generic installers - remove SYNOPKG_DSM_VERSION_MAJOR check in installers - use GROUP variable for group in set_unix_permissions for DSM 6 Co-authored-by: hgy59 <[email protected]>
1 parent 4285c83 commit 5ce6622

24 files changed

+359
-297
lines changed

cross/libmemcached/Makefile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
PKG_NAME = libmemcached
2+
PKG_VERS = 1.0.18
3+
PKG_EXT = tar.gz
4+
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
5+
PKG_DIST_SITE = https://launchpad.net/libmemcached/1.0/$(PKG_VERS)/+download
6+
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
7+
8+
DEPENDS = cross/libevent
9+
10+
HOMEPAGE = https://libmemcached.org/libMemcached.html
11+
COMMENT = libMemcached is an open source C/C++ client library and tools for the memcached server.
12+
LICENSE = 3-Clause BSD
13+
14+
GNU_CONFIGURE = 1
15+
CONFIGURE_ARGS = --disable-static
16+
CONFIGURE_ARGS += --enable-memaslap
17+
CONFIGURE_ARGS += ax_cv_gcc_atomic_builtins=yes
18+
# https://medium.com/swlh/the-complete-guide-to-benchmark-the-performance-of-memcached-on-ubuntu-16-04-71edeaf6e740
19+
CONFIGURE_ARGS += ax_cv_libevent=yes
20+
21+
include ../../mk/spksrc.cross-cc.mk

cross/libmemcached/PLIST

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
bin:bin/memaslap
2+
bin:bin/memcapable
3+
bin:bin/memcat
4+
bin:bin/memcp
5+
bin:bin/memdump
6+
bin:bin/memerror
7+
bin:bin/memexist
8+
bin:bin/memflush
9+
bin:bin/memparse
10+
bin:bin/memping
11+
bin:bin/memrm
12+
bin:bin/memslap
13+
bin:bin/memstat
14+
bin:bin/memtouch
15+
lnk:lib/libhashkit.so
16+
lnk:lib/libhashkit.so.2
17+
lib:lib/libhashkit.so.2.0.0
18+
lnk:lib/libmemcached.so
19+
lnk:lib/libmemcached.so.11
20+
lib:lib/libmemcached.so.11.0.0
21+
lnk:lib/libmemcachedutil.so
22+
lnk:lib/libmemcachedutil.so.2
23+
lib:lib/libmemcachedutil.so.2.0.0

cross/libmemcached/digests

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
libmemcached-1.0.18.tar.gz SHA1 8be06b5b95adbc0a7cb0f232e237b648caf783e1
2+
libmemcached-1.0.18.tar.gz SHA256 e22c0bb032fde08f53de9ffbc5a128233041d9f33b5de022c0978a2149885f82
3+
libmemcached-1.0.18.tar.gz MD5 b3958716b4e53ddc5992e6c49d97e819
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# avoid comparison of pointer with integer
2+
# error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
3+
#
4+
--- clients/memflush.cc.orig 2014-02-09 12:52:42.000000000 +0100
5+
+++ clients/memflush.cc 2022-06-03 10:06:40.989938212 +0200
6+
@@ -39,7 +39,7 @@
7+
{
8+
options_parse(argc, argv);
9+
10+
- if (opt_servers == false)
11+
+ if (opt_servers == NULL)
12+
{
13+
char *temp;
14+
15+
@@ -48,7 +48,7 @@
16+
opt_servers= strdup(temp);
17+
}
18+
19+
- if (opt_servers == false)
20+
+ if (opt_servers == NULL)
21+
{
22+
std::cerr << "No Servers provided" << std::endl;
23+
exit(EXIT_FAILURE);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# For faster build:
2+
# - remove target with test programs (noinst_PROGRAMS) in generated Makefile.
3+
# PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
4+
#
5+
--- Makefile.in.orig 2014-02-09 11:52:56.000000000 +0000
6+
+++ Makefile.in 2022-06-03 08:39:02.989627735 +0000
7+
@@ -9961,7 +9961,7 @@
8+
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
9+
check: $(BUILT_SOURCES)
10+
$(MAKE) $(AM_MAKEFLAGS) check-am
11+
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \
12+
+all-am: Makefile $(LTLIBRARIES) $(bin_PROGRAMS) $(MANS) $(DATA) $(HEADERS) \
13+
mem_config.h
14+
install-binPROGRAMS: install-libLTLIBRARIES
15+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Adjust the program name to be able to identify the tool as memaslap
2+
#
3+
# memslap is another tool of libmemcached, that is not as useful
4+
# as it does not show stats nor accepts parameters such as threads or time.
5+
#
6+
--- clients/memaslap.c.orig 2014-02-09 11:52:42.000000000 +0000
7+
+++ clients/memaslap.c 2022-06-03 09:57:33.085672134 +0000
8+
@@ -1,5 +1,5 @@
9+
/*
10+
- * memslap
11+
+ * memaslap
12+
*
13+
* (c) Copyright 2009, Schooner Information Technology, Inc.
14+
* All rights reserved.
15+
@@ -32,7 +32,7 @@
16+
#include "ms_setting.h"
17+
#include "ms_thread.h"
18+
19+
-#define PROGRAM_NAME "memslap"
20+
+#define PROGRAM_NAME "memaslap"
21+
#define PROGRAM_DESCRIPTION \
22+
"Generates workload against memcached servers."
23+
24+
@@ -111,7 +111,7 @@
25+
static void ms_statistic_init(void);
26+
static void ms_stats_init(void);
27+
static void ms_print_statistics(int in_time);
28+
-static void ms_print_memslap_stats(struct timeval *start_time,
29+
+static void ms_print_memaslap_stats(struct timeval *start_time,
30+
struct timeval *end_time);
31+
static void ms_monitor_slap_mode(void);
32+
33+
@@ -130,7 +130,7 @@
34+
printf(" %s\n\n", description);
35+
printf(
36+
"Usage:\n"
37+
- " memslap -hV | -s servers [-F config_file] [-t time | -x exe_num] [...]\n\n"
38+
+ " memaslap -hV | -s servers [-F config_file] [-t time | -x exe_num] [...]\n\n"
39+
"Options:\n");
40+
41+
for (int x= 0; long_options[x].name; x++)
42+
@@ -146,13 +146,13 @@
43+
44+
printf(
45+
"\nExamples:\n"
46+
- " memslap -s 127.0.0.1:11211 -S 5s\n"
47+
- " memslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b\n"
48+
- " memslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2\n"
49+
- " memslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k\n"
50+
- " memslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40\n"
51+
- " memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m\n"
52+
- " memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2\n\n");
53+
+ " memaslap -s 127.0.0.1:11211 -S 5s\n"
54+
+ " memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b\n"
55+
+ " memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2\n"
56+
+ " memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k\n"
57+
+ " memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40\n"
58+
+ " memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m\n"
59+
+ " memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2\n\n");
60+
61+
exit(0);
62+
} /* ms_help_command */
63+
@@ -286,7 +286,7 @@
64+
65+
case OPT_UDP:
66+
return
67+
- "UDP support, default memslap uses TCP, TCP port and UDP port of\n"
68+
+ "UDP support, default memaslap uses TCP, TCP port and UDP port of\n"
69+
" server must be same.";
70+
71+
case OPT_EXPIRE:
72+
@@ -708,8 +708,8 @@
73+
} /* ms_print_statistics */
74+
75+
76+
-/* used to print the states of memslap */
77+
-static void ms_print_memslap_stats(struct timeval *start_time,
78+
+/* used to print the states of memaslap */
79+
+static void ms_print_memaslap_stats(struct timeval *start_time,
80+
struct timeval *end_time)
81+
{
82+
char buf[1024];
83+
@@ -803,7 +803,7 @@
84+
85+
fprintf(stdout, "%s", buf);
86+
fflush(stdout);
87+
-} /* ms_print_memslap_stats */
88+
+} /* ms_print_memaslap_stats */
89+
90+
91+
/* the loop of the main thread, wait the work threads to complete */
92+
@@ -883,7 +883,7 @@
93+
gettimeofday(&end_time, NULL);
94+
}
95+
96+
- ms_print_memslap_stats(&start_time, &end_time);
97+
+ ms_print_memaslap_stats(&start_time, &end_time);
98+
} /* ms_monitor_slap_mode */
99+
100+

cross/memcached/Makefile

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PKG_NAME = memcached
2-
PKG_VERS = 1.4.15
2+
PKG_VERS = 1.6.15
33
PKG_EXT = tar.gz
44
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
55
PKG_DIST_SITE = http://www.memcached.org/files
@@ -9,14 +9,16 @@ DEPENDS = cross/libevent
99

1010
HOMEPAGE = https://www.memcached.org/
1111
COMMENT = Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
12-
LICENSE = BSD
12+
LICENSE = 3-Clause BSD
1313

14-
PRE_CONFIGURE_TARGET = memcached_pre_configure
15-
CONFIGURE_ARGS = ac_cv_c_endian=little
1614
GNU_CONFIGURE = 1
15+
ADDITIONAL_CFLAGS = -O
1716

18-
include ../../mk/spksrc.cross-cc.mk
17+
include ../../mk/spksrc.archs.mk
18+
ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
19+
# EFD_NONBLOCK is not defined (define it OR disable use of eventfd)
20+
#ADDITIONAL_CFLAGS += -DEFD_NONBLOCK=0x0004000
21+
CONFIGURE_ARGS = ac_cv_func_eventfd=no
22+
endif
1923

20-
.PHONY: memcached_pre_configure
21-
memcached_pre_configure:
22-
@$(RUN) autoconf
24+
include ../../mk/spksrc.cross-cc.mk

cross/memcached/digests

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
memcached-1.4.15.tar.gz SHA1 12ec84011f408846250a462ab9e8e967a2e8cbbc
2-
memcached-1.4.15.tar.gz SHA256 169721ab7a7531add6ae9f6b14b6b5641725fe0b1f0bdf5c3a4327725901e2b4
3-
memcached-1.4.15.tar.gz MD5 36ea966f5a29655be1746bf4949f7f69
1+
memcached-1.6.15.tar.gz SHA1 badcfa0d65f5797cc9c2f957f3fbfedbd8c13411
2+
memcached-1.6.15.tar.gz SHA256 8d7abe3d649378edbba16f42ef1d66ca3f2ac075f2eb97145ce164388e6ed515
3+
memcached-1.6.15.tar.gz MD5 8a21ef7bc1c427e6cd88cac270394898
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
--- configure.ac.orig 2012-09-03 09:35:54.000000000 +0200
22
+++ configure.ac 2012-12-08 00:31:35.000000000 +0100
3-
@@ -534,12 +534,12 @@
3+
@@ -788,12 +788,12 @@
44
if test "$ICC" = "yes"
55
then
66
dnl ICC trying to be gcc.
77
- CFLAGS="$CFLAGS -diag-disable 187 -Wall -Werror"
88
+ CFLAGS="$CFLAGS -diag-disable 187 -Wall"
9-
AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
9+
AC_DEFINE([_GNU_SOURCE],[1],[make sure IOV_MAX is defined])
1010
elif test "$GCC" = "yes"
1111
then
1212
GCC_VERSION=`$CC -dumpversion`
1313
- CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
1414
+ CFLAGS="$CFLAGS -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
15-
case $GCC_VERSION in
16-
4.4.*)
17-
CFLAGS="$CFLAGS -fno-strict-aliasing"
15+
if test "x$enable_asan" = "xyes"; then
16+
CFLAGS="$CFLAGS -fsanitize=address"
17+
fi

cross/phpmemcachedadmin/Makefile

+23-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
PKG_NAME = phpMemcachedAdmin
2-
PKG_VERS = 1.2.2-r262
32
PKG_EXT = tar.gz
4-
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
5-
PKG_DIST_SITE = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/phpmemcacheadmin
6-
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
3+
PKG_DOWNLOAD_METHOD = git
4+
PKG_GIT_HASH = aaf3d16a2a1e3dff72dd358f1758d96f0f174cb3
5+
PKG_DIST_SITE = https://github.com/elijaa/phpmemcachedadmin.git
6+
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT)
7+
PKG_DIR = $(PKG_NAME)-git$(PKG_GIT_HASH)
8+
9+
# Unfortunately only version 1.3.0 is officially released, but
10+
# we need the commit aaf3d16 of 12 Jun 2020 for memcached 1.6.x
11+
# Issue #19: fix mem_requested key change in Memcached 1.5.17
712

813
DEPENDS =
914

1015
HOMEPAGE = https://github.com/elijaa/phpmemcachedadmin
11-
COMMENT = Graphic stand-alone administration for memcached to monitor and debug purpose
12-
LICENSE = Apache License 2.0
16+
COMMENT = Graphic stand-alone administration for memcached to monitor and debug purpose.
17+
LICENSE = Apache 2.0
1318

14-
EXTRACT_PATH = $(WORK_DIR)/$(PKG_DIR)
15-
CONFIGURE_TARGET = nop
16-
COMPILE_TARGET = nop
19+
EXTRACT_PATH = $(WORK_DIR)
1720
INSTALL_TARGET = phpmemcachedadmin_install
1821

19-
include ../../mk/spksrc.cross-cc.mk
22+
include ../../mk/spksrc.install-resources.mk
23+
24+
CONFIG_FOLDER = $(STAGING_INSTALL_PREFIX)/var/phpmemcachedadmin.config
2025

2126
.PHONY: phpmemcachedadmin_install
27+
# link the Config folder into var for backup/restore on package update
28+
# and for on demand creation of the default config on DSM 7.
2229
phpmemcachedadmin_install:
23-
mkdir -p $(STAGING_INSTALL_PREFIX)/share/phpMemcachedAdmin
24-
tar -cf - -C $(WORK_DIR)/$(PKG_DIR) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/share/phpMemcachedAdmin
30+
@mkdir -p $(STAGING_INSTALL_PREFIX)/share/$(PKG_NAME)
31+
@tar -cf - -C $(WORK_DIR)/$(PKG_DIR) --exclude Config . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/share/$(PKG_NAME)
32+
@echo folder=$(CONFIG_FOLDER)
33+
@install -d -m 755 $(CONFIG_FOLDER)
34+
@install -m 755 $(WORK_DIR)/$(PKG_DIR)/Config/* $(CONFIG_FOLDER)/
35+
@cd $(STAGING_INSTALL_PREFIX)/share/$(PKG_NAME) && ln -sf $(INSTALL_PREFIX_VAR)/phpmemcachedadmin.config Config

cross/phpmemcachedadmin/PLIST

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
rsc:share/phpMemcachedAdmin
1+
rsc:share/phpMemcachedAdmin/
2+
rsc:var/phpmemcachedadmin.config/

cross/phpmemcachedadmin/digests

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
phpMemcachedAdmin-1.2.2-r262.tar.gz SHA1 616d33deeb54c7bb0b894b23589afc81aa3f67f5
2-
phpMemcachedAdmin-1.2.2-r262.tar.gz SHA256 10022211593c78b4eaaec16054843979f0b98ed72e86ee93e4fe79bf35c383e3
3-
phpMemcachedAdmin-1.2.2-r262.tar.gz MD5 93ce23bc02f8f262d55d749d40058388
1+
phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz SHA1 28d8c233e6e1814fd25a37a2c1f7d3ee35a94d32
2+
phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz SHA256 1248fe1c6df610b6ea69dfba1a2774d182160a444759d3bf1b4782458d40fe00
3+
phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz MD5 e1e846983f33fcdb480c91c365bc7cac

diyspk/memaslap/Makefile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
SPK_NAME = memaslap
2+
SPK_VERS = 1.0
3+
SPK_REV = 1
4+
5+
DEPENDS = cross/libmemcached
6+
7+
MAINTAINER = SynoCommunity
8+
DESCRIPTION = memaslap is a load generation and benchmark tool for memcached servers. It generates configurable workload such as threads, concurrencies, connections, run time, overwrite, miss rate, key size, value size, get/set proportion, expected throughput, and so on.
9+
STARTABLE = no
10+
11+
HOMEPAGE = http://docs.libmemcached.org/bin/memaslap.html
12+
LICENSE = 3-Clause BSD
13+
14+
SPK_COMMANDS = bin/memaslap
15+
16+
include ../../mk/spksrc.spk.mk

mk/spksrc.service.installer.dsm5

+9-15
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,7 @@ set_unix_permissions ()
174174
DIRNAME=$1
175175
if [ -n "${EFF_USER}" ]; then
176176
echo "Granting '${EFF_USER}' unix ownership on ${DIRNAME}"
177-
if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 6 ]; then
178-
chown -R ${EFF_USER}:root "${DIRNAME}"
179-
else
180-
chown -R ${EFF_USER}:${USER} "${DIRNAME}"
181-
fi
177+
chown -R ${EFF_USER}:root "${DIRNAME}"
182178
fi
183179
}
184180

@@ -246,16 +242,14 @@ postinst ()
246242

247243
# Service user management
248244
if [ -n "${EFF_USER}" ]; then
249-
if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 6 ]; then
250-
# DSM 5 specific operations
251-
# Create prefixed synouser
252-
if ! cat /etc/passwd | grep "${EFF_USER}:x:" &> /dev/null; then
253-
synouser --add "${EFF_USER}" "" "$USER_DESC" 0 "" 0 2>&1 | install_log
254-
# Set HOME for consistency with DSM 6, location available even if homes not enabled
255-
BACKUP_PASSWD="/tmp/install_${SYNOPKG_PKGNAME}_passwd"
256-
cp /etc/passwd ${BACKUP_PASSWD} 2>&1 | install_log
257-
sed -i "s#/var/services/homes/${EFF_USER}#/var/packages/${SYNOPKG_PKGNAME}/target#" /etc/passwd 2>&1 | install_log
258-
fi
245+
# DSM 5 specific operations
246+
# Create prefixed synouser
247+
if ! cat /etc/passwd | grep "${EFF_USER}:x:" &> /dev/null; then
248+
synouser --add "${EFF_USER}" "" "$USER_DESC" 0 "" 0 2>&1 | install_log
249+
# Set HOME for consistency with DSM 6, location available even if homes not enabled
250+
BACKUP_PASSWD="/tmp/install_${SYNOPKG_PKGNAME}_passwd"
251+
cp /etc/passwd ${BACKUP_PASSWD} 2>&1 | install_log
252+
sed -i "s#/var/services/homes/${EFF_USER}#/var/packages/${SYNOPKG_PKGNAME}/target#" /etc/passwd 2>&1 | install_log
259253
fi
260254
# Register service in "users" group to access any content
261255
if [ "$ADD_USER_IN_USERS" = "yes" ]; then

mk/spksrc.service.installer.dsm6

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ set_unix_permissions ()
178178
DIRNAME=$1
179179
if [ -n "${EFF_USER}" ]; then
180180
echo "Granting '${EFF_USER}' unix ownership on ${DIRNAME}"
181-
if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 6 ]; then
182-
chown -R ${EFF_USER}:root "${DIRNAME}"
181+
if [ -n "${GROUP}" ]; then
182+
chown -R ${EFF_USER}:${GROUP} "${DIRNAME}"
183183
else
184184
chown -R ${EFF_USER}:${USER} "${DIRNAME}"
185185
fi

0 commit comments

Comments
 (0)