Commit Graph

7052 Commits

Author SHA1 Message Date
Nikita Dubrovskii
c3a9a64205 lib/bootloader-zipl: Check for Secure Boot before zipl 2023-11-06 14:35:47 +01:00
Jonathan Lebon
67ccf6e0a1
Merge pull request #3085 from cgwalters/s390x-units 2023-10-24 16:40:12 -04:00
Colin Walters
75c7e51a8b 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.
2023-10-24 10:40:51 -04:00
Colin Walters
cfb63b8942
Merge pull request #3083 from cgwalters/release
Release 2023.7
2023-10-20 10:56:55 -04:00
Colin Walters
36d96931dd configure: post-release version bump 2023-10-20 09:36:20 -04:00
Colin Walters
a87e90691e Release 2023.7 2023-10-20 09:36:20 -04:00
Colin Walters
98f1501cf5
Merge pull request #3081 from jlebon/pr/log-selinux-refresh
lib/deploy: Log SELinux policy refresh
2023-10-20 09:36:10 -04:00
Jonathan Lebon
bdac515ab5 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.
2023-10-19 11:41:10 -04:00
Colin Walters
4085eee9ed
Merge pull request #2843 from jmarrero/retry
ostree-fetcher-curl: handle non 404 errors as G_IO_ERROR_TIMED_OUT
2023-10-18 09:07:46 -04:00
Joseph Marrero
4fb6e6f5a9 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:
7c9af219ab/librepo/handle.h (L90)
7c9af219ab/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".
2023-10-17 21:00:37 -04:00
Colin Walters
b9e73a3813
Merge pull request #3078 from HuijingHei/karg-delete-array
karg-delete: support multiple times
2023-10-17 09:44:24 -04:00
HuijingHei
6716086250 doc: add ostree admin deploy option --karg-delete 2023-10-17 20:23:07 +08:00
HuijingHei
003cb99c32 karg-delete: support multiple times
Fix https://github.com/ostreedev/ostree/pull/2612#issuecomment-1764412141
2023-10-17 20:22:08 +08:00
Colin Walters
d788c5b5c9
Merge pull request #3075 from cgwalters/reenable-composefs
tests: Use ext4, re-enable composefs test
2023-10-16 10:24:10 -04:00
Joseph Marrero Corchado
5d92407ba9
Merge pull request #3077 from cgwalters/debug-finalization-lock
deploy: Remove lock when re-staging
2023-10-13 16:05:44 -04:00
Colin Walters
ac69c70750 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.
2023-10-13 13:45:04 -04:00
Colin Walters
833251cb0d tests: Use ext4, re-enable composefs test
Until the XFS fsverity stuff lands.
2023-10-13 12:00:05 -04:00
Joseph Marrero Corchado
824ac1af0f
Merge pull request #3074 from cgwalters/more-errcontext-composefs
composefs: Add more error prefixing
2023-10-12 14:52:36 -04:00
Joseph Marrero Corchado
e75c5c6e41
Merge pull request #3073 from cgwalters/context-no-stateroot
deploy: Improve error message for nonexistent stateroot
2023-10-12 14:49:28 -04:00
Colin Walters
4a3e43c751 composefs: Add more error prefixing
To help debug https://github.com/coreos/rpm-ostree/issues/4649
2023-10-12 13:30:38 -04:00
Colin Walters
265b7f9ecc 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.
2023-10-12 13:22:35 -04:00
Colin Walters
3894fe2ad6
Merge pull request #3062 from alexlarsson/transient-etc
Support transient /etc
2023-10-12 12:21:27 -04:00
Alexander Larsson
f617a341f3 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>
2023-10-12 17:03:22 +02:00
Colin Walters
cd0fc9f4f8
Merge pull request #3072 from alexlarsson/fix-whiteout-test
tests: Fix whiteout test
2023-10-12 10:25:40 -04:00
Colin Walters
334f53d7e3
Merge pull request #3063 from cgwalters/label-usretc-as-etc
repo: Add an option to label /usr/etc as /etc
2023-10-12 07:57:05 -04:00
Alexander Larsson
397a11762e 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.
2023-10-12 10:18:36 +02:00
Colin Walters
81c08746c6 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.
2023-10-11 13:25:08 -04:00
Jonathan Lebon
6cce2e2381
Merge pull request #3067 from cgwalters/ci-composefs 2023-10-11 12:03:39 -04:00
Colin Walters
734ea3ee37 ci: Disable composefs test for now
Need to change the framework to boot with an Ignition config
that switches to ext4 soon.
2023-10-11 09:16:45 -04:00
Colin Walters
2f76b03089 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.
2023-10-06 13:12:23 -04:00
Colin Walters
befd84436c
Merge pull request #3060 from owtaylor/export-hardlinks
When exporting, use hardlinks for duplicated files
2023-10-03 10:08:36 -04:00
Owen W. Taylor
3b2fd6e9ff 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
2023-09-29 13:45:29 -04:00
Colin Walters
8c25452c1e
Merge pull request #3049 from jlebon/pr/revert-virtiofs-hack
Revert "ci: Run cosa unprivileged"
2023-09-28 09:12:44 -04:00
Jonathan Lebon
2363de7100
Merge pull request #3059 from cgwalters/zipl-default-s390x 2023-09-28 08:18:16 -04:00
Jonathan Lebon
b8ce61ba7b Revert "ci: Run cosa unprivileged"
This reverts commit 2fe88f80fa.

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

https://github.com/coreos/coreos-assembler/pull/3625
2023-09-27 19:35:58 -04:00
Colin Walters
c4dcfbaecd
Merge pull request #3046 from ostreedev/dependabot/submodules/composefs-cca8be4
build(deps): bump composefs from `af86742` to `cca8be4`
2023-09-27 19:34:30 -04:00
Colin Walters
e3d93a8571 repo: Default bootloader to zipl on s390x
This will allow us to drop code like
87fc693c11/src/create_disk.sh (L503)
which is really just unnecessary since there aren't any other
bootloaders we care about on this architecture.
2023-09-27 18:10:15 -04:00
Joseph Marrero Corchado
ec7bc823eb
Merge pull request #3058 from cgwalters/doc-authenticated-repos
docs: Add authenticated-repos.md
2023-09-27 15:27:26 -04:00
Colin Walters
d4adb79539 docs: Add authenticated-repos.md
Document options for accessing repositories that require authentication.
2023-09-27 14:02:55 -04:00
Colin Walters
13be0786bb
Merge pull request #3021 from cgwalters/insttest-composefs-binding
tests: Add an integration test for composefs signatures
2023-09-21 19:50:05 -04:00
Colin Walters
46b7821d0c
Merge pull request #3053 from ericcurtin/add_overlay_and_erofs_to_initrd
boot/dracut: Add erofs and overlayfs kernel modules
2023-09-21 13:13:27 -04:00
Eric Curtin
cecb59dd53 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.
2023-09-21 12:03:07 -04:00
Colin Walters
372cbd7a64 tests: Add an integration test for composefs signatures
Ensure we have some automated test coverage for this.
2023-09-21 07:53:19 -04:00
Eric Curtin
cd606aa6fe
Merge pull request #3051 from cgwalters/rust-tests-update
rust/tests: Adjust for new ostree
2023-09-20 14:18:31 +01:00
Colin Walters
87c4367806
Merge pull request #3052 from cgwalters/switch-libglnx-source
gitmodules: Use github GNOME mirror
2023-09-20 08:48:17 -04:00
Colin Walters
01a847a2d1 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.
2023-09-20 07:58:44 -04:00
Colin Walters
e3291ccce9 tests: Rework detection of trivial-httpd
Because it's now at the toplevel.
2023-09-19 16:52:13 -04:00
Jonathan Lebon
878d601665
Merge pull request #3047 from ostreedev/dependabot/submodules/libglnx-aff1eea 2023-09-18 11:08:13 -04:00
dependabot[bot]
ff73bebc74
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>
2023-09-18 12:18:48 +00:00
dependabot[bot]
7916cfb68d
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](af86742579...cca8be4984)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 12:18:47 +00:00