Commit Graph

7085 Commits

Author SHA1 Message Date
Luke Yang
dc9eaef1e5 tree: Fix name memory leak
Coverity points out that we have a memory leak from `g_strdup(name)`.
`insert_child_mtree()` takes a const char * and duplicates it.
`name` can be passed directly to `insert_child_mtree()`.
2024-06-20 15:09:11 -04:00
Colin Walters
0ea7d2e326
Merge pull request #3269 from cgwalters/fix-ordering
remount: Drop `Before=systemd-sysusers.service`
2024-06-20 11:54:23 -04:00
Colin Walters
1db6911e41
Merge pull request #3270 from cgwalters/bump-runners
ci: Bump bootc e2e to latest ubuntu, drop docker
2024-06-20 11:23:27 -04:00
Colin Walters
0153abe4bb ci: Bump bootc e2e to latest ubuntu, drop docker
As newer docker refuses to talk to ancient skopeo.
Update this to use podman directly, also add the missing `-v /dev:/dev`.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-06-20 09:52:38 -04:00
Colin Walters
1544d20560
Merge pull request #3268 from ueno/wip/dueno/composefs-doc-fixes
Minor cleanup related to composefs
2024-06-20 09:18:55 -04:00
Colin Walters
b0ab531e08 remount: Drop Before=systemd-sysusers.service
This created an ordering cycle, and I merged over red CI
for bad reasons.
2024-06-20 09:18:08 -04:00
Daiki Ueno
371540f9ab repo: Remove leftover OpenSSL includes
This removes OpenSSL includes for PKCS#7, previously used to generate
fs-verity builtin signatures.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
2024-06-20 15:06:49 +09:00
Daiki Ueno
023888d8a3 docs/composefs: Fix reference to ostree sign
Signed-off-by: Daiki Ueno <dueno@redhat.com>
2024-06-20 15:06:46 +09:00
Colin Walters
f280b1216b
Merge pull request #3266 from ericcurtin/if-file-missing-on-relabel-continue
remount: ignore ENOENT error during SELinux relabeling
2024-06-18 14:14:02 -04:00
Eric Curtin
e25ca8099f remount: ignore ENOENT error during SELinux relabeling
Ignore ENOENT error in selinux_restorecon to avoid failures when
temporary files created by systemd-sysusers in /etc are missing during
relabeling. This prevents errors such as:

  "Failed to relabel /etc/.#gshadowJzu4Rx: No such file or directory"

and allows the process to continue.

Co-Authored-By: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-06-18 18:43:51 +01:00
Colin Walters
8f559e94b7
Merge pull request #3261 from cgwalters/validate-xattrs
core: Validate that xattr names aren't empty
2024-06-04 13:32:20 -04:00
Colin Walters
e19f732481 core: Validate that xattr names aren't empty
In the ostree-ext codebase the test fixture was generating xattrs
without the trailing NUL byte.  This caused confusing errors
later.  Change the dirmeta validator to catch this.

The way GVariant represents bytestrings, the trailing NUL is there
on wire/disk so it can be there in memory too, but `g_variant_get_bytestring()`
will just return an empty `""` string if actually the value
has a missing NUL.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-06-01 14:46:23 -04:00
Colin Walters
ac6ba43922
Merge pull request #3259 from cgwalters/c9s-buildroot
ci: Add buildroot to c9s build
2024-05-30 12:46:14 -04:00
Colin Walters
3ef9ae95b9 ci: Add buildroot to c9s build
Because composefs-devel isn't shipped in RHEL.
2024-05-30 11:05:20 -04:00
Colin Walters
114118e48d
Merge pull request #3258 from cgwalters/prepare-comments
docs: Describe `/boot/ostree`
2024-05-30 10:39:50 -04:00
Colin Walters
f63b751225 docs: Describe /boot/ostree
People get confused by the sha256 here being different
from the ostree commit hash.
2024-05-30 09:42:24 -04:00
Eric Curtin
b605230635
Merge pull request #3253 from cgwalters/prepare-comments
prepare-root: Cleanup comments
2024-05-23 16:52:32 +02:00
Colin Walters
a2ae287964
Merge pull request #3252 from cgwalters/checkout-cfs
checkout: Add API to directly checkout composefs
2024-05-23 07:54:10 -04:00
Colin Walters
f041e0253f prepare-root: Cleanup comments
Mainly we can now drop the TODO for mounting `/` readonly - that's
handled by composefs.  Add a few other comments, typo fixes
while we're here.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-22 21:08:32 -04:00
Colin Walters
c0a715f1e2 checkout: Add API to directly checkout composefs
We were missing the simple, obvious API and CLI to go
from ostree commit -> composefs.

Internally, we had `ostree_repo_checkout_composefs`
with the right "shape" mostly, except it had more code
in the deploy path to turn that into a composefs.

Add a straightforward public API that does what
the deploy code did before, and then the old
API becomes an explicitly internal helper with an `_`
prefix.

Goals:

- Lead towards a composefs-oriented future
- This makes the composefs logic more testable directly

Signed-off-by: Colin Walters <walters@verbum.org>
2024-05-22 20:38:24 -04:00
Colin Walters
e84dc96612
Merge pull request #3249 from ericcurtin/add-webos
docs: add webOS as users of libostree
2024-05-22 20:09:04 -04:00
Colin Walters
1ab70be76d
Merge pull request #3250 from ericcurtin/minor-bootloader-doc-change
docs: make /ostree/root.X clearer as symlinks
2024-05-22 20:08:27 -04:00
Eric Curtin
bee18edfbc docs: make /ostree/root.X clearer as symlinks
Feedback from Alexander Larsson before Linaro Connect talk which used
this diagram.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-05-21 15:02:04 +01:00
Eric Curtin
fef5feca1c docs: add webOS as users of libostree
Updated the README.md to include information about webOS, an OS for
smart devices such as smart TVs, which from version 2.0.0 supports
Firmware-Over-the-Air (FOTA) based on libostree. Added relevant links
for further details on webOS and FOTA setup.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-05-21 14:54:19 +01:00
Colin Walters
64a09da0eb
Merge pull request #3246 from jmarrero/release-2024.6
Release 2024.6
2024-05-16 18:17:58 -04:00
Joseph Marrero
32bec27a24 configure: post-release version bump 2024-05-16 16:34:35 -04:00
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