[precise,1/1] UBUNTU: [Packaging] generate live watchdog blacklists
diff mbox

Message ID 1426601978-31201-2-git-send-email-apw@canonical.com
State New
Headers show

Commit Message

Andy Whitcroft March 17, 2015, 2:19 p.m. UTC
BugLink: http://bugs.launchpad.net/bugs/1432837
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 debian/rules.d/2-binary-arch.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch
diff mbox

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 620e812..84899a9 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -91,6 +91,18 @@  endif
 		INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$*
 
 	#
+	# Build module blacklists:
+	#  - blacklist all watchdog drivers (LP:1432837)
+	#
+	install -d $(pkgdir)/lib/modprobe.d
+	echo "# Autogenerated blacklist for $(src_pkg_name) $(abi_release)-$* $(arch)" \
+		>$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf
+	ls -1 $(pkgdir)/lib/modules/$(abi_release)-$*/kernel/drivers/watchdog/ | \
+		sed -e 's/^/blacklist /' -e 's/.ko$$//' | \
+		sort -u \
+		>>$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf
+
+	#
 	# Remove all modules not in the inclusion list.
 	#
 	if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \