Fixes: #559
Allow the format to be set in the configuration YAML file
as well as on the command line.
Useful for mixes.
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>
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>
Since we have code which assumes we want autoUpdate to be true
unless it is added to the YAML file, we need to be sure it is
write to the YAML when false.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We should only store the telemetry answer when it was
user selected. This fix was needed due to the new advanced
configuration which save the temporary state.
Need to update the ister model for the new change.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
No easy way to test all of the error conditions of
Marshaling and Unmarshaling, so dropping the coverage by 1%
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
- 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>
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>
This is needed to ensure proper locking while running the external
tool for disk partitioning for Advanced disk configuration during
interactive installations.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
graphical will crash if you "confirm" without a value
for the kernel command line.
Also fixed the same bug in the text-based interface.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
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>
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>
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>
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>
- 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>
If running interactively and in a VirtualBox environment
force the default to be the kernel-lts.
Fixes#203
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>
Now the version string in the binary is set by the
existing tag, plus the sha if changes exists beyond
the tag, plus "dirty" if built with uncommitted changes.
Tagging of releases is now a manual process, but the Makefile
will still print the instructions.
Also saves us creating a PR just to change the version string.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Now users may defined environment variables to be used in the image
generation. Also, these variables are passed down to the pre and post
install hook scripts.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
This version will be release in parallel with ister_gui for
both validation and identification of any other required features
to release ister.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
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>
Add the user's ssh-keys configuration support as well as the required
bits to creathe the authorized_keys file.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
We're failing to detect if the the target system block device is an
image file or a device file, with that we fail to overwrite the image
assuming the target file is /dev/<img-file> instead of setting the
loop device up and using it.
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>
A alias can be used for a single partition only, this test makes
sure we test the case.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Make sure we keep only the used alias and make sure they can co-exist.
Currently if you have a device file alias and an image file alias
the image will always be created - even if it's not in use.
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>
I started increasing the minimal test but it's minimal for a reason -
to be minimal.
This patch moves the pre and post hook tests to their own test file.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
With this the user can add alias block devices and use these alias
to expand target media's Name values, i.e:
block-devices: [
{name: "target", file: "/dev/sda"}
]
targetMedia:
- name: ${target}
type: disk
...
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
The mass-installer use case for image generation requires to specify
the target system version. This patch allows the configuration of
an arbitrary version.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Introduce the initial support to post-install hooks. The code also
expands a set of pre-defined variables, for now the only exposed
variable is the chrootDir (the directory where the target system is
mounted).
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>