From owner-freebsd-questions@freebsd.org Tue Mar 23 06:40:49 2021 Return-Path: Delivered-To: freebsd-questions@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 EB65157B45E for ; Tue, 23 Mar 2021 06:40:49 +0000 (UTC) (envelope-from web@3dresearch.com) Received: from smtpg.telissant.net (smtpg.telissant.net [104.225.1.73]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F4MFX6n34z3tmb for ; Tue, 23 Mar 2021 06:40:48 +0000 (UTC) (envelope-from web@3dresearch.com) Received: from sacada.3dresearch.com (localhost [127.0.0.1]) by smtpg.telissant.net (Postfix) with ESMTP id 4F4MFQ4WSDz2D1r7 for ; Tue, 23 Mar 2021 02:40:42 -0400 (EDT) X-Virus-Scanned: amavisd-new at telissant.net Received: from smtpg.telissant.net ([127.0.0.1]) by sacada.3dresearch.com (sacada.3dresearch.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yRXYTThp-n2J for ; Tue, 23 Mar 2021 02:40:42 -0400 (EDT) Received: from buffrescue.3dresearch.com (unknown [71.112.240.190]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: buffrescue@sacada.3dresearch.com) by smtpg.telissant.net (Postfix) with ESMTPSA id 4F4MFQ0sbPz2D1r6 for ; Tue, 23 Mar 2021 02:40:42 -0400 (EDT) Received: from buffrescue.3dresearch.com (localhost [127.0.0.1]) by buffrescue.3dresearch.com (Postfix) with SMTP id 9786B51A78 for ; Tue, 23 Mar 2021 02:40:41 -0400 (EDT) Date: Tue, 23 Mar 2021 02:25:00 -0400 From: Janos Dohanics To: FreeBSD Questions Subject: Re: /usr/src revision number Message-Id: <20210323022500.275ed6e09b1ef0bc59f47af3@3dresearch.com> In-Reply-To: References: <20210321165225.11fa1f5559373032ea629412@3dresearch.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd12.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4F4MFX6n34z3tmb X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of web@3dresearch.com designates 104.225.1.73 as permitted sender) smtp.mailfrom=web@3dresearch.com X-Spamd-Result: default: False [-0.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ENVFROM_SERVICE_ACCT(1.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RECEIVED_SPAMHAUS_PBL(0.00)[71.112.240.190:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[104.225.1.73:from]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36236, ipnet:104.225.1.0/24, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; RCVD_COUNT_FIVE(0.00)[5]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[3dresearch.com]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[104.225.1.73:from:127.0.2.255]; FROM_SERVICE_ACCT(1.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 06:40:50 -0000 On Sun, 21 Mar 2021 15:35:54 -0700 Kevin Oberman wrote: > On Sun, Mar 21, 2021 at 1:53 PM Janos Dohanics > wrote: > [...] > > > > How can I find what "revision" do I have now in /usr/src and how > > can I see if it is an increment compared to the installed > > kernel/userland? > > > > -- > > Janos Dohanics > > > > > > Take a look at the newd git "Getting started" guide at > > https://docs.freebsd.org/en/articles/committers-guide/#git-primer. > > If you use a shallow clone, there is no easy way. If you have a > > full clone, you will have a hash starting with 'n' followed by 6 > > digits. This is a sequence count of commits to the relevant branch. > > In your case, the sequence is n244684. Thank you, started the local repo anew with 'deep' cloning and rebuilt world+kernel. I now have: # uname -v FreeBSD 13.0-STABLE #0 stable/13-n245008-3aa6cc000f7: Mon Mar 22 14:42:44 EDT 2021 So, the sequence count here is n245008. But I don't seem to be able to tease out of git(1) an output which shows '245008': # git rev-list stable/13 --count 256879 # git log --oneline | wc -l 256879 If git(1) has no equivalent of the svn(1) revision number in the sense which lets you compare older <--> newer at a glance, how can you tell that your updated source is actually newer than whatever is installed? For example, in FreeBSD Security Advisories you could quickly tell the "good" revision number, but you can't do that by looking at a hash like 'ab3e1bd3c22a222520c23c2793cc39e3a23c9b46'. -- Janos Dohanics