summaryrefslogtreecommitdiffstats
path: root/recipes-support
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-04-08 12:32:26 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-04-08 16:13:11 +0000
commitfd8ebe954a8497d5fddd790ab58665db62314153 (patch)
tree58d457411080e264e505a4f380721cbce1513af7 /recipes-support
parentee1443fba2f175c79a2fb37bb0d27c8eca01c405 (diff)
downloadmeta-cloud-services-fd8ebe954a8497d5fddd790ab58665db62314153.tar.gz
memcached: update and move from meta-openstack to main layer
memcached is a general-purpose caching system, not OpenStack-specific. We also: - refresh hugetlbfs patch for 1.6.41 - 1.6.x configure.ac uses pkg-config macros (AS_IF, AC_CACHE_CHECK) that require pkg.m4 from pkgconfig-native. - fix WORKDIR -> UNPACKDIR for config file Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch30
-rw-r--r--recipes-support/memcached/memcached/memcached-config.txt5
-rw-r--r--recipes-support/memcached/memcached_1.6.41.bb70
3 files changed, 105 insertions, 0 deletions
diff --git a/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
new file mode 100644
index 0000000..c7e2295
--- /dev/null
+++ b/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
@@ -0,0 +1,30 @@
1memcached: add knob to detect whether hugetlbfs are checked
2
3Add knob to detect whether hugetlbfs are checked or not.
4
5Upstream-Status: Pending
6
7Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
8[Bruce: refreshed for 1.6.41]
9Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
10---
11 configure.ac | 7 ++++++-
12 1 file changed, 6 insertions(+), 1 deletion(-)
13
14diff --git a/configure.ac b/configure.ac
15--- a/configure.ac
16+++ b/configure.ac
17@@ -560,7 +560,12 @@ fi
18
19 dnl ----------------------------------------------------------------------------
20
21-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
22+AC_ARG_ENABLE(hugetlbfs,
23+ [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])])
24+
25+if test "x$enable_hugetlbfs" = "xyes"; then
26+ AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
27+fi
28
29 AC_HEADER_STDBOOL
30 AH_BOTTOM([#if HAVE_STDBOOL_H
diff --git a/recipes-support/memcached/memcached/memcached-config.txt b/recipes-support/memcached/memcached/memcached-config.txt
new file mode 100644
index 0000000..7e6441e
--- /dev/null
+++ b/recipes-support/memcached/memcached/memcached-config.txt
@@ -0,0 +1,5 @@
1PORT="11211"
2USER="nobody"
3MAXCONN="1024"
4CACHESIZE="64"
5OPTIONS=""
diff --git a/recipes-support/memcached/memcached_1.6.41.bb b/recipes-support/memcached/memcached_1.6.41.bb
new file mode 100644
index 0000000..b030ef1
--- /dev/null
+++ b/recipes-support/memcached/memcached_1.6.41.bb
@@ -0,0 +1,70 @@
1SUMMARY = "A high-performance memory object caching system"
2DESCRIPTION = "\
3 memcached optimizes specific high-load serving applications that are designed \
4 to take advantage of its versatile no-locking memory access system. Clients \
5 are available in several different programming languages, to suit the needs \
6 of the specific application. Traditionally this has been used in mod_perl \
7 apps to avoid storing large chunks of data in Apache memory, and to share \
8 this burden across several machines."
9SECTION = "web"
10HOMEPAGE = "http://memcached.org/"
11LICENSE = "BSD-3-Clause"
12
13LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff"
14
15inherit autotools pkgconfig systemd
16
17DEPENDS += "libevent"
18RDEPENDS:${PN} += "\
19 bash \
20 perl \
21 perl-module-posix \
22 perl-module-autoloader \
23 perl-module-tie-hash \
24 "
25
26SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
27 file://memcached-add-hugetlbfs-check.patch \
28 file://memcached-config.txt \
29 "
30
31SRC_URI[md5sum] = "a9eb0848f052a5c0d18b4a314807dd5c"
32SRC_URI[sha256sum] = "e097073c156eeff9e12655b054f446d57374cfba5c132dcdbe7fac64e728286a"
33
34# set the same COMPATIBLE_HOST as libhugetlbfs
35COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux'
36
37python __anonymous () {
38 endianness = d.getVar('SITEINFO_ENDIANNESS', True)
39 if endianness == 'le':
40 d.setVar('EXTRA_OECONF', "ac_cv_c_endian=little")
41 else:
42 d.setVar('EXTRA_OECONF', "ac_cv_c_endian=big")
43}
44
45PACKAGECONFIG ??= ""
46PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs"
47
48inherit update-rc.d
49
50INITSCRIPT_NAME = "memcached"
51INITSCRIPT_PARAMS = "defaults"
52
53SYSTEMD_PACKAGES = "memcached"
54SYSTEMD_SERVICE:${PN} = "memcached.service"
55
56do_install:append() {
57 install -D -m 755 ${S}/scripts/memcached-init ${D}${sysconfdir}/init.d/memcached
58
59 mkdir -p ${D}/usr/share/memcached/scripts
60 install -m 755 ${S}/scripts/memcached-tool ${D}/usr/share/memcached/scripts
61 install -m 755 ${S}/scripts/start-memcached ${D}/usr/share/memcached/scripts
62
63 install -d ${D}/${sysconfdir}/default
64 install -m 600 ${UNPACKDIR}/memcached-config.txt ${D}/${sysconfdir}/default/memcached
65
66 install -d ${D}/${systemd_system_unitdir}
67 install -m 644 ${S}/scripts/memcached.service ${D}/${systemd_system_unitdir}/.
68 sed -e "s@^EnvironmentFile=.*@EnvironmentFile=${sysconfdir}/default/memcached@" \
69 -i ${D}/${systemd_system_unitdir}/memcached.service
70}