From owner-dev-commits-src-main@freebsd.org Wed Dec 30 21:54:11 2020 Return-Path: Delivered-To: dev-commits-src-main@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 6F6624D042D; Wed, 30 Dec 2020 21:54:11 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 4D5lRl2PkLz4jy1; Wed, 30 Dec 2020 21:54:11 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f175.google.com with SMTP id d14so15017664qkc.13; Wed, 30 Dec 2020 13:54:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k1dEEiFUHPGOawxmP+IUHPMzH3gmTK+cgPasDvjLoUs=; b=hnUNrEZeLqEw7OOVgOMKajuRyDC4rlc31jIGeEHTTAWwhXIBT/4A0Oo+D7sdEH1bV2 /lW5PQxnI+sRkiSEjqUQbbtMz/G+c3Rh08816ILOha4FrmQXUGYQwMOC8uNGCOAJqGiL X5ClPrqmPUg/aEGayI5Eg/IrFr+TK3yyHhn+/FdG8BgiuwIr6zpj+YZGPTft9l9uHdjk V5ZVjBrkhVWjd8oQ8DVtAAk16Gl+3UVcdWz+QyZYOopoPqzRAezJeZtX+0J6qN+Ji5Kb 8f4rJTMtyIXmnVZDMIFd/cCiY6FtAGYwKG3PviF6Uee9HScauU/dVSef0fbXMxSi5tL5 1uZA== X-Gm-Message-State: AOAM530AIg5rsXWMMRUeO27C/z0SHq8HjI5PdoLv7aC9zpcC+pgs2/wp RAAUiWBXhVBWMfwaqNf48cH7Ke+EJ6nsjw== X-Google-Smtp-Source: ABdhPJxFwKa9ff6an40fYxcJB/pp3myYeeeTaofIBLrBV+VJiDZysuHKtVx4vWEDHXmpCOPI4uRf8w== X-Received: by 2002:a05:620a:1398:: with SMTP id k24mr55073279qki.109.1609365250144; Wed, 30 Dec 2020 13:54:10 -0800 (PST) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com. [209.85.222.171]) by smtp.gmail.com with ESMTPSA id l191sm28325638qke.7.2020.12.30.13.54.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 13:54:09 -0800 (PST) Received: by mail-qk1-f171.google.com with SMTP id p14so15078357qke.6; Wed, 30 Dec 2020 13:54:09 -0800 (PST) X-Received: by 2002:ae9:f312:: with SMTP id p18mr54070785qkg.311.1609365249627; Wed, 30 Dec 2020 13:54:09 -0800 (PST) MIME-Version: 1.0 References: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> In-Reply-To: <202012302118.0BULIuGd083574@gndrsh.dnsmgr.net> From: Ryan Libby Date: Wed, 30 Dec 2020 13:53:58 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL To: "Rodney W. Grimes" Cc: Warner Losh , Glen Barber , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5lRl2PkLz4jy1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the main branch of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 21:54:11 -0000 On Wed, Dec 30, 2020 at 1:19 PM Rodney W. Grimes wrote: > > > On Wed, Dec 30, 2020 at 11:00 AM Warner Losh wrote: > > > > > > On Wed, Dec 30, 2020 at 5:04 AM Rodney W. Grimes > > > wrote: > > > > > > Now what is being just shoved off as nothing is the fact without > > > > $FreeBSD$ working the ability to backtrace cadence of a file is > > > > going to be a royal pain in the ass, and basically means the project > > > > has "lost" versioning of installed product. > > > > > > > > > > You can commit the file you have to a temporary branch, and use a simple > > > loop to find the file that's closest to it in the main branch with git > > > tools. It's not that hard and covered in several stack trace posts. It's > > > far more reliable than $FreeBSD$ since it will show the version that's the > > > closest to the one you have, in case you moved other later changes in w/o > > > updating $FreeBSD$. > > > > If there's a need for this, it might be useful to describe in or link > > from the freebsd-git-docs. > > > > For exact matches, this almost works: > > > > git describe $(git hash-object $file) > > > > but not for all branches, I think for git describe $blob you have to be > > on a branch with the blob in history. It might also come with some > > caveats about the hash format. We might be able either to add some glue > > around that or work with git upstream. > > > > Having a tool to find fuzzy matches would be neat (the blob with the > > minimum diff). Does one exist? > > This simply well not easily work. Let me try to explain why. > > First take your self OUT of developer mode, and into operations > and administration. > > Take for example all the files in /etc, these files can easily > at present often be tracked back to exactly what release installed > them cause the $FreeBSD$ points you at it. These files are often > modified by local administrators, and with out knowing what version > they started out it is a crap shoot to ever figure it out unless > the local mods are minor and you get lucky. > > Contractors are some times hired to go in and upgrade or clean up > after someone else did work, and not having this information and > telling them to go dig in git to try and figure out the state of > there system is pretty much a non-started, well at least it is for > me. > > > > > Ryan > > > > -- > Rod Grimes rgrimes@freebsd.org Disclaimer: I won't pretend to have experience in this area, this is just musing. For files that are not disconnected from FreeBSD, as in stuff that we install and expect or anticipate may be edited on site, it might be possible to work our own magic to do $FreeBSD$ expansion at build time. (I'm not sure if this has been discussed previously, or what exactly that would look like in the build.) For disconnected files, if there were a tool like, let us imagine, $ cd /usr/src $ git whence /some/file [ output of git describe blob plus a diff ] Maybe that would be enough? Ryan