Skip to contentSkip to conversation

nginx: Add support for altering build configuration

PATCH New Amarnath Valluri 1 participant 2 messages Nov 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nginx: Add support for altering build configuration

Passing EXTRA_OECONF to ./configure, this allows to alter build configure

---
 meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb +4 -1
index a251523..1c9bff7 100644
@@ -27,6 +27,8 @@ inherit update-rc.d useradd
 CFLAGS_append = " -fPIE -pie"
 CXXFLAGS_append = " -fPIE -pie"
 
+EXTRA_OECONF = ""
+
 do_configure () {
 	if [ "${SITEINFO_BITS}" = "64" ]; then
 		PTRSIZE=8
@@ -55,7 +57,8 @@ do_configure () {
 	--pid-path=/run/nginx/nginx.pid \
 	--prefix=${prefix} \
 	--with-http_ssl_module \
-	--with-http_gzip_static_module
+	--with-http_gzip_static_module \
+	${EXTRA_OECONF}
 }
 
 do_install () {
Signature · 12 lines
1.9.1

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#1 lore raw

PATCH 2/2 nginx: Fix systemd service file

systemd service file expects full path of the executatbles.

---
 meta-webserver/recipes-httpd/nginx/files/nginx.service | 2 +-
 meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb      | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
meta-webserver/recipes-httpd/nginx/files/nginx.service +1 -1
index 705450e..9926a4b 100644
@@ -4,7 +4,7 @@ After=network.target
 [Service]
 Type=forking
 PIDFile=@SYSCONFDIR@/nginx/run/nginx.pid
-ExecStartPre=mkdir -p @LOCALSTATEDIR@/log/nginx
+ExecStartPre=@BASEBINDIR@/mkdir -p @LOCALSTATEDIR@/log/nginx
 ExecStart=@SYSCONFDIR@/init.d/nginx start
 ExecStop=@SYSCONFDIR@/init.d/nginx stop
 [Install]
meta-webserver/recipes-httpd/nginx/nginx_1.9.5.bb +1 -0
index 1c9bff7..87c953b 100644
@@ -94,6 +94,7 @@ do_install () {
             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
 }
Signature · 12 lines
1.9.1

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.