--force/-x is specific for verify command, but documentation was stating
that it was global. Removing all references from a global --force and
adding that information to the help page of verify command.
Also moves the force variable from global to verify.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Those files are generate that in build time, so there's no reason to keep
them here.
We went out of sync before and it's easier to make sure the last man page is
used if we generate that on build time.
Also removes man page tests because they don't make sense anymore. And add
option --disable-manpage, so we can build swupd without manpages if rst2man.py
isn't available.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit reorganize the codes in the swupd_code enum so the codes
that were already defined before are still the same. This commit also
renames some of those codes so they are more consistent with the rest of
the codes in the enum.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
The guide in how_to_contribute.md specify a set og rules to follow to be
a contributor of the swupd client project.
This commit adds the guidelines for using return/exit codes in functions
within the swupd source code.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Regardless of what codes are used internally, swupd should always
exit with a code defined in swupd_exit_codes.h.
This commit makes those changes for verify.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Regardless of what codes are used internally, swupd should always
exit with a code defined in swupd_exit_codes.h.
This commit makes those changes for update.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Regardless of what codes are used internally, swupd should always
exit with a code defined in swupd_exit_codes.h.
This commit makes those changes for mirror.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Regardless of what codes are used internally, swupd should always
exit with a code defined in swupd_exit_codes.h.
This commit makes those changes for clean.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Regardless of what codes are used internally, swupd should always
exit with a code defined in swupd_exit_codes.h.
This commit makes those changes for hashdump.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Regardless of what codes are used internally, swupd should always
exit with a code defined in swupd_exit_codes.h.
This commit makes those changes for bundle-list.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Regardless of what codes are used internally, swupd should always
exit with a code defined in swupd_exit_codes.h.
This commit makes those changes for autoupdate.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Some functions currently mask error codes by using a very general error
like SWUPD_COULDNT_INSTALL_BUNDLE (formerly EBUNDLE_INSTALL) in the case of
the bundle-add command.
This commit modifies the codes returned by the bundle-add in case of
failures so they are more meaningful for the actual issue.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Some functions currently mask error codes by using a very general error
like SWUPD_COULDNT_REMOVE_BUNDLE (formerly EBUNDLE_REMOVE) in the case of
the bundle-remove command.
This commit modifies the codes returned by the bundle-remove in case of
failures so they are more meaningful for the actual issue.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Allow users to verify only a given subset of bundles rather than the
entire system. This also enables an alternative "installation" with a
verify --fix --bundles $foo where foo doesn't include os-core which is
useful for installing 3rd party content that lives outside of /usr.
We have defined that we are committing to the repository the rst files,
so I'm adding the alias rst file
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Add a new alias filetype that swupd understands. This file's format is
the following:
A potentially multiline file with an alias name per line followed by,
ont he same line, a list of bundle names with all fields being tab
separated.
If the same alias is defined in the same file, the first definition
will be used. Malformed lines will not be parsed but it is valid to
have multiple concurrent tabs in a line.
The files are to be read from both user and system alias directories
with stateless overrides of system files with user files. This implies
you can mask a system file with a user file of the same name if the
user file is a symlink to /dev/null. You can also override a system
file with a user file of the same name but with different content (the
contents of the system file will be unused). Alias files are
considered in lexicographical order sorted the same as bundle-list. If
two files provide the same alias than the one in the file that comes
first lexicographically will be used. User files will always come
before system files, such that if a user file 'u' defines alias 'a'
and a system file 's' also defines alias 'a' the user file definition
will be used instead of the system file definition.
The intended usage of this will be for OS content to provide alias
files that will then enable users to add content using the provided
aliases as well as enabling users to define their own alias for custom
package groups.
Eventually this feature may be considered for extension to other areas
aside from bundle-add but for now only bundle-add usage is to be
supported.
Linux programs return code should be a number between 0 and 255, so 404 is an
invalid return code. Removing it from docs and from swupd-error.h file.
As it wasn't being used, this won't be a problem.
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
max-parallel-pack-downloads was renamed to max-parallel-downloads
and documentation needs to be fixed
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
After running an update, the state directory is cleaned up.
Sometimes it is useful to be able to peek at the state directory
after an update, this is specially true when testing updates,
this way tests can verify what manifests were downloaded during
the update.
This commit adds the --keepcache option to swupd update so it can
be used when writing tests for updates.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Add parameter --max-parallel-pack-downloads to control the number
of packs to be downloaded in parallel. This is usefull if for some
reason the default value is too high or low for your configuration.
Added a description for the new --skip-diskspace-check flag
to the bundle-add section of the swupd manpage.
Fixes#506
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Instead of doing this behind the user's back expect them to do it
themselves. This also removes the inconsistencies of running some
commands with sudo -E and others without -E. If users want to provide -E
let them do it themselves.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Allow updating to a version greater than current using -m. Also
supports 'latest' that has the same behavior as not passing any flag.
If the requested version is smaller than the server version (which
is the latest one available in the current format), use that. If not,
use the latest available and re-execute.
Care was taken so that a "update -m LAST_OF_A_BUMP" will not trigger a
re-execution of update.
At the moment version_url is still used, but a future improvement
could avoid it by first looking at the format of the given version
first.
Fixes#257.
Add "swupd verify" options that were missing from the documentation
(swupd.1.rst and swupd.1) but listed by the tool when calling
"swupd verify -h". The order was also slightly changed to be
identical to the order used by "swupd verify -h".
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
The following flags have been added to the man page
--no-scripts
--nosigcheck
--ignore-time
--certpath
--time
--no-boot-update
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
The code implementing the suppression of /usr/lib/kernel,
/usr/lib/modules and /usr/local did a rather simplistic prefix
comparison with strncmp() to match path names against these
exceptions. As a result, paths like /usr/lib/kernel.old which should
get reported also got skipped.
An if check tested the wrong variable, so the result from strdup()
wasn't checked.
The replacement code uses regular expression matching and allows
replacing the default (--picky-whitelist
"/ignore-this-top-level-dir"). A single parameter is enough when using
the | operator.
A/B partition update must remove extra files in the entire partition,
which can be selected with --picky-tree=/, and also needs to override
the default whitelist.
Fixes#336
Implements #239
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
The add-pkg.sh script handles all of the custom mixer content generation
for use added content. Supporting documentation is added to explain its
behaviour and the additional swupd command to incorporate the local content.
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
Allow user to list all bundle dependencies of a bundle passed to
swupd bundle-list --deps BUNDLE
This lists all included bundles (included those recursively included)
for the BUNDLE. This is particularly useful when applications or users
need to determine just how large the bundle addition will be. For
example, a user may not be aware that by bundle-adding desktop-dev they
are recursively adding 12 other bundles. This command allows the user to
make this check before installation.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
The option [-l, --list] is no longer part of "bundle-add"
sub-command, now this option has been taken by "bundle-list"
sub-command using a new name [-a, --all], this information
is updated in swupd man page and markdown file.
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
This information describes the funcionality
of "bundle-list" sub-command. It is added to
swupd man page and swupd markdown file.
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
Add a large amount of manual pages to swupd-client project. These are
meant to cover a large amount of topics and should cover the needed
material for people who are either using, or mixing with swupd,
and so this goes a bit further than end user documentation.
I've put the unit stuff in section 4. Any other section seemed
less related.