aboutsummaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/monkey
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/monkey')
-rw-r--r--meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch29
-rw-r--r--meta-webserver/recipes-httpd/monkey/files/0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch30
-rw-r--r--meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb39
3 files changed, 56 insertions, 42 deletions
diff --git a/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch b/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch
deleted file mode 100644
index 7a229513b6..0000000000
--- a/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From b0526a9b5325bd4758dad8d14efd85c98ef2ebff Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 14 Jul 2017 18:25:23 -0700
-Subject: [PATCH] configure: Respect LIBS variable from env
-
-For musl we need to pass -lexecinfo from env
-this change accomodates that
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index 4286c34..f1c65db 100755
---- a/configure
-+++ b/configure
-@@ -620,7 +620,7 @@ LIBDEFS = -DSHAREDLIB -fPIC \$(DEFS)
- INCDIR = ./include
- LDFLAGS = $LDFLAGS
- DESTDIR = ../bin/monkey
--LIBS = -ldl $libs
-+LIBS = -ldl $libs ${LIBS}
- OBJ = monkey.o mk_method.o mk_mimetype.o mk_vhost.o mk_request.o \\
- mk_header.o mk_config.o mk_signals.o \\
- mk_user.o mk_utils.o mk_epoll.o mk_scheduler.o \\
---
-2.13.3
-
diff --git a/meta-webserver/recipes-httpd/monkey/files/0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch b/meta-webserver/recipes-httpd/monkey/files/0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch
new file mode 100644
index 0000000000..f4bab49aa7
--- /dev/null
+++ b/meta-webserver/recipes-httpd/monkey/files/0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch
@@ -0,0 +1,30 @@
+From 7f724bbafbb1e170401dd5de201273ab8c8bc75f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 28 Aug 2022 14:24:02 -0700
+Subject: [PATCH] fastcgi: Use value instead of address of sin6_port
+
+This seems to be wrongly assigned where ipv4 sin_port is
+equated to address of sin6_port and not value of sin6_port
+
+Upstream-Status: Submitted [https://github.com/monkey/monkey/pull/375]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/fastcgi/fcgi_handler.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/fastcgi/fcgi_handler.c b/plugins/fastcgi/fcgi_handler.c
+index 9e095e3c..e8e1eec1 100644
+--- a/plugins/fastcgi/fcgi_handler.c
++++ b/plugins/fastcgi/fcgi_handler.c
+@@ -245,7 +245,7 @@ static inline int fcgi_add_param_net(struct fcgi_handler *handler)
+ struct sockaddr_in *s4 = (struct sockaddr_in *)&addr4;
+ memset(&addr4, 0, sizeof(addr4));
+ addr4.sin_family = AF_INET;
+- addr4.sin_port = &s->sin6_port;
++ addr4.sin_port = s->sin6_port;
+ memcpy(&addr4.sin_addr.s_addr,
+ s->sin6_addr.s6_addr + 12,
+ sizeof(addr4.sin_addr.s_addr));
+--
+2.37.2
+
diff --git a/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb b/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb
index 698f8608fd..ee5dc16198 100644
--- a/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb
+++ b/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb
@@ -7,17 +7,19 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
SECTION = "net"
-SRC_URI = "http://monkey-project.com/releases/1.6/monkey-${PV}.tar.gz \
+SRC_URI = "git://github.com/monkey/monkey;branch=1.6;protocol=https \
+ file://0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch \
file://monkey.service \
file://monkey.init"
-SRC_URI[sha256sum] = "f1122e89cda627123286542b0a18fcaa131cbe9d4f5dd897d9455157289148fb"
+SRCREV = "7999b487fded645381d387ec0e057e92407b0d2c"
+S = "${WORKDIR}/git"
UPSTREAM_CHECK_URI = "https://github.com/monkey/monkey/releases"
UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz"
EXTRA_OECMAKE = "-DINSTALL_LOGDIR=${localstatedir}/log/monkey/ \
- -DPID_FILE=${localstatedir}/run/monkey.pid \
+ -DPID_FILE=/run/monkey.pid \
-DINSTALL_SYSCONFDIR=${sysconfdir}/monkey/ \
-DWITH_PLUGINS=* \
-DWITHOUT_PLUGINS=mbedtls \
@@ -26,7 +28,7 @@ EXTRA_OECMAKE = "-DINSTALL_LOGDIR=${localstatedir}/log/monkey/ \
-DWITH_SYSTEM_MALLOC=1 \
"
-EXTRA_OECMAKE_append_libc-musl = " -DWITH_MUSL=1 "
+EXTRA_OECMAKE:append:libc-musl = " -DWITH_MUSL=1 "
# GCC-10+ defaults to -fno-common
CFLAGS += "-fcommon"
@@ -37,11 +39,23 @@ inherit cmake pkgconfig update-rc.d systemd
OECMAKE_GENERATOR = "Unix Makefiles"
-do_install_append() {
- rm -rf ${D}/run
- rm -rf ${D}${localstatedir}/run
- install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey
+do_configure:append() {
+ sed -i -e 's|${STAGING_BINDIR_TOOLCHAIN}/||g' ${S}/include/monkey/mk_env.h
+}
+do_install:append() {
+ rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/run ${D}${localstatedir}/log
+ rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
+ install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey
+ # Create /var/log/monkey in runtime.
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
+ install -d ${D}${nonarch_libdir}/tmpfiles.d
+ echo "d ${localstatedir}/log/${BPN} 0755 ${BPN} ${BPN} -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
+ fi
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
+ install -d ${D}${sysconfdir}/default/volatiles
+ echo "d ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
+ fi
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -Dm 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service
fi
@@ -50,16 +64,15 @@ do_install_append() {
INITSCRIPT_NAME = "monkey"
INITSCRIPT_PARAMS = "defaults 70"
-SYSTEMD_SERVICE_${PN} = "monkey.service"
+SYSTEMD_SERVICE:${PN} = "monkey.service"
PACKAGES += "${PN}-plugins"
-FILES_${PN}-plugins = "${libdir}/monkey-*.so"
-
-FILES_${PN} += "${localstatedir}/www/monkey/ /run"
+FILES:${PN}-plugins = "${libdir}/monkey-*.so"
+FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
-CONFFILES_${PN} = "${sysconfdir}/monkey/monkey.conf \
+CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \
${sysconfdir}/monkey/sites/default \
${sysconfdir}/monkey/monkey.mime \
${sysconfdir}/monkey/plugins.load \