Commit Graph

61 Commits

Author SHA1 Message Date
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
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 8e50ce252c Merge branch 'master' into mwhudson/snap-screen 2018-05-25 11:44:19 +12:00
Michael Hudson-Doyle 293793fa49 merge master 2018-05-25 11:06:23 +12:00
Michael Hudson-Doyle 43f581bca4 update travis jobs: test on cosmic, run make lint 2018-05-25 10:56:01 +12:00
Ryan Harper 618142f132 Rework make lint target to use pep8 pyflakes3 targets 2018-05-24 16:59:32 -05:00
Ryan Harper acd24c0796 Add pep8 script 2018-05-24 16:51:51 -05:00
Ryan Harper 0849db7c14 Add pyflakes3 target and script 2018-05-24 16:51:49 -05:00
Scott Moser d71cb7cadf Makefile: Always put PYTHONPATH into environment
Just use 'export PYTHONPATH' in the Makefile so that we all targets
have that in their environment.
2018-05-24 12:47:16 -04:00
Michael Hudson-Doyle 676d22482e note new dependencies in a few places 2018-05-22 23:15:13 +12:00
Med 34d25041c7
install_deps target without confirmation 2018-05-18 00:25:41 +02:00
Michael Hudson-Doyle a9555fed5d update dependencies 2018-02-15 13:27:56 +13:00
Michael Hudson-Doyle 7d134ebe6c fix make dryrun at least a little 2018-02-15 11:40:50 +13:00
Scott Moser 4fe72f586f Makefile: tabs not spaces.
Running 'make install_deps' will complain with:
  Makefile:49: *** missing separator (did you mean TAB instead of 8 spaces?).
2017-09-22 14:28:55 -04:00
Michael Hudson-Doyle 794dd71ed5 remove lots of things from Makefile now ./installer is gone 2017-09-14 11:11:25 +12:00
Michael Hudson-Doyle a54100d85d more things you need to build probert now 2017-01-26 12:06:05 +13:00
Michael Hudson-Doyle 3be72ca3be need pkg-config 2017-01-26 11:47:17 +13:00
Michael Hudson-Doyle d3ad1d94f8 change probert url in Makefile to https 2017-01-26 11:46:05 +13:00
Michael Hudson-Doyle ad9517722e simplify makefile 2017-01-26 11:29:20 +13:00
Michael Hudson-Doyle 8ede2d730c and with that, we no longer depend on tornado 2017-01-18 12:02:34 +13:00
Michael Hudson-Doyle 31b21799b7 remove dependency on netifaces 2016-11-07 16:56:36 +13:00
Mathieu Trudel-Lapierre 6ae734302f Makefile: use xenial branch for Makefile builds 2016-07-06 18:27:26 -04:00
Mathieu Trudel-Lapierre e1970b6477 Rename subiquity to subiquitycore -- will serve as base classes for everything
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:17:01 -04:00
Mathieu Trudel-Lapierre a721eba5c1 Add an 'install' mode; firstboot will be the default to avoid trashing installs
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-28 11:30:40 -04:00
Mathieu Trudel-Lapierre 5b86abca12 Use git+ssh and a newer snapshot revision to get probert.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-23 23:29:34 +03:00
Ryan Harper 153f41c989 Fix installer to work with latest curtin
The latest curtin now does package dep checks during installation
which may install and enable things like lvm2 and mdadm.  These
packages trigger running daemons which prevent the unmounting of
filesystem when building the installer image.  Resolve this by
re-implementing curtin's [un]disable_daemon_in_root functions.

Update runinstaller to use 3 spare disks as virtio to enable
raid testing.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-12-04 09:01:19 -06:00
Ryan Harper 1b66a555ae Makefile: add make check
make check now calls lint and unit

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-02 16:49:31 -06:00
Ryan Harper 9296df7501 make lint: run flake8 via python3
Running flake8 via python3 triggers python3 level of lint checking.
This fixes at least the case where python2 flags the '_*' expander.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-11-02 15:27:14 -06:00
Ryan Harper 1327b86d5e Makefile: extract version from python source
Pull subiquity version from the python module.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-28 10:12:06 -05:00
Ryan Harper b09f273450 Handle raid installer files
Ignore and clean new target files used to test
raid features.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-27 10:12:28 -05:00
Ryan Harper ed2f427ac9 Blockdev and unit test cleanups
- Use nosetests3 to call unit tests
- Ensure all Actions use the 'type' property
- Implement remaining Blockdev unit tests

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-09 08:57:38 -05:00
Ryan Harper 954b1d76fc Drop jinja2 use
We no longer use the jinja2 template file.  Drop its use and the deps.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-10-08 15:12:07 -05:00
Ryan Harper ac3fd86bb5 Remove offline mode for installer
Make offline mode default.  We always want to
install the packages required to run the installer in the
image we generate.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-30 12:58:11 -05:00
Ryan Harper 8d7e9aca48 Change dpkg-build flags to sign source deb
Don't include -us -uc when creating deb source and dpkg will
actually sign the source package.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-30 09:57:49 -05:00
Ryan Harper aef1858e69 Unbreak make and installer script with subiquity-tui rename
After renaming bin/subiquity to bin/subiquity-tui we broke a
few things that invoked subiquity via bin/subiquity which is
now bin/subiquity-tui

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-29 16:17:00 -05:00
Ryan Harper 8b228d05a8 Fix geninstaller to be runnable outside of source tree
geninstaller, which is installed as /usr/bin/subiquity-geninstaller
needed some changes to allow it to run outside of the build tree.
Quieted the output from geninstaller a lot and redirect the verbosity
into the log file.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-29 09:56:47 -05:00
Ryan Harper 7501e26fac Makefile: Spell ovmf correctly
Fix package name thinko in Makefile

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 22:23:04 -05:00
Ryan Harper d85bb52a63 Finish enabling EFI boot mode
- Fix up issues with efi mode grub serial configuration
- Modify blockdev model to order storage configuration output
- Handle when we're running in uefi mode

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 22:19:54 -05:00
Ryan Harper a744245f03 Add install_deps_$(ARCH) target to split out per-arch deps
Move arch specific packages into their own target

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-22 08:44:18 -05:00
Ryan Harper 0fca368ba4 Update probert commit revno
Update probert revno to use newer network probing data.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-03 12:50:35 -05:00
Ryan Harper 7ff3f549c2 Fix partition size selection and logging
- Fix max size partition edge case
- Ensure if nothing is entered we select the max size
- Adjust offset and size calculations for actions

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-01 11:28:23 -05:00
Ryan Harper 8d678ad353 Update topdir Makefile targets
A number of changes to the toplevel make file and dir structure.

- deb-src and deb-release fail because debian was a symlink.  This is not allowed
  so instead we git clone and then move the debian dir to the toplevel.
- Fix the clean target to only run rules/debian if the debian dir exists.
- Drop probert as a submodule and instead clone it as needed, controlling the
  version through a Makefile variable.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-09-01 10:04:24 -05:00
Ryan Harper 8a0e9ebdfd Add new cli option to read machine probe data from file
Allow user to specify a probert machine configuration file to be
used during the installer.  If presented with the config file
no probing of the host will occur.

In the case that disks don't have a size in the data collected then
they'll be marked as USED.

Add a few example machines and update the README on how to specify.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-28 13:22:29 -05:00
Ryan Harper a16c301eed Drop python3-parted use
Using parted required root privileges since it opened the underlying device.
Instead create our own Disk model and use sysfs interface for extracting
size information.
This also clears the way for providing device data via probert input.  This
means we can feed subiquity a probert dump and have it present that to
the installer UI even if we're running on a different system.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-08-27 14:26:37 -05:00
Adam Stokes 5ead10de47 add setuptools
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
2015-08-21 14:15:04 -04:00
Diogo Matsubara 387789d33e add python3-coverage as devel dependency 2015-07-24 10:03:37 -03:00
Diogo Matsubara f8e6622fb4 Merge branch 'master' into trivial-fixes 2015-07-23 16:34:47 -03:00
Diogo Matsubara 714a2d6d4f trivial fixes: devel dependencies, use git@github url instead of http to avoid password. 2015-07-23 13:23:00 -03:00
Wesley Wiedenmeier 00c4cc7a67 Integrated offline mode with Makefile 2015-07-23 09:19:38 -05:00
Ryan Harper 27a2f45216 Add grub2 and bootloader paramater to installer target
Default to grub2 for bootloader.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
2015-07-21 19:06:58 -05:00