[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Update: sysutils/mergemaster



This catches up with the last 14 months of changes to the FreeBSD script.

CAREFUL!  This update has seen very little testing yet.  In particular
I haven't played with any of the new or less ordinary features.  Be sure
to back up your /etc before running it.

-- 
Christian "naddy" Weisgerber                     naddy@unix-ag.uni-kl.de
Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/mergemaster/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	29 Dec 2002 20:19:10 -0000	1.6
+++ Makefile	11 May 2003 00:35:13 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=	"aids with merging configuration files during an upgrade"
 
-DISTNAME=	mergemaster-1.26
+DISTNAME=	mergemaster-1.46
 CATEGORIES=	sysutils
 
 MAINTAINER=	Christian Weisgerber <naddy@openbsd.org>
@@ -13,8 +13,7 @@
 PERMIT_DISTFILES_CDROM=	Yes
 PERMIT_DISTFILES_FTP=	Yes
 
-MASTER_SITES=	http://sites.inka.de/mips/unix/distfiles/ \
-		ftp://rt.fm/pub/mergemaster/
+MASTER_SITES=	http://grappa.unix-ag.uni-kl.de/~naddy/
 
 NO_BUILD=	Yes
 NO_REGRESS=	Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/mergemaster/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo	12 Feb 2002 16:22:04 -0000	1.2
+++ distinfo	11 May 2003 00:35:13 -0000
@@ -1,3 +1,3 @@
-MD5 (mergemaster-1.26.tar.gz) = ac260e064bfcba6f302b384a2aacac76
-RMD160 (mergemaster-1.26.tar.gz) = b5b219f2f4034c1e70968da25dd291aea8fa138d
-SHA1 (mergemaster-1.26.tar.gz) = d4f5251aa67288c15471de64b2b647f883cacb4d
+MD5 (mergemaster-1.46.tar.gz) = b65605fa905517363d4138c383e9bf94
+RMD160 (mergemaster-1.46.tar.gz) = 5c233ebec55e7f662a76ee7663b3013233f4aa70
+SHA1 (mergemaster-1.46.tar.gz) = d60f962bcd2a12636709c7586cf3ce62f59c6bcd
Index: patches/patch-mergemaster_8
===================================================================
RCS file: /cvs/ports/sysutils/mergemaster/patches/patch-mergemaster_8,v
retrieving revision 1.3
diff -u -r1.3 patch-mergemaster_8
--- patches/patch-mergemaster_8	12 Feb 2002 16:22:05 -0000	1.3
+++ patches/patch-mergemaster_8	11 May 2003 00:35:13 -0000
@@ -1,8 +1,8 @@
 $OpenBSD: patch-mergemaster_8,v 1.3 2002/02/12 16:22:05 naddy Exp $
---- mergemaster.8.orig	Tue Feb 12 14:28:36 2002
-+++ mergemaster.8	Tue Feb 12 14:42:06 2002
-@@ -44,7 +44,7 @@
- is a Bourne shell script which is designed to aid you
+--- mergemaster.8.orig	Sat May 10 16:06:02 2003
++++ mergemaster.8	Sat May 10 18:17:03 2003
+@@ -45,7 +45,7 @@ The
+ utility is a Bourne shell script which is designed to aid you
  in updating the various configuration and other files
  associated with
 -.Fx .
@@ -10,7 +10,7 @@
  It is
  .Sy HIGHLY
  recommended that you back up your
-@@ -81,13 +81,13 @@ By default it creates the temporary root
+@@ -82,13 +82,13 @@ By default it creates the temporary root
  .Pa /var/tmp/temproot
  and compares the
  .Xr cvs 1
@@ -26,8 +26,8 @@
 +also specify that the script ignore the $OpenBSD strings and
  compare every file.
  .Pp
- .Nm
-@@ -159,6 +159,13 @@ on a previously cleaned directory, skipp
+ The merge menu option is designed to let you easily combine your
+@@ -168,6 +168,13 @@ on a previously cleaned directory, skipp
  the temporary root environment.
  This option is compatible
  with all other options.
@@ -41,11 +41,37 @@
  .It Fl v
  Be more verbose about the process.
  You should probably use
-@@ -329,9 +336,9 @@ with all values commented out:
+@@ -197,14 +204,12 @@ destination directory.
+ .It Fl p
+ Pre-buildworld mode.
+ Compares only files known to be essential to the success of
+-{build|install}world,
+-including
+-.Pa /etc/make.conf .
++.Dq make build .
+ .It Fl C
+ After a standard
+ .Nm
+ run,
+-compares your rc.conf[.local] options to the defaults.
++compares your rc.conf.local options to the defaults.
+ .It Fl P
+ Preserve files that you replace in
+ .Pa /var/tmp/mergemaster/preserved-files-<date> ,
+@@ -317,7 +322,7 @@ with all values commented out:
+ #DIFF_FLAG='-u'
+ #
+ # Additional options for diff.  This will get unset when using -s.
+-#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]'	# Ignores CVS Id tags
++#DIFF_OPTIONS='-I$\&OpenBSD:.*[$]'	# Ignores CVS Id tags
+ #
+ # Verbose mode includes more details and additional checks
+ #VERBOSE=
+@@ -366,9 +371,9 @@ with all values commented out:
  .Pp
  .Pa /usr/src/etc/Makefile
  .Rs
--.%O http://www.FreeBSD.org/handbook/makeworld.html
+-.%O http://www.FreeBSD.org/doc/handbook/makeworld.html
 -.%T The Cutting Edge (using make world)
 -.%A Nik Clayton
 +.%O http://www.openbsd.org/faq/upgrade-minifaq.html
@@ -54,7 +80,7 @@
  .Re
  .Sh DIAGNOSTICS
  Exit status is 0 on successful completion, or if the user bails out
-@@ -352,7 +359,7 @@ web pages in a much simpler form under t
+@@ -389,7 +394,7 @@ web pages in a much simpler form under t
  .Pa comproot
  on 13 March 1998. The idea for creating the
  temporary root environment comes from Nik Clayton's
Index: patches/patch-mergemaster_sh
===================================================================
RCS file: /cvs/ports/sysutils/mergemaster/patches/patch-mergemaster_sh,v
retrieving revision 1.3
diff -u -r1.3 patch-mergemaster_sh
--- patches/patch-mergemaster_sh	12 Feb 2002 16:22:05 -0000	1.3
+++ patches/patch-mergemaster_sh	11 May 2003 00:35:13 -0000
@@ -1,44 +1,176 @@
 $OpenBSD: patch-mergemaster_sh,v 1.3 2002/02/12 16:22:05 naddy Exp $
---- mergemaster.sh.orig	Tue Feb 12 14:28:36 2002
-+++ mergemaster.sh	Tue Feb 12 14:45:12 2002
-@@ -354,7 +354,7 @@ SOURCEDIR=${SOURCEDIR:-/usr/src/etc}
+--- mergemaster.sh.orig	Sat May 10 16:06:02 2003
++++ mergemaster.sh	Sat May 10 18:30:36 2003
+@@ -404,7 +404,7 @@ fi
  
  # Define what CVS $Id tag to look for to aid portability.
  #
 -CVS_ID_TAG=FreeBSD
 +CVS_ID_TAG=OpenBSD
  
- case "${RERUN}" in
- '')
-@@ -450,10 +450,7 @@ case "${RERUN}" in
+ delete_temproot () {
+   rm -rf "${TEMPROOT}" 2>/dev/null
+@@ -506,10 +506,7 @@ case "${RERUN}" in
        make DESTDIR=${DESTDIR} distrib-dirs
-       ;;
-     esac
--    make DESTDIR=${TEMPROOT} distrib-dirs &&
--    make MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj obj &&
--    make MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj DESTDIR=${TEMPROOT} \
--        -DNO_MAKEDEV_RUN distribution;} ||
-+    make DESTDIR=${TEMPROOT} -DNOMAKEDEV distribution-etc-root-var;} ||
-   { echo '';
-     echo "  *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to";
-     echo "      the temproot environment";
-@@ -491,11 +488,6 @@ case "${RERUN}" in
+         ;;
+       esac
+-      make DESTDIR=${TEMPROOT} distrib-dirs &&
+-      make MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj obj &&
+-      make MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj DESTDIR=${TEMPROOT} \
+-          distribution;} ||
++      make DESTDIR=${TEMPROOT} -DNOMAKEDEV distribution-etc-root-var;} ||
+     { echo '';
+      echo "  *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to";
+       echo "      the temproot environment";
+@@ -555,11 +552,6 @@ case "${RERUN}" in
       ;;
    esac
  
 -  # Avoid trying to update MAKEDEV if /dev is on a devfs
 -  if /sbin/sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
--    rm ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local
+-    rm -f ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local
 -  fi
 -
    ;; # End of the "RERUN" test
  esac
  
-@@ -506,6 +498,7 @@ esac
- [ -f "${TEMPROOT}/etc/spwd.db" ] && rm "${TEMPROOT}/etc/spwd.db"
- [ -f "${TEMPROOT}/etc/passwd" ]  && rm "${TEMPROOT}/etc/passwd"
- [ -f "${TEMPROOT}/etc/pwd.db" ]  && rm "${TEMPROOT}/etc/pwd.db"
-+[ -f "${TEMPROOT}/etc/mail/aliases.db" ] && rm "${TEMPROOT}/etc/mail/aliases.db"
+@@ -569,9 +561,6 @@ esac
+ #
+ rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd
  
+-# We only need to compare things like freebsd.cf once
+-find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null
+-
  # Get ready to start comparing files
+ 
+ # Check umask if not specified on the command line,
+@@ -605,50 +594,6 @@ fi
+ 
+ CONFIRMED_UMASK=${NEW_UMASK:-0022}
+ 
+-#
+-# Warn users who still have old rc files
+-#
+-for file in atm devfs diskless1 diskless2 isdn network network6 pccard \
+-  serial syscons sysctl alpha amd64 i386 ia64 sparc64; do
+-  if [ -f "${DESTDIR}/etc/rc.${file}" ]; then
+-    OLD_RC_PRESENT=1
+-    break
+-  fi
+-done
+-
+-case "${OLD_RC_PRESENT}" in
+-1)
+-  echo ''
+-  echo " *** There are elements of the old rc system in ${DESTDIR}/etc/."
+-  echo ''
+-  echo '     While these scripts will not hurt anything, they are not'
+-  echo '     functional on an up to date system, and can be removed.'
+-  echo ''
+-
+-  case "${AUTO_RUN}" in
+-  '')
+-    echo -n 'Move these files to /var/tmp/mergemaster/old_rc? [yes] '
+-    read MOVE_OLD_RC
+-
+-    case "${MOVE_OLD_RC}" in
+-    [nN]*) ;;
+-    *)
+-      mkdir -p /var/tmp/mergemaster/old_rc
+-        for file in atm devfs diskless1 diskless2 isdn network network6 pccard \
+-          serial syscons sysctl alpha amd64 i386 ia64 sparc64; do
+-          if [ -f "${DESTDIR}/etc/rc.${file}" ]; then
+-            mv ${DESTDIR}/etc/rc.${file} /var/tmp/mergemaster/old_rc/
+-          fi
+-        done
+-      echo '  The files have been moved'
+-      press_to_continue
+-      ;;
+-    esac
+-    ;;
+-  *) ;;
+-  esac
+-esac
+-
+ # Use the umask/mode information to install the files
+ # Create directories as needed
+ #
+@@ -666,12 +611,9 @@ do_install_and_rm () {
+   rm -f "${2}"
+ }
+ 
+-# 4095 = "obase=10;ibase=8;07777" | bc
+ find_mode () {
+-  local OCTAL
+-  OCTAL=$(( ~$(echo "obase=10; ibase=8; ${CONFIRMED_UMASK}" | bc) & 4095 &
+-    $(echo "obase=10; ibase=8; $(stat -f "%OMp%OLp" ${1})" | bc) )) 
+-  printf "%04o\n" ${OCTAL}
++  perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ \
++    oct("$ARGV[1]"))' "${1}" "${CONFIRMED_UMASK}"`
+ }
+ 
+ mm_install () {
+@@ -698,7 +640,9 @@ mm_install () {
+       NEED_NEWALIASES=yes
+       ;;
+     /etc/login.conf)
+-      NEED_CAP_MKDB=yes
++      if [ -f /etc/login.conf.db ]; then
++        NEED_CAP_MKDB=yes
++      fi
+       ;;
+     /etc/master.passwd)
+       do_install_and_rm 600 "${1}" "${DESTDIR}${INSTALL_DIR}"
+@@ -1015,47 +959,27 @@ fi
+ case "${COMP_CONFS}" in
+ '') ;;
+ *)
+-  . ${DESTDIR}/etc/defaults/rc.conf
++  . ${DESTDIR}/rc.conf
+ 
+   (echo ''
+-  echo "*** Comparing conf files: ${rc_conf_files}"
++  echo "*** Comparing conf files: ${local_rcconf}"
+ 
+-  for CONF_FILE in ${rc_conf_files}; do
++  for CONF_FILE in ${local_rcconf}; do
+     if [ -r "${DESTDIR}${CONF_FILE}" ]; then
+       echo ''
+       echo "*** From ${DESTDIR}${CONF_FILE}"
+-      echo "*** From ${DESTDIR}/etc/defaults/rc.conf"
++      echo "*** From ${DESTDIR}/etc/rc.conf"
+ 
+       for RC_CONF_VAR in `grep -i ^[a-z] ${DESTDIR}${CONF_FILE} |
+         cut -d '=' -f 1`; do
+         echo ''
+         grep -w ^${RC_CONF_VAR} ${DESTDIR}${CONF_FILE}
+-        grep -w ^${RC_CONF_VAR} ${DESTDIR}/etc/defaults/rc.conf ||
++        grep -w ^${RC_CONF_VAR} ${DESTDIR}/etc/rc.conf ||
+           echo ' * No default variable with this name'
+       done
+     fi
+   done) | ${PAGER}
+   echo ''
+-  ;;
+-esac
+-
+-case "${PRE_WORLD}" in
+-'') ;;
+-*)
+-  MAKE_CONF="${SOURCEDIR%etc}share/examples/etc/make.conf"
+-
+-  (echo ''
+-  echo '*** Comparing make variables'
+-  echo ''
+-  echo "*** From ${DESTDIR}/etc/make.conf"
+-  echo "*** From ${MAKE_CONF}"
+-
+-  for MAKE_VAR in `grep -i ^[a-z] ${DESTDIR}/etc/make.conf | cut -d '=' -f 1`; do
+-    echo ''
+-    grep -w ^${MAKE_VAR} ${DESTDIR}/etc/make.conf
+-    grep -w ^#${MAKE_VAR} ${MAKE_CONF} ||
+-      echo ' * No example variable with this name'
+-  done) | ${PAGER}
+   ;;
+ esac