From nobody Fri Mar 3 15:40:28 2023 X-Original-To: dev-commits-src-all@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 4PSscc05KJz3w3B2; Fri, 3 Mar 2023 15:40:32 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PSscb6HRBz3Lkg; Fri, 3 Mar 2023 15:40:31 +0000 (UTC) (envelope-from tijl@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677858031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TmMmKdnIelMqdgIVf9DNCYtQWboDUjEZZAeeHOwQUUk=; b=KU6aftVFBtyUqcoukCFJ2lcQhqHVY7XVq7JPusRi9ZYTr10bQQOV7Cy1MUUjwd7yks0PlT VorFhe8o5/sAvzvxUy82hgLQnAVxZ46qCso4jkihiklqNpS3NTmvWqB8iMjhGJILimxq9+ sUwbjfhTSJB3RKDMF25Db340buVMdQ+W9nM7WIMFZi/RQ30L3DKf8aKSo9DywrkZXFf6Wm wrFXkZSrMWpV0oqtvylUwb4HQJI0VngDiRutrqofFbmeHxg5mVPlJ5WqWkYb71rRErmdQs Pk11crLOIjR6uDhK8sGIgi0rHoVdghFHpRfmeThRHqEioOOwq4bjRJTmpAX+uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677858031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TmMmKdnIelMqdgIVf9DNCYtQWboDUjEZZAeeHOwQUUk=; b=ICuJmFh3pC9MIlztMEW3YpDdDZp9SP25qpmBmrYbDYtQeV21c297suAOAfklf8rdiGWH+j eg9rgKymY9Cy+gpNVLeHVwVwpOBHdxg5DqN5SvoyZT3DAf6kB0OSzGYugIkLFz77dYjln7 FaolyyObx05+rxP7AihgQbktuCwXlKMEwLvPZnQOHrqhz67B8A99eNQEPXMo+G55LSnI0s me0Dr3x+6If5J5YlGOMRupaGXX5kgsRPYR4K0niRn2X8bT6CvqtlJNdK77/QE0RFJOtRSD pRugU8cUn1pbhbg6LD4YJMTUFJBfNCyZvddn7GtxZZzL4RYnZecC+eBwdJYzlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677858031; a=rsa-sha256; cv=none; b=uQ2qJkYjx+jGkGGzAd4cZ1nZaLeUq0NT1eWPe85LwXfVc1mcu3+0er1adrejNSZ+9gv9Qz 6ipDzk2yMt16CpbXxuQfJRQ3lXREcXYqtA1HURsXtkTq+HuqWHEwl96wH6W4cMlGDgN7II +iPP9Nppe6UnF/lXBgaamKGuxTaxsNDtsxC6zfjq+k8VZhrCiJyEbppanlfjChd69EU0Lx 8DwmSmcvW9bQJ9tRBAxdpF6yH8Clz4WopGbFsD0uGQU/2JKEhNEil1ZfvzdYbLZVuoPt9g hHG2ezycVARKABN0LWGokSaDttgGLMIRlvGKEC8SZUVv2w7dDRDfYLc9vjE5+Q== Received: from hal.tijl.coosemans.org (unknown [IPv6:2a02:a03f:894b:4700:5c15:2cf5:8c28:ae71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: tijl) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PSscb0YX5z10Tx; Fri, 3 Mar 2023 15:40:30 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Date: Fri, 3 Mar 2023 16:40:28 +0100 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Baptiste Daroussin , re@FreeBSD.org Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a28ccb32bf56 - main - machine-id: generate a compact version of the uuid Message-ID: <20230303164028.35766f35@hal.tijl.coosemans.org> In-Reply-To: <202303011818.321IIXIT067595@gitrepo.freebsd.org> References: <202303011818.321IIXIT067595@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On Wed, 1 Mar 2023 18:18:33 GMT Baptiste Daroussin wrote: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a28ccb32bf5678fc401f1602865ee9b37ca4c990 > > commit a28ccb32bf5678fc401f1602865ee9b37ca4c990 > Author: Baptiste Daroussin > AuthorDate: 2023-02-28 10:31:06 +0000 > Commit: Baptiste Daroussin > CommitDate: 2023-03-01 18:16:25 +0000 > > machine-id: generate a compact version of the uuid > > dbus and other actually expect an uuid without hyphens > > Reported by: tijl > MFC After: 3 days > --- > libexec/rc/rc.d/machine_id | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libexec/rc/rc.d/machine_id b/libexec/rc/rc.d/machine_id > index 7cfd7b2d92f8..8bf3e41d0603 100644 > --- a/libexec/rc/rc.d/machine_id > +++ b/libexec/rc/rc.d/machine_id > @@ -23,7 +23,7 @@ machine_id_start() > if [ ! -f ${machine_id_file} ] ; then > startmsg -n "Creating ${machine_id_file} " > t=$(mktemp -t machine-id) > - /bin/uuidgen -r -o $t > + /bin/uuidgen -r -c -o $t > install -C -o root -g wheel -m ${machine_id_perms} "$t" "${machine_id_file}" > rm -f "$t" > startmsg 'done.' I really think this file should be defined to contain the same UUID as /etc/hostid such that there's one and only one UUID per machine. Having two different IDs needlessly complicates things if they end up in logs etc. It also looks like on Linux virtual machines this file contains the SMBIOS UUID just like our /etc/hostid. If /etc/machine-id is supposed to be a portable way to obtain that UUID it should be the same as /etc/hostid. Please have another look at https://reviews.freebsd.org/D38811. This file is supposed to remain constant across updates. If we get this wrong in 13.2, applications may have to deal with the complications for a very long time.