summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD32
-rw-r--r--suphp.conf47
-rw-r--r--suphp.patch12
4 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7e67afcda9f8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = suphp
+ pkgdesc = A tool for executing PHP scripts with the permissions of their owners.
+ pkgver = 0.7.2
+ pkgrel = 4
+ url = http://www.suphp.org/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = apr-util
+ depends = apache
+ backup = etc/suphp/suphp.conf
+ source = http://www.suphp.org/download/suphp-0.7.2.tar.gz
+ source = suphp.conf
+ source = suphp.patch
+ md5sums = 852793953eec97f4ae992e366b517e81
+ md5sums = a5a2279d41630ca2de1ee559dab00467
+ md5sums = 48da8dee2f0fa24536cea825b4ead7bf
+
+pkgname = suphp
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..76cb8584afb7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+pkgname=suphp
+pkgver=0.7.2
+pkgrel=4
+pkgdesc="A tool for executing PHP scripts with the permissions of their owners."
+arch=('i686' 'x86_64')
+depends=("apr-util" "apache")
+url="http://www.suphp.org/"
+license=('GPL')
+backup=('etc/suphp/suphp.conf')
+source=(http://www.suphp.org/download/$pkgname-$pkgver.tar.gz
+ suphp.conf
+ suphp.patch)
+md5sums=('852793953eec97f4ae992e366b517e81'
+ 'a5a2279d41630ca2de1ee559dab00467'
+ '48da8dee2f0fa24536cea825b4ead7bf')
+
+build() {
+ patch -Np1 -d "$srcdir/$pkgname-$pkgver" < suphp.patch
+ cd "$srcdir/$pkgname-$pkgver"
+ autoreconf -if
+ ./configure --prefix=/usr --sbindir=/usr/bin --with-apr=/usr/bin/apr-1-config --sysconfdir=/etc/suphp --with-apache-user=http --with-setid-mode=owner --with-min-uid=33 --with-min-gid=33
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ install -D -m644 "$srcdir/suphp.conf" "$pkgdir/etc/suphp/suphp.conf"
+ install -D -m644 "$srcdir/$pkgname-$pkgver/doc/suphp.conf-example" "$pkgdir/etc/suphp/suphp.conf.example"
+}
diff --git a/suphp.conf b/suphp.conf
new file mode 100644
index 000000000000..624b379f6f19
--- /dev/null
+++ b/suphp.conf
@@ -0,0 +1,47 @@
+[global]
+;Path to logfile
+logfile=/var/log/suphp.log
+
+;Loglevel
+loglevel=info
+
+;User Apache is running as
+webserver_user=http
+
+;Path all scripts have to be in
+docroot=/var/www:${HOME}/public_html:/srv/http
+
+;Path to chroot() to before executing script
+;chroot=/mychroot
+
+; Security options
+allow_file_group_writeable=false
+allow_file_others_writeable=false
+allow_directory_group_writeable=false
+allow_directory_others_writeable=false
+
+;Check wheter script is within DOCUMENT_ROOT
+check_vhost_docroot=false
+
+;Send minor error messages to browser
+errors_to_browser=true
+
+;PATH environment variable
+env_path=/bin:/usr/bin
+
+;Umask to set, specify in octal notation
+umask=0077
+
+; Minimum UID
+min_uid=33
+
+; Minimum GID
+min_gid=33
+
+
+[handlers]
+;Handler for php-scripts
+application/x-httpd-php="php:/usr/bin/php-cgi"
+
+;Handler for CGI-scripts
+application/x-suphp-cgi="execute:!self"
diff --git a/suphp.patch b/suphp.patch
new file mode 100644
index 000000000000..062b060091ee
--- /dev/null
+++ b/suphp.patch
@@ -0,0 +1,12 @@
+diff -uN a/configure.ac b/configure.ac
+--- a/configure.ac 2013-05-20 19:26:56.000000000 +0300
++++ b/configure.ac 2013-05-20 20:33:03.616154646 +0300
+@@ -66,7 +66,7 @@
+ | cut -f2 -d"/" \
+ | cut -f1 -d" "`
+ major_version=`echo $APACHE_VERSION|cut -f1,2 -d.`
+- if test "$major_version" = "2.0" -o "$major_version" = "2.2"; then
++ if test "$major_version" = "2.0" -o "$major_version" = "2.2" -o "$major_version" = "2.4"; then
+ APACHE_VERSION_2=true
+ APACHE_VERSION_1_3=false
+ else