diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2013-12-28 04:33:08 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-12-28 04:33:08 +0000 |
commit | 618b478c39dd967296f497f198be5cd32893ccd1 (patch) | |
tree | cd027b98c27df7aaf4d4cf7ff457ce9373285539 /mail-filter | |
parent | Really fix manifest... (diff) | |
download | gentoo-2-618b478c39dd967296f497f198be5cd32893ccd1.tar.gz gentoo-2-618b478c39dd967296f497f198be5cd32893ccd1.tar.bz2 gentoo-2-618b478c39dd967296f497f198be5cd32893ccd1.zip |
Bug #452328: bump, also bashisms in init script.
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/dcc/ChangeLog | 8 | ||||
-rw-r--r-- | mail-filter/dcc/dcc-1.3.154.ebuild | 136 | ||||
-rw-r--r-- | mail-filter/dcc/files/dcc.initd-1.3.154 | 101 |
3 files changed, 244 insertions, 1 deletions
diff --git a/mail-filter/dcc/ChangeLog b/mail-filter/dcc/ChangeLog index bd2aefcf4d15..33b8254e1dc8 100644 --- a/mail-filter/dcc/ChangeLog +++ b/mail-filter/dcc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for mail-filter/dcc # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dcc/ChangeLog,v 1.75 2013/01/01 18:03:36 polynomial-c Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dcc/ChangeLog,v 1.76 2013/12/28 04:33:08 robbat2 Exp $ + +*dcc-1.3.154 (28 Dec 2013) + + 28 Dec 2013; Robin H. Johnson <robbat2@gentoo.org> +dcc-1.3.154.ebuild, + +files/dcc.initd-1.3.154: + Bug #452328: bump, also bashisms in init script. 01 Jan 2013; Lars Wendler <polynomial-c@gentoo.org> files/dcc.initd-1.3.140: Non-maintainer commit: Removed bashism in init script (bug #388723). diff --git a/mail-filter/dcc/dcc-1.3.154.ebuild b/mail-filter/dcc/dcc-1.3.154.ebuild new file mode 100644 index 000000000000..19feef3f5b3b --- /dev/null +++ b/mail-filter/dcc/dcc-1.3.154.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dcc/dcc-1.3.154.ebuild,v 1.1 2013/12/28 04:33:08 robbat2 Exp $ + +EAPI=5 + +inherit base eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Distributed Checksum Clearinghouse" +HOMEPAGE="http://www.rhyolite.com/anti-spam/dcc/" +SRC_URI="http://www.rhyolite.com/anti-spam/dcc/source/old/${P}.tar.Z" + +LICENSE="DCC" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="cgi ipv6 rrdtool milter" + +RDEPEND="dev-lang/perl + rrdtool? ( net-analyzer/rrdtool ) + || ( net-misc/wget www-client/fetch net-misc/curl net-ftp/ftp ) + milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )" +DEPEND="sys-apps/sed + sys-devel/gcc + ${RDEPEND}" + +dcc_cgibin=/var/www/localhost/cgi-bin/dcc +dcc_homedir=/var/dcc +dcc_libexec=/usr/sbin +dcc_man=/usr/share/man +dcc_rundir=/var/run/dcc + +PATCHES=( ) +#"${FILESDIR}"/dcc-1.3.140-configure-fix.patch # Merged upstream + +src_configure() { + local myconf + myconf="${myconf} --homedir=${dcc_homedir}" + myconf="${myconf} --bindir=/usr/bin" + myconf="${myconf} --libexecdir=${dcc_libexec}" + myconf="${myconf} --mandir=/usr/share/man" + myconf="${myconf} --with-updatedcc_pfile=${dcc_homedir}/updatecc.pfile" + myconf="${myconf} --with-installroot=${D}" + # sigh. should be DCC-MD5 but see line 486 in the shipped configure script + myconf="${myconf} --with-DDC-MD5" + myconf="${myconf} --with-uid=root" + myconf="${myconf} --enable-server" + myconf="${myconf} --enable-dccifd" + myconf="${myconf} --with-rundir=${dcc_rundir}" + myconf="${myconf} --with-db-memory=64" + myconf="${myconf} --with-max-db-mem=128" + myconf="${myconf} --with-max-log-size=0" + myconf="${myconf} $(use_enable ipv6 IPv6)" + myconf="${myconf} $(use_with cgi cgibin ${dcc_cgibin})" + myconf="${myconf} $(use_enable milter dccm)" + use milter && myconf="${myconf} --with-sendmail=" + + einfo "Using config: ${myconf}" + + # This is NOT a normal configure script. + ./configure ${myconf} || die "configure failed!" +} + +src_compile() { + emake CC="$(tc-getCC)" || die "emake failed!" +} + +moveconf() { + local into=/etc/dcc/ + for i in $@; do + mv "${D}${dcc_homedir}/${i}" "${D}${into}" + dosym "${into}${i}" "${dcc_homedir}/${i}" + done +} + +src_install() { + # stolen from the RPM .spec and modified for gentoo + MANOWN=root MANGRP=root export MANOWN MANGRP + BINOWN="${MANOWN}" BINGRP="${MANGRP}" export BINOWN BINGRP + DCC_PROTO_HOMEDIR="${D}${dcc_homedir}" export DCC_PROTO_HOMEDIR + DCC_CGIBINDIR="${D}${dcc_cgibin}" export DCC_CGIBINDIR + DCC_SUID="${BINOWN}" DCC_OWN="${BINOWN}" DCC_GRP="${BINGRP}" export DCC_SUID DCC_OWN DCC_GRP + + dodir /etc/cron.daily "${dcc_homedir}" /usr/bin /usr/sbin /usr/share/man/man{0,8} /etc/dcc + if use cgi ; then + dodir "${dcc_cgibin}" + fi + keepdir /var/log/dcc + + # This package now takes "${D}" at compile-time! + # make DESTDIR="${D}" DCC_BINDIR="${D}"/usr/bin MANDIR="${D}"/usr/share/man/man DCC_HOMEDIR="${D}"${dcc_homedir} install || die + emake install || die "emake install failed" + + # branding and setting reasonable defaults + sed -e "s/BRAND=\$/BRAND='Gentoo ${PF}'/;" \ + -e "s/GREY_ENABLE=\$/GREY_ENABLE=off/;" \ + -e "s/DCCM_LOG_AT=5\$/DCCM_LOG_AT=50/;" \ + -e "s,DCCM_LOGDIR=\"log\"\$,DCCM_LOGDIR=\"/var/log/dcc\",;" \ + -e "s/DCCM_ARGS=\$/DCCM_ARGS='-SHELO -Smail_host -SSender -SList-ID'/;" \ + -e "s/DCCIFD_ARGS=\$/DCCIFD_ARGS=\"\$DCCM_ARGS\"/;" \ + -e 's/DCCIFD_ENABLE=off/DCCIFD_ENABLE=on/' \ + -e 's/DBCLEAN_LOGDAYS=14/DBCLEAN_LOGDAYS=1/' \ + -i "${D}${dcc_homedir}/dcc_conf" + + if use milter ; then + # enable milter + sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \ + "${D}${dcc_homedir}"/dcc_conf + fi + + # provide cronjob + mv "${D}"/usr/sbin/cron-dccd "${D}"/etc/cron.daily/dccd || die "mv failed" + + # clean up + mv "${D}"/usr/sbin/logger "${D}"/usr/sbin/logger-dcc || die "mv failed" + + statslist="${D}/usr/sbin/{dcc-stats-graph,dcc-stats-init,dcc-stats-collect}" + if ! use rrdtool; then + # remove rrdtool interface scripts + eval rm -f ${statslist} || die "Failed to clean up rrdtool scripts" + fi + + # clean up + rm -f "${D}"/usr/sbin/{rcDCC,updatedcc} + + # place configuration files into /etc instead of /var/dcc + moveconf dcc_conf flod grey_flod grey_whitelist ids map map.txt whiteclnt whitecommon whitelist + + newinitd "${FILESDIR}"/dcc.initd-1.3.154 dcc + newconfd "${FILESDIR}"/dcc.confd dcc + + rmdir "${D}"/var/dcc/log/ + + dodoc CHANGES RESTRICTIONS + dohtml *.html + doman *.{0,8} +} diff --git a/mail-filter/dcc/files/dcc.initd-1.3.154 b/mail-filter/dcc/files/dcc.initd-1.3.154 new file mode 100644 index 000000000000..f55c91b7a2a6 --- /dev/null +++ b/mail-filter/dcc/files/dcc.initd-1.3.154 @@ -0,0 +1,101 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dcc/files/dcc.initd-1.3.154,v 1.1 2013/12/28 04:33:08 robbat2 Exp $ + +depend() { + use logger + need net + before mta +} + +checkconfig() { + if [ ! -f "/etc/dcc/dcc_conf" ]; then + eerror "You need a DCC configuration in /etc/dcc/dcc_conf" + return 1 + fi + for i in DCCD_ENABLE GREY_ENABLE DCCM_ENABLE DCCIFD_ENABLE DCC_LIBEXEC DCC_RUNDIR \ + SOCKET_USER SOCKET_GROUP SOCKET_MODE; do + read -r ${i} <<-EOF + $( grep ^[[:space:]]*${i} /etc/dcc/dcc_conf | sed s/.*=// ) + EOF + done + DCC_RUNDIR="${DCC_RUNDIR:-/var/run/dcc}" + if [ ! -d "${DCC_RUNDIR}" ]; then + checkpath -q -d -o root:root -m 0755 "${DCC_RUNDIR}" || return 1 + fi +} + +start() { + checkconfig || return 1 + local atleastone="${DCCD_ENABLE}${GREY_ENABLE}${DCCM_ENABLE}${DCCIFD_ENABLE}" + atleastone=$( echo ${atleastone} | tr -d 'off' ) + if [ -z "${atleastone}" ]; then + eend 1 "At least one service should be 'on' in /etc/dcc/dcc_conf" + return 1 + fi + + if [ "${DCCD_ENABLE}" = "on" ] && [ -x "${DCC_LIBEXEC}/start-dccd" ]; then + ebegin "Starting dccd" + ${DCC_LIBEXEC}/start-dccd >/dev/null 2>&1 + eend ${?} + fi + + if [ "${GREY_ENABLE}" = "on" ] && [ -x "${DCC_LIBEXEC}/start-grey" ]; then + ebegin "Starting grey" + ${DCC_LIBEXEC}/start-grey >/dev/null 2>&1 + eend ${?} + fi + + if [ "${DCCM_ENABLE}" = "on" ] && [ -x "${DCC_LIBEXEC}/start-dccm" ]; then + ebegin "Starting dccm" + ${DCC_LIBEXEC}/start-dccm >/dev/null 2>&1 + eend ${?} + local dccmtimeout=0 + while [ ${dcctimeout} -le 20 ] ; do + if [ -S "${DCC_RUNDIR}/dccm" ] || [ -r "${DCC_RUNDIR}/dccm" ]; then + break + else + sleep 1 + dcctimeout=$(($dcctimeout + 1)) + fi + done + chown ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} ${DCC_RUNDIR}/dccm 1>/dev/null 2>&1 + chmod ${SOCKET_MODE:-664} ${DCC_RUNDIR}/dccm 1>/dev/null 2>&1 + sed -i -e "s:^\-::" ${DCC_RUNDIR}/dccm.pid 1>/dev/null 2>&1 || return 1 + fi + + if [ "${DCCIFD_ENABLE}" = "on" ] && [ -x "${DCC_LIBEXEC}/start-dccifd" ]; then + ebegin "Starting dccif" + ${DCC_LIBEXEC}/start-dccifd >/dev/null 2>&1 + eend ${?} + fi +} + +stop() { + checkconfig || return 1 + + if [ -r "${DCC_RUNDIR}/dccifd.pid" ]; then + ebegin "Stopping dccif" + kill -s 15 $(cat ${DCC_RUNDIR}/dccifd.pid) 2>/dev/null + eend ${?} + fi + + if [ -r "${DCC_RUNDIR}/dccm.pid" ]; then + ebegin "Stopping dccm" + kill -s 15 $(cat ${DCC_RUNDIR}/dccm.pid) 2>/dev/null + eend ${?} + fi + + if (pidof dccd >/dev/null 2>&1) && [ -x "${DCC_LIBEXEC}/stop-dccd" ]; then + ebegin "Stopping dccd" + ${DCC_LIBEXEC}/stop-dccd >/dev/null 2>&1 + eend ${?} + fi + + if (pidof dccd >/dev/null 2>&1) && [ -x "${DCC_LIBEXEC}/stop-dccd" ]; then + ebegin "Stopping grey" + ${DCC_LIBEXEC}/stop-dccd -G >/dev/null 2>&1 + eend ${?} + fi +} |