summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter/dcc')
-rw-r--r--mail-filter/dcc/Manifest2
-rw-r--r--mail-filter/dcc/dcc-1.3.154.ebuild132
-rw-r--r--mail-filter/dcc/dcc-1.3.158-r1.ebuild144
-rw-r--r--mail-filter/dcc/dcc-1.3.158-r2.ebuild141
-rw-r--r--mail-filter/dcc/dcc-1.3.158.ebuild132
-rw-r--r--mail-filter/dcc/dcc-2.3.168.ebuild141
-rw-r--r--mail-filter/dcc/files/dcc-1.3.140-freebsd.patch2
-rw-r--r--mail-filter/dcc/files/dcc-1.3.158-c2x.patch21
-rw-r--r--mail-filter/dcc/files/dcc-1.3.158-clang16.patch30
-rw-r--r--mail-filter/dcc/files/dcc-1.3.158-fno-common.patch23
-rw-r--r--mail-filter/dcc/files/dccifd.service34
-rw-r--r--mail-filter/dcc/metadata.xml6
12 files changed, 540 insertions, 268 deletions
diff --git a/mail-filter/dcc/Manifest b/mail-filter/dcc/Manifest
index 6560842e319e..d4661daeb0b1 100644
--- a/mail-filter/dcc/Manifest
+++ b/mail-filter/dcc/Manifest
@@ -1,2 +1,2 @@
-DIST dcc-1.3.154.tar.Z 1711292 BLAKE2B 3e53488e718b13a1c36c1531f552ee811f42b274f4c24f26b484bd2b184fa3c34e0241be82aad1f6fa1a7a485fc172efdfea1dd7938fe190d9bbffa711f20abf SHA512 703bd3de44ccff3f318239dc2ca26a285f83ae0340a91391bcc5b719c298e77c8122d1502665350ddfc9fb14f12d9b6a56cba422ff8985db9cee6c91091fb987
DIST dcc-1.3.158.tar.Z 1714175 BLAKE2B 19e11e9e78268e76bf97f16ad6f03f0bb114ec9fbc9b1f8bb6ca7ce72fa419b1e50a6d35ee32ed5352b13da96002d313c00a07395317d33082eb69c9ae60008e SHA512 24fba5ea713e8df1468644508c323d64b3868685716b7cc02263933476940a807cfc4593432a9195371308c83d4ea93653e89634681d95dcb32f5d65c7274599
+DIST dcc-2.3.168.tar.Z 1608203 BLAKE2B d0dac4ee233fede16b4904524126cff4f127e59177d11624acf850861b9f267718efab974edafbd4521bcf78a2c3d626876c23c0af3cc108cd131c197dbc9945 SHA512 52a9671ba355a2d3e82246c3b5cf3875148d48bd314371d9e608643a59922becdf024b880e4bd37f6e36aa50830110600960ffa7a3ddd69ed7239bfc0578f141
diff --git a/mail-filter/dcc/dcc-1.3.154.ebuild b/mail-filter/dcc/dcc-1.3.154.ebuild
deleted file mode 100644
index b4bdaf7abd15..000000000000
--- a/mail-filter/dcc/dcc-1.3.154.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# 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" #
-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-r1.ebuild b/mail-filter/dcc/dcc-1.3.158-r1.ebuild
new file mode 100644
index 000000000000..db4459137a86
--- /dev/null
+++ b/mail-filter/dcc/dcc-1.3.158-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Distributed Checksum Clearinghouse"
+HOMEPAGE="https://www.rhyolite.com/dcc/"
+SRC_URI="https://www.rhyolite.com/dcc/source/old/${P}.tar.Z"
+
+LICENSE="DCC GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
+IUSE="cgi ipv6 rrdtool milter"
+
+RDEPEND="
+ dev-lang/perl
+ || (
+ net-ftp/ftp
+ net-misc/curl
+ net-misc/wget
+ www-client/fetch
+ )
+ milter? (
+ || (
+ mail-filter/libmilter
+ mail-mta/sendmail
+ )
+ )
+ rrdtool? ( net-analyzer/rrdtool )"
+DEPEND="${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}"/${PN}-1.3.140-freebsd.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
+
+src_configure() {
+ tc-export CC AR RANLIB
+ local myconf=(
+ --bindir="${EPREFIX}"/usr/bin
+ --homedir="${EPREFIX}"/${dcc_homedir}
+ --libexecdir="${EPREFIX}"/${dcc_libexec}
+ --mandir="${EPREFIX}"/usr/share/man
+ --enable-dccifd
+ --enable-server
+ --with-DDC-MD5
+ --with-installroot="${D}"
+ --with-rundir="${EPREFIX}"/${dcc_rundir}
+ --with-uid=root
+ --with-updatedcc_pfile="${EPREFIX}"/${dcc_homedir}/updatecc.pfile
+ --with-db-memory=64
+ --with-max-db-mem=128
+ --with-max-log-size=0
+ --with-make-cmd=${MAKE:-make}
+ $(use_enable ipv6 IPv6)
+ $(use_enable milter dccm)
+ $(use_with cgi cgibin ${dcc_cgibin})
+ $(use_with milter sendmail)
+ )
+
+ einfo "Using config: ${myconf[@]}"
+
+ # This is NOT a normal configure script.
+ ./configure "${myconf[@]}" || die "configure failed!"
+}
+
+moveconf() {
+ local i
+ for i in $@; do
+ mv "${ED}/${dcc_homedir}/${i}" "${ED}"/etc/dcc || die
+ dosym ../../etc/dcc/"${i}" "${dcc_homedir}/${i}"
+ done
+}
+
+src_install() {
+ # stolen from the RPM .spec and modified for gentoo
+ export MANOWN=root
+ export MANGRP=$(id -g -n root)
+ export BINOWN="${MANOWN}"
+ export BINGRP="${MANGRP}"
+ export DCC_PROTO_HOMEDIR="${ED}/${dcc_homedir}"
+ export DCC_CGIBINDIR="${ED}/${dcc_cgibin}"
+ export DCC_SUID="${BINOWN}"
+ export DCC_OWN="${BINOWN}"
+ export DCC_GRP="${BINGRP}"
+
+ 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
+
+ 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 "${ED}/${dcc_homedir}/dcc_conf" || die
+
+ if use milter ; then
+ # enable milter
+ sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \
+ "${ED}/${dcc_homedir}"/dcc_conf || die
+ fi
+
+ # provide cronjob
+ mv "${ED}"/usr/sbin/cron-dccd "${ED}"/etc/cron.daily/dccd || die "mv failed"
+
+ # clean up
+ mv "${ED}"/usr/sbin/logger "${ED}"/usr/sbin/logger-dcc || die "mv failed"
+
+ if ! use rrdtool; then
+ # remove rrdtool interface scripts
+ rm "${ED}"/usr/sbin/dcc-stats-{collect,graph,init} || die "Failed to clean up rrdtool scripts"
+ fi
+
+ # clean up
+ rm "${ED}"/usr/sbin/{rcDCC,updatedcc} || die
+
+ # 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 "${ED}"/var/dcc/log/ || die
+
+ dodoc CHANGES RESTRICTIONS
+ doman *.{0,8}
+}
diff --git a/mail-filter/dcc/dcc-1.3.158-r2.ebuild b/mail-filter/dcc/dcc-1.3.158-r2.ebuild
new file mode 100644
index 000000000000..6c09223f5624
--- /dev/null
+++ b/mail-filter/dcc/dcc-1.3.158-r2.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Distributed Checksum Clearinghouse"
+HOMEPAGE="https://www.rhyolite.com/dcc/"
+SRC_URI="https://www.rhyolite.com/dcc/source/old/${P}.tar.Z"
+
+LICENSE="DCC GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
+IUSE="cgi ipv6 rrdtool milter"
+
+RDEPEND="
+ dev-lang/perl
+ || (
+ net-ftp/ftp
+ net-misc/curl
+ net-misc/wget
+ www-client/fetch
+ )
+ milter? ( mail-filter/libmilter:= )
+ rrdtool? ( net-analyzer/rrdtool )"
+DEPEND="${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}"/${PN}-1.3.140-freebsd.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${P}-clang16.patch
+ "${FILESDIR}"/${P}-c2x.patch
+)
+
+src_configure() {
+ tc-export CC AR RANLIB
+ local myconf=(
+ --bindir="${EPREFIX}"/usr/bin
+ --homedir="${EPREFIX}"/${dcc_homedir}
+ --libexecdir="${EPREFIX}"/${dcc_libexec}
+ --mandir="${EPREFIX}"/usr/share/man
+ --enable-dccifd
+ --enable-server
+ --with-DDC-MD5
+ --with-installroot="${D}"
+ --with-rundir="${EPREFIX}"/${dcc_rundir}
+ --with-uid=root
+ --with-updatedcc_pfile="${EPREFIX}"/${dcc_homedir}/updatecc.pfile
+ --with-db-memory=64
+ --with-max-db-mem=128
+ --with-max-log-size=0
+ --with-make-cmd=${MAKE:-make}
+ $(use_enable ipv6 IPv6)
+ $(use_enable milter dccm)
+ $(use_with cgi cgibin ${dcc_cgibin})
+ $(use_with milter sendmail)
+ )
+
+ einfo "Using config: ${myconf[@]}"
+
+ # This is NOT a normal configure script.
+ ./configure "${myconf[@]}" || die "configure failed!"
+}
+
+moveconf() {
+ local i
+ for i in $@; do
+ mv "${ED}/${dcc_homedir}/${i}" "${ED}"/etc/dcc || die
+ dosym ../../etc/dcc/"${i}" "${dcc_homedir}/${i}"
+ done
+}
+
+src_install() {
+ # stolen from the RPM .spec and modified for gentoo
+ export MANOWN=root
+ export MANGRP=$(id -g -n root)
+ export BINOWN="${MANOWN}"
+ export BINGRP="${MANGRP}"
+ export DCC_PROTO_HOMEDIR="${ED}/${dcc_homedir}"
+ export DCC_CGIBINDIR="${ED}/${dcc_cgibin}"
+ export DCC_SUID="${BINOWN}"
+ export DCC_OWN="${BINOWN}"
+ export DCC_GRP="${BINGRP}"
+
+ 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
+
+ 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 "${ED}/${dcc_homedir}/dcc_conf" || die
+
+ if use milter ; then
+ # enable milter
+ sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \
+ "${ED}/${dcc_homedir}"/dcc_conf || die
+ fi
+
+ # provide cronjob
+ mv "${ED}"/usr/sbin/cron-dccd "${ED}"/etc/cron.daily/dccd || die "mv failed"
+
+ # clean up
+ mv "${ED}"/usr/sbin/logger "${ED}"/usr/sbin/logger-dcc || die "mv failed"
+
+ if ! use rrdtool; then
+ # remove rrdtool interface scripts
+ rm "${ED}"/usr/sbin/dcc-stats-{collect,graph,init} || die "Failed to clean up rrdtool scripts"
+ fi
+
+ # clean up
+ rm "${ED}"/usr/sbin/{rcDCC,updatedcc} || die
+
+ # 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 "${ED}"/var/dcc/log/ || die
+
+ dodoc CHANGES RESTRICTIONS
+ doman *.{0,8}
+}
diff --git a/mail-filter/dcc/dcc-1.3.158.ebuild b/mail-filter/dcc/dcc-1.3.158.ebuild
deleted file mode 100644
index a9bbddee101b..000000000000
--- a/mail-filter/dcc/dcc-1.3.158.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# 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 ~arm64 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-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-2.3.168.ebuild b/mail-filter/dcc/dcc-2.3.168.ebuild
new file mode 100644
index 000000000000..0ac9be7299a7
--- /dev/null
+++ b/mail-filter/dcc/dcc-2.3.168.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="Distributed Checksum Clearinghouse"
+HOMEPAGE="https://www.rhyolite.com/dcc/"
+SRC_URI="https://www.rhyolite.com/dcc/source/old/${P}.tar.Z"
+
+LICENSE="DCC GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="cgi ipv6 rrdtool milter"
+
+RDEPEND="
+ dev-lang/perl
+ || (
+ net-ftp/ftp
+ net-misc/curl
+ net-misc/wget
+ www-client/fetch
+ )
+ milter? ( mail-filter/libmilter:= )
+ rrdtool? ( net-analyzer/rrdtool )"
+DEPEND="${RDEPEND}"
+
+dcc_cgibin=var/www/localhost/cgi-bin/dcc
+dcc_homedir=var/lib/dcc
+dcc_libexec=usr/sbin
+dcc_man=usr/share/man
+dcc_rundir=var/run/dcc
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.158-clang16.patch
+ "${FILESDIR}"/${PN}-1.3.158-c2x.patch
+)
+
+src_configure() {
+ tc-export CC AR RANLIB
+ local myconf=(
+ --bindir="${EPREFIX}"/usr/bin
+ --homedir="${EPREFIX}"/${dcc_homedir}
+ --libexecdir="${EPREFIX}"/${dcc_libexec}
+ --mandir="${EPREFIX}"/usr/share/man
+ --enable-dccifd
+ --enable-server
+ --with-DDC-MD5
+ --with-installroot="${D}"
+ --with-rundir="${EPREFIX}"/${dcc_rundir}
+ --with-uid=root
+ --with-updatedcc_pfile="${EPREFIX}"/${dcc_homedir}/updatecc.pfile
+ --with-db-memory=64
+ --with-max-db-mem=128
+ --with-max-log-size=0
+ --with-make-cmd=${MAKE:-make}
+ $(use_enable ipv6 IPv6)
+ $(use_enable milter dccm)
+ $(use_with cgi cgibin ${dcc_cgibin})
+ $(use_with milter sendmail)
+ )
+
+ einfo "Using config: ${myconf[@]}"
+
+ # This is NOT a normal configure script.
+ ./configure "${myconf[@]}" || die "configure failed!"
+}
+
+moveconf() {
+ local i
+ for i in $@; do
+ mv "${ED}/${dcc_homedir}/${i}" "${ED}"/etc/dcc || die
+ dosym ../../../etc/dcc/"${i}" "${dcc_homedir}/${i}"
+ done
+}
+
+src_install() {
+ # stolen from the RPM .spec and modified for gentoo
+ export MANOWN=root
+ export MANGRP=$(id -g -n root)
+ export BINOWN="${MANOWN}"
+ export BINGRP="${MANGRP}"
+ export DCC_PROTO_HOMEDIR="${ED}/${dcc_homedir}"
+ export DCC_CGIBINDIR="${ED}/${dcc_cgibin}"
+ export DCC_SUID="${BINOWN}"
+ export DCC_OWN="${BINOWN}"
+ export DCC_GRP="${BINGRP}"
+
+ 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
+
+ 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 "${ED}/${dcc_homedir}/dcc_conf" || die
+
+ if use milter ; then
+ # enable milter
+ sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \
+ "${ED}/${dcc_homedir}"/dcc_conf || die
+ fi
+
+ # provide cronjob
+ mv "${ED}"/usr/sbin/cron-dccd "${ED}"/etc/cron.daily/dccd || die "mv failed"
+
+ # clean up
+ mv "${ED}"/usr/sbin/logger "${ED}"/usr/sbin/logger-dcc || die "mv failed"
+
+ if ! use rrdtool; then
+ # remove rrdtool interface scripts
+ rm "${ED}"/usr/sbin/dcc-stats-{collect,graph,init} || die "Failed to clean up rrdtool scripts"
+ fi
+
+ # clean up
+ rm "${ED}"/usr/sbin/{rcDCC,updatedcc} || die
+
+ # 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 "${ED}"/"${dcc_homedir}"/log || die
+
+ dodoc CHANGES
+ doman *.{0,8}
+
+ systemd_dounit "${FILESDIR}/dccifd.service"
+}
diff --git a/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch b/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch
index e72224f41c2f..8d4a8d59c334 100644
--- a/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch
+++ b/mail-filter/dcc/files/dcc-1.3.140-freebsd.patch
@@ -1,5 +1,3 @@
-diff --git a/configure b/configure
-index 5efe49d..de8d6f2 100755
--- a/configure
+++ b/configure
@@ -3677,7 +3677,7 @@ case "$TARGET_SYS" in
diff --git a/mail-filter/dcc/files/dcc-1.3.158-c2x.patch b/mail-filter/dcc/files/dcc-1.3.158-c2x.patch
new file mode 100644
index 000000000000..79b70f300f8f
--- /dev/null
+++ b/mail-filter/dcc/files/dcc-1.3.158-c2x.patch
@@ -0,0 +1,21 @@
+This is the only K&R-style functions in the source, incompatible with C2x.
+--- a/dcclib/inet_ntop.c
++++ b/dcclib/inet_ntop.c
+@@ -88,7 +88,3 @@
+ */
+-static const char *
+-inet_ntop4(src, dst, size)
+- const u_char *src;
+- char *dst;
+- size_t size;
++static const char *inet_ntop4(const u_char *src, char *dst, size_t size)
+ {
+@@ -115,7 +111,3 @@
+ */
+-static const char *
+-inet_ntop6(src, dst, size)
+- const u_char *src;
+- char *dst;
+- size_t size;
++static const char *inet_ntop6(const u_char *src, char *dst, size_t size)
+ {
diff --git a/mail-filter/dcc/files/dcc-1.3.158-clang16.patch b/mail-filter/dcc/files/dcc-1.3.158-clang16.patch
new file mode 100644
index 000000000000..adf518944408
--- /dev/null
+++ b/mail-filter/dcc/files/dcc-1.3.158-clang16.patch
@@ -0,0 +1,30 @@
+configure.ac is missing, so need to edit this manually
+
+https://bugs.gentoo.org/870646
+--- a/configure
++++ b/configure
+@@ -796,3 +796,3 @@
+
+-main(){return(0);}
++int main(void){return(0);}
+ EOF
+@@ -1100,3 +1100,3 @@
+ #include "confdefs.h"
+-main()
++int main(void)
+ {exit(sizeof(void*)==8 ? 0 : sizeof(void*));}
+@@ -1463,3 +1463,3 @@
+ #include <sys/types.h>
+-main()
++int main(void)
+ {
+@@ -3330,3 +3330,3 @@
+ #define min(a,b) ((a) < (b) ? (a) : (b))
+-main()
++int main(void)
+ {
+@@ -3596,3 +3596,3 @@
+ #include "include/dcc_paths.h"
+-main()
++int main(void)
+ {
diff --git a/mail-filter/dcc/files/dcc-1.3.158-fno-common.patch b/mail-filter/dcc/files/dcc-1.3.158-fno-common.patch
new file mode 100644
index 000000000000..0ff4cb599a17
--- /dev/null
+++ b/mail-filter/dcc/files/dcc-1.3.158-fno-common.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/706988
+--- a/srvrlib/db.c
++++ b/srvrlib/db.c
+@@ -65,7 +65,7 @@ struct timeval db_time;
+
+ int db_debug;
+
+-u_char grey_on;
++extern u_char grey_on;
+
+ DB_BUF_MODE db_buf_mode_hash, db_buf_mode_db;
+
+--- a/thrlib/cmn_defs.h
++++ b/thrlib/cmn_defs.h
+@@ -237,7 +237,7 @@ extern u_int dcc_ctxt_sn; /* change X-DCC header server name */
+
+ extern RCPT_ST *rcpt_st_free;
+
+-const char *userdirs;
++extern const char *userdirs;
+
+ extern u_char dcc_query_only;
+ extern u_char can_discard_1; /* 1=can trim targets after DATA */
diff --git a/mail-filter/dcc/files/dccifd.service b/mail-filter/dcc/files/dccifd.service
new file mode 100644
index 000000000000..4055a752f933
--- /dev/null
+++ b/mail-filter/dcc/files/dccifd.service
@@ -0,0 +1,34 @@
+[Unit]
+Description=DCC (Distributed Checksum Clearinghouses) interface daemon
+
+[Service]
+Type=forking
+PermissionsStartOnly=true
+RuntimeDirectory=dcc
+ConfigurationDirectory=dcc
+LogsDirectory=dcc
+StateDirectory=dcc
+ExecStart=/usr/sbin/dccifd
+
+#DCC writes pid file with "-" at the beginning which confuses systemd
+#PIDFile=/run/dcc/dccifd.pid
+
+# Hardening
+ProtectSystem=strict
+PrivateDevices=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+RestrictRealtime=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+ProtectHome=true
+ProtectHostname=true
+ProtectClock=true
+PrivateTmp=true
+SystemCallArchitectures=native
+MemoryDenyWriteExecute=true
+NoNewPrivileges=true
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/mail-filter/dcc/metadata.xml b/mail-filter/dcc/metadata.xml
index 4cfcb6450d05..d694695270e8 100644
--- a/mail-filter/dcc/metadata.xml
+++ b/mail-filter/dcc/metadata.xml
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>robbat2@gentoo.org</email>
</maintainer>
+<maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+</maintainer>
<use>
<flag name="rrdtool">Enable <pkg>net-analyzer/rrdtool</pkg> interface
scripts</flag>