ports: update lighttpd to 1.4.73

genodelabs/genode#5093
This commit is contained in:
Josef Söntgen 2023-11-30 19:26:14 +00:00 committed by Christian Helmuth
parent b19d8a50d5
commit ac790cd6fb
6 changed files with 91 additions and 55 deletions

View File

@ -1 +1 @@
0665eee22a27970bb977c93abdea7e89d3011a1d
38aa0f93ad7cf9e5c35da09ff2a7f3adbd6e7b5f

View File

@ -1,5 +0,0 @@
LIGHTTPD_MAIN := 1
LIGHTTPD_MAJOR := 4
LIGHTTPD_MINOR := 52
LIGHTTPD_VERSION := $(LIGHTTPD_MAIN).$(LIGHTTPD_MAJOR).$(LIGHTTPD_MINOR)
LIGHTTPD := lighttpd-$(LIGHTTPD_VERSION)

View File

@ -1,9 +1,9 @@
LICENSE := BSD
VERSION := 1.4.52
VERSION := 1.4.73
DOWNLOADS := lighttpd.archive
URL(lighttpd) := http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-$(VERSION).tar.gz
SHA(lighttpd) := 0f9de0227681c078f6b8c6154b581ced5fe7bcb5ff428ccf292581764b771145
SHA(lighttpd) := 816cbec71e8d02d874f1d5c798d76d091a76d5acbeb6e017ba76aeb4263d6995
DIR(lighttpd) := src/app/lighttpd
PATCHES := $(addprefix src/app/lighttpd/,fd_cloexec.patch stat_cache.c.patch)
PATCHES := $(addprefix src/app/lighttpd/,fd_cloexec.patch)

View File

@ -1,5 +1,6 @@
--- src/app/lighttpd/src/fdevent.c
+++ src/app/lighttpd/src/fdevent.c
@@ -453,7 +453,7 @@ void * fdevent_get_context(fdevents *ev, int fd) {
@@ -51,7 +51,7 @@
}
void fdevent_setfd_cloexec(int fd) {
@ -8,7 +9,7 @@
if (fd < 0) return;
force_assert(-1 != fcntl(fd, F_SETFD, FD_CLOEXEC));
#else
@@ -462,7 +462,7 @@ void fdevent_setfd_cloexec(int fd) {
@@ -60,7 +60,7 @@
}
void fdevent_clrfd_cloexec(int fd) {
@ -17,7 +18,7 @@
if (fd >= 0) force_assert(-1 != fcntl(fd, F_SETFD, 0));
#else
UNUSED(fd);
@@ -499,7 +499,7 @@ int fdevent_socket_cloexec(int domain, int type, int protocol) {
@@ -96,7 +96,7 @@
return socket(domain, type | SOCK_CLOEXEC, protocol);
#endif
if (-1 != (fd = socket(domain, type, protocol))) {
@ -26,8 +27,8 @@
force_assert(-1 != fcntl(fd, F_SETFD, FD_CLOEXEC));
#endif
}
@@ -513,7 +513,7 @@ int fdevent_socket_nb_cloexec(int domain, int type, int protocol) {
return socket(domain, type | SOCK_CLOEXEC | SOCK_NONBLOCK, protocol);
@@ -120,7 +120,7 @@
#endif
#endif
if (-1 != (fd = socket(domain, type, protocol))) {
-#ifdef FD_CLOEXEC
@ -35,16 +36,34 @@
force_assert(-1 != fcntl(fd, F_SETFD, FD_CLOEXEC));
#endif
#ifdef O_NONBLOCK
@@ -532,7 +532,7 @@ int fdevent_open_cloexec(const char *pathname, int flags, mode_t mode) {
return open(pathname, flags | O_CLOEXEC | O_NOCTTY, mode);
@@ -173,7 +173,7 @@
#endif /* not used */
int fdevent_dup_cloexec (int fd) {
- #ifdef F_DUPFD_CLOEXEC
+ #if 0
return fcntl(fd, F_DUPFD_CLOEXEC, 3);
#else
const int newfd = fcntl(fd, F_DUPFD, 3);
@@ -214,7 +214,7 @@
return open(pathname, flags | O_CLOEXEC | FDEVENT_O_FLAGS, mode);
#else
int fd = open(pathname, flags | O_NOCTTY, mode);
int fd = open(pathname, flags | FDEVENT_O_FLAGS, mode);
-#ifdef FD_CLOEXEC
+#if 0
if (fd != -1)
force_assert(-1 != fcntl(fd, F_SETFD, FD_CLOEXEC));
#endif
@@ -626,7 +626,7 @@ extern char **environ;
@@ -254,7 +254,7 @@
#endif
{
if (0 != pipe(fds)
- #ifdef FD_CLOEXEC
+ #if 0
|| 0 != fcntl(fds[0], F_SETFD, FD_CLOEXEC)
|| 0 != fcntl(fds[1], F_SETFD, FD_CLOEXEC)
#endif
@@ -378,7 +378,7 @@
char ** fdevent_environ (void) { return environ; }
@ -53,7 +72,7 @@
static int fdevent_dup2_close_clrfd_cloexec(int oldfd, int newfd) {
if (oldfd >= 0) {
if (oldfd != newfd) {
@@ -654,7 +654,7 @@ static int fdevent_dup2_close_clrfd_cloexec(int oldfd, int newfd, int reuse) {
@@ -406,7 +406,7 @@
int fdevent_set_stdin_stdout_stderr(int fdin, int fdout, int fderr) {
@ -62,12 +81,3 @@
if (STDIN_FILENO != fdevent_dup2_close_clrfd_cloexec(fdin, STDIN_FILENO))
return -1;
if (STDOUT_FILENO != fdevent_dup2_close_clrfd_cloexec(fdout, STDOUT_FILENO))
@@ -696,7 +696,7 @@ pid_t fdevent_fork_execve(const char *name, char *argv[], char *envp[], int fdin
}
if (0 != fdevent_set_stdin_stdout_stderr(fdin, fdout, fderr)) _exit(errno);
- #ifdef FD_CLOEXEC
+ #if 0
/*(might not be sufficient for open fds, but modern OS have FD_CLOEXEC)*/
for (int i = 3; i < 256; ++i) close(i);
#endif

View File

@ -1,10 +0,0 @@
+++ src/app/lighttpd/src/stat_cache.c
@@ -796,7 +796,7 @@
#ifndef O_NOFOLLOW
#define O_NOFOLLOW 0
#endif
- const int oflags = O_BINARY | O_LARGEFILE | O_NOCTTY | O_NONBLOCK
+ const int oflags = O_BINARY | O_LARGEFILE | O_NOCTTY //| O_NONBLOCK
| (con->conf.follow_symlink ? 0 : O_NOFOLLOW);
const int fd = fdevent_open_cloexec(name->ptr, O_RDONLY | oflags, 0);
if (fd >= 0) {

View File

@ -1,22 +1,61 @@
LIGHTTPD_DIR := $(call select_from_ports,lighttpd)/src/app/lighttpd
FILTER_OUT = lempar.c lighttpd-angel.c lemon.c \
mod_accesslog.c mod_alias.c \
mod_authn_file.c mod_authn_gssapi.c mod_authn_ldap.c \
mod_authn_mysql.c mod_authn_pam.c mod_authn_sasl.c \
mod_cgi.c mod_cml.c mod_cml_funcs.c mod_cml_lua.c \
mod_compress.c mod_deflate.c \
mod_evasive.c mod_evhost.c mod_expire.c mod_extforward.c \
mod_fastcgi.c mod_flv_streaming.c mod_geoip.c \
mod_magnet.c mod_magnet_cache.c mod_mysql_vhost.c \
mod_proxy.c mod_redirect.c mod_rewrite.c mod_rrdtool.c \
mod_scgi.c mod_secdownload.c mod_setenv.c mod_simple_vhost.c \
mod_skeleton.c mod_sockproxy.c mod_ssi.c mod_ssi_expr.c \
mod_ssi_exprparser.c mod_status.c \
mod_trigger_b4_dl.c mod_uploadprogress.c mod_userdir.c \
mod_usertrack.c mod_vhostdb.c mod_vhostdb_dbi.c \
mod_vhostdb_ldap.c mod_vhostdb_mysql.c mod_vhostdb_pgsql.c \
mod_webdav.c mod_wstunnel.c
FILTER_OUT := lempar.c lighttpd-angel.c lemon.c \
mod_accesslog.c \
mod_alias.c \
mod_authn_dbi.c \
mod_authn_file.c \
mod_authn_gssapi.c \
mod_authn_ldap.c \
mod_authn_mysql.c \
mod_authn_pam.c \
mod_authn_sasl.c \
mod_cgi.c \
mod_cml.c \
mod_cml_funcs.c \
mod_cml_lua.c \
mod_compress.c \
mod_deflate.c \
mod_evasive.c \
mod_evhost.c \
mod_expire.c \
mod_extforward.c \
mod_fastcgi.c \
mod_flv_streaming.c \
mod_geoip.c \
mod_gnutls.c \
mod_magnet.c \
mod_magnet_cache.c \
mod_maxminddb.c \
mod_mbedtls.c \
mod_mysql_vhost.c \
mod_nss.c \
mod_proxy.c \
mod_redirect.c \
mod_rewrite.c \
mod_rrdtool.c \
mod_scgi.c \
mod_secdownload.c \
mod_setenv.c \
mod_simple_vhost.c \
mod_skeleton.c \
mod_sockproxy.c \
mod_ssi.c \
mod_ssi_expr.c \
mod_ssi_exprparser.c \
mod_status.c \
mod_trigger_b4_dl.c \
mod_uploadprogress.c \
mod_userdir.c \
mod_usertrack.c \
mod_vhostdb.c \
mod_vhostdb_dbi.c \
mod_vhostdb_ldap.c \
mod_vhostdb_mysql.c \
mod_vhostdb_pgsql.c \
mod_webdav.c \
mod_wolfssl.c \
mod_wstunnel.c
SRC_C = $(filter-out $(FILTER_OUT),$(notdir $(wildcard $(LIGHTTPD_DIR)/src/*.c)))
vpath %.c $(LIGHTTPD_DIR)/src
@ -33,6 +72,7 @@ LIGHTTPD_MINOR = $(word 3,$(LIGHTTPD_VERSION))
CC_OPT += -DHAVE_SOCKLEN_T -DHAVE_SYSLOG_H -DHAVE_STDINT_H -DUSE_POLL
CC_OPT += -DHAVE_SYS_WAIT_H -DHAVE_SYS_UN_H -DHAVE_MMAP -DHAVE_SYS_MMAN_H -DHAVE_SELECT
CC_OPT += -DHAVE_WRITEV -DUSE_WRITEV
CC_OPT += -DHAVE_TIMEGM -DHAVE_UNISTD_H -DHAVE_SYS_TIME_H
CC_OPT += -DSBIN_DIR="\"/sbin\""
CC_OPT += -DPACKAGE_NAME="\"lighttpd\""
CC_OPT += -DLIGHTTPD_VERSION_ID='($(LIGHTTPD_MAIN) << 16 | $(LIGHTTPD_MAJOR) << 8 | $(LIGHTTPD_MINOR))'
@ -41,6 +81,7 @@ CC_OPT += -DLIBRARY_DIR="\"/lib\""
CC_OPT += -DLIGHTTPD_STATIC
CC_OPT += -DHAVE_LIBSSL -DUSE_OPENSSL -DUSE_OPENSSL_CRYPTO
CC_WARN = -Wall -Wno-unused-variable -Wno-unused-function
INC_DIR += $(PRG_DIR)