Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933878 - sys-apps/usbguard-1.1.3 fails to start service due to missing rules directory
Summary: sys-apps/usbguard-1.1.3 fails to start service due to missing rules directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Sebastian Pipping
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-09 20:02 UTC by Nick Soveiko
Modified: 2024-06-11 18:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Soveiko 2024-06-09 20:02:18 UTC
sys-apps/usbguard-1.1.3 now makes RuleFolder=/etc/usbguard/rules.d/ as default in supplied /etc/usbguard/usbguard-daemon.conf. yet, the directory is not being created during emerge. this results in the daemon refusing to start with no meaningful diagnostics in the logs.

Reproducible: Always

Steps to Reproduce:
1. emerge = sys-apps/usbguard-1.1.3
2. rc-service usbguard start

Actual Results:  
# rc-service usbguard start
 * Starting usbguard ...
 * start-stop-daemon: /usr/sbin/usbguard-daemon died
 * Failed to start usbguard                                                              [ !! ]
 * ERROR: usbguard failed to start

syslog:
Jun  9 15:58:43 host /etc/init.d/usbguard[24410]: ERROR: usbguard failed to start


Expected Results:  
# rc-service usbguard start
 * Starting usbguard ...                                                                 [ ok ]


0 alerik /etc/usbguard # usbguard-daemon -k -d
[1717963241.697] (i) NSHandler Loading...
[1717963241.697] (i) separator -> :
[1717963241.697] (i) keys:
[1717963241.697] (i) --->usbguard
[1717963241.697] (i) NSHandler Loaded
[1717963241.697] (i) Loading configuration from /etc/usbguard/usbguard-daemon.conf
[1717963241.697] (i) File has correct permissions.
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: RuleFile=/etc/usbguard/rules.conf
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: RuleFolder=/etc/usbguard/rules.d/
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: ImplicitPolicyTarget=block
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: PresentDevicePolicy=apply-policy
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: PresentControllerPolicy=keep
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: InsertedDevicePolicy=apply-policy
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: AuthorizedDefault=none
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: RestoreControllerDeviceState=false
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: DeviceManagerBackend=uevent
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: IPCAllowedUsers=root
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: IPCAllowedGroups=usb wheel
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: IPCAccessControlFiles=/etc/usbguard/IPCAccessControl.d/
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: DeviceRulesWithPort=false
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: AuditBackend=LinuxAudit
[1717963241.697] (D) ConfigFilePrivate.cpp@155/parse: Parsed: AuditFilePath=/var/log/usbguard/usbguard-audit.log
[1717963241.698] (D) ConfigFilePrivate.cpp@155/parse: Parsed: HidePII=false
[1717963241.698] (i) Loading NSSwitch...
[1717963241.698] (i) Loading nsswitch from /etc/nsswitch.conf
[1717963241.698] (D) NSHandler.cpp@166/parseNSSwitch: Map contains:
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> ALIASES -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> ETHERS -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> GROUP -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> GSHADOW -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> HOSTS -> files dns <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> NETGROUP -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> NETWORKS -> files dns <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> PASSWD -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> PROTOCOLS -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> PUBLICKEY -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> RPC -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> SERVICES -> files <--
[1717963241.698] (D) NSHandler.cpp@169/parseNSSwitch: --> SHADOW -> files <--
[1717963241.698] (i) Fetched value is ->  <-
[1717963241.698] (i) Value is not valid or not set, using default FILES
[1717963241.698] (i) File has correct permissions.
[1717963241.698] (E) getConfigsFromDir: opendir: /etc/usbguard/rules.d: No such file or directory
# mkdir -p /etc/usbguard/rules.d
# rc-service usbguard start
 * Starting usbguard ...                                                                 [ ok ]
Comment 1 Jiri Netolicky 2024-06-10 13:05:24 UTC
The same problem on systemd.
 
Request existing /etc/usbguard/rules.d directory mention here https://github.com/USBGuard/usbguard/pull/621
Comment 2 Sebastian Pipping gentoo-dev 2024-06-11 18:28:01 UTC
Sorry for the trouble, give me a few minutes…
Comment 3 Larry the Git Cow gentoo-dev 2024-06-11 18:46:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=306997efa974949a02719737e1c052a736fa7593

commit 306997efa974949a02719737e1c052a736fa7593
Author:     Sebastian Pipping <sping@gentoo.org>
AuthorDate: 2024-06-11 18:46:02 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2024-06-11 18:46:44 +0000

    sys-apps/usbguard: Create missing /etc/usbguard/rules.d
    
    Closes: https://bugs.gentoo.org/933878
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>

 sys-apps/usbguard/{usbguard-1.1.3.ebuild => usbguard-1.1.3-r1.ebuild} | 2 ++
 1 file changed, 2 insertions(+)
Comment 4 Sebastian Pipping gentoo-dev 2024-06-11 18:47:43 UTC
Thanks for the report!