Open yummypeng opened 2 months ago
The root cause is that /usr/lib/passwd
file lacks root user configuration.
Then the error updates: 😢
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: + echo '* Building kmod with DKMS'
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: * Building kmod with DKMS
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: + echo '#!/usr/bin/env bash'
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: + echo 'make CC=/usr/bin/gcc $@'
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: + chmod +x /tmp/falco-dkms-make
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: + [[ -n '' ]]
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: + dkms install '--directive=MAKE='\''/tmp/falco-dkms-make'\''' -m falco -v 7.2.1+driver -k 6.10.7-200.fc40.x86_64
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: Sign command: /lib/modules/6.10.7-200.fc40.x86_64/build/scripts/sign-file
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: Signing key: /var/lib/dkms/mok.key
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: Public certificate (MOK): /var/lib/dkms/mok.pub
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: Certificate or key are missing, generating self signed certificate for MOK...
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: Key file /var/lib/dkms/mok.key not found and can't be generated, modules won't be signed
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: DIRECTIVE: MAKE="'/tmp/falco-dkms-make'"
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: Creating symlink /var/lib/dkms/falco/7.2.1+driver/source -> /usr/src/falco-7.2.1+driver
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: mkdir: cannot create directory ‘/var/lib/dkms’: Read-only file system
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: ln: failed to create symbolic link '/var/lib/dkms/falco/7.2.1+driver/source': No such file or directory
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: ls: cannot access '/var/lib/dkms/falco/7.2.1+driver/source': No such file or directory
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: Error! The directory /var/lib/dkms/falco/7.2.1+driver/source does not appear to have module source located within it.
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: Build halted.
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: 2024-09-26 11:25:18 WARN Running dkms build failed, couldn't find dkms log.
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: └ file: /var/lib/dkms/falco/7.2.1+driver/build/make.log
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: 2024-09-26 11:25:18 INFO Trying to load a pre existent system module, if present.
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: 2024-09-26 11:25:18 WARN Consider compiling your own driver and loading it or getting in touch with the Falco community.
Sep 26 11:25:18 localhost.localdomain rpm-ostree(falco.post)[2035]: 2024-09-26 11:25:18 ERROR failed: failed to build all requested drivers
From what i see the falco RPM tries to setup things in /var/lib/dkms
in a RPM post-script, which happens in a sandboxed environment in rpm-ostree. Furthermore, /var
is read only in this environment.
See https://coreos.github.io/rpm-ostree/architecture-core/#sandboxing-scripts for more explanation. There is no way around that, post scripts are bad practice, packagers should write systemd units to do that kind of setup. Consider reporting this upstream
Maybe you can set up falcomanually without the RPM ?
Describe the bug
Falco installation on FCOS failed using the instructions provided at https://falco.org/docs/install-operate/installation/#centos-rhel.
Reproduction steps
curl -s -o /etc/yum.repos.d/falcosecurity.repo https://falco.org/repo/falcosecurity-rpm.repo
rpm-ostree install falco
Expected behavior
Falco installation complete.
Actual behavior
And the journal log is:
System details
Butane or Ignition config
No response
Additional information
I manually downloaded the RPM, unlocked the root filesystem, and successfully installed it using
rpm -i falco.rpm
.It appears
falcoctl
may be unable to retrieve the user's $USER and $HOME variables due to a missing configuration in/etc/passwd
for rpm-ostree daemon ?