Files
Andrea Righi ebc5a672c7 UBUNTU: [Packaging] introduce a separate linux-lib-rust package
BugLink: https://bugs.launchpad.net/bugs/2015867

After enabling Rust in the kernel, the size of linux-headers increased
consistently.

Some work has been done to reduce the size, such as dropping the binary
artifacts (*.o and *.cmd), but it would be nice to keep the size of
linux-headers reasonably small to avoid wasting too much space in the
cloud images.

For this reason introduce a new package linux-lib-rust to ship all the
Rust headers and libraries required to build out-of-tree kernel modules
in Rust.

Before this patch: 96M	/usr/src/linux-headers-6.2.0-21-generic
 After this patch: 29M	/usr/src/linux-headers-6.2.0-21-generic

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:38 +01:00

18 lines
305 B
Bash
Executable File

#!/bin/bash -e
. debian/debian.env
hdrdir="$1"
symdir="$2"
flavour="$3"
echo "Symlinking and copying Rust files for $flavour..."
# Symlink Rust folder
item=rust
relpath=$(echo $symdir | sed s/headers/lib-rust/)-$flavour/$item
echo ln -s ../$relpath $hdrdir/$item
ln -s ../$relpath $hdrdir/$item
exit