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>
The size of the swapfile can be set in the YAML file
and overridden by the command line argument.
Update for usage of XiB or XB units.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Add command line arguments and YAML file configurations for settings
skipping partition size checks during validation.
Skip Validation All implies Skip Size.
Never write skip validation options to YAML
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
With the new flag we can easily instruct clr-installer to use an arbitrary
build/install, this flag eases the clr-boot-manager's CI by testing image generation
before we land new features.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
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>
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>
Allow the user to override the default set of bundles on
the command line. This comma-separated list will override
either the default built-in bundle list or the bundle list
from a specified configuration file.
Note that the installer will still augment this list with
any RequiredBundle which is needed due to option selections
such as choosing a non-default keyboard or language, enabling
telemetry, or adding additional users.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Add new --template (-T) command mode which will generate
a YAML configuration file.
Attempt to improve test coverage.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #591
When attempting to download a configuration file supplied by
the kernel command line, keep trying forever. This is generally
used by a network boot installation.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
To reduce cyclomatic complexity, the boolean command line argument checks
were moved to a new function.
Signed-off-by: John Akre <john.w.akre@intel.com>
Optionally included bundles (also-add) can now be omitted from the
install target by passing the --swupd-skip-optional flag or by setting
the swupdSkipOptional field in the config file.
Signed-off-by: John Akre <john.w.akre@intel.com>
We were only support version from the YAML file, now support
setting directly on the command line for swupd.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Allow setting the version url and content url to the same value
with a single argument of --swupd-url.
Useful for mixer
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>
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>
Since the installation is usually a one-time run, change the default
logging level to debug to capture details on any install issues.
This will help improve resolving customer issues when they arise.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
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>
Add a new command line option --system-check.
When run with this option, run a system chcker and exit with a 0 or 1
for passing/failing.
Checks for required CPU features using procfs and EFI firmware using
sysfs. Prints status and results to stdout.
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>
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>
- The new -j flag detects ister json config format and converts it to yaml
- The existing -c flag also detects ister json config format, converts it to yaml
and continues as usual
- Handles the ister "rest" option for physical targets
- Handles multiple targets
Signed-off-by: Reagan Lopez <reagan.lopez@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>
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>
Add the swupd's --format, --contenturl and --versionurl arguments.
These arguments are mapped with the --swupd prefix such as:
--swupd-format, --swupd-contenturl and --swupd-versionurl
And are used for constrained environments dealing with local installs,
specially with image generation in a network isolated environment.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
With this argument (either -S or --stub-image) we create the image
- if that's the case - and create the target file systems but don't
actually install content.
It's useful for pre-release validation where the content is generated
and dealt by the release tooling.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
To enable debugging of an installation the log level may need to
be set via a kernel parameter as the installer should launch upon boot.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When creating images it's useful to have a --swupd-state to provide
an state dir outside the image so we don't duplicate the target's
content.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
With the --block-device command line argument the user can remap
or add an entry to configuration file's block-devices definition.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
- Hid the makefile comment
- Catch additional test case that need to clean up the
temp downloaded file
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Preventing future confusions (when we implement dnf support) rename
the --mirror argument to --swupd-mirror and start creating a namespace
for the arguments.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Ensure both the main code and test clean up after themselves.
Testing for changes in the /tmp directory done in the Makefile
to ensure the testing is done outside of the code itself.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This patch fixes the tests coverage regressions and add a small fix
to the script where it doesn't remove the temporary coverage report
file if it fails. Now it can be enabled on the CI and avoid adding
new testsuite regressions.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
FPrintf's return wasn't being checked, this patch makes the linter
happy by checking the error condition.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
This is code is still alpha. The Text-based User Interface is
undergoing a resign of the layout before beta.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>