Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2006 08:45:28 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, Steve Kargl <sgk@troutmask.apl.washington.edu>
Subject:   Re: mergemaster broken?
Message-ID:  <20060321064528.GD77849@ip.net.ua>
In-Reply-To: <20060320234145.GB33003@troutmask.apl.washington.edu>
References:  <20060320221741.GA13699@troutmask.apl.washington.edu> <20060320230009.GA55254@troutmask.apl.washington.edu> <20060320231604.GH83781@ip.net.ua> <20060320232746.GI83781@ip.net.ua> <20060320234006.GV35129@funkthat.com> <20060320234145.GB33003@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--LSp5EJdfMPwZcMS1
Content-Type: multipart/mixed; boundary="8nsIa27JVQLqB7/C"
Content-Disposition: inline


--8nsIa27JVQLqB7/C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 20, 2006 at 03:41:45PM -0800, Steve Kargl wrote:
> On Mon, Mar 20, 2006 at 03:40:06PM -0800, John-Mark Gurney wrote:
> >=20
> > Should we also document that -m is suppose to be src's etc dir instead
> > of src?  I've accidentally pointed -m at src, and then it does a make
> > which is quite ammuzing as it's completely the wrong thing...  Or now
> > that we call outside of /etc, should we make -m really point to src,
> > and have the proper calls add etc to the directory?
> >=20
>=20
> Although you may already realize this, in this case -m did not work.
> I haven't tried -m with ru's patch.
>=20
Doesn't really matter, mergemaster(8) was broken because it was
written when we didn't have correct wrappers for "distrib-dirs"
and "distribution", upgrade and cross-arch friendly, at the top
level.

Anyway, attached is the patch I'd like to commit after a nod
=66rom Doug.  It fixes mergemaster(8) to use src/Makefile wrappers
for distrib-dirs and distribution targets, and makes it use
TARGET_ARCH instead of faking up MACHINE_ARCH, now that it uses
the correct wrappers.  It also makes ${SOURCEDIR} and -m point
at the src/ top, as documented in a manpage.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--8nsIa27JVQLqB7/C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p
Content-Transfer-Encoding: quoted-printable

Index: mergemaster.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v
retrieving revision 1.53
diff -u -r1.53 mergemaster.sh
--- mergemaster.sh	4 Feb 2006 18:24:06 -0000	1.53
+++ mergemaster.sh	21 Mar 2006 06:39:08 -0000
@@ -242,7 +242,7 @@
 while getopts ":ascrvhipCPm:t:du:w:D:A:" COMMAND_LINE_ARGUMENT ; do
   case "${COMMAND_LINE_ARGUMENT}" in
   A)
-    ARCHSTRING=3D'MACHINE_ARCH=3D'${OPTARG}
+    ARCHSTRING=3D'TARGET_ARCH=3D'${OPTARG}
     ;;
   s)
     STRICT=3Dyes
@@ -380,7 +380,7 @@
=20
 # Assign the source directory
 #
-SOURCEDIR=3D${SOURCEDIR:-/usr/src/etc}
+SOURCEDIR=3D${SOURCEDIR:-/usr/src}
=20
 # Check the width of the user's terminal
 #
@@ -511,8 +511,8 @@
         ;;
       esac
       make DESTDIR=3D${TEMPROOT} ${ARCHSTRING} distrib-dirs &&
-      MAKEOBJDIRPREFIX=3D${TEMPROOT}/usr/obj make ${ARCHSTRING} obj &&
-      MAKEOBJDIRPREFIX=3D${TEMPROOT}/usr/obj make ${ARCHSTRING} all &&
+      MAKEOBJDIRPREFIX=3D${TEMPROOT}/usr/obj make ${ARCHSTRING} obj SUBDIR=
_OVERRIDE=3Detc &&
+      MAKEOBJDIRPREFIX=3D${TEMPROOT}/usr/obj make ${ARCHSTRING} all SUBDIR=
_OVERRIDE=3Detc &&
       MAKEOBJDIRPREFIX=3D${TEMPROOT}/usr/obj make ${ARCHSTRING} \
 	  DESTDIR=3D${TEMPROOT} distribution;} ||
     { echo '';
@@ -524,8 +524,8 @@
   *)
     # Only set up files that are crucial to {build|install}world
     { mkdir -p ${TEMPROOT}/etc &&
-      cp -p ${SOURCEDIR}/master.passwd ${TEMPROOT}/etc &&
-      cp -p ${SOURCEDIR}/group ${TEMPROOT}/etc;} ||
+      cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc &&
+      cp -p ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} ||
     { echo '';
       echo '  *** FATAL ERROR: Cannot copy files to the temproot environme=
nt';
       echo '';
@@ -590,7 +590,7 @@
     echo ''
     echo " *** Your umask is currently set to ${USER_UMASK}.  By default, =
this script"
     echo "     installs all files with the same user, group and modes that"
-    echo "     they are created with by ${SOURCEDIR}/Makefile, compared to"
+    echo "     they are created with by ${SOURCEDIR}/etc/Makefile, compare=
d to"
     echo "     a umask of 022.  This umask allows world read permission wh=
en"
     echo "     the file's default permissions have it."
     echo ''
@@ -840,7 +840,7 @@
 fi
=20
 # Using -size +0 avoids uselessly checking the empty log files created
-# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does
+# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does
 # check the scripts in ./dev, as we'd like (assuming no devfs of course).
 #
 for COMPFILE in `find . -type f -size +0`; do
@@ -1095,7 +1095,7 @@
 case "${PRE_WORLD}" in
 '') ;;
 *)
-  MAKE_CONF=3D"${SOURCEDIR%etc}share/examples/etc/make.conf"
+  MAKE_CONF=3D"${SOURCEDIR}/share/examples/etc/make.conf"
=20
   (echo ''
   echo '*** Comparing make variables'

--8nsIa27JVQLqB7/C--

--LSp5EJdfMPwZcMS1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFEH6EIqRfpzJluFF4RAsrUAJ9e8TDk7H4KvMTD6hn4BfIsk06JbgCfXbFT
Kch5OWoNDbf5QHMfULgKA0I=
=h+E4
-----END PGP SIGNATURE-----

--LSp5EJdfMPwZcMS1--



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