* [meta-webserver][PATCH 1/2] nginx: make nginx user and home directory configurable
@ 2016-02-04 15:03 Pascal Bach
2016-02-04 15:03 ` [meta-webserver][PATCH 2/2] nginx: update to 1.9.10 Pascal Bach
2016-02-20 13:56 ` [meta-webserver][PATCH 1/2] nginx: make nginx user and home directory configurable Martin Jansa
0 siblings, 2 replies; 3+ messages in thread
From: Pascal Bach @ 2016-02-04 15:03 UTC (permalink / raw)
To: openembedded-devel
This allows selecting a different user then "www" in a bbappend.
It also allows to change the default value of "/var/www/localhost" to something else.
---
meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb
index 06d61c7..08f53a7 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb
@@ -27,6 +27,9 @@ inherit update-rc.d useradd
CFLAGS_append = " -fPIE -pie"
CXXFLAGS_append = " -fPIE -pie"
+NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
+NGINX_USER ?= "www"
+
EXTRA_OECONF = ""
do_configure () {
@@ -71,9 +74,9 @@ do_install () {
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}${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
@@ -130,6 +133,6 @@ INITSCRIPT_PARAMS = "defaults 92 20"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = " \
--system --no-create-home \
- --home ${localstatedir}/www/localhost \
+ --home ${NGINX_WWWDIR} \
--groups www-data \
- --user-group www"
+ --user-group ${NGINX_USER}"
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [meta-webserver][PATCH 2/2] nginx: update to 1.9.10
2016-02-04 15:03 [meta-webserver][PATCH 1/2] nginx: make nginx user and home directory configurable Pascal Bach
@ 2016-02-04 15:03 ` Pascal Bach
2016-02-20 13:56 ` [meta-webserver][PATCH 1/2] nginx: make nginx user and home directory configurable Martin Jansa
1 sibling, 0 replies; 3+ messages in thread
From: Pascal Bach @ 2016-02-04 15:03 UTC (permalink / raw)
To: openembedded-devel
---
.../recipes-httpd/nginx/{nginx_1.9.9.bb => nginx_1.9.10.bb} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename meta-webserver/recipes-httpd/nginx/{nginx_1.9.9.bb => nginx_1.9.10.bb} (95%)
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb
similarity index 95%
rename from meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb
rename to meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb
index 08f53a7..5d63d41 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.10.bb
@@ -6,7 +6,7 @@ concurrency, performance and low memory usage."
HOMEPAGE = "http://nginx.org/"
LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3845852aedfa8d6d7765f55d06cc3ebd"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
SECTION = "net"
DEPENDS = "libpcre gzip openssl"
@@ -19,8 +19,8 @@ SRC_URI = " \
file://nginx-volatile.conf \
file://nginx.service \
"
-SRC_URI[md5sum] = "50fdfa08e93ead7a111cba5a5f5735af"
-SRC_URI[sha256sum] = "de66bb2b11c82533aa5cb5ccc27cbce736ab87c9f2c761e5237cda0b00068d73"
+SRC_URI[md5sum] = "64cc970988356a5e0fc4fcd1ab84fe57"
+SRC_URI[sha256sum] = "fb14d76844cab0a5a0880768be28965e74f9956790f618c454ef6098e26631d9"
inherit update-rc.d useradd
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-webserver][PATCH 1/2] nginx: make nginx user and home directory configurable
2016-02-04 15:03 [meta-webserver][PATCH 1/2] nginx: make nginx user and home directory configurable Pascal Bach
2016-02-04 15:03 ` [meta-webserver][PATCH 2/2] nginx: update to 1.9.10 Pascal Bach
@ 2016-02-20 13:56 ` Martin Jansa
1 sibling, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2016-02-20 13:56 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]
On Thu, Feb 04, 2016 at 04:03:13PM +0100, Pascal Bach wrote:
> This allows selecting a different user then "www" in a bbappend.
> It also allows to change the default value of "/var/www/localhost" to something else.
Missing SOB line in all your patches, please resend.
> ---
> meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb
> index 06d61c7..08f53a7 100644
> --- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb
> +++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb
> @@ -27,6 +27,9 @@ inherit update-rc.d useradd
> CFLAGS_append = " -fPIE -pie"
> CXXFLAGS_append = " -fPIE -pie"
>
> +NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
> +NGINX_USER ?= "www"
> +
> EXTRA_OECONF = ""
>
> do_configure () {
> @@ -71,9 +74,9 @@ do_install () {
> 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}${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
> @@ -130,6 +133,6 @@ INITSCRIPT_PARAMS = "defaults 92 20"
> USERADD_PACKAGES = "${PN}"
> USERADD_PARAM_${PN} = " \
> --system --no-create-home \
> - --home ${localstatedir}/www/localhost \
> + --home ${NGINX_WWWDIR} \
> --groups www-data \
> - --user-group www"
> + --user-group ${NGINX_USER}"
> --
> 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] 3+ messages in thread
end of thread, other threads:[~2016-02-20 13:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 15:03 [meta-webserver][PATCH 1/2] nginx: make nginx user and home directory configurable Pascal Bach
2016-02-04 15:03 ` [meta-webserver][PATCH 2/2] nginx: update to 1.9.10 Pascal Bach
2016-02-20 13:56 ` [meta-webserver][PATCH 1/2] nginx: make nginx user and home directory configurable Martin Jansa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox