From c56ad520295692ba883f3d079ba835b252b2e144 Mon Sep 17 00:00:00 2001 From: Jens Rehsack Date: Wed, 14 Oct 2015 20:51:38 +0200 Subject: nginx: update to 1.9.5 Signed-off-by: Martin Jansa --- .../recipes-httpd/nginx/files/nginx-cross.patch | 17 +-- meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb | 131 --------------------- meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb | 131 +++++++++++++++++++++ 3 files changed, 140 insertions(+), 139 deletions(-) delete mode 100644 meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb create mode 100644 meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch b/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch index 5f899a1d84..46792ba067 100644 --- a/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch +++ b/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch @@ -122,7 +122,7 @@ diff -uraN nginx-1.0.11.orig/auto/options nginx-1.0.11/auto/options diff -uraN nginx-1.0.11.orig/auto/types/sizeof nginx-1.0.11/auto/types/sizeof --- nginx-1.0.11.orig/auto/types/sizeof 2006-06-28 11:00:26.000000000 -0500 +++ nginx-1.0.11/auto/types/sizeof 2011-12-27 13:56:42.323370040 -0600 -@@ -11,9 +11,12 @@ +@@ -12,9 +12,12 @@ END @@ -137,14 +137,14 @@ diff -uraN nginx-1.0.11.orig/auto/types/sizeof nginx-1.0.11/auto/types/sizeof #include #include -@@ -31,19 +34,20 @@ +@@ -33,20 +36,20 @@ END -ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \ - -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs" + ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \ -+ -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs" ++ -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs" -eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1" + eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1" @@ -155,17 +155,18 @@ diff -uraN nginx-1.0.11.orig/auto/types/sizeof nginx-1.0.11/auto/types/sizeof - echo " $ngx_size bytes" -fi + if [ -x $NGX_AUTOTEST ]; then -+ ngx_size=`$NGX_AUTOTEST` -+ echo " $ngx_size bytes" ++ ngx_size=`$NGX_AUTOTEST` ++ echo " $ngx_size bytes" + fi --rm -f $NGX_AUTOTEST -+ rm -f $NGX_AUTOTEST +-rm -rf $NGX_AUTOTEST* +- ++ rm -rf $NGX_AUTOTEST* +fi - case $ngx_size in + 4) diff -uraN nginx-1.0.11.orig/auto/unix nginx-1.0.11/auto/unix --- nginx-1.0.11.orig/auto/unix 2011-12-14 07:34:16.000000000 -0600 +++ nginx-1.0.11/auto/unix 2011-12-27 13:56:42.327370060 -0600 diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb deleted file mode 100644 index 27e4749d6d..0000000000 --- a/meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb +++ /dev/null @@ -1,131 +0,0 @@ -SUMMARY = "HTTP and reverse proxy server" - -DESCRIPTION = "Nginx is a web server and a reverse proxy server for \ -HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high \ -concurrency, performance and low memory usage." - -HOMEPAGE = "http://nginx.org/" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=917bfdf005ffb6fd025550414ff05a9f" -SECTION = "net" - -DEPENDS = "libpcre gzip openssl" - -SRC_URI = " \ - http://nginx.org/download/nginx-${PV}.tar.gz \ - file://nginx-cross.patch \ - file://nginx.conf \ - file://nginx.init \ - file://nginx-volatile.conf \ - file://nginx.service \ -" -SRC_URI[md5sum] = "5dfaba1cbeae9087f3949860a02caa9f" -SRC_URI[sha256sum] = "7c989a58e5408c9593da0bebcd0e4ffc3d892d1316ba5042ddb0be5b0b4102b9" - -inherit update-rc.d useradd - -CFLAGS_append = " -fPIE -pie" -CXXFLAGS_append = " -fPIE -pie" - -do_configure () { - if [ "${SITEINFO_BITS}" = "64" ]; then - PTRSIZE=8 - else - PTRSIZE=4 - fi - - echo $CFLAGS - echo $LDFLAGS - - ./configure \ - --crossbuild=Linux:${TUNE_ARCH} \ - --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ - --with-int=4 \ - --with-long=${PTRSIZE} \ - --with-long-long=8 \ - --with-ptr-size=${PTRSIZE} \ - --with-sig-atomic-t=${PTRSIZE} \ - --with-size-t=${PTRSIZE} \ - --with-off-t=${PTRSIZE} \ - --with-time-t=${PTRSIZE} \ - --with-sys-nerr=132 \ - --conf-path=${sysconfdir}/nginx/nginx.conf \ - --http-log-path=${localstatedir}/log/nginx/access.log \ - --error-log-path=${localstatedir}/log/nginx/error.log \ - --pid-path=/run/nginx/nginx.pid \ - --prefix=${prefix} \ - --with-http_ssl_module \ - --with-http_gzip_static_module -} - -do_install () { - oe_runmake 'DESTDIR=${D}' install - rm -fr ${D}${localstatedir}/run ${D}/run - if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /run/${BPN} - - - -" \ - > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - fi - install -d ${D}${sysconfdir}/${BPN} - ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run - install -d ${D}${localstatedir}/www/localhost - mv ${D}/usr/html ${D}${localstatedir}/www/localhost/ - chown www:www-data -R ${D}${localstatedir} - - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx - sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx - sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/init.d/nginx - - install -d ${D}${sysconfdir}/nginx - install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf - sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf - install -d ${D}${sysconfdir}/nginx/sites-enabled - - 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 - - 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' \ - ${D}${systemd_unitdir}/system/nginx.service - fi -} - -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 -} - -FILES_${PN} += "${localstatedir}/ \ - ${systemd_unitdir}/system/nginx.service \ - " - -CONFFILES_${PN} = "${sysconfdir}/nginx/nginx.conf \ - ${sysconfdir}/nginx/fastcgi.conf\ - ${sysconfdir}/nginx/fastcgi_params \ - ${sysconfdir}/nginx/koi-utf \ - ${sysconfdir}/nginx/koi-win \ - ${sysconfdir}/nginx/mime.types \ - ${sysconfdir}/nginx/scgi_params \ - ${sysconfdir}/nginx/uwsgi_params \ - ${sysconfdir}/nginx/win-utf \ -" - -INITSCRIPT_NAME = "nginx" -INITSCRIPT_PARAMS = "defaults 92 20" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = " \ - --system --no-create-home \ - --home ${localstatedir}/www/localhost \ - --groups www-data \ - --user-group www" diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb new file mode 100644 index 0000000000..a251523bc8 --- /dev/null +++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb @@ -0,0 +1,131 @@ +SUMMARY = "HTTP and reverse proxy server" + +DESCRIPTION = "Nginx is a web server and a reverse proxy server for \ +HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high \ +concurrency, performance and low memory usage." + +HOMEPAGE = "http://nginx.org/" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3845852aedfa8d6d7765f55d06cc3ebd" +SECTION = "net" + +DEPENDS = "libpcre gzip openssl" + +SRC_URI = " \ + http://nginx.org/download/nginx-${PV}.tar.gz \ + file://nginx-cross.patch \ + file://nginx.conf \ + file://nginx.init \ + file://nginx-volatile.conf \ + file://nginx.service \ +" +SRC_URI[md5sum] = "2562320f1535e3e31d165e337ae94f21" +SRC_URI[sha256sum] = "48e2787a6b245277e37cb7c5a31b1549a0bbacf288aa4731baacf9eaacdb481b" + +inherit update-rc.d useradd + +CFLAGS_append = " -fPIE -pie" +CXXFLAGS_append = " -fPIE -pie" + +do_configure () { + if [ "${SITEINFO_BITS}" = "64" ]; then + PTRSIZE=8 + else + PTRSIZE=4 + fi + + echo $CFLAGS + echo $LDFLAGS + + ./configure \ + --crossbuild=Linux:${TUNE_ARCH} \ + --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ + --with-int=4 \ + --with-long=${PTRSIZE} \ + --with-long-long=8 \ + --with-ptr-size=${PTRSIZE} \ + --with-sig-atomic-t=${PTRSIZE} \ + --with-size-t=${PTRSIZE} \ + --with-off-t=${PTRSIZE} \ + --with-time-t=${PTRSIZE} \ + --with-sys-nerr=132 \ + --conf-path=${sysconfdir}/nginx/nginx.conf \ + --http-log-path=${localstatedir}/log/nginx/access.log \ + --error-log-path=${localstatedir}/log/nginx/error.log \ + --pid-path=/run/nginx/nginx.pid \ + --prefix=${prefix} \ + --with-http_ssl_module \ + --with-http_gzip_static_module +} + +do_install () { + oe_runmake 'DESTDIR=${D}' install + rm -fr ${D}${localstatedir}/run ${D}/run + if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/${BPN} - - - -" \ + > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + fi + install -d ${D}${sysconfdir}/${BPN} + ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run + install -d ${D}${localstatedir}/www/localhost + mv ${D}/usr/html ${D}${localstatedir}/www/localhost/ + chown www:www-data -R ${D}${localstatedir} + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx + sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx + sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/init.d/nginx + + install -d ${D}${sysconfdir}/nginx + install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf + sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf + install -d ${D}${sysconfdir}/nginx/sites-enabled + + 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 + + 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' \ + ${D}${systemd_unitdir}/system/nginx.service + fi +} + +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 +} + +FILES_${PN} += "${localstatedir}/ \ + ${systemd_unitdir}/system/nginx.service \ + " + +CONFFILES_${PN} = "${sysconfdir}/nginx/nginx.conf \ + ${sysconfdir}/nginx/fastcgi.conf\ + ${sysconfdir}/nginx/fastcgi_params \ + ${sysconfdir}/nginx/koi-utf \ + ${sysconfdir}/nginx/koi-win \ + ${sysconfdir}/nginx/mime.types \ + ${sysconfdir}/nginx/scgi_params \ + ${sysconfdir}/nginx/uwsgi_params \ + ${sysconfdir}/nginx/win-utf \ +" + +INITSCRIPT_NAME = "nginx" +INITSCRIPT_PARAMS = "defaults 92 20" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = " \ + --system --no-create-home \ + --home ${localstatedir}/www/localhost \ + --groups www-data \ + --user-group www" -- cgit 1.2.3-korg