configure: Disable libblkid by default
PATCH 1/1 configure: Disable libblkid by default
Since util-linux-ng now builds libblkid by default, e2fsprogs should not do so.
--- configure | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++------- configure.in | 21 +++++++----- 2 files changed, 94 insertions(+), 20 deletions(-)
configure +82 -11
@@ -1499,7 +1499,7 @@ Optional Features: --enable-blkid-debug enable blkid debugging --disable-testio-debug disable the use of the test I/O manager for debugging --disable-libuuid do not build private uuid library - --disable-libblkid do not build private blkid library + --enable-libblkid build private blkid library --disable-debugfs disable support of debugfs program --disable-imager disable support of e2image program --disable-resizer disable support of e2resize program
@@ -4684,18 +4684,89 @@ $as_echo "Enabling private blkid library" >&6; } fi else - LIBBLKID='$(LIB)/libblkid'$LIB_EXT -DEPLIBBLKID=$LIBBLKID -STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT -DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID -PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT -DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID -cat >>confdefs.h <<\_ACEOF -#define CONFIG_BUILD_FINDFS 1 + if test -z "$PKG_CONFIG"; then + { { $as_echo "$as_me:$LINENO: error: pkg-config not installed; please install it." >&5 +$as_echo "$as_me: error: pkg-config not installed; please install it." >&2;} + { (exit 1); exit 1; }; } +fi + +{ $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5 +$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; } +if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblkid $LIBBLKID $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char blkid_get_cache (); +int +main () +{ +return blkid_get_cache (); + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_blkid_blkid_get_cache=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_blkid_blkid_get_cache=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5 +$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; } +if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then + LIBBLKID=`$PKG_CONFIG --libs blkid`; + STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid` +else + { { $as_echo "$as_me:$LINENO: error: external blkid library not found" >&5 +$as_echo "$as_me: error: external blkid library not found" >&2;} + { (exit 1); exit 1; }; } +fi -{ $as_echo "$as_me:$LINENO: result: Enabling private blkid library by default" >&5 -$as_echo "Enabling private blkid library by default" >&6; } +BLKID_CMT=# +{ $as_echo "$as_me:$LINENO: result: Disabling private blkid library by default" >&5 +$as_echo "Disabling private blkid library by default" >&6; } fi
configure.in +12 -9
@@ -463,7 +463,7 @@ PROFILED_LIBBLKID= DEPPROFILED_LIBBLKID= BLKID_CMT= AC_ARG_ENABLE([libblkid], -[ --disable-libblkid do not build private blkid library], +[ --enable-libblkid build private blkid library], if test "$enableval" = "no" then if test -z "$PKG_CONFIG"; then
@@ -488,14 +488,17 @@ else AC_MSG_RESULT([Enabling private blkid library]) fi , -LIBBLKID='$(LIB)/libblkid'$LIB_EXT -DEPLIBBLKID=$LIBBLKID -STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT -DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID -PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT -DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID -AC_DEFINE(CONFIG_BUILD_FINDFS) -AC_MSG_RESULT([Enabling private blkid library by default]) +if test -z "$PKG_CONFIG"; then + AC_MSG_ERROR([pkg-config not installed; please install it.]) +fi + +AC_CHECK_LIB(blkid, blkid_get_cache, + [LIBBLKID=`$PKG_CONFIG --libs blkid`; + STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`], + [AC_MSG_ERROR([external blkid library not found])], + [$LIBBLKID]) +BLKID_CMT=# +AC_MSG_RESULT([Disabling private blkid library by default]) ) AC_SUBST(LIBBLKID) AC_SUBST(DEPLIBBLKID)
Signature · 6 lines
1.6.0.5 -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): E1MRWBp-0000yN-9a-eEhpo0tUqaMrEHDPZeG1zdBPR1lH4CV8@public.gmane.org
Quoted 2 lines · Scott James Remnant
Since util-linux-ng now builds libblkid by default, e2fsprogs should not do so.
I'm not going to be applying these patches for quite some time. I'd much rather have packaging scripts that *know* they will be packaging alongside util-linux-ng use --disable-libblkid, etc. so we don't break things for folks who might need to build e2fsprogs for distributions that are still using util-linux --- which at the moment still have the vast majority of the installed base, and every so often people do actually care about running updated filesystem utilities on an older enterprise distribution.
The at the minimum I'll want to make sure that the debian/rules file packaged with e2fsprogs can build both for util-linux and util-linux-ng for similar reasons, especially since Lamont hasn't gotten back to us about potentially getting util-linux-ng packaged for Debian yet.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Theodore Tso
Quoted 2 lines · Scott James Remnant
Since util-linux-ng now builds libblkid by default, e2fsprogs should not do so.
Quoted 9 lines
I'm not going to be applying these patches for quite some time. I'd much rather have packaging scripts that *know* they will be packaging alongside util-linux-ng use --disable-libblkid, etc. so we don't break things for folks who might need to build e2fsprogs for distributions that are still using util-linux --- which at the moment still have the vast majority of the installed base, and every so often people do actually care about running updated filesystem utilities on an older enterprise distribution.
But you didn't accept those patches I sent either.
Quoted 6 lines
The at the minimum I'll want to make sure that the debian/rules file packaged with e2fsprogs can build both for util-linux and util-linux-ng for similar reasons, especially since Lamont hasn't gotten back to us about potentially getting util-linux-ng packaged for Debian yet.
I've done the packaging for him, it's just waiting on him to get back home to sponsor the uploads.
Scott
Signature · 2 lines
Scott James Remnant scott-GeWIH/[email protected]
Quoted 10 lines · Scott James Remnant
Quoted 8 lines
I'm not going to be applying these patches for quite some time. I'd much rather have packaging scripts that *know* they will be packaging alongside util-linux-ng use --disable-libblkid, etc. so we don't break things for folks who might need to build e2fsprogs for distributions that are still using util-linux --- which at the moment still have the vast majority of the installed base, and every so often people do actually care about running updated filesystem utilities on an older enterprise distribution.
But you didn't accept those patches I sent either.
If I recall correctly the last set of patches unconditionally used --disable-libblkid, and what I need is.....
Quoted 5 lines
Quoted 5 lines
... at the minimum I'll want to make sure that the debian/rules file packaged with e2fsprogs can build both for util-linux and util-linux-ng for similar reasons, especially since Lamont hasn't gotten back to us about potentially getting util-linux-ng packaged for Debian yet.
So the patch ideal patch I'd like to see is one where you can toggle a flag and debian/rules will either build for util-linux or util-linux-ng. If you've sent such a patch, my apologies for overlooking it, but as I recall the only patch I got made the unconditional changes to debian/rules. When I commented on that you said that you understood that was just a proof-of-concept patch, and so I let things drop.
Quoted 2 lines
I've done the packaging for him, it's just waiting on him to get back home to sponsor the uploads.
Are the .deb packages somewhere where I can examine them?
- Ted
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Theodore Tso
Quoted 5 lines
Quoted 5 lines
... at the minimum I'll want to make sure that the debian/rules file packaged with e2fsprogs can build both for util-linux and util-linux-ng for similar reasons, especially since Lamont hasn't gotten back to us about potentially getting util-linux-ng packaged for Debian yet.
So the patch ideal patch I'd like to see is one where you can toggle a flag and debian/rules will either build for util-linux or util-linux-ng. If you've sent such a patch, my apologies for overlooking it
I did, it's the patches that are applied to the Ubuntu source package:
Quoted 5 lines
Quoted 2 lines
I've done the packaging for him, it's just waiting on him to get back home to sponsor the uploads.
Are the .deb packages somewhere where I can examine them?
Yes, they're in Ubuntu.
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Quoted 6 lines · Scott James Remnant
Quoted 5 lines
So the patch ideal patch I'd like to see is one where you can toggle a flag and debian/rules will either build for util-linux or util-linux-ng. If you've sent such a patch, my apologies for overlooking it
I did, it's the patches that are applied to the Ubuntu source package:
I've attached the cleaned up version which I've just checked into e2fsprogs below. I've created a single switch, UTIL_LINUX_NG=yes, since the DISABLE_BLKID and DISABLE_UUID switches were never orthogonal (the combination !DISABLE_BLKID and DISABLE_UUID wouldn't do the right thing), and DISABLE_BLKID also disabled fsck as a surprising side-effect.
I also changed the generation of debian/control from being automatic to being something which must be manually done by the maintainer; that's because dpkg-buildpackage, and in particular, dpkg-source, looks at the debian/control file before debian/rules has a chance to create it.
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
I've done the packaging for him, it's just waiting on him to get back home to sponsor the uploads.
Are the .deb packages somewhere where I can examine them?
Yes, they're in Ubuntu.
I just took a quick look at them, and it appears that they are missing the libblkid1-dbg, libuuid1-dbg, and uuid-runtime-dbg packages.
Also, apparently no once noticed until now, but there's a bug in the util-linux-ng's uuid.sym file. The uuid_pack and uuid_unpack symbols are missing, because someone forgot to include them in the uuid.sym file. The debian symbol generation system which I see you carefully moved over detected the problem, but you apparently didn't take a close enough look at its output to detect the warning messages.
BTW, **why** is util-linux-ng gratuitously introducing backwards incompatibility such that packages built with util-linux-ng won't work
with the older shared libraries? There's no reason to do this.
There is a hint in the (obsolete) comments in uuid.sym that suggests a reason why, but it's not justified for libuuid:
/*
* The symbol versioning ensures that a new application requiring symbol foo()
* can't run with old libblkid.so not providing foo() - the global SONAME
* version info can't enforce this since we never change the SONAME. *
* The original libuuid from e2fsprogs (<=1.41.5) does not to use
* symbol versioning -- all the original symbols are in UUID_1.0 now. */
Argh, util-linux-ng 2.16 has already been released; is it too late to undo this change?
- Ted
commit 95f65c3d70a7a883c3c98d7f53feed970dc64271
Author: Theodore Ts'o <[email protected]> Date: Sat Jul 18 22:14:58 2009 -0400
debian: Allow building with util-linux-ng
If building with util-linux-ng, we will use the external libblkid and libuuid, as well as disabling the internal fsck.
debian/control.in renamed from debian/control +11 -4
@@ -2,7 +2,11 @@ Source: e2fsprogs 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) +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 (>= 7.0), m4 +'')dnl Standards-Version: 3.8.2 Homepage: http://e2fsprogs.sourceforge.net
@@ -70,7 +74,7 @@ Description: command-line interface parsing library - headers and static librari It was originally inspired by the Multics SubSystem library. . This package contains the development environment for the ss library. - +ifdef(`UTIL_LINUX_NG',,`` Package: libuuid1 Section: libs Depends: passwd, ${shlibs:Depends}
@@ -174,6 +178,7 @@ Description: block device id library - headers and static libraries system instead. . This package contains the development environment for the blkid library. +'')dnl Package: e2fsprogs-udeb XC-Package-Type: udeb
@@ -245,7 +250,7 @@ Description: debugging information for e2fsprogs and its libraries, contained in the e2fsprogs and e2fsck-static packages. The debug information is used for execution tracing and core dump analysis. - +ifdef(`UTIL_LINUX_NG',,`` Package: uuid-runtime-dbg Section: debug Priority: extra
@@ -256,6 +261,7 @@ Description: debugging information for uuid-runtime uuid runtime programs, contained in the uuid-runtime package. The debugging information is used for execution tracing and core dump analysis. +'')dnl Package: e2fslibs-dbg Section: debug
@@ -286,7 +292,7 @@ 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(`UTIL_LINUX_NG',,`` Package: libblkid1-dbg Section: debug Priority: extra
@@ -306,3 +312,4 @@ 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. +'')dnl
debian/rules +80 -10
271 lines not on this page · raw message
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Theodore Tso
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
I've done the packaging for him, it's just waiting on him to get back home to sponsor the uploads.
Are the .deb packages somewhere where I can examine them?
Yes, they're in Ubuntu.
I just took a quick look at them, and it appears that they are missing the libblkid1-dbg, libuuid1-dbg, and uuid-runtime-dbg packages.
We auto-generate debug packages for all binaries in Ubuntu, extracted from the compiler, e.g.:
http://ddebs.ubuntu.com/pool/main/u/util-linux/libblkid1-dbgsym_2.16-1ubuntu1_i386.ddeb
Since I'm not a Debian maintainer, I don't know how such things are done in Debian so left this for you and/or Lamont to fill in.
Quoted 7 lines
Also, apparently no once noticed until now, but there's a bug in the util-linux-ng's uuid.sym file. The
uuid_packanduuid_unpacksymbols are missing, because someone forgot to include them in the uuid.sym file. The debian symbol generation system which I see you carefully moved over detected the problem, but you apparently didn't take a close enough look at its output to detect the warning messages.
I just copied the symbols file over and applied the update your output said.
Quoted 7 lines
BTW, **why** is util-linux-ng gratuitously introducing backwards incompatibility such that packages built with util-linux-ng won't work
with the older shared libraries? There's no reason to do this.There is a hint in the (obsolete) comments in uuid.sym that suggests a reason why, but it's not justified for libuuid:
You'd have to ask Karel about that one.
However I think now it's happened, we shouldn't back it out again.
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Hi Ted,
Quoted 4 lines · Theodore Tso
Also, apparently no once noticed until now, but there's a bug in the util-linux-ng's uuid.sym file. The
uuid_packanduuid_unpacksymbols are missing, because someone forgot to include them in the uuid.sym file.
is it really bug? Why do you want to export symbols that are not part of the library API?
I don't see uuid_pack and uuid_unpack in uuid.h. I guess nobody use these symbols ;-)
Quoted 3 lines
BTW, **why** is util-linux-ng gratuitously introducing backwards incompatibility such that packages built with util-linux-ng won't work
with the older shared libraries? There's no reason to do this.
Good point. I agree that (at first glance) there's no reason for this change. But...
"If possible, projects implementing generally usable DSOs should use symbol versioning from day one."
-- How To Write Shared Libraries, Ulrich Drepper
I agree with Ulrich, symbol versioning is really really good thing.
Unfortunately, it's not possible to combine versioned symbols with anonymous (without version) symbols. It means after first change to the library ABI we will need to introduce UUID_1.0 for old symbols.
The move from e2fsprogs to util-linux-ng is excellent opportunity to introduce ABI versioning to libuuid. I don't think this change has negative impact to our distributions in practice.
How often people need to mix old libuuid (from e2fsprogs) with applications compiled against new libuuid (from util-linux-ng)? I guess almost never...
Quoted 2 lines
Argh, util-linux-ng 2.16 has already been released; is it too late to undo this change?
I think yes, it's too late.
A new version (2.16.1) without UUID_1.0 will require mass rebuild in all distributions/systems where are libuuid applications with ABI versioning. IMHO this is much more painful that impossibility to downgrade to the old libuuid (from e2fsprogs).
Maybe we can add --disable-{libuuid,libblkid}-versioning for people who need to bypass the default behaviour.
Karel
Signature · 1 line
Karel Zak <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20090719212714.GA6886-sHeGUpI7y9L/[email protected]
Quoted 9 lines · Karel Zak
Quoted 4 lines · Theodore Tso
Also, apparently no once noticed until now, but there's a bug in the util-linux-ng's uuid.sym file. The
uuid_packanduuid_unpacksymbols are missing, because someone forgot to include them in the uuid.sym file.is it really bug? Why do you want to export symbols that are not part of the library API?
You're right; I took a closer look at it, and they aren't part of the library API.
Quoted 3 lines
Unfortunately, it's not possible to combine versioned symbols with anonymous (without version) symbols. It means after first change to the library ABI we will need to introduce UUID_1.0 for old symbols.
Yes, but I would have preferred to do so on a per symbol basis. And the UUID library isn't one that's likely to change in the future.
Quoted 9 lines
Quoted 2 lines
Argh, util-linux-ng 2.16 has already been released; is it too late to undo this change?
I think yes, it's too late.
A new version (2.16.1) without UUID_1.0 will require mass rebuild in all distributions/systems where are libuuid applications with ABI versioning. IMHO this is much more painful that impossibility to downgrade to the old libuuid (from e2fsprogs).
Sigh, you're probably right.
Quoted 2 lines
Maybe we can add --disable-{libuuid,libblkid}-versioning for people who need to bypass the default behaviour.
There are some commercial programs that might use libuuid --- minor ones, like SAP R/3. So they might want to create programs that work on both RHEL 5 and RHEL 6. The only way I can think of doing this is to build the link libraries without the map file, and the shared library with the map file.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Theodore Tso
There are some commercial programs that might use libuuid --- minor ones, like SAP R/3. So they might want to create programs that work on both RHEL 5 and RHEL 6. The only way I can think of doing this is to build the link libraries without the map file, and the shared library with the map file.
If you want one binary to run on multiple distributions you'll always have to build on the older one anyway.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Theodore Tso
Quoted 2 lines · Karel Zak
Maybe we can add --disable-{libuuid,libblkid}-versioning for people who need to bypass the default behaviour.
There are some commercial programs that might use libuuid --- minor ones, like SAP R/3. So they might want to create programs that work on both RHEL 5 and RHEL 6. The only way I can think of doing this is to build the link libraries without the map file, and the shared library with the map file.
Actually, it's far easier than that - just build on RHEL 5
You have to do that to be safe against symbol changes in other libraries (like libc) anyway.
Scott
Signature · 2 lines
Scott James Remnant scott-GeWIH/[email protected]