Enhancements
- Reorganizes the location of cached manifests in the statedir
Bug fixes
- Makes the swupd autocompletion script POSIX compliant
- Fixes a syntax error in the configure.ac script
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
The `configure` script generated from configure.ac tries to run a `]`
command, but that command doesn't exist.
The root cause is a syntax issue configure.ac: there is a stray `]` on
one of the lines.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Bash autocomplete scripts should be POSIX compliant, so fixing that and
adding a test to validate this.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When swupd downloads manifests to the statedir they are downloaded in
directories that represent the version of clear that the manifests
belong to. However those version directories are stored in the statedir,
root directory. This commit moves them into their own "manifest"
directory so there is more consistency with the downloaded files.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Enhancements
- Bundle-list now offers an option to list all bundles that are not required
by any explicitly installed bundle in the system (--orphans)
- Flag --orphans added to bundle-remove to remove all bundles that are not explicitly installed in the system
- Consolidating file heuristics to remove duplication, leading to an improvement in performance
- Bash autocomplete auto generate options so it will always match the current installed swupd
- Complete support to unusual characters on filenames and directories
- Better debug output when delta files failed to apply and curl download errors
Bug fixes
- Config file loader was not loading config file in /etc properly
- Fixed unsigned to signed integer conversion errors
- Invalid warning was printed on 3rd-party update when there were no 3rd-party repositories
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Print a more useful error when we fail to locate a file to apply a
delta. Add a suggestion for the user to run `swupd repair` and make
it clear that the problem is in their system and not in the update
content.
Fixes#1425
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When swupd downloads manifests to the statedir they are downloaded in
directories that represent the version of clear that the manifests
belong to. However those version directories are stored in the statedir,
root directory. This commit moves them into their own "manifest"
directory so there is more consistency with the downloaded files.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Create another github job to check if the API has been changed in this
PR, so it will be easier to notice that a broken test is just an API
broken test
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Some of these references to statedir where left in the code, this commit
moves them to the statedir.c module so references to content of the
statedir are not hardcoded. Files in the statedir can move to different
locations freely this way.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Don't run heuristics for os-install or repair --quick.
On os-install we want all files to be always installed. On repair --quick
we don't process any do_not_update files
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Actually thread_pool supports zero threads, that means exactly running in
serial. So rolling back to what it was before the integer conversion fix of
commit 2a7f181e00.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Instead of having a function to remove the contents of a specific
directory in the statedir this commit creates a generic function to
remove the contents of a directory without removing the directory
itself.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Converting from different int types are not always correct, so turning the
gcc warning that check for conversions that might change the value or sign of
the number.
check-update was trying to create a motd in a deprecated directory and
it was always failing.
Removing code for now.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit adds these function:
- statedir_get_delta_dir: to get the "download" directory
- tatedir_get_fullfile_tar: to get thet downloaded fullfile tar
- statedir_get_fullfile_renamed_tar: to get the renamed fullfile during
untarring
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds the following functions:
- statedir_get_staged_dir()
- statedir_get_staged_file()
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Currently we have two functions to track bundles, bundles should always
be tracked in the same location, if there is an exception to this rule
then it should be handled separately.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds the statedir.c module and moves the function to get the
tracking directory to this module. It also adds a new function to get
the path to a tracking file into the module.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Bootloader updates should trigger a call to boot manager, but they shouldn't be
treated like boot files.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Ignore call was confusing and value was ignored for the main usages.
It should always run with the main heuristic functions.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Implementing the --orphans option to remove bundles no longer required
by tracked bundles from 3rd-party repositories.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit implements the --orphan flag for bundle-remove which can be
used to remove bundles that are no longer required by tracked bundles.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>