Allow users to update by stepping through each release between their
current version and the latest. This option is primarily for cases
where update is failing due to memory or disk space running out when
updating normally.
Signed-off-by: William Douglas <william.douglas@intel.com>
This commit provides the --datadir and --cachedir flags that can be used
to specify different locations for the data and cache. If the same
location is desired for both (default) then users can still use the
existing --statedir flag.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Currently there is only one location, known as "statedir", where swupd
stores data and cache. Normally it make sense to keep the data in a
path that is relative to the path prefix of the target system, since the
data is specific to that system, but cache can be independent of the
system, and that way it can be reused for other target systems if
desired.
This commit splits the cache and data into two different locations.
It also stores the cache in a path that is dependent of the mirror url
being used by swupd. The commit also makes all references to files in
the cache or data directories through getter functions thus removing the
hardcoded reference to the file's location, making it easier to move the
location in the future if needed. Lastly, this commit changes the read
permissions for the data directory and the manifest directories in the
cache to be user readable.
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>
Adding the --orphans flag to bundle-list which shows those bundles that
are installed ut no longer required by any tracked bundle.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit adds a flag that can be used to update content from
3rd-party repositories after updating the regular content if
successfull.
Closes#1473
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Enhancements
- 3rd-party: Export XDG_DATA_DIRS and XDG_CONF_DIRS in binary wrapper
- 3rd-party: always recreate the binary if a binary is updated
- 3rd-party: repair regenerate all binary wrappers
- Make it mandatory to have a signature for latest file
- Add flag --nosigcheck-latest to proceed with update without checking the signature of latest file, but still checking the signature of Manifests.
- Better warning messages for --nosigcheck flags
- Don't print double slashes for paths in any message
- Add a --force option to swupd 3rd-party add to proceed even when errors found
- Mixin tool deprecated
- Don't try resume downloads if server respond with incorrect range error
Bug Fixes:
- When checking latest version signature, don't consider it invalid if server can't respond file size
- If delta manifests are valid but generating an invalid manifest, download the full manifest again
- Fix problem that caused Getcwd errors to be warned when swupd was run in an invalid directory
- Some files could be removed when a directory was renamed to a symlink in an update
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When swupd is adding a 3rd-party repo and it finds a non empty directory
that matches the repo's name in the content path it warns the user and
aborts. This may have been caused by a corrupt repo.
This commit adds a --force flag to allow users to instruct swupd to
remove the existing directory and its conent and continue adding the
3rd-party repo.
Closes#1388
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
In some situations it might be useful to skip signature verification of
latest, but continuing checking the signature of the files that are going
to be installed.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
When doing a system install with "os-install --bundles" if the list of
bundles to install includes only "os-core" the install fails.
This commit fixes the issue.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Vi isn't a bundle anymore. Replacing all examples to vim.
os-core isn't a good bundle for example. Using xterm.
Related to #1369
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Clear Linux isn't using the check-update service anymore for a long time
and there's no other known uses for those scripts. So there's no reason to
keep them.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit allow users to force the deletion of corrupt 3rd-party repos
which will end up deleting most of the repo's files, except for the
scripts that exported files from that repo.
Closes#1343
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Some commands were recently added to swupd which require user
interaction under certain circumstances, when this happens the user has
to manually enter either Y/N to continue or abort the current process.
This commit provides a --non-interactive=<yes/no> flag that can be used
to avoid getting this interactive prompts.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
If a 3rd-party bundle include files that have either the setuid, setgid
or sticky bits set, then it should not be installed since they could
compromise the security of the system. In this case the user should be
asked to see if they want to assume the risk and continue, or abort the
process.
Closes#1281Closes#1282
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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#891Closes#732Closes#674
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
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>
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>
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>