From 1c2bf60a727e31e87205c95bee7d29acd6a4d105 Mon Sep 17 00:00:00 2001 From: "Stefan Garthe (the_mgt)" Date: Mon, 8 Feb 2010 00:08:04 +0000 Subject: mail-mta/citadel: Version bump to current 7.71 version. Corrected and improved init script svn path=/sunrise/; revision=9995 --- mail-mta/citadel/ChangeLog | 6 +- mail-mta/citadel/Manifest | 8 +- mail-mta/citadel/citadel-7.66.ebuild | 204 ----------------------------------- mail-mta/citadel/citadel-7.71.ebuild | 204 +++++++++++++++++++++++++++++++++++ mail-mta/citadel/files/citadel.init | 6 +- 5 files changed, 216 insertions(+), 212 deletions(-) delete mode 100644 mail-mta/citadel/citadel-7.66.ebuild create mode 100644 mail-mta/citadel/citadel-7.71.ebuild diff --git a/mail-mta/citadel/ChangeLog b/mail-mta/citadel/ChangeLog index 6816071ec..d8c8dae5c 100644 --- a/mail-mta/citadel/ChangeLog +++ b/mail-mta/citadel/ChangeLog @@ -1,7 +1,11 @@ # ChangeLog for mail-mta/citadel -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 08 Feb 2010; the_mgt themgt@mail.ru -citadel-7.66.ebuild, + +citadel-7.71.ebuild, ,files/citadel.init: + Version bump to current 7.71 version. Corrected and improved init script + 04 Oct 2009; the_mgt themgt@mail.ru +citadel-7.66.ebuild, +files/citadel.confd, +files/citadel.init, +files/mailer.conf, +metadata.xml: diff --git a/mail-mta/citadel/Manifest b/mail-mta/citadel/Manifest index ca01533c6..7bc2069f3 100644 --- a/mail-mta/citadel/Manifest +++ b/mail-mta/citadel/Manifest @@ -1,7 +1,7 @@ AUX citadel.confd 957 RMD160 50f8ade88eb6b0c88aa94b42e13f81b725099027 SHA1 091d9223315c5d390ecd18bba44198ed6dfe2c22 SHA256 ef9309d200cb0617b91ee0983db41b53e424a9b4095e0f5ec76112866865871f -AUX citadel.init 797 RMD160 4da67fb04e802d06391b1bf990421ba9dc8a8376 SHA1 ee6068c4ca88b214b8fa16e05592495dd2101bd2 SHA256 2e233de7a7cb5af342449e062df8ca47e35fa9b029a5ad1565f4fa16764686d0 +AUX citadel.init 767 RMD160 afd16e3aec56496d4fa3ee59966428e742d31dd1 SHA1 719871e18211554f1088ef3ad2ca438c9c67c20d SHA256 16fc77dc01825c920d38864b880f0a00bc22aee5ebc552518c0bf94cb8b4b7c7 AUX mailer.conf 236 RMD160 a01981ea92dfafa4039c7f09f41a9b5722bf56d6 SHA1 5e8e0cd326bda077831a309ff3825897b3156279 SHA256 f0df591d761bb078447d666fdf18c42e511fb5765a4ddc2fca2bc96f7df50be8 -DIST citadel-7.66.tar.gz 809003 RMD160 783b3070c32e517bbcf492904946e35ad1d4b4c0 SHA1 0d039bd7a9fa827312d71b9a0dbf10eebb976752 SHA256 0ce10d75855aab77a0cb787e146ffb02f8077637a972c1eec56865ad5939abb1 -EBUILD citadel-7.66.ebuild 6711 RMD160 e4747007e35861e0fc6639c79d99ca087a9c9a98 SHA1 d4371b14fcae288eb774a70414d4437edd645c5a SHA256 0f70420f360fffb45986161f2e8b48e77d718b2965e907fef622e90264136c95 -MISC ChangeLog 353 RMD160 a27bf2955c1fa791e8a2bdd71ff0947b4f393f4b SHA1 310eac230c2600f78cbe4736b2be07db2aab2b12 SHA256 90582dfbafd47d8ef842e039010eff5e4d61d33cf37b209f3c379643efeb26cd +DIST citadel-7.71.tar.gz 827489 RMD160 46ad63e5e6284a2149c02e790a23b4ec11d39989 SHA1 6d8445d9e71bc946df2acd854e6c0a10b60ca9b1 SHA256 c07350030f3bb67b8a765b6e3c692f18400c1fc174075678c4acc03115c3ce5e +EBUILD citadel-7.71.ebuild 6711 RMD160 4575963b5205403e2f10c915c182f6903644d557 SHA1 b3a437ad1144d0167199ff19ee914ee51e2c57c0 SHA256 d2d88c23571b17faec8ee9b6c071860d380bcb046c227e779a4fc09d70f95edc +MISC ChangeLog 534 RMD160 93b3c634bcd34e59d6e85a1ae38756d310a03d41 SHA1 082a5a9f4b388546e7df95db023843e60fa1650a SHA256 87500aa16bd2f522713d134097711403dfb91d2ce32b4d17e2cbaaf3a52b9322 MISC metadata.xml 1069 RMD160 e8e08f40f6d4d25a1c7bee66d21357ae3b400fdc SHA1 106aa862377e9932222947e4871789ba28e5d38b SHA256 9811c5376d9fd71e14ad2a10ad827e92769f489262ebb7de9d3558d4dc609c66 diff --git a/mail-mta/citadel/citadel-7.66.ebuild b/mail-mta/citadel/citadel-7.66.ebuild deleted file mode 100644 index 2b16c411c..000000000 --- a/mail-mta/citadel/citadel-7.66.ebuild +++ /dev/null @@ -1,204 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" -inherit eutils multilib - -DESCRIPTION="Groupware/Email/Jabberserver. Collaboration, Calender, BBS/Forum, Chat with easy install and usage" -HOMEPAGE="http://www.citadel.org/" -SRC_URI="http://easyinstall.citadel.org/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="ldap mailwrapper pam pic ssl threads" - -DEPEND="=dev-libs/libcitadel-${PV} - >=sys-libs/db-4.1.25_p1 - virtual/libiconv - ldap? ( >=net-nds/openldap-2.0.27 ) - pam? ( sys-libs/pam ) - ssl? ( >=dev-libs/openssl-0.9.6 )" - -RDEPEND="${DEPEND} - net-mail/mailbase - !mailwrapper? ( !virtual/mta !net-mail/mailwrapper ) - mailwrapper? ( >=net-mail/mailwrapper-0.2 )" - -PROVIDE="virtual/mta - virtual/mda - virtual/imapd" - -MESSAGEBASE="/var/lib/citadel" - -pkg_setup() { - #Homedir needs to be the same as --with-datadir - einfo "Adding Citadel User/Group" - enewgroup citadel - enewuser citadel -1 /dev/null ${MESSAGEBASE} citadel,mail -} - -src_configure() { - econf \ - --with-rundir=/var/run/citadel \ - --with-datadir=/var/lib/citadel \ - --with-spooldir=/var/spool/citadel \ - --with-autosysconfdir=/var/lib/citadel/data \ - --with-staticdatadir=/etc/citadel \ - --with-sysconfdir=/etc/citadel \ - --with-ssldir=/etc/ssl/citadel \ - --with-helpdir=/usr/share/citadel-server \ - --with-docdir=/usr/share/doc/${PF} \ - --with-utility-bindir=/usr/$(get_libdir)/citadel \ - --without-libdspam \ - $(use_enable pic pie) \ - $(use_with pam) \ - $(use_with ssl openssl) \ - $(use_with ldap) \ - --with-db -} - -src_install() { - if use pam ; then - dodir /etc/pam.d || die "Creating /etc/pam.d failed in sandbox" - fi - - emake DESTDIR="${D}" install-new || die "make install failed" - - # Protect ${MESSAGEBASE} - echo CONFIG_PROTECT="${MESSAGEBASE}" > "${T}"/10citadel - doenvd "${T}"/10citadel || die "Config-protecting failed" - - # Keep emerge from removing empty directories when updating - keepdir "${MESSAGEBASE}"/data - keepdir /var/spool/citadel/network/{systems,spoolout,spoolin} - keepdir /var/run/citadel/network/{systems,spoolout,spoolin} - keepdir /etc/citadel/messages - - #Fix some permissions and sendmail stuff - fowners citadel:citadel /etc/citadel /var/lib/citadel || die "Changing owner failed" - fowners root:citadel /usr/sbin/citmail || die "Changing owner failed" - rm "${D}"/usr/sbin/sendmail || die "Removinf sendmail bin failed" - - if use mailwrapper ; then - insinto /etc/mail - doins "${FILESDIR}"/mailer.conf || die "Installing mailer.conf failed" - else - dosym /usr/sbin/citmail /usr/sbin/sendmail || die "Linking sendmail to citmail failed" - dosym /usr/sbin/citmail /usr/$(get_libdir)/sendmail || die "Compatibility sendmail link failed" - fi - - if use ldap ; then - insinto /etc/openldap/schema - doins openldap/citadel.schema || die "Inserting LDAP schema failed" - doins openldap/rfc2739.schema || die "Inserting LDAP schema failed" - fi - - newinitd "${FILESDIR}"/citadel.init citadel || die "Inserting initscript failed" - newconfd "${FILESDIR}"/citadel.confd citadel || die "Inserting conf for initscript failed" -} - -pkg_postinst() { - #remove a file Citadel complains about in the logs while running - rm /var/lib/citadel/data/.keep_mail-mta_citadel-0 || die "Removing keepdir dummie failed" - - einfo "The administration tools have been placed in /usr/$(get_libdir)/citadel" - einfo - einfo "There are two possible options to get Citadel running, if this is" - einfo "a new install:" - einfo - einfo "1. The no-nonse fullspeed approach with most stuff done for you:" - einfo "# emerge --config =${CATEGORY}/${PF}" - einfo - einfo "2. Manually configuring it with its setup routine:" - einfo "You should make yourself familiar with Citadels setup:" - einfo "http://www.citadel.org/doku.php/documentation:cmdman:setup" - einfo "You probalby do not want to let setup chose the mode of starting" - einfo - einfo "The second approach is only recommended to experienced users!!!" - einfo - einfo "The service will automatically start after you configured it." - einfo "Initscript is /etc/init.d/citadel. Also look into /etc/conf.d" - einfo - einfo "The following clients are available:" - einfo "a) the citadel console client was installed with this ebuild" - einfo "b) www-servers/webcit provides a web-based gui" -} - -pkg_config() { - #we have to stop the server if it is accidently running - [ -f /var/run/citadel/citadel.socket ] && \ - die "Citadel seems to be running, please stop it while configuring!" - - #Citadel's setup uses a few enviromental variables to control it. - # Mandatory for non-interactive setup! - export CITADEL_INSTALLER="yes" - - # Citadel location. - export CITADEL="/var/run/citadel/" - - if use ldap ; then - export SLAPD_Binary="/usr/$(get_libdir)/openldap/slapd" - export LDAP_CONFIG="/etc/openldap/sldap.conf" - fi - - # Don't create any inittab/initscript/xinet stuff entry. - # We'll provide our own init script - export CREATE_INITTAB_ENTRY="no" - export CREATE_XINETD_ENTRY="no" - export NO_INIT_SCRIPTS="yes" - export ACT_AS_MTA="no" #just prohibits setup to mess with init scripts - - einfo "On which ip should the server listen?" - einfo "Press enter to default to 0.0.0.0 and listen on all interfaces." - read -rp " >" ipadress ; echo - if [ -z "$ipadress" ] ; then - export IP_ADDR="0.0.0.0" - else - export IP_ADDR="$ipadress" - fi - - # The main admin name for citadel can be chosen at random - einfo "Insert a name for your citadel admin account:" - read -rp " >" sysadminname ; echo - export SYSADMIN_NAME="$sysadminname" - - local pwd1="misch" - local pwd2="masch" - - until [[ "x$pwd1" = "x$pwd2" ]] ; do - einfo "Insert a password for the citadel admin user" - einfo "Avoid [\"'\\_%] characters in the password" - read -rsp " >" pwd1 ; echo - - einfo "Retype the password" - read -rsp " >" pwd2 ; echo - - if [[ "x$pwd1" != "x$pwd2" ]] ; then - ewarn "Passwords are not the same" - fi - done - export SYSADMIN_PW="$pwd2" - - #Now we will create the config using defaults and enviromental variables. - /usr/$(get_libdir)/citadel/setup -q - unset SYSADMIN_PW - - #Verify the /etc/services entry was made - if [ -f /etc/services ] && ! grep -q '^citadel' /etc/services ; then - echo "citadel 504/tcp # citadel" >> /etc/services - fi - - einfo "Be sure to read the documentation in /usr/share/doc/${PF}" - einfo - einfo "The server should now be up and running, enjoy!" - einfo "Citadel will listen on its default port 504" - if use mailwrapper; then - einfo - einfo "Citadel listens on port 25 by default, even with mailwrapper useflag!" - einfo "Right now this can only be disabled in WebCit or with the cli client." - einfo "There is no elegant way to disable that atm, will be fixed upstream." - einfo "Sorry for this inconvenience!" - fi -} diff --git a/mail-mta/citadel/citadel-7.71.ebuild b/mail-mta/citadel/citadel-7.71.ebuild new file mode 100644 index 000000000..5cf84af17 --- /dev/null +++ b/mail-mta/citadel/citadel-7.71.ebuild @@ -0,0 +1,204 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" +inherit eutils multilib + +DESCRIPTION="Groupware/Email/Jabberserver. Collaboration, Calender, BBS/Forum, Chat with easy install and usage" +HOMEPAGE="http://www.citadel.org/" +SRC_URI="http://easyinstall.citadel.org/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ldap mailwrapper pam pic ssl threads" + +DEPEND="=dev-libs/libcitadel-${PV} + >=sys-libs/db-4.1.25_p1 + virtual/libiconv + ldap? ( >=net-nds/openldap-2.0.27 ) + pam? ( sys-libs/pam ) + ssl? ( >=dev-libs/openssl-0.9.6 )" + +RDEPEND="${DEPEND} + net-mail/mailbase + !mailwrapper? ( !virtual/mta !net-mail/mailwrapper ) + mailwrapper? ( >=net-mail/mailwrapper-0.2 )" + +PROVIDE="virtual/mta + virtual/mda + virtual/imapd" + +MESSAGEBASE="/var/lib/citadel" + +pkg_setup() { + #Homedir needs to be the same as --with-datadir + einfo "Adding Citadel User/Group" + enewgroup citadel + enewuser citadel -1 /dev/null ${MESSAGEBASE} citadel,mail +} + +src_configure() { + econf \ + --with-rundir=/var/run/citadel \ + --with-datadir=/var/lib/citadel \ + --with-spooldir=/var/spool/citadel \ + --with-autosysconfdir=/var/lib/citadel/data \ + --with-staticdatadir=/etc/citadel \ + --with-sysconfdir=/etc/citadel \ + --with-ssldir=/etc/ssl/citadel \ + --with-helpdir=/usr/share/citadel-server \ + --with-docdir=/usr/share/doc/${PF} \ + --with-utility-bindir=/usr/$(get_libdir)/citadel \ + --without-libdspam \ + $(use_enable pic pie) \ + $(use_with pam) \ + $(use_with ssl openssl) \ + $(use_with ldap) \ + --with-db +} + +src_install() { + if use pam ; then + dodir /etc/pam.d || die "Creating /etc/pam.d failed in sandbox" + fi + + emake DESTDIR="${D}" install-new || die "make install failed" + + # Protect ${MESSAGEBASE} + echo CONFIG_PROTECT="${MESSAGEBASE}" > "${T}"/10citadel + doenvd "${T}"/10citadel || die "Config-protecting failed" + + # Keep emerge from removing empty directories when updating + keepdir "${MESSAGEBASE}"/data + keepdir /var/spool/citadel/network/{systems,spoolout,spoolin} + keepdir /var/run/citadel/network/{systems,spoolout,spoolin} + keepdir /etc/citadel/messages + + #Fix some permissions and sendmail stuff + fowners citadel:citadel /etc/citadel /var/lib/citadel || die "Changing owner failed" + fowners root:citadel /usr/sbin/citmail || die "Changing owner failed" + rm "${D}"/usr/sbin/sendmail || die "Removinf sendmail bin failed" + + if use mailwrapper ; then + insinto /etc/mail + doins "${FILESDIR}"/mailer.conf || die "Installing mailer.conf failed" + else + dosym /usr/sbin/citmail /usr/sbin/sendmail || die "Linking sendmail to citmail failed" + dosym /usr/sbin/citmail /usr/$(get_libdir)/sendmail || die "Compatibility sendmail link failed" + fi + + if use ldap ; then + insinto /etc/openldap/schema + doins openldap/citadel.schema || die "Inserting LDAP schema failed" + doins openldap/rfc2739.schema || die "Inserting LDAP schema failed" + fi + + newinitd "${FILESDIR}"/citadel.init citadel || die "Inserting initscript failed" + newconfd "${FILESDIR}"/citadel.confd citadel || die "Inserting conf for initscript failed" +} + +pkg_postinst() { + #remove a file Citadel complains about in the logs while running + rm /var/lib/citadel/data/.keep_mail-mta_citadel-0 || die "Removing keepdir dummie failed" + + einfo "The administration tools have been placed in /usr/$(get_libdir)/citadel" + einfo + einfo "There are two possible options to get Citadel running, if this is" + einfo "a new install:" + einfo + einfo "1. The no-nonse fullspeed approach with most stuff done for you:" + einfo "# emerge --config =${CATEGORY}/${PF}" + einfo + einfo "2. Manually configuring it with its setup routine:" + einfo "You should make yourself familiar with Citadels setup:" + einfo "http://www.citadel.org/doku.php/documentation:cmdman:setup" + einfo "You probalby do not want to let setup chose the mode of starting" + einfo + einfo "The second approach is only recommended to experienced users!!!" + einfo + einfo "The service will automatically start after you configured it." + einfo "Initscript is /etc/init.d/citadel. Also look into /etc/conf.d" + einfo + einfo "The following clients are available:" + einfo "a) the citadel console client was installed with this ebuild" + einfo "b) www-servers/webcit provides a web-based gui" +} + +pkg_config() { + #we have to stop the server if it is accidently running + [ -f /var/run/citadel/citadel.socket ] && \ + die "Citadel seems to be running, please stop it while configuring!" + + #Citadel's setup uses a few enviromental variables to control it. + # Mandatory for non-interactive setup! + export CITADEL_INSTALLER="yes" + + # Citadel location. + export CITADEL="/var/run/citadel/" + + if use ldap ; then + export SLAPD_Binary="/usr/$(get_libdir)/openldap/slapd" + export LDAP_CONFIG="/etc/openldap/sldap.conf" + fi + + # Don't create any inittab/initscript/xinet stuff entry. + # We'll provide our own init script + export CREATE_INITTAB_ENTRY="no" + export CREATE_XINETD_ENTRY="no" + export NO_INIT_SCRIPTS="yes" + export ACT_AS_MTA="no" #just prohibits setup to mess with init scripts + + einfo "On which ip should the server listen?" + einfo "Press enter to default to 0.0.0.0 and listen on all interfaces." + read -rp " >" ipadress ; echo + if [ -z "$ipadress" ] ; then + export IP_ADDR="0.0.0.0" + else + export IP_ADDR="$ipadress" + fi + + # The main admin name for citadel can be chosen at random + einfo "Insert a name for your citadel admin account:" + read -rp " >" sysadminname ; echo + export SYSADMIN_NAME="$sysadminname" + + local pwd1="misch" + local pwd2="masch" + + until [[ "x$pwd1" = "x$pwd2" ]] ; do + einfo "Insert a password for the citadel admin user" + einfo "Avoid [\"'\\_%] characters in the password" + read -rsp " >" pwd1 ; echo + + einfo "Retype the password" + read -rsp " >" pwd2 ; echo + + if [[ "x$pwd1" != "x$pwd2" ]] ; then + ewarn "Passwords are not the same" + fi + done + export SYSADMIN_PW="$pwd2" + + #Now we will create the config using defaults and enviromental variables. + /usr/$(get_libdir)/citadel/setup -q + unset SYSADMIN_PW + + #Verify the /etc/services entry was made + if [ -f /etc/services ] && ! grep -q '^citadel' /etc/services ; then + echo "citadel 504/tcp # citadel" >> /etc/services + fi + + einfo "Be sure to read the documentation in /usr/share/doc/${PF}" + einfo + einfo "The server should now be up and running, enjoy!" + einfo "Citadel will listen on its default port 504" + if use mailwrapper; then + einfo + einfo "Citadel listens on port 25 by default, even with mailwrapper useflag!" + einfo "Right now this can only be disabled in WebCit or with the cli client." + einfo "There is no elegant way to disable that atm, will be fixed upstream." + einfo "Sorry for this inconvenience!" + fi +} diff --git a/mail-mta/citadel/files/citadel.init b/mail-mta/citadel/files/citadel.init index 29b058635..023f6ec74 100644 --- a/mail-mta/citadel/files/citadel.init +++ b/mail-mta/citadel/files/citadel.init @@ -17,15 +17,15 @@ SENDCOMMAND="/usr/sbin/sendcommand" # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 -svc_start() { +start() { ebegin "Starting citserver" start-stop-daemon --start --exec /usr/sbin/citserver -- ${CITSERVER_OPTS} eend $? } -svc_stop() { +stop() { ebegin "Stopping citserver" - start-stop-daemon --stop --quiet --pidfile ${PIDFILE} + ${SENDCOMMAND} DOWN &>/dev/null eend $? } -- cgit v1.2.3-65-gdbad