[PATCH 2/2] UBUNTU: add a new linux-image-extras package for virtual
Andy Whitcroft
apw at canonical.com
Fri Sep 16 13:46:00 UTC 2011
Add a new linux-image-extras package for the virtual flavours.
This package contains all of the left over kernel modules which are not
in the main linux-image package. This allows users to opt-in to a full
server style install in a virtual machine, preventing slow bloat of the
core linux-image install.
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
debian.master/control.d/flavour-control.stub | 21 +++++++++++++++++++++
debian/rules.d/0-common-vars.mk | 1 +
debian/rules.d/2-binary-arch.mk | 22 ++++++++++++++++++----
3 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/debian.master/control.d/flavour-control.stub b/debian.master/control.d/flavour-control.stub
index e941063..f304d96 100644
--- a/debian.master/control.d/flavour-control.stub
+++ b/debian.master/control.d/flavour-control.stub
@@ -47,6 +47,27 @@ Description: Linux kernel image for version PKGVER on DESC
the linux-FLAVOUR meta-package, which will ensure that upgrades work
correctly, and that supporting packages are also installed.
+Package: linux-image-extra-PKGVER-ABINUM-FLAVOUR
+Architecture: ARCH
+Section: admin
+Priority: optional
+Depends: ${misc:Depends}, ${shlibs:Depends}, linux-image-PKGVER-ABINUM-FLAVOUR (= PKGVER)
+Description: Linux kernel image for version PKGVER on DESC
+ This package contains the Linux kernel image for version PKGVER on
+ DESC.
+ .
+ Also includes the corresponding System.map file, the modules built by the
+ packager, and scripts that try to ensure that the system is not left in an
+ unbootable state after an update.
+ .
+ Supports SUPPORTED processors.
+ .
+ TARGET
+ .
+ You likely do not want to install this package directly. Instead, install
+ the linux-FLAVOUR meta-package, which will ensure that upgrades work
+ correctly, and that supporting packages are also installed.
+
Package: linux-headers-PKGVER-ABINUM-FLAVOUR
Architecture: ARCH
Section: devel
diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index 13602c4..8915c40 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -130,6 +130,7 @@ stampdir := $(CURDIR)/debian/stamps
# assumption that the binary package always starts with linux-image will never change.
#
bin_pkg_name=linux-image-$(abi_release)
+extra_pkg_name=linux-image-extra-$(abi_release)
hdrs_pkg_name=linux-headers-$(abi_release)
#
# The generation of content in the doc package depends on both 'AUTOBUILD=' and
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index c0259e6..7a42734 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -37,6 +37,7 @@ $(stampdir)/stamp-build-%: $(stampdir)/stamp-prepare-%
# Install the finished build
install-%: pkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*
+install-%: pkgdir_ex = $(CURDIR)/debian/$(extra_pkg_name)-$*
install-%: bindoc = $(pkgdir)/usr/share/doc/$(bin_pkg_name)-$*
install-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
install-%: basepkg = $(hdrs_pkg_name)
@@ -82,17 +83,16 @@ endif
# Remove all modules not in the inclusion list.
#
if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
- mkdir -p $(pkgdir)-ALL/lib/modules/$(abi_release)-$*; \
+ mkdir -p $(pkgdir_ex)/lib/modules/$(abi_release)-$*; \
mv $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
- $(pkgdir)-ALL/lib/modules/$(abi_release)-$*/kernel; \
+ $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel; \
$(SHELL) $(DROOT)/scripts/module-inclusion --master \
- $(pkgdir)-ALL/lib/modules/$(abi_release)-$*/kernel \
+ $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel \
$(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
$(DEBIAN)/control.d/$(target_flavour).inclusion-list 2>&1 | \
tee $(target_flavour).inclusion-list.log; \
/sbin/depmod -b $(pkgdir) -ea -F $(pkgdir)/boot/System.map-$(abi_release)-$* \
$(abi_release)-$* 2>&1 |tee $(target_flavour).depmod.log; \
- rm -rf $(pkgdir)-ALL; \
fi
ifeq ($(no_dumpfile),)
@@ -274,9 +274,11 @@ endif
endif
binary-%: pkgimg = $(bin_pkg_name)-$*
+binary-%: pkgimg_ex = $(extra_pkg_name)-$*
binary-%: pkghdr = $(hdrs_pkg_name)-$*
binary-%: dbgpkg = $(bin_pkg_name)-$*-dbgsym
binary-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
+binary-%: target_flavour = $*
binary-%: install-%
dh_testdir
dh_testroot
@@ -291,6 +293,18 @@ binary-%: install-%
dh_md5sums -p$(pkgimg)
dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
+ if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
+ dh_installchangelogs -p$(pkgimg_ex); \
+ dh_installdocs -p$(pkgimg_ex); \
+ dh_compress -p$(pkgimg_ex); \
+ dh_fixperms -p$(pkgimg_ex) -X/boot/; \
+ dh_installdeb -p$(pkgimg_ex); \
+ dh_shlibdeps -p$(pkgimg_ex); \
+ dh_gencontrol -p$(pkgimg_ex); \
+ dh_md5sums -p$(pkgimg_ex); \
+ dh_builddeb -p$(pkgimg_ex) -- -Zbzip2 -z9; \
+ fi
+
dh_installchangelogs -p$(pkghdr)
dh_installdocs -p$(pkghdr)
dh_compress -p$(pkghdr)
--
1.7.4.1
More information about the kernel-team
mailing list