Forum Discussion

ElvinXebia's avatar
ElvinXebia
Copper Contributor
Feb 01, 2024

Install on rpm-ostree based distribution fails

Hi there,

 

I'm attempting to install the mdatp package on Fedora Silverblue 39, an rpm-ostree based system. This same issue is encountered when attempting to install this on any rpm-ostree based server distribution.

 

Here's what I've done:

 

# Put the repository configuration
> curl -o /etc/yum.repos.d/packages-microsoft-com-prod https://packages.microsoft.com/config/fedora/39/prod.repo

# Run install command
> rpm-ostree install mdatp
Checking out tree 7f1b7b5... done
Enabled rpm-md repositories: [...] packages-microsoft-com-prod
[...]
Updating metadata for 'packages-microsoft-com-prod'... done
Importing rpm-md... done
[...]
rpm-md repo 'packages-microsoft-com-prod'; generated: 2024-01-29T04:27:37Z solvables: 155
Resolving dependencies... done
Will download: 3 packages (138.7 MB)
Downloading from 'fedora'... done
Downloading from 'packages-microsoft-com-prod'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
error: Running %prein for mdatp: bwrap(/bin/sh): Child process killed by signal 1; run `journalctl -t 'rpm-ostree(mdatp.prein)'` for more information

# Inspect journal
> journalctl -t 'rpm-ostree(mdatp.prein)'
Feb 01 16:30:03 elvin-pc rpm-ostree(mdatp.prein)[204760]: mkdir: cannot create directory ‘/var/opt’: Read-only file system
Feb 01 16:30:03 elvin-pc rpm-ostree(mdatp.prein)[204749]: ERROR: Failed to create /var/opt/microsoft/mdatp
Feb 01 16:30:03 elvin-pc rpm-ostree(mdatp.prein)[204749]: [LogTelemetry] Invalid code ()

 

 

From what I can see, the package is doing something non-standard and attempting to create a directory through a pre script, instead of having this as part of the rpm package spec. As most directories in an rpm-ostree based system are read-only except for when layering files as defined in the rpm spec file, this fails.

 

I'd really appreciate a fix to make this work on container-focused operating systems. Any help or workarounds appreciated.

1 Reply

Resources