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>
This commit is contained in:
Diogo Leal 2011-11-12 13:37:31 -06:00 committed by Robby Workman
parent 45392b5eeb
commit 60301cdf09
4 changed files with 36 additions and 28 deletions

View file

@ -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.

View file

@ -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

View file

@ -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}

View file

@ -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"