Commit Graph

6091 Commits

Author SHA1 Message Date
Joseph Marrero Corchado
d52597e478
Merge pull request #2642 from cgwalters/rust-bindings-cargo-updates
Rust bindings cargo updates
2022-06-09 16:53:00 -04:00
Colin Walters
99c122d219 rust: Switch to 2021 edition
No real changes.

```
$ cargo fix --edition
note: Switching to Edition 2021 will enable the use of the version 2 feature resolver in Cargo.
This may cause some dependencies to be built with fewer features enabled than previously.
More information about the resolver changes may be found at https://doc.rust-lang.org/nightly/edition-guide/rust-2021/default-cargo-resolver.html
When building the following dependencies, the given features will no longer be used:

  libc v0.2.126 removed features: extra_traits

The following differences only apply when building with dev-dependencies:

  getrandom v0.2.6 removed features: std
```

which looks OK to me.
2022-06-09 15:55:41 -04:00
Colin Walters
d7802c27dd rust-bindings: Update cargo package list
When we did the merger, it turns out cargo by default is basically
going to include all of stuff in the git repository root directory
which is "libostree".  We just want the stuff in `rust-bindings/`.

I initially tried adding `include = "rust-bindings/"` but
according to
https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields
specifying `include` means that `exclude` is
ignored, which is kind of annoying.  Further, doing so *also*
turns off the cargo automatic rules for handling e.g. `gitignore`.

So for now I went with the approach of adding everything from the C
library stuff into `exclude/`.
2022-06-09 15:50:17 -04:00
Colin Walters
61dd54f940 rust-bindings: use correct README.md
I noticed at https://crates.io/crates/ostree/0.14.0
that the `README.md` was wrong...
2022-06-09 14:55:25 -04:00
Colin Walters
dc13645299 rust-bindings: Fix repository reference
Since the repo merge.
2022-06-09 14:53:06 -04:00
Colin Walters
2688d7d261 tests/inst: Bump the version of ostree-ext
In the interest of cross-testing and keeping things up to date.

Hmm, I think we need to set up dependabot here.
2022-06-09 14:52:04 -04:00
Joseph Marrero Corchado
a6ecd96cda
Merge pull request #2638 from cgwalters/fix-symbol-versioning
lib: Fix symbol versioning inheritance
2022-06-08 17:17:28 -04:00
Joseph Marrero Corchado
b330f84172
Merge pull request #2637 from cgwalters/opt-prune-reachable-too
prune: Also use object set API in `ostree_repo_prune_from_reachable()`
2022-06-08 16:53:29 -04:00
Colin Walters
145d91d1c9 lib: Fix symbol versioning inheritance
I messed this up; the last release should inherit from the previous
release (N-1) and not the previous to that (N-2).

I think (hope) this isn't an ABI break...

Just noticed this when I was going to add a new symbol.
2022-06-08 16:44:51 -04:00
Colin Walters
fffb111633 prune: Also use object set API in ostree_repo_prune_from_reachable()
I missed the second prune path when working on
https://github.com/ostreedev/ostree/pull/2635
2022-06-08 16:22:26 -04:00
Colin Walters
616d0cf7c2
Merge pull request #2636 from cgwalters/update-git-libostree-git-rust
ci: Add a flow that does a git libostree + git rust-bindings
2022-06-08 13:16:11 -04:00
Jonathan Lebon
0f83196c2a
Merge pull request #2635 from cgwalters/list-objects-set 2022-06-08 11:38:36 -04:00
Colin Walters
5341a13b33 ci: Add a flow that does a git libostree + git rust-bindings
In https://github.com/ostreedev/ostree/pull/2633 I realized
that our CI only builds git of libostree or git of rust-bindings,
not git of both.  And we definitely want to test the latter too,
so e.g. the Rust tests *also* become tests for changes to the C code.
2022-06-08 10:33:46 -04:00
Colin Walters
a71915e436 repo: Further optimize ostree_repo_list_objects_set()
In a prior change we discovered that for bad historical reasons
libostree was returning a mapping "object type+checksum" => "metadata"
but the "metadata" was redundant and pointless.

Optimize the prune API to use a (currently internal) object listing
API which returns a set, not a map.  This allows `GHashTable` to
avoid allocating a separate array for the values, neatly cutting
memory usage in half (from ~13MB to ~6MB) on my test case of a
dry-run prune of a FCOS build.
2022-06-08 10:18:55 -04:00
Joseph Marrero Corchado
1acb71fef7
Merge pull request #2633 from cgwalters/bump-rust-bindings
rust: Bump semver, add feature for current release
2022-06-08 10:15:02 -04:00
Colin Walters
4806d84f56 rust: Bump semver, add feature for current release
There were some changes to the sys API for introspection fixes.
And add a feature for the current release, which is something
I'll add to the checklist for releases.
2022-06-08 09:37:57 -04:00
Dan Nicholson
ef114db341
Merge pull request #2634 from cgwalters/list-objects-malloc
repo: Optimize memory use of `ostree_repo_list_objects()`
2022-06-07 20:59:45 -06:00
Colin Walters
c2baa6d10b repo: Optimize memory use of ostree_repo_list_objects()
I was looking at https://github.com/ostreedev/ostree/pull/2632
and confused at the usage of
`GVariant *value = g_variant_new ("(b@as)", TRUE, g_variant_new_strv (NULL, 0));`
which looked strange - why the empty strv?

It turns out that this is a historical legacy of the time when
ostree had pack files.  And nothing actually cares about the values
of these variants; we should have an API that returns a proper set,
and not a hash.

But...since all of these things have exactly the same value, instead
of allocating lots of redundant copies on the heap, just have
them all hold a refcount on a shared value.

This cuts the heap usage from 20MB to 13MB on a test FCOS repository
build.
2022-06-07 20:35:37 -04:00
Joseph Marrero Corchado
2b6f506f70
Merge pull request #2631 from cgwalters/release-2022-4
Release 2022.4
2022-06-06 12:49:42 -04:00
Colin Walters
664c413299 configure: post-release version bump 2022-06-06 11:06:44 -04:00
Colin Walters
5fa364d399 Release 2022.4 2022-06-06 11:04:44 -04:00
Jonathan Lebon
231ab7b321
Merge pull request #2627 from cgwalters/bindings-drop-committed-gir 2022-06-03 10:52:44 -04:00
Colin Walters
fa3b6c9872 rust-bindings: Update to latest git 2022-06-03 10:13:36 -04:00
Colin Walters
70c8499a38 rust-bindings: Use OSTree-1.0.gir from our own builddir
Now that the projects are unified.
2022-06-03 09:57:12 -04:00
Colin Walters
21901c2d36 rust-bindings: Delete committed gir files
These seem to have been accidentally committed to git; they should
not be here.  The Gir should be derived from source code.
2022-06-03 09:51:50 -04:00
Joseph Marrero Corchado
8bd1c88013
Merge pull request #2625 from cgwalters/drop-features-introspection
Drop `OSTREE_BUILT_FEATURES` from introspection
2022-06-03 09:22:48 -04:00
Joseph Marrero Corchado
971d5bc461
Merge pull request #2624 from cgwalters/misc-introspection-fixes
Rename ostree-cmdprivate to drop out of introspection
2022-06-03 09:10:27 -04:00
Colin Walters
3e645ad950 Drop OSTREE_BUILT_FEATURES from introspection
It inherently depends on the individual build, and can't
really be an official stable API for introspection users.
I've noticed the value of this flip flop when doing local builds.

I'm fairly certain no one is trying to use it from a higher level
language.

It'd probably make sense to even drop from the official C API,
but I'm trying to be conservative with that.
2022-06-02 19:44:40 -04:00
Colin Walters
32ee82133b Rename ostree-cmdprivate to drop out of introspection
I was looking at our `.gir` and noticed we had the cmdprivate bits
because the pattern for excluding headers is `-private.h`, which
didn't match `cmdprivate.h`.
2022-06-02 17:13:17 -04:00
Luca Bruno
485caca538
Merge pull request #2620 from jameswestman/lookup-annotations
Fix annotations on ostree_mutable_tree_lookup()
2022-06-02 15:38:46 +00:00
Jonathan Lebon
270d3dc38d
Merge pull request #2622 from cgwalters/more-ci 2022-05-31 15:14:50 -04:00
Colin Walters
e69321176d gitignore: Add ci-build/
Generated by our scripts.
2022-05-31 11:42:42 -04:00
Colin Walters
199ef821c8 ci: Add a codestyle.sh
This matches what we do in rpm-ostree.  Move the `glnx_fd_close`
bits out of `make syntax-check` in preparation for dropping that.
2022-05-31 11:42:42 -04:00
Colin Walters
aea20704b5 ci: Drop an unused files
Cruft from previous CI flows.
2022-05-31 11:42:42 -04:00
Jonathan Lebon
f376f7ffff
Merge pull request #2621 from cgwalters/drop-jenkins-soup 2022-05-31 11:24:33 -04:00
Colin Walters
2838f42eec ci: Drop libsoup build in jenkins
GH actions is fast zero cost system that covers these build matrix
things well.  Let's keep our Fedora CI system doing more of the
qemu heavy lifting.
2022-05-31 10:44:41 -04:00
James Westman
03d592b116
Fix annotations on ostree_mutable_tree_lookup()
(nullable) and (optional) were missing on lookup()'s out parameters,
which caused the rust bindings for the function to not work. Due to the
missing (nullable), it would return a Result<(GString, MutableTree), _>,
not a Result<(Option<GString>, Option<MutableTree>), _>, which led to
panics.
2022-05-30 17:36:07 -05:00
Luca Bruno
7aa17acd8d
Merge pull request #2613 from GuiltyDoggy/man-update
man: Fix ostree-admin-instutil subcommands
2022-05-30 17:35:05 +00:00
Jonathan Lebon
4ce6fb0970
Merge pull request #2619 from nikita-dubrovskii/skip_gzip_unpacking 2022-05-27 16:27:08 -04:00
Nikita Dubrovskii
972f00e483 s390x: do not unpack existing initrd, just append LUKS keys to its copy
Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
2022-05-27 12:06:33 +02:00
Luca Bruno
ed79299fc3
Merge pull request #2618 from jlebon/pr/copr-fix
copr: mark git checkout as safe
2022-05-27 06:37:54 +00:00
Jonathan Lebon
2e564aef07 copr: mark git checkout as safe
Recent git became more strict wrt git repos in parent dirs owned by
other users. This broke our COPR builds due to the git checkout being
created by a different user and mounted in. We need to explicitly mark
the repo as safe.

For more information, see:
https://github.com/actions/checkout/issues/760
2022-05-26 16:54:43 -04:00
Jonathan Lebon
9aca8816c6
Merge pull request #2615 from nikita-dubrovskii/handle_errors 2022-05-25 13:38:23 -04:00
Colin Walters
2363d3ad98
Merge pull request #2605 from saqibali-2k/pr/bls-append
ostree-systroot-deploy: parse bls-append-except-default key
2022-05-25 11:33:10 -04:00
Nikita Dubrovskii
b03fa626f1 s390x: fail on error during reading of SecureExecution sysfs flag 2022-05-25 11:00:34 -04:00
Luca Bruno
cdfc2ff5bf
Merge pull request #2616 from HuijingHei/dup-osname
Remove dup "--os=OSNAME" line in output of "ostree admin config-diff --help"
2022-05-25 07:00:12 +00:00
Huijing Hei
b024ce5eeb Remove dup "--os=OSNAME" line in output of "ostree admin config-diff --help"
Small fix for https://github.com/ostreedev/ostree/issues/2594
2022-05-25 11:15:39 +08:00
Huijing Hei
606459ad26 Fix GNU style of two spaces for indent in https://github.com/ostreedev/ostree/pull/2612 2022-05-25 11:12:47 +08:00
Colin Walters
ea0be27bd3
Merge pull request #2612 from HuijingHei/deploy-karg-delete
Teach --karg-delete option to ostree admin deploy
2022-05-24 11:18:54 -04:00
Dusty Mabe
6109383036
Merge pull request #2614 from nikita-dubrovskii/issue-2867
s390x: ensure SecureExecution is enabled before sd-boot generation
2022-05-23 16:11:56 -04:00