Date: Mon, 26 Apr 2021 07:51:54 -0500 From: Kyle Evans <kevans@freebsd.org> To: Mark Johnston <markj@freebsd.org> Cc: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= <uqs@freebsd.org>, freebsd-git <freebsd-git@freebsd.org> Subject: Re: vendor/illumos merges Message-ID: <CACNAnaGSbb6ATqZ2gfQ2Zq=yeNK7Jq5r5afE9-=-CHUFcF3iQw@mail.gmail.com> In-Reply-To: <YIQ0ilbqOM4/cTE4@nuc> References: <YIM7iaptOgsWyxse@nuc> <YIP2mE%2B0lKB8pLTK@acme.spoerlein.net> <YIQ0ilbqOM4/cTE4@nuc>
next in thread | previous in thread | raw e-mail | index | archive | help
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 tou= ch > > >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 offendi= ng > > >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 commits, > > >I've pushed it to vendor/illumos2 in https://github.com/markjdb/freebs= d > > >. > > > > Can you clarify why the merging of the two might be an issue? Note that > > 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 o= r > > ancestor commits. (git is a content tracker, not really a VCS :) > > > > I was under the impression that userland and kernel imports/merges need > > to happen at the same time anyway, so I assume you would import all the > > bits under vendor/foo in 1 commit and then merge them in 1 commit into > > 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 prefixes > 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, under > 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. Thanks, Kyle Evans
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaGSbb6ATqZ2gfQ2Zq=yeNK7Jq5r5afE9-=-CHUFcF3iQw>