From da8abee6303dea48cc5595993b039c92de96efab Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 21 May 2022 11:29:57 +0200 Subject: [PATCH] memcached: rework - update memcached to v1.6.15 - aarch64 patch is not required (https://github.com/memcached/memcached/issues/743 is not an issue) - update phpMemcachedAdmin to include fix for 1.6.x - fix service user --- cross/memcached/Makefile | 2 +- cross/memcached/digests | 6 ++-- .../patches/aarch64/001-crc32-support.patch | 36 ------------------- cross/phpmemcachedadmin/Makefile | 30 +++++++++------- cross/phpmemcachedadmin/PLIST | 2 +- cross/phpmemcachedadmin/digests | 6 ++-- spk/memcached/Makefile | 18 ++++------ 7 files changed, 32 insertions(+), 68 deletions(-) delete mode 100644 cross/memcached/patches/aarch64/001-crc32-support.patch diff --git a/cross/memcached/Makefile b/cross/memcached/Makefile index 641be3608d7..023a5ea8adf 100644 --- a/cross/memcached/Makefile +++ b/cross/memcached/Makefile @@ -1,5 +1,5 @@ PKG_NAME = memcached -PKG_VERS = 1.6.9 +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 diff --git a/cross/memcached/digests b/cross/memcached/digests index 001501b91a2..ec388fbd611 100644 --- a/cross/memcached/digests +++ b/cross/memcached/digests @@ -1,3 +1,3 @@ -memcached-1.6.9.tar.gz SHA1 42ae062094fdf083cfe7b21ff377c781011c2be1 -memcached-1.6.9.tar.gz SHA256 d5a62ce377314dbffdb37c4467e7763e3abae376a16171e613cbe69956f092d1 -memcached-1.6.9.tar.gz MD5 ee802a316d7d622aaaec22382ca65004 +memcached-1.6.15.tar.gz SHA1 badcfa0d65f5797cc9c2f957f3fbfedbd8c13411 +memcached-1.6.15.tar.gz SHA256 8d7abe3d649378edbba16f42ef1d66ca3f2ac075f2eb97145ce164388e6ed515 +memcached-1.6.15.tar.gz MD5 8a21ef7bc1c427e6cd88cac270394898 diff --git a/cross/memcached/patches/aarch64/001-crc32-support.patch b/cross/memcached/patches/aarch64/001-crc32-support.patch deleted file mode 100644 index b9f0e18b1a3..00000000000 --- a/cross/memcached/patches/aarch64/001-crc32-support.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0548859b47a90fcbe5da97ed2a71e2660384cc48 Mon Sep 17 00:00:00 2001 -From: Sergey Dryabzhinsky -Date: Tue, 24 Nov 2020 22:16:56 +0300 -Subject: [PATCH] For issue #743 - Fix missing hw crc32 capability check on - arm64 for old gcc/libc - ---- - crc32c.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/crc32c.c b/crc32c.c -index 916e0e67e..d2e359826 100644 ---- crc32c.c -+++ crc32c.c -@@ -275,7 +275,7 @@ void crc32c_init(void) { - - #elif defined(__aarch64__) && defined(__linux__) - #include -- -+#if defined(HWCAP_CRC32) - static inline uint32_t crc32cx(uint32_t crc, const uint64_t data) - { - asm(".arch_extension crc\n" -@@ -336,6 +336,12 @@ void crc32c_init(void) { - if (auxv & HWCAP_CRC32) - crc32c = crc32c_hw; - } -+#else /* no hw crc32 on arm64 system supported? old compiler/libc/kernel? */ -+void crc32c_init(void) { -+ crc32c = crc32c_sw; -+} -+#endif -+ - #else /* !__x86_64__i && !__aarch64__ */ - void crc32c_init(void) { - crc32c = crc32c_sw; \ No newline at end of file diff --git a/cross/phpmemcachedadmin/Makefile b/cross/phpmemcachedadmin/Makefile index 954b4e9948f..dc359ee8a86 100644 --- a/cross/phpmemcachedadmin/Makefile +++ b/cross/phpmemcachedadmin/Makefile @@ -1,25 +1,29 @@ PKG_NAME = phpMemcachedAdmin -PKG_VERS = 1.3.0 PKG_EXT = tar.gz -PKG_DIST_NAME = $(PKG_VERS).$(PKG_EXT) -PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) -PKG_DIST_SITE = https://github.com/elijaa/phpmemcachedadmin/archive/refs/tags -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/$(PKG_NAME) - tar -cf - -C $(WORK_DIR)/$(PKG_DIR)/phpmemcachedadmin-$(PKG_VERS) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/share/$(PKG_NAME) + @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 diff --git a/cross/phpmemcachedadmin/PLIST b/cross/phpmemcachedadmin/PLIST index b713ed4cad8..61759b8f587 100644 --- a/cross/phpmemcachedadmin/PLIST +++ b/cross/phpmemcachedadmin/PLIST @@ -1 +1 @@ -rsc:share/phpMemcachedAdmin +rsc:share/phpMemcachedAdmin/ diff --git a/cross/phpmemcachedadmin/digests b/cross/phpmemcachedadmin/digests index bd735f1fd31..aae29a33749 100644 --- a/cross/phpmemcachedadmin/digests +++ b/cross/phpmemcachedadmin/digests @@ -1,3 +1,3 @@ -phpMemcachedAdmin-1.3.0.tar.gz SHA1 101fcae71834c466e51950e02bcaa6998ecbc4bc -phpMemcachedAdmin-1.3.0.tar.gz SHA256 9afae91888c991ad11a3d0433dc86720b4b08cf1320391cffb471f24bdabda2c -phpMemcachedAdmin-1.3.0.tar.gz MD5 195eb5e718be44c4e2c7b82c3dff6693 +phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz SHA1 28d8c233e6e1814fd25a37a2c1f7d3ee35a94d32 +phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz SHA256 1248fe1c6df610b6ea69dfba1a2774d182160a444759d3bf1b4782458d40fe00 +phpMemcachedAdmin-gitaaf3d16a2a1e3dff72dd358f1758d96f0f174cb3.tar.gz MD5 e1e846983f33fcdb480c91c365bc7cac diff --git a/spk/memcached/Makefile b/spk/memcached/Makefile index 3a332b1994e..640e95531b1 100644 --- a/spk/memcached/Makefile +++ b/spk/memcached/Makefile @@ -1,5 +1,5 @@ SPK_NAME = memcached -SPK_VERS = 1.6.9 +SPK_VERS = 1.6.15 SPK_REV = 3 SPK_ICON = src/memcached.png DSM_UI_DIR = app @@ -10,23 +10,19 @@ 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. Bump 1.4.13 -> 1.6.9
2. Add DSM 7 compliance" +CHANGELOG = "1. Update memcached from v1.4.13 to v1.6.15.
2. Add DSM 7 compliance." + HOMEPAGE = https://memcached.org/ LICENSE = CONF_DIR = src/conf -SPK_USER = auto -SYSTEM_GROUP = http - +SERVICE_USER = auto SERVICE_PORT = 11211 -SERVICE_PORT_TITLE = $(DISPLAY_NAME) -NO_SERVICE_SHORTCUT = yes -SERVICE_SETUP = src/service-setup.sh -# This is a bogus value to ensure that everything is tailored for a SERVICE_COMMAND -# The real value is defined by the setup file -SERVICE_COMMAND = memcached +# 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