diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2007-09-09 07:34:17 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2007-09-09 07:34:17 +0000 |
commit | eed22e3ca44d48e27588866ad2eafc3e27d60c66 (patch) | |
tree | b2a816c723821fd5ced9512f3918a98d324064a4 /www-apache/mod_suphp | |
parent | Switchtower has been removed from the tree (diff) | |
download | gentoo-2-eed22e3ca44d48e27588866ad2eafc3e27d60c66.tar.gz gentoo-2-eed22e3ca44d48e27588866ad2eafc3e27d60c66.tar.bz2 gentoo-2-eed22e3ca44d48e27588866ad2eafc3e27d60c66.zip |
fix #191640
(Portage version: 2.1.3.7)
Diffstat (limited to 'www-apache/mod_suphp')
-rw-r--r-- | www-apache/mod_suphp/ChangeLog | 8 | ||||
-rw-r--r-- | www-apache/mod_suphp/files/digest-mod_suphp-0.6.2-r2 | 3 | ||||
-rw-r--r-- | www-apache/mod_suphp/files/mod_suphp-0.6.2-handler.patch | 31 | ||||
-rw-r--r-- | www-apache/mod_suphp/mod_suphp-0.6.2-r2.ebuild | 116 |
4 files changed, 157 insertions, 1 deletions
diff --git a/www-apache/mod_suphp/ChangeLog b/www-apache/mod_suphp/ChangeLog index 57360b837103..0c76b58b1138 100644 --- a/www-apache/mod_suphp/ChangeLog +++ b/www-apache/mod_suphp/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for www-apache/mod_suphp # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_suphp/ChangeLog,v 1.13 2007/06/03 14:54:05 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_suphp/ChangeLog,v 1.14 2007/09/09 07:34:17 hollow Exp $ + +*mod_suphp-0.6.2-r2 (09 Sep 2007) + + 09 Sep 2007; Benedikt Böhm <hollow@gentoo.org> + +files/mod_suphp-0.6.2-handler.patch, +mod_suphp-0.6.2-r2.ebuild: + fix #191640 *mod_suphp-0.6.2-r1 (03 Jun 2007) diff --git a/www-apache/mod_suphp/files/digest-mod_suphp-0.6.2-r2 b/www-apache/mod_suphp/files/digest-mod_suphp-0.6.2-r2 new file mode 100644 index 000000000000..4090dfae7750 --- /dev/null +++ b/www-apache/mod_suphp/files/digest-mod_suphp-0.6.2-r2 @@ -0,0 +1,3 @@ +MD5 06ca9e592a5c6dd3dcb9360c958369c1 suphp-0.6.2.tar.gz 372228 +RMD160 6cafc7ef9bb261ee34bed08976a5e4a929f25a73 suphp-0.6.2.tar.gz 372228 +SHA256 1bb9c6af84bb901c8a39611354e49e5bcd79185eb37b02878dc0840facf0ccfc suphp-0.6.2.tar.gz 372228 diff --git a/www-apache/mod_suphp/files/mod_suphp-0.6.2-handler.patch b/www-apache/mod_suphp/files/mod_suphp-0.6.2-handler.patch new file mode 100644 index 000000000000..31505c2d26b4 --- /dev/null +++ b/www-apache/mod_suphp/files/mod_suphp-0.6.2-handler.patch @@ -0,0 +1,31 @@ +Index: suphp-0.6.2/src/apache2/mod_suphp.c +=================================================================== +--- suphp-0.6.2.orig/src/apache2/mod_suphp.c ++++ suphp-0.6.2/src/apache2/mod_suphp.c +@@ -321,8 +321,8 @@ static const command_rec suphp_cmds[] = + AP_INIT_TAKE2("suPHP_UserGroup", suphp_handle_cmd_user_group, NULL, RSRC_CONF | ACCESS_CONF, + "User and group scripts shall be run as"), + #endif +- AP_INIT_ITERATE("suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, ACCESS_CONF, "Tells mod_suphp to handle these MIME-types"), +- AP_INIT_ITERATE("suPHP_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, ACCESS_CONF, "Tells mod_suphp not to handle these MIME-types"), ++ AP_INIT_ITERATE("suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, RSRC_CONF | ACCESS_CONF, "Tells mod_suphp to handle these MIME-types"), ++ AP_INIT_ITERATE("suPHP_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, RSRC_CONF | ACCESS_CONF, "Tells mod_suphp not to handle these MIME-types"), + {NULL} + }; + +Index: suphp-0.6.2/src/apache/mod_suphp.c +=================================================================== +--- suphp-0.6.2.orig/src/apache/mod_suphp.c ++++ suphp-0.6.2/src/apache/mod_suphp.c +@@ -249,9 +249,9 @@ static const command_rec suphp_cmds[] = + {"suPHP_UserGroup", suphp_handle_cmd_user_group, NULL, + RSRC_CONF|ACCESS_CONF, TAKE2, "User and group scripts shall be run as"}, + #endif +- {"suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, ACCESS_CONF, ++ {"suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, RSRC_CONF|ACCESS_CONF, + ITERATE, "Tells mod_suphp to handle these MIME-types"}, +- {"suphp_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, ACCESS_CONF, ++ {"suphp_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, RSRC_CONF|ACCESS_CONF, + ITERATE, "Tells mod_suphp not to handle these MIME-types"}, + {NULL} + }; diff --git a/www-apache/mod_suphp/mod_suphp-0.6.2-r2.ebuild b/www-apache/mod_suphp/mod_suphp-0.6.2-r2.ebuild new file mode 100644 index 000000000000..e8f4bd7621df --- /dev/null +++ b/www-apache/mod_suphp/mod_suphp-0.6.2-r2.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_suphp/mod_suphp-0.6.2-r2.ebuild,v 1.1 2007/09/09 07:34:17 hollow Exp $ + +inherit apache-module autotools eutils + +MY_P="${P/mod_/}" + +SETIDMODES="mode-force mode-owner mode-paranoid" + +KEYWORDS="~amd64 ~ppc ~x86" + +DESCRIPTION="A PHP wrapper for Apache2" +HOMEPAGE="http://www.suphp.org/" +SRC_URI="http://www.suphp.org/download/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +IUSE="checkpath ${SETIDMODES}" + +S="${WORKDIR}/${MY_P}" + +APXS2_S="${S}/src/apache2" +APACHE2_MOD_CONF="70_${PN}" +APACHE2_MOD_DEFINE="SUPHP" + +need_apache2 + +pkg_setup() { + modecnt=0 + for mode in ${SETIDMODES} ; do + if use ${mode} ; then + if [[ ${modecnt} -eq 0 ]] ; then + SUPHP_SETIDMODE=${mode/mode-} + let modecnt++ + elif [[ ${modecnt} -ge 1 ]] ; then + die "You can only select ONE mode in your USE flags!" + fi + fi + done + + if [[ ${modecnt} -eq 0 ]] ; then + ewarn + ewarn "No mode selected, defaulting to paranoid!" + ewarn + ewarn "If you want to choose another mode, put mode-force OR mode-owner" + ewarn "into your USE flags and run emerge again." + ewarn + SUPHP_SETIDMODE=paranoid + fi + + elog + elog "Using ${SUPHP_SETIDMODE/mode-} mode" + elog + elog "You can manipulate several configure options of this" + elog "ebuild through environment variables:" + elog + elog "SUPHP_MINUID: Minimum UID, which is allowed to run scripts (default: 1000)" + elog "SUPHP_MINGID: Minimum GID, which is allowed to run scripts (default: 100)" + elog "SUPHP_APACHEUSER: Name of the user Apache is running as (default: apache)" + elog "SUPHP_LOGFILE: Path to suPHP logfile (default: /var/log/apache2/suphp_log)" + elog + + apache-module_pkg_setup +} + +src_unpack() { + unpack "${A}" + cd "${S}" + + epatch "${FILESDIR}"/${P}-handler.patch + + eautoreconf +} + +src_compile() { + local myargs="" + use checkpath || myargs="${myargs} --disable-checkpath" + + : ${SUPHP_MINUID:=1000} + : ${SUPHP_MINGID:=100} + : ${SUPHP_APACHEUSER:="apache"} + : ${SUPHP_LOGFILE:="/var/log/apache2/suphp_log"} + + myargs="${myargs} \ + --with-setid-mode=${SUPHP_SETIDMODE} \ + --with-min-uid=${SUPHP_MINUID} \ + --with-min-gid=${SUPHP_MINGID} \ + --with-apache-user=${SUPHP_APACHEUSER} \ + --with-logfile=${SUPHP_LOGFILE} \ + --with-apxs=${APXS2} \ + --with-apr=/usr" + econf ${myargs} || die "econf failed" + + emake || die "make failed" +} + +src_install() { + apache-module_src_install + dosbin src/suphp + fperms 4755 /usr/sbin/suphp + + dodoc ChangeLog doc/CONFIG + + docinto apache + dodoc doc/apache/CONFIG doc/apache/INSTALL + + insinto /etc + doins "${FILESDIR}/suphp.conf" +} + +pkg_postinst() { + # Make sure the suphp binary is set setuid + chmod 4755 "${ROOT}"/usr/sbin/suphp + + apache-module_pkg_postinst +} |