Date: Sat, 04 Mar 2023 06:03:16 +0000 From: "Baptiste Daroussin" <bapt@freebsd.org> To: "Mike Karels" <mike@karels.net>, "=?utf-8?B?VMSzbCBDb29zZW1hbnM=?=" <tijl@freebsd.org> Cc: re@freebsd.org, 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: <25c644b8deafb5436c76dbffd48adfd07518f513@freebsd.org> In-Reply-To: <98A14373-D09C-437D-AAB8-0A140FB46C5E@karels.net> References: <98A14373-D09C-437D-AAB8-0A140FB46C5E@karels.net> <202303011818.321IIXIT067595@gitrepo.freebsd.org> <20230303164028.35766f35@hal.tijl.coosemans.org>
next in thread | previous in thread | raw e-mail | index | archive | help
3 mars 2023 =C3=A0 17:12 "Mike Karels" <mike@karels.net> a =C3=A9crit: >=20 >=20On 3 Mar 2023, at 9:40, T=C4=B3l Coosemans wrote: >=20 >=20>=20 >=20> On Wed, 1 Mar 2023 18:18:33 GMT Baptiste Daroussin <bapt@FreeBSD.or= g> wrote: > >=20 >=20> >=20 >=20> > The branch main has been updated by bapt: > > >=20 >=20> > URL:=20 >=20> > https://cgit.freebsd.org/src/commit/?id=3Da28ccb32bf5678fc401f160= 2865ee9b37ca4c990 > > >=20 >=20> > commit a28ccb32bf5678fc401f1602865ee9b37ca4c990 > > >=20 >=20> > Author: Baptiste Daroussin <bapt@FreeBSD.org> > > >=20 >=20> > AuthorDate: 2023-02-28 10:31:06 +0000 > > >=20 >=20> > Commit: Baptiste Daroussin <bapt@FreeBSD.org> > > >=20 >=20> > CommitDate: 2023-03-01 18:16:25 +0000 > > >=20 >=20> > machine-id: generate a compact version of the uuid > > >=20 >=20> > dbus and other actually expect an uuid without hyphens > > >=20 >=20> > Reported by: tijl > > >=20 >=20> > MFC After: 3 days > > >=20 >=20> > --- > > >=20 >=20> > libexec/rc/rc.d/machine_id | 2 +- > > >=20 >=20> > 1 file changed, 1 insertion(+), 1 deletion(-) > > >=20 >=20> > diff --git a/libexec/rc/rc.d/machine_id b/libexec/rc/rc.d/machin= e_id > > >=20 >=20> > index 7cfd7b2d92f8..8bf3e41d0603 100644 > > >=20 >=20> > --- a/libexec/rc/rc.d/machine_id > > >=20 >=20> > +++ b/libexec/rc/rc.d/machine_id > > >=20 >=20> > @@ -23,7 +23,7 @@ machine_id_start() > > >=20 >=20> > if [ ! -f ${machine_id_file} ] ; then > > >=20 >=20> > startmsg -n "Creating ${machine_id_file} " > > >=20 >=20> > t=3D$(mktemp -t machine-id) > > >=20 >=20> > - /bin/uuidgen -r -o $t > > >=20 >=20> > + /bin/uuidgen -r -c -o $t > > >=20 >=20> > install -C -o root -g wheel -m ${machine_id_perms} "$t" "${machi= ne_id_file}" > > >=20 >=20> > rm -f "$t" > > >=20 >=20> > startmsg 'done.' > > >=20 >=20>=20 >=20> I really think this file should be defined to contain the same UUI= D as > >=20 >=20> /etc/hostid such that there's one and only one UUID per machine. H= aving > >=20 >=20> two different IDs needlessly complicates things if they end up in = logs > >=20 >=20> etc. > >=20 >=20> It also looks like on Linux virtual machines this file contains th= e > >=20 >=20> SMBIOS UUID just like our /etc/hostid. If /etc/machine-id is suppo= sed > >=20 >=20> to be a portable way to obtain that UUID it should be the same as > >=20 >=20> /etc/hostid. > >=20 >=20 > I agree. I had the same reaction when the machine-id was added, but >=20 >=20thought the requirements were different (in particular, the UUID vers= ion). >=20 >=20If at all possible, the two should be the same except for hyphens. >=20 >=20>=20 >=20> Please have another look at . This > > https://reviews.freebsd.org/D38811 > > file is supposed to remain constant across updates. If we get this > >=20 >=20> wrong in 13.2, applications may have to deal with the complication= s for > >=20 >=20> a very long time. > >=20 >=20 > This should be resolved for 13.2 if at all possible. >=20 >=20 Mike > The requirements are diff=C3=A9rent rfc 422 yes would accept what hostid = format uses still all new uuid should follow rfc422. Best regards Bapt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25c644b8deafb5436c76dbffd48adfd07518f513>