* [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc
@ 2016-03-09 12:33 Pascal Bach
2016-03-09 12:33 ` [meta-webserver][PATCH v3 2/3] nginx: add stable version 1.8.1 as alternative to the mainline version 1.9.x Pascal Bach
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Pascal Bach @ 2016-03-09 12:33 UTC (permalink / raw)
To: openembedded-devel
nginx has two maintained branches.
- stable: is the long term maintained branch where only bugfixes occur
- mainline: is the branch where new features get added
This change is in preparation to support these two branches.
---
meta-webserver/recipes-httpd/nginx/nginx.inc | 137 +++++++++++++++++++++
meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb | 137 +--------------------
2 files changed, 139 insertions(+), 135 deletions(-)
create mode 100644 meta-webserver/recipes-httpd/nginx/nginx.inc
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc
new file mode 100644
index 0000000..53e3235
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -0,0 +1,137 @@
+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=0bb58ed0dfd4f5dbece3b52aba79f023"
+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 \
+"
+
+inherit update-rc.d useradd
+
+CFLAGS_append = " -fPIE -pie"
+CXXFLAGS_append = " -fPIE -pie"
+
+NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
+NGINX_USER ?= "www"
+
+EXTRA_OECONF = ""
+DISABLE_STATIC = ""
+
+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 \
+ ${EXTRA_OECONF}
+}
+
+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}${NGINX_WWWDIR}
+ mv ${D}/usr/html ${D}${NGINX_WWWDIR}/
+ chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}
+
+ 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' \
+ -e 's,@BASEBINDIR@,${base_bindir},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 ${NGINX_WWWDIR} \
+ --groups www-data \
+ --user-group ${NGINX_USER}"
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
index 8b60e53..d76bd9e 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
@@ -1,139 +1,6 @@
-SUMMARY = "HTTP and reverse proxy server"
+require nginx.inc
-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=0bb58ed0dfd4f5dbece3b52aba79f023"
-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] = "76eb5853a1190e0cfc691aa21c545de3"
SRC_URI[sha256sum] = "6a5c72f4afaf57a6db064bba0965d72335f127481c5d4e64ee8714e7b368a51f"
-inherit update-rc.d useradd
-
-CFLAGS_append = " -fPIE -pie"
-CXXFLAGS_append = " -fPIE -pie"
-
-NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
-NGINX_USER ?= "www"
-
-EXTRA_OECONF = ""
-DISABLE_STATIC = ""
-
-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 \
- ${EXTRA_OECONF}
-}
-
-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}${NGINX_WWWDIR}
- mv ${D}/usr/html ${D}${NGINX_WWWDIR}/
- chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}
-
- 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' \
- -e 's,@BASEBINDIR@,${base_bindir},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 ${NGINX_WWWDIR} \
- --groups www-data \
- --user-group ${NGINX_USER}"
+DISABLE_STATIC = ""
\ No newline at end of file
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-webserver][PATCH v3 2/3] nginx: add stable version 1.8.1 as alternative to the mainline version 1.9.x
2016-03-09 12:33 [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc Pascal Bach
@ 2016-03-09 12:33 ` Pascal Bach
2016-03-09 12:33 ` [meta-webserver][PATCH v3 3/3] nginx: make the 1.8.x branch the default Pascal Bach
2016-03-09 17:34 ` [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc Martin Jansa
2 siblings, 0 replies; 4+ messages in thread
From: Pascal Bach @ 2016-03-09 12:33 UTC (permalink / raw)
To: openembedded-devel
The 1.8 branch is the current stable branch of nginx.
This means the branch doesn't get new features, but is still supported with bugfixes.
Depending on the use case it is more suitable to use on an embedded device
than the 1.9 branch which adds new features with every release.
---
meta-webserver/recipes-httpd/nginx/nginx.inc | 2 +-
meta-webserver/recipes-httpd/nginx/nginx_1.8.1.bb | 6 ++++++
meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb | 2 ++
3 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 meta-webserver/recipes-httpd/nginx/nginx_1.8.1.bb
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc
index 53e3235..2169b67 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -6,7 +6,7 @@ concurrency, performance and low memory usage."
HOMEPAGE = "http://nginx.org/"
LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
+
SECTION = "net"
DEPENDS = "libpcre gzip openssl"
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.8.1.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.8.1.bb
new file mode 100644
index 0000000..089f547
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.8.1.bb
@@ -0,0 +1,6 @@
+require nginx.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3845852aedfa8d6d7765f55d06cc3ebd"
+
+SRC_URI[md5sum] = "2e91695074dbdfbf1bcec0ada9fda462"
+SRC_URI[sha256sum] = "8f4b3c630966c044ec72715754334d1fdf741caa1d5795fb4646c27d09f797b7"
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
index d76bd9e..3b9d26f 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
@@ -1,5 +1,7 @@
require nginx.inc
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
+
SRC_URI[md5sum] = "76eb5853a1190e0cfc691aa21c545de3"
SRC_URI[sha256sum] = "6a5c72f4afaf57a6db064bba0965d72335f127481c5d4e64ee8714e7b368a51f"
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-webserver][PATCH v3 3/3] nginx: make the 1.8.x branch the default
2016-03-09 12:33 [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc Pascal Bach
2016-03-09 12:33 ` [meta-webserver][PATCH v3 2/3] nginx: add stable version 1.8.1 as alternative to the mainline version 1.9.x Pascal Bach
@ 2016-03-09 12:33 ` Pascal Bach
2016-03-09 17:34 ` [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc Martin Jansa
2 siblings, 0 replies; 4+ messages in thread
From: Pascal Bach @ 2016-03-09 12:33 UTC (permalink / raw)
To: openembedded-devel
The 1.9.x branch is still supported but it needs to be explicitly selected.
---
meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
index 3b9d26f..3eec0f9 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
@@ -1,5 +1,9 @@
require nginx.inc
+# 1.9.x is the current mainline branches containing all new features
+# 1.8.x branch is the current stable branch, the recommended default
+DEFAULT_PREFERENCE = "-1"
+
LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
SRC_URI[md5sum] = "76eb5853a1190e0cfc691aa21c545de3"
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc
2016-03-09 12:33 [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc Pascal Bach
2016-03-09 12:33 ` [meta-webserver][PATCH v3 2/3] nginx: add stable version 1.8.1 as alternative to the mainline version 1.9.x Pascal Bach
2016-03-09 12:33 ` [meta-webserver][PATCH v3 3/3] nginx: make the 1.8.x branch the default Pascal Bach
@ 2016-03-09 17:34 ` Martin Jansa
2 siblings, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2016-03-09 17:34 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 11261 bytes --]
On Wed, Mar 09, 2016 at 01:33:56PM +0100, Pascal Bach wrote:
> nginx has two maintained branches.
> - stable: is the long term maintained branch where only bugfixes occur
> - mainline: is the branch where new features get added
Still missing SOB lines in all 3 changes.
>
> This change is in preparation to support these two branches.
> ---
> meta-webserver/recipes-httpd/nginx/nginx.inc | 137 +++++++++++++++++++++
> meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb | 137 +--------------------
> 2 files changed, 139 insertions(+), 135 deletions(-)
> create mode 100644 meta-webserver/recipes-httpd/nginx/nginx.inc
>
> diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc
> new file mode 100644
> index 0000000..53e3235
> --- /dev/null
> +++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
> @@ -0,0 +1,137 @@
> +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=0bb58ed0dfd4f5dbece3b52aba79f023"
> +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 \
> +"
> +
> +inherit update-rc.d useradd
> +
> +CFLAGS_append = " -fPIE -pie"
> +CXXFLAGS_append = " -fPIE -pie"
> +
> +NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
> +NGINX_USER ?= "www"
> +
> +EXTRA_OECONF = ""
> +DISABLE_STATIC = ""
> +
> +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 \
> + ${EXTRA_OECONF}
> +}
> +
> +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}${NGINX_WWWDIR}
> + mv ${D}/usr/html ${D}${NGINX_WWWDIR}/
> + chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}
> +
> + 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' \
> + -e 's,@BASEBINDIR@,${base_bindir},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 ${NGINX_WWWDIR} \
> + --groups www-data \
> + --user-group ${NGINX_USER}"
> diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
> index 8b60e53..d76bd9e 100644
> --- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
> +++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.11.bb
> @@ -1,139 +1,6 @@
> -SUMMARY = "HTTP and reverse proxy server"
> +require nginx.inc
>
> -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=0bb58ed0dfd4f5dbece3b52aba79f023"
> -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] = "76eb5853a1190e0cfc691aa21c545de3"
> SRC_URI[sha256sum] = "6a5c72f4afaf57a6db064bba0965d72335f127481c5d4e64ee8714e7b368a51f"
>
> -inherit update-rc.d useradd
> -
> -CFLAGS_append = " -fPIE -pie"
> -CXXFLAGS_append = " -fPIE -pie"
> -
> -NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
> -NGINX_USER ?= "www"
> -
> -EXTRA_OECONF = ""
> -DISABLE_STATIC = ""
> -
> -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 \
> - ${EXTRA_OECONF}
> -}
> -
> -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}${NGINX_WWWDIR}
> - mv ${D}/usr/html ${D}${NGINX_WWWDIR}/
> - chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}
> -
> - 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' \
> - -e 's,@BASEBINDIR@,${base_bindir},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 ${NGINX_WWWDIR} \
> - --groups www-data \
> - --user-group ${NGINX_USER}"
> +DISABLE_STATIC = ""
> \ No newline at end of file
> --
> 2.1.4
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-09 17:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09 12:33 [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc Pascal Bach
2016-03-09 12:33 ` [meta-webserver][PATCH v3 2/3] nginx: add stable version 1.8.1 as alternative to the mainline version 1.9.x Pascal Bach
2016-03-09 12:33 ` [meta-webserver][PATCH v3 3/3] nginx: make the 1.8.x branch the default Pascal Bach
2016-03-09 17:34 ` [meta-webserver][PATCH v3 1/3] nginx: split parts out of the recipe into nginx.inc Martin Jansa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox