Skip to content

Commit e8d0894

Browse files
Superhepperionut-armtmfinkFirstyear
committed
Dependency Update
Updates all the dependencies of the crate in order to be able to use newer versions of rust and and remove old lints and checks. - Updates Rust edition to 2021 - Updates MSRV to 1.74.0 - Updates crate dependencies. - Updates lock file. - Updates minimum supported tpm2-tss version to 4.0.1. - Updates the Fedora version the CI test image is based on to 37. Co-authored-by: Ionut Mihalcea <[email protected]> Co-authored-by: Travis Finkenauer <[email protected]> Co-authored-by: William Brown <[email protected]> Signed-off-by: Jesper Brynolf <[email protected]>
1 parent 1d8337c commit e8d0894

20 files changed

+4038
-9989
lines changed

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.66.0"
1+
msrv = "1.74.0"

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Build the container
3232
run: docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tools
3333
- name: Run the container
34-
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.66.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh
34+
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.74.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh
3535
# All in one job as I think it is a big overhead to build and run the Docker
3636
# container?
3737
tests-ubuntu:
@@ -52,7 +52,7 @@ jobs:
5252
steps:
5353
- uses: actions/checkout@v2
5454
- name: Build the container
55-
run: docker build -t ubuntucontainer tss-esapi/tests/ --build-arg TPM2_TSS_VERSION=4.0.1 --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tools
55+
run: docker build -t ubuntucontainer tss-esapi/tests/ --build-arg TPM2_TSS_VERSION=4.1.3 --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tools
5656
- name: Run the container
5757
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh
5858

@@ -118,6 +118,6 @@ jobs:
118118
- name: Build the container
119119
run: docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tss
120120
- name: Check Clippy lints MSRV
121-
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.66.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh
121+
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.74.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh
122122
- name: Check Clippy lints latest
123123
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[workspace]
2-
members = ["tss-esapi", "tss-esapi-sys"]
32
resolver = "2"
3+
members = ["tss-esapi", "tss-esapi-sys"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ At the moment we test (via CI) and support the following Rust compiler versions:
99

1010
* On Ubuntu we test with:
1111
- The latest stable compiler version, as accessible through `rustup`.
12-
- The 1.66 compiler version.
13-
* On Fedora we test with the compiler version included with the Fedora 36 release.
12+
- The 1.74.0 compiler version.
13+
* On Fedora we test with the compiler version included with the Fedora 38 release.
1414
* On Fedora rawhide we test with the compiler version included.
1515

1616
If you need support for other versions of the compiler, get in touch with us to see what we can do!

tss-esapi-sys/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "tss-esapi-sys"
33
version = "0.5.0"
44
authors = ["Parsec Project Contributors"]
5-
edition = "2018"
5+
edition = "2021"
66
description = "FFI wrapper around TSS 2.0 Enhanced System API"
77
readme = "README.md"
88
keywords = ["tpm", "tss", "esys", "esapi"]
@@ -11,10 +11,10 @@ license = "Apache-2.0"
1111
repository = "https://github.com/parallaxsecond/rust-tss-esapi"
1212
documentation = "https://docs.rs/crate/tss-esapi-sys"
1313
links = "tss2-esys"
14-
rust-version = "1.66.0"
14+
rust-version = "1.74.0"
1515

1616
[build-dependencies]
17-
bindgen = { version = "0.66.1", optional = true }
17+
bindgen = { version = "0.70.1", optional = true }
1818
pkg-config = "0.3.18"
1919
target-lexicon = "0.12.0"
2020
cfg-if = "1.0.0"

tss-esapi-sys/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ must therefore link to all of them at build time.
1818

1919
The paths to the libraries are discovered using `pkg-config` - make sure they
2020
are discoverable in this way on your system. Our build script looks for
21-
`tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `3.2.2` is
21+
`tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `4.0.1` is
2222
required for all of them.
2323

2424
Having installed the open-source implementation libraries at `/usr/local/lib` (by default), it

tss-esapi-sys/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub mod tpm2_tss {
5353
fs::read_dir,
5454
path::{Path, PathBuf},
5555
};
56-
const MINIMUM_VERSION: &str = "3.2.2";
56+
const MINIMUM_VERSION: &str = "4.0.1";
5757
const PATH_ENV_VAR_NAME: &str = "TPM2_TSS_PATH";
5858

5959
/// The installed tpm2-tss libraries that are of
@@ -119,6 +119,7 @@ pub mod tpm2_tss {
119119
fn bindgen_builder(&self) -> bindgen::Builder {
120120
let mut builder = bindgen::Builder::default()
121121
.size_t_is_usize(false)
122+
.rust_target(bindgen::RustTarget::Stable_1_73) // lower or equal to MSRV.
122123
.clang_arg(self.tss2_esys.include_dir_arg())
123124
.clang_arg(self.tss2_tctildr.include_dir_arg())
124125
.clang_arg(self.tss2_mu.include_dir_arg())

tss-esapi-sys/regenerate-bindings.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set -euf -o pipefail
1111
OPENSSL_GIT="https://github.com/openssl/openssl.git"
1212
OPENSSL_VERSION="OpenSSL_1_1_1j"
1313
TPM2_TSS_GIT="https://github.com/tpm2-software/tpm2-tss.git"
14-
TPM2_TSS_VERSION="3.2.2"
14+
TPM2_TSS_VERSION="4.0.1"
1515

1616
export SYSROOT="/tmp/sysroot"
1717

0 commit comments

Comments
 (0)