1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

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

This commit is contained in:
Peter Rajnoha 2013-11-29 15:27:56 +01:00
parent b3074560eb
commit 75628f341a
4 changed files with 46 additions and 41 deletions

View File

@ -3,7 +3,8 @@ Version 2.02.105 -
Append missing newline to lvmetad missing socket path error message. 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. 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 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 -W/--wipesignatures lvcreate option to support wiping on new LVs.
Add allocation/wipe_signatures_on_new_logical_volumes_when_zeroing to lvm.conf. 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. Do not fail the whole autoactivation if the VG refresh done before fails.

53
configure vendored
View File

@ -1563,7 +1563,8 @@ Optional Features:
--enable-valgrind-pool enable valgrind awareness of pools --enable-valgrind-pool enable valgrind awareness of pools
--disable-devmapper disable LVM2 device-mapper interaction --disable-devmapper disable LVM2 device-mapper interaction
--enable-lvmetad enable the LVM Metadata Daemon --enable-lvmetad enable the LVM Metadata Daemon
--enable-blkid_wiping use wiping functionality provided by libblkid --disable-blkid_wiping disable libblkid detection of signatures when wiping
and use native code instead
--enable-udev-systemd-background-jobs --enable-udev-systemd-background-jobs
enable udev-systemd protocol to instantiate a enable udev-systemd protocol to instantiate a
service for background job service for background job
@ -9185,20 +9186,19 @@ _ACEOF
fi fi
################################################################################ ################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use blkid wiping functionality" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libblkid detection of signatures when wiping" >&5
$as_echo_n "checking whether to use blkid wiping functionality... " >&6; } $as_echo_n "checking whether to enable libblkid detection of signatures when wiping... " >&6; }
# Check whether --enable-blkid-wiping was given. # Check whether --enable-blkid_wiping was given.
if test "${enable_blkid_wiping+set}" = set; then : if test "${enable_blkid_wiping+set}" = set; then :
enableval=$enable_blkid_wiping; BLKID_WIPING=$enableval enableval=$enable_blkid_wiping; BLKID_WIPING=$enableval
else else
BLKID_WIPING=no BLKID_WIPING=maybe
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BLKID_WIPING" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BLKID_WIPING" >&5
$as_echo "$BLKID_WIPING" >&6; } $as_echo "$BLKID_WIPING" >&6; }
if test x$BLKID_WIPING != xno; then
if test x$BLKID_WIPING = xyes; then
if test x$PKGCONFIG_INIT != x1; then if test x$PKGCONFIG_INIT != x1; then
pkg_config_init pkg_config_init
fi fi
@ -9259,43 +9259,36 @@ fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
echo "$BLKID_PKG_ERRORS" >&5 echo "$BLKID_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (blkid >= 2.22) were not met: if test x$BLKID_WIPING = xmaybe; then
BLKID_WIPING=no
$BLKID_PKG_ERRORS else
as_fn_error $? "bailing out... blkid library >= 2.22 is required" "$LINENO" 5
Consider adjusting the PKG_CONFIG_PATH environment variable if you fi
installed software in a non-standard prefix.
Alternatively, you may set the environment variables BLKID_CFLAGS
and BLKID_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 if test x$BLKID_WIPING = xmaybe; then
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} BLKID_WIPING=no
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it else
is in your PATH or set the PKG_CONFIG environment variable to the full as_fn_error $? "bailing out... blkid library >= 2.22 is required" "$LINENO" 5
path to pkg-config. fi
Alternatively, you may set the environment variables BLKID_CFLAGS
and BLKID_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else else
BLKID_CFLAGS=$pkg_cv_BLKID_CFLAGS BLKID_CFLAGS=$pkg_cv_BLKID_CFLAGS
BLKID_LIBS=$pkg_cv_BLKID_LIBS BLKID_LIBS=$pkg_cv_BLKID_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
BLKID_PC="blkid" if test x$BLKID_WIPING = xmaybe; then
BLKID_WIPING=yes
fi
fi fi
if test x$BLKID_WIPING = xyes; then
BLKID_PC="blkid"
$as_echo "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h $as_echo "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h
fi
fi fi
################################################################################ ################################################################################

View File

@ -947,21 +947,32 @@ fi
################################################################################ ################################################################################
dnl -- Enable blkid wiping functionality dnl -- Enable blkid wiping functionality
AC_MSG_CHECKING(whether to use blkid wiping functionality) AC_MSG_CHECKING(whether to enable libblkid detection of signatures when wiping)
AC_ARG_ENABLE(blkid-wiping, AC_ARG_ENABLE(blkid_wiping,
AC_HELP_STRING([--enable-blkid_wiping], AC_HELP_STRING([--disable-blkid_wiping],
[use wiping functionality provided by libblkid]), [disable libblkid detection of signatures when wiping and use native code instead]),
BLKID_WIPING=$enableval, BLKID_WIPING=no) BLKID_WIPING=$enableval, BLKID_WIPING=maybe)
AC_MSG_RESULT($BLKID_WIPING) AC_MSG_RESULT($BLKID_WIPING)
if test x$BLKID_WIPING != xno; then
if test x$BLKID_WIPING = xyes; then
dnl -- init pkgconfig if required dnl -- init pkgconfig if required
if test x$PKGCONFIG_INIT != x1; then if test x$PKGCONFIG_INIT != x1; then
pkg_config_init pkg_config_init
fi fi
PKG_CHECK_MODULES(BLKID, blkid >= 2.22, [BLKID_PC="blkid"]) PKG_CHECK_MODULES(BLKID, blkid >= 2.22,
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use wiping functionality provided by libblkid.]) [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 fi
################################################################################ ################################################################################

View File

@ -1,6 +1,6 @@
/* lib/misc/configure.h.in. Generated from configure.in by autoheader. */ /* 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 #undef BLKID_WIPING_SUPPORT
/* Define to 1 if the `closedir' function returns void instead of `int'. */ /* Define to 1 if the `closedir' function returns void instead of `int'. */