From 999d239c590725acc0345611125cd26253048c2c Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Thu, 16 May 2019 21:41:38 +0200 Subject: [PATCH] Rename libostree to ostree --- rust-bindings/rust/.gitlab-ci.yml | 8 +++---- rust-bindings/rust/Cargo.toml | 6 ++--- rust-bindings/rust/LICENSE | 2 +- rust-bindings/rust/Makefile | 4 ++-- .../rust/conf/{libostree.toml => ostree.toml} | 0 rust-bindings/rust/tests/roundtrip.rs | 24 +++++++++---------- 6 files changed, 22 insertions(+), 22 deletions(-) rename rust-bindings/rust/conf/{libostree.toml => ostree.toml} (100%) diff --git a/rust-bindings/rust/.gitlab-ci.yml b/rust-bindings/rust/.gitlab-ci.yml index 7bcb7044..8ee85051 100644 --- a/rust-bindings/rust/.gitlab-ci.yml +++ b/rust-bindings/rust/.gitlab-ci.yml @@ -31,20 +31,20 @@ publish_ostree-sys: - cargo publish --verbose --manifest-path sys/Cargo.toml --token $CRATES_IO_TOKEN when: manual -# libostree -libostree: +# ostree +ostree: stage: build script: - cargo test --verbose --all-features -libostree_nightly: +ostree_nightly: stage: build image: rustlang/rust:nightly script: - cargo test --verbose --all-features allow_failure: true -publish_libostree: +publish_ostree: stage: publish script: - cargo publish --verbose --token $CRATES_IO_TOKEN diff --git a/rust-bindings/rust/Cargo.toml b/rust-bindings/rust/Cargo.toml index 99ad529c..bb293dbb 100644 --- a/rust-bindings/rust/Cargo.toml +++ b/rust-bindings/rust/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "libostree" +name = "ostree" version = "0.2.0" authors = ["Felix Krull"] @@ -7,7 +7,7 @@ license = "MIT" description = "Rust bindings for libostree" keywords = ["ostree", "libostree"] -documentation = "https://fkrull.gitlab.io/ostree-rs/libostree" +documentation = "https://fkrull.gitlab.io/ostree-rs/ostree" repository = "https://gitlab.com/fkrull/ostree-rs" readme = "README.md" @@ -25,7 +25,7 @@ features = ["dox"] repository = "fkrull/ostree-rs" [lib] -name = "libostree" +name = "ostree" [dependencies] libc = "0.2" diff --git a/rust-bindings/rust/LICENSE b/rust-bindings/rust/LICENSE index b2b123aa..95f6e9df 100644 --- a/rust-bindings/rust/LICENSE +++ b/rust-bindings/rust/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Felix Krull +Copyright (c) 2018, 2019 Felix Krull Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rust-bindings/rust/Makefile b/rust-bindings/rust/Makefile index e0858033..04fbe7fb 100644 --- a/rust-bindings/rust/Makefile +++ b/rust-bindings/rust/Makefile @@ -1,4 +1,4 @@ -all: gir/libostree gir/ostree-sys +all: gir/ostree gir/ostree-sys .PHONY: update-gir-files @@ -16,7 +16,7 @@ target/tools/bin/rustdoc-stripper: cargo install --root target/tools -- rustdoc-stripper merge-lgpl-docs: target/tools/bin/gir target/tools/bin/rustdoc-stripper - target/tools/bin/gir -c conf/libostree.toml -m doc + target/tools/bin/gir -c conf/ostree.toml -m doc target/tools/bin/rustdoc-stripper -g -o target/vendor.md diff --git a/rust-bindings/rust/conf/libostree.toml b/rust-bindings/rust/conf/ostree.toml similarity index 100% rename from rust-bindings/rust/conf/libostree.toml rename to rust-bindings/rust/conf/ostree.toml diff --git a/rust-bindings/rust/tests/roundtrip.rs b/rust-bindings/rust/tests/roundtrip.rs index d8bdbed2..1093a3f1 100644 --- a/rust-bindings/rust/tests/roundtrip.rs +++ b/rust-bindings/rust/tests/roundtrip.rs @@ -1,17 +1,17 @@ extern crate gio; extern crate glib; -extern crate libostree; +extern crate ostree; extern crate tempfile; use glib::prelude::*; -use libostree::prelude::*; +use ostree::prelude::*; use std::fs; use std::io; use std::io::Write; -fn create_repo(repodir: &tempfile::TempDir) -> Result { - let repo = libostree::Repo::new_for_path(repodir.path()); - repo.create(libostree::RepoMode::Archive, None)?; +fn create_repo(repodir: &tempfile::TempDir) -> Result { + let repo = ostree::Repo::new_for_path(repodir.path()); + repo.create(ostree::RepoMode::Archive, None)?; Ok(repo) } @@ -23,17 +23,17 @@ fn create_test_file(treedir: &tempfile::TempDir) -> Result<(), io::Error> { fn create_mtree( treedir: &tempfile::TempDir, - repo: &libostree::Repo, -) -> Result { + repo: &ostree::Repo, +) -> Result { let gfile = gio::File::new_for_path(treedir.path()); - let mtree = libostree::MutableTree::new(); + let mtree = ostree::MutableTree::new(); repo.write_directory_to_mtree(&gfile, &mtree, None, None)?; Ok(mtree) } fn commit_mtree( - repo: &libostree::Repo, - mtree: &libostree::MutableTree, + repo: &ostree::Repo, + mtree: &ostree::MutableTree, ) -> Result { repo.prepare_transaction(None)?; let repo_file = repo.write_mtree(mtree, None)?.downcast().unwrap(); @@ -43,8 +43,8 @@ fn commit_mtree( Ok(checksum) } -fn open_repo(repodir: &tempfile::TempDir) -> Result { - let repo = libostree::Repo::new_for_path(repodir.path()); +fn open_repo(repodir: &tempfile::TempDir) -> Result { + let repo = ostree::Repo::new_for_path(repodir.path()); repo.open(None)?; Ok(repo) }