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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
Handle errors during installation.
Displays an error message on screen instead of panic and crashing.
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
Create a new environment variable 'yamlDir' which locates
the directory containing the configuration YAML file being
used using the installation. This can then be used for
pre-install and post-install hooks to locate the scripts
to be run.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Need to ensure we set the boot mode correctly on the targeted
boot partition.
1. Ensure boot flag is set, was getting removed by the follow-on
sgdisk command.
2. Need to set legacy_boot, not just boot when selected in YAML
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Save a copy of the current configuration prior to starting
the installation. This provides a YAML containing the configuration
in case of a crash or failure during the install.
It is placed in the same directory as the clr-installer.log file as
both of these files should be submitted in case of failures.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
By default, the prompt for the encryption passphrase will timeout
and drop into the rescue shell. This prevents the timeout and
waiting forever for the passphrase.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>