diff options
author | CHTEKK <CHTEKK@localhost> | 2006-06-15 15:39:40 +0000 |
---|---|---|
committer | CHTEKK <CHTEKK@localhost> | 2006-06-15 15:39:40 +0000 |
commit | 1a3b30dfdb4b1b4ebe10483f32c1e84da2a6a3b7 (patch) | |
tree | b2a859129d0403c5eb0b79ee9c4db3b81ea2234c | |
parent | Add the SysCP ebuild and it's patches&tarballs (diff) | |
download | chtekk-1a3b30dfdb4b1b4ebe10483f32c1e84da2a6a3b7.tar.gz chtekk-1a3b30dfdb4b1b4ebe10483f32c1e84da2a6a3b7.tar.bz2 chtekk-1a3b30dfdb4b1b4ebe10483f32c1e84da2a6a3b7.zip |
Commit fixed Horde 3.1.1 package wrt bug #136830.
svn path=/; revision=4
-rw-r--r-- | horde/eclass/horde.eclass | 154 | ||||
-rw-r--r-- | horde/www-apps/horde/Manifest | 12 | ||||
-rw-r--r-- | horde/www-apps/horde/files/digest-horde-3.1.1-r1 | 3 | ||||
-rw-r--r-- | horde/www-apps/horde/files/horde-3.1.1-xss.diff | 49 | ||||
-rw-r--r-- | horde/www-apps/horde/horde-3.1.1-r1.ebuild | 35 |
5 files changed, 253 insertions, 0 deletions
diff --git a/horde/eclass/horde.eclass b/horde/eclass/horde.eclass new file mode 100644 index 0000000..c2d3527 --- /dev/null +++ b/horde/eclass/horde.eclass @@ -0,0 +1,154 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ +# +# Help manage the horde project http://www.horde.org/ +# +# Author: Mike Frysinger <vapier@gentoo.org> +# CVS additions by Chris Aniszczyk <zx@mea-culpa.net> +# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu> +# +# This eclass provides generic functions to make the writing of horde +# ebuilds fairly trivial since there are many horde applications and +# they all share the same basic install process. + +# EHORDE_SNAP +# This variable tracks whether the user is using a snapshot version +# +# EHORDE_SNAP_BRANCH +# You set this via the ebuild to whatever branch you wish to grab a +# snapshot of. Typically this is 'HEAD' or 'RELENG'. +# +# EHORDE_CVS +# This variable tracks whether the user is using a cvs version + +inherit webapp eutils +[[ ${PN} != ${PN/-cvs} ]] && inherit cvs + +IUSE="vhosts" + +EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst + +[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/horde-}" +[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ="" + +EHORDE_CVS="false" +EHORDE_SNAP="false" +if [[ ${PN} != ${PN/-cvs} ]] ; then + EHORDE_CVS="true" + HORDE_PN=${HORDE_PN/-cvs} + + ECVS_SERVER="anoncvs.horde.org:/repository" + ECVS_MODULE="${HORDE_PN}" + ECVS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src/${PN}" + ECVS_USER="cvsread" + ECVS_PASS="horde" + + SRC_URI="" + S=${WORKDIR}/${HORDE_PN} + +elif [[ ${PN} != ${PN/-snap} ]] ; then + EHORDE_SNAP="true" + EHORDE_SNAP_BRANCH=${EHORDE_SNAP_BRANCH:-HEAD} + SNAP_PV=${PV:0:4}-${PV:4:2}-${PV:6:2} + + HORDE_PN=${HORDE_PN/-snap} + + SRC_URI="http://ftp.horde.org/pub/snaps/${SNAP_PV}/${HORDE_PN}-${EHORDE_SNAP_BRANCH}-${SNAP_PV}.tar.gz" + S=${WORKDIR}/${HORDE_PN} + +else + SRC_URI="http://ftp.horde.org/pub/${HORDE_PN}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}.tar.gz" + S=${WORKDIR}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-} +fi +HOMEPAGE="http://www.horde.org/${HORDE_PN}" + +LICENSE="LGPL-2" + +# INSTALL_DIR is used by webapp.eclass when USE=-vhosts +INSTALL_DIR="/horde" +[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}" + +horde_pkg_setup() { + webapp_pkg_setup + + if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then + local param + if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then + param="-o" + HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2} + fi + if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then + echo + if [[ ${param} == "-o" ]] ; then + eerror "You MUST re-emerge php with at least one of" + else + eerror "You MUST re-emerge php with all of" + fi + eerror "the following options in your USE:" + eerror " ${HORDE_PHP_FEATURES}" + die "current php install cannot support ${HORDE_PN}" + fi + fi +} + +horde_src_unpack() { + if [[ ${EHORDE_CVS} = "true" ]] ; then + cvs_src_unpack + else + unpack ${A} + fi + cd "${S}" + + [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES} + [[ -f test.php ]] && chmod 000 test.php +} + +horde_src_install() { + webapp_src_preinst + + local destdir=${MY_HTDOCSDIR} + + # Work-around when dealing with CVS sources + [[ ${EHORDE_CVS} = "true" ]] && cd ${HORDE_PN} + + # Install docs and then delete them (except for CREDITS which + # many horde apps include in their help page #121003) + dodoc README docs/* + mv docs/CREDITS "${T}"/ + rm -rf COPYING LICENSE README docs/* + mv "${T}"/CREDITS docs/ + + dodir ${destdir} + cp -r . ${D}/${destdir}/ || die "install files" + webapp_serverowned ${MY_HTDOCSDIR} + + webapp_src_install +} + +horde_pkg_postinst() { + if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then + einfo "Please read /usr/share/doc/${PF}/INSTALL.gz" + fi + einfo "Before this package will work, you have to setup" + einfo "the configuration files. Please review the" + einfo "config/ subdirectory of ${HORDE_PN} in the webroot." + if [[ ${HORDE_PN} != "horde" ]] ; then + ewarn + ewarn "Make sure ${HORDE_PN} is accounted for in horde's root" + ewarn " config/registry.php" + fi + if [[ ${EHORDE_CVS} = "true" ]] ; then + ewarn + ewarn "Use these CVS versions at your own risk." + ewarn "They tend to break things when working with" + ewarn "the non CVS versions of horde." + fi + if use vhosts ; then + echo + ewarn "When installing horde into a vhost dir, you will" + ewarn "need to use the -d option so that it is installed" + ewarn "into the proper location." + fi + webapp_pkg_postinst +} diff --git a/horde/www-apps/horde/Manifest b/horde/www-apps/horde/Manifest new file mode 100644 index 0000000..8f36b2a --- /dev/null +++ b/horde/www-apps/horde/Manifest @@ -0,0 +1,12 @@ +AUX horde-3.1.1-xss.diff 1973 RMD160 cb7af0db0f00c21ca442fad158f424c4b44e1620 SHA1 8448e723b7d1b9795b3005e8a8b6cda6aae9358a SHA256 79ab4162daea72159e7560056c8185ad3cbe47d043bd445c42714260f79ca560 +MD5 06ea158ce79a39ed9b2b96f87f774d6a files/horde-3.1.1-xss.diff 1973 +RMD160 cb7af0db0f00c21ca442fad158f424c4b44e1620 files/horde-3.1.1-xss.diff 1973 +SHA256 79ab4162daea72159e7560056c8185ad3cbe47d043bd445c42714260f79ca560 files/horde-3.1.1-xss.diff 1973 +DIST horde-3.1.1.tar.gz 5068434 RMD160 bb98dbc34caa3410382dcf34afba20e257c62a8d SHA1 8735a11bc42f5aae7b70a555763d239614e4aca5 SHA256 5edb80766cb71832b1c5435b5093392164dbab46bdf5a496050620249d66e06f +EBUILD horde-3.1.1-r1.ebuild 840 RMD160 488a7b8bb2e56b8aa378b43d8610cb37087e7cf8 SHA1 deb4291e831d8aace8248416e71665b17edf88b8 SHA256 f157160b95656bbeaecd771b1278167bed2db4d7ebd5b65f75e4d929fab765c1 +MD5 e39f3de2ad61c6c56f02662bc2049d62 horde-3.1.1-r1.ebuild 840 +RMD160 488a7b8bb2e56b8aa378b43d8610cb37087e7cf8 horde-3.1.1-r1.ebuild 840 +SHA256 f157160b95656bbeaecd771b1278167bed2db4d7ebd5b65f75e4d929fab765c1 horde-3.1.1-r1.ebuild 840 +MD5 581a2d776ccb73879f6947e8041c8eed files/digest-horde-3.1.1-r1 238 +RMD160 044cf54bd95a4ea9bd357ab99e8b6863b905c63e files/digest-horde-3.1.1-r1 238 +SHA256 fb9e9364ffda87f1724d299e9a70679ac553ae9513f6889ab05ed8a6cbdb5870 files/digest-horde-3.1.1-r1 238 diff --git a/horde/www-apps/horde/files/digest-horde-3.1.1-r1 b/horde/www-apps/horde/files/digest-horde-3.1.1-r1 new file mode 100644 index 0000000..6d7c346 --- /dev/null +++ b/horde/www-apps/horde/files/digest-horde-3.1.1-r1 @@ -0,0 +1,3 @@ +MD5 ef5001144b80422b71454d285056e90a horde-3.1.1.tar.gz 5068434 +RMD160 bb98dbc34caa3410382dcf34afba20e257c62a8d horde-3.1.1.tar.gz 5068434 +SHA256 5edb80766cb71832b1c5435b5093392164dbab46bdf5a496050620249d66e06f horde-3.1.1.tar.gz 5068434 diff --git a/horde/www-apps/horde/files/horde-3.1.1-xss.diff b/horde/www-apps/horde/files/horde-3.1.1-xss.diff new file mode 100644 index 0000000..00b36f0 --- /dev/null +++ b/horde/www-apps/horde/files/horde-3.1.1-xss.diff @@ -0,0 +1,49 @@ +--- horde3-3.1.1.orig/templates/problem/problem.inc ++++ horde3-3.1.1/templates/problem/problem.inc +@@ -31,17 +31,17 @@ + + <tr> + <td class="light rightAlign"><?php echo _("Your Name") ?></td> +- <td><input type="text" tabindex="1" name="name" value="<?php echo $name ?>" size="70" /></td> ++ <td><input type="text" tabindex="1" name="name" value="<?php echo htmlspecialchars($name) ?>" size="70" /></td> + </tr> + + <tr> + <td class="light rightAlign"><?php echo _("Your Email Address") ?></td> +- <td><input type="text" tabindex="2" name="email" value="<?php echo $email ?>" size="70" /></td> ++ <td><input type="text" tabindex="2" name="email" value="<?php echo htmlspecialchars($email) ?>" size="70" /></td> + </tr> + + <tr> + <td class="light rightAlign"><?php echo _("Short Summary") ?></td> +- <td><input type="text" tabindex="3" name="subject" value="<?php echo $subject ?>" size="70" /></td> ++ <td><input type="text" tabindex="3" name="subject" value="<?php echo htmlspecialchars($subject) ?>" size="70" /></td> + </tr> + + <tr> +@@ -49,7 +49,7 @@ + </tr> + <tr> + <td></td> +- <td><textarea tabindex="4" name="message" rows="20" cols="80" wrap="hard"><?php echo $message ?></textarea></td> ++ <td><textarea tabindex="4" name="message" rows="20" cols="80" wrap="hard"><?php echo htmlspecialchars($message) ?></textarea></td> + </tr> + + <tr> +--- horde3-3.1.1.orig/test.php ++++ horde3-3.1.1/test.php +@@ -250,12 +250,12 @@ + exit; + + case 'phpinfo': +- echo '<a href="' . $url . '?mode=test"><< Back to test.php</a>'; ++ echo '<a href="' . htmlspecialchars($url) . '?mode=test"><< Back to test.php</a>'; + phpinfo(); + exit; + + case 'filetest': +- echo '<a href="' . $url . '?mode=test"><< Back to test.php</a>'; ++ echo '<a href="' . htmlspecialchars($url) . '?mode=test"><< Back to test.php</a>'; + ?> + <html> + <body bgcolor="white" text="black"> diff --git a/horde/www-apps/horde/horde-3.1.1-r1.ebuild b/horde/www-apps/horde/horde-3.1.1-r1.ebuild new file mode 100644 index 0000000..0188459 --- /dev/null +++ b/horde/www-apps/horde/horde-3.1.1-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +HORDE_PHP_FEATURES="session xml" + +# Patch to fix bug #136830 +EHORDE_PATCHES="${FILESDIR}/${P}-xss.diff" + +inherit horde + +DESCRIPTION="Horde Application Framework" +HOMEPAGE="http://www.horde.org/" + +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="mysql" + +DEPEND="" +RDEPEND="virtual/php + >=sys-devel/gettext-0.10.40 + >=dev-libs/libxml2-2.4.21 + >=www-apps/horde-pear-1.3 + dev-php/PEAR-Log + dev-php/PEAR-Mail_Mime + mysql? ( dev-php/PEAR-DB )" + +pkg_postinst() { + horde_pkg_postinst + echo + einfo "Horde requires PHP to have:" + einfo " ==> 'short_open_tag enabled = On'" + einfo " ==> 'magic_quotes_runtime set = Off'" + einfo " ==> 'file_uploads enabled = On'" + einfo "Please edit /etc/php/apache2-php4/php.ini" +} |