Commit Graph

4445 Commits

Author SHA1 Message Date
Dan Bungert 90d764af36 probert: rollback to pre os-prober
Rollback the Probert version until os-prober is correctly present in the
Subiquity snap.
2021-12-08 16:18:36 -07:00
Olivier Gayot 1c9c04d55d Add initial integration of Ubuntu Advantage in subiquity
Introduce a new view, model and controllers pair to enable Ubuntu
Advantage from Subiquity. For now, we expect the user to input an
alphanumeric token and rely on cloud-init to enable the features
associated with the subscription.

This implementation comes with a number of limitations:
 * inability to validate the token before first-boot
 * inability to check what features are associated with the Ubuntu
   Advantage subscription, before first-boot
 * the user must input the token directly: there is no mechanism to
   deduce the token based on email address and password.

The new screen is placed after the identity scree. The installation
should already be running when the UA screen will be shown to the user.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-08 23:25:39 +01:00
Michael Hudson-Doyle 447b5730ec refactor the lowerdir_for calculation and fix a bug 2021-12-09 09:52:52 +13:00
Michael Hudson-Doyle 45ef2338cd another small refactor 2021-12-09 09:52:52 +13:00
Michael Hudson-Doyle 06d42129a4 do the apt config application asap 2021-12-09 09:52:52 +13:00
Michael Hudson-Doyle 93432ccbb1 split apt configuration into two methods 2021-12-09 09:52:49 +13:00
Michael Hudson-Doyle 75d9f38dd1 refactor apt configuration a bit
using some stuff I originally wrote for livefs-editor
2021-12-09 09:51:18 +13:00
Michael Hudson-Doyle 2de2ef7381 move apt_configurer to MirrorController 2021-12-09 09:51:18 +13:00
Michael Hudson-Doyle 794667fecd move setting up installation source to SourceController 2021-12-09 09:51:18 +13:00
Dan Bungert c708716db8
Merge pull request #1141 from dbungert/lp-1953619
apt: get settings from mirror + proxy
2021-12-08 13:41:27 -07:00
Dan Bungert 0c28c13887 apt: get settings from mirror + proxy 2021-12-08 12:13:40 -07:00
Dan Bungert 55b2d4cf86
Merge pull request #1128 from CarlosNihelton/fix-integration-cls-empty
Complementary to 1127 on integration side
2021-12-07 15:44:36 -07:00
Dan Bungert a80b750e0f
Merge pull request #1139 from dbungert/os-prober-v2
storage/v2: add os-prober data
2021-12-07 14:38:03 -07:00
Dan Bungert a61e609ec7 storage/v2: add osprober data to Partition 2021-12-07 14:04:57 -07:00
Dan Bungert 49c20f7894 probert: rev for os-prober 2021-12-07 11:46:28 -07:00
Dan Bungert c4a9b6a1d6 examples: add os-prober to win10 2021-12-07 11:46:28 -07:00
Michael Hudson-Doyle b49c4e5cdc
Merge pull request #1138 from jpnurmi/disk-model-vendor
filesystem: add disk model and vendor name
2021-12-07 12:38:50 +13:00
Dan Bungert 60d8ae57b7
Merge pull request #1134 from ogayot/FR-1509
Compare the snaps versions to avoid suggesting a downgrade
2021-12-06 07:48:59 -07:00
J-P Nurmi bd4e4785a9 filesystem: add disk model and vendor name
Read ID_MODEL/VENDOR_ENC for disks to allow the GUI installer to show
pretty disk names without having to call libudev through FFI.

As a bonus, this also fixes disk names to match the machine config in
dry-run mode.

Related issues
- FR-1710
- canonical/ubuntu-desktop-installer#415
2021-12-06 08:59:34 +01:00
Michael Hudson-Doyle 97149e0ada
Merge pull request #1136 from mwhudson/lp-1952969
pass -t /target to the system-install command
2021-12-02 13:01:58 +13:00
Michael Hudson-Doyle 8d96e1b8ed pass -t /target to the system-install command
(oops)
2021-12-02 12:47:02 +13:00
Michael Hudson-Doyle 00a870e054
Merge pull request #1135 from mwhudson/apt-configurtion-progress
pass install context to configure_apt method
2021-12-02 11:31:35 +13:00
Michael Hudson-Doyle 5d6ffe64b5 pass install context to configure_apt method
this makes the apt configuration appear in the progress view in the
client
2021-12-02 11:07:19 +13:00
Olivier Gayot 4273164ce7 Support a version number that includes the git build number
When comparing version numbers (i.e., to determine if we want to suggest
and upgrade of subiquity) we now support version numbers of the
following form:

  {major}.{minor}.{patch}+git{build_id}.{commit_id}

The commit ID is ignored in the resolution because it is not a number
that is growing.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-01 22:17:56 +01:00
Dan Bungert 0d980904ac
Merge pull request #1133 from dbungert/api-test-probert
make: api depend on gitdeps
2021-12-01 13:12:22 -07:00
Olivier Gayot 2f9c7399ca Compare the snaps versions to avoid suggesting a downgrade
In specific scenarios, the version of the snap as returned by snapd is
older than the version currently running. When that happens, we were
suggesting the user to update. This action would effectively result in a
downgrade.

We now attempt to determine if the snapd version is greater than the one
currently running. If we can't the behavior is unaffected.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-01 20:01:09 +01:00
Dan Bungert b0167af6e7 make: api depend on gitdeps 2021-12-01 11:55:44 -07:00
Carlos Nihelton 22a8219cb3 Dryrun won't stop configure controller due C-L-S
- Also noticed a possible unbound var in IOError handler.
2021-11-24 11:35:31 -03:00
Dan Bungert cde7150446
Merge pull request #1058 from dbungert/fr-1187-apt-components-v2
apt: disable_components
2021-11-23 11:12:24 -07:00
Dan Bungert 1b74779aef api: add free_only 2021-11-23 10:57:47 -07:00
Dan Bungert e32b7f28ac mirror: add disable_components API 2021-11-23 10:56:43 -07:00
Dan Bungert c332d62e40
Merge pull request #1130 from dbungert/curtin-rev-lsblk
snapcraft: pickup curtin lsblk fix
2021-11-22 16:55:34 -07:00
Dan Bungert dc87d8075e
Merge pull request #1126 from dbungert/apitest-less-flaky
Make api tests less flaky
2021-11-22 16:55:14 -07:00
Dan Bungert e1e5013ad5 mirror: s/is_default/mirror_is_default
Clarify that the mirror is the default, as there are other things under
mirror that are not relevant to this determination.
2021-11-22 15:07:39 -07:00
Carlos Nihelton a88fcdb8b3 Explicit case for c-l-s failure by returning None 2021-11-22 13:42:45 -03:00
Carlos Nihelton 37758047f2 Improved control over lang packs on integration
- Dryrun should never return empty packages list unless under failure.
- runtests check if the mimic-installed files match the proper language.
2021-11-22 12:16:01 -03:00
Michael Hudson-Doyle 200ceb1d58
Merge pull request #1129 from dbungert/core20-import-ssh
snapcraft: remove python links from snap bin dir
2021-11-22 11:40:57 +13:00
Dan Bungert 00c4f0c0a3 snapcraft: pickup curtin lsblk fix 2021-11-19 16:02:40 -07:00
Dan Bungert cf199fbc4d snapcraft: remove python links from snap bin dir
The python links in the bin dir of the snap were resolving to system
python instead of the python binary found at usr/bin.  This appears to
be the root cause of why python scripts would fail to find their own
resources, such as ssh-import-id and lsb_release.
2021-11-19 15:50:14 -07:00
Carlos Nihelton 1e6c4472a5 Complementary to 1127 on integration side 2021-11-17 13:26:41 -03:00
Dan Bungert 6a970ccd41
Merge pull request #1127 from dbungert/fix-cache-empty-pkg
check-language-support: fix empty pkg list
2021-11-17 07:34:03 -07:00
Dan Bungert 1eefb7a9e5 check-language-support: fix empty pkg list
The check-language-support on my machine was providing a single empty
newline as output, and the length check isn't catching that as the
resulting packages array has a value of [''].
Drop empty values from the list to avoid a "KeyError: ''" exception.
2021-11-17 07:23:16 -07:00
Michael Hudson-Doyle e9892e5032
Merge pull request #1123 from mwhudson/configure-apt-earlier
configure apt before starting install
2021-11-17 14:36:51 +13:00
Dan Bungert 9ef4e929f7 apitests: fix misuse of proc.communicate 2021-11-16 18:08:29 -07:00
Dan Bungert ee48b0990a apitests: try harder to wait for startup
Observe server state and wait longer if in one of the startup states.
2021-11-16 18:08:29 -07:00
Dan Bungert 7920c2e18b apitests: use a timeout multiplier system 2021-11-16 18:08:29 -07:00
Michael Hudson-Doyle f2e05f993d do apt configuration before install starts
via lots of overlays
2021-11-17 12:57:26 +13:00
Michael Hudson-Doyle be57dc9da0 fix offline installs 2021-11-17 11:20:18 +13:00
Michael Hudson-Doyle 996a2125f2 pass install source as an argument to curtin install, not via config 2021-11-17 10:23:32 +13:00
Didier Roche dde0a6d53c
Merge pull request #1116 from CarlosNihelton/ft-wsl-locale-deeng-31
System locale manipulation wired into Subiquity.
2021-11-16 08:43:51 +01:00