We have a list of header files that weren't documented yet. Add them explicitly
to the check to prevent us to lower the quality of the documentation of headers
that are well documented.
Also fixing some documentation that weren't included because of incorrect style.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
We used compare-like functions as arguments to other functions that
filter, sort, compare data. These functions are scattered accros the
code and they are sometimes difficult to identify so there is a lot of
code duplication.
This commit organizes all the compare like functions throughout the code
in the same place and with standard naming so it is easier to find them
and reuse them.
Closes#1167
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit implements the swupd clean command for the 3rd-party bundles
so users are able to clean the cache on their state directories.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds the ability to update the system based on the 3rd-party
repositories the user have.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds a new "3rd-party bundle-info" command which can be used
to show information about a bundle from a 3rd-party repository. If no
3rd-party repository is specified, the bundle is searched for in all
available repositories.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds the ability to remove 3rd-party bundles. If a repo is
not specified the bundle will be searched for in all repositories. All
options from the normal bundle-remove command are supported with
3rd-party bundles.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit introduces a new command to list bundles from all 3rd-party
repositories. At this point users cannot choose a specific repo to show
its bundles but rather all repos are shown.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds the 3rd-party bundle-add command to swupd. It does not
implement the functionality yet.
The actual functionality will be implemented in a different commit.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
sudo swupd 3rd-party add <repo_name> <upstream_url>
With some clean up from Otavio
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
Now make check is only running unit tests and a new target,
functional-check is used for bat tests. The major win on that
was that now we can use find to look for all bat tests in the
functional library and we don't need to keep the BATS list
updated.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This PR starts the third-party repo-add, delete, list skeletal features
for swupd. This PR also add support for configure flag
to build third-party optionally for swupd, off by default.
Repo Add:
sudo swupd 3rd-party add <repo_name> <URL>
Repo Remove:
sudo swupd 3rd-party remove <repo_name>
Repos List:
sudo swupd 3rd-party list
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
Functional tests for the new "--recursive" flag in bundle-remove that
will be used to remove a bundle and its dependencies.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Changing the progress report lib to always print 0 or -1 when a step is
started and a 100 when a step finishes.
Also reorganizing all commands to have less steps (when possible) and that
are more meaningful to progress report. Hide some internal steps that doesn't
provide useful information to end users.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Adding more tests to make compliant instead of creating new ones.
Shellcheck and docs-coverage weren't added because they have extra
dependencies
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
The bundle-info command shows detailed data related to a specified
bundle. Among the data currently displayed it includes:
- If the bundle is installed or not
- If the bundle is experimental or not
- If the bundle is installed, it shows if there is an existing update
for the bundle
- The latest available version of the bundle
- The size of the bundle and all its dependencies
- The max size needed in disk to install a bundle if not installed
This commit also adds the following command flags:
--version: so a user can display information for a bundle in a
specific version, not only the current version.
--dependencies: this flag can be used to show all optional and required
bundles that are directly and indirectly included by the specified
bundle.
--files: this flag can be used to show all files that are part of a
given bundle.
All flags can be combined to show specific data.
This is the first of a series of PRs to implement the bundle-info
features referred to at #461.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
All files that are written by tests should be written in the directory
where the tests were executed and not the directory where code is.
Make distcheck now works fine
Fixes#343
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When running the check-update command we get the latest version for the
format we are currently in, but we really want to get the latest version
regardless of the format.
This commit fixes the issue.
Closes#482
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Previously, when adding included manifests errors were thrown away which
resulted in swupd operations that could succeed, even when failing to
load an included manifest. Now when an included manifest fails to load,
swupd will return a failure.
Signed-off-by: John Akre <john.w.akre@intel.com>
When the --download flag is set for the os-install command, update
content will be downloaded to the statedir and no content will be
installed.
Signed-off-by: John Akre <john.w.akre@intel.com>
The -B/--bundle option is confusing and causing users to wipe out their
systems. This option was really just meant for os-install, so this
commit removes it from "swupd repair".
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Manpages are created in make dist so we should clean them only on distclean.
For example if you run:
$ make dist
$ tar xf swupd-client-version.tar.gz && cd swupd-client
$ make clean
All manpages are going to be deleted and the source files aren't available on
the tarball. So you are going to be blocked in a build.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
To make it easier to document and to read, group global related functions
and variables in an exclusive header file
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Since --picky was made a superset of diagnose/repair, there is the need
of a new flag that only finds/repairs the extra files that are not in
any manifest.
Many things were included in this commit:
- This commit adds the new flag --extra-files-only for this purpose.
- The commit also refactors the verify function to simplify its workflow
and remove code duplication
- It also adds some validations for flags that are mutually exclusive in
verify/diagnose/repair
- Updates the documentation
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
In the case that we have a bundle installed as also-add and removed later,
repair shouldn't reinstall that bundle. The same is valid for diagnose and update.
Os-install is the only exception. We should always install all bundles that are
listed as also-add in os-install.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
swupd supports global flags and supports local flags that are specific
to subcommands. Flags that are specific to subcommands can be reused in
a different subcommand. Global flags should be unique and should not be
reused as local flags to avoid conflicts.
This commit adds a bash script that checks that the flags currently used
in swupd are valid (have no conflicts with other flags from the same
command or with the global flags). This script will be run as part of
the build process so in case an invalid flag is found the build will be
stopped. Alternatively, the script can be used by developers to validate
a new flag during the implementation time.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Swupd will install optional bundles on bundle-add by default,
but will skip them if specified by the user by using the
--skip-optional / -o flag..
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
An optional bundle is not required to be installed in the system while
included bundles are. Swupd will install optional bundles on bundle-add
by default.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>