Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2018 14:18:08 +0000 (UTC)
From:      Ben Woods <woodsb02@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r486092 - in head/mail/mailman: . files
Message-ID:  <201811281418.wASEI8FP011769@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: woodsb02
Date: Wed Nov 28 14:18:08 2018
New Revision: 486092
URL: https://svnweb.freebsd.org/changeset/ports/486092

Log:
  mail/mailman: Use .conf suffix for /usr/local/etc/newsyslog.conf.d/
  
  - Rename the files installed to /usr/local/etc/newsyslog.conf.d/ to end
    with a '.conf' suffix.
  - Add pkg-install script to automatically move any copies of the old
    newsyslog file to the new location if the new file is unmodified from the default,
    or print a warning if it the new file has been modified.
  - Add a note to UPDATING and pkg-message to warn users of this, in case
    they are using provisioning/configuration management tools which need
    to be modified. Note the UPDATING entry was committed in r485721.
  
  Recent changes to /etc/newsyslog.conf (r340318) will only include files
  from the /usr/local/etc/newsyslog.conf.d/ directory which end with
  '.conf' and do not beginning with a '.' character.
  
  Reviewed by:	mat
  Approved by:	mandree (maintainer)
  Differential Revision:	https://reviews.freebsd.org/D17088

Modified:
  head/mail/mailman/Makefile
  head/mail/mailman/files/pkg-install.in
  head/mail/mailman/files/pkg-message.in
  head/mail/mailman/pkg-plist

Modified: head/mail/mailman/Makefile
==============================================================================
--- head/mail/mailman/Makefile	Wed Nov 28 14:06:02 2018	(r486091)
+++ head/mail/mailman/Makefile	Wed Nov 28 14:18:08 2018	(r486092)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mailman
 DISTVERSION=	2.1.29
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	mail
 MASTER_SITES=	GNU \
 		SF/${PORTNAME}/Mailman%202.1%20%28stable%29/${PORTVERSION} \

Modified: head/mail/mailman/files/pkg-install.in
==============================================================================
--- head/mail/mailman/files/pkg-install.in	Wed Nov 28 14:06:02 2018	(r486091)
+++ head/mail/mailman/files/pkg-install.in	Wed Nov 28 14:18:08 2018	(r486092)
@@ -30,6 +30,23 @@ add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
 _EOF
 }
 
+move_newsyslog_conf() {
+    oldfile=${PKG_PREFIX}/etc/newsyslog.conf.d/mailman.newsyslog
+    newfile=${PKG_PREFIX}/etc/newsyslog.conf.d/mailman.conf
+    samplefile=${PKG_PREFIX}/share/examples/mailman/mailman.newsyslog.sample
+    if [ -f ${oldfile} ]; then
+	echo "Configuration file found in old location: ${oldfile}"
+	if cmp -s ${samplefile} ${newfile} > /dev/null; then
+	    echo "Configuration file in new location has not been modified from the default: ${newfile}"
+	    echo " => Moving old configuration file to new location"
+	    mv -f ${oldfile} ${newfile}
+	else
+	    echo "Configuration file in new location has been modified from the default: ${newfile}"
+	    echo " => You should either delete the old file, or move it to the new location"
+	fi
+    fi
+}
+
 set -e
 MYTMP="$(mktemp -d "${TMPDIR-/tmp}/mminstall.XXXXXXXXXX")"
 trap "rm -rf \"$MYTMP\"" EXIT
@@ -39,6 +56,8 @@ POST-INSTALL)
   echo "---> Starting post-install script"
   LC_ALL=C
   export LC_ALL
+
+  move_newsyslog_conf
 
  # fix up permissions - this is under investigation; pkg or libarchive
   # goof up the group writable and/or setgid bits

Modified: head/mail/mailman/files/pkg-message.in
==============================================================================
--- head/mail/mailman/files/pkg-message.in	Wed Nov 28 14:06:02 2018	(r486091)
+++ head/mail/mailman/files/pkg-message.in	Wed Nov 28 14:18:08 2018	(r486092)
@@ -63,3 +63,19 @@ UPDATE INFORMATION FOR UPDATES OF 2.1.18/OLDER TO VERS
       have a logrotate process that creates new log files instead of letting
       Mailman create them, you will need to address that.  (LP: #1327404)
 ----------------------------------------------------------------------------
+
+********************************************************************
+The mailman newsyslog.conf(5) filename has been changed:
+  OLD: ${PREFIX}/etc/newsyslog.conf.d/mailman.newsyslog
+  NEW: ${PREFIX}/etc/newsyslog.conf.d/mailman.conf
+
+Any file found at the old location has been automatically moved to
+the new location. This was done to ensure log rotation continued to
+work after change r340318 made to FreeBSD base, where the default
+newsyslog configuration now only includes filenames that end with
+'.conf' and do not begin with '.'.
+
+If you use provisioning/configuration management tools to create or
+edit this file, you will need to change their configuration to use
+the new filename.
+********************************************************************

Modified: head/mail/mailman/pkg-plist
==============================================================================
--- head/mail/mailman/pkg-plist	Wed Nov 28 14:06:02 2018	(r486091)
+++ head/mail/mailman/pkg-plist	Wed Nov 28 14:18:08 2018	(r486092)
@@ -1,7 +1,7 @@
 @postunexec if cmp -s %D/%%MMDIR%%/Mailman/mm_cfg.py %D/%%MMDIR%%/Mailman/mm_cfg.py.dist; then rm -f %D/%%MMDIR%%/Mailman/mm_cfg.py; fi
 @postunexec rm -f %D/%%MMDIR%%/Mailman/mm_cfg.pyc
 @dir etc/newsyslog.conf.d
-@sample %%EXAMPLESDIR%%/mailman.newsyslog.sample etc/newsyslog.conf.d/mailman.newsyslog
+@sample %%EXAMPLESDIR%%/mailman.newsyslog.sample etc/newsyslog.conf.d/mailman.conf
 %%IMGDIR%%/mailman-large.jpg
 %%IMGDIR%%/gnu-head-tiny.jpg
 %%IMGDIR%%/mailman.jpg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811281418.wASEI8FP011769>