Commit Graph

3618 Commits

Author SHA1 Message Date
Michael Hudson-Doyle c7e9445ad1 add subiquity.common.api
This somewhat overengineered code allows you to define an API in a
sort-of DSL and then automatically make a client, and implement it bit
by bit server side.
2020-09-11 16:56:30 +12:00
Michael Hudson-Doyle 85b35c9e87 steal contextlib from Python 3.8
Python 3.6's does not have asynccontextmanager.
2020-09-11 16:55:26 +12:00
Michael Hudson-Doyle 01e9c04ab5
Merge pull request #817 from mwhudson/tuiapplication
remove all UI code from "core" application object, add tuiapplication
2020-09-10 11:31:30 +12:00
Michael Hudson-Doyle f4066d97d7 convert controller api methods to take strings and trigger updates for affected nics
this is going to work better in the client/server world
2020-09-03 22:52:31 +12:00
Michael Hudson-Doyle f32c74c86d address review comments 2020-09-03 12:31:25 +12:00
Michael Hudson-Doyle 0ce2043061
Merge pull request #820 from shuuji3/fix-typo-on-welcome-screen
Fix a typo: "unicde" to "unicode"
2020-09-03 11:39:23 +12:00
Michael Hudson-Doyle 04426cec15 make network view use a plain-old-data view of a nic
The network view code used to crawl all over the network model object,
which isn't really going to work with the upcoming client/server split.
So this adds a much better defined interface between the view and
controller.
2020-09-03 11:12:38 +12:00
Michael Hudson-Doyle fc51315dd2
Merge pull request #821 from mwhudson/fix-crash_directory-error
set crash directory in non dry-run builds (oops)
2020-09-02 22:48:57 +12:00
Michael Hudson-Doyle 207f46a00b set crash directory in non dry-run builds (oops) 2020-09-02 21:52:49 +12:00
TAKAHASHI Shuuji 17b6cae372
Fix a typo: "unicde" to "unicode" 2020-08-29 13:28:07 +09:00
Michael Hudson-Doyle 345a06e6f0
Merge pull request #819 from mwhudson/lp-1892725
fix crash on renaming bond
2020-08-27 07:46:24 +12:00
Michael Hudson-Doyle e367226f47 fix crash on renaming bond 2020-08-25 13:55:20 +12:00
Michael Hudson-Doyle 3ff9a95ef5
Merge pull request #818 from Forst/examples-interactive
examples/autoinstall-interactive: remove duplicate "snaps" section
2020-08-25 09:50:34 +12:00
Michael Hudson-Doyle 279676a013
Merge pull request #815 from mwhudson/lp-1890651
only use wwn as a disk label if it is set
2020-08-25 09:49:43 +12:00
Foster "Forst" Snowhill 069e870137
examples/autoinstall-interactive: remove duplicate "snaps" section 2020-08-23 14:28:26 +02:00
Michael Hudson-Doyle edc65dbbfb make the base controller have no ui, add subclass for one that has ui 2020-08-23 23:18:28 +12:00
Michael Hudson-Doyle f6757af8d1 fix restarting after refresh 2020-08-23 23:18:28 +12:00
Michael Hudson-Doyle f5f8a8a75c import the controllers module explicitly 2020-08-23 23:18:28 +12:00
Michael Hudson-Doyle ccd8c2382e split urwid-using bits out of subiquitycore.core.Application 2020-08-23 23:18:26 +12:00
Michael Hudson-Doyle 59906e938a
Merge pull request #807 from mwhudson/controllerset-tweaks
make ControllerSet more re-usable
2020-08-23 23:07:12 +12:00
Michael Hudson-Doyle bc1060eefa make ControllerSet more re-usable 2020-08-23 22:59:39 +12:00
Michael Hudson-Doyle 2e20c5d094
Merge pull request #806 from mwhudson/add-subiquity.common
add subiqity.common package and more error report handling to it
2020-08-23 22:44:43 +12:00
Michael Hudson-Doyle 63f5f57f30
Merge pull request #804 from mwhudson/screen-refactor
Move the code for setting up the screen to its own file
2020-08-23 22:43:42 +12:00
Michael Hudson-Doyle 1515519c91
Merge pull request #816 from lucaskanashiro/install-deps-in-test-this-branch-script
scripts/test-this-branch.sh: install needed dependencies
2020-08-23 22:43:12 +12:00
Lucas Kanashiro 8cfa8c64d4 scripts/test-this-branch.sh: install needed dependencies 2020-08-22 14:11:52 -03:00
Michael Hudson-Doyle 3d94d28bbd only use wwn as a disk label if it is set 2020-08-21 10:06:27 +12:00
Michael Hudson-Doyle c175ed09d1
Merge pull request #814 from lucaskanashiro/fix-typo
README.md: fix typo, remove duplicated "is"
2020-08-21 09:38:44 +12:00
Lucas Kanashiro f192ca98c3 README.md: fix typo, remove duplicated "is" 2020-08-20 18:27:18 -03:00
Michael Hudson-Doyle 3c37698b02
Merge pull request #811 from mwhudson/update-probert
update to probert tip, adding recognition of CAN nics
2020-08-13 21:25:44 +12:00
Michael Hudson-Doyle 4638815e45 update to probert tip, adding recognition of CAN nics 2020-08-13 21:25:13 +12:00
Michael Hudson-Doyle 0b93bafdac
Merge pull request #810 from tsunghanliu/lp1890397
Ignore CAN and unknown interfaces (LP: #1890397)
2020-08-12 22:37:41 +12:00
Tsunghan Liu (Robert Liu) e798451c27 Ignore CAN and unknown interfaces (LP: #1890397)
Add CAN and unknown interfaces to NETDEV_IGNORED_IFACE_TYPES, otherwise rander_config() will throw a KeyError exception when a unsupported interface shows up.
2020-08-07 21:04:05 +08:00
Michael Hudson-Doyle 8f5f2349b2
Merge pull request #809 from Forst/main
Add missing build dependencies, improve ISO generation
2020-08-03 22:51:26 +12:00
Foster "Forst" Snowhill dca298a815
inject-subiquity-snap: recalculate MD5 for installer.squashfs
The inject-subiquity-snap.sh script rebuilds the installer.squashfs filesystem, but does not recalculate its MD5 hash.
This leads to an error message during bootup process, complaining about one of the files being damaged, that file
being installer.squashfs.

This commit introduces an extra step to recalculate the MD5 hash of the installer.squashfs and write it into
md5sum.txt, as well as to remove the GPG signature of the installer filesystem, since it's invalid anyway.
2020-08-02 18:05:34 +02:00
Foster "Forst" Snowhill ec1fa0fe01
Makefile: add xorriso and isolinux to install_deps
In order to use the inject-subiquity-snap.sh script, we need some extra dependencies: xorriso and isolinux.

When xorriso is missing, the following error occurs:

    ./scripts/inject-subiquity-snap.sh: line 184: xorriso: command not found

When isolinux is missing, the image build step for x86-64 is failing:

    xorriso : FAILURE : Given path does not exist on disk: -boot_image system_area='/usr/lib/ISOLINUX/isohdpfx.bin'

This file is not present in the source ISO image, so it has to come from the isolinux package.
2020-08-02 18:05:34 +02:00
Foster "Forst" Snowhill e90b84b675
snapcraft: add build-essential dependency for probert
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.
2020-08-02 18:05:33 +02:00
Foster "Forst" Snowhill 304719eb4d
snapcraft: unminimize iso-codes package
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.
2020-08-02 18:05:29 +02:00
Dimitri John Ledkov 5de9df3e7d
Merge pull request #808 from xnox/lp-1889749
Revert "add all documented fields to filesystem model classes"
2020-07-31 15:03:40 +01:00
Dimitri John Ledkov c1ed2b5196
Revert "add all documented fields to filesystem model classes"
The above commit introduced regression
https://bugs.launchpad.net/subiquity/+bug/1889749

This means that https://bugs.launchpad.net/subiquity/+bug/1889749
remains unfixed.

This reverts commit 73f311690e.
2020-07-31 14:56:12 +01:00
Michael Hudson-Doyle 38728771d5
Merge pull request #805 from xnox/fix-empty-seed
snaplist: fix snaplist with filesystem without snaps
2020-07-30 07:44:38 +12:00
Dimitri John Ledkov c7aff1fed5
snaplist: fix snaplist with filesystem without snaps
When no snaps are seeded in the filesystem, empty string is returned,
which yaml safe load interprets as None.

But snapd seed.yaml is defined as a dictionary with snaps key. Ensure
that when no seed.yaml is present (or readable), that at least an
empty dictionary is returned, such that later calls to `.get("snaps",
[])` succeed.

LP: #1889429
2020-07-29 16:26:12 +01:00
Michael Hudson-Doyle 2e5456fd55 add subiqity.common package and more error report handling to it
Both the subiquity client and server are going to want to use this code,
so move it somewhere more neutral.
2020-07-28 14:02:32 +12:00
Michael Hudson-Doyle 3d4158dde3
Merge pull request #793 from eliasp/typo-minumum
Fix typo (minumum > minimum)
2020-07-28 09:34:35 +12:00
Michael Hudson-Doyle 210cdcb51b Move the code for setting up the screen to its own file
Looking at this code thinking about the coming client / server split
made me realise that we could start by at least moving this
functionality to a more encapsulated place.
2020-07-27 23:40:17 +12:00
Michael Hudson-Doyle 16e080392e
Merge pull request #803 from mwhudson/no-eoan
test on groovy and not eoan
2020-07-27 11:24:16 +12:00
Michael Hudson-Doyle 2c6a714cbc test on groovy and not eoan 2020-07-27 11:17:50 +12:00
Michael Hudson-Doyle ad6dd2b5cb
Merge pull request #796 from xnox/stop-subiquity
Stop subiquity-service on non-installer media.
2020-07-27 11:17:06 +12:00
Michael Hudson-Doyle 9b533ad522
Merge pull request #801 from mwhudson/lp-1887997
fix some simple crashes seen in the error tracker
2020-07-27 10:34:50 +12:00
Michael Hudson-Doyle 6edeeb5f93
Merge pull request #799 from mwhudson/lp-1886816
a snap refresh failure means the refresh state is unknown
2020-07-27 10:23:33 +12:00
Michael Hudson-Doyle 4ee279cbd9
Merge pull request #802 from mwhudson/inject-subiquity-snap-tweaks
clean up the xorriso arguments in inject-subiquity-snap a bit
2020-07-27 10:22:18 +12:00