Date: Mon, 26 Apr 2021 09:40:03 -0600 From: Warner Losh <imp@bsdimp.com> To: Kyle Evans <kevans@freebsd.org> Cc: Mark Johnston <markj@freebsd.org>, freebsd-git <freebsd-git@freebsd.org> Subject: Re: vendor/illumos merges Message-ID: <CANCZdfqee9_8KyoYWLfZ9v1krHk5y54g3S7kqWwHdNoXJ0s8Hg@mail.gmail.com> In-Reply-To: <CACNAnaGSbb6ATqZ2gfQ2Zq=yeNK7Jq5r5afE9-=-CHUFcF3iQw@mail.gmail.com> References: <YIM7iaptOgsWyxse@nuc> <YIP2mE%2B0lKB8pLTK@acme.spoerlein.net> <YIQ0ilbqOM4/cTE4@nuc> <CACNAnaGSbb6ATqZ2gfQ2Zq=yeNK7Jq5r5afE9-=-CHUFcF3iQw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 26, 2021 at 6:52 AM Kyle Evans <kevans@freebsd.org> wrote: > On Sat, Apr 24, 2021 at 10:09 AM Mark Johnston <markj@freebsd.org> wrote: > > > > On Sat, Apr 24, 2021 at 12:44:40PM +0200, Ulrich Sp=C3=B6rlein wrote: > > > On Fri, 2021-04-23 at 17:26:33 -0400, Mark Johnston wrote: > > [... snip ...] > > > >Second, with Subversion we had both vendor/illumos and > > > >vendor-sys/illumos, and now we just have the former, seemingly with > > > >sys/* bits imported from vendor-sys. Some of the upstream commits > touch > > > >both userspace and kernel bits, but the merge targets for these in > > > >FreeBSD are different: cddl/contrib/opensolaris vs. > > > >sys/cddl/contrib/opensolaris. How should I merge into main in this > > > >case? I don't really see any options other than to split each > offending > > > >upstream commit into two parts, one for userspace and one for the > > > >kernel, and merge them separately. > > > > > > > >If it helps to look at the branch where I staged the upstream commit= s, > > > >I've pushed it to vendor/illumos2 in > https://github.com/markjdb/freebsd > > > >. > > > > > > Can you clarify why the merging of the two might be an issue? Note th= at > > > unlike subversion, in git there's no "merge a certain subtree" > handling, > > > all that is recorded is a tree of some form and then a set of parents > or > > > ancestor commits. (git is a content tracker, not really a VCS :) > > > > > > I was under the impression that userland and kernel imports/merges ne= ed > > > to happen at the same time anyway, so I assume you would import all t= he > > > bits under vendor/foo in 1 commit and then merge them in 1 commit int= o > > > main. Is that not how it goes? > > > > How can I do that with git subtree merge? Suppose an illumos commit > > modifies cmd/dtrace/foo.c (userspace) and uts/common/dtrace/foo.c > > (kernel). That maps to cddl/contrib/opensolaris/cmd/dtrace/foo.c and > > sys/cddl/contrib/opensolaris/uts/common/dtrace/foo.c in FreeBSD, > > respectively. So to do a subtree merge, I need to use distinct prefixe= s > > depending on whether I'm importing userspace or kernel changes. When > > they are mixed together, it's not clear to me how I can merge at all. > > > > I see that for OpenZFS we keep all code, including userspace code, unde= r > > sys/contrib/openzfs, so it doesn't have this problem. > > There's some level of precedence for userland build reaching into sys/ > outside of OpenZFS, so if it makes life easier I would totally just > blow away the existing structure to have a vendor/illumos that matches > upstream structure and merge it all into sys/cddl. > libcam has been doing it since around FreeBSD 3 or so... Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqee9_8KyoYWLfZ9v1krHk5y54g3S7kqWwHdNoXJ0s8Hg>