Package: eatmydata
Version: 26-2
Severity: normal
Tags: patch
User: multiarch-de...@lists.alioth.debian.org
Usertags: multiarch

The eatmydata package currently does not support eating data generated
using i386 binaries when installed on an amd64 system. This can be fixed
using the attached patch. Please see
http://wiki.debian.org/Multiarch/Implementation for more details and
packages fakechroot and fakeroot for similar conversions.

Helmut
diff -Nru libeatmydata-26/debian/changelog libeatmydata-26/debian/changelog
--- libeatmydata-26/debian/changelog    2011-02-19 13:28:02.000000000 +0100
+++ libeatmydata-26/debian/changelog    2012-11-25 13:11:44.000000000 +0100
@@ -1,3 +1,15 @@
+libeatmydata (26-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Support Multi-Arch.
+    + Split package to libeatmydata being ma:same.
+    + Move shared library to /usr/lib/<triplet>/libeatmydata.
+    + Use relative path for LD_PRELOAD and remove now disfunctional
+      verification step.
+    + Call ldconfig upon installation and removal of libeatmydata.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 25 Nov 2012 12:22:58 +0100
+
 libeatmydata (26-2) unstable; urgency=low
 
   * Switch homepage to launchpad.net/libeatmydata.
diff -Nru libeatmydata-26/debian/control libeatmydata-26/debian/control
--- libeatmydata-26/debian/control      2011-02-19 13:27:49.000000000 +0100
+++ libeatmydata-26/debian/control      2012-11-25 12:55:57.000000000 +0100
@@ -9,9 +9,8 @@
 Vcs-Browser: http://git.debian.org/?p=users/modax/libeatmydata.git
 
 Package: eatmydata
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Provides: libeatmydata
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, libeatmydata (= ${binary:Version})
 Description: library and utilities designed to disable fsync and friends
  This package contains a small LD_PRELOAD library (libeatmydata) and a couple
  of helper utilities designed to transparently disable fsync and friends (like
@@ -28,3 +27,13 @@
  On the other hand, do not use eatmydata when you care about what software
  stores or it manipulates important components of your system. The library is
  called libEAT-MY-DATA for a reason.
+
+Package: libeatmydata
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
+Description: shared library supporting eatmydata
+ This package contains the actual LD_PRELOAD library (libeatmydata) supporting
+ the operation of the eatmydata package. Users typically want to use or depend
+ on the eatmydata package instead of this one, so see its description for
+ further information.
diff -Nru libeatmydata-26/debian/eatmydata.install 
libeatmydata-26/debian/eatmydata.install
--- libeatmydata-26/debian/eatmydata.install    1970-01-01 01:00:00.000000000 
+0100
+++ libeatmydata-26/debian/eatmydata.install    2012-11-25 12:32:12.000000000 
+0100
@@ -0,0 +1,3 @@
+debian/lib/eatmydata.sh     /usr/share/libeatmydata/
+debian/bin/eatmydata        /usr/bin/
+debian/eatmydata.1          /usr/share/man/man1/
diff -Nru libeatmydata-26/debian/install libeatmydata-26/debian/install
--- libeatmydata-26/debian/install      2011-01-05 00:18:27.000000000 +0100
+++ libeatmydata-26/debian/install      1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-debian/lib/eatmydata.sh     /usr/share/libeatmydata/
-debian/bin/eatmydata        /usr/bin/
-debian/eatmydata.1          /usr/share/man/man1/
-libeatmydata.so             /usr/lib/libeatmydata/
diff -Nru libeatmydata-26/debian/lib/eatmydata.sh 
libeatmydata-26/debian/lib/eatmydata.sh
--- libeatmydata-26/debian/lib/eatmydata.sh     2011-01-05 00:18:27.000000000 
+0100
+++ libeatmydata-26/debian/lib/eatmydata.sh     2012-11-25 13:05:18.000000000 
+0100
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-libeatmydata="/usr/lib/libeatmydata/libeatmydata.so"
+libeatmydata="libeatmydata.so"
 name="eatmydata"
 
 eatmydata_error()
@@ -60,8 +60,3 @@
     shift
     exec "$cmd" "$@"
 }
-
-# Verify environment
-if [ ! -f "$libeatmydata" ]; then
-    eatmydata_error "could not find $name library $libeatmydata"
-fi
diff -Nru libeatmydata-26/debian/libeatmydata.dirs 
libeatmydata-26/debian/libeatmydata.dirs
--- libeatmydata-26/debian/libeatmydata.dirs    1970-01-01 01:00:00.000000000 
+0100
+++ libeatmydata-26/debian/libeatmydata.dirs    2012-11-25 13:00:52.000000000 
+0100
@@ -0,0 +1 @@
+etc/ld.so.conf.d
diff -Nru libeatmydata-26/debian/libeatmydata.postinst 
libeatmydata-26/debian/libeatmydata.postinst
--- libeatmydata-26/debian/libeatmydata.postinst        1970-01-01 
01:00:00.000000000 +0100
+++ libeatmydata-26/debian/libeatmydata.postinst        2012-11-25 
13:07:54.000000000 +0100
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+       ldconfig
+fi
diff -Nru libeatmydata-26/debian/libeatmydata.postrm 
libeatmydata-26/debian/libeatmydata.postrm
--- libeatmydata-26/debian/libeatmydata.postrm  1970-01-01 01:00:00.000000000 
+0100
+++ libeatmydata-26/debian/libeatmydata.postrm  2012-11-25 13:08:18.000000000 
+0100
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ]; then
+       ldconfig
+fi
diff -Nru libeatmydata-26/debian/rules libeatmydata-26/debian/rules
--- libeatmydata-26/debian/rules        2011-01-05 00:18:27.000000000 +0100
+++ libeatmydata-26/debian/rules        2012-11-25 13:03:09.000000000 +0100
@@ -1,7 +1,18 @@
 #!/usr/bin/make -f
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+override_dh_installdirs:
+       dh_installdirs
+       mkdir -p debian/libeatmydata/usr/lib/$(DEB_HOST_MULTIARCH)/libeatmydata
+
 override_dh_makeshlibs:
-       dh_makeshlibs -Xusr/lib/libeatmydata/*
+       dh_makeshlibs -Xusr/lib/*/libeatmydata/*
+
+override_dh_install:
+       dh_install
+       echo /usr/lib/$(DEB_HOST_MULTIARCH)/libeatmydata > 
debian/libeatmydata/etc/ld.so.conf.d/eatmydata-$(DEB_HOST_MULTIARCH).conf
+       cp libeatmydata.so 
debian/libeatmydata/usr/lib/$(DEB_HOST_MULTIARCH)/libeatmydata
 
 %:
        dh --with autoreconf $@

Reply via email to