From 947f0adf09f41147a161a13deaced198f2c357c6 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Wed, 18 Oct 2023 07:46:12 +0000 Subject: [PATCH 1/4] cargo: update package information Add dbs-snapshot specific information. Signed-off-by: Peng Tao --- Cargo.toml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ffd73d5a280..62b5df90d7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,16 @@ [package] -name = "snapshot" -version = "0.1.0" -authors = ["Amazon Firecracker team "] +name = "dbs-snapshot" +version = "1.5.0" +authors = [ + "Amazon Firecracker team ", + "Kata Containers Developers", +] edition = "2021" autobenches = false license = "Apache-2.0" +readme = "README.md" +repository = "https://github.com/kata-containers/dbs-snapshot" +homepage = "https://github.com/kata-containers/dbs-snapshot" [lib] bench = false From 16ac4b1d3fec1947202426b0b8d642bb7085fba6 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Wed, 18 Oct 2023 08:16:18 +0000 Subject: [PATCH 2/4] readme: add initial readme Add some basic introduction. Signed-off-by: Peng Tao --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000000..d13b9e31e85 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# dbs-snapshot + +`dbs-snapshot` is a fork of [Firecracker microvmm's](https://github.com/firecracker-microvm/firecracker) `snapshot` crate. It was done so because the Firecracker maintainers [have no plan to publish the crate on crates.io](https://github.com/firecracker-microvm/firecracker/issues/4162). + +`dbs-snapshot` provides a version tolerant serialization and deserialization facilities and implements a persistent storage format for saving rust struct states. It can form a basis of many useful functionalities such as VM snapshot for rust-based VMMs, as well as user space program live upgrade for other projects like [Nydus](https://github.com/dragonflyoss/image-service/). + +# Disclaimer + +Please note that the crate is released from v1.5.0 because that is the initial Firecracker release version the crate was taken from. + +We will use sematic versioning. The API backward-compatibilites will always be reserved across patch version updates. The backward-compatibilities across minor version updates will be preserved in a best effort manner. Whenever API backward-compatibility is broken on purpose, we will bump the major version. From 38858ab694a960d89b7e76102d3c1906077d86e1 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Wed, 18 Oct 2023 08:18:30 +0000 Subject: [PATCH 3/4] gha: add auto release We release upon tagging. Signed-off-by: Peng Tao --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000..469ec572bf9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release + +on: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+ + +env: + CARGO_TERM_COLOR: always + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Publish + run: | + sudo apt-get update && sudo apt-get install --yes sed + VERSION=$(sed --regexp-extended --silent 's/^version = \"(.*)"$/\1/p' Cargo.toml) + [ "$GITHUB_REF_NAME" == "v$VERSION" ] + cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} + - name: Release + uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true From 4eaf86508865d6c2506783c5ce3a8fa7310b15c6 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Wed, 18 Oct 2023 08:31:33 +0000 Subject: [PATCH 4/4] bench/test: update package name It is dbs_snapshot now. Signed-off-by: Peng Tao --- benches/version_map.rs | 2 +- tests/test.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benches/version_map.rs b/benches/version_map.rs index ea3c38b86d7..b46e8f8910e 100644 --- a/benches/version_map.rs +++ b/benches/version_map.rs @@ -1,7 +1,7 @@ // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use snapshot::Snapshot; +use dbs_snapshot::Snapshot; use versionize::{VersionMap, Versionize, VersionizeResult}; use versionize_derive::Versionize; diff --git a/tests/test.rs b/tests/test.rs index 37d552eed12..da438b5b246 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,6 +1,6 @@ // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -use snapshot::{Error, Snapshot}; +use dbs_snapshot::{Error, Snapshot}; use versionize::{VersionMap, Versionize, VersionizeError, VersionizeResult}; use versionize_derive::Versionize;