From owner-freebsd-git@freebsd.org Mon Apr 26 12:52:07 2021 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E89585FF69F for ; Mon, 26 Apr 2021 12:52:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FTPtH6HV2z3Lj5; Mon, 26 Apr 2021 12:52:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id C4281205DB; Mon, 26 Apr 2021 12:52:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f172.google.com with SMTP id y136so24175648qkb.1; Mon, 26 Apr 2021 05:52:07 -0700 (PDT) X-Gm-Message-State: AOAM530GXyuw3RKUQNhlYZu9AgYqOP+ERX/BqNoCvvhO0tSEV5rjT2OT xEyVHUazQ+L0f/bohAthXPjSSYL3YE/bZH6vuDI= X-Google-Smtp-Source: ABdhPJx1+22ZweGW6IPrb3BZCOG+d3EkKM0IF0zN2LKCDBa6eoaf+BcvRhI9K3RXExMyjFWPbsQs+oXn3Z9jWaet7J0= X-Received: by 2002:a37:de14:: with SMTP id h20mr17149984qkj.34.1619441527200; Mon, 26 Apr 2021 05:52:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kyle Evans Date: Mon, 26 Apr 2021 07:51:54 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: vendor/illumos merges To: Mark Johnston Cc: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= , freebsd-git Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2021 12:52:08 -0000 On Sat, Apr 24, 2021 at 10:09 AM Mark Johnston 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