Skip to content

Commit

Permalink
Make linking with and finding libblkid required (so that creating
Browse files Browse the repository at this point in the history
pools on devices with existing filesystem will get a warning).
Use '--without-blkid' to explicitly disable this.

Signed-off-by: Turbo Fredriksson <[email protected]>
Closes: openzfs#2448
  • Loading branch information
FransUrbo committed Aug 5, 2014
1 parent 6edcadc commit 52cf592
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
23 changes: 6 additions & 17 deletions config/user-libblkid.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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],
[
Expand Down Expand Up @@ -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)])
]
[])
])
Expand Down
9 changes: 2 additions & 7 deletions rpm/generic/zfs.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -216,8 +211,8 @@ image which is ZFS aware.
--with-dracutdir=%{_dracutdir} \
--disable-static \
%{debug} \
%{blkid} \
%{systemd}
%{systemd} \
%{?_with_blkid}
make %{?_smp_mflags}

%install
Expand Down

0 comments on commit 52cf592

Please sign in to comment.