Commit Graph

122 Commits

Author SHA1 Message Date
Dan Bungert be158a375f snapcraft: environment and package fixes
* 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
2021-10-01 13:59:10 -06:00
Dan Bungert 4cbfb7f18f
Abstract resource file lookup relative to SNAP (#998)
* 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.
2021-07-13 16:14:31 -06:00
Michael Hudson-Doyle 32641489bd verify signatures on the cdrom pool again
It's not safe in the netboot case.
2021-05-05 09:51:30 +12:00
Michael Hudson-Doyle 29676d8c22 set trusted=yes,check-date=no for cdrom pool during installation
The pool is loaded off the same media as the installer and the
filesystem being installed so there's no real loss of security doing
this and it makes it easier for people to master custom ISOs with extra
packages in the pool and systems with inaccurate clocks (that cannot
reach ntp.ubuntu.com).
2021-05-03 13:25:30 +12:00
Michael Hudson-Doyle fac360b8e7 remove curtin hook to bind mount /run into target now curtin does this
Curtin added this in version 19.3 so we can stop doing it.
2021-03-29 14:49:59 +13:00
Ian Johnson ab27c235b0
bin/console-conf-wrapper: only run if available
Otherwise on a system without support for `snap routine console-conf-start`, console-conf will never actually run. 

Thanks to @xnox for the suggestion.

Co-authored-by: Dimitri John Ledkov <19779+xnox@users.noreply.github.com>
2020-11-02 09:40:22 -06:00
Ian Johnson 7cc528ac6d bin/console-conf-wrapper: start snapd console-conf routine after user interacts
After the user has pressed enter to being using console-conf, we should invoke
the snapd routine for console-conf, which currently does the following:
* Unconditionally delays refreshes for 20 minutes from when first invoked.
* Blocks waiting for all pending refreshes to complete, including if those
  involve a reboot.

This is the first step towards a more integrated user story where console-conf
is a part of the first-boot process, and at least will minimize user confusion
where console-conf proceeds asking about network configuration and then just
hangs when snapd starts a refresh as soon as network is available.

The snap routine console-conf-start command was merged to snapd with 
https://github.com/snapcore/snapd/pull/9418 and will be first available in snapd
2.48.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-10-27 15:09:49 -05:00
Dimitri John Ledkov 4ef44df38d
Merge pull request #771 from mvo5/subiquity-show-install-logs
console-conf-wrapper: show snapd log during install
2020-05-21 14:22:04 +01:00
Michael Vogt e748115ea9 console-conf: show journal log during install
Display the snapd journal while the system installs. This will
give us important clues what might go wrong during a install
and also gives the user some sense of progress.

For post-beta we need to think if we really want to display this
level of detail. OTOH we don't expect people to watch the console
during firstboot yet and if that will happen we need to also tweak
a bunch more (like kernel messages, systemd messages etc).
2020-05-19 11:19:27 +02:00
Michael Vogt c5ee7c95d5 console-conf-wrapper: show snapd log during install
This will help finding some of the current install problems by
showing the snapd log on the terminal during the install.
2020-05-18 09:29:36 +02:00
Maciej Borzecki bd859a9a4b bin/console-conf-wrapper: check /var/lib/console-conf/complete when in recovery
Once console-conf is started for recovery chooser, exit early when the recovery
chooser does not exist.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-05-13 18:27:20 +02:00
Ian Johnson 3238dba4d2 bin/console-conf-wrapper: don't do anything during install mode
For now, we want to just block console-conf from doing anything in install mode,
i.e. allowing a user to login etc. but eventually we will probably want to show
more useful status information from snapd during the install mode process.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-04-29 13:50:42 -05:00
Dimitri John Ledkov 5f9fae19b6 Revert "consoleconf: watch changes on install"
Doesn't work

This reverts commit 7b4bcb9922.
2020-04-20 15:30:04 +01:00
Dimitri John Ledkov 7b4bcb9922 consoleconf: watch changes on install 2020-04-06 17:24:18 +01:00
Maciek Borzecki fc09279772 bin/console-conf-wrapper: detect whether snapd recovery chooser should run
Look for the marker file left by snapd recovery chooser user request detection
and attempt to run the chooser.

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2020-02-24 11:07:40 +01:00
Dimitri John Ledkov e6dd21be6e Move PATH setup from agetty service into subiquity itself
This way `sudo snap run subiquity` will have the correct PATH for
probert/utils/curtin, as needed when running subiquity from ssh
session.
2019-10-04 00:55:24 +01:00
Michael Hudson-Doyle 7f9ff2c70e add separate curthook script to bind mount /run 2019-05-09 10:01:49 +12:00
Michael Hudson-Doyle 7403e99b7b bind mount /cdrom at /target/cdrom rather than /target/run/cdrom 2019-05-09 09:58:51 +12:00
Dimitri John Ledkov e0b134f1d8 Have the real /run in-target. 2019-05-08 16:30:21 +01:00
Michael Hudson-Doyle a8e153b896 do not use apt proxy during no-network install 2019-04-11 10:59:13 +12:00
Michael Hudson-Doyle ce346bd888 change subiquity-configure-apt to be a bit more robust and clear 2019-03-29 11:53:49 +13:00
Michael Hudson-Doyle b9979cad2a add a big comment 2019-03-29 10:55:16 +13:00
Michael Hudson-Doyle 181792f783 start to split behaviour on presence of network or not 2019-03-29 10:55:16 +13:00
Michael Hudson-Doyle 6de5dbbd8e configure apt during installs to prefer installation from install media 2019-03-29 10:55:16 +13:00
Dimitri John Ledkov ab8ae0e936
Make a unified launcher 2019-03-21 12:20:41 +00:00
Michael Hudson-Doyle 69f018db5b invoke curtin from the snap 2018-11-20 11:47:51 +13:00
Michael Hudson-Doyle d6f634d646 use a custom console font 2018-06-26 11:20:31 +12:00
Scott Moser af94275618 Make tox and Makefile more similar.
This does a few things with the end goal of making simplifying and
making consistent tox and 'make' methods of test or check.

Things here:
 * move python programs out of bin and into their own main.  Use
   entry_points to get scripts written for them.  One gain here is
   that we no longer have python programs that are not named .py.
   flake8 and friends would not check those programs by default.
 * install scripts in bin/ using the setup.py scripts and adjust
   snapcraft.yaml and debian packaging for that.
 * declare and use PYTHON in Makefile to avoid repeating 'python3'
 * declare and use CHECK_DIRS in Makefile for list of dirs to check.
 * no longer run 'flake8' from 'make check' by default.
 * remove the old tests/ directory.
2018-06-05 22:19:17 -04:00
Michael Hudson-Doyle 19dd965461 some self-review 2018-05-31 12:31:02 +12:00
Michael Hudson-Doyle f2d0d0aade update default snap store section and examples to server 2018-05-31 09:54:07 +12:00
Michael Hudson-Doyle 15a2c1867c fix lint 2018-05-25 11:26:14 +12:00
Michael Hudson-Doyle 293793fa49 merge master 2018-05-25 11:06:23 +12:00
Ryan Harper f8745a1cc3 pyflakes3 fixes for bin/console-conf-tui 2018-05-24 16:59:31 -05:00
Ryan Harper 3ff00ff866 pep8 fixes for bin/subiquity-tui 2018-05-24 16:59:31 -05:00
Ryan Harper 36c42179e2 pep8 fixes for bin/console-conf-tui 2018-05-24 16:59:31 -05:00
Michael Hudson-Doyle ca1d7ba77b parameterize store section to load 2018-05-23 11:38:42 +12:00
Michael Hudson-Doyle 919b292800 Merge branch 'master' into mwhudson/snap-screen 2018-05-22 22:47:36 +12:00
Michael Hudson-Doyle ff19ac4409 add a flag to load snaps from example directory 2018-05-21 14:25:48 +12:00
Michael Hudson-Doyle cbd5afe2c0 move imports of i18n higher so _ is always installed before tests are imported 2018-05-21 10:14:34 +12:00
Michael Hudson-Doyle db4d8a537e add a way to specify actions to take in the UI on the command line
--script takes a little python snippet to run in a helpful namespace
--click is a wrapper around --script to click a button
2018-05-01 12:29:29 +12:00
Michael Hudson-Doyle 366d27713b remove crufty line that has a typoed variable name 2018-03-21 15:43:51 +13:00
Michael Hudson-Doyle d0da487895 avoid a strange apparmor bug/issue by invoking subiquity entrypoint directly
see https://forum.snapcraft.io/t/snapd-2-32-breaks-live-server-installer/4597 for more details
2018-03-21 15:42:55 +13:00
Michael Hudson-Doyle 68c15176ac some trivial stuff 2018-03-08 16:34:25 +13:00
Michael Hudson-Doyle 3ea98a47dd
Merge pull request #280 from CanonicalLtd/mwhudson/snap-created-service
have a subiquity-service be part of the snap
2018-02-13 13:01:31 +13:00
Michael Hudson-Doyle 1a939844fb use the journald event reporter that is now part of curtin 2018-02-12 13:37:00 +13:00
Michael Hudson-Doyle 6d08f080c2 we do not need this any more 2018-02-09 15:10:00 +13:00
Michael Hudson-Doyle 5198ff4b12 chmod u+x bin/subiquity-service :( 2018-02-09 14:18:32 +13:00
Michael Hudson-Doyle b5a6038f81 have a subiquity-service be part of the snap 2018-02-09 13:53:03 +13:00
Michael Hudson-Doyle 7b375d9d92 always load answers from a fixed path if it is present 2017-11-17 15:09:16 +13:00
Michael Hudson-Doyle 6919e5ce68 minimal implementation of canned answers
this allows automation of the enter-enter-enter flow, not much more than that
2017-11-17 13:25:16 +13:00