Multi-repo operations can run in one or multiple repos, so that needs to
be taken in consideration when opening and closing progress steps.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Telemetry is used to report problems to main repository, so it doesn't
make sense to create telemetry report files for 3rd-party repositories.
Closes#1358
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds the following files to trigger the execution of
clr-boot-manager:
- /usr/bin/clr-boot-manager
- /usr/share/syslinux/ldlinux.c32
Closes#1415
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd mirror
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd 3rd-party add
- swupd 3rd-party remove
- swupd 3rd-party list
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
On testing environments we produce a lot of false errors that would polute the
telemetry data with false information. Disabling that when debug mode is on.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
- On bundle-add send CRIT on errors, MED on missing bundles and LOW
on success
- update,verify: LOW on success and CRIT on errors.
- packmissing: LOW when a delta pack is missing and CRIT if a zero pack is missing
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
The severity of telemetry records were not corresponding to what's processed
on telemetry service.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Make sure files with unsual characters are successfully installed. Most
characters used in test are filtered by mixer, but there's no reason to
not support them in swupd
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Instead of creating another thread and copying the memory space from
the main program, vfork() block the main code and reuse the memory space
in child. This was created to be more performant in cases where execve is
called after forking, what's exactly our case.
Changes on variables on child are going to reflect on parent, so this should be
avoided. Writing and reading from file descriptors works exactly like fork so
we can keep using that.
This change makes a huge performance improvement on commands that are
executed multiple times.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When we want to install a single file we can copy it instead of using
the tar tar dance.
tar_tar is still left as a fallback if copy fails
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Instead of using a tar | tar command to install directories, we can create
the folder and apply needed properties. The tar|tar command is still left
as a fallback in the case the install dir fails.
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd hashdump
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd clean
- swupd 3rd-party clean
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd os-install
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd repair
- swupd 3rd-party repair
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Swupd 4.0.0 consolidate major changes introduced on previous releases and
the replacement of mixin functionality with swupd 3rd-party. Besides that
adds more enhancements and bug fixes.
Enhencements:
- Removal of mixin support on swupd
- Improvement of output of some swupd commands when using --quiet
- Regenerate swupd 3rd-party binary wrapper when template is updated
- More clear output on swupd bundle-list with --status flag
Bug fixes:
- Fix incorrect progress report when diagnosing with --extra-files flag
- 3rd-party was exporting variable XDG_CONFIG_DIRS with incorrect name
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When creating the fullfile and installing the bundle in targetfs we
need to preserve the owner and mode of file
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
XDG_CONFIG_DIRS variable was added with an incorrect name. XDG_CONF_DIRS was used instead.
Fixing that.
Fix#1443
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When dealing with extra files during a "verify" action, we cannot really
tell how far in the process we are, so we should be defining that step
as PROGRESS_UNDEFINED. Since we are using a PROGRESS_BAR, it is causing
to show an extra "[100%]" at the end of the diagnose process.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd diagnose
- swupd 3rd-party diagnose
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd search-file
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd bundle-info
- swupd 3rd-party bundle-info
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd bundle-list
- swupd 3rd-party bundle-list
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When a MoM contains an experimental bundle and the hashes in the MoM are
regenerated, the experimental bundles are being skipped. This commit
fixes that issue.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
There are several points in swupd that we find conditions that should never
happen, but we try to correct them anyway to be more reliable. Because of that
we may hide programming mistakes that are corrected later.
So, to make sure we are going to catch those problems in debug mode in our development
machines and test environment, I am suggesting a UNEXPECTED() macro that aborts swupd
if --enable-debug was used to build swupd.
I am adding some examples on what we could do with that.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When listing bundles using "swupd bundle-list --status" we were
distinguishing bundles that were explicitly installed, by marking them
as such and since bundle-list shows only bundles tha are installed, bundles
that were not marked as explicitelly installed were assumed to be
just installed.
When we use "bundle-list --all --status" (which shows installed and
uninstalled bundles), we were marking files as "installed", "explicitly
installed" and bundles without any of these distinctions were assumed to
be not installed. This could cause confusion.
This PR changes the "bundle-list --status" so we always label bundles
as either "implicitly installed" or "installed" (even though it couls
sound a little redundant) so it is consistent with the way they are
labeled during "bundle-list --all --status".
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When creating test bundles, we are not including os-core in them by
default. This is how it works in production so we should do it so it
resembles the real production environment more accurately.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd bundle-add
- swupd 3rd-party bundle-add
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit provides a minimal output to be displayed when the --quiet
flag is used for these commands:
- swupd bundle-remove
- swupd 3rd-party bundle-remove
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
When the template used for creating the wrapper scripts changes, all
exported binaries should have the scripts regenerated during updates
regardless of if the binary changed.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>