81 Commits
Author SHA1 Message Date
Mark D Horn b7a52f2d67 controller: Keep image if disabling ISO
If an ISO can not be generated due to multiple kernels, then
ensure that we keep the raw image file.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-19 18:18:05 -08:00
Reagan Lopez eb828da9de Skip ISO generation if additional kernels are present
Currently, ISO image generation supports only a single kernel.
Hence, skip ISO generation if multiple kernel bundles are present.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-11-19 11:06:17 -08:00
Mark D Horn af49072ac4 boot: use image mode
We should be using image mode when invoking clr-boot-manager
as we want changes implemented on the target image.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -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
Mark D Horn a775026a65 swupd: Refactor name of swupd command
swupd had depreciated 'verify --fix' with 'os-install' a while ago.
Though we change the command, the method name was unchanged. Now
refactored the name and also just pass the entire model at creation
for future changes instead of just a few member datum.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-07 18:37:36 -07:00
John Akre 3d5aef88ad Log offline install version override
When installing from offline content, the taget version must match the
offline content version so that the offline content remains valid. Now a
log message will be written to document the version override.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-02 13:15:42 -07:00
John Akre 0b73c2d45a Update to latest when version is 0
When the version field in the config file is set to 0, the latest
version will be installed instead of the host's version.

Fixes: #502

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-02 13:15:42 -07:00
Mark D Horn cfe018a885 Ensure we default to software auto update for UI
When target bundles are added to the configuration file
we generate an override YAML file for the installer. This needs
to default to autoUpdate: true for interactive installs.

This fixes a bug which was introduced when we switched to having
the installer generate the override YAML file instead of creating
it with a post-installation hook in conjunction with offline
installation support.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-30 17:32:36 -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 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 a7652005ef Add installation step to copy offline content
This commit adds an installation step to copy offline update contents to
the install target media. When installing from an ISO image, unsquashfs
is used to decompress offline content directly to the target which is
faster than a file copy.

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 1add9c9a5c Use indeterminate progress bar for network check
The indeterminate progress bar will continually move until the network
check completes. This type of progress bar makes more sense than the
multistep progress bar that incremented after each network retry.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
John Akre 8ffe58328d Don't update to latest version for offline installs
When installing with offline content, the installed version must match
the version of the installer image so that the offline content can be
consumed.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
John Akre 1527c25d6d Add offline install support
When creating installer images with offline support, installation
content for a minimum set of bundles will be downloaded to the
/var/lib/clr-installer/offline-content directory inside the installer
image. The offline-content directory will be used instead of the network
to install bundles when it exists.

To generate images with offline support, the --offline command line
argument or the offline config file field can be set.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
John Akre bf89aeaa40 Add targetBundles support to config
The targetBundles field in the config file specifies the minimum set of
bundles that the installer image's installer will install to the target
media. To achieve this functionality, a config file is generated and
inserted into the installer image at /var/lib/clr-installer.yaml. This
config file contains the list of bundles specified by targetBundles and
a minimum set of entries based on the config file used to generate the
installer image (keyboard, language, timezone, kernel).

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-09-23 16:08:10 -07:00
Alex Jaramillo 8e3af8152c telemetry: do not fail if bundle is not installed
This change removes the need for telemetrics bundle to be present for
the installer to work.

Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
2019-09-23 15:43:27 -07:00
Alex Jaramillo 21fb4ed6c9 telemetry: execute additional telemetry steps
This change executes opt-in when users agree to provide crash information
to the clear linux team and opt-out when users do not agree.

Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
2019-09-18 14:00:20 -07:00
Mark D Horn 7098434b5a storage: 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 2a130e1897 storage: determine detailed changes to media
Detect the details of the changes to the media to be presented
to the user during the final confirmation step.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn 25d2144c7c install: save mount point even if not formatting
Previously the mount point would not be saved if formatting
was skipped for the partition.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Leandro Dorileo eb898789bf cbm: increase legacyBios support
clr-boot-manager now supports a legacyBios mode. This patch makes sure
to adjust the expected env variable in order to force installing bootlader
in legacy mode.

This patch also sets the debug flag so we can inspect the c-b-m behavior.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2019-09-12 13:02:11 -07:00
Alex Jaramillo 201767721b telemetry: rework record generation
Use a new feature from telem-record-gen where the telemetry record is
generated independently of telempost daemon. This change allows to
simplify the code to interact with telemetry.

Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
2019-08-19 16:14:42 -07:00
Reagan Lopez 8b74be1e60 gui: Fix progress bar to indicate correct status
Currently, the network check is displayed as success even when it fails.
This fixes the bug to indicate the correct progress status.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-07-08 13:40:28 -07:00
Reagan Lopez d65510b833 gui: Introduces a pre-check page
Fixes #416.
After the language is selected, the pre-check page checks if the
prerequisites for the installation are met.
Currently the checks include system compatibility and network
connectivity.

Fixes the progress failure status to show a different color.

Refactored to remove redundant code.

Displays the system check error.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>gui: Fixes window resize due to error message
2019-06-27 16:47:03 -07:00
Alex Jaramillo eb019bcd7a telemetry: Include hypervisor to telemetry payload
Include the name of the hypervisor in the telemetry payload when
installed in VM.

Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
2019-06-26 15:50:40 -07:00
Mark D Horn 840edb2049 cmd: proxies: Use proxies set in the environment
The TUI allows the user to set https_proxy, but the GUI
relies upon the Network Manager. Autoproxy via pacdisvoery
works, but if manual settings are made we need to use the
environment variables.

Changes to the proxies via Network Manager are synced
from the non-privileged user to root for proxy.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-06-25 12:13:39 -07:00
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 7a77abeb19 Fix progress output for ISO generation
The way this was coded was causing bugs in output when creating an ISO
image. The most obvious was the line "Cleaning up from ISO creation"
would be repeated a few times at the end of execution.

Having sub-progress loops doesn't make sense here, since the flow is
"task"->"completion status" not "task"->"subtask"->"sub
complete"->"task complete"

Also, the removed progress loops would fail to be printed anyways, so
removing them doesn't change progress output except for fixing this
bug.

Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
2019-05-24 10:28:07 -07:00
Mark D Horn 27ccfc8820 iso: Pass all options through to ISO generation
We need to pass the full suite of options to the ISO
generation code to ensure the call to swupd has all
of the requested options.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-07 12:01:54 -07:00
Reagan Lopez 7dae3a782e gui: Handle errors in the Install page
Handle errors during installation.
Displays an error message on screen instead of panic and crashing.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-05-06 13:31:50 -07:00
Reagan Lopez 86b8a0464b gui: Add third set of translations
Add the third set of translations and optimize screen size further.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-05-02 18:08:00 -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 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 105cb92d9c gui: Add/update localization strings
- Adds localization for bundle description
- Adds localization for variables
- Removes unsused localization strings
- Adds missing localization strings
- Standardize the strings used for rules

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-04-26 18:04:30 -07:00
Mark D Horn 0c176e7623 swupd: Speed up install
Use new bundle option to swupd verify instead of bundle adds.

Optimize the flow to only have a single swupd verify call.

Reduces the desktop image build from 40 minutes to 10 minutes.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-26 15:00:20 -07:00
Mark D Horn a7cee24878 network: Add restart to the retry loop
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-23 19:14:55 -07:00
Brian J Lovin 511a8600f3 controller: Enable ISO generation
Add execution of MakeIso() to controller's Install routine, after all
other image creation tasks are complete.

Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
2019-04-19 15:06:47 -07:00
Brian J Lovin 9c7820f3c3 swupd: Add verifyOnly flag to swupd.Verify()
When building an initrd it's convenient to only install the 'os-core'
bundle, because any extra bundles are not required and bloat
intird.

This commit adds an option to only run the 'verify' command and not
install the extra bundles listed as 'core-bundles'.

Approved to reduce coverage for swupd library.

Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
2019-04-19 15:06:47 -07:00
Mark D Horn cff36aa736 Generate ISO Framework hook
Create the command line argument and configuration file changes
to support generating an ISO from the raw image.

TODO: Integrate the ISO generation code

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 3945c9aeb2 network: Add support for Network Manager
Now check for which service is handling wired network interfaces.
Needed by the TUI which still handles static IP configurations for
wired connections.

TODO: Once NetworkManager is the new OS default, we can explore
configuring wireless interfaces via the TUI as well.

TODO: Consider change the other systemctl calls to use new dbus.

Dropping coverage requirement for this build

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-19 10:57:15 -07:00
Mark D Horn 49529add0c storage: refactor for manual partitioning
Always store the current partition table, with free space,
in the disk block device information.
Find free space from the already loaded partition table.

This information will be used for manual disk partitioning.

Use 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 3334c1ff67 storage: Identify Install Target types
Safe: gpt disk with sufficient space
Destructive: All media (expect mounted)
Modify: all gpt disks

When adding new partitions, ensure we store the new
partition number and update the device name.

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 8c99371179 Relocate preConf file name for logging use
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-02-19 09:28:18 -08:00
Mark D Horn 4667cb8dac New Option to clean-up swupd state directory
Fixes #215

We already default to placing the swupd state cache directory
in the installation target. This change implements the only
missing part of the request to allow removing the state directory.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-02-14 16:59:21 -08:00