singularity icon indicating copy to clipboard operation
singularity copied to clipboard

yum bootstrap does not accommodate rpm db location on Fedora 36

Open dtrudg opened this issue 2 years ago • 1 comments

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

dtrudg avatar Jul 12 '22 19:07 dtrudg

To resolve this:

  1. The yum bootstrap agent should accept %{_usr}/lib/sysimage/rpm as a valid path, and should continue, not error out.
  2. 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.

dtrudg avatar Jul 22 '22 15:07 dtrudg