diff options
author | Heinrich Wendel <lanius@gentoo.org> | 2004-09-11 21:07:44 +0000 |
---|---|---|
committer | Heinrich Wendel <lanius@gentoo.org> | 2004-09-11 21:07:44 +0000 |
commit | ce57f2b65a0e6449a9892b6adf77b302bc0f51f6 (patch) | |
tree | 374b79a8673f0d0c602fd39d7c6a6a6465286a9a /net-zope/zope | |
parent | Fixed LICENSE declaration, updated metadata info, and added a bash-completion... (diff) | |
download | gentoo-2-ce57f2b65a0e6449a9892b6adf77b302bc0f51f6.tar.gz gentoo-2-ce57f2b65a0e6449a9892b6adf77b302bc0f51f6.tar.bz2 gentoo-2-ce57f2b65a0e6449a9892b6adf77b302bc0f51f6.zip |
fix permissions, bug #59217
Diffstat (limited to 'net-zope/zope')
-rw-r--r-- | net-zope/zope/ChangeLog | 5 | ||||
-rw-r--r-- | net-zope/zope/Manifest | 24 | ||||
-rw-r--r-- | net-zope/zope/files/digest-zope-2.7.2-r1 | 1 | ||||
-rw-r--r-- | net-zope/zope/zope-2.7.2-r1.ebuild | 161 |
4 files changed, 174 insertions, 17 deletions
diff --git a/net-zope/zope/ChangeLog b/net-zope/zope/ChangeLog index 30226260547d..f2342be1f7c5 100644 --- a/net-zope/zope/ChangeLog +++ b/net-zope/zope/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for net-zope/zope # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/ChangeLog,v 1.40 2004/09/06 00:29:39 ciaranm Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/ChangeLog,v 1.41 2004/09/11 21:07:44 lanius Exp $ + + 11 Sep 2004; Heinrich Wendel <lanius@gentoo.org> zope-2.7.2-r1.ebuild: + fix permissions, bug #59217 06 Sep 2004; Ciaran McCreesh <ciaranm@gentoo.org> zope-2.6.4-r1.ebuild: Switch to use epause and ebeep, bug #62950 diff --git a/net-zope/zope/Manifest b/net-zope/zope/Manifest index 97e9bb40a0d9..3daedfb35caa 100644 --- a/net-zope/zope/Manifest +++ b/net-zope/zope/Manifest @@ -1,26 +1,18 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 05451aa19ac4681fd16a5a480f1c7ea5 zope-2.7.1.ebuild 3860 -MD5 50e1022ae8303f4cf5fe216fe3c63799 ChangeLog 7624 -MD5 7890d88c5c6d189fbe6b187a3ebb6532 metadata.xml 161 -MD5 a7b4f0510d44c03e310bf769fee46b18 zope-2.7.2.ebuild 4745 +MD5 4dd02f63dedbebc44dbe6da8b0e684cb zope-2.7.2-r1.ebuild 5033 MD5 95db19264fc46abc1bf3fd25469fcc56 zope-2.6.4-r1.ebuild 5359 +MD5 a7b4f0510d44c03e310bf769fee46b18 zope-2.7.2.ebuild 4745 +MD5 5db38c503d4c88c6ea7f41fb79a4afbe ChangeLog 7728 +MD5 7890d88c5c6d189fbe6b187a3ebb6532 metadata.xml 161 MD5 ddddbf81a9803fef7474cb22df00a924 files/digest-zope-2.6.4-r1 64 +MD5 c8b31c146de4f24ffcb5442630034d50 files/digest-zope-2.7.2-r1 62 MD5 ae93e53addb8b829a0c097a3b3d9ddf4 files/digest-zope-2.7.1 60 MD5 c8b31c146de4f24ffcb5442630034d50 files/digest-zope-2.7.2 62 MD5 037cf91a5b4d60efe166f90210c837ed files/i18n-1.0.0.patch 8080 +MD5 a18ddd3f2cdcb815cf86f4b9c4bdd6fe files/2.6.4/zope.confd 950 +MD5 4d278d26bb7be7693f7213861a9d3805 files/2.6.4/zope.initd 3791 MD5 a18ddd3f2cdcb815cf86f4b9c4bdd6fe files/2.7.1/zope.confd 950 MD5 8eed6ba044039a495f48e42555ee0893 files/2.7.1/zope.initd 1030 MD5 68ed65ed913618858b8c3e298fbdf5a7 files/2.7.1/zdctl.patch 570 -MD5 a18ddd3f2cdcb815cf86f4b9c4bdd6fe files/2.6.4/zope.confd 950 -MD5 4d278d26bb7be7693f7213861a9d3805 files/2.6.4/zope.initd 3791 -MD5 bce3b7d98963ff6f3e3d53557f3b4912 files/2.7.2/gid.patch 460 MD5 8b5cd1aaf23873fda5386cae2f850b4b files/2.7.2/zope.initd 1306 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.4 (GNU/Linux) - -iD8DBQFBO67JLLFUmVNQ7rkRAvLzAJ9Qo3o7fysOsvgzW0z99iP8H2Xi6gCcCL+l -FlbZxLcKxFkdLVAJ71IOgWw= -=1EFy ------END PGP SIGNATURE----- +MD5 bce3b7d98963ff6f3e3d53557f3b4912 files/2.7.2/gid.patch 460 diff --git a/net-zope/zope/files/digest-zope-2.7.2-r1 b/net-zope/zope/files/digest-zope-2.7.2-r1 new file mode 100644 index 000000000000..c184e1a936a7 --- /dev/null +++ b/net-zope/zope/files/digest-zope-2.7.2-r1 @@ -0,0 +1 @@ +MD5 08b3c4a119aa1ded2e7b1b3d5bc45425 Zope-2.7.2-0.tgz 2754459 diff --git a/net-zope/zope/zope-2.7.2-r1.ebuild b/net-zope/zope/zope-2.7.2-r1.ebuild new file mode 100644 index 000000000000..46b9518f00d7 --- /dev/null +++ b/net-zope/zope/zope-2.7.2-r1.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.7.2-r1.ebuild,v 1.1 2004/09/11 21:07:44 lanius Exp $ + +inherit eutils + +DESCRIPTION="Zope is a web application platform used for building high-performance, dynamic web sites." +HOMEPAGE="http://www.zope.org" +SRC_URI="http://www.zope.org/Products/Zope/${PV}/Zope-${PV}-0.tgz" +LICENSE="ZPL" +SLOT="${PV}" + +KEYWORDS="~x86 ~sparc ~ppc ~alpha ~amd64" +IUSE="unicode" + +RDEPEND="=dev-lang/python-2.3*" +python='python2.3' + +DEPEND="${RDEPEND} +virtual/libc +>=sys-apps/sed-4.0.5 +>=app-admin/zope-config-0.4-r1" + +S="${WORKDIR}/Zope-${PV}-0" + +ZUID=zope +ZGID=zope +ZGID_INST="$(echo ${PN}-${PV} | sed -e 's/\./_/g' )" +ZS_DIR=${ROOT%/}/usr/lib/ +ZI_DIR=${ROOT%/}/var/lib/zope/ +ZSERVDIR=${ZS_DIR}${PN}-${PV}/ +ZINSTDIR=${ZI_DIR}${PN}-${PV}/ + +RCNAME=zope.initd + +# Narrow the scope of ownership/permissions. +# Security plan: +# * ZUID is the superuser for all zope instances. +# * ZGID is for a single instance's administration. +# * Other's should not have any access to ${ZSERVDIR}, +# because they can work through the Zope web interface. +# This should protect our code/data better. + +# Parameters: +# $1 = instance directory +# $2 = group +setup_security() { + # The old version made everything owned by zope:${DEFAULT_INSTANCE_GID}, + # and group-writable. This is like making everything in net-www/apache2 + # owned by apache! The zope instance runs as the zope user, so the zope + # user should not own any files. However, we make everything group-owned + # by the zope group, of which the zope user is a member, so that running + # zope instances will be able to read everything. + # -- Andy Dustman + + chown -R root:${2} ${1} + chmod -R g+r,g-w,o-rwx ${1} +} + +install_instance() { + # Here we add our default zope instance. + if [ -d ${ZINSTDIR} ] ; then + die "Default instance directory (${ZINSTDIR} already exists!" + fi + if [ -f ${ZI_DIR}.default ] ; then + def_instance=`cat ${ZI_DIR}.default` + die "Default instance file (${ZI_DIR}.default already exists -> $def_instance" + fi + einfo "Creating default zope instance at ${ZINSTDIR} with command:" + einfo "/usr/sbin/zope-config --zserv=${ZSERVDIR} --zinst=${ZINSTDIR} --zgid=${ZGID_INST} --zinituser" + ewarn "Default admin user created with password admin. Please change it." + /usr/sbin/zope-config --zserv=${ZSERVDIR} --zinst=${ZINSTDIR} --zgid=${ZGID_INST} --zinituser + einfo "You can also enable autostart on reboot using: rc-update -a ${ZGID_INST} default" +} + +pkg_preinst() { + enewgroup ${ZGID} 261 + usermod -g ${ZGID} ${ZUID} 2>&1 >/dev/null || \ + enewuser ${ZUID} 261 /bin/bash ${ZS_DIR} ${ZGID} + + #[cs] Moved setup_security here to fix Bug #59217 + setup_security ${D}${ZSERVDIR} ${ZGID} +} + +src_unpack() { + unpack ${A} + cd ${S} + use amd64 \ + && epatch ${FILESDIR}/2.7.2/gid.patch +} + +src_compile() { + #[cs] TODO: ZOPE_DIR should be something else.... + ./configure --ignore-largefile --prefix=${ZOPE_DIR} || die "Failed to configure." + emake || die "Failed to compile." +} + +src_install() { + dodoc README.txt + dodoc doc/*.txt + docinto PLATFORMS ; dodoc doc/PLATFORMS/* + + # Patched StructuredText will accept source text formatted in utf-8 encoding, + # apply all formattings and output utf-8 encoded text. + # if you want to use this option you need to set your + # system python encoding to utf-8 (create the file sitecustomize.py inside + # your site-packages, add the following lines + # import sys + # sys.setdefaultencoding('utf-8') + # If this is a problem, let me know right away. --batlogg@gentoo.org + # I wondering if we need a USE flag for this and wheter we can set the + # sys.encoding automtically + # so i defined a use flag + + if use unicode; then + einfo "Patching structured text" + einfo "make sure you have set the system python encoding to utf-8" + einfo "create the file sitecustomize.py inside your site-packages" + einfo "import sys" + einfo "sys.setdefaultencoding('utf8')" + cd ${S}/lib/python/StructuredText/ + epatch ${FILESDIR}/i18n-1.0.0.patch + cd ${S} + fi + + make install PREFIX=${D}${ZSERVDIR} + rm -rf ${D}${ZSERVDIR}doc + dosym ${DOCDESTTREE} ${D}${ZSERVDIR}doc + + skel=${D}${ZSERVDIR}skel + dodir /etc/init.d + cp ${FILESDIR}/${PV}/zope.initd ${skel}/zope.initd +} + +pkg_postinst() { + einfo "Be warned that you need at least one zope instance to run zope." + einfo "To create empty new default instance, please use command:" + einfo "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" + einfo "Please use zope-config command for futher instance management." +} + +pkg_postrm() { + # rcscripts files will remain. i.e. /etc protection. + + # Delete .default if this ebuild is the default. zprod-manager will + # have to handle a missing default; + # TODO: this should be checked + rm -f ${ZI_DIR}/.default + + # TODO: Verify this is right. + #if [ -e ${ZI_DIR}.default ]; then + # if [ "$(cat ${ZI_DIR}.default)" = "${PN}-${PV}" ]; then + # rm -f ${ZI_DIR}.default + # fi + #fi +} + +pkg_config() { + install_instance +} + |