[Pkg-raspi-maintainers] Bug#1135194: raspi-firmware: please consider usage of dh-cruft

Alexandre Detiste alexandre.detiste at gmail.com
Wed Apr 29 00:07:40 BST 2026


Source: raspi-firmware
Version: 1.20250915+ds-1
Severity: normal
X-Debbugs-Cc: Jochen Sprickerhof <jspricke at debian.org>

Hi Jochen,

dh-cruft has been available for many years already and it's usage here
would not hinder backportability anymore, if ever needed.

Please consider this change that moves the burden of
maintaining this rule out of cruft-ng.

Any comment on how to improve dh-cruft itself is welcome !

Greetings

Alexandre


Here's the new generated postrm:
-----------------------

$ cat debian/raspi-firmware/DEBIAN/postrm
#!/bin/sh
set -e
# Automatically added by dh_installdeb/13.31
dpkg-maintscript-helper rm_conffile /etc/kernel/postinst.d/linux-firmware-raspi3 1.20161123-2 -- "$@"
dpkg-maintscript-helper mv_conffile /etc/kernel/postrm.d/50raspi3-firmware /etc/kernel/postrm.d/z50-raspi-firmware 1.20190718-1\~ -- "$@"
dpkg-maintscript-helper mv_conffile /etc/kernel/postinst.d/50raspi3-firmware /etc/kernel/postinst.d/z50-raspi-firmware 1.20190718-1\~ -- "$@"
dpkg-maintscript-helper mv_conffile /etc/initramfs/post-update.d/50raspi3-firmware /etc/initramfs/post-update.d/z50-raspi-firmware 1.20190718-1\~ -- "$@"
dpkg-maintscript-helper mv_conffile /etc/kernel/postrm.d/z50-raspi3-firmware /etc/kernel/postrm.d/z50-raspi-firmware -- "$@"
dpkg-maintscript-helper mv_conffile /etc/kernel/postinst.d/z50-raspi3-firmware /etc/kernel/postinst.d/z50-raspi-firmware -- "$@"
dpkg-maintscript-helper mv_conffile /etc/initramfs/post-update.d/z50-raspi3-firmware /etc/initramfs/post-update.d/z50-raspi-firmware -- "$@"
# End automatically added section
# Automatically added by dh_cruft/0.9.80
if [ "$1" = "purge" ]
then
    # we need to glob, so no quotes
    rm -rf ${DPKG_ROOT:-}/etc/default/raspi-firmware-custom
fi
# End automatically added section


Here's the patch:
----------------------
$ git diff HEAD
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Uploaders: Michael Stapelberg <stapelberg at debian.org>,
  Romain Perier <romain.perier at gmail.com>,
  Jochen Sprickerhof <jspricke at debian.org>,
 Build-Depends: debhelper-compat (= 13),
+ dh-sequence-cruft,
  dh-sequence-movetousr,
  device-tree-compiler,
 Standards-Version: 4.6.2
--- /dev/null
+++ b/debian/raspi-firmware.cruft
@@ -0,0 +1,12 @@
+/boot/firmware
+/boot/firmware/COPYING.linux
+/boot/firmware/cmdline.txt
+/boot/firmware/config.txt
+/boot/firmware/kernel.img
+/boot/firmware/kernel7.img
+/boot/firmware/overlays
+/boot/firmware/overlays/hifiberry-dac.dtbo
+/boot/firmware/overlays/pi4-pwm.dtbo
+/boot/firmware/overlays/pi4-spidev.dtbo
+/boot/firmware/overlays/rpi-poe-plus-hat.dtbo
+/boot/firmware/overlays/README.md
--- a/debian/raspi-firmware.postrm
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-# vim:ts=2:sw=2:et
-
-set -e
-
-case "$1" in
-  purge)
-         rm -f /etc/default/raspi-firmware-custom
-    ;;
-esac
-
-#DEBHELPER#
-
-exit 0
--- /dev/null
+++ b/debian/raspi-firmware.purge
@@ -0,0 +1 @@
+/etc/default/raspi-firmware-custom



More information about the Pkg-raspi-maintainers mailing list