Luca BRUNO
99c2f52a78
lib/sign-ed25519: convert invariant checks to assertions
...
This converts several invariant checks to asserts. Most of the
functions in this file were already using assertions, so this aligns
the remaining few outliers to the rest.
2022-10-26 09:26:06 +00:00
Luca Bruno
9801689c74
Merge pull request #2744 from lucab/ups/ci-memory-bump
...
ci: bump cosaPod memory requirement to 5Gi
2022-10-26 09:23:29 +00:00
Luca BRUNO
ed6678ce5f
rust/tests: fix static delta generation testcase
2022-10-13 16:30:00 +00:00
Luca BRUNO
763d2d2863
lib/static-delta: document and check parameters format
...
This enhances the logic handling GVariant parameters within
`ostree_repo_static_delta_generate()`.
Several of those entries are expected to be zero-terminated values,
and this implicit assumption has been observed to be an hidden trap
in languages where strings and arrays may not carry a terminator value
(e.g. Rust).
In order to improve the situation, this makes the documentation more
explicit and actively tries to catch invalid input parameters.
2022-10-13 16:29:59 +00:00
Luca Bruno
a335a780a9
Merge pull request #2733 from ostreedev/dependabot/submodules/libglnx-e701578
...
build(deps): bump libglnx from `26375b5` to `e701578`
2022-10-13 15:36:28 +00:00
Luca BRUNO
39ef6253e9
lib/bootloader-zipl: check for errors when opening initrd
...
This adds a missing error check when opening an initrd in s390x
Secure Execution (SE) logic.
It was detected by RH internal static checks.
2022-10-13 10:48:38 +00:00
Luca BRUNO
1ea5e8e7d2
lib/repo-checkout: fix typo in error message
...
This fixes a typo in an error message, resulting in a GID vs UID
mixup. It was detected by RH internal static checks.
2022-10-13 10:38:11 +00:00
Luca Bruno
e0cc8069c9
Merge pull request #2730 from ostreedev/release-2022.6
...
Release 2022.6
2022-10-07 16:40:10 +00:00
Luca BRUNO
b147166d06
configure: post-release version bump
2022-10-07 07:56:24 +00:00
Luca BRUNO
eee649d902
Release 2022.6
2022-10-07 07:54:09 +00:00
Luca Bruno
017ea3edc1
Merge pull request #2721 from cgwalters/link-otto
...
README.md: Link otto
2022-09-28 21:54:53 +00:00
Luca Bruno
4e51f22145
Merge pull request #2720 from lucab/ups/lib-deploy-ignore-result
...
lib/sysroot-deploy: explicitly handle `g_variant_lookup` results
2022-09-26 12:40:04 +00:00
Luca BRUNO
a1018840f4
lib/sysroot-deploy: explicitly handle g_variant_lookup results
...
This explicitly ignores the results of two optional variant lookups,
in order to pacify a RHT internal static analyzer.
2022-09-26 07:42:12 +00:00
Luca BRUNO
5412dc49ae
lib/repo: properly initialize boolean variable
...
This initializes a boolean variable that was previously left
uninitialized. It was detected by a RHT internal static analyzer.
2022-09-23 13:02:00 +00:00
Luca BRUNO
ace973186c
lib/sign: convert invariant checks to assertions
...
This converts several invariant checks to asserts. Most of the
functions in this file were already using assertions, so this aligns
the remaining few outliers to the rest.
2022-09-09 13:20:43 +00:00
Luca Bruno
c2dc6d3893
Merge pull request #2709 from lucab/ups/otutils-variant-builder-error
...
otutil: add error handling to variant builders
2022-09-08 14:41:53 +00:00
Luca BRUNO
542b79cfeb
otutil: add error handling to variant builders
...
This enhances a bunch of helpers related to GVariant building, in
order to properly handle errors and avoid some potential cases of
unexpected NULL results.
2022-09-08 13:53:05 +00:00
Luca Bruno
dc0a5152c7
Merge pull request #2710 from lucab/ups/lib-mtree-redundant-validation
...
lib/mtree: drop redundant name checks
2022-09-07 13:24:36 +00:00
Luca BRUNO
642efe924f
lib/mtree: drop redundant name checks
...
This drops several NULL checks against filename input argument.
Those checks are both redundant (as filename validation already
checks for that) and dangerous (as they return early without
setting an error value).
2022-09-07 12:33:37 +00:00
Luca Bruno
73eda79662
Merge pull request #2707 from lucab/ups/libostree-bootloader-asserts
...
lib/bootloader: assert invariants
2022-09-06 00:36:11 +00:00
Luca Bruno
fdbc05dab0
Merge pull request #2706 from git-bruh/main
...
ostree-fetcher-curl: check for HTTP2 support before trying to use it
2022-09-05 09:29:29 +00:00
Luca BRUNO
273089d9e4
lib/bootloader: assert invariants
...
This tweaks some invariants checks into full assertions, in order
to avoid returning to the caller in case of known invalid states.
2022-09-05 09:27:38 +00:00
Luca Bruno
a266fabb77
Merge pull request #2702 from thesamesam/bashism
...
buildutil/glibtests.m4: fix bashism
2022-08-24 13:24:35 +00:00
Luca Bruno
f0abd9de30
Merge pull request #2700 from jlebon/pr/staged-docs
...
docs: Add section about staged deployments
2022-08-24 13:17:41 +00:00
Luca BRUNO
ff7d9a8a6d
libostree: fix a typo in annotation
...
This fixes a typo in the `allow-none` annotation on
`ostree_sysroot_deployment_set_kargs_in_place` argument.
2022-08-19 10:39:09 +00:00
Luca Bruno
ea2f0c2943
Merge pull request #2690 from cgwalters/cli-less-goto-1
...
cli/rev-parse: Port to new code style
2022-08-17 07:21:55 +00:00
Luca Bruno
e424efa1e4
Merge pull request #2686 from cgwalters/include-cleanups
...
Handle conflicts between newer glibc and kernel headers
2022-08-04 07:02:08 +00:00
Luca Bruno
5de689b846
Merge pull request #2683 from cgwalters/sync-deny
...
deny.toml: Add `Unicode-DFS-2016`
2022-08-03 11:41:18 +00:00
Luca Bruno
f2ea2f30cc
Merge pull request #2675 from HuijingHei/update-doc
...
Update doc about adding new function to libostree
2022-07-15 18:25:13 +00:00
Luca Bruno
68d1f54c5a
Merge pull request #2646 from cgwalters/bindings-tests
...
rust-bindings: Wire up `tests/`
2022-06-13 07:46:14 +00:00
Luca Bruno
ca1fbc59ce
Merge pull request #2645 from cgwalters/fsck-more-cleanups
...
fsck: A few more cleanups
2022-06-13 07:32:33 +00:00
Luca Bruno
485caca538
Merge pull request #2620 from jameswestman/lookup-annotations
...
Fix annotations on ostree_mutable_tree_lookup()
2022-06-02 15:38:46 +00:00
Luca Bruno
7aa17acd8d
Merge pull request #2613 from GuiltyDoggy/man-update
...
man: Fix ostree-admin-instutil subcommands
2022-05-30 17:35:05 +00:00
Luca Bruno
ed79299fc3
Merge pull request #2618 from jlebon/pr/copr-fix
...
copr: mark git checkout as safe
2022-05-27 06:37:54 +00:00
Luca Bruno
cdfc2ff5bf
Merge pull request #2616 from HuijingHei/dup-osname
...
Remove dup "--os=OSNAME" line in output of "ostree admin config-diff --help"
2022-05-25 07:00:12 +00:00
Luca Bruno
39a953dfa5
Merge pull request #2606 from ostreedev/dependabot/submodules/libglnx-c59eb27
...
build(deps): bump libglnx from `c71f7ae` to `c59eb27`
2022-05-12 13:18:45 +00:00
Luca BRUNO
d1fad37d1a
ostree: release 0.13.7
2022-05-06 12:53:57 -04:00
Luca BRUNO
04c8e3e9f3
ostree: manually patch generated files
...
This manually adds a missing `ToGlibPtr` import, which seems to be result
of some bugs in `gir` code-generation.
2022-05-06 12:53:57 -04:00
Luca BRUNO
dd0cfc6d4b
ostree: refresh after gir bump
2022-05-06 12:53:57 -04:00
Luca BRUNO
3fc55a524b
ostree/cargo: bump to ostree-sys 0.9.2
2022-05-06 12:53:57 -04:00
Luca BRUNO
61b4629b37
ostree-sys: release 0.9.2
2022-05-06 12:53:57 -04:00
Luca BRUNO
cf5462178c
ostree-sys: refresh after gir bump
2022-05-06 12:53:57 -04:00
Luca BRUNO
1cb07e0ca5
gir-files: bump to v2022.2
2022-05-06 12:53:57 -04:00
Luca BRUNO
f01c847a68
ci: add jobs for MSRV checks and linting
...
This adds two jobs in order to check minimum toolchain compatibility,
and for overall linting.
2022-05-06 12:53:57 -04:00
Luca BRUNO
83b03d2996
lib: run rustfmt
2022-05-06 12:53:57 -04:00
Luca BRUNO
810e86d4fb
lib: fix new clippy warnings
...
This fixes the following warnings highlighted by clippy:
* https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
* https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
* https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
2022-05-06 12:53:57 -04:00
Luca BRUNO
86295e3bfe
sys/cargo: refresh manifest
...
This updates stale dependencies and remove leftover settings.
2022-05-06 12:53:57 -04:00
Luca BRUNO
51a03e199c
sysroot: support create and load actions on builder
...
This splits the builder completion step into separate actions for
creating/loading a sysroot.
It also introduces a roundtrip test over a freshly-created empty
sysroot.
2022-05-06 12:53:57 -04:00
Luca BRUNO
ec572d786e
sysroot: add a builder object
...
This adds a `SysrootBuilder` in order to allow consumers to load
a configured `Sysroot` in an ergonomic way. It tries to prevent
logic bugs coming from handling half-initialized entities.
2022-05-06 12:53:57 -04:00
Luca BRUNO
f3df1175f8
cargo: bump ostree-sys to 0.8.1
2022-05-06 12:53:57 -04:00
Luca BRUNO
b2c6dd61a1
ostree: release 0.12.1
2022-05-06 12:53:56 -04:00
Luca BRUNO
fdfaea1864
cargo: point to docs.rs and clean up
...
This removes stale URLs, pointing to the auto-built docpages at
docs.rs and sorting manifest entries.
2022-05-06 12:53:56 -04:00
Luca BRUNO
20a025a0eb
lib: fix 'dox' feature
...
This makes sure docs can be properly built when using the 'dox'
feature. It should fix auto-builds on docs.rs.
2022-05-06 12:53:56 -04:00
Luca BRUNO
712570b9b7
cargo: fix version in features chain
...
This fixes the definition of the `v2016_4` feature.
It restores the chain of versions so that 2016.3 symbols can be
actually reached from newer features/versions.
2022-05-06 12:53:56 -04:00
Luca BRUNO
78ca01c4e3
repo_transaction_stats: move to a manual implementation
...
This moves `RepoTransactionStats` into a manually implemented
source file in order to provide getters to expose relevant
fields.
2022-05-06 12:53:56 -04:00
Luca BRUNO
83956daeee
ci/github: add a job for --without-libsystemd
2022-05-06 10:07:24 +00:00
Luca BRUNO
4b7fc4f1e9
lib/ostree-sysroot-deploy: add a missing include for stdint.h
2022-05-06 10:07:23 +00:00
Luca BRUNO
7e83726faa
tests: move fixture to fix installed tests
...
This moves around the packed archive for bare-split-xattrs mode,
in order to fix installed tests.
2022-04-12 09:53:54 +00:00
Luca Bruno
2f11977da5
Merge pull request #2563 from cgwalters/tmpfiles-run
...
tmpfiles: Create `/run/ostree`
2022-03-11 18:54:49 +00:00
Luca Bruno
087f850227
Merge pull request #2564 from damdo/patch-1
...
README.md: update ostree-rs language binding link
2022-03-11 17:57:26 +00:00
Luca Bruno
0d6e66b57a
Merge pull request #2562 from josepht/main
...
Add Fedora Kinoite link to index.md also.
2022-03-10 21:05:02 +00:00
Luca BRUNO
ca0bb75954
apidoc: add missing page includes
...
This fixes some missing sections in API reference, adding all the
relevant includes.
2022-03-07 08:33:08 +00:00
Luca BRUNO
aca5671eb1
tests/basic-bare-split-xattrs: add fixture, check read logic
2022-03-03 11:11:59 +00:00
Luca BRUNO
7e79b82ff8
lib/commit: disallow writing content in 'bare-split-xattrs' mode
...
This prevents writing content into 'bare-split-xattrs` repository,
while carving some space for experimenting via a temporary
`OSTREE_EXP_WRITE_BARE_SPLIT_XATTRS` environment flag.
2022-03-02 16:45:02 +00:00
Luca BRUNO
14a6e6d8d0
lib/repo: read split xattrs content from file-xattrs-link objects
2022-03-02 16:45:01 +00:00
Luca BRUNO
08e98e9042
lib/core: introduce 'bare-split-xattrs' mode
2022-03-02 16:45:00 +00:00
Luca BRUNO
2c60f302f9
lib/core: introduce two new object types for split xattrs
...
This adds two new object types for storing xattrs separately from
content objects.
`.file-xattrs` are regular files storing xattrs content, encoded as
GVariant. Each object is keyed by the checksum of its content, allowing
for multiple references.
`.file-xattrs-link` are hardlinks which are associated to file objects.
Each object is keyed by the same checksum of the corresponding file
object. The target of the hardlink is an existing file-xattrs object.
In case of reaching the limit of too many links, this object could be
a plain file too.
2022-03-02 16:44:59 +00:00
Luca Bruno
6ad4a3457f
Merge pull request #2554 from ostreedev/dependabot/submodules/libglnx-c71f7ae
...
build(deps): bump libglnx from `88da8dd` to `c71f7ae`
2022-03-02 16:44:31 +00:00
Luca Bruno
4a38ac7b8d
Merge pull request #2552 from ostreedev/dependabot/submodules/libglnx-88da8dd
...
build(deps): bump libglnx from `803adaf` to `88da8dd`
2022-02-22 16:32:08 +00:00
Luca BRUNO
e6e9f14985
lib/commit: clean up assertions
...
This aligns all the assertion in the module. In particular, it gets
rid of all `g_return_val_if_fail` instances which may fail without
properly setting GError to the caller.
2022-02-01 17:33:28 +00:00
Luca Bruno
10ddf6e25f
Merge pull request #2524 from jlebon/pr/unlink-lock
...
lib/deploy: When deleting staged deployment, delete any lock
2022-01-26 08:36:45 +00:00
Luca BRUNO
b27792ade3
lib/repo: open file only if required
...
This tightens up the logic for opening a file while inspecting its
xattrs. The only codepath fetching xattrs from a FD is the one
handling 'bare' mode.
It also rearranges the else-assert flow, mostly for future-proofing.
2022-01-24 16:54:54 +00:00
Luca BRUNO
3f491a60c3
builtin: use GCancellable and GError everywhere
...
This reworks `ostree ls` top-level logic so that cancellation
tokens and error details are plumbed through all codepaths.
It also gets rid of all previous goto jumps.
2022-01-21 12:26:32 +00:00
Luca Bruno
b9f6632b70
Merge pull request #2521 from cgwalters/syncfs-only-log
...
deploy: Also log to journal if we time out global sync()
2022-01-20 16:58:05 +00:00
Luca BRUNO
da72c245f4
lib/commit: reject empty metadata keys
...
This adds one more check to the metadata validation logic in order
to reject empty metadata keys.
2022-01-20 10:54:30 +00:00
Luca BRUNO
6230b3eeab
lib/commit: always validate metadata
...
This tweaks commit logic in order to always validate metadata,
including on commits where the expected checksum is already known.
2022-01-19 14:10:24 +00:00
Luca BRUNO
840cd7ab2d
libostree/sepolicy: get rid of a g_setenv() call
...
This removes a 'g_setenv()' call, which could potentially be unsafe
in a multi-thread context.
The current libselinux codebase does not seem to check for
`LIBSELINUX_DISABLE_PCRE_PRECOMPILED`, so I think this has no effects
nowadays.
Additionally, I could not find any reference to it in libselinux
git history, so I'm not sure if it ever played any role at all.
My current understanding is that this is coming from version
incompatibilities between an older libselinux in the build environment
and a newer policy (with precompiled regexs) in the target.
But from the ML discussion I found, I think it eventually got
solved in a different way, possibly by avoiding the policy binary
caches.
Refs:
* https://www.spinics.net/lists/selinux/msg14822.html
* https://github.com/ostreedev/ostree/pull/2513#discussion_r781042884
2022-01-11 15:56:13 +00:00
Luca Bruno
7cc8481907
Merge pull request #2513 from lucab/ups/setenv-error
...
ostree: check g_setenv return value
2022-01-10 17:38:50 +00:00
Luca BRUNO
0bdba574d7
ostree: check g_setenv return value
...
This adds proper return-value checks on g_setenv calls.
It fixes a static analysis warning highlighted by Coverity.
2022-01-10 13:33:36 +00:00
Luca Bruno
92025018f6
Merge pull request #2512 from lucab/ups/variant-builder-error-memleak
...
libotutil: avoid leaking builder memory on error
2022-01-10 13:32:25 +00:00
Luca BRUNO
0b1a085692
libotutil: avoid leaking builder memory on error
...
This swaps the order of a couple of input sanity checks, in order
to fix a minor memory leak due to an early-return on the error
path.
Memory for the result is now allocated only after input has been
sanity-checked.
It fixes a static analysis warning highlighted by Coverity.
2022-01-10 09:30:11 +00:00
Luca Bruno
6cb097fb5e
Merge pull request #2509 from ostreedev/release-2022.1
...
Release 2022.1
2022-01-05 14:32:55 +00:00
Luca BRUNO
9d3ef89230
configure: post-release version bump
2022-01-05 10:03:59 +00:00
Luca BRUNO
6c903ab0b6
Release 2022.1
2022-01-05 10:03:03 +00:00
Luca BRUNO
2bfdcea2c5
github: add dependabot config
...
This adds a configuration file for dependabot, taking care of automatic
updates for all git submodules.
2022-01-04 10:34:30 +00:00
Luca Bruno
a3555f4d12
Merge pull request #2376 from smcv/fuse3
...
rofiles-fuse: Build using FUSE 3 if possible, falling back to FUSE 2
2022-01-04 10:27:14 +00:00
Luca BRUNO
eae35b7f6e
lib/static-delta: throw a proper error on bspatch failure
...
This makes sure that a populated GError is returned when bsdiff
patching fails. The human-friendly label also helps in debugging.
2022-01-03 17:38:51 +00:00
Luca BRUNO
97399c166d
bsdiff: bump submodule, pick up fix for CVE-2014-9862
...
This updates the bsdiff submodule to latest upstream revision, in
order to pick up additional bound checks for CVE-2014-9862.
Update submodule: bsdiff
Ref:
* https://www.x41-dsec.de/lab/advisories/x41-2020-006-bspatch/
2022-01-03 16:13:01 +00:00
Luca BRUNO
cf814284e0
lib: use ostree-content-writer header
...
This installs and exposes the content of `ostree-content-writer.h`,
so that library consumers can properly reference symbols defined
in that header.
2022-01-03 14:20:58 +00:00
Luca Bruno
998863e74d
Merge pull request #2501 from lucab/ups/test-cli-extensions-tweak
...
tests/cli-extensions: tweak test logic
2021-12-21 14:08:48 +00:00
Luca BRUNO
5dbe37ce78
tests/cli-extensions: tweak test logic
...
This updates the test logic for CLI extensions, actually checking
for functional output from the subcommand.
It also cleans up some environmental leftover.
2021-12-21 10:18:30 +00:00
Luca BRUNO
513b3c09a5
main: add support for CLI extensions via external binaries
...
This adds some logic to detect and dispatch unknown subcommands to
extensions available in `$PATH`. Additional commands can be
implemented by adding relevant `ostree-$verb` binaries to the system.
As an example, if a `/usr/bin/ostree-extcommand` extension is provided,
the execution of `ostree extcommand --help` will be dispatched to that
as `ostree-extcommand extcommand --help`.
2021-12-20 10:00:02 +00:00
Luca BRUNO
f44eaf7e8c
tests: assert mandatory values are present
...
This adds a couple of string assertions to make sure that
the test run is sane.
2021-12-10 11:33:35 +00:00
Luca BRUNO
58bdfb90c9
lib/repo: do no return a NULL on failure
...
This turns an existing check into an assert. The previously returned
NULL may result in confusing callers, as none of them is checking for
that.
2021-12-07 16:24:56 +00:00
Luca BRUNO
4a0ebe507f
lib/repo: do no return an arbitrary mode on failure
...
This turns the existing check into an assert. Otherwise, the previous
code may return an arbitrary repo mode (bare) on failure.
2021-12-07 16:23:02 +00:00
Luca BRUNO
f1e24945fa
lib/repo: assert that writable state and error agree
...
This adds an assertion to check that writable stable and error
are in sync. The subsequent logic uses them interchangeably.
2021-12-07 16:21:21 +00:00
Luca BRUNO
cefc1d7854
lib: misc static analysis fixes
...
This fixes a few warnings from coverity, none of which really
interesting.
2021-11-26 15:11:00 +00:00
Luca BRUNO
281d310224
configure: post-release version bump
2021-11-23 10:15:19 +00:00
Luca BRUNO
f1155c8d28
Release 2021.6
2021-11-23 10:13:32 +00:00
Luca Bruno
edbcf52134
Merge pull request #2481 from refi64/null-error
...
lib: Avoid dereferencing NULL error values
2021-11-12 15:19:29 +00:00