diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-webserver/recipes-httpd | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-webserver/recipes-httpd')
19 files changed, 378 insertions, 154 deletions
diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb index 0beb3ed0..3cbab22c 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb @@ -1,6 +1,6 @@ SUMMARY = "Websocket module for Apache web server" DESCRIPTION = "Process requests using the WebSocket protocol (RFC 6455)" -HOMEPAGE = "https://github.com/jchampio/${PN}/" +HOMEPAGE = "https://github.com/jchampio/apache-websocket/" SECTION = "net" LICENSE = "Apache-2.0" @@ -13,9 +13,9 @@ RDEPENDS_${PN} += "apache2" # fork contains patches from the modules ML and fixes CVE compliance issues SRC_URI = "git://github.com/jchampio/apache-websocket.git" -SRCREV = "f5230d8c520dccf8631da94bf90c23f3c1100dcc" +SRCREV = "6968083264b90b89b1b9597a4ca03ba29e7ea2e1" -PV = "0.1.1" +PV = "0.1.1+git${SRCPV}" S = "${WORKDIR}/git" @@ -25,9 +25,9 @@ EXTRA_OECONF = "APACHECTL=${STAGING_DIR_TARGET}${sbindir}/apachectl \ LIBTOOL=${STAGING_DIR_TARGET}${bindir_crossscripts}/${HOST_SYS}-libtool" do_install() { - install -d ${D}${libdir}/apache2/modules/ - install ${B}/.libs/mod_websocket.so ${D}${libdir}/apache2/modules/ + install -d ${D}${libexecdir}/apache2/modules + install -m 755 ${B}/.libs/mod_websocket.so ${D}${libexecdir}/apache2/modules } -FILES_${PN} += " ${libdir}/apache2/modules/* " -FILES_${PN}-dbg += " ${libdir}/apache2/modules/.debug/* " +FILES_${PN} += " ${libexecdir}/apache2/modules/* " +FILES_${PN}-dbg += " ${libexecdir}/apache2/modules/.debug/* " diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0001-support-apxs.in-force-destdir-to-be-empty-string.patch b/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0001-support-apxs.in-force-destdir-to-be-empty-string.patch new file mode 100644 index 00000000..bdedd146 --- /dev/null +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/0001-support-apxs.in-force-destdir-to-be-empty-string.patch @@ -0,0 +1,49 @@ +From 705c0a7e9d9c1e64ee09fc0b54f6b5a4e27de1ca Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <trevor.gamblin@windriver.com> +Date: Fri, 17 Apr 2020 06:31:35 -0700 +Subject: [PATCH] support/apxs.in: force destdir to be empty string + +If destdir is assigned to anything other than the empty string, the +search path for apache2 config files is appended to itself, and +related packages like apache-websocket will be unable to locate them: + +| cannot open +/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot//usr/share/apache2/build/config_vars.mk: +No such file or directory at +/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot/usr/bin/crossscripts/apxs +line 213. + +Ensure that it is always the empty string so that apache-websocket +is able to find the required config files. + +Upstream-Status: Inappropriate (embedded-specific) + +Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> +--- + support/apxs.in | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/support/apxs.in b/support/apxs.in +index 65e1288527..9d96e33728 100644 +--- a/support/apxs.in ++++ b/support/apxs.in +@@ -28,10 +28,12 @@ package apxs; + # is the empty string. + + my $destdir = ""; +-my $ddi = rindex($0, "@exp_bindir@"); +-if ($ddi >= 0) { +- $destdir = substr($0, 0, $ddi); +-} ++# Comment out assignment of destdir so that it doesn't affect bitbake ++# cross-compilation setup ++#my $ddi = rindex($0, "@exp_bindir@"); ++#if ($ddi >= 0) { ++# $destdir = substr($0, 0, $ddi); ++#} + + my %config_vars = (); + +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch b/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch new file mode 100644 index 00000000..61669e36 --- /dev/null +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch @@ -0,0 +1,34 @@ +From 5412077c398dec74321388fe6e593a44c4c80de6 Mon Sep 17 00:00:00 2001 +From: echo <fei.geng@windriver.com> +Date: Tue, 28 Apr 2009 03:11:06 +0000 +Subject: [PATCH] Fix perl install directory to /usr/bin + +Upstream-Status: Inappropriate [configuration] + +Add back this patch. Without this patch, apxs's shebang will use +perl under hosttools, which can be too long for shebang, and cause +error: +bad interpreter: No such file or directory + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- + configure.in | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/configure.in b/configure.in +index d828512..be7bd25 100644 +--- a/configure.in ++++ b/configure.in +@@ -855,10 +855,7 @@ AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf", + AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "${rel_sysconfdir}/mime.types", + [Location of the MIME types config file, relative to the Apache root directory]) + +-perlbin=`$ac_aux_dir/PrintPath perl` +-if test "x$perlbin" = "x"; then +- perlbin="/replace/with/path/to/perl/interpreter" +-fi ++perlbin='/usr/bin/perl' + AC_SUBST(perlbin) + + dnl If we are running on BSD/OS, we need to use the BSD .include syntax. diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb index 543d1246..a7083d80 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb @@ -13,6 +13,8 @@ SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \ file://0005-replace-lynx-to-curl-in-apachectl-script.patch \ file://0006-apache2-fix-the-race-issue-of-parallel-installation.patch \ file://0007-apache2-allow-to-disable-selinux-support.patch \ + file://apache-configure_perlbin.patch \ + file://0001-support-apxs.in-force-destdir-to-be-empty-string.patch \ " SRC_URI_append_class-target = " \ @@ -23,9 +25,9 @@ SRC_URI_append_class-target = " \ file://volatiles.04_apache2 \ " -LIC_FILES_CHKSUM = "file://LICENSE;md5=d52d0fd0bc788f068e647116c01ddfcd" -SRC_URI[md5sum] = "dfc674f8f454e3bc2d4ccd73ad3b5f1e" -SRC_URI[sha256sum] = "133d48298fe5315ae9366a0ec66282fa4040efa5d566174481077ade7d18ea40" +LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3" +SRC_URI[md5sum] = "791c986b1e70fe61eb44060aacc89a64" +SRC_URI[sha256sum] = "a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43" S = "${WORKDIR}/httpd-${PV}" @@ -52,7 +54,7 @@ EXTRA_OECONF_class-target = "\ --sysconfdir=${sysconfdir}/${BPN} \ --datadir=${datadir}/${BPN} \ --libdir=${libdir} \ - --libexecdir=${libdir}/${BPN}/modules \ + --libexecdir=${libexecdir}/${BPN}/modules \ --localstatedir=${localstatedir} \ --enable-ssl \ --with-dbm=sdbm \ @@ -77,7 +79,7 @@ EXTRA_OECONF_class-native = "\ " do_configure_prepend() { - sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libdir}/cgi-bin:g' ${S}/config.layout + sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' ${S}/config.layout } do_install_append_class-target() { @@ -138,7 +140,7 @@ do_install_append_class-target() { install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2 fi - rm -rf ${D}${localstatedir} + rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars* chown -R root:root ${D} } @@ -180,16 +182,22 @@ PACKAGES = "${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}" CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \ ${sysconfdir}/${BPN}/magic \ - ${sysconfdir}/${BPN}/mime.types" + ${sysconfdir}/${BPN}/mime.types \ + ${sysconfdir}/${BPN}/extra/*" # We override here rather than append so that .so links are # included in the runtime package rather than here (-dev) -# and to get icons, error into the -dev package -FILES_${PN}-dev = "${datadir}/${BPN}/icons \ +# and to get build, icons, error into the -dev package +FILES_${PN}-dev = "${datadir}/${BPN}/build \ + ${datadir}/${BPN}/icons \ ${datadir}/${BPN}/error \ ${includedir}/${BPN} \ + ${bindir}/apxs \ " +# Add the manual to -doc +FILES_${PN}-doc += " ${datadir}/${BPN}/manual" + FILES_${PN}-scripts += "${bindir}/dbmmanage" # Override this too - here is the default, less datadir @@ -206,3 +214,13 @@ RDEPENDS_${PN}-scripts += "perl ${PN}" RDEPENDS_${PN}-dev = "perl" BBCLASSEXTEND = "native" + +pkg_postinst_${PN}() { + if [ -z "$D" ]; then + if type systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi + fi +} diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee/0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch b/external/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee/0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch new file mode 100644 index 00000000..0f438427 --- /dev/null +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee/0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch @@ -0,0 +1,47 @@ +From c73415021f3f3b2b30062ab74b25fe49c51c2242 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 10 Nov 2019 15:59:44 -0800 +Subject: [PATCH] common-internal.h: Define LLONG_MAX if undefined + +time_t can also be long long type, therefore check for that as fallback +Fixes build on 32bit hosts where time_t is fixed for Y2K38 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + cherokee/common-internal.h | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/cherokee/common-internal.h b/cherokee/common-internal.h +index 5c28da97..5646ec0f 100644 +--- a/cherokee/common-internal.h ++++ b/cherokee/common-internal.h +@@ -222,6 +222,16 @@ char *strcasestr(char *s, char *find); + # endif + #endif + ++/* Long Long limit ++ */ ++#ifndef LLONG_MAX ++# if (__SIZEOF_LONG_LONG__ == 8) ++# define LLONG_MAX 0x7fffffffffffffffLL ++# else ++# error "Can't define LLONG_MAX" ++# endif ++#endif ++ + /* time_t limit + */ + #ifndef TIME_MAX +@@ -229,6 +239,8 @@ char *strcasestr(char *s, char *find); + # define TIME_MAX ((time_t)INT_MAX) + # elif (SIZEOF_TIME_T == SIZEOF_LONG) + # define TIME_MAX ((time_t)LONG_MAX) ++# elif (SIZEOF_TIME_T == __SIZEOF_LONG_LONG__) ++# define TIME_MAX ((time_t)LLONG_MAX) + # else + # error "Can't define TIME_MAX" + # endif +-- +2.24.0 + diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb index 3f7eae4c..74244679 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "unzip-native libpcre openssl mysql5 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -SRCREV = "75f041e2255e6dd0692db2f14611c2647dbe8425" +SRCREV = "9a75e65b876bcc376cb6b379dca1f7ce4a055c59" PV = "1.2.104+git${SRCPV}" SRC_URI = "git://github.com/cherokee/webserver \ file://cherokee.init \ @@ -15,11 +15,12 @@ SRC_URI = "git://github.com/cherokee/webserver \ file://cherokee-install-configured.py-once.patch \ file://0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch \ file://0001-make-Do-not-build-po-files.patch \ + file://0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch \ " S = "${WORKDIR}/git" -inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd pythonnative +inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative", "", d)} PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav" @@ -69,3 +70,8 @@ RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" SYSTEMD_SERVICE_${PN} = "cherokee.service" + +python() { + if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): + raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') +} diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.7.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.10.bb index d6c449b5..ed3df193 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.7.bb +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.10.bb @@ -10,8 +10,8 @@ SRC_URI = "http://hiawatha-webserver.org/files/${BP}.tar.gz \ file://hiawatha-init \ file://hiawatha.service " -SRC_URI[md5sum] = "581aa71c831172ba06910deda717302f" -SRC_URI[sha256sum] = "363e99d84a85dafbb74bcc30b3e30286053ec2abbc7afe08cd87193611735f74" +SRC_URI[md5sum] = "3bf2c12c7037ecc3dfdbec72e7a2f04f" +SRC_URI[sha256sum] = "b5e46f5757fa647e77d21d24f7eea912d59f26a75558cba780b45c1c3a33a4d9" INITSCRIPT_NAME = "hiawatha" INITSCRIPT_PARAMS = "defaults 70" diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/default_server.site b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/default_server.site new file mode 100644 index 00000000..7a8a215c --- /dev/null +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/default_server.site @@ -0,0 +1,14 @@ +# Default server configuration +server { + listen 80 default_server; + listen [::]:80 default_server; + + root /var/www/localhost/html; + + index index.html index.htm; + + server_name _; + + # redirect server error pages to the static page /50x.html + error_page 500 502 503 504 /50x.html; +} diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-fix-pidfile.patch b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-fix-pidfile.patch new file mode 100644 index 00000000..90159a66 --- /dev/null +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-fix-pidfile.patch @@ -0,0 +1,99 @@ +Description: Fix NGINX pidfile handling +Author: Tj <ubuntu@iam.tj> +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864 +Last-Update: 2019-06-04 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ + +Upstream-Status: Pending + +This patch is from ubuntu, https://github.com/aroth-arsoft/pkg-nginx/blob +/master/debian/patches/nginx-fix-pidfile.patch, for fix below +error info: +nginx.service: failed to parse pid from file /run/nginx/nginx.pid: +invalid argument + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +diff --git a/src/core/nginx.c b/src/core/nginx.c +index 9fcb0eb2..083eba1d 100644 +--- a/src/core/nginx.c ++++ b/src/core/nginx.c +@@ -338,14 +338,21 @@ main(int argc, char *const *argv) + ngx_process = NGX_PROCESS_MASTER; + } + ++ /* tell-tale to detect if this is parent or child process */ ++ ngx_int_t child_pid = NGX_BUSY; ++ + #if !(NGX_WIN32) + + if (ngx_init_signals(cycle->log) != NGX_OK) { + return 1; + } + ++ /* tell-tale that this code has been executed */ ++ child_pid--; ++ + if (!ngx_inherited && ccf->daemon) { +- if (ngx_daemon(cycle->log) != NGX_OK) { ++ child_pid = ngx_daemon(cycle->log); ++ if (child_pid == NGX_ERROR) { + return 1; + } + +@@ -358,8 +365,19 @@ main(int argc, char *const *argv) + + #endif + +- if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) { +- return 1; ++ /* If ngx_daemon() returned the child's PID in the parent process ++ * after the fork() set ngx_pid to the child_pid, which gets ++ * written to the PID file, then exit. ++ * For NGX_WIN32 always write the PID file ++ * For others, only write it from the parent process */ ++ if (child_pid < NGX_OK || child_pid > NGX_OK) { ++ ngx_pid = child_pid > NGX_OK ? child_pid : ngx_pid; ++ if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) { ++ return 1; ++ } ++ } ++ if (child_pid > NGX_OK) { ++ exit(0); + } + + if (ngx_log_redirect_stderr(cycle) != NGX_OK) { +diff --git a/src/os/unix/ngx_daemon.c b/src/os/unix/ngx_daemon.c +index 385c49b6..3719854c 100644 +--- a/src/os/unix/ngx_daemon.c ++++ b/src/os/unix/ngx_daemon.c +@@ -7,14 +7,17 @@ + + #include <ngx_config.h> + #include <ngx_core.h> ++#include <unistd.h> + + + ngx_int_t + ngx_daemon(ngx_log_t *log) + { + int fd; ++ /* retain the return value for passing back to caller */ ++ pid_t pid_child = fork(); + +- switch (fork()) { ++ switch (pid_child) { + case -1: + ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, "fork() failed"); + return NGX_ERROR; +@@ -23,7 +26,8 @@ ngx_daemon(ngx_log_t *log) + break; + + default: +- exit(0); ++ /* let caller do the exit() */ ++ return pid_child; + } + + ngx_parent = ngx_pid; diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.conf b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.conf index 69d3a2ad..6d219422 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.conf +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.conf @@ -1,118 +1,47 @@ - user www; -worker_processes 1; - -error_log /var/log/nginx/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; - -pid /run/nginx/nginx.pid; - +worker_processes 1; +pid /run/nginx/nginx.pid; +include /etc/nginx/modules-enabled/*.conf; events { - worker_connections 1024; + worker_connections 768; + # multi_accept on; } - http { - include mime.types; + # Basic Settings + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + # server_tokens off; + + # server_names_hash_bucket_size 64; + # server_name_in_redirect off; + + include /etc/nginx/mime.types; default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - - server { - listen 80; - server_name localhost; - - #charset koi8-r; - - #access_log logs/host.access.log main; - - location / { - root /var/www/localhost/html; - index index.html index.htm; - } - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /var/www/localhost/html; - } - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - #location ~ \.php$ { - # root html; - # fastcgi_pass 127.0.0.1:9000; - # fastcgi_index index.php; - # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - # include fastcgi_params; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443; - # server_name localhost; - - # ssl on; - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; + # SSL Settings + ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE + ssl_prefer_server_ciphers on; - # ssl_session_timeout 5m; + ## Logging + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; - # ssl_protocols SSLv2 SSLv3 TLSv1; - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; + ## Gzip settings + gzip on; - # location / { - # root html; - # index index.html index.htm; - # } - #} + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + ## Virtual Host Configs + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; } diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.service b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.service index ce990617..9a6ca965 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.service +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.service @@ -1,11 +1,15 @@ [Unit] -Description=Nginx Server -After=network.target +Description=The NGINX HTTP and reverse proxy server +After=syslog.target network.target remote-fs.target nss-lookup.target + [Service] Type=forking PIDFile=/run/nginx/nginx.pid +ExecStartPre=@SBINDIR@/nginx -t ExecStart=@SBINDIR@/nginx -ExecStop=@SBINDIR@/nginx -s stop ExecReload=@SBINDIR@/nginx -s reload +ExecStop=@BASE_BINDIR@/kill -s QUIT $MAINPID +PrivateTmp=true + [Install] WantedBy=multi-user.target diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/proxy_params b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/proxy_params new file mode 100644 index 00000000..df75bc5d --- /dev/null +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/proxy_params @@ -0,0 +1,4 @@ +proxy_set_header Host $http_host; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +proxy_set_header X-Forwarded-Proto $scheme; diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc index 24c2cedf..de080a2b 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc @@ -16,9 +16,12 @@ SRC_URI = " \ file://nginx-cross.patch \ file://0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch \ file://nginx.conf \ + file://default_server.site \ + file://proxy_params \ file://nginx.init \ file://nginx-volatile.conf \ file://nginx.service \ + file://nginx-fix-pidfile.patch \ " inherit siteinfo update-rc.d useradd systemd @@ -38,6 +41,7 @@ PACKAGECONFIG ??= "ssl" PACKAGECONFIG[http2] = "--with-http_v2_module,," PACKAGECONFIG[ssl] = "--with-http_ssl_module,,openssl" +PACKAGECONFIG[http-auth-request] = "--with-http_auth_request_module,," do_configure () { if [ "${SITEINFO_BITS}" = "64" ]; then @@ -86,13 +90,13 @@ do_install () { install -d ${D}${sysconfdir}/tmpfiles.d echo "d /run/${BPN} - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - echo "d /${localstatedir}/log/${BPN} 0755 root root -" \ + echo "d ${localstatedir}/log/${BPN} 0755 root root -" \ >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf fi install -d ${D}${sysconfdir}/${BPN} - ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run + lnr ${D}${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run install -d ${D}${NGINX_WWWDIR} - mv ${D}/usr/html ${D}${NGINX_WWWDIR}/ + mv ${D}${exec_prefix}/html ${D}${NGINX_WWWDIR}/ chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR} install -d ${D}${sysconfdir}/init.d @@ -102,23 +106,41 @@ do_install () { install -d ${D}${sysconfdir}/nginx install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf + sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/nginx/nginx.conf sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf + install -Dm 0644 ${WORKDIR}/default_server.site ${D}${sysconfdir}/nginx/sites-available/default_server + sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/sites-available/default_server install -d ${D}${sysconfdir}/nginx/sites-enabled + ln -s ../sites-available/default_server ${D}${sysconfdir}/nginx/sites-enabled/ + + install -m 0644 ${WORKDIR}/proxy_params ${D}${sysconfdir}/nginx/proxy_params install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx sed -i 's,@NGINX_USER@,${NGINX_USER},g' ${D}${sysconfdir}/default/volatiles/99_nginx + # cleanup configuration folder + rm ${D}${sysconfdir}/nginx/*.default + + # add additional configuration folders + install -d ${D}${sysconfdir}/nginx/modules-available + install -d ${D}${sysconfdir}/nginx/modules-enabled + install -d ${D}${sysconfdir}/nginx/server-conf.d + install -d ${D}${sysconfdir}/nginx/conf.d + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then install -d ${D}${systemd_unitdir}/system install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BASE_BINDIR@,${base_bindir},g' \ ${D}${systemd_unitdir}/system/nginx.service fi + + rm -rf ${D}${localstatedir}/log/ } pkg_postinst_${PN} () { diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.15.1.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.15.1.bb deleted file mode 100644 index 0f1ba8f6..00000000 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.15.1.bb +++ /dev/null @@ -1,10 +0,0 @@ -require nginx.inc - -# 1.14.x branch is the current stable branch, the recommended default -# 1.15.x is the current mainline branches containing all new features -DEFAULT_PREFERENCE = "-1" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=3691402cc54ce09f800ca348634a2dfe" - -SRC_URI[md5sum] = "2dd5a265c54a76b699443931d80a61b9" -SRC_URI[sha256sum] = "c7206858d7f832b8ef73a45c9b8f8e436bcb1ee88db2bc85b8e438ecec9d5460" diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.15.2.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.15.2.bb deleted file mode 100644 index 3694f5b5..00000000 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.15.2.bb +++ /dev/null @@ -1,6 +0,0 @@ -require nginx.inc - -LIC_FILES_CHKSUM = "file://LICENSE;md5=3691402cc54ce09f800ca348634a2dfe" - -SRC_URI[md5sum] = "d063f746d3dc4298aed9c518f1684166" -SRC_URI[sha256sum] = "eeba09aecfbe8277ac33a5a2486ec2d6731739f3c1c701b42a0c3784af67ad90" diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.16.1.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.16.1.bb new file mode 100644 index 00000000..20764257 --- /dev/null +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.16.1.bb @@ -0,0 +1,6 @@ +require nginx.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=52e384aaac868b755b93ad5535e2d075" + +SRC_URI[md5sum] = "45a80f75336c980d240987badc3dcf60" +SRC_URI[sha256sum] = "f11c2a6dd1d3515736f0324857957db2de98be862461b5a542a3ac6188dbe32b" diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.17.8.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.17.8.bb new file mode 100644 index 00000000..3d2a5edd --- /dev/null +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.17.8.bb @@ -0,0 +1,10 @@ +require nginx.inc + +# 1.16.x branch is the current stable branch, the recommended default +# 1.17.x is the current mainline branches containing all new features +DEFAULT_PREFERENCE = "-1" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=52e384aaac868b755b93ad5535e2d075" + +SRC_URI[md5sum] = "29cd861a13aae69a058cbabaae86177b" +SRC_URI[sha256sum] = "97d23ecf6d5150b30e284b40e8a6f7e3bb5be6b601e373a4d013768d5a25965b" diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.6.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.7.bb index a6b1ff0f..d13ef74f 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.6.bb +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.7.bb @@ -11,8 +11,8 @@ SRC_URI = "http://www.nazgul.ch/dev/${BPN}-${PV}.tar.gz \ file://nostromo \ " -SRC_URI[md5sum] = "27aa241d78ff78920354c3e03a5026ea" -SRC_URI[sha256sum] = "541494ecfeafec58c0876ccc90cc23b06e0144f6f42029af44c7cdb1f411e8eb" +SRC_URI[md5sum] = "6189714845b3ad5d0fc490f8cf48dacf" +SRC_URI[sha256sum] = "33c635f317fb441e10d5297bb4218ae0ea62c48f2fc3029c08f5d2167c6cdfca" TARGET_CC_ARCH += "${LDFLAGS}" diff --git a/external/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb b/external/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb index 8632b97f..560dd9b6 100644 --- a/external/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb +++ b/external/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb @@ -6,18 +6,16 @@ LIC_FILES_CHKSUM = "file://src/thttpd.c;beginline=1;endline=26;md5=0c5762c2c34dc DEPENDS += "base-passwd virtual/crypt" -SRC_URI = "https://github.com/blueness/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ +SRCREV = "2845bf5bff2b820d2336c8c8061cbfc5f271e720" +SRC_URI = "git://github.com/blueness/${BPN} \ file://thttpd.service \ file://thttpd.conf \ file://init" -SRC_URI[md5sum] = "3cda1b6c8c8542b1510eadb8e540d8b6" -SRC_URI[sha256sum] = "a1ee2806432eaf5b5dd267a0523701f9f1fa00fefd499d5bec42165a41e05846" - UPSTREAM_CHECK_URI = "https://github.com/blueness/sthttpd/releases/" UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz" -S = "${WORKDIR}/sthttpd-${PV}" +S = "${WORKDIR}/git" inherit autotools update-rc.d systemd update-alternatives |