Hi Christian,
dh-cruft has been available for many years already
and it's usage here would not hinder backportability anymore
Please consider the following patch to logrotate.
Then after next dinstall run, tools/migration*.py scripts
inside cruft-ng repos can be used to archive the old override rule.
I will handle this step but you can do it too if you prefer.
Any idea on how to improve dh-cruft are welcome.
Greetings
Alexandre
$ git diff HEAD
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@ Priority: important
Maintainer: Christian Göttsche <cgzones@googlemail.com>
Build-Depends: acl [linux-any] <!nocheck>,
debhelper-compat (= 13),
+ dh-sequence-cruft,
libacl1-dev [linux-any],
libpopt-dev,
libselinux1-dev [linux-any]
--- a/debian/logrotate.postrm
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-set -eu
-if [ "$1" = "purge" ]; then
- rm -rf /var/lib/logrotate
-fi
-
-#DEBHELPER#
-
-exit 0
--- /dev/null
+++ b/debian/logrotate.purge
@@ -0,0 +1 @@
+/var/lib/logrotate
----------------------------------------------------
Here is a sample result of the templating.
$ cat debian/logrotate/DEBIAN/postrm
#!/bin/sh
set -e
# Automatically added by dh_cruft/0.9.80
if [ "$1" = "purge" ]
then
# we need to glob, so no quotes
rm -rf ${DPKG_ROOT:-}/var/lib/logrotate
fi
# End automatically added section