6997 Commits

Author SHA1 Message Date
Jonathan Lebon
fc5aef6fe6 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
2023-09-08 17:49:25 -04:00
Jonathan Lebon
c8ed1c7a87 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.
2023-09-08 17:49:25 -04:00
Jonathan Lebon
3c2587b619 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.
2023-09-08 15:07:29 -04:00
Colin Walters
0ac8795686
Merge pull request #3038 from cgwalters/rust-drop-composefs
rust: Drop composefs from crate
2023-09-08 12:03:21 -04:00
Eric Curtin
6a94856729
Merge pull request #3037 from cgwalters/add-labeler-flow
ci: Add an automatic labeler action
2023-09-08 12:52:44 +01:00
Colin Walters
2db17d2107 rust: Drop composefs from crate
This greatly reduces the size.  TODO: switch to using `include`.
2023-09-08 07:38:31 -04:00
Colin Walters
749857df67
Merge pull request #3035 from cgwalters/release-rust
rust/sys: Also bump semver for this
2023-09-08 07:24:56 -04:00
Colin Walters
129969482e ci: Add an automatic labeler action
To automate a bit.
2023-09-07 17:38:59 -04:00
Colin Walters
1714e8371f
Merge pull request #3030 from ostreedev/dependabot/submodules/composefs-af86742
build(deps): bump composefs from `d085fbf` to `af86742`
2023-09-07 16:21:39 -04:00
Colin Walters
e52530b5e0 rust/sys: Also bump semver for this
Since we bumped the glib major.
2023-09-07 14:54:56 -04:00
dependabot[bot]
4d3621db08
build(deps): bump composefs from d085fbf to af86742
Bumps [composefs](https://github.com/containers/composefs) from `d085fbf` to `af86742`.
- [Release notes](https://github.com/containers/composefs/releases)
- [Commits](d085fbf6c8...af86742579)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 13:39:35 +00:00
Colin Walters
00c04aefd3
Merge pull request #3028 from ostreedev/dependabot/submodules/composefs-d085fbf
build(deps): bump composefs from `597a766` to `d085fbf`
2023-09-06 09:32:33 -04:00
Colin Walters
b0e328114d
Merge pull request #3029 from cgwalters/bump-glib
rust: Port to glib 0.18
2023-09-06 09:06:04 -04:00
Colin Walters
aee1ab2c99 rust: Bump semver to 0.19
- New glib 0.18 dependency
- Drop cap-std APIs and features
- Other minor changes
2023-09-01 08:44:25 -04:00
Colin Walters
cccc0f1a5b rust: Port to glib 0.18
- Also rolls up a few other changes in the C API
- Drop `&mut` from `OstreeKernelArgs`; it now confuses type inference.
  More generally while using `&mut` here was well intentioned, it
  goes against the glib standard of mapping everything to `&` and
  accepting interior mutability.
2023-09-01 08:44:25 -04:00
dependabot[bot]
b60036dd92
build(deps): bump composefs from 597a766 to d085fbf
Bumps [composefs](https://github.com/containers/composefs) from `597a766` to `d085fbf`.
- [Release notes](https://github.com/containers/composefs/releases)
- [Commits](597a766095...d085fbf6c8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-01 12:27:47 +00:00
Joseph Marrero Corchado
5fe050f51a
Merge pull request #3027 from cgwalters/drop-cap-std-public
Drop cap-std from our public APIs
2023-08-31 17:48:15 -04:00
Colin Walters
9121297e7b ci: Move lints into main build
And drop another hardcoded MSRV.
2023-08-31 16:33:07 -04:00
Colin Walters
242a901524 rust: Bump rust-version = 1.70
To pick up the new `AsFd` etc.
2023-08-31 15:34:26 -04:00
Colin Walters
eec67ec109 Drop cap-std from our public APIs
Since it bumped semver (when I didn't expect it to; xref
963eebf3ab (r121651362)

It's not load-bearing enough here to matter versus just passing
an untyped file descriptor.

This mainly means that it will be the `glib` ecosystem which
forces transitive semver bumps for us, not both.
2023-08-31 15:34:26 -04:00
Colin Walters
e93ebd7385
Merge pull request #3018 from ostreedev/dependabot/submodules/composefs-597a766
build(deps): bump composefs from `1aed878` to `597a766`
2023-08-31 12:16:50 -04:00
Eric Curtin
8d838230f1
Merge pull request #3012 from cgwalters/default-early-prune
sysroot: Promote the "early prune" behavior to default
2023-08-31 16:30:26 +01:00
Colin Walters
d5cfbed5bc sysroot: Promote the "early prune" behavior to default
I think we have enough testing for this, let's default it to
on, and change the variable to allow opt-out in case it does
introduce a regression.
2023-08-31 10:25:59 -04:00
Colin Walters
c0014e0003
Merge pull request #2968 from cgwalters/drop-global-syncfs-by-default
deploy: Remove global `sync` by default
2023-08-30 16:24:37 -04:00
Joseph Marrero Corchado
d976ec5657
Merge pull request #3024 from cgwalters/clang-analyzer-fixes-5
Clang analyzer fixes 5
2023-08-30 16:14:28 -04:00
dependabot[bot]
0d7b8ebc6b build(deps): bump composefs from 1aed878 to 597a766
Bumps [composefs](https://github.com/containers/composefs) from `1aed878` to `597a766`.
- [Release notes](https://github.com/containers/composefs/releases)
- [Commits](1aed8781d6...597a766095)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 13:23:13 -04:00
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