While building Debian packages, pbuilder (and similar tools) help in building packages in an isolated environment, so that odd settings in my system don't cause problems in building:
pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.
Is there an equivalent for snapcraft?
Context: I just had some locale problems interfere with building a snap for Cassandra. I'd been getting locale errors that I am too lazy to look into, and during the build process, javadoc
failed because of Unicode characters in some files. Using C.UTF-8
as the locale fixed that:
export LC_ALL=C.UTF-8
snapcraft
However, my locale shouldn't affect building packages, snappy or Debian. Something like pbuilder would be useful here.
You certainly can.
snapcraft
has a "cleanbuild
" option which can either (default) build locally inside an lxd container, or remotely (via the--remote
option).So:-
Build in a local lxd (needs the
lxd
package to be installed, and networking setup for LXD):Build in a remote lxd:
I followed this guide to setup remote building on my home server. Works well!