Page MenuHomeFreeBSD

devel/dbus: Generate machine-id on install and whitelist it in

Authored by tobik on May 6 2018, 1:55 PM.


Group Reviewers
O5: Ports Framework(Owns No Changed Paths)

On new systems installing any application that uses the D-Bus library will abort with

D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/etc/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.

The reason for this is that ports r347320 removed @postexec dbus-uuidgen --ensure from the plist of devel/dbus to appease Poudriere in strict mode. So the machine-id is never generated until users start the D-Bus service (which not every wants to do) or run dbus-uuidgen --ensure manually afterwards. There are many support request for this on the FreeBSD forums and FreeBSD is also unique in subjecting users to this procedure.

This reintroduces generating the machine-id on install but also whitelists /var/lib/dbus/machine-id in Mk/Scripts/ so that Poudriere does not complain about leftover files.

Note that almost any functional FreeBSD desktop must have /var/lib/dbus/machine-id and it must remain the same across package installs/deinstalls so we cannot just track it in pkg-plist via an additional @postunexec.

Test Plan

Check with poudriere testport that /var/lib/dbus/machine-id exists in the jail after install of dbus.

Diff Detail

rP FreeBSD ports repository
No Linters Available
No Unit Test Coverage
Build Status
Buildable 16449
Build 16368: arc lint + arc unit

Event Timeline

tobik created this revision.May 6 2018, 1:55 PM
tobik edited the summary of this revision. (Show Details)May 6 2018, 3:28 PM
0mp added a subscriber: 0mp.May 21 2018, 11:13 PM
kwm added a subscriber: kwm.May 22 2018, 3:21 PM

The dbus change is approved. You still need portmgr@ for the Mk/ part as I don't have any say over that.

tobik abandoned this revision.Oct 20 2018, 5:05 PM
In D15324#327639, @kwm wrote:

The dbus change is approved. You still need portmgr@ for the Mk/ part as I don't have any say over that.

Thank you.

I'm abandoning this though because it has been open for too long and I don't care anymore.