Bug 13090 - During CUPS Install: "Unable to reload configuration: Failed to open "/etc/dbus-1/system.conf": Permission denied
Summary: During CUPS Install: "Unable to reload configuration: Failed to open "/etc/db...
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: - Unknown - - Unknown -
Assignee: Jon
QA Contact:
URL:
Keywords:
Depends on: 13094
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-24 16:18 UTC by Jon
Modified: 2023-06-22 21:32 UTC (History)
3 users (show)

See Also:


Attachments
my commit (190.19 KB, image/png)
2023-04-26 15:11 UTC, Jon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon 2023-04-24 16:18:40 UTC
When installing cups I see a few dbus errors:  
```
Apr 23 16:07:35 ipfireAPU dbus-daemon[1991]: [system] Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": No such file or directory
Apr 23 16:07:35 ipfireAPU dbus-daemon[1991]: Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": No such file or directory
```

And this error:
`Apr 23 16:07:36 ipfireAPU useradd[4920]: failed adding user 'messagebus', exit code: 9`

On my test box I see these error back to Dec 2022 (CU 172).
On my production box I see these error back to June 2022 (CU 168).


Here are more lines from the message log:
```
Apr 23 16:07:21 ipfireAPU pakfire: DOWNLOAD STARTED: paks/cups-2.4.2-33.ipfire
Apr 23 16:07:21 ipfireAPU pakfire: MIRROR INFO: 26 servers found in list
Apr 23 16:07:21 ipfireAPU pakfire: DOWNLOAD INFO: Host: ipfire.earl-net.com (HTTPS) - File: pakfire2/2.27-x86_64/paks/cups-2.4.2-33.ipfire
Apr 23 16:07:23 ipfireAPU pakfire: DOWNLOAD INFO: pakfire2/2.27-x86_64/paks/cups-2.4.2-33.ipfire has size of 7061065 bytes
Apr 23 16:07:25 ipfireAPU pakfire: DOWNLOAD INFO: HTTP-Status-Code: 200 - 200 OK
Apr 23 16:07:25 ipfireAPU pakfire: DOWNLOAD INFO: File received. Start checking signature...
Apr 23 16:07:26 ipfireAPU pakfire: DOWNLOAD INFO: Signature of cups-2.4.2-33.ipfire is fine.
Apr 23 16:07:26 ipfireAPU pakfire: DOWNLOAD FINISHED: pakfire2/2.27-x86_64/paks/cups-2.4.2-33.ipfire
Apr 23 16:07:26 ipfireAPU pakfire: DOWNLOAD STARTED: paks/cups-filters-1.28.16-12.ipfire
Apr 23 16:07:26 ipfireAPU pakfire: MIRROR INFO: 26 servers found in list
Apr 23 16:07:26 ipfireAPU pakfire: DOWNLOAD INFO: Host: mirror.easyname.at (HTTPS) - File: ipfire/pakfire2/2.27-x86_64/paks/cups-filters-1.28.16-12.ipfire
Apr 23 16:07:27 ipfireAPU pakfire: DOWNLOAD INFO: ipfire/pakfire2/2.27-x86_64/paks/cups-filters-1.28.16-12.ipfire has size of 743566 bytes
Apr 23 16:07:28 ipfireAPU pakfire: DOWNLOAD INFO: HTTP-Status-Code: 200 - 200 OK
Apr 23 16:07:28 ipfireAPU pakfire: DOWNLOAD INFO: File received. Start checking signature...
Apr 23 16:07:28 ipfireAPU pakfire: DOWNLOAD INFO: Signature of cups-filters-1.28.16-12.ipfire is fine.
Apr 23 16:07:29 ipfireAPU pakfire: DOWNLOAD FINISHED: ipfire/pakfire2/2.27-x86_64/paks/cups-filters-1.28.16-12.ipfire
Apr 23 16:07:29 ipfireAPU pakfire: PAKFIRE INST: ghostscript: Decrypting...
Apr 23 16:07:29 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:29 ipfireAPU pakfire: DECRYPT STARTED: ghostscript
Apr 23 16:07:30 ipfireAPU pakfire: DECRYPT FINISHED: ghostscript - Status: 0
Apr 23 16:07:30 ipfireAPU pakfire: PAKFIRE INST: ghostscript: Copying files and running post-installation scripts...
Apr 23 16:07:34 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:34 ipfireAPU pakfire: PAKFIRE INST: ghostscript: Finished.
Apr 23 16:07:34 ipfireAPU pakfire: PAKFIRE INST: libdaemon: Decrypting...
Apr 23 16:07:34 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:35 ipfireAPU pakfire: DECRYPT STARTED: libdaemon
Apr 23 16:07:35 ipfireAPU pakfire: DECRYPT FINISHED: libdaemon - Status: 0
Apr 23 16:07:35 ipfireAPU pakfire: PAKFIRE INST: libdaemon: Copying files and running post-installation scripts...
Apr 23 16:07:35 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:35 ipfireAPU pakfire: PAKFIRE INST: libdaemon: Finished.
Apr 23 16:07:35 ipfireAPU pakfire: PAKFIRE INST: avahi: Decrypting...
Apr 23 16:07:35 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:35 ipfireAPU pakfire: DECRYPT STARTED: avahi
Apr 23 16:07:35 ipfireAPU pakfire: DECRYPT FINISHED: avahi - Status: 0
Apr 23 16:07:35 ipfireAPU pakfire: PAKFIRE INST: avahi: Copying files and running post-installation scripts...
Apr 23 16:07:35 ipfireAPU dbus-daemon[1991]: [system] Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": No such file or directory
Apr 23 16:07:35 ipfireAPU dbus-daemon[1991]: Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": No such file or directory
Apr 23 16:07:35 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:35 ipfireAPU pakfire: PAKFIRE INST: avahi: Finished.
Apr 23 16:07:35 ipfireAPU pakfire: PAKFIRE INST: cups-filters: Decrypting...
Apr 23 16:07:35 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:35 ipfireAPU pakfire: DECRYPT STARTED: cups-filters
Apr 23 16:07:35 ipfireAPU pakfire: DECRYPT FINISHED: cups-filters - Status: 0
Apr 23 16:07:35 ipfireAPU pakfire: PAKFIRE INST: cups-filters: Copying files and running post-installation scripts...
Apr 23 16:07:36 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:36 ipfireAPU pakfire: PAKFIRE INST: cups-filters: Finished.
Apr 23 16:07:36 ipfireAPU pakfire: PAKFIRE INST: dbus: Decrypting...
Apr 23 16:07:36 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:36 ipfireAPU pakfire: DECRYPT STARTED: dbus
Apr 23 16:07:36 ipfireAPU pakfire: DECRYPT FINISHED: dbus - Status: 0
Apr 23 16:07:36 ipfireAPU pakfire: PAKFIRE INST: dbus: Copying files and running post-installation scripts...
Apr 23 16:07:36 ipfireAPU useradd[4920]: failed adding user 'messagebus', exit code: 9
Apr 23 16:07:36 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:36 ipfireAPU pakfire: PAKFIRE INST: dbus: Finished.
Apr 23 16:07:36 ipfireAPU pakfire: PAKFIRE INST: cups: Decrypting...
Apr 23 16:07:36 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:36 ipfireAPU pakfire: DECRYPT STARTED: cups
Apr 23 16:07:37 ipfireAPU pakfire: DECRYPT FINISHED: cups - Status: 0
Apr 23 16:07:37 ipfireAPU pakfire: PAKFIRE INST: cups: Copying files and running post-installation scripts...
Apr 23 16:07:37 ipfireAPU dbus-daemon[1991]: Unknown username "root" in message bus configuration file
Apr 23 16:07:37 ipfireAPU last message repeated 2 times
Apr 23 16:07:37 ipfireAPU dbus-daemon[1991]: [system] Unable to reload configuration: Failed to open "/etc/dbus-1/system.conf": Permission denied
Apr 23 16:07:37 ipfireAPU dbus-daemon[1991]: Unable to reload configuration: Failed to open "/etc/dbus-1/system.conf": Permission denied
Apr 23 16:07:39 ipfireAPU dbus-daemon[1991]: [system] Reloaded configuration
Apr 23 16:07:39 ipfireAPU pakfire: CLEANUP: tmp
Apr 23 16:07:39 ipfireAPU pakfire: PAKFIRE INST: cups: Finished.
```
Comment 1 Jon 2023-04-24 16:32:22 UTC
If I remove CUPS and then install CUPS I see the same errors (except for the user add error)

Also this is tested on:
APU4d4
IPFire 2.27 (x86_64) - Core-Update 174 (stable)

Apr 24 11:24:25 ipfireAPU pakfire: PAKFIRE INFO: IPFire Pakfire 2.27-x86_64 started!
Apr 24 11:24:25 ipfireAPU pakfire: DB INFO: packages_list.db is 31212 seconds old. - DEBUG: force
Apr 24 11:24:25 ipfireAPU pakfire: DOWNLOAD STARTED: lists/packages_list.db
Apr 24 11:24:25 ipfireAPU pakfire: MIRROR INFO: 25 servers found in list
Apr 24 11:24:25 ipfireAPU pakfire: DOWNLOAD INFO: Host: mirror.clarkson.edu (HTTPS) - File: ipfire/pakfire2/2.27-x86_64/lists/packages_list.db
Apr 24 11:24:26 ipfireAPU pakfire: DOWNLOAD INFO: ipfire/pakfire2/2.27-x86_64/lists/packages_list.db has size of 5247 bytes
Apr 24 11:24:26 ipfireAPU pakfire: DOWNLOAD INFO: HTTP-Status-Code: 200 - 200 OK
Apr 24 11:24:26 ipfireAPU pakfire: DOWNLOAD INFO: File received. Start checking signature...
Apr 24 11:24:26 ipfireAPU pakfire: DOWNLOAD INFO: Signature of packages_list.db is fine.
Apr 24 11:24:26 ipfireAPU pakfire: DOWNLOAD FINISHED: ipfire/pakfire2/2.27-x86_64/lists/packages_list.db
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE RESV: cups: Resolving dependencies...
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE RESV: cups: Dependency is already installed: avahi
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE RESV: cups: Need to install dependency: cups-filters
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE RESV: cups: Dependency is already installed: dbus
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE RESV: cups: Dependency is already installed: ghostscript
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE RESV: cups-filters: Resolving dependencies...
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE RESV: cups-filters: Need to install dependency: cups
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE RESV: cups-filters: Dependency is already installed: ghostscript
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE INFO: Packages to install for dependencies:
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE INFO: cups-filters ^I - 740.00 KB
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE INFO: Packages to install:
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE INFO: cups ^I - 6.76 MB
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE INFO: Total size: ^I ~ 7.48 MB
Apr 24 11:24:26 ipfireAPU pakfire: PAKFIRE INFO: Is this okay? [y/N]
Apr 24 11:24:33 ipfireAPU pakfire: PAKFIRE INFO: Answer: y
Apr 24 11:24:33 ipfireAPU pakfire: PAKFIRE INST: cups-filters: Decrypting...
Apr 24 11:24:33 ipfireAPU pakfire: CLEANUP: tmp
Apr 24 11:24:33 ipfireAPU pakfire: DECRYPT STARTED: cups-filters
Apr 24 11:24:33 ipfireAPU pakfire: DECRYPT FINISHED: cups-filters - Status: 0
Apr 24 11:24:33 ipfireAPU pakfire: PAKFIRE INST: cups-filters: Copying files and running post-installation scripts...
Apr 24 11:24:34 ipfireAPU pakfire: CLEANUP: tmp
Apr 24 11:24:34 ipfireAPU pakfire: PAKFIRE INST: cups-filters: Finished.
Apr 24 11:24:34 ipfireAPU pakfire: PAKFIRE INST: cups: Decrypting...
Apr 24 11:24:34 ipfireAPU pakfire: CLEANUP: tmp
Apr 24 11:24:34 ipfireAPU pakfire: DECRYPT STARTED: cups
Apr 24 11:24:34 ipfireAPU pakfire: DECRYPT FINISHED: cups - Status: 0
Apr 24 11:24:34 ipfireAPU pakfire: PAKFIRE INST: cups: Copying files and running post-installation scripts...
Apr 24 11:24:34 ipfireAPU dbus-daemon[1990]: Unknown username "root" in message bus configuration file
Apr 24 11:24:34 ipfireAPU last message repeated 2 times
Apr 24 11:24:34 ipfireAPU dbus-daemon[1990]: [system] Unable to reload configuration: Failed to open "/etc/dbus-1/system.conf": Permission denied
Apr 24 11:24:34 ipfireAPU dbus-daemon[1990]: Unable to reload configuration: Failed to open "/etc/dbus-1/system.conf": Permission denied
Apr 24 11:24:34 ipfireAPU dbus-daemon[1990]: [system] Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": Permission denied
Apr 24 11:24:34 ipfireAPU dbus-daemon[1990]: Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": Permission denied
Apr 24 11:24:36 ipfireAPU dbus-daemon[1990]: [system] Reloaded configuration
Apr 24 11:24:36 ipfireAPU pakfire: CLEANUP: tmp
Apr 24 11:24:36 ipfireAPU pakfire: PAKFIRE INST: cups: Finished.
Apr 24 11:24:36 ipfireAPU pakfire: PAKFIRE INFO: Pakfire has finished. Closing.
[root@ipfireAPU ~] # 

[root@ipfireAPU ~] # cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
mail:x:8:12:mail:/var/spool/mail:/bin/false
squid:x:23:23:ftp:/var/spool/squid:/bin/false
ntp:x:38:38::/etc/ntp:/bin/false
ftp:x:45:45:anonymous_user:/home/ftp:/bin/false
rsyncd:x:48:48:rsyncd Daemon:/home/rsync:/bin/false
stunnel:x:51:51:stunnel Daemon:/var/lib/stunnel:/bin/false
dhcpcd:x:52:52:dhcpcd privsep user:/run/dhcpcd/chroot:/bin/false
sshd:x:74:74:sshd:/var/empty:/bin/false
nobody:x:99:99:Nobody:/home/nobody:/bin/false
postfix:x:100:100::/var/spool/postfix:/bin/false
suricata:x:101:101:Suricata:/var/log/suricata:/bin/false
logwatch:x:102:102::/var/log/logwatch:/bin/false
cron:x:104:104::/:/bin/false
syslogd:x:105:105:/var/empty:/bin/false
klogd:x:106:106:/var/empty:/bin/false
clamav:x:109:109:Clam AntiVirus:/home/clamav:/bin/false
amavis:x:110:110:Amavisd-new user:/var/amavis:
cyrus:x:111:12:Cyrus user:/usr/cyrus:
filter:x:112:12:Spam user:/home/filter:/bin/false
asterisk:x:114:114:Asterisk user:/var/empty:/bin/false
zabbix:x:118:118:Zabbix Monitoring:/var/empty:/bin/false
samba:x:1000:1000:Samba User:/var/empty:/bin/false
avahi:x:999:999:Avahi mDNS daemon:/var/run/avahi-daemon:/sbin/nologin
messagebus:x:1001:1001::/home/messagebus:/bin/bash
homer:x:1002:100::/home/homer:/bin/bash

[root@ipfireAPU ~] # ls -al /usr/share/dbus-1/system.conf
-rw-r--r-- 1 root root 5810 Mar 14 11:12 /usr/share/dbus-1/system.conf
[root@ipfireAPU ~] #
Comment 2 Jon 2023-04-24 19:40:19 UTC
it looks like the message "failed adding user 'messagebus', exit code: 9" is not a big issue (it could be ignored).

This can be easily fixed by updating the dbus (messagebus) `install.sh` file.

remove this:
`useradd messagebus`

and replace with this:
`id -u messagebus &>/dev/null || useradd -r -d /var/empty -s /bin/false messagebus`


I am not sure about the "Failed to open "/usr/share/dbus-1/system.conf": No such file or directory" error message since the files exists and looks OK.


```
[root@ipfireAPU ~] # ls -al /usr/share/dbus-1/system.conf
-rw-r--r-- 1 root root 5810 Mar 14 11:12 /usr/share/dbus-1/system.conf
[root@ipfireAPU ~] # 
```
Comment 3 Michael Tremer 2023-04-25 09:08:43 UTC
(In reply to Jon from comment #2)
> and replace with this:
> `id -u messagebus &>/dev/null || useradd -r -d /var/empty -s /bin/false
> messagebus`

Yes, this is how it should be. Probably it is the same in other places where we create custom system users.

Would you like to propose a patch?
Comment 4 Adolf Belka 2023-04-25 10:02:31 UTC
I don't see those messages on the Core-Update 175 Development Build: bug-12924/3274424a-dirty that I have running for my Cups build work.

I uninstalled all cups related programs and then installed cups and its dependencies and here is the log I got.

Apr 25 11:54:48 ipfire pakfire: PAKFIRE INFO: IPFire Pakfire 2.27-x86_64 started!
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: cups: Resolving dependencies...
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: cups: Need to install dependency: avahi
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: cups: Need to install dependency: cups-filters
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: cups: Need to install dependency: dbus
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: cups: Need to install dependency: ghostscript
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: ghostscript: Resolving dependencies...
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: ghostscript: Need to install dependency: cups
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: ghostscript: Need to install dependency: dbus
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: dbus: Resolving dependencies...
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: cups-filters: Resolving dependencies...
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: cups-filters: Need to install dependency: cups
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: cups-filters: Need to install dependency: ghostscript
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: avahi: Resolving dependencies...
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: avahi: Need to install dependency: dbus
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: avahi: Need to install dependency: libdaemon
Apr 25 11:54:48 ipfire pakfire: PAKFIRE RESV: libdaemon: Resolving dependencies...
Apr 25 11:54:48 ipfire pakfire: PAKFIRE INFO: Pakfire has finished. Closing.
Apr 25 11:54:51 ipfire pakfire: PAKFIRE INFO: IPFire Pakfire 2.27-x86_64 started!
Apr 25 11:54:51 ipfire pakfire: DB INFO: packages_list.db is 2156 seconds old. - DEBUG: noforce
Apr 25 11:54:51 ipfire pakfire: DOWNLOAD STARTED: meta/meta-ghostscript
Apr 25 11:54:51 ipfire pakfire: MIRROR INFO: 26 servers found in list
Apr 25 11:54:51 ipfire pakfire: DOWNLOAD INFO: Host: mirrors.ocf.berkeley.edu (HTTPS) - File: ipfire/pakfire2/2.27-x86_64/meta/meta-ghostscript
Apr 25 11:54:53 ipfire pakfire: DOWNLOAD INFO: ipfire/pakfire2/2.27-x86_64/meta/meta-ghostscript has size of 1077 bytes
Apr 25 11:54:54 ipfire pakfire: DOWNLOAD INFO: HTTP-Status-Code: 200 - 200 OK
Apr 25 11:54:54 ipfire pakfire: DOWNLOAD INFO: File received. Start checking signature...
Apr 25 11:54:54 ipfire pakfire: DOWNLOAD INFO: Signature of meta-ghostscript is fine.
Apr 25 11:54:54 ipfire pakfire: DOWNLOAD FINISHED: ipfire/pakfire2/2.27-x86_64/meta/meta-ghostscript
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: cups: Resolving dependencies...
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: cups: Need to install dependency: avahi
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: cups: Need to install dependency: cups-filters
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: cups: Need to install dependency: dbus
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: cups: Need to install dependency: ghostscript
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: ghostscript: Resolving dependencies...
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: ghostscript: Need to install dependency: cups
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: ghostscript: Need to install dependency: dbus
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: dbus: Resolving dependencies...
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: cups-filters: Resolving dependencies...
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: cups-filters: Need to install dependency: cups
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: cups-filters: Need to install dependency: ghostscript
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: avahi: Resolving dependencies...
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: avahi: Need to install dependency: dbus
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: avahi: Need to install dependency: libdaemon
Apr 25 11:54:54 ipfire pakfire: PAKFIRE RESV: libdaemon: Resolving dependencies...
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: Packages to install for dependencies:
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: ghostscript ^I - 16.88 MB
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: cups-filters ^I - 740.00 KB
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: dbus ^I - 250.00 KB
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: avahi ^I - 220.00 KB
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: libdaemon ^I - 20.00 KB
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: Packages to install:
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: cups ^I - 6.76 MB
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: Total size: ^I ~ 24.83 MB
Apr 25 11:54:54 ipfire pakfire: PAKFIRE INFO: Interaction skipped.
Apr 25 11:54:54 ipfire pakfire: DOWNLOAD STARTED: paks/ghostscript-10.0.0-13.ipfire
Apr 25 11:54:54 ipfire pakfire: MIRROR INFO: 26 servers found in list
Apr 25 11:54:54 ipfire pakfire: DOWNLOAD INFO: Host: ftp.fau.de (HTTPS) - File: ipfire/pakfire2/2.27-x86_64/paks/ghostscript-10.0.0-13.ipfire
Apr 25 11:54:54 ipfire pakfire: DOWNLOAD INFO: ipfire/pakfire2/2.27-x86_64/paks/ghostscript-10.0.0-13.ipfire has size of 17715894 bytes
Apr 25 11:54:55 ipfire pakfire: DOWNLOAD INFO: HTTP-Status-Code: 200 - 200 OK
Apr 25 11:54:55 ipfire pakfire: DOWNLOAD INFO: File received. Start checking signature...
Apr 25 11:54:55 ipfire pakfire: DOWNLOAD INFO: Signature of ghostscript-10.0.0-13.ipfire is fine.
Apr 25 11:54:55 ipfire pakfire: DOWNLOAD FINISHED: ipfire/pakfire2/2.27-x86_64/paks/ghostscript-10.0.0-13.ipfire
Apr 25 11:54:55 ipfire pakfire: PAKFIRE INST: ghostscript: Decrypting...
Apr 25 11:54:55 ipfire pakfire: CLEANUP: tmp
Apr 25 11:54:55 ipfire pakfire: DECRYPT STARTED: ghostscript
Apr 25 11:54:55 ipfire pakfire: DECRYPT FINISHED: ghostscript - Status: 0
Apr 25 11:54:55 ipfire pakfire: PAKFIRE INST: ghostscript: Copying files and running post-installation scripts...
Apr 25 11:55:01 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: ghostscript: Finished.
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: cups-filters: Decrypting...
Apr 25 11:55:01 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:01 ipfire pakfire: DECRYPT STARTED: cups-filters
Apr 25 11:55:01 ipfire pakfire: DECRYPT FINISHED: cups-filters - Status: 0
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: cups-filters: Copying files and running post-installation scripts...
Apr 25 11:55:01 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: cups-filters: Finished.
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: dbus: Decrypting...
Apr 25 11:55:01 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:01 ipfire pakfire: DECRYPT STARTED: dbus
Apr 25 11:55:01 ipfire pakfire: DECRYPT FINISHED: dbus - Status: 0
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: dbus: Copying files and running post-installation scripts...
Apr 25 11:55:01 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: dbus: Finished.
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: avahi: Decrypting...
Apr 25 11:55:01 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:01 ipfire pakfire: DECRYPT STARTED: avahi
Apr 25 11:55:01 ipfire pakfire: DECRYPT FINISHED: avahi - Status: 0
Apr 25 11:55:01 ipfire pakfire: PAKFIRE INST: avahi: Copying files and running post-installation scripts...
Apr 25 11:55:03 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:03 ipfire pakfire: PAKFIRE INST: avahi: Finished.
Apr 25 11:55:03 ipfire pakfire: PAKFIRE INST: libdaemon: Decrypting...
Apr 25 11:55:03 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:03 ipfire pakfire: DECRYPT STARTED: libdaemon
Apr 25 11:55:03 ipfire pakfire: DECRYPT FINISHED: libdaemon - Status: 0
Apr 25 11:55:03 ipfire pakfire: PAKFIRE INST: libdaemon: Copying files and running post-installation scripts...
Apr 25 11:55:03 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:03 ipfire pakfire: PAKFIRE INST: libdaemon: Finished.
Apr 25 11:55:03 ipfire pakfire: PAKFIRE INST: cups: Decrypting...
Apr 25 11:55:03 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:03 ipfire pakfire: DECRYPT STARTED: cups
Apr 25 11:55:03 ipfire pakfire: DECRYPT FINISHED: cups - Status: 0
Apr 25 11:55:03 ipfire pakfire: PAKFIRE INST: cups: Copying files and running post-installation scripts...
Apr 25 11:55:05 ipfire pakfire: CLEANUP: tmp
Apr 25 11:55:05 ipfire pakfire: PAKFIRE INST: cups: Finished.
Apr 25 11:55:05 ipfire pakfire: PAKFIRE INFO: Pakfire has finished. Closing.


dbus installed without any messages from the post-installation scripts.

I will do the same test on a CU174 vm system and report back.
Comment 5 Adolf Belka 2023-04-25 10:40:27 UTC
Just tested installing cups in a Core Update 174 system and no problems again. The same sort of log messages as in my last try, just some of the mirror names are different.

No error messages anywhere and definitely not related to dbus.

The permissions and ownership of /usr/share/dbus-1/system.conf on my systems are the same as you have shown.
Comment 6 Jon 2023-04-25 19:45:50 UTC
I'll try building up something from scratch.

I can trace the same error back a few years.  The earliest I found the error is Feb 8 2019 on CU 127.

From the message logs, it looks like it happened when I removed cups and dbus (and dependency files).

Feb  8 17:30:59 ipfire pakfire: PAKFIRE INFO: IPFire Pakfire 2.21-x86_64 started!
Feb  8 17:30:59 ipfire pakfire: PAKFIRE INFO: Packages to remove:
Feb  8 17:30:59 ipfire pakfire: PAKFIRE INFO: cups ^I - 8.18 MB
Feb  8 17:30:59 ipfire pakfire: PAKFIRE REMV: cups: Decrypting...
Feb  8 17:30:59 ipfire pakfire: CLEANUP: tmp
Feb  8 17:30:59 ipfire pakfire: DECRYPT STARTED: cups
Feb  8 17:31:00 ipfire pakfire: DECRYPT FINISHED: cups - Status: 0
Feb  8 17:31:00 ipfire pakfire: PAKFIRE REMV: cups: Removing files and running post-removing scripts...
Feb  8 17:31:01 ipfire dbus-daemon[26109]: [system] Reloaded configuration
Feb  8 17:31:02 ipfire pakfire: CLEANUP: tmp
Feb  8 17:31:02 ipfire pakfire: PAKFIRE REMV: cups: Finished.
Feb  8 17:31:02 ipfire pakfire: PAKFIRE INFO: Pakfire has finished. Closing.

Feb  8 17:31:24 ipfire pakfire: PAKFIRE INFO: IPFire Pakfire 2.21-x86_64 started!
Feb  8 17:31:24 ipfire pakfire: PAKFIRE RESV: dbus: Resolving dependencies...
Feb  8 17:31:24 ipfire pakfire: PAKFIRE INFO: Pakfire has finished. Closing.

Feb  8 17:31:27 ipfire pakfire: PAKFIRE INFO: IPFire Pakfire 2.21-x86_64 started!
Feb  8 17:31:27 ipfire pakfire: PAKFIRE INFO: Packages to remove:
Feb  8 17:31:27 ipfire pakfire: PAKFIRE INFO: dbus ^I - 260.00 KB
Feb  8 17:31:27 ipfire pakfire: PAKFIRE REMV: dbus: Decrypting...
Feb  8 17:31:27 ipfire pakfire: CLEANUP: tmp
Feb  8 17:31:27 ipfire pakfire: DECRYPT STARTED: dbus
Feb  8 17:31:27 ipfire pakfire: DECRYPT FINISHED: dbus - Status: 0
Feb  8 17:31:27 ipfire pakfire: PAKFIRE REMV: dbus: Removing files and running post-removing scripts...
Feb  8 17:31:27 ipfire dbus-daemon[26109]: [system] Reloaded configuration
Feb  8 17:31:27 ipfire dbus-daemon[26109]: [system] Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": No such file or directory
Feb  8 17:31:27 ipfire dbus-daemon[26109]: Unable to reload configuration: Failed to open "/usr/share/dbus-1/system.conf": No such file or directory
Feb  8 17:31:27 ipfire pakfire: CLEANUP: tmp
Feb  8 17:31:27 ipfire pakfire: PAKFIRE REMV: dbus: Finished.
Feb  8 17:31:27 ipfire pakfire: PAKFIRE INFO: Pakfire has finished. Closing.
Comment 7 Jon 2023-04-25 19:51:15 UTC
(In reply to Michael Tremer from comment #3)
> (In reply to Jon from comment #2)
> Yes, this is how it should be. Probably it is the same in other places where
> we create custom system users.
> 
> Would you like to propose a patch?

Yes, I can do that!
Comment 8 Jon 2023-04-25 19:59:57 UTC
I wonder (out loud) if messagebus needs to stop before uninstalling dbus?
Comment 9 Jon 2023-04-25 20:07:20 UTC
never mind...  It looks like it stops.
Comment 10 Adolf Belka 2023-04-25 20:47:09 UTC
(In reply to Jon from comment #9)
> never mind...  It looks like it stops.

Yes the uninstall.sh file has a stop_service command before removing all the files.
Comment 11 Jon 2023-04-26 03:07:20 UTC
hmm it may not be working...

```
[root@ipfireAPU ] # pakfire remove dbus

PAKFIRE INFO: Packages to remove:
PAKFIRE INFO: dbus 	 - 250.00 KB
PAKFIRE INFO: Is this okay? [y/N]
y
PAKFIRE REMV: dbus: Decrypting...
PAKFIRE REMV: dbus: Removing files and running post-removing scripts...
PAKFIRE REMV: dbus: Finished.

[root@ipfireAPU ] # ps aux | grep dbus | grep -v grep
message+ 24779  0.0  0.0   4164  1888 ?        Ss   22:00   0:00 /usr/bin/dbus-daemon --system
```
Comment 12 Adolf Belka 2023-04-26 07:43:04 UTC
When you told pakfire to remove dbus, had you already removed cups, avahi and ghostscript. All of those packages depend on dbus and it acts as the communication bus between them. As long as one of those is still present then the dbus daemon will stay in place because it is being used.

At least that is my understanding of how it is likely to work.

so remove cups, ghostscript, avahi and dbus and check again after that.

You can also use theinitscript status command to see what it thinks the status is
/etc/init.d/messagebus status
Comment 13 Adolf Belka 2023-04-26 08:42:23 UTC
You probably had removed the whole set of cups related packages.

I just did that and found the same as you. So yes it looks like the killproc command in the initscript is not working as expected.

Reading through the code for the killproc then if it finds that the pid is still in existence it should provide a failure message but that doesn't happen so it looks like the request does not end up in the right if loops of the killproc code.
It is a bit more complicated than I am able to follow.

I think that you should raise that as a separate bug. The dbus-daemon just seems to keep running unless a reboot is done and that is not correct, plus there is no error message that ends up in the log file.
Comment 14 Adolf Belka 2023-04-26 08:51:12 UTC
I have figured out wht the problem is with the dbus daemon.

The messagebus initscript stop command is working fine. The problem is that the command in the paks uninstall.sh file is

stop_service ${NAME}

which takes the package name which is dbus but the initscript is called messagebus.

So the uninstall.sh file tries to run

/etc/init.d/dbus stop

which of course doesn't exist.

If you run /etc/init.d/messagebus stop

then the daemon is actually stopped.


Interestingly the install.sh script has

start_service messagebus

so it was done correctly for the install.sh script but not the uninstall.sh script.


I will raise a separate bug for that issue and raise a patch fix for it.
Comment 15 Jon 2023-04-26 15:00:44 UTC
Very nice!  Thank you!!
Comment 16 Jon 2023-04-26 15:11:12 UTC
Created attachment 1153 [details]
my commit

new issue!  How do I merge my commit in https://bugzilla.ipfire.org/show_bug.cgi?id=13090#c2 with your commit?
Comment 17 Adolf Belka 2023-04-26 16:13:50 UTC
(In reply to Jon from comment #16)
> Created attachment 1153 [details]
> my commit
> 
> new issue!  How do I merge my commit in
> https://bugzilla.ipfire.org/show_bug.cgi?id=13090#c2 with your commit?

I think you should still be okay. Your patch is for install.sh while mine was for uninstall.sh.

The PAK_VER bump is to ensure that dbus will be shipped in the update so it only needs to be done once.

I would suggest doing a patch for install.sh and in the commit message say that the PAK_VER bump from my commit will also cover your patch. I think that should be okay.

Alternatively you can ask on the dev mailing list for how to deal with it.
Comment 18 Jon 2023-04-26 16:31:46 UTC
I think I got it! 

I'll commit only the install.sh and ignore the dbus lfs file.
Comment 19 Adolf Belka 2023-04-26 16:35:09 UTC
I believe that should be okay but I am not an expert :-)
Comment 21 Adolf Belka 2023-05-11 10:10:30 UTC
The patch was marked as being for bug#13094 but it is actually for this bug 13090

Patch has been merged into next (will be CU175)

https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=3df5187dfc42e0da2578a80057af57ddb37b435b
Comment 23 Jon 2023-05-22 17:56:35 UTC
As far as the user messagebus goes, all works A-OK.  There are no more `ipfireAPU useradd[4920]: failed adding user 'messagebus', exit code: 9`` type messages.

Tested on:
APU4d4
IPFire 2.27 (x86_64) - Core-Update 175 Development Build: master/c6c78f8e

===

BUT - there is a new error (new for me!):

```
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.
```

I am going to open a new bug in BZ.
Comment 24 Jon 2023-05-22 18:05:00 UTC
See Bug 13121