ostree.git
2 years agobin/refs: Add option to print revisions
Dan Nicholson [Sun, 29 Jan 2023 16:23:13 +0000 (09:23 -0700)]
bin/refs: Add option to print revisions

Allow printing the revision along with the ref. This is very convenient
for looping over the refs in a shell as well as for quickly seeing which
refs are pointed to the same commit.

2 years agobin/refs: Sort listing
Dan Nicholson [Sun, 29 Jan 2023 13:49:18 +0000 (06:49 -0700)]
bin/refs: Sort listing

The output is much more readable sorted. I can't think of any reason
you'd want it unsorted (which is essentially dentry order).

2 years agobin: Cleanup documentation of --cache-dir option
Dan Nicholson [Sun, 29 Jan 2023 16:28:31 +0000 (09:28 -0700)]
bin: Cleanup documentation of --cache-dir option

In all cases documentation was missing from the manual and the bash
completion was incorrectly assigning it as a boolean option.

2 years agoMerge pull request #2795 from cgwalters/fix-docsrs-build
Colin Walters [Fri, 27 Jan 2023 13:18:06 +0000 (08:18 -0500)]
Merge pull request #2795 from cgwalters/fix-docsrs-build

bindings: Use default for uninitialized fields in checkout opts

2 years agobindings: Consistently check for `dox` feature
Colin Walters [Thu, 15 Dec 2022 01:09:37 +0000 (20:09 -0500)]
bindings: Consistently check for `dox` feature

This fixes the build on docs.rs:

https://docs.rs/crate/ostree-ext/0.10.2/builds/699039
```
[INFO] running `Command { std: "docker" "start" "-a" "7d90466f040d987cbcc393bc89f5f0688f052f49e2339c354dd731fdaf0f9667", kill_on_drop: false }`
[INFO] [stderr]     Checking ostree v0.17.0
[INFO] [stderr] error[E0063]: missing field `process_passthrough_whiteouts` in initializer of `repo_checkout_at_options::RepoCheckoutAtOptions`
[INFO] [stderr]   --> /opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/ostree-0.17.0/rust-bindings/src/repo_checkout_at_options/mod.rs:61:9
[INFO] [stderr]    |
[INFO] [stderr] 61 |         RepoCheckoutAtOptions {
[INFO] [stderr]    |         ^^^^^^^^^^^^^^^^^^^^^ missing `process_passthrough_whiteouts`
```

2 years agoMerge pull request #2807 from dbnicholson/hyper-staticfile-yanked
Colin Walters [Thu, 26 Jan 2023 00:46:34 +0000 (19:46 -0500)]
Merge pull request #2807 from dbnicholson/hyper-staticfile-yanked

tests/inst: Update hyper-staticfile to 0.9.4

2 years agotests/inst: Update hyper-staticfile to 0.9.4
Dan Nicholson [Tue, 24 Jan 2023 20:18:44 +0000 (13:18 -0700)]
tests/inst: Update hyper-staticfile to 0.9.4

Due to some vulnerabilities[1][2], all versions prior to 0.9.4 have been
yanked from crates.io. There have been some API changes since 0.6.0, but
none of them affect the simple `hyper_staticfile::Static` usage here.

1. https://rustsec.org/advisories/RUSTSEC-2022-0069.html
2. https://rustsec.org/advisories/RUSTSEC-2022-0072.html

2 years agoMerge pull request #2793 from ericcurtin/aboot-bootloader-support
Colin Walters [Thu, 5 Jan 2023 18:26:22 +0000 (13:26 -0500)]
Merge pull request #2793 from ericcurtin/aboot-bootloader-support

bootloader: Add an aboot (Android) bootloader backend

2 years agoMerge pull request #2799 from jeamland/replace-radix64
Colin Walters [Tue, 3 Jan 2023 15:46:25 +0000 (10:46 -0500)]
Merge pull request #2799 from jeamland/replace-radix64

Replace the radix64 crate with base64

2 years agoReplace the radix64 crate with base64
Benno Rice [Tue, 3 Jan 2023 00:54:56 +0000 (11:54 +1100)]
Replace the radix64 crate with base64

The radix64 crate was last updated over 3 years ago. On the other
hand the base64 crate appears to be far more actively maintained,
supports all the needed features and has a few orders of magnitude
more users.

2 years agoMerge pull request #2798 from akiernan/support-musl-erange
Colin Walters [Mon, 2 Jan 2023 17:23:59 +0000 (12:23 -0500)]
Merge pull request #2798 from akiernan/support-musl-erange

tests: Handle musl's ERANGE mapping

2 years agotests: Handle musl's ERANGE mapping
Alex Kiernan [Mon, 2 Jan 2023 10:37:49 +0000 (10:37 +0000)]
tests: Handle musl's ERANGE mapping

musl uses "Result not representable" for ERANGE, support this in
addition to glibc's "Numerical result out of range".

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2 years agoMerge pull request #2797 from akiernan/fix-musl-allperms
Colin Walters [Sat, 31 Dec 2022 18:13:26 +0000 (13:13 -0500)]
Merge pull request #2797 from akiernan/fix-musl-allperms

lib/repo-checkout: Add ALLPERMS for musl

2 years agolib/repo-checkout: Add ALLPERMS for musl
Alex Kiernan [Sat, 31 Dec 2022 11:11:14 +0000 (11:11 +0000)]
lib/repo-checkout: Add ALLPERMS for musl

ALLPERMS is glibc specific, add a definition for musl.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
3 years agobootloader: Add an aboot (Android) bootloader backend
Eric Curtin [Tue, 13 Dec 2022 14:12:25 +0000 (14:12 +0000)]
bootloader: Add an aboot (Android) bootloader backend

aboot is special in that it packages kernel, initrd, cmdline, dtb and
signature one combined image (similar to upcoming unified kernel
images). This is then loaded as an image into an aboot partition.

This image is signed by the OS vendor and covers everything in the
image. So locally on the deployed system it should not be possible to
boot an unsigned image (unless signature checking is turned off).

We call a shell script aboot-deploy when it is required to write a new
image to the aboot partition (a file typically starting with aboot and
ending in .img extension). This shell script may also read some
configurations from a .cfg file.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
3 years agoMerge pull request #2766 from cgwalters/avoid-endless-object-queueing
Jonathan Lebon [Thu, 1 Dec 2022 20:30:03 +0000 (15:30 -0500)]
Merge pull request #2766 from cgwalters/avoid-endless-object-queueing

Closes https://github.com/ostreedev/ostree/issues/2732

3 years agoMerge pull request #2789 from lucab/ups/autoconf-gpg-libs
Colin Walters [Tue, 29 Nov 2022 14:21:18 +0000 (09:21 -0500)]
Merge pull request #2789 from lucab/ups/autoconf-gpg-libs

configure: use pkg-config with newer gpgme and gpg-error

3 years agolib/repo: fix an 'unused-function' warning
Luca BRUNO [Mon, 28 Nov 2022 16:45:38 +0000 (16:45 +0000)]
lib/repo: fix an 'unused-function' warning

This silences a warning when building the project with `--with-gpme=no`.

3 years agoconfigure: use pkg-config with newer gpgme and gpg-error
Luca BRUNO [Thu, 24 Nov 2022 16:39:35 +0000 (16:39 +0000)]
configure: use pkg-config with newer gpgme and gpg-error

This tweaks autoconf logic in order to use pkg-config for gpgme
and gpg-error when available.
Recent versions of gpgme directly provide threaded support, and
gpg-error started shipping a .pc file. Thus on recent distributions
it is possible to directly use pkg-config for both. On older
environments, the legacy logic is kept in place.

3 years agoMerge pull request #2788 from lucab/ups/lib-assertions
Colin Walters [Sat, 26 Nov 2022 15:19:30 +0000 (10:19 -0500)]
Merge pull request #2788 from lucab/ups/lib-assertions

lib: assert more invariants

3 years agoMerge pull request #2787 from cgwalters/release-rust-bindings
Colin Walters [Thu, 24 Nov 2022 16:15:17 +0000 (11:15 -0500)]
Merge pull request #2787 from cgwalters/release-rust-bindings

rust: Bump to 0.17

3 years agolib: assert more invariants
Luca BRUNO [Thu, 24 Nov 2022 08:13:13 +0000 (08:13 +0000)]
lib: assert more invariants

This converts a few more safety checks into either plain GErrors
or hard assertions.

3 years agorust: Bump to 0.17
Colin Walters [Wed, 23 Nov 2022 18:28:29 +0000 (13:28 -0500)]
rust: Bump to 0.17

We switched gio and cap-std versions, so we need to bump
our own semver.

3 years agoMerge pull request #2786 from cgwalters/release
Colin Walters [Wed, 23 Nov 2022 17:40:02 +0000 (12:40 -0500)]
Merge pull request #2786 from cgwalters/release

Release 2022.7

3 years agoconfigure: post-release version bump
Colin Walters [Wed, 23 Nov 2022 14:03:44 +0000 (09:03 -0500)]
configure: post-release version bump

3 years agoRelease 2022.7
Colin Walters [Wed, 23 Nov 2022 14:02:52 +0000 (09:02 -0500)]
Release 2022.7

3 years agoMerge pull request #2784 from cgwalters/ci-build-integration-tests
Joseph Marrero Corchado [Tue, 22 Nov 2022 20:21:38 +0000 (15:21 -0500)]
Merge pull request #2784 from cgwalters/ci-build-integration-tests

ci: Add a flow that combines C build and Rust integration tests

3 years agoMerge pull request #2781 from cgwalters/bump-bindings
Joseph Marrero Corchado [Tue, 22 Nov 2022 19:34:39 +0000 (14:34 -0500)]
Merge pull request #2781 from cgwalters/bump-bindings

3 years agoci: Add a flow that combines C build and Rust integration tests
Colin Walters [Tue, 22 Nov 2022 18:43:06 +0000 (13:43 -0500)]
ci: Add a flow that combines C build and Rust integration tests

Today it's just the Jenkins flow which builds our Rust
integration tests.  Let's add a flow to the GH actions which
does this, and also runs inside a (privileged) container.

Prep for doing more testing of the ostree-container path here.

3 years agoMerge pull request #2782 from cgwalters/testinst-updates
Joseph Marrero Corchado [Tue, 22 Nov 2022 19:22:48 +0000 (14:22 -0500)]
Merge pull request #2782 from cgwalters/testinst-updates

3 years agoMerge pull request #2783 from cgwalters/test-sudo
Luca Bruno [Tue, 22 Nov 2022 16:30:50 +0000 (16:30 +0000)]
Merge pull request #2783 from cgwalters/test-sudo

tests: Require OSTREE_TEST_SUDO to be set to use `sudo`

3 years agotests: Require OSTREE_TEST_SUDO to be set to use `sudo`
Colin Walters [Tue, 22 Nov 2022 15:26:44 +0000 (10:26 -0500)]
tests: Require OSTREE_TEST_SUDO to be set to use `sudo`

IMO, tools invoking `sudo` automatically is a huge anti-pattern.
Require this to be opt-in.

In practice also...these tests really want to be *integration*
and not unit tests because involving `sudo` alongside uninstalled
binaries just creates a giant mess.

Closes: https://github.com/ostreedev/ostree/issues/2761
3 years agotests/inst: Update sh-inline
Colin Walters [Tue, 22 Nov 2022 15:14:17 +0000 (10:14 -0500)]
tests/inst: Update sh-inline

3 years agotests/inst: Update cap-std-ext to 1.0
Colin Walters [Tue, 22 Nov 2022 15:14:17 +0000 (10:14 -0500)]
tests/inst: Update cap-std-ext to 1.0

3 years agotests/inst: Drop nix dependency
Colin Walters [Tue, 22 Nov 2022 15:12:30 +0000 (10:12 -0500)]
tests/inst: Drop nix dependency

It has various semver bumps and we were literally just using
it to duplicate what's already in `libc`.

3 years agotests/inst: Update to latest ostree-ext
Colin Walters [Tue, 22 Nov 2022 15:09:02 +0000 (10:09 -0500)]
tests/inst: Update to latest ostree-ext

3 years agorust: Regenerate with latest gir and C sources
Colin Walters [Tue, 22 Nov 2022 14:53:59 +0000 (09:53 -0500)]
rust: Regenerate with latest gir and C sources

3 years agoMerge pull request #2768 from cgwalters/update-gio
Colin Walters [Tue, 22 Nov 2022 14:50:27 +0000 (09:50 -0500)]
Merge pull request #2768 from cgwalters/update-gio

rust: Update to gio 0.16

3 years agoMerge pull request #2779 from cgwalters/sysroot-mountns
Colin Walters [Tue, 22 Nov 2022 14:44:04 +0000 (09:44 -0500)]
Merge pull request #2779 from cgwalters/sysroot-mountns

sysroot: Add an API to initialize with mountns

3 years agosysroot: Add an API to initialize with mountns
Colin Walters [Mon, 21 Nov 2022 20:16:04 +0000 (15:16 -0500)]
sysroot: Add an API to initialize with mountns

This lowers down into the C library some logic we
have in the binary/app logic, in prep for having more Rust-native
CLI code in https://github.com/ostreedev/ostree-rs-ext/pull/412

Basically we want to *ensure* a mount namespace by invoking
`unshare()` if necessary, instead of requiring our callers
to do this dance.

This also helps fix e.g.
Closes: https://github.com/ostreedev/ostree/issues/2769
3 years agoMerge pull request #2776 from cgwalters/fix-potential-double-unwind
Luca Bruno [Tue, 22 Nov 2022 11:18:14 +0000 (11:18 +0000)]
Merge pull request #2776 from cgwalters/fix-potential-double-unwind

repo: Avoid potential double unwind when writing panic value

3 years agoAllow missing docs on two `glib::wrapper` functions
Colin Walters [Mon, 21 Nov 2022 18:40:53 +0000 (13:40 -0500)]
Allow missing docs on two `glib::wrapper` functions

This is being triggered in gtk-rs generated code.

3 years agorepo: Avoid potential double unwind when writing panic value
Colin Walters [Fri, 18 Nov 2022 16:26:46 +0000 (11:26 -0500)]
repo: Avoid potential double unwind when writing panic value

Thanks to @shinmao for the report!

Closes: https://github.com/ostreedev/ostree/issues/2775
3 years agoostree: manually patch generated files
Luca BRUNO [Fri, 4 Mar 2022 14:28:35 +0000 (14:28 +0000)]
ostree: manually patch generated files

This manually adds a missing `ToGlibPtr` import, which seems to be result
of some bugs in `gir` code-generation.

3 years agorust: Update to gio 0.16
Colin Walters [Tue, 15 Nov 2022 13:09:52 +0000 (08:09 -0500)]
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.

3 years agoMerge pull request #2778 from pwithnall/small-leaks
Colin Walters [Mon, 21 Nov 2022 17:39:52 +0000 (12:39 -0500)]
Merge pull request #2778 from pwithnall/small-leaks

Fix a couple of small leaks

3 years agoot-builtin-pull: Fix a minor leak with progress reporting
Philip Withnall [Mon, 21 Nov 2022 16:35:02 +0000 (16:35 +0000)]
ot-builtin-pull: Fix a minor leak with progress reporting

`ostree_async_progress_get_status()` returns an allocated string.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
3 years agolib/pull: Fix a small leak when a variable is reused
Philip Withnall [Mon, 21 Nov 2022 16:34:00 +0000 (16:34 +0000)]
lib/pull: Fix a small leak when a variable is reused

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
3 years agoMerge pull request #2770 from lucab/ups/git-describe-tags
Colin Walters [Mon, 21 Nov 2022 16:33:10 +0000 (11:33 -0500)]
Merge pull request #2770 from lucab/ups/git-describe-tags

ci: adjust git tags filtering

3 years agoMerge pull request #2772 from lucab/ups/bump-msrv
Colin Walters [Mon, 21 Nov 2022 16:32:28 +0000 (11:32 -0500)]
Merge pull request #2772 from lucab/ups/bump-msrv

cargo: bump minimum Rust version to 1.63

3 years agocargo: bump minimum Rust version to 1.63
Luca BRUNO [Fri, 18 Nov 2022 09:13:12 +0000 (09:13 +0000)]
cargo: bump minimum Rust version to 1.63

This bumps MSRV to 1.63, in order to prepare for the next version
of gtk-rs stack.

Ref: https://gtk-rs.org/blog/2022/10/18/new-release.html

3 years agoci: adjust git tags filtering
Luca BRUNO [Wed, 16 Nov 2022 16:09:24 +0000 (16:09 +0000)]
ci: adjust git tags filtering

Another attempt at fixing logic for version detection in COPR.

3 years agoMerge pull request #2774 from cgwalters/ci-fedora-fix
Colin Walters [Mon, 21 Nov 2022 14:15:23 +0000 (09:15 -0500)]
Merge pull request #2774 from cgwalters/ci-fedora-fix

ci: Fix case where cosa != buildroot

3 years agoMerge pull request #2777 from Razaloc/wip/rafaelgarrui/deletepresent
Dan Nicholson [Mon, 21 Nov 2022 13:38:23 +0000 (06:38 -0700)]
Merge pull request #2777 from Razaloc/wip/rafaelgarrui/deletepresent

Idempotent delete operation for  OstreeKernelArgs

3 years agoci: Fix case where cosa != buildroot
Colin Walters [Fri, 18 Nov 2022 15:42:58 +0000 (10:42 -0500)]
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.

3 years agoIdempotent delete operation for OstreeKernelArgs
Rafael Garcia Ruiz [Fri, 18 Nov 2022 17:24:01 +0000 (18:24 +0100)]
Idempotent delete operation for  OstreeKernelArgs

ostree_kernel_args_delete_if_present checks if an argument is present
in OstreeKernelArgs and delete it.

Signed-off-by: Rafael Garcia Ruiz <rafael.garcia@collabora.com>
3 years agoMerge pull request #2773 from pwithnall/typo-fix
Colin Walters [Fri, 18 Nov 2022 16:35:30 +0000 (11:35 -0500)]
Merge pull request #2773 from pwithnall/typo-fix

Improve a help string for ostree-commit

3 years agoot-builtin-commit: Don’t mention a C function name in a help string
Philip Withnall [Fri, 18 Nov 2022 15:41:59 +0000 (15:41 +0000)]
ot-builtin-commit: Don’t mention a C function name in a help string

Instead mention the formal name of the format accepted by
`g_variant_parse()`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
3 years agoot-builtin-commit: Fix a typo in a command line help string
Philip Withnall [Fri, 18 Nov 2022 15:40:42 +0000 (15:40 +0000)]
ot-builtin-commit: Fix a typo in a command line help string

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
3 years agoMerge pull request #2771 from Razaloc/wip/rafaelgarrui/contains
Dan Nicholson [Fri, 18 Nov 2022 13:13:27 +0000 (06:13 -0700)]
Merge pull request #2771 from Razaloc/wip/rafaelgarrui/contains

ostree_kernel_args_contains for OstreeKernelArgs

3 years agoostree_kernel_args_contains for OstreeKernelArgs
Rafael Garcia Ruiz [Thu, 17 Nov 2022 13:49:08 +0000 (14:49 +0100)]
ostree_kernel_args_contains for OstreeKernelArgs

Check if an argument is present in OstreeKernelArgs. This is a way to
make easier idempotent append and delete operations.
ostree_kernel_args_append_if_missing uses it to avoid inserting a
duplicate key.

Closes #2329

Signed-off-by: Rafael Garcia Ruiz <rafael.garcia@collabora.com>
3 years agofetcher: Avoid too large queues for metadata processing
Colin Walters [Mon, 14 Nov 2022 19:06:05 +0000 (14:06 -0500)]
fetcher: Avoid too large queues for metadata processing

We added backoff/queueing for fetching via HTTP, but we have
another queue in the metadata scanning which can also grow
up to the number of outstanding objects, which can be large.

Capping the scanning operation when we have hit our operation
limit will avoid potentially large amounts of allocations in the
case of e.g. a slow network.

Closes: https://github.com/ostreedev/ostree/issues/2732
3 years agoMerge pull request #2765 from cgwalters/drop-openat
Joseph Marrero Corchado [Sun, 13 Nov 2022 18:08:43 +0000 (13:08 -0500)]
Merge pull request #2765 from cgwalters/drop-openat

rust: Drop `openat` dependency

3 years agoMerge pull request #2751 from smcv/memdup2
Colin Walters [Sun, 13 Nov 2022 15:50:39 +0000 (10:50 -0500)]
Merge pull request #2751 from smcv/memdup2

Replace calls to g_memdup() with g_memdup2()

3 years agorust: Drop `openat` dependency
Colin Walters [Fri, 11 Nov 2022 20:11:55 +0000 (15:11 -0500)]
rust: Drop `openat` dependency

We can use cap-std in our tests.

3 years agoMerge pull request #2764 from cgwalters/bump-cap-std
Joseph Marrero Corchado [Sat, 12 Nov 2022 19:21:59 +0000 (14:21 -0500)]
Merge pull request #2764 from cgwalters/bump-cap-std

rust: Update to cap-std 1.0

3 years agoReplace calls to g_memdup() with g_memdup2()
Simon McVittie [Fri, 28 Oct 2022 11:19:29 +0000 (12:19 +0100)]
Replace calls to g_memdup() with g_memdup2()

g_memdup() is subject to an integer overflow on 64-bit machines if the
object being copied is larger than UINT_MAX bytes. I suspect none of
these objects can actually be that large in practice, but it's easier
to replace all the calls than it is to assess whether we need to
replace them.

A backport in libglnx is used on systems where GLib is older than 2.68.x.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agorust: Update to cap-std 1.0
Colin Walters [Fri, 11 Nov 2022 20:08:10 +0000 (15:08 -0500)]
rust: Update to cap-std 1.0

This was one source of our semver bumps; let's switch to 1.0.

3 years agoMerge pull request #2763 from cgwalters/testiso-more-memory
Colin Walters [Fri, 11 Nov 2022 21:11:26 +0000 (16:11 -0500)]
Merge pull request #2763 from cgwalters/testiso-more-memory

ci: Bump memory for ISO testing flow

3 years agoci: Bump memory for ISO testing flow
Colin Walters [Fri, 11 Nov 2022 20:03:30 +0000 (15:03 -0500)]
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.

3 years agoMerge pull request #2762 from lucab/ups/copr-tags
Colin Walters [Fri, 11 Nov 2022 19:08:36 +0000 (14:08 -0500)]
Merge pull request #2762 from lucab/ups/copr-tags

copr: only use libostree tags

3 years agocopr: only use libostree tags
Luca BRUNO [Fri, 11 Nov 2022 14:05:56 +0000 (14:05 +0000)]
copr: only use libostree tags

This adds a tag filter to the logic which emits version labels for
COPR build, so that it avoids mistakenly picking up tags belonging
to the Rust bindings.

3 years agoMerge pull request #2760 from cgwalters/offline-deploy-no-bwrap
Luca Bruno [Fri, 11 Nov 2022 10:16:17 +0000 (10:16 +0000)]
Merge pull request #2760 from cgwalters/offline-deploy-no-bwrap

deploy: Don't rebuild selinux policy on first deployment

3 years agoMerge pull request #2754 from cgwalters/remove-readdir-rand
Colin Walters [Thu, 10 Nov 2022 10:59:36 +0000 (05:59 -0500)]
Merge pull request #2754 from cgwalters/remove-readdir-rand

Remove readdir-rand

3 years agoMerge pull request #2759 from oglok/http_500
Colin Walters [Wed, 9 Nov 2022 20:34:08 +0000 (15:34 -0500)]
Merge pull request #2759 from oglok/http_500

Enabling retry for HTTP 500 internal server error

3 years agodeploy: Don't rebuild selinux policy on first deployment
Colin Walters [Wed, 9 Nov 2022 16:18:36 +0000 (11:18 -0500)]
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
3 years agoAdd tests for cases under random 500s
Ricardo Noriega [Wed, 9 Nov 2022 09:52:16 +0000 (10:52 +0100)]
Add tests for cases under random 500s

Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
3 years agoEnabling retry for HTTP 500 internal server error
Ricardo Noriega [Fri, 28 Oct 2022 11:59:08 +0000 (13:59 +0200)]
Enabling retry for HTTP 500 internal server error

Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
Use G_IO_ERROR_BUSY to represent 500 error

Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
Make G_IO_ERROR_BUSY independent from glib version

Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
3 years agoMerge pull request #2756 from ostreedev/dependabot/submodules/libglnx-4e44fd9
Colin Walters [Fri, 4 Nov 2022 15:47:43 +0000 (11:47 -0400)]
Merge pull request #2756 from ostreedev/dependabot/submodules/libglnx-4e44fd9

build(deps): bump libglnx from `e701578` to `4e44fd9`

3 years agobuild(deps): bump libglnx from `e701578` to `4e44fd9`
dependabot[bot] [Wed, 2 Nov 2022 12:32:15 +0000 (12:32 +0000)]
build(deps): bump libglnx from `e701578` to `4e44fd9`

Bumps libglnx from `e701578` to `4e44fd9`.

---
updated-dependencies:
- dependency-name: libglnx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoRemove readdir-rand
Colin Walters [Mon, 31 Oct 2022 13:00:28 +0000 (09:00 -0400)]
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.

3 years agoMerge pull request #2752 from smcv/copy-dirent
Colin Walters [Mon, 31 Oct 2022 12:58:21 +0000 (08:58 -0400)]
Merge pull request #2752 from smcv/copy-dirent

readdir-rand: Copy full size of struct dirent

3 years agoreaddir-rand: Copy full size of struct dirent
Simon McVittie [Fri, 28 Oct 2022 11:21:29 +0000 (12:21 +0100)]
readdir-rand: Copy full size of struct dirent

As noted in readdir(3), in the presence of long filenames it is
possible for a directory entry to be larger than `sizeof (struct dirent)`.
Copy the full length instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge pull request #2749 from lucab/ups/cargo-releases
Luca Bruno [Fri, 28 Oct 2022 07:26:08 +0000 (07:26 +0000)]
Merge pull request #2749 from lucab/ups/cargo-releases

cargo: prepare ostree 0.16.0 and ostree-sys 0.11.0

3 years agocargo: prepare ostree 0.16.0 and ostree-sys 0.11.0
Luca BRUNO [Thu, 27 Oct 2022 13:26:17 +0000 (13:26 +0000)]
cargo: prepare ostree 0.16.0 and ostree-sys 0.11.0

This prepares for a new release of both crates, now using the
gtk-rs 0.15 stack.

3 years agoMerge pull request #2748 from lucab/ups/ci-rust-bump-libostree-git
Luca Bruno [Thu, 27 Oct 2022 14:19:38 +0000 (14:19 +0000)]
Merge pull request #2748 from lucab/ups/ci-rust-bump-libostree-git

ci/rust: test from git using latest feature

3 years agoci/rust: test from git using latest feature
Luca BRUNO [Thu, 27 Oct 2022 12:58:43 +0000 (12:58 +0000)]
ci/rust: test from git using latest feature

3 years agoMerge pull request #2743 from lucab/ups/gtk-rs-0.15
Luca Bruno [Thu, 27 Oct 2022 12:24:05 +0000 (12:24 +0000)]
Merge pull request #2743 from lucab/ups/gtk-rs-0.15

rust-bindings: regenerate for gtk-rs 0.15

3 years agorust/ostree: regenerate for gtk-rs 0.15
Luca BRUNO [Tue, 25 Oct 2022 13:03:52 +0000 (13:03 +0000)]
rust/ostree: regenerate for gtk-rs 0.15

3 years agorust/ostree-sys: regenerate for gtk-rs 0.15
Luca BRUNO [Tue, 25 Oct 2022 09:19:51 +0000 (09:19 +0000)]
rust/ostree-sys: regenerate for gtk-rs 0.15

3 years agorust: update pinned gir tool to 0.15
Luca BRUNO [Tue, 25 Oct 2022 08:46:34 +0000 (08:46 +0000)]
rust: update pinned gir tool to 0.15

3 years agoMerge pull request #2742 from lucab/ups/rust-regenerate-2022.6
Colin Walters [Wed, 26 Oct 2022 13:15:14 +0000 (09:15 -0400)]
Merge pull request #2742 from lucab/ups/rust-regenerate-2022.6

rust: regenerate bindings after latest release (2022.6)

3 years agoMerge pull request #2745 from lucab/ups/ci-bump-rust-linting
Colin Walters [Wed, 26 Oct 2022 13:15:01 +0000 (09:15 -0400)]
Merge pull request #2745 from lucab/ups/ci-bump-rust-linting

ci/rust: bump linting toolchain to latest stable (1.64)

3 years agoMerge pull request #2746 from lucab/ups/lib-repo-refs-error
Colin Walters [Wed, 26 Oct 2022 13:14:48 +0000 (09:14 -0400)]
Merge pull request #2746 from lucab/ups/lib-repo-refs-error

lib/repo-refs: properly return an error value

3 years agolib/repo-refs: properly return an error value
Luca BRUNO [Wed, 26 Oct 2022 11:12:37 +0000 (11:12 +0000)]
lib/repo-refs: properly return an error value

This tweaks a logic check in order to return a proper error value
when the related condition is not satisfied.

3 years agoMerge pull request #2740 from lucab/ups/lib-sign-ed25519-assertions
Colin Walters [Wed, 26 Oct 2022 10:33:04 +0000 (06:33 -0400)]
Merge pull request #2740 from lucab/ups/lib-sign-ed25519-assertions

lib/sign-ed25519: convert invariant checks to assertions

3 years agoci/rust: bump linting toolchain to latest stable (1.64)
Luca BRUNO [Wed, 26 Oct 2022 06:46:09 +0000 (06:46 +0000)]
ci/rust: bump linting toolchain to latest stable (1.64)

This bumps the Rust toolchain for clippy/rustfmt to 1.64.

3 years agorust: update manual helpers
Luca BRUNO [Mon, 24 Oct 2022 16:01:57 +0000 (16:01 +0000)]
rust: update manual helpers

3 years agoostree: manually patch generated files
Luca BRUNO [Fri, 4 Mar 2022 14:28:35 +0000 (14:28 +0000)]
ostree: manually patch generated files

This manually adds a missing `ToGlibPtr` import, which seems to be result
of some bugs in `gir` code-generation.

3 years agorust: regenerate bindings after latest release (2022.6)
Luca BRUNO [Mon, 24 Oct 2022 15:23:47 +0000 (15:23 +0000)]
rust: regenerate bindings after latest release (2022.6)