From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jul 10 16:40:15 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B25761065673 for ; Sun, 10 Jul 2011 16:40:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D88368FC1A for ; Sun, 10 Jul 2011 16:40:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6AGeENB075155 for ; Sun, 10 Jul 2011 16:40:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6AGeEEM075154; Sun, 10 Jul 2011 16:40:14 GMT (envelope-from gnats) Resent-Date: Sun, 10 Jul 2011 16:40:14 GMT Resent-Message-Id: <201107101640.p6AGeEEM075154@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, Olli Hauer Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1887F1065741; Sun, 10 Jul 2011 16:31:18 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from p578be941.dip0.t-ipconnect.de (p578be941.dip0.t-ipconnect.de [87.139.233.65]) by mx1.freebsd.org (Postfix) with ESMTP id AD9F78FC1A; Sun, 10 Jul 2011 16:31:17 +0000 (UTC) Received: by p578be941.dip0.t-ipconnect.de (Postfix, from userid 1100) id 2519420325; Sun, 10 Jul 2011 18:31:15 +0200 (CEST) Message-Id: <20110710163115.2519420325@p578be941.dip0.t-ipconnect.de> Date: Sun, 10 Jul 2011 18:31:15 +0200 (CEST) From: Olli Hauer To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: sahil@FreeBSD.org Subject: ports/158765: [patch] mail/postfix update to 2.8.4 plus use ports framework for groups/users X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Olli Hauer List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2011 16:40:15 -0000 >Number: 158765 >Category: ports >Synopsis: [patch] mail/postfix update to 2.8.4 plus use ports framework for groups/users >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Jul 10 16:40:14 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Olli Hauer >Release: >Organization: >Environment: >Description: - update to postfix 2.8.4 - use ports framework to create groups/user I removed also the replace() function from pkg-install since I couldn't find a reference for it. ports/GIDs was already extended by me. >How-To-Repeat: >Fix: --- postfix.diff begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/mail/postfix/Makefile,v retrieving revision 1.171 diff -u -r1.171 Makefile --- Makefile 9 May 2011 13:11:13 -0000 1.171 +++ Makefile 10 Jul 2011 16:19:16 -0000 @@ -6,7 +6,7 @@ # PORTNAME= postfix -PORTVERSION= 2.8.3 +PORTVERSION= 2.8.4 PORTEPOCH= 1 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \ @@ -29,6 +29,8 @@ IS_INTERACTIVE= yes .endif +USERS= postfix +GROUPS= mail maildrop postfix MAKE_JOBS_SAFE= yes USE_SUBMAKE= yes USE_PERL5_BUILD=yes @@ -348,9 +350,6 @@ CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \ ${ECHO} "all: default" >> Makefile) -pre-su-install: - @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - do-install: @cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \ config_directory=${ETCDIR} \ Index: distinfo =================================================================== RCS file: /home/pcvs/ports/mail/postfix/distinfo,v retrieving revision 1.117 diff -u -r1.117 distinfo --- distinfo 9 May 2011 13:11:13 -0000 1.117 +++ distinfo 10 Jul 2011 16:19:16 -0000 @@ -1,5 +1,5 @@ -SHA256 (postfix/postfix-2.8.3.tar.gz) = 288267caede6ea1c4f155855395aa957998909a4968af431b8057062f7d60b49 -SIZE (postfix/postfix-2.8.3.tar.gz) = 3645105 +SHA256 (postfix/postfix-2.8.4.tar.gz) = 979a85b06de1a85be121bfb685e590da9a1441b08b16a89a5e4abc7f1de29df5 +SIZE (postfix/postfix-2.8.4.tar.gz) = 3646391 SHA256 (postfix/postfix-2.8.0-libspf2-1.2.x-0.patch.gz) = e5c38e5bc226cab109c02a4e530ab1aefd3bb06f2169f3e052bdf83d2727aacc SIZE (postfix/postfix-2.8.0-libspf2-1.2.x-0.patch.gz) = 8191 SHA256 (postfix/postfix-vda-v10-2.8.1.patch) = 13ca7430b68dc19e21ee26c1c1109e1527a656777fa2f224cd3ce2d594435f12 Index: files/pkg-install.in =================================================================== RCS file: /home/pcvs/ports/mail/postfix/files/pkg-install.in,v retrieving revision 1.4 diff -u -r1.4 pkg-install.in --- files/pkg-install.in 27 Nov 2010 06:48:50 -0000 1.4 +++ files/pkg-install.in 10 Jul 2011 16:19:16 -0000 @@ -56,63 +56,6 @@ done } -if [ "$2" = "PRE-INSTALL" ]; then - USER=postfix - UID=125 - GROUP=postfix - GID=125 - GROUP2=maildrop - GID2=126 - - if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then - echo "You already have a group \"${GROUP2}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}; then - echo "Added group \"${GROUP2}\"." - else - echo "Adding group \"${GROUP2}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/spool/postfix -s ${NOLOGIN} -c "Postfix Mail System"; then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then - echo "You already have user \"${USER}\" in group \"mail\", so I will use it." - else - echo "You need user \"${USER}\" added to group \"mail\"." - if yesno "Would you like me to add it" y; then - /usr/sbin/pw groupmod mail -m ${USER} || exit - echo "Done." - else - echo "Please create it, and try again." - exit 1 - fi - fi -fi if [ "$2" = "POST-INSTALL" ]; then SAMPLES="main.cf master.cf" @@ -130,19 +73,6 @@ upgrade-package fi -replace() { - local orig repl - - orig=$1 - repl=$2 - if [ -e ${orig} ]; then - /bin/mv -f ${orig} ${orig}.OFF - /bin/chmod 0 ${orig}.OFF - fi - if [ -e ${repl} ]; then - /bin/ln -s ${repl} ${orig} - fi -} if [ "$2" = "POST-INSTALL" -a -z "${PACKAGE_BUILDING}" ]; then egrep -q "^sendmail.*${PREFIX}/sbin/sendmail" ${MC} && \ --- postfix.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: