134 Commits

Author SHA1 Message Date
William Douglas
e999af5e5b Fixup gofmt errors 2022-11-03 09:14:37 -07:00
Mark D Horn
e966377558 tui: gui: Check for useful offline content
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-05-19 13:16:19 -07:00
Mark D Horn
4f2caf0e33 boolset: switch AutoUpdate from bool to boolset
Change the AutoUpdate model type from bool to boolset to account
for default of true and state if the value was explicitly set.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-05-07 17:04:00 -07:00
Karthik Prabhu Vinod
cc27345a72 storage: Add Misc capabilities
a.) By default, block destructive install affecting other disks
b.) Add way to report effects on other disks
c.) Add force-install option
d.) Add Cleanup progress
e.) Fixes

Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-05-07 15:00:51 -07:00
Mark D Horn
59302346d6 linter: enable whitespace
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-04-24 14:53:17 -07:00
Mark D Horn
21dbcdf649 linters: Add goimports
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-04-24 14:53:17 -07:00
Mark D Horn
4244fbaf43 storage/ui: swapfile instead of swap partition
New default is the creation of a /var/swapfile if not
swap partition is explicitly defined in the YAML file
or via Advanced Configuration.

Now use and report media sizes in XiB

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-04-15 17:23:59 -07:00
Mark D Horn
87a138439f tui: Fix bug on media available
When Advanced was re-using the Warning label to display the
configuration it was not resetting the warning colors properly.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-04-15 17:23:59 -07:00
Karthik Prabhu Vinod
8da9febcd4 Fix long line issues
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-04-10 00:08:40 -07:00
Mark D Horn
e77a32f4c6 Disable media size validation in UI
Use the new --skip-validation-size flag to ignore the size
sanity minimums during the user interface installations.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-27 15:07:10 -07:00
Mark D Horn
9283a120fd Enable override for partition validation
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-27 15:07:10 -07:00
Mark D Horn
be9d9bc64e Update partitioning support in legacy mode
Fixes: #517

Enable the possibility of no /boot partition in legacy mode.
- add warning if no /boot and legacy
  Warn the user that installing in legacy mode without a /boot
  partition means the install will never boot in UEFI mode.
- Force off 64bit mode
  When an ext file system is used for the /boot content
  (no /boot partition, and booting legacy mode) we need to
  disable 64bit flag or the image file system not boot.
  https://wiki.syslinux.org/wiki/index.php?title=Filesystem#ext
- Blocked use of XFS due to partition table requirement to use MBR.
- Do not allow encryption of / w/o /boot

Refactor validation code for reuse by both standard and advanced
disk partitioning. Add new standard Desktop and Server wrapper
functions.

Move validation to common function, remove from Find Targets, and
remove redundant validation function.

Enable the skip size for advanced partitions.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-27 15:07:10 -07:00
Mark D Horn
30a7017e93 tui: Need to determine boot mode early
We need to know if we are legacy mode before we parse the disk
partition information as legacy mode trigger different checking.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-27 15:07:10 -07:00
Karthik Prabhu Vinod
ada648b4df Making newEditField accept width,height for labelWarning
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-03-13 01:10:05 +00:00
Karthik Prabhu Vinod
086d3d030d Improve password checking
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-03-13 01:10:05 +00:00
Mark D Horn
ec6d983c26 Add legacy BIOS warning
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-02-27 15:06:20 -08:00
Mark D Horn
52de0593c8 Remove EFI hard requirement
clr-boot-manager can now support booting in legacy mode on bare metal.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-02-27 15:06:20 -08:00
Karthik Prabhu Vinod
a5328b689b TUI Net: Add user bundles net-test Note
Fixes Issue: #635

The user used to mistakenly click on items in the additonal bundles
page having to wait long duration unecessarily if the network did not work.
This provides the user with a Note saying that selecting an additional
bundle requires a working internet connection

Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-02-11 11:20:55 -08:00
Mark D Horn
0581bd8808 tui: high-contrast theme
Black and white theme to improve contrast

Active button reversed, bold, underline to standout

Fixes: #217

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-01-21 14:54:20 -08:00
Mark D Horn
b9970047f9 Allow skipping swupd configuration file copy
Fixes: #600

Only copy the swupd configuration files from the host to the target
by default when running the interactive installer (gui or tui).
Otherwise, observe the setting from the configuration YAML or the
command line (highest) argument.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-11 10:47:05 -08:00
Mark D Horn
a9befd5b40 gui: tui: Check for invalid interactive options
Ensure we do not allow the user to set options, either
via command line or in the default configuration file,
which would not be valid during an interactive installation.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-25 17:23:40 -08:00
John Akre
c7fae814b5 swupd: Concatenate printPrefix with description
Now printPrefix is concatenated into the progress bar description. The
printPrefix is only intended for the mass installer, so it is removed
from the gui/tui progress bar descriptions.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-16 09:15:21 -07:00
John Akre
e4bbebaa36 tui: Move manage user to required tab
Creating an admin user is now a requirement for an install, so the
manage user page has moved to the required tab. Additionally, the manage
user page requires at least one admin user to enable the confirm button.

Fixes: #544

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-10 15:10:59 -07:00
John Akre
67fcb71f77 tui: Create admin users by default
The admin checkbox is set by default when creating a new user.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-10 15:10:59 -07:00
John Akre
bc3c1daa83 tui: Enable install button after requirements done
Now, the install button is enabled when all of the required pages are
completed.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-10 15:10:59 -07:00
Mark D Horn
0dcc486b91 tui: Set done when media selected
The media page was not set done correctly when advanced
partitioning was used.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-10 14:37:41 -07:00
Mark D Horn
a0f1805ef3 tui: Fix Title Case
This is the only menu options not in Title Case.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-08 16:27:25 -07:00
John Akre
10f1ecea4d Move IsValidMirror to network package
The IsValidMirror function was moved to the network package and renamed
to IsValidURI because it can be used for more than swupd mirror validation.
The IsValidURI function is used to check for supported URI protocols.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-02 16:46:40 -07:00
Mark D Horn
2e3c5bf50b Support insecure updates over HTTP
Fixes: #478

Add new --allow-insecure-http flag to support the use of HTTP URLs.
This is needed to allow swupd to download content from http sites;
generally development mixes.

Also enable the use of the setting in both the TUI and GUI to allow
the user to set a swupd mirror which is HTTP.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-30 17:32:36 -07:00
Mark D Horn
6d33f72edf tui: Fix encryption enable bug
Fixes:: #541

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-26 09:32:14 -07:00
Mark D Horn
0e1188dee0 gui: tui: Reword messages for advanced disk config
Fixes: #533

Change from partition label to partition name to be consistent
with how the data is named in the external tools.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-23 18:06:43 -07:00
Mark D Horn
ed3eef5367 tui: warning when no usable media
Fixes: #521

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-23 18:06:43 -07:00
John Akre
d0ec0371b6 swupd: Specify VerifyWithBundles steps
The VerifyWithBundles function is used to install contents into the
target, download offline contents, and to create the initrd for the ISO.
Now, a prefix string will be added to the output of these commands to
specify which step VerifyWithBundles is running.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
John Akre
4cf88f9d25 tui: Add network check to install
A network check will be performed when a network connection is required
to install, but hte installer's network state is not passing. If the
network check fails, additional bundles were selected, and offline
installs are supported, the user will be prompted to remove the
additional bundles so that they can continue the install.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
John Akre
cd75d1a5f4 tui: Add network check to bundle page
When the network state is not passing, the bundle page will perform a
network check. Users will be unable to select additional bundles when
the network check fails.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
Mark D Horn
2615d0173e gui: tui: storage: Disable the partial adv encrypt support
The support for using encrypted file systems with advanced disk
configuration needs a lot more work.
Tracking new GitHub Issue in #512

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
f6fa4105ad tui: advanced disk config
Use new size checking for advanced partitioning.
Fix logic bug in checking for validation errors before
checking for encryption passphrase.

Code review fixes.

Make advanced description consistent with GUI

New min size and adv labels

Change advanced to warning

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
2ebb9e1bd3 utils: gui: tui: Enable clean up temp files
Make use of new command line arg to clean-up the temp
YAML files and install directories.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
93bcb62438 tui: Disable partition tool when no media
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
c46cf8e3b1 tui: prompt for encryption passphrase
If any of the advanced partitions require encryption, prompt
the use for a passphrase.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
7c99f7d9c8 args: tui: gui: --gui flag to force graphics mode
Now check for mutually exclusive options.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
1b1e4cc118 tui: Refactor partition tool for common use
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
cdc0d85a64 tui: Display advanced configured
Auto-select Media if Advanced still has errors.

Display the Advanced configuration in media screen.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
51d7a479a0 tui: Ensure proper locking for external tool
We need to know the lock file name for use when running
the external partitioning tool.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
9c966e6544 tui: Support multiple disks for Advanced
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
4ead3550d8 tui: Change InstallSelected to be a map
Change InstallSelected to be a map with the key being
the name of the TargetMedias from the model to support
installing across multiple disks.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
b07b16bfd6 tui: Rework of advanced partitioning
Remove the code which was attempting to do the work of many
existing, more reliable disk partitioning tools. The code was
getting overly complex to handle the very high number of options
and corner cases.

The installer will rely on external tools which do a better job.

This will parse the media for advanced partition labels.

Show the user the details of what will change and be used
for the installation.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
142ad41f51 telemetry: tui: gui: allow user default in YAML
If the telemetry value is added to the YAML will set the default
as if the user had selected it in the UI.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn
ac21e8ac83 Revert "tui: refactor for manual partitioning"
This reverts commit c597f7a156.

Partial revert to bring back the disk util page
2019-09-12 19:20:47 -07:00
John Akre
abe8e5ce63 swupd: Require HTTPS/FILE protocol for mirror
The installer will only support the HTTPS and FILE protocols when
setting the swupd mirror. The gui and tui will prompt the user to use
HTTPS, but will also accept FILE. The mass installer will prompt for
either HTTPS or FILE.

Fixes #473

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-07-23 15:28:15 -07:00