Bug 13121

Summary: During CUPS Install: Unknown username "root" in message bus configuration file
Product: IPFire Reporter: Jon <jon.murphy>
Component: ---Assignee: Assigned to nobody - feel free to grab it and work on it <nobody>
Status: NEW --- QA Contact:
Severity: Minor Usability    
Priority: Will only affect a few users CC: adolf.belka, michael.tremer
Version: 2   
Hardware: unspecified   
OS: Unspecified   
See Also: https://bugzilla.ipfire.org/show_bug.cgi?id=13090
https://bugzilla.ipfire.org/show_bug.cgi?id=13017

Description Jon 2023-05-22 18:04:02 UTC
CUPS seems to work A-OK but I see these errors (below) when installing CUPS.  

I installed each CUPS dependency one at a time.  DBUS installed OK.  But the CUPS install causes these errors:

```
May 21 22:11:52 ipfireAPU pakfire: DOWNLOAD STARTED: lists/packages_list.db
May 21 22:11:54 ipfireAPU pakfire: DOWNLOAD FINISHED: pakfire2/2.27.1-x86_64/lists/packages_list.db
May 21 22:11:54 ipfireAPU pakfire: PAKFIRE RESV: cups: Resolving dependencies...
May 21 22:11:54 ipfireAPU pakfire: PAKFIRE RESV: cups: Dependency is already installed: avahi
May 21 22:11:54 ipfireAPU pakfire: PAKFIRE RESV: cups: Dependency is already installed: cups-filters
May 21 22:11:54 ipfireAPU pakfire: PAKFIRE RESV: cups: Dependency is already installed: dbus
May 21 22:11:54 ipfireAPU pakfire: PAKFIRE RESV: cups: Dependency is already installed: ghostscript
May 21 22:11:58 ipfireAPU pakfire: PAKFIRE INST: cups: Decrypting...
May 21 22:11:58 ipfireAPU pakfire: CLEANUP: tmp
May 21 22:11:58 ipfireAPU pakfire: DECRYPT STARTED: cups
May 21 22:11:58 ipfireAPU pakfire: DECRYPT FINISHED: cups - Status: 0
May 21 22:11:58 ipfireAPU pakfire: PAKFIRE INST: cups: Copying files and running post-installation scripts...
May 21 22:11:58 ipfireAPU dbus-daemon[23499]: Unknown username "root" in message bus configuration file
May 21 22:11:58 ipfireAPU last message repeated 2 times
May 21 22:11:58 ipfireAPU dbus-daemon[23499]: [system] Unable to reload configuration: Failed to open "/etc/dbus-1/system.conf": Permission denied
May 21 22:11:58 ipfireAPU dbus-daemon[23499]: Unable to reload configuration: Failed to open "/etc/dbus-1/system.conf": Permission denied
May 21 22:12:00 ipfireAPU dbus-daemon[23499]: [system] Reloaded configuration
May 21 22:12:00 ipfireAPU pakfire: CLEANUP: tmp
May 21 22:12:00 ipfireAPU pakfire: PAKFIRE INST: cups: Finished.
```
Comment 1 Jon 2023-08-23 00:07:45 UTC
The error above looks like it happens when opening a file that is no longer being used by dbus.  see line 2 in config file.

```
[root@ipfire ~] # cat /etc/dbus-1/system.conf
<!--
This configuration file is no longer required and may be removed.

In older versions of dbus, this file defined the behaviour of the well-known
system bus. That behaviour is now determined by
/usr/share/dbus-1/system.conf, which should not be edited.

For local configuration changes, create a file
system-local.conf or files matching system.d/*.conf in the same directory
as this one, with a <busconfig> element containing configuration directives.
These directives can override D-Bus or OS defaults.

For upstream or distribution-wide defaults that can be overridden
by a local sysadmin, create files matching
/usr/share/dbus-1/system.d/*.conf instead.
-->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig></busconfig>
[root@ipfire ~] # ls -al /etc/dbus-1/system.conf
-rw-r--r-- 1 root root 833 Jun  9 14:31 /etc/dbus-1/system.conf
[root@ipfire ~] # 

```


the same message appears in this config file:
```
[root@ipfire ~] # cat /etc/dbus-1/session.conf
<!--
This configuration file is no longer required and may be removed.

In older versions of dbus, this file defined the behaviour of the well-known
session bus. That behaviour is now determined by
/usr/share/dbus-1/session.conf, which should not be edited.

For local configuration changes, create a file
session-local.conf or files matching session.d/*.conf in the same directory
as this one, with a <busconfig> element containing configuration directives.
These directives can override D-Bus or OS defaults.

For upstream or distribution-wide defaults that can be overridden
by a local sysadmin, create files matching
/usr/share/dbus-1/session.d/*.conf instead.
-->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig></busconfig>
[root@ipfire ~] # 
```
Comment 2 Jon 2023-08-23 02:51:10 UTC
I found this:

From https://dbus.freedesktop.org/doc/dbus-daemon.1.html

"The --session option is equivalent to "--config-file=/usr/share/dbus-1/session.conf" and the --system option is equivalent to "--config-file=/usr/share/dbus-1/system.conf". By creating additional configuration files and using the --config-file option, additional special-purpose message bus daemons could be created."

is causing this error:
"Apr 19 21:37:41 ipfire dbus-daemon[2158]: " removed from each line
- [system] Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": No such file or directory
- Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": No such file or directory


And the messages initscript should change this:
loadproc -p "$pidfile" /usr/bin/dbus-daemon --system
loadproc -p "$pidfile" /usr/bin/dbus-daemon --config-file=/etc/dbus-session.conf

BUT seems to come from netatalk and nothing else!
see: the ipfire and config/rootfiles/packages/netatalk

And I am WAY over my head!

HELP!
Comment 3 Jon 2023-08-23 02:53:14 UTC
updated a few lines:

And the messages initscript should change this:
loadproc -p "$pidfile" /usr/bin/dbus-daemon --system

-to this:
loadproc -p "$pidfile" /usr/bin/dbus-daemon --config-file=/etc/dbus-session.conf