Update and BundleAdd are no longer in use once we switched
to a single swupd verify for the OS install.
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>
In order to avoid delay in loading the installer, scan the media in the
background as a separate go routine.
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
Add a main function for init, ensure all locals are labeled with local
correctly, change output to stop abusing kernel warnings.
Change success and failure messages to be consistent with systemd and
more clear to end users.
Signed-off-by: Brian J Lovin <brian.j.lovin@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>
Directly after TUI init, run the system check and report if there are
any failures, and force application exit.
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Add localization strings to proper files and correct calls to insert
these strings where necessary for syscheck and for the dialog when the
user's system fails.
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
After the user chooses a language (so we can localize the error), pop up
an error if the syscheck fails.
Add a quiet option to syscheck to disable printing to the terminal.
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Fixes: #364
Enable concurrent execution with different log files.
Now locks are based off of the log file name, and are process based.
Allows for checking if existing lock process is active.
Enables generation of multiple images in parallel.
vendor: Add lockfile package
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes Issue: #380
Change from --no-scripts to --no-boot-update which will
allow post install hooks of swupd to run for the target install.
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>
Remove the "Failed" wording in favor of "Searching" during
retries as the failed word was confusing to some customers.
Corrected spelling.
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>
Rufus in iso image mode creates a new filesystem and copies all files
from the iso onto that filesystem. This broke Clear boot because there
were missing files from the CD root to boot (those files were in
efiboot.img), and because initrd was limited to mounting only ISO files
to find the rootfs.
Now the files from efiboot.img are copied to the ISO root (so that Rufus
will now work), the initrd paths have been made congruent (though there
are two initrd.gz files - one in efiboot.img and one on the ISO root),
and some extraneous systemd files have been removed.
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>
The Partial() function is used to report a partial progress in a
progress bar. When using this function the value set on the progress bar
was always zero since it was doing a division of two integers that were
always resulting in a number < 1 which was being truncated because both
numbers were integers so go was using an integer to store the result
too.
This commit fixes the bug by converting the values to the right types.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Switch from NetworkManager-basic to NetworkManager for the pending
network patch set.
Change to running each systemctl command in sequence instead of as
a single command to improve the recovery rate for network restart.
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>
Recently discovered Clear Linux only allows lower case letter
as part of a login name. Updated validation check and error message.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Several logic fixes and hooks to debug the change password
problem. It appears the c-lang function we use for encryption
has some conflict with GTK, memory allocation.
TODO: Replace c-lang function with native go-lang code
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This added confusion and complex logic.
Since we are requiring that there is always at least one
user created, (as an admin), delete serves no purpose.
Keep strings as they will be needed in the User Manager coming shortly.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We want the root account locked on a Desktop installation to
prevent anyone with console access to switching to a virtual
terminal and setting a root password.
If there is an admin user, we will lock the root account.
TODO: When the user manager is added, only one user will be
required to be an admin.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>