From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Feb 13 08:10:09 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 059D416A420 for ; Mon, 13 Feb 2006 08:10:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7843743D46 for ; Mon, 13 Feb 2006 08:10:08 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1D8A8S2052583 for ; Mon, 13 Feb 2006 08:10:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1D8A8VO052572; Mon, 13 Feb 2006 08:10:08 GMT (envelope-from gnats) Resent-Date: Mon, 13 Feb 2006 08:10:08 GMT Resent-Message-Id: <200602130810.k1D8A8VO052572@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yarema Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9829D16A420 for ; Mon, 13 Feb 2006 08:09:13 +0000 (GMT) (envelope-from yds@dppl.com) Received: from dppl.com (sapas.dppl.net [216.182.10.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F70343D46 for ; Mon, 13 Feb 2006 08:09:02 +0000 (GMT) (envelope-from yds@dppl.com) Received: from localhost (localhost [127.0.0.1]) (uid 1001) by dppl.com with local; Mon, 13 Feb 2006 03:08:57 -0500 Message-Id: Date: Mon, 13 Feb 2006 03:08:57 -0500 From: Yarema To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/93269: [maintainer update] courier/pkg-plist fixup for pkg_create directroy permissions bugs. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Yarema List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 08:10:09 -0000 >Number: 93269 >Category: ports >Synopsis: [maintainer update] courier/pkg-plist fixup for pkg_create directroy permissions bugs. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Feb 13 08:10:07 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Yarema >Release: FreeBSD 6.1-PRERELEASE i386 >Organization: >Environment: System: FreeBSD 6.1-PRERELEASE i386 >Description: pkg_create does not seem to restore empty directories even when listed with @dirrm nor can it be relied upon to always restore correct ownership and permissions. Hence all the '@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0??? -d ' and '@exec chmod 0??? %D' fixups in courier/pkg-plist. With the new patch courier installs with identical permissions via pkg_add or make install. New file: courier/files/sharedindexupdate.in and Makefile adjustments to install this new file. And @${REINPLACE_CMD} -e 's|^PROG=\./|PROG=exec ./|g' \ ${WRKSRC}/courier/module.*/courier.config to save some RAM instead of having a parent /bin/sh proc for each configured module hanging around for no apparent good reason. >How-To-Repeat: cd /usr/ports/mail/courier && make install package >Fix: diff -u -r -N courier/Makefile courier-0.52.2_1/Makefile --- courier/Makefile Sun Feb 12 04:05:17 2006 +++ courier/Makefile Mon Feb 13 02:25:19 2006 @@ -7,6 +7,7 @@ PORTNAME= courier PORTVERSION= 0.52.2 +PORTREVISION= 1 CATEGORIES= mail ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= courier @@ -59,16 +60,15 @@ MIMETYPES= ${LOCALBASE}/etc/mime.types WITH_TRANSPORT= local esmtp dsn +USE_AUTOTOOLS= libtool:15 USE_BZIP2= yes -USE_SUBMAKE= yes -USE_PERL5= yes +USE_FAM= yes USE_GETTEXT= yes USE_GMAKE= yes USE_OPENSSL= yes +USE_PERL5= yes USE_REINPLACE= yes -USE_AUTOTOOLS= libtool:15 -USE_FAM= yes -WANT_FAM_SYSTEM=fam +USE_SUBMAKE= yes .if defined(WITH_RCORDER) USE_RCORDER= courier.sh @@ -118,7 +118,7 @@ CACHEOWN="${CACHEOWN}" CACHEDIR="${CACHEDIR}" \ CALENDIR="${CALENDIR}" LOCALSTATEDIR="${LOCALSTATEDIR}" SUB_LIST:= ${PLIST_SUB} -SUB_FILES+= pkg-install pkg-message crontab +SUB_FILES+= pkg-install pkg-message crontab sharedindexupdate OPTIONS+=LDAP "LDAP-based mail aliasing support" .if (exists(${LOCALBASE}/lib/libldap.a) && exists(${LOCALBASE}/lib/liblber.a)) || defined(WITH_LDAP) @@ -272,6 +272,8 @@ @${CP} ${TEMPLATES}/config.guess ${TEMPLATES}/config.sub ${WRKSRC} post-patch: + @${REINPLACE_CMD} -e 's|^PROG=\./|PROG=exec ./|g' \ + ${WRKSRC}/courier/module.*/courier.config @${REINPLACE_CMD} -e 's|@datadir@|@sysconfdir@|g' \ ${WRKSRC}/*/mk*cert.* \ ${WRKSRC}/*/*/mk*cert.* @@ -321,7 +323,8 @@ post-install: @${LN} -f ${SYSCONFDIR}/maildrop ${SYSCONFDIR}/maildropfilter @${INSTALL_DATA} /dev/null ${SYSCONFDIR}/locallowercase - @${INSTALL_DATA} ${WRKDIR}/crontab ${PREFIX}/etc/courier/ + @${INSTALL_DATA} ${WRKDIR}/crontab ${SYSCONFDIR}/ + @${INSTALL_SCRIPT} ${WRKDIR}/sharedindexupdate ${DATADIR}/ .for file in ${OWNER0} @-${CHOWN} -Rh ${BINOWN}:${BINGRP} ${PREFIX}/${file} .endfor diff -u -r -N courier/files/pkg-message.in courier-0.52.2_1/files/pkg-message.in --- courier/files/pkg-message.in Sat Jul 16 18:52:35 2005 +++ courier/files/pkg-message.in Fri Feb 10 18:35:41 2006 @@ -38,3 +38,11 @@ Documentation (if installed locally) is located in %%DOCSDIR%%/ otherwise see http://www.Courier-MTA.org/ + + If you are planning to serve shared maildirs, then + you should create a cron job that runs at regular + intervals (once every few hours is fine) that + executes the following script to update the + shared folder index: + + %%PREFIX%%/share/courier/sharedindexupdate diff -u -r -N courier/files/sharedindexupdate.in courier-0.52.2_1/files/sharedindexupdate.in --- courier/files/sharedindexupdate.in Wed Dec 31 19:00:00 1969 +++ courier/files/sharedindexupdate.in Fri Feb 10 18:08:31 2006 @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $NetBSD: sharedindexupdate.sh,v 1.2 2005/02/18 22:12:50 jlam Exp $ +# $FreeBSD: $ +# +# This script updates the index of shared folders on the system and is +# only needed if Courier-IMAP or SqWebMail used to serve mail and shared +# folders are used. If so, then this script should be run regularly as a +# system process to ensure the shared folder index is kept up-to-date. +# +# The courier-authlib package must be separately installed to provide the +# "authenumerate" program used in this script. + +prefix="%%PREFIX%%" +exec_prefix="${prefix}" +sysconfdir="${prefix}/etc/courier" +sbindir="${exec_prefix}/sbin" + +rm -rf ${sysconfdir}/shared.tmp +mkdir ${sysconfdir}/shared.tmp || exit 1 + +test -x ${sbindir}/authenumerate || exit 1 +${sbindir}/authenumerate > ${sysconfdir}/shared.tmp/.tmplist || exit 1 +${sbindir}/sharedindexsplit ${sysconfdir}/shared.tmp 1 < ${sysconfdir}/shared.tmp/.tmplist || exit 1 +rm -f ${sysconfdir}/shared.tmp/.tmplist +${sbindir}/sharedindexinstall diff -u -r -N courier/pkg-plist courier-0.52.2_1/pkg-plist --- courier/pkg-plist Sun Feb 12 04:05:17 2006 +++ courier/pkg-plist Fri Feb 10 18:22:41 2006 @@ -13,10 +13,12 @@ @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/aliases @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/esmtpacceptmailfor.dir @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/esmtppercentrelay.dir +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/filters @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/filters/active @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/shared @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/shared.tmp @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/smtpaccess +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin/added @exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin/removed @unexec rm -f %D/etc/courier/*.dat 2>/dev/null || true @@ -495,6 +497,7 @@ share/courier/rootcerts/visa-ecommerce-root.pem share/courier/rootcerts/xramp-global-certification-authority.pem @dirrm share/courier/rootcerts +share/courier/sharedindexupdate share/courier/sqwebmail/cleancache.pl share/courier/sqwebmail/html/en-us/CHARSET share/courier/sqwebmail/html/en-us/ISPELLDICT @@ -733,5 +736,23 @@ @exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/submit @exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/submitmkdir @exec chown %%MAILOWN%%:%%MAILGRP%% %D/sbin/showmodules +@exec chmod 0555 %D/libexec/courier +@exec chmod 0555 %D/libexec/courier/modules +@exec chmod 0555 %D/libexec/courier/modules/dsn +@exec chmod 0555 %D/libexec/courier/modules/esmtp +%%WITHFAX%%@exec chmod 0555 %D/libexec/courier/modules/fax +@exec chmod 0555 %D/libexec/courier/modules/local +%%WITHUUCP%%@exec chmod 0555 %D/libexec/courier/modules/uucp +@exec chmod 0555 %D/libexec/courier/webmail +@exec chmod 0555 %D/libexec/filters +@exec chmod 0555 %D/share/courier +@exec chmod 0555 %D/share/courier/couriermlm +@exec chmod 0555 %D/share/courier/courierwebadmin +%%WITHFAX%%@exec chmod 0555 %D/share/courier/faxmail +@exec chmod 0555 %D/share/courier/rootcerts +@exec chmod 0555 %D/share/courier/sqwebmail +@exec chmod 0555 %D/share/courier/sqwebmail/html +@exec chmod 0555 %D/share/courier/sqwebmail/html/en-us +@exec chmod 0555 %D/share/courier/sqwebmail/images @unexec echo y | crontab -u %%CACHEOWN%% -r 2>/dev/null || true @unexec rm -rf %%CALENDIR%% %%CACHEDIR%% 2>/dev/null || true >Release-Note: >Audit-Trail: >Unformatted: