Update to 2021.2
Sync to https://github.com/ostreedev/ostree/releases/tag/v2021.2
This commit is contained in:
parent
9bb0dd3c4d
commit
7d15179670
|
|
@ -90,3 +90,4 @@ v2020_4 = ["v2020_2", "ostree-sys/v2020_4"]
|
|||
v2020_7 = ["v2020_4", "ostree-sys/v2020_7"]
|
||||
v2020_8 = ["v2020_7", "ostree-sys/v2020_8"]
|
||||
v2021_1 = ["v2020_8", "ostree-sys/v2021_1"]
|
||||
v2021_2 = ["v2020_1", "ostree-sys/v2021_2"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
GIR_REPO := https://github.com/gtk-rs/gir.git
|
||||
GIR_VERSION := 2d1ffab19eb5f9a2f0d7a294dbf07517dab4d989
|
||||
OSTREE_REPO := https://github.com/fkrull/ostree.git
|
||||
OSTREE_REPO := ../ostree
|
||||
OSTREE_VERSION := patch-v2021.1
|
||||
RUSTDOC_STRIPPER_VERSION := 0.1.17
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,11 @@ Cargo commands.
|
|||
|
||||
### Generated code
|
||||
Most code is generated based on the gir files using the
|
||||
[gir](https://github.com/gtk-rs/gir) tool. These parts can be regenerated using
|
||||
[gir](https://github.com/gtk-rs/gir) tool.
|
||||
|
||||
You can update `OSTree-1.0.gir` by directly copying it from a local ostree build.
|
||||
|
||||
Or, these parts can be regenerated using
|
||||
the included Makefile:
|
||||
|
||||
```ShellSession
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ generate = [
|
|||
"OSTree.AsyncProgress",
|
||||
"OSTree.BootconfigParser",
|
||||
"OSTree.ChecksumFlags",
|
||||
"OSTree.ContentWriter",
|
||||
"OSTree.CommitSizesEntry",
|
||||
"OSTree.Deployment",
|
||||
"OSTree.DeploymentUnlockedState",
|
||||
|
|
@ -71,6 +72,7 @@ manual = [
|
|||
"Gio.FileQueryInfoFlags",
|
||||
"Gio.FilterInputStream",
|
||||
"Gio.InputStream",
|
||||
"Gio.OutputStream",
|
||||
"Gio.VolumeMonitor",
|
||||
"GLib.Bytes",
|
||||
"GLib.Checksum",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,42 @@
|
|||
// 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;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct ContentWriter(Object<ostree_sys::OstreeContentWriter, ostree_sys::OstreeContentWriterClass, ContentWriterClass>) @extends gio::OutputStream;
|
||||
|
||||
match fn {
|
||||
get_type => || ostree_sys::ostree_content_writer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
pub const NONE_CONTENT_WRITER: Option<&ContentWriter> = None;
|
||||
|
||||
pub trait ContentWriterExt: 'static {
|
||||
fn finish<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<GString, glib::Error>;
|
||||
}
|
||||
|
||||
impl<O: IsA<ContentWriter>> ContentWriterExt for O {
|
||||
fn finish<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<GString, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ostree_sys::ostree_content_writer_finish(self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ContentWriter {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "ContentWriter")
|
||||
}
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ impl GpgVerifyResult {
|
|||
}
|
||||
}
|
||||
|
||||
//pub fn get(&self, signature_index: u32, attrs: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 29 }) -> Option<glib::Variant> {
|
||||
//pub fn get(&self, signature_index: u32, attrs: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 31 }) -> Option<glib::Variant> {
|
||||
// unsafe { TODO: call ostree_sys:ostree_gpg_verify_result_get() }
|
||||
//}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ pub use self::async_progress::AsyncProgressExt;
|
|||
mod bootconfig_parser;
|
||||
pub use self::bootconfig_parser::{BootconfigParser, BootconfigParserClass};
|
||||
|
||||
mod content_writer;
|
||||
pub use self::content_writer::{ContentWriter, ContentWriterClass, NONE_CONTENT_WRITER};
|
||||
pub use self::content_writer::ContentWriterExt;
|
||||
|
||||
mod deployment;
|
||||
pub use self::deployment::{Deployment, DeploymentClass};
|
||||
|
||||
|
|
@ -179,6 +183,7 @@ pub use self::constants::TREE_GVARIANT_STRING;
|
|||
#[doc(hidden)]
|
||||
pub mod traits {
|
||||
pub use super::AsyncProgressExt;
|
||||
pub use super::ContentWriterExt;
|
||||
pub use super::MutableTreeExt;
|
||||
pub use super::RepoFileExt;
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ pub trait MutableTreeExt: 'static {
|
|||
|
||||
fn get_metadata_checksum(&self) -> Option<GString>;
|
||||
|
||||
//fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 42 };
|
||||
//fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 44 };
|
||||
|
||||
fn lookup(&self, name: &str) -> Result<(GString, MutableTree), glib::Error>;
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ impl<O: IsA<MutableTree>> MutableTreeExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 42 } {
|
||||
//fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 44 } {
|
||||
// unsafe { TODO: call ostree_sys:ostree_mutable_tree_get_subdirs() }
|
||||
//}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ use std::ptr;
|
|||
use AsyncProgress;
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
use CollectionRef;
|
||||
#[cfg(any(feature = "v2021_2", feature = "dox"))]
|
||||
use ContentWriter;
|
||||
use GpgVerifyResult;
|
||||
use MutableTree;
|
||||
use ObjectType;
|
||||
|
|
@ -434,7 +436,7 @@ impl Repo {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn load_variant_if_exists(&self, objtype: ObjectType, sha256: &str) -> Result<glib::Variant, glib::Error> {
|
||||
pub fn load_variant_if_exists(&self, objtype: ObjectType, sha256: &str) -> Result<Option<glib::Variant>, glib::Error> {
|
||||
unsafe {
|
||||
let mut out_variant = ptr::null_mut();
|
||||
let mut error = ptr::null_mut();
|
||||
|
|
@ -998,6 +1000,34 @@ impl Repo {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2021_2", feature = "dox"))]
|
||||
pub fn write_regfile(&self, expected_checksum: Option<&str>, uid: u32, gid: u32, mode: u32, content_len: u64, xattrs: Option<&glib::Variant>) -> Result<ContentWriter, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ostree_sys::ostree_repo_write_regfile(self.to_glib_none().0, expected_checksum.to_glib_none().0, uid, gid, mode, content_len, xattrs.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2021_2", feature = "dox"))]
|
||||
pub fn write_regfile_inline<P: IsA<gio::Cancellable>>(&self, expected_checksum: Option<&str>, uid: u32, gid: u32, mode: u32, xattrs: Option<&glib::Variant>, buf: &[u8], cancellable: Option<&P>) -> Result<GString, glib::Error> {
|
||||
let len = buf.len() as usize;
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ostree_sys::ostree_repo_write_regfile_inline(self.to_glib_none().0, expected_checksum.to_glib_none().0, uid, gid, mode, xattrs.to_glib_none().0, buf.to_glib_none().0, len, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2021_2", feature = "dox"))]
|
||||
pub fn write_symlink<P: IsA<gio::Cancellable>>(&self, expected_checksum: Option<&str>, uid: u32, gid: u32, xattrs: Option<&glib::Variant>, symlink_target: &str, cancellable: Option<&P>) -> Result<GString, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ostree_sys::ostree_repo_write_symlink(self.to_glib_none().0, expected_checksum.to_glib_none().0, uid, gid, xattrs.to_glib_none().0, symlink_target.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_remotes_config_dir(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 9fe8b26)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ e4bcf9b+)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ dox = []
|
|||
v2020_7 = ["v2020_4"]
|
||||
v2020_8 = ["v2020_7"]
|
||||
v2021_1 = ["v2020_8"]
|
||||
v2021_2 = ["v2021_1"]
|
||||
|
||||
[lib]
|
||||
name = "ostree_sys"
|
||||
|
|
@ -115,3 +116,4 @@ v2020_4 = "2020.4"
|
|||
v2020_7 = "2020.7"
|
||||
v2020_8 = "2020.8"
|
||||
v2021_1 = "2021.1"
|
||||
v2021_2 = "2021.2"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 9fe8b26)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ e4bcf9b+)
|
||||
|
|
|
|||
|
|
@ -306,6 +306,20 @@ impl ::std::fmt::Debug for OstreeCommitSizesEntry {
|
|||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct OstreeContentWriterClass {
|
||||
pub parent_class: gio::GOutputStreamClass,
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for OstreeContentWriterClass {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("OstreeContentWriterClass @ {:?}", self as *const _))
|
||||
.field("parent_class", &self.parent_class)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct OstreeDiffDirsOptions {
|
||||
|
|
@ -839,6 +853,16 @@ impl ::std::fmt::Debug for OstreeBootconfigParser {
|
|||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct OstreeContentWriter(c_void);
|
||||
|
||||
impl ::std::fmt::Debug for OstreeContentWriter {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
f.debug_struct(&format!("OstreeContentWriter @ {:?}", self as *const _))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct OstreeDeployment(c_void);
|
||||
|
||||
|
|
@ -1187,6 +1211,12 @@ extern "C" {
|
|||
pub fn ostree_checksum_input_stream_get_type() -> GType;
|
||||
//pub fn ostree_checksum_input_stream_new(stream: *mut gio::GInputStream, checksum: *mut glib::GChecksum) -> /*Ignored*/*mut OstreeChecksumInputStream;
|
||||
|
||||
//=========================================================================
|
||||
// OstreeContentWriter
|
||||
//=========================================================================
|
||||
pub fn ostree_content_writer_get_type() -> GType;
|
||||
pub fn ostree_content_writer_finish(self_: *mut OstreeContentWriter, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut c_char;
|
||||
|
||||
//=========================================================================
|
||||
// OstreeDeployment
|
||||
//=========================================================================
|
||||
|
|
@ -1445,6 +1475,12 @@ extern "C" {
|
|||
pub fn ostree_repo_write_metadata_stream_trusted(self_: *mut OstreeRepo, objtype: OstreeObjectType, checksum: *const c_char, object_input: *mut gio::GInputStream, length: u64, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
|
||||
pub fn ostree_repo_write_metadata_trusted(self_: *mut OstreeRepo, objtype: OstreeObjectType, checksum: *const c_char, variant: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
|
||||
pub fn ostree_repo_write_mtree(self_: *mut OstreeRepo, mtree: *mut OstreeMutableTree, out_file: *mut *mut gio::GFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
|
||||
#[cfg(any(feature = "v2021_2", feature = "dox"))]
|
||||
pub fn ostree_repo_write_regfile(self_: *mut OstreeRepo, expected_checksum: *const c_char, uid: u32, gid: u32, mode: u32, content_len: u64, xattrs: *mut glib::GVariant, error: *mut *mut glib::GError) -> *mut OstreeContentWriter;
|
||||
#[cfg(any(feature = "v2021_2", feature = "dox"))]
|
||||
pub fn ostree_repo_write_regfile_inline(self_: *mut OstreeRepo, expected_checksum: *const c_char, uid: u32, gid: u32, mode: u32, xattrs: *mut glib::GVariant, buf: *const u8, len: size_t, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut c_char;
|
||||
#[cfg(any(feature = "v2021_2", feature = "dox"))]
|
||||
pub fn ostree_repo_write_symlink(self_: *mut OstreeRepo, expected_checksum: *const c_char, uid: u32, gid: u32, xattrs: *mut glib::GVariant, symlink_target: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut c_char;
|
||||
|
||||
//=========================================================================
|
||||
// OstreeRepoFile
|
||||
|
|
|
|||
|
|
@ -244,6 +244,7 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
|||
("OstreeCollectionRef", Layout {size: size_of::<OstreeCollectionRef>(), alignment: align_of::<OstreeCollectionRef>()}),
|
||||
("OstreeCollectionRefv", Layout {size: size_of::<OstreeCollectionRefv>(), alignment: align_of::<OstreeCollectionRefv>()}),
|
||||
("OstreeCommitSizesEntry", Layout {size: size_of::<OstreeCommitSizesEntry>(), alignment: align_of::<OstreeCommitSizesEntry>()}),
|
||||
("OstreeContentWriterClass", Layout {size: size_of::<OstreeContentWriterClass>(), alignment: align_of::<OstreeContentWriterClass>()}),
|
||||
("OstreeDeploymentUnlockedState", Layout {size: size_of::<OstreeDeploymentUnlockedState>(), alignment: align_of::<OstreeDeploymentUnlockedState>()}),
|
||||
("OstreeDiffDirsOptions", Layout {size: size_of::<OstreeDiffDirsOptions>(), alignment: align_of::<OstreeDiffDirsOptions>()}),
|
||||
("OstreeDiffFlags", Layout {size: size_of::<OstreeDiffFlags>(), alignment: align_of::<OstreeDiffFlags>()}),
|
||||
|
|
|
|||
Loading…
Reference in New Issue