debian: add support for multiarch

Enhance the debian build rules so it will create multiarch compliant
packages on those distributions that have support for it.

Also remove e2initrd-helper from the e2fsprogs package since no one
uses it any more.

Also update the debian policy standards version to 3.9.2.

Addresses-Debian-Bug: #632169

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
bitmap-optimize
Theodore Ts'o 2011-09-18 23:53:23 -04:00
parent d1154eb460
commit 55e00a2503
23 changed files with 113 additions and 66 deletions

9
configure vendored
View File

@ -823,6 +823,7 @@ enable_rpath
with_libiconv_prefix with_libiconv_prefix
with_included_gettext with_included_gettext
with_libintl_prefix with_libintl_prefix
with_multiarch
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
@ -1487,6 +1488,7 @@ Optional Packages:
--with-included-gettext use the GNU gettext library included here --with-included-gettext use the GNU gettext library included here
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and libdir --without-libintl-prefix don't search for libintl in includedir and libdir
--with-multiarch=ARCH specify the multiarch triplet
Some influential environment variables: Some influential environment variables:
CC C compiler command CC C compiler command
@ -11269,6 +11271,13 @@ fi
# Check whether --with-multiarch was given.
if test "${with_multiarch+set}" = set; then :
withval=$with_multiarch; libdir=$libdir/$withval
root_libdir=$root_libdir/$withval
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker accepts -static" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker accepts -static" >&5
$as_echo_n "checking whether linker accepts -static... " >&6; } $as_echo_n "checking whether linker accepts -static... " >&6; }
if test "${ac_cv_e2fsprogs_use_static+set}" = set; then : if test "${ac_cv_e2fsprogs_use_static+set}" = set; then :

View File

@ -1068,6 +1068,14 @@ AC_SUBST(root_sbindir)
AC_SUBST(root_libdir) AC_SUBST(root_libdir)
AC_SUBST(root_sysconfdir) AC_SUBST(root_sysconfdir)
dnl dnl
dnl Allow specification of the multiarch arch
dnl
AC_ARG_WITH([multiarch],
[ --with-multiarch=ARCH specify the multiarch triplet],
libdir=$libdir/$withval
root_libdir=$root_libdir/$withval
)dnl
dnl
dnl See if -static works. dnl See if -static works.
dnl dnl
AC_MSG_CHECKING([whether linker accepts -static]) AC_MSG_CHECKING([whether linker accepts -static])

View File

@ -1,9 +1,9 @@
usr/lib/libcom_err.a usr/lib/*/libcom_err.a
usr/lib/libcom_err.so usr/lib/*/libcom_err.so
usr/include/et/* usr/include/et/*
usr/include/com_err.h usr/include/com_err.h
usr/share/man/man1/compile_et* usr/share/man/man1/compile_et*
usr/share/man/man3/com_err.3* usr/share/man/man3/com_err.3*
usr/bin/compile_et usr/bin/compile_et
usr/share/et/* usr/share/et/*
usr/lib/pkgconfig/com_err.pc usr/lib/*/pkgconfig/com_err.pc

23
debian/control.in vendored
View File

@ -1,13 +1,14 @@
define(MULTIARCH_HEADERS,ifdef(`DO_MULTIARCH',
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends},REMOVE_ME))dnl
define(UTIL_LINUX_NG_DEFINES,
ifdef(`UTIL_LINUX_NG', ``libblkid-dev (>= 2.16), uuid-dev (>= 2.16),''))dnl
Source: e2fsprogs Source: e2fsprogs
Section: admin Section: admin
Priority: required Priority: required
Maintainer: Theodore Y. Ts'o <tytso@mit.edu> Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
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), UTIL_LINUX_NG_DEFINES 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 (>= 7.0), m4, libblkid-dev (>= 2.16), uuid-dev (>= 2.16) Standards-Version: 3.9.2
'',
``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
'')dnl
Standards-Version: 3.8.4
Homepage: http://e2fsprogs.sourceforge.net Homepage: http://e2fsprogs.sourceforge.net
Package: e2fsck-static Package: e2fsck-static
@ -31,6 +32,7 @@ Provides: libcomerr-kth-compat
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: e2fsprogs (<< 1.34-1) Replaces: e2fsprogs (<< 1.34-1)
Architecture: any Architecture: any
MULTIARCH_HEADERS
Description: common error description library Description: common error description library
libcomerr is an attempt to present a common error-handling mechanism to 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 manipulate the most common form of error code in a fashion that does not
@ -55,10 +57,11 @@ Section: libs
Depends: libcomerr2, ${shlibs:Depends}, ${misc:Depends} Depends: libcomerr2, ${shlibs:Depends}, ${misc:Depends}
Replaces: e2fsprogs (<< 1.34-1) Replaces: e2fsprogs (<< 1.34-1)
Architecture: any Architecture: any
MULTIARCH_HEADERS
Description: command-line interface parsing library Description: command-line interface parsing library
This package includes a tool that parses a command table to generate libss provides a simple command-line interface parser which will
a simple command-line interface parser, the include files needed to accept input from the user, parse the command into an argv argument
compile and use it, and the static libs. vector, and then dispatch it to a handler function.
. .
It was originally inspired by the Multics SubSystem library. It was originally inspired by the Multics SubSystem library.
@ -82,6 +85,7 @@ Depends: passwd, ${shlibs:Depends}, ${misc:Depends}
Recommends: uuid-runtime Recommends: uuid-runtime
Replaces: e2fsprogs (<< 1.34-1) Replaces: e2fsprogs (<< 1.34-1)
Architecture: any Architecture: any
MULTIARCH_HEADERS
Description: Universally Unique ID library Description: Universally Unique ID library
The libuuid library generates and parses 128-bit universally unique The libuuid library generates and parses 128-bit universally unique
ids (UUIDs). A UUID is an identifier that is unique across both ids (UUIDs). A UUID is an identifier that is unique across both
@ -200,6 +204,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: e2fsprogs (<< 1.34-1) Replaces: e2fsprogs (<< 1.34-1)
Provides: libext2fs2, libe2p2 Provides: libext2fs2, libe2p2
Architecture: any Architecture: any
MULTIARCH_HEADERS
Description: ext2/ext3/ext4 file system libraries Description: ext2/ext3/ext4 file system libraries
The ext2, ext3 and ext4 file systems are successors of the original ext 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 ("extended") file system. They are the main file system types used for

View File

@ -1,9 +0,0 @@
usr/lib/*.so
usr/lib/*.a
usr/include/ext2fs
usr/include/e2p
usr/include/quota
usr/share/info/libext2fs.info*
usr/lib/pkgconfig/e2p.pc
usr/lib/pkgconfig/ext2fs.pc
usr/lib/pkgconfig/quota.pc

9
debian/e2fslibs-dev.files.in vendored Normal file
View File

@ -0,0 +1,9 @@
usr/lib/*/*.so
usr/lib/*/*.a
usr/include/ext2fs
usr/include/e2p
usr/include/quota
usr/share/info/libext2fs.info*
usr/lib/*/pkgconfig/e2p.pc
usr/lib/*/pkgconfig/ext2fs.pc
usr/lib/*/pkgconfig/quota.pc

View File

@ -1,3 +0,0 @@
lib/libext2fs*
lib/libe2p*
lib/libquota*

3
debian/e2fslibs.files.in vendored Normal file
View File

@ -0,0 +1,3 @@
lib/*/libext2fs*
lib/*/libe2p*
lib/*/libquota*

View File

@ -1,8 +1,6 @@
lib
sbin sbin
usr/bin usr/bin
usr/sbin usr/sbin
usr/lib/e2initrd_helper
usr/share/man usr/share/man
usr/share/locale usr/share/locale
etc etc

View File

@ -1,4 +0,0 @@
usr/lib/libblkid*
usr/include/blkid
usr/share/man/man3/libblkid.3
usr/lib/pkgconfig/blkid.pc

4
debian/libblkid-dev.files.in vendored Normal file
View File

@ -0,0 +1,4 @@
usr/lib/*/libblkid*
usr/include/blkid
usr/share/man/man3/libblkid.3
usr/lib/*/pkgconfig/blkid.pc

View File

@ -1 +0,0 @@
lib/libblkid*

1
debian/libblkid1.files.in vendored Normal file
View File

@ -0,0 +1 @@
lib/*/libblkid*

View File

@ -1,2 +0,0 @@
lib/libcom_err*

1
debian/libcomerr2.files.in vendored Normal file
View File

@ -0,0 +1 @@
lib/*/libcom_err*

1
debian/libss2.files vendored
View File

@ -1 +0,0 @@
lib/libss*

1
debian/libss2.files.in vendored Normal file
View File

@ -0,0 +1 @@
lib/*/libss*

View File

@ -1 +0,0 @@
lib/libuuid*

1
debian/libuuid1.files.in vendored Normal file
View File

@ -0,0 +1 @@
lib/*/libuuid*

74
debian/rules vendored
View File

@ -24,6 +24,7 @@ DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_HOST_OS ?= $(shell dpkg-architecture -qDEB_HOST_OS) DEB_HOST_OS ?= $(shell dpkg-architecture -qDEB_HOST_OS)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
# find the version for the main package, from changelog file # 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') MAIN_VERSION = $(shell head -n 1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
@ -127,8 +128,8 @@ endif
BF_CFLAGS = -Os -fomit-frame-pointer BF_CFLAGS = -Os -fomit-frame-pointer
COMMON_CONF_FLAGS = \ COMMON_CONF_FLAGS = --disable-e2initrd-helper --enable-elf-shlibs \
--enable-elf-shlibs --infodir=/usr/share/info --infodir=/usr/share/info
ifeq ($(UTIL_LINUX_NG),yes) ifeq ($(UTIL_LINUX_NG),yes)
COMMON_CONF_FLAGS += --disable-fsck --disable-libblkid \ COMMON_CONF_FLAGS += --disable-fsck --disable-libblkid \
--disable-libuuid --disable-uuidd --disable-libuuid --disable-uuidd
@ -136,15 +137,23 @@ else
COMMON_CONF_FLAGS += --enable-fsck COMMON_CONF_FLAGS += --enable-fsck
endif endif
STD_CONF_FLAGS = --enable-symlink-install ifneq ($(strip $(DEB_HOST_MULTIARCH)),)
MULTIARCH_CONF = --with-multiarch=$(DEB_HOST_MULTIARCH)
# This doesn't work yet because gdb and lintian don't expect and/or
# don't work with /usr/lib/<triplet>/debug
#USRLIB = /usr/lib/$(DEB_HOST_MULTIARCH)
USRLIB = /usr/lib
else
USRLIB = /usr/lib
endif
STD_CONF_FLAGS = --enable-symlink-install $(MULTIARCH_CONF)
BF_CONF_FLAGS = --disable-nls --disable-imager --disable-testio-debug \ BF_CONF_FLAGS = --disable-nls --disable-imager --disable-testio-debug \
--disable-uuidd --disable-tls \ --disable-uuidd --disable-tls --disable-debugfs
--disable-debugfs --disable-e2initrd-helper
STATIC_CONF_FLAGS = --disable-nls --disable-imager \ STATIC_CONF_FLAGS = --disable-nls --disable-imager \
--disable-uuidd --disable-tls \ --disable-uuidd --disable-tls
--disable-e2initrd-helper
MIPS_NOPIC_CONF_FLAGS = --disable-nls --disable-imager \ MIPS_NOPIC_CONF_FLAGS = --disable-nls --disable-imager \
--disable-uuidd --disable-tls \ --disable-uuidd --disable-tls \
@ -167,13 +176,30 @@ else
M4_ARGS+=-UUTIL_LINUX_NG M4_ARGS+=-UUTIL_LINUX_NG
endif endif
ifneq ($(strip $(DEB_HOST_MULTIARCH)),)
M4_ARGS+=-DDO_MULTIARCH
else
M4_ARGS+=-UDO_MULTIARCH
endif
FILES_FIXUP= libcomerr2.files comerr-dev.files libss2.files ss-dev.files \
libuuid1.files uuid-dev.files libblkid1.files libblkid-dev.files \
e2fslibs.files e2fslibs-dev.files
debian-files: debian/control debian/e2fsprogs.shlibs.local debian-files: debian/control debian/e2fsprogs.shlibs.local
ifeq ($(strip $(DEB_HOST_MULTIARCH)),)
for i in $(FILES_FIXUP); do \
sed -e 's;lib/\*/;lib/;' debian/$$i.in > debian/$$i; \
done
else
for i in $(FILES_FIXUP); do cp debian/$$i.in debian/$$i; done
endif
mrproper: clean mrproper: clean
rm debian/control debian/e2fsprogs.shlibs.local rm debian/control debian/e2fsprogs.shlibs.local
debian/control: debian/control.in debian/rules debian/control: debian/control.in debian/rules
m4 $(M4_ARGS) < debian/control.in > $@ m4 $(M4_ARGS) < debian/control.in | grep -v ^REMOVE_ME$$ > $@
debian/e2fsprogs.shlibs.local: debian/e2fsprogs.shlibs.local.in debian/e2fsprogs.shlibs.local: debian/e2fsprogs.shlibs.local.in
m4 $(M4_ARGS) < debian/e2fsprogs.shlibs.local.in > $@ m4 $(M4_ARGS) < debian/e2fsprogs.shlibs.local.in > $@
@ -250,6 +276,8 @@ endif
mkdir -p ${STAMPSDIR} mkdir -p ${STAMPSDIR}
touch ${CFGSTATICSTAMP} touch ${CFGSTATICSTAMP}
build-arch: build
build-indep: build
build: build-std build-bf $(BUILD_STATIC) build: build-std build-bf $(BUILD_STATIC)
build-std: ${BUILDSTDSTAMP} build-std: ${BUILDSTDSTAMP}
@ -468,38 +496,38 @@ ifneq ($(UTIL_LINUX_NG),yes)
rm -rf ${uuidudebdir}/usr rm -rf ${uuidudebdir}/usr
endif endif
mkdir -p ${debugdir}/usr/lib mkdir -p ${debugdir}/$(USRLIB)
mv ${maindir}/usr/lib/debug ${debugdir}/usr/lib mv ${maindir}/usr/lib/debug ${debugdir}/$(USRLIB)
rm -rf ${maindir}/usr/lib/debug rm -rf ${maindir}/usr/lib/debug
mv ${e2fsckstaticdir}/usr/lib/debug/sbin/* \ mv ${e2fsckstaticdir}/usr/lib/debug/sbin/* \
${debugdir}/usr/lib/debug ${debugdir}/$(USRLIB)/debug
rm -rf ${e2fsckstaticdir}/usr/lib rm -rf ${e2fsckstaticdir}/usr/lib
ifneq ($(UTIL_LINUX_NG),yes) ifneq ($(UTIL_LINUX_NG),yes)
mkdir -p ${uuidruntimedbgdir}/usr/lib mkdir -p ${uuidruntimedbgdir}/$(USRLIB)
mv ${uuidruntimedir}/usr/lib/debug ${uuidruntimedbgdir}/usr/lib mv ${uuidruntimedir}/usr/lib/debug ${uuidruntimedbgdir}/$(USRLIB)
rmdir ${uuidruntimedir}/usr/lib rmdir ${uuidruntimedir}/usr/lib
endif endif
mkdir -p ${libext2dbgdir}/usr/lib mkdir -p ${libext2dbgdir}/$(USRLIB)
mv ${libext2dir}/usr/lib/debug ${libext2dbgdir}/usr/lib mv ${libext2dir}/usr/lib/debug ${libext2dbgdir}/$(USRLIB)
rmdir ${libext2dir}/usr/lib rmdir ${libext2dir}/usr/lib
mkdir -p ${libcomerrdbgdir}/usr/lib mkdir -p ${libcomerrdbgdir}/$(USRLIB)
mv ${libcomerrdir}/usr/lib/debug ${libcomerrdbgdir}/usr/lib mv ${libcomerrdir}/usr/lib/debug ${libcomerrdbgdir}/$(USRLIB)
rmdir ${libcomerrdir}/usr/lib rmdir ${libcomerrdir}/usr/lib
mkdir -p ${libssdbgdir}/usr/lib mkdir -p ${libssdbgdir}/$(USRLIB)
mv ${libssdir}/usr/lib/debug ${libssdbgdir}/usr/lib mv ${libssdir}/usr/lib/debug ${libssdbgdir}/$(USRLIB)
rmdir ${libssdir}/usr/lib rmdir ${libssdir}/usr/lib
ifneq ($(UTIL_LINUX_NG),yes) ifneq ($(UTIL_LINUX_NG),yes)
mkdir -p ${libuuiddbgdir}/usr/lib mkdir -p ${libuuiddbgdir}/$(USRLIB)
mv ${libuuiddir}/usr/lib/debug ${libuuiddbgdir}/usr/lib mv ${libuuiddir}/usr/lib/debug ${libuuiddbgdir}/$(USRLIB)
rmdir ${libuuiddir}/usr/lib rmdir ${libuuiddir}/usr/lib
mkdir -p ${libblkiddbgdir}/usr/lib mkdir -p ${libblkiddbgdir}/$(USRLIB)
mv ${libblkiddir}/usr/lib/debug ${libblkiddbgdir}/usr/lib mv ${libblkiddir}/usr/lib/debug ${libblkiddbgdir}/$(USRLIB)
rmdir ${libblkiddir}/usr/lib rmdir ${libblkiddir}/usr/lib
endif endif

View File

@ -1,7 +1,7 @@
usr/lib/libss.so usr/lib/*/libss.so
usr/lib/libss.a usr/lib/*/libss.a
usr/include/ss/* usr/include/ss/*
usr/bin/mk_cmds usr/bin/mk_cmds
usr/share/ss/* usr/share/ss/*
usr/share/man/man1/mk_cmds* usr/share/man/man1/mk_cmds*
usr/lib/pkgconfig/ss.pc usr/lib/*/pkgconfig/ss.pc

View File

@ -1,5 +0,0 @@
usr/lib/libuuid.so
usr/lib/libuuid.a
usr/include/uuid/*
usr/share/man/man3/uuid*
usr/lib/pkgconfig/uuid.pc

5
debian/uuid-dev.files.in vendored Normal file
View File

@ -0,0 +1,5 @@
usr/lib/*/libuuid.so
usr/lib/*/libuuid.a
usr/include/uuid/*
usr/share/man/man3/uuid*
usr/lib/*/pkgconfig/uuid.pc