summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lighttpd
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/lighttpd')
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch42
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch387
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch38
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/lighttpd2
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/lighttpd.service12
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch33
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb77
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.60.bb83
8 files changed, 164 insertions, 510 deletions
diff --git a/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch b/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
new file mode 100644
index 0000000000..f17bdce2c0
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
@@ -0,0 +1,42 @@
+From 22afc5d9aaa215c3c87ba21c77d47da44ab3b113 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 26 Aug 2016 18:20:32 +0300
+Subject: [PATCH] Use pkg-config for pcre dependency instead of -config script.
+
+RP 2014/5/22
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5383cec..c29a902 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -651,10 +651,18 @@ AC_ARG_WITH([pcre],
+ )
+ AC_MSG_RESULT([$WITH_PCRE])
+
+-if test "$WITH_PCRE" != no; then
+- if test "$WITH_PCRE" != yes; then
+- PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
+- CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
++if test "$WITH_PCRE" != "no"; then
++ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
++ PCRE_LIB=${PCREPKG_LIBS}
++ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
++ ], [
++ AC_MSG_ERROR([pcre pkgconfig not found, install the pcre-devel package or build with --without-pcre])
++ ])
++
++ if test x"$PCRE_LIB" != x; then
++ AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
++ AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
++ AC_SUBST(PCRE_LIB)
+ else
+ AC_PATH_PROG([PCRECONFIG], [pcre-config])
+ if test -n "$PCRECONFIG"; then
+--
+2.15.0
+
diff --git a/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch b/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch
deleted file mode 100644
index a9df1744a7..0000000000
--- a/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch
+++ /dev/null
@@ -1,387 +0,0 @@
-From e6ccbab5d42b110ac4f6ce1f72cb1e9ccbe4400a Mon Sep 17 00:00:00 2001
-From: Li xin <lixin.fnst@cn.fujitsu.com>
-Date: Tue, 16 Jun 2015 19:02:38 +0900
-Subject: [PATCH] mod_cgi buffers data without bound so fix it
-
-Upstream-Status: Submitted [http://redmine.lighttpd.net/issues/1264]
-
-Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
-
-Update context for 1.4.36.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- doc/config/lighttpd.conf | 8 ++
- src/mod_cgi.c | 188 ++++++++++++++++++++++++++++++++++++++++++++---
- 2 files changed, 187 insertions(+), 9 deletions(-)
-
-diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf
-index 60b0ae1..9c101a7 100644
---- a/doc/config/lighttpd.conf
-+++ b/doc/config/lighttpd.conf
-@@ -375,6 +375,14 @@ server.upload-dirs = ( "/var/tmp" )
- ##
- #######################################################################
-
-+#######################################################################
-+##
-+##
-+## maximum bytes in send_raw before backing off [KByte]
-+## cgi.high-waterlevel = 10240
-+## minimum bytes in send_raw to disable backoff [KByte]
-+## cgi.low-waterlevel = 5120
-+#######################################################################
-
- #######################################################################
- ##
-diff --git a/src/mod_cgi.c b/src/mod_cgi.c
-index 01b1877..7c67eb5 100644
---- a/src/mod_cgi.c
-+++ b/src/mod_cgi.c
-@@ -38,6 +38,10 @@
-
- #include "version.h"
-
-+/* for output logs */
-+char msgbuf[2048];
-+
-+
- enum {EOL_UNSET, EOL_N, EOL_RN};
-
- typedef struct {
-@@ -53,9 +57,19 @@ typedef struct {
- size_t size;
- } buffer_pid_t;
-
-+struct handler_ctx;
-+
-+typedef struct {
-+ struct handler_ctx **hctx;
-+ size_t used;
-+ size_t size;
-+} buffer_ctx_t;
-+
- typedef struct {
- array *cgi;
- unsigned short execute_x_only;
-+ unsigned int high_waterlevel; /* maximum bytes in send_raw before backing off */
-+ unsigned int low_waterlevel; /* minimum bytes in send_raw to disable backoff */
- } plugin_config;
-
- typedef struct {
-@@ -68,9 +82,11 @@ typedef struct {
- plugin_config **config_storage;
-
- plugin_config conf;
-+
-+ buffer_ctx_t cgi_ctx;
- } plugin_data;
-
--typedef struct {
-+typedef struct handler_ctx {
- pid_t pid;
- int fd;
- int fde_ndx; /* index into the fd-event buffer */
-@@ -78,11 +94,16 @@ typedef struct {
- connection *remote_conn; /* dumb pointer */
- plugin_data *plugin_data; /* dumb pointer */
-
-+ int throttling; /* 1=waiting for send_raw buffer to drain */
-+ off_t high_waterlevel; /* maximum bytes in send_raw before backing off */
-+ off_t low_waterlevel; /* minimum bytes in send_raw to disable backoff */
-+ off_t bytes_in_buffer;
-+
- buffer *response;
- buffer *response_header;
- } handler_ctx;
-
--static handler_ctx * cgi_handler_ctx_init(void) {
-+static handler_ctx * cgi_handler_ctx_init(plugin_data *p) {
- handler_ctx *hctx = calloc(1, sizeof(*hctx));
-
- force_assert(hctx);
-@@ -90,13 +111,26 @@ static handler_ctx * cgi_handler_ctx_init(void) {
- hctx->response = buffer_init();
- hctx->response_header = buffer_init();
-
-+ hctx->throttling = 0;
-+ hctx->high_waterlevel = (off_t)p->conf.high_waterlevel * 1024;
-+ hctx->low_waterlevel = (off_t)p->conf.low_waterlevel * 1024;
-+ if (hctx->low_waterlevel >= hctx->high_waterlevel) {
-+ hctx->low_waterlevel = hctx->high_waterlevel * 3 / 4; /* 75% */
-+ }
-+ hctx->bytes_in_buffer = 0;
-+
- return hctx;
- }
-
--static void cgi_handler_ctx_free(handler_ctx *hctx) {
-+static void cgi_handler_ctx_free(server *srv, handler_ctx *hctx) {
- buffer_free(hctx->response);
- buffer_free(hctx->response_header);
-
-+ /* to avoid confusion */
-+ if (hctx->throttling) {
-+ log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled");
-+ }
-+
- free(hctx);
- }
-
-@@ -154,6 +188,8 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
- config_values_t cv[] = {
- { "cgi.assign", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION }, /* 0 */
- { "cgi.execute-x-only", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 1 */
-+ { "cgi.high-waterlevel", NULL, T_CONFIG_INT, T_CONFIG_SCOPE_CONNECTION }, /* 2 */
-+ { "cgi.low-waterlevel", NULL, T_CONFIG_INT, T_CONFIG_SCOPE_CONNECTION }, /* 3 */
- { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET}
- };
-
-@@ -169,9 +205,13 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
-
- s->cgi = array_init();
- s->execute_x_only = 0;
-+ s->high_waterlevel = 0; /* 0 == disabled */
-+ s->low_waterlevel = 0;
-
- cv[0].destination = s->cgi;
- cv[1].destination = &(s->execute_x_only);
-+ cv[2].destination = &(s->high_waterlevel);
-+ cv[3].destination = &(s->low_waterlevel);
-
- p->config_storage[i] = s;
-
-@@ -184,6 +224,51 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
- }
-
-
-+static void cgi_recount_bytes_in_buffer(handler_ctx *hctx)
-+{
-+ chunkqueue *cq = hctx->remote_conn->write_queue;
-+ hctx->bytes_in_buffer = chunkqueue_length(cq) - chunkqueue_written(cq);
-+}
-+
-+
-+static void cgi_throttling_control(server *srv, handler_ctx *hctx)
-+{
-+ cgi_recount_bytes_in_buffer(hctx);
-+
-+#ifdef DEBUG
-+ sprintf(msgbuf, "throttling=%d, chars=%llu, high=%llu, low=%llu",
-+ hctx->throttling, hctx->bytes_in_buffer,
-+ hctx->high_waterlevel, hctx->low_waterlevel);
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "(debug) throttling control,", msgbuf);
-+#endif
-+
-+ if (hctx->throttling) {
-+ sprintf(msgbuf, "throttling; chars in queue=%llu,"
-+ " low-waterlevel=%llu, high-waterlevel=%llu",
-+ hctx->bytes_in_buffer,
-+ hctx->low_waterlevel, hctx->high_waterlevel);
-+ log_error_write(srv, __FILE__, __LINE__, "s", msgbuf);
-+ if (hctx->bytes_in_buffer <= hctx->low_waterlevel) {
-+ fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);
-+ hctx->throttling = 0;
-+ log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled");
-+ }
-+ } else {
-+ if (hctx->high_waterlevel != 0 &&
-+ hctx->high_waterlevel <= hctx->bytes_in_buffer) {
-+ fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd);
-+ hctx->throttling = 1;
-+ sprintf(msgbuf, "throttled; chars in queue=%llu,"
-+ " low-waterlevel=%llu, high-waterlevel=%llu",
-+ hctx->bytes_in_buffer,
-+ hctx->low_waterlevel, hctx->high_waterlevel);
-+ log_error_write(srv, __FILE__, __LINE__, "s", msgbuf);
-+ }
-+ }
-+}
-+
-+
- static int cgi_pid_add(server *srv, plugin_data *p, pid_t pid) {
- int m = -1;
- size_t i;
-@@ -230,6 +315,39 @@ static int cgi_pid_del(server *srv, plugin_data *p, pid_t pid) {
- return 0;
- }
-
-+
-+static void cgi_ctx_add(plugin_data *p, handler_ctx *hctx) {
-+ buffer_ctx_t *r = &(p->cgi_ctx);
-+
-+ if (r->size == 0) {
-+ r->size = 16;
-+ r->hctx = malloc(sizeof(*r->hctx) * r->size);
-+ } else if (r->used == r->size) {
-+ r->size += 16;
-+ r->hctx = realloc(r->hctx, sizeof(*r->hctx) * r->size);
-+ }
-+
-+ r->hctx[r->used++] = hctx;
-+}
-+
-+static void cgi_ctx_del(plugin_data *p, handler_ctx *hctx) {
-+ size_t i;
-+ buffer_ctx_t *r = &(p->cgi_ctx);
-+
-+ for (i = 0; i < r->used; i++) {
-+ if (r->hctx[i] == hctx) break;
-+ }
-+
-+ if (i != r->used) {
-+ /* found */
-+
-+ if (i != r->used - 1) {
-+ r->hctx[i] = r->hctx[r->used - 1];
-+ }
-+ r->used--;
-+ }
-+}
-+
- static int cgi_response_parse(server *srv, connection *con, plugin_data *p, buffer *in) {
- char *ns;
- const char *s;
-@@ -380,6 +498,14 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) {
-
- buffer_commit(hctx->response, n);
-
-+#ifdef DEBUG
-+ sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu", n,
-+ (unsigned long long)con->write_queue->bytes_out,
-+ (unsigned long long)con->write_queue->bytes_in);
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "(debug) read,", msgbuf);
-+#endif
-+
- /* split header from body */
-
- if (con->file_started == 0) {
-@@ -503,7 +629,20 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) {
- }
- } else {
- http_chunk_append_buffer(srv, con, hctx->response);
-+#ifdef DEBUG
-+ sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu, limit=%llu", n,
-+ (unsigned long long)con->write_queue->bytes_out,
-+ (unsigned long long)con->write_queue->bytes_in,
-+ (unsigned long long)hctx->high_waterlevel);
-+ log_error_write(srv, __FILE__, __LINE__,
-+ "ss", "(debug) append,", msgbuf);
-+#endif
- joblist_append(srv, con);
-+
-+ cgi_throttling_control(srv, hctx);
-+ if (hctx->throttling) {
-+ return FDEVENT_HANDLED_NOT_FINISHED;
-+ }
- }
-
- #if 0
-@@ -553,8 +692,9 @@ static handler_t cgi_connection_close(server *srv, handler_ctx *hctx) {
- con->plugin_ctx[p->id] = NULL;
-
- /* is this a good idea ? */
-- cgi_handler_ctx_free(hctx);
--
-+ cgi_ctx_del(p, hctx);
-+ cgi_handler_ctx_free(srv, hctx);
-+
- /* if waitpid hasn't been called by response.c yet, do it here */
- if (pid) {
- /* check if the CGI-script is already gone */
-@@ -1105,7 +1245,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
- con->mode = p->id;
- buffer_reset(con->physical.path);
-
-- hctx = cgi_handler_ctx_init();
-+ hctx = cgi_handler_ctx_init(p);
-+ cgi_ctx_add(p, hctx);
-
- hctx->remote_conn = con;
- hctx->plugin_data = p;
-@@ -1114,6 +1255,11 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
- hctx->fde_ndx = -1;
-
- con->plugin_ctx[p->id] = hctx;
-+#ifdef DEBUG
-+ sprintf(msgbuf, "hctx=%p, con=%p", (void*)hctx, (void*)con);
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "(debug) hctx generated, ", msgbuf);
-+#endif
-
- fdevent_register(srv->ev, hctx->fd, cgi_handle_fdevent, hctx);
- fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);
-@@ -1128,7 +1274,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
-
- close(hctx->fd);
-
-- cgi_handler_ctx_free(hctx);
-+ cgi_ctx_del(p, hctx);
-+ cgi_handler_ctx_free(srv, hctx);
-
- con->plugin_ctx[p->id] = NULL;
-
-@@ -1153,6 +1300,8 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
-
- PATCH(cgi);
- PATCH(execute_x_only);
-+ PATCH(high_waterlevel);
-+ PATCH(low_waterlevel);
-
- /* skip the first, the global context */
- for (i = 1; i < srv->config_context->used; i++) {
-@@ -1170,6 +1319,10 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
- PATCH(cgi);
- } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.execute-x-only"))) {
- PATCH(execute_x_only);
-+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.high-waterlevel"))) {
-+ PATCH(high_waterlevel);
-+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.low-waterlevel"))) {
-+ PATCH(low_waterlevel);
- }
- }
- }
-@@ -1222,6 +1375,21 @@ URIHANDLER_FUNC(cgi_is_handled) {
- TRIGGER_FUNC(cgi_trigger) {
- plugin_data *p = p_d;
- size_t ndx;
-+
-+ for (ndx = 0; ndx < p->cgi_ctx.used; ndx++) {
-+ handler_ctx *hctx = p->cgi_ctx.hctx[ndx];
-+#ifdef DEBUG
-+ connection *con = hctx->remote_conn;
-+
-+ sprintf(msgbuf, "hctx=%p, con=%p, bytes_in_buffer=%llu",
-+ (void*)hctx, (void*)con,
-+ (unsigned long long)hctx->bytes_in_buffer);
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "(debug) found using ctx,", msgbuf);
-+#endif
-+ cgi_throttling_control(srv, hctx);
-+ }
-+
- /* the trigger handle only cares about lonely PID which we have to wait for */
- #ifndef __WIN32
-
-@@ -1330,7 +1498,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
- log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno));
- }
-
-- cgi_handler_ctx_free(hctx);
-+ cgi_ctx_del(p, hctx);
-+ cgi_handler_ctx_free(srv, hctx);
-
- con->plugin_ctx[p->id] = NULL;
-
-@@ -1362,7 +1531,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
- log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno));
- }
-
-- cgi_handler_ctx_free(hctx);
-+ cgi_ctx_del(p, hctx);
-+ cgi_handler_ctx_free(srv, hctx);
-
- con->plugin_ctx[p->id] = NULL;
- return HANDLER_FINISHED;
diff --git a/meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch b/meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch
new file mode 100644
index 0000000000..2a9bb352b5
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch
@@ -0,0 +1,38 @@
+From c1466f3620f608e4def4b8853c4e2bc6d9a19646 Mon Sep 17 00:00:00 2001
+From: Glenn Strauss <gstrauss@gluelogic.com>
+Date: Mon, 4 Oct 2021 09:51:22 -0400
+Subject: [PATCH] define __BEGIN_DECLS, __END_DECLS if needed
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/first.h | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/src/first.h b/src/first.h
+index df747ba..9d0428a 100644
+--- a/src/first.h
++++ b/src/first.h
+@@ -39,6 +39,22 @@
+ #include <sys/types.h>
+ #include <stddef.h>
+
++#ifndef __BEGIN_DECLS
++#ifdef __cplusplus
++#define __BEGIN_DECLS extern "C" {
++#else
++#define __BEGIN_DECLS
++#endif
++#endif
++
++#ifndef __END_DECLS
++#ifdef __cplusplus
++#define __END_DECLS }
++#else
++#define __END_DECLS
++#endif
++#endif
++
+ #if defined HAVE_STDINT_H
+ # include <stdint.h>
+ #elif defined HAVE_INTTYPES_H
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
index bf89a60b7d..82fbaa523b 100644
--- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
@@ -4,7 +4,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/lighttpd
NAME=lighttpd
DESC="Lighttpd Web Server"
-OPTS="-f /etc/lighttpd.conf"
+OPTS="-f /etc/lighttpd/lighttpd.conf"
case "$1" in
start)
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service
deleted file mode 100644
index 66a907aa17..0000000000
--- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Lightning Fast Webserver With Light System Requirements
-After=network.target
-
-[Service]
-ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf
-ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf
-ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch b/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch
deleted file mode 100644
index e395f928ce..0000000000
--- a/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Use pkg-config for pcre dependency instead of -config script.
-
-Upstream-Status: Pending
-
-RP 2014/5/22
-
-
-Index: lighttpd-1.4.35/configure.ac
-===================================================================
---- lighttpd-1.4.35.orig/configure.ac 2014-03-06 14:08:00.000000000 +0000
-+++ lighttpd-1.4.35/configure.ac 2014-05-13 16:58:30.758471169 +0000
-@@ -309,16 +309,14 @@
- AC_MSG_RESULT([$WITH_PCRE])
-
- if test "$WITH_PCRE" != "no"; then
-- AC_PATH_PROG(PCRECONFIG, pcre-config)
--
-- if test x"$PCRECONFIG" != x; then
-- PCRE_LIB=`$PCRECONFIG --libs`
-- CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
-+ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
-+ PCRE_LIB=${PCREPKG_LIBS}
-+ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
- AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
- AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
-- else
-+ ], [
- AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre])
-- fi
-+ ])
- fi
-
- AC_SUBST(PCRE_LIB)
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb
deleted file mode 100644
index 67b6e3749b..0000000000
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-SUMMARY = "Lightweight high-performance web server"
-HOMEPAGE = "http://www.lighttpd.net/"
-BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
-
-SECTION = "net"
-DEPENDS = "zlib libpcre"
-RDEPENDS_${PN} += " \
- lighttpd-module-access \
- lighttpd-module-accesslog \
- lighttpd-module-indexfile \
- lighttpd-module-dirlisting \
- lighttpd-module-staticfile \
-"
-
-SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
- file://index.html.lighttpd \
- file://lighttpd.conf \
- file://lighttpd \
- file://lighttpd.service \
- file://pkgconfig.patch \
- file://0001-mod_cgi-buffers-data-without-bound.patch \
- "
-
-SRC_URI[md5sum] = "1843daffcb018aa528f6d15d43544654"
-SRC_URI[sha256sum] = "897ab6b1cc7bd51671f8af759e7846245fbbca0685c30017e93a5882a9ac1a53"
-
-PACKAGECONFIG ??= "openssl"
-PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
-
-EXTRA_OECONF = " \
- --without-bzip2 \
- --without-ldap \
- --without-lua \
- --without-memcache \
- --with-pcre \
- --without-webdav-props \
- --without-webdav-locks \
- --disable-static \
-"
-
-inherit autotools pkgconfig update-rc.d gettext systemd
-
-INITSCRIPT_NAME = "lighttpd"
-INITSCRIPT_PARAMS = "defaults 70"
-
-SYSTEMD_SERVICE_${PN} = "lighttpd.service"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
- install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
- install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
-
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BASE_BINDIR@,${base_bindir},g' \
- ${D}${systemd_unitdir}/system/lighttpd.service
- #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
- ln -sf ${localstatedir}/log ${D}/www/logs
- ln -sf ${localstatedir}/tmp ${D}/www/var
-}
-
-FILES_${PN} += "${sysconfdir} /www"
-
-CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
-
-PACKAGES_DYNAMIC += "^lighttpd-module-.*"
-
-python populate_packages_prepend () {
- lighttpd_libdir = d.expand('${libdir}')
- do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
-}
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.60.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.60.bb
new file mode 100644
index 0000000000..dca8934ad2
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.60.bb
@@ -0,0 +1,83 @@
+SUMMARY = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/"
+DESCRIPTION = "Lightweight high-performance web server is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more)"
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
+
+SECTION = "net"
+RDEPENDS:${PN} = "lighttpd-module-dirlisting \
+ lighttpd-module-indexfile \
+ lighttpd-module-staticfile"
+RRECOMMENDS:${PN} = "lighttpd-module-access \
+ lighttpd-module-accesslog"
+
+SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
+ file://index.html.lighttpd \
+ file://lighttpd.conf \
+ file://lighttpd \
+ file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
+ file://0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch \
+ "
+
+SRC_URI[sha256sum] = "4bb1dd859e541a3131e5be101557d2e1195b4129d3a849a3a6fbd21fe1c946f0"
+
+DEPENDS = "virtual/crypt"
+
+PACKAGECONFIG ??= "openssl pcre zlib \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
+"
+
+PACKAGECONFIG[libev] = "-Dwith_libev=true,-Dwith_libev=false,libev"
+PACKAGECONFIG[mysql] = "-Dwith_mysql=true,-Dwith_mysql=false,mariadb"
+PACKAGECONFIG[ldap] = "-Dwith_ldap=true,-Dwith_ldap=false,openldap"
+PACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr"
+PACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl"
+PACKAGECONFIG[krb5] = "-Dwith_krb5=true,-Dwith_krb5=false,krb5"
+PACKAGECONFIG[pcre] = "-Dwith_pcre=true,-Dwith_pcre=false,libpcre"
+PACKAGECONFIG[zlib] = "-Dwith_zlib=true,-Dwith_zlib=false,zlib"
+PACKAGECONFIG[bzip2] = "-Dwith_bzip=true,-Dwith_bzip=false,bzip2"
+PACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=true,-Dwith_webdav_props=false,libxml2 sqlite3"
+PACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=true,-Dwith_webdav_locks=false,util-linux"
+PACKAGECONFIG[gdbm] = "-Dwith_gdbm=true,-Dwith_gdbm=false,gdbm"
+PACKAGECONFIG[memcache] = "-Dwith_memcached=true,-Dwith_memcached=false,libmemcached"
+PACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua"
+PACKAGECONFIG[zstd] = "-Dwith_zstd=true,-Dwith_zstd=false,zstd"
+
+inherit meson pkgconfig update-rc.d gettext systemd
+
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
+
+SYSTEMD_SERVICE:${PN} = "lighttpd.service"
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
+ install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+ install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd
+ install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_system_unitdir}
+ sed -i -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ ${D}${systemd_system_unitdir}/lighttpd.service
+ #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
+ ln -sf ${localstatedir}/log ${D}/www/logs
+ ln -sf ${localstatedir}/tmp ${D}/www/var
+}
+
+# bitbake.conf sets ${libdir}/${BPN}/* in FILES, which messes up the module split.
+# So we re-do the variable.
+FILES:${PN} = "${sysconfdir} /www ${sbindir}"
+
+CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
+
+PACKAGES_DYNAMIC += "^lighttpd-module-.*"
+
+python populate_packages:prepend () {
+ lighttpd_libdir = d.expand('${prefix}/lib/lighttpd')
+ do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}