Message ID | 20240718222433.64377-1-noah.wager@canonical.com |
---|---|
Headers | show |
Series | Check do_lib_rust before linking Rust lib files | expand |
On Thu, 18 Jul 2024 15:24:00 -0700 Noah Wager <noah.wager@canonical.com> wrote: > [SRU Justification] > > BugLink: https://bugs.launchpad.net/bugs/2072592 > > [Impact] > > Commit: "UBUNTU: [Packaging] introduce do_lib_rust and enable it only on > generic amd64" introduces the "do_lib_rust" variable in rules.d/ that > avoids generating the extra rust package when unset/false. However, this > is not checked when inserting a symlink to the linux-lib-rust package > directory in the headers, resulting in a dangling symlink when rust is > turned off. This can cause issues when e.g. building dkms modules > against the headers, where the build will fail due to not finding the > directory. > > [How to reproduce it] > > 1. Build linux-headers-* package for kernel with rust disabled (e.g. > realtime) > 2. Install (or extract) the package > 3. View corresponding /usr/src/linux-headers-*/ directory > 4. Observe /usr/src/linux-headers-*/rust -> ../linux-lib-rust-* but > linux-lib-rust is never built and installed > > [Fix] > > Check the existing do_lib_rust variable is true before trying to symlink > the linux-lib-rust files. > > [Test plan] > > 1. Apply the fix and rebuild the kernel headers packages > 2. Install or inspect the headers > 3. Ensure /usr/src/linux-headers-*/rust points to an existing directory > > [Regression potential] > > Very low. This is a simple fix, and it only impacts rust packaging for > kernels with do_lib_rust unset/false so the visibility is low. > > Noah Wager (1): > UBUNTU: [Packaging] Check do_lib_rust before linking Rust lib files > > debian/rules.d/2-binary-arch.mk | 2 ++ > 1 file changed, 2 insertions(+) > Acked-by: Juerg Haefliger <juerg.haefliger@canonical.com>
2024-07-19 00:25 CEST, Noah Wager: > [SRU Justification] > > BugLink: https://bugs.launchpad.net/bugs/2072592 > > [Impact] > > Commit: "UBUNTU: [Packaging] introduce do_lib_rust and enable it only on > generic amd64" introduces the "do_lib_rust" variable in rules.d/ that > avoids generating the extra rust package when unset/false. However, this > is not checked when inserting a symlink to the linux-lib-rust package > directory in the headers, resulting in a dangling symlink when rust is > turned off. This can cause issues when e.g. building dkms modules > against the headers, where the build will fail due to not finding the > directory. > > [How to reproduce it] > > 1. Build linux-headers-* package for kernel with rust disabled (e.g. > realtime) > 2. Install (or extract) the package > 3. View corresponding /usr/src/linux-headers-*/ directory > 4. Observe /usr/src/linux-headers-*/rust -> ../linux-lib-rust-* but > linux-lib-rust is never built and installed > > [Fix] > > Check the existing do_lib_rust variable is true before trying to symlink > the linux-lib-rust files. > > [Test plan] > > 1. Apply the fix and rebuild the kernel headers packages > 2. Install or inspect the headers > 3. Ensure /usr/src/linux-headers-*/rust points to an existing directory > > [Regression potential] > > Very low. This is a simple fix, and it only impacts rust packaging for > kernels with do_lib_rust unset/false so the visibility is low. > > Noah Wager (1): > UBUNTU: [Packaging] Check do_lib_rust before linking Rust lib files > > debian/rules.d/2-binary-arch.mk | 2 ++ > 1 file changed, 2 insertions(+) Acked-by: Agathe Porte <agathe.porte@canonical.com>
On 19.07.24 00:24, Noah Wager wrote: > [SRU Justification] > > BugLink: https://bugs.launchpad.net/bugs/2072592 > > [Impact] > > Commit: "UBUNTU: [Packaging] introduce do_lib_rust and enable it only on > generic amd64" introduces the "do_lib_rust" variable in rules.d/ that > avoids generating the extra rust package when unset/false. However, this > is not checked when inserting a symlink to the linux-lib-rust package > directory in the headers, resulting in a dangling symlink when rust is > turned off. This can cause issues when e.g. building dkms modules > against the headers, where the build will fail due to not finding the > directory. > > [How to reproduce it] > > 1. Build linux-headers-* package for kernel with rust disabled (e.g. > realtime) > 2. Install (or extract) the package > 3. View corresponding /usr/src/linux-headers-*/ directory > 4. Observe /usr/src/linux-headers-*/rust -> ../linux-lib-rust-* but > linux-lib-rust is never built and installed > > [Fix] > > Check the existing do_lib_rust variable is true before trying to symlink > the linux-lib-rust files. > > [Test plan] > > 1. Apply the fix and rebuild the kernel headers packages > 2. Install or inspect the headers > 3. Ensure /usr/src/linux-headers-*/rust points to an existing directory > > [Regression potential] > > Very low. This is a simple fix, and it only impacts rust packaging for > kernels with do_lib_rust unset/false so the visibility is low. > > Noah Wager (1): > UBUNTU: [Packaging] Check do_lib_rust before linking Rust lib files > > debian/rules.d/2-binary-arch.mk | 2 ++ > 1 file changed, 2 insertions(+) > Applied to noble:linux/master-next. This looks like it should also be applied to Oracular/Unstable. Thanks. -Stefan
On Fri, Jul 19, 2024 at 11:47:41AM +0200, Stefan Bader wrote: > On 19.07.24 00:24, Noah Wager wrote: > > [SRU Justification] > > > > BugLink: https://bugs.launchpad.net/bugs/2072592 > > > > [Impact] > > > > Commit: "UBUNTU: [Packaging] introduce do_lib_rust and enable it only on > > generic amd64" introduces the "do_lib_rust" variable in rules.d/ that > > avoids generating the extra rust package when unset/false. However, this > > is not checked when inserting a symlink to the linux-lib-rust package > > directory in the headers, resulting in a dangling symlink when rust is > > turned off. This can cause issues when e.g. building dkms modules > > against the headers, where the build will fail due to not finding the > > directory. > > > > [How to reproduce it] > > > > 1. Build linux-headers-* package for kernel with rust disabled (e.g. > > realtime) > > 2. Install (or extract) the package > > 3. View corresponding /usr/src/linux-headers-*/ directory > > 4. Observe /usr/src/linux-headers-*/rust -> ../linux-lib-rust-* but > > linux-lib-rust is never built and installed > > > > [Fix] > > > > Check the existing do_lib_rust variable is true before trying to symlink > > the linux-lib-rust files. > > > > [Test plan] > > > > 1. Apply the fix and rebuild the kernel headers packages > > 2. Install or inspect the headers > > 3. Ensure /usr/src/linux-headers-*/rust points to an existing directory > > > > [Regression potential] > > > > Very low. This is a simple fix, and it only impacts rust packaging for > > kernels with do_lib_rust unset/false so the visibility is low. > > > > Noah Wager (1): > > UBUNTU: [Packaging] Check do_lib_rust before linking Rust lib files > > > > debian/rules.d/2-binary-arch.mk | 2 ++ > > 1 file changed, 2 insertions(+) > > > > Applied to noble:linux/master-next. This looks like it should also be > applied to Oracular/Unstable. Thanks. > > -Stefan Got it -- already applied to Unstable, and just sent the patch for Oracular. Thanks! - Noah