From nobody Sat Dec 14 00:14:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y96CG1VY1z5gMM7; Sat, 14 Dec 2024 00:14:34 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y96CF6My8z40lk; Sat, 14 Dec 2024 00:14:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-3a9cdcec53fso19081395ab.1; Fri, 13 Dec 2024 16:14:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734135272; x=1734740072; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XaiU5zLIUuI8U7FrU0JqbyROmWcBCTMCzx3ieJFDCcM=; b=ACqUloW8whkxBreVM7rvsN2g5ewqQGzvsJytTUgkFsjJg4atPXjeDpwwqHffC8Ve1z BE+53S4FhyIRrGFHG/NFeXAojcwTg8Yuke5M+Jh8jO1ZV6BOs+Y/EzchuvCtgDC6va6a PBqqt/+eYWaEMkxiwZN/VCy+r88ED318zfdLc/5jsC79vRJ8VOWNGtpzZlXdzWvCG5uw fIglcXqZRzMysRmKBTOKBc80CVH8slw1819iLMUBzmR/I6DvnvlpxojnC4l+5Ot+P9vy vwb0op5qZ+Fo/QUW+W9S9Deoc3cFnybBaIEtFOZhrpTjYlxpmhLRjgRwlqx0onTP0smF lkew== X-Forwarded-Encrypted: i=1; AJvYcCUqEa0TVnOCqmwugaLbut4ryJz015UqPQwERYk03wFbsqZfTvKZc+jccaTo736xSQGBW0lA6VWGdWn32CdDplAMN/Qz@freebsd.org, AJvYcCVmSY8AiUmJtfaERZTa0j4Z6fddLC+ntxVlXmdmBz8yTD02iCi0GdeiAGoYU1DPOMJXrtODP8OslHYaKGBczFZ42ddhmws=@freebsd.org X-Gm-Message-State: AOJu0Yx0xwHZ7eLQ354Ohe+GNLJaYvcSQEOIOSrx1rHOnOtpPiNdCLLG BlNxiJLi7sTdAuB3yvKKQuqwnnBYZj8/8GjWGvnBQuifg0ov/eWU4EH93pdDXd1rMi9BbuYz3DS RVhFo/G1CAk/J3BkrE0cro46zc1dRou16 X-Gm-Gg: ASbGnctnoGglhcpDUrWd7ZygaA9qSFCeY3x0K4saN/IUtFHBh69+ASfAsIsqVSWaDcz nAxFhb+4Id/qh6oO2SWyMEQuZSysRT20gr6jSNA== X-Google-Smtp-Source: AGHT+IGlHlcfsOtsfSZZxo+MA25xKS7KOBQzgGwj4Hl4HiDc+be5e0C5dmo5kAH6MCHannFtQMhbw00m441hzE+h9r4= X-Received: by 2002:a05:6e02:156a:b0:3a7:a3a4:2cb3 with SMTP id e9e14a558f8ab-3aff8c92298mr51543085ab.15.1734135272536; Fri, 13 Dec 2024 16:14:32 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202412131306.4BDD6bxu011253@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Fri, 13 Dec 2024 19:14:21 -0500 Message-ID: Subject: Re: git: a1097094c4c5 - main - newvers: Set explicit git revision length To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Y96CF6My8z40lk X-Spamd-Bar: ---- On Fri, 13 Dec 2024 at 09:53, John Baldwin wrote: > > On 12/13/24 08:06, Ed Maste wrote: > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=a1097094c4c5d810287aca092f4ab5f9f86a426a > > > > commit a1097094c4c5d810287aca092f4ab5f9f86a426a > > Author: Pat Maddox > > AuthorDate: 2024-12-13 05:28:18 +0000 > > Commit: Ed Maste > > CommitDate: 2024-12-13 13:06:10 +0000 > > > > newvers: Set explicit git revision length > > > > The --short flag is configurable. Setting an explicit length supports > > reproducible builds. > > > > Signed-off-by: Pat Maddox > > Reviewed by: emaste, imp > > Differential revision: https://github.com/freebsd/freebsd-src/pull/1547 > > Hmm, this seems to defeat the purpose of the --short flag. I think if you want > this to be reproducible you just need to use the full hash. If we get enough commits > that git thinks we need a longer short hash, then truncating the hash to a shorter > length here is a bug. --short with no explicit length is most likely to result in nonreproducibility due to a user setting a different default short length in their git config. Note that --short won't truncate and result in a conflict, it will just exceed the specified length if necessary. For example, $ git rev-parse --short=4 freebsd/main 926905 It's possible for this to result in occasional trouble when attempting to reproduce an older build (if --short=12 is sufficient today, but a future commit introduces a conflict), but I don't think it's a large concern. We could increase it to 13 or 14 now.