aboutsummaryrefslogtreecommitdiff
path: root/network/nginx
diff options
context:
space:
mode:
authorDiogo Leal <diogo@diogoleal.com>2011-11-12 13:37:31 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-11-15 15:04:12 -0600
commit60301cdf09058f5e0e143c41a4b9cf030394747f (patch)
tree93a3eb6a22e30de2f1c459213f74659be72ec69a /network/nginx
parent45392b5eebd0c391a9de5c94a2779a68b0d6aac9 (diff)
network/nginx: Updated for version 1.0.9.
This commit includes changes by rworkman, and Kent Fritz deserves some thanks for pointing out a bug with variable assignment of NGINX_USER and NGINX_GROUP. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/nginx')
-rw-r--r--network/nginx/README6
-rw-r--r--network/nginx/doinst.sh10
-rw-r--r--network/nginx/nginx.SlackBuild42
-rw-r--r--network/nginx/nginx.info6
4 files changed, 36 insertions, 28 deletions
diff --git a/network/nginx/README b/network/nginx/README
index 2110d38844096..45bb8da7cbdc2 100644
--- a/network/nginx/README
+++ b/network/nginx/README
@@ -8,3 +8,9 @@ specify alternate values on the command line if desired; for example:
Regardless of which user and group you decide to use, you will need to make
sure they exist on both the build system and the target system.
+
+Note that there are potential security concerns with allowing logrotate
+(which runs as root) to operate on directories/files that a non-root user
+controls, but there's not a good alternative for now. Newer versions of
+logrotate (3.8.0+) have an "su" option that can be used, but it's not
+available in Slackware 13.37.
diff --git a/network/nginx/doinst.sh b/network/nginx/doinst.sh
index c4aaf4f4ff0d6..ebed78acd4d36 100644
--- a/network/nginx/doinst.sh
+++ b/network/nginx/doinst.sh
@@ -24,3 +24,13 @@ preserve_perms() {
preserve_perms etc/rc.d/rc.nginx.new
config etc/logrotate.d/nginx.new
+config etc/nginx/fastcgi_params.new
+config etc/nginx/fastcgi.conf.new
+config etc/nginx/mime.types.new
+config etc/nginx/nginx.conf.new
+config etc/nginx/koi-utf.new
+config etc/nginx/koi-win.new
+config etc/nginx/scgi_params.new
+config etc/nginx/uwsgi_params.new
+config etc/nginx/win-utf.new
+
diff --git a/network/nginx/nginx.SlackBuild b/network/nginx/nginx.SlackBuild
index ccac530163b38..bb581e2bb8a0d 100644
--- a/network/nginx/nginx.SlackBuild
+++ b/network/nginx/nginx.SlackBuild
@@ -25,7 +25,7 @@
# Modified by Diogo Leal <diogo@diogoleal.com>
PRGNAM=nginx
-VERSION=${VERSION:-1.0.8}
+VERSION=${VERSION:-1.0.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -81,8 +81,8 @@ CXXFLAGS="$SLKCFLAGS" \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx \
- --user=${NGINXUSER:-nobody} \
- --group=${NGINXGROUP:-nogroup} \
+ --user=${NGINXUSER:=nobody} \
+ --group=${NGINXGROUP:=nogroup} \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-rtsig_module \
@@ -111,10 +111,8 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null || true
-find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
+ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | \
xargs rm -f 2> /dev/null
find $PKG -perm 444 -exec chmod 0644 {} \;
@@ -131,30 +129,24 @@ cat $CWD/rc.nginx > $PKG/etc/rc.d/rc.nginx.new
mkdir -p $PKG/etc/logrotate.d
cat $CWD/nginx.logrotate > $PKG/etc/logrotate.d/nginx.new
+# Don't clobber config files
+for file in fastcgi_params fastcgi.conf mime.types nginx.conf \
+ koi-utf koi-win scgi_params uwsgi_params win-utf ; do
+ mv $PKG/etc/nginx/$file $PKG/etc/nginx/$file.new ;
+done
+
+# Create the log dir and set the permissions
+mkdir -p $PKG/var/log/nginx
+chown $NGINXUSER:$NGINXGROUP $PKG/var/log/nginx
+chmod 750 $PKG/var/log/nginx
+
mkdir -p $PKG/usr/doc/nginx-$VERSION
-cp -a CHANGES CHANGES.ru LICENSE README $PKG/usr/doc/nginx-$VERSION
+cp -a CHANGES* LICENSE README $PKG/usr/doc/nginx-$VERSION
cat $CWD/nginx.SlackBuild > $PKG/usr/doc/nginx-$VERSION/nginx.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
-cat << EOF >> $PKG/install/doinst.sh
-
-# Create the log dir and set the permissions
-if [ ! -d /var/log/nginx ]; then
- mkdir -p /var/log/nginx
- chown $NGINXUSER:$NGINXGROUP /var/log/nginx
- chmod 750 /var/log/nginx
-fi
-EOF
-
-# Let's not clobber config files on upgrade
-( cd $PKG/etc/nginx
- for i in fastcgi_params mime.types nginx.conf koi-utf koi-win win-utf; do
- mv $i $i.new;
- echo "config etc/nginx/$i.new" >> $PKG/install/doinst.sh;
- done
-)
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/nginx/nginx.info b/network/nginx/nginx.info
index 72f32df75e1b9..17da7bc35a51e 100644
--- a/network/nginx/nginx.info
+++ b/network/nginx/nginx.info
@@ -1,8 +1,8 @@
PRGNAM="nginx"
-VERSION="1.0.8"
+VERSION="1.0.9"
HOMEPAGE="http://nginx.org/"
-DOWNLOAD="http://nginx.org/download/nginx-1.0.8.tar.gz"
-MD5SUM="1049e5fc6e80339f6ba8668fadfb75f9"
+DOWNLOAD="http://nginx.org/download/nginx-1.0.9.tar.gz"
+MD5SUM="bd2bfba1c5bf751bc3361de5e3ac7c4a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Diogo Leal"