Commit Graph

7009 Commits

Author SHA1 Message Date
Joseph Marrero
d4a7a8d94b Release 2024.6 2024-05-16 16:31:51 -04:00
Colin Walters
4ed4d618b9
Merge pull request #3245 from cgwalters/doc-offline-deltas
docs: Describe offline updates with static deltas
2024-05-16 12:32:40 -04:00
Colin Walters
37b3c7677e docs: Describe offline updates with static deltas
This one isn't immediately obvious that it's possible.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-16 12:28:27 -04:00
Joseph Marrero Corchado
664116f03a
Merge pull request #3244 from alexlarsson/fix-fsverity-supported
Fix _ostree_ensure_fsverity reporting of supports in early exit
2024-05-15 13:15:05 -04:00
Dan Nicholson
92f2abcb85
Merge pull request #3243 from cgwalters/loaded_ts_fix
sysroot: Handle `/ostree/deploy` having epoch 0
2024-05-15 10:11:40 -06:00
Alexander Larsson
083eacd6de Fix _ostree_ensure_fsverity reporting of supports in early exit
If supported_out is passed to _ostree_ensure_fsverity and we
successfully exit early, for example because the file is a symlink, then
*supported_out is not initialized.

This is problematic in the case of ostree_sysroot_update_post_copy(),
because it passes in an uninitialized supported, and on successfull
return of _ostree_ensure_fsverity() it assumes that it is iniialized.

In case supported happened to be initialized to non-zero it will take
this branch:

      if (!supported)
        break; /* If not supported, skip rest */

Which means *all* further objects will not get fs-verity enabled.
2024-05-15 17:31:09 +02:00
Colin Walters
ee066d799d sysroot: Handle /ostree/deploy having epoch 0
Ironically we break if the timestamp there is zero.

Closes: https://github.com/ostreedev/ostree/issues/3022
Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-15 09:59:50 -04:00
Joseph Marrero Corchado
f911d40b98
Merge pull request #3234 from jmarrero/state-root
ostree-sysroot-deploy: check if deployments are in the same stateroot.
2024-05-03 21:34:25 -04:00
Joseph Marrero Corchado
cb70e4063f ostree-sysroot-deploy: check if deployments are in the same stateroot. 2024-05-03 19:57:31 -04:00
Jonathan Lebon
a00062bfa2
Merge pull request #3238 from cgwalters/force-container-env 2024-05-03 14:38:30 -04:00
Colin Walters
3d3f0b8d31 ci: Also skip if we detect /run/.containerenv 2024-05-02 14:18:55 -04:00
Colin Walters
64ab098261
Merge pull request #3236 from cgwalters/clang-format
ci: Only run clang-format on ubuntu-stable GH runner
2024-05-02 09:35:55 -04:00
Colin Walters
a33c7d23d6 ci: Only run clang-format on ubuntu-stable GH runner
Previously we were running clang-format across multiple operating
system versions and hence clang versions, and it turns out
clang has changed the preferred formatting multiple times.

We could *probably* dig in and try to pin things more strongly
but eh...for now let's arbitrarily just use whatever's in
the default GH Action ubuntu-latest runner as that should
be equally painful for everyone.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-01 20:35:32 -04:00
Colin Walters
cb13977ad2
Merge pull request #3232 from ericcurtin/aboot-bootloader
docs: More accurate diagram in bootloaders documentation for aboot
2024-05-01 20:24:36 -04:00
Colin Walters
fa720d1540
Merge pull request #3233 from dbnicholson/sync-summary-times
Sync summary times
2024-05-01 20:23:59 -04:00
Dan Nicholson
60f4592b2c repo: Make summary and signature mtime match
HTTP servers derive Last-Modified from the modification time of the
file. When used in combination with a Cache-Control max-age value,
having the modification times match means that caches will consider them
expired at the same time. This helps make it more likely that clients
won't receive a cached summary and fresh signature or vice versa.

This makes more sense to do now that the summary and signature are
created in a temporary directory and renamed into place. In the old days
where they were created directly in the repo root, it would be strange
to change the summary mtime when it wasn't actually modified.
2024-04-25 09:38:50 -06:00
Dan Nicholson
ffbeff6cd7 tests: Correctly skip single fsverity test
The skip shell function is for skipping an entire test plan. To skip a
single test result, a directive is needed[1]. Without this change, the
test suite errors claiming that 2 test plans were provided when fsverity
isn't available.

1. https://testanything.org/tap-specification.html#skipping-tests
2024-04-24 21:57:23 -06:00
Eric Curtin
9e51fb1627 docs: Fix spelling and grammer
Make Android bootloader section clearer.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-04-24 21:00:42 +01:00
Eric Curtin
998a0ab57b docs: More accurate diagram in bootloaders documentation for aboot
The android bootloader is also split into two partitions, previously
that wasn't represented in the diagram.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-04-24 21:00:37 +01:00
Eric Curtin
c8c436e5db
Merge pull request #3231 from alexlarsson/fix-aboot-non-ab
prepare-root: Handle non-AB aboot properly
2024-04-15 20:48:09 +01:00
Alexander Larsson
6ac8c49a83 prepare-root: Handle non-AB aboot properly
otcore_get_ostree_target() should set is_aboot for android boot
systems, but currently it only does this on A/B boot systems, not
single-boot-partition systems. Fix this by setting it in the second
case.
2024-04-15 20:09:34 +02:00
Colin Walters
99ef9806e2
Merge pull request #3230 from cgwalters/initfs-epoch-2
init-fs: Add --epoch=2
2024-04-12 19:56:35 -04:00
Colin Walters
818af91dfe
Merge pull request #3108 from cgwalters/use-external-composefs
Switch to external composefs
2024-04-12 17:48:22 -04:00
Colin Walters
eb54a44169 Switch to external composefs
Since there's now a stable shared library, let's use it.
2024-04-12 16:16:21 -04:00
Colin Walters
8a9f067d61 ci: Drop SKIP_INSTALLDEPS=1
Right now there's skew where we don't have composefs-devel
in the buildroot.  In general this optimization isn't worth it.
2024-04-12 16:16:21 -04:00
Colin Walters
3647395fe5 tests: Skip composefs tests without the feature
Previously this was masked by us shipping composefs vendored.
2024-04-12 16:16:21 -04:00
Colin Walters
74a3d2da9c init-fs: Add --epoch=2
We want to start switching things so that the toplevel `/ostree`
repository is mode 0700, to close off unprivileged code
from being able to access it.  Previous deployment roots
may have setuid binaries, etc.  The `/var/lib/containers/storage`
directory is mode 0700 for this reason I believe.

Closes: https://github.com/ostreedev/ostree/issues/3211
2024-04-12 16:10:36 -04:00
Colin Walters
0c0b6cee61
Merge pull request #3229 from cgwalters/init-deploy-0700
init-fs: Add --epoch
2024-04-12 14:00:27 -04:00
Colin Walters
38f6b9b3ab init-fs: Add --epoch
I want to add another variant here, and `--modern` is now old.  Let's
acknowledge that we may want to make even more changes in the
future.  So `--modern == --epoch=1` but I will add `--epoch=2` after
this.
2024-04-12 08:56:13 -04:00
Colin Walters
3c2e9d0974
Merge pull request #3227 from alexlarsson/fix-fsverity-error-check
_ostree_ensure_fsverity: Properly check for errors
2024-04-08 12:40:03 -04:00
Alexander Larsson
374fb05d0e _ostree_ensure_fsverity: Properly check for errors
If fs_verity_wanted == _OSTREE_FEATURE_YES we should fail if
!suported, but we were checking !supported where supported is a
pointer, not a boolean. This caused us to miss errors when the kernel
didn't support fs-verity that lead to lots of debugging.
2024-04-08 17:05:23 +02:00
Colin Walters
d05c48b746
Merge pull request #3226 from ericcurtin/rm-rhivos
README & docs: Remove "RHIVOS" acronym
2024-03-30 09:40:17 -04:00
Eric Curtin
24c0c1c4f6 README & docs: Remove "RHIVOS" acronym
Remove the unofficial acronym RHIVOS from both the README and docs
files. The acronym is associated with Red Hat In-Vehicle Operating
System but isn't officially recognized.

Co-Authored-By: Felicia Kleinfelt <fkleinfe@redhat.com>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-03-30 13:19:00 +00:00
Colin Walters
3c25a93bac
Merge pull request #3220 from jlebon/pr/on-failure-isolate
ostree-prepare-root.service: add OnFailureJobMode=isolate
2024-03-21 13:57:45 -04:00
Jonathan Lebon
05b3b66275
ostree-prepare-root.service: add OnFailureJobMode=isolate
This is stronger than the default (`replace`) because it tells systemd
to *stop everything* and go to `emergency.target`. In other codebases,
this has definitely helped me with the problem of "systemd keeps going
even after a failure".

Likely addresses #3219.

See also e.g. 3d2e165f97.
2024-03-21 12:19:32 -04:00
Colin Walters
dc4d4b5592
Merge pull request #3218 from cgwalters/policy-allow-none
sepolicy: Add missing `(nullable)`
2024-03-19 12:28:54 -04:00
Joseph Marrero Corchado
b96b4ff46a
Merge pull request #3216 from cgwalters/mirrorlist-retries
curl: Also map HTTP errors for retries
2024-03-19 10:48:43 -04:00
Colin Walters
45453b73e5 sepolicy: Add missing (nullable)
This can return NULL if there's no real policy.

Now obviously we need to update the Rust bindings too but...
I am having trouble doing that, we're pretty out of date with
upstream.
2024-03-19 10:23:43 -04:00
Colin Walters
76ab862188 curl: Also map HTTP errors for retries
When we added the retry logic, the intention here was definitely
to do it not just for network errors but also e.g. HTTP 500s and
the like.

xref https://pagure.io/releng/issue/11439
where we rather painfully debugged that this was missing.
2024-03-15 18:45:22 -04:00
Colin Walters
7fdc792f85
Merge pull request #3215 from cgwalters/release
Release 2024.5
2024-03-14 11:26:35 -04:00
Colin Walters
1bc7d20777 configure: post-release version bump 2024-03-14 09:47:14 -04:00
Colin Walters
f3b66e8c2d Release 2024.5 2024-03-14 09:46:17 -04:00
Colin Walters
756e2dade0
Merge pull request #3214 from cgwalters/checkout-overwrite-force
checkout: Always replace existing content with overlay mode
2024-03-13 16:05:23 -04:00
Colin Walters
bb6dfd3ab0 checkout: Always replace existing content in overlay mode
The combination of the "honor whiteout" and "union" flags
are intended to basically be "merge trees like overlayfs does".
But we were missing this case in order to support e.g. replacing
a symlink with a directory.
2024-03-13 14:07:54 -04:00
Jonathan Lebon
c314eaa90c
Merge pull request #3213 from rborn-tx/fix-early-prune 2024-03-13 13:24:27 -04:00
Rogerio Guerra Borin
4efb44f35a deploy: Ensure boot directory is open before accessing it
This fixes a bug in the (early) deployment pruning function which before
tried to access the boot directory without opening it first.

Signed-off-by: Rogerio Guerra Borin <rogerio.borin@toradex.com>
2024-03-12 17:29:35 -03:00
Huijing Hei
223a1af4b5
Merge pull request #3208 from HuijingHei/split-whitespace
kargs: parse spaces in kargs input and keep quotes
2024-03-11 09:59:43 +08:00
HuijingHei
abc7d5b9a0 kargs: parse spaces in kargs input and keep quotes
According to Jonathan's suggestion, should fix the code from
ostree repo.

With this patch:
- kargs input like "init_on_alloc=1 init_on_free=1", will be
parsed as 2 seperated args `init_on_alloc=1` and `init_on_free=1`,
instead of whole;
- According to https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html,
need to keep spaces in double-quotes, like `param="spaces in here"`
will be parsed as whole instead of 3.

Fixes https://github.com/coreos/rpm-ostree/issues/4821
2024-03-08 10:01:06 +08:00
Eric Curtin
d95c2f8dd8
Merge pull request #3206 from cgwalters/enable-new-naming
sysroot: Turn on bootloader-naming-2 by default
2024-03-07 10:53:56 +00:00
Colin Walters
2fb7a04838 sysroot: Turn on bootloader-naming-2 by default
I think it's about time we flipped this on by default;
like the bootprefix I was a bit too chicken.  We still have
a `bootloader-naming-1` that can be flipped on in case of
some regression.

Closes: https://github.com/ostreedev/ostree/issues/2961
2024-02-28 09:40:34 -05:00