[csw-devel] SF.net SVN: gar:[7995] csw/mgar/pkg/postfix/branches/postfix-2.6

skayser at users.sourceforge.net skayser at users.sourceforge.net
Thu Jan 14 01:00:53 CET 2010


Revision: 7995
          http://gar.svn.sourceforge.net/gar/?rev=7995&view=rev
Author:   skayser
Date:     2010-01-14 00:00:53 +0000 (Thu, 14 Jan 2010)

Log Message:
-----------
postfix: on the way towards a 2.6.x package

Modified Paths:
--------------
    csw/mgar/pkg/postfix/branches/postfix-2.6/Makefile
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/upgrade

Added Paths:
-----------
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.checkinstall
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/changelog.CSW
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/cswusergroup

Removed Paths:
-------------
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.cswusergroup
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.depends
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.gspec
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.postinstall
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.postremove
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/cswpostfix.xml
    csw/mgar/pkg/postfix/branches/postfix-2.6/files/fix_main.cf.sed

Modified: csw/mgar/pkg/postfix/branches/postfix-2.6/Makefile
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/Makefile	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/Makefile	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,27 +1,19 @@
-# Status
-# - Build with all activated features completes, packaging completes
-# - Beware: uses a modified GARv2 for USERGROUP=
-#   http://lists.opencsw.org/pipermail/maintainers/2009-July/003143.html
-# - Fixed bugs:
-#   #3580 Not sun4m compatible 
-#         $(CFLAGS) are now incorporated into $(CCARGS)
-#   #3063 /opt/csw/libexec/postfix not stripped, takes ~30MB 
-#         $(STRIP_DIRS) added to build description
-#   #3017 Please depend against CSWpcrert instead of CSWpcre 
-#   #2843 No cyrus-sasl support
-#         Added cyrus SASL support, link postfix against the same 
-#         bdb version that CSWsasl uses.
-# - Moved queue and data dirs to /var/opt/csw (see DDEFs) as per standard
-# - Integrated CSWcswclassutils for user/group creation, configuration
-#   file handling, and SMF / init script support
-# 
-# TODO
-# - Check remaining open bugs
-# - Check sed main.cf script functionality
-# - Check update script functionality, add handling for spool location change
-# - Do we need to take care of file ownerships?
-# - Does the currently available package preserve configuration files on
+# TODO (release-critical prefixed with !, non release-critical with *)
+# ! Obsolete postinstall scripts:
+#   #3060 http://www.opencsw.org/bugtrack/view.php?id=3060
+#   #2964 http://www.opencsw.org/bugtrack/view.php?id=2964
+#   #1943 http://www.opencsw.org/bugtrack/view.php?id=1943
+# ! Handle spool location change (bail out and force user interaction?)
+# ! Handle system integration (refer to README.CSW or alike), see
+#   http://article.gmane.org/gmane.os.solaris.opencsw.maintainers/5313
+# ! Does the currently available package preserve configuration files on
 #   removal?
+# ! Update to most recent postfix version (2.6.5 as of 13th Jan 2010)
+# ! Verify CONFIG_FILES list (can this be generated on the fly?)
+# ! Ship simple default configuration
+# ! Build, install and test package (works? spool permissions ok?)
+#   WRT to permissions, run "postfix set-permissions" and compare
+#
 GARNAME = postfix
 GARVERSION = 2.6.2
 CATEGORIES = server
@@ -37,34 +29,63 @@
   completely different.
 endef
 
+VENDOR_URL   = http://www.postfix.org
 MASTER_SITES = ftp://ftp.porcupine.org/mirrors/postfix-release/official/
-DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
+DISTFILES    = $(GARNAME)-$(GARVERSION).tar.gz
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
-SPKG_SOURCEURL = http://www.postfix.org
 
-# Conflicting files (bin/mailq and bin/sendmail) in sendmail
-INCOMPATIBLE_PKGS = CSWsendmail
+DISTFILES += CSWpostfix.checkinstall
 
-DISTFILES += CSWpostfix.cswusergroup
-DISTFILES += CSWpostfix.postinstall
-DISTFILES += CSWpostfix.postremove
+# Tag configuration files for handling via cswclassutils
+CONFIG_BASE   = /etc/opt/csw/postfix/
+CONFIG_FILES  = access 
+CONFIG_FILES += aliases
+CONFIG_FILES += canonical
+CONFIG_FILES += generic
+CONFIG_FILES += header_checks
+CONFIG_FILES += main.cf
+CONFIG_FILES += master.cf
+CONFIG_FILES += relocated
+CONFIG_FILES += transport
+CONFIG_FILES += virtual
+SAMPLECONF    = $(addprefix $(CONFIG_BASE), $(CONFIG_FILES))
 
-# Tag files for cswclassutils
-CONFIG_BASE  = /etc/opt/csw/postfix/
-CONFIG_FILES  = access aliases canonical generic header_checks
-CONFIG_FILES += main.cf master.cf relocated transport virtual
-
-SAMPLECONF  = $(addprefix $(CONFIG_BASE), $(CONFIG_FILES))
 INITSMF     = /etc/opt/csw/init.d/cswpostfix
 USERGROUP   = $(sysconfdir)/pkg/CSWpostfix/cswusergroup
 
+# Make postdrop setgid so that it can deliver to $(DEF_QUEUE_DIR)/maildrop
+PROTOTYPE_MODIFIERS = makesgid
+PROTOTYPE_FILES_makesgid = $(sbindir)/postdrop
+PROTOTYPE_PERMS_makesgid = 2755
+
+# Make $(DEF_QUEUE_DIR) subdirs accessible/writable to postfix only
+PROTOTYPE_MODIFIERS += spooldir
+PROTOTYPE_FILES_spooldir = $(DEF_QUEUE_DIR)/*
+PROTOTYPE_USER_spooldir  = postfix
+PROTOTYPE_PERMS_spooldir = 0700
+PROTOTYPE_CLASS_spooldir = ugfiles
+
+# Make $(DEF_QUEUE_DIR)/maildrop accessible by postdrop group
+PROTOTYPE_MODIFIERS += maildrop
+PROTOTYPE_FILES_maildrop = $(DEF_QUEUE_DIR)/maildrop
+PROTOTYPE_GROUP_maildrop = postdrop
+PROTOTYPE_PERMS_maildrop = 0730
+PROTOTYPE_CLASS_maildrop = ugfiles
+
+# IMPORTANT! Make $(DEF_QUEUE_DIR)/pid accessible by root only
+# http://www.openwall.com/lists/oss-security/2009/09/18/6
+PROTOTYPE_MODIFIERS += pid
+PROTOTYPE_FILES_pid = $(DEF_QUEUE_DIR)/pid
+PROTOTYPE_USER_pid  = root
+PROTOTYPE_GROUP_pid = bin
+PROTOTYPE_PERMS_pid = 0755
+PROTOTYPE_CLASS_pid = ugfiles
+
 EXTRA_MERGE_EXCLUDE_FILES  = /etc/opt/csw/postfix/LICENSE
-EXTRA_MERGE_EXCLUDE_FILES += /etc/opt/csw/postfix/TLS_LICENSE
 EXTRA_MERGE_EXCLUDE_FILES += /etc/opt/csw/postfix/makedefs.out
 
 STRIP_DIRS = $(DESTDIR)$(libexecdir)/postfix
 
-
 CONFIGURE_SCRIPTS = custom
 TEST_SCRIPTS      =
 INSTALL_SCRIPTS   = custom
@@ -188,20 +209,9 @@
 		readme_directory=$(DEF_README_DIR) \
 		html_directory=$(DEF_HTML_DIR)
 
-	# XXX: Needs to be checked/revised for current version
-	sed -f $(FILEDIR)/fix_main.cf.sed $(DESTDIR)/etc/opt/csw/postfix/main.cf > $(WORKDIR)/main.cf
-	cp $(WORKDIR)/main.cf $(DESTDIR)/etc/opt/csw/postfix/main.cf
-
-	# Script to handle the sysconfdir location change /opt -> /etc
-	# XXX: Needs to be checked and amended with /opt -> /var changes
-	ginstall -D -m 755 $(FILEDIR)/upgrade \
-		$(DESTDIR)/opt/csw/share/postfix/upgrade
-
 	# Files for cswinitsmf and cswusergroup
 	ginstall -Dm 755 $(FILEDIR)/cswpostfix  \
 		$(DESTDIR)/etc/opt/csw/init.d/cswpostfix
-	ginstall -D $(FILEDIR)/cswpostfix.xml \
-		$(DESTDIR)/var/opt/csw/svc/manifest/network/cswpostfix.xml"
-	ginstall -D $(FILEDIR)/CSWpostfix.cswusergroup \
+	ginstall -D $(FILEDIR)/cswusergroup \
 		$(DESTDIR)$(sysconfdir)/pkg/CSWpostfix/cswusergroup
 	@$(MAKECOOKIE)

Added: csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.checkinstall
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.checkinstall	                        (rev 0)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.checkinstall	2010-01-14 00:00:53 UTC (rev 7995)
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Copied from the CSWcupsd.preinstall script (obsolete_dir_file_name adjusted)
+# https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/cups/trunk/files/CSWcupsd.preinstall
+#
+# $Id$
+#
+
+set -u
+
+PKG_INSTALL_ROOT="${PKG_INSTALL_ROOT:-}"
+readonly PKG_INSTALL_ROOT
+
+obsolete_directories="/opt/csw/etc/postfix:/etc/opt/csw/postfix"
+
+obsolete_dir_information="
+This directory is obsolete.  Files in this directory are going to be ignored.
+Please move your data to the new location.
+
+Feel free to remove this file afterwards.
+"
+obsolete_dir_file_name="README.THIS_DIRECTORY_IS_OBSOLETE"
+
+for dirpair in ${obsolete_directories}; do
+  obsolete_dir=`echo ${dirpair} | cut -d: -f1`
+  new_dir=`echo ${dirpair} | cut -d: -f2`
+  if [ -d "${PKG_INSTALL_ROOT}/${obsolete_dir}" ]; then
+    echo
+    echo "*******************************************************************"
+    echo "* The old configuration directory ${obsolete_dir} still exists.    "
+    echo "* Please move your configuration to ${new_dir}.                    "
+    echo "*                                                                  "
+    echo "*       Installation will continue in 10 seconds.                  "
+    echo "*         Press CTRL+C if you want to stop now.                    "
+    echo "*******************************************************************"
+    echo
+    sleep 10
+
+    # Leaving a note for the sysadmin if the they proceed with the installation.
+    fn="${PKG_INSTALL_ROOT}/${obsolete_dir}/${obsolete_dir_file_name}"
+    if touch "${fn}" 2>/dev/null; then
+      echo "${obsolete_dir_information}" > "${fn}"
+    fi
+  fi
+done
+
+exit 0

Deleted: csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.cswusergroup
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.cswusergroup	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.cswusergroup	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,2 +0,0 @@
-:postdrop:::::
-postfix:postfix:Postfix Daemon:/var/opt/csw/spool/postfix:/usr/bin/pfsh::

Deleted: csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.depends
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.depends	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.depends	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,9 +0,0 @@
-CSWbdb3 berkeleydb3 - file based pseudo-database library
-CSWcommon common - common files and dirs for CSW packages
-CSWlibpq libpq - libraries needed by postgresql server and clients
-CSWmysql4rt mysql4rt - run-time libraries for mysql4
-CSWoldaprt openldap_rt - OpenLDAP runtime libraries (oldaprt)
-CSWosslrt openssl_rt - Openssl runtime libraries
-CSWpcre pcre - Perl-compatible regular expression library
-CSWsasl sasl - Simple Authentication and Security Layer
-CSWzlib zlib - Zlib Data Compression Library

Deleted: csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.gspec
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.gspec	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.gspec	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,7 +0,0 @@
-%var            bitname postfix
-%var            pkgname CSWpostfix
-%include        url file://%{PKGLIB}/csw_dyndepend.gspec
-%copyright      url file://%{WORKSRC}/LICENSE
-%include        url file://%{PKGLIB}/csw_class_conf/gspec
-%include        url file://%{PKGLIB}/csw_usrgrp.gspec
-%include        url file://%{PKGLIB}/smf_enabled.gspec

Deleted: csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.postinstall
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.postinstall	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.postinstall	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,48 +0,0 @@
-#!/bin/sh
-#
-# do we replace /usr/lib/sendmail, /usr/bin/newaliases, and /usr/bin/mailq?
-# this depends on whether the .OFF files exist. if the .OFF does NOT exist
-# then we replace, but if both exist then it's likely that either CSWsendmail
-# CSWexim or CSWpostfix are installed, in which case we don't replace.
-#
-
-if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR="/" ; fi
-
-PF_ACTION=replace
-
-if [ -f /usr/lib/sendmail ]; then
- if [ -f /usr/lib/sendmail.OFF ]; then
-  printf "It would appear that /usr/lib/sendmail.OFF already exists!\n"
-  printf "CSWpostfix will NOT configure itself as the default MTA.\n"
-  PF_ACTION=leave
- else
-  printf "CSWpostfix is renaming /usr/lib/sendmail, /usr/bin/newaliases\n"
-  printf "and /usr/bin/mailq to *.OFF.\n"
-  PF_ACTION=replace
- fi
-else
- PF_ACTION=leave
-fi
-
-if [ $PF_ACTION = "replace" ]; then
-#  printf "Stopping sendmail\n"
-#  /usr/sbin/chroot $PKG_ROOT_DIR /etc/init.d/sendmail stop
-
-  printf "Turning off /usr/lib/sendmail to enable the Postfix version\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/mv /usr/lib/sendmail /usr/lib/sendmail.OFF
-
-  printf "Turning off /usr/bin/newaliases to enable the Postfix version\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/mv /usr/bin/newaliases /usr/bin/newaliases.OFF
-
-  printf "Turning off /usr/bin/mailq to enable the Postfix version\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/mv /usr/bin/mailq /usr/bin/mailq.OFF
-
-  printf "Linking /usr/lib/sendmail to /opt/csw/sbin/postfix\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/ln -s /opt/csw/sbin/sendmail /usr/lib/sendmail
-
-  printf "Linking /usr/bin/newaliases to /opt/csw/bin/newaliases\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/ln -s /opt/csw/bin/newaliases /usr/bin/newaliases
-
-  printf "Linking /usr/bin/mailq to /opt/csw/bin/mailq\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/ln -s /opt/csw/bin/mailq /usr/bin/mailq
-fi

Deleted: csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.postremove
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.postremove	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.postremove	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# but back sendmail, newaliases, and mailq
-
-if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR="/" ; fi
-
-if [ -f /usr/lib/sendmail.OFF ]; then
-  printf "Reinstalling original /usr/lib/sendmail\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/mv /usr/lib/sendmail.OFF /usr/lib/sendmail
-fi
-
-if [ -f /usr/bin/newaliases.OFF ]; then
-  printf "Reinstalling original /usr/bin/newaliases\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/mv /usr/bin/newaliases.OFF /usr/bin/newaliases
-fi
-
-if [ -f /usr/bin/mailq.OFF ]; then
-  printf "Reinstalling original /usr/bin/mailq\n"
-  /usr/sbin/chroot $PKG_ROOT_DIR /usr/bin/mv /usr/bin/mailq.OFF /usr/bin/mailq
-fi

Added: csw/mgar/pkg/postfix/branches/postfix-2.6/files/changelog.CSW
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/changelog.CSW	                        (rev 0)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/changelog.CSW	2010-01-14 00:00:53 UTC (rev 7995)
@@ -0,0 +1,11 @@
+postfix (2.6.2,REV=2010.01.13)
+
+  * Updated to 2.6.2. (Closes #3580, #3700, #3970)
+  * Moved spool directory to /var/opt/csw/spool/postfix. (Closes #3946)
+  * Added Cyrus SASL support. (Closes #2843)
+  * Added hash table support via bdb. (Closes #2097)
+  * Init / SMF handling now done with cswclassutils. (Closes #3946)
+  * Now depends on pcre_rt instead of pcre. (Closes #3017)
+  * Binaries in /opt/csw/libexec/postfix are now stripped. (Closes #3063)
+
+ -- Sebastian Kayser <skayser at opencsw.org>  Wed, 13 Jan 2010 22:01:36 +0100

Deleted: csw/mgar/pkg/postfix/branches/postfix-2.6/files/cswpostfix.xml
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/cswpostfix.xml	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/cswpostfix.xml	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,76 +0,0 @@
-<!--
-    $Id: postfix.xml,v 1.1 2007/05/23 05:31:25 sstallion Exp $
-
-    Postfix MTA Service Manifest
-
-    Original Author: Steven Stallion
-    Blastwave adjustments: Trygve Laugstol
-    Version: $Revision: 1.1 $, $Date: 2007/05/23 05:31:25 $
--->
-<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
-
-<service_bundle type='manifest' name='CSWpostfix:postfix'>
-    <service name='network/smtp/postfix' type='service' version='1'>
-
-        <create_default_instance enabled='false'/>
-        
-        <single_instance/>
-
-        <dependency
-            name='multi-user'
-            grouping='require_all'
-            restart_on='error'
-            type='service'>
-            <service_fmri value='svc:/milestone/multi-user'/>
-        </dependency>
-        
-        <dependency
-            name='nfs'
-            grouping='optional_all'
-            restart_on='error'
-            type='service'>
-            <service_fmri value='svc:/network/nfs/client'/>
-        </dependency>
-        
-        <exec_method
-            name='start'
-            type='method'
-            exec='/opt/csw/lib/svc/method/svc-cswpostfix start'
-            timeout_seconds='30'>
-        </exec_method>
-        
-        <exec_method
-            name='stop'
-            type='method'
-            exec='/opt/csw/lib/svc/method/svc-cswpostfix stop'
-            timeout_seconds='30'>
-        </exec_method>
-
-        <exec_method
-            name='refresh'
-            type='method'
-            exec='/opt/csw/lib/svc/method/svc-cswpostfix refresh'
-            timeout_seconds='30'>
-        </exec_method>        
-
-        <exec_method
-            name='restart'
-            type='method'
-            exec='/opt/csw/lib/svc/method/svc-cswpostfix refresh'
-            timeout_seconds='30'>
-        </exec_method>        
-        <stability value='Unstable'/>
-        
-        <template>
-            <common_name>
-                <loctext xml:lang='C'>Postfix MTA</loctext>
-            </common_name>
-            <documentation>
-                <manpage 
-                    title='postfix' 
-                    section='1'
-                    manpath='/opt/csw/share/man'/>
-            </documentation>
-        </template>
-    </service>
-</service_bundle>

Copied: csw/mgar/pkg/postfix/branches/postfix-2.6/files/cswusergroup (from rev 7993, csw/mgar/pkg/postfix/branches/postfix-2.6/files/CSWpostfix.cswusergroup)
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/cswusergroup	                        (rev 0)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/cswusergroup	2010-01-14 00:00:53 UTC (rev 7995)
@@ -0,0 +1,2 @@
+:postdrop:::::
+postfix:postfix:Postfix daemon user:/var/opt/csw/spool/postfix:/usr/bin/pfsh::

Deleted: csw/mgar/pkg/postfix/branches/postfix-2.6/files/fix_main.cf.sed
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/fix_main.cf.sed	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/fix_main.cf.sed	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,10 +0,0 @@
-# Remove 'fix' from previous runs to prevent duplicates
-/^alias_maps =/d
-/^alias_database =/d
-
-# These will work as long as the template configuration file doesn't change too much
-/alias_maps = netinfo:.aliases/ a\
-alias_maps = dbm:/etc/opt/csw/postfix/aliases
-
-/alias_database = .*hash:.opt.majordomo.aliases$/ a\
-alias_database = dbm:/etc/opt/csw/postfix/aliases

Modified: csw/mgar/pkg/postfix/branches/postfix-2.6/files/upgrade
===================================================================
--- csw/mgar/pkg/postfix/branches/postfix-2.6/files/upgrade	2010-01-13 20:40:54 UTC (rev 7994)
+++ csw/mgar/pkg/postfix/branches/postfix-2.6/files/upgrade	2010-01-14 00:00:53 UTC (rev 7995)
@@ -1,21 +1,46 @@
 #!/bin/sh
+# Copied from the CSWcupsd.preinstall script (obsolete_dir_file_name adjusted)
+# https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/cups/trunk/files/CSWcupsd.preinstall
+#
+# $Id$
+#
 
-old=/opt/csw/etc/postfix
-new=/etc/opt/csw/postfix
+set -u
 
-if [ ! -d $old ]
-then
-  echo "No old configuration exist: $old" > /dev/stderr
-  exit 1
-fi
+PKG_INSTALL_ROOT="${PKG_INSTALL_ROOT:-}"
+readonly PKG_INSTALL_ROOT
 
-echo "Copying current configuration files from $old to new location $new"
-  
-( cd $old; find . -type f ) | grep -v CSW$ | while read f; do
-  # Create the parent directory
-  dir=`dirname $f`
-  [ ! -d $new/$dir ] && mkdir -p $new/$dir
+obsolete_directories="/opt/csw/etc/postfix:/etc/opt/csw/postfix"
 
-  # Copy over the new file
-  cp -p $old/$f $new/$f
+obsolete_dir_information="
+This directory is obsolete.  Files in this directory are going to be ignored.
+Please move your data to the new location.
+
+Feel free to remove this file afterwards.
+"
+obsolete_dir_file_name="README.THIS_DIRECTORY_IS_OBSOLETE"
+
+for dirpair in ${obsolete_directories}; do
+  obsolete_dir=`echo ${dirpair} | cut -d: -f1`
+  new_dir=`echo ${dirpair} | cut -d: -f2`
+  if [ -d "${PKG_INSTALL_ROOT}/${obsolete_dir}" ]; then
+    echo
+    echo "*******************************************************************"
+    echo "* The old configuration directory ${obsolete_dir} still exists.    "
+    echo "* Please move your configuration to ${new_dir}.                    "
+    echo "*                                                                  "
+    echo "*       Installation will continue in 10 seconds.                  "
+    echo "*         Press CTRL+C if you want to stop now.                    "
+    echo "*******************************************************************"
+    echo
+    sleep 10
+
+    # Leaving a note for the sysadmin if the they proceed with the installation.
+    fn="${PKG_INSTALL_ROOT}/${obsolete_dir}/${obsolete_dir_file_name}"
+    if touch "${fn}" 2>/dev/null; then
+      echo "${obsolete_dir_information}" > "${fn}"
+    fi
+  fi
 done
+
+exit 0


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list