From c866e3f2c3313846eaf76c61e82be2a1511d0bba Mon Sep 17 00:00:00 2001 From: David Yang Date: Fri, 1 Feb 2019 15:11:26 +0800 Subject: [PATCH 1/3] lighttpd: Disable auto loading mod_authn_file which never works on OpenWrt Signed-off-by: David Yang --- ...-Disable-auto-loading-mod_authn_file.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 net/lighttpd/patches/020-Disable-auto-loading-mod_authn_file.patch diff --git a/net/lighttpd/patches/020-Disable-auto-loading-mod_authn_file.patch b/net/lighttpd/patches/020-Disable-auto-loading-mod_authn_file.patch new file mode 100644 index 000000000..22f3e6675 --- /dev/null +++ b/net/lighttpd/patches/020-Disable-auto-loading-mod_authn_file.patch @@ -0,0 +1,29 @@ +From 72f2c7559a1cd75b6d86e72358b4b78cdeefa5f4 Mon Sep 17 00:00:00 2001 +From: yangfl +Date: Fri, 1 Feb 2019 15:05:32 +0800 +Subject: [PATCH] Disable auto loading mod_authn_file + +Which will cause openwrt/packages#7737 +--- + src/configfile.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/configfile.c b/src/configfile.c +index 1b2651b9..29bb2aa4 100644 +--- a/src/configfile.c ++++ b/src/configfile.c +@@ -482,9 +482,9 @@ static int config_insert(server *srv) { + * existing lighttpd 1.4.x configs */ + if (contains_mod_auth) { + if (append_mod_authn_file) { +- ds = data_string_init(); ++ /* ds = data_string_init(); + buffer_copy_string_len(ds->value, CONST_STR_LEN("mod_authn_file")); +- array_insert_unique(srv->srvconf.modules, (data_unset *)ds); ++ array_insert_unique(srv->srvconf.modules, (data_unset *)ds); */ + } + if (append_mod_authn_ldap) { + #if defined(HAVE_LDAP_H) && defined(HAVE_LBER_H) && defined(HAVE_LIBLDAP) && defined(HAVE_LIBLBER) +-- +2.20.1 + From 3013490240cc16839f4ef4fe27d8a19fca986978 Mon Sep 17 00:00:00 2001 From: David Yang Date: Fri, 1 Feb 2019 15:12:20 +0800 Subject: [PATCH 2/3] lighttpd: Remove recursive dependency in #7737 Signed-off-by: David Yang --- net/lighttpd/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/lighttpd/Makefile b/net/lighttpd/Makefile index 5e1ef0e22..1a96b2a4b 100644 --- a/net/lighttpd/Makefile +++ b/net/lighttpd/Makefile @@ -195,11 +195,11 @@ $(eval $(call BuildPackage,lighttpd)) $(eval $(call BuildPlugin,redirect,URL redirection,+PACKAGE_lighttpd-mod-redirect:libpcre,10)) # Next, permit authentication. -$(eval $(call BuildPlugin,auth,Authentication,+lighttpd-mod-authn_file,20)) -$(eval $(call BuildPlugin,authn_file,File-based authentication,+lighttpd-mod-auth,20)) -$(eval $(call BuildPlugin,authn_gssapi,Kerberos-based authentication,+lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_gssapi:krb5-libs,20)) -$(eval $(call BuildPlugin,authn_ldap,LDAP-based authentication,+lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_ldap:libopenldap,20)) -$(eval $(call BuildPlugin,authn_mysql,Mysql-based authentication,+lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_mysql:libmysqlclient,20)) +$(eval $(call BuildPlugin,auth,Authentication,,20)) +$(eval $(call BuildPlugin,authn_file,File-based authentication,lighttpd-mod-auth,20)) +$(eval $(call BuildPlugin,authn_gssapi,Kerberos-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_gssapi:krb5-libs,20)) +$(eval $(call BuildPlugin,authn_ldap,LDAP-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_ldap:libopenldap,20)) +$(eval $(call BuildPlugin,authn_mysql,Mysql-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_mysql:libmysqlclient,20)) # Finally, everything else. $(eval $(call BuildPlugin,access,Access restrictions,,30)) From 2ceeaeb5adf1bff0234b66043f65b180fcd89d7c Mon Sep 17 00:00:00 2001 From: David Yang Date: Fri, 1 Feb 2019 15:13:54 +0800 Subject: [PATCH 3/3] lighttpd: Add missing 'server.modules' in some config files e.g. 20-auth.conf Signed-off-by: David Yang --- net/lighttpd/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/lighttpd/Makefile b/net/lighttpd/Makefile index 1a96b2a4b..1dcecef2a 100644 --- a/net/lighttpd/Makefile +++ b/net/lighttpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lighttpd PKG_VERSION:=1.4.49 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x @@ -180,6 +180,10 @@ define BuildPlugin $(INSTALL_DIR) $$(1)/etc/lighttpd/conf.d if [ -f $(PKG_BUILD_DIR)/doc/config/conf.d/$(1).conf ]; then \ $(CP) $(PKG_BUILD_DIR)/doc/config/conf.d/$(1).conf $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \ + if ! grep -qF 'mod_$(1)' $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf; then \ + sed -i "`sed '/^##/ !q' $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf | wc -l` i\ +server.modules += ( \"mod_$(1)\" )" $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \ + fi \ else \ echo 'server.modules += ( "mod_$(1)" )' > $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \ fi