diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-08 12:32:26 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-08 16:13:11 +0000 |
| commit | fd8ebe954a8497d5fddd790ab58665db62314153 (patch) | |
| tree | 58d457411080e264e505a4f380721cbce1513af7 /recipes-support | |
| parent | ee1443fba2f175c79a2fb37bb0d27c8eca01c405 (diff) | |
| download | meta-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')
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 @@ | |||
| 1 | memcached: add knob to detect whether hugetlbfs are checked | ||
| 2 | |||
| 3 | Add knob to detect whether hugetlbfs are checked or not. | ||
| 4 | |||
| 5 | Upstream-Status: Pending | ||
| 6 | |||
| 7 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
| 8 | [Bruce: refreshed for 1.6.41] | ||
| 9 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 10 | --- | ||
| 11 | configure.ac | 7 ++++++- | ||
| 12 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --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 @@ | |||
| 1 | PORT="11211" | ||
| 2 | USER="nobody" | ||
| 3 | MAXCONN="1024" | ||
| 4 | CACHESIZE="64" | ||
| 5 | OPTIONS="" | ||
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 @@ | |||
| 1 | SUMMARY = "A high-performance memory object caching system" | ||
| 2 | DESCRIPTION = "\ | ||
| 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." | ||
| 9 | SECTION = "web" | ||
| 10 | HOMEPAGE = "http://memcached.org/" | ||
| 11 | LICENSE = "BSD-3-Clause" | ||
| 12 | |||
| 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff" | ||
| 14 | |||
| 15 | inherit autotools pkgconfig systemd | ||
| 16 | |||
| 17 | DEPENDS += "libevent" | ||
| 18 | RDEPENDS:${PN} += "\ | ||
| 19 | bash \ | ||
| 20 | perl \ | ||
| 21 | perl-module-posix \ | ||
| 22 | perl-module-autoloader \ | ||
| 23 | perl-module-tie-hash \ | ||
| 24 | " | ||
| 25 | |||
| 26 | SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ | ||
| 27 | file://memcached-add-hugetlbfs-check.patch \ | ||
| 28 | file://memcached-config.txt \ | ||
| 29 | " | ||
| 30 | |||
| 31 | SRC_URI[md5sum] = "a9eb0848f052a5c0d18b4a314807dd5c" | ||
| 32 | SRC_URI[sha256sum] = "e097073c156eeff9e12655b054f446d57374cfba5c132dcdbe7fac64e728286a" | ||
| 33 | |||
| 34 | # set the same COMPATIBLE_HOST as libhugetlbfs | ||
| 35 | COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux' | ||
| 36 | |||
| 37 | python __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 | |||
| 45 | PACKAGECONFIG ??= "" | ||
| 46 | PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs" | ||
| 47 | |||
| 48 | inherit update-rc.d | ||
| 49 | |||
| 50 | INITSCRIPT_NAME = "memcached" | ||
| 51 | INITSCRIPT_PARAMS = "defaults" | ||
| 52 | |||
| 53 | SYSTEMD_PACKAGES = "memcached" | ||
| 54 | SYSTEMD_SERVICE:${PN} = "memcached.service" | ||
| 55 | |||
| 56 | do_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 | } | ||
