Apt-check No such file: /var/lib/dbus/machine-id

Asked by Robert Hooper

Hello,

Recently I have started to get the following error from the apt-check script..
> E: Unknown Error: '<class 'FileNotFoundError'>' ([Errno 2] No such file or directory: '/var/lib/dbus/machine-id')
This is then breaking my wrapper script that only emails me when there are security updates.

Digging into this there is no machine-id file, it seems the slimmed down system Memset gave me doesn't include the dbus package.
I would like to keep the server as slim as possible and I don't really want to install dbus just to fix apt-check.. (its wanting to install systemd as its dependencies )

Looking in to apt-check this is only used in the UpdateManager.Core.UpdateList function and then only to generate a unique seed.

Is there any variable I can set to stop this?
Or perhaps there is another way to alert only on security updates?
I hope installing dbus isn't the only way.

Thanks in advance,
Rob.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

What is the output of this Terminal command?

uname -a; cat /etc/lsb-release

Revision history for this message
Robert Hooper (7ob) said :
#2

Ah apologies, I am seeing this on two servers details of both are below:

Linux foo.redacted.com 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:27:58 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"

Linux bar.redacted.com 3.13.0-91-generic #138-Ubuntu SMP Fri Jun 24 17:00:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

If you do not use dbus at all, and do not have it installed, but need that file, then a potential workaround might be to just create the file. As far as I know it should contain a unique uuid.
I cannot imagine that having an extra file like this could do harm, but still you do such modification on your own risk.

Remark: If update-manager-core does use that file, but does not have a dependency on the dbus package, then this is a bug.

Revision history for this message
Robert Hooper (7ob) said :
#4

Thanks Manfred Hampl, that solved my question.