Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 21:50:12 +0000 (UTC)
From:      Brad Davis <brd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347893 - in head/usr.sbin: etcupdate mergemaster
Message-ID:  <201905162150.x4GLoC1u046039@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brd
Date: Thu May 16 21:50:12 2019
New Revision: 347893
URL: https://svnweb.freebsd.org/changeset/base/347893

Log:
  Fix mergemaster after r347638 and the master.passwd / group move.
  
  Check the legacy directory and use it instead if present.
  
  Install these first if using beinstall.
  
  UPDATING entry to follow.
  
  Approved by:	allanjude (mentor, in person)
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D20279

Modified:
  head/usr.sbin/etcupdate/etcupdate.sh
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/etcupdate/etcupdate.sh
==============================================================================
--- head/usr.sbin/etcupdate/etcupdate.sh	Thu May 16 21:17:18 2019	(r347892)
+++ head/usr.sbin/etcupdate/etcupdate.sh	Thu May 16 21:50:12 2019	(r347893)
@@ -1737,7 +1737,9 @@ WARNINGS=$WORKDIR/warnings
 EDITOR=${EDITOR:-/usr/bin/vi}
 
 # Files that need to be updated before installworld.
-PREWORLD_FILES="etc/master.passwd etc/group"
+PREWORLD_FILES="lib/libc/gen/master.passwd lib/libc/gen/group"
+# If on an older tree, use it instead.  Delete after 13.0.
+[ -f ${SRCDIR}/etc/master.passwd ] && PREWORLD_FILES="etc/master.passwd etc/group"
 
 # Handle command-specific argument processing such as complaining
 # about unsupported options.  Since the configuration file is always

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==============================================================================
--- head/usr.sbin/mergemaster/mergemaster.sh	Thu May 16 21:17:18 2019	(r347892)
+++ head/usr.sbin/mergemaster/mergemaster.sh	Thu May 16 21:50:12 2019	(r347893)
@@ -669,9 +669,12 @@ case "${RERUN}" in
     ;;
   *)
     # Only set up files that are crucial to {build|install}world
-    { mkdir -p ${TEMPROOT}/etc &&
-      cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc &&
-      install -p -o root -g wheel -m 0644 ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} ||
+    { MM_PASSDIR="${SOURCEDIR}/lib/libc/gen"
+      # If on an older tree, use it instead.  Delete after 13.0.
+      [ -f ${SOURCEDIR}/etc/master.passwd ] && MM_PASSDIR="${SOURCEDIR}/etc"
+      mkdir -p ${TEMPROOT}/etc &&
+      cp -p ${MM_PASSDIR}/master.passwd ${TEMPROOT}/etc &&
+      install -p -o root -g wheel -m 0644 ${MM_PASSDIR}/group ${TEMPROOT}/etc;} ||
     { echo '';
       echo '  *** FATAL ERROR: Cannot copy files to the temproot environment';
       echo '';



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