Skip to contentSkip to conversation

master - configure: enable blkid_wiping by default if the blkid library is present

PATCH Peter Rajnoha 1 participant 1 message Nov 29, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=75628f341ad38b68aae33eae0b5700be2a6e5769
Commit:        75628f341ad38b68aae33eae0b5700be2a6e5769
Parent:        b3074560eb36d0b1c8ec61f50e71b0b27dbda982
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Fri Nov 29 15:27:56 2013 +0100
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Fri Nov 29 15:27:56 2013 +0100

configure: enable blkid_wiping by default if the blkid library is present

---
 WHATS_NEW               |    3 +-
 configure               |   53 ++++++++++++++++++++--------------------------
 configure.in            |   29 +++++++++++++++++--------
 lib/misc/configure.h.in |    2 +-
 4 files changed, 46 insertions(+), 41 deletions(-)
WHATS_NEW +2 -1
index 6aac94a..0101b49 100644
@@ -3,7 +3,8 @@ Version 2.02.105 -
   Append missing newline to lvmetad missing socket path error message.
   Check for non-zero aligment in _text_pv_add_metadata_area() to not div by 0.
   Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
-  Add configure --enable-blkid_wiping to use libblkid to detect signatures.
+  Enable blkid_wiping by default if the blkid library is present.
+  Add configure --disable-blkid_wiping to disable libblkid signature detection.
   Add -W/--wipesignatures lvcreate option to support wiping on new LVs.
   Add allocation/wipe_signatures_on_new_logical_volumes_when_zeroing to lvm.conf.
   Do not fail the whole autoactivation if the VG refresh done before fails.
configure +23 -30

93 lines not on this page · raw message

configure.in +20 -9
index ff9bf81..b4a407a 100644
@@ -947,21 +947,32 @@ fi
 
 ################################################################################
 dnl -- Enable blkid wiping functionality
-AC_MSG_CHECKING(whether to use blkid wiping functionality)
-AC_ARG_ENABLE(blkid-wiping,
-	      AC_HELP_STRING([--enable-blkid_wiping],
-			     [use wiping functionality provided by libblkid]),
-	      BLKID_WIPING=$enableval, BLKID_WIPING=no)
+AC_MSG_CHECKING(whether to enable libblkid detection of signatures when wiping)
+AC_ARG_ENABLE(blkid_wiping,
+	      AC_HELP_STRING([--disable-blkid_wiping],
+			     [disable libblkid detection of signatures when wiping and use native code instead]),
+	      BLKID_WIPING=$enableval, BLKID_WIPING=maybe)
 AC_MSG_RESULT($BLKID_WIPING)
 
-
-if test x$BLKID_WIPING = xyes; then
+if test x$BLKID_WIPING != xno; then
 	dnl -- init pkgconfig if required
 	if test x$PKGCONFIG_INIT != x1; then
 		pkg_config_init
 	fi
-	PKG_CHECK_MODULES(BLKID, blkid >= 2.22, [BLKID_PC="blkid"])
-	AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use wiping functionality provided by libblkid.])
+	PKG_CHECK_MODULES(BLKID, blkid >= 2.22,
+				[if test x$BLKID_WIPING = xmaybe; then
+					BLKID_WIPING=yes
+				 fi],
+				[if test x$BLKID_WIPING = xmaybe; then
+					BLKID_WIPING=no
+				 else
+					AC_MSG_ERROR([bailing out... blkid library >= 2.22 is required])
+				 fi
+				])
+	if test x$BLKID_WIPING = xyes; then
+		BLKID_PC="blkid"
+		AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+	fi
 fi
 
 ################################################################################
lib/misc/configure.h.in +1 -1
index 51db42e..4e9ffd1 100644
@@ -1,6 +1,6 @@
 /* lib/misc/configure.h.in.  Generated from configure.in by autoheader.  */
 
-/* Define to 1 to use wiping functionality provided by libblkid. */
+/* Define to 1 to use libblkid detection of signatures when wiping. */
 #undef BLKID_WIPING_SUPPORT
 
 /* Define to 1 if the `closedir' function returns void instead of `int'. */