From 1e05fc26af29ed79d46c5ea7d428fa129db1a06e Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 1 Aug 2023 21:31:47 -0400 Subject: [PATCH 01/32] Do not require the futures feature for dbus dependency This feature requirement could have been removed when the dependency on dbus-tokio was removed. Signed-off-by: mulhern --- Cargo.lock | 2 -- Cargo.toml | 1 - 2 files changed, 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3cd26958ed..3fef74dcb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -357,8 +357,6 @@ version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" dependencies = [ - "futures-channel", - "futures-util", "libc", "libdbus-sys", "winapi", diff --git a/Cargo.toml b/Cargo.toml index a5d379cff8..472eca36d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,7 +91,6 @@ optional = true [dependencies.dbus] version = "0.9.0" -features = ["futures"] optional = true [dependencies.dbus-tree] From e12afc013ed59e97b055984a0a7db8d2c1e2bb88 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 2 Aug 2023 16:33:46 -0400 Subject: [PATCH 02/32] Do not use default features for retry crate The default feature is random, and we do not use random retry intervals. Signed-off-by: mulhern --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 472eca36d6..cc2254e36c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -164,6 +164,7 @@ optional = true [dependencies.retry] version = "1.3.1" +default-features = false optional = true [dependencies.rpassword] From 2e924d0fc67a26c708a7f26419abb6682fa68510 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Wed, 2 Aug 2023 17:44:48 -0400 Subject: [PATCH 03/32] Update lowest supported Rust to 1.71.0 Signed-off-by: Bryan Gurney --- .github/workflows/main.yml | 4 ++-- .github/workflows/python.yml | 2 +- Cargo.toml | 2 +- stratisd_proc_macros/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f054d558f..1c68b2bf08 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -152,7 +152,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.69.0 # LOWEST SUPPORTED RUST TOOLCHAIN + toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd @@ -339,7 +339,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.69.0 # LOWEST SUPPORTED RUST TOOLCHAIN + toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 740db7abfb..ee908f7302 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -35,7 +35,7 @@ jobs: # MANDATORY CHECKS USING CURRENT DEVELOPMENT ENVIRONMENT - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN # MANDATORY CHECKS USING LOWEST SUPPORTED ENVIRONMENT PROXY - - toolchain: 1.69.0 # LOWEST SUPPORTED RUST TOOLCHAIN + - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/Cargo.toml b/Cargo.toml index cc2254e36c..4d2a23ced5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "stratisd" version = "3.5.8" authors = ["Stratis Developers "] edition = "2021" -rust-version = "1.69.0" # LOWEST SUPPORTED RUST TOOLCHAIN +rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN build = "build.rs" description = "Stratis daemon" license = "MPL-2.0" diff --git a/stratisd_proc_macros/Cargo.toml b/stratisd_proc_macros/Cargo.toml index 6a41291a98..1c70093588 100644 --- a/stratisd_proc_macros/Cargo.toml +++ b/stratisd_proc_macros/Cargo.toml @@ -3,7 +3,7 @@ name = "stratisd_proc_macros" version = "0.2.0" authors = ["Stratis Developers "] edition = "2021" -rust-version = "1.69.0" # LOWEST SUPPORTED RUST TOOLCHAIN +rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN description = "Stratis daemon procedural macros" license = "MPL-2.0" repository = "https://github.com/stratis-storage/stratisd/" From 1df007c293ffa5e71beaea97e3d59ac25fddf255 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 2 Aug 2023 19:31:36 -0400 Subject: [PATCH 04/32] Restrict min tests with feature flags We do not want to build these tests when building statically compiled executables. We do want them built when we have built the min executables. Signed-off-by: mulhern --- Cargo.toml | 1 - tests/common/mod.rs | 2 ++ tests/stratis_min.rs | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4d2a23ced5..70e8e5feb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -218,7 +218,6 @@ optional = true [dev-dependencies] assert_cmd = "2.0.8" assert_matches = "1.5.0" -env_logger = "0.10.0" loopdev = "0.4.0" predicates = "3.0.0" proptest = "1.0.0" diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 45973810d0..27b3e1b3bb 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -1,6 +1,8 @@ // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#![cfg(all(feature = "engine", feature = "min"))] mod daemon; mod logger; pub use daemon::test_with_stratisd_min_sim; diff --git a/tests/stratis_min.rs b/tests/stratis_min.rs index 48b28e50d7..e073a75e47 100644 --- a/tests/stratis_min.rs +++ b/tests/stratis_min.rs @@ -1,6 +1,9 @@ // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#![cfg(all(feature = "engine", feature = "min"))] + use assert_cmd::Command; use common::test_with_stratisd_min_sim; use predicates::prelude::predicate; From fa3c8697e6f539e7bf8e8b49042a5a27b6c9a60e Mon Sep 17 00:00:00 2001 From: John Baublitz Date: Fri, 4 Aug 2023 13:42:04 -0400 Subject: [PATCH 05/32] Fix bug in udev tests resulting from removing encrypted rollback --- tests/client-dbus/tests/udev/test_udev.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/client-dbus/tests/udev/test_udev.py b/tests/client-dbus/tests/udev/test_udev.py index 00f26123f1..4db98a31dc 100644 --- a/tests/client-dbus/tests/udev/test_udev.py +++ b/tests/client-dbus/tests/udev/test_udev.py @@ -509,13 +509,8 @@ def test_duplicate_pool_name( get_object(TOP_OBJECT) ) - blockdevs = [] for pool_uuid in variant_pool_uuids: - ( - (changed, (_, blockdevs_tmp, _)), - exit_code, - _, - ) = Manager.Methods.StartPool( + Manager.Methods.StartPool( get_object(TOP_OBJECT), { "id": pool_uuid, @@ -523,12 +518,8 @@ def test_duplicate_pool_name( "id_type": "uuid", }, ) - if exit_code == StratisdErrors.OK and changed: - blockdevs = blockdevs_tmp - wait_for_udev_count( - len(blockdevs) + len(non_luks_tokens) + len(luks_tokens) - ) + wait_for_udev_count(len(non_luks_tokens) + len(luks_tokens)) # The number of pools should never exceed one, since all the pools # previously formed in the test have the same name. @@ -554,7 +545,7 @@ def test_duplicate_pool_name( ) for pool_uuid, props in variant_pool_uuids.items(): if "key_description" in props: - ((changed, _), exit_code, _) = Manager.Methods.StartPool( + Manager.Methods.StartPool( get_object(TOP_OBJECT), { "id": pool_uuid, From b11cf69d4aea7918498949e48f1f4de549a03ade Mon Sep 17 00:00:00 2001 From: mulhern Date: Mon, 7 Aug 2023 11:53:17 -0400 Subject: [PATCH 06/32] Decompose build-all into two sub-targets Signed-off-by: mulhern --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4cf7c03766..d7131aed9e 100644 --- a/Makefile +++ b/Makefile @@ -336,9 +336,14 @@ install-daemons: ## Install all stratisd files install: install-udev-cfg install-man-cfg install-dbus-cfg install-dracut-cfg install-systemd-cfg install-binaries install-udev-binaries install-fstab-script install-daemons +## Build all Rust artifacts +build-all-rust: build build-min build-udev-utils stratis-dumpmetadata -## Build all stratisd binaries and configuration -build-all: build build-min build-udev-utils docs/stratisd.8 stratis-dumpmetadata docs/stratis-dumpmetadata.8 +## Build all man pages +build-all-man: docs/stratisd.8 docs/stratis-dumpmetadata.8 + +## Build all stratisd binaries and configuration necessary for install +build-all: build-all-rust build-all-man ## Remove installed configuration files clean-cfg: @@ -453,6 +458,8 @@ clippy: clippy-macros bloat build build-all + build-all-man + build-all-rust build-min build-udev-utils build-stratis-base32-decode From 9535b9075de406aaaa0a692a23a7bca3207f7a8b Mon Sep 17 00:00:00 2001 From: mulhern Date: Mon, 7 Aug 2023 12:01:11 -0400 Subject: [PATCH 07/32] Change -travis to -ci everywhere Signed-off-by: mulhern --- .githooks/pre-commit | 11 +++++++++-- .github/workflows/fedora.yml | 2 +- .github/workflows/main.yml | 2 +- .github/workflows/support.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- Makefile | 18 +++++++++--------- tests/client-dbus/Makefile | 4 ++-- 7 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 0170ba6d88..1c7d83f307 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -2,8 +2,15 @@ export PROFILEDIR=debug -make fmt-travis && make build && make stratis-dumpmetadata && make build-min && make test && make clippy && make yamllint && make check-typos || exit 1 +make fmt-ci && + make build && + make stratis-dumpmetadata && + make build-min && + make test && + make clippy && + make yamllint && + make check-typos || exit 1 export PYTHONPATH=$PWD/tests/client-dbus/src -cd tests/client-dbus && make fmt-travis && make lint || exit 1 +cd tests/client-dbus && make fmt-ci && make lint || exit 1 diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 85769e7a5d..b321653889 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -45,7 +45,7 @@ jobs: - task: PROFILEDIR=debug make -f Makefile stratis-dumpmetadata toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - - task: make -f Makefile docs-travis + - task: make -f Makefile docs-ci toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c68b2bf08..7e7965c71c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: include: - - task: make -f Makefile fmt-travis + - task: make -f Makefile fmt-ci toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: rustfmt - task: make -f Makefile check-typos diff --git a/.github/workflows/support.yml b/.github/workflows/support.yml index d83f8cd18f..fb01b76107 100644 --- a/.github/workflows/support.yml +++ b/.github/workflows/support.yml @@ -43,7 +43,7 @@ jobs: task: PYTHONPATH=./src make -f Makefile lint working-directory: ./tests/client-dbus - dependencies: black python3-isort - task: make -f Makefile fmt-travis + task: make -f Makefile fmt-ci working-directory: ./tests/client-dbus - dependencies: yamllint task: make -f Makefile yamllint diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 2821de7630..ebceba47e9 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -45,7 +45,7 @@ jobs: - task: PROFILEDIR=debug make -f Makefile stratis-dumpmetadata toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - - task: make -f Makefile docs-travis + - task: make -f Makefile docs-ci toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile test diff --git a/Makefile b/Makefile index d7131aed9e..f7de6dbf90 100644 --- a/Makefile +++ b/Makefile @@ -180,16 +180,16 @@ check-typos: ${HOME}/.cargo/bin/typos fmt: fmt-macros cargo fmt +## Run cargo fmt for CI jobs +fmt-ci: fmt-macros-ci + cargo fmt -- --check + ## Run cargo fmt for stratisd_proc_macros fmt-macros: cd stratisd_proc_macros && cargo fmt -## Run cargo fmt for CI jobs -fmt-travis: fmt-macros-travis - cargo fmt -- --check - ## Run cargo fmt on stratisd_proc_macros for CI jobs -fmt-macros-travis: +fmt-macros-ci: cd stratisd_proc_macros && cargo fmt -- --check ## Check shell formatting with shfmt @@ -433,7 +433,7 @@ yamllint: yamllint --strict .github/workflows/*.yml ## Build docs-rust for CI -docs-travis: docs-rust +docs-ci: docs-rust ## Build rust documentation docs-rust: @@ -471,15 +471,15 @@ clippy: clippy-macros clean-primary clippy clippy-macros + docs-ci docs-rust - docs-travis expand fmt + fmt-ci fmt-shell fmt-shell-ci - fmt-travis fmt-macros - fmt-macros-travis + fmt-macros-ci help install install-binaries diff --git a/tests/client-dbus/Makefile b/tests/client-dbus/Makefile index b1e48f3637..16fdbf7007 100644 --- a/tests/client-dbus/Makefile +++ b/tests/client-dbus/Makefile @@ -14,8 +14,8 @@ fmt: isort src tests black . -.PHONY: fmt-travis -fmt-travis: +.PHONY: fmt-ci +fmt-ci: isort --diff --check-only src tests black . --check From 062715978cf51bd51e3e46cb570b01284a7cc7c9 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Wed, 9 Aug 2023 17:40:02 -0400 Subject: [PATCH 08/32] github actions: update recommended Rust to 1.71.1 Signed-off-by: Bryan Gurney --- .github/workflows/cargo.yml | 2 +- .github/workflows/fedora.yml | 20 ++++++++++---------- .github/workflows/main.yml | 12 ++++++------ .github/workflows/python.yml | 4 ++-- .github/workflows/ubuntu.yml | 18 +++++++++--------- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 5ca3f76db4..7a9bdbe97d 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -51,7 +51,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Check out ci repo run: git clone https://github.com/stratis-storage/ci.git - name: Run comparisons of version specs with available Fedora packages diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index b321653889..70275f1426 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -34,33 +34,33 @@ jobs: matrix: include: - task: make -f Makefile clippy - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: clippy - task: PROFILEDIR=debug make -f Makefile build - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-min - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile stratis-dumpmetadata - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile docs-ci - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile test - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: >- TANG_URL=localhost make -f Makefile test-clevis-loop-should-fail - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build-min - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -95,7 +95,7 @@ jobs: matrix: include: - task: RUST_LOG=stratisd=debug make -f Makefile test-loop - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e7965c71c..d895006947 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,10 +34,10 @@ jobs: matrix: include: - task: make -f Makefile fmt-ci - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: rustfmt - task: make -f Makefile check-typos - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -74,7 +74,7 @@ jobs: TANG_URL=tang RUST_LOG=stratisd=debug make -f Makefile test-clevis-loop - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo image: fedora:38 # CURRENT DEVELOPMENT ENVIRONMENT runs-on: ubuntu-22.04 @@ -208,7 +208,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Run stratisd-min cli tests run: make test-stratisd-min - name: Run stratis-min cli tests @@ -260,7 +260,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Check out ci repo run: git clone https://github.com/stratis-storage/ci.git - name: Run ${{ matrix.task }} @@ -295,7 +295,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index ee908f7302..f8bb63fe85 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -33,7 +33,7 @@ jobs: matrix: include: # MANDATORY CHECKS USING CURRENT DEVELOPMENT ENVIRONMENT - - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN # MANDATORY CHECKS USING LOWEST SUPPORTED ENVIRONMENT PROXY - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN runs-on: ubuntu-22.04 @@ -134,7 +134,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ebceba47e9..1069aa9c8a 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -34,28 +34,28 @@ jobs: matrix: include: - task: make -f Makefile clippy - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: clippy - task: PROFILEDIR=debug make -f Makefile build - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-min - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile stratis-dumpmetadata - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile docs-ci - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile test - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build-min - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -93,7 +93,7 @@ jobs: matrix: include: - task: RUST_LOG=stratisd=debug make -f Makefile test-loop - toolchain: 1.71.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: From 92016e90f14911675cbbcb29c990ba993e346cc6 Mon Sep 17 00:00:00 2001 From: mulhern Date: Mon, 14 Aug 2023 20:08:18 -0400 Subject: [PATCH 09/32] Add cargo-auditable modification for cargo-build and rustc cargo-auditable is unused by defaut, but can be turned on by setting the AUDITABLE environment variable. cargo-auditable is not a standard cargo component, it has to be installed and in the path for all this to work. Signed-off-by: mulhern --- Makefile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f7de6dbf90..10e62cb90d 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,11 @@ +ifeq ($(origin AUDITABLE), undefined) + BUILD = build + RUSTC = rustc +else + BUILD = auditable build + RUSTC = auditable rustc +endif + ifeq ($(origin TARGET), undefined) else TARGET_ARGS = --target=${TARGET} @@ -204,7 +212,7 @@ fmt-shell-ci: build: PKG_CONFIG_ALLOW_CROSS=1 \ RUSTFLAGS="${DENY}" \ - cargo build ${RELEASE_FLAG} \ + cargo ${BUILD} ${RELEASE_FLAG} \ --bin=stratisd \ ${TARGET_ARGS} @@ -218,7 +226,7 @@ build-tests: build-min: PKG_CONFIG_ALLOW_CROSS=1 \ RUSTFLAGS="${DENY}" \ - cargo build ${RELEASE_FLAG} \ + cargo ${BUILD} ${RELEASE_FLAG} \ --bin=stratis-min --bin=stratisd-min --bin=stratis-utils \ ${SYSTEMD_FEATURES} ${TARGET_ARGS} @@ -226,7 +234,7 @@ build-min: build-stratis-str-cmp: PKG_CONFIG_ALLOW_CROSS=1 \ RUSTFLAGS="${DENY}" \ - cargo rustc ${RELEASE_FLAG} \ + cargo ${RUSTC} ${RELEASE_FLAG} \ --bin=stratis-str-cmp \ ${UDEV_FEATURES} \ ${TARGET_ARGS} \ @@ -237,7 +245,7 @@ build-stratis-str-cmp: build-stratis-base32-decode: PKG_CONFIG_ALLOW_CROSS=1 \ RUSTFLAGS="${DENY}" \ - cargo rustc ${RELEASE_FLAG} \ + cargo ${RUSTC} ${RELEASE_FLAG} \ --bin=stratis-base32-decode \ ${UDEV_FEATURES} \ ${TARGET_ARGS} \ @@ -253,21 +261,21 @@ build-udev-utils: build-stratis-str-cmp build-stratis-base32-decode stratis-dumpmetadata: PKG_CONFIG_ALLOW_CROSS=1 \ RUSTFLAGS="${DENY}" \ - cargo build ${RELEASE_FLAG} \ + cargo ${BUILD} ${RELEASE_FLAG} \ --bin=stratis-dumpmetadata ${EXTRAS_FEATURES} ${TARGET_ARGS} ## Build stratis-min for early userspace stratis-min: PKG_CONFIG_ALLOW_CROSS=1 \ RUSTFLAGS="${DENY}" \ - cargo build ${RELEASE_FLAG} \ + cargo ${BUILD} ${RELEASE_FLAG} \ --bin=stratis-min ${MIN_FEATURES} ${TARGET_ARGS} ## Build stratisd-min for early userspace stratisd-min: PKG_CONFIG_ALLOW_CROSS=1 \ RUSTFLAGS="${DENY}" \ - cargo build ${RELEASE_FLAG} \ + cargo ${BUILD} ${RELEASE_FLAG} \ --bin=stratisd-min ${SYSTEMD_FEATURES} ${TARGET_ARGS} ## Install udev configuration From 8b0e0534f2d36af74d4aeaaefc7a9ea6820e1d4d Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 15 Aug 2023 13:13:26 -0400 Subject: [PATCH 10/32] Do not do install and PATH adjustements in Makefile for typos These can be done in the GitHub Actions w/out too much trouble and removing them cleans up the Makefile. Signed-off-by: mulhern --- .github/workflows/main.yml | 3 +++ Makefile | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d895006947..6ef22047a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,6 +61,9 @@ jobs: with: components: ${{ matrix.components }} toolchain: ${{ matrix.toolchain }} + - uses: baptiste0928/cargo-install@v2 + with: + crate: typos-cli - name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain run: ${{ matrix.task }} diff --git a/Makefile b/Makefile index 10e62cb90d..242b24e9f0 100644 --- a/Makefile +++ b/Makefile @@ -156,9 +156,6 @@ ${HOME}/.cargo/bin/cargo-audit: ${HOME}/.cargo/bin/cargo-expand: cargo install cargo-expand -${HOME}/.cargo/bin/typos: - cargo install typos-cli - ## Run cargo outdated outdated: ${HOME}/.cargo/bin/cargo-outdated PATH=${HOME}/.cargo/bin:${PATH} cargo outdated @@ -181,8 +178,8 @@ expand: ${HOME}/.cargo/bin/cargo-expand PATH=${HOME}/.cargo/bin:${PATH} cargo expand --lib engine::strat_engine::pool ## Check for spelling errors -check-typos: ${HOME}/.cargo/bin/typos - PATH=${HOME}/.cargo/bin:${PATH} typos +check-typos: + typos ## Run cargo fmt fmt: fmt-macros From 2489903c78f0711c5fd0dd0719c972705dc9a640 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 15 Aug 2023 13:17:07 -0400 Subject: [PATCH 11/32] Remove Makefile entries for cargo-bloat It is no longer used. Signed-off-by: mulhern --- Makefile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Makefile b/Makefile index 242b24e9f0..180a085d79 100644 --- a/Makefile +++ b/Makefile @@ -147,9 +147,6 @@ ${HOME}/.cargo/bin/cargo-outdated: ${HOME}/.cargo/bin/cargo-license: cargo install cargo-license -${HOME}/.cargo/bin/cargo-bloat: - cargo install cargo-bloat - ${HOME}/.cargo/bin/cargo-audit: cargo install cargo-audit @@ -164,11 +161,6 @@ outdated: ${HOME}/.cargo/bin/cargo-outdated license: ${HOME}/.cargo/bin/cargo-license PATH=${HOME}/.cargo/bin:${PATH} cargo license -## Run cargo bloat -bloat: ${HOME}/.cargo/bin/cargo-bloat - PATH=${HOME}/.cargo/bin:${PATH} cargo bloat --release - PATH=${HOME}/.cargo/bin:${PATH} cargo bloat --release --crates - ## Run cargo audit audit: ${HOME}/.cargo/bin/cargo-audit PATH=${HOME}/.cargo/bin:${PATH} cargo audit -D warnings @@ -460,7 +452,6 @@ clippy: clippy-macros .PHONY: audit - bloat build build-all build-all-man From 68a6c667b59ffdd38c309f1a55e1f9da68031f72 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 15 Aug 2023 13:25:34 -0400 Subject: [PATCH 12/32] Remove expand-related targets in Makefile We were running this in our CI for a while for informational purposes, but it stopped working, and since it was removed I don't think it has been missed. Signed-off-by: mulhern --- Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Makefile b/Makefile index 180a085d79..d28bd57311 100644 --- a/Makefile +++ b/Makefile @@ -150,9 +150,6 @@ ${HOME}/.cargo/bin/cargo-license: ${HOME}/.cargo/bin/cargo-audit: cargo install cargo-audit -${HOME}/.cargo/bin/cargo-expand: - cargo install cargo-expand - ## Run cargo outdated outdated: ${HOME}/.cargo/bin/cargo-outdated PATH=${HOME}/.cargo/bin:${PATH} cargo outdated @@ -165,10 +162,6 @@ license: ${HOME}/.cargo/bin/cargo-license audit: ${HOME}/.cargo/bin/cargo-audit PATH=${HOME}/.cargo/bin:${PATH} cargo audit -D warnings -## Run cargo expand -expand: ${HOME}/.cargo/bin/cargo-expand - PATH=${HOME}/.cargo/bin:${PATH} cargo expand --lib engine::strat_engine::pool - ## Check for spelling errors check-typos: typos @@ -469,7 +462,6 @@ clippy: clippy-macros clippy-macros docs-ci docs-rust - expand fmt fmt-ci fmt-shell From 198de5fe7f19edc02dd4feccb97aa84f2495d2e9 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 15 Aug 2023 13:28:26 -0400 Subject: [PATCH 13/32] Remove outdated-related targets in Makefile We haven't used this target in a long time. Signed-off-by: mulhern --- Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Makefile b/Makefile index d28bd57311..c548468c37 100644 --- a/Makefile +++ b/Makefile @@ -141,19 +141,12 @@ CLIPPY_PEDANTIC = -D clippy::await_holding_lock \ -D clippy::verbose_bit_mask \ -D clippy::wildcard_imports -${HOME}/.cargo/bin/cargo-outdated: - cargo install cargo-outdated - ${HOME}/.cargo/bin/cargo-license: cargo install cargo-license ${HOME}/.cargo/bin/cargo-audit: cargo install cargo-audit -## Run cargo outdated -outdated: ${HOME}/.cargo/bin/cargo-outdated - PATH=${HOME}/.cargo/bin:${PATH} cargo outdated - ## Run cargo license license: ${HOME}/.cargo/bin/cargo-license PATH=${HOME}/.cargo/bin:${PATH} cargo license @@ -480,7 +473,6 @@ clippy: clippy-macros install-udev-binaries install-udev-cfg license - outdated test test-valgrind test-loop From dd6ab00cd31548ccb0cf481bb64d8b86c64b93d4 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 15 Aug 2023 13:55:56 -0400 Subject: [PATCH 14/32] Remove install and PATH setting for license target I still use the target sometimes, so it is probably worth keeping. Signed-off-by: mulhern --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c548468c37..5ebcec9d26 100644 --- a/Makefile +++ b/Makefile @@ -141,15 +141,12 @@ CLIPPY_PEDANTIC = -D clippy::await_holding_lock \ -D clippy::verbose_bit_mask \ -D clippy::wildcard_imports -${HOME}/.cargo/bin/cargo-license: - cargo install cargo-license - ${HOME}/.cargo/bin/cargo-audit: cargo install cargo-audit ## Run cargo license -license: ${HOME}/.cargo/bin/cargo-license - PATH=${HOME}/.cargo/bin:${PATH} cargo license +license: + cargo license ## Run cargo audit audit: ${HOME}/.cargo/bin/cargo-audit From b532fbacae6ffef3cee85f0314b023f4fbef06b6 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 15 Aug 2023 14:00:02 -0400 Subject: [PATCH 15/32] Remove PATH and install management for audit task Signed-off-by: mulhern --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5ebcec9d26..e649f08c13 100644 --- a/Makefile +++ b/Makefile @@ -141,16 +141,13 @@ CLIPPY_PEDANTIC = -D clippy::await_holding_lock \ -D clippy::verbose_bit_mask \ -D clippy::wildcard_imports -${HOME}/.cargo/bin/cargo-audit: - cargo install cargo-audit - ## Run cargo license license: cargo license ## Run cargo audit -audit: ${HOME}/.cargo/bin/cargo-audit - PATH=${HOME}/.cargo/bin:${PATH} cargo audit -D warnings +audit: + cargo audit -D warnings ## Check for spelling errors check-typos: From 839902db2c834ec6cf5db963d2c51e011edc5114 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Tue, 15 Aug 2023 17:02:32 -0400 Subject: [PATCH 16/32] Cargo.toml: add vendor-filter metadata Signed-off-by: Bryan Gurney --- Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 70e8e5feb9..6a34f4d2bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -267,3 +267,11 @@ udev_scripts = ["data-encoding"] [patch.crates-io.loopdev] git = "https://github.com/mulkieran/loopdev" branch = "bump-bindgen-reduce-version" + +[package.metadata.vendor-filter] +platforms = ["*-unknown-linux-gnu"] +tier = "2" +all-features = true +exclude-crate-paths = [ { name = "num_cpus", exclude = "ci" }, + { name = "libm", exclude = "ci" }, + { name = "libdbus-sys", exclude = "vendor/dbus/tools/docker" } ] From 943d30b2f1d35fb3065d8c8947df679841b7396f Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Mon, 21 Aug 2023 11:49:06 -0400 Subject: [PATCH 17/32] Update lowest supported Rust to 1.71.1 Signed-off-by: Bryan Gurney --- .github/workflows/main.yml | 4 ++-- .github/workflows/python.yml | 2 +- Cargo.toml | 2 +- stratisd_proc_macros/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ef22047a4..ef7ae0e332 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -155,7 +155,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN + toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd @@ -342,7 +342,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN + toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f8bb63fe85..c5ab719179 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -35,7 +35,7 @@ jobs: # MANDATORY CHECKS USING CURRENT DEVELOPMENT ENVIRONMENT - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN # MANDATORY CHECKS USING LOWEST SUPPORTED ENVIRONMENT PROXY - - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN + - toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/Cargo.toml b/Cargo.toml index 6a34f4d2bf..c6343dd12e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "stratisd" version = "3.5.8" authors = ["Stratis Developers "] edition = "2021" -rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN +rust-version = "1.71.1" # LOWEST SUPPORTED RUST TOOLCHAIN build = "build.rs" description = "Stratis daemon" license = "MPL-2.0" diff --git a/stratisd_proc_macros/Cargo.toml b/stratisd_proc_macros/Cargo.toml index 1c70093588..cd66f71cab 100644 --- a/stratisd_proc_macros/Cargo.toml +++ b/stratisd_proc_macros/Cargo.toml @@ -3,7 +3,7 @@ name = "stratisd_proc_macros" version = "0.2.0" authors = ["Stratis Developers "] edition = "2021" -rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN +rust-version = "1.71.1" # LOWEST SUPPORTED RUST TOOLCHAIN description = "Stratis daemon procedural macros" license = "MPL-2.0" repository = "https://github.com/stratis-storage/stratisd/" From 4d8f34f92a0764ded89c5c5eabbf7f06f9fc4739 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 22 Aug 2023 15:51:48 -0400 Subject: [PATCH 18/32] Do not use fully qualified name for StratPool This will not work properly in the case where there are two StratPool implementations in different modules. Signed-off-by: mulhern --- stratisd_proc_macros/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratisd_proc_macros/src/lib.rs b/stratisd_proc_macros/src/lib.rs index 59d5278259..5f75d7e983 100644 --- a/stratisd_proc_macros/src/lib.rs +++ b/stratisd_proc_macros/src/lib.rs @@ -89,7 +89,7 @@ fn process_arguments(fn_arg: &FnArg) -> (Ident, PatType) { colon_token: Token![:](Span::call_site()), ty: Box::new( parse::(TokenStream::from(quote! { - #reference #mutability crate::engine::strat_engine::pool::StratPool + #reference #mutability StratPool })) .expect("Valid type"), ), From eedda8e3f52f2a3ed6086348b6057c2617e6d3e6 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Wed, 23 Aug 2023 12:13:29 -0400 Subject: [PATCH 19/32] Revert "Update lowest supported Rust to 1.71.1" This reverts commit 6617539b40cc5afed046e4bec4d98a70bfb1d3ba. Signed-off-by: Bryan Gurney --- .github/workflows/main.yml | 4 ++-- .github/workflows/python.yml | 2 +- Cargo.toml | 2 +- stratisd_proc_macros/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef7ae0e332..6ef22047a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -155,7 +155,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN + toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd @@ -342,7 +342,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN + toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index c5ab719179..f8bb63fe85 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -35,7 +35,7 @@ jobs: # MANDATORY CHECKS USING CURRENT DEVELOPMENT ENVIRONMENT - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN # MANDATORY CHECKS USING LOWEST SUPPORTED ENVIRONMENT PROXY - - toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN + - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/Cargo.toml b/Cargo.toml index c6343dd12e..6a34f4d2bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "stratisd" version = "3.5.8" authors = ["Stratis Developers "] edition = "2021" -rust-version = "1.71.1" # LOWEST SUPPORTED RUST TOOLCHAIN +rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN build = "build.rs" description = "Stratis daemon" license = "MPL-2.0" diff --git a/stratisd_proc_macros/Cargo.toml b/stratisd_proc_macros/Cargo.toml index cd66f71cab..1c70093588 100644 --- a/stratisd_proc_macros/Cargo.toml +++ b/stratisd_proc_macros/Cargo.toml @@ -3,7 +3,7 @@ name = "stratisd_proc_macros" version = "0.2.0" authors = ["Stratis Developers "] edition = "2021" -rust-version = "1.71.1" # LOWEST SUPPORTED RUST TOOLCHAIN +rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN description = "Stratis daemon procedural macros" license = "MPL-2.0" repository = "https://github.com/stratis-storage/stratisd/" From 5d0a29871e853a85d23c73d6694b2128e9ddec7c Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 23 Aug 2023 09:40:29 -0400 Subject: [PATCH 20/32] stratisd_proc_macros v0.2.1 Signed-off-by: mulhern --- Cargo.lock | 2 +- stratisd_proc_macros/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3fef74dcb6..b5f9242b65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1357,7 +1357,7 @@ dependencies = [ [[package]] name = "stratisd_proc_macros" -version = "0.2.0" +version = "0.2.1" dependencies = [ "proc-macro2", "quote", diff --git a/stratisd_proc_macros/Cargo.toml b/stratisd_proc_macros/Cargo.toml index 1c70093588..93a8e991d6 100644 --- a/stratisd_proc_macros/Cargo.toml +++ b/stratisd_proc_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stratisd_proc_macros" -version = "0.2.0" +version = "0.2.1" authors = ["Stratis Developers "] edition = "2021" rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN From 95fe6afa70e18cabcfc450e077dd113b6edf01af Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 24 Aug 2023 15:12:49 -0400 Subject: [PATCH 21/32] Fix useless-vec lint Signed-off-by: Bryan Gurney --- src/engine/sim_engine/filesystem.rs | 2 +- src/engine/strat_engine/devlinks.rs | 2 +- src/engine/strat_engine/ns.rs | 2 +- src/engine/strat_engine/thinpool/mdv.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/sim_engine/filesystem.rs b/src/engine/sim_engine/filesystem.rs index 35aab44232..3f99507395 100644 --- a/src/engine/sim_engine/filesystem.rs +++ b/src/engine/sim_engine/filesystem.rs @@ -44,7 +44,7 @@ impl Filesystem for SimFilesystem { } fn path_to_mount_filesystem(&self, pool_name: &str, fs_name: &str) -> PathBuf { - vec!["/somepath", pool_name, fs_name].iter().collect() + ["/somepath", pool_name, fs_name].iter().collect() } fn used(&self) -> StratisResult { diff --git a/src/engine/strat_engine/devlinks.rs b/src/engine/strat_engine/devlinks.rs index e444b5aebb..8afef7bf8f 100644 --- a/src/engine/strat_engine/devlinks.rs +++ b/src/engine/strat_engine/devlinks.rs @@ -11,7 +11,7 @@ pub const UEVENT_CHANGE_EVENT: &str = "change"; /// Given a pool name and a filesystem name, return the path it should be /// available as a device for mounting. pub fn filesystem_mount_path>(pool_name: T, fs_name: T) -> PathBuf { - vec![DEV_PATH, pool_name.as_ref(), fs_name.as_ref()] + [DEV_PATH, pool_name.as_ref(), fs_name.as_ref()] .iter() .collect() } diff --git a/src/engine/strat_engine/ns.rs b/src/engine/strat_engine/ns.rs index 3438b2a97a..8a2dfe9c3d 100644 --- a/src/engine/strat_engine/ns.rs +++ b/src/engine/strat_engine/ns.rs @@ -56,7 +56,7 @@ impl MemoryFilesystem { ))); } else { let stat_info = stat(NS_TMPFS_LOCATION)?; - let parent_path: PathBuf = vec![NS_TMPFS_LOCATION, ".."].iter().collect(); + let parent_path: PathBuf = [NS_TMPFS_LOCATION, ".."].iter().collect(); let parent_stat_info = stat(&parent_path)?; if stat_info.st_dev != parent_stat_info.st_dev { info!("Mount found at {}; unmounting", NS_TMPFS_LOCATION); diff --git a/src/engine/strat_engine/thinpool/mdv.rs b/src/engine/strat_engine/thinpool/mdv.rs index ac0426a861..df27253f54 100644 --- a/src/engine/strat_engine/thinpool/mdv.rs +++ b/src/engine/strat_engine/thinpool/mdv.rs @@ -59,7 +59,7 @@ impl MetadataVol { /// Set up an existing Metadata Volume. pub fn setup(pool_uuid: PoolUuid, dev: LinearDev) -> StratisResult { let filename = format!(".mdv-{}", uuid_to_string!(pool_uuid)); - let mount_pt: PathBuf = vec![NS_TMPFS_LOCATION, &filename].iter().collect(); + let mount_pt: PathBuf = [NS_TMPFS_LOCATION, &filename].iter().collect(); let mdv = MetadataVol { dev, mount_pt }; From bf512ded3139593f7d61a1b9b16de12b430fd981 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 24 Aug 2023 15:28:47 -0400 Subject: [PATCH 22/32] Remove useless .into_inter() calls Signed-off-by: Bryan Gurney --- src/dbus_api/api/shared.rs | 2 +- src/engine/strat_engine/engine.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dbus_api/api/shared.rs b/src/dbus_api/api/shared.rs index 523748d9fe..769751b7e0 100644 --- a/src/dbus_api/api/shared.rs +++ b/src/dbus_api/api/shared.rs @@ -138,7 +138,7 @@ where }) }) .fold(HashMap::new(), |mut props, prop| { - props.extend(prop.into_iter()); + props.extend(prop); props }); diff --git a/src/engine/strat_engine/engine.rs b/src/engine/strat_engine/engine.rs index 24a9a31dbc..cffc889e14 100644 --- a/src/engine/strat_engine/engine.rs +++ b/src/engine/strat_engine/engine.rs @@ -277,7 +277,7 @@ impl<'a> Into for &'a StratEngine { json, <&LiminalDevices as Into>::into(&*self.liminal_devices.blocking_read()), ) { - j.extend(map.into_iter()); + j.extend(map); Value::Object(j) } else { unreachable!("json!() and LiminalDevices::into() always return JSON object"); @@ -354,7 +354,7 @@ impl Engine for StratEngine { ret_guards.push(guard); } } - diffs.extend(diffs_thread.into_iter()); + diffs.extend(diffs_thread); } Err(e) => { warn!("Failed to handle udev events: {}", e); From 48456d32ce8631b9ea1ebbe5b25e4c43f279d748 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 24 Aug 2023 16:32:40 -0400 Subject: [PATCH 23/32] Allow clippy redundant_closure_call Signed-off-by: Bryan Gurney --- src/dbus_api/macros.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dbus_api/macros.rs b/src/dbus_api/macros.rs index aa41720464..e236973c31 100644 --- a/src/dbus_api/macros.rs +++ b/src/dbus_api/macros.rs @@ -180,6 +180,7 @@ macro_rules! handle_signal_change { let mut pairs = std::collections::HashMap::new(); $( if let $crate::dbus_api::types::SignalChange::Changed(t) = $prop_val { + #[allow(clippy::redundant_closure_call)] pairs.insert($prop, box_variant!($data_to_prop(t))); } )+ From 2ea253a6c0bb07d2e66e7e1da4cf707a1b6cce05 Mon Sep 17 00:00:00 2001 From: mulhern Date: Thu, 24 Aug 2023 16:08:46 -0400 Subject: [PATCH 24/32] Fix clippy manual_try_fold lints Signed-off-by: mulhern --- src/engine/sim_engine/pool.rs | 4 ++-- src/engine/strat_engine/liminal/device_info.rs | 10 ++++------ src/engine/strat_engine/pool.rs | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/engine/sim_engine/pool.rs b/src/engine/sim_engine/pool.rs index 863a2d3d6e..dd0dd6274d 100644 --- a/src/engine/sim_engine/pool.rs +++ b/src/engine/sim_engine/pool.rs @@ -221,8 +221,8 @@ impl Pool for SimPool { let spec_map = validate_filesystem_size_specs(specs)?; - spec_map.iter().fold(Ok(()), |res, (name, size)| { - res.and_then(|()| validate_name(name)) + spec_map.iter().try_fold((), |_, (name, size)| { + validate_name(name) .and_then(|()| { if let Some((_, fs)) = self.filesystems.get_by_name(name) { if fs.size() == *size { diff --git a/src/engine/strat_engine/liminal/device_info.rs b/src/engine/strat_engine/liminal/device_info.rs index 1b65aa22e2..655bc390dc 100644 --- a/src/engine/strat_engine/liminal/device_info.rs +++ b/src/engine/strat_engine/liminal/device_info.rs @@ -651,12 +651,10 @@ impl DeviceSet { uuid: *uuid, }) }) - .fold(Some(Vec::new()), |vec, dev_info| { - vec.and_then(|mut v| { - dev_info.map(|d| { - v.push(d); - v - }) + .try_fold(Vec::new(), |mut vec, dev_info| { + dev_info.map(|d| { + vec.push(d); + vec }) }) .map(|d| LockedPoolInfo { diff --git a/src/engine/strat_engine/pool.rs b/src/engine/strat_engine/pool.rs index 3f2fa229f7..dd163bb0d0 100644 --- a/src/engine/strat_engine/pool.rs +++ b/src/engine/strat_engine/pool.rs @@ -755,8 +755,8 @@ impl Pool for StratPool { let increase = spec_map.values().copied().sum::(); self.check_overprov(increase)?; - spec_map.iter().fold(Ok(()), |res, (name, size)| { - res.and_then(|()| validate_name(name)) + spec_map.iter().try_fold((), |_, (name, size)| { + validate_name(name) .and_then(|()| { if let Some((_, fs)) = self.thin_pool.get_filesystem_by_name(name) { if fs.thindev_size() == *size { From 301a8d289c11ff625147b21373a444a037043989 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 24 Aug 2023 16:35:31 -0400 Subject: [PATCH 25/32] jsonrpc: Fix useless-vec lint Signed-off-by: Bryan Gurney --- src/jsonrpc/client/pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsonrpc/client/pool.rs b/src/jsonrpc/client/pool.rs index 1a1338f87f..29545a8b5a 100644 --- a/src/jsonrpc/client/pool.rs +++ b/src/jsonrpc/client/pool.rs @@ -100,7 +100,7 @@ fn properties_string(properties: Vec<(bool, bool)>) -> Vec { .map(|(has_cache, is_encrypted)| { let ca = if has_cache { " Ca" } else { "~Ca" }; let cr = if is_encrypted { " Cr" } else { "~Cr" }; - vec![ca, cr].join(",") + [ca, cr].join(",") }) .collect() } From fae5d64b63abf152f1bed2e86c95d819f4dbc31b Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Mon, 28 Aug 2023 10:21:56 -0400 Subject: [PATCH 26/32] github actions: update recommended Rust to 1.72.0 Signed-off-by: Bryan Gurney --- .github/workflows/cargo.yml | 2 +- .github/workflows/fedora.yml | 20 ++++++++++---------- .github/workflows/main.yml | 12 ++++++------ .github/workflows/python.yml | 4 ++-- .github/workflows/ubuntu.yml | 18 +++++++++--------- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 7a9bdbe97d..65844d1eb5 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -51,7 +51,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Check out ci repo run: git clone https://github.com/stratis-storage/ci.git - name: Run comparisons of version specs with available Fedora packages diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 70275f1426..ab8ab056d6 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -34,33 +34,33 @@ jobs: matrix: include: - task: make -f Makefile clippy - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: clippy - task: PROFILEDIR=debug make -f Makefile build - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-min - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile stratis-dumpmetadata - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile docs-ci - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile test - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: >- TANG_URL=localhost make -f Makefile test-clevis-loop-should-fail - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build-min - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -95,7 +95,7 @@ jobs: matrix: include: - task: RUST_LOG=stratisd=debug make -f Makefile test-loop - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ef22047a4..3e056be278 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,10 +34,10 @@ jobs: matrix: include: - task: make -f Makefile fmt-ci - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: rustfmt - task: make -f Makefile check-typos - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -77,7 +77,7 @@ jobs: TANG_URL=tang RUST_LOG=stratisd=debug make -f Makefile test-clevis-loop - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo image: fedora:38 # CURRENT DEVELOPMENT ENVIRONMENT runs-on: ubuntu-22.04 @@ -211,7 +211,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Run stratisd-min cli tests run: make test-stratisd-min - name: Run stratis-min cli tests @@ -263,7 +263,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Check out ci repo run: git clone https://github.com/stratis-storage/ci.git - name: Run ${{ matrix.task }} @@ -298,7 +298,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f8bb63fe85..c61d711bc0 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -33,7 +33,7 @@ jobs: matrix: include: # MANDATORY CHECKS USING CURRENT DEVELOPMENT ENVIRONMENT - - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + - toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN # MANDATORY CHECKS USING LOWEST SUPPORTED ENVIRONMENT PROXY - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN runs-on: ubuntu-22.04 @@ -134,7 +134,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 1069aa9c8a..ed51eb0651 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -34,28 +34,28 @@ jobs: matrix: include: - task: make -f Makefile clippy - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: clippy - task: PROFILEDIR=debug make -f Makefile build - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-min - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile stratis-dumpmetadata - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile docs-ci - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile test - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build-min - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -93,7 +93,7 @@ jobs: matrix: include: - task: RUST_LOG=stratisd=debug make -f Makefile test-loop - toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: From 3fec522d1e93dc323cdf0e83b04de4ab8f9b8d69 Mon Sep 17 00:00:00 2001 From: mulhern Date: Mon, 28 Aug 2023 21:10:53 -0400 Subject: [PATCH 27/32] Increase serde_derive dependency lower bound to 1.0.185 This avoid the shipped executable from some previous versions. See https://github.com/serde-rs/serde/releases/tag/v1.0.184 Signed-off-by: mulhern --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b5f9242b65..fdf3a02361 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -119,7 +119,7 @@ checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -549,7 +549,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -1236,13 +1236,13 @@ checksum = "5d25439cd7397d044e2748a6fe2432b5e85db703d6d097bd014b3c0ad1ebff0b" [[package]] name = "serde_derive" -version = "1.0.175" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -1383,9 +1383,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.27" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -1446,7 +1446,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", ] [[package]] @@ -1531,7 +1531,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -1553,7 +1553,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/Cargo.toml b/Cargo.toml index 6a34f4d2bf..71ac465a57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -176,7 +176,7 @@ version = "1.0.119" optional = true [dependencies.serde_derive] -version = "1.0.119" +version = "1.0.185" optional = true [dependencies.serde_json] From 732a06bfbd2a0f0398f66bec04ea689fabfe9513 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 29 Aug 2023 09:11:51 -0400 Subject: [PATCH 28/32] Remove SET_LOWER_BOUNDS check from CI Signed-off-by: mulhern --- .github/workflows/main.yml | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3e056be278..5e9dae1dea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -232,43 +232,6 @@ jobs: - name: Run shell check run: make -f Makefile fmt-shell-ci - checks-with-ci-repo: - strategy: - matrix: - include: - - task: > - SET_LOWER_BOUNDS=./ci/dependency_management/set_lower_bounds - make -f Makefile_dependencies verify-dependency-bounds - runs-on: ubuntu-22.04 - container: - image: fedora:38 # CURRENT DEVELOPMENT ENVIRONMENT - steps: - - uses: actions/checkout@v3 - - name: Install dependencies for Fedora - run: > - dnf install -y - clang - curl - cryptsetup-devel - dbus-devel - device-mapper-devel - git - libblkid-devel - make - ncurses - openssl-devel - python-requests - python-semantic_version - systemd-devel - - uses: dtolnay/rust-toolchain@master - with: - components: cargo - toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - - name: Check out ci repo - run: git clone https://github.com/stratis-storage/ci.git - - name: Run ${{ matrix.task }} - run: ${{ matrix.task }} - python-based-tests: runs-on: ubuntu-22.04 container: From dd7b0c8ad3fa82e66183e9ed71790abe0e2caecc Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Tue, 29 Aug 2023 10:15:11 -0400 Subject: [PATCH 29/32] Revert "Revert "Update lowest supported Rust to 1.71.1"" This reverts commit 4e993d2ef1e78330f96e645dd21f673b805491ab. --- .github/workflows/main.yml | 4 ++-- .github/workflows/python.yml | 2 +- Cargo.toml | 2 +- stratisd_proc_macros/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e9dae1dea..c41db9a4b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -155,7 +155,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN + toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd @@ -305,7 +305,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN + toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index c61d711bc0..439e0c6608 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -35,7 +35,7 @@ jobs: # MANDATORY CHECKS USING CURRENT DEVELOPMENT ENVIRONMENT - toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN # MANDATORY CHECKS USING LOWEST SUPPORTED ENVIRONMENT PROXY - - toolchain: 1.71.0 # LOWEST SUPPORTED RUST TOOLCHAIN + - toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/Cargo.toml b/Cargo.toml index 71ac465a57..47312c81b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "stratisd" version = "3.5.8" authors = ["Stratis Developers "] edition = "2021" -rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN +rust-version = "1.71.1" # LOWEST SUPPORTED RUST TOOLCHAIN build = "build.rs" description = "Stratis daemon" license = "MPL-2.0" diff --git a/stratisd_proc_macros/Cargo.toml b/stratisd_proc_macros/Cargo.toml index 93a8e991d6..e8327a185b 100644 --- a/stratisd_proc_macros/Cargo.toml +++ b/stratisd_proc_macros/Cargo.toml @@ -3,7 +3,7 @@ name = "stratisd_proc_macros" version = "0.2.1" authors = ["Stratis Developers "] edition = "2021" -rust-version = "1.71.0" # LOWEST SUPPORTED RUST TOOLCHAIN +rust-version = "1.71.1" # LOWEST SUPPORTED RUST TOOLCHAIN description = "Stratis daemon procedural macros" license = "MPL-2.0" repository = "https://github.com/stratis-storage/stratisd/" From aa07c730bbd858083b0bacbd887d03e8c9917303 Mon Sep 17 00:00:00 2001 From: John Baublitz Date: Mon, 28 Aug 2023 15:40:40 -0400 Subject: [PATCH 30/32] Update to nix 0.26.3 and fix compilation error --- src/jsonrpc/server/server.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/jsonrpc/server/server.rs b/src/jsonrpc/server/server.rs index 4094a92a07..bb1c1c34d2 100644 --- a/src/jsonrpc/server/server.rs +++ b/src/jsonrpc/server/server.rs @@ -309,12 +309,8 @@ fn try_recvmsg(fd: RawFd) -> StratisResult { let mut cmsg_space = cmsg_space!([RawFd; 1]); let mut vec = vec![0; 65536]; let (cmsgs, bytes) = { - let rmsg = recvmsg::( - fd, - &mut [IoSliceMut::new(vec.as_mut_slice())], - Some(&mut cmsg_space), - MsgFlags::empty(), - )?; + let mut iovecs = [IoSliceMut::new(vec.as_mut_slice())]; + let rmsg = recvmsg::(fd, &mut iovecs, Some(&mut cmsg_space), MsgFlags::empty())?; (rmsg.cmsgs().collect(), rmsg.bytes) }; From 545dce3344ee3558384549ec28d51f0aaf331fb3 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 29 Aug 2023 17:38:37 -0400 Subject: [PATCH 31/32] Remove trailing whitespace in CHANGES.txt Signed-off-by: mulhern --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 817582835f..68037c0c09 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -37,7 +37,7 @@ Recommended development platform for Python development: Fedora 38 * Require udev support in container stratis-min-cli checks in GitHub Actions * Update lowest supported Rust to 1.69.0 * Improve error message for unlock check - * Do not use undefined matrix field "toolchain" in GitHub Action + * Do not use undefined matrix field "toolchain" in GitHub Action * Fix a source code typo in a test method From f1e561bf3f9a05b9b233205bc6638ded8bc7ee55 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 30 Aug 2023 12:22:23 -0400 Subject: [PATCH 32/32] version 3.5.9 Signed-off-by: mulhern --- CHANGES.txt | 41 +++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 68037c0c09..aaafb776e3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,44 @@ +stratisd 3.5.9 +============== +Recommended Rust toolchain version: 1.72.0 +Lowest supported Rust toolchain version: 1.71.1 + +- New commits: + * Remove trailing whitespace in CHANGES.txt + +- Cherry-picked commits: + * Update to nix 0.26.3 and fix compilation error + * Revert "Revert "Update lowest supported Rust to 1.71.1"" + * Remove SET_LOWER_BOUNDS check from CI + * Increase serde_derive dependency lower bound to 1.0.185 + * github actions: update recommended Rust to 1.72.0 + * jsonrpc: Fix useless-vec lint + * Fix clippy manual_try_fold lints + * Allow clippy redundant_closure_call + * Remove useless .into_inter() calls + * Fix useless-vec lint + * stratisd_proc_macros v0.2.1 + * Revert "Update lowest supported Rust to 1.71.1" + * Do not use fully qualified name for StratPool + * Update lowest supported Rust to 1.71.1 + * Cargo.toml: add vendor-filter metadata + * Remove PATH and install management for audit task + * Remove install and PATH setting for license target + * Remove outdated-related targets in Makefile + * Remove expand-related targets in Makefile + * Remove Makefile entries for cargo-bloat + * Do not do install and PATH adjustments in Makefile for typos + * Add cargo-auditable modification for cargo-build and rustc + * github actions: update recommended Rust to 1.71.1 + * Change -travis to -ci everywhere + * Decompose build-all into two sub-targets + * Fix bug in udev tests resulting from removing encrypted rollback + * Restrict min tests with feature flags + * Update lowest supported Rust to 1.71.0 + * Do not use default features for retry crate + * Do not require the futures feature for dbus dependency + + stratisd 3.5.8 ============== Recommended Rust toolchain version: 1.71.0 diff --git a/Cargo.lock b/Cargo.lock index fdf3a02361..97a2113871 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1309,7 +1309,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stratisd" -version = "3.5.8" +version = "3.5.9" dependencies = [ "assert_cmd", "assert_matches", diff --git a/Cargo.toml b/Cargo.toml index 47312c81b6..6063ed3939 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stratisd" -version = "3.5.8" +version = "3.5.9" authors = ["Stratis Developers "] edition = "2021" rust-version = "1.71.1" # LOWEST SUPPORTED RUST TOOLCHAIN