* adjust environment to set PYTHONPATH to pick up site-packages
* add more required packages
* add script for subiquity-server, and set PYTHONPATH there,
so that the PYTHONPATH takes effect
* Abstract resource file lookup relative to SNAP
Using SNAP to find the resource files is a bit of an odd requirement for
non-subiquity clients. Start abstracting that away so it's easier to
change later.
Also move loadkeys to lookup from this, since the previous solution is
still a problem for ubuntu-desktop-installer.
* Move loadkeys / configure-apt to bin
loadkeys / configure-apt are in usr/bin only when we specially put them
there by way of snapcraft, which makes things a little harder on
non-subiquity clients. Move them to bin, which is to say don't have
snapcraft put them in usr/bin.
This is a bit sideways from the real thing I'm working on which is
moving most of the logic of keyboard handling to the server side but
anyway. This also lets me check some assumptions while processing the
data rather than in the view code.
The core image by default does not include the build-essential package. We need it to build the rtnetlink extension
for probert. If gcc is missing, the following error occurs:
running build_ext
building 'probert._rtnetlink' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/probert
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/python3.6m -fPIC -I/root/parts/probert/
install/usr/include/python3.6m -c probert/_rtnetlinkmodule.c -o build/temp.linux-x86_64-3.6/probert/_rtnetlinkmodule.o -I/usr/include/libnl3
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status
In this commit we include build-essential for the probert build step.
When building the snap in a clean environment, we start with a minimised core image. This image excludes translation
files, which are needed for the "languagelists" step. The following error will show up when building:
Building languagelists
do not know native name for oc
Failed to run 'override-build': Exit code was 1.
This is due to translation files being excluded by default in /etc/dpkg/dpkg.cfg.d/excludes on minimised systems:
# Drop all translations
path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo
We now comment this line and reinstall the "iso-codes" package.
I found the layers and layers of other tools just confusing.
"python3 setup.py build" generates an identical (apart from timestamp)
POT file and an identical build directory before and after this change.