121 Commits
Author SHA1 Message Date
William Douglas 185b29eb64 Fixup lint error for 'stringintconv' 2022-11-03 09:14:37 -07:00
William Douglas e999af5e5b Fixup gofmt errors 2022-11-03 09:14:37 -07:00
Mark D Horn bd38c8b9d7 Fixes for changes to gotk3 v0.6.0
Several API changes from gotk3 v0.4.0 to v0.6.0
which was a required bump to support building under golang 1.16.x.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2021-07-12 17:05:10 -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
Karthik Prabhu Vinod f2c78d56e6 Make a tab(\t) count as 4 char
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-04-10 00:08:40 -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 2885e8ed44 lint: Only ignore the few problem functions
Instead of skipping whole files, just exclude the few
complex functions.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-31 19:51:47 -07:00
Karthik Prabhu Vinod 09c4303be7 Makefile: Remove exemptions for gocyclo
Removed exemptions for gocyclo lint for all
storage code except funcs: UnmarshalJSON
& NewDiskConfigPage have inevitable
function exemptions

Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-03-31 18:30:45 -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 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
ZVNexus 6272de6a21 Initial F2FS support for CLR Installer.
Signed-off-by: Alexander Koskovich <zvnexus@outlook.com>
2020-02-27 11:03:25 -08:00
Karthik Prabhu Vinod c964c76fc1 GUI 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 51ab42027e gui: add fail reason to system check fail
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-01-17 09:39:23 -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 b4d50fade3 gui: Fix disk selection
Fixes: #614

Ensure we retain the selected disk from the chooser box
during refresh like setting an encryption password.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-05 17:35:37 -08:00
Mark D Horn 59c3237b5d gui: disk: Fix rescan content
Ensure clicking Rescan button updates the contents of
the chooser boxes for media selection.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-12-05 17:35:37 -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 2e5692ae53 gui: Correctly set advanced disk config warnings
When using advanced disk partitioning with an invalid setup and loading
the menu page or disk configuration page for the first time, the warning
messages were not set correctly. The warnings were incorrectly set
because the TargetMedias variable was unexpectedly overwritten to nil.
This change prevents unexpected overwrites of TargetMedias and sets
TargetMedias when it is uninitialized.

Fixes: #553

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-04 14:33:29 -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
Tapani Pälli c0f32b3aff gui: pack content layout to a scrolled window if needed
This ensures that user is able to proceed through installer
with low resolutions.

This commit also removes hardcoded placement of 'change language'
button (See removed TODO).

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
2019-10-01 14:57:40 -07:00
Tapani Pälli 77af98bab0 gui: make sure app fits the monitor size
This is done to ensure that installer can be run on virtual
machines that have a small default screen size.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
2019-10-01 14:57: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
John Akre d2e71c75a2 gui: Fix disk config menu description
The saveMedias variable is responsible for selecting between loading the
page or resetting page state on cancel button clicks. When clicking the
confirm button, saveMedias must be set to nil to prevent flipping the
logic for loading the page and cancel button clicks. This logic
inversion led to incorrect menu descriptions for the disk config page.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-24 16:52:18 -07:00
John Akre 980ed23cb2 gui: Preserve installation type
The installation type is now preserved when re-entering the disk config
page.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-24 16:52:18 -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 ddf2ded095 gui: Remove old comment
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-23 18:06:43 -07:00
Mark D Horn e05bbdf4a5 gui: Fix default disk selection bug
Ensure that we default to the previously selected disk
when re-entering the media selection screen.

Fixes: #515

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-23 18:06:43 -07:00
Mark D Horn fe4ef72a91 gui: 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 ed62e96b51 install: Update indeterminate progress bar
The indeterminate progress bar does not behave as expected when pulsing
twice consecutively. In this case, the progress bar moves very, very
slowly. When the progress bar pulses once, it smoothly moves back and
forth across the screen.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
John Akre 320b807f20 gui: Remove precheck page
Network checks are no longer a hard requirement with offline install
support, so the precheck page should not prevent users from advancing.
This change creates a fatal pop-up window for system check failures and
removes the precheck page. Network checks will be performed as needed.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
John Akre 606112af4a gui: Add network check to install
When a network connection is required to complete an install, but the
installer's network state is not passing, a network check will be
performed. 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 6cb2d1ef52 gui: Add network check to bundle page
The bundle page will peform a network check when the network state is
not passing. 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
John Akre 2b29ce834b gui: Add network check to menu
A network check page was added to the menu. Similarly to the TUI, the
network check page will launch a pop-up window and perform a network
check.

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 c190a7169a gui: locale: advanced disk config
The GUI need to be updated to ensure that the user defined state
was updated so that we store the user's answer in the (temp) YAML.

Make the GUI be consistent with the TUI and with the other
two selection labels for the Disk configuration.

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 db3a17c7c6 gui: base media page layout complete
- model: Store precheck status in model
- Refactor sudo user into reusable function
- Enable the partitioning tool button

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn 54c5c3949a gui: Show detailed installation summary
Show the user the changes that will happen to media before
confirming the start of the installation.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn 29986733df gui: 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 87c554a92c gui: Add disk name to choose list
The disk device name is show in the configured information, but
was missing in the chooser list. User had request this to be able
to differentiate between two drives of the same model.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00