Date: Mon, 27 Mar 2006 22:50:53 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Robert Watson <rwatson@FreeBSD.org>, Doug Barton <dougb@FreeBSD.org>, current@FreeBSD.org Subject: Re: mergemaster broken? Message-ID: <20060327195053.GA48986@ip.net.ua> In-Reply-To: <20060327185752.GG7001@funkthat.com> 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> <20060321064528.GD77849@ip.net.ua> <44206E9F.6020702@FreeBSD.org> <20060327093402.H43553@fledge.watson.org> <20060327185752.GG7001@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--xXmbgvnjoT4axfJE
Content-Type: multipart/mixed; boundary="cWoXeonUoKmBZSoM"
Content-Disposition: inline
--cWoXeonUoKmBZSoM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Mar 27, 2006 at 10:57:53AM -0800, John-Mark Gurney wrote:
> Robert Watson wrote this message on Mon, Mar 27, 2006 at 09:38 +0000:
> > So while I don't have opinions about the implementation details, I thin=
k=20
> > what Ruslan is proposing is architecturally the right thing. How to ha=
ndle=20
> > the command line argument, I don't have an opinion, except that user=20
> > surprise is bad, so a new argument with some compatibility and a warnin=
g is=20
> > probably better than changing "-m".
>=20
> Why not detect etc as the last component of -m and print a nice little
> warning, and then remove /etc from the path? (or adding .. if we end
> up with an empty path).. and after a year or so, remove the warning
> and the compat code... I doubt people are doing something really crazy
> like making foobarbaz a symlink to etc, and depending upon that.. If
> they are, they get what the deserve...
>=20
Yes, I had the same idea. An updated patch implements this.
Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer
--cWoXeonUoKmBZSoM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p
Content-Transfer-Encoding: quoted-printable
Index: mergemaster.8
=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.8,v
retrieving revision 1.34
diff -u -r1.34 mergemaster.8
--- mergemaster.8 4 Feb 2006 18:24:06 -0000 1.34
+++ mergemaster.8 27 Mar 2006 19:44:40 -0000
@@ -54,7 +54,7 @@
directory before beginning this process.
.Pp
The script uses
-.Pa /usr/src/etc/Makefile
+.Pa /usr/src/Makefile
to build a temporary root environment from
.Pa /
down, populating that environment with the various
@@ -318,7 +318,7 @@
#PRESERVE_FILES_DIR=3D/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%=
H%M%S`
#
# Sourcedir is the directory to do the 'make' in (where the new files are)
-#SOURCEDIR=3D'/usr/src/etc'
+#SOURCEDIR=3D'/usr/src'
#
# The umask for mergemaster to compare the default file's modes to
#NEW_UMASK=3D022
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 27 Mar 2006 19:40:54 -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,15 @@
=20
# Assign the source directory
#
-SOURCEDIR=3D${SOURCEDIR:-/usr/src/etc}
+SOURCEDIR=3D${SOURCEDIR:-/usr/src}
+if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \
+ -f ${SOURCEDIR}/../Makefile.inc1 ]; then
+ echo " *** The source directory you specified (${SOURCEDIR})"
+ echo " will be reset to ${SOURCEDIR}/.."
+ echo ''
+ sleep 3
+ SOURCEDIR=3D${SOURCEDIR}/..
+fi
=20
# Check the width of the user's terminal
#
@@ -511,8 +519,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 +532,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 +598,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 +848,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 +1103,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'
--cWoXeonUoKmBZSoM--
--xXmbgvnjoT4axfJE
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)
iD8DBQFEKEIdqRfpzJluFF4RAo+bAJ4kznRoz7U73tw8z1WOIHnhExMCJwCffgUc
JI1n/Pc6zQ7rWStWA2MPwgs=
=5OT7
-----END PGP SIGNATURE-----
--xXmbgvnjoT4axfJE--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060327195053.GA48986>
