Update to OSTree 2020.4

This commit is contained in:
Felix Krull 2020-08-25 18:36:37 +02:00 committed by Colin Walters
parent d7156df1da
commit aee92d14a8
15 changed files with 2958 additions and 963 deletions

View File

@ -47,6 +47,9 @@ generate = [
"OSTree.RepoPullFlags",
"OSTree.RepoRemoteChange",
"OSTree.RepoResolveRevExtFlags",
"OSTree.Sign",
"OSTree.SignDummy",
"OSTree.SignEd25519",
"OSTree.SePolicy",
"OSTree.SePolicyRestoreconFlags",
"OSTree.StaticDeltaGenerateOpt",

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,8 @@ use ostree_sys;
use std::ffi::CStr;
pub static COMMIT_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_COMMIT_GVARIANT_STRING).to_str().unwrap()});
#[cfg(any(feature = "v2020_4", feature = "dox"))]
pub static COMMIT_META_KEY_ARCHITECTURE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_COMMIT_META_KEY_ARCHITECTURE).to_str().unwrap()});
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub static COMMIT_META_KEY_COLLECTION_BINDING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_COMMIT_META_KEY_COLLECTION_BINDING).to_str().unwrap()});
#[cfg(any(feature = "v2017_7", feature = "dox"))]
@ -26,6 +28,7 @@ pub static META_KEY_DEPLOY_COLLECTION_ID: once_cell::sync::Lazy<&'static str> =
pub static ORIGIN_TRANSIENT_GROUP: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_ORIGIN_TRANSIENT_GROUP).to_str().unwrap()});
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub static REPO_METADATA_REF: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_REPO_METADATA_REF).to_str().unwrap()});
pub static SIGN_NAME_ED25519: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_SIGN_NAME_ED25519).to_str().unwrap()});
pub static SUMMARY_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_SUMMARY_GVARIANT_STRING).to_str().unwrap()});
pub static SUMMARY_SIG_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_SUMMARY_SIG_GVARIANT_STRING).to_str().unwrap()});
pub static TREE_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_TREE_GVARIANT_STRING).to_str().unwrap()});

View File

@ -150,46 +150,6 @@ impl FromGlib<ostree_sys::OstreeGpgSignatureAttr> for GpgSignatureAttr {
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]
pub enum GpgSignatureFormatFlags {
GpgSignatureFormatDefault,
#[doc(hidden)]
__Unknown(i32),
}
impl fmt::Display for GpgSignatureFormatFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "GpgSignatureFormatFlags::{}", match *self {
GpgSignatureFormatFlags::GpgSignatureFormatDefault => "GpgSignatureFormatDefault",
_ => "Unknown",
})
}
}
#[doc(hidden)]
impl ToGlib for GpgSignatureFormatFlags {
type GlibType = ostree_sys::OstreeGpgSignatureFormatFlags;
fn to_glib(&self) -> ostree_sys::OstreeGpgSignatureFormatFlags {
match *self {
GpgSignatureFormatFlags::GpgSignatureFormatDefault => ostree_sys::OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT,
GpgSignatureFormatFlags::__Unknown(value) => value
}
}
}
#[doc(hidden)]
impl FromGlib<ostree_sys::OstreeGpgSignatureFormatFlags> for GpgSignatureFormatFlags {
fn from_glib(value: ostree_sys::OstreeGpgSignatureFormatFlags) -> Self {
match value {
0 => GpgSignatureFormatFlags::GpgSignatureFormatDefault,
value => GpgSignatureFormatFlags::__Unknown(value),
}
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]
@ -546,54 +506,6 @@ impl FromGlib<ostree_sys::OstreeRepoMode> for RepoMode {
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]
pub enum RepoPruneFlags {
None,
NoPrune,
RefsOnly,
#[doc(hidden)]
__Unknown(i32),
}
impl fmt::Display for RepoPruneFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "RepoPruneFlags::{}", match *self {
RepoPruneFlags::None => "None",
RepoPruneFlags::NoPrune => "NoPrune",
RepoPruneFlags::RefsOnly => "RefsOnly",
_ => "Unknown",
})
}
}
#[doc(hidden)]
impl ToGlib for RepoPruneFlags {
type GlibType = ostree_sys::OstreeRepoPruneFlags;
fn to_glib(&self) -> ostree_sys::OstreeRepoPruneFlags {
match *self {
RepoPruneFlags::None => ostree_sys::OSTREE_REPO_PRUNE_FLAGS_NONE,
RepoPruneFlags::NoPrune => ostree_sys::OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE,
RepoPruneFlags::RefsOnly => ostree_sys::OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY,
RepoPruneFlags::__Unknown(value) => value
}
}
}
#[doc(hidden)]
impl FromGlib<ostree_sys::OstreeRepoPruneFlags> for RepoPruneFlags {
fn from_glib(value: ostree_sys::OstreeRepoPruneFlags) -> Self {
match value {
0 => RepoPruneFlags::None,
1 => RepoPruneFlags::NoPrune,
2 => RepoPruneFlags::RefsOnly,
value => RepoPruneFlags::__Unknown(value),
}
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]

View File

@ -61,6 +61,28 @@ impl FromGlib<ostree_sys::OstreeDiffFlags> for DiffFlags {
}
}
bitflags! {
pub struct GpgSignatureFormatFlags: u32 {
const GPG_SIGNATURE_FORMAT_DEFAULT = 0;
}
}
#[doc(hidden)]
impl ToGlib for GpgSignatureFormatFlags {
type GlibType = ostree_sys::OstreeGpgSignatureFormatFlags;
fn to_glib(&self) -> ostree_sys::OstreeGpgSignatureFormatFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ostree_sys::OstreeGpgSignatureFormatFlags> for GpgSignatureFormatFlags {
fn from_glib(value: ostree_sys::OstreeGpgSignatureFormatFlags) -> GpgSignatureFormatFlags {
GpgSignatureFormatFlags::from_bits_truncate(value)
}
}
bitflags! {
pub struct RepoCommitModifierFlags: u32 {
const NONE = 0;
@ -188,6 +210,30 @@ impl FromGlib<ostree_sys::OstreeRepoListRefsExtFlags> for RepoListRefsExtFlags {
}
}
bitflags! {
pub struct RepoPruneFlags: u32 {
const NONE = 0;
const NO_PRUNE = 1;
const REFS_ONLY = 2;
}
}
#[doc(hidden)]
impl ToGlib for RepoPruneFlags {
type GlibType = ostree_sys::OstreeRepoPruneFlags;
fn to_glib(&self) -> ostree_sys::OstreeRepoPruneFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ostree_sys::OstreeRepoPruneFlags> for RepoPruneFlags {
fn from_glib(value: ostree_sys::OstreeRepoPruneFlags) -> RepoPruneFlags {
RepoPruneFlags::from_bits_truncate(value)
}
}
bitflags! {
pub struct RepoPullFlags: u32 {
const NONE = 0;

View File

@ -120,6 +120,7 @@ pub fn commit_get_parent(commit_variant: &glib::Variant) -> Option<GString> {
}
}
#[cfg(any(feature = "v2016_3", feature = "dox"))]
pub fn commit_get_timestamp(commit_variant: &glib::Variant) -> u64 {
unsafe {
ostree_sys::ostree_commit_get_timestamp(commit_variant.to_glib_none().0)

View File

@ -62,6 +62,10 @@ pub use self::repo_finder_override::RepoFinderOverrideExt;
mod se_policy;
pub use self::se_policy::{SePolicy, SePolicyClass};
mod sign;
pub use self::sign::{Sign, NONE_SIGN};
pub use self::sign::SignExt;
mod sysroot;
pub use self::sysroot::{Sysroot, SysrootClass};
@ -98,7 +102,6 @@ pub use self::repo_transaction_stats::RepoTransactionStats;
mod enums;
pub use self::enums::DeploymentUnlockedState;
pub use self::enums::GpgSignatureAttr;
pub use self::enums::GpgSignatureFormatFlags;
pub use self::enums::ObjectType;
#[cfg(any(feature = "v2018_2", feature = "dox"))]
pub use self::enums::RepoCheckoutFilterResult;
@ -107,7 +110,6 @@ pub use self::enums::RepoCheckoutOverwriteMode;
pub use self::enums::RepoCommitFilterResult;
pub use self::enums::RepoCommitIterResult;
pub use self::enums::RepoMode;
pub use self::enums::RepoPruneFlags;
pub use self::enums::RepoRemoteChange;
pub use self::enums::StaticDeltaGenerateOpt;
@ -115,12 +117,14 @@ mod flags;
#[cfg(any(feature = "v2017_13", feature = "dox"))]
pub use self::flags::ChecksumFlags;
pub use self::flags::DiffFlags;
pub use self::flags::GpgSignatureFormatFlags;
pub use self::flags::RepoCommitModifierFlags;
#[cfg(any(feature = "v2015_7", feature = "dox"))]
pub use self::flags::RepoCommitState;
pub use self::flags::RepoCommitTraverseFlags;
pub use self::flags::RepoListObjectsFlags;
pub use self::flags::RepoListRefsExtFlags;
pub use self::flags::RepoPruneFlags;
pub use self::flags::RepoPullFlags;
pub use self::flags::RepoResolveRevExtFlags;
pub use self::flags::SePolicyRestoreconFlags;
@ -132,6 +136,8 @@ pub mod functions;
mod constants;
pub use self::constants::COMMIT_GVARIANT_STRING;
#[cfg(any(feature = "v2020_4", feature = "dox"))]
pub use self::constants::COMMIT_META_KEY_ARCHITECTURE;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub use self::constants::COMMIT_META_KEY_COLLECTION_BINDING;
#[cfg(any(feature = "v2017_7", feature = "dox"))]
@ -152,6 +158,7 @@ pub use self::constants::META_KEY_DEPLOY_COLLECTION_ID;
pub use self::constants::ORIGIN_TRANSIENT_GROUP;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub use self::constants::REPO_METADATA_REF;
pub use self::constants::SIGN_NAME_ED25519;
pub use self::constants::SUMMARY_GVARIANT_STRING;
pub use self::constants::SUMMARY_SIG_GVARIANT_STRING;
pub use self::constants::TREE_GVARIANT_STRING;
@ -169,4 +176,5 @@ pub mod traits {
pub use super::RepoFinderMountExt;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub use super::RepoFinderOverrideExt;
pub use super::SignExt;
}

View File

@ -4,10 +4,12 @@
use gio;
use glib;
use glib::object::IsA;
use glib::translate::*;
use glib::GString;
use ostree_sys;
use std::boxed::Box as Box_;
use std::ptr;
use Repo;
use RepoCommitFilterResult;
use RepoCommitModifierFlags;
@ -65,6 +67,14 @@ impl RepoCommitModifier {
}
}
pub fn set_sepolicy_from_commit<P: IsA<gio::Cancellable>>(&self, repo: &Repo, rev: &str, cancellable: Option<&P>) -> Result<(), glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let _ = ostree_sys::ostree_repo_commit_modifier_set_sepolicy_from_commit(self.to_glib_none().0, repo.to_glib_none().0, rev.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)) }
}
}
pub fn set_xattr_callback<P: Fn(&Repo, &str, &gio::FileInfo) -> glib::Variant + 'static>(&self, callback: P) {
let callback_data: Box_<P> = Box_::new(callback);
unsafe extern "C" fn callback_func<P: Fn(&Repo, &str, &gio::FileInfo) -> 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 {

View File

@ -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<ostree_sys::OstreeSign>);
match fn {
get_type => || ostree_sys::ostree_sign_get_type(),
}
}
impl Sign {
#[cfg(any(feature = "v2020_2", feature = "dox"))]
pub fn get_all() -> Vec<Sign> {
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<Sign, glib::Error> {
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<P: IsA<gio::Cancellable>>(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&P>) -> Result<(), glib::Error>;
#[cfg(any(feature = "v2020_2", feature = "dox"))]
fn commit_verify<P: IsA<gio::Cancellable>>(&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<P: IsA<gio::Cancellable>>(&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<P: IsA<gio::Cancellable>>(&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<GString>;
fn dummy_metadata_format(&self) -> Option<GString>;
fn dummy_metadata_key(&self) -> Option<GString>;
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<P: IsA<gio::Cancellable>>(&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<GString>;
fn ed25519_load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error>;
fn ed25519_metadata_format(&self) -> Option<GString>;
fn ed25519_metadata_key(&self) -> Option<GString>;
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<GString>;
#[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<GString>;
#[cfg(any(feature = "v2020_2", feature = "dox"))]
fn metadata_key(&self) -> Option<GString>;
#[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<P: IsA<gio::Cancellable>>(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&P>) -> Result<(), glib::Error>;
}
impl<O: IsA<Sign>> 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<P: IsA<gio::Cancellable>>(&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<P: IsA<gio::Cancellable>>(&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<P: IsA<gio::Cancellable>>(&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<P: IsA<gio::Cancellable>>(&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<GString> {
unsafe {
from_glib_none(ostree_sys::ostree_sign_dummy_get_name(self.as_ref().to_glib_none().0))
}
}
fn dummy_metadata_format(&self) -> Option<GString> {
unsafe {
from_glib_none(ostree_sys::ostree_sign_dummy_metadata_format(self.as_ref().to_glib_none().0))
}
}
fn dummy_metadata_key(&self) -> Option<GString> {
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<P: IsA<gio::Cancellable>>(&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<GString> {
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<GString> {
unsafe {
from_glib_none(ostree_sys::ostree_sign_ed25519_metadata_format(self.as_ref().to_glib_none().0))
}
}
fn ed25519_metadata_key(&self) -> Option<GString> {
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<GString> {
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<GString> {
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<GString> {
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<P: IsA<gio::Cancellable>>(&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")
}
}

View File

@ -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<glib::KeyFile> {
unsafe {
from_glib_full(ostree_sys::ostree_sysroot_origin_new_from_refspec(self.to_glib_none().0, refspec.to_glib_none().0))

View File

@ -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+)

View File

@ -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"

View File

@ -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+)

View File

@ -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<unsafe extern "C" fn(*mut OstreeSign) -> *const c_char>,
pub data: Option<unsafe extern "C" fn(*mut OstreeSign, *mut glib::GBytes, *mut *mut glib::GBytes, *mut gio::GCancellable, *mut *mut glib::GError) -> gboolean>,
pub data_verify: Option<unsafe extern "C" fn(*mut OstreeSign, *mut glib::GBytes, *mut glib::GVariant, *mut *mut c_char, *mut *mut glib::GError) -> gboolean>,
pub metadata_key: Option<unsafe extern "C" fn(*mut OstreeSign) -> *const c_char>,
pub metadata_format: Option<unsafe extern "C" fn(*mut OstreeSign) -> *const c_char>,
pub clear_keys: Option<unsafe extern "C" fn(*mut OstreeSign, *mut *mut glib::GError) -> gboolean>,
pub set_sk: Option<unsafe extern "C" fn(*mut OstreeSign, *mut glib::GVariant, *mut *mut glib::GError) -> gboolean>,
pub set_pk: Option<unsafe extern "C" fn(*mut OstreeSign, *mut glib::GVariant, *mut *mut glib::GError) -> gboolean>,
pub add_pk: Option<unsafe extern "C" fn(*mut OstreeSign, *mut glib::GVariant, *mut *mut glib::GError) -> gboolean>,
pub load_pk: Option<unsafe extern "C" fn(*mut OstreeSign, *mut glib::GVariant, *mut *mut glib::GError) -> 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;

View File

@ -282,6 +282,9 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[
("OstreeRepoResolveRevExtFlags", Layout {size: size_of::<OstreeRepoResolveRevExtFlags>(), alignment: align_of::<OstreeRepoResolveRevExtFlags>()}),
("OstreeRepoTransactionStats", Layout {size: size_of::<OstreeRepoTransactionStats>(), alignment: align_of::<OstreeRepoTransactionStats>()}),
("OstreeSePolicyRestoreconFlags", Layout {size: size_of::<OstreeSePolicyRestoreconFlags>(), alignment: align_of::<OstreeSePolicyRestoreconFlags>()}),
("OstreeSignDummyClass", Layout {size: size_of::<OstreeSignDummyClass>(), alignment: align_of::<OstreeSignDummyClass>()}),
("OstreeSignEd25519Class", Layout {size: size_of::<OstreeSignEd25519Class>(), alignment: align_of::<OstreeSignEd25519Class>()}),
("OstreeSignInterface", Layout {size: size_of::<OstreeSignInterface>(), alignment: align_of::<OstreeSignInterface>()}),
("OstreeStaticDeltaGenerateOpt", Layout {size: size_of::<OstreeStaticDeltaGenerateOpt>(), alignment: align_of::<OstreeStaticDeltaGenerateOpt>()}),
("OstreeSysrootSimpleWriteDeploymentFlags", Layout {size: size_of::<OstreeSysrootSimpleWriteDeploymentFlags>(), alignment: align_of::<OstreeSysrootSimpleWriteDeploymentFlags>()}),
("OstreeSysrootUpgraderFlags", Layout {size: size_of::<OstreeSysrootUpgraderFlags>(), alignment: align_of::<OstreeSysrootUpgraderFlags>()}),
@ -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})"),