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/lighttpd19
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf38
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb82
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.76.bb76
5 files changed, 101 insertions, 156 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
deleted file mode 100644
index f17bdce2c0..0000000000
--- a/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 22afc5d9aaa215c3c87ba21c77d47da44ab3b113 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 26 Aug 2016 18:20:32 +0300
4Subject: [PATCH] Use pkg-config for pcre dependency instead of -config script.
5
6RP 2014/5/22
7Upstream-Status: Pending
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9---
10 configure.ac | 16 ++++++++++++----
11 1 file changed, 12 insertions(+), 4 deletions(-)
12
13diff --git a/configure.ac b/configure.ac
14index 5383cec..c29a902 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -651,10 +651,18 @@ AC_ARG_WITH([pcre],
18 )
19 AC_MSG_RESULT([$WITH_PCRE])
20
21-if test "$WITH_PCRE" != no; then
22- if test "$WITH_PCRE" != yes; then
23- PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
24- CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
25+if test "$WITH_PCRE" != "no"; then
26+ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
27+ PCRE_LIB=${PCREPKG_LIBS}
28+ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
29+ ], [
30+ AC_MSG_ERROR([pcre pkgconfig not found, install the pcre-devel package or build with --without-pcre])
31+ ])
32+
33+ if test x"$PCRE_LIB" != x; then
34+ AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
35+ AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
36+ AC_SUBST(PCRE_LIB)
37 else
38 AC_PATH_PROG([PCRECONFIG], [pcre-config])
39 if test -n "$PCRECONFIG"; then
40--
412.15.0
42
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
index 82fbaa523b..f369dce42c 100644
--- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
@@ -6,9 +6,14 @@ NAME=lighttpd
6DESC="Lighttpd Web Server" 6DESC="Lighttpd Web Server"
7OPTS="-f /etc/lighttpd/lighttpd.conf" 7OPTS="-f /etc/lighttpd/lighttpd.conf"
8 8
9configtest() {
10 "$DAEMON" $OPTS -tt || exit 1
11}
12
9case "$1" in 13case "$1" in
10 start) 14 start)
11 echo -n "Starting $DESC: " 15 echo -n "Starting $DESC: "
16 configtest
12 start-stop-daemon --start -x "$DAEMON" -- $OPTS 17 start-stop-daemon --start -x "$DAEMON" -- $OPTS
13 echo "$NAME." 18 echo "$NAME."
14 ;; 19 ;;
@@ -17,16 +22,26 @@ case "$1" in
17 start-stop-daemon --stop -x "$DAEMON" 22 start-stop-daemon --stop -x "$DAEMON"
18 echo "$NAME." 23 echo "$NAME."
19 ;; 24 ;;
20 restart|force-reload) 25 restart)
21 echo -n "Restarting $DESC: " 26 echo -n "Restarting $DESC: "
27 configtest
22 start-stop-daemon --stop -x "$DAEMON" 28 start-stop-daemon --stop -x "$DAEMON"
23 sleep 1 29 sleep 1
24 start-stop-daemon --start -x "$DAEMON" -- $OPTS 30 start-stop-daemon --start -x "$DAEMON" -- $OPTS
25 echo "$NAME." 31 echo "$NAME."
26 ;; 32 ;;
33 reload|force-reload)
34 echo -n "Reloading $DESC: "
35 configtest
36 killall -USR1 "${DAEMON##*/}"
37 echo "$NAME."
38 ;;
39 configtest)
40 configtest
41 ;;
27 *) 42 *)
28 N=/etc/init.d/$NAME 43 N=/etc/init.d/$NAME
29 echo "Usage: $N {start|stop|restart|force-reload}" >&2 44 echo "Usage: $N {start|stop|restart|reload|force-reload|configtest}" >&2
30 exit 1 45 exit 1
31 ;; 46 ;;
32esac 47esac
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
index 6e8402d242..47a6c93349 100644
--- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
@@ -16,8 +16,6 @@ server.modules = (
16# "mod_redirect", 16# "mod_redirect",
17# "mod_alias", 17# "mod_alias",
18 "mod_access", 18 "mod_access",
19# "mod_cml",
20# "mod_trigger_b4_dl",
21# "mod_auth", 19# "mod_auth",
22# "mod_status", 20# "mod_status",
23# "mod_setenv", 21# "mod_setenv",
@@ -27,11 +25,9 @@ server.modules = (
27# "mod_evhost", 25# "mod_evhost",
28# "mod_userdir", 26# "mod_userdir",
29# "mod_cgi", 27# "mod_cgi",
30# "mod_compress",
31# "mod_ssi", 28# "mod_ssi",
32# "mod_usertrack",
33# "mod_expire", 29# "mod_expire",
34# "mod_secdownload", 30# "mod_deflate",
35# "mod_rrdtool", 31# "mod_rrdtool",
36# "mod_webdav", 32# "mod_webdav",
37 "mod_accesslog" ) 33 "mod_accesslog" )
@@ -47,9 +43,6 @@ server.errorlog = "/www/logs/lighttpd.error.log"
47index-file.names = ( "index.php", "index.html", 43index-file.names = ( "index.php", "index.html",
48 "index.htm", "default.htm" ) 44 "index.htm", "default.htm" )
49 45
50## set the event-handler (read the performance section in the manual)
51# server.event-handler = "freebsd-kqueue" # needed on OS X
52
53# mimetype mapping 46# mimetype mapping
54mimetype.assign = ( 47mimetype.assign = (
55 ".pdf" => "application/pdf", 48 ".pdf" => "application/pdf",
@@ -115,7 +108,6 @@ mimetype.assign = (
115 108
116#### accesslog module 109#### accesslog module
117accesslog.filename = "/www/logs/access.log" 110accesslog.filename = "/www/logs/access.log"
118debug.log-request-handling = "enable"
119 111
120 112
121 113
@@ -127,10 +119,6 @@ debug.log-request-handling = "enable"
127# of the document-root 119# of the document-root
128url.access-deny = ( "~", ".inc" ) 120url.access-deny = ( "~", ".inc" )
129 121
130$HTTP["url"] =~ "\.pdf$" {
131 server.range-requests = "disable"
132}
133
134## 122##
135# which extensions should not be handle via static-file transfer 123# which extensions should not be handle via static-file transfer
136# 124#
@@ -177,6 +165,7 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
177#dir-listing.activate = "enable" 165#dir-listing.activate = "enable"
178 166
179## enable debugging 167## enable debugging
168#debug.log-request-header-on-error = "enable"
180#debug.log-request-header = "enable" 169#debug.log-request-header = "enable"
181#debug.log-response-header = "enable" 170#debug.log-response-header = "enable"
182#debug.log-request-handling = "enable" 171#debug.log-request-handling = "enable"
@@ -194,8 +183,9 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
194#server.groupname = "wwwrun" 183#server.groupname = "wwwrun"
195 184
196#### compress module 185#### compress module
197#compress.cache-dir = "/tmp/lighttpd/cache/compress/" 186#deflate.cache-dir = "/tmp/lighttpd/cache/compress/"
198#compress.filetype = ("text/plain", "text/html") 187#deflate.mimetypes = ("text/plain", "text/html")
188#deflate.allowed-encodings = ("gzip")
199 189
200#### proxy module 190#### proxy module
201## read proxy.txt for more info 191## read proxy.txt for more info
@@ -227,7 +217,8 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
227 217
228#### SSL engine 218#### SSL engine
229#ssl.engine = "enable" 219#ssl.engine = "enable"
230#ssl.pemfile = "server.pem" 220#ssl.pemfile = "/path/to/fullchain.pem"
221#ssl.privkey = "/path/to/privkey.pem"
231 222
232#### status module 223#### status module
233#status.status-url = "/server-status" 224#status.status-url = "/server-status"
@@ -291,19 +282,6 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
291#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) 282#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
292#setenv.add-response-header = ( "X-Secret-Message" => "42" ) 283#setenv.add-response-header = ( "X-Secret-Message" => "42" )
293 284
294## for mod_trigger_b4_dl
295# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
296# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
297# trigger-before-download.trigger-url = "^/trigger/"
298# trigger-before-download.download-url = "^/download/"
299# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
300# trigger-before-download.trigger-timeout = 10
301
302## for mod_cml
303## don't forget to add index.cml to server.indexfiles
304# cml.extension = ".cml"
305# cml.memcache-hosts = ( "127.0.0.1:11211" )
306
307#### variable usage: 285#### variable usage:
308## variable name without "." is auto prefixed by "var." and becomes "var.bar" 286## variable name without "." is auto prefixed by "var." and becomes "var.bar"
309#bar = 1 287#bar = 1
@@ -328,4 +306,4 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
328#var.a=1 306#var.a=1
329 307
330# include other config file fragments from lighttpd.d subdir 308# include other config file fragments from lighttpd.d subdir
331include_shell "find /etc/lighttpd.d -maxdepth 1 -name '*.conf' -exec cat {} \;" 309include "/etc/lighttpd.d/*.conf"
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb
deleted file mode 100644
index 705ece8e19..0000000000
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.59.bb
+++ /dev/null
@@ -1,82 +0,0 @@
1SUMMARY = "Lightweight high-performance web server"
2HOMEPAGE = "http://www.lighttpd.net/"
3BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
4
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
7
8SECTION = "net"
9RDEPENDS_${PN} = "lighttpd-module-dirlisting \
10 lighttpd-module-indexfile \
11 lighttpd-module-staticfile"
12RRECOMMENDS_${PN} = "lighttpd-module-access \
13 lighttpd-module-accesslog"
14
15SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
16 file://index.html.lighttpd \
17 file://lighttpd.conf \
18 file://lighttpd \
19 file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
20 "
21
22SRC_URI[sha256sum] = "fb953db273daef08edb6e202556cae8a3d07eed6081c96bd9903db957d1084d5"
23
24PACKAGECONFIG ??= "openssl pcre zlib \
25 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
27"
28
29PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
30PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
31PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
32PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
33PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
34PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
35PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
36PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
37PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
38PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
39PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
40PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
41PACKAGECONFIG[webdav-props] = "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
42PACKAGECONFIG[webdav-locks] = "--with-webdav-locks,--without-webdav-locks,util-linux"
43PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
44PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
45PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua"
46
47EXTRA_OECONF += "--enable-lfs --without-fam"
48
49inherit autotools pkgconfig update-rc.d gettext systemd
50
51INITSCRIPT_NAME = "lighttpd"
52INITSCRIPT_PARAMS = "defaults 70"
53
54SYSTEMD_SERVICE_${PN} = "lighttpd.service"
55
56do_install_append() {
57 install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
58 install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
59 install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd
60 install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
61
62 install -d ${D}${systemd_unitdir}/system
63 install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_unitdir}/system
64 sed -i -e 's,@SBINDIR@,${sbindir},g' \
65 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
66 -e 's,@BASE_BINDIR@,${base_bindir},g' \
67 ${D}${systemd_unitdir}/system/lighttpd.service
68 #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
69 ln -sf ${localstatedir}/log ${D}/www/logs
70 ln -sf ${localstatedir}/tmp ${D}/www/var
71}
72
73FILES_${PN} += "${sysconfdir} /www"
74
75CONFFILES_${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
76
77PACKAGES_DYNAMIC += "^lighttpd-module-.*"
78
79python populate_packages_prepend () {
80 lighttpd_libdir = d.expand('${libdir}')
81 do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
82}
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.76.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.76.bb
new file mode 100644
index 0000000000..153f451ea7
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.76.bb
@@ -0,0 +1,76 @@
1SUMMARY = "Lightweight high-performance web server"
2HOMEPAGE = "http://www.lighttpd.net/"
3DESCRIPTION = "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)"
4BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
5
6LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
8
9SECTION = "net"
10RDEPENDS:${PN} = "lighttpd-module-dirlisting"
11RRECOMMENDS:${PN} = "lighttpd-module-accesslog"
12
13SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
14 file://index.html.lighttpd \
15 file://lighttpd.conf \
16 file://lighttpd \
17 "
18
19SRC_URI[sha256sum] = "8cbf4296e373cfd0cedfe9d978760b5b05c58fdc4048b4e2bcaf0a61ac8f5011"
20
21DEPENDS = "virtual/crypt"
22
23PACKAGECONFIG ??= "openssl pcre zlib \
24 ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
25"
26
27PACKAGECONFIG[libev] = "-Dwith_libev=enabled,-Dwith_libev=disabled,libev"
28PACKAGECONFIG[mysql] = "-Dwith_mysql=enabled,-Dwith_mysql=disabled,mariadb"
29PACKAGECONFIG[ldap] = "-Dwith_ldap=enabled,-Dwith_ldap=disabled,openldap"
30PACKAGECONFIG[attr] = "-Dwith_xattr=true,-Dwith_xattr=false,attr"
31PACKAGECONFIG[openssl] = "-Dwith_openssl=true,-Dwith_openssl=false,openssl"
32PACKAGECONFIG[krb5] = "-Dwith_krb5=enabled,-Dwith_krb5=disabled,krb5"
33PACKAGECONFIG[pcre] = "-Dwith_pcre=pcre2,-Dwith_pcre=disabled,libpcre2"
34PACKAGECONFIG[zlib] = "-Dwith_zlib=enabled,-Dwith_zlib=disabled,zlib"
35PACKAGECONFIG[bzip2] = "-Dwith_bzip=enabled,-Dwith_bzip=disabled,bzip2"
36PACKAGECONFIG[webdav-props] = "-Dwith_webdav_props=enabled,-Dwith_webdav_props=disabled,libxml2 sqlite3"
37PACKAGECONFIG[webdav-locks] = "-Dwith_webdav_locks=enabled,-Dwith_webdav_locks=disabled,util-linux"
38PACKAGECONFIG[lua] = "-Dwith_lua=true,-Dwith_lua=false,lua"
39PACKAGECONFIG[zstd] = "-Dwith_zstd=enabled,-Dwith_zstd=disabled,zstd"
40
41inherit meson pkgconfig update-rc.d gettext systemd
42
43INITSCRIPT_NAME = "lighttpd"
44INITSCRIPT_PARAMS = "defaults 70"
45
46SYSTEMD_SERVICE:${PN} = "lighttpd.service"
47
48do_install:append() {
49 install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
50 install -m 0755 ${UNPACKDIR}/lighttpd ${D}${sysconfdir}/init.d
51 install -m 0644 ${UNPACKDIR}/lighttpd.conf ${D}${sysconfdir}/lighttpd
52 install -m 0644 ${UNPACKDIR}/index.html.lighttpd ${D}/www/pages/index.html
53
54 install -d ${D}${systemd_system_unitdir}
55 install -m 0644 ${S}/doc/systemd/lighttpd.service ${D}${systemd_system_unitdir}
56 sed -i -e 's,@SBINDIR@,${sbindir},g' \
57 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
58 -e 's,@BASE_BINDIR@,${base_bindir},g' \
59 ${D}${systemd_system_unitdir}/lighttpd.service
60 #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
61 ln -sf ${localstatedir}/log ${D}/www/logs
62 ln -sf ${localstatedir}/tmp ${D}/www/var
63}
64
65# bitbake.conf sets ${libdir}/${BPN}/* in FILES, which messes up the module split.
66# So we re-do the variable.
67FILES:${PN} = "${sysconfdir} /www ${sbindir}"
68
69CONFFILES:${PN} = "${sysconfdir}/lighttpd/lighttpd.conf"
70
71PACKAGES_DYNAMIC += "^lighttpd-module-.*"
72
73python populate_packages:prepend () {
74 lighttpd_libdir = d.expand('${prefix}/lib/lighttpd')
75 do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
76}