Skip to contentSkip to conversation

master - configure: add --enable-blkid_wiping

PATCH Peter Rajnoha 1 participant 1 message Nov 27, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9bfc0be493192958f5dbffea4eb7dda968062261
Commit:        9bfc0be493192958f5dbffea4eb7dda968062261
Parent:        b6dab4e0598df7b6a44a32749fdb846c03aa692d
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Thu Nov 14 14:03:24 2013 +0100
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Wed Nov 27 15:48:16 2013 +0100

configure: add --enable-blkid_wiping

---
 WHATS_NEW               |    1 +
 configure               |  128 +++++++++++++++++++++++++++++++++++++++++++++++
 configure.in            |   22 ++++++++
 lib/misc/configure.h.in |    3 +
 liblvm/liblvm2app.pc.in |    2 +-
 make.tmpl.in            |    5 +-
 tools/Makefile.in       |    2 +-
 7 files changed, 159 insertions(+), 4 deletions(-)
WHATS_NEW +1 -0
index b4d683d..9823cd1 100644
@@ -1,5 +1,6 @@
 Version 2.02.105 -
 =====================================
+  Add configure --enable-blkid_wiping to use libblkid to detect signatures.
   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 +128 -0

176 lines not on this page · raw message

configure.in +22 -0
index cd80274..ff9bf81 100644
@@ -946,6 +946,25 @@ if test x$BUILD_LVMETAD = xyes; then
 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_RESULT($BLKID_WIPING)
+
+
+if test x$BLKID_WIPING = xyes; 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.])
+fi
+
+################################################################################
 dnl -- Enable udev-systemd protocol to instantiate a service for background jobs
 AC_MSG_CHECKING(whether to use udev-systemd protocol for jobs in background)
 AC_ARG_ENABLE(udev-systemd-background-jobs,
@@ -1538,6 +1557,9 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
 ################################################################################
 AC_SUBST(APPLIB)
 AC_SUBST(AWK)
+AC_SUBST(BLKID_LIBS)
+AC_SUBST(BLKID_PC)
+AC_SUBST(BLKID_WIPING)
 AC_SUBST(BUILD_CMIRRORD)
 AC_SUBST(BUILD_DMEVENTD)
 AC_SUBST(BUILD_LVMETAD)
lib/misc/configure.h.in +3 -0
index 13ba882..51db42e 100644
@@ -1,5 +1,8 @@
 /* lib/misc/configure.h.in.  Generated from configure.in by autoheader.  */
 
+/* Define to 1 to use wiping functionality provided by libblkid. */
+#undef BLKID_WIPING_SUPPORT
+
 /* Define to 1 if the `closedir' function returns void instead of `int'. */
 #undef CLOSEDIR_VOID
 
liblvm/liblvm2app.pc.in +1 -1
index 4c71c36..7d7fd3d 100644
@@ -8,4 +8,4 @@ Description: lvm2 application library
 Version: @LVM_MAJOR at .@LVM_LIBAPI@
 Cflags: -I${includedir} 
 Libs: -L${libdir} -llvm2app
-Requires.private: devmapper
+Requires.private: devmapper @BLKID_PC@
make.tmpl.in +3 -2
index 3eea85e..35a47be 100644
@@ -43,7 +43,7 @@ PYTHON = @PYTHON@
 
 LIBS = @LIBS@
 # Extra libraries always linked with static binaries
-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS)
+STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
 DEFS += @DEFS@
 # FIXME set this only where it's needed, not globally?
 CFLAGS += @CFLAGS@ @UDEV_CFLAGS@
@@ -52,12 +52,13 @@ ELDFLAGS += @ELDFLAGS@
 LDDEPS += @LDDEPS@
 LDFLAGS += @LDFLAGS@
 LIB_SUFFIX = @LIB_SUFFIX@
-LVMINTERNAL_LIBS = -llvm-internal $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS)
+LVMINTERNAL_LIBS = -llvm-internal $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS) $(BLKID_LIBS)
 DL_LIBS = @DL_LIBS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 READLINE_LIBS = @READLINE_LIBS@
 SELINUX_LIBS = @SELINUX_LIBS@
 UDEV_LIBS = @UDEV_LIBS@
+BLKID_LIBS=@BLKID_LIBS@
 TESTING = @TESTING@
 
 # Setup directory variables
tools/Makefile.in +1 -1
index f90cfae..f8e4934 100644
@@ -117,7 +117,7 @@ CFLOW_TARGET = lvm
 
 include $(top_builddir)/make.tmpl
 
-LIBS += $(UDEV_LIBS)
+LIBS += $(UDEV_LIBS) $(BLKID_LIBS)
 
 device-mapper: $(TARGETS_DM)