Commit Graph
100 Commits
Author SHA1 Message Date
Colin Walters 1a76f45fd7 rust: Update to gio 0.16
This was quite seamless; the only thing I had to tweak was adding
`+ Send` bounds in the `Box<dyn Error>` manual checksum_async API.
2022-11-21 13:18:51 -05:00
Colin Walters 9d652be3b1 Merge pull request #2778 from pwithnall/small-leaks
Fix a couple of small leaks
2022-11-21 12:39:52 -05:00
Colin Walters b8b07fc26b Merge pull request #2770 from lucab/ups/git-describe-tags
ci: adjust git tags filtering
2022-11-21 11:33:10 -05:00
Colin Walters 13ceb3d531 Merge pull request #2772 from lucab/ups/bump-msrv
cargo: bump minimum Rust version to 1.63
2022-11-21 11:32:28 -05:00
Colin Walters 9ae86131ed Merge pull request #2774 from cgwalters/ci-fedora-fix
ci: Fix case where cosa != buildroot
2022-11-21 09:15:23 -05:00
Colin Walters 406bfc78d1 ci: Fix case where cosa != buildroot
We can't override host binaries in this case.  We'll need
to watch carefully and verify we're still testing things.
2022-11-20 13:54:48 -05:00
Colin Walters a34e28ebd0 Merge pull request #2773 from pwithnall/typo-fix
Improve a help string for ostree-commit
2022-11-18 11:35:30 -05:00
Colin Walters ba39acf942 Merge pull request #2751 from smcv/memdup2
Replace calls to g_memdup() with g_memdup2()
2022-11-13 10:50:39 -05:00
Colin Walters 8d08e563b4 rust: Drop openat dependency
We can use cap-std in our tests.
2022-11-13 09:47:53 -05:00
Colin Walters 6f68e3dc4e rust: Update to cap-std 1.0
This was one source of our semver bumps; let's switch to 1.0.
2022-11-11 17:09:35 -05:00
Colin Walters bef337e1bd Merge pull request #2763 from cgwalters/testiso-more-memory
ci: Bump memory for ISO testing flow
2022-11-11 16:11:26 -05:00
Colin Walters 8b75be1762 ci: Bump memory for ISO testing flow
It seems likely that we're allocating more RAM here.  What we really
need to do is for cosa to express the necessary RAM
requirements declaratively, then we compute pod requirements
from that.
2022-11-11 15:03:30 -05:00
Colin Walters de3a0cefb7 Merge pull request #2762 from lucab/ups/copr-tags
copr: only use libostree tags
2022-11-11 14:08:36 -05:00
Colin Walters e66e0b06ef Merge pull request #2754 from cgwalters/remove-readdir-rand
Remove readdir-rand
2022-11-10 05:59:36 -05:00
Colin Walters a6c97e9129 Merge pull request #2759 from oglok/http_500
Enabling retry for HTTP 500 internal server error
2022-11-09 15:34:08 -05:00
Colin Walters bd325061dc deploy: Don't rebuild selinux policy on first deployment
Basically, it should not be necessary - the policy should be
up-to-date.  We don't want to force on continual policy rebuilds.

Even trying to run bwrap when we're *not* in a booted
root can cause failures in nested containerization scenarios.

Closes: https://github.com/ostreedev/ostree/issues/2758
2022-11-09 11:18:36 -05:00
Colin Walters e153720f89 Merge pull request #2756 from ostreedev/dependabot/submodules/libglnx-4e44fd9
build(deps): bump libglnx from `e701578` to `4e44fd9`
2022-11-04 11:47:43 -04:00
Colin Walters 23446a0218 Remove readdir-rand
This was only there to reproduce a bug we hit long ago
with bootloader file ordering.  We're extremely unlikely
to reintroduce such a bug, and it's not worth carrying around
this code.
2022-11-01 16:29:17 -04:00
Colin Walters ba94997e99 Merge pull request #2752 from smcv/copy-dirent
readdir-rand: Copy full size of struct dirent
2022-10-31 08:58:21 -04:00
Colin Walters 1258c371d6 Merge pull request #2742 from lucab/ups/rust-regenerate-2022.6
rust: regenerate bindings after latest release (2022.6)
2022-10-26 09:15:14 -04:00
Colin Walters 9672f88877 Merge pull request #2745 from lucab/ups/ci-bump-rust-linting
ci/rust: bump linting toolchain to latest stable (1.64)
2022-10-26 09:15:01 -04:00
Colin Walters aded044149 Merge pull request #2746 from lucab/ups/lib-repo-refs-error
lib/repo-refs: properly return an error value
2022-10-26 09:14:48 -04:00
Colin Walters 61d22e5db6 Merge pull request #2740 from lucab/ups/lib-sign-ed25519-assertions
lib/sign-ed25519: convert invariant checks to assertions
2022-10-26 06:33:04 -04:00
Colin Walters a19cc34883 Merge pull request #2663 from mstuehn/test-static-delta-file
lib/static-delta: document and check parameters format
2022-10-19 17:04:40 -04:00
Colin Walters b04dde8882 Merge pull request #2717 from mangelajo/support-whiteouts
Support overlayfs whiteouts on checkout
2022-09-28 08:35:24 -04:00
Colin Walters b83032d0d3 README.md: Link otto
Another project in the ostree/container space.
2022-09-28 08:30:18 -04:00
Colin Walters f442f02c15 Merge pull request #2718 from lucab/ups/repo-initialize-valid-bootloader
lib/repo: properly initialize boolean variable
2022-09-23 11:09:13 -04:00
Colin Walters 404fcc0206 Merge pull request #2716 from dbnicholson/max-metadata-size-doc
lib/pull: Fix max-metadata-size documentation
2022-09-18 15:04:54 -04:00
Colin Walters c6c3c5ae9f Merge pull request #2711 from lucab/ups/sign-assertions
lib/sign: convert invariant checks to assertions
2022-09-09 10:05:27 -04:00
Colin Walters 6873a2511b Merge pull request #2708 from nikita-dubrovskii/sh_to_c
s390x: drop shell code for `initrd` modification in SE case
2022-09-08 07:45:04 -04:00
Colin Walters 683e4eff08 finalize-staged: Don't listen to SIGTERM, just let kernel exit us
Followup from discussion in
https://github.com/ostreedev/ostree/pull/2544#discussion_r958840936

This is more efficient; no need to have the kernel context switch
us in at shutdown time just so we can turn around and call
`exit()`.
2022-08-30 17:50:03 -04:00
Colin Walters 6651b72a7a Merge pull request #2544 from dbnicholson/finalize-block
finalize-staged: Ensure /boot and /sysroot automounts don't expire
2022-08-30 15:12:32 -04:00
Colin Walters 06cd216f4e Merge pull request #2695 from HuijingHei/kargs-stage
Fix `ostree admin kargs edit-in-place` assertion when deployments are pending
2022-08-29 08:23:15 -04:00
Colin Walters 93a6d7bea2 Merge pull request #2701 from cgwalters/bind-list-commits
rust: Bind `ostree_repo_list_commits_starting_with`
2022-08-24 12:03:58 -04:00
Colin Walters b55054ec24 rust: Bind ostree_repo_list_commits_starting_with
I wanted to use this as a fallback for
https://github.com/ostreedev/ostree-rs-ext/pull/351/commits/30dee81c22ad5cb90e77198d3ddbcc25d388afb5
2022-08-24 09:44:34 -04:00
Colin Walters 21a8f39284 ci: Also drop seccomp on debian testing
I didn't deep dive into debugging this but I'm pretty sure it's
 https://gitlab.gnome.org/GNOME/glib/-/issues/2580
which is us having an older Docker in the middle here.
2022-08-22 17:00:09 -04:00
Colin Walters 629d2f5d7e rust: Update to latest git
In the future I may try to add CI that requires this to be
sync'd...
2022-08-22 15:11:51 -04:00
Colin Walters fb826346fe Merge pull request #2692 from GeorgesStavracas/gbsneto/transaction-leak
lib/commit: Unref repo on success
2022-08-22 14:25:07 -04:00
Colin Walters 1d478ced2e Merge pull request #2697 from tkfu/docs/add-related-projects
docs: Add aktualizr and TorizonCore to related projects
2022-08-19 10:53:56 -04:00
Colin WaltersandJonathan Lebon ad0354ac36 cli/rev-parse: Add --single option
In the current "ostree native container" flow, we're inserting
a commit object into the repo but with no refs.

We have hacks in a few places to find the commit digest via e.g.
`find repo/objects -name *.commit` but that's a horrible hack.
Add `ostree rev-parse --single` which will print the single commit,
and error out if there is not exactly one commit.

Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
2022-08-18 11:08:17 -04:00
Colin Walters 090f312e40 cli/rev-parse: Port to new code style
Prep for future changes.
2022-08-16 17:11:30 -04:00
Colin Walters 9995f370d3 Merge pull request #2689 from jlebon/pr/ficlone-direct-payload
lib/commit: Directly use FICLONE for payload link
2022-08-15 18:33:55 -04:00
Colin Walters 4471c252a9 Merge pull request #2688 from LukasKalbertodt/main
Update to `libtest-mimic` 0.5.0
2022-08-13 14:02:07 -04:00
Colin Walters 0a908a180f Move FIFREEZE/FITHAW ioctl invocations into linuxfsutil.c
Should help avoid conflicts between glibc and linux headers.

Closes: https://github.com/ostreedev/ostree/issues/2685
2022-08-03 10:44:51 -04:00
Colin Walters edba4b33be Remove unused linux/fs.h includes
Prep for fixing conflicts introduced by newer glibc.
cc https://github.com/ostreedev/ostree/issues/2685
2022-08-03 10:37:40 -04:00
Colin Walters a83673f1a7 deny.toml: Add Unicode-DFS-2016
This is used by the unicode crate now and is definitely a compatible
FOSS license.
2022-08-01 14:43:31 -04:00
Colin Walters 459a4c2227 Merge pull request #2678 from cgwalters/release-2022-5
Release 2022 5
2022-07-22 16:11:20 -04:00
Colin Walters 55292e4007 rust-bindings: Fix cargo fmt 2022-07-22 15:20:05 -04:00
Colin Walters d7c25a2062 configure: post-release version bump 2022-07-22 15:20:05 -04:00
Colin Walters 15740d042c Release 2022.5 2022-07-22 15:08:25 -04:00
Colin Walters f50fe7008c Merge pull request from GHSA-gqf4-p3gv-g8vw
Fix sign ed25519 verify
2022-07-22 15:05:27 -04:00
Colin Walters 6200ec321f Merge pull request #2676 from render-se/debos-docs
add debos to readme distribution build tools
2022-07-15 14:24:25 -04:00
Colin Walters e0417957ea rust: Add a test case for ed25519
Specifically, I verified that *before* the previous patch to the
ed25519 C code, the last bit of code would fail with a SIGSEGV when
trying to read the empty signature.
2022-07-14 17:13:51 -04:00
Colin WaltersandDemi Marie Obenour 83e6357186 sign/ed25519: Verify signatures are minimum length
The ed25519 signature verification code does not
check that the signature is a minimum/correct length.
As a result, if the signature is too short, libsodium will end up
reading a few bytes out of bounds.

Reported-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Co-authored-by: Demi Marie Obenour <demi@invisiblethingslab.com>

Closes: https://github.com/ostreedev/ostree/security/advisories/GHSA-gqf4-p3gv-g8vw
2022-07-14 17:13:51 -04:00
Colin Walters ed1146738b Merge pull request #2669 from HuijingHei/fix-kargs
Fix `ostree admin kargs edit-in-place` fails issue
2022-07-13 16:35:28 -04:00
Colin Walters a3749efb1a Merge pull request #2672 from cgwalters/initialize-sysroot-cleanups
sysroot: Have `ensure_writable` also always initialize
2022-07-13 16:35:17 -04:00
Colin Walters 035b290210 Merge pull request #2673 from cgwalters/assert-boot
sysroot: Add a few more assertions about `boot_fd`
2022-07-13 16:35:10 -04:00
Colin Walters 60853219d5 sysroot: Add a few more assertions about boot_fd
These places are all safe, but it would catch bugs in the future
more clearly to trip an assertion here.
2022-07-13 15:38:59 -04:00
Colin Walters 75aa7a22f6 sysroot: Have ensure_writable also always initialize
For historical reasons we have a fair bit of distinct sysroot
initialization going on.  A lot of code is calling *just* the new
`ensure_writable()` API, which does basically what you'd expect...
except if we're not using a mount namespace.

Which is the case in unit tests and legacy setups.
Change this API to also ensure the sysroot is fully initialized
even in those cases.  Specifically we'll have `self->sysroot_fd`.

For now, callers that need `/boot` also need to separately
call `_ensure_boot_fd()`.
2022-07-13 15:35:00 -04:00
Colin Walters 2c71655205 deploy: Ensure sysroot is initialized for kargs in place
Even without a mount namespace set up.
2022-07-13 15:32:05 -04:00
Colin Walters 7e7a3df99b Merge pull request #2671 from matthiasbeyer/readme-rust-bindings-fix
Fix link to rust bindings
2022-07-12 16:03:09 -04:00
Colin Walters 51ac63aa28 Merge pull request #2666 from saqibali-2k/pr/bls-append
ostree-repo: bls-append-except-default followup
2022-07-08 09:41:04 -04:00
Colin Walters d3762be9b3 deny: Sync with rpm-ostree
This extends the license set basically and ignores private repos
(which we don't have any yet).
2022-07-08 09:33:18 -04:00
Colin Walters c93fb71913 Merge pull request #2667 from cgwalters/deploy-require-repo
lib: Stop using old `ostree_sysroot_get_repo()` API
2022-07-06 17:13:23 -04:00
Colin Walters becc18936f lib: Stop using old ostree_sysroot_get_repo() API
It's falliable, and in one place we were actually ignoring
the error and leaving a `NULL` repo object which is just a trap
for people coming along later since it's rarely nullable.

Quite a while ago we switched to loading the repo at the same time
as the sysroot; convert callers in the library to use this infallible
accessor.

Prep for another patch which will use the repo object.
2022-07-06 07:47:57 -04:00
Colin Walters 0d911bf91f Merge pull request #2632 from saqibali-2k/pr/prune-commit-only
lib/prune: speed up pruning by retrieving only commits
2022-06-30 09:08:54 -04:00
Colin Walters e98988ba17 tests/inst: Port to cap-std
Part of an ongoing effort.
2022-06-24 16:23:05 -04:00
Colin Walters bba9724317 Merge pull request #2660 from cgwalters/fix-load-file-api
repo: Metadata return values from `load_file` are not nullable
2022-06-24 14:30:33 -04:00
Colin Walters 52d6f4e790 tests/staged-deploy.sh: Hack around cosa systemd unit check
https://github.com/coreos/coreos-assembler/pull/2921 broke this
test which is intentionally causing a systemd unit to fail.

As they say, necessity is the mother of invention.  They don't
say though that need always causes particularly *beautiful* things
to be invented...
2022-06-24 10:18:53 -04:00
Colin Walters be2075eef0 repo: Metadata return values from load_file are not nullable
The pattern this API uses in C is to allow the input parameters
pointer targets to be `NULL`, and it doesn't return values in that
case.

A further complexity here is that the API will still return `NULL`
for symbolic links.

But Rust can't express this pattern as is, so we were always
returning values but in `Option<T>` wrappers that the caller needed
to unwrap for the metadata.

(We really want an even more efficient API here that avoids the glib
 objects entirely, e.g. no reason not to pass directly back a type
 that lets Rust directly read from the fd for bare repos, but
 that can come later)
2022-06-23 17:43:42 -04:00
Colin Walters ee5b3c76c3 Merge pull request #2656 from cgwalters/bump-cap-std
rust: Bump semver to 0.15 && bump cap-std 0.25
2022-06-23 16:36:24 -04:00
Colin Walters 6fda7112c8 Merge pull request #2658 from jlebon/pr/pinger
tests/inst/destructive: stop disabling fedora-coreos-pinger
2022-06-23 16:35:49 -04:00
Colin Walters 63499747b9 Bump to cap-std 0.25 and io-lifetimes 0.7
Prep for bumping ostree-rs-ext, which will help bump rpm-ostree,
which will get it out of having two copies of rustix.
2022-06-23 14:59:03 -04:00
Colin Walters b87c8a8e23 rust: Bump semver to 0.15
Prep for some breaking changes.
2022-06-23 14:58:22 -04:00
Colin Walters 37d0ca41b6 Fix clippy lint in cap-std bits 2022-06-23 14:58:00 -04:00
Colin Walters 001839b35f ci/rust: Change MSRV to cargo check
No reason to codegen just to throw it away.  We could test here too,
but eh.
2022-06-23 14:45:16 -04:00
Colin Walters ed98a7904c ci/rust: Enable cap-std-apis in default build, add a no-feature build
Our CI was missing coverage of `cap-std-apis`.
2022-06-23 14:45:11 -04:00
Colin Walters 578a0c2507 Merge pull request #2639 from HuijingHei/admin-kargs-edit-in-place
RFE: Add a hidden option to `ostree admin kargs edit-in-place` to update all existing deployments in place
2022-06-23 12:16:03 -04:00
Colin Walters b04c436bb9 Merge pull request #2651 from cgwalters/misc-declare-and-initialize-2
cli: Port to C99 style (3)
2022-06-21 16:44:12 -04:00
Colin Walters a1de42ecad Merge pull request #2654 from jlebon/pr/drop-packit
Drop `.packit.yaml`
2022-06-21 16:00:32 -04:00
Colin Walters 635a0df124 Merge pull request #2652 from smcv/not-always-xattrs
test-basic-c: Don't assert that extended attributes are available
2022-06-20 16:38:29 -04:00
Colin Walters 9bdf3861ad cli/refs: Port to C99 style
General background cleanup.
2022-06-15 09:36:54 -04:00
Colin Walters 2f1c9a727e cli/remote-list: Port to C99 style
General background cleanup.
2022-06-15 09:35:03 -04:00
Colin Walters a0ae2f9156 cli/gpg-sign: Port to C99 style
General background cleanup.
2022-06-15 09:33:46 -04:00
Colin Walters 43b712951d cli/diff: Port to C99 style
General background cleanup.
2022-06-14 10:04:04 -04:00
Colin Walters f8403f46dc cli/config: Port to C99 style
General background cleanup.
2022-06-14 10:03:58 -04:00
Colin Walters 4e356d0e8f cli/unlock: Port to C99 style
General background cleanup.
2022-06-14 09:53:11 -04:00
Colin Walters 588b07e554 cli/undeploy: Port to C99 style
General background cleanup.
2022-06-14 09:51:41 -04:00
Colin Walters 46e1db392d cli/os-init: Port to C99 style
General background cleanup; motivated by a recent PR which
was using pre-C99 code as a base.
2022-06-14 09:50:07 -04:00
Colin Walters e65c8e72c8 Merge pull request #2643 from cgwalters/rust-2021
rust: Switch to 2021 edition, bump MSRV, a few `format!` updates
2022-06-13 09:10:36 -04:00
Colin Walters eee0eea58b rust-bindings: Wire up tests/
Because the source is in a subdirectory, we lose out on cargo target
autodiscovery.

I noticed this when I edited one of the tests in a way that
should have failed, but didn't...
2022-06-12 14:34:02 -04:00
Colin Walters 436ff11a00 fsck: Use load_variant_if_exists
This cleans up error handling here.
2022-06-12 10:58:29 -04:00
Colin Walters bd030a96f2 fsck: Move most commit processing into helper function
The inner loop was way too long; split out most of the heavy
lifting around backrefs and tombstones into a helper function.
2022-06-12 10:57:27 -04:00
Colin Walters 2fe0ea7395 fsck: De-indent loop
Could have done this in the previous change, but wanted to avoid
excessive diff noise.
2022-06-12 10:48:39 -04:00
Colin Walters e6ad897850 Merge pull request #2644 from cgwalters/list-commit-objects
fsck: Don't load all object names into memory
2022-06-11 08:09:35 -04:00
Colin Walters 6981633f9c fsck: Don't load all object names into memory
We recently discovered `list_objects()` is inefficient with memory.
The more efficient `list_objects_set()` API isn't yet public, but
this fsck code actually just skips over non-commit objects, and
we already have an API to list just those.
2022-06-09 21:01:03 -04:00
Colin Walters a13d812368 repo: Document non-obvious way to list all commits
I was going to add an API for this and then realized the empty
string does it.
2022-06-09 18:34:51 -04:00
Colin Walters 93e3784b66 rust: Use inline format! variables in a few places
Since our MSRV now supports it.
2022-06-09 17:51:07 -04:00
Colin Walters 76071a2b11 ci: Bump MSRV
To match what's in ostree-rs-ext.
2022-06-09 17:49:18 -04:00
Colin Walters 99c122d219 rust: Switch to 2021 edition
No real changes.

```
$ cargo fix --edition
note: Switching to Edition 2021 will enable the use of the version 2 feature resolver in Cargo.
This may cause some dependencies to be built with fewer features enabled than previously.
More information about the resolver changes may be found at https://doc.rust-lang.org/nightly/edition-guide/rust-2021/default-cargo-resolver.html
When building the following dependencies, the given features will no longer be used:

  libc v0.2.126 removed features: extra_traits

The following differences only apply when building with dev-dependencies:

  getrandom v0.2.6 removed features: std
```

which looks OK to me.
2022-06-09 15:55:41 -04:00