Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memcached: upgrade 1.6.9 + DSM7 support #4522

Merged
merged 31 commits into from
Jun 4, 2022
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5c64223
memcached: bump 1.4.13 -> 1.6.9
smaarn Mar 25, 2021
226222d
Add DSM 7 support logics
smaarn May 1, 2022
902e170
Fixed invalid no-arch switch
smaarn May 1, 2022
160113f
Added missing CONF_DIR parameter
smaarn May 1, 2022
318bcf3
Fixed setup to handle configuration file
smaarn May 1, 2022
ddb30a7
Improve upgrade procedure
smaarn May 1, 2022
596912d
Cleanup unnecessary code
smaarn May 1, 2022
879a0a9
Fix upgrade procedure attempt #2
smaarn May 1, 2022
345583c
Cleanup of enforced compilation parameters
smaarn May 3, 2022
b478819
Attemptive fix at configuration files
smaarn May 3, 2022
57d5c37
Fixing backup process
smaarn May 3, 2022
af8ed11
Fixed invalid WEB_DIR environment variable
smaarn May 3, 2022
cbd20cc
Replace the default configuration file by a file provided upon packag…
smaarn May 3, 2022
81eb80f
Fixed restoration to be performed
smaarn May 3, 2022
c0a2b9b
Prefer using tar command to perform backups
smaarn May 3, 2022
e2c1ffe
Simplified web directory computing + fixed sc-memcecahed to be part o…
smaarn May 7, 2022
f142ea1
Remove verbosity on tar extraction commands
smaarn May 7, 2022
7bda705
Added explicit service port informations
smaarn May 7, 2022
1d69e5d
Fixed invalid service shortcut declaration and ui config entry to for…
smaarn May 7, 2022
e59fa97
No need to generate icons since it's actually not the same (phpMemcac…
smaarn May 7, 2022
3a62fea
Fixed resource to include service port configuration
smaarn May 7, 2022
da8abee
memcached: rework
hgy59 May 21, 2022
febf56e
framework: enhanced for custom app/config file
hgy59 May 21, 2022
fd54345
memcached: rework (2)
hgy59 May 21, 2022
fd55dcb
minor cleanup
hgy59 Jun 2, 2022
73a8a45
activate DSM 7 webservice icon
hgy59 Jun 2, 2022
b6aa2ce
add diyspk/memaslap to test and benchmark memcached server
hgy59 Jun 3, 2022
6b37ef4
memcachd: optimize code
hgy59 Jun 3, 2022
31c93be
update generic installers
hgy59 Jun 4, 2022
2dadf1c
fix phpmemcachedadmin configuration
hgy59 Jun 4, 2022
ac1ae8c
cleanup
hgy59 Jun 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cross/memcached/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = memcached
PKG_VERS = 1.4.15
PKG_VERS = 1.6.15
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = http://www.memcached.org/files
Expand All @@ -12,7 +12,7 @@ COMMENT = Free & open source, high-performance, distributed memory object cachi
LICENSE = BSD

PRE_CONFIGURE_TARGET = memcached_pre_configure
CONFIGURE_ARGS = ac_cv_c_endian=little

GNU_CONFIGURE = 1

include ../../mk/spksrc.cross-cc.mk
Expand Down
6 changes: 3 additions & 3 deletions cross/memcached/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
memcached-1.4.15.tar.gz SHA1 12ec84011f408846250a462ab9e8e967a2e8cbbc
memcached-1.4.15.tar.gz SHA256 169721ab7a7531add6ae9f6b14b6b5641725fe0b1f0bdf5c3a4327725901e2b4
memcached-1.4.15.tar.gz MD5 36ea966f5a29655be1746bf4949f7f69
memcached-1.6.15.tar.gz SHA1 badcfa0d65f5797cc9c2f957f3fbfedbd8c13411
memcached-1.6.15.tar.gz SHA256 8d7abe3d649378edbba16f42ef1d66ca3f2ac075f2eb97145ce164388e6ed515
memcached-1.6.15.tar.gz MD5 8a21ef7bc1c427e6cd88cac270394898
10 changes: 5 additions & 5 deletions cross/memcached/patches/001-remove-werror.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
--- configure.ac.orig 2012-09-03 09:35:54.000000000 +0200
+++ configure.ac 2012-12-08 00:31:35.000000000 +0100
@@ -534,12 +534,12 @@
@@ -788,12 +788,12 @@
if test "$ICC" = "yes"
then
dnl ICC trying to be gcc.
- CFLAGS="$CFLAGS -diag-disable 187 -Wall -Werror"
+ CFLAGS="$CFLAGS -diag-disable 187 -Wall"
AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
AC_DEFINE([_GNU_SOURCE],[1],[make sure IOV_MAX is defined])
elif test "$GCC" = "yes"
then
GCC_VERSION=`$CC -dumpversion`
- CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
+ CFLAGS="$CFLAGS -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
case $GCC_VERSION in
4.4.*)
CFLAGS="$CFLAGS -fno-strict-aliasing"
if test "x$enable_asan" = "xyes"; then
CFLAGS="$CFLAGS -fsanitize=address"
fi
29 changes: 17 additions & 12 deletions cross/phpmemcachedadmin/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
PKG_NAME = phpMemcachedAdmin
PKG_VERS = 1.2.2-r262
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/phpmemcacheadmin
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
PKG_DOWNLOAD_METHOD = git
PKG_GIT_HASH = aaf3d16a2a1e3dff72dd358f1758d96f0f174cb3
PKG_DIST_SITE = https://github.com/elijaa/phpmemcachedadmin.git
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-git$(PKG_GIT_HASH)

# Unfortunately only version 1.3.0 is officially released, but
# we need the commit aaf3d16 of 12 Jun 2020 for memcached 1.6.x
# Issue #19: fix mem_requested key change in Memcached 1.5.17

DEPENDS =

HOMEPAGE = https://github.com/elijaa/phpmemcachedadmin
COMMENT = Graphic stand-alone administration for memcached to monitor and debug purpose
LICENSE = Apache License 2.0
COMMENT = Graphic stand-alone administration for memcached to monitor and debug purpose.
LICENSE = Apache 2.0

EXTRACT_PATH = $(WORK_DIR)/$(PKG_DIR)
CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
EXTRACT_PATH = $(WORK_DIR)
INSTALL_TARGET = phpmemcachedadmin_install

include ../../mk/spksrc.cross-cc.mk
include ../../mk/spksrc.install-resources.mk

.PHONY: phpmemcachedadmin_install
# make a copy of the sample config as on DSM7 it is not possible to create this at installation time.
phpmemcachedadmin_install:
mkdir -p $(STAGING_INSTALL_PREFIX)/share/phpMemcachedAdmin
tar -cf - -C $(WORK_DIR)/$(PKG_DIR) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/share/phpMemcachedAdmin
@mkdir -p $(STAGING_INSTALL_PREFIX)/share/$(PKG_NAME)
@tar -cf - -C $(WORK_DIR)/$(PKG_DIR) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/share/$(PKG_NAME)
@cp -f $(STAGING_INSTALL_PREFIX)/share/$(PKG_NAME)/Config/Memcache.sample.php $(STAGING_INSTALL_PREFIX)/share/$(PKG_NAME)/Config/Memcache.php
hgy59 marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion cross/phpmemcachedadmin/PLIST
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rsc:share/phpMemcachedAdmin
rsc:share/phpMemcachedAdmin/
6 changes: 3 additions & 3 deletions cross/phpmemcachedadmin/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
phpMemcachedAdmin-1.2.2-r262.tar.gz SHA1 616d33deeb54c7bb0b894b23589afc81aa3f67f5
phpMemcachedAdmin-1.2.2-r262.tar.gz SHA256 10022211593c78b4eaaec16054843979f0b98ed72e86ee93e4fe79bf35c383e3
phpMemcachedAdmin-1.2.2-r262.tar.gz MD5 93ce23bc02f8f262d55d749d40058388
phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz SHA1 28d8c233e6e1814fd25a37a2c1f7d3ee35a94d32
phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz SHA256 1248fe1c6df610b6ea69dfba1a2774d182160a444759d3bf1b4782458d40fe00
phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz MD5 e1e846983f33fcdb480c91c365bc7cac
7 changes: 5 additions & 2 deletions mk/spksrc.service.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# conf/SPK_NAME.sc if SERVICE_PORT and DSM<7
# conf/resource if SERVICE_CERT or DSM7
# app/SPK_NAME.sc if SERVICE_PORT and DSM7
# app/config if DSM_UI_DIR
# app/config if DSM_UI_DIR (may be overwritten by DSM_UI_CONFIG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ymartin59, @publicarray some time ago we added the generation of app/config files.
For this package we do not want the generated app/config for the service but one for the included phpMemcachedAdmin web interface.

The app/config file is used with DSM < 7 only, as for DSM 7 the web UI is defined in the resources file and app/config seems to be ignored.

So a lot of packages still have a src/app/config file in the spk folder, and we will have to validate, whether those match the generated one. Matching config files could be removed and for different files we have to apply DSM_UI_CONFIG too.

#
# Targets are executed in the following order:
# service_msg_target
Expand Down Expand Up @@ -418,6 +418,9 @@ endif
DESC=$(shell echo ${DESCRIPTION} | sed -e 's/\\//g' -e 's/"/\\"/g')
$(STAGING_DIR)/$(DSM_UI_DIR)/config:
$(create_target_dir)
ifneq ($(wildcard $(DSM_UI_CONFIG)),)
cat $(DSM_UI_CONFIG) > $@
else
@echo '{}' | jq --arg name "${DISPLAY_NAME}" \
--arg desc "${DESC}" \
--arg id "com.synocommunity.packages.${SPK_NAME}" \
Expand All @@ -428,7 +431,7 @@ $(STAGING_DIR)/$(DSM_UI_DIR)/config:
--arg type "${SERVICE_TYPE}" \
--argjson allUsers ${SERVICE_PORT_ALL_USERS} \
'{".url":{($$id):{"title":$$name, "desc":$$desc, "icon":$$icon, "type":$$type, "protocol":$$prot, "port":$$port, "url":$$url, "allUsers":$$allUsers, "grantPrivilege":"all", "advanceGrantPrivilege":true}}}' > $@

endif
SERVICE_FILES += $(STAGING_DIR)/$(DSM_UI_DIR)/config
endif
endif
Expand Down
27 changes: 15 additions & 12 deletions spk/memcached/Makefile
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
SPK_NAME = memcached
SPK_VERS = 1.4.15
SPK_REV = 2
SPK_VERS = 1.6.15
SPK_REV = 3
SPK_ICON = src/memcached.png
DSM_UI_DIR = app

DEPENDS = cross/busybox cross/phpmemcachedadmin cross/$(SPK_NAME)
DEPENDS = cross/phpmemcachedadmin cross/$(SPK_NAME)

MAINTAINER = Diaoul
DESCRIPTION = 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. It comes with phpMemcachedAdmin, a graphic stand-alone administration for memcached to monitor and debug purpose.
ADMIN_URL = /phpMemcachedAdmin/
DISPLAY_NAME = Memcached
CHANGELOG = "1. Use 64-bit toolchains for bromolow, cedarview and x86"
CHANGELOG = "1. Update memcached from v1.4.13 to v1.6.15.<br/>2. Add DSM 7 compliance."

HOMEPAGE = https://memcached.org/
LICENSE =

INSTALLER_SCRIPT = src/installer.sh
SSS_SCRIPT = src/dsm-control.sh
CONF_DIR = src/conf/
CONF_DIR = src/conf

SERVICE_USER = auto
SERVICE_PORT = 11211
DSM_UI_CONFIG = src/app/config

# SERVICE_COMMAND is defined in service setup script
STARTABLE = yes
SERVICE_SETUP = src/service-setup.sh

INSTALL_DEP_SERVICES = apache-web
START_DEP_SERVICES = apache-web

INSTALL_PREFIX = /usr/local/$(SPK_NAME)

POST_STRIP_TARGET = memcached_extra_install

BUSYBOX_CONFIG = usrmng
ENV += BUSYBOX_CONFIG="$(BUSYBOX_CONFIG)"

include ../../mk/spksrc.spk.mk

.PHONY: memcached_extra_install
memcached_extra_install:
install -m 755 -d $(STAGING_DIR)/app
install -m 644 src/app/config $(STAGING_DIR)/app/config
install -m 775 $(STAGING_DIR)/share/phpMemcachedAdmin/Config/Memcache.sample.php \
$(STAGING_DIR)/share/phpMemcachedAdmin/Config/Memcache.php
3 changes: 2 additions & 1 deletion spk/memcached/src/app/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
".url" : {
"com.synocommunity.packages.memcached" : {
"title": "phpMemcachedAdmin",
"desc": "phpMemcachedAdmin",
"desc": "PHPMemcachedAdmin - memcached admin interface",
"icon": "images/memcached-{0}.png",
"protocol": "http",
"type": "url",
"url": "/phpMemcachedAdmin",
"port": "80"
Expand Down
31 changes: 0 additions & 31 deletions spk/memcached/src/conf/privilege

This file was deleted.

48 changes: 48 additions & 0 deletions spk/memcached/src/conf/resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"port-config": {
"protocol-file": "app/memcached.sc"
},
"webservice": {
"services": [{
"service": "phpMemcachedAdmin",
"display_name": "phpMemcachedAdmin",
"type": "apache_php",
"root": "phpMemcachedAdmin",
"backend": 2,
"php": {
"profile_name": "php-memcached-admin",
"profile_desc": "PHP profile used by phpMemcachedAdmin",
"backend": 6,
"extensions": [
"gd",
"intl",
"zip"
],
"user": "sc-memcached",
"group": "http"
}
}],
"portals": [
{
"service": "phpMemcachedAdmin",
"type": "alias",
"name": "PHP Memcached Admin",
"alias": "phpMemcachedAdmin",
"app": "com.synocommunity.packages.memcached"
}
],
"migrate": {
"root": [{
"old": "phpMemcachedAdmin",
"new": "phpMemcachedAdmin"
}]
},
"pkg_dir_prepare": [{
"source": "/var/packages/memcached/target/share/phpMemcachedAdmin",
"target": "phpMemcachedAdmin",
"mode": "0755",
"user": "sc-memcached",
"group": "http"
}]
}
}
93 changes: 0 additions & 93 deletions spk/memcached/src/dsm-control.sh

This file was deleted.

Loading