From nobody Fri Jan 13 00:25:01 2023 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 4NtMdB3Bbcz2sdQG; Fri, 13 Jan 2023 00:25:18 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NtMdB13bSz3N4Q; Fri, 13 Jan 2023 00:25:18 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62c.google.com with SMTP id d15so21853220pls.6; Thu, 12 Jan 2023 16:25:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/NaeaQYPV/pkmCeNNq2wgRQ+EGeeplloPzdNRmPh2SM=; b=HOAoZMYz9u19TKuIVEKvhL3La7UYv4zbhlKFA2+ep/IOKR+zxQMYAqgIAfJEfxPA6U u53ohP14ENorNyaQW1sij7ar6n6cEtDfrtjlQZShroHvtTtt5Wwxjk17dOSuphll/MCg DuBiLS1OebxIZThs67UBlMB/MBNz7FR6trL9mIgdu/1RnTu27HqCGRBzdnp7UyQ/j5Sn o1xw/R8qFUzHX61IDbAYAkjiT07neDlN+nwOaL4nQzviTQmwID4oUJrOy5oKhgNf8N+/ GoS2ZkZqkuyDugfaAC0UFyTjq5PTyUUsQ+LnGwIt1bNvz2sGkZCCQyuRuRAOBojjdkPm BSGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=/NaeaQYPV/pkmCeNNq2wgRQ+EGeeplloPzdNRmPh2SM=; b=RgHwIWXMmB1ikrL0UiHVrraG/dHCGC8XEtvqBh4v8dyBnZaaEtgLzumb5Mp4lDYFTs IrzX2ZN4/aKHLjzsDmbaaBcCNnUhKLXpFjPK189ij780AHZMFOiaNJbRJT12idEj1nuu /rIoENhRxSYqE+6P/l5Z0fgfSofpmGbS+5thiUjd9CivDStrgJS//nLGSB7WXQKkMTcZ 3A5/ap9jvZkHXZge6yFFM85j9A6P0K4lTndLwlCkN0fBVOdYS3QyRvSOSrh47t/V2la6 f3bFOI0MD83dyUX0aEHX+bSQkXuuhfEmkYEZR5QG9KPFWuSEtt7nbeVZ0L2vlX/HHYYe laTQ== X-Gm-Message-State: AFqh2krrLlY3R1NrzBQlHjBh9J1gNvElSSYZy2/K3en1kG1A9tDuCAzd HGJskNxyLtnLk2BkjPkwB5iICxOgblKFGPN2vtdVUpTV0g== X-Google-Smtp-Source: AMrXdXtdx8Nr35wHX0QY0wkdBpZcfr4pvDIDYt/6rwASRbZUus5ZYdvPoxX1+JTzPtF8QaPAClBcY+5oZKcb8GmTijE= X-Received: by 2002:a17:90a:3cc7:b0:227:92:151 with SMTP id k7-20020a17090a3cc700b0022700920151mr1558291pjd.183.1673569516817; Thu, 12 Jan 2023 16:25:16 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202212231636.2BNGaluc012056@gitrepo.freebsd.org> <876513140.46.1671814393751@mailrelay> <20230109143951.txy43nin5yv3qkym@ubertino.local> <20230112082359.dxgbexyhucr4lsv7@aniel.nours.eu> In-Reply-To: <20230112082359.dxgbexyhucr4lsv7@aniel.nours.eu> From: Rick Macklem Date: Thu, 12 Jan 2023 16:25:01 -0800 Message-ID: Subject: Re: git: 62a149bf6219 - main - Add new rc: machine_id to generate /etc/machine-id To: Baptiste Daroussin Cc: Matteo Riondato , "Tobias C. Berner" , Ronald Klop , dev-commits-src-all@freebsd.org, src-committers@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4NtMdB13bSz3N4Q X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, Jan 12, 2023 at 12:24 AM Baptiste Daroussin wrote: > > On Wed, Jan 11, 2023 at 07:08:39PM -0800, Rick Macklem wrote: > > On Mon, Jan 9, 2023 at 6:40 AM Matteo Riondato wrote: > > > > > > On 2022-12-24 at 03:39 EST, Tobias C. Berner wrote: > > > > > > >Moin moin > > > > > > > >I think it tries to solve the same problem of giving the machine a unique id. > > > > > > > >From the linux man page [1] > > > > > > > > The machine ID does not change based on local or network > > > > configuration or when hardware is replaced. Due to this and its > > > > greater length, it is a more useful replacement for the > > > > gethostid(3) call that POSIX specifies. > > > > > > > > > > Does this make or should it make hostid obsolete? > > I hope not, since the NFSv4 client uses /etc/hostid. > > > > > If yes, then changes are needed to deorbit hostid. If not, why not? > > If this is somehow a better algorithm than the one used by uuidgen(1) > > then I would prefer seeing that utility improved instead of a new one > > being added. > > This is exactly what has been done. Here we are speaking a rc script to generate > the file expected by userland software (from the ports tree). > > https://cgit.freebsd.org/src/commit/bin/uuidgen/uuidgen.c?id=f176fe8e7f638e585afcd2f4dd52a522c4648f63 > Oops, sorry about that. From the original commit log, I thought that the commit added a new utility, so that there were now two utilities in the source tree. > > > > If software needs to acquire the host uuid, the code can simply > > get the sysctl kern.hostuuid. > > > > > Unless there is a really good reason to have this one in the > > system as well as uuidgen(1), I'd suggest you revert this commit. > > > > rick > > I don't see why it should be reverted. more and more of the package ecosystem > requires this feature (and it what is provided by dbus is not sufficient > anymore), this is what those changes (addition to uuidgen(1) and rc script to > generate the machine-id file) is addressing. > I agree. I mistakenly thought a new utility had been added. Now I see it is a noew option on uuidgen(1), which seems fine to me. Sorry for the noise, rick > Now can we reuse part of the changes to improve/replace hostid, this is a > complerly unrelated study that could (should?) be done by whom is willing to > have a look and knowledgeable enough in this area. > > Best regards, > Bapt