Commit Graph

1910 Commits

Author SHA1 Message Date
Michael Hudson-Doyle cfda052923 refactor fs objects a bit and add remove_XXX model methods 2018-06-18 21:36:35 +12:00
Michael Hudson-Doyle c0d66f5540 make scrollbar less intrusive
also pretty up its implementation a bit while I am here
2018-06-18 21:24:23 +12:00
Michael Hudson-Doyle 0d95adb89e
Merge pull request #360 from sil2100/console-conf-core-version
console-conf identity: do not hard-code the core version
2018-06-15 14:18:52 +12:00
Michael Hudson-Doyle 14ad092b9d implement _select_first/last_selectable on our Columns 2018-06-15 12:26:02 +12:00
Michael Hudson-Doyle 547a04bb28
Merge pull request #362 from mwhudson/add-table-widget
Add table widget
2018-06-15 12:18:59 +12:00
Michael Hudson-Doyle 3a59925265 work around a strange behaviour of Pile when contents is changed 2018-06-15 11:51:40 +12:00
Michael Hudson-Doyle 66578aff79 account for colspan>1 cells in width computations
I ran into that gotcha pretty quickly.
2018-06-15 11:48:19 +12:00
Michael Hudson-Doyle a59cce8b67 use table widget in snap list views 2018-06-15 11:48:19 +12:00
Michael Hudson-Doyle b34ca65aba a slightly over-engineered table widget
that takes column widths from the contens of the cells, unlike
most things in urwid
2018-06-15 11:48:19 +12:00
Michael Hudson-Doyle ad9d08776a
Merge pull request #365 from mwhudson/lp-1769478
filter out disks with the ID_CDROM udev property
2018-06-15 10:49:08 +12:00
Michael Hudson-Doyle 9a0a50e032 review feedback 2018-06-15 10:11:33 +12:00
Michael Hudson-Doyle b584345055
Merge pull request #364 from mwhudson/lp-1775228
only add the user to groups that exist in the target system
2018-06-15 09:58:30 +12:00
Michael Hudson-Doyle 19777c8870 add comment 2018-06-15 09:58:17 +12:00
Michael Hudson-Doyle cbe2ea2ffb filter out device major 11 too
this is probably actually the same as filtering out on ID_CDROM in reality but well
2018-06-15 09:57:47 +12:00
Michael Hudson-Doyle 4d331dd200 filter out disks with the ID_CDROM udev property 2018-06-15 09:52:30 +12:00
Michael Hudson-Doyle 5e58068b2e lint 2018-06-15 09:48:17 +12:00
Michael Hudson-Doyle 895d5aa2ef fix dry run mode 2018-06-15 09:39:27 +12:00
Michael Hudson-Doyle 4906fd2e79 fix hardcoded paths in installpath model 2018-06-15 09:39:21 +12:00
Michael Hudson-Doyle 56c637fed7 less hardcoding of /target 2018-06-15 08:35:20 +12:00
Michael Hudson-Doyle ad17c530b0 only add the user to groups that exist in the target system
for https://bugs.launchpad.net/subiquity/+bug/1775228
("user is in debian-tor group on fresh install")
2018-06-14 15:27:06 +12:00
Michael Hudson-Doyle 2f184ce9a6 fix display of install progress in footer 2018-06-13 14:02:40 +12:00
Michael Hudson-Doyle 1ab495c0a8 fix refreshing network view on network changes 2018-06-13 13:38:03 +12:00
Michael Hudson-Doyle 9ef56239f8 fix snap build
* use a different way to avoid depending on i18n in tox
 * add __init__.py files to new packages
2018-06-13 13:21:20 +12:00
Łukasz 'sil2100' Zemczak d5413fde2d Zyga is right - better to check the ID instead of NAME. 2018-06-12 17:14:37 +02:00
Michael Hudson-Doyle c9e87438ae
Merge pull request #361 from mwhudson/better-WidgetWrap
add our own version of WidgetWrap
2018-06-12 09:04:06 +12:00
Łukasz 'sil2100' Zemczak 75bdbab36b Whoops, it was a real failure reported by flake8 - fix missing bracket. 2018-06-11 13:22:39 +02:00
Łukasz 'sil2100' Zemczak 32b724e608 Forgot the version string in one template. 2018-06-11 13:17:30 +02:00
Michael Hudson-Doyle d315751d60 add our own version of WidgetWrap
urwid doesn't know about the _select_first/last_selectable methods our
containers use to make tab-cycling work so its WidgetWrap doesn't
forward them along. So add a WidgetWrap that does, and use it in the one
place that it matters so far (more coming soon!).
2018-06-11 14:13:44 +12:00
Michael Hudson-Doyle 29d21c2a57
Merge pull request #359 from smoser/fix/spaces-in-events-json
Fix curtin block comments in example events.
2018-06-11 12:26:26 +12:00
Łukasz 'sil2100' Zemczak 17c6358320 console-conf identity: Reuse the login_details_tmpl_no_ip template in standalone, use os-release to determine the Ubuntu Core version as we now support both 16 and 18. 2018-06-08 21:21:02 +02:00
Scott Moser 777610572b
Add a mirror panel.
This very simply adds a mirror panel to subiquity.
Nothing intelligent at all.  Just defaults to filling with
http://archive.ubuntu.com/ubuntu/ and lets user fill it in.

As implemented here, the mirror only replaces primary mirror,
security will still use http://security.ubuntu.com/ubuntu/
2018-06-08 12:21:28 -04:00
Scott Moser b82f90f7b1 Fix curtin block comments in example events.
I fixed the 'c u r t i n  b l o c k'... report event in the code a few
commits back, but when using dry-run it was still present because
dry run uses the events json rather than real curtin output.

This just updates the events json to be in line with reality as
it was confusing to see it in the dry run path.
2018-06-08 10:54:28 -04:00
Scott Moser 7bf11ef883
Add support for --source on command line.
This provides the ability to install from a different source
by providing it on the command line.  So we can boot into a system,
and then run:
  subiquity --source=/tmp/xenial-server-cloudimg-amd64.squashfs
or
  subiquity --source=http://cloud-images.ubuntu.com/.../some.squashfs

And install that image rather than the hard coded paths.
2018-06-07 13:45:17 -04:00
Scott Moser c40a03a346 Do not specify partitioning commands in curtin config.
Subiquity was specifying the partitioning command to curtin like this:
    'partitioning_commands': {
        'builtin': 'curtin block-meta custom',
    },

That is not necessary, because the built-in config from curtin
is to do ['curtin', 'block-meta', 'simple'] which does the right thing
if storage config is provided.

In addition to that, because we specified a string, but curtin
was expecting an array, the log/status message that curtin would report
would show:
   running 'c u r t i n  b l o c k' ....
rather than:
   running 'curtin block-meta simple'
2018-06-07 12:28:50 -04:00
Scott Moser 3e69673501 Fix writing of netplan configs
When user configures network with subiquity, it's rendered
netplan should be wholly definitive.  So, we remove the other files
that may have config.  This fixes a bug where running in an instance
when running on a system where cloud-init had rendered a 'match' with
'macaddress'.

When writing netplan we keep 'macaddress' match in place but drop
others.  The others may just wildcard from the installer environment,
but macaddress are likely by cloud-init or otherwise intentionally
written.

Also add an atomic write in subiquitycore/file_util and move the
netplan code into subiquitycore/netplan.py, and add some unit test
helpers from cloud-init.
2018-06-07 11:46:34 -04:00
Michael Hudson-Doyle 270ba0992a fix selectability in non-scrolling stretchy 2018-06-07 12:50:50 +12:00
Michael Hudson-Doyle 14c8273597 fix crash in SnapList screen 2018-06-07 06:45:26 +12:00
Scott Moser 74a5f16535
Add main to subiquity, and use it frm make ui-view.
Add a main to subiquity so that you can run subiquity with:
 python3 -m subiquity
2018-06-06 14:30:03 -04:00
Michael Hudson-Doyle 865afe700b
Merge pull request #352 from smoser/cleanup/debian-packaging-cleanup
debian: minor package cleanups.
2018-06-06 16:07:36 +12:00
Scott Moser cda9b7f1c8 debian: minor package cleanups.
run 'wrap-and-sort' and drop bzr as a build-depends.
2018-06-05 23:41:48 -04:00
Michael Hudson-Doyle af7d536fa8
Merge pull request #350 from smoser/cleanup/make-and-tox-symmetry
Make tox and Makefile more similar.
2018-06-06 14:59:10 +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
Scott Moser bf807867c3 setup.py: fix package build. (#351)
Package build was broken with my last commit.
This restores functional debuild/dpkg-buildpackage.
2018-06-06 14:04:33 +12:00
Scott Moser 51a7169904 tox: Support running tests and flake8 in tox.
This puts into place a tox.ini for running unit tests without
a large amount of deps installed into the system. For example,
we did not want to need libnl-route-3-dev or build-essential installed
in the system in order to run unit tests.

In order avoid import errors in the modules due to these missing
dependencies, we have added a 'fake_deps/' directory that provides
mock'd objects of the dependencies that were used.

The only installed packages necessary for this to run should be
tox itself and its dependencies (pip and friends).  From a clean new
container we can then do:
  apt-get install tox
  git clone ...
  tox

Also along the way:
 * adjust setup.py to only need the DistUtilsExtra during 'build'.
   This means tox usage doesn't require python3-distutils-extra.
 * drop use of lsb_release in favor of built-in parsing.
   This python module wasn't doing much.  We can parse /etc/lsb-release
   ourselves with less footprint.  Also part of the motivation for this
   is that lsb_release was not on pypi.
 * replace use of StorageInfo in test_partition.py with a FakeStorageInfo
 * .gitignore: ignore only the top level 'probert' directory so that
   we can track fake_deps/probert.
 * fix a couple escape chars, by using raw strings (r'').
 * adjust gettext to return un-modified strings rather than '_(string)',
   but support old style if FAKE_TRANSLATE=mangle.
2018-06-05 17:59:46 -04:00
Scott Moser 86826811a8 Remove dead controllers for ceph, iscsi, raid.
These controllers were broken (with failing 'imports') and were
not used.  Drop them, they can be resurrected at a later date when
needed.
2018-06-05 15:33:49 -04:00
Michael Hudson-Doyle c53b3dae8f change back to looking for ssh-import-id in answers 2018-06-01 10:22:55 +12:00
Michael Hudson-Doyle a64ae8bd82
Merge pull request #339 from CanonicalLtd/mwhudson/snap-screen
offer featured snaps for installation
2018-06-01 09:13:00 +12:00
Michael Hudson-Doyle f4c481860f remove a flag that is set but never checked 2018-06-01 09:04:16 +12:00
Michael Hudson-Doyle 19dd965461 some self-review 2018-05-31 12:31:02 +12:00
Michael Hudson-Doyle 738d8e11c7 oops 2018-05-31 11:58:58 +12:00