Skip to content
Snippets Groups Projects
Commit d57f2540 authored by Marty Kandes's avatar Marty Kandes
Browse files

Create ~/.rpmmacros file on install for Ubuntu operating systems

This temporary (?) fix [1] allows yum-based bootstrapping of Singularity
containers on Ubuntu (and/or Debian-based) operating systems.

[1]

ubuntu@singualrity-ubuntu-builder:~/naked-singularity/definition-files/centos$ sudo singularity build centos-7.9.2009.sif Singularity.centos-7.9.2009
INFO:    Starting build...
FATAL:   While performing build: conveyor failed to get: while checking rpm path: RPM database is using a weird path: %(bash
You are probably running this bootstrap on Debian or Ubuntu.
There is a way to work around this problem:
Create a file at path /home/ubuntu/.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/hpcng/singularity/issues/241
parent 2f3cdd72
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ University of California, San Diego ...@@ -57,7 +57,7 @@ University of California, San Diego
## Version ## Version
1.7.4 1.7.5
## Last Updated ## Last Updated
......
...@@ -154,6 +154,10 @@ naked::install() { ...@@ -154,6 +154,10 @@ naked::install() {
apt-get -y install debootstrap apt-get -y install debootstrap
apt-get -y install yum-utils apt-get -y install yum-utils
# https://github.com/hpcng/singularity/issues/241
echo '%_var /var' > ~/.rpmmacros
echo '%_dbpath %{_var}/lib/rpm' >> ~/.rpmmacros
else else
log::error 'Operating system not recognized or not supported.' log::error 'Operating system not recognized or not supported.'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment