127 Commits

Author SHA1 Message Date
William Douglas dd3e0f3d81 Update copyright years
Signed-off-by: William Douglas <william.douglas@intel.com>
2025-04-24 14:20:58 -07:00
William Douglas 6df531ffc8 Add --incremental support for update
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>
2024-11-18 10:18:06 -08:00
carlwiede 2341efda7e Fix broken links 2023-02-07 14:07:18 -08:00
Mark D Horn 8b7525ec87 Fixed typo in man page.
Fixes: https://github.com/clearlinux/distribution/issues/2189

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-11-10 12:06:16 -08:00
Castulo Martinez 68b4eee984 Adding flags to set data and cache in swupd
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>
2020-06-08 12:10:39 -07:00
Castulo Martinez 8d54e6c995 Separating the cache from the data used by swupd
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.
2020-06-08 12:10:39 -07:00
Castulo Martinez 4d0a6d29a1 Implement bundle-remove --orphans flag
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>
2020-05-08 09:30:50 -07:00
Castulo Martinez 4cd51ca5d8 Add --orphans flag to bundle-list
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>
2020-05-05 10:37:44 -07:00
Castulo Martinez 77b499cd0b Adding a --3rd-party flag to update
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>
2020-04-24 08:14:45 -07:00
Otavio Pontes d5865a42f0 docs: Changes on man pages to make is similar to system man pages
Using a man page formating similar to what other man pages in the system
uses.

Fixes #1285

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-23 12:08:11 -07:00
Castulo Martinez a59cbbd6a5 swupd --quiet documentation update.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-04-17 16:36:06 -07:00
Otavio Pontes 96e3c8857c mixin: Remove --allow-mix-collisions flag
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-08 09:03:56 -07:00
Otavio Pontes 75d3ee7e84 mixin: Remove --migrate flag from update
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-08 09:03:56 -07:00
Otavio Pontes 518f9aeab8 Release v3.24.4
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>
2020-04-07 09:31:01 -07:00
Castulo Martinez 5ab4f32545 3rd-party: add force option to "3rd-party add"
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>
2020-03-25 09:11:23 -07:00
Otavio Pontes 434ed2c6e7 version: Add flag --nosigcheck-latest
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>
2020-03-23 14:51:58 -07:00
Castulo Martinez 44e595691c Bug fix: os-install --bundles with os-core fails
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>
2020-03-13 10:03:32 -07:00
Otavio Pontes 9c85b275a3 docs: Replace vi with vim and os-core for xterm
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>
2020-03-13 08:04:37 -07:00
Otavio Pontes 84e507d3f5 service: Remove check-update service
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>
2020-03-09 14:10:51 -07:00
Otavio Pontes 2f86cbc7e3 docs: Reset release notes draft
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-03-09 10:56:05 -07:00
Castulo Martinez 1234a4a400 Adding draft for the 3rd-party release notes
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-03-04 16:03:32 -08:00
Castulo Martinez 22f31365e7 Forcing the removal of corrupt 3rd-party repos
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>
2020-03-04 16:03:23 -08:00
Castulo Martinez 5a957cfd18 Add --non-interactive flag
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>
2020-02-21 12:57:28 -08:00
Castulo Martinez 4251024f95 Dont install dangerous files from 3rd-party repos
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 #1281
Closes #1282

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-02-20 14:01:29 -08:00
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