mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v3 0/4] lighttpd: Update and suggestions from last year
@ 2017-08-28 18:08 Alexander Dahl
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 1/4] lighttpd: Ugprade from 1.4.39 to 1.4.45 Alexander Dahl
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexander Dahl @ 2017-08-28 18:08 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

Hi,

in late 2016 there was a patch posted for upgrading lighttpd from
1.4.39 to a newer version. Nothing happened since then and we are
still on this old version. Meanwhile upstream is at 1.4.45 with some
new features and lots of fixes, including serious security fixes.

I took all the suggestions from the old thread and made a patch
series. The first is the upgrade only, the following cover suggestions
from the old thread and use a new feature from 1.4.40 for simplifying
the config file. You may take all of the patches, but I also would be
happy if just the upgrade makes it.

Please have a look and test, as you can read in the News section on
https://www.lighttpd.net/ quite some things changed, although I
suppose almost every config out there should still run.

I could test this by myself for a while now, some things changed
upstream, you may find my support request useful:

https://redmine.lighttpd.net/boards/2/topics/7520

Greets
Alex

Changelog:

v1 -> v2:
  * fix non default install stage for extra mime.conf installation

v2 -> v3:
  * changed dependency from libmemcache to libmemcached
  * libmemcached: added dependency to BROKEN

Alexander Dahl (4):
  lighttpd: Ugprade from 1.4.39 to 1.4.45
  lighttpd: Rename memcache option to memcached
  lighttpd: Simplify additional config include
  lighttpd: Install mime.conf and remove hardcoded values

 projectroot/etc/lighttpd/lighttpd.conf | 57 +---------------------------------
 rules/lighttpd.in                      |  7 +++--
 rules/lighttpd.make                    | 27 +++++++++++++---
 scripts/migrate/migrate_ptx            |  8 +++++
 4 files changed, 35 insertions(+), 64 deletions(-)

-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v3 1/4] lighttpd: Ugprade from 1.4.39 to 1.4.45
  2017-08-28 18:08 [ptxdist] [PATCH v3 0/4] lighttpd: Update and suggestions from last year Alexander Dahl
@ 2017-08-28 18:08 ` Alexander Dahl
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 2/4] lighttpd: Rename memcache option to memcached Alexander Dahl
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2017-08-28 18:08 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

From: Alexander Dahl <ada@thorsis.com>

* webdav support was improved in 1.4.40, we switch on the additional
    webdav related configure options, if webdav is selected
* auth framework was rewritten in 1.4.42, while all other auth backends
    (krb5, ldap, mysql) are disabled in ptxdist by configure, the basic
    file backend is active and another module has to be loaded for it

For removal of the runstatedir configure option see the discussion on
the proposed patch 1.4.39 -> 1.4.42 from October 2016.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 rules/lighttpd.make | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/rules/lighttpd.make b/rules/lighttpd.make
index aa0849ac0..fd6e1cf84 100644
--- a/rules/lighttpd.make
+++ b/rules/lighttpd.make
@@ -17,8 +17,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
 #
 # Paths and names
 #
-LIGHTTPD_VERSION	:= 1.4.39
-LIGHTTPD_MD5		:= 63c7563be1c7a7a9819a51f07f1af8b2
+LIGHTTPD_VERSION	:= 1.4.45
+LIGHTTPD_MD5		:= a128e1eda76899ce3fd115efae5fe631
 LIGHTTPD		:= lighttpd-$(LIGHTTPD_VERSION)
 LIGHTTPD_SUFFIX		:= tar.xz
 LIGHTTPD_URL		:= http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
@@ -36,27 +36,31 @@ LIGHTTPD_LICENSE	:= BSD-3-Clause
 LIGHTTPD_CONF_TOOL	:= autoconf
 LIGHTTPD_CONF_OPT	:= \
 	$(CROSS_AUTOCONF_USR) \
-	--runstatedir=/run \
 	--libdir=/usr/lib/lighttpd \
 	--$(call ptx/endis, PTXCONF_GLOBAL_LARGE_FILE)-lfs \
 	$(GLOBAL_IPV6_OPTION) \
 	--disable-mmap \
+	--enable-extra-warnings \
 	--without-libev \
 	--without-mysql \
 	--without-ldap \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_ATTR)-attr \
 	--without-valgrind \
 	--without-libunwind \
+	--without-krb5 \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_OPENSSL)-openssl \
-	--without-kerberos5 \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_PCRE)-pcre \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_ZLIB)-zlib \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_BZ2LIB)-bzip2 \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_FAM)-fam \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_PROPS)-webdav-props \
+	--$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_PROPS)-libxml \
+	--$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_PROPS)-sqlite \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_LOCKS)-webdav-locks \
+	--$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_LOCKS)-uuid \
 	--without-gdbm \
-	--$(call ptx/wwo, PTXCONF_LIGHTTPD_MEMCACHE)-memcache \
+	--without-geoip \
+	--$(call ptx/wwo, PTXCONF_LIGHTTPD_MEMCACHE)-memcached \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_LUA)-lua
 
 # ----------------------------------------------------------------------------
@@ -68,6 +72,7 @@ LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ACCESS)		+= mod_access
 LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ACCESSLOG)	+= mod_accesslog
 LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ALIAS)		+= mod_alias
 LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_AUTH)		+= mod_auth
+LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_AUTH)		+= mod_authn_file
 LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_CML)		+= mod_cml
 LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_COMPRESS)	+= mod_compress
 LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_FASTCGI)	+= mod_fastcgi
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v3 2/4] lighttpd: Rename memcache option to memcached
  2017-08-28 18:08 [ptxdist] [PATCH v3 0/4] lighttpd: Update and suggestions from last year Alexander Dahl
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 1/4] lighttpd: Ugprade from 1.4.39 to 1.4.45 Alexander Dahl
@ 2017-08-28 18:08 ` Alexander Dahl
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 3/4] lighttpd: Simplify additional config include Alexander Dahl
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 4/4] lighttpd: Install mime.conf and remove hardcoded values Alexander Dahl
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2017-08-28 18:08 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

From: Alexander Dahl <ada@thorsis.com>

The memcached ./configure option for lighttpd changed, see the changeset
for upgrading lighttpd package from 1.4.39 to 1.4.45. For making the
configure option consistent with the menu entry, the menu variable is
renamed here. It seems lighttpd has switched from libmemcache to
libmemcached for memcached support.

Took this from a not applied patch from 2016, and added the necessary
migration helper suggested by Michael Olbrich, plus the dependency
changes in lighttpd.in.

However libmemcache and libmemcached are outdated and build against the
old libmemcached fails now, so mark it as broken.

Suggested-by: Andreas Geisenhainer <Andreas.Geisenhainer@atsonline.de>
Suggested-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
v2 -> v3:
  * added dependency to BROKEN
  * changed dependency from libmemcache to libmemcached
---
 rules/lighttpd.in           | 7 ++++---
 rules/lighttpd.make         | 2 +-
 scripts/migrate/migrate_ptx | 8 ++++++++
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/rules/lighttpd.in b/rules/lighttpd.in
index d53539408..c43039f9f 100644
--- a/rules/lighttpd.in
+++ b/rules/lighttpd.in
@@ -16,7 +16,7 @@ menuconfig LIGHTTPD
 	select SQLITE			if LIGHTTPD_WEBDAV_PROPS
 	select LIBUUID			if LIGHTTPD_WEBDAV_LOCKS
 	select OPENSSL			if LIGHTTPD_OPENSSL
-	select LIBMEMCACHE		if LIGHTTPD_MEMCACHE
+	select LIBMEMCACHED		if LIGHTTPD_MEMCACHED
 	select LUA			if LIGHTTPD_LUA
 	select LUA_INSTALL_LIBLUA	if LIGHTTPD_LUA
 	select PHP5			if LIGHTTPD_MOD_FASTCGI_PHP && RUNTIME
@@ -60,9 +60,10 @@ config LIGHTTPD_LUA
 	help
 	  lua engine for mod_cml and mod_magnet
 
-config LIGHTTPD_MEMCACHE
+config LIGHTTPD_MEMCACHED
 	bool
 	prompt "memcached storage"
+	depends on BROKEN
 	help
 	  memcached storage for mod_trigger_b4_dl and mod_cml
 
@@ -171,7 +172,7 @@ config LIGHTTPD_MOD_REWRITE
 
 config LIGHTTPD_MOD_TRIGGER_B4_DL
 	bool
-	select LIGHTTPD_MEMCACHE
+	select LIGHTTPD_MEMCACHED
 	select LIGHTTPD_PCRE
 	prompt "mod_trigger_b4_dl"
 	help
diff --git a/rules/lighttpd.make b/rules/lighttpd.make
index fd6e1cf84..8b522670a 100644
--- a/rules/lighttpd.make
+++ b/rules/lighttpd.make
@@ -60,7 +60,7 @@ LIGHTTPD_CONF_OPT	:= \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_LOCKS)-uuid \
 	--without-gdbm \
 	--without-geoip \
-	--$(call ptx/wwo, PTXCONF_LIGHTTPD_MEMCACHE)-memcached \
+	--$(call ptx/wwo, PTXCONF_LIGHTTPD_MEMCACHED)-memcached \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_LUA)-lua
 
 # ----------------------------------------------------------------------------
diff --git a/scripts/migrate/migrate_ptx b/scripts/migrate/migrate_ptx
index d684137aa..d92beb54e 100755
--- a/scripts/migrate/migrate_ptx
+++ b/scripts/migrate/migrate_ptx
@@ -290,3 +290,11 @@ s/^\(\(# \)\?PTXCONF_\)DOSFSTOOLS_DOSFSCK_MSDOS/\1DOSFSTOOLS_FSCK_FAT_MSDOS/
 s/^\(\(# \)\?PTXCONF_\)DOSFSTOOLS_DOSFSCK_VFAT/\1DOSFSTOOLS_FSCK_FAT_VFAT/
 s/^\(\(# \)\?PTXCONF_\)DOSFSTOOLS_DOSFSCK/\1DOSFSTOOLS_FSCK_FAT/
 s/^\(\(# \)\?PTXCONF_\)DOSFSTOOLS_DOSFSLABEL/\1DOSFSTOOLS_FATLABEL/
+
+#
+# from   : ptxdist-2017.07.0
+# to     : ptxdist-2017.08.0
+# symbol : LIGHTTPD_MEMCACHE -> LIGHTTPD_MEMCACHED
+# reason : option renamed
+#
+s/^\(\(# \)\?PTXCONF_\)LIGHTTPD_MEMCACHE/\1LIGHTTPD_MEMCACHED/
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v3 3/4] lighttpd: Simplify additional config include
  2017-08-28 18:08 [ptxdist] [PATCH v3 0/4] lighttpd: Update and suggestions from last year Alexander Dahl
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 1/4] lighttpd: Ugprade from 1.4.39 to 1.4.45 Alexander Dahl
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 2/4] lighttpd: Rename memcache option to memcached Alexander Dahl
@ 2017-08-28 18:08 ` Alexander Dahl
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 4/4] lighttpd: Install mime.conf and remove hardcoded values Alexander Dahl
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2017-08-28 18:08 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

From: Alexander Dahl <ada@thorsis.com>

Since version 1.4.40 lighttpd supports file globs for includes.

See announcement: https://www.lighttpd.net/2016/7/16/1.4.40/

Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 projectroot/etc/lighttpd/lighttpd.conf | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/projectroot/etc/lighttpd/lighttpd.conf b/projectroot/etc/lighttpd/lighttpd.conf
index 86048f003..c6f1e64cf 100644
--- a/projectroot/etc/lighttpd/lighttpd.conf
+++ b/projectroot/etc/lighttpd/lighttpd.conf
@@ -69,5 +69,4 @@ mimetype.assign		= (
 
 index-file.names = ( "index.html" )
 
-include_shell "[ \"$(ls -A conf.d/)\" ] && cat conf.d/*.conf"
-
+include "conf.d/*.conf"
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v3 4/4] lighttpd: Install mime.conf and remove hardcoded values
  2017-08-28 18:08 [ptxdist] [PATCH v3 0/4] lighttpd: Update and suggestions from last year Alexander Dahl
                   ` (2 preceding siblings ...)
  2017-08-28 18:08 ` [ptxdist] [PATCH v3 3/4] lighttpd: Simplify additional config include Alexander Dahl
@ 2017-08-28 18:08 ` Alexander Dahl
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2017-08-28 18:08 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

From: Alexander Dahl <ada@thorsis.com>

As suggested on the mailing list back in late 2016 this removes the
hardcoded mimetype values from lighttpd.conf and installs mime.conf
provided by upstream instead. You can still have your own mime.conf by
putting it in projectroot/etc/lighttpd/conf.d of course.

Suggested-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Suggested-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
v1 -> v2:
  * use world/install instead of what the outdated documentation says
---
 projectroot/etc/lighttpd/lighttpd.conf | 54 ----------------------------------
 rules/lighttpd.make                    | 12 ++++++++
 2 files changed, 12 insertions(+), 54 deletions(-)

diff --git a/projectroot/etc/lighttpd/lighttpd.conf b/projectroot/etc/lighttpd/lighttpd.conf
index c6f1e64cf..fa2f60e13 100644
--- a/projectroot/etc/lighttpd/lighttpd.conf
+++ b/projectroot/etc/lighttpd/lighttpd.conf
@@ -13,60 +13,6 @@ server.modules		= (
 	@MODULES@
 )
 
-# mimetype mapping
-mimetype.assign		= (
-	".pdf"		=>	"application/pdf",
-	".sig"		=>	"application/pgp-signature",
-	".spl"		=>	"application/futuresplash",
-	".class"	=>	"application/octet-stream",
-	".ps"		=>	"application/postscript",
-	".torrent"	=>	"application/x-bittorrent",
-	".dvi"		=>	"application/x-dvi",
-	".gz"		=>	"application/x-gzip",
-	".pac"		=>	"application/x-ns-proxy-autoconfig",
-	".swf"		=>	"application/x-shockwave-flash",
-	".tar.gz"	=>	"application/x-tgz",
-	".tgz"		=>	"application/x-tgz",
-	".tar"		=>	"application/x-tar",
-	".zip"		=>	"application/zip",
-	".mp3"		=>	"audio/mpeg",
-	".m3u"		=>	"audio/x-mpegurl",
-	".wma"		=>	"audio/x-ms-wma",
-	".wax"		=>	"audio/x-ms-wax",
-	".ogg"		=>	"audio/x-wav",
-	".wav"		=>	"audio/x-wav",
-	".gif"		=>	"image/gif",
-	".jpg"		=>	"image/jpeg",
-	".jpeg"		=>	"image/jpeg",
-	".png"		=>	"image/png",
-	".svg"		=>	"image/svg+xml",
-	".xbm"		=>	"image/x-xbitmap",
-	".xpm"		=>	"image/x-xpixmap",
-	".xwd"		=>	"image/x-xwindowdump",
-	".css"		=>	"text/css",
-	".html"		=>	"text/html",
-	".htm"		=>	"text/html",
-	".js"		=>	"text/javascript",
-	".asc"		=>	"text/plain",
-	".c"		=>	"text/plain",
-	".conf"		=>	"text/plain",
-	".text"		=>	"text/plain",
-	".txt"		=>	"text/plain",
-	".dtd"		=>	"text/xml",
-	".xml"		=>	"text/xml",
-	".mpeg"		=>	"video/mpeg",
-	".mpg"		=>	"video/mpeg",
-	".mov"		=>	"video/quicktime",
-	".qt"		=>	"video/quicktime",
-	".avi"		=>	"video/x-msvideo",
-	".asf"		=>	"video/x-ms-asf",
-	".asx"		=>	"video/x-ms-asf",
-	".wmv"		=>	"video/x-ms-wmv",
-	".bz2"		=>	"application/x-bzip",
-	".tbz"		=>	"application/x-bzip-compressed-tar",
-	".tar.bz2"	=>	"application/x-bzip-compressed-tar"
-)
-
 index-file.names = ( "index.html" )
 
 include "conf.d/*.conf"
diff --git a/rules/lighttpd.make b/rules/lighttpd.make
index 8b522670a..5d1123ee9 100644
--- a/rules/lighttpd.make
+++ b/rules/lighttpd.make
@@ -64,6 +64,16 @@ LIGHTTPD_CONF_OPT	:= \
 	--$(call ptx/wwo, PTXCONF_LIGHTTPD_LUA)-lua
 
 # ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+$(STATEDIR)/lighttpd.install:
+	@$(call targetinfo)
+	@$(call world/install, LIGHTTPD)
+	@install -vD -m 0644 "$(LIGHTTPD_DIR)/doc/config/conf.d/mime.conf" \
+		"$(LIGHTTPD_PKGDIR)/etc/lighttpd/conf.d/mime.conf"
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
 
@@ -118,6 +128,8 @@ endif
 	@$(call install_copy, lighttpd, 0, 0, 0755, /etc/lighttpd/conf.d)
 	@$(call install_replace, lighttpd, /etc/lighttpd/lighttpd.conf, \
 		@MODULES@, $(LIGHTTPD_MODULE_STRING))
+	@$(call install_alternative, lighttpd, 0, 0, 0644, \
+		/etc/lighttpd/conf.d/mime.conf)
 
 ifdef PTXCONF_LIGHTTPD_MOD_FASTCGI_PHP
 	@$(call install_alternative, lighttpd, 0, 0, 0644, \
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-28 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 18:08 [ptxdist] [PATCH v3 0/4] lighttpd: Update and suggestions from last year Alexander Dahl
2017-08-28 18:08 ` [ptxdist] [PATCH v3 1/4] lighttpd: Ugprade from 1.4.39 to 1.4.45 Alexander Dahl
2017-08-28 18:08 ` [ptxdist] [PATCH v3 2/4] lighttpd: Rename memcache option to memcached Alexander Dahl
2017-08-28 18:08 ` [ptxdist] [PATCH v3 3/4] lighttpd: Simplify additional config include Alexander Dahl
2017-08-28 18:08 ` [ptxdist] [PATCH v3 4/4] lighttpd: Install mime.conf and remove hardcoded values Alexander Dahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox