diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /mail-filter/dcc |
reinit the tree, so we can have metadata
Diffstat (limited to 'mail-filter/dcc')
-rw-r--r-- | mail-filter/dcc/Manifest | 15 | ||||
-rw-r--r-- | mail-filter/dcc/dcc-1.3.140-r1.ebuild | 146 | ||||
-rw-r--r-- | mail-filter/dcc/dcc-1.3.154.ebuild | 132 | ||||
-rw-r--r-- | mail-filter/dcc/dcc-1.3.158.ebuild | 132 | ||||
-rw-r--r-- | mail-filter/dcc/files/dcc-1.3.140-configure-fix.patch | 17 | ||||
-rw-r--r-- | mail-filter/dcc/files/dcc-1.3.140-freebsd.patch | 13 | ||||
-rw-r--r-- | mail-filter/dcc/files/dcc.confd | 14 | ||||
-rw-r--r-- | mail-filter/dcc/files/dcc.initd | 135 | ||||
-rw-r--r-- | mail-filter/dcc/files/dcc.initd-1.3.140 | 100 | ||||
-rw-r--r-- | mail-filter/dcc/files/dcc.initd-1.3.154 | 102 | ||||
-rw-r--r-- | mail-filter/dcc/metadata.xml | 15 |
11 files changed, 821 insertions, 0 deletions
diff --git a/mail-filter/dcc/Manifest b/mail-filter/dcc/Manifest new file mode 100644 index 000000000000..a19a80f9ac85 --- /dev/null +++ b/mail-filter/dcc/Manifest @@ -0,0 +1,15 @@ +AUX dcc-1.3.140-configure-fix.patch 426 SHA256 b3cebec1d0f22d3158f15613a227c924dc6e8edc1f14fd9e562306da3fc132ba SHA512 e6057fef60053a07013c5575422e46ad50004583385650f5b95593bbb45949779fe65c10776952eaa3edaa504d24a1243fa6be8026873b63a915bfccb0b8740a WHIRLPOOL c59d9ec0343180e9682b2278dd5c015a01e30211d8ab8488829879aca96cb457d62d9842fa49dc0a4540e99ffc3f6ce3b42958845219f8f29af8bb1e596d06bf +AUX dcc-1.3.140-freebsd.patch 381 SHA256 0614869d2343bc96d6e9ef5bb3ad190cc4134156e339f33558e0ad833545b1b3 SHA512 b622085c54246cb38185262f851d611bad6e636d91a4a94ec7b966565a7d01a1a2a0445616eb3086f6c1d62a6c865e7248fcc828efbaaa70cdc7bbe2975c01d4 WHIRLPOOL 5d48e6cb46a825dd70c5e27e8f3079bb456f8b07549f7c787ecb63e71c7fd780e701f44ebe8167c5490193a6b544dec4b29febc867f958992eb323de00e6439f +AUX dcc.confd 274 SHA256 c3c379c26d3c06a18ba87bd22bb299cbcacad262eff78ce75385c6d753373a0e SHA512 15b7e4ded3e56e9d15509305df244e29ec7a6c3c163c49a4597e16274317d88f5aff5522984a2a3002f838d0220d04c2ea3def8d771712a11685408a4983d3b4 WHIRLPOOL b69c606ee2ab80a430ee45ccfcb1b329ded8938aecfc751187e085aafb10733dc74a62d57751c4797b1211c9f47a72c347e18a2065c505c45c5c6d399c1f0515 +AUX dcc.initd 3013 SHA256 241d37dc24a4edc96b4354963d12edf68ccf8ea56efafc3e3fbede0bcd9e47eb SHA512 67127b752526edda0ef036d4874b73b6dc3d1c13fbcb29f301acccc4cee1dc2dafc32af1f61003cbb2f874b2853aec1075d04e730f90083ae452ad7c5525396c WHIRLPOOL ed176fe1dfc2e2a56e3b6ee58f9c364225ee78602fef567106074b9dd94f6d8c67dd6198c23f89c0b696a91745431a3c5e068b343764675a5e1de12e6ea320a5 +AUX dcc.initd-1.3.140 2693 SHA256 cc2662a1d440e2646d18187c6284a9ec11d8fec930ea52482ea760cee337923c SHA512 70a012699b6a66dfe085a6a77497cc9c2b88b32dee51b1a691a8ed70cb467bb7308bb9ea9594f5582adb23199638401e6454e8760bb293019cd81ab538daf20a WHIRLPOOL 423edf9b27c104266700492fd1d95348822f99e4b619003caca8888ccce2db734fb7e9919755a523fc977a357a3505ce230f905516a817a59e85c2c4f5fc238f +AUX dcc.initd-1.3.154 2793 SHA256 9bddd9226558a1e061945de72d36994a9f3914f5ad2fbb2b8a04ed6e5b3116f3 SHA512 e171e4333d735aa7da99ae322ce04954554a6738b943ca085e51707dd0bf231f7c170211f019027ddf01ec750ed1b8728b5d54b48dee6ee7fc37f8a810aded01 WHIRLPOOL b23a2cf61af23ca9b7eb5d79984730e3a9831adc3553213340848961be2fa1c3ad4c2b465b2d57bd5a477cd48327732bbbc9f7062b8437990b35a58c9346706e +DIST dcc-1.3.140.tar.Z 1681539 SHA256 19060563d3d72b70578d8f16e6780458d36f1a1db18a6d1e533bc42d80c38f24 SHA512 1c36bb32ae36480ded8306ca6a460a3070758397075cd6a4cee9c01a0e306ad371336037adf7759c8ef96f46b36c408699b7ec43b01268ac8e7c289d1e31d2e1 WHIRLPOOL 9415bd94a74b6e0d22ec323a8cf5227c08f5026c24b1530c7708321d092d5f0c58d6f3d5e7beb03d0dca948ea8c75cf3220d34e1b077030ee0b9b85c80644b64 +DIST dcc-1.3.154.tar.Z 1711292 SHA256 bc2e1496ec04914690c1d6d9d0f8be0954551b4165d731eb2d07dad307269399 SHA512 703bd3de44ccff3f318239dc2ca26a285f83ae0340a91391bcc5b719c298e77c8122d1502665350ddfc9fb14f12d9b6a56cba422ff8985db9cee6c91091fb987 WHIRLPOOL 7595b36066d3a89b1d2f4952334f6abe7cc70a1c03ff06ac6596b8901b8590329c944c9eeb132ed6253a4841150308378bef87dc5b2b74495c92a283110e0b14 +DIST dcc-1.3.158.tar.Z 1714175 SHA256 596bb4a02800a87501818215e61ac877e4d5a31ec0c8c227f23438f6b6b831c6 SHA512 24fba5ea713e8df1468644508c323d64b3868685716b7cc02263933476940a807cfc4593432a9195371308c83d4ea93653e89634681d95dcb32f5d65c7274599 WHIRLPOOL ba625cc91c02d8b919a297ec99e28e64ca3720b2dba1bc657ad30df6d8abb0d58614254ad4e48870cb301a4d6339a934746f64542e1bc4a2bee8a8328f80ae96 +EBUILD dcc-1.3.140-r1.ebuild 4450 SHA256 57ef575b3166caa03d19597bfe2c58097b03843bd5406eface52e94517f9c862 SHA512 6a7dbf51021db45042ffabf96f4082af7cf16541607b5d6780f4bd66c4bd9b860316a84ca69a885a6de2aa05e48f12e2f47080a88c85c0471bb1ca7a8875f804 WHIRLPOOL 9f6fbcb48771d7f6879253cf81b9da5527963f7065ee847d65e58a8645b6a63c4adb6701a245a814b68f643967ea8a4eebf5289098fc140f34f54ae339257ae8 +EBUILD dcc-1.3.154.ebuild 4358 SHA256 ad010e377e0f5f86dae0a4f8cdb031be25de1d9e10d6e758db9125a4d49dcdb0 SHA512 d22050cdf0e5ab84a524c62e3752faa5a2bd986a57ee3ac643f56bf8ff5c7501b396d9a81f3788652e4f0c3229ae9c5bb7a45646bc903fac7b636670a0748508 WHIRLPOOL 1f9cfdeaa11a6d2810d20f1c0cc12f28fe85560d24d96aebb8336bb9b606058c4a2c8c077b342e58fd078b50d792e06d1f74f370f6670e84b65ecd844b6e76e5 +EBUILD dcc-1.3.158.ebuild 4363 SHA256 9800a963b5b1fc147dcef72201e9be7aa5f0117682e6be1b64c9d0adc74d2e70 SHA512 f0df44965502018e118a69a4fae4d2226dbee91c974797b125be4db37ad14da93d43d9a6faaa56c614f9f6c09d7348a8961f105072c8214606797b1d2cc876d1 WHIRLPOOL 7e5f23f8c4eb941a2269c134ee03d3cc038ea7c0e198ac1bfcea9b3273063561dade35cf9925dc253698fb6d0bfdc9665f5334624a1586723c1cb37339afabfe +MISC ChangeLog 3616 SHA256 7fcfb7ce6c09e92159dfb62edcd17bf0f83b70985a58eaf873067894c1a36a3f SHA512 90c8d7a6be346c042426918dd403dcb087aac18c5d0288f2b3638498f260c867fec1c47d33326850c79a3dd5a88aabf873467fbb16fe7147e25abd480ae95c6b WHIRLPOOL 45c2af03b04fb80ad9a36d0d79bed5530deb67b89dbf20a27323bdf11b922d353cc7a4ca53d39cfd247e7a4858e98a1298e00d79d4fc734d33e5cbbed907f539 +MISC ChangeLog-2015 10165 SHA256 8e7a89bedd240f782074b11fd5b8ad0198ea4905742be6df82afaf05bb31749e SHA512 10497649366befa039a025d7faf40e83fbcb369b09697f165ab16bdb7a355611f7446db8e499d11b70822079037dfa73dcae7bd84eddcf0416b8614b3528176d WHIRLPOOL 450184e5aaef8acca9ae3449a83fcf24b52c9ba16ee9a95268fc75d6552fcbedd0aa5723e8ae225f5d8f57f5fe1d97bb6d215416ee3cc7f5670aea5202e919f6 +MISC metadata.xml 417 SHA256 a43622a28f10ad5d983b3c7d72574189e3e418412492618dde31374e5a8afcc6 SHA512 8a17fc0c9502d8e21389a520cba60b482593a89064fb913a87b1c4fc73d20f0652948f848c803f22923a0873ed213025db2663effa584c800a9fe6b3a29f9339 WHIRLPOOL 5b0e536f2876e8cbccee3fd34604da587762088987898a32beee8fc56a463441dd0199e286e48ae67e052cb3cda50bb5d63e626ecbb9909cd0ec0f843306dac6 diff --git a/mail-filter/dcc/dcc-1.3.140-r1.ebuild b/mail-filter/dcc/dcc-1.3.140-r1.ebuild new file mode 100644 index 000000000000..3f01b15a4b18 --- /dev/null +++ b/mail-filter/dcc/dcc-1.3.140-r1.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 + +inherit 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 + +src_prepare() { + epatch "${FILESDIR}"/dcc-1.3.140-configure-fix.patch +} + +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)" + + if use milter ; then + myconf="${myconf} --enable-dccm" + myconf="${myconf} --with-sendmail=" + else + myconf="${myconf} --disable-dccm" + fi + + if use cgi ; then + myconf="${myconf} --with-cgibin=${dcc_cgibin}" + else + myconf="${myconf} --without-cgibin" + fi + + 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.140 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/dcc-1.3.154.ebuild b/mail-filter/dcc/dcc-1.3.154.ebuild new file mode 100644 index 000000000000..403e3e574893 --- /dev/null +++ b/mail-filter/dcc/dcc-1.3.154.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" # ~amd64-fbsd +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-freebsd.patch ) + +src_configure() { + tc-export CC AR RANLIB + 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} --with-make-cmd=${MAKE:-make}" + 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!" +} + +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=$(id -g -n 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 + + # 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/dcc-1.3.158.ebuild b/mail-filter/dcc/dcc-1.3.158.ebuild new file mode 100644 index 000000000000..eb41bfe7d6ee --- /dev/null +++ b/mail-filter/dcc/dcc-1.3.158.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" # ~amd64-fbsd +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-freebsd.patch ) + +src_configure() { + tc-export CC AR RANLIB + 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} --with-make-cmd=${MAKE:-make}" + 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!" +} + +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=$(id -g -n 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 + + # 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-1.3.140-configure-fix.patch b/mail-filter/dcc/files/dcc-1.3.140-configure-fix.patch new file mode 100644 index 000000000000..41620929c61e --- /dev/null +++ b/mail-filter/dcc/files/dcc-1.3.140-configure-fix.patch @@ -0,0 +1,17 @@ +Avoid installing into /no/. + +Signed-off-by: Lars Wendler (Polynomial-C) <polynomial-c@gentoo.org> +X-Gentoo-Bug: 388383 +X-Gentoo-Bug-URL: https://bugs.gentoo.org/388383 + +--- dcc-1.3.140/configure ++++ dcc-1.3.140/configure +@@ -3256,7 +3256,7 @@ + withval="$with_cgibin" + : + fi +-if test -n "$with_cgibin" -a "$with_cgi_bin" != no; then ++if test -n "$with_cgibin" -a "$with_cgibin" != no; then + cgibin="$with_cgibin" + fi + diff --git a/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch b/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch new file mode 100644 index 000000000000..e72224f41c2f --- /dev/null +++ b/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index 5efe49d..de8d6f2 100755 +--- a/configure ++++ b/configure +@@ -3677,7 +3677,7 @@ case "$TARGET_SYS" in + # compressed via /usr/share/mk + mancat=man + MANX='$(MAN8)' +- USE_DCCMANINSTALL='# USE_DCCMANINSTALL=no' ++ USE_DCCMANINSTALL='USE_DCCMANINSTALL=yes' + ;; + DragonFly) + # default to /usr/local/man/man8 and use nroff files, possibly diff --git a/mail-filter/dcc/files/dcc.confd b/mail-filter/dcc/files/dcc.confd new file mode 100644 index 000000000000..a6e556827dbd --- /dev/null +++ b/mail-filter/dcc/files/dcc.confd @@ -0,0 +1,14 @@ +# Config file for /etc/init.d/dcc + +# Start server or DCC daemon +START_DCC_DCCD="yes" + +# Start DCC greylisting +START_DCC_GREY="yes" + +# Start milter interface +START_DCC_DCCM="yes" + +# Start general Perl and MTA interface +# and Postfix before-queue filter +START_DCC_DCCIF="yes" diff --git a/mail-filter/dcc/files/dcc.initd b/mail-filter/dcc/files/dcc.initd new file mode 100644 index 000000000000..1e64a16c6306 --- /dev/null +++ b/mail-filter/dcc/files/dcc.initd @@ -0,0 +1,135 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use logger + need net + before mta +} + +checkconfig() { + if [[ ! -f "/etc/dcc/dcc_conf" || ! -r "/etc/dcc/dcc_conf" ]] + then + eerror "You need a DCC configuration in /etc/dcc/dcc_conf" + return 1 + else + source "/etc/dcc/dcc_conf" + fi +} + +start() { + checkconfig || return 1 + + if [[ "${START_DCC_DCCD}" == "yes" ]] + then + if [[ "${DCCD_ENABLE}" != "on" ]] + then + einfo "DCCD_ENABLE is not setto 'on' in dcc_conf" + else + if [[ -x "${DCC_LIBEXEC}/start-dccd" ]] + then + ebegin "Starting dccd" + ${DCC_LIBEXEC}/start-dccd >/dev/null 2>&1 + eend ${?} + else + eerror "You enabled DCCD but start-dccd is missing or not executable" + fi + fi + fi + + if [[ "${START_DCC_GREY}" == "yes" ]] + then + if [[ "${GREY_ENABLE}" != "on" ]] + then + einfo "GREY_ENABLE is not set to 'on' in dcc_conf" + else + if [[ -x "${DCC_LIBEXEC}/start-grey" ]] + then + ebegin "Starting grey" + ${DCC_LIBEXEC}/start-grey >/dev/null 2>&1 + eend ${?} + else + eerror "You enabled GREY but start-grey is missing or not executable" + fi + fi + fi + + if [[ "${START_DCC_DCCM}" == "yes" ]] + then + if [[ "${DCCM_ENABLE}" != "on" ]] + then + einfo "DCCM_ENABLE is not set to 'on' in dcc_conf" + else + if [[ -x "${DCC_LIBEXEC}/start-dccm" ]] + then + ebegin "Starting dccm" + ${DCC_LIBEXEC}/start-dccm >/dev/null 2>&1 + eend ${?} + for ((dccmtimeout=0 ; dccmtimeout <= 20 ; dccmtimeout++)) + do + if [[ ! -S "${DCC_RUNDIR}/dccm" || ! -r "${DCC_RUNDIR}/dccm" ]] + then + sleep 1 + else + break + 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 + else + eerror "You enabled DCCM but start-dccm is missing or not executable" + fi + fi + fi + + if [[ "${START_DCC_DCCIF}" == "yes" ]] + then + if [[ "${DCCIFD_ENABLE}" != "on" ]] + then + einfo "DCCIFD_ENABLE is not set to 'on' in dcc_conf" + else + if [[ -x "${DCC_LIBEXEC}/start-dccifd" ]] + then + ebegin "Starting dccif" + ${DCC_LIBEXEC}/start-dccifd >/dev/null 2>&1 + eend ${?} + else + eerror "You enabled DCCIF but start-dccif is missing or not executable" + fi + fi + fi +} + +stop() { + checkconfig || return 1 + + if [[ -r "${DCC_RUNDIR}/dccifd.pid" ]] + then + ebegin "Stopping dccif" + kill -15 $(< ${DCC_RUNDIR}/dccifd.pid) 2>/dev/null + eend ${?} + fi + + if [[ -r "${DCC_RUNDIR}/dccm.pid" ]] + then + ebegin "Stopping dccm" + kill -15 $(< ${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 +} diff --git a/mail-filter/dcc/files/dcc.initd-1.3.140 b/mail-filter/dcc/files/dcc.initd-1.3.140 new file mode 100644 index 000000000000..8fc4ac3540c3 --- /dev/null +++ b/mail-filter/dcc/files/dcc.initd-1.3.140 @@ -0,0 +1,100 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 -15 $(< ${DCC_RUNDIR}/dccifd.pid) 2>/dev/null + eend ${?} + fi + + if [ -r "${DCC_RUNDIR}/dccm.pid" ]; then + ebegin "Stopping dccm" + kill -15 $(< ${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 +} 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..e7d63b24604e --- /dev/null +++ b/mail-filter/dcc/files/dcc.initd-1.3.154 @@ -0,0 +1,102 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 DCCM_ARGS 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 ${?} + if !(echo ${DCCM_ARGS}|grep -q "^\-p\|[[:space:]]\-p"); then + local dccmtimeout=0 + while [ ${dccmtimeout} -le 20 ] ; do + if [ -S "${DCC_RUNDIR}/dccm" ] || [ -r "${DCC_RUNDIR}/dccm" ]; then + break + else + sleep 1 + dccmtimeout=$(($dccmtimeout + 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 + fi + 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 +} diff --git a/mail-filter/dcc/metadata.xml b/mail-filter/dcc/metadata.xml new file mode 100644 index 000000000000..c62a320963fb --- /dev/null +++ b/mail-filter/dcc/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>robbat2@gentoo.org</email> +</maintainer> +<maintainer type="project"> + <email>net-mail@gentoo.org</email> + <name>Net-Mail</name> +</maintainer> +<use> + <flag name="rrdtool">Enable <pkg>net-analyzer/rrdtool</pkg> interface + scripts</flag> +</use> +</pkgmetadata> |