Package: cryptsetup Version: 2:1.6.6-3 Severity: normal Tags: patch User: [email protected] Usertags: usrmerge
The package installs a symbolic link and a file with the same name in both /sbin/ and /usr/sbin/, so it makes impossible to convert a system to the everything-in-usr directories scheme. The attached patch solves this problem by creating the link in postinst and only if it is needed. For more information about everything-in-usr please read http://anonscm.debian.org/cgit/users/md/usrmerge.git/tree/debian/README.Debian -- ciao, Marco
diff -urpN a/debian/cryptsetup.postinst b/debian/cryptsetup.postinst
--- a/debian/cryptsetup.postinst 2014-03-03 20:25:28.000000000 +0100
+++ b/debian/cryptsetup.postinst 2014-11-02 03:18:32.000000000 +0100
@@ -16,6 +16,12 @@ set -e
case "$1" in
configure)
+ for file in cryptdisks_start cryptdisks_stop; do
+ if [ ! -e /usr/sbin/$file ]; then
+ ln -s /sbin/$file /usr/sbin/$file
+ fi
+ done
+
if [ -x /usr/sbin/update-initramfs ]; then
update-initramfs -u
fi
diff -urpN a/debian/cryptsetup.postrm b/debian/cryptsetup.postrm
--- a/debian/cryptsetup.postrm 2011-09-19 12:46:19.000000000 +0200
+++ b/debian/cryptsetup.postrm 2014-11-02 03:19:04.000000000 +0100
@@ -7,6 +7,12 @@ case "$1" in
if [ -x /usr/sbin/update-initramfs ]; then
update-initramfs -u
fi
+
+ for file in cryptdisks_start cryptdisks_stop; do
+ if [ -L /usr/sbin/$file ]; then
+ rm /usr/sbin/$file
+ fi
+ done
;;
esac
diff -urpN a/debian/rules b/debian/rules
--- a/debian/rules 2014-03-03 20:53:49.000000000 +0100
+++ b/debian/rules 2014-11-02 03:16:41.000000000 +0100
@@ -115,8 +115,6 @@ install-stamp: build-stamp
install -m 0755 debian/scripts/luksformat $(CURDIR)/debian/cryptsetup-bin/usr/sbin/
install -m 0755 debian/scripts/cryptdisks_start $(CURDIR)/debian/cryptsetup/sbin/
install -m 0755 debian/scripts/cryptdisks_stop $(CURDIR)/debian/cryptsetup/sbin/
- dh_link -pcryptsetup sbin/cryptdisks_start usr/sbin/cryptdisks_start
- dh_link -pcryptsetup sbin/cryptdisks_stop usr/sbin/cryptdisks_stop
install -m 0755 debian/scripts/decrypt_* $(CURDIR)/debian/cryptsetup/lib/cryptsetup/scripts/
install -m 0755 debian/scripts/passdev $(CURDIR)/debian/cryptsetup/lib/cryptsetup/scripts/
install -m 0755 debian/askpass $(CURDIR)/debian/cryptsetup/lib/cryptsetup/
signature.asc
Description: Digital signature

