Re: [PATCH] blkid: add --disable-libblkid (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-04-22 at 09:49 -0400, Theodore Tso wrote:

> On Wed, Apr 22, 2009 at 02:42:25PM +0100, Scott James Remnant wrote:
> > 
> > Obviously this doesn't solve the debian/control problem - that would
> > require generating it with/without the libblkid parts depending on
> > target distro.
> 
> One of the things I need to look at, but maybe you know off-hand, is
> whether the debian/rules can safely modify debian/control file.  I
> haven't looked deeply into the underbelly of how dpkg-buildpackage and
> its descendents work to know whether or not that can be done safely.
> If not, we might have to have a separate shell script which is run
> manually that adjusts debian/control and debian/rules file.  That
> would be annoying/unfortunate, but doable.
> 
I humbly submit the following two patches:

Scott
-- 
Scott James Remnant
scott@xxxxxxxxxx
From b45cc0027f7b1217aa1d2cf9c028a869a537ee09 Mon Sep 17 00:00:00 2001
From: Scott James Remnant <scott@xxxxxxxxxx>
Date: Wed, 29 Apr 2009 18:15:26 +0100
Subject: [PATCH] debian: allow building with external libblkid

If BUILD_BLKID=no during processing of debian/rules, e2fsprogs will be
built with an external libblkid with the internal one disabled, and
also the internal fsck disabled.

This necessates generating debian/control from the rules, edits should
be made to debian/control.in instead.
---
 .gitignore        |    1 +
 debian/control    |  304 -----------------------------------------------------
 debian/control.in |  304 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/rules      |   66 ++++++++++--
 4 files changed, 362 insertions(+), 313 deletions(-)
 delete mode 100644 debian/control
 create mode 100644 debian/control.in

diff --git a/.gitignore b/.gitignore
index 0e21aea..a651514 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ MCONFIG
 asm_types.h
 config.log
 config.status
+debian/control
 debugfs/debug_cmds.c
 debugfs/debugfs
 debugfs/debugfs.8
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 0ab8069..0000000
--- a/debian/control
+++ /dev/null
@@ -1,304 +0,0 @@
-Source: e2fsprogs
-Section: admin
-Priority: required
-Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
-XSBC-Original-Maintainer: Theodore Y. Ts'o <tytso@xxxxxxx>
-Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, debhelper (>= 7.0)
-Standards-Version: 3.8.0.0
-Homepage: http://e2fsprogs.sourceforge.net
-
-Package: e2fsck-static
-Section: admin
-Priority: optional
-Depends:
-Recommends: sash | bash-static | zsh-static | busybox-static | zsh30-static
-Architecture: any
-Description: statically-linked version of the ext2 filesystem checker
- This may be of some help to you if your filesystem gets corrupted enough
- to break the shared libraries used by the dynamically linked checker.
- .
- This binary takes much more space than its dynamic counterpart located
- in e2fsprogs, though.
- .
- You may want to install a statically-linked shell as well, to be able
- to run this program if something like your C library gets corrupted.
-
-Package: libcomerr2
-Section: libs
-Priority: required
-Provides: libcomerr-kth-compat
-Depends: ${shlibs:Depends}
-Replaces: e2fsprogs (<< 1.34-1)
-Architecture: any
-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
- have the problems identified with mechanisms commonly in use.
-
-Package: comerr-dev
-Section: libdevel
-Priority: extra
-Depends: libc6-dev | libc-dev, libcomerr2 (= ${mainBinary})
-Suggests: doc-base
-Replaces: e2fslibs-dev (<< 1.33-2), libkrb5-dev (<< 1.3)
-Architecture: any
-Description: common error description library - headers and static libraries
- libcom_err 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
- have the problems identified with mechanisms commonly in use.
- .
- This package contains the development environment for the com_err library.
-
-Package: libss2
-Section: libs
-Priority: required
-Depends: libcomerr2, ${shlibs:Depends}
-Replaces: e2fsprogs (<< 1.34-1)
-Architecture: any
-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
- compile and use it, and the static libs.
- . 
- It was originally inspired by the Multics SubSystem library.
-
-Package: ss-dev
-Section: libdevel
-Priority: extra
-Depends: libc6-dev | libc-dev, libss2 (= ${mainBinary}), comerr-dev
-Architecture: any
-Description: command-line interface parsing library - headers and static libraries
- This package includes a tool that parses a command table to generate
- a simple command-line interface parser, the include files needed to
- compile and use it, and the static libs.
- . 
- It was originally inspired by the Multics SubSystem library.
- .
- This package contains the development environment for the ss library.
-
-Package: libuuid1
-Section: libs
-Priority: required
-Depends: passwd, ${shlibs:Depends}
-Recommends: uuid-runtime
-Replaces: e2fsprogs (<< 1.34-1)
-Architecture: any
-Description: universally unique id library
- libuuid generates and parses 128-bit universally unique id's (UUID's).
- See RFC 4122 for more information.
-
-Package: uuid-runtime
-Section: libs
-Priority: optional
-Depends: passwd, libuuid1 (>> 1.40.3-1), ${shlibs:Depends}
-Replaces: e2fsprogs (<= 1.40.3-1ubuntu1)
-Architecture: any
-Description: universally unique id library
- libuuid generates and parses 128-bit universally unique id's (UUID's).
- See RFC 4122 for more information.
- .
- This package contains the uuidgen program and the uuidd daemon.
- .
- The uuidd daemon is used to generate universally unique identifiers (UUIDs),
- especially time-based UUID’s, in a secure and guaranteed-unique fashion,
- even in the face of large numbers of threads trying to grab UUID’s
- running on different CPU’s. It is used by libuuid as well as the
- uuidgen program.
-
-Package: libuuid1-udeb
-XC-Package-Type: udeb
-Section: debian-installer
-Priority: optional
-Depends: ${shlibs:Depends}
-Architecture: any
-Description: universally unique id library
- libuuid generates and parses 128-bit universally unique id's (UUID's).
- See RFC 4122 for more information.
- .
- This is a minimal package for debian-installer.
-
-Package: uuid-dev
-Section: libdevel
-Priority: extra
-Depends: libc6-dev | libc-dev, libuuid1 (= ${mainBinary})
-Replaces: e2fslibs-dev (<< 1.15)
-Architecture: any
-Description: universally unique id library - headers and static libraries
- libuuid generates and parses 128-bit universally unique id's (UUID's).
- See RFC 4122 for more information.
- .
- This package contains the development environment for the uuid library.
-
-Package: libblkid1
-Section: libs
-Priority: required
-Depends: ${shlibs:Depends}
-Architecture: any
-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 
- LABEL.  This allows system administrators to avoid specifying 
- filesystems by hard-coded device names, but via a logical naming 
- system instead.
-
-Package: libblkid1-udeb
-XC-Package-Type: udeb
-Section: debian-installer
-Priority: optional
-Depends: ${shlibs:Depends}
-Architecture: any
-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 
- LABEL.  This allows system administrators to avoid specifiying 
- filesystems by hard-coded device names, but via a logical naming 
- system instead.
- .
- This is a minimal package for debian-installer.
-
-Package: libblkid-dev
-Section: libdevel
-Priority: extra
-Depends: libc6-dev | libc-dev, libblkid1 (= ${binary:Version})
-Architecture: any
-Description: block device id library - headers and static libraries
- The blkid library which allows system programs like fsck and 
- mount to quickly and easily find block devices by filesystem UUID and 
- LABEL.  This allows system administrators to avoid specifiying 
- filesystems by hard-coded device names, but via a logical naming 
- system instead.
- .
- This package contains the development environment for the blkid library.
-
-Package: e2fsprogs-udeb
-XC-Package-Type: udeb
-Section: debian-installer
-Priority: optional
-Depends: ${shlibs:Depends}
-Architecture: any
-Description: stripped-down versions of e2fsprogs, for debian-installer
- This package is an e2fsprogs package built for a reduced size, so that
- it can help to save space in debian-installer.
- .
- Don't attempt to install this package, it has no support for a couple of
- features you surely want.  Anyway it should refuse to install.
-
-Package: e2fslibs
-Section: libs
-Priority: required
-Depends: ${shlibs:Depends}
-Replaces: e2fsprogs (<< 1.34-1)
-Provides: libext2fs2, libe2p2
-Architecture: any
-Description: ext2 filesystem libraries
- The ext2fs and e2p libraries are used by programs that directly access 
- EXT2 filesystems from usermode programs.   The EXT2 filesystem is very often
- used as the default filesystem on Linux systems.   Various system programs
- that use libext2fs include e2fsck, mke2fs, tune2fs, etc.  Programs that use
- libe2p include dumpe2fs, chattr, and lsattr.
-
-Package: e2fslibs-dev
-Section: libdevel
-Priority: extra
-Depends: libc6-dev | libc-dev, comerr-dev, e2fslibs (= ${binary:Version})
-Suggests: doc-base
-Provides: ext2fs-dev, e2p-dev
-Replaces: libkrb5-dev (<< 1.3)
-Architecture: any
-Description: ext2 filesystem libraries - headers and static libraries
- The ext2fs and e2p libraries are used by programs that directly access 
- EXT2 filesystems from usermode programs.   The EXT2 filesystem is very often
- used as the default filesystem on Linux systems.   Various system programs
- that use libext2fs include e2fsck, mke2fs, tune2fs, etc.  Programs that use
- libe2p include dumpe2fs, chattr, and lsattr.
- .
- This package contains the development environment for the ext2fs and e2p 
- libraries.
-
-Package: e2fsprogs
-Essential: yes
-Pre-Depends: ${shlibs:Depends}
-Depends: 
-Suggests: gpart, parted, e2fsck-static
-Conflicts: dump (<< 0.4b4-4), quota (<< 1.55-8.1), initscripts (<< 2.85-4), sysvinit (<< 2.85-4)
-Replaces: hurd (<= 20040301-1), libblkid1 (<< 1.38+1.39-WIP-2005.12.10-2), libuuid1 (<< 1.38+1.39-WIP-2005.12.10-2)
-Architecture: any
-Description: ext2/ext3/ext4 file system utilities
- 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
- hard disks on Debian and other Linux systems.
- .
- This package contains programs for creating, checking, and maintaining
- ext-based file systems, and the generic fsck wrapper.
-
-Package: e2fsprogs-dbg
-Section: debug
-Priority: extra
-Depends: e2fsprogs (= ${binary:Version})
-Architecture: any
-Description: Debugging information for e2fsprogs
- This package includes the debug information useful for debugging e2fsprogs
- and its libraries, contained in the e2fsprogs and e2fsck-static packages.
- The debug information is used for execution tracing and core
- dump analysis. 
-
-Package: uuid-runtime-dbg
-Section: debug
-Priority: extra
-Depends: uuid-runtime (= ${binary:Version})
-Architecture: any
-Description: Debugging information for uuid-runtime
- This package includes the debug information useful for debugging the
- uuid runtime programs, contained in the uuid-runtime package.
- The debugging information is used for execution tracing and core
- dump analysis.
-
-Package: e2fslibs-dbg
-Section: debug
-Priority: extra
-Depends: e2fslibs (= ${binary:Version})
-Architecture: any
-Description: Debugging information for e2fslibs
- This package includes the debug information useful for debugging the
- ext2fs and e2p libraries, contained in the e2fslibs package.  The debug
- information is used for execution tracing and core dump analysis.
-
-Package: libcomerr2-dbg
-Section: debug
-Priority: extra
-Depends: libcomerr2 (= ${binary:Version})
-Architecture: any
-Description: Debugging information for libcomerr2
- This package includes the debug information useful for debugging the
- com_err library, contained in the libcomerr2 package.  The debugging
- information is used for execution tracing and core dump analysis.
-
-Package: libss2-dbg
-Section: debug
-Priority: extra
-Depends: libss2 (= ${binary:Version})
-Architecture: any
-Description: Debugging information for libss2
- This package includes the debug information useful for debugging the
- ss library, contained in the libss2 package.  The debug information
- is used for execution tracing and core dump analysis.
-
-Package: libblkid1-dbg
-Section: debug
-Priority: extra
-Depends: libblkid1 (= ${binary:Version})
-Architecture: any
-Description: Debugging information for libblkid1
- This package includes the debug information useful for debugging the
- blkid library, contained in the libblkid1 package.  The debug
- information is used for execution tracing and core dump analysis.
-
-Package: libuuid1-dbg
-Section: debug
-Priority: extra
-Depends: libuuid1 (= ${binary:Version})
-Architecture: any
-Description: Debugging information for libuuid1
- This package includes the debug information useful for debugging the
- UUID library, contained in the libuuid1 package.  The debug
- information is used for execution tracing and core dump analysis.
diff --git a/debian/control.in b/debian/control.in
new file mode 100644
index 0000000..b538576
--- /dev/null
+++ b/debian/control.in
@@ -0,0 +1,304 @@
+Source: e2fsprogs
+Section: admin
+Priority: required
+Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
+XSBC-Original-Maintainer: Theodore Y. Ts'o <tytso@xxxxxxx>
+Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, pkg-config, debhelper (>= 7.0), m4
+Standards-Version: 3.8.0.0
+Homepage: http://e2fsprogs.sourceforge.net
+
+Package: e2fsck-static
+Section: admin
+Priority: optional
+Depends:
+Recommends: sash | bash-static | zsh-static | busybox-static | zsh30-static
+Architecture: any
+Description: statically-linked version of the ext2 filesystem checker
+ This may be of some help to you if your filesystem gets corrupted enough
+ to break the shared libraries used by the dynamically linked checker.
+ .
+ This binary takes much more space than its dynamic counterpart located
+ in e2fsprogs, though.
+ .
+ You may want to install a statically-linked shell as well, to be able
+ to run this program if something like your C library gets corrupted.
+
+Package: libcomerr2
+Section: libs
+Priority: required
+Provides: libcomerr-kth-compat
+Depends: ${shlibs:Depends}
+Replaces: e2fsprogs (<< 1.34-1)
+Architecture: any
+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
+ have the problems identified with mechanisms commonly in use.
+
+Package: comerr-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libcomerr2 (= ${mainBinary})
+Suggests: doc-base
+Replaces: e2fslibs-dev (<< 1.33-2), libkrb5-dev (<< 1.3)
+Architecture: any
+Description: common error description library - headers and static libraries
+ libcom_err 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
+ have the problems identified with mechanisms commonly in use.
+ .
+ This package contains the development environment for the com_err library.
+
+Package: libss2
+Section: libs
+Priority: required
+Depends: libcomerr2, ${shlibs:Depends}
+Replaces: e2fsprogs (<< 1.34-1)
+Architecture: any
+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
+ compile and use it, and the static libs.
+ . 
+ It was originally inspired by the Multics SubSystem library.
+
+Package: ss-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libss2 (= ${mainBinary}), comerr-dev
+Architecture: any
+Description: command-line interface parsing library - headers and static libraries
+ This package includes a tool that parses a command table to generate
+ a simple command-line interface parser, the include files needed to
+ compile and use it, and the static libs.
+ . 
+ It was originally inspired by the Multics SubSystem library.
+ .
+ This package contains the development environment for the ss library.
+
+Package: libuuid1
+Section: libs
+Priority: required
+Depends: passwd, ${shlibs:Depends}
+Recommends: uuid-runtime
+Replaces: e2fsprogs (<< 1.34-1)
+Architecture: any
+Description: universally unique id library
+ libuuid generates and parses 128-bit universally unique id's (UUID's).
+ See RFC 4122 for more information.
+
+Package: uuid-runtime
+Section: libs
+Priority: optional
+Depends: passwd, libuuid1 (>> 1.40.3-1), ${shlibs:Depends}
+Replaces: e2fsprogs (<= 1.40.3-1ubuntu1)
+Architecture: any
+Description: universally unique id library
+ libuuid generates and parses 128-bit universally unique id's (UUID's).
+ See RFC 4122 for more information.
+ .
+ This package contains the uuidgen program and the uuidd daemon.
+ .
+ The uuidd daemon is used to generate universally unique identifiers (UUIDs),
+ especially time-based UUID’s, in a secure and guaranteed-unique fashion,
+ even in the face of large numbers of threads trying to grab UUID’s
+ running on different CPU’s. It is used by libuuid as well as the
+ uuidgen program.
+
+Package: libuuid1-udeb
+XC-Package-Type: udeb
+Section: debian-installer
+Priority: optional
+Depends: ${shlibs:Depends}
+Architecture: any
+Description: universally unique id library
+ libuuid generates and parses 128-bit universally unique id's (UUID's).
+ See RFC 4122 for more information.
+ .
+ This is a minimal package for debian-installer.
+
+Package: uuid-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libuuid1 (= ${mainBinary})
+Replaces: e2fslibs-dev (<< 1.15)
+Architecture: any
+Description: universally unique id library - headers and static libraries
+ libuuid generates and parses 128-bit universally unique id's (UUID's).
+ See RFC 4122 for more information.
+ .
+ This package contains the development environment for the uuid library.
+ifdef(`BUILD_BLKID',``
+Package: libblkid1
+Section: libs
+Priority: required
+Depends: ${shlibs:Depends}
+Architecture: any
+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 
+ LABEL.  This allows system administrators to avoid specifying 
+ filesystems by hard-coded device names, but via a logical naming 
+ system instead.
+
+Package: libblkid1-udeb
+XC-Package-Type: udeb
+Section: debian-installer
+Priority: optional
+Depends: ${shlibs:Depends}
+Architecture: any
+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 
+ LABEL.  This allows system administrators to avoid specifiying 
+ filesystems by hard-coded device names, but via a logical naming 
+ system instead.
+ .
+ This is a minimal package for debian-installer.
+
+Package: libblkid-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libblkid1 (= ${binary:Version})
+Architecture: any
+Description: block device id library - headers and static libraries
+ The blkid library which allows system programs like fsck and 
+ mount to quickly and easily find block devices by filesystem UUID and 
+ LABEL.  This allows system administrators to avoid specifiying 
+ filesystems by hard-coded device names, but via a logical naming 
+ system instead.
+ .
+ This package contains the development environment for the blkid library.
+'')
+Package: e2fsprogs-udeb
+XC-Package-Type: udeb
+Section: debian-installer
+Priority: optional
+Depends: ${shlibs:Depends}
+Architecture: any
+Description: stripped-down versions of e2fsprogs, for debian-installer
+ This package is an e2fsprogs package built for a reduced size, so that
+ it can help to save space in debian-installer.
+ .
+ Don't attempt to install this package, it has no support for a couple of
+ features you surely want.  Anyway it should refuse to install.
+
+Package: e2fslibs
+Section: libs
+Priority: required
+Depends: ${shlibs:Depends}
+Replaces: e2fsprogs (<< 1.34-1)
+Provides: libext2fs2, libe2p2
+Architecture: any
+Description: ext2 filesystem libraries
+ The ext2fs and e2p libraries are used by programs that directly access 
+ EXT2 filesystems from usermode programs.   The EXT2 filesystem is very often
+ used as the default filesystem on Linux systems.   Various system programs
+ that use libext2fs include e2fsck, mke2fs, tune2fs, etc.  Programs that use
+ libe2p include dumpe2fs, chattr, and lsattr.
+
+Package: e2fslibs-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, comerr-dev, e2fslibs (= ${binary:Version})
+Suggests: doc-base
+Provides: ext2fs-dev, e2p-dev
+Replaces: libkrb5-dev (<< 1.3)
+Architecture: any
+Description: ext2 filesystem libraries - headers and static libraries
+ The ext2fs and e2p libraries are used by programs that directly access 
+ EXT2 filesystems from usermode programs.   The EXT2 filesystem is very often
+ used as the default filesystem on Linux systems.   Various system programs
+ that use libext2fs include e2fsck, mke2fs, tune2fs, etc.  Programs that use
+ libe2p include dumpe2fs, chattr, and lsattr.
+ .
+ This package contains the development environment for the ext2fs and e2p 
+ libraries.
+
+Package: e2fsprogs
+Essential: yes
+Pre-Depends: ${shlibs:Depends}
+Depends: 
+Suggests: gpart, parted, e2fsck-static
+Conflicts: dump (<< 0.4b4-4), quota (<< 1.55-8.1), initscripts (<< 2.85-4), sysvinit (<< 2.85-4)
+Replaces: hurd (<= 20040301-1), libblkid1 (<< 1.38+1.39-WIP-2005.12.10-2), libuuid1 (<< 1.38+1.39-WIP-2005.12.10-2)
+Architecture: any
+Description: ext2/ext3/ext4 file system utilities
+ 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
+ hard disks on Debian and other Linux systems.
+ .
+ This package contains programs for creating, checking, and maintaining
+ ext-based file systems, and the generic fsck wrapper.
+
+Package: e2fsprogs-dbg
+Section: debug
+Priority: extra
+Depends: e2fsprogs (= ${binary:Version})
+Architecture: any
+Description: Debugging information for e2fsprogs
+ This package includes the debug information useful for debugging e2fsprogs
+ and its libraries, contained in the e2fsprogs and e2fsck-static packages.
+ The debug information is used for execution tracing and core
+ dump analysis. 
+
+Package: uuid-runtime-dbg
+Section: debug
+Priority: extra
+Depends: uuid-runtime (= ${binary:Version})
+Architecture: any
+Description: Debugging information for uuid-runtime
+ This package includes the debug information useful for debugging the
+ uuid runtime programs, contained in the uuid-runtime package.
+ The debugging information is used for execution tracing and core
+ dump analysis.
+
+Package: e2fslibs-dbg
+Section: debug
+Priority: extra
+Depends: e2fslibs (= ${binary:Version})
+Architecture: any
+Description: Debugging information for e2fslibs
+ This package includes the debug information useful for debugging the
+ ext2fs and e2p libraries, contained in the e2fslibs package.  The debug
+ information is used for execution tracing and core dump analysis.
+
+Package: libcomerr2-dbg
+Section: debug
+Priority: extra
+Depends: libcomerr2 (= ${binary:Version})
+Architecture: any
+Description: Debugging information for libcomerr2
+ This package includes the debug information useful for debugging the
+ com_err library, contained in the libcomerr2 package.  The debugging
+ information is used for execution tracing and core dump analysis.
+
+Package: libss2-dbg
+Section: debug
+Priority: extra
+Depends: libss2 (= ${binary:Version})
+Architecture: any
+Description: Debugging information for libss2
+ This package includes the debug information useful for debugging the
+ ss library, contained in the libss2 package.  The debug information
+ is used for execution tracing and core dump analysis.
+ifdef(`BUILD_BLKID',``
+Package: libblkid1-dbg
+Section: debug
+Priority: extra
+Depends: libblkid1 (= ${binary:Version})
+Architecture: any
+Description: Debugging information for libblkid1
+ This package includes the debug information useful for debugging the
+ blkid library, contained in the libblkid1 package.  The debug
+ information is used for execution tracing and core dump analysis.
+'')
+Package: libuuid1-dbg
+Section: debug
+Priority: extra
+Depends: libuuid1 (= ${binary:Version})
+Architecture: any
+Description: Debugging information for libuuid1
+ This package includes the debug information useful for debugging the
+ UUID library, contained in the libuuid1 package.  The debug
+ information is used for execution tracing and core dump analysis.
diff --git a/debian/rules b/debian/rules
index 43352ff..b798854 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,8 +30,10 @@ SS_VERSION = $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
 SS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
 UUID_VERSION = $(shell grep ELF_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
 UUID_SOVERSION = $(shell grep ELF_SO_VERSION lib/uuid/Makefile.in | cut '-d ' -f3)
+ifneq ($(BUILD_BLKID),no)
 BLKID_VERSION = $(shell grep ELF_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
 BLKID_SOVERSION = $(shell grep ELF_SO_VERSION lib/blkid/Makefile.in | cut '-d ' -f3)
+endif
 EXT2FS_SOVERSION = $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3)
 E2P_SOVERSION = $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3)
 
@@ -41,7 +43,9 @@ topdir=$(shell pwd)
 debdir=${topdir}/debian
 tmpdir=${debdir}/tmp
 udebdir=${debdir}/e2fsprogs-udeb
+ifneq ($(BUILD_BLKID),no)
 blkidudebdir=${debdir}/libblkid1-udeb
+endif
 uuidudebdir=${debdir}/libuuid1-udeb
 libcomerrdir=${debdir}/libcomerr${COMERR_SOVERSION}
 comerrdevdir=${debdir}/comerr-dev
@@ -49,9 +53,11 @@ libcomerrdbgdir=${debdir}/libcomerr2-dbg
 libssdir=${debdir}/libss${SS_SOVERSION}
 ssdevdir=${debdir}/ss-dev
 libssdbgdir=${debdir}/libss2-dbg
+ifneq ($(BUILD_BLKID),no)
 libblkiddir=${debdir}/libblkid${BLKID_SOVERSION}
 libblkiddevdir=${debdir}/libblkid-dev
 libblkiddbgdir=${debdir}/libblkid1-dbg
+endif
 libuuiddir=${debdir}/libuuid${UUID_SOVERSION}
 uuiddevdir=${debdir}/uuid-dev
 libuuiddbgdir=${debdir}/libuuid1-dbg
@@ -73,13 +79,15 @@ MANDIR=/usr/share/man
 mandir=${tmpdir}${MANDIR}
 
 UDEB_NAME = $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
-UDEB_PRIORITY = $(shell grep '^Package: e2fsprogs-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+UDEB_PRIORITY = $(shell grep '^Package: e2fsprogs-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
 
+ifneq ($(BUILD_BLKID),no)
 BLKID_UDEB_NAME = libblkid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
-BLKID_UDEB_PRIORITY = $(shell grep '^Package: libblkid1-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+BLKID_UDEB_PRIORITY = $(shell grep '^Package: libblkid1-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+endif
 
 UUID_UDEB_NAME = libuuid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
-UUID_UDEB_PRIORITY = $(shell grep '^Package: libuuid1-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+UUID_UDEB_PRIORITY = $(shell grep '^Package: libuuid1-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
 
 STAMPSDIR=debian/stampdir
 CFGSTDSTAMP=${STAMPSDIR}/configure-std-stamp
@@ -117,7 +125,12 @@ endif
 BF_CCOPTS = -Os -fomit-frame-pointer
 
 COMMON_CONF_FLAGS =  \
-                --enable-elf-shlibs --infodir=/usr/share/info --enable-fsck
+                --enable-elf-shlibs --infodir=/usr/share/info
+ifneq ($(BUILD_BLKID),no)
+COMMON_CONF_FLAGS += --enable-fsck
+else
+COMMON_CONF_FLAGS += --disable-fsck --disable-libblkid
+endif
 
 STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
 
@@ -147,6 +160,13 @@ ismips=ismips
 endif
 endif
 
+debian/control: debian/control.in debian/rules
+ifneq ($(BUILD_BLKID),no)
+	m4 -DBUILD_BLKID < debian/control.in > $@
+else
+	m4 -UBUILD_BLKID < debian/control.in > $@
+endif
+
 ${CFGSTDSTAMP}:
 	dh_testdir
 
@@ -213,7 +233,7 @@ endif
 	mkdir -p ${STAMPSDIR}
 	touch ${CFGSTATICSTAMP}
 
-build: build-std build-bf $(BUILD_STATIC)
+build: debian/control build-std build-bf $(BUILD_STATIC)
 
 build-std: ${BUILDSTDSTAMP}
 ${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
@@ -255,7 +275,7 @@ ${BUILDSTATICSTAMP}: ${CFGSTATICSTAMP}
 	$(MAKE) -C ${staticbuilddir}/e2fsck all e2fsck.static
 	touch ${BUILDSTATICSTAMP}
 
-clean:
+clean: debian/control
 	dh_testdir
 	rm -rf ${STAMPSDIR}
 	[ ! -f ${stdbuilddir}/Makefile ] || $(MAKE) -C ${stdbuilddir} distclean
@@ -327,8 +347,10 @@ install-udeb: build
 		ln -s e2fsck fsck.ext3 ; ln -s mke2fs mkfs.ext2 ; \
 		ln -s mke2fs mkfs.ext3 ; ln -s mke2fs mkfs.ext4)
 
+ifneq ($(BUILD_BLKID),no)
 	mkdir -p ${blkidudebdir}/lib
 	mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib
+endif
 
 	mkdir -p ${uuidudebdir}/lib
 	mv ${udebdir}/lib/libuuid.* ${uuidudebdir}/lib
@@ -360,9 +382,11 @@ binary-arch: install install-udeb
 
   # symlinks to prepare dh_installdocs run
 
+ifneq ($(BUILD_BLKID),no)
 	mkdir -p ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}
 	mkdir -p ${debdir}/libblkid-dev/usr/share/doc
 	ln -sf libblkid${BLKID_SOVERSION} ${debdir}/libblkid-dev/usr/share/doc/libblkid-dev
+endif
 
 	mkdir -p ${debdir}/libss${SS_SOVERSION}/usr/share/doc/libss${SS_SOVERSION}
 	mkdir -p ${debdir}/ss-dev/usr/share/doc
@@ -380,8 +404,10 @@ binary-arch: install install-udeb
 	mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc
 	ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
 
+ifneq ($(BUILD_BLKID),no)
 	$(INSTALL) -p -m 0644 debian/libblkid.copyright \
 		${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}/copyright
+endif
 
 	dh_installdocs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
 
@@ -418,11 +444,15 @@ binary-arch: install install-udeb
 	dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
 
 	DH_OPTIONS= dh_installchangelogs -pe2fsprogs \
-		-plibblkid${BLKID_SOVERSION} -plibcomerr${COMERR_SOVERSION} \
+		-plibcomerr${COMERR_SOVERSION} \
 		-plibss${SS_SOVERSION} -plibuuid${UUID_SOVERSION} \
 		-pe2fslibs -puuid-dev -puuid-runtime -pe2fsck-static \
 		-pe2fsprogs-dbg -puuid-runtime-dbg -pe2fslibs-dbg \
-		-plibcomerr2-dbg -plibss2-dbg -plibblkid1-dbg -plibuuid1-dbg
+		-plibcomerr2-dbg -plibss2-dbg -plibuuid1-dbg
+ifneq ($(BUILD_BLKID),no)
+	DH_OPTIONS= dh_installchangelogs -plibblkid${BLKID_SOVERSION} \
+		-plibblkid1-dbg
+endif
 
 	dh_fixperms
 ifneq ($(ismips),)
@@ -433,7 +463,9 @@ endif
 
 	# debug package stuff
 	rm -rf ${udebdir}/usr
+ifneq ($(BUILD_BLKID),no)
 	rm -rf ${blkidudebdir}/usr
+endif
 	rm -rf ${uuidudebdir}/usr
 
 	mkdir -p ${debugdir}/usr/lib
@@ -463,13 +495,19 @@ endif
 	mv ${libuuiddir}/usr/lib/debug ${libuuiddbgdir}/usr/lib
 	rmdir ${libuuiddir}/usr/lib
 
+ifneq ($(BUILD_BLKID),no)
 	mkdir -p ${libblkiddbgdir}/usr/lib
 	mv ${libblkiddir}/usr/lib/debug ${libblkiddbgdir}/usr/lib
 	rmdir ${libblkiddir}/usr/lib
+endif
 
 	# dpkg symbol handling
 ifneq (,$(findstring update-symbols,$(DEB_BUILD_OPTIONS)))
-	for i in e2fslibs libcomerr2 libss2 libblkid1 libuuid1; \
+SYMBOL_LIBS := e2fslibs libcomerr2 libss2 libuuid1
+ifneq ($(BUILD_BLKID),no)
+SYMBOL_LIBS += libblkid1
+endif
+	for i in $(SYMBOL_LIBS); \
 	do \
 		echo "Generating symbols for $$i..."; \
 		dpkg-gensymbols -p$$i -Pdebian/$$i > debian/$$i.tmp-patch; \
@@ -494,8 +532,10 @@ endif
 	$(INSTALL) -p -m 0644 debian/libss2.copyright \
 		${libssdbgdir}/usr/share/doc/libss2-dbg/copyright
 
+ifneq ($(BUILD_BLKID),no)
 	$(INSTALL) -p -m 0644 debian/libblkid.copyright \
 		${libblkiddbgdir}/usr/share/doc/libblkid1-dbg/copyright
+endif
 
 	$(INSTALL) -p -m 0644 debian/libuuid1.copyright \
 		${libuuiddbgdir}/usr/share/doc/libuuid1-dbg/copyright
@@ -505,9 +545,11 @@ endif
 	dh_makeshlibs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
 	dh_makeshlibs -plibcomerr${COMERR_SOVERSION} \
 		-V 'libcomerr2 (>= 1.33-3)'
+ifneq ($(BUILD_BLKID),no)
 	dh_makeshlibs -plibblkid${BLKID_SOVERSION} -V 'libblkid1 (>= 1.39-1)'
 	echo "udeb: libblkid 1 libblkid1-udeb" >> \
 		debian/libblkid1/DEBIAN/shlibs
+endif
 	echo "udeb: libuuid 1 libuuid1-udeb" >> debian/libuuid1/DEBIAN/shlibs
 
 	dh_installdeb
@@ -526,16 +568,22 @@ endif
 	DH_OPTIONS= dh_gencontrol -puuid-dev \
 	  -u '-v${UUID_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
 	dh_gencontrol	-pe2fsprogs-udeb -- -fdebian/files~
+ifneq ($(BUILD_BLKID),no)
 	dh_gencontrol	-plibblkid1-udeb -- -fdebian/files~
+endif
 	dh_gencontrol	-plibuuid1-udeb -- -fdebian/files~
 
 	dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
+ifneq ($(BUILD_BLKID),no)
 	dpkg-distaddfile $(BLKID_UDEB_NAME) debian-installer $(BLKID_UDEB_PRIORITY)
+endif
 	dpkg-distaddfile $(UUID_UDEB_NAME) debian-installer $(UUID_UDEB_PRIORITY)
 	dh_md5sums -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
 	dh_builddeb -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
 	dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME)
+ifneq ($(BUILD_BLKID),no)
 	dh_builddeb -plibblkid1-udeb --filename=$(BLKID_UDEB_NAME)
+endif
 	dh_builddeb -plibuuid1-udeb --filename=$(UUID_UDEB_NAME)
 
 binary: binary-indep binary-arch
-- 
1.6.0.5

From 3607e808fd9fd340fdcb2b946fc3533b52cbd27a Mon Sep 17 00:00:00 2001
From: Scott James Remnant <scott@xxxxxxxxxx>
Date: Wed, 29 Apr 2009 18:18:06 +0100
Subject: [PATCH] debian: use external libblkid on Ubuntu

Check the output of lsb_release -is to allow per-distro customisations.
On Ubuntu, use the external libblkid.

The advantage to doing this in the standard rules is that anybody may
download a newer e2fsprogs tarball and have it build packages the same
way as their distribution.

Use ?= so it can still be overidden.
---
 debian/rules |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/debian/rules b/debian/rules
index b798854..f60f0a9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,12 @@ export LC_ALL=C
 # no chance that pkg-create-dbgsym can cope with this package's manual construction of -dbg
 export NO_PKG_MANGLE=1
 
+# Allow distro-specific behaviour
+DISTRO :=$(shell lsb_release -is 2>/dev/null || echo Debian)
+ifeq ($(DISTRO),Ubuntu)
+BUILD_BLKID ?= no
+endif
+
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
 DEB_HOST_ARCH   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-- 
1.6.0.5

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux