Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 260702 Details for
Bug 334245
mail-filter/dcc errors out when /var/run/dcc is missing
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dcc-1.3.135.patch
dcc-1.3.135.patch (text/plain), 11.28 KB, created by
Eray Aslan
on 2011-01-25 18:01:10 UTC
(
hide
)
Description:
dcc-1.3.135.patch
Filename:
MIME Type:
Creator:
Eray Aslan
Created:
2011-01-25 18:01:10 UTC
Size:
11.28 KB
patch
obsolete
>--- dcc-1.3.135.ebuild.orig 2011-01-25 14:35:00.000000000 +0000 >+++ dcc-1.3.135.ebuild 2011-01-25 14:20:34.000000000 +0000 >@@ -1,22 +1,24 @@ > # Copyright 1999-2011 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/cvsroot/gentoo-x86/mail-filter/dcc/dcc-1.3.135.ebuild,v 1.1 2011/01/25 04:21:27 robbat2 Exp $ >+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dcc/dcc-1.3.119-r1.ebuild,v 1.1 2010/07/10 22:18:20 hwoarang Exp $ >+ >+EAPI=2 > > inherit 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/${PN}-${PV}.tar.Z" >+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="ipv6 rrdtool milter" >+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 )" >+ milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )" > DEPEND="sys-apps/sed > sys-devel/gcc > ${RDEPEND}" >@@ -27,13 +29,7 @@ > dcc_man=/usr/share/man > dcc_rundir=/var/run/dcc > >-src_unpack() { >- unpack ${A} >- #cd "${S}" >- #epatch "${FILESDIR}"/${PN}-1.3.86.patch >-} >- >-src_compile() { >+src_configure() { > local myconf > myconf="${myconf} --homedir=${dcc_homedir}" > myconf="${myconf} --bindir=/usr/bin" >@@ -41,12 +37,11 @@ > myconf="${myconf} --mandir=/usr/share/man" > myconf="${myconf} --with-updatedcc_pfile=${dcc_homedir}/updatecc.pfile" > myconf="${myconf} --with-installroot=${D}" >- myconf="${myconf} --with-DCC-MD5" >+ # 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} --without-cgibin" >- myconf="${myconf} --with-cgibin=${dcc_cgibin}" > myconf="${myconf} --with-rundir=${dcc_rundir}" > myconf="${myconf} --with-db-memory=64" > myconf="${myconf} --with-max-db-mem=128" >@@ -60,76 +55,88 @@ > 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!" >- #make -C homedir >+} >+ >+src_compile() { > emake CC="$(tc-getCC)" || die "emake failed!" > } > > moveconf() { >+ local into=/etc/dcc/ > for i in $@; do >- local into=/etc/dcc/ >- mv "${D}"${dcc_homedir}/${i} "${D}"${into} >- dosym ${into}${i} ${dcc_homedir}/${i} >+ 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 >+ 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 >+ DCC_SUID="${BINOWN}" DCC_OWN="${BINOWN}" DCC_GRP="${BINGRP}" export DCC_SUID DCC_OWN DCC_GRP > >- dodir /etc/cron.daily ${dcc_homedir} ${dcc_cgibin} /usr/bin /usr/sbin /usr/share/man/man{0,8} /etc/dcc >- keepdir /var/run/dcc /var/log/dcc >+ 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 > >- addwrite "${dcc_homedir}/map" >-# 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 >+ # 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" > >- einfo "Branding and setting reasonable defaults" >+ # 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_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/' \ >- -i "${D}"${dcc_homedir}/dcc_conf >+ -e 's/DBCLEAN_LOGDAYS=14/DBCLEAN_LOGDAYS=1/' \ >+ -i "${D}${dcc_homedir}/dcc_conf" > >- einfo "Enabling milter" > if use milter ; then >+ # enable milter > sed -i -e "s:^[\t #]*\(DCCM_ENABLE[\t ]*=[\t ]*\).*:\1on:g" \ >- "${D}"${dcc_homedir}/dcc_conf >+ "${D}${dcc_homedir}"/dcc_conf > fi > >- einfo "Providing cronjob" >- mv "${D}"/usr/sbin/cron-dccd "${D}"/etc/cron.daily/dccd >+ # provide cronjob >+ mv "${D}"/usr/sbin/cron-dccd "${D}"/etc/cron.daily/dccd || die "mv failed" > >- einfo "Cleaning up" >- mv "${D}"/usr/sbin/logger "${D}"/usr/sbin/logger-dcc >+ # 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 >- einfo "Removing rrdtool interface scripts" >+ # remove rrdtool interface scripts > eval rm -f ${statslist} || die "Failed to clean up rrdtool scripts" > fi > >- einfo "Cleaning up" >+ # clean up > rm -f "${D}"/usr/sbin/{rcDCC,updatedcc} > >- einfo "Placing configuration files into /etc instead of /var/dcc" >+ # place configuration files into /etc instead of /var/dcc > moveconf dcc_conf flod grey_flod grey_whitelist ids map map.txt whiteclnt whitecommon whitelist > >- einfo "Install conf.d configuration" >- newconfd "${FILESDIR}"/dcc.confd dcc >- >- einfo "Install init.d script" > newinitd "${FILESDIR}"/dcc.initd dcc > > rmdir "${D}"/var/dcc/log/ >+ >+ dodoc CHANGES RESTRICTIONS >+ dohtml *.html >+ doman *.{0,8} > } >--- files/dcc.initd.orig 2011-01-25 14:36:09.000000000 +0000 >+++ files/dcc.initd 2011-01-25 14:36:30.000000000 +0000 >@@ -1,7 +1,7 @@ > #!/sbin/runscript > # Copyright 1999-2011 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/cvsroot/gentoo-x86/mail-filter/dcc/files/dcc.initd,v 1.2 2011/01/25 04:24:43 robbat2 Exp $ >+# $Header: $ > > depend() { > use logger >@@ -10,125 +10,88 @@ > } > > checkconfig() { >- if [[ ! -f "/etc/dcc/dcc_conf" || ! -r "/etc/dcc/dcc_conf" ]] >- then >+ if [ ! -f "/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 >+ 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 [[ "${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 >+ if [ "${DCCD_ENABLE}" = "on" ] && [ -x "${DCC_LIBEXEC}/start-dccd" ]; then >+ ebegin "Starting dccd" >+ ${DCC_LIBEXEC}/start-dccd >/dev/null 2>&1 >+ eend ${?} > 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 >+ if [ "${GREY_ENABLE}" = "on" ] && [ -x "${DCC_LIBEXEC}/start-grey" ]; then >+ ebegin "Starting grey" >+ ${DCC_LIBEXEC}/start-grey >/dev/null 2>&1 >+ eend ${?} > 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 >+ if [ "${DCCM_ENABLE}" = "on" ] && [ -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 >+ break > else >- eerror "You enabled DCCM but start-dccm is missing or not executable" >+ sleep 1 > fi >- 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 [[ "${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 >+ 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 >+ 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 >+ 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 >+ 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 >+ 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 ${?}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 334245
:
244355
|
244359
|
244399
|
244551
|
253439
| 260702