Date: Thu, 4 Jun 2009 05:30:53 GMT From: Sahil Tandon <sahil@tandon.net> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/135241: [MAINTAINER-UPDATE] mail/postfix: fix problem with leftover files following deinstall and address ports/123812 Message-ID: <200906040530.n545UrB1076203@www.freebsd.org> Resent-Message-ID: <200906040540.n545e2q2058267@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 135241 >Category: ports >Synopsis: [MAINTAINER-UPDATE] mail/postfix: fix problem with leftover files following deinstall and address ports/123812 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Jun 04 05:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Sahil Tandon >Release: 7.1-RELEASE >Organization: >Environment: FreeBSD internal.hamla.org 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 14:37:25 UTC 2009 >Description: - If NOPORTEXAMPLES=yes, files would be leftover in the port's ${ETCDIR} after 'make deinstall'. This patch fixes that problem. - Also address ports/123812 by augmenting the Makefile's SCRIPTS_ENV variable. - So called "example files" which turn out to just be clones of man pages are no longer installed to avoid redundancy. >How-To-Repeat: Install with NOPORTEXAMPLES=yes and then 'make deinstall'; notice unmodified files remain in ${ETCDIR}. >Fix: Apply the CVS patch. Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/mail/postfix/Makefile,v retrieving revision 1.145 diff -u -r1.145 Makefile --- Makefile 26 May 2009 13:36:08 -0000 1.145 +++ Makefile 4 Jun 2009 04:57:19 -0000 @@ -7,6 +7,7 @@ PORTNAME= postfix PORTVERSION= 2.6.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \ @@ -28,6 +29,7 @@ USE_SUBMAKE= yes USE_PERL5_BUILD=yes USE_RC_SUBR= postfix.sh +SCRIPTS_ENV+= POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}" # back compat pull in settings from POSTFIX_OPTIONS for convenience when # make config is run (happens first time port is built, too) @@ -76,9 +78,6 @@ bounce.8 trace.8 \ smtp.8 lmtp.8 -PORTEXAMPLES= access aliases canonical generic header_checks \ - main.cf master.cf relocated transport virtual - .if !defined(DEBUG) MAKEFILEFLAGS+= DEBUG= .endif @@ -88,7 +87,6 @@ .include <bsd.port.pre.mk> POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \ - -DDEF_SAMPLE_DIR=\\\"${EXAMPLESDIR}\\\" \ -DDEF_DAEMON_DIR=\\\"${PREFIX}/libexec/postfix\\\" \ -DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" \ -DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" \ @@ -232,12 +230,13 @@ s!^(mailq_path =)!\1 ${PREFIX}/bin/mailq!g;\ s!^(setgid_group =)!\1 maildrop!g;\ s!^(manpage_directory =)!\1 ${PREFIX}/man!g;\ - s!^(sample_directory =)!\1 ${EXAMPLESDIR}!g;\ s!^((html|readme)_directory =)!\1 ${READMEDIR}!g;\ \!^\#alias_database = dbm:/etc/mail/aliases$$!d;\ s!/etc/aliases!/etc/mail/aliases!g;\ s!(:|= )/etc/postfix!\1$$config_directory!g;\ - s!/etc/postfix!${ETCDIR}!g; + s!/etc/postfix!${ETCDIR}!g;\ + s!^(sample_directory =)!\1 ${ETCDIR}!g;\ + s!($config_directory/(access|aliases|canonical|generic|header_checks|relocated|transport|virtual):f:root:-:644:)p1!\1o!; pre-patch: .if defined(POSTFIX_OPTIONS) @@ -308,13 +307,6 @@ @cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.jpg *.png ${DOCSDIR} && \ ${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}" .endif -.if !defined(NOPORTEXAMPLES) - ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m 555 -d ${EXAMPLESDIR} -.for f in ${PORTEXAMPLES} - ${INSTALL_DATA} ${WRKSRC}/conf/${f} ${EXAMPLESDIR} -.endfor - @${ECHO_MSG} "Installed configuration examples in ${EXAMPLESDIR}" -.endif post-install: @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/mail/postfix/pkg-plist,v retrieving revision 1.28 diff -u -r1.28 pkg-plist --- pkg-plist 26 May 2009 13:36:08 -0000 1.28 +++ pkg-plist 4 Jun 2009 04:57:19 -0000 @@ -1,13 +1,5 @@ -@unexec if cmp -s %D/%%EXAMPLESDIR%%/main.cf %D/%%ETCDIR%%/main.cf; then rm -f %D/%%ETCDIR%%/main.cf; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/master.cf %D/%%ETCDIR%%/master.cf; then rm -f %D/%%ETCDIR%%/master.cf; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/access %D/%%ETCDIR%%/access; then rm -f %D/%%ETCDIR%%/access; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/aliases %D/%%ETCDIR%%/aliases; then rm -f %D/%%ETCDIR%%/aliases; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/canonical %D/%%ETCDIR%%/canonical; then rm -f %D/%%ETCDIR%%/canonical; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/header_checks %D/%%ETCDIR%%/header_checks; then rm -f %D/%%ETCDIR%%/header_checks; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/relocated %D/%%ETCDIR%%/relocated; then rm -f %D/%%ETCDIR%%/relocated; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/transport %D/%%ETCDIR%%/transport; then rm -f %D/%%ETCDIR%%/transport; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/virtual %D/%%ETCDIR%%/virtual; then rm -f %D/%%ETCDIR%%/virtual; fi -@unexec if cmp -s %D/%%EXAMPLESDIR%%/generic %D/%%ETCDIR%%/generic; then rm -f %D/%%ETCDIR%%/generic; fi +@unexec if cmp -s %D/libexec/postfix/main.cf %D/%%ETCDIR%%/main.cf; then rm -f %D/%%ETCDIR%%/main.cf; fi +@unexec if cmp -s %D/libexec/postfix/master.cf %D/%%ETCDIR%%/master.cf; then rm -f %D/%%ETCDIR%%/master.cf; fi %%ETCDIR%%/LICENSE %%ETCDIR%%/TLS_LICENSE %%ETCDIR%%/bounce.cf.default Index: files/pkg-install.in =================================================================== RCS file: /home/ncvs/ports/mail/postfix/files/pkg-install.in,v retrieving revision 1.1 diff -u -r1.1 pkg-install.in --- files/pkg-install.in 26 May 2009 13:36:08 -0000 1.1 +++ files/pkg-install.in 4 Jun 2009 04:57:19 -0000 @@ -11,7 +11,6 @@ ETCDIR=${ETCDIR:=%%ETCDIR%%} DAEMONDIR=${DAEMONDIR:=${PREFIX}/libexec/postfix} READMEDIR=${READMEDIR:=%%READMEDIR%%} -EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%} BATCH=${BATCH:=no} POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no} @@ -115,13 +114,6 @@ fi if [ "$2" = "POST-INSTALL" ]; then - if [ -d ${EXAMPLESDIR} ]; then - for file in ${EXAMPLESDIR}/*; do - if [ ! -f ${ETCDIR}/${file#${EXAMPLESDIR}} ]; then - cp $file ${ETCDIR}/ - fi - done - fi /bin/sh ${DAEMONDIR}/post-install tempdir=/tmp \ daemon_directory=${DAEMONDIR} \ upgrade-package >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906040530.n545UrB1076203>