Commit Graph

5923 Commits

Author SHA1 Message Date
Colin Walters 1a86517d65
Merge pull request #2476 from valentindavid/valentindavid/glib-fix
lib: Fix a bad call to g_file_get_child
2021-11-09 09:27:18 -05:00
Colin Walters 3b338df956 ci: Require `libcap2-bin` for `capsh`
This was previously pulled in indirectly, but it looks like we need
to require it explicitly in newer Ubuntu.
2021-11-09 09:22:43 -05:00
Šimon (Simon) Rataj 56428d5e0e
Merge branch 'ostreedev:main' into patch-1 2021-11-04 18:50:34 +01:00
Colin Walters e580eca214
Merge pull request #2187 from cgwalters/sysroot-ro-initramfs
prepare-root: Set up sysroot readonly in initramfs
2021-11-04 10:37:18 -04:00
Valentin David adc097a2ed
lib: Fix a bad call to g_file_get_child
In Glib, since commit 3a6e8bc8876e149c36b6b14c6a25a718edb581ed,
`g_file_get_child` does not accept absolute path as paramater anymore.

The broken assertion was encountered during `ostree admin deploy`
command for the checkout of subpath `etc`.

Example of error log:
```
(ostree admin deploy:1640): GLib-GIO-CRITICAL **: 03:42:00.570: g_file_get_child: assertion '!g_path_is_absolute (name)' failed

(ostree admin deploy:1640): GLib-GIO-CRITICAL **: 03:42:00.570: g_file_query_info: assertion 'G_IS_FILE (file)' failed
**
OSTree:ERROR:src/ostree/ot-main.c:232:ostree_run: assertion failed: (success || error)
Bail out! OSTree:ERROR:src/ostree/ot-main.c:232:ostree_run: assertion failed: (success || error)
```
2021-11-03 21:40:35 +01:00
Šimon (Simon) Rataj 48f582b918
Added Fedora Kinoite link 2021-11-03 21:02:53 +01:00
Colin Walters c553b5c69a
prepare-root: Set up sysroot readonly in initramfs
Let's ensure things are right from the start in the initramfs;
this closes off various race conditions.  Followup to
3564225917

Closes: https://github.com/ostreedev/ostree/issues/2115
2021-11-03 16:37:20 +00:00
Colin Walters 800289a8db
Merge pull request #2475 from lucab/ups/prepare-root-check-first
prepare-root: check for read-only sysroot status early on
2021-11-01 09:58:06 -04:00
Luca BRUNO 63d0c4c781
prepare-root: check for read-only sysroot status early on
This moves read-only sysroot checks upfront, so that they are not
intermixed with mount operations.
It has no immediate side-effects, but allow these check to be
independent from the rest of the mounting logic (and future changes
to it).
2021-11-01 09:42:36 +00:00
Jonathan Lebon b7efd16cc5
Merge pull request #2472 from lucab/ups/prepare-root-checked-printf 2021-10-26 15:14:21 -04:00
Jonathan Lebon 6e0165020a
Merge pull request #2473 from lucab/ups/prepare-root-less-global-mutable-state 2021-10-26 13:25:37 -04:00
Luca BRUNO 7c17daad17
prepare-root: get rid of a global variable
This moves a global mutable variable to a smaller local scope,
as it is not really used outside of that.
2021-10-26 16:27:22 +00:00
Luca BRUNO ca84da679a
prepare-root: check return codes for errors when assembling paths
This adds checks around all `snprintf` calls in order to detect
failures and gracefully abort.
2021-10-26 16:16:34 +00:00
Colin Walters 1e6077af03
Merge pull request #2471 from lucab/ups/prepare-root-silent-mounts
prepare-root: make all mount operations silent
2021-10-26 10:06:52 -04:00
Luca BRUNO 848fe542af
prepare-root: make all mount operations silent
This adds a `MS_SILENT` flag to all `mount(2)` calls, reducing the
amount of kernel logs produced on each boot.
Those messages do not contain actionable details, and in the "mount
plus read-only remount" case they can easily become highly redundant.
2021-10-26 10:51:37 +00:00
Luca Bruno 9692437491
Merge pull request #2468 from lucab/ups/tests-var-mount
tests/var-mount: tweak test setup
2021-10-19 09:03:19 +00:00
Luca BRUNO f93d96620c
tests/var-mount: tweak test setup
This reworks the var-mount destructive test in order to properly use
the datadir for the current stateroot instead of a duplicated one.
In turn, it ensures that the resulting `var.mount` after reboot is
correctly pointing to the same location which hosted `/var` on the
previous boot.
2021-10-19 08:03:09 +00:00
Luca Bruno 5d045f3ae1
Merge pull request #2466 from cgwalters/ci-fanalyzer
ci: Enable -fanalyzer
2021-10-18 16:44:56 +00:00
Colin Walters 58dc6a08b4 tests/rollsum: Use `g_malloc` not `malloc`
To pacify gcc's `-fanalyzer`.
2021-10-18 11:44:44 -04:00
Colin Walters fda41e8d24 ci: Enable -fanalyzer
Followup to https://github.com/ostreedev/ostree/pull/2463

One thing I noticed here is we lost usage of `build-check.sh`
which also invokes `clang`, which doesn't speak `-fanalyzer`
and would be broken by this if we try to enable `build-check.sh`
again.  But that can come later.
2021-10-15 15:44:04 -04:00
Luca Bruno ec8cf31e98
Merge pull request #2455 from cgwalters/packit
Attempt to update packit flow to build in COPR
2021-10-15 07:47:28 +00:00
Jonathan Lebon 09f4ad708c
Merge pull request #2467 from cgwalters/bump-libglnx-20211014 2021-10-14 15:33:33 -04:00
Colin Walters baa57ffe0d libglnx: Bump to ef502aabf7d3a0d37f9c4d228f870ac93404447b
Various fixes there, including one for `gcc -fanalyzer`.

Update submodule: libglnx
2021-10-14 12:41:02 -04:00
Colin Walters 7ba8dbf0cc Attempt to update packit flow to build in COPR
No idea if this will really work, but at least `packit srpm`
does work now.
2021-10-14 12:36:38 -04:00
Luca Bruno 6b8295ada1
Merge pull request #2463 from cgwalters/fix-fanalyzer
Fix various mostly theoretical gcc `-fanalyzer` issues
2021-10-14 08:30:25 +00:00
Colin Walters 029a9d56c3 variantutil: Fix gcc `-fanalyzer` warnin
Add some not-NULL assertions for return values from glib,
and upgrade some `g_return_if_fail` to `g_assert`.
2021-10-13 17:13:14 -04:00
Colin Walters 54bf42c3e5 utils: Fix unreachable `NULL` deref by adding assertion
Again this one is just in theory, but let's add an assertion.
2021-10-13 17:13:14 -04:00
Colin Walters f355482e1f static-delta: Fix probably not actually possible NULL deref
Flagged by `gcc -fanalyzer`.  I didn't study this really deeply
but I think it's not actually reachable.  Anyways, let's catch
it on general principle.
2021-10-13 17:13:14 -04:00
Colin Walters 3159e04980 fetcher/soup: Fix gcc `-fanalyzer` warning
In general, we're probably going to need to change most of our
`g_return_if_fail` to `g_assert`.  The analyzer flags that
the function can return `NULL`, but the caller isn't prepared for
this.

In practice, let's abort.
2021-10-13 17:13:14 -04:00
Colin Walters 520b45afdd sysroot: Fix gcc `-fanalyzer` warning
In general, we're probably going to need to change most of our
`g_return_if_fail` to `g_assert`.  The analyzer flags that
the function can return `NULL`, but the caller isn't prepared for
this.

In practice, let's abort.
2021-10-13 17:13:14 -04:00
Colin Walters 9a7f9c2095 deployment: Fix gcc `-fanalyzer` warning
In general, we're probably going to need to change most of our
`g_return_if_fail` to `g_assert`.  The analyzer flags that
the function can return `NULL`, but the caller isn't prepared for
this.

In practice, let's abort.
2021-10-13 17:13:14 -04:00
Colin Walters a8eed03a19 remote: Fix gcc `-fanalyzer` warning
In general, we're probably going to need to change most of our
`g_return_if_fail` to `g_assert`.  The analyzer flags that
the function can return `NULL`, but the caller isn't prepared for
this.

In practice, let's abort.
2021-10-13 17:13:14 -04:00
Colin Walters dc1411f4f2
Merge pull request #2464 from lucab/ups/box-auto-txn
repo/private: move OstreeRepoAutoTransaction to a boxed type
2021-10-13 17:08:25 -04:00
Luca Bruno 16157e77e5
Merge pull request #2465 from travier/docfixes
docs: Do not convert -- & --- to en/em-dash
2021-10-12 09:49:39 +00:00
Timothée Ravier 5af2a529be docs: Do not convert -- & --- to en/em-dash
'--' is frequently used for command line options and was thus
incorrectly rendered as a special en-dash symbol.
2021-10-11 12:29:32 +02:00
Luca BRUNO 8a9737aa6e
repo/private: move OstreeRepoAutoTransaction to a boxed type
This defines `OstreeRepoAutoTransaction` as a boxed type, in order
to support auto-generating bindings for it.
That first requires adding internal reference-counting to it, to
allow freely copying/freeing references to a single transaction guard.
2021-10-11 06:52:25 +00:00
Simon McVittie fb8b2ecd6b Release to unstable 2021-10-10 17:51:51 +01:00
Simon McVittie de3192644a New upstream release
- Update symbols file
2021-10-10 17:39:45 +01:00
Simon McVittie 737f00a1e2 Update upstream source from tag 'upstream/2021.5'
Update to upstream version '2021.5'
with Debian dir 18336141e3
2021-10-10 17:35:20 +01:00
Simon McVittie 75e180c3f8 New upstream version 2021.5 2021-10-10 17:35:12 +01:00
Simon McVittie f74de94fb0 Update changelog 2021-10-10 17:35:06 +01:00
Simon McVittie 857d2727a3 Mark a patch as applied upstream 2021-10-10 17:34:46 +01:00
Colin Walters f4a3837662
Merge pull request #2461 from lucab/ups/prepare-root-logging
prepare-root: tweak log messages to clarify errors
2021-10-07 11:56:17 -04:00
Luca BRUNO f4be52ba24
prepare-root: tweak log messages to clarify errors
This rewords errors and log messages in the functions which take care
of preparing sysroot in initramfs.
Depending on the boot flow, it is possible to reach this logic
with a sysroot mounted (unexpectedly) as read-only.
In that case, let's clearly point out the problematic mountpoint.
2021-10-07 14:56:47 +00:00
Jonathan Lebon cc70ab27fa
Merge pull request #2460 from cgwalters/gir-no-tls-interaction 2021-10-07 04:24:07 -04:00
Colin Walters 307707c3a0
Merge pull request #2459 from smcv/test-commit-sign
test-commit-sign.sh: Skip a unit test when running as an installed-test
2021-10-06 15:26:08 -04:00
Colin Walters a73a28634d Remove OstreeTlsCertInteraction bits from introspection
We filter out everything named `-private.h` from scanning,
which differs from the gtk-doc exclude.  Eventually this will
be solved when we switch to the new gir-based docs.

Came up in https://github.com/ostreedev/ostree-rs/pull/34#discussion_r723337772
2021-10-06 12:42:56 -04:00
Colin Walters ccb4a1fc35
Merge pull request #2458 from ostreedev/release-2021.5
Release 2021.5
2021-10-06 09:33:29 -04:00
Simon McVittie 36d62a7cf1 Release to unstable 2021-10-05 23:54:00 +01:00
Simon McVittie 9fcb9546af Add patch to fix installed-tests 2021-10-05 23:53:09 +01:00