[arch-commits] Commit in nginx/trunk (7 files)

Bartłomiej Piotrowski bpiotrowski at nymeria.archlinux.org
Fri Feb 22 20:46:49 UTC 2013


    Date: Friday, February 22, 2013 @ 21:46:49
  Author: bpiotrowski
Revision: 84706

upgpkg: nginx 1.2.7-2

- fix CVE-2013-0337 (FS#33964)
- deprecate sysvinit daemon

Added:
  nginx/trunk/logrotate
    (from rev 84705, nginx/trunk/nginx.logrotate)
  nginx/trunk/service
    (from rev 84705, nginx/trunk/service)
Modified:
  nginx/trunk/PKGBUILD
  nginx/trunk/nginx.install
Deleted:
  nginx/trunk/nginx.logrotate
  nginx/trunk/rc.d
  nginx/trunk/service

-----------------+
 PKGBUILD        |   17 ++++---------
 logrotate       |    9 +++++++
 nginx.install   |    8 ++++++
 nginx.logrotate |    8 ------
 rc.d            |   68 ------------------------------------------------------
 service         |   28 +++++++++++-----------
 6 files changed, 37 insertions(+), 101 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-02-22 17:18:57 UTC (rev 84705)
+++ PKGBUILD	2013-02-22 20:46:49 UTC (rev 84706)
@@ -8,7 +8,7 @@
 
 pkgname=nginx
 pkgver=1.2.7
-pkgrel=1
+pkgrel=2
 pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server'
 arch=('i686' 'x86_64')
 depends=('pcre' 'zlib' 'openssl' 'geoip')
@@ -27,13 +27,11 @@
 		${_cfgdir:1}/win-utf
 		etc/logrotate.d/nginx)
 source=(http://nginx.org/download/nginx-$pkgver.tar.gz
-		rc.d
 		service
-		nginx.logrotate)
+		logrotate)
 sha256sums=('2457a878943fb409ec4fcb46b43af222d06a584f93228e17a4f02b0e7bfc9de3'
-            '4f6bd31d684956ca143f7dc68dbd3caa67e835fb84dc44d1a94217b9214c6cfd'
             '77da8ce4d8378048606a25e09270ee187d6b226ee750b6cb4313af5549f5156a'
-            '613b0ed3fe4b5ee505ddb5122ee41604f464a5049be81c97601ee93970763a23')
+            'b0ef6c00e0e94926588242ed910b387922e513d5152fcdb651dc06e2b84e7d85')
 
 build() {
 	cd "$srcdir"/$pkgname-$pkgver
@@ -80,9 +78,6 @@
 	cd "$srcdir"/$pkgname-$pkgver
 	make DESTDIR="$pkgdir" install
 
-	install -d "$pkgdir"/etc/logrotate.d
-	install -m644 "$srcdir"/nginx.logrotate "$pkgdir"/etc/logrotate.d/nginx
-
 	sed -e 's|\<user\s\+\w\+;|user html;|g' \
 		-e '44s|html|/usr/share/nginx/html|' \
 		-e '54s|html|/usr/share/nginx/html|' \
@@ -94,9 +89,9 @@
 
 	install -d "$pkgdir"/usr/share/nginx
 	mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
-
-	install -D -m755 "$srcdir"/rc.d "$pkgdir"/etc/rc.d/nginx
+	
+	install -Dm644 "$srcdir"/logrotate "$pkgdir"/etc/logrotate.d/nginx
 	install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/nginx.service
-	install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/nginx/LICENSE
+	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/nginx/LICENSE
 	rm -rf "$pkgdir"/var/run
 }

Copied: nginx/trunk/logrotate (from rev 84705, nginx/trunk/nginx.logrotate)
===================================================================
--- logrotate	                        (rev 0)
+++ logrotate	2013-02-22 20:46:49 UTC (rev 84706)
@@ -0,0 +1,9 @@
+/var/log/nginx/*log {
+	missingok
+	create 750 root log
+	sharedscripts
+	compress
+	postrotate
+		test -r /var/run/nginx.pid && kill -USR1 `cat /var/run/nginx.pid`
+	endscript
+}

Modified: nginx.install
===================================================================
--- nginx.install	2013-02-22 17:18:57 UTC (rev 84705)
+++ nginx.install	2013-02-22 20:46:49 UTC (rev 84706)
@@ -1,4 +1,12 @@
+post_install() {
+    if [[ -e var/log/nginx ]]; then
+        chmod 750 var/log/nginx
+        chown root:log var/log/nginx
+    fi
+}
+
 post_upgrade() {
+    [[ $(vercmp $2 1.2.7-1) -le 0 ]] && post_install
     if [[ $(vercmp $2 1.2.1-2) -le 0 ]]; then
         echo " >>> Since 1.2.1-2 several changes has been made in package:"
         echo "      - *.conf files have been moved to /etc/nginx"

Deleted: nginx.logrotate
===================================================================
--- nginx.logrotate	2013-02-22 17:18:57 UTC (rev 84705)
+++ nginx.logrotate	2013-02-22 20:46:49 UTC (rev 84706)
@@ -1,8 +0,0 @@
-/var/log/nginx/*.log {
-	missingok
-	sharedscripts
-	compress
-	postrotate
-		test -r /var/run/nginx.pid && kill -USR1 `cat /var/run/nginx.pid`
-	endscript
-}

Deleted: rc.d
===================================================================
--- rc.d	2013-02-22 17:18:57 UTC (rev 84705)
+++ rc.d	2013-02-22 20:46:49 UTC (rev 84706)
@@ -1,68 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-function check_config {
-  stat_busy "Checking nginx configuration"
-  /usr/sbin/nginx -t -q -c /etc/nginx/nginx.conf
-  if [ $? -ne 0 ]; then
-    stat_die
-  else
-    stat_done
-  fi
-}
-
-case "$1" in
-  start)
-    check_config
-    $0 careless_start
-    ;;
-  careless_start)
-    stat_busy "Starting nginx"
-    if [ -s /var/run/nginx.pid ]; then
-      stat_fail
-      # probably ;)
-      stat_busy "Nginx is already running"
-      stat_die
-     fi
-    /usr/sbin/nginx -c /etc/nginx/nginx.conf &>/dev/null
-    if [ $? -ne 0 ]; then
-      stat_fail
-    else
-      add_daemon nginx
-      stat_done
-    fi
-    ;;
-  stop)
-    stat_busy "Stopping nginx"
-    PID=$(cat /var/run/nginx.pid)
-    kill -QUIT $PID &>/dev/null
-    if [ $? -ne 0 ]; then
-      stat_fail
-    else
-      for i in {1..10}; do
-        [ -d /proc/$PID ] || { stat_done; rm_daemon nginx; exit 0; }
-        sleep 1
-      done
-      stat_fail
-    fi
-    ;;
-  restart)
-    check_config
-    $0 stop
-    sleep 1
-    $0 careless_start
-    ;;
-  reload)
-    check_config
-    if [ -s /var/run/nginx.pid ]; then
-      status "Reloading nginx configuration" kill -HUP $(cat /var/run/nginx.pid)
-    fi
-    ;;
-  check)
-    check_config
-    ;;
-  *)
-    echo "usage: $0 {start|stop|restart|reload|check|careless_start}"
-esac

Deleted: service
===================================================================
--- service	2013-02-22 17:18:57 UTC (rev 84705)
+++ service	2013-02-22 20:46:49 UTC (rev 84706)
@@ -1,14 +0,0 @@
-[Unit]
-Description=A high performance web server and a reverse proxy server
-After=syslog.target network.target
-
-[Service]
-Type=forking
-PIDFile=/run/nginx.pid
-ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /run/nginx.pid; daemon on; master_process on;'
-ExecStart=/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;'
-ExecReload=/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' -s reload
-ExecStop=/usr/sbin/nginx -g 'pid /run/nginx.pid;' -s quit
-
-[Install]
-WantedBy=multi-user.target

Copied: nginx/trunk/service (from rev 84705, nginx/trunk/service)
===================================================================
--- service	                        (rev 0)
+++ service	2013-02-22 20:46:49 UTC (rev 84706)
@@ -0,0 +1,14 @@
+[Unit]
+Description=A high performance web server and a reverse proxy server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/run/nginx.pid
+ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /run/nginx.pid; daemon on; master_process on;'
+ExecStart=/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;'
+ExecReload=/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' -s reload
+ExecStop=/usr/sbin/nginx -g 'pid /run/nginx.pid;' -s quit
+
+[Install]
+WantedBy=multi-user.target




More information about the arch-commits mailing list