glib::Variant + 'static>(&self, callback: P) {
let callback_data: Box_ = Box_::new(callback);
unsafe extern "C" fn callback_func glib::Variant + 'static>(repo: *mut ostree_sys::OstreeRepo, path: *const libc::c_char, file_info: *mut gio_sys::GFileInfo, user_data: glib_sys::gpointer) -> *mut glib_sys::GVariant {
diff --git a/rust-bindings/rust/src/auto/sign.rs b/rust-bindings/rust/src/auto/sign.rs
new file mode 100644
index 00000000..2c4f7275
--- /dev/null
+++ b/rust-bindings/rust/src/auto/sign.rs
@@ -0,0 +1,367 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir)
+// from gir-files (https://github.com/gtk-rs/gir-files)
+// DO NOT EDIT
+
+use gio;
+use glib;
+use glib::object::IsA;
+use glib::translate::*;
+use glib::GString;
+use ostree_sys;
+use std::fmt;
+use std::ptr;
+use Repo;
+
+glib_wrapper! {
+ pub struct Sign(Interface);
+
+ match fn {
+ get_type => || ostree_sys::ostree_sign_get_type(),
+ }
+}
+
+impl Sign {
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn get_all() -> Vec {
+ unsafe {
+ FromGlibPtrContainer::from_glib_full(ostree_sys::ostree_sign_get_all())
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn get_by_name(name: &str) -> Result {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let ret = ostree_sys::ostree_sign_get_by_name(name.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
+ }
+ }
+}
+
+pub const NONE_SIGN: Option<&Sign> = None;
+
+pub trait SignExt: 'static {
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn clear_keys(&self) -> Result<(), glib::Error>;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn commit>(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&P>) -> Result<(), glib::Error>;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn commit_verify>(&self, repo: &Repo, commit_checksum: &str, out_success_message: &str, cancellable: Option<&P>) -> Result<(), glib::Error>;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error>;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, out_success_message: &str) -> Result<(), glib::Error>;
+
+ fn dummy_add_pk(&self, key: &glib::Variant) -> Result<(), glib::Error>;
+
+ fn dummy_data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error>;
+
+ fn dummy_data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, success_message: &str) -> Result<(), glib::Error>;
+
+ fn dummy_get_name(&self) -> Option;
+
+ fn dummy_metadata_format(&self) -> Option;
+
+ fn dummy_metadata_key(&self) -> Option;
+
+ fn dummy_set_pk(&self, key: &glib::Variant) -> Result<(), glib::Error>;
+
+ fn dummy_set_sk(&self, key: &glib::Variant) -> Result<(), glib::Error>;
+
+ fn ed25519_add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>;
+
+ fn ed25519_clear_keys(&self) -> Result<(), glib::Error>;
+
+ fn ed25519_data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error>;
+
+ fn ed25519_data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, out_success_message: &str) -> Result<(), glib::Error>;
+
+ fn ed25519_get_name(&self) -> Option;
+
+ fn ed25519_load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error>;
+
+ fn ed25519_metadata_format(&self) -> Option;
+
+ fn ed25519_metadata_key(&self) -> Option;
+
+ fn ed25519_set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>;
+
+ fn ed25519_set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error>;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn get_name(&self) -> Option;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error>;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn metadata_format(&self) -> Option;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn metadata_key(&self) -> Option;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>;
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error>;
+
+ fn summary>(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&P>) -> Result<(), glib::Error>;
+}
+
+impl> SignExt for O {
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_add_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn clear_keys(&self) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_clear_keys(self.as_ref().to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn commit>(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&P>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_commit(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn commit_verify>(&self, repo: &Repo, commit_checksum: &str, out_success_message: &str, cancellable: Option<&P>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_commit_verify(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, out_success_message.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, signature.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, out_success_message: &str) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, out_success_message.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn dummy_add_pk(&self, key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_dummy_add_pk(self.as_ref().to_glib_none().0, key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn dummy_data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_dummy_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, signature.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn dummy_data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, success_message: &str) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_dummy_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, success_message.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn dummy_get_name(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_dummy_get_name(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ fn dummy_metadata_format(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_dummy_metadata_format(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ fn dummy_metadata_key(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_dummy_metadata_key(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ fn dummy_set_pk(&self, key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_dummy_set_pk(self.as_ref().to_glib_none().0, key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn dummy_set_sk(&self, key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_dummy_set_sk(self.as_ref().to_glib_none().0, key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn ed25519_add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_ed25519_add_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn ed25519_clear_keys(&self) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_ed25519_clear_keys(self.as_ref().to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn ed25519_data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_ed25519_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, signature.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn ed25519_data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, out_success_message: &str) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_ed25519_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, out_success_message.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn ed25519_get_name(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_ed25519_get_name(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ fn ed25519_load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_ed25519_load_pk(self.as_ref().to_glib_none().0, options.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn ed25519_metadata_format(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_ed25519_metadata_format(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ fn ed25519_metadata_key(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_ed25519_metadata_key(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ fn ed25519_set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_ed25519_set_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn ed25519_set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_ed25519_set_sk(self.as_ref().to_glib_none().0, secret_key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn get_name(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_get_name(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_load_pk(self.as_ref().to_glib_none().0, options.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn metadata_format(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_metadata_format(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn metadata_key(&self) -> Option {
+ unsafe {
+ from_glib_none(ostree_sys::ostree_sign_metadata_key(self.as_ref().to_glib_none().0))
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_set_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_set_sk(self.as_ref().to_glib_none().0, secret_key.to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+
+ fn summary>(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&P>) -> Result<(), glib::Error> {
+ unsafe {
+ let mut error = ptr::null_mut();
+ let _ = ostree_sys::ostree_sign_summary(self.as_ref().to_glib_none().0, repo.to_glib_none().0, keys.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
+ if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
+ }
+ }
+}
+
+impl fmt::Display for Sign {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ write!(f, "Sign")
+ }
+}
diff --git a/rust-bindings/rust/src/auto/sysroot.rs b/rust-bindings/rust/src/auto/sysroot.rs
index 213a5924..d5f1583d 100644
--- a/rust-bindings/rust/src/auto/sysroot.rs
+++ b/rust-bindings/rust/src/auto/sysroot.rs
@@ -270,14 +270,6 @@ impl Sysroot {
}))
}
- pub fn lock_with_mount_namespace(&self) -> Result<(), glib::Error> {
- unsafe {
- let mut error = ptr::null_mut();
- let _ = ostree_sys::ostree_sysroot_lock_with_mount_namespace(self.to_glib_none().0, &mut error);
- if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
- }
- }
-
pub fn origin_new_from_refspec(&self, refspec: &str) -> Option {
unsafe {
from_glib_full(ostree_sys::ostree_sysroot_origin_new_from_refspec(self.to_glib_none().0, refspec.to_glib_none().0))
diff --git a/rust-bindings/rust/src/auto/versions.txt b/rust-bindings/rust/src/auto/versions.txt
index 83191cd5..68dbffb7 100644
--- a/rust-bindings/rust/src/auto/versions.txt
+++ b/rust-bindings/rust/src/auto/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
-from gir-files (https://github.com/gtk-rs/gir-files @ aa3c638)
+from gir-files (https://github.com/gtk-rs/gir-files @ 48a4a23+)
diff --git a/rust-bindings/rust/sys/Cargo.toml b/rust-bindings/rust/sys/Cargo.toml
index 789acb97..e04e4fff 100644
--- a/rust-bindings/rust/sys/Cargo.toml
+++ b/rust-bindings/rust/sys/Cargo.toml
@@ -17,7 +17,8 @@ tempfile = "3"
[features]
v2014_9 = []
v2015_7 = ["v2014_9"]
-v2016_4 = ["v2015_7"]
+v2016_3 = ["v2015_7"]
+v2016_4 = ["v2016_3"]
v2016_5 = ["v2016_4"]
v2016_6 = ["v2016_5"]
v2016_7 = ["v2016_6"]
@@ -47,6 +48,8 @@ v2019_3 = ["v2019_2"]
v2019_4 = ["v2019_3"]
v2019_6 = ["v2019_4"]
v2020_1 = ["v2019_6"]
+v2020_2 = ["v2020_1"]
+v2020_4 = ["v2020_2"]
dox = []
[lib]
@@ -73,6 +76,7 @@ version = "0.0"
[package.metadata.system-deps.ostree_1.feature-versions]
v2014_9 = "2014.9"
v2015_7 = "2015.7"
+v2016_3 = "2016.3"
v2016_4 = "2016.4"
v2016_5 = "2016.5"
v2016_6 = "2016.6"
@@ -103,3 +107,5 @@ v2019_3 = "2019.3"
v2019_4 = "2019.4"
v2019_6 = "2019.6"
v2020_1 = "2020.1"
+v2020_2 = "2020.2"
+v2020_4 = "2020.4"
diff --git a/rust-bindings/rust/sys/src/auto/versions.txt b/rust-bindings/rust/sys/src/auto/versions.txt
index 83191cd5..68dbffb7 100644
--- a/rust-bindings/rust/sys/src/auto/versions.txt
+++ b/rust-bindings/rust/sys/src/auto/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
-from gir-files (https://github.com/gtk-rs/gir-files @ aa3c638)
+from gir-files (https://github.com/gtk-rs/gir-files @ 48a4a23+)
diff --git a/rust-bindings/rust/sys/src/lib.rs b/rust-bindings/rust/sys/src/lib.rs
index 9dbba33b..80e1a5ce 100644
--- a/rust-bindings/rust/sys/src/lib.rs
+++ b/rust-bindings/rust/sys/src/lib.rs
@@ -57,9 +57,6 @@ pub const OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY: OstreeGpgSignatureAttr
pub const OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP: OstreeGpgSignatureAttr = 13;
pub const OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY: OstreeGpgSignatureAttr = 14;
-pub type OstreeGpgSignatureFormatFlags = c_int;
-pub const OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT: OstreeGpgSignatureFormatFlags = 0;
-
pub type OstreeObjectType = c_int;
pub const OSTREE_OBJECT_TYPE_FILE: OstreeObjectType = 1;
pub const OSTREE_OBJECT_TYPE_DIR_TREE: OstreeObjectType = 2;
@@ -100,11 +97,6 @@ pub const OSTREE_REPO_MODE_ARCHIVE_Z2: OstreeRepoMode = 1;
pub const OSTREE_REPO_MODE_BARE_USER: OstreeRepoMode = 2;
pub const OSTREE_REPO_MODE_BARE_USER_ONLY: OstreeRepoMode = 3;
-pub type OstreeRepoPruneFlags = c_int;
-pub const OSTREE_REPO_PRUNE_FLAGS_NONE: OstreeRepoPruneFlags = 0;
-pub const OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE: OstreeRepoPruneFlags = 1;
-pub const OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY: OstreeRepoPruneFlags = 2;
-
pub type OstreeRepoRemoteChange = c_int;
pub const OSTREE_REPO_REMOTE_CHANGE_ADD: OstreeRepoRemoteChange = 0;
pub const OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS: OstreeRepoRemoteChange = 1;
@@ -118,6 +110,7 @@ pub const OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR: OstreeStaticDeltaGenerateOpt =
// Constants
pub const OSTREE_COMMIT_GVARIANT_STRING: *const c_char = b"(a{sv}aya(say)sstayay)\0" as *const u8 as *const c_char;
+pub const OSTREE_COMMIT_META_KEY_ARCHITECTURE: *const c_char = b"ostree.architecture\0" as *const u8 as *const c_char;
pub const OSTREE_COMMIT_META_KEY_COLLECTION_BINDING: *const c_char = b"ostree.collection-binding\0" as *const u8 as *const c_char;
pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE: *const c_char = b"ostree.endoflife\0" as *const u8 as *const c_char;
pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE: *const c_char = b"ostree.endoflife-rebase\0" as *const u8 as *const c_char;
@@ -133,6 +126,7 @@ pub const OSTREE_ORIGIN_TRANSIENT_GROUP: *const c_char = b"libostree-transient\0
pub const OSTREE_REPO_METADATA_REF: *const c_char = b"ostree-metadata\0" as *const u8 as *const c_char;
pub const OSTREE_SHA256_DIGEST_LEN: c_int = 32;
pub const OSTREE_SHA256_STRING_LEN: c_int = 64;
+pub const OSTREE_SIGN_NAME_ED25519: *const c_char = b"ed25519\0" as *const u8 as *const c_char;
pub const OSTREE_SUMMARY_GVARIANT_STRING: *const c_char = b"(a(s(taya{sv}))a{sv})\0" as *const u8 as *const c_char;
pub const OSTREE_SUMMARY_SIG_GVARIANT_STRING: *const c_char = b"a{sv}\0" as *const u8 as *const c_char;
pub const OSTREE_TIMESTAMP: c_int = 0;
@@ -147,6 +141,9 @@ pub type OstreeDiffFlags = c_uint;
pub const OSTREE_DIFF_FLAGS_NONE: OstreeDiffFlags = 0;
pub const OSTREE_DIFF_FLAGS_IGNORE_XATTRS: OstreeDiffFlags = 1;
+pub type OstreeGpgSignatureFormatFlags = c_uint;
+pub const OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT: OstreeGpgSignatureFormatFlags = 0;
+
pub type OstreeRepoCommitModifierFlags = c_uint;
pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE: OstreeRepoCommitModifierFlags = 0;
pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS: OstreeRepoCommitModifierFlags = 1;
@@ -176,6 +173,11 @@ pub const OSTREE_REPO_LIST_REFS_EXT_ALIASES: OstreeRepoListRefsExtFlags = 1;
pub const OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES: OstreeRepoListRefsExtFlags = 2;
pub const OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS: OstreeRepoListRefsExtFlags = 4;
+pub type OstreeRepoPruneFlags = c_uint;
+pub const OSTREE_REPO_PRUNE_FLAGS_NONE: OstreeRepoPruneFlags = 0;
+pub const OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE: OstreeRepoPruneFlags = 1;
+pub const OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY: OstreeRepoPruneFlags = 2;
+
pub type OstreeRepoPullFlags = c_uint;
pub const OSTREE_REPO_PULL_FLAGS_NONE: OstreeRepoPullFlags = 0;
pub const OSTREE_REPO_PULL_FLAGS_MIRROR: OstreeRepoPullFlags = 1;
@@ -723,6 +725,78 @@ impl ::std::fmt::Debug for OstreeRepoTransactionStats {
}
}
+#[repr(C)]
+pub struct _OstreeSignDummy(c_void);
+
+pub type OstreeSignDummy = *mut _OstreeSignDummy;
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OstreeSignDummyClass {
+ pub parent_class: gobject::GObjectClass,
+}
+
+impl ::std::fmt::Debug for OstreeSignDummyClass {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("OstreeSignDummyClass @ {:?}", self as *const _))
+ .field("parent_class", &self.parent_class)
+ .finish()
+ }
+}
+
+#[repr(C)]
+pub struct _OstreeSignEd25519(c_void);
+
+pub type OstreeSignEd25519 = *mut _OstreeSignEd25519;
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OstreeSignEd25519Class {
+ pub parent_class: gobject::GObjectClass,
+}
+
+impl ::std::fmt::Debug for OstreeSignEd25519Class {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("OstreeSignEd25519Class @ {:?}", self as *const _))
+ .field("parent_class", &self.parent_class)
+ .finish()
+ }
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct OstreeSignInterface {
+ pub g_iface: gobject::GTypeInterface,
+ pub get_name: Option *const c_char>,
+ pub data: Option gboolean>,
+ pub data_verify: Option gboolean>,
+ pub metadata_key: Option *const c_char>,
+ pub metadata_format: Option *const c_char>,
+ pub clear_keys: Option gboolean>,
+ pub set_sk: Option gboolean>,
+ pub set_pk: Option gboolean>,
+ pub add_pk: Option gboolean>,
+ pub load_pk: Option gboolean>,
+}
+
+impl ::std::fmt::Debug for OstreeSignInterface {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ f.debug_struct(&format!("OstreeSignInterface @ {:?}", self as *const _))
+ .field("g_iface", &self.g_iface)
+ .field("get_name", &self.get_name)
+ .field("data", &self.data)
+ .field("data_verify", &self.data_verify)
+ .field("metadata_key", &self.metadata_key)
+ .field("metadata_format", &self.metadata_format)
+ .field("clear_keys", &self.clear_keys)
+ .field("set_sk", &self.set_sk)
+ .field("set_pk", &self.set_pk)
+ .field("add_pk", &self.add_pk)
+ .field("load_pk", &self.load_pk)
+ .finish()
+ }
+}
+
#[repr(C)]
#[derive(Copy, Clone)]
pub struct OstreeSysrootWriteDeploymentsOpts {
@@ -904,6 +978,15 @@ impl ::std::fmt::Debug for OstreeRepoFinder {
}
}
+#[repr(C)]
+pub struct OstreeSign(c_void);
+
+impl ::std::fmt::Debug for OstreeSign {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ write!(f, "OstreeSign @ {:?}", self as *const _)
+ }
+}
+
extern "C" {
@@ -1019,6 +1102,7 @@ extern "C" {
#[cfg(any(feature = "v2017_13", feature = "dox"))]
pub fn ostree_repo_commit_modifier_set_devino_cache(modifier: *mut OstreeRepoCommitModifier, cache: *mut OstreeRepoDevInoCache);
pub fn ostree_repo_commit_modifier_set_sepolicy(modifier: *mut OstreeRepoCommitModifier, sepolicy: *mut OstreeSePolicy);
+ pub fn ostree_repo_commit_modifier_set_sepolicy_from_commit(modifier: *mut OstreeRepoCommitModifier, repo: *mut OstreeRepo, rev: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_commit_modifier_set_xattr_callback(modifier: *mut OstreeRepoCommitModifier, callback: OstreeRepoCommitModifierXattrCallback, destroy: glib::GDestroyNotify, user_data: gpointer);
pub fn ostree_repo_commit_modifier_unref(modifier: *mut OstreeRepoCommitModifier);
@@ -1465,7 +1549,6 @@ extern "C" {
pub fn ostree_sysroot_lock(self_: *mut OstreeSysroot, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_lock_async(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer);
pub fn ostree_sysroot_lock_finish(self_: *mut OstreeSysroot, result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean;
- pub fn ostree_sysroot_lock_with_mount_namespace(self_: *mut OstreeSysroot, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_origin_new_from_refspec(self_: *mut OstreeSysroot, refspec: *const c_char) -> *mut glib::GKeyFile;
pub fn ostree_sysroot_prepare_cleanup(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_7", feature = "dox"))]
@@ -1514,6 +1597,58 @@ extern "C" {
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub fn ostree_repo_finder_resolve_finish(self_: *mut OstreeRepoFinder, result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> *mut glib::GPtrArray;
+ //=========================================================================
+ // OstreeSign
+ //=========================================================================
+ pub fn ostree_sign_get_type() -> GType;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_get_all() -> *mut glib::GPtrArray;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_get_by_name(name: *const c_char, error: *mut *mut glib::GError) -> *mut OstreeSign;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_add_pk(self_: *mut OstreeSign, public_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_clear_keys(self_: *mut OstreeSign, error: *mut *mut glib::GError) -> gboolean;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_commit(self_: *mut OstreeSign, repo: *mut OstreeRepo, commit_checksum: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_commit_verify(self_: *mut OstreeSign, repo: *mut OstreeRepo, commit_checksum: *const c_char, out_success_message: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_data(self_: *mut OstreeSign, data: *mut glib::GBytes, signature: *mut *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_data_verify(self_: *mut OstreeSign, data: *mut glib::GBytes, signatures: *mut glib::GVariant, out_success_message: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_dummy_add_pk(self_: *mut OstreeSign, key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_dummy_data(self_: *mut OstreeSign, data: *mut glib::GBytes, signature: *mut *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_dummy_data_verify(self_: *mut OstreeSign, data: *mut glib::GBytes, signatures: *mut glib::GVariant, success_message: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_dummy_get_name(self_: *mut OstreeSign) -> *const c_char;
+ pub fn ostree_sign_dummy_metadata_format(self_: *mut OstreeSign) -> *const c_char;
+ pub fn ostree_sign_dummy_metadata_key(self_: *mut OstreeSign) -> *const c_char;
+ pub fn ostree_sign_dummy_set_pk(self_: *mut OstreeSign, key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_dummy_set_sk(self_: *mut OstreeSign, key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_ed25519_add_pk(self_: *mut OstreeSign, public_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_ed25519_clear_keys(self_: *mut OstreeSign, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_ed25519_data(self_: *mut OstreeSign, data: *mut glib::GBytes, signature: *mut *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_ed25519_data_verify(self_: *mut OstreeSign, data: *mut glib::GBytes, signatures: *mut glib::GVariant, out_success_message: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_ed25519_get_name(self_: *mut OstreeSign) -> *const c_char;
+ pub fn ostree_sign_ed25519_load_pk(self_: *mut OstreeSign, options: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_ed25519_metadata_format(self_: *mut OstreeSign) -> *const c_char;
+ pub fn ostree_sign_ed25519_metadata_key(self_: *mut OstreeSign) -> *const c_char;
+ pub fn ostree_sign_ed25519_set_pk(self_: *mut OstreeSign, public_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_ed25519_set_sk(self_: *mut OstreeSign, secret_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_get_name(self_: *mut OstreeSign) -> *const c_char;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_load_pk(self_: *mut OstreeSign, options: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_metadata_format(self_: *mut OstreeSign) -> *const c_char;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_metadata_key(self_: *mut OstreeSign) -> *const c_char;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_set_pk(self_: *mut OstreeSign, public_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ #[cfg(any(feature = "v2020_2", feature = "dox"))]
+ pub fn ostree_sign_set_sk(self_: *mut OstreeSign, secret_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean;
+ pub fn ostree_sign_summary(self_: *mut OstreeSign, repo: *mut OstreeRepo, keys: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
+
//=========================================================================
// Other functions
//=========================================================================
@@ -1548,6 +1683,7 @@ extern "C" {
#[cfg(any(feature = "v2020_1", feature = "dox"))]
pub fn ostree_commit_get_object_sizes(commit_variant: *mut glib::GVariant, out_sizes_entries: *mut *mut glib::GPtrArray, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_commit_get_parent(commit_variant: *mut glib::GVariant) -> *mut c_char;
+ #[cfg(any(feature = "v2016_3", feature = "dox"))]
pub fn ostree_commit_get_timestamp(commit_variant: *mut glib::GVariant) -> u64;
pub fn ostree_content_file_parse(compressed: gboolean, content_path: *mut gio::GFile, trusted: gboolean, out_input: *mut *mut gio::GInputStream, out_file_info: *mut *mut gio::GFileInfo, out_xattrs: *mut *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_content_file_parse_at(compressed: gboolean, parent_dfd: c_int, path: *const c_char, trusted: gboolean, out_input: *mut *mut gio::GInputStream, out_file_info: *mut *mut gio::GFileInfo, out_xattrs: *mut *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
diff --git a/rust-bindings/rust/sys/tests/abi.rs b/rust-bindings/rust/sys/tests/abi.rs
index 0d0e6ec7..5e22cb11 100644
--- a/rust-bindings/rust/sys/tests/abi.rs
+++ b/rust-bindings/rust/sys/tests/abi.rs
@@ -282,6 +282,9 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[
("OstreeRepoResolveRevExtFlags", Layout {size: size_of::(), alignment: align_of::()}),
("OstreeRepoTransactionStats", Layout {size: size_of::(), alignment: align_of::()}),
("OstreeSePolicyRestoreconFlags", Layout {size: size_of::(), alignment: align_of::()}),
+ ("OstreeSignDummyClass", Layout {size: size_of::(), alignment: align_of::()}),
+ ("OstreeSignEd25519Class", Layout {size: size_of::(), alignment: align_of::()}),
+ ("OstreeSignInterface", Layout {size: size_of::(), alignment: align_of::()}),
("OstreeStaticDeltaGenerateOpt", Layout {size: size_of::(), alignment: align_of::()}),
("OstreeSysrootSimpleWriteDeploymentFlags", Layout {size: size_of::(), alignment: align_of::()}),
("OstreeSysrootUpgraderFlags", Layout {size: size_of::(), alignment: align_of::()}),
@@ -293,6 +296,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(guint) OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS", "1"),
("(guint) OSTREE_CHECKSUM_FLAGS_NONE", "0"),
("OSTREE_COMMIT_GVARIANT_STRING", "(a{sv}aya(say)sstayay)"),
+ ("OSTREE_COMMIT_META_KEY_ARCHITECTURE", "ostree.architecture"),
("OSTREE_COMMIT_META_KEY_COLLECTION_BINDING", "ostree.collection-binding"),
("OSTREE_COMMIT_META_KEY_ENDOFLIFE", "ostree.endoflife"),
("OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE", "ostree.endoflife-rebase"),
@@ -327,7 +331,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(gint) OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL", "11"),
("(gint) OSTREE_GPG_SIGNATURE_ATTR_USER_NAME", "10"),
("(gint) OSTREE_GPG_SIGNATURE_ATTR_VALID", "0"),
- ("(gint) OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT", "0"),
+ ("(guint) OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT", "0"),
("OSTREE_MAX_METADATA_SIZE", "10485760"),
("OSTREE_MAX_METADATA_WARN_SIZE", "7340032"),
("OSTREE_META_KEY_DEPLOY_COLLECTION_ID", "ostree.deploy-collection-id"),
@@ -378,9 +382,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(gint) OSTREE_REPO_MODE_BARE", "0"),
("(gint) OSTREE_REPO_MODE_BARE_USER", "2"),
("(gint) OSTREE_REPO_MODE_BARE_USER_ONLY", "3"),
- ("(gint) OSTREE_REPO_PRUNE_FLAGS_NONE", "0"),
- ("(gint) OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE", "1"),
- ("(gint) OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY", "2"),
+ ("(guint) OSTREE_REPO_PRUNE_FLAGS_NONE", "0"),
+ ("(guint) OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE", "1"),
+ ("(guint) OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY", "2"),
("(guint) OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES", "8"),
("(guint) OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY", "2"),
("(guint) OSTREE_REPO_PULL_FLAGS_MIRROR", "1"),
@@ -399,6 +403,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(guint) OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE", "0"),
("OSTREE_SHA256_DIGEST_LEN", "32"),
("OSTREE_SHA256_STRING_LEN", "64"),
+ ("OSTREE_SIGN_NAME_ED25519", "ed25519"),
("(gint) OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY", "0"),
("(gint) OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR", "1"),
("OSTREE_SUMMARY_GVARIANT_STRING", "(a(s(taya{sv}))a{sv})"),