vendor/illumos merges

Warner Losh imp at bsdimp.com
Mon Apr 26 15:40:16 UTC 2021


On Mon, Apr 26, 2021 at 6:52 AM Kyle Evans <kevans at freebsd.org> wrote:

> On Sat, Apr 24, 2021 at 10:09 AM Mark Johnston <markj at freebsd.org> wrote:
> >
> > On Sat, Apr 24, 2021 at 12:44:40PM +0200, Ulrich Spörlein 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 commits,
> > > >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 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
> or
> > > 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.
>

libcam has been doing it since around FreeBSD 3 or so...

Warner


More information about the freebsd-git mailing list