From cfebe08b381671d4915a76be71830200ce8f7db8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 22 Jul 2020 21:38:17 -0700 Subject: memcached: Upgrade to 1.6.6 Add patch to not use deprecated sigignore API Signed-off-by: Khem Raj --- .../0001-Replace-sigignore-with-signal-API.patch | 74 ++++++++++++++++++++++ .../memcached/memcached-add-hugetlbfs-check.patch | 15 ++--- .../recipes-support/memcached/memcached_1.5.20.bb | 52 --------------- .../recipes-support/memcached/memcached_1.6.6.bb | 52 +++++++++++++++ 4 files changed, 131 insertions(+), 62 deletions(-) create mode 100644 meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch delete mode 100644 meta-networking/recipes-support/memcached/memcached_1.5.20.bb create mode 100644 meta-networking/recipes-support/memcached/memcached_1.6.6.bb diff --git a/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch b/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch new file mode 100644 index 0000000000..e4aa8fda32 --- /dev/null +++ b/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch @@ -0,0 +1,74 @@ +From b9040acdba1245f8cdf5e94384830e3d04fde98a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 22 Jul 2020 21:32:14 -0700 +Subject: [PATCH] Replace sigignore with signal API + +sigignore has been deprecated in glibc 2.32+ [1] and eventually it will be +removed, therefore substitute it + +[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=02802fafcf6e11ea3f998f685035ffe568dfddeb + +Upstream-Status: Submitted [https://github.com/memcached/memcached/pull/702] + +Signed-off-by: Khem Raj +--- + configure.ac | 1 - + memcached.c | 16 ++-------------- + 2 files changed, 2 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ffc98b2..4567b30 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -630,7 +630,6 @@ AC_CHECK_FUNCS(mlockall) + AC_CHECK_FUNCS(getpagesizes) + AC_CHECK_FUNCS(sysconf) + AC_CHECK_FUNCS(memcntl) +-AC_CHECK_FUNCS(sigignore) + AC_CHECK_FUNCS(clock_gettime) + AC_CHECK_FUNCS(preadv) + AC_CHECK_FUNCS(pread) +diff --git a/memcached.c b/memcached.c +index 9cb778d..91ced9e 100644 +--- a/memcached.c ++++ b/memcached.c +@@ -8292,18 +8292,6 @@ static void sig_usrhandler(const int sig) { + stop_main_loop = GRACE_STOP; + } + +-#ifndef HAVE_SIGIGNORE +-static int sigignore(int sig) { +- struct sigaction sa = { .sa_handler = SIG_IGN, .sa_flags = 0 }; +- +- if (sigemptyset(&sa.sa_mask) == -1 || sigaction(sig, &sa, 0) == -1) { +- return -1; +- } +- return 0; +-} +-#endif +- +- + /* + * On systems that supports multiple page sizes we may reduce the + * number of TLB-misses by using the biggest available page size +@@ -9996,7 +9984,7 @@ int main (int argc, char **argv) { + /* daemonize if requested */ + /* if we want to ensure our ability to dump core, don't chdir to / */ + if (do_daemonize) { +- if (sigignore(SIGHUP) == -1) { ++ if (signal(SIGHUP, SIG_IGN) == SIG_ERR) { + perror("Failed to ignore SIGHUP"); + } + if (daemonize(maxcore, settings.verbose) == -1) { +@@ -10146,7 +10134,7 @@ int main (int argc, char **argv) { + * ignore SIGPIPE signals; we can use errno == EPIPE if we + * need that information + */ +- if (sigignore(SIGPIPE) == -1) { ++ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) { + perror("failed to ignore SIGPIPE; sigaction"); + exit(EX_OSERR); + } +-- +2.27.0 + diff --git a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch index 544b840fea..45428ed234 100644 --- a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch +++ b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch @@ -9,24 +9,19 @@ Signed-off-by: Chong Lu configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -diff --git a/configure.ac b/configure.ac -index 7f22f21..21691b9 100644 --- a/configure.ac +++ b/configure.ac -@@ -314,7 +314,12 @@ fi - dnl ---------------------------------------------------------------------------- +@@ -488,8 +488,12 @@ if test "x$enable_static" = "xyes"; then + fi - AC_SEARCH_LIBS(umem_cache_create, umem) --AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs) + dnl ---------------------------------------------------------------------------- +AC_ARG_ENABLE(hugetlbfs, + [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])]) -+ + +-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs) +if test "x$enable_hugetlbfs" = "xyes"; then + AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs) +fi AC_HEADER_STDBOOL AH_BOTTOM([#if HAVE_STDBOOL_H --- -1.8.3.4 - diff --git a/meta-networking/recipes-support/memcached/memcached_1.5.20.bb b/meta-networking/recipes-support/memcached/memcached_1.5.20.bb deleted file mode 100644 index feb4f3f14c..0000000000 --- a/meta-networking/recipes-support/memcached/memcached_1.5.20.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "A high-performance memory object caching system" -DESCRIPTION = "\ - memcached optimizes specific high-load serving applications that are designed \ - to take advantage of its versatile no-locking memory access system. Clients \ - are available in several different programming languages, to suit the needs \ - of the specific application. Traditionally this has been used in mod_perl \ - apps to avoid storing large chunks of data in Apache memory, and to share \ - this burden across several machines." -SECTION = "web" -HOMEPAGE = "http://memcached.org/" -LICENSE = "BSD-3-Clause" - -LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff" - -inherit autotools - -DEPENDS += "libevent" -RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \ - perl-module-tie-hash bash \ - " - -SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ - file://memcached-add-hugetlbfs-check.patch \ - " -SRC_URI[md5sum] = "4b64296ea0eeccdee9168c035e0488ab" -SRC_URI[sha256sum] = "cfd7b023a9cefe7ae8a67184f51d841dbbf97994ed0e8a55e31ee092320ea1e4" - -# set the same COMPATIBLE_HOST as libhugetlbfs -COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" - -python __anonymous () { - endianness = d.getVar('SITEINFO_ENDIANNESS') - if endianness == 'le': - d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=little") - else: - d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big") -} - -PACKAGECONFIG ??= "" -PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs" - -inherit update-rc.d - -INITSCRIPT_NAME = "memcached" -INITSCRIPT_PARAMS = "defaults" - -do_install_append() { - install -D -m 755 ${S}/scripts/memcached-init ${D}${sysconfdir}/init.d/memcached - mkdir -p ${D}/usr/share/memcached/scripts - install -m 755 ${S}/scripts/memcached-tool ${D}/usr/share/memcached/scripts - install -m 755 ${S}/scripts/start-memcached ${D}/usr/share/memcached/scripts -} diff --git a/meta-networking/recipes-support/memcached/memcached_1.6.6.bb b/meta-networking/recipes-support/memcached/memcached_1.6.6.bb new file mode 100644 index 0000000000..2eb24db9a8 --- /dev/null +++ b/meta-networking/recipes-support/memcached/memcached_1.6.6.bb @@ -0,0 +1,52 @@ +SUMMARY = "A high-performance memory object caching system" +DESCRIPTION = "\ + memcached optimizes specific high-load serving applications that are designed \ + to take advantage of its versatile no-locking memory access system. Clients \ + are available in several different programming languages, to suit the needs \ + of the specific application. Traditionally this has been used in mod_perl \ + apps to avoid storing large chunks of data in Apache memory, and to share \ + this burden across several machines." +SECTION = "web" +HOMEPAGE = "http://memcached.org/" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff" + +inherit autotools + +DEPENDS += "libevent" +RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \ + perl-module-tie-hash bash \ + " + +SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ + file://memcached-add-hugetlbfs-check.patch \ + file://0001-Replace-sigignore-with-signal-API.patch \ + " +SRC_URI[sha256sum] = "908f0eecfa559129c9e44edc46f02e73afe8faca355b4efc5c86d902fc3e32f7" + +# set the same COMPATIBLE_HOST as libhugetlbfs +COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" + +python __anonymous () { + endianness = d.getVar('SITEINFO_ENDIANNESS') + if endianness == 'le': + d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=little") + else: + d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big") +} + +PACKAGECONFIG ??= "" +PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs" + +inherit update-rc.d + +INITSCRIPT_NAME = "memcached" +INITSCRIPT_PARAMS = "defaults" + +do_install_append() { + install -D -m 755 ${S}/scripts/memcached-init ${D}${sysconfdir}/init.d/memcached + mkdir -p ${D}/usr/share/memcached/scripts + install -m 755 ${S}/scripts/memcached-tool ${D}/usr/share/memcached/scripts + install -m 755 ${S}/scripts/start-memcached ${D}/usr/share/memcached/scripts +} -- cgit v1.2.3-54-g00ecf