ostree.git
21 months agoMerge pull request #3186 from rborn-tx/amend-ms-shared-comment
Joseph Marrero Corchado [Wed, 21 Feb 2024 12:53:32 +0000 (07:53 -0500)]
Merge pull request #3186 from rborn-tx/amend-ms-shared-comment

ostree-prepare-root: Amend comment about shared mounts

21 months agoMerge pull request #3189 from alexlarsson/composefs-config-with-no-key
Eric Curtin [Wed, 21 Feb 2024 12:34:09 +0000 (12:34 +0000)]
Merge pull request #3189 from alexlarsson/composefs-config-with-no-key

deploy: Don't fail if loading composefs configuration fails due to mi…

21 months agodeploy: Don't fail if loading composefs configuration fails due to missing keys
Alexander Larsson [Wed, 21 Feb 2024 09:16:31 +0000 (10:16 +0100)]
deploy: Don't fail if loading composefs configuration fails due to missing keys

When we load the configuration during deploy we don't need to actually
use the keys, so avoid loading them. This fixes an issue we had where
this broke the initial deploy becasue of a failure to load the key. In
our case it fails because the code looks for the config file in the
deploy dir, but then for the binding key in the real root.

However, even if it were to look for the key in the deploy dir I don't
think it necessarily has to be in the rootfs, it could be only in the
initrd.

This fixes https://github.com/ostreedev/ostree/issues/3188

21 months agoMerge pull request #3184 from smcv/issue3183
Jonathan Lebon [Wed, 21 Feb 2024 03:29:56 +0000 (22:29 -0500)]
Merge pull request #3184 from smcv/issue3183

21 months agoostree-prepare-root: Amend comment about shared mounts
Rogerio Guerra Borin [Tue, 20 Feb 2024 17:50:35 +0000 (14:50 -0300)]
ostree-prepare-root: Amend comment about shared mounts

Signed-off-by: Rogerio Guerra Borin <rogerio.borin@toradex.com>
21 months agotest-admin-deploy-var: Don't rely on OSTREE_FEATURES
Simon McVittie [Mon, 19 Feb 2024 13:04:14 +0000 (13:04 +0000)]
test-admin-deploy-var: Don't rely on OSTREE_FEATURES

This is set during build-time testing, but unset during "as-installed"
tests.

Resolves: https://github.com/ostreedev/ostree/issues/3183
Signed-off-by: Simon McVittie <smcv@debian.org>
21 months agotests: Use skip_without_ostree_feature to detect libarchive, composefs
Simon McVittie [Mon, 19 Feb 2024 16:07:13 +0000 (16:07 +0000)]
tests: Use skip_without_ostree_feature to detect libarchive, composefs

This avoids false negatives from `ostree --version | grep -q ...`
exiting with failure under `set -o pipefail` because `grep -q` can exit
as soon as it sees the desired string, leaving `ostree --version` to be
terminated by `SIGPIPE` next time it writes to stdout.

Signed-off-by: Simon McVittie <smcv@collabora.com>
21 months agotests: Generalize has_gpgme, has_sign_ed25519 into has_ostree_feature
Simon McVittie [Mon, 19 Feb 2024 15:57:51 +0000 (15:57 +0000)]
tests: Generalize has_gpgme, has_sign_ed25519 into has_ostree_feature

Signed-off-by: Simon McVittie <smcv@collabora.com>
21 months agoMerge pull request #3176 from travier/docs-dependabot-update
Eric Curtin [Mon, 19 Feb 2024 14:37:37 +0000 (14:37 +0000)]
Merge pull request #3176 from travier/docs-dependabot-update

workflow/docs: Update to actions/checkout@v4 & dependabot: Update github-actions weekly

21 months agoMerge pull request #3181 from ericcurtin/mention-rhivos
Colin Walters [Mon, 19 Feb 2024 14:36:58 +0000 (09:36 -0500)]
Merge pull request #3181 from ericcurtin/mention-rhivos

README: Add Red Hat In-Vehicle Operating System

21 months agoREADME: Add Red Hat In-Vehicle Operating System
Eric Curtin [Sat, 17 Feb 2024 17:12:19 +0000 (17:12 +0000)]
README: Add Red Hat In-Vehicle Operating System

RHIVOS is a derivative of CentOS Automotive Stream Distribution that
uses OSTree, it's closest Fedora derivative is Fedora IoT although it
was created as it's own distribution.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
22 months agoMerge pull request #3180 from teythoon/justus/long-key-ids
Colin Walters [Fri, 16 Feb 2024 17:10:09 +0000 (12:10 -0500)]
Merge pull request #3180 from teythoon/justus/long-key-ids

tests: Use long key IDs, I found another one

22 months agoMerge pull request #3179 from ericcurtin/additional-docs-dependancy
Colin Walters [Fri, 16 Feb 2024 16:12:03 +0000 (11:12 -0500)]
Merge pull request #3179 from ericcurtin/additional-docs-dependancy

docs: Add webrick dependancy for building site locally

22 months agotests: Use long key IDs
Justus Winter [Fri, 16 Feb 2024 15:23:49 +0000 (16:23 +0100)]
tests: Use long key IDs

Short key IDs are not secure, and may be rejected by OpenPGP
implementations.  See https://evil32.com/

Signed-off-by: Justus Winter <justus@sequoia-pgp.org>
22 months agoMerge pull request #3178 from teythoon/justus/long-key-ids
Colin Walters [Fri, 16 Feb 2024 14:06:27 +0000 (09:06 -0500)]
Merge pull request #3178 from teythoon/justus/long-key-ids

tests: Use long key IDs

22 months agodocs: Add webrick dependancy for building site locally
Eric Curtin [Fri, 16 Feb 2024 13:00:10 +0000 (13:00 +0000)]
docs: Add webrick dependancy for building site locally

This mimics the GitHub Pages environment so that you can build and serve
the site locally for testing. It requires webrick these days.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
22 months agotests: Use long key IDs
Justus Winter [Fri, 16 Feb 2024 12:33:21 +0000 (13:33 +0100)]
tests: Use long key IDs

Short key IDs are not secure, and may be rejected by OpenPGP
implementations.  See https://evil32.com/

Signed-off-by: Justus Winter <justus@sequoia-pgp.org>
22 months agodependabot: Update github-actions weekly
Timothée Ravier [Thu, 15 Feb 2024 15:20:33 +0000 (16:20 +0100)]
dependabot: Update github-actions weekly

22 months agoworkflow/docs: Update to actions/checkout@v4
Timothée Ravier [Thu, 15 Feb 2024 15:18:32 +0000 (16:18 +0100)]
workflow/docs: Update to actions/checkout@v4

22 months agoMerge pull request #3175 from cgwalters/rofiles-fuse-statx
Colin Walters [Thu, 15 Feb 2024 14:34:27 +0000 (09:34 -0500)]
Merge pull request #3175 from cgwalters/rofiles-fuse-statx

rofiles-fuse: Check fsverity flag for copyup

22 months agorofiles-fuse: Remove unused parameter
Colin Walters [Thu, 15 Feb 2024 13:07:40 +0000 (08:07 -0500)]
rofiles-fuse: Remove unused parameter

The logic simplified, so we don't need it anymore.

22 months agorofiles-fuse: Check fsverity flag for copyup
Colin Walters [Thu, 15 Feb 2024 01:33:17 +0000 (20:33 -0500)]
rofiles-fuse: Check fsverity flag for copyup

We need to do a copyup if fsverity is enabled.
Sadly to do this we can't just use ostree_break_hardlink
as is.

22 months agorofiles-fuse: Port to statx
Colin Walters [Thu, 15 Feb 2024 01:32:55 +0000 (20:32 -0500)]
rofiles-fuse: Port to statx

This allows us to query fsverity efficiently.

22 months agoMerge pull request #3172 from cgwalters/release
Colin Walters [Wed, 14 Feb 2024 00:27:25 +0000 (19:27 -0500)]
Merge pull request #3172 from cgwalters/release

Release 2024.3

22 months agoPost-release version bump
Colin Walters [Tue, 13 Feb 2024 17:46:49 +0000 (12:46 -0500)]
Post-release version bump

22 months agoRelease 2024.3
Colin Walters [Tue, 13 Feb 2024 17:46:07 +0000 (12:46 -0500)]
Release 2024.3

22 months agoMerge pull request #3173 from cgwalters/transient-root-really-transient
Colin Walters [Tue, 13 Feb 2024 22:25:26 +0000 (17:25 -0500)]
Merge pull request #3173 from cgwalters/transient-root-really-transient

prepare-root: Switch to a tmpfs for transient root

22 months agoprepare-root: Switch to a tmpfs for transient root
Colin Walters [Tue, 13 Feb 2024 20:41:35 +0000 (15:41 -0500)]
prepare-root: Switch to a tmpfs for transient root

We're debating this over in https://github.com/CentOS/centos-bootc-dev/pull/27
and I have come to the conclusion that having changes to `/`
persist across reboot by default was a bad idea.

- It conflicts with any kind of secure boot scenario
- Having things only go away on upgrades is in some ways even *more* surprising
- The term `transient` implies this

There may be a use case in the future for having something like `root.transient = persistent`,
but this is just a better default.

Signed-off-by: Colin Walters <walters@verbum.org>
22 months agoMerge pull request #3171 from ericcurtin/docs-alternate-rollbacks
Colin Walters [Tue, 13 Feb 2024 17:40:13 +0000 (12:40 -0500)]
Merge pull request #3171 from ericcurtin/docs-alternate-rollbacks

docs/atomic-rollbacks: Add a section on rollbacks

22 months agodocs/atomic-rollbacks: Add a section on rollbacks
Eric Curtin [Tue, 13 Feb 2024 10:39:20 +0000 (10:39 +0000)]
docs/atomic-rollbacks: Add a section on rollbacks

Describing how different types of rollbacks work.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
22 months agoMerge pull request #3170 from cgwalters/prepare-root-fix
Colin Walters [Tue, 13 Feb 2024 09:21:21 +0000 (04:21 -0500)]
Merge pull request #3170 from cgwalters/prepare-root-fix

 prepare-root: Unify root.transient with composefs

22 months agoMerge pull request #3168 from cgwalters/drop-tmpfiles-var
Colin Walters [Mon, 12 Feb 2024 23:33:30 +0000 (18:33 -0500)]
Merge pull request #3168 from cgwalters/drop-tmpfiles-var

Drop tmpfiles var

22 months agoprepare-root: Unify root.transient with composefs
Colin Walters [Mon, 12 Feb 2024 22:24:10 +0000 (17:24 -0500)]
prepare-root: Unify root.transient with composefs

First, I was totally wrong and composefs handles being passed
an upperdir itself, we don't need to stack overlayfs.

Next, there's really no reason to support `root.transient`
*without* a backing composefs.  The legacy ostree bind mount
and readonly `/usr` is just that - legacy.

Finally, we actually *must* do this to enable both composefs
and transient root, because the prepare-root flow assumes
that it just needs to `MS_MOVE` a *single* mount for the root,
not a stack.

22 months agoprepare-root: Add missing newline
Colin Walters [Mon, 12 Feb 2024 21:54:09 +0000 (16:54 -0500)]
prepare-root: Add missing newline

This is ugly in the output.

22 months agoMerge pull request #3169 from rborn-tx/support-older-linux-headers
Colin Walters [Mon, 12 Feb 2024 19:27:15 +0000 (14:27 -0500)]
Merge pull request #3169 from rborn-tx/support-older-linux-headers

Expose MOUNT_ATTR_IDMAP detection result to C code

22 months agodocs/var: Update for latest
Colin Walters [Mon, 12 Feb 2024 16:59:39 +0000 (11:59 -0500)]
docs/var: Update for latest

This reorients things here around the latest `VOLUME /var` approach.

22 months agoostree-tmpfiles.conf: Drop `var` entry
Colin Walters [Mon, 12 Feb 2024 16:50:50 +0000 (11:50 -0500)]
ostree-tmpfiles.conf: Drop `var` entry

We are backing away from this semantic, and moving towards
`/var` only being initialized at initial provisioning.

22 months agoconfigure: Expose MOUNT_ATTR_IDMAP detection result to C code
Rogerio Guerra Borin [Wed, 7 Feb 2024 03:19:45 +0000 (00:19 -0300)]
configure: Expose MOUNT_ATTR_IDMAP detection result to C code

This is to allow compiling composefs on machines having somewhat old
Linux kernel headers.

Signed-off-by: Rogerio Guerra Borin <rogerio.borin@toradex.com>
22 months agoMerge pull request #3167 from smcv/ostree-repo-config-typo
Colin Walters [Sun, 11 Feb 2024 18:49:33 +0000 (13:49 -0500)]
Merge pull request #3167 from smcv/ostree-repo-config-typo

ostree.repo-config(5): Fix a typo

22 months agoostree.repo-config(5): Fix a typo
Simon McVittie [Sun, 11 Feb 2024 15:56:53 +0000 (15:56 +0000)]
ostree.repo-config(5): Fix a typo

Signed-off-by: Simon McVittie <smcv@collabora.com>
22 months agoMerge pull request #3166 from cgwalters/var-again
Colin Walters [Sat, 10 Feb 2024 10:14:18 +0000 (05:14 -0500)]
Merge pull request #3166 from cgwalters/var-again

sysroot: Rework /var handling to act like Docker `VOLUME /var`

22 months agosysroot: Rework /var handling to act like Docker `VOLUME /var`
Colin Walters [Fri, 9 Feb 2024 19:44:43 +0000 (14:44 -0500)]
sysroot: Rework /var handling to act like Docker `VOLUME /var`

We've long struggled with semantics for `/var`.  Our stance of
"/var should start out empty and be managed by the OS" is a strict
one, that pushes things closer to the original systemd upstream
ideal of the "OS state is in /usr".

However...well, a few things.  First, we had some legacy bits
here which were always populating the deployment `/var`.  I don't
think we need that if systemd is in use, so detect if the tree
has `usr/lib/tmpfiles.d`, and don't create that stuff at
`ostree admin stateroot-init` time if so.

Building on that then, we have the stateroot `var` starting out
actually empty.

When we do a deployment, if the stateroot `var` is empty,
make a copy (reflink if possible of course) of the commit's `/var`
into it.

This matches the semantics that Docker created with volumes,
and this is sufficiently simple and easy to explain that I think
it's closer to the right thing to do.

Crucially...it's just really handy to have some pre-existing
directories in `/var` in container images, because Docker (and podman/kube/etc)
don't run systemd and hence don't run `tmpfiles.d` on startup.

I really hit on the fact that we need `/var/tmp` in our container
images by default for example.

So there's still some overlap here with e.g. `/usr/lib/tmpfiles.d/var.conf`
as shipped by systemd, but that's fine - they don't actually conflict
per se.

22 months agoMerge pull request #3165 from cgwalters/drop-ex-integrity
Colin Walters [Fri, 9 Feb 2024 14:57:21 +0000 (09:57 -0500)]
Merge pull request #3165 from cgwalters/drop-ex-integrity

deploy: Honor prepare-root.conf at deploy time for composefs

22 months agodeploy: Honor prepare-root.conf at deploy time
Colin Walters [Fri, 9 Feb 2024 00:35:37 +0000 (19:35 -0500)]
deploy: Honor prepare-root.conf at deploy time

I want to try to get away from the "repository global" configuration
in the repo config.

A major problem is that there's not an obvious way to configure
it as part of an ostree commit/container build - it needs
to be managed "out of band".

With this change, we parse the `usr/lib/ostree/prepare-root.conf`
in the deployment root, and if composefs is enabled there,
then we honor it.

We do still honor `ex-integrity.composefs` but that I think
we can schedule to remove.

22 months agoswitchroot: Move a define into library too
Colin Walters [Fri, 9 Feb 2024 00:35:17 +0000 (19:35 -0500)]
switchroot: Move a define into library too

22 months agoprepare-root: Fix crash if no keys were found
Colin Walters [Fri, 9 Feb 2024 00:34:54 +0000 (19:34 -0500)]
prepare-root: Fix crash if no keys were found

Handle a NULL pointer.

22 months agolib: Move parsing of composefs config into otcore
Colin Walters [Thu, 8 Feb 2024 23:09:11 +0000 (18:09 -0500)]
lib: Move parsing of composefs config into otcore

So it can be shared with the deployment path.  Prep for dropping
`ex-integrity.composefs`.

22 months agoMerge pull request #3151 from mvo5/selinux-labels-on-non-selinux-hosts
Colin Walters [Thu, 8 Feb 2024 21:46:22 +0000 (16:46 -0500)]
Merge pull request #3151 from mvo5/selinux-labels-on-non-selinux-hosts

libostree: write selinux xattr when on non-selinux systems

22 months agoMerge pull request #3160 from cgwalters/release
Colin Walters [Thu, 8 Feb 2024 19:39:26 +0000 (14:39 -0500)]
Merge pull request #3160 from cgwalters/release

Release

22 months agoconfigure: post-release version bump
Colin Walters [Wed, 7 Feb 2024 23:24:57 +0000 (18:24 -0500)]
configure: post-release version bump

22 months agoRelease 2024.2
Colin Walters [Wed, 7 Feb 2024 23:24:04 +0000 (18:24 -0500)]
Release 2024.2

22 months agoMerge pull request #3164 from cgwalters/prepare-root-device-inode
Colin Walters [Thu, 8 Feb 2024 18:10:06 +0000 (13:10 -0500)]
Merge pull request #3164 from cgwalters/prepare-root-device-inode

Track deployment root/inode from prepare root

22 months agoTrack deployment root/inode from prepare root
Colin Walters [Thu, 8 Feb 2024 15:13:57 +0000 (10:13 -0500)]
Track deployment root/inode from prepare root

When we added composefs, it broke the logic for detecting the booted
deployment which was previously a direct (device, inode) comparison.
So the code there started looking at `etc`.  However, that in
turns breaks with `etc.transient = true` enabled.

Fix all of this by tracking the real deployment directory's
(device,inode) that we found in `ostree-prepare-root`, and inject
it into the extensible metadata we have in `/run/ostree-booted`
which is designed exactly to pass state between the initramfs
and the real root.

Signed-off-by: Colin Walters <walters@verbum.org>
22 months agoci: Use `BOOTC_SKIP_SELINUX_HOST_CHECK`, test labeling of /etc
Colin Walters [Tue, 6 Feb 2024 22:52:34 +0000 (17:52 -0500)]
ci: Use `BOOTC_SKIP_SELINUX_HOST_CHECK`, test labeling of /etc

As we work to change ostree to set up the labels
for things even in a selinux-host-disabled case, let's test
it here.

22 months agolibostree: write selinux xattr when on non-selinux systems
Michael Vogt [Wed, 31 Jan 2024 17:02:24 +0000 (18:02 +0100)]
libostree: write selinux xattr when on non-selinux systems

Currently when writing data for selinux systems on a non-selinux
system there will be no labels. This is because
`ostree_sepolicy_setfscreatecon()` just returns TRUE on non-selinux
systems and xattr writing for `security.seliux` is filtered out.

This patches uses the suggestion of Colin Walters (thanks!) from
https://github.com/ostreedev/ostree/issues/2804 and detects if
the host has selinux enabled and if not just skips filtering the
xattrs for selinux.

22 months agoMerge pull request #3159 from cgwalters/revert-bootprefix
Eric Curtin [Wed, 7 Feb 2024 22:26:25 +0000 (23:26 +0100)]
Merge pull request #3159 from cgwalters/revert-bootprefix

Revert "Enable `sysroot.bootprefix` by default"

22 months agoRevert "Enable `sysroot.bootprefix` by default"
Colin Walters [Wed, 7 Feb 2024 20:43:11 +0000 (15:43 -0500)]
Revert "Enable `sysroot.bootprefix` by default"

This reverts commit 8627c8afa15fa0b2dc2dc261a217dd043a991a7d.

See discussion in https://github.com/ostreedev/ostree/pull/3156 ;
we think this breaks s390x in some cases at least, and that warrants
further investigation.

22 months agoMerge pull request #3156 from cgwalters/enable-bootprefix-default
Colin Walters [Tue, 6 Feb 2024 22:58:42 +0000 (17:58 -0500)]
Merge pull request #3156 from cgwalters/enable-bootprefix-default

Enable `sysroot.bootprefix` by default

22 months agoEnable `sysroot.bootprefix` by default
Colin Walters [Mon, 5 Feb 2024 19:14:27 +0000 (14:14 -0500)]
Enable `sysroot.bootprefix` by default

I've been testing this in various places and not seen any fallout,
so let's finally enable this by default and have the situation where
`/boot` is on the root `/` filesystem work out of the box.

22 months agoMerge pull request #3158 from jlebon/pr/main
Eric Curtin [Tue, 6 Feb 2024 21:18:28 +0000 (22:18 +0100)]
Merge pull request #3158 from jlebon/pr/main

admin/state-overlay: Require root and don't lock sysroot

22 months agogenerator: Restore graceful exit behaviour if `ostree` karg missing
Jonathan Lebon [Tue, 6 Feb 2024 19:42:32 +0000 (14:42 -0500)]
generator: Restore graceful exit behaviour if `ostree` karg missing

In CoreOS live environments, we do have `/run/ostree` but no `ostree=`
karg; we hackily fool `ostree-prepare-root.service` by bind-mounting
over `/proc/cmdline` so it does the right thing. Presumably, we should
clean this up eventually, but even so we don't want to require PXE users
to add an `ostree=` arg, so we need to tolerate this.

So this assertion would fail there. Restore the behaviour prior to
b9ce0e89 and re-add a more contemporary comment.

Fixes b9ce0e89 ("generator: Exit if there's no `/run/ostree`").

22 months agoMerge pull request #3157 from cgwalters/syslinux-bootprefix-fix
Colin Walters [Tue, 6 Feb 2024 15:44:07 +0000 (10:44 -0500)]
Merge pull request #3157 from cgwalters/syslinux-bootprefix-fix

syslinux: Avoid double `/boot` if bootprefix is enabled

22 months agoadmin/state-overlay: Require root and don't lock sysroot
Jonathan Lebon [Tue, 6 Feb 2024 15:27:34 +0000 (10:27 -0500)]
admin/state-overlay: Require root and don't lock sysroot

Not required for anything in particular, but it's good to use the right
flags here anyway.

22 months agosyslinux: Avoid double `/boot` if bootprefix is enabled
Colin Walters [Mon, 5 Feb 2024 20:01:40 +0000 (15:01 -0500)]
syslinux: Avoid double `/boot` if bootprefix is enabled

This backend always explicitly emitted a `/boot` - but if
the global `sysroot.bootprefix` is enabled, then we can rely
on the outer code doing it.

Luckily this was caught by the unit tests here failing when
enabling `sysroot.bootprefix` by default.

22 months agoMerge pull request #3150 from travier/grub2-15_ostree-atomic-desktops
Colin Walters [Thu, 1 Feb 2024 13:42:43 +0000 (08:42 -0500)]
Merge pull request #3150 from travier/grub2-15_ostree-atomic-desktops

grub2-15_ostree: Graceful exit if /etc/default/grub doesn't exist

22 months agoMerge pull request #3152 from cgwalters/ci-bootc
Colin Walters [Wed, 31 Jan 2024 20:44:51 +0000 (15:44 -0500)]
Merge pull request #3152 from cgwalters/ci-bootc

ci: Add a bootc/c9s workflow

22 months agoci: Add a bootc/c9s workflow
Colin Walters [Wed, 31 Jan 2024 18:46:25 +0000 (13:46 -0500)]
ci: Add a bootc/c9s workflow

This obsoletes the "just build" on c9s flow, and actually runs
though a bootc install, which exercises more of things.

22 months agogrub2-15_ostree: Fix whitespace
Timothée Ravier [Wed, 31 Jan 2024 14:41:54 +0000 (15:41 +0100)]
grub2-15_ostree: Fix whitespace

22 months agogrub2-15_ostree: Graceful exit if /etc/default/grub doesn't exist
Timothée Ravier [Wed, 31 Jan 2024 14:38:31 +0000 (15:38 +0100)]
grub2-15_ostree: Graceful exit if /etc/default/grub doesn't exist

With the new bootupd installation path in Anaconda, the
`/etc/default/grub` config file is not written anymore as we are only
using BLS configs with new enough bootloaders.

We thus don't need to generate (duplicated) legacy boot entries.

We still need to keep this logic in place in Atomic Desktops
(Silverblue, etc.) until we've actually landed bootupd there and forced
a bootloader update for everybody.

See: https://github.com/fedora-silverblue/issue-tracker/issues/530
See: https://github.com/fedora-silverblue/issue-tracker/issues/120
See: https://fedoraproject.org/wiki/Changes/FedoraSilverblueBootupd

22 months agoMerge pull request #3149 from alexlarsson/new-composefs-format
Colin Walters [Wed, 31 Jan 2024 13:27:19 +0000 (08:27 -0500)]
Merge pull request #3149 from alexlarsson/new-composefs-format

composefs: Bump composefs max version to 1

22 months agocomposefs: Bump composefs max version to 1
Alexander Larsson [Wed, 31 Jan 2024 11:01:36 +0000 (12:01 +0100)]
composefs: Bump composefs max version to 1

This generates the new format for whiteout markers which was added in
6.8 (and which will be backported to 6.7). Without this whiteouts
will not work anymore.

This is a slight format change, but will only affect ostree commits
that already were broken (i.e that had whiteouts), and since the
composefs code is still marked experimental I think it is fine to
do this without introducing another format version on the ostree
side.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
22 months agoUpdate submodule: composefs
Alexander Larsson [Wed, 31 Jan 2024 10:50:22 +0000 (11:50 +0100)]
Update submodule: composefs

This updates composefs to 1.0.3 which has support for the
new overlay nesting format.

22 months agoMerge pull request #3146 from ericcurtin/ot-admin-builtin-pin-booted-pending-rollback
Colin Walters [Mon, 29 Jan 2024 16:33:43 +0000 (11:33 -0500)]
Merge pull request #3146 from ericcurtin/ot-admin-builtin-pin-booted-pending-rollback

admin/pin: Add commands to pin booted, pending and rollbacks deployments

22 months agoadmin/pin: Add commands to pin booted, pending and rollback deployments
Eric Curtin [Wed, 24 Jan 2024 16:23:51 +0000 (16:23 +0000)]
admin/pin: Add commands to pin booted, pending and rollback deployments

Add new commands to pin the current, staged and previous deployment for
use in automation and scripting. Right now, it's difficult to pin the
current deployment without needing to look into the output of some other
tooling (like rpm-ostree) to get the index of each deployment. This
index also is not consistent - the current deployment could be 0 when
you first boot the system then 1 shortly after. This change makes it
easy to pin the current or future deployment.

Co-authored-by: Robert Sturla <robertsturla@outlook.com>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
22 months agoMerge pull request #3147 from cgwalters/generator-check-run-ostree
Colin Walters [Sat, 27 Jan 2024 16:10:31 +0000 (11:10 -0500)]
Merge pull request #3147 from cgwalters/generator-check-run-ostree

generator: Exit if there's no `/run/ostree`

22 months agogenerator: Exit if there's no `/run/ostree`
Colin Walters [Fri, 26 Jan 2024 23:10:37 +0000 (18:10 -0500)]
generator: Exit if there's no `/run/ostree`

Currently if run in a container image under systemd, we will
incorrectly synthesize a `var.mount` unit even if `ostree-prepare-root`
hasn't run.

The comment here said why we didn't do that before, but that's
for the really legacy embedded-only "ostree-prepare-root-static"
path, and even then I'm pretty sure it was wrong because
the generator here only runs in the *real* root, and we should
have `/run/ostree` at that point.

22 months agoMerge pull request #3145 from smcv/composefs-xattr
Eric Curtin [Thu, 25 Jan 2024 23:29:52 +0000 (23:29 +0000)]
Merge pull request #3145 from smcv/composefs-xattr

tests: Skip composefs test if /var/tmp does not support user xattrs

22 months agotests: Skip composefs test if /var/tmp does not support user xattrs
Simon McVittie [Wed, 24 Jan 2024 13:55:12 +0000 (13:55 +0000)]
tests: Skip composefs test if /var/tmp does not support user xattrs

Otherwise, this test fails on Debian 12 (Linux 6.1) kernels if /var/tmp
is a tmpfs. Some autobuilders put the entire build chroot on a tmpfs,
to speed up builds.

Signed-off-by: Simon McVittie <smcv@debian.org>
22 months agoMerge pull request #3143 from yummypeng/main
Colin Walters [Tue, 23 Jan 2024 02:05:44 +0000 (21:05 -0500)]
Merge pull request #3143 from yummypeng/main

deploy: Ignore sockets, fifos in /etc/<subdir> during merge

22 months agodeploy: Ignore sockets, fifos in /etc/<subdir> during merge
Yuanhong Peng [Mon, 22 Jan 2024 10:03:55 +0000 (18:03 +0800)]
deploy: Ignore sockets, fifos in /etc/<subdir> during merge

It's a followup of commit e6a560b40797324aa8b90e7100c6d50bff91f14d.
We should also ignore sockets and fifos in the subdir of /etc.

Signed-off-by: Yuanhong Peng <yummypeng@linux.alibaba.com>
22 months agoMerge pull request #3141 from cgwalters/release
Colin Walters [Sun, 21 Jan 2024 16:00:20 +0000 (11:00 -0500)]
Merge pull request #3141 from cgwalters/release

Release 2024.1

22 months agoconfigure: post-release version bump
Colin Walters [Fri, 19 Jan 2024 22:27:09 +0000 (17:27 -0500)]
configure: post-release version bump

22 months agoRelease 2024.1
Colin Walters [Fri, 19 Jan 2024 22:26:26 +0000 (17:26 -0500)]
Release 2024.1

23 months agoMerge pull request #3135 from ericcurtin/aboot-documentation
Colin Walters [Thu, 11 Jan 2024 16:57:22 +0000 (11:57 -0500)]
Merge pull request #3135 from ericcurtin/aboot-documentation

doc: Add section about ostree and aboot

23 months agoMerge pull request #3120 from jlebon/pr/state-overlays
Colin Walters [Thu, 11 Jan 2024 16:56:44 +0000 (11:56 -0500)]
Merge pull request #3120 from jlebon/pr/state-overlays

Add concept of state overlays

23 months agobuild(deps): bump libglnx from `aff1eea` to `b415d046`
Jonathan Lebon [Wed, 10 Jan 2024 18:17:06 +0000 (13:17 -0500)]
build(deps): bump libglnx from `aff1eea` to `b415d046`

Bumps libglnx from `aff1eea` to `b415d046`.

For https://gitlab.gnome.org/GNOME/libglnx/-/merge_requests/52.

Update submodule: libglnx

23 months agoAdd concept of state overlays
Jonathan Lebon [Thu, 14 Dec 2023 21:46:14 +0000 (16:46 -0500)]
Add concept of state overlays

In the OSTree model, executables go in `/usr`, state in `/var` and
configuration in `/etc`. Software that lives in `/opt` however messes
this up because it often mixes code *and* state, making it harder to
manage.

More generally, it's sometimes useful to have the OSTree commit contain
code under a certain path, but still allow that path to be writable by
software and the sysadmin at runtime (`/usr/local` is another instance).

Add the concept of state overlays. A state overlay is an overlayfs
mount whose upper directory, which contains unmanaged state, is carried
forward on top of a lower directory, containing OSTree-managed files.

In the example of `/usr/local`, OSTree commits can ship content there,
all while allowing users to e.g. add scripts in `/usr/local/bin` when
booted into that commit.

Some reconciliation logic is executed whenever the base is updated so
that newer files in the base are never shadowed by a copied up version
in the upper directory. This matches RPM semantics when upgrading
packages whose files may have been modified.

For ease of integration, this is exposed as a systemd template unit which
any downstream distro/user can enable. The instance name is the mountpath
in escaped systemd path notation (e.g.
`ostree-state-overlay@usr-local.service`).

See discussions in https://github.com/ostreedev/ostree/issues/3113 for
more details.

23 months agoMerge pull request #3136 from ericcurtin/pr-3134-feedback
Jonathan Lebon [Tue, 9 Jan 2024 16:40:58 +0000 (11:40 -0500)]
Merge pull request #3136 from ericcurtin/pr-3134-feedback

23 months agostatus: Rename query-booted to is-default
Eric Curtin [Tue, 9 Jan 2024 15:23:47 +0000 (15:23 +0000)]
status: Rename query-booted to is-default

This is a tool to check if we are booted as default or not, just a
rename before it becomes widely used. We also shortened the '-h' output
for this.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
23 months agoMerge pull request #3134 from ericcurtin/query-boot-real
Colin Walters [Mon, 8 Jan 2024 18:14:50 +0000 (13:14 -0500)]
Merge pull request #3134 from ericcurtin/query-boot-real

status: Introduce tool to quickly check if we are booted as default

23 months agoMerge pull request #3133 from cgwalters/boot-complete-rollback
Colin Walters [Mon, 8 Jan 2024 12:38:53 +0000 (07:38 -0500)]
Merge pull request #3133 from cgwalters/boot-complete-rollback

systemd/ostree-boot-complete: Start earlier

23 months agostatus: Fix --skip-signatures description
Eric Curtin [Fri, 5 Jan 2024 18:18:22 +0000 (18:18 +0000)]
status: Fix --skip-signatures description

It was a copy-paste of another description, rather than it's own.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
23 months agoman: Add ostree admin status man page CLI options.
Eric Curtin [Fri, 5 Jan 2024 17:08:43 +0000 (17:08 +0000)]
man: Add ostree admin status man page CLI options.

Document the various CLI options.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
23 months agostatus: Introduce tool to quickly check if we are booted as default
Eric Curtin [Fri, 5 Jan 2024 15:49:39 +0000 (15:49 +0000)]
status: Introduce tool to quickly check if we are booted as default

Generally in ostree based systems you would expect to boot into
deployment 0, in rollback conditions triggered by greenboot-related
rollbacks this might not be the case. This is a tool to detect this.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
23 months agodoc: Add section about ostree and aboot
Eric Curtin [Fri, 5 Jan 2024 17:32:44 +0000 (17:32 +0000)]
doc: Add section about ostree and aboot

Android Bootloader is a standard of how Android devices should implement
their bootloaders, we also use it in CentOS Automotive Stream
Distribution for some ARM boards. Here is some documentation on how
ostree works with this.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
23 months agoMerge pull request #3132 from ericcurtin/query-boot
Colin Walters [Fri, 5 Jan 2024 17:22:57 +0000 (12:22 -0500)]
Merge pull request #3132 from ericcurtin/query-boot

status: Fix build without GPGME

23 months agosystemd/ostree-boot-complete: Start earlier
Colin Walters [Fri, 5 Jan 2024 15:58:57 +0000 (10:58 -0500)]
systemd/ostree-boot-complete: Start earlier

Prep for changing this service to perform state computations
such as "is this boot the default, or did we get rolled back"
that can be used by higher level tools.

23 months agosystemd/ostree-boot-complete: Add `ConditionKernelCommandLine=ostree`
Colin Walters [Fri, 5 Jan 2024 15:57:16 +0000 (10:57 -0500)]
systemd/ostree-boot-complete: Add `ConditionKernelCommandLine=ostree`

In practice we don't enable this unit except via our generator,
but let's do this on general principle.

23 months agostatus: Fix build without GPGME
Eric Curtin [Fri, 5 Jan 2024 14:39:46 +0000 (14:39 +0000)]
status: Fix build without GPGME

If OSTREE_DISABLE_GPGME is not built in set remote to NULL.

The ostree_repo_signature_verify_commit_data path is irrelevant in the
no gpg case anyway. Having this set as NULL ensures an error gets
thrown early.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
23 months agoMerge pull request #3131 from cgwalters/status-use-remote
Eric Curtin [Fri, 5 Jan 2024 14:28:47 +0000 (14:28 +0000)]
Merge pull request #3131 from cgwalters/status-use-remote

status: Pass correct remote name when verifying