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>
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>
With this change we check all the tests decreased and print them
all instead of printing the first and exiting.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Don't try to change the user's password if the password is not set.
It's useful for systems for remote access only where the ssh-keys
are just enough - and no password required.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@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>
Redefine the log levels to that increasing the value increases
the amount of logging. 1 (ERR) ... 5 (Verbose Debug)
Signed-off-by: Mark D Horn <mark.d.horn@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>
Changing the log level should not abort the installer.
Instead, force to highest or lowest value and log a warning.
This is particularly useful if set via the kernel command line
during debug of an installation we do not want to fail.
Moved setting the output log file name before setting level.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When the default logging is set to Info, have a baseline of
the installation steps logged.
Add additional testing to storage to ensure metrics do not slip.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
One of the steps check-coverage does is running "make check" and
writing it to a temporary file. This patch improves this step by
detecting the failure and better notifying the user it has failed,
also we show the result to the user if that's the case. Also remove
the left over temporary file case it fails.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Make the "check" target as a single shell block, and 1) improve the
fail output display (by showing the left over files) and 2) ignore
the /tmp directory itself (avoiding to consider it as a left over
when some process has touched /tmp for example).
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
This target is intended to be used to test local-travis out of the
regular check-coverage workflow.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
This patch sets the systemd-boot's timeout to 5 so the user may have
the opportunity to change the kernel arguments.
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>
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>
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>
Create a custom image configuration file with a post-install hook
to "self install" clr-installer into the target system.
If installing clr-installer to an actual block device (i.e usb stick)
tweak the block-devices entries.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Instead of faking the cancel event, actually press the Cancel button
if it is defined for the page. This allows the cancel button function
to be executed.
Command run through PipeRunAndLog would hang waiting for standard input.
We were overwriting the defined stdin input stream.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
The language code is what is stored in the configuration file and is
unmarshalled into the model, the language Tag is left uninitialized.
When we find the language code match on initialization, set the
language Tag correctly for display in the TUI.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Two of the Enable/Disable configuration options were assuming
Confirm was enabled; otherwise disable. Escape to cancel should
not change the default answer.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
If we had configured media for install, and then go back and remove
the target media the Install button was left enabled.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Loop devices are valid then don't exclude it when reading block device's
configuration, also make sure tui reacts properly.
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>
Make the function to convert env vars to docker arguments more generic
(it was previously specific to proxy vars). Also start passing down
the UPDATE_COVERAGE environment variable - that way we can automatically
update the converage database when running "make check-coverage".
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@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>