From owner-freebsd-ports Wed Sep 20 22:30:13 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3E7DF37B424 for ; Wed, 20 Sep 2000 22:30:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id WAA48992; Wed, 20 Sep 2000 22:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from volyn.dppl.com (cc167606-a.union1.nj.home.com [24.3.170.57]) by hub.freebsd.org (Postfix) with ESMTP id A7C2D37B422; Wed, 20 Sep 2000 22:24:30 -0700 (PDT) Received: by volyn.dppl.com (Postfix, from userid 1001) id 2A3781B20E; Thu, 21 Sep 2000 01:24:28 -0400 (EDT) Message-Id: <20000921052428.2A3781B20E@volyn.dppl.com> Date: Thu, 21 Sep 2000 01:24:28 -0400 (EDT) From: yds@dppl.com Reply-To: yds@dppl.com To: FreeBSD-gnats-submit@FreeBSD.org Cc: missnglnk@sneakerz.org, torstenb@FreeBSD.org X-Send-Pr-Version: 3.2 Subject: ports/21439: FIX: mail/postfix-current Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 21439 >Category: ports >Synopsis: FIX: mail/postfix-current >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Sep 20 22:30:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Yarema >Release: FreeBSD 4.1-STABLE i386 >Organization: DPPL >Environment: FreeBSD 4.1-STABLE i386 >Description: Cleaned up the Makefile to be easier to read and maintain. The port now uses the ${CFLAGS} setting from /etc/make.conf which was previously ignored. Updated the PLIST file to accurately reflect what's actually installed. Removed man files from PLIST since they don't belong there. Changed @dirrm /var/spool/postfix to @unexec rm -rf /var/spool/postfix in PLIST since in practice a) the original line was trying to remove /usr/local//var/spool/postfix which did not exist and b) @dirrm wouldn't work even if it were pointing at the correct path because Postfix creates a number of subdirectories which are not accounted for in PLIST and which may not be empty even if they were accounted for. Rewrote the do-install target to use ${INSTALL_PROGRAM}, ${INSTALL_SCRIPT} ${INSTALL_DATA} and ${INSTALL_MAN} macros where appropriate. Added an install for ${PREFIX}/etc/postfix/postfix-script which was missing and is required by the postfix command. Added a check for NOPORTDOCS before installing HTML documentation. Fixed the call to ${PKGDIR}/INSTALL in the pre-install target and added an analogous post-install target. In ${PKGDIR}/INSTALL the permissions for postdrop should be 2555 not 2755 since ${BINMODE} used by ${INSTALL_PROGRAM} is 0555. Now that post-install handles the chown and chmod for postdrop there is no need for special handling of this issue elsewhere in the Makefile so that was removed. Finally added a call to ${PKG_PREFIX}/sbin/postfix check in ${PKGDIR}/INSTALL to create all the /var/spool/postfix/* subdirectories at install time instead of when Postfix is first run. Hope this helps and actually gets committed unlike a similar PR I sent months ago for the postfix stable port. >How-To-Repeat: cd /usr/ports/mail/postfix-current && make install >Fix: diff -ruN postfix-current.orig/Makefile postfix-current/Makefile --- postfix-current.orig/Makefile Fri Sep 15 04:58:22 2000 +++ postfix-current/Makefile Wed Sep 20 19:25:40 2000 @@ -25,12 +25,10 @@ .endif .if defined(CC) -MAKEFILEFLAGS+= CC=$(CC) +MAKEFILEFLAGS+= CC=${CC} .endif -.if defined(OPT) -MAKEFILEFLAGS+= OPT=$(OPT) -.endif +MAKEFILEFLAGS+= OPT="${CFLAGS}" .if defined(WITH_MYSQL) BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client @@ -56,6 +54,21 @@ POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libsasl.a -lpam -lcrypt .endif +CONF1= access aliases canonical main.cf master.cf \ + regexp_table relocated transport virtual + +CONF2= sample-aliases.cf sample-canonical.cf sample-debug.cf \ + sample-filter.cf sample-local.cf sample-misc.cf \ + sample-rate.cf sample-regexp.cf sample-relocated.cf \ + sample-resource.cf sample-rewrite.cf sample-smtp.cf \ + sample-smtpd.cf sample-transport.cf sample-virtual.cf + +BIN1= bounce cleanup error lmtp local master nqmgr pickup \ + pipe qmgr showq smtp smtpd trivial-rewrite + +BIN2= postalias postcat postconf postdrop postfix \ + postkick postlog postmap postsuper sendmail + MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \ sendmail.1 @@ -63,12 +76,33 @@ MAN5= access.5 aliases.5 canonical.5 regexp_table.5 relocated.5 \ transport.5 virtual.5 +MAN8= bounce.8 cleanup.8 defer.8 error.8 lmtp.8 local.8 master.8 \ + pickup.8 pipe.8 qmgr.8 showq.8 smtp.8 smtpd.8 trivial-rewrite.8 + .ifdef(WITH_PCRE) -MAN5+= pcre_table.5 +CONF1+= pcre_table +CONF2+= sample-pcre.cf +MAN5+= pcre_table.5 +PLIST_SUB+= WITH_PCRE="" +.else +PLIST_SUB+= WITH_PCRE="@comment " .endif -MAN8= bounce.8 cleanup.8 defer.8 error.8 lmtp.8 local.8 master.8 \ - pickup.8 pipe.8 qmgr.8 showq.8 smtp.8 smtpd.8 trivial-rewrite.8 +.ifdef(WITH_SASL) +CONF2+= sample-auth.cf +PLIST_SUB+= WITH_SASL="" +.else +PLIST_SUB+= WITH_SASL="@comment " +.endif + +.ifdef(WITH_LDAP) +CONF2+= sample-ldap.cf +PLIST_SUB+= WITH_LDAP="" +.else +PLIST_SUB+= WITH_LDAP="@comment " +.endif + +DOCDIR= ${PREFIX}/share/doc/postfix post-patch: (cd ${WRKSRC} && make -f Makefile.init makefiles ${MAKEFILEFLAGS} \ @@ -76,105 +110,89 @@ ${ECHO} "all: default" >> Makefile) pre-install: - @/bin/sh @${PKGDIR}/INSTALL Postfix PRE-INSTALL - -do-install: - @${MKDIR} -m 755 ${PREFIX}/etc/postfix - @${CHOWN} root:wheel ${PREFIX}/etc/postfix - @${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \ - ${PREFIX}/etc/postfix/LICENSE - - @for f in access aliases canonical main.cf master.cf \ - regexp_table relocated transport virtual ; do \ - ${INSTALL} -C -o root -g wheel -m 0644 \ - ${WRKSRC}/conf/$$f ${PREFIX}/etc/postfix/sample-$$f ; \ - done - -.if defined(WITH_PCRE) - @${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/pcre_table \ - ${PREFIX}/etc/postfix/sample-pcre_table -.endif - - @for f in sample-aliases.cf sample-canonical.cf \ - sample-debug.cf sample-filter.cf sample-ldap.cf \ - sample-local.cf sample-misc.cf sample-rate.cf \ - sample-regexp.cf sample-relocated.cf sample-resource.cf \ - sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \ - sample-transport.cf sample-virtual.cf ; do \ - ${INSTALL} -C -o root -g wheel -m 0644 \ - ${WRKSRC}/conf/$$f ${PREFIX}/etc/postfix/$$f ; \ - done + @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL -.if defined(WITH_PCRE) - @${INSTALL} -C -o root -g wheel -m 0644 \ - ${WRKSRC}/conf/sample-pcre.cf \ - ${PREFIX}/etc/postfix/sample-pcre.cf -.endif +post-install: + @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL -.if defined(WITH_SASL) - @${INSTALL} -C -o root -g wheel -m 0644 \ - ${WRKSRC}/conf/sample-auth.cf \ - ${PREFIX}/etc/postfix/sample-auth.cf -.endif - - @${MKDIR} -m 755 ${PREFIX}/libexec/postfix - @${CHOWN} root:wheel ${PREFIX}/libexec/postfix - - @for f in bounce cleanup error lmtp local master nqmgr pickup \ - pipe qmgr showq smtp smtpd trivial-rewrite ; do \ - ${INSTALL} -C -o root -g wheel -m 0755 \ - ${WRKSRC}/libexec/$$f \ - ${PREFIX}/libexec/postfix/$$f ; \ - done - - @for f in postalias postcat postconf postfix postkick postlog \ - postmap postsuper sendmail ; do \ - ${INSTALL} -C -o root -g wheel -m 0755 \ - ${WRKSRC}/$$f/$$f ${PREFIX}/sbin/$$f ; \ - done - - @${INSTALL} -C -o root -g maildrop -m 2755 \ - ${WRKSRC}/postdrop/postdrop ${PREFIX}/sbin/postdrop - - @for f in ${MAN1} ; do \ - ${INSTALL} -C -o root -g wheel -m 0644 \ - ${WRKSRC}/man/man1/$$f ${PREFIX}/man/man1/$$f ; \ - done - - @for f in ${MAN5} ; do \ - ${INSTALL} -C -o root -g wheel -m 0644 \ - ${WRKSRC}/man/man5/$$f ${PREFIX}/man/man5/$$f ; \ - done - - @for f in ${MAN8} ; do \ - ${INSTALL} -C -o root -g wheel -m 0644 \ - ${WRKSRC}/man/man8/$$f ${PREFIX}/man/man8/$$f ; \ - done - - @${MKDIR} -m 755 /var/spool/postfix - @${CHOWN} root:wheel /var/spool/postfix - - @${MKDIR} -m 755 ${PREFIX}/share/doc/postfix - @${INSTALL} -d -m 555 -o root -g wheel ${PREFIX}/share/doc/postfix - @cd ${WRKSRC} && ${INSTALL_DATA} \ - html/*.html html/*.gif ${PREFIX}/share/doc && \ - ${ECHO_MSG} "Installed HTML documentation in ${PREFIX}/share/doc" - - @${ECHO_MSG} "--------------------------------------------------" - @${ECHO_MSG} "- To replace your existing sendmail with postfix -" - @${ECHO_MSG} "- type \"make replace\" -" - @${ECHO_MSG} "--------------------------------------------------" +do-install: + @${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 \ + ${PREFIX}/etc/postfix \ + ${PREFIX}/libexec/postfix \ + /var/spool/postfix + @${INSTALL_DATA} ${WRKSRC}/conf/LICENSE ${PREFIX}/etc/postfix + +.for file in ${CONF1} + @${INSTALL_DATA} \ + ${WRKSRC}/conf/${file} \ + ${PREFIX}/etc/postfix/sample-${file} +.endfor + +.for file in ${CONF2} + @${INSTALL_DATA} \ + ${WRKSRC}/conf/${file} \ + ${PREFIX}/etc/postfix +.endfor + + @${INSTALL_SCRIPT} \ + ${WRKSRC}/conf/postfix-script-sgid \ + ${PREFIX}/etc/postfix/postfix-script + +.for file in ${BIN1} + @${INSTALL_PROGRAM} \ + ${WRKSRC}/libexec/${file} \ + ${PREFIX}/libexec/postfix +.endfor + +.for file in ${BIN2} + @${INSTALL_PROGRAM} \ + ${WRKSRC}/${file}/${file} \ + ${PREFIX}/sbin +.endfor + +.for file in ${MAN1} + @${INSTALL_MAN} \ + ${WRKSRC}/man/man1/${file} \ + ${PREFIX}/man/man1 +.endfor + +.for file in ${MAN5} + @${INSTALL_MAN} \ + ${WRKSRC}/man/man5/${file} \ + ${PREFIX}/man/man5 +.endfor + +.for file in ${MAN8} + @${INSTALL_MAN} \ + ${WRKSRC}/man/man8/${file} \ + ${PREFIX}/man/man8 +.endfor + +.if !defined(NOPORTDOCS) + @${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCDIR} + @cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.gif ${DOCDIR} && \ + ${ECHO_MSG} "Installed HTML documentation in ${DOCDIR}" +.endif + + @${ECHO_MSG} '--------------------------------------------------' + @${ECHO_MSG} '- To replace your existing sendmail with postfix -' + @${ECHO_MSG} '- type "make replace" -' + @${ECHO_MSG} '--------------------------------------------------' .include replace: .if ${OSVERSION} >= 400014 - @${ECHO_MSG} "===> Activating postfix in /etc/mail/mailer.conf" + @${ECHO_MSG} "===> Activating postfix in /etc/mail/mailer.conf" ${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak - ${ECHO} 'sendmail ${PREFIX}/sbin/sendmail' > /etc/mail/mailer.conf - ${ECHO} 'send-mail ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf - ${ECHO} 'mailq ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf - ${ECHO} 'newaliases ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf + ${ECHO} "#" > /etc/mail/mailer.conf + ${ECHO} -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf + ${ECHO} ", named /usr/local/sbin/sendmail" >> /etc/mail/mailer.conf + ${ECHO} "#" >> /etc/mail/mailer.conf + ${ECHO} "sendmail ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf + ${ECHO} "send-mail ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf + ${ECHO} "mailq ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf + ${ECHO} "newaliases ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf .else @${ECHO_MSG} "===> Replacing sendmail" @if [ -e /usr/sbin/sendmail ]; then \ diff -ruN postfix-current.orig/pkg/INSTALL postfix-current/pkg/INSTALL --- postfix-current.orig/pkg/INSTALL Sun May 28 02:43:40 2000 +++ postfix-current/pkg/INSTALL Wed Sep 20 19:33:47 2000 @@ -85,6 +85,7 @@ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \ ${PKG_PREFIX}/etc/postfix/master.cf fi - chown root:maildrop ${PKG_PREFIX}/sbin/postdrop - chmod 2755 ${PKG_PREFIX}/sbin/postdrop + /usr/sbin/chown root:maildrop ${PKG_PREFIX}/sbin/postdrop + /bin/chmod 2555 ${PKG_PREFIX}/sbin/postdrop + ${PKG_PREFIX}/sbin/postfix check fi diff -ruN postfix-current.orig/pkg/PLIST postfix-current/pkg/PLIST --- postfix-current.orig/pkg/PLIST Thu Sep 14 02:33:09 2000 +++ postfix-current/pkg/PLIST Wed Sep 20 19:21:51 2000 @@ -1,28 +1,32 @@ etc/postfix/LICENSE +etc/postfix/postfix-script etc/postfix/sample-access etc/postfix/sample-aliases -etc/postfix/sample-canonical -etc/postfix/sample-main.cf -etc/postfix/sample-master.cf -etc/postfix/sample-regexp_table -etc/postfix/sample-relocated -etc/postfix/sample-transport -etc/postfix/sample-virtual etc/postfix/sample-aliases.cf +%%WITH_SASL%%etc/postfix/sample-auth.cf +etc/postfix/sample-canonical etc/postfix/sample-canonical.cf etc/postfix/sample-debug.cf etc/postfix/sample-filter.cf -etc/postfix/sample-ldap.cf +%%WITH_LDAP%%etc/postfix/sample-ldap.cf etc/postfix/sample-local.cf +etc/postfix/sample-main.cf +etc/postfix/sample-master.cf etc/postfix/sample-misc.cf +%%WITH_PCRE%%etc/postfix/sample-pcre.cf +%%WITH_PCRE%%etc/postfix/sample-pcre_table etc/postfix/sample-rate.cf etc/postfix/sample-regexp.cf +etc/postfix/sample-regexp_table +etc/postfix/sample-relocated etc/postfix/sample-relocated.cf etc/postfix/sample-resource.cf etc/postfix/sample-rewrite.cf etc/postfix/sample-smtp.cf etc/postfix/sample-smtpd.cf +etc/postfix/sample-transport etc/postfix/sample-transport.cf +etc/postfix/sample-virtual etc/postfix/sample-virtual.cf libexec/postfix/bounce libexec/postfix/cleanup @@ -38,40 +42,6 @@ libexec/postfix/smtp libexec/postfix/smtpd libexec/postfix/trivial-rewrite -man/man1/mailq.1.gz -man/man1/postalias.1.gz -man/man1/postcat.1.gz -man/man1/postconf.1.gz -man/man1/postdrop.1.gz -man/man1/postfix.1.gz -man/man1/postlock.1.gz -man/man1/postlog.1.gz -man/man1/postmap.1.gz -man/man1/postsuper.1.gz -man/man1/sendmail.1.gz -man/man1/newaliases.1.gz -man/man1/postkick.1.gz -man/man5/access.5.gz -man/man5/canonical.5.gz -man/man5/regexp_table.5.gz -man/man5/relocated.5.gz -man/man5/transport.5.gz -man/man5/virtual.5.gz -man/man5/aliases.5.gz -man/man8/bounce.8.gz -man/man8/defer.8.gz -man/man8/error.8.gz -man/man8/lmtp.8.gz -man/man8/local.8.gz -man/man8/master.8.gz -man/man8/pickup.8.gz -man/man8/pipe.8.gz -man/man8/qmgr.8.gz -man/man8/smtp.8.gz -man/man8/smtpd.8.gz -man/man8/cleanup.8.gz -man/man8/showq.8.gz -man/man8/trivial-rewrite.8.gz sbin/postalias sbin/postcat sbin/postconf @@ -84,4 +54,4 @@ sbin/sendmail @dirrm etc/postfix @dirrm libexec/postfix -@dirrm /var/spool/postfix +@unexec rm -rf /var/spool/postfix >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message