From c5d1846aeca47606d31844c8abab056f6fb473d5 Mon Sep 17 00:00:00 2001 From: Chris Co Date: Fri, 3 Apr 2026 22:47:20 -0700 Subject: [PATCH 1/4] workaround(rust-nix0.28): fix test failures from 4-part kernel versions Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's Version::parse() rejects. Three tests (gro, gso, test_txtime) panic on unwrap of the parse error. Apply the same fix-4part-kernel-version.patch already used by rust-nix: truncate to 3 numeric components before parsing so the extra part becomes a pre-release suffix (which is cleared immediately after). --- base/comps/components-full.toml | 1 - .../fix-4part-kernel-version.patch | 22 +++++++++++++++++++ .../comps/rust-nix0.28/rust-nix0.28.comp.toml | 16 ++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 base/comps/rust-nix0.28/fix-4part-kernel-version.patch create mode 100644 base/comps/rust-nix0.28/rust-nix0.28.comp.toml diff --git a/base/comps/components-full.toml b/base/comps/components-full.toml index 4051fa6ce9a..cf7ffc5595f 100644 --- a/base/comps/components-full.toml +++ b/base/comps/components-full.toml @@ -102,7 +102,6 @@ [components.'rust-nix0.24'] [components.'rust-nix0.26'] [components.'rust-nix0.27'] -[components.'rust-nix0.28'] [components.'rust-nix0.29'] [components.'rust-nix0.30'] [components.'rust-object0.36'] diff --git a/base/comps/rust-nix0.28/fix-4part-kernel-version.patch b/base/comps/rust-nix0.28/fix-4part-kernel-version.patch new file mode 100644 index 00000000000..c1d4e3eb32d --- /dev/null +++ b/base/comps/rust-nix0.28/fix-4part-kernel-version.patch @@ -0,0 +1,22 @@ +diff --git a/test/common/mod.rs b/test/common/mod.rs +index 7dbdfbf..027611a 100644 +--- a/test/common/mod.rs ++++ b/test/common/mod.rs +@@ -133,7 +133,16 @@ cfg_if! { + .replace("_", "-") + // Cirrus-CI reports version as 4.19.112+ . Remove the + + .replace("+", ""); +- let mut version = Version::parse(fixed_release).unwrap(); ++ // Some distros (e.g. Azure Linux) use 4-part kernel versions ++ // like 6.6.121.1-1.azl3. Semver only accepts 3 numeric ++ // components, so replace the dot after the 3rd component with ++ // a hyphen so the extra part becomes a pre-release suffix ++ // (which we clear below anyway). ++ let fixed_release = match fixed_release.match_indices('.').nth(2) { ++ Some((pos, _)) => fixed_release[..pos].to_string() + &fixed_release[pos..].replacen('.', "-", 1), ++ None => fixed_release.to_string(), ++ }; ++ let mut version = Version::parse(&fixed_release).unwrap(); + + //Keep only numeric parts + version.pre = semver::Prerelease::EMPTY; diff --git a/base/comps/rust-nix0.28/rust-nix0.28.comp.toml b/base/comps/rust-nix0.28/rust-nix0.28.comp.toml new file mode 100644 index 00000000000..15cfc3d1e07 --- /dev/null +++ b/base/comps/rust-nix0.28/rust-nix0.28.comp.toml @@ -0,0 +1,16 @@ +[components.'rust-nix0.28'] + +# Azure Linux kernels use 4-part versions (e.g. 6.6.121.1-1.azl3) which the +# semver crate in test helpers cannot parse. Patch the require_kernel_version! +# macro to handle this by truncating to 3 numeric components. +[[components.'rust-nix0.28'.overlays]] +description = "Add patch file to handle 4-part kernel versions in the require_kernel_version test macro" +type = "file-add" +file = "fix-4part-kernel-version.patch" +source = "fix-4part-kernel-version.patch" + +[[components.'rust-nix0.28'.overlays]] +description = "Register the 4-part kernel version fix patch in the spec" +type = "spec-insert-tag" +tag = "Patch9999" +value = "fix-4part-kernel-version.patch" From 82ba47b0889ecb4900b2d4d7740b523db6578424 Mon Sep 17 00:00:00 2001 From: Chris Co Date: Fri, 3 Apr 2026 22:57:33 -0700 Subject: [PATCH 2/4] workaround(rust-nix0.30): fix test failures from 4-part kernel versions Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's Version::parse() rejects. Three tests (gro, gso, test_txtime) panic on unwrap of the parse error. Apply the same fix-4part-kernel-version.patch already used by rust-nix: truncate to 3 numeric components before parsing so the extra part becomes a pre-release suffix (which is cleared immediately after). --- base/comps/components-full.toml | 1 - .../fix-4part-kernel-version.patch | 22 +++++++++++++++++++ .../comps/rust-nix0.30/rust-nix0.30.comp.toml | 16 ++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 base/comps/rust-nix0.30/fix-4part-kernel-version.patch create mode 100644 base/comps/rust-nix0.30/rust-nix0.30.comp.toml diff --git a/base/comps/components-full.toml b/base/comps/components-full.toml index cf7ffc5595f..ea26e8249fa 100644 --- a/base/comps/components-full.toml +++ b/base/comps/components-full.toml @@ -103,7 +103,6 @@ [components.'rust-nix0.26'] [components.'rust-nix0.27'] [components.'rust-nix0.29'] -[components.'rust-nix0.30'] [components.'rust-object0.36'] [components.'rust-object0.37'] [components.'rust-petgraph0.6'] diff --git a/base/comps/rust-nix0.30/fix-4part-kernel-version.patch b/base/comps/rust-nix0.30/fix-4part-kernel-version.patch new file mode 100644 index 00000000000..c1d4e3eb32d --- /dev/null +++ b/base/comps/rust-nix0.30/fix-4part-kernel-version.patch @@ -0,0 +1,22 @@ +diff --git a/test/common/mod.rs b/test/common/mod.rs +index 7dbdfbf..027611a 100644 +--- a/test/common/mod.rs ++++ b/test/common/mod.rs +@@ -133,7 +133,16 @@ cfg_if! { + .replace("_", "-") + // Cirrus-CI reports version as 4.19.112+ . Remove the + + .replace("+", ""); +- let mut version = Version::parse(fixed_release).unwrap(); ++ // Some distros (e.g. Azure Linux) use 4-part kernel versions ++ // like 6.6.121.1-1.azl3. Semver only accepts 3 numeric ++ // components, so replace the dot after the 3rd component with ++ // a hyphen so the extra part becomes a pre-release suffix ++ // (which we clear below anyway). ++ let fixed_release = match fixed_release.match_indices('.').nth(2) { ++ Some((pos, _)) => fixed_release[..pos].to_string() + &fixed_release[pos..].replacen('.', "-", 1), ++ None => fixed_release.to_string(), ++ }; ++ let mut version = Version::parse(&fixed_release).unwrap(); + + //Keep only numeric parts + version.pre = semver::Prerelease::EMPTY; diff --git a/base/comps/rust-nix0.30/rust-nix0.30.comp.toml b/base/comps/rust-nix0.30/rust-nix0.30.comp.toml new file mode 100644 index 00000000000..a90316e8fae --- /dev/null +++ b/base/comps/rust-nix0.30/rust-nix0.30.comp.toml @@ -0,0 +1,16 @@ +[components.'rust-nix0.30'] + +# Azure Linux kernels use 4-part versions (e.g. 6.6.121.1-1.azl3) which the +# semver crate in test helpers cannot parse. Patch the require_kernel_version! +# macro to handle this by truncating to 3 numeric components. +[[components.'rust-nix0.30'.overlays]] +description = "Add patch file to handle 4-part kernel versions in the require_kernel_version test macro" +type = "file-add" +file = "fix-4part-kernel-version.patch" +source = "fix-4part-kernel-version.patch" + +[[components.'rust-nix0.30'.overlays]] +description = "Register the 4-part kernel version fix patch in the spec" +type = "spec-insert-tag" +tag = "Patch9999" +value = "fix-4part-kernel-version.patch" From b8ba9b43bb40f071e067fd520dc44ad7bc66bf89 Mon Sep 17 00:00:00 2001 From: Chris Co Date: Fri, 3 Apr 2026 23:06:54 -0700 Subject: [PATCH 3/4] workaround(rust-nix0.29): fix test failures from 4-part kernel versions Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's Version::parse() rejects. Three tests (gro, gso, test_txtime) panic on unwrap of the parse error. Apply the same fix-4part-kernel-version.patch already used by rust-nix: truncate to 3 numeric components before parsing so the extra part becomes a pre-release suffix (which is cleared immediately after). --- base/comps/components-full.toml | 1 - .../fix-4part-kernel-version.patch | 22 +++++++++++++++++++ .../comps/rust-nix0.29/rust-nix0.29.comp.toml | 16 ++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 base/comps/rust-nix0.29/fix-4part-kernel-version.patch create mode 100644 base/comps/rust-nix0.29/rust-nix0.29.comp.toml diff --git a/base/comps/components-full.toml b/base/comps/components-full.toml index ea26e8249fa..a6ca9daeca7 100644 --- a/base/comps/components-full.toml +++ b/base/comps/components-full.toml @@ -102,7 +102,6 @@ [components.'rust-nix0.24'] [components.'rust-nix0.26'] [components.'rust-nix0.27'] -[components.'rust-nix0.29'] [components.'rust-object0.36'] [components.'rust-object0.37'] [components.'rust-petgraph0.6'] diff --git a/base/comps/rust-nix0.29/fix-4part-kernel-version.patch b/base/comps/rust-nix0.29/fix-4part-kernel-version.patch new file mode 100644 index 00000000000..c1d4e3eb32d --- /dev/null +++ b/base/comps/rust-nix0.29/fix-4part-kernel-version.patch @@ -0,0 +1,22 @@ +diff --git a/test/common/mod.rs b/test/common/mod.rs +index 7dbdfbf..027611a 100644 +--- a/test/common/mod.rs ++++ b/test/common/mod.rs +@@ -133,7 +133,16 @@ cfg_if! { + .replace("_", "-") + // Cirrus-CI reports version as 4.19.112+ . Remove the + + .replace("+", ""); +- let mut version = Version::parse(fixed_release).unwrap(); ++ // Some distros (e.g. Azure Linux) use 4-part kernel versions ++ // like 6.6.121.1-1.azl3. Semver only accepts 3 numeric ++ // components, so replace the dot after the 3rd component with ++ // a hyphen so the extra part becomes a pre-release suffix ++ // (which we clear below anyway). ++ let fixed_release = match fixed_release.match_indices('.').nth(2) { ++ Some((pos, _)) => fixed_release[..pos].to_string() + &fixed_release[pos..].replacen('.', "-", 1), ++ None => fixed_release.to_string(), ++ }; ++ let mut version = Version::parse(&fixed_release).unwrap(); + + //Keep only numeric parts + version.pre = semver::Prerelease::EMPTY; diff --git a/base/comps/rust-nix0.29/rust-nix0.29.comp.toml b/base/comps/rust-nix0.29/rust-nix0.29.comp.toml new file mode 100644 index 00000000000..769fa5b6e7c --- /dev/null +++ b/base/comps/rust-nix0.29/rust-nix0.29.comp.toml @@ -0,0 +1,16 @@ +[components.'rust-nix0.29'] + +# Azure Linux kernels use 4-part versions (e.g. 6.6.121.1-1.azl3) which the +# semver crate in test helpers cannot parse. Patch the require_kernel_version! +# macro to handle this by truncating to 3 numeric components. +[[components.'rust-nix0.29'.overlays]] +description = "Add patch file to handle 4-part kernel versions in the require_kernel_version test macro" +type = "file-add" +file = "fix-4part-kernel-version.patch" +source = "fix-4part-kernel-version.patch" + +[[components.'rust-nix0.29'.overlays]] +description = "Register the 4-part kernel version fix patch in the spec" +type = "spec-insert-tag" +tag = "Patch9999" +value = "fix-4part-kernel-version.patch" From ceb0ca79b3049a7c5d979f1ad85b010b425513f8 Mon Sep 17 00:00:00 2001 From: Chris Co Date: Fri, 3 Apr 2026 23:13:08 -0700 Subject: [PATCH 4/4] workaround(rust-nix0.23): fix test failures from 4-part kernel versions Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's Version::parse() rejects. Two tests (gro, gso) panic on unwrap of the parse error. Apply the same fix-4part-kernel-version.patch already used by rust-nix: truncate to 3 numeric components before parsing so the extra part becomes a pre-release suffix (which is cleared immediately after). --- base/comps/components-full.toml | 1 - .../fix-4part-kernel-version.patch | 22 +++++++++++++++++++ .../comps/rust-nix0.23/rust-nix0.23.comp.toml | 16 ++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 base/comps/rust-nix0.23/fix-4part-kernel-version.patch create mode 100644 base/comps/rust-nix0.23/rust-nix0.23.comp.toml diff --git a/base/comps/components-full.toml b/base/comps/components-full.toml index a6ca9daeca7..1297ac8f743 100644 --- a/base/comps/components-full.toml +++ b/base/comps/components-full.toml @@ -5972,7 +5972,6 @@ [components.rust-new_debug_unreachable] [components.rust-newtype-uuid] [components.rust-nibble_vec] -[components.'rust-nix0.23'] [components.rust-no-panic] [components.rust-no-std-net] [components.rust-no_std_io2] diff --git a/base/comps/rust-nix0.23/fix-4part-kernel-version.patch b/base/comps/rust-nix0.23/fix-4part-kernel-version.patch new file mode 100644 index 00000000000..c1d4e3eb32d --- /dev/null +++ b/base/comps/rust-nix0.23/fix-4part-kernel-version.patch @@ -0,0 +1,22 @@ +diff --git a/test/common/mod.rs b/test/common/mod.rs +index 7dbdfbf..027611a 100644 +--- a/test/common/mod.rs ++++ b/test/common/mod.rs +@@ -133,7 +133,16 @@ cfg_if! { + .replace("_", "-") + // Cirrus-CI reports version as 4.19.112+ . Remove the + + .replace("+", ""); +- let mut version = Version::parse(fixed_release).unwrap(); ++ // Some distros (e.g. Azure Linux) use 4-part kernel versions ++ // like 6.6.121.1-1.azl3. Semver only accepts 3 numeric ++ // components, so replace the dot after the 3rd component with ++ // a hyphen so the extra part becomes a pre-release suffix ++ // (which we clear below anyway). ++ let fixed_release = match fixed_release.match_indices('.').nth(2) { ++ Some((pos, _)) => fixed_release[..pos].to_string() + &fixed_release[pos..].replacen('.', "-", 1), ++ None => fixed_release.to_string(), ++ }; ++ let mut version = Version::parse(&fixed_release).unwrap(); + + //Keep only numeric parts + version.pre = semver::Prerelease::EMPTY; diff --git a/base/comps/rust-nix0.23/rust-nix0.23.comp.toml b/base/comps/rust-nix0.23/rust-nix0.23.comp.toml new file mode 100644 index 00000000000..5626342c2e7 --- /dev/null +++ b/base/comps/rust-nix0.23/rust-nix0.23.comp.toml @@ -0,0 +1,16 @@ +[components.'rust-nix0.23'] + +# Azure Linux kernels use 4-part versions (e.g. 6.6.121.1-1.azl3) which the +# semver crate in test helpers cannot parse. Patch the require_kernel_version! +# macro to handle this by truncating to 3 numeric components. +[[components.'rust-nix0.23'.overlays]] +description = "Add patch file to handle 4-part kernel versions in the require_kernel_version test macro" +type = "file-add" +file = "fix-4part-kernel-version.patch" +source = "fix-4part-kernel-version.patch" + +[[components.'rust-nix0.23'.overlays]] +description = "Register the 4-part kernel version fix patch in the spec" +type = "spec-insert-tag" +tag = "Patch9999" +value = "fix-4part-kernel-version.patch"