diff --git a/rust-bindings/rust/Cargo.toml b/rust-bindings/rust/Cargo.toml index 227ad4ca..154453df 100644 --- a/rust-bindings/rust/Cargo.toml +++ b/rust-bindings/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libostree" -version = "0.1.1" +version = "0.2.0" authors = ["Felix Krull"] license = "MIT" @@ -36,7 +36,7 @@ gio = "0.5" glib-sys = "0.7" gobject-sys = "0.7" gio-sys = "0.7" -libostree-sys = { version = "0.1", path = "sys" } +libostree-sys = { version = "0.2", path = "sys" } [dev-dependencies] tempfile = "3" diff --git a/rust-bindings/rust/conf/libostree-sys.toml b/rust-bindings/rust/conf/libostree-sys.toml index 900b0451..38177cf0 100644 --- a/rust-bindings/rust/conf/libostree-sys.toml +++ b/rust-bindings/rust/conf/libostree-sys.toml @@ -19,6 +19,10 @@ ignore = [ "OSTree.LzmaDecompressorClass", "OSTree.RepoFileEnumeratorClass", "OSTree.RollsumMatches", + "OSTree.RELEASE_VERSION", + "OSTree.VERSION", + "OSTree.VERSION_S", + "OSTree.YEAR_VERSION", ] girs_dir = "../gir-files" diff --git a/rust-bindings/rust/conf/libostree.toml b/rust-bindings/rust/conf/libostree.toml index 52059c90..c45012ee 100644 --- a/rust-bindings/rust/conf/libostree.toml +++ b/rust-bindings/rust/conf/libostree.toml @@ -99,3 +99,7 @@ status = "generate" [[object.function]] pattern = "cmp_checksum_bytes|checksum_inplace_to_bytes" ignore = true + + [[object.constant]] + pattern = "VERSION|VERSION_S|YEAR_VERSION|RELEASE_VERSION" + ignore = true diff --git a/rust-bindings/rust/src/auto/constants.rs b/rust-bindings/rust/src/auto/constants.rs index 7e6240b7..a3031f56 100644 --- a/rust-bindings/rust/src/auto/constants.rs +++ b/rust-bindings/rust/src/auto/constants.rs @@ -55,7 +55,3 @@ lazy_static! { lazy_static! { pub static ref TREE_GVARIANT_STRING: &'static str = unsafe{CStr::from_ptr(ffi::OSTREE_TREE_GVARIANT_STRING).to_str().unwrap()}; } -#[cfg(any(feature = "v2017_4", feature = "dox"))] -lazy_static! { - pub static ref VERSION_S: &'static str = unsafe{CStr::from_ptr(ffi::OSTREE_VERSION_S).to_str().unwrap()}; -} diff --git a/rust-bindings/rust/src/auto/mod.rs b/rust-bindings/rust/src/auto/mod.rs index 59aaea84..969ec25b 100644 --- a/rust-bindings/rust/src/auto/mod.rs +++ b/rust-bindings/rust/src/auto/mod.rs @@ -88,8 +88,6 @@ pub use self::constants::REPO_METADATA_REF; pub use self::constants::SUMMARY_GVARIANT_STRING; pub use self::constants::SUMMARY_SIG_GVARIANT_STRING; pub use self::constants::TREE_GVARIANT_STRING; -#[cfg(any(feature = "v2017_4", feature = "dox"))] -pub use self::constants::VERSION_S; #[doc(hidden)] pub mod traits { diff --git a/rust-bindings/rust/sys/Cargo.toml b/rust-bindings/rust/sys/Cargo.toml index a5748512..17d9f53e 100644 --- a/rust-bindings/rust/sys/Cargo.toml +++ b/rust-bindings/rust/sys/Cargo.toml @@ -49,6 +49,6 @@ license = "MIT" links = "ostree-1" name = "libostree-sys" repository = "https://gitlab.com/fkrull/ostree-rs" -version = "0.1.5" +version = "0.2.0" [package.metadata.docs.rs] features = ["dox"] diff --git a/rust-bindings/rust/sys/src/lib.rs b/rust-bindings/rust/sys/src/lib.rs index 61384a3f..e70d101d 100644 --- a/rust-bindings/rust/sys/src/lib.rs +++ b/rust-bindings/rust/sys/src/lib.rs @@ -127,7 +127,6 @@ pub const OSTREE_FILEMETA_GVARIANT_STRING: *const c_char = b"(uuua(ayay))\0" as pub const OSTREE_MAX_METADATA_SIZE: c_int = 10485760; pub const OSTREE_MAX_METADATA_WARN_SIZE: c_int = 7340032; pub const OSTREE_ORIGIN_TRANSIENT_GROUP: *const c_char = b"libostree-transient\0" as *const u8 as *const c_char; -pub const OSTREE_RELEASE_VERSION: c_int = 8; 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; @@ -135,9 +134,6 @@ pub const OSTREE_SUMMARY_GVARIANT_STRING: *const c_char = b"(a(s(taya{sv}))a{sv} 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; pub const OSTREE_TREE_GVARIANT_STRING: *const c_char = b"(a(say)a(sayay))\0" as *const u8 as *const c_char; -pub const OSTREE_VERSION: c_double = 2018.800000; -pub const OSTREE_VERSION_S: *const c_char = b"2018.8\0" as *const u8 as *const c_char; -pub const OSTREE_YEAR_VERSION: c_int = 2018; // Flags pub type OstreeChecksumFlags = c_uint; diff --git a/rust-bindings/rust/sys/tests/abi.rs b/rust-bindings/rust/sys/tests/abi.rs index a5751a46..4e9bb10c 100644 --- a/rust-bindings/rust/sys/tests/abi.rs +++ b/rust-bindings/rust/sys/tests/abi.rs @@ -324,7 +324,6 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("OSTREE_OBJECT_TYPE_PAYLOAD_LINK", "7"), ("OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT", "5"), ("OSTREE_ORIGIN_TRANSIENT_GROUP", "libostree-transient"), - ("OSTREE_RELEASE_VERSION", "8"), ("OSTREE_REPO_CHECKOUT_FILTER_ALLOW", "0"), ("OSTREE_REPO_CHECKOUT_FILTER_SKIP", "1"), ("OSTREE_REPO_CHECKOUT_MODE_NONE", "0"), @@ -397,9 +396,6 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC", "2"), ("OSTREE_TIMESTAMP", "0"), ("OSTREE_TREE_GVARIANT_STRING", "(a(say)a(sayay))"), - ("OSTREE_VERSION", "2018.800000"), - ("OSTREE_VERSION_S", "2018.8"), - ("OSTREE_YEAR_VERSION", "2018"), ];