diff options
author | Eray Aslan <eras@gentoo.org> | 2013-02-15 14:19:53 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2013-02-15 14:19:53 +0000 |
commit | 4b656beef6281770f6b8025e585251fb6a241594 (patch) | |
tree | d7a2bb0f4b57566f8c7857e0d5928e7cc9984ac9 /mail-mta/qpsmtpd | |
parent | Version bump (diff) | |
download | gentoo-2-4b656beef6281770f6b8025e585251fb6a241594.tar.gz gentoo-2-4b656beef6281770f6b8025e585251fb6a241594.tar.bz2 gentoo-2-4b656beef6281770f6b8025e585251fb6a241594.zip |
Do not keepdir /var/run - bug #450996
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F)
Diffstat (limited to 'mail-mta/qpsmtpd')
-rw-r--r-- | mail-mta/qpsmtpd/ChangeLog | 11 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 | 62 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/qpsmtpd-0.84-r1.ebuild | 80 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/qpsmtpd-9999.ebuild | 6 |
4 files changed, 153 insertions, 6 deletions
diff --git a/mail-mta/qpsmtpd/ChangeLog b/mail-mta/qpsmtpd/ChangeLog index 6db50b9b2140..11667fc3219a 100644 --- a/mail-mta/qpsmtpd/ChangeLog +++ b/mail-mta/qpsmtpd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for mail-mta/qpsmtpd -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/ChangeLog,v 1.16 2012/11/30 23:10:44 radhermit Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/ChangeLog,v 1.17 2013/02/15 14:19:53 eras Exp $ + +*qpsmtpd-0.84-r1 (15 Feb 2013) + + 15 Feb 2013; Eray Aslan <eras@gentoo.org> +files/qpsmtpd.initd-r1, + +qpsmtpd-0.84-r1.ebuild, qpsmtpd-9999.ebuild: + Do not keepdir /var/run - bug #450996 30 Nov 2012; Tim Harder <radhermit@gentoo.org> qpsmtpd-0.43_rc2_pre955.ebuild, qpsmtpd-0.81.ebuild, qpsmtpd-0.82.ebuild, @@ -91,4 +97,3 @@ +metadata.xml, +qpsmtpd-0.43_rc2_pre945.ebuild: Initial import, also fixes bug #167930. Thanks to various people contributing on bugzie and on irc - diff --git a/mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 b/mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 new file mode 100644 index 000000000000..1844dfce9080 --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 @@ -0,0 +1,62 @@ +#!/sbin/runscript + +pidfile=/run/qpsmtpd/qpsmtpd.pid + +depend() { + use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd + provide mta +} + +checkconfig() { + if ! [ -d "${QPSMTPD_CONFIG:-/etc/qpsmtpd}" ]; then + eerror "Configuration directory ${QPSMTPD_CONFIG:-/etc/qpsmtpd} does not exist." + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Starting qpsmtpd [${QPSMTPD_SERVER_TYPE}] server" + HOME="/var/spool/qpsmtpd" + local QPSMTPD_SERVER_BIN="" + local myopts="" + export QPSMTPD_CONFIG=${QPSMTPD_CONFIG} + for foo in PERL_UNICODE LANG LC_TIME LC_ALL BASH_ENV ENV CDPATH IFS + do + unset ${foo} + done + case "${QPSMTPD_SERVER_TYPE}" in + prefork) + QPSMTPD_SERVER_BIN="/usr/bin/qpsmtpd-prefork" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:\-\-pid\-file[\t ]\{1,99\}[^ ]*::gI")" + # Option --pid-file is mentioned in the help of the prefork server + # but does not work when specified. + # QPSMTPD_OPTIONS="${QPSMTPD_OPTIONS} --pid-file ${pidfile}" + myopts="${myopts} --make-pidfile --pidfile ${pidfile}" + ;; + async) + QPSMTPD_SERVER_BIN="/usr/sbin/qpsmtpd-async" + myopts="${myopts} --background --make-pidfile --pidfile ${pidfile}" + ;; + forkserver|*) + QPSMTPD_SERVER_BIN="/usr/bin/qpsmtpd-forkserver" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:\-\-pid\-file[\t ]\{1,99\}[^ ]*::gI")" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:[\t ]\{0,99\}\-d[\t ]\{1,99\}|[\t ]\{1,99\}\-d[\t ]\{0,99\}::gI")" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:[\t ]\{0,99\}\-\detach[\t ]\{1,99\}|[\t ]\{1,99\}\-\-detach[\t ]\{0,99\}::gI")" + QPSMTPD_OPTIONS="${QPSMTPD_OPTIONS} --pid-file ${pidfile} --detach" + myopts="${myopts} --pidfile ${pidfile}" + ;; + esac + start-stop-daemon --start --nicelevel ${QPSMTPD_NICELEVEL:-0} \ + --quiet ${myopts} \ + --exec ${QPSMTPD_SERVER_BIN} \ + -- ${QPSMTPD_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping qpsmtpd [${QPSMTPD_SERVER_TYPE}] server" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} diff --git a/mail-mta/qpsmtpd/qpsmtpd-0.84-r1.ebuild b/mail-mta/qpsmtpd/qpsmtpd-0.84-r1.ebuild new file mode 100644 index 000000000000..496b7d2b6260 --- /dev/null +++ b/mail-mta/qpsmtpd/qpsmtpd-0.84-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/qpsmtpd-0.84-r1.ebuild,v 1.1 2013/02/15 14:19:53 eras Exp $ + +EAPI=2 + +inherit eutils perl-app user + +DESCRIPTION="qpsmtpd is a flexible smtpd daemon written in Perl" +HOMEPAGE="http://smtpd.develooper.com" +SRC_URI="http://smtpd.develooper.com/files/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="postfix ipv6 syslog" + +RDEPEND=">=dev-lang/perl-5.8.0 + dev-perl/Net-DNS + virtual/perl-MIME-Base64 + dev-perl/MailTools + dev-perl/IPC-Shareable + dev-perl/Socket6 + dev-perl/Danga-Socket + dev-perl/ParaDNS + ipv6? ( dev-perl/IO-Socket-INET6 ) + syslog? ( virtual/perl-Sys-Syslog ) + virtual/inetd" + +pkg_setup() { + enewgroup smtpd + local additional_groups + if use postfix; then + additional_groups="${additional_groups},postdrop" + fi + enewuser smtpd -1 -1 /var/spool/qpsmtpd smtpd${additional_groups} +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.40-badrcptto_allowrelay.patch + #epatch "${FILESDIR}"/${PN}-0.83-clamd_conf.patch + epatch "${FILESDIR}"/${PN}-0.83-accept-empty-email.patch +} + +src_install() { + perl-module_src_install + + insinto /etc/xinetd.d + newins "${FILESDIR}"/qpsmtpd.xinetd qpsmtpd + + dodir /usr/share/qpsmtpd + cp -Rf plugins "${D}"/usr/share/qpsmtpd/ + + insinto /etc/qpsmtpd + doins config.sample/* + + echo "/usr/share/qpsmtpd/plugins" > "${D}"/etc/qpsmtpd/plugin_dirs + echo "/var/spool/qpsmtpd" > "${D}"/etc/qpsmtpd/spool_dir + cat >"${D}"/etc/qpsmtpd/logging <<-EOF + #logging/syslog loglevel LOGINFO priority LOG_NOTICE + #logging/file loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d + EOF + if use syslog; then + sed -i -e '/^#logging\/syslog/s,^#,,g' "${D}"/etc/qpsmtpd/logging + else + sed -i -e '/^#logging\/file/s,^#,,g' "${D}"/etc/qpsmtpd/logging + fi + + newenvd "${FILESDIR}"/qpsmtpd.envd 99qpsmtpd + + newconfd "${FILESDIR}"/qpsmtpd.confd qpsmtpd || die "Installing conf.d file" + newinitd "${FILESDIR}"/qpsmtpd.initd-r1 qpsmtpd || die "Installing init.d file" + + dodoc CREDITS Changes README README.plugins STATUS + + diropts -m 0755 -o smtpd -g smtpd + dodir /var/spool/qpsmtpd /var/log/qpsmtpd + keepdir /var/spool/qpsmtpd /var/log/qpsmtpd + +} diff --git a/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild b/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild index e6eee66ca7e8..bae9d0210824 100644 --- a/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild +++ b/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild,v 1.4 2012/11/30 23:10:44 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild,v 1.5 2013/02/15 14:19:53 eras Exp $ EAPI=2 @@ -73,7 +73,7 @@ src_install() { newenvd "${FILESDIR}"/qpsmtpd.envd 99qpsmtpd newconfd "${FILESDIR}"/qpsmtpd.confd qpsmtpd || die "Installing conf.d file" - newinitd "${FILESDIR}"/qpsmtpd.initd qpsmtpd || die "Installing init.d file" + newinitd "${FILESDIR}"/qpsmtpd.initd-r1 qpsmtpd || die "Installing init.d file" dodoc CREDITS Changes README README.plugins STATUS } |