Commit Graph
103 Commits
Author SHA1 Message Date
Castulo Martinez a562fb4fd3 Implement --file option for diagnose/repair
When diagnosing/repairing a system, sometimes is useful to only
diagnose/repair a specific file or path.

This commit implements the --file option for diagnose/repair so a file
or path can be diagnosed only instead of doing it to the whole OS or a
whole bundle.

Closes #1150

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-28 15:01:47 -08:00
Castulo Martinez a9e4cfa652 Adding 3rd-party to swupd man page
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-22 13:22:37 -08:00
Castulo Martinez 896cd20d48 Updating the existing man to be consistent
This commit updates the swupd man pages to have a better looking
formatting, it fixes some omissions in the documentation and also
rewords a few sentences to make the information more digestable.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-22 13:22:09 -08:00
Castulo Martinez 799a571d72 Adding missing "clean" command to man page
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-22 13:21:27 -08:00
Castulo Martinez 665bf89bab Reordering the man page to be consistent with help
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-22 13:21:25 -08:00
Castulo Martinez ad32cb2111 Updating the year of the copyright in the man page
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-22 13:20:55 -08:00
Castulo Martinez 381f08dea1 Adding installation status to bundle-list
The "bundle-list" command can be used to show all installed bundles in
the system, however, currently there is no way to know which of those
installed bundles were implicitly or explicitly installed.

This commit implements the "--status" flag for bundle-list which can be
used to show which bundles were explicitly or implicitly installed.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-22 13:10:48 -08:00
Castulo Martinez 8eb8e8264b Improving diagnose/repair --picky documentation
This commit improves the diagnose/repair --picky documentation in an
attempt to make it clearer for the user.

Closes #1205

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-16 15:37:15 -08:00
Castulo Martinez 3f3ff08c8f Add ability to search files in specific version
The search-file command is restricted to looking for files in the
current version. This commit adds the --version option to the command
that can be used to seach for files in specific versions of Clear.

Closes #1155

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-08 11:36:48 -08:00
Castulo Martinez adb88da2f6 Removing superseded commands from the help menu
After a grace time period, superseded or deprecated commands should be
removed from the help menu so people is not encouraged to use them. They
should continue to work though for backward compatibility.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-12-12 09:17:26 -08:00
Castulo Martinez b91ecbbc6d Implement --repo flag for 3rd-party bundle-list
This commit adds the --repo flag for the 3rd-party bundle-list command
which can be used to specify the repository from which the bundles are
going to be listed.
2019-12-05 16:05:51 -08:00
John Akre bf4cdc03a0 os_install: Skip optional bundles when flag set
When the --skip-optional flag is set, optional (also-add) bundles will
be skipped.

Fixes: #1182

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-31 09:12:21 -07:00
Castulo Martinez e5324c39ab Warn user when using dangerous bundle-remove flags
When user uses the --force or --recursive flag swupd prints a message
explaining what effects it will have on the system. This commit changes
this message from informational to warning to attract more attention.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-10-30 13:38:41 -06:00
Castulo Martinez c796cd310c Also remove deps when bundle-remove --recursive
If the -R / --recursive flag is used, remove the specified bundles along
with their "deletable" dependencies.

In this context deletable means:
- the dependency is not os-core
- the dependency is not required by other installed bundle that is not
to be removed
- the dependency is not tracked (specifically installed by the user)

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-10-30 13:38:41 -06:00
Castulo Martinez 109f36ebeb Adding dummy --recursive flag for bundle-remove
This commit adds the --recursive flag to bundle-remove but doesn't
implement its functionality, only makes the flag available in the
command line and into the command's documentation.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-10-30 13:38:41 -06:00
Otavio Pontes 4ee1808a81 Reset release notes for next release
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-23 14:14:42 -07:00
Otavio Pontes 1f003f0830 Finishing release notes draft for v3.23.0
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-23 14:03:14 -07:00
Otavio Pontes 1c499ccaa3 progress: Add release notes of the progress improvements
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-18 09:27:25 -07:00
Castulo Martinez f7aeea5cef Implement bundle-info command
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>
2019-10-04 08:42:55 -07:00
Otavio Pontes eded4059f9 docs: Add general clear info on how to contribute guide
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-02 13:01:12 -07:00
Otavio Pontes b3477d9b4b docs: Fix --certpah documentation
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-02 13:01:12 -07:00
Otavio Pontes 2c80721e32 Release Notes Draft
Introducing a release notes draft to help writing release notes on next releases

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-01 16:06:23 -07:00
Castulo Martinez e419e7fa9d Refactor bundle-remove to include improvements
This commit does a major refactor of the bundle-remove command to
include these improvements:

- Adds a "--force" flag that can be used to remove a bundle that is
required by other installed bundles along with all the bundles that
depend on it
- When attempting to remove a bundle which is required by other
installed bundles, swupd used to show the list of dependencies in a tree
view, this list was very large in some cases. This commit changes the
output of such cases from a tree view to a simple deduplicated list of
bundles that require the bundle to be removed. The user can still see
the old tree view by including the --verbose when running the command
- Stops notifying telemetry of user errors, like user trying to remove
an invalid bundle, or a bundle that was not installed, etc
- Consider all bundles provided in the bundle-remove command when
checking for dependencies (required by)
- Instead of removing each bundle in the command one by one, consolidate
all bundles to be removed, validate them and remove them all at once.
This will optimize the tasks to be executed for removing bundles.

One change included in this commit for bundle-remove is propagated to
bundle-list:

- When using "bundle-list -D BUNDLE" to find what bundles depend on
BUNDLE. The list will be presented in a simplified deduplicated list of
dependencies by default instead of the tree view that used to be
default. The user can still see the old tree view by running the command
appending the --verbose flag

Closes #891
Closes #732
Closes #674

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-09-30 14:40:01 -07:00
Castulo Martinez 5ff26d385f Re-enabling the --bundles option with repair
Now that --bundles has been made safe to use, it can be re-enabled with
repair to only repair problems with the selected bundles.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-09-20 15:26:51 -07:00
Castulo Martinez 395a1c5c98 Re-enabling the --bundles option in diagnose
Now that the -B/--bundles option has been made safe to be used with
diagnose it can be re-enabled.

This commit enables the --bundles option when using diagnose, so users
can now only verify that the comma separated list of bundles are
correctly installed. The --bundles option cannot be used along with the
--picky option or the --external-files-only, these two options remove
all files in the picky-tree path that are not listed in any of the
manifests from installed bundles, when using --bundles the manifests
considered are only those from the bundles in the list, so the user
would end up deleting many files which is probably not what they want.
So these options are not allowed.

Users will still be able to use --bundles with --picky or --bundles with
--extra-files-only with the "verify" command (for backward
compatibility). The verify command has been superseded and will be
removed from the documentation eventually, so only users that know about
this command and are already using it for something would continue to
use --bundles with --picky or --extra-files-only.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-09-20 15:26:51 -07:00
Karthik Prabhu Vinod 15be9a7f09 Show format bump
Now, we have global option
and info_verbose logging level.
For this PR, we have verbose for info,
check-update which shows format versions.
This also helps future implementations leverage
the use of a verbose option for their own need.

commands:
swupd check-update --verbose
swupd info --verbose

Fixes #1066

Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2019-09-18 14:22:30 -07:00
Otavio Pontes 25b89946ee docs: Fix identation of doc file
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-09-10 13:36:11 -07:00
John Akre eac860e338 Add statedir-cache support
The --statedir-cache flag specifies a secondary statedir that will be
checked before downloading files over the network.

The primary reason to use the statedir-cache is to enable the os-install
command to take advantage of hardlinks when installing content across
partitions. In this case, update content stored in the statedir-cache
(source partition) will be copied to the statedir (target partition) before
installing content into the target partition. Since the update content
will exist on the target partition before installation, hardlinks can be
used instead of copies.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-08-20 14:45:34 -07:00
Otavio Pontes 299977fec4 update: Download search-files indexes on update
If --update-search-file-index flag is used on update, all search-file indexes, i.e.
all Manifests will be downloaded on update. This shouldn't be used if you have
disk or network restrictions, but it shouldn't be very download intensive after the
first usage because delta manifests are going to be used.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-08-14 13:04:23 -07:00
John Akre 031c06776e os-install: Add download flag
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>
2019-08-07 14:12:34 -07:00
Castulo Martinez 165be11ab9 Adding information about the config file
Closes #1020

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-07-30 09:54:56 -07:00
Castulo Martinez e82e21d7a3 Updates to the man pages
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-07-30 09:54:56 -07:00
Castulo Martinez 17e1148763 Update the man pages about "swupd verify -B"
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-07-29 15:20:56 -07:00
Castulo Martinez 62925f2191 Removing --bundle flag from diagnose
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 diagnose"

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-07-29 15:20:56 -07:00
Castulo Martinez 2e3a584558 Removing --bundle flag from repair
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>
2019-07-29 15:20:56 -07:00
Castulo Martinez 6a0849646d Adding --extra-files-only flag to diagnose/repair
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>
2019-07-19 10:46:20 -07:00
Castulo Martinez e0256bee24 Make "diagnose --picky" a superset of "diagnose"
Running "swupd diagnose --picky" result in only identifying the extra
files in the system, but doesn't run the other standard checks that a
"swupd diagnose" do. "swupd diagnose --picky" should do everything
"swupd diagnose" does plus searching for the extra files.

This commit fixes the issue by making diagnose --picky a superset of
diagnose. The commit also makes some changes in the output of --picky so
it is consistent with the rest of the diagnose output.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-07-19 10:46:20 -07:00
Castulo Martinez b5f418b108 Adding --wait-for-scripts flag
When running tasks that require to run post update scripts in swupd,
for most users we don't want to wait for the scripts to finish running,
those can be run in the background so we can finish the task faster.
However for some users like DevOps, clr-installer, and QA, it is useful
to have a way to instruct swupd to wait until these scripts have finish
running.

This commit adds a way of doing this by introducing the
--wait-for-scripts flag.

Closes #909

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-07-17 10:50:17 -07:00
Otavio Pontes ad87ab124e docs: Improve swupd search docs
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-15 16:23:50 -07:00
Otavio Pontes 1b791c9b1e docs: Fix wording on documentation related to swupd verify deprecation
Also removes TODOs that aren't going to be executed anymore

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-15 16:23:50 -07:00
Otavio Pontes 4ca53af48a progress: Add a flag to run swupd without progress report
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-15 11:44:24 -07:00
Castulo Martinez 10bc311e4c Fixing duplicated flags in swupd
Some swupd flags from subcommands clash with some global flags.

This commit fixes the issue by renaming the duplicated flags in the
subcommands.

Closes #946
Closes #950

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-07-12 14:28:05 -07:00
Otavio Pontes 9fe500d038 docs: Add document explaining how we do signature verification on swupd
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-06-28 15:52:16 -07:00
Castulo Martinez 2cb0dd80b4 Renaming "swupd verify" to "swupd diagnose"
This commit renames the "verify" command to "diagnose" to make it
more straightforward for the user to understand the purpose of the
command.

Closes #918

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-05-14 15:51:28 -07:00
Castulo Martinez dc8e9235d5 Making verify --fix a top-level command
The purpose of "swupd verify --fix" is to repair local issues relative
to a server manifest. However the verify command currently has many
flags, and some flags are mutually exclusive, this makes the command
very confusing to use for users.

This commit makes "swupd verify --fix" the top level command
"swupd repair". This new command still uses the verify code under the
covers.

Closes #914

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-05-14 14:33:49 -07:00
Castulo Martinez a84c60a500 Making verify --install a top-level command
The purpose of swupd verify --install is so it can be used to install
a new Clear OS in a target system. However since currently it is part
of the swupd verify command it makes it confusing as of to what its
purpose is.

This commit moves the swupd verify --install option to be a top level
command (swupd os-install) so its purpose is more straightforward. The
new command still uses the verify code to perform the task underneath.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-05-14 14:26:30 -07:00
Otavio Pontes 6c4b44ac37 docs: Use doxygen style on header API documentation
Documentation coverage on src/lib is now 100% and the goal is to eventually
reach that for everything on src/.

Also improve some documention on headers.
2019-04-23 14:59:43 -07:00
Otavio Pontes 30f4ec4436 docs: Add a doxyfile to make it easier to check documentation coverage 2019-04-23 13:27:10 -07:00
Otavio Pontes d8bb8f3abc search: Taking scope variable parameter out
--scope=b output is the same as -T 1. And if we have a real use case for
--scope=o we can create another parameter just for it.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-03-28 16:35:01 -07:00
Otavio Pontes 290ec7e503 Remove parameter --display-files from search-file
If search term is empty we will display all files

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-03-28 16:35:01 -07:00