[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1014431: popularity-contest: automatically create hostid if not specified in popularity-contest.conf



On Wed, 2022-07-13 at 18:26 +0200, Bill Allombert wrote:
> On Wed, Jul 06, 2022 at 12:05:49AM +0200, Ansgar wrote:
> > Package: popularity-contest
> > Version: 1.73
> > Severity: wishlist
> > 
> > It would be nice if it was not required to have host-specific data
> > in
> > the configuration file (MY_HOSTID).
> 
> > If no MY_HOSTID is specified, popularity-contest could for example
> > generate an application-specific MY_HOSTID from the machine-id as
> > described for libsystemd's `sd_id128_get_machine_app_specific`
> > function (i.e., HMAC-SHA256 of a application ID for
> > popularity-contents keyed by the machine-id).
> 
> Hello Ansgar,
> 
> What is the life cycle of the machine-id ? How would that work while
> fulfilling all the goal of MY_HOSTID ?

>From man:machine-id(5):

+---
| The machine ID is usually generated from a random source during
| system installation or first boot and stays constant for all
| subsequent boots. Optionally, for stateless systems, it is generated
| during runtime during early boot if necessary.
+---

That looks like it fulfills what I guess popcon needs.

(But please do not use the machine-id directly, but hashed as described
above.)

> What would be the advantage ?

No host-specific configuration would be required for popcon. One can
just install an identical popularity-contest.conf on several machines
instead of having to deal with a host-specific setting (MY_HOSTID).

Ansgar


Reply to: