ostree.git
2 years agocommit: Try reflinks for local commits by default
Colin Walters [Sat, 2 Dec 2023 20:48:12 +0000 (15:48 -0500)]
commit: Try reflinks for local commits by default

I think we originally used to do this, but at some point in a
code refactoring, this optimization got lost.

It's a quite important optimization for the case of writing content
generated by an external system into an ostree repository.

2 years agoMerge pull request #3107 from cgwalters/drop-userxattr-test
Colin Walters [Mon, 4 Dec 2023 18:14:07 +0000 (13:14 -0500)]
Merge pull request #3107 from cgwalters/drop-userxattr-test

tests: Drop bare-user on tmpfs negative test

2 years agotests: Drop bare-user on tmpfs negative test
Colin Walters [Sun, 3 Dec 2023 14:32:36 +0000 (09:32 -0500)]
tests: Drop bare-user on tmpfs negative test

As of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2daf18a7884dc03d5164ab9c7dc3f2ea70638469
the restriction is lifted, FINALLY.

2 years agoMerge pull request #3104 from cgwalters/s390x-target
Colin Walters [Fri, 1 Dec 2023 21:21:34 +0000 (16:21 -0500)]
Merge pull request #3104 from cgwalters/s390x-target

bootloader/zipl: Run in target deployment as container if needed

2 years agobootloader/zipl: Run in target deployment as container if needed
Colin Walters [Thu, 30 Nov 2023 23:16:33 +0000 (18:16 -0500)]
bootloader/zipl: Run in target deployment as container if needed

xref https://issues.redhat.com/browse/MGMT-16303

Basically the OCP Assisted installer has now grown code
to try to do OS updates offline post-install, and this means
we need to handle the case of running zipl from the target
root.

2 years agosysroot: Expose deployment runner outside of selinux
Colin Walters [Fri, 1 Dec 2023 20:05:40 +0000 (15:05 -0500)]
sysroot: Expose deployment runner outside of selinux

We will use it in e.g. s390x zipl backend.

2 years agoMerge pull request #3103 from cgwalters/tmpfiles-factory-var
Joseph Marrero Corchado [Fri, 1 Dec 2023 19:46:39 +0000 (14:46 -0500)]
Merge pull request #3103 from cgwalters/tmpfiles-factory-var

tmpfiles: Copy `/usr/share/factory/var` to `/var`

2 years agosysroot: Support specifying bwrap arguments
Colin Walters [Fri, 1 Dec 2023 13:14:15 +0000 (08:14 -0500)]
sysroot: Support specifying bwrap arguments

Prep for use with zipl.

2 years agosysroot: Expose deployment container executor internally
Colin Walters [Thu, 30 Nov 2023 16:12:55 +0000 (11:12 -0500)]
sysroot: Expose deployment container executor internally

Prep for using this for zipl.

2 years agotmpfiles: Copy `/usr/share/factory/var` to `/var`
Colin Walters [Thu, 30 Nov 2023 20:33:42 +0000 (15:33 -0500)]
tmpfiles: Copy `/usr/share/factory/var` to `/var`

This is a pattern we want to encourage.  It's honestly just
way simpler than what rpm-ostree is doing today in auto-synthesizing
individual tmpfiles.d snippets.

2 years agoMerge pull request #3102 from cgwalters/deploy-cleanup-run
Jonathan Lebon [Thu, 30 Nov 2023 22:34:29 +0000 (17:34 -0500)]
Merge pull request #3102 from cgwalters/deploy-cleanup-run

2 years agosysroot/deploy: Drop unnecessary g_ptr_array_free
Colin Walters [Thu, 30 Nov 2023 15:26:32 +0000 (10:26 -0500)]
sysroot/deploy: Drop unnecessary g_ptr_array_free

We can just reference the pdata, and autoptr the array.

2 years agodeploy: Use NULL terminated strv
Colin Walters [Thu, 30 Nov 2023 15:25:12 +0000 (10:25 -0500)]
deploy: Use NULL terminated strv

This makes the code simpler and avoids the need
to keep the string array and length in sync.  Prep for
further callers.

2 years agoMerge pull request #3100 from cgwalters/misc-finalization
Jonathan Lebon [Wed, 29 Nov 2023 19:10:22 +0000 (14:10 -0500)]
Merge pull request #3100 from cgwalters/misc-finalization

2 years agotests: Add a dedicated finalization test
Colin Walters [Mon, 27 Nov 2023 20:34:20 +0000 (15:34 -0500)]
tests: Add a dedicated finalization test

This one covers `admin lock-finalization --unlock`.

2 years agoMerge pull request #3101 from cgwalters/drop-redundant-includes
Joseph Marrero Corchado [Tue, 28 Nov 2023 02:28:43 +0000 (21:28 -0500)]
Merge pull request #3101 from cgwalters/drop-redundant-includes

main: Drop some redundant includes of `ot-main.h`

2 years agomain: Drop some redundant includes of `ot-main.h`
Colin Walters [Tue, 28 Nov 2023 01:08:43 +0000 (20:08 -0500)]
main: Drop some redundant includes of `ot-main.h`

When backporting a patch recently we hit a non-obvious
dependency on another fix for `ot-main.h` includes.  Clean
this up a bit by dropping the redundant includes.

2 years agoman: Two finalization fixes
Colin Walters [Mon, 27 Nov 2023 18:50:07 +0000 (13:50 -0500)]
man: Two finalization fixes

From PR review.

2 years agoMerge pull request #3090 from cgwalters/stabilize-locking
Colin Walters [Mon, 27 Nov 2023 18:48:59 +0000 (13:48 -0500)]
Merge pull request #3090 from cgwalters/stabilize-locking

sysroot: Stabilize deployment finalization, add API

2 years agosysroot: Stabilize deployment finalization, add API and CLI
Colin Walters [Wed, 8 Nov 2023 22:19:19 +0000 (17:19 -0500)]
sysroot: Stabilize deployment finalization, add API and CLI

It's about time we do this; deployment finalization locking
is a useful feature.  An absolutely key thing here is that
we've slowly been moving towards the deployments as the primary
"source of truth".

Specifically in bootc for example, we will GC container images
not referenced by a deployment.

This is then neecessary to support a "pull but don't apply automatically" model.

This stabilizes the existing `ostree admin deploy --lock-finalization`
CLI, and adds a new `ostree admin unlock-finalization`.

We still check the old lock file path, but there's a new boolean
value as part of the staged deployment data which is intended
to be the source of truth in the future.  At some point then we
can drop the rpm-ostree lockfile handling.

Closes: https://github.com/ostreedev/ostree/issues/3025
2 years agostatus: Add error prefix for gpg verification
Colin Walters [Mon, 27 Nov 2023 15:54:18 +0000 (10:54 -0500)]
status: Add error prefix for gpg verification

It's helpful to see which deployment has an error.

2 years agotests: Turn off gpg verification for dev builds
Colin Walters [Mon, 27 Nov 2023 15:59:04 +0000 (10:59 -0500)]
tests: Turn off gpg verification for dev builds

Right now `ostree admin status` errors out in this case, but
`rpm-ostree status` doesn't.  The former behavior is probably
more of a bug, work around it for now.

2 years agoMerge pull request #3099 from markmc/man-sysroot-readonly
Colin Walters [Mon, 27 Nov 2023 13:39:35 +0000 (08:39 -0500)]
Merge pull request #3099 from markmc/man-sysroot-readonly

man: improve sysroot.readonly docs

2 years agoman: improve sysroot.readonly docs
Mark McLoughlin [Fri, 24 Nov 2023 14:27:11 +0000 (14:27 +0000)]
man: improve sysroot.readonly docs

The explanation of sysroot.readonly is a little confusing - we say
that "everything else is mounted read-only" but it's perhaps clearer
to say /sysroot is mounted read-only.

Also note that read-only is the default with composefs.

Finally, document the option in ostree.repo-config even though it is
now considered legacy - as of commit 22b8e4f9 (#2930) - it is still
commonly seen in repo configs, so users will look to understand
what it means.

2 years agoMerge pull request #3098 from jlebon/pr/abort-concurrent
Jonathan Lebon [Tue, 21 Nov 2023 22:18:17 +0000 (17:18 -0500)]
Merge pull request #3098 from jlebon/pr/abort-concurrent

2 years agoci: cancel previous build on PR update
Jonathan Lebon [Tue, 21 Nov 2023 20:31:38 +0000 (15:31 -0500)]
ci: cancel previous build on PR update

This is an easy way to save CI resources; when a PR is updated, abort
any previous build for that PR to focus on testing the latest push.

2 years agoMerge pull request #3097 from cgwalters/symbol-cleanups
Colin Walters [Tue, 21 Nov 2023 13:34:32 +0000 (08:34 -0500)]
Merge pull request #3097 from cgwalters/symbol-cleanups

Symbol cleanups

2 years agolib: Don't hardcode year in sample symver section
Colin Walters [Mon, 20 Nov 2023 14:47:40 +0000 (09:47 -0500)]
lib: Don't hardcode year in sample symver section

The 2021 was misleading.

2 years agodevel: Fix symbol versioning number
Colin Walters [Mon, 20 Nov 2023 14:45:39 +0000 (09:45 -0500)]
devel: Fix symbol versioning number

The .11 was wrong.

2 years agoMerge pull request #3095 from alexlarsson/fix-post-copy-symlinks
Colin Walters [Tue, 14 Nov 2023 22:40:08 +0000 (17:40 -0500)]
Merge pull request #3095 from alexlarsson/fix-post-copy-symlinks

Fix admin post-copy handling of symlinks

2 years agoFix admin post-copy handling of symlinks
Alexander Larsson [Tue, 14 Nov 2023 21:36:58 +0000 (22:36 +0100)]
Fix admin post-copy handling of symlinks

The code to enable fs-verity on an object file was failing with ENOENT
for symlink objects.

2 years agoMerge pull request #3094 from alexlarsson/admin-deploy-post-copy
Colin Walters [Tue, 14 Nov 2023 14:01:41 +0000 (09:01 -0500)]
Merge pull request #3094 from alexlarsson/admin-deploy-post-copy

Add `ostree admin post-copy` command

2 years agoAdd `ostree admin post-copy` command
Alexander Larsson [Mon, 13 Nov 2023 16:33:57 +0000 (17:33 +0100)]
Add `ostree admin post-copy` command

This command will apply fs-verity on all objects that need it and
needs to be called when an ostree deployment has been copied on a
file-by-file basis, which would loose information such as fs-verity.

This is needed by osbuild which works by creating the final image in a
rootfs, and then separately copying that rootfs file-by-file to a
loopback mounted filesystem image.

2 years agoMerge pull request #3091 from cgwalters/fix-soup3
Eric Curtin [Fri, 10 Nov 2023 16:39:13 +0000 (16:39 +0000)]
Merge pull request #3091 from cgwalters/fix-soup3

build-sys: Enable libsoup3 by default if installed

2 years agounlock: Don't pass options again to overlayfs
Colin Walters [Fri, 10 Nov 2023 01:53:52 +0000 (20:53 -0500)]
unlock: Don't pass options again to overlayfs

There seems to be a tricky regression here with the util-linux
support for the new mount API, plus overlays support for it.

```
[2023-11-09T21:05:30.633Z] Nov 09 21:05:26 qemu0 kola-runext-unlock-transient.sh[2108]: + unshare -m -- /bin/sh -c 'mount -o remount,rw /usr && echo hello from transient unlock >/usr/share/writable-usr-test'
[2023-11-09T21:05:30.633Z] Nov 09 21:05:26 qemu0 kola-runext-unlock-transient.sh[2148]: mount: /usr: mount point not mounted or bad option.
[2023-11-09T21:05:30.633Z] Nov 09 21:05:26 qemu0 kola-runext-unlock-transient.sh[2148]:        dmesg(1) may have more information after failed mount system call.
```

OK this seems related to the new mount API support in util-linux and overlayfs.  From a strace:

```
2095  open_tree(AT_FDCWD, "/usr", OPEN_TREE_CLOEXEC) = 3
2095  mount_setattr(-1, NULL, 0, NULL, 0) = -1 EINVAL (Invalid argument)
...
2095  fspick(3, "", FSPICK_NO_AUTOMOUNT|FSPICK_EMPTY_PATH) = 4
2095  fsconfig(4, FSCONFIG_SET_FLAG, "seclabel", NULL, 0) = 0
2095  fsconfig(4, FSCONFIG_SET_STRING, "lowerdir", "usr", 0) = -1 EINVAL (Invalid argument)
```

I think the core problem here is it's trying to reconfigure the mount with existing options,
but in the new mount namespace we can't see the lowerdir.

Here we really really just want to remount writable.  Telling
util-linux to not pass existing options fixes it.

2 years agoMerge pull request #3093 from cgwalters/rust-alias-stateroot
Colin Walters [Thu, 9 Nov 2023 20:21:47 +0000 (15:21 -0500)]
Merge pull request #3093 from cgwalters/rust-alias-stateroot

rust: Add a `stateroot()` alias in the Rust bindings

2 years agotests: Work around systemd regression for boot id parsing
Colin Walters [Thu, 9 Nov 2023 19:08:41 +0000 (14:08 -0500)]
tests: Work around systemd regression for boot id parsing

cc https://github.com/systemd/systemd/issues/29275

2 years agorust: Add a `stateroot()` alias in the Rust bindings
Colin Walters [Thu, 9 Nov 2023 19:53:53 +0000 (14:53 -0500)]
rust: Add a `stateroot()` alias in the Rust bindings

Easy to do here, super annoying in C.

2 years agobuild-sys: Enable libsoup3 by default if installed
Colin Walters [Thu, 9 Nov 2023 00:58:27 +0000 (19:58 -0500)]
build-sys: Enable libsoup3 by default if installed

In f39 we switched to libsoup3 by default; this ensures our CI
picks that up automatically so we still have ostree-trivial-httpd.

2 years agoMerge pull request #3089 from cgwalters/fix-undeploy-parsing
Colin Walters [Thu, 9 Nov 2023 00:59:31 +0000 (19:59 -0500)]
Merge pull request #3089 from cgwalters/fix-undeploy-parsing

undeploy: Parse integer more properly

2 years agoundeploy: Parse integer more properly
Colin Walters [Wed, 8 Nov 2023 21:15:01 +0000 (16:15 -0500)]
undeploy: Parse integer more properly

`atoi` doesn't offer any error checking.

Closes: https://github.com/ostreedev/ostree/issues/3088
2 years agoMerge pull request #3080 from nikita-dubrovskii/s390x_secure_boot
Colin Walters [Tue, 7 Nov 2023 21:42:07 +0000 (16:42 -0500)]
Merge pull request #3080 from nikita-dubrovskii/s390x_secure_boot

lib/bootloader-zipl: Check for Secure Boot before zipl

2 years agolib/bootloader-zipl: Check for Secure Boot before zipl
Nikita Dubrovskii [Tue, 17 Oct 2023 14:10:34 +0000 (16:10 +0200)]
lib/bootloader-zipl: Check for Secure Boot before zipl

2 years agoMerge pull request #3085 from cgwalters/s390x-units
Jonathan Lebon [Tue, 24 Oct 2023 20:40:12 +0000 (16:40 -0400)]
Merge pull request #3085 from cgwalters/s390x-units

2 years agobootloader/zipl: No-op if run as non-root
Colin Walters [Tue, 24 Oct 2023 14:40:51 +0000 (10:40 -0400)]
bootloader/zipl: No-op if run as non-root

Closes: https://github.com/ostreedev/ostree/issues/3084
Not the most elegant fix but should get the job done.

2 years agoMerge pull request #3083 from cgwalters/release
Colin Walters [Fri, 20 Oct 2023 14:56:55 +0000 (10:56 -0400)]
Merge pull request #3083 from cgwalters/release

Release 2023.7

2 years agoconfigure: post-release version bump
Colin Walters [Fri, 20 Oct 2023 13:26:09 +0000 (09:26 -0400)]
configure: post-release version bump

2 years agoRelease 2023.7
Colin Walters [Fri, 20 Oct 2023 13:24:56 +0000 (09:24 -0400)]
Release 2023.7

2 years agoMerge pull request #3081 from jlebon/pr/log-selinux-refresh
Colin Walters [Fri, 20 Oct 2023 13:36:10 +0000 (09:36 -0400)]
Merge pull request #3081 from jlebon/pr/log-selinux-refresh

lib/deploy: Log SELinux policy refresh

2 years agolib/deploy: Log SELinux policy refresh
Jonathan Lebon [Thu, 19 Oct 2023 15:35:25 +0000 (11:35 -0400)]
lib/deploy: Log SELinux policy refresh

I have a suspicion that the `semodule -N --refresh` we do here is
involved in https://github.com/coreos/fedora-coreos-tracker/issues/1597.
Let's log when we execute it and include its time.

While we're here, also log the time it takes to `syncfs()` and the
fsfreeze/thaw cycling. It's logged in a structured journal entry, but
that's less accessible than just having it in the journal message field.

2 years agoMerge pull request #2843 from jmarrero/retry
Colin Walters [Wed, 18 Oct 2023 13:07:46 +0000 (09:07 -0400)]
Merge pull request #2843 from jmarrero/retry

ostree-fetcher-curl: handle non 404 errors as G_IO_ERROR_TIMED_OUT

2 years agoostree-repo-pull: add options to configure retry behavior
Joseph Marrero [Mon, 3 Apr 2023 23:04:57 +0000 (19:04 -0400)]
ostree-repo-pull: add options to configure retry behavior

This introduces the "retry-all-network-errors" option which
is enabled by default. This is a behavior change as now
ostree will retry on requests that fail except when
they fail with NOT_FOUND. It also introduces the options
"low-speed-limit-bytes" and "low-speed-time-seconds these"
map to CURL options only at the moment. Which have defaults
set following librepo:
https://github.com/rpm-software-management/librepo/blob/7c9af219abd49f8961542b7622fc82cfdaa572e3/librepo/handle.h#L90
https://github.com/rpm-software-management/librepo/blob/7c9af219abd49f8961542b7622fc82cfdaa572e3/librepo/handle.h#L96
Currently these changes only apply when using libcurl.
Finally this change adds a final option that affects all
backends to control the max amount of connections of the
fetcher "max-outstanding-fetcher-requests".

2 years agoMerge pull request #3078 from HuijingHei/karg-delete-array
Colin Walters [Tue, 17 Oct 2023 13:44:24 +0000 (09:44 -0400)]
Merge pull request #3078 from HuijingHei/karg-delete-array

karg-delete: support multiple times

2 years agodoc: add `ostree admin deploy` option `--karg-delete`
HuijingHei [Tue, 17 Oct 2023 12:23:07 +0000 (20:23 +0800)]
doc: add `ostree admin deploy` option `--karg-delete`

2 years agokarg-delete: support multiple times
HuijingHei [Mon, 16 Oct 2023 02:56:59 +0000 (10:56 +0800)]
karg-delete: support multiple times

Fix https://github.com/ostreedev/ostree/pull/2612#issuecomment-1764412141

2 years agoMerge pull request #3075 from cgwalters/reenable-composefs
Colin Walters [Mon, 16 Oct 2023 14:24:10 +0000 (10:24 -0400)]
Merge pull request #3075 from cgwalters/reenable-composefs

tests: Use ext4, re-enable composefs test

2 years agoMerge pull request #3077 from cgwalters/debug-finalization-lock
Joseph Marrero Corchado [Fri, 13 Oct 2023 20:05:44 +0000 (16:05 -0400)]
Merge pull request #3077 from cgwalters/debug-finalization-lock

deploy: Remove lock when re-staging

2 years agodeploy: Remove lock when re-staging
Colin Walters [Fri, 13 Oct 2023 17:45:04 +0000 (13:45 -0400)]
deploy: Remove lock when re-staging

This closes the biggest foot-gun when doing e.g.
`rpm-ostree rebase` when zincati is running on a FCOS system.

Previously if zincati happened to have staged + locked a deployment,
we'd keep around the lock which is definitely not what is desired.

2 years agotests: Use ext4, re-enable composefs test
Colin Walters [Thu, 12 Oct 2023 22:24:00 +0000 (18:24 -0400)]
tests: Use ext4, re-enable composefs test

Until the XFS fsverity stuff lands.

2 years agoMerge pull request #3074 from cgwalters/more-errcontext-composefs
Joseph Marrero Corchado [Thu, 12 Oct 2023 18:52:36 +0000 (14:52 -0400)]
Merge pull request #3074 from cgwalters/more-errcontext-composefs

composefs: Add more error prefixing

2 years agoMerge pull request #3073 from cgwalters/context-no-stateroot
Joseph Marrero Corchado [Thu, 12 Oct 2023 18:49:28 +0000 (14:49 -0400)]
Merge pull request #3073 from cgwalters/context-no-stateroot

deploy: Improve error message for nonexistent stateroot

2 years agocomposefs: Add more error prefixing
Colin Walters [Thu, 12 Oct 2023 17:30:38 +0000 (13:30 -0400)]
composefs: Add more error prefixing

To help debug https://github.com/coreos/rpm-ostree/issues/4649

2 years agodeploy: Improve error message for nonexistent stateroot
Colin Walters [Thu, 12 Oct 2023 17:22:00 +0000 (13:22 -0400)]
deploy: Improve error message for nonexistent stateroot

Came up on an internal chat; previously we were only erroring
out when trying to do the SELinux labeling for `/var` which
was really misleading.

Add some other error prefixing while we have the patient open.

2 years agoMerge pull request #3062 from alexlarsson/transient-etc
Colin Walters [Thu, 12 Oct 2023 16:21:27 +0000 (12:21 -0400)]
Merge pull request #3062 from alexlarsson/transient-etc

Support transient /etc

2 years agoSupport transient /etc
Alexander Larsson [Fri, 29 Sep 2023 11:37:22 +0000 (13:37 +0200)]
Support transient /etc

If the `prepare-root.conf` file contains:
```
[etc]
transient=yes
```

Then during prepare-root, an overlayfs is mounted as /etc, with the
upper dir being in /run. If composefs is used, the lower dir is
`usr/etc` from the composefs image , or it is the deployed
`$deploydir/usr/etc`.

Note that for this to work with selinux, the commit must have been
built with OSTREE_REPO_COMMIT_MODIFIER_FLAGS_USRETC_AS_ETC. Otherwise
the lowerdir (/usr/etc) will have the wrong selinux contexts for the
final location of the mount (/etc).

We also set the transient-etc key in the ostree-booted file, pointing it
to the directory that is used for the overlayfs.

There are some additional work happening in ostree-remount, mostly
related to selinux (as this needs to happen post selinux policy
load):

 * Recent versions of selinux-poliy have issues with the overlayfs
   mount being kernel_t, and that is not allowed to manage files as
   needed. This is fixed in
   https://github.com/fedora-selinux/selinux-policy/pull/1893

 * Any /etc files created in the initramfs will not be labeled,
   because the selinux policy has not been loaded. In addition, the
   upper dir is on a tmpfs, and any manually set xattr-based selinux
   labels on those are reset during policy load. To work around this
   ostree-remount will relabel all files on /etc that have
   corresponding files in overlayfs upper dir.

 * During early boot, systemd mounts /run/machine-id on top of
   /etc/machine-id (as /etc is readonly). Later during boot, when etc
   is readwrite, systemd-machine-id-commit.service will remove the
   mount and update the real file under it with the right content. To
   ensure that this keeps working, we need to ensure that when we
   relabel /etc/machine-id we relabel the real (covered) file, not the
   temporary bind-mount.

 * ostree-remount no longer needs to remount /etc read-only in the
   transient-etc case.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2 years agoMerge pull request #3072 from alexlarsson/fix-whiteout-test
Colin Walters [Thu, 12 Oct 2023 14:25:40 +0000 (10:25 -0400)]
Merge pull request #3072 from alexlarsson/fix-whiteout-test

tests: Fix whiteout test

2 years agoMerge pull request #3063 from cgwalters/label-usretc-as-etc
Colin Walters [Thu, 12 Oct 2023 11:57:05 +0000 (07:57 -0400)]
Merge pull request #3063 from cgwalters/label-usretc-as-etc

repo: Add an option to label /usr/etc as /etc

2 years agotests: Fix whiteout test
Alexander Larsson [Thu, 12 Oct 2023 08:18:36 +0000 (10:18 +0200)]
tests: Fix whiteout test

This test was always skipped, because the check:

 if touch overlay/baz/.wh.cow &&
    touch overlay/.wh.deeper &&
    touch overlay/baz/another/.wh..wh..opq; then

always fails due to the missing overlay/baz/another directory.
Fix by creating the directory.

2 years agorepo: Add an option to label /usr/etc as /etc
Colin Walters [Mon, 2 Oct 2023 15:05:31 +0000 (11:05 -0400)]
repo: Add an option to label /usr/etc as /etc

This will be very useful for enabling a "transient /etc" option
because we won't have to do hacks relabling in the initramfs, or
forcing it on just for composefs.

2 years agoMerge pull request #3067 from cgwalters/ci-composefs
Jonathan Lebon [Wed, 11 Oct 2023 16:03:39 +0000 (12:03 -0400)]
Merge pull request #3067 from cgwalters/ci-composefs

2 years agoci: Disable composefs test for now
Colin Walters [Wed, 11 Oct 2023 12:15:25 +0000 (08:15 -0400)]
ci: Disable composefs test for now

Need to change the framework to boot with an Ignition config
that switches to ext4 soon.

2 years agoci: Ensure composefs+openssl are is enabled on Fedora
Colin Walters [Thu, 5 Oct 2023 23:54:54 +0000 (19:54 -0400)]
ci: Ensure composefs+openssl are is enabled on Fedora

For some reason we're not picking this up in the Prow build,
which breaks things because now rpm-ostree hard requires it.

Let's make this a fatal build time error for more clear
debugging.

2 years agoMerge pull request #3060 from owtaylor/export-hardlinks
Colin Walters [Tue, 3 Oct 2023 14:08:36 +0000 (10:08 -0400)]
Merge pull request #3060 from owtaylor/export-hardlinks

When exporting, use hardlinks for duplicated files

2 years agoWhen exporting, use hardlinks for duplicated files
Owen W. Taylor [Fri, 29 Sep 2023 16:09:04 +0000 (12:09 -0400)]
When exporting, use hardlinks for duplicated files

For ostree_repo_export_tree_to_archive(), and 'ostree export', when the
exported tree contains multiple files with the same checksum, write an
archive with hard links.

Without this, importing a tree, then exporting it again breaks
hardlinks.

As an example of savings: this reduces the (compressed) size of the
Fedora Flatpak Runtime image from 1345MiB to 712MiB.

Resolves: #2925

2 years agoMerge pull request #3049 from jlebon/pr/revert-virtiofs-hack
Colin Walters [Thu, 28 Sep 2023 13:12:44 +0000 (09:12 -0400)]
Merge pull request #3049 from jlebon/pr/revert-virtiofs-hack

Revert "ci: Run cosa unprivileged"

2 years agoMerge pull request #3059 from cgwalters/zipl-default-s390x
Jonathan Lebon [Thu, 28 Sep 2023 12:18:16 +0000 (08:18 -0400)]
Merge pull request #3059 from cgwalters/zipl-default-s390x

2 years agoRevert "ci: Run cosa unprivileged"
Jonathan Lebon [Tue, 19 Sep 2023 18:41:36 +0000 (14:41 -0400)]
Revert "ci: Run cosa unprivileged"

This reverts commit 2fe88f80fae83e206f811003a072c73ceebcea59.

This shouldn't be necessary now with the workaround built in cosa:

https://github.com/coreos/coreos-assembler/pull/3625

2 years agoMerge pull request #3046 from ostreedev/dependabot/submodules/composefs-cca8be4
Colin Walters [Wed, 27 Sep 2023 23:34:30 +0000 (19:34 -0400)]
Merge pull request #3046 from ostreedev/dependabot/submodules/composefs-cca8be4

build(deps): bump composefs from `af86742` to `cca8be4`

2 years agorepo: Default bootloader to zipl on s390x
Colin Walters [Wed, 27 Sep 2023 15:41:55 +0000 (11:41 -0400)]
repo: Default bootloader to zipl on s390x

This will allow us to drop code like
https://github.com/coreos/coreos-assembler/blob/87fc693c115eae1e7ff0e1621ce26c9167af6e84/src/create_disk.sh#L503
which is really just unnecessary since there aren't any other
bootloaders we care about on this architecture.

2 years agoMerge pull request #3058 from cgwalters/doc-authenticated-repos
Joseph Marrero Corchado [Wed, 27 Sep 2023 19:27:26 +0000 (15:27 -0400)]
Merge pull request #3058 from cgwalters/doc-authenticated-repos

docs: Add authenticated-repos.md

2 years agodocs: Add authenticated-repos.md
Colin Walters [Wed, 27 Sep 2023 18:02:25 +0000 (14:02 -0400)]
docs: Add authenticated-repos.md

Document options for accessing repositories that require authentication.

2 years agoMerge pull request #3021 from cgwalters/insttest-composefs-binding
Colin Walters [Thu, 21 Sep 2023 23:50:05 +0000 (19:50 -0400)]
Merge pull request #3021 from cgwalters/insttest-composefs-binding

tests: Add an integration test for composefs signatures

2 years agoMerge pull request #3053 from ericcurtin/add_overlay_and_erofs_to_initrd
Colin Walters [Thu, 21 Sep 2023 17:13:27 +0000 (13:13 -0400)]
Merge pull request #3053 from ericcurtin/add_overlay_and_erofs_to_initrd

boot/dracut: Add erofs and overlayfs kernel modules

2 years agoboot/dracut: Add erofs and overlayfs kernel modules
Eric Curtin [Tue, 19 Sep 2023 13:32:10 +0000 (14:32 +0100)]
boot/dracut: Add erofs and overlayfs kernel modules

These kernel modules are required for composefs usage in the initramfs.

The composefs use-case as of today uses an overlayfs on top of EROFS.

2 years agotests: Add an integration test for composefs signatures
Colin Walters [Tue, 29 Aug 2023 18:51:38 +0000 (14:51 -0400)]
tests: Add an integration test for composefs signatures

Ensure we have some automated test coverage for this.

2 years agoMerge pull request #3051 from cgwalters/rust-tests-update
Eric Curtin [Wed, 20 Sep 2023 13:18:31 +0000 (14:18 +0100)]
Merge pull request #3051 from cgwalters/rust-tests-update

rust/tests: Adjust for new ostree

2 years agoMerge pull request #3052 from cgwalters/switch-libglnx-source
Colin Walters [Wed, 20 Sep 2023 12:48:17 +0000 (08:48 -0400)]
Merge pull request #3052 from cgwalters/switch-libglnx-source

gitmodules: Use github GNOME mirror

2 years agogitmodules: Use github GNOME mirror
Colin Walters [Wed, 20 Sep 2023 11:58:44 +0000 (07:58 -0400)]
gitmodules: Use github GNOME mirror

gitlab.gnome.org is down right now, but it's been somewhat
flaky in the past.  Our CI uptime becomes an *intersection*
of all systems it depends on, and by cutting out gitlab.gnome.org
we increase its reliability.

2 years agotests: Rework detection of trivial-httpd
Colin Walters [Tue, 19 Sep 2023 19:25:36 +0000 (15:25 -0400)]
tests: Rework detection of trivial-httpd

Because it's now at the toplevel.

2 years agoMerge pull request #3047 from ostreedev/dependabot/submodules/libglnx-aff1eea
Jonathan Lebon [Mon, 18 Sep 2023 15:08:13 +0000 (11:08 -0400)]
Merge pull request #3047 from ostreedev/dependabot/submodules/libglnx-aff1eea

2 years agobuild(deps): bump libglnx from `54ad67d` to `aff1eea`
dependabot[bot] [Mon, 18 Sep 2023 12:18:48 +0000 (12:18 +0000)]
build(deps): bump libglnx from `54ad67d` to `aff1eea`

Bumps libglnx from `54ad67d` to `aff1eea`.

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump composefs from `af86742` to `cca8be4`
dependabot[bot] [Mon, 18 Sep 2023 12:18:47 +0000 (12:18 +0000)]
build(deps): bump composefs from `af86742` to `cca8be4`

Bumps [composefs](https://github.com/containers/composefs) from `af86742` to `cca8be4`.
- [Release notes](https://github.com/containers/composefs/releases)
- [Commits](https://github.com/containers/composefs/compare/af867425799db92c92d35feb51d2c957f3e16ac7...cca8be49843385ce556fccf51f75821f70fb7769)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoMerge pull request #3039 from cgwalters/rust-switch-include
Jonathan Lebon [Tue, 12 Sep 2023 13:10:11 +0000 (09:10 -0400)]
Merge pull request #3039 from cgwalters/rust-switch-include

2 years agorust: Switch to using `include`
Colin Walters [Fri, 8 Sep 2023 11:50:37 +0000 (07:50 -0400)]
rust: Switch to using `include`

This way we don't randomly pick up bits from the C library
unintentionally as things change on that side.

I think the support for `!` in `include` may be relatively new
and that's why the original author here chose to do things
via `exclude`.  But using `include` with a few specific exclusions
is just way better.

2 years agoMerge pull request #2054 from jlebon/pr/static-delta-fetch-no-scan
Colin Walters [Mon, 11 Sep 2023 13:41:13 +0000 (09:41 -0400)]
Merge pull request #2054 from jlebon/pr/static-delta-fetch-no-scan

lib/pull: Don't scan commit objects we fetch via deltas

2 years agolib/pull: Drop static delta superblocks references
Jonathan Lebon [Mon, 11 Sep 2023 02:14:39 +0000 (22:14 -0400)]
lib/pull: Drop static delta superblocks references

We don't need them long-lived anymore. They were just used for reporting
at this point, but we can use the new `static_delta_targets` hash table
size for that now.

2 years agoci: Run cosa unprivileged
Jonathan Lebon [Sat, 9 Sep 2023 00:40:07 +0000 (20:40 -0400)]
ci: Run cosa unprivileged

As a workaround for a virtiofs bug:
https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/197

xref coreos/coreos-assembler#3428 (comment)

Just like in https://github.com/coreos/rpm-ostree/pull/4585.

2 years agolib/pull: Don't scan commit objects we fetch via deltas
Jonathan Lebon [Fri, 8 Sep 2023 20:54:29 +0000 (16:54 -0400)]
lib/pull: Don't scan commit objects we fetch via deltas

When we're fetching a commit via static delta, we already take care of
fetching the full commit, so there's no need to also scan it using the
regular object workflow.

Closes: #2053
2 years agolib/pull: Fix miscounting of missing metadata
Jonathan Lebon [Fri, 8 Sep 2023 20:50:47 +0000 (16:50 -0400)]
lib/pull: Fix miscounting of missing metadata

If e.g. detached metadata or a parent commit is missing, we
don't consider it an error but we erroneously still increment the
`n_fetched_metadata` counter, causing it to be higher than it should.

This will implicitly be tested by a test added in the next patch.

2 years agoapp/pull-local: Add `--disable-static-delta`
Jonathan Lebon [Fri, 8 Sep 2023 19:05:37 +0000 (15:05 -0400)]
app/pull-local: Add `--disable-static-delta`

For completeness with `pull`.

Prep for using it in testing to assert we'll never use static deltas.