Skip to contentSkip to conversation

package/nginx: new package

PATCH Superseded Samuel Martin 1 participant 1 message Oct 5, 2014

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 package/nginx: new package

nginx module selection is, by default, the same as the one sets by the upstream configure script.

Patches improving the cross-compilation support have already been sent upstream for integration [1-5].

All these patches are needed because nginx uses its own handwritten build-system, which is cross-platform, but does not properly support cross-compilation.

Fixes bug: #3427 [6]

[1] http://mailman.nginx.org/pipermail/nginx-devel/2014-August/005722.html
[2] http://mailman.nginx.org/pipermail/nginx-devel/2014-August/005724.html
[3] http://mailman.nginx.org/pipermail/nginx-devel/2014-August/005725.html
[4] http://mailman.nginx.org/pipermail/nginx-devel/2014-August/005723.html
[5] http://mailman.nginx.org/pipermail/nginx-devel/2014-August/005726.html
[6] https://bugs.uclibc.org/show_bug.cgi?id=3427

Cc Daniele Salvatore Albano <[email protected]>
Cc Maxime Hadjinlian <[email protected]>
Cc Johan Oudinet <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Gustavo Zacarias <[email protected]>

---
changes v4 -> v5:
- rebase
- rename NGINX_*_OPT -> NGINX_*_OPTS
- fix missing 'select ...' (GustavoZ)
- add 'mkdir ...' logdir and tmpdir in nginx service files (GustavoZ)

changes v3 -> v4:

- rebase
- bump to latest stable version
- fix sysv init script (JohanO)
- fix misc. paths (prefix, sbin, log, temp., etc) (JohanO)
- update nginx.service

changes v2 -> v3:
- rollback to stable release (1.6.0) instead of latest one (Gustavo)
- add comments in nginx.mk
- extend commit log

changes v1 -> v2:
- add SSL module knobs (ThomasP)
- turn all BR2_PACKAGE_* symbols fully uppercase (ThomasP)
- add pid file option to start-stop-daemon (ThomasP)
- do not pass default "-I..." "-L..." locations (ThomasP)
- fix --prefix (ThomasP)
- fix missing brackets

---
 package/Config.in                                  |   1 +
 package/nginx/Config.in                            | 326 +++++++++++++++++++++
 package/nginx/S50nginx                             |  25 ++
 ...izeof-rework-autotest-to-be-cross-compila.patch |  88 ++++++
 ...e-add-mechanism-allowing-to-force-feature.patch | 135 +++++++++
 ...x_feature_run_force_result-for-each-featu.patch | 209 +++++++++++++
 ...bxslt-conf-allow-to-override-ngx_feature_.patch |  42 +++
 ...nix-make-sys_nerr-guessing-cross-friendly.patch | 133 +++++++++
 package/nginx/nginx.logrotate                      |   9 +
 package/nginx/nginx.mk                             | 236 +++++++++++++++
 package/nginx/nginx.service                        |  15 +
 11 files changed, 1219 insertions(+)
 create mode 100644 package/nginx/Config.in
 create mode 100755 package/nginx/S50nginx
 create mode 100644 package/nginx/nginx-0001-auto-type-sizeof-rework-autotest-to-be-cross-compila.patch
 create mode 100644 package/nginx/nginx-0002-auto-feature-add-mechanism-allowing-to-force-feature.patch
 create mode 100644 package/nginx/nginx-0003-auto-set-ngx_feature_run_force_result-for-each-featu.patch
 create mode 100644 package/nginx/nginx-0004-auto-lib-libxslt-conf-allow-to-override-ngx_feature_.patch
 create mode 100644 package/nginx/nginx-0005-auto-unix-make-sys_nerr-guessing-cross-friendly.patch
 create mode 100644 package/nginx/nginx.logrotate
 create mode 100644 package/nginx/nginx.mk
 create mode 100644 package/nginx/nginx.service
package/Config.in +1 -0
index 6f55e02..215068f 100644
@@ -1036,6 +1036,7 @@ endif
 	source "package/network-manager/Config.in"
 	source "package/nfacct/Config.in"
 	source "package/nftables/Config.in"
+	source "package/nginx/Config.in"
 	source "package/ngircd/Config.in"
 	source "package/ngrep/Config.in"
 	source "package/nmap/Config.in"
package/nginx/Config.in new file +326 -0

326 lines not on this page · raw message

package/nginx/S50nginx new file +25 -0
new file mode 100755
index 0000000..f555d93
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Start/stop nginx
+#
+
+PIDFILE=/var/run/nginx.pid
+
+case "$1" in
+  start)
+	echo "Starting nginx..."
+	mkdir -p /var/log/nginx /var/tmp/nginx
+	start-stop-daemon -S -x /usr/sbin/nginx -p $PIDFILE
+	;;
+  stop)
+	echo -n "Stopping nginx..."
+	start-stop-daemon -K -o -p $PIDFILE
+	;;
+  restart|reload)
+	"$0" stop
+	"$0" start
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart}"
+	exit 1
+esac
package/nginx/nginx-0001-auto-type-sizeof-rework-autotest-to-be-cross-compila.patch new file +88 -0

88 lines not on this page · raw message

package/nginx/nginx-0002-auto-feature-add-mechanism-allowing-to-force-feature.patch new file +135 -0

135 lines not on this page · raw message

package/nginx/nginx-0003-auto-set-ngx_feature_run_force_result-for-each-featu.patch new file +209 -0

209 lines not on this page · raw message

package/nginx/nginx-0004-auto-lib-libxslt-conf-allow-to-override-ngx_feature_.patch new file +42 -0

42 lines not on this page · raw message

package/nginx/nginx-0005-auto-unix-make-sys_nerr-guessing-cross-friendly.patch new file +133 -0

133 lines not on this page · raw message

package/nginx/nginx.logrotate new file +9 -0
new file mode 100644
index 0000000..e0fa9ec
@@ -0,0 +1,9 @@
+/var/log/nginx/*log {
+	missingok
+	create 640 http log
+	sharedscripts
+	compress
+	postrotate
+		test ! -r /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid`
+	endscript
+}
package/nginx/nginx.mk new file +236 -0

236 lines not on this page · raw message

package/nginx/nginx.service new file +15 -0
new file mode 100644
index 0000000..619755f
@@ -0,0 +1,15 @@
+[Unit]
+Description=A high performance web server and a reverse proxy server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/nginx.pid
+ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx; /usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
+ExecStart=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
+ExecReload=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' -s reload
+ExecStop=/usr/sbin/nginx -g 'pid /var/run/nginx.pid;' -s quit
+PrivateDevices=yes
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
2.1.2