78 Commits
Author SHA1 Message Date
Castulo Martinez 05d2f9ad1f Use the JSON output from swupd to report progress
When running the "swupd verify" command to install the base OS and the
selected bundles, the progress of the command execution was just being
shown as a progress bar that was looping until the swupd command
finished. This approach was not ideal since this process can take
several minutes to complete, and since the progress bar was just
spinning it didn't provide a real feedback for the user to know in what
part the process was. This can trigger some anxiety in users.

This commit solves this problem by using the machine readable output
from swupd to determine the exact part of the process where the install is
and report this to the user using a series of steps along with a progress
bar (or percentage value in not TUI installer) that shows how far the
step has gotten.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-05-29 17:16:26 -07:00
Brian J Lovin 2edeaaad26 tui: Add error dialog on syscheck failures
Directly after TUI init, run the system check and report if there are
any failures, and force application exit.

Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
2019-05-24 10:17:05 -07:00
Mark D Horn 55df2389ae network: Always copy /etc network files
When executing interactively, text-base or graphical, we want
to always copy any local /etc network configuration files to
the target system.

If the user has made customer network settings, usually with
nmcli/nmtui for console, or NetworkManager on the desktop, these
will want to be propagated to the target.

Add command line option to avoid network copy.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-15 12:52:04 -07:00
Mark D Horn d96230f8d9 tui: gui: Do not display version in Demo mode
For documentation purposes (screen shots), we do not want to
include the version string. Having a version string in the image
requires updating all image each release.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-08 16:04:27 -07:00
Castulo Martinez 1f6c8743e1 Fix a bug in Partial truncating an integer value
The Partial() function is used to report a partial progress in a
progress bar. When using this function the value set on the progress bar
was always zero since it was doing a division of two integers that were
always resulting in a number < 1 which was being truncated because both
numbers were integers so go was using an integer to store the result
too.

This commit fixes the bug by converting the values to the right types.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-05-06 13:40:44 -07:00
Reagan Lopez 7e0d6fe955 gui: Implements disk encryption
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-05-01 19:11:23 -07:00
Mark D Horn baa8e9bde7 tui: storage: Advanced Config full disk fix
Fixes Issue: #333

We were not properly propagating flags related to the
selected disk.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-01 18:54:08 -07:00
Mark D Horn 0e07ef933e tui: correct typo in dmesg
Refixes: #300

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-30 14:18:45 -07:00
Mark D Horn bed70bbb0f gui/tui: Display installation complete step
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-29 19:45:03 -07:00
Reagan Lopez 6f9b0a8d0c gui: Prompts user for confirmation before install
Also disables exit button during installation and
re-enables it after installation is complete.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-04-29 19:39:51 -07:00
Mark D Horn 1bfa2cbe8a swupd: Filter bundles which will be installed
Remove any bundles the installer will always install from
the list of optional bundles selectable by the user.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-29 18:18:33 -07:00
Mark D Horn 1a9a6bac7a tui: disk: Fix warning labels
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-29 15:11:47 -07:00
Mark D Horn 7dd6013512 tui: Disable console messages
Attempt to disable console messages before launching the TUI,
and re-enable upon completion.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-26 12:51:26 -07:00
Mark D Horn d2a54a851a tui: sync wording with new GUI
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-24 22:53:59 -07:00
Mark D Horn 973aee7958 tui: sync working in TUI with GUI
If we change wording in the GUI we should backport
to the TUI if the same phrase is used.
This will reduce confusion when we enable localization
in the TUI.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-24 22:49:27 -07:00
Mark D Horn 9f1de156bd gui: locale: Ensure consistent branding
All occurrences of Clear Linux* OS should be the same.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-24 17:20:01 -07:00
Mark D Horn 0ae0b24ad0 tui: Refactor shared strings from TUI
Move strings from TUI to storage for use by all interfaces.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-22 12:52:05 -07:00
Mark D Horn f72d8f4497 language: Show language in local language
Since some UTF8 characters are wider, change how we format the TUI.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-19 15:06:47 -07:00
Reagan Lopez 4c1f7a9dfe gui: Introduces localization
- Modifies the screen flow to first launch the Welcome (Language) page
- Adds localization package "gotext"
- Enables localization for "en_US", "zh_CN" and "es_MX"
- Modifies the strings to use localized version

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-04-19 15:04:57 -07:00
Mark D Horn 3423cf3f6b Move Theme Directory Lookup to Utils
Move the lookupThemeDir function to the utilities for
use for all theme related files.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-19 14:29:35 -07:00
Mark D Horn 7fe0567d68 tui: Rename Manual to Advanced
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-19 08:56:28 -07:00
Mark D Horn e0693dd2ec ui: Change Full Disk to Entire Disk
User feedback suggested that Full disk was not clear enough

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn 7b221f8a95 ui: change Dismiss to OK
Some user confusion from a Dismiss button when getting a warning
message about data loss on disks.
Change all Dismiss buttons to OK

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn 658dcb9866 debug: Remove extra debug
A lot of leftover detailed debug during engineering which
no longer needs to be present.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn c597f7a156 tui: refactor for manual partitioning
Remove the call to the external tool in favor of native ui.

separate mkpart and format flags

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn ee6ba0e079 tui: user feedback on beta
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn 1222c2dc45 tui: Simplify Install Media selection
Remove the details disk manager in favor of a simpler interface
to avoid accidental data loss during install.

Create a bash script to run a disk util and relaunch the installer.
- Try using cfdisk instead of cgdisk, but easy to switch if necessary
- Save the current state as YAML for restore user selections
- Run partprobe to ensure partition changes are visible

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn 95baf649de tui: Enable enter for list selection
Allow the user to hit enter on an item in a listbox to select
and Confirm the choice.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn d2a6816339 tui: Refactor constants for user manager
The names are shared in the tui package and were not specific enough
as discovered when removing columnCount from the disk manager.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn 794d4b9f0a tui: Ensure TUI crashes shows Issue filing info
The TUI has a local panic and never displayed the information
about how to log an Issue in GitHub.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn 5dbee42d7d Fix Network Interface Copy
Fixes Issue: #261

Pull Request #236 introduced a bug where local network interfaces
are always copied to the target media.
This PR correct this by only copying when copyNetwork is set to
true; this is enabled in the UI when the users changes a network
interface (for static).

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-12 15:17:58 -07:00
Mark D Horn 786a1f27b5 Download User Messages
New functionality to download Pre and Post Installer messages
TODO: Display the messages as pop-ups
- Need to use system curl command to handle proxies for now

Refactoring for enabling:
- Moved FetchRemoteConfigFile from conf to network
- Move code for Clear Linux Version parsing until a utility function
  which is called early in the flow for reuse

Now that use external curl FILE protocol passes.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-11 17:11:55 -07:00
Mark D Horn f424bdb143 Track user selected bundle separately
Fixes Issue: #242

Only show user selected bundles on the summary menu item for
bundle selection; not core, required bundles.

Make the latest user bundle changes more evident by prepending
them to the list of bundles to install.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-06 13:20:26 -08:00
Mark D Horn a53dc00958 Fix setting static IP
We also need to set either proxies or the
DNS search domain to enable pacdiscovery
if network testing does not pass.

Need to add:
    systemctl enable pacdiscovery on target
    Ensure we copy the /etc/systemd/network settings

- Fixed bug in showing dns server per interface
- Add new DNS Domain field per interface
- Mask out (skip) Wireless and Bridge interfaces
- Update Network Interface TUI
  - Added DNS Domain
  - Widen screen for error messages
  - Moved Error labels before field

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-06 11:27:53 -08:00
Mark D Horn 13a7115322 Enable use of arrow keys for network interface
We were missing the arrow keys which meant only tab was
working to switch fields for the network interface.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-06 11:27:53 -08:00
Mark D Horn 3c4bcde28b tui: Bug fix for passing command line args
Properly pass the command line arguments through to the TUI

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-12-07 22:24:58 -08:00
Mark D Horn fbd74cccf5 Add Advanced Save Config option
New Advanced option which will save the current state of the
installation configuration to a YAML file. This allow using
the TUI to generate a template or usage configuration file to
be used from the command line.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-12-07 22:24:58 -08:00
Mark D Horn 22cb139edd tui: Fix initialization bug
Fixes: #179

When a new partition is added with the TUI, it was defaulting to an
incorrect type of disk instead of partition.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-12-03 14:12:42 -08:00
Mark D Horn ee00325837 tui: Allow disabling encryption on a partition
Encryption could be enabled, but not disabled.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-12-03 14:12:42 -08:00
Mark D Horn e6b2648679 Add Visual clue to disk summary on main page
Add the '*' after the file system type on the summary screen
for encrypted file systems to provide the same visual clue as
the disk summary page.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-29 12:35:26 -08:00
Mark D Horn c43135f6ee Support Encrypted partitions
Fixes #10

Enable encrypted partitions for all but /boot.

A single passphrase is used for all partitions which enable encryption
expect swap, which currently uses a random password each boot.
NOTE: If we need to support a large swap for laptop suspend/restore, we
should change from a random passphrase to the same known passphrase.

/etc/crypttab will attempt to use either the disk label or the
UUID to identify the disk instead of the physical disk name.

Swap partition would normally loose its UUID or Label each boot
due to dm-crypt and mkswap overwriting the connect. To maintain
identification of the partition, we use a trick from here:
https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption
of creating a small (1M) ext2 partition with label at the beginning
of the swap partition, then use an offset in the /etc/crypttab to
prevent overwriting this information.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-29 12:35:26 -08:00
Mark D Horn a58eb66e28 Add support for Partition Labels
Fixes #101

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-29 12:35:26 -08:00
Leandro Dorileo 0275dc1290 bundles: increment the list of bundles
Increase the list of bundles available for install. Also set the
TUI frame as scrollable.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-11-14 10:25:59 -08:00
Mark D Horn 8b9286f173 Correct grammar
Fixes #140

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-09 10:27:27 -08:00
Mark D Horn c6b4610872 Resize SimpleButtons
Ensure we resize SimpleButton type if set to AutoSize

Fixes #136

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-06 09:56:51 -08:00
Mark D Horn b7fe01d5f8 Set the language on target system
Also change to using 'locale -a' to generate possible languages
installed as 'localectl' is currently broken due to the relocation
of the locales from /usr/lib to /usr/share.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 10:03:34 -07:00
Mark D Horn b6589ef0bd Set the keyboard on target system
- No longer set the keyboard on the host system in main

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 10:03:34 -07:00
Mark D Horn 3339c19a50 Set the time zone on target system
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 10:03:34 -07:00
Mark D Horn 6cd7271a06 Handle case of no available keyboard, language, tz
Show the os-core defaults in case none found.
These are also the defaults of /etc is cleared; i.e. reset stateless.

Change the default timezone to the system default of UTC.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 10:03:34 -07:00
Mark D Horn a2afa04ca9 Fix the OS naming
Update product name and text on install screen

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-18 17:04:55 -07:00