Source: e2fsprogs
Version: 1.41.14-1.1
Tags: patch
User: [email protected]
Usertags: origin-ubuntu oneiric ubuntu-patch

Hi Ted,

Please find attached a patch to e2fsprogs to transition it to use of the
multiarch library paths as described at
<http://wiki.debian.org/Multiarch/Implementation>.  This patch has been
applied and is being used successfully in Ubuntu 11.04, and should be safe
to apply in Debian now that multiarch has been bootstrapped there.

The patch currently does a fair amount of work in debian/rules that should
ultimately done in the upstream Makefile (in particular, handling the split
between /lib/$arch and /usr/lib/$arch).  If you would like me to help with
implementing this in the upstream Makefile, let me know - though currently
we have no distro-neutral way to query multiarch paths, so it may be
premature to try to push this upstream.

Would be great if you could apply this patch to the Debian package, so we
can whittle away ia32-libs for wheezy. :)

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]
diff -u e2fsprogs-1.41.14/debian/control e2fsprogs-1.41.14/debian/control
--- e2fsprogs-1.41.14/debian/control
+++ e2fsprogs-1.41.14/debian/control
@@ -2,7 +2,7 @@
 Section: admin
 Priority: required
 Maintainer: Theodore Y. Ts'o <[email protected]>
-Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc], debhelper (>= 7.0), m4, libblkid-dev (>= 2.16), uuid-dev (>= 2.16)
+Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc], debhelper (>= 8.1.3), m4, libblkid-dev (>= 2.16), uuid-dev (>= 2.16), dpkg-dev (>= 1.16.0)
 Standards-Version: 3.8.4
 Homepage: http://e2fsprogs.sourceforge.net
 
@@ -27,6 +27,8 @@
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Replaces: e2fsprogs (<< 1.34-1)
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Description: common error description library
  libcomerr is an attempt to present a common error-handling mechanism to
  manipulate the most common form of error code in a fashion that does not
@@ -51,6 +53,8 @@
 Depends: libcomerr2, ${shlibs:Depends}, ${misc:Depends}
 Replaces: e2fsprogs (<< 1.34-1)
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Description: command-line interface parsing library
  This package includes a tool that parses a command table to generate
  a simple command-line interface parser, the include files needed to
@@ -91,6 +95,8 @@
 Replaces: e2fsprogs (<< 1.34-1)
 Provides: libext2fs2, libe2p2
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Description: ext2/ext3/ext4 file system libraries
  The ext2, ext3 and ext4 file systems are successors of the original ext
  ("extended") file system. They are the main file system types used for
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/comerr-dev.files
+++ e2fsprogs-1.41.14/debian/comerr-dev.files
@@ -1,9 +1,9 @@
-usr/lib/libcom_err.a
-usr/lib/libcom_err.so
+usr/lib/*/libcom_err.a
+usr/lib/*/libcom_err.so
 usr/include/et/*
 usr/include/com_err.h
 usr/share/man/man1/compile_et*
 usr/share/man/man3/com_err.3*
 usr/bin/compile_et
 usr/share/et/*
-usr/lib/pkgconfig/com_err.pc
+usr/lib/*/pkgconfig/com_err.pc
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/rules
+++ e2fsprogs-1.41.14/debian/rules
@@ -24,6 +24,7 @@
 DEB_HOST_OS   ?= $(shell dpkg-architecture -qDEB_HOST_OS)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 # find the version for the main package, from changelog file
 MAIN_VERSION = $(shell head -n 1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
@@ -136,7 +137,8 @@
 COMMON_CONF_FLAGS += --enable-fsck
 endif
 
-STD_CONF_FLAGS = --enable-compression
+STD_CONF_FLAGS = --enable-compression \
+	--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
 
 BF_CONF_FLAGS = --disable-nls --disable-imager --disable-testio-debug \
 	--disable-uuidd --disable-tls \
@@ -144,7 +146,8 @@
 
 STATIC_CONF_FLAGS = --disable-nls --disable-imager \
 	--disable-uuidd --disable-tls \
-	--disable-e2initrd-helper
+	--disable-e2initrd-helper \
+	--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
 
 MIPS_NOPIC_CONF_FLAGS = --disable-nls --disable-imager \
 	--disable-uuidd --disable-tls \
@@ -255,7 +258,7 @@
 build-std: ${BUILDSTDSTAMP}
 ${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
 	dh_testdir
-	$(MAKE) -C ${stdbuilddir} all
+	$(MAKE) -C ${stdbuilddir} all V=1
 	$(MAKE) -C ${stdbuilddir}/e2fsck e2fsck.static
 
 	( cd ${stdbuilddir}/doc && $(MAKE) libext2fs_abt.html )
@@ -327,6 +330,20 @@
 	cp ${mandir}/man8/e2fsck.8 ${mandir}/man8/e2fsck.static.8
 
 	ln -s et/com_err.h ${tmpdir}/usr/include
+	mv ${tmpdir}/usr/lib/$(DEB_HOST_MULTIARCH)/e2initrd_helper \
+	   ${tmpdir}/usr/lib
+	# eventually we want the upstream build rules to take care of this
+	# properly, since they already know how to handle /lib + /usr/lib;
+	# but for now we do it in debian/rules.
+	mkdir -p ${tmpdir}/lib/$(DEB_HOST_MULTIARCH)
+	mv ${tmpdir}/usr/lib/$(DEB_HOST_MULTIARCH)/lib*.so.* \
+	   ${tmpdir}/lib/$(DEB_HOST_MULTIARCH)
+	for lib in ${tmpdir}/lib/$(DEB_HOST_MULTIARCH)/lib*.so.?; do \
+	    lib=$$(basename $$lib); \
+	    so=$$(echo $$lib | sed -e's/\.so\..*/.so/'); \
+	    ln -sf /lib/$(DEB_HOST_MULTIARCH)/$$lib \
+	           ${tmpdir}/usr/lib/$(DEB_HOST_MULTIARCH)/$$so; \
+	done
 
 	dh_movefiles
 	test -z "`find ${tmpdir} -type f`"
@@ -365,10 +382,10 @@
 
 ifneq ($(UTIL_LINUX_NG),yes)
 	mkdir -p ${blkidudebdir}/lib
-	mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib
+	mv ${udebdir}/lib/$(DEB_HOST_ARCH)/libblkid.* ${blkidudebdir}/lib
 
 	mkdir -p ${uuidudebdir}/lib
-	mv ${udebdir}/lib/libuuid.* ${uuidudebdir}/lib
+	mv ${udebdir}/lib/$(DEB_HOST_ARCH)/libuuid.* ${uuidudebdir}/lib
 endif
 
 binary-indep: 
@@ -470,38 +487,38 @@
 	rm -rf ${uuidudebdir}/usr
 endif
 
-	mkdir -p ${debugdir}/usr/lib
-	mv ${maindir}/usr/lib/debug ${debugdir}/usr/lib
+	mkdir -p ${debugdir}/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv ${maindir}/usr/lib/debug ${debugdir}/usr/lib/$(DEB_HOST_MULTIARCH)
 	rm -rf ${maindir}/usr/lib/debug
 	mv ${e2fsckstaticdir}/usr/lib/debug/sbin/* \
-		${debugdir}/usr/lib/debug
+		${debugdir}/usr/lib/$(DEB_HOST_MULTIARCH)/debug
 	rm -rf ${e2fsckstaticdir}/usr/lib
 
 ifneq ($(UTIL_LINUX_NG),yes)
-	mkdir -p ${uuidruntimedbgdir}/usr/lib
-	mv ${uuidruntimedir}/usr/lib/debug ${uuidruntimedbgdir}/usr/lib
+	mkdir -p ${uuidruntimedbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv ${uuidruntimedir}/usr/lib/debug ${uuidruntimedbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
 	rmdir ${uuidruntimedir}/usr/lib
 endif
 
-	mkdir -p ${libext2dbgdir}/usr/lib
-	mv ${libext2dir}/usr/lib/debug ${libext2dbgdir}/usr/lib
+	mkdir -p ${libext2dbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv ${libext2dir}/usr/lib/debug ${libext2dbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
 	rmdir ${libext2dir}/usr/lib
 
-	mkdir -p ${libcomerrdbgdir}/usr/lib
-	mv ${libcomerrdir}/usr/lib/debug ${libcomerrdbgdir}/usr/lib
+	mkdir -p ${libcomerrdbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv ${libcomerrdir}/usr/lib/debug ${libcomerrdbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
 	rmdir ${libcomerrdir}/usr/lib
 
-	mkdir -p ${libssdbgdir}/usr/lib
-	mv ${libssdir}/usr/lib/debug ${libssdbgdir}/usr/lib
+	mkdir -p ${libssdbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv ${libssdir}/usr/lib/debug ${libssdbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
 	rmdir ${libssdir}/usr/lib
 
 ifneq ($(UTIL_LINUX_NG),yes)
-	mkdir -p ${libuuiddbgdir}/usr/lib
-	mv ${libuuiddir}/usr/lib/debug ${libuuiddbgdir}/usr/lib
+	mkdir -p ${libuuiddbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv ${libuuiddir}/usr/lib/debug ${libuuiddbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
 	rmdir ${libuuiddir}/usr/lib
 
-	mkdir -p ${libblkiddbgdir}/usr/lib
-	mv ${libblkiddir}/usr/lib/debug ${libblkiddbgdir}/usr/lib
+	mkdir -p ${libblkiddbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv ${libblkiddir}/usr/lib/debug ${libblkiddbgdir}/usr/lib/$(DEB_HOST_MULTIARCH)
 	rmdir ${libblkiddir}/usr/lib
 endif
 
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/changelog
+++ e2fsprogs-1.41.14/debian/changelog
@@ -1,3 +1,11 @@
+e2fsprogs (1.41.14-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Build for multiarch, setting Pre-Depends: multiarch-support in our
+    shared lib package.
+
+ -- Steve Langasek <[email protected]>  Wed, 29 Jun 2011 14:09:41 +0100
+
 e2fsprogs (1.41.14-1) experimental; urgency=low
 
   * New upstream release
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/control.in
+++ e2fsprogs-1.41.14/debian/control.in
@@ -3,9 +3,9 @@
 Priority: required
 Maintainer: Theodore Y. Ts'o <[email protected]>
 ifdef(`UTIL_LINUX_NG',
-``Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc], debhelper (>= 7.0), m4, libblkid-dev (>= 2.16), uuid-dev (>= 2.16)
+``Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc], debhelper (>= 8.1.3), m4, libblkid-dev (>= 2.16), uuid-dev (>= 2.16), dpkg-dev (>= 1.16.0)
 '',
-``Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc], debhelper (>= 7.0), m4
+``Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc], debhelper (>= 8.1.3), m4, dpkg-dev (>= 1.16.0)
 '')dnl
 Standards-Version: 3.8.4
 Homepage: http://e2fsprogs.sourceforge.net
@@ -31,6 +31,8 @@
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Replaces: e2fsprogs (<< 1.34-1)
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Description: common error description library
  libcomerr is an attempt to present a common error-handling mechanism to
  manipulate the most common form of error code in a fashion that does not
@@ -55,6 +57,8 @@
 Depends: libcomerr2, ${shlibs:Depends}, ${misc:Depends}
 Replaces: e2fsprogs (<< 1.34-1)
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Description: command-line interface parsing library
  This package includes a tool that parses a command table to generate
  a simple command-line interface parser, the include files needed to
@@ -82,6 +86,8 @@
 Recommends: uuid-runtime
 Replaces: e2fsprogs (<< 1.34-1)
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Description: Universally Unique ID library
  The libuuid library generates and parses 128-bit universally unique
  ids (UUIDs).  A UUID is an identifier that is unique across both
@@ -144,6 +150,8 @@
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Description: block device id library
  The blkid library which allows system programs like fsck and 
  mount to quickly and easily find block devices by filesystem UUID and 
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/ss-dev.files
+++ e2fsprogs-1.41.14/debian/ss-dev.files
@@ -1,7 +1,7 @@
-usr/lib/libss.so
-usr/lib/libss.a
+usr/lib/*/libss.so
+usr/lib/*/libss.a
 usr/include/ss/*
 usr/bin/mk_cmds
 usr/share/ss/*
 usr/share/man/man1/mk_cmds*
-usr/lib/pkgconfig/ss.pc
+usr/lib/*/pkgconfig/ss.pc
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/e2fslibs-dev.files
+++ e2fsprogs-1.41.14/debian/e2fslibs-dev.files
@@ -1,7 +1,7 @@
-usr/lib/*.so
-usr/lib/*.a
+usr/lib/*/*.so
+usr/lib/*/*.a
 usr/include/ext2fs
 usr/include/e2p
 usr/share/info/libext2fs.info*
-usr/lib/pkgconfig/e2p.pc
-usr/lib/pkgconfig/ext2fs.pc
+usr/lib/*/pkgconfig/e2p.pc
+usr/lib/*/pkgconfig/ext2fs.pc
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/e2fsprogs.files
+++ e2fsprogs-1.41.14/debian/e2fsprogs.files
@@ -1,4 +1,3 @@
-lib
 sbin
 usr/bin
 usr/sbin
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/e2fslibs.files
+++ e2fsprogs-1.41.14/debian/e2fslibs.files
@@ -1,3 +1,3 @@
-lib/libext2fs*
-lib/libe2p*
+lib/*/libext2fs*
+lib/*/libe2p*
 
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/libcomerr2.files
+++ e2fsprogs-1.41.14/debian/libcomerr2.files
@@ -1,2 +1,2 @@
-lib/libcom_err*
+lib/*/libcom_err*
 
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/libss2.files
+++ e2fsprogs-1.41.14/debian/libss2.files
@@ -1 +1 @@
-lib/libss*
+lib/*/libss*
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/libblkid1.files
+++ e2fsprogs-1.41.14/debian/libblkid1.files
@@ -1 +1 @@
-lib/libblkid*
+lib/*/libblkid*
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/libblkid-dev.files
+++ e2fsprogs-1.41.14/debian/libblkid-dev.files
@@ -1,4 +1,4 @@
-usr/lib/libblkid*
+usr/lib/*/libblkid*
 usr/include/blkid
 usr/share/man/man3/libblkid.3
-usr/lib/pkgconfig/blkid.pc
+usr/lib/*/pkgconfig/blkid.pc
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/uuid-dev.files
+++ e2fsprogs-1.41.14/debian/uuid-dev.files
@@ -1,5 +1,5 @@
-usr/lib/libuuid.so
-usr/lib/libuuid.a
+usr/lib/*/libuuid.so
+usr/lib/*/libuuid.a
 usr/include/uuid/*
 usr/share/man/man3/uuid*
-usr/lib/pkgconfig/uuid.pc
+usr/lib/*/pkgconfig/uuid.pc
only in patch2:
unchanged:
--- e2fsprogs-1.41.14.orig/debian/libuuid1.files
+++ e2fsprogs-1.41.14/debian/libuuid1.files
@@ -1 +1 @@
-lib/libuuid*
+lib/*/libuuid*

Attachment: signature.asc
Description: Digital signature

Reply via email to