initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,85 @@
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
* 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 = "/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 lighttpd to serve requests on sockets received from systemd
@@ -118,7 +118,7 @@
##
## Document root
##
-server.document-root = server_root + "/htdocs"
+server.document-root = server_root
##
## The value for the "Server:" response field.
@@ -144,7 +144,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
@@ -195,7 +195,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
+67
View File
@@ -0,0 +1,67 @@
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.
https://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_PAM
bool "pam authentication support"
default y
depends on BR2_PACKAGE_LINUX_PAM
help
Enable PAM authentication 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
+43
View File
@@ -0,0 +1,43 @@
#!/bin/sh
#
# Starts lighttpd.
#
NAME=lighttpd
DAEMON=/usr/sbin/$NAME
PID_FILE="/var/run/$NAME.pid"
CONF_FILE="/etc/$NAME/$NAME.conf"
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
start() {
printf "Starting lighttpd: "
start-stop-daemon -S -q -p $PID_FILE --exec $DAEMON -- -f $CONF_FILE
echo "OK"
}
stop() {
printf "Stopping lighttpd: "
start-stop-daemon -K -q -p $PID_FILE
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 $?
+4
View File
@@ -0,0 +1,4 @@
# From https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.61.sha256sum
sha256 43f0d63d04a1b7c5b8aab07e0612e44ccad0afc0614bab784c5b019872363432 lighttpd-1.4.61.tar.xz
# Locally calculated
sha256 5c98cad2fbaf5c5e2562bcbab401a7c557c1bb1bac9914ecc63730925052fb13 COPYING
+109
View File
@@ -0,0 +1,109 @@
################################################################################
#
# lighttpd
#
################################################################################
LIGHTTPD_VERSION_MAJOR = 1.4
LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).61
LIGHTTPD_SOURCE = lighttpd-$(LIGHTTPD_VERSION).tar.xz
LIGHTTPD_SITE = http://download.lighttpd.net/lighttpd/releases-$(LIGHTTPD_VERSION_MAJOR).x
LIGHTTPD_LICENSE = BSD-3-Clause
LIGHTTPD_LICENSE_FILES = COPYING
LIGHTTPD_CPE_ID_VENDOR = lighttpd
LIGHTTPD_DEPENDENCIES = host-pkgconf
# Issue in configure script provided in tarball
LIGHTTPD_AUTORECONF = YES
LIGHTTPD_CONF_OPTS = \
--without-wolfssl \
--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_PAM),y)
LIGHTTPD_DEPENDENCIES += linux-pam
LIGHTTPD_CONF_OPTS += --with-pam
else
LIGHTTPD_CONF_OPTS += --without-pam
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
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
LIGHTTPD_CONF_OPTS += --with-webdav-locks
LIGHTTPD_DEPENDENCIES += util-linux
else
LIGHTTPD_CONF_OPTS += --without-webdav-locks
endif
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
$(INSTALL) -D -m 644 package/lighttpd/lighttpd_tmpfiles.conf \
$(TARGET_DIR)/usr/lib/tmpfiles.d/lighttpd.conf
endef
$(eval $(autotools-package))
+2
View File
@@ -0,0 +1,2 @@
f /var/log/lighttpd-access.log 0640 www-data www-data -
f /var/log/lighttpd-error.log 0640 www-data www-data -