mirror of
https://git.openwrt.org/feed/packages.git
synced 2024-06-17 12:53:54 +02:00
lighttpd: build and bugfix patches
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
parent
4fe39a4e2f
commit
82221622af
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=lighttpd
|
||||
PKG_VERSION:=1.4.56
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
# release candidate ~rcX testing; remove for release
|
||||
#PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.4.56
|
||||
|
||||
|
|
30
net/lighttpd/patches/010-meson-lua.patch
Normal file
30
net/lighttpd/patches/010-meson-lua.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
From f47d569311d51ec9ab5dad7452b43c1b5a8290b6 Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Tue, 1 Dec 2020 16:41:58 -0500
|
||||
Subject: [PATCH] [PATCH] [meson] do not search for lua versions
|
||||
|
||||
openwrt net/lighttpd/Makefile declares dependency on liblua, and not on
|
||||
specific lua versions, so have meson.build look for 'lua' and not for
|
||||
specific lua versions.
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
src/meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/meson.build b/src/meson.build
|
||||
index 71e4ec90..14ed9cec 100644
|
||||
--- a/src/meson.build
|
||||
+++ b/src/meson.build
|
||||
@@ -381,7 +381,7 @@ endif
|
||||
liblua = []
|
||||
if get_option('with_lua')
|
||||
found_lua = false
|
||||
- foreach l: ['lua5.4', 'lua-5.4', 'lua5.3', 'lua-5.3', 'lua5.2', 'lua-5.2', 'lua5.1', 'lua-5.1', 'lua']
|
||||
+ foreach l: ['lua']
|
||||
if not(found_lua)
|
||||
liblua = dependency(l, required: false)
|
||||
if (liblua.found())
|
||||
--
|
||||
2.28.0
|
||||
|
78
net/lighttpd/patches/020-webdav-atfile.patch
Normal file
78
net/lighttpd/patches/020-webdav-atfile.patch
Normal file
|
@ -0,0 +1,78 @@
|
|||
From 2a1e55dc62c72893d128400334131a56a218ee1a Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Tue, 1 Dec 2020 16:23:49 -0500
|
||||
Subject: [PATCH] [mod_webdav] define _ATFILE_SOURCE if AT_FDCWD
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
src/mod_webdav.c | 15 ++++++++++++---
|
||||
1 file changed, 20 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/mod_webdav.c b/src/mod_webdav.c
|
||||
index c3fe79a2..9c27ad8f 100644
|
||||
--- a/src/mod_webdav.c
|
||||
+++ b/src/mod_webdav.c
|
||||
@@ -182,9 +182,18 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h> /* getpid() linkat() rmdir() unlinkat() */
|
||||
|
||||
-/* Note: filesystem access race conditions exist without _ATFILE_SOURCE */
|
||||
+#ifdef AT_FDCWD
|
||||
#ifndef _ATFILE_SOURCE
|
||||
+#define _ATFILE_SOURCE
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+#ifndef AT_SYMLINK_NOFOLLOW
|
||||
#define AT_SYMLINK_NOFOLLOW 0
|
||||
+#endif
|
||||
+
|
||||
+/* Note: filesystem access race conditions exist without _ATFILE_SOURCE */
|
||||
+#ifndef _ATFILE_SOURCE
|
||||
/*(trigger linkat() fail to fallback logic in mod_webdav.c)*/
|
||||
#define linkat(odfd,opath,ndfd,npath,flags) -1
|
||||
#endif
|
||||
@@ -2371,7 +2380,10 @@ webdav_delete_dir (const plugin_config * const pconf,
|
||||
buffer_append_string_len(&dst->rel_path, de->d_name, len);
|
||||
|
||||
#ifndef _ATFILE_SOURCE
|
||||
- #ifndef _DIRENT_HAVE_D_TYPE
|
||||
+ #ifdef _DIRENT_HAVE_D_TYPE
|
||||
+ if (de->d_type == DT_UNKNOWN)
|
||||
+ #endif
|
||||
+ {
|
||||
struct stat st;
|
||||
if (0 != stat(dst->path.ptr, &st)) {
|
||||
dst->path.ptr[ (dst->path.used = dst_path_used) -1]='\0';
|
||||
@@ -2379,6 +2391,6 @@ webdav_delete_dir (const plugin_config * const pconf,
|
||||
continue; /* file *just* disappeared? */
|
||||
}
|
||||
s_isdir = S_ISDIR(st.st_mode);
|
||||
- #endif
|
||||
+ }
|
||||
#endif
|
||||
|
||||
@@ -2903,7 +2902,10 @@ webdav_copymove_dir (const plugin_config * const pconf,
|
||||
buffer_append_string_len(&dst->rel_path, de->d_name, len);
|
||||
|
||||
#ifndef _ATFILE_SOURCE
|
||||
- #ifndef _DIRENT_HAVE_D_TYPE
|
||||
+ #ifdef _DIRENT_HAVE_D_TYPE
|
||||
+ if (de->d_type == DT_UNKNOWN)
|
||||
+ #endif
|
||||
+ {
|
||||
if (0 != stat(src->path.ptr, &st)) {
|
||||
src->path.ptr[ (src->path.used = src_path_used) -1]='\0';
|
||||
src->rel_path.ptr[(src->rel_path.used = src_rel_path_used)-1]='\0';
|
||||
@@ -2912,7 +2914,7 @@ webdav_copymove_dir (const plugin_config * const pconf,
|
||||
continue; /* file *just* disappeared? */
|
||||
}
|
||||
d_type = st.st_mode;
|
||||
- #endif
|
||||
+ }
|
||||
#endif
|
||||
|
||||
if (S_ISDIR(d_type)) { /* recursive call; depth first */
|
||||
--
|
||||
2.28.0
|
||||
|
26
net/lighttpd/patches/030-one-shot-pipes.patch
Normal file
26
net/lighttpd/patches/030-one-shot-pipes.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
From 716e4d7a5d773607d87d5521f5943cff019bcd97 Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Mon, 30 Nov 2020 19:31:05 -0500
|
||||
Subject: [PATCH] [core] fix lighttpd -1 one-shot with pipes
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
src/server.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/server.c b/src/server.c
|
||||
index 83c0241f..a781027e 100644
|
||||
--- a/src/server.c
|
||||
+++ b/src/server.c
|
||||
@@ -356,7 +356,7 @@ static int server_oneshot_read_cq(connection *con, chunkqueue *cq, off_t max_byt
|
||||
/* temporary set con->fd to oneshot_fd (fd input) rather than outshot_fdout
|
||||
* (lighttpd generally assumes operation on sockets, so this is a kludge) */
|
||||
int fd = con->fd;
|
||||
- con->fd = oneshot_fd;
|
||||
+ con->fd = oneshot_fdn->fd;
|
||||
int rc = oneshot_read_cq(con, cq, max_bytes);
|
||||
con->fd = fd;
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
Loading…
Reference in New Issue
Block a user