aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorMenno Duursma <druiloor@zonnet.nl>2010-05-11 22:25:46 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 22:25:46 +0200
commitb7ae880ff6b94898f177451fa114835c071caed3 (patch)
treef9e4f4b9810998398303cae3f13a8870b44c2430 /network
parent4b92df5b32dc4c10d297fb9e7545b86d040f4f4d (diff)
network/suphp: Updated for version 0.6.3
Diffstat (limited to 'network')
-rw-r--r--network/suphp/README13
-rw-r--r--network/suphp/doinst.sh7
-rw-r--r--network/suphp/slack-desc8
-rw-r--r--network/suphp/suphp-0.6.3-vhosts.patch (renamed from network/suphp/suphp-0.6.2-vhosts.patch)0
-rw-r--r--network/suphp/suphp.SlackBuild51
-rw-r--r--network/suphp/suphp.conf4
-rw-r--r--network/suphp/suphp.info8
7 files changed, 41 insertions, 50 deletions
diff --git a/network/suphp/README b/network/suphp/README
index e1e4bb9c6b63d..669b5b5bda88f 100644
--- a/network/suphp/README
+++ b/network/suphp/README
@@ -17,13 +17,6 @@ Some of the 'standard' /etc/httpd/httpd.conf directives include:
To use different php versions 'per vhost' see:
http://www.howtoforge.com/apache2_suphp_php4_php5
-suPHP needs a CGI build of the .php interpreter, usually named 'php-cgi'
-implying having to (re)compile PHP with in place of '--with-apxs'
-
- '--enable-force-cgi-redirect'
-
-Note that it being somewhat slower then mod_php can be redused
-(grately) by building for the FastCGI too and using mod_fcgid
-however that would need additional configuration, see:
-http://fastcgi.coremail.cn/configuration.htm
-
+mod_php can be reduced (greatly) by rebuilding PHP for FastCGI and
+using mod_fcgid; however, that requires additional configuration.
+See http://fastcgi.coremail.cn/configuration.htm for details.
diff --git a/network/suphp/doinst.sh b/network/suphp/doinst.sh
index 3f513b956fb64..e796ae0a4ead8 100644
--- a/network/suphp/doinst.sh
+++ b/network/suphp/doinst.sh
@@ -1,16 +1,15 @@
config() {
NEW="$1"
- OLD="`dirname $NEW`/`basename $NEW .new`"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
- elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Add a sample config-file, if only for documentation
-config etc/apache/suphp.conf.new
+config etc/httpd/suphp.conf.new
diff --git a/network/suphp/slack-desc b/network/suphp/slack-desc
index 4bbf41e9f98b6..fa46fd1fd66c9 100644
--- a/network/suphp/slack-desc
+++ b/network/suphp/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-suphp: suPHP (a PHP module)
+suphp: suPHP (an Apache module)
suphp:
suphp: mod_suphp is a module for executing PHP scripts with the permission
-suphp: of their owers rather then the user the webserver runs as. Similar
-suphp: to suEXEC for CGI/SSI, but supporting a configuration file.
+suphp: of their owners rather then the user the webserver runs as.
+suphp: It is similar to suEXEC for CGI/SSI but supports a configuration file.
suphp:
suphp: It uses a setuid root wrapper binary (/usr/sbin/suphp) to change
suphp: the uid of the process executing the PHP interpreter.
suphp:
-suphp: suPHP is maintained by: Sebastian Marsching
+suphp: suPHP is maintained by Sebastian Marsching
suphp:
diff --git a/network/suphp/suphp-0.6.2-vhosts.patch b/network/suphp/suphp-0.6.3-vhosts.patch
index ea6e13c996c1d..ea6e13c996c1d 100644
--- a/network/suphp/suphp-0.6.2-vhosts.patch
+++ b/network/suphp/suphp-0.6.3-vhosts.patch
diff --git a/network/suphp/suphp.SlackBuild b/network/suphp/suphp.SlackBuild
index 0fb2b13fb994c..42515eb19766b 100644
--- a/network/suphp/suphp.SlackBuild
+++ b/network/suphp/suphp.SlackBuild
@@ -4,46 +4,47 @@
# Written by Menno E. Duursma <druiloor@zonnet.nl>
-# Exit on most errors
-set -e
-
PRGNAM=suphp
-VERSION=0.6.2
+VERSION=0.6.3
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
-# The stock Apache on Slackware runs httpd onder system
+# The stock Apache on Slackware runs httpd under system
# user/group account 'apache'. If you happen to use some
-# other account (which should improve security) change below
-# and make sure /etc/apache/suphp.conf matches
-HTTPD_USER=apache
-HTTPD_GROUP=apache
+# other account change the directives below
+HTTPD_USER=${HTTPD_USER:-apache}
+HTTPD_GROUP=${HTTPD_GROUP:-apache}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
+set -e # Exit on most errors
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# Apply patch to have it globally honor the suPHP_Engine directive
-cat $CWD/suphp-0.6.2-vhosts.patch | patch -p0 --verbose
+# Apply a patch to have it globally honor the suPHP_Engine directive
+patch -p0 --verbose < $CWD/suphp-$VERSION-vhosts.patch
-# Default to secure settings, as any of the configuretion options
-# can be overwritten in the config-file /etc/apache/suphp.conf anyways
+# Default to secure settings, as any of the configuration options
+# can be overwritten in the config-file /etc/httpd/suphp.conf anyway
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -52,29 +53,28 @@ CXXFLAGS="$SLKCFLAGS" \
--with-apxs=/usr/sbin/apxs \
--sysconfdir=/etc/httpd \
--with-apache-user=$HTTPD_USER \
- --with-logfile=/var/log/apache/suphp_log
+ --with-logfile=/var/log/httpd/suphp_log \
+ --enable-static=no \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux
-# Compile the application and install it into the $PKG directory
make
-make install-strip DESTDIR=$PKG
+make install DESTDIR=$PKG
-# The above misses Apache module
( cd $PKG
- strip --strip-unneeded usr/libexec/apache/mod_suphp.so
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
-# Copy program documentation into the package
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog doc/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
-# Add a sample configuration file
mkdir -p $PKG/etc/httpd
-cat $CWD/suphp.conf \
- | tr 'webserver_user=apache' "webserver_user=$HTTPD_USER" \
- >> $PKG/etc/httpd/suphp.conf.new
+sed s/'webserver_user=apache'/"webserver_user=$HTTPD_USER"/g \
+ $CWD/suphp.conf >> $PKG/etc/httpd/suphp.conf.new
-# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
@@ -84,7 +84,6 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
echo "chgrp $HTTPD_GROUP usr/sbin/suphp" >> $PKG/install/doinst.sh
echo "chmod 4750 usr/sbin/suphp" >> $PKG/install/doinst.sh
-# Make the package; be sure to leave it in $OUTPUT
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/network/suphp/suphp.conf b/network/suphp/suphp.conf
index 39bc18936b052..9bd6bcbafe08f 100644
--- a/network/suphp/suphp.conf
+++ b/network/suphp/suphp.conf
@@ -1,12 +1,12 @@
[global]
;Path to logfile
-logfile=/var/log/apache/suphp_log
+logfile=/var/log/httpd/suphp_log
;Loglevel
loglevel=info
;User Apache is running as
-webserver_user=nobody
+webserver_user=apache
;Path all scripts have to be in
docroot=/var/www
diff --git a/network/suphp/suphp.info b/network/suphp/suphp.info
index 9eed77561130b..d34d8d10d0b34 100644
--- a/network/suphp/suphp.info
+++ b/network/suphp/suphp.info
@@ -1,8 +1,8 @@
PRGNAM="suphp"
-VERSION="0.6.2"
+VERSION="0.6.3"
HOMEPAGE="http://www.suphp.org/"
-DOWNLOAD="http://www.suphp.org/download/suphp-0.6.2.tar.gz"
-MD5SUM="06ca9e592a5c6dd3dcb9360c958369c1"
+DOWNLOAD="http://www.suphp.org/download/suphp-0.6.3.tar.gz"
+MD5SUM="756e8893857fefed087a89959a87645a"
MAINTAINER="Menno Duursma"
EMAIL="druiloor@zonnet.nl"
-APPROVED="BP{k}"
+APPROVED="rworkman"