From 52cf592fc80be59eac5c1d67250a1ae818e1510d Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Fri, 18 Jul 2014 23:09:23 +0200 Subject: [PATCH] Make linking with and finding libblkid required (so that creating pools on devices with existing filesystem will get a warning). Use '--without-blkid' to explicitly disable this. Signed-off-by: Turbo Fredriksson Closes: #2448 --- config/user-libblkid.m4 | 23 ++++++----------------- rpm/generic/zfs.spec.in | 9 ++------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/config/user-libblkid.m4 b/config/user-libblkid.m4 index 2dd26238c70e..e5999432122b 100644 --- a/config/user-libblkid.m4 +++ b/config/user-libblkid.m4 @@ -16,20 +16,13 @@ dnl # Otherwise we disable blkid support and resort to manual probing. dnl # AC_DEFUN([ZFS_AC_CONFIG_USER_LIBBLKID], [ AC_ARG_WITH([blkid], - [AS_HELP_STRING([--with-blkid], - [support blkid caching @<:@default=check@:>@])], + [AS_HELP_STRING([--without-blkid], + [disable suport for blkid])], [], - [with_blkid=check]) + [with_blkid=yes]) LIBBLKID= - AS_IF([test "x$with_blkid" = xyes], - [ - AC_SUBST([LIBBLKID], ["-lblkid"]) - AC_DEFINE([HAVE_LIBBLKID], 1, - [Define if you have libblkid]) - ]) - - AS_IF([test "x$with_blkid" = xcheck], + AS_IF([test "x$with_blkid" != xno], [ AC_CHECK_LIB([blkid], [blkid_get_cache], [ @@ -96,17 +89,13 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBBLKID], [ [ rm -f $ZFS_DEV AC_MSG_RESULT([no]) - AS_IF([test "x$with_blkid" != xcheck], - [AC_MSG_FAILURE( - [--with-blkid given but unavailable])]) + AC_MSG_FAILURE([libblkid test failed (--without-libblkid to disable)]) ]) LIBS="$saved_LIBS" ], [ - AS_IF([test "x$with_blkid" != xcheck], - [AC_MSG_FAILURE( - [--with-blkid given but unavailable])]) + AC_MSG_FAILURE([libblkid test failed (--without-libblkid to disable)]) ] []) ]) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index 97d2bacbd910..b8c6db33b87d 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -195,11 +195,6 @@ image which is ZFS aware. %else %define debug --disable-debug %endif -%if %{with blkid} - %define blkid --with-blkid -%else - %define blkid --without-blkid -%endif %if 0%{?_systemd} %define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable-sysvinit %else @@ -216,8 +211,8 @@ image which is ZFS aware. --with-dracutdir=%{_dracutdir} \ --disable-static \ %{debug} \ - %{blkid} \ - %{systemd} + %{systemd} \ + %{?_with_blkid} make %{?_smp_mflags} %install