Commit Graph

6721 Commits

Author SHA1 Message Date
Colin Walters
52dbed4d77
Merge pull request #3023 from ostreedev/dependabot/submodules/libglnx-54ad67d
build(deps): bump libglnx from `c02eb59` to `54ad67d`
2023-08-30 09:58:01 -04:00
Colin Walters
4eb3caca69 commit: Quiet clang-analyzer warning
Another conditional ownership.
2023-08-30 09:23:13 -04:00
Colin Walters
5e1b698329 keyfile-utils: Quiet a clang-analyzer warning
It complains that we could leak memory if the return value
pointer isn't set.  That's actually a nonsensical case, there's
no reason to call this and ignore the return value.

So change things to require it be set, and also change the
`g_return_val_if_fail` to be hard assertions per our new policy.
2023-08-30 09:19:42 -04:00
dependabot[bot]
3001ef2817
build(deps): bump libglnx from c02eb59 to 54ad67d
Bumps libglnx from `c02eb59` to `54ad67d`.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 12:21:09 +00:00
Colin Walters
03a198888f
Merge pull request #3020 from cgwalters/less-return-if-fail-1
mutable-tree: Change some `g_return_if_fail` to `g_assert()`
2023-08-29 12:25:42 -04:00
Colin Walters
5837f27ff5
Merge pull request #3019 from cgwalters/more-analyzer-fixes-4
mutable-tree: Quiet clang-analyzer warning
2023-08-29 12:25:24 -04:00
Colin Walters
886f58005f mutable-tree: Change some g_return_if_fail to g_assert()
We did this in some prior patches because it's better for
static analyzers; code is either reachable or not, and we don't
want the default desktop-style behavior of "try to stumble on
without crashing".  It's just likely to lead to a crash somewhere
else.
2023-08-29 10:16:42 -04:00
Colin Walters
db4ca6e7ac mutable-tree: Quiet clang-analyzer warning
The warning here was about a use-after-free which is serious, but
I don't think it was reachable in practice, because we'd only
enter the second conditional if `contents_checksum != self->contents_checksum`,
yet we made them the same thing here.

Nevertheless, refactor the code to do a direct return in this
case because that's basically what happened before, and doing
so is a lot clearer.
2023-08-29 10:09:25 -04:00
Joseph Marrero Corchado
d001729bef
Merge pull request #3017 from cgwalters/more-analyzer-fixes-3
More analyzer fixes 3
2023-08-29 00:11:36 -04:00
Colin Walters
6538b1702b repo: Quiet clang-analyzer warning
Another conditional ownership.
2023-08-28 17:29:57 -04:00
Colin Walters
369e4ddd93 commit: Quiet clang-analyzer warning
Another conditional ownership.
2023-08-28 17:28:59 -04:00
Colin Walters
5fc9eac0ba commit: Quiet clang-analyzer warning
Another conditional ownership.
2023-08-28 17:28:20 -04:00
Colin Walters
bfb7482a24 lib/commit: Quiet clang-analyzer warning
Another conditional ownership.
2023-08-28 17:27:04 -04:00
Colin Walters
ee8c13b160 lib/delta: Remove dead code
Found by clang-analyzer.
2023-08-28 17:26:28 -04:00
Colin Walters
3acdbac000
Merge pull request #3016 from cgwalters/more-analyzer-fixes-2
More analyzer fixes 2
2023-08-28 16:10:58 -04:00
Colin Walters
89e13a954c
Merge pull request #2994 from cgwalters/refactor-composefs-warnings
Refactor composefs warnings
2023-08-28 10:44:15 -04:00
Colin Walters
0beaf5c9ac pull: Quiet clang-analyzer warning
Just used for side-effects.
2023-08-26 13:51:22 -04:00
Colin Walters
e2779a7cf7 commit: Quiet clang-analyzer warning
This is just another instance of the "conditionally owned"
pattern.
2023-08-26 12:26:39 -04:00
Colin Walters
5b40d4bbba pull: Add assertions to quiet clang-analyzer
It's warning the value can be NULL, but I don't think that's true.
I believe we're just hitting analysis limit (the path length is 119).
2023-08-26 12:24:10 -04:00
Colin Walters
0cfa5e8600 lib/repo-finder: Squash memory leak
We want to free this value on each iteration; it's moved below
if the value is used.
2023-08-26 12:23:26 -04:00
Colin Walters
f8549a9e02
Merge pull request #3013 from cgwalters/more-analyzer-fixes
2023.6 coverity minor fixes
2023-08-26 12:10:55 -04:00
Eric Curtin
7c13631af5
Merge pull request #3006 from cgwalters/misc-c99-style-5
Misc c99 style 5
2023-08-26 13:13:24 +01:00
Colin Walters
1a16a7d684 switchroot: Use g_new/g_free consistently
Coverity complains about this, even though they're the same thing.
2023-08-25 16:59:28 -04:00
Colin Walters
d3ede20ba0 sign/ed25519: Fix two memory leaks
Spotted by coverity.
2023-08-25 16:57:12 -04:00
Colin Walters
a87789e818 commit: Drop dead code
Coverity points out that since we're now *always* initializing
metadata, the `create_empty_gvariant_dict()` is unreachable.
2023-08-25 16:56:07 -04:00
Colin Walters
d36bf35c10 switchroot: Lower config parser to otcore, add unit tests
Part of the continuation of unit testing coverage.
2023-08-25 15:59:34 -04:00
Colin Walters
38880bff01 composefs: Hard error except on ENOENT even in "optional" case
Since we enabled composefs at build time, the default (non-composefs)
case now always prints
`composefs: Optional support failed: No such file or directory`
But that's normal and expected.

Rework things here so that in the very special case where
we are in "maybe/optional" mode and we get ENOENT, then we
output a much more normal-looking message that doesn't include
the string "failed".

Now on the flip side - if I have explicitly enabled signature
checking, I think we *do* want to make that fatal even if
composefs is in "maybe" mode.

(This part is more debatable; perhaps we should just disallow
 the case of "maybe" + signatures at all; but I think this is
 an improvement in that direction)
2023-08-25 15:23:06 -04:00
Colin Walters
e952b1bf14 prepare-root: Fold together composefs signature cases
Now that we don't support digest-but-not-signature verification
for composefs, the logic here was unnecessarily complicated.
With a prior prep patch that moved the composefs option
initialization up, we can just have everything related to signature
verification in a single conditonal.
2023-08-25 15:22:21 -04:00
Colin Walters
1d316e3109 prepare-root: Init composefs options earlier
Prep for a later patch.
2023-08-25 15:22:21 -04:00
Colin Walters
aa9b7c3b1b prepare-root: Drop redundant print about signature/digest
We print if we're doing a signature+digest verification; its absence is
sufficient in the other case.  The goal here is to avoid polluting
the logs when signatures are not enabled.
2023-08-25 15:22:21 -04:00
Colin Walters
4dd3cb3520
Merge pull request #3005 from cgwalters/release
Release
2023-08-25 11:11:17 -04:00
Colin Walters
97d83e6225 configure: post-release version bump 2023-08-24 21:18:02 -04:00
Colin Walters
dab8051fd8 Release 2023.6 2023-08-24 21:18:02 -04:00
Joseph Marrero Corchado
bd91fda636
Merge pull request #3010 from cgwalters/more-composefs-fixes
build-sys: Really fix composefs check
2023-08-24 21:13:07 -04:00
Colin Walters
3648c5ae29 build-sys: Really fix composefs check
The ordering of the includes apparently matters...and I didn't
actually check that the previous change enables composefs on c9s.
But I did now.  For reals.

While we have the patient open, I switched to `AC_LANG_PROGRAM`
because I originally thought the bug had something to do with that.
As far as I understand, more cleanly separating the includes
from the injected body text is a useful thing in `AC_LANG_PROGRAM`.
2023-08-24 19:58:20 -04:00
Colin Walters
db3b286d6b
Merge pull request #3009 from cgwalters/c9s-ci
C9s CI && composefs build detection fix
2023-08-24 19:38:22 -04:00
Joseph Marrero Corchado
bcd4d02606
Merge pull request #3007 from cgwalters/optin-new-bootloader-naming
deploy: Add bootloader-naming-2 opt-in
2023-08-24 18:01:26 -04:00
Colin Walters
33ef4ae620 build-sys: Look for both linux/mount.h and sys/mount.h
Since that's what composefs uses.
2023-08-24 17:25:14 -04:00
Colin Walters
bd8339bda2 ci: Add c9s build
Since it's an active target of this project.
2023-08-24 17:24:07 -04:00
Colin Walters
cbe36c3a35
Merge pull request #3008 from ostreedev/maybe_ostree
prepare-root: If composefs is configured as "maybe" don't fail
2023-08-24 11:45:22 -04:00
Eric Curtin
29423a893c prepare-root: If composefs is configured as "maybe" don't fail
If composefs is configured as "maybe", we should continue even if
composefs support is not built in.
2023-08-24 15:20:25 +01:00
Colin Walters
02d419079d deploy: Add bootloader-naming-2 opt-init
I've verified that this fixes compatibility with GRUB, which
parses the filename:
https://github.com/ostreedev/ostree/issues/2961

However, out of a large degree of conservatism I've made this
an opt-in behavior for now.

My plan is to test it out in the FCOS development streams first.
2023-08-24 09:40:54 -04:00
Eric Curtin
fb06d59e75
Merge pull request #3003 from cgwalters/prepare-root-oscore-and-units
Move prepare-root karg helpers into otcore, add unit tests
2023-08-24 09:59:46 +01:00
Colin Walters
cce1814c50 cmd/show-remote-url: Port to C99 style
Just keeping up momentum.
2023-08-23 21:22:49 -04:00
Colin Walters
116fdc3c58 cmd/log: Port to C99 style
Just keeping up momentum.
2023-08-23 21:21:01 -04:00
Colin Walters
e578c019c5 cmd/export: Fold libarchive error handling
The helper function here doesn't quite carry its weight; this
brings us inline with having single line (no braces) error
return paths.
2023-08-23 21:17:27 -04:00
Colin Walters
88334b8f33 cmd/export: Port to C99 style
Just keeping up momentum.
2023-08-23 21:14:53 -04:00
Colin Walters
20b8cb174c Move prepare-root karg helpers into otcore, add unit tests
Add long overdue unit testing coverage for this, which
at least slightly closes out the android boot CI gap.

Actually, this *copies* the karg parsing code into otcore because
it now uses glib, which we're not yet using in the static
prepare-root.  It's pretty tempting to drop support for the
static prepare root entirely.  But for now we'll live with some
code duplication.
2023-08-23 17:11:10 -04:00
Joseph Marrero Corchado
4451949213
Merge pull request #2997 from cgwalters/test-cleanups-1
tests/destructive: Port more to xshell
2023-08-23 10:38:16 -04:00
Joseph Marrero Corchado
37f247da02
Merge pull request #2999 from cgwalters/add-oscore-units
tests: Add otcore unit tests
2023-08-23 10:37:48 -04:00