Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 111559 Details for
Bug 77651
VHCS: Virtual Hosting Control System (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
www-servers/vhcs-2.4.7.1-r2
vhcs-2.4.7.1-r2.ebuild (text/plain), 14.15 KB, created by
MT
on 2007-02-28 15:00:15 UTC
(
hide
)
Description:
www-servers/vhcs-2.4.7.1-r2
Filename:
MIME Type:
Creator:
MT
Created:
2007-02-28 15:00:15 UTC
Size:
14.15 KB
patch
obsolete
># Copyright 1999-2006 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > ># TODO: ># 2- when upgrading the package all the new crypt keys are regenerated. this make ># password stored into /etc/vhcs2/vhcs2.conf not valide. to fix the problem ># the ebuild must able to take previous crypt keys and save over the new one. ># 3- add into pkg_config() a check for the right php.ini include_path (/usr/share/php/ and /usr/share/php/smarty?) ># 5- force the vhosts USE flag ># 6- if the dir /etc/vhcs2/ exists skip the creation of new configuration files. ># 9- add patch for amd64 compilation ># 10- CODE_PHP=/usr/sbin/encode-file ?????? ># TODO: FIX and backup of /etc/vhcs/vhcs2.conf ># TODO: fix etc/init.d/vhcs2_daemon creation. > >inherit eutils webapp webapp-apache depend.php depend.apache > >DESCRIPTION="VHCS is a Professional Control Panel Software for server management" >HOMEPAGE="http://www.vhcs.net/" >SRC_URI="mirror://sourceforge/${PN}/${PN}2-${PV}.tar.bz2 > mirror://sourceforge/${PN}/${PN}_patch_2006-02-09.tar.bz2" > >ROOT_PATH="/usr/share/webapps/${PN}/${PV}-${PR}/htdocs" > >WEBAPP_MANUAL_SLOT="yes" >LICENSE="GPL-2" >KEYWORDS="~x86 ~amd64" >IUSE="mysql postgres" > >need_php5 >need_apache2 > >DEPEND=">=sys-apps/sed-4 > sys-apps/gawk > >=dev-lang/perl-5.8.2" > >RDEPEND=" > dev-perl/MIME-tools > virtual/perl-MIME-Base64 > virtual/perl-Digest-MD5 > dev-perl/crypt-cbc > dev-perl/Crypt-Blowfish > dev-perl/DBI > dev-perl/Crypt-PasswdMD5 > dev-perl/Date-Calc > dev-perl/DateManip > dev-perl/IO-stringy > dev-perl/Mail-Sendmail > dev-perl/MailTools > dev-perl/Net-DNS > dev-perl/Net-Netmask > perl-core/libnet > dev-perl/SNMP_Session > dev-perl/TermReadKey > dev-perl/Term-ReadPassword > dev-perl/TimeDate > mail-mta/postfix > dev-libs/cyrus-sasl > net-mail/courier-imap > mail-filter/maildrop > net-dns/bind > net-ftp/proftpd > net-firewall/iptables > net-www/apache > virtual/php > dev-php/adodb > dev-php/smarty > crypt? ( dev-libs/libmcrypt ) > mysql? ( >=dev-db/mysql-4.0.1 > dev-perl/DBD-mysql ) > postgres? ( >=dev-db/postgresql-8.0 > >=dev-perl/DBD-Pg-1.31 )" > >S="${WORKDIR}/${PN}2-${PV}" > >pkg_setup() { > overlay_pkg_setup > > # checking for right PHP use flags > local PHP_USE_FLAGS="wddx gd $(use crypt && echo crypt) $(use mysql && echo mysqli mysql) $(use postgres && echo postgres)" > if ! PHPCHECKNODIE="yes" require_php_with_use ${PHP_USE_FLAGS} ; then > echo > eerror "Please re-install ${PHP_PKG} with these required USE enabled:" > eerror "${PHP_USE_FLAGS}" > ebeep 3 > die > fi > > # checking for right Postfix use flags > local POSTFIX_USE_FLAGS="ssl sasl hardened $(use mysql && echo mysql) $(use postgres && echo postgres)" > if ! built_with_use mail-mta/postfix ${POSTFIX_USE_FLAGS}; then > echo > eerror "Please re-install mail-mta/postfix with these required USE enabled:" > eerror "${POSTFIX_USE_FLAGS}" > ebeep 3 > die > fi > > # checking for right ProFTPd use flags > local PROFTPD_USE_FLAGS="ssl hardened softquota $(use mysql && echo mysql) $(use postgres && echo postgres)" > if ! built_with_use net-ftp/proftpd ${PROFTPD_USE_FLAGS}; then > echo > eerror "Please re-install net-ftp/proftpd with these required USE enabled:" > eerror "${PROFTPD_USE_FLAGS}" > ebeep 3 > die > fi > > # checking for right Courier Authlib use flags > local COURIERAUTHLIB_USE_FLAGS="$(use crypt && echo crypt) $(use mysql && echo mysql) $(use postgres && echo postgres)" > if ! built_with_use net-libs/courier-authlib ${COURIERAUTHLIB_USE_FLAGS}; then > echo > eerror "Please re-install net-libs/courier-authlib with these required USE enabled:" > eerror "${COURIERAUTHLIB_USE_FLAGS}" > ebeep 3 > die > fi > > # checking for right Libnet use flags > if ! built_with_use perl-core/libnet sasl; then > echo > eerror "Please re-install perl-core/libnet with the required USE \"sasl\" enabled" > ebeep 3 > die > fi > > # checking for right Cyrus SASL use flags > local CYRUSSASL_USE_FLAGS="ssl $(use crypt && echo crypt) $(use mysql && echo mysql) $(use postgres && echo postgres)" > if ! built_with_use dev-libs/cyrus-sasl ${CYRUSSASL_USE_FLAGS}; then > echo > eerror "Please re-install dev-libs/cyrus-sasl with these required USE enabled:" > eerror "${CYRUSSASL_USE_FLAGS}" > ebeep 3 > die > fi > > # this is really necessary? > enewgroup vhcs > enewuser vhcs -1 -1 /var/lib/vhcs vhcs >} > >src_unpack() { > unpack ${A} > cd ${S} > > # Install security patches. > # for infos see: http://vhcs.net/new/modules/news/article.php?storyid=25 > ebegin "Installing security patch" > cp ../${PN}_patch_2006-02-09/gui/include/login.php gui/include/login.php > eend $? > > # FIX: Crypt::CBC key lenght error, default setup is 56 but 32 is required by VHCS. > epatch ${FILESDIR}/${PN}-${PV}-common_code.patch || die "failed to patch vhcs2_common_code.pl" > > # various fixes for PHP code: > # - enable PHP Error Reporting (E_ALL) > # - fix wrong 'call by reference' usage > # - fix uebimiau webmail files with short PHP tags: <? (<?php is a more portable way) > # - fix uebimiau wrong usage of the PHP function: Header() > # - fix PHP warning about missing $theme variable into VHCS Filemanager tool > epatch ${FILESDIR}/${PN}-${PV}-php5.patch || die "failed to patch gui/include/vhcs-lib.php" > > # FIX: VHCS have a bundled ADODB package, but it's better to use the package > # from portage (dev-php/adodb), because it's more updated and can grant > # more stability and security rather than the bundled one. > rm -rf ${S}/gui/include/adodb/ > epatch ${FILESDIR}/${PN}-${PV}-adodb_paths_fix.patch || die "failed to patch gui/include/sql.php" > > # seding to avoid hardcoded absolute path(s) (/var/www/vhcs2) > sed -i -e "s:/var/www/vhcs2:${ROOT_PATH}:" ${S}/configs/apache/httpd.conf || die "seeding apache/http.conf" > sed -i -e "s:/var/www/vhcs2:${ROOT_PATH}:" ${S}/configs/apache/parts/vhcs2_base.tpl || die "seeding parts/vhcs2_base.tpl" > sed -i -e "s:/var/www/vhcs2:${ROOT_PATH}:" ${S}/configs/apache/working/vhcs2.conf || die "seeding working/vhcs2.conf" > sed -i -e "s:/var/www/vhcs2/daemon:${ROOT_PATH}/bin:" ${S}/configs/init.d/vhcs2_daemon || die "seeding init.d/vhcs2_daemon" > sed -i -e "s:/var/www/vhcs2:${ROOT_PATH}:" ${S}/configs/logrotate/vhcs2 || die "seeding logrotate/vhcs2" > sed -i -e "s:/var/www/vhcs2:${ROOT_PATH}:" ${S}/configs/postfix/master.cf || die "seeding master.cf" > sed -i -e "s:/var/www/vhcs2:${ROOT_PATH}:" ${S}/configs/postfix/master.cf || die "seeding master.cf" > sed -i -e "s:/var/www/vhcs2:${ROOT_PATH}:" ${S}/gui/admin/reseller_fix.php || die "seeding reseller_fix.php" > > # FIX: portage sandbox > sed -i -e "s:INST_PREF=/tmp/vhcs-2.4.7.1:INST_PREF=${D}:" \ > -e "s:/var/www/vhcs2:${MY_HTDOCSDIR}:" \ > -e "s:SYSTEM_MAKE_DIRS=/usr/sbin/vhcs2-mkdirs.pl:SYSTEM_MAKE_DIRS=${D}usr/sbin/vhcs2-mkdirs.pl:" ${S}/Makefile > sed -i -e "s:./vhcs2-mkdirs.pl /usr/sbin:./vhcs2-mkdirs.pl ${D}usr/sbin/vhcs2-mkdirs.pl:" ${S}/tools/build/Makefile > > # FIX: make VHCS Apache configuration file compliant to Gentoo standards. > sed -i -e "s:/apache2/sites-available:/apache2/vhosts.d:" ${S}/configs/apache/Makefile > > # FIX: VHCS Setup Tool (engine/setup/vhcs2-setup) call the binary "a2ensite" > # but it's a specific Debian binary, Gentoo do not have it, so we need to > # remove the call from the script. p.s.: the patch fix also a little typo. > # FIX: removed from the VHCS Setup Tool all the call to 'vhcs2_daemon' and 'vhcs2_network' > # because are specific debian init script(s), and Gentoo do not need them. > epatch ${FILESDIR}/${PN}-${PV}-vhcs2-setup.patch || die "failed to patch engine/setup/vhcs2-setup" > > # FIX: substitute the deprecated ProFTPd directive "DisplayFirstChdir" with > # the new one "DisplayChdir" (required by proftp-1.3.x) > sed -i -e "s:DisplayFirstChdir:DisplayChdir:" ${S}/configs/proftpd/proftpd.conf > > # FIX: remove not necessary debian specific init scripts. > epatch ${FILESDIR}/${PN}-${PV}-init.patch || die "failed to patch configs/Makefile" > rm -rf ${S}/configs/init.d/ >} > >src_compile() { > > # VHCS Makefile(s) do not have a general make directive, but have only a "make install". > # We can safely skip this process and go to the installation section. > einfo "${PN/vhcs/VHCS Pro} v${PV} - Spartacus" >} > >src_install() { > > # pre installation > webapp_src_preinst > > # install documentation > dodoc ${S}/CHANGELOG > dodoc ${S}/docs > > # FIX: create required dirs > # VHCS Makefile(s) are not portage sandbox compliant, > # so we need to manualy take care of it. > dodir /usr/sbin > dodir /etc/vhcs2 > dodir /var/log/vhcs2 > > # before to install the new VHCS2 config file, > # check if exists a previous one, and try to backup it. > local oldname="/etc/vhcs2/vhcs2.conf" > if ! [[ -f ${oldname} ]]; then > ebegin "First time installation, patching /etc/vhcs2.conf" > webapp-determine-installowner > sed -i -e "s:MR_LOCK_FILE = /tmp/vhcs2.lock:MR_LOCK_FILE = /var/run/vhcs2.lock:" \ > -e "s:/var/www/vhcs2: ${ROOT_PATH}:" \ > -e "s:APACHE_CONF_FILE = /etc/apache2/sites-available/vhcs2.conf:APACHE_CONF_FILE = /etc/apache2/vhosts.d/vhcs2.conf:" \ > -e "s:APACHE_USER = www-data:APACHE_USER = ${HTTPD_USER}:" \ > -e "s:APACHE_GROUP = www-data:APACHE_GROUP = ${HTTPD_GROUP}:" \ > -e "s:AUTHLIB_CONF_DIR = /etc/courier:AUTHLIB_CONF_DIR = /etc/courier/authlib:" \ > -e "s:CMD_NAMED = /etc/init.d/bind9:CMD_NAMED = /etc/init.d/named:" \ > -e "s:CMD_AUTHD = /etc/init.d/courier-authdaemon:CMD_AUTHD = /etc/init.d/courier-authlib:" \ > -e "s:CMD_IMAP = /etc/init.d/courier-imap:CMD_IMAP = /etc/init.d/courier-imapd:" \ > -e "s:CMD_POP = /etc/init.d/courier-pop:CMD_POP = /etc/init.d/courier-pop3d:" \ > -e "s:CMD_VHCS2D = /etc/init.d/vhcs2_daemon:CMD_VHCS2D = /etc/init.d/vhcs:" \ > -e "s:CMD_VHCS2N = /etc/init.d/vhcs2_network::" \ > -e "s:MTA_LOCAL_ALIAS_HASH = /etc/aliases:MTA_LOCAL_ALIAS_HASH = /etc/mail/aliases:" \ > -e "s:COURIER_CONF_DIR = /etc/courier:COURIER_CONF_DIR = /etc/courier-imap:" \ > -e "s:FTPD_CONF_FILE = /etc/proftpd.conf:FTPD_CONF_FILE = /etc/proftpd/proftpd.conf:" ${S}/configs/vhcs2.conf > eend $? > else > einfo "Found existing [${oldname}], skipping new creation" > rm ${S}/configs/vhcs2.conf > fi > > # installation process > einstall || die "make install failed." > > # Setup a real key ># ebegin "Setup VHCS keys" ># cd ${S}/keys/ ># ./rpl.pl ../gui/include/vhcs2-db-keys.php \ ># ../engine/vhcs2-db-keys.pl ># insinto ${MY_HTDOCSDIR}/keys ># doins * ># eend $? > > # gentoo environment stuff > newinitd ${FILESDIR}/${PN}-init.d ${PN} > cp ${FILESDIR}/${PN}-conf.d ${PN} > sed -i -e "s:%HTDIR%:${ROOT_PATH}:" ${PN} > newconfd ${PN} ${PN} > rm ${PN} > > # finish webapp install > webapp_src_install >} > >pkg_postinst() { > echo > einfo "VHCS Pro v${PV} is installed on your computer." > elog "If this is a new installation, you might want to run:" > einfo > elog " emerge --config =${CATEGORY}/${PF}" > echo > echo > einfo "otherwise you can safely access the VHCS Control Panel." > einfo "simply point your browser to:" > einfo > einfo " http://${HOSTNAME}/vhcs2" > echo >} > >pkg_config() { > > # Postfix (MTA) > ebegin "Postfix settings" > # FIX: gentoo use /etc/mail/aliases > sed -i -e "s:/etc/aliases:/etc/mail/aliases:" /etc/vhcs2/postfix/main.cf > > # check if necessary, otherwise erase them > # conf=`cat /etc/vhcs2/vhcs2.conf| egrep "^MTA" | > # awk '{if($2 == "=") print "s:{" $1 "}:" $3 ":;"}'` > # eval sed -i \'$conf\' /etc/vhcs2/postfix/main.cf > # mta_uid=`cat /etc/vhcs2/vhcs2.conf| grep MTA_MAILBOX_UID_NAME | awk '{print $3}'` > # mta_gid=`cat /etc/vhcs2/vhcs2.conf| grep MTA_MAILBOX_GID_NAME | awk '{print $3}'` > # mta_hostname=`cat /etc/vhcs2/vhcs2.conf| grep SERVER_HOSTNAME | awk '{print $3}'` > # mta_domain=`cat /etc/vhcs2/vhcs2.conf| grep MTA_DOMAIN | awk '{print $3}'` > > mta_uid=`getent passwd vmail | cut -d':' -f3` > mta_gid=`getent passwd vmail | cut -d':' -f4` > chown vmail:mail ${ROOT_PATH}/engine/messager/vhcs2-arpl-msgr > sed -i 's/xXMTA_UID_MAPXx/$mta_uid/' /etc/vhcs2/postfix/main.cf > sed -i 's/xXMTA_GID_MAPXx/$mta_gid/' /etc/vhcs2/postfix/main.cf > eend $? > > # FIX: missing courier userdb file > if ! [[ -f /etc/courier/authlib/userdb ]]; then > ebegin "Courier userdb fix" > cp /etc/vhcs2/courier/userdb /etc/courier/authlib/userdb > eend $? > fi > > # FIX: missing courier authmodulelist file > if ! [[ -f /etc/courier/authlib/authmodulelist ]]; then > ebegin "Courier authmodulelist fix" > cp /etc/vhcs2/courier/authmodulelist /etc/courier/authlib/authmodulelist > eend $? > fi > > # FIX: missing courier pid directory > if ! [[ -d /var/run/courier ]]; then > ebegin "Courier pid directory fix" > mkdir -p /var/run/courier > eend $? > fi > > # FIX: missing proftpd configuration file > if ! [[ -f /etc/proftpd/proftpd.conf ]]; then > ebegin "ProFTPd configuration fix" > cp /etc/vhcs2/proftpd/proftpd.conf /etc/proftpd/proftpd.conf > eend $? > fi > > # FIX: missing bind cache dir > if ! [[ -d /var/cache/bind/ ]]; then > ebegin "Bind cache dir fix" > mkdir -p /var/cache/bind > eend $? > fi > > # services startup > echo > einfo "VHCS ${PV} ebuild config process finished!" > elog "Please add these services to the default runlevel:" > einfo > elog " rc-update add vhcs default" > elog " rc-update add apache2 default" > elog " rc-update add proftpd default" > elog " rc-update add postfix default" > elog " rc-update add named default" > elog " rc-update add courier-authlib default" > elog " rc-update add courier-impad default" > elog " rc-update add courier-impad-ssl default" > elog " rc-update add courier-pop3d default" > elog " rc-update add courier-pop3d-ssl default" > if use mysql; then > elog " rc-update add mysql default" > fi > if use postgres; then > elog " rc-update add postgresql default" > fi > einfo > elog "and finaly (re)start the VHCS daemon:" > einfo > elog " /etc/init.d/vhcs restart" > > # Now we need to run the setup tool > einfo > elog "If this is a new installation, you need to create a valid /etc/vhcs2/vhcs2.conf" > elog "configuration file, so please run the VHCS Setup Tool:" > einfo > elog " ${ROOT_PATH}/engine/setup/vhcs2-setup" > einfo > ewarn "ATTENTION: VHCS Setup Tool erase all the datas stored into the database" > ewarn "every time it is executed! If you do not want to lose all your datas," > ewarn "*please run the tool only if this is the first time you install VHCS*," > ewarn "otherwise skip the entire Setup process." > ebeep 5 > einfo > einfo "If you found bugs/problems during the VHCS Setup Tool execution" > einfo "please report also the output of /tmp/vhcs2-setup-services.log" > echo >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 77651
:
89136
|
89137
|
89138
|
89139
|
89140
|
89141
|
89142
|
89143
|
89153
|
89154
|
89156
|
89157
|
89159
|
89160
| 111559 |
111561
|
111562
|
111564
|
111566
|
111567
|
111568
|
111570
|
111572
|
111574
|
221047