From owner-freebsd-git@freebsd.org Sat Apr 24 15:09:00 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 07803622F21 for ; Sat, 24 Apr 2021 15:09:00 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FSF176Rlrz3G5f; Sat, 24 Apr 2021 15:08:59 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x82c.google.com with SMTP id f12so38516910qtf.2; Sat, 24 Apr 2021 08:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=PrnQ9wb5PoSUhb54HKvF9B/1foilTEiCHth51FP3lpU=; b=jBtgp6Mp9TzyaCyu6DOjeHGm9yalYQG5dbV8t248r1vPi1/tSorIi+Q0rEFt69EjvI SZ4X6bOB1zYt/jEEeIq3udF95qYqigk8dMl7Csf+jh8ZAUDW56HnWSCsYJ7Bicrfo1qD 5podH3VpOoVYYCW9WhB2ctj2LMnNn3YQ4/OsVAaAXZ+4m+Q/q8a+Kmzfn7wWm3RYQ8xU toS19lyeO5emtlthLwltWbq8pHZ5Tg2uGh+QchUHqpq3uGkresWOTJXGhNgyYxzGM+TJ eWOOUB5ZFyNC++B5bLXd53OWOkYn/8eH152U0Rnop5MdI2sSqbwQCPUy6G0y4vSql2aH BGag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=PrnQ9wb5PoSUhb54HKvF9B/1foilTEiCHth51FP3lpU=; b=fzBYf8/Vz1BxI8OkzgzqkTW2SeDwZ0wR4bxaUeEHe3EMhvZB/OjdUt2oV10UCaWOE3 r2847QfdFrA0u04OZsv2FTz130DdthVJn3VavEVmCPIdyL1khYpFRXKCIoVWC9GL0m+C pW9mZQcMthQa8ZzSf5iAX+NwySSop+0iJGkgnOmrXNiEjqiezU/xIaoArHrUe6vOTl1y aUCWCFblfeQMMMCBnOMVNDEXBJ/b4CHzxM26GDFvPnPiOCIXQuewBYUZ0XaUOylxZCNZ 2C1ftcbUl3z05ZD7yh72IhQupOQWuqWxETJqTMpPRdk15JMNVBE9R6T5dg51LT6NEorf otpg== X-Gm-Message-State: AOAM530Op+0QkcI3uzrmvb0pf8W85h8a/V3nsJVrn9EjQmOVsy+l1jk9 kYNE9cbabW/frpMsFwmBOAniIF54AYAoYw== X-Google-Smtp-Source: ABdhPJwDUkz5bMBWKSim9n6MvS534LW6/FIYkAeBFXSmENV0xinC2mAfa9M6F/XMaN+UotHKyh0FDw== X-Received: by 2002:a05:622a:205:: with SMTP id b5mr8387970qtx.186.1619276939066; Sat, 24 Apr 2021 08:08:59 -0700 (PDT) Received: from nuc ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id h7sm6519306qka.39.2021.04.24.08.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Apr 2021 08:08:58 -0700 (PDT) Sender: Mark Johnston Date: Sat, 24 Apr 2021 11:08:58 -0400 From: Mark Johnston To: Ulrich =?iso-8859-1?Q?Sp=F6rlein?= Cc: freebsd-git@freebsd.org Subject: Re: vendor/illumos merges Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4FSF176Rlrz3G5f X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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: Sat, 24 Apr 2021 15:09:00 -0000 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: > >Hi, > > > >Now that FreeBSD uses OpenZFS as the upstream for ZFS, vendor/illumos is > >mostly unused. However, we still use illumos as an upstream for CTF > >tools and DTrace, though there haven't been any imports in a while. > > > >illumos has put a lot of work into their CTF toolchain, and I'd like to > >import that. There are a couple of snags that I'd appreciate some > >guidance on. > > > >First, I believe I should delete now-unused ZFS code from the vendor > >branch and merge the result to main. I did this locally and got an > >empty merge, which is what I'd expect. Is there any problem with this? > > Why would you record this empty merge? If you clean up vendor/foo, just > do that but don't merge a no-op back into main (nothing changed, after > all). Ok, I guess there is no reason to merge that change separately. It will end up being merged with subsequent imports though. > >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.