Date: Tue, 21 Mar 2006 23:56:53 +0200 From: Ruslan Ermilov <ru@freebsd.org> To: Doug Barton <dougb@freebsd.org> Cc: freebsd-current@freebsd.org, rwatson@freebsd.org, Steve Kargl <sgk@troutmask.apl.washington.edu> Subject: Re: mergemaster broken? Message-ID: <20060321215653.GA77045@ip.net.ua> In-Reply-To: <44206E9F.6020702@FreeBSD.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 21, 2006 at 01:22:39PM -0800, Doug Barton wrote: > I'm including rwatson here since the MACHINE_ARCH stuff was his idea. >=20 MACHINE_ARCH should be spelled TARGET_ARCH when doing cross stuff properly. > Ruslan Ermilov wrote: >=20 > >> On Mon, Mar 20, 2006 at 03:40:06PM -0800, John-Mark Gurney wrote: > >>> 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 > I strongly dislike the idea of changing the semantics of the -m option. I= t's > been the way it is since day 1, and I really hate to make changes to > something like that. I can see a case for making the man page more clear, > but I'd rather work around the problem with -m than change the semantics. >=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. > >=20 > > Anyway, attached is the patch I'd like to commit after a nod > > from 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. >=20 > Forgive me if I'm being dense here, but why do the changes you describe > require that we run make in src/? >=20 You didn't read this thread from beginning, did you? OK, I will explain it in a bit more detail. The time you're running "mergemaster -p", you run src/etc/Makefile which may be incompatible with installed make(1) binary and/or /usr/share/mk files (like is the case for this thread). By using the top level wrappers, all these problems are solved. Wrappers execute src/etc/Makefile targets in upgrade- and cross-friendly environment, with bootstrapped make(1) binary and src/share/mk files. > Or, alternatively, if it is _absolutely_ > necessary to do so, why do we have to redefine SOURCEDIR to be src, and w= hy > can't we just strip /etc from SOURCEDIR where needed? >=20 My original diff didn't change that, I think someone else asked to change it, and it was pretty logical (see below). > In short, I have no objections to fixing mergemaster to work with the new > world order, but it needs to be done in a way that does not change semant= ics > of an existing option. I'd also like confirmation from Robert that we're = not > breaking any of the behavior that he added by doing it the way you propos= e. >=20 OK, you have my patches, do what you want with them. I don't care which directory the -m option uses, but there's not much sense keeping it pointing to src/etc/ if we're going to use the top-level Makefile and its targets. Absolutely what needs to be done: 1) Fix mergemaster(8) to use top-level targets for distrib-dirs, distribute, and obj/all in "etc". The latter should be more obvious -- my changes fixes it so it runs obj/all in etc in the same environment as buildworld does, i.e., using adequate tools. 2) s/MACHINE_ARCH/TARGET_ARCH/, i.e., don't pretend we're a TARGET_ARCH. When needed top-level makefiles will substitute MACHINE_ARCH=3D${TARGET_ARCH}. 3) Grow support for TARGET for pc98, better through the "arch[:machine]" format of the -A option's argument. Some reference commits from src/Makefile: : revision 1.320 : date: 2005/07/15 14:38:54; author: ru; state: Exp; lines: +1 -1 : Make the `distrib-dirs' target official and working properly : when cross-building (installing). (This is useful for NFS : installing world/kernel to another architecture machine.) :=20 : revision 1.317 : date: 2005/02/27 12:11:34; author: ru; state: Exp; lines: +2 -1 : Added the convenience "distribution" target which calls the : target of the same name from src/etc/Makefile with a proper : environment, suitable to be used during upgrades and cross- : builds. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEIHakqRfpzJluFF4RAsRFAKCcOh8QPmZBsN06q0N2JSY3wojxFwCeI2LU pU/Mm3YQlv1EcepqWqGCjjc= =WO8a -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060321215653.GA77045>