From d974fed3c2ebb176278ae861dd00aaa50e7cc19c Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 16 Apr 2024 16:35:35 -0400 Subject: [PATCH 1/3] Cargo.toml: bump MSRV to 1.75.0 That's what's in c9s right now, which defines our lower bound. --- Cargo.toml | 2 +- docs/release-notes.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c4f4a939..cf040da9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "coreos-installer" repository = "https://github.com/coreos/coreos-installer" license = "Apache-2.0" edition = "2021" -rust-version = "1.70.0" +rust-version = "1.75.0" exclude = ["/.cci.jenkinsfile", "/.github", "/.gitignore", "/Dockerfile"] authors = [ "Benjamin Gilbert " ] description = "Installer for Fedora CoreOS and RHEL CoreOS" diff --git a/docs/release-notes.md b/docs/release-notes.md index 2ee3922d..7c57c869 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -17,6 +17,7 @@ Internal changes: Packaging changes: +- Require Rust ≥ 1.75.0 - Update packit's downstream targets to be `fedora-all` From 2e04f252181724fe9627d51f867c88e0affda4b0 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 16 Apr 2024 16:36:55 -0400 Subject: [PATCH 2/3] build(deps): bump clap from 4.4.18 to 4.5.4 This reverts the `Cargo.toml` part of ee82223 ("cargo: update dependencies") which limited the clap version to 4.4. But we should be fine to pull in a newer version now that we bumped our MSRV. See also: https://github.com/coreos/coreos-installer/pull/1426#issuecomment-2027991253 See also: https://src.fedoraproject.org/rpms/rust-coreos-installer/pull-request/65 --- Cargo.lock | 30 ++++++++++++++++++------------ Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 765fd5d2..39d11b2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -177,9 +177,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", @@ -187,21 +187,21 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstyle", "clap_lex", - "strsim", + "strsim 0.11.1", "terminal_size", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck", "proc-macro2", @@ -211,9 +211,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "clap_mangen" @@ -348,7 +348,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn 2.0.50", ] @@ -568,9 +568,9 @@ checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -1432,6 +1432,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "syn" version = "1.0.109" diff --git a/Cargo.toml b/Cargo.toml index cf040da9..621d4514 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ base64 = ">= 0.21, < 0.22" bincode = "^1.3" bytes = ">= 1.0.1, < 2" byte-unit = ">= 3.1.0, < 5.0.0" -clap = { version = ">= 4.1, < 4.5", default-features = false, features = ["std", "cargo", "derive", "error-context", "help", "suggestions", "usage", "wrap_help"] } +clap = { version = ">= 4.1, < 5", default-features = false, features = ["std", "cargo", "derive", "error-context", "help", "suggestions", "usage", "wrap_help"] } clap_mangen = { version = "0.2", optional = true } cpio = ">= 0.2.1, < 0.3" flate2 = "^1.0" From 254d97e329a58a475dcce49f8b289c1a29b14b84 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 16 Apr 2024 16:58:53 -0400 Subject: [PATCH 3/3] workflows/rust: bump lints toolchain to 1.77.2 We can't have our lint version be less than our MSRV. Address two new minor lints. --- .github/workflows/rust.yml | 2 +- src/bin/rdcore/kargs.rs | 1 + src/io/tee.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a5a87b35..124e82e2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,7 +17,7 @@ env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 # Pinned toolchain for linting - ACTIONS_LINTS_TOOLCHAIN: 1.71.0 + ACTIONS_LINTS_TOOLCHAIN: 1.77.2 defaults: run: diff --git a/src/bin/rdcore/kargs.rs b/src/bin/rdcore/kargs.rs index 33603bb6..5fd14beb 100644 --- a/src/bin/rdcore/kargs.rs +++ b/src/bin/rdcore/kargs.rs @@ -81,6 +81,7 @@ fn modify_and_print(config: &KargsConfig, orig_options: &str) -> Result = (0..COUNT as u8).collect(); - let mut buf = vec![0; 2 * COUNT]; + let mut buf = [0; 2 * COUNT]; let mut off = 0; let mut tee = TeeReader::new(&*src, Vec::new()); for i in 2.. {