Singularity: Building a Singularity 3.5.3 DEB package on Ubuntu 18.04 LTS

Created on 24 Mar 2020  路  2Comments  路  Source: hpcng/singularity

I have successfully built and tested Singularity 3.5.3 on a Ubuntu 18.04 LTS VM as per the instructions here: https://sylabs.io/guides/3.5/admin-guide/installation.html

I now want to build a DEB package to distribute to other machines using cfEngine. The only instructions I can find are dated: https://singularity.lbl.gov/install-linux

I get errors during the DEB package creation process.

The last time the dist/debian files were changed in Git is > 2 years ago, while the AlpineLinux and RPM files > 2 months ago. The dist/debian/changelog shows the version as 2.4.2-1

Is building a DEB package still supported?

Version of Singularity:

3.5.3

Expected behavior

Creation of a DEB package:

$ fakeroot dpkg-buildpackage -b -us -uc
$ sudo dpkg -i ../singularity-container_3.3.5_amd64.deb

Actual behavior

$ fakeroot dpkg-buildpackage -b -us -uc # sudo will ask for a password to run the tests

tabmcleo@alouette:~/sandbox/singularity/dist$ fakeroot dpkg-buildpackage -b -us -uc
dpkg-buildpackage: info: source package singularity-container
dpkg-buildpackage: info: source version 2.4.2-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Gregory M. Kurtzer gmkurtzer@gmail.com
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build dist
debian/rules clean
dh clean --with autoreconf
dh_clean
debian/rules build
dh build --with autoreconf
dh_update_autotools_config
dh_autoreconf
debian/rules override_dh_auto_configure
make[1]: Entering directory '/home/tabmcleo/sandbox/singularity/dist'
dh_auto_configure -- --localstatedir=/var/lib
make[1]: Leaving directory '/home/tabmcleo/sandbox/singularity/dist'
debian/rules binary
dh binary --with autoreconf
dh_testroot
dh_prep
dh_installdirs
debian/rules override_dh_auto_install
make[1]: Entering directory '/home/tabmcleo/sandbox/singularity/dist'
dh_auto_install
: # move bash completions into now new standard location
mv debian/singularity-container/etc/bash_completion.d debian/singularity-container/usr/share/bash-completion/completions
mv: cannot stat 'debian/singularity-container/etc/bash_completion.d': No such file or directory
debian/rules:22: recipe for target 'override_dh_auto_install' failed
make[1]: * [override_dh_auto_install] Error 1
make[1]: Leaving directory '/home/tabmcleo/sandbox/singularity/dist'
debian/rules:16: recipe for target 'binary' failed
make: *
[binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Steps to reproduce this behavior

Download and install Singularity following the instructions for Ubuntu here: https://sylabs.io/guides/3.5/admin-guide/installation.html

Proceed into the build directory down to the dist level:

$ fakeroot dpkg-buildpackage -b -us -uc
$ sudo dpkg -i ../singularity-container_3.3.5_amd64.deb

What OS/distro are you running

Ubuntu 18.04 LTS

How did you install Singularity

Followed the instructions for Ubuntu here: https://sylabs.io/guides/3.5/admin-guide/installation.html

Most helpful comment

Could we switch this to a feature request? Building a DEB package as easily as @tabmcleo described would be quite handy and make managing Singularity on Debian derived systems (e.g. Ubuntu) easier.

All 2 comments

Building a .deb package from the repo is not supported I'm afraid. The code that remains is there for archive purposes only, and as you note the documentation was remove. (The lbl.go site is outdated and should not be referred to for current versions of Singularity).

Could we switch this to a feature request? Building a DEB package as easily as @tabmcleo described would be quite handy and make managing Singularity on Debian derived systems (e.g. Ubuntu) easier.

Was this page helpful?
0 / 5 - 0 ratings