Package: xfsdump
Version: 3.1.4
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 -urNp xfsdump-3.1.4/debian/xfsdump.postinst xfsdump-3.1.4+nmu1/debian/xfsdump.postinst
--- xfsdump-3.1.4/debian/xfsdump.postinst	1970-01-01 01:00:00.000000000 +0100
+++ xfsdump-3.1.4+nmu1/debian/xfsdump.postinst	2014-11-02 15:54:11.088658085 +0100
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = 'configure' ]; then
+  for file in xfsdump xfsrestore; do
+    if [ ! -e /usr/sbin/$file ]; then
+      ln -s /sbin/$file /usr/sbin/$file
+    fi
+  done
+fi
+
+#DEBHELPER#
diff -urNp xfsdump-3.1.4/debian/xfsdump.postrm xfsdump-3.1.4+nmu1/debian/xfsdump.postrm
--- xfsdump-3.1.4/debian/xfsdump.postrm	1970-01-01 01:00:00.000000000 +0100
+++ xfsdump-3.1.4+nmu1/debian/xfsdump.postrm	2014-11-02 15:54:39.929162438 +0100
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = 'remove' ]; then
+  for file in xfsdump xfsrestore; do
+    if [ -L /usr/sbin/$file ]; then
+      rm /usr/sbin/$file
+    fi
+  done
+fi
+
+#DEBHELPER#
diff -urNp xfsdump-3.1.4/dump/Makefile xfsdump-3.1.4+nmu1/dump/Makefile
--- xfsdump-3.1.4/dump/Makefile	2012-09-18 07:26:37.000000000 +0200
+++ xfsdump-3.1.4+nmu1/dump/Makefile	2014-11-02 15:52:55.167330354 +0100
@@ -100,7 +100,6 @@ install: default
 	$(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
 	$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
 	$(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
-	$(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
 install-dev:
 
 .dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
diff -urNp xfsdump-3.1.4/restore/Makefile xfsdump-3.1.4+nmu1/restore/Makefile
--- xfsdump-3.1.4/restore/Makefile	2012-09-18 07:26:37.000000000 +0200
+++ xfsdump-3.1.4+nmu1/restore/Makefile	2014-11-02 15:52:19.930714103 +0100
@@ -110,7 +110,6 @@ install: default
 	$(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
 	$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
 	$(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
-	$(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
 install-dev:
 
 .dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)

Attachment: signature.asc
Description: Digital signature

Reply via email to