mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
configure: make configure --enable-udev-systemd-background-jobs only for systemd >= 205
systemd-run is available in systemd>=205. Also, this fix prevents systemd-specific udev rules in 69-dm-lvm-metad.rules to appear in case systemd environment is not available - make configure to check this automatically and use these systemd specific rules only if it is applicable.
This commit is contained in:
parent
422d1ac8d2
commit
74ed1ba9f9
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.113 -
|
Version 2.02.113 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Default to configure --enable-udev-systemd-background-jobs for systemd>=205.
|
||||||
Fix ignore_vg() to properly react on various vg_read errors (2.02.112).
|
Fix ignore_vg() to properly react on various vg_read errors (2.02.112).
|
||||||
Failed recovery returns FAILED_RECOVERY status flag for vg_read().
|
Failed recovery returns FAILED_RECOVERY status flag for vg_read().
|
||||||
Exit with non-zero status code when pvck encounters a problem.
|
Exit with non-zero status code when pvck encounters a problem.
|
||||||
|
2
aclocal.m4
vendored
2
aclocal.m4
vendored
@ -1,4 +1,4 @@
|
|||||||
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
|
# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
93
configure
vendored
93
configure
vendored
@ -736,6 +736,8 @@ LVM2CMD_LIB
|
|||||||
LVM2APP_LIB
|
LVM2APP_LIB
|
||||||
UDEV_LIBS
|
UDEV_LIBS
|
||||||
UDEV_CFLAGS
|
UDEV_CFLAGS
|
||||||
|
SYSTEMD_LIBS
|
||||||
|
SYSTEMD_CFLAGS
|
||||||
BLKID_LIBS
|
BLKID_LIBS
|
||||||
BLKID_CFLAGS
|
BLKID_CFLAGS
|
||||||
VALGRIND_POOL
|
VALGRIND_POOL
|
||||||
@ -984,6 +986,8 @@ VALGRIND_CFLAGS
|
|||||||
VALGRIND_LIBS
|
VALGRIND_LIBS
|
||||||
BLKID_CFLAGS
|
BLKID_CFLAGS
|
||||||
BLKID_LIBS
|
BLKID_LIBS
|
||||||
|
SYSTEMD_CFLAGS
|
||||||
|
SYSTEMD_LIBS
|
||||||
UDEV_CFLAGS
|
UDEV_CFLAGS
|
||||||
UDEV_LIBS'
|
UDEV_LIBS'
|
||||||
|
|
||||||
@ -1791,6 +1795,10 @@ Some influential environment variables:
|
|||||||
BLKID_CFLAGS
|
BLKID_CFLAGS
|
||||||
C compiler flags for BLKID, overriding pkg-config
|
C compiler flags for BLKID, overriding pkg-config
|
||||||
BLKID_LIBS linker flags for BLKID, overriding pkg-config
|
BLKID_LIBS linker flags for BLKID, overriding pkg-config
|
||||||
|
SYSTEMD_CFLAGS
|
||||||
|
C compiler flags for SYSTEMD, overriding pkg-config
|
||||||
|
SYSTEMD_LIBS
|
||||||
|
linker flags for SYSTEMD, overriding pkg-config
|
||||||
UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config
|
UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config
|
||||||
UDEV_LIBS linker flags for UDEV, overriding pkg-config
|
UDEV_LIBS linker flags for UDEV, overriding pkg-config
|
||||||
|
|
||||||
@ -10601,12 +10609,95 @@ $as_echo_n "checking whether to use udev-systemd protocol for jobs in background
|
|||||||
if test "${enable_udev_systemd_background_jobs+set}" = set; then :
|
if test "${enable_udev_systemd_background_jobs+set}" = set; then :
|
||||||
enableval=$enable_udev_systemd_background_jobs; UDEV_SYSTEMD_BACKGROUND_JOBS=$enableval
|
enableval=$enable_udev_systemd_background_jobs; UDEV_SYSTEMD_BACKGROUND_JOBS=$enableval
|
||||||
else
|
else
|
||||||
UDEV_SYSTEMD_BACKGROUND_JOBS=yes
|
UDEV_SYSTEMD_BACKGROUND_JOBS=maybe
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UDEV_SYSTEMD_BACKGROUND_JOBS" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UDEV_SYSTEMD_BACKGROUND_JOBS" >&5
|
||||||
$as_echo "$UDEV_SYSTEMD_BACKGROUND_JOBS" >&6; }
|
$as_echo "$UDEV_SYSTEMD_BACKGROUND_JOBS" >&6; }
|
||||||
|
|
||||||
|
if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" != no; then
|
||||||
|
pkg_config_init
|
||||||
|
|
||||||
|
pkg_failed=no
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
|
||||||
|
$as_echo_n "checking for SYSTEMD... " >&6; }
|
||||||
|
|
||||||
|
if test -n "$SYSTEMD_CFLAGS"; then
|
||||||
|
pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd >= 205\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "systemd >= 205") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "systemd >= 205" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
if test -n "$SYSTEMD_LIBS"; then
|
||||||
|
pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd >= 205\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "systemd >= 205") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "systemd >= 205" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if test $pkg_failed = yes; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||||
|
_pkg_short_errors_supported=yes
|
||||||
|
else
|
||||||
|
_pkg_short_errors_supported=no
|
||||||
|
fi
|
||||||
|
if test $_pkg_short_errors_supported = yes; then
|
||||||
|
SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "systemd >= 205" 2>&1`
|
||||||
|
else
|
||||||
|
SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "systemd >= 205" 2>&1`
|
||||||
|
fi
|
||||||
|
# Put the nasty error message in config.log where it belongs
|
||||||
|
echo "$SYSTEMD_PKG_ERRORS" >&5
|
||||||
|
|
||||||
|
if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" = maybe; then
|
||||||
|
UDEV_SYSTEMD_BACKGROUND_JOBS=no
|
||||||
|
else
|
||||||
|
as_fn_error $? "bailing out... systemd >= 205 is required" "$LINENO" 5
|
||||||
|
fi
|
||||||
|
elif test $pkg_failed = untried; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" = maybe; then
|
||||||
|
UDEV_SYSTEMD_BACKGROUND_JOBS=no
|
||||||
|
else
|
||||||
|
as_fn_error $? "bailing out... systemd >= 205 is required" "$LINENO" 5
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
|
||||||
|
SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
test "UDEV_SYSTEMD_BACKGROUND_JOBS" = maybe && UDEV_SYSTEMD_BACKGROUND_JOBS=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable synchronisation with udev processing" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable synchronisation with udev processing" >&5
|
||||||
$as_echo_n "checking whether to enable synchronisation with udev processing... " >&6; }
|
$as_echo_n "checking whether to enable synchronisation with udev processing... " >&6; }
|
||||||
|
15
configure.in
15
configure.in
@ -1092,13 +1092,26 @@ fi
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl -- Enable udev-systemd protocol to instantiate a service for background jobs
|
dnl -- Enable udev-systemd protocol to instantiate a service for background jobs
|
||||||
|
dnl -- Requires systemd version 205 at least (including support for systemd-run)
|
||||||
AC_MSG_CHECKING(whether to use udev-systemd protocol for jobs in background)
|
AC_MSG_CHECKING(whether to use udev-systemd protocol for jobs in background)
|
||||||
AC_ARG_ENABLE(udev-systemd-background-jobs,
|
AC_ARG_ENABLE(udev-systemd-background-jobs,
|
||||||
AC_HELP_STRING([--disable-udev-systemd-background-jobs],
|
AC_HELP_STRING([--disable-udev-systemd-background-jobs],
|
||||||
[disable udev-systemd protocol to instantiate a service for background job]),
|
[disable udev-systemd protocol to instantiate a service for background job]),
|
||||||
UDEV_SYSTEMD_BACKGROUND_JOBS=$enableval, UDEV_SYSTEMD_BACKGROUND_JOBS=yes)
|
UDEV_SYSTEMD_BACKGROUND_JOBS=$enableval,
|
||||||
|
UDEV_SYSTEMD_BACKGROUND_JOBS=maybe)
|
||||||
AC_MSG_RESULT($UDEV_SYSTEMD_BACKGROUND_JOBS)
|
AC_MSG_RESULT($UDEV_SYSTEMD_BACKGROUND_JOBS)
|
||||||
|
|
||||||
|
if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" != no; then
|
||||||
|
pkg_config_init
|
||||||
|
PKG_CHECK_MODULES(SYSTEMD, systemd >= 205,
|
||||||
|
[test "UDEV_SYSTEMD_BACKGROUND_JOBS" = maybe && UDEV_SYSTEMD_BACKGROUND_JOBS=yes],
|
||||||
|
[if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" = maybe; then
|
||||||
|
UDEV_SYSTEMD_BACKGROUND_JOBS=no
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([bailing out... systemd >= 205 is required])
|
||||||
|
fi])
|
||||||
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
dnl -- Enable udev synchronisation
|
dnl -- Enable udev synchronisation
|
||||||
AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
|
AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
|
||||||
|
Loading…
Reference in New Issue
Block a user