mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
network/suphp: Updated for version 0.6.3
This commit is contained in:
parent
4b92df5b32
commit
b7ae880ff6
7 changed files with 41 additions and 50 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue