aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2019-12-12 15:33:26 +0000
committerDaniel Thompson <daniel.thompson@linaro.org>2020-08-12 16:56:37 +0100
commit29cbf6133ea68854db707cacdc79d16095a52115 (patch)
treeca6ababf27c6b922c28b918e2e7a471967f47a54
parentc408c8b29ccf77f1d3b15d6b4e5518c2d5ceafeb (diff)
downloadlinux-29cbf6133ea68854db707cacdc79d16095a52115.tar.gz
NOUPSTREAM: kbuild: deb-pkg: Meta-package support
Kernel packages are "special" because they are designed to be parallel installed and therefore have a revision number in the package name. That means we need to create a meta-package that depends on the latest numbered version of the kernel. Without this apt will not automatically keep up to date with the latest kernel. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rwxr-xr-xscripts/package/builddeb5
-rwxr-xr-xscripts/package/mkdebian7
2 files changed, 11 insertions, 1 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 6df3c9f8b2da..4d860da575f6 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -102,8 +102,10 @@ deploy_libc_headers () {
version=$KERNELRELEASE
tmpdir=debian/linux-image
dbg_dir=debian/linux-image-dbg
+meta_package_dir="$objtree/debian/metapkgtmp"
packagename=linux-image-$version
dbg_packagename=$packagename-dbg
+metapackagename=`echo $packagename | sed -e 's/[0-9][0-9.-]*//'`
if [ "$ARCH" = "um" ] ; then
packagename=user-mode-linux-$version
@@ -126,7 +128,7 @@ esac
BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
# Setup the directory structure
-rm -rf "$tmpdir" "$dbg_dir" debian/files
+rm -rf "$tmpdir" "$dbg_dir" "$meta_package_dir" debian/files
mkdir -m 755 -p "$tmpdir/DEBIAN"
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
@@ -210,6 +212,7 @@ if [ "$ARCH" != "um" ]; then
fi
create_package "$packagename" "$tmpdir"
+create_package "$metapackagename" "$meta_package_dir"
if [ -n "$BUILD_DEBUG" ] ; then
# Build debug package
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 126e19dbcedf..53319e168e41 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -95,6 +95,7 @@ else
fi
sourcename=$KDEB_SOURCENAME
packagename=linux-image-$version
+metapackagename=`echo $packagename | sed -e 's/[0-9][0-9.-]*//'`
kernel_headers_packagename=linux-headers-$version
dbg_packagename=$packagename-dbg
debarch=
@@ -209,6 +210,12 @@ Architecture: $debarch
Description: Linux kernel debugging symbols for $version
This package will come in handy if you need to debug the kernel. It provides
all the necessary debug symbols for the kernel and its modules.
+
+Package: $metapackagename
+Architecture: $debarch
+Depends: $packagename (= $packageversion)
+Description: Linux kernel (meta-package)
+ This package depends on the most recently built Linux kernel.
EOF
fi