Move buildroot to bsp directory.

This commit is contained in:
2016-11-16 22:05:33 +01:00
parent 317c040ea8
commit 807ab03547
7408 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
Modify the default lighttpd configuration file to have one a starting conf
* Changed the log path to /var/log and logs filenames
* Disable IPv6
* Do not setuid to a user that doesn't exist on the system
* Disable pdf ranges fix for Adobe Reader since it uses regex and we
don't always have pcre support
* Change the network backend to writev since linux-sendfile fails on buildroot
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
[Gustavo: update for 1.4.37]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
diff -Nura lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf lighttpd-1.4.37/doc/config/conf.d/access_log.conf
--- lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf 2015-09-01 14:38:48.684673663 -0300
+++ lighttpd-1.4.37/doc/config/conf.d/access_log.conf 2015-09-01 14:38:53.975855142 -0300
@@ -9,7 +9,7 @@
##
## Default access log.
##
-accesslog.filename = log_root + "/access.log"
+accesslog.filename = log_root + "/lighttpd-access.log"
##
## The default format produces CLF compatible output.
diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/config/lighttpd.conf
--- lighttpd-1.4.37.orig/doc/config/lighttpd.conf 2015-09-01 14:38:48.684673663 -0300
+++ lighttpd-1.4.37/doc/config/lighttpd.conf 2015-09-01 14:39:40.256442492 -0300
@@ -13,8 +13,8 @@
## if you add a variable here. Add the corresponding variable in the
## chroot example aswell.
##
-var.log_root = "/var/log/lighttpd"
-var.server_root = "/srv/www"
+var.log_root = "/var/log"
+var.server_root = "/var/www"
var.state_dir = "/var/run"
var.home_dir = "/var/lib/lighttpd"
var.conf_dir = "/etc/lighttpd"
@@ -90,7 +90,7 @@
##
## Use IPv6?
##
-server.use-ipv6 = "enable"
+# server.use-ipv6 = "enable"
##
## bind to a specific IP
@@ -101,8 +101,8 @@
## Run as a different username/groupname.
## This requires root permissions during startup.
##
-server.username = "lighttpd"
-server.groupname = "lighttpd"
+server.username = "www-data"
+server.groupname = "www-data"
##
## enable core files.
@@ -112,7 +112,7 @@
##
## Document root
##
-server.document-root = server_root + "/htdocs"
+server.document-root = server_root
##
## The value for the "Server:" response field.
@@ -138,7 +138,7 @@
##
## Path to the error log file
##
-server.errorlog = log_root + "/error.log"
+server.errorlog = log_root + "/lighttpd-error.log"
##
## If you want to log to syslog you have to unset the
@@ -188,7 +188,7 @@
## sendfile - is recommended for small files.
## writev - is recommended for sending many large files
##
-server.network-backend = "sendfile"
+server.network-backend = "writev"
##
## As lighttpd is a single-threaded server, its main resource limit is
@@ -311,9 +311,9 @@
## disable range requests for pdf files
## workaround for a bug in the Acrobat Reader plugin.
##
-$HTTP["url"] =~ "\.pdf$" {
- server.range-requests = "disable"
-}
+# $HTTP["url"] =~ "\.pdf$" {
+# server.range-requests = "disable"
+# }
##
## url handling modules (rewrite, redirect)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,59 @@
comment "lighttpd needs a toolchain w/ dynamic library"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS
config BR2_PACKAGE_LIGHTTPD
bool "lighttpd"
depends on BR2_USE_MMU # fork()
depends on !BR2_STATIC_LIBS
help
lighttpd a secure, fast, compliant and very flexible web-server
which has been optimized for high-performance environments. It
has a very low memory footprint compared to other webservers and
takes care of cpu-load. Its advanced feature-set (FastCGI, CGI,
Auth, Output-Compression, URL-Rewriting and many more) make
lighttpd the perfect webserver-software for every server that
is suffering load problems.
http://www.lighttpd.net/
if BR2_PACKAGE_LIGHTTPD
config BR2_PACKAGE_LIGHTTPD_OPENSSL
bool "openssl support"
select BR2_PACKAGE_OPENSSL
help
Enable OpenSSL support for lighttpd.
config BR2_PACKAGE_LIGHTTPD_ZLIB
bool "zlib support"
select BR2_PACKAGE_ZLIB
help
Enable zlib support for lighttpd mod_compress.
config BR2_PACKAGE_LIGHTTPD_BZIP2
bool "bzip2 support"
select BR2_PACKAGE_BZIP2
help
Enable bzip2 support for lighttpd mod_compress.
config BR2_PACKAGE_LIGHTTPD_PCRE
bool "pcre support"
select BR2_PACKAGE_PCRE
help
Enable PCRE support. Needed to support mod_rewrite
config BR2_PACKAGE_LIGHTTPD_WEBDAV
bool "webdav support"
select BR2_PACKAGE_LIBXML2
select BR2_PACKAGE_SQLITE
help
Enable webdav support. Needed to support mod_webdav
config BR2_PACKAGE_LIGHTTPD_LUA
bool "lua support"
depends on BR2_PACKAGE_LUA
help
Enable Lua support. Needed to support mod_magnet
endif

View File

@@ -0,0 +1,37 @@
#!/bin/sh
#
# Starts lighttpd.
#
start() {
printf "Starting lighttpd: "
start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf
echo "OK"
}
stop() {
printf "Stopping lighttpd: "
start-stop-daemon -K -q -p /var/run/lighttpd.pid
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,2 @@
# From http://www.lighttpd.net/
sha256 7eb9a1853c3d6dd5851682b0733a729ba4158d6bdff80974d5ef5f1f6887365b lighttpd-1.4.39.tar.xz

View File

@@ -0,0 +1,95 @@
################################################################################
#
# lighttpd
#
################################################################################
LIGHTTPD_VERSION_MAJOR = 1.4
LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).39
LIGHTTPD_SOURCE = lighttpd-$(LIGHTTPD_VERSION).tar.xz
LIGHTTPD_SITE = http://download.lighttpd.net/lighttpd/releases-$(LIGHTTPD_VERSION_MAJOR).x
LIGHTTPD_LICENSE = BSD-3c
LIGHTTPD_LICENSE_FILES = COPYING
LIGHTTPD_DEPENDENCIES = host-pkgconf
LIGHTTPD_CONF_OPTS = \
--libdir=/usr/lib/lighttpd \
--libexecdir=/usr/lib
ifeq ($(BR2_PACKAGE_LIGHTTPD_OPENSSL),y)
LIGHTTPD_DEPENDENCIES += openssl
LIGHTTPD_CONF_OPTS += --with-openssl
else
LIGHTTPD_CONF_OPTS += --without-openssl
endif
ifeq ($(BR2_PACKAGE_LIGHTTPD_ZLIB),y)
LIGHTTPD_DEPENDENCIES += zlib
LIGHTTPD_CONF_OPTS += --with-zlib
else
LIGHTTPD_CONF_OPTS += --without-zlib
endif
ifeq ($(BR2_PACKAGE_LIGHTTPD_BZIP2),y)
LIGHTTPD_DEPENDENCIES += bzip2
LIGHTTPD_CONF_OPTS += --with-bzip2
else
LIGHTTPD_CONF_OPTS += --without-bzip2
endif
ifeq ($(BR2_PACKAGE_LIGHTTPD_PCRE),y)
LIGHTTPD_CONF_ENV = PCRECONFIG=$(STAGING_DIR)/usr/bin/pcre-config
LIGHTTPD_DEPENDENCIES += pcre
LIGHTTPD_CONF_OPTS += --with-pcre
else
LIGHTTPD_CONF_OPTS += --without-pcre
endif
ifeq ($(BR2_PACKAGE_LIGHTTPD_WEBDAV),y)
LIGHTTPD_DEPENDENCIES += libxml2 sqlite
LIGHTTPD_CONF_OPTS += --with-webdav-props --with-webdav-locks
else
LIGHTTPD_CONF_OPTS += --without-webdav-props --without-webdav-locks
endif
ifeq ($(BR2_PACKAGE_LIGHTTPD_LUA),y)
LIGHTTPD_DEPENDENCIES += lua
LIGHTTPD_CONF_OPTS += --with-lua
else
LIGHTTPD_CONF_OPTS += --without-lua
endif
define LIGHTTPD_INSTALL_CONFIG
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/lighttpd/conf.d
$(INSTALL) -d -m 0755 $(TARGET_DIR)/var/www
$(INSTALL) -D -m 0644 $(@D)/doc/config/lighttpd.conf \
$(TARGET_DIR)/etc/lighttpd/lighttpd.conf
$(INSTALL) -D -m 0644 $(@D)/doc/config/modules.conf \
$(TARGET_DIR)/etc/lighttpd/modules.conf
$(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/access_log.conf \
$(TARGET_DIR)/etc/lighttpd/conf.d/access_log.conf
$(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/debug.conf \
$(TARGET_DIR)/etc/lighttpd/conf.d/debug.conf
$(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/dirlisting.conf \
$(TARGET_DIR)/etc/lighttpd/conf.d/dirlisting.conf
$(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/mime.conf \
$(TARGET_DIR)/etc/lighttpd/conf.d/mime.conf
endef
LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
define LIGHTTPD_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/lighttpd/S50lighttpd \
$(TARGET_DIR)/etc/init.d/S50lighttpd
endef
define LIGHTTPD_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/doc/systemd/lighttpd.service \
$(TARGET_DIR)/usr/lib/systemd/system/lighttpd.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/lighttpd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service
endef
$(eval $(autotools-package))