singularity
singularity copied to clipboard
yum bootstrap does not accommodate rpm db location on Fedora 36
Describe the bug
$ sudo singularity build ~/centos.sif examples/centos/Singularity
Build target 'centos.sif' already exists and will be deleted during the build process. Do you want to continue? [N/y] y
INFO: Starting build...
FATAL: While performing build: conveyor failed to get: while checking rpm path: RPM database is using a weird path: %{_usr}/lib/sysimage/rpm
You are probably running this bootstrap on Debian or Ubuntu.
There is a way to work around this problem:
Create a file at path /root/.rpmmacros.
Place the following lines into the '.rpmmacros' file:
%_var /var
%_dbpath %{_var}/lib/rpm
After creating the file, re-run the bootstrap.
More info: https://github.com/sylabs/singularity/issues/241
OS / Linux Distribution
$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="36 (Workstation Edition)"
ID=fedora
VERSION_ID=36
VERSION_CODENAME=""
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Linux 36 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=36
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=36
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation
To resolve this:
- The yum bootstrap agent should accept
%{_usr}/lib/sysimage/rpm
as a valid path, and should continue, not error out. - If the path is
%{_usr}/lib/sysimage/rpm
there should be a warning that the system's RPM is using a new location, and that setting the.rpmmacros
file may be required to bootstrap older distributions.