main - lvmdbusd: Add lock to prevent concurrent lvm shell access
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b0e75bd356a07042375...
Commit: b0e75bd356a070423754676872b7b6948913be2e
Parent: e3b7395af460033493a01d222b52cf8931090f64
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Mon Feb 27 08:57:24 2023 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Mon Feb 27 09:07:43 2023 -0600
lvmdbusd: Add lock to prevent concurrent lvm shell access
There is a window of time where the following can occur.
1. An API request is in process to the lvm shell, we have written some
command to the lvm shell and we are blocked on that thread waiting
2. A signal arrives to the daemon which causes us to exit. The signal
handling code path goes directly to the lvm shell and writes
"exit\n". This causes the lvm shell to simply exit.
3. The thread that was waiting for a response gets an EIO as the child
process has exited. This bubbles up a failure.
This is addressed by placing a lock in the lvm shell to prevent
concurrent access to the shell. We also gather additional debug data
when we get an error in the lvm shell read path. This should help if
the lvm shell exits/crashes on its own.
---
daemons/lvmdbusd/lvm_shell_proxy.py.in | 78 ++++++++++++++++++++--------------
1 file changed, 45 insertions(+), 33 deletions(-)
diff --git a/daemons/lvmdbusd/lvm_shell_proxy.py.in b/daemons/lvmdbusd/lvm_shell_proxy.py.in
index 37d73218b..b8c8fa565 100755
--- a/daemons/lvmdbusd/lvm_shell_proxy.py.in
+++ b/daemons/lvmdbusd/lvm_shell_proxy.py.in
@@ -18,6 +18,7 @@ import pty
import sys
import tempfile
import time
+import threading
import select
try:
@@ -107,11 +108,14 @@ class LVMShellProxy(object):
else:
raise LvmBug(
"lvm returned no JSON output!")
-
- except IOError as ioe:
- log_debug(str(ioe))
- self.exit_shell()
- raise ioe
+ except Exception as e:
+ log_error("While reading from lvm shell we encountered an error %s" % str(e))
+ log_error("stdout= %s\nstderr= %s\n" % (stdout, stderr))
+ if self.lvm_shell.poll() is not None:
+ log_error("Underlying lvm shell process unexpectedly exited: %d" % self.lvm_shell.returncode)
+ else:
+ log_error("Underlying lvm shell process is still present!")
+ raise e
if keep_reading and cfg.run.value == 0:
# We didn't complete as we are shutting down
@@ -131,6 +135,10 @@ class LVMShellProxy(object):
tmp_dir = tempfile.mkdtemp(prefix="lvmdbus_")
tmp_file = "%s/lvmdbus_report" % (tmp_dir)
+ # Create a lock so that we don't step on each other when we are waiting for a command
+ # to finish and some other request comes in concurrently, like to exit the shell.
+ self.shell_lock = threading.RLock()
+
# Create a fifo for the report output
os.mkfifo(tmp_file, 0o600)
@@ -188,7 +196,8 @@ class LVMShellProxy(object):
os.unlink(tmp_file)
os.rmdir(tmp_dir)
- def get_last_log(self):
+ def _get_last_log(self):
+ # Precondition, lock is held
self._write_cmd('lastlog\n')
report_json = self._read_response()[1]
return get_error_msg(report_json)
@@ -209,28 +218,29 @@ class LVMShellProxy(object):
cmd += "\n"
# run the command by writing it to the shell's STDIN
- self._write_cmd(cmd)
-
- # read everything from the STDOUT to the next prompt
- stdout, report_json, stderr = self._read_response()
-
- # Parse the report to see what happened
- if 'log' in report_json:
- ret_code = int(report_json['log'][-1:][0]['log_ret_code'])
- # If we have an exported vg we get a log_ret_code == 5 when
- # we do a 'fullreport'
- # Note: 0 == error
- if (ret_code == 1) or (ret_code == 5 and argv[0] == 'fullreport'):
- rc = 0
- else:
- # Depending on where lvm fails the command, it may not have anything
- # to report for "lastlog", so we need to check for a message in the
- # report json too.
- error_msg = self.get_last_log()
- if error_msg is None:
- error_msg = get_error_msg(report_json)
+ with self.shell_lock:
+ self._write_cmd(cmd)
+
+ # read everything from the STDOUT to the next prompt
+ stdout, report_json, stderr = self._read_response()
+
+ # Parse the report to see what happened
+ if 'log' in report_json:
+ ret_code = int(report_json['log'][-1:][0]['log_ret_code'])
+ # If we have an exported vg we get a log_ret_code == 5 when
+ # we do a 'fullreport'
+ # Note: 0 == error
+ if (ret_code == 1) or (ret_code == 5 and argv[0] == 'fullreport'):
+ rc = 0
+ else:
+ # Depending on where lvm fails the command, it may not have anything
+ # to report for "lastlog", so we need to check for a message in the
+ # report json too.
+ error_msg = self._get_last_log()
if error_msg is None:
- error_msg = 'No error reason provided! (missing "log" section)'
+ error_msg = get_error_msg(report_json)
+ if error_msg is None:
+ error_msg = 'No error reason provided! (missing "log" section)'
if debug or rc != 0:
log_error(("CMD= %s" % cmd))
@@ -240,12 +250,14 @@ class LVMShellProxy(object):
return rc, report_json, error_msg
def exit_shell(self):
- try:
- self._write_cmd('exit\n')
- self.lvm_shell.wait(1)
- self.lvm_shell = None
- except Exception as _e:
- log_error(str(_e))
+ with self.shell_lock:
+ try:
+ if self.lvm_shell is not None:
+ self._write_cmd('exit\n')
+ self.lvm_shell.wait(1)
+ self.lvm_shell = None
+ except Exception as _e:
+ log_error("exit_shell: %s" % (str(_e)))
def __del__(self):
# Note: When we are shutting down the daemon and the main process has already exited
7 months
main - lvmdbustest.py: Remove use of root_dir in glob
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e3b7395af460033493a...
Commit: e3b7395af460033493a01d222b52cf8931090f64
Parent: 1857eb9fe08924c2e4e5adfc322ee4a2ae5a2e67
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Thu Feb 23 12:24:39 2023 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Mon Feb 27 09:07:37 2023 -0600
lvmdbustest.py: Remove use of root_dir in glob
This feature has only been in python since 10/2021.
---
test/dbus/lvmdbustest.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 685acd563..b1c965bb7 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -258,9 +258,9 @@ def remove_lvm_debug():
# If we are running the lvmdbusd daemon and collecting lvm debug data, check and
# clean-up after the tests.
tmpdir = tempfile.gettempdir()
- for f in glob("lvmdbusd.lvm.debug.*.log", root_dir=tmpdir):
- fn = os.path.join(tmpdir, f)
- os.unlink(fn)
+ fp = os.path.join(tmpdir, "lvmdbusd.lvm.debug.*.log")
+ for f in glob(fp):
+ os.unlink(f)
class DaemonInfo(object):
7 months
main - lvresize: fix check for mounted and renamed LV to handle spaces
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1857eb9fe08924c2e4e...
Commit: 1857eb9fe08924c2e4e5adfc322ee4a2ae5a2e67
Parent: 86ac529b99d04cb7feb9b52fae3cbeda6144660c
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Feb 23 16:32:37 2023 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Feb 23 16:55:36 2023 -0600
lvresize: fix check for mounted and renamed LV to handle spaces
Replace spaces with \040 in directory paths from getmntent (mtab).
The recent commit 5374a44c5712 compares mount point directory paths
from /etc/mtab and /proc/mounts, in order to detect when a mounted
LV has been renamed. The directory path comparison does not work
correctly when the path contains spaces because getmntent uses
ascii space chars and proc replaces spaces with \040.
---
lib/device/filesystem.c | 41 ++++++++++++++++++++++++++++++++---------
test/shell/lvresize-fs.sh | 14 ++++++++++++++
2 files changed, 46 insertions(+), 9 deletions(-)
diff --git a/lib/device/filesystem.c b/lib/device/filesystem.c
index 9b086d8c1..2163276ed 100644
--- a/lib/device/filesystem.c
+++ b/lib/device/filesystem.c
@@ -234,8 +234,9 @@ int fs_mount_state_is_misnamed(struct cmd_context *cmd, struct logical_volume *l
char proc_fstype[FSTYPE_MAX];
char proc_devpath[PATH_MAX];
char proc_mntpath[PATH_MAX];
- char lv_mapper_path[PATH_MAX];
- char mntent_mount_dir[PATH_MAX];
+ char mtab_mntpath[PATH_MAX];
+ char dm_devpath[PATH_MAX];
+ char tmp_path[PATH_MAX];
char *dm_name;
struct stat st_lv;
struct stat stme;
@@ -275,14 +276,36 @@ int fs_mount_state_is_misnamed(struct cmd_context *cmd, struct logical_volume *l
continue;
if (stme.st_dev != st_lv.st_rdev)
continue;
- dm_strncpy(mntent_mount_dir, me->mnt_dir, sizeof(mntent_mount_dir));
+ dm_strncpy(mtab_mntpath, me->mnt_dir, sizeof(mtab_mntpath));
+ break;
}
endmntent(fme);
+ /*
+ * In mtab dir path, replace each ascii space character with the
+ * four characters \040 which is how /proc/mounts represents spaces.
+ * The mnt dir from /etc/mtab and /proc/mounts are compared below.
+ */
+ if (strchr(mtab_mntpath, ' ')) {
+ int i, j = 0;
+ memcpy(tmp_path, mtab_mntpath, sizeof(tmp_path));
+ memset(mtab_mntpath, 0, sizeof(mtab_mntpath));
+ for (i = 0; i < sizeof(tmp_path); i++) {
+ if (tmp_path[i] == ' ') {
+ mtab_mntpath[j++] = '\\';
+ mtab_mntpath[j++] = '0';
+ mtab_mntpath[j++] = '4';
+ mtab_mntpath[j++] = '0';
+ continue;
+ }
+ mtab_mntpath[j++] = tmp_path[i];
+ }
+ }
+
if (!(dm_name = dm_build_dm_name(cmd->mem, lv->vg->name, lv->name, NULL)))
return_0;
- if ((dm_snprintf(lv_mapper_path, sizeof(lv_mapper_path), "%s/%s", dm_dir(), dm_name) < 0))
+ if ((dm_snprintf(dm_devpath, sizeof(dm_devpath), "%s/%s", dm_dir(), dm_name) < 0))
return_0;
if (!(fp = fopen("/proc/mounts", "r")))
@@ -296,8 +319,8 @@ int fs_mount_state_is_misnamed(struct cmd_context *cmd, struct logical_volume *l
if (strcmp(fstype, proc_fstype))
continue;
- dir_match = !strcmp(mntent_mount_dir, proc_mntpath);
- dev_match = !strcmp(lv_mapper_path, proc_devpath);
+ dir_match = !strcmp(mtab_mntpath, proc_mntpath);
+ dev_match = !strcmp(dm_devpath, proc_devpath);
if (dir_match)
found_dir++;
@@ -306,7 +329,7 @@ int fs_mount_state_is_misnamed(struct cmd_context *cmd, struct logical_volume *l
if (dir_match != dev_match) {
log_error("LV %s mounted at %s may have been renamed (from %s).",
- lv_mapper_path, proc_mntpath, proc_devpath);
+ dm_devpath, proc_mntpath, proc_devpath);
renamed = 1;
}
}
@@ -327,11 +350,11 @@ int fs_mount_state_is_misnamed(struct cmd_context *cmd, struct logical_volume *l
}
/* These two are likely detected as renamed, but include checks in case. */
if (found_dir > 1) {
- log_error("File system resizing not supported: %s appears more than once in /proc/mounts.", mntent_mount_dir);
+ log_error("File system resizing not supported: %s appears more than once in /proc/mounts.", mtab_mntpath);
return 1;
}
if (found_dev > 1) {
- log_error("File system resizing not supported: %s appears more than once in /proc/mounts.", lv_mapper_path);
+ log_error("File system resizing not supported: %s appears more than once in /proc/mounts.", dm_devpath);
return 1;
}
return 0;
diff --git a/test/shell/lvresize-fs.sh b/test/shell/lvresize-fs.sh
index f437652d6..de234aad5 100644
--- a/test/shell/lvresize-fs.sh
+++ b/test/shell/lvresize-fs.sh
@@ -30,6 +30,9 @@ which mkfs.xfs || skip
mount_dir="mnt_lvresize_fs"
mkdir -p "$mount_dir"
+mount_dir_space="other mnt dir"
+mkdir -p "$mount_dir_space"
+
# Tests require a libblkid version that shows FSLASTBLOCK
lvcreate -n $lv1 -L 300 $vg
mkfs.xfs -f "$DM_DEV_DIR/$vg/$lv1"
@@ -273,6 +276,17 @@ umount "$mount_dir"
lvchange -an $vg/$lv2
lvremove $vg/$lv2
+# lvextend|lvreduce, ext4, active, mounted, mount dir with space, --fs resize, renamed LV
+lvcreate -n $lv -L 256M $vg
+mkfs.ext4 "$DM_DEV_DIR/$vg/$lv"
+mount "$DM_DEV_DIR/$vg/$lv" "$mount_dir_space"
+lvrename $vg/$lv $vg/$lv2
+not lvextend --fs resize -L+32M $vg/$lv2
+not lvreduce --fs resize -L-32M $vg/$lv2
+umount "$mount_dir_space"
+lvchange -an $vg/$lv2
+lvremove $vg/$lv2
+
#
# lvextend, xfs
7 months, 1 week
main - configure: update
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=86ac529b99d04cb7feb...
Commit: 86ac529b99d04cb7feb9b52fae3cbeda6144660c
Parent: 551d27a327bdf504306ae047adb765100a81103d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 20 21:04:58 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 23 16:46:35 2023 +0100
configure: update
---
configure | 398 ++++++++++++++++++++++++++++++++++++++++++++++-------------
make.tmpl.in | 1 +
2 files changed, 315 insertions(+), 84 deletions(-)
diff --git a/configure b/configure
index c2eee6ba7..7f50d6fe3 100755
--- a/configure
+++ b/configure
@@ -651,18 +651,14 @@ ac_default_prefix=/usr
ac_subst_vars='LTLIBOBJS
usrsbindir
usrlibdir
-tmpfilesdir
-udevdir
udev_prefix
+udevdir
+tmpfilesdir
tmpdir
-kernelvsn
missingkernel
+kernelvsn
kerneldir
interface
-CMIRRORD_PIDFILE
-LVMLOCKD_PIDFILE
-LVMPOLLD_PIDFILE
-DMEVENTD_PIDFILE
WRITE_INSTALL
WRITECACHE
VDO_LIB
@@ -670,37 +666,39 @@ VDO_INCLUDE
VDO
VALGRIND_POOL
USRSBINDIR
-SILENT_RULES
USE_TRACKING
-UDEV_HAS_BUILTIN_BLKID
-UDEV_RULE_EXEC_DETECTION
UDEV_SYNC
+UDEV_STATIC_LIBS
+UDEV_RULE_EXEC_DETECTION
UDEV_RULES
UDEV_PC
+UDEV_HAS_BUILTIN_BLKID
THIN
TESTSUITE_DATA
+SYSCONFDIR
STATIC_LINK
+STATIC_LDFLAGS
STATICDIR
SNAPSHOTS
-SYSCONFDIR
+SILENT_RULES
+SELINUX_STATIC_LIBS
SELINUX_PC
-SELINUX_LIBS
SBINDIR
RT_LIBS
PYTHON3DIR
-PYTHON2DIR
PYTHON3
+PYTHON2DIR
PYTHON2
PTHREAD_LIBS
-M_LIBS
PKGCONFIG
ODIRECT
OCFDIR
OCF
+M_LIBS
MIRRORS
MANGLING
-LVMIMPORTVDO_PATH
-LVMIMPORTVDO
+LVRESIZE_FS_HELPER_PATH
+LVM_VERSION
LVM_RELEASE_DATE
LVM_RELEASE
LVM_PATH
@@ -708,23 +706,25 @@ LVM_PATCHLEVEL
LVM_MINOR
LVM_MAJOR
LVM_LIBAPI
-LVM_VERSION
+LVMPOLLD_PIDFILE
+LVMLOCKD_PIDFILE
+LVMIMPORTVDO_PATH
+LVMIMPORTVDO
LIB_SUFFIX
LDDEPS
JOBS
INTL
INTEGRITY
-BLKDEACTIVATE
-LVRESIZE_FS_HELPER_PATH
FSADM_PATH
FSADM
ELDFLAGS
DM_LIB_PATCHLEVEL
+DMEVENTD_PIDFILE
DMEVENTD_PATH
DL_LIBS
DEVMAPPER
-DEFAULT_USE_LVMLOCKD
DEFAULT_USE_LVMPOLLD
+DEFAULT_USE_LVMLOCKD
DEFAULT_USE_DEVICES_FILE
DEFAULT_USE_BLKID_WIPING
DEFAULT_SYS_LOCK_DIR
@@ -743,30 +743,37 @@ DEFAULT_ARCHIVE_SUBDIR
DEBUG
COPTIMISE_FLAG
CONFDIR
+CMIRRORD_PIDFILE
CMDLIB
CLDWHOLEARCHIVE
CLDNOWHOLEARCHIVE
CLDFLAGS
CACHE
-BUILD_DMFILEMAPD
+BUILD_LVMPOLLD
+BUILD_LVMLOCKD
+BUILD_LVMDBUSD
+BUILD_LOCKDSANLOCK
BUILD_LOCKDIDM
BUILD_LOCKDDLM_CONTROL
BUILD_LOCKDDLM
-BUILD_LOCKDSANLOCK
-BUILD_LVMLOCKD
-BUILD_LVMPOLLD
-BUILD_LVMDBUSD
+BUILD_DMFILEMAPD
BUILD_DMEVENTD
BUILD_CMIRRORD
+BLKID_STATIC_LIBS
BLKID_PC
+BLKDEACTIVATE
READLINE_LIBS
READLINE_CFLAGS
+AIO_LIBS
+AIO_CFLAGS
MODPROBE_CMD
systemdutildir
systemdsystemunitdir
MSGFMT
EDITLINE_LIBS
EDITLINE_CFLAGS
+SELINUX_LIBS
+SELINUX_CFLAGS
PYTHON3_CONFIG
pkgpyexecdir
pyexecdir
@@ -806,8 +813,6 @@ CPG_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
-AIO_LIBS
-AIO_CFLAGS
VDO_FORMAT_CMD
CACHE_RESTORE_CMD
CACHE_REPAIR_CMD
@@ -1020,8 +1025,6 @@ CXX
CXXFLAGS
CCC
CPP
-AIO_CFLAGS
-AIO_LIBS
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
@@ -1044,10 +1047,14 @@ BLKID_LIBS
UDEV_CFLAGS
UDEV_LIBS
PYTHON
+SELINUX_CFLAGS
+SELINUX_LIBS
EDITLINE_CFLAGS
EDITLINE_LIBS
systemdsystemunitdir
systemdutildir
+AIO_CFLAGS
+AIO_LIBS
READLINE_CFLAGS
READLINE_LIBS'
@@ -1831,8 +1838,6 @@ Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
- AIO_CFLAGS C compiler flags for AIO
- AIO_LIBS linker flags for AIO
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
@@ -1869,6 +1874,10 @@ Some influential environment variables:
UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config
UDEV_LIBS linker flags for UDEV, overriding pkg-config
PYTHON the Python interpreter
+ SELINUX_CFLAGS
+ C compiler flags for SELINUX, overriding pkg-config
+ SELINUX_LIBS
+ linker flags for SELINUX, overriding pkg-config
EDITLINE_CFLAGS
C compiler flags for EDITLINE, overriding pkg-config
EDITLINE_LIBS
@@ -1877,6 +1886,8 @@ Some influential environment variables:
value of systemdsystemunitdir for systemd, overriding pkg-config
systemdutildir
value of systemdutildir for systemd, overriding pkg-config
+ AIO_CFLAGS C compiler flags for AIO
+ AIO_LIBS linker flags for AIO
READLINE_CFLAGS
C compiler flags for readline
READLINE_LIBS
@@ -3707,12 +3718,12 @@ case "$host_os" in #(
# equivalent to -rdynamic
ELDFLAGS="-Wl,--export-dynamic"
+ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LIB_SUFFIX="so"
DEVMAPPER="yes"
- BUILD_LVMPOLLD="no"
ODIRECT="yes"
DM_IOCTLS="yes"
SELINUX="yes"
@@ -10917,14 +10928,6 @@ printf "%s\n" "#define INTEGRITY_INTERNAL 1" >>confdefs.h
as_fn_error $? "--with-integrity parameter invalid" "$LINENO" 5 ;;
esac
-################################################################################
-# Allow users to override default location for libaio
-# there seems to be no pkg-config support available
-AIO_CFLAGS=
-AIO_LIBS=${AIO_LIBS:--laio}
-
-
-
################################################################################
# Check whether --enable-readline was given.
if test ${enable_readline+y}
@@ -10986,7 +10989,10 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default run directory" >&5
printf %s "checking for default run directory... " >&6; }
RUN_DIR="/run"
-test -d "/run" || RUN_DIR="/var/run"
+if test ! -d "$RUN_DIR"
+then :
+ RUN_DIR="/var/run"
+fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUN_DIR" >&5
printf "%s\n" "$RUN_DIR" >&6; }
@@ -11037,15 +11043,13 @@ printf %s "checking whether to build cluster mirror log daemon... " >&6; }
# Check whether --enable-cmirrord was given.
if test ${enable_cmirrord+y}
then :
- enableval=$enable_cmirrord; CMIRRORD=$enableval
+ enableval=$enable_cmirrord; BUILD_CMIRRORD=$enableval
else $as_nop
- CMIRRORD="no"
+ BUILD_CMIRRORD="no"
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMIRRORD" >&5
-printf "%s\n" "$CMIRRORD" >&6; }
-
-BUILD_CMIRRORD=$CMIRRORD
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_CMIRRORD" >&5
+printf "%s\n" "$BUILD_CMIRRORD" >&6; }
################################################################################
if test "$BUILD_CMIRRORD" = "yes"
@@ -12010,12 +12014,11 @@ printf %s "checking whether to build lvmpolld... " >&6; }
# Check whether --enable-lvmpolld was given.
if test ${enable_lvmpolld+y}
then :
- enableval=$enable_lvmpolld; LVMPOLLD=$enableval
+ enableval=$enable_lvmpolld; BUILD_LVMPOLLD=$enableval
else $as_nop
- LVMPOLLD="no"
+ BUILD_LVMPOLLD="no"
fi
-test -n "$LVMPOLLD" && BUILD_LVMPOLLD=$LVMPOLLD
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_LVMPOLLD" >&5
printf "%s\n" "$BUILD_LVMPOLLD" >&6; }
@@ -12097,11 +12100,31 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$LIBSANLOCKCLIENT_PKG_ERRORS" >&5
- $bailout
+ as_fn_error $? "Package requirements (libsanlock_client >= 3.3.0) were not met:
+
+$LIBSANLOCKCLIENT_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBSANLOCKCLIENT_CFLAGS
+and LIBSANLOCKCLIENT_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- $bailout
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBSANLOCKCLIENT_CFLAGS
+and LIBSANLOCKCLIENT_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
LIBSANLOCKCLIENT_CFLAGS=$pkg_cv_LIBSANLOCKCLIENT_CFLAGS
LIBSANLOCKCLIENT_LIBS=$pkg_cv_LIBSANLOCKCLIENT_LIBS
@@ -12141,12 +12164,12 @@ if test -n "$LIBDLM_CFLAGS"; then
pkg_cv_LIBDLM_CFLAGS="$LIBDLM_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlm\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libdlm") 2>&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlm_lt\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdlm_lt") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBDLM_CFLAGS=`$PKG_CONFIG --cflags "libdlm" 2>/dev/null`
+ pkg_cv_LIBDLM_CFLAGS=`$PKG_CONFIG --cflags "libdlm_lt" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12158,12 +12181,12 @@ if test -n "$LIBDLM_LIBS"; then
pkg_cv_LIBDLM_LIBS="$LIBDLM_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlm\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libdlm") 2>&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlm_lt\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdlm_lt") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBDLM_LIBS=`$PKG_CONFIG --libs "libdlm" 2>/dev/null`
+ pkg_cv_LIBDLM_LIBS=`$PKG_CONFIG --libs "libdlm_lt" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12184,18 +12207,38 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- LIBDLM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdlm" 2>&1`
+ LIBDLM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdlm_lt" 2>&1`
else
- LIBDLM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdlm" 2>&1`
+ LIBDLM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdlm_lt" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBDLM_PKG_ERRORS" >&5
- $bailout
+ as_fn_error $? "Package requirements (libdlm_lt) were not met:
+
+$LIBDLM_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBDLM_CFLAGS
+and LIBDLM_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- $bailout
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBDLM_CFLAGS
+and LIBDLM_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
LIBDLM_CFLAGS=$pkg_cv_LIBDLM_CFLAGS
LIBDLM_LIBS=$pkg_cv_LIBDLM_LIBS
@@ -12206,6 +12249,15 @@ fi
printf "%s\n" "#define LOCKDDLM_SUPPORT 1" >>confdefs.h
+ case "$LIBDLM_LIBS" in #(
+ *lpthread*) :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: replacing pkg-config --libs libdlm_lt \"$LIBDLM_LIBS\" with... -ldlm_lt" >&5
+printf "%s\n" "replacing pkg-config --libs libdlm_lt \"$LIBDLM_LIBS\" with... -ldlm_lt" >&6; }
+ LIBDLM_LIBS="${LIBDLM_LIBS%%ldlm*}ldlm_lt" ;; #(
+ *) :
+ ;;
+esac
fi
@@ -12285,11 +12337,31 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$LIBDLMCONTROL_PKG_ERRORS" >&5
- $bailout
+ as_fn_error $? "Package requirements (libdlmcontrol >= 3.2) were not met:
+
+$LIBDLMCONTROL_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBDLMCONTROL_CFLAGS
+and LIBDLMCONTROL_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- $bailout
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBDLMCONTROL_CFLAGS
+and LIBDLMCONTROL_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
LIBDLMCONTROL_CFLAGS=$pkg_cv_LIBDLMCONTROL_CFLAGS
LIBDLMCONTROL_LIBS=$pkg_cv_LIBDLMCONTROL_LIBS
@@ -12386,11 +12458,31 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$LIBSEAGATEILM_PKG_ERRORS" >&5
- $bailout
+ as_fn_error $? "Package requirements (libseagate_ilm >= 0.1.0) were not met:
+
+$LIBSEAGATEILM_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBSEAGATEILM_CFLAGS
+and LIBSEAGATEILM_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- $bailout
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBSEAGATEILM_CFLAGS
+and LIBSEAGATEILM_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
LIBSEAGATEILM_CFLAGS=$pkg_cv_LIBSEAGATEILM_CFLAGS
LIBSEAGATEILM_LIBS=$pkg_cv_LIBSEAGATEILM_LIBS
@@ -12401,6 +12493,10 @@ fi
printf "%s\n" "#define LOCKDIDM_SUPPORT 1" >>confdefs.h
+ if test -z "$LIBSEAGATEILM_LIBS"
+then :
+ LIBSEAGATEILM_LIBS="-lseagate_ilm"
+fi
else
$bailout
@@ -12736,11 +12832,31 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$LIBSYSTEMD_PKG_ERRORS" >&5
- $bailout
+ as_fn_error $? "Package requirements (libsystemd) were not met:
+
+$LIBSYSTEMD_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBSYSTEMD_CFLAGS
+and LIBSYSTEMD_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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- $bailout
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBSYSTEMD_CFLAGS
+and LIBSYSTEMD_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
LIBSYSTEMD_CFLAGS=$pkg_cv_LIBSYSTEMD_CFLAGS
LIBSYSTEMD_LIBS=$pkg_cv_LIBSYSTEMD_LIBS
@@ -13054,6 +13170,7 @@ then :
BLKID_WIPING="yes"
BLKID_PC="blkid"
DEFAULT_USE_BLKID_WIPING=1
+ BLKID_STATIC_LIBS=$("$PKG_CONFIG" --static --libs blkid)
printf "%s\n" "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h
@@ -13190,6 +13307,7 @@ else
printf "%s\n" "yes" >&6; }
UDEV_PC="libudev"
fi
+ UDEV_STATIC_LIBS=$("$PKG_CONFIG" --static --libs libudev)
printf "%s\n" "#define UDEV_SYNC_SUPPORT 1" >>confdefs.h
@@ -14367,9 +14485,108 @@ then :
printf "%s\n" "#define HAVE_SEPOL 1" >>confdefs.h
- SELINUX_LIBS="-lsepol"
+ SEPOL_LIBS="-lsepol"
+fi
+
+
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libselinux") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SELINUX" >&5
+printf %s "checking for SELINUX... " >&6; }
+
+if test -n "$SELINUX_CFLAGS"; then
+ pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libselinux") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SELINUX_CFLAGS=`$PKG_CONFIG --cflags "libselinux" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$SELINUX_LIBS"; then
+ pkg_cv_SELINUX_LIBS="$SELINUX_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libselinux\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libselinux") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_SELINUX_LIBS=`$PKG_CONFIG --libs "libselinux" 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "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
+ SELINUX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libselinux" 2>&1`
+ else
+ SELINUX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libselinux" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$SELINUX_PKG_ERRORS" >&5
+ as_fn_error $? "Package requirements (libselinux) were not met:
+
+$SELINUX_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables SELINUX_CFLAGS
+and SELINUX_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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables SELINUX_CFLAGS
+and SELINUX_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
+ SELINUX_CFLAGS=$pkg_cv_SELINUX_CFLAGS
+ SELINUX_LIBS=$pkg_cv_SELINUX_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ SELINUX_STATIC_LIBS=$("$PKG_CONFIG" --static --libs libselinux)
+fi
+fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
@@ -14431,7 +14648,8 @@ fi
printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
+ SELINUX_LIBS=${SELINUX_LIBS:--lselinux}
+ SELINUX_STATIC_LIBS=${SELINUX_STATIC_LIBS:-$SELINUX_LIBS $SEPOL_LIBS}
SELINUX_PC="libselinux"
HAVE_SELINUX=yes
else $as_nop
@@ -14439,6 +14657,7 @@ else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling selinux" >&5
printf "%s\n" "$as_me: WARNING: Disabling selinux" >&2;}
SELINUX_LIBS=
+ SELINUX_STATIC_LIBS=
SELINUX_PC=
HAVE_SELINUX=no
fi
@@ -15724,9 +15943,6 @@ printf "%s\n" "#define LVRESIZE_FS_HELPER_PATH \"$LVRESIZE_FS_HELPER_PATH\"" >>c
################################################################################
-if test "$BUILD_DMEVENTD" = "yes"
-then :
-
# Check whether --with-dmeventd-pidfile was given.
if test ${with_dmeventd_pidfile+y}
@@ -15737,15 +15953,6 @@ else $as_nop
fi
-printf "%s\n" "#define DMEVENTD_PIDFILE \"$DMEVENTD_PIDFILE\"" >>confdefs.h
-
-
-fi
-
-if test "$BUILD_DMEVENTD" = "yes"
-then :
-
-
# Check whether --with-dmeventd-path was given.
if test ${with_dmeventd_path+y}
then :
@@ -15755,6 +15962,13 @@ else $as_nop
fi
+if test "$BUILD_DMEVENTD" = "yes"
+then :
+
+
+printf "%s\n" "#define DMEVENTD_PIDFILE \"$DMEVENTD_PIDFILE\"" >>confdefs.h
+
+
printf "%s\n" "#define DMEVENTD_PATH \"$DMEVENTD_PATH\"" >>confdefs.h
@@ -15860,7 +16074,10 @@ else $as_nop
interface="ioctl"
fi
-test "$interface" != "ioctl" && as_fn_error $? "--with-interface=ioctl required. fs no longer supported." "$LINENO" 5
+if test "$interface" != "ioctl"
+then :
+ as_fn_error $? "--with-interface=ioctl required. fs no longer supported." "$LINENO" 5
+fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $interface" >&5
printf "%s\n" "$interface" >&6; }
@@ -15870,7 +16087,7 @@ read DM_LIB_VERSION < "$srcdir"/VERSION_DM 2>/dev/null || DM_LIB_VERSION="Unknow
printf "%s\n" "#define DM_LIB_VERSION \"$DM_LIB_VERSION\"" >>confdefs.h
-DM_LIB_PATCHLEVEL=$(cat "$srcdir"/VERSION_DM | $AWK -F '[-. ]' '{printf "%s.%s.%s",$1,$2,$3}')
+DM_LIB_PATCHLEVEL=$($AWK -F '[-. ]' '{printf "%s.%s.%s",$1,$2,$3}' "$srcdir"/VERSION_DM)
read VER < "$srcdir"/VERSION 2>/dev/null || VER=Unknown
@@ -15888,6 +16105,14 @@ LVM_LIBAPI=$(echo "$VER" | $AWK -F '[()]' '{print $2}')
printf "%s\n" "#define LVM_CONFIGURE_LINE \"$CONFIGURE_LINE\"" >>confdefs.h
+################################################################################
+# Allow users to override default location for libaio
+# there seems to be no pkg-config support available
+AIO_CFLAGS=${AIO_CFLAGS:-}
+AIO_LIBS=${AIO_LIBS:--laio}
+
+
+
@@ -16018,6 +16243,11 @@ printf "%s\n" "#define LVM_CONFIGURE_LINE \"$CONFIGURE_LINE\"" >>confdefs.h
+
+
+
+
+
diff --git a/make.tmpl.in b/make.tmpl.in
index 6025c166c..20f8a5245 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -65,6 +65,7 @@ DEFS += @DEFS@
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
CPPFLAGS ?= @CPPFLAGS@
LDFLAGS ?= @LDFLAGS@
+STATIC_LDFLAGS += @STATIC_LDFLAGS@
CLDFLAGS += @CLDFLAGS@
ELDFLAGS += @ELDFLAGS@
LDDEPS += @LDDEPS@
7 months, 1 week
main - WHATS_NEW: updates
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=551d27a327bdf504306...
Commit: 551d27a327bdf504306ae047adb765100a81103d
Parent: c8868041d871a35c132c1d31af9c7e6342fab51c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Feb 23 16:42:45 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 23 16:46:35 2023 +0100
WHATS_NEW: updates
---
WHATS_NEW | 2 ++
1 file changed, 2 insertions(+)
diff --git a/WHATS_NEW b/WHATS_NEW
index 4a7c3307a..8523b5eb7 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
version 2.03.20 -
====================================
+ Configure now fails when requested lvmlockd dependencies are missing.
+ Add some configure Gentoo enhancements for static builds.
version 2.03.19 - 21st February 2023
====================================
7 months, 1 week
main - configure.ac: use pkg-config to detect static libs
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c8868041d871a35c132...
Commit: c8868041d871a35c132c1d31af9c7e6342fab51c
Parent: 2b7fa40aacfe3765ea14c476789de4bf7bd5efe6
Author: Robin H. Johnson <robbat2(a)gentoo.org>
AuthorDate: Sun May 9 11:00:22 2021 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 23 16:46:35 2023 +0100
configure.ac: use pkg-config to detect static libs
Add some Gentoo based patches for better support of static linking.
This are not tested nor supported by upstream developers.
Usage requires presence of several libraries in their static form
which is however not commonly available.
Selinux modified by zkabelac to still work on older sofrware which
did not provided libselinux.pc at a time - see keep the old check
present and use pkg-config only when possible.
---
configure.ac | 15 +++++++++++++--
libdm/make.tmpl.in | 5 ++++-
make.tmpl.in | 5 ++++-
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index ec36f10ab..eed25d4db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1134,6 +1134,7 @@ AS_IF([test "$BLKID_WIPING" != "no"], [
BLKID_WIPING="yes"
BLKID_PC="blkid"
DEFAULT_USE_BLKID_WIPING=1
+ BLKID_STATIC_LIBS=$("$PKG_CONFIG" --static --libs blkid)
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
], [
AS_IF([test "$BLKID_WIPING" = "maybe"], [
@@ -1159,6 +1160,7 @@ AC_MSG_RESULT([$UDEV_SYNC])
AS_IF([test "$UDEV_SYNC" = "yes"], [
PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
+ UDEV_STATIC_LIBS=$("$PKG_CONFIG" --static --libs libudev)
AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1,
@@ -1376,17 +1378,23 @@ dnl -- Check for selinux
AS_IF([test "$SELINUX" = "yes"], [
AC_CHECK_LIB([sepol], [sepol_check_context], [
AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
- SELINUX_LIBS="-lsepol"])
+ SEPOL_LIBS="-lsepol"])
+
+ PKG_CHECK_EXISTS([libselinux],
+ [PKG_CHECK_MODULES([SELINUX], [libselinux],
+ [SELINUX_STATIC_LIBS=$("$PKG_CONFIG" --static --libs libselinux)])])
AC_CHECK_LIB([selinux], [is_selinux_enabled], [
AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
AC_CHECK_HEADERS([selinux/label.h])
AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
+ SELINUX_LIBS=${SELINUX_LIBS:--lselinux}
+ SELINUX_STATIC_LIBS=${SELINUX_STATIC_LIBS:-$SELINUX_LIBS $SEPOL_LIBS}
SELINUX_PC="libselinux"
HAVE_SELINUX=yes ], [
AC_MSG_WARN(Disabling selinux)
SELINUX_LIBS=
+ SELINUX_STATIC_LIBS=
SELINUX_PC=
HAVE_SELINUX=no ])
])
@@ -1792,6 +1800,7 @@ AC_ARG_VAR([READLINE_LIBS], [linker flags for readline])
AC_SUBST(AWK)
AC_SUBST(BLKDEACTIVATE)
AC_SUBST(BLKID_PC)
+AC_SUBST(BLKID_STATIC_LIBS)
AC_SUBST(BUILD_CMIRRORD)
AC_SUBST(BUILD_DMEVENTD)
AC_SUBST(BUILD_DMFILEMAPD)
@@ -1882,6 +1891,7 @@ AC_SUBST(RT_LIBS)
AC_SUBST(SBINDIR)
AC_SUBST(SELINUX_LIBS)
AC_SUBST(SELINUX_PC)
+AC_SUBST(SELINUX_STATIC_LIBS)
AC_SUBST(SILENT_RULES)
AC_SUBST(SNAPSHOTS)
AC_SUBST(STATICDIR)
@@ -1899,6 +1909,7 @@ AC_SUBST(UDEV_HAS_BUILTIN_BLKID)
AC_SUBST(UDEV_PC)
AC_SUBST(UDEV_RULES)
AC_SUBST(UDEV_RULE_EXEC_DETECTION)
+AC_SUBST(UDEV_STATIC_LIBS)
AC_SUBST(UDEV_SYNC)
AC_SUBST(USE_TRACKING)
AC_SUBST(USRSBINDIR)
diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in
index 3d032f1b0..cc28e73cb 100644
--- a/libdm/make.tmpl.in
+++ b/libdm/make.tmpl.in
@@ -54,7 +54,7 @@ RM = rm -f
LIBS += @LIBS@ $(PTHREAD_LIBS) $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS)
# Extra libraries always linked with static binaries
-STATIC_LIBS = $(PTHREAD_LIBS)
+STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(RT_LIBS) $(M_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
@@ -72,10 +72,13 @@ PTHREAD_LIBS = @PTHREAD_LIBS@
READLINE_LIBS = @READLINE_LIBS@
EDITLINE_LIBS = @EDITLINE_LIBS@
SELINUX_LIBS = @SELINUX_LIBS@
+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@
+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
BLKID_CFLAGS = @BLKID_CFLAGS@
BLKID_LIBS = @BLKID_LIBS@
+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
diff --git a/make.tmpl.in b/make.tmpl.in
index df4c5850d..6025c166c 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -59,7 +59,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile
LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS)
LVMLIBS = $(DMEVENT_LIBS) $(READLINE_LIBS) $(EDITLINE_LIBS) $(LIBSYSTEMD_LIBS) $(BLKID_LIBS) $(AIO_LIBS) $(LIBS)
# Extra libraries always linked with static binaries
-STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
+STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
@@ -78,6 +78,7 @@ AIO_CFLAGS = @AIO_CFLAGS@
AIO_LIBS = @AIO_LIBS@
BLKID_CFLAGS = @BLKID_CFLAGS@
BLKID_LIBS = @BLKID_LIBS@
+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
CPG_CFLAGS = @CPG_CFLAGS@
CPG_LIBS = @CPG_LIBS@
EDITLINE_CFLAGS = @EDITLINE_CFLAGS@
@@ -96,8 +97,10 @@ PTHREAD_LIBS = @PTHREAD_LIBS@
READLINE_CFLAGS = @READLINE_CFLAGS@
READLINE_LIBS = @READLINE_LIBS@
SELINUX_LIBS = @SELINUX_LIBS@
+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@
+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
7 months, 1 week
main - configure.ac: add STATIC_LDFLAGS
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2b7fa40aacfe3765ea1...
Commit: 2b7fa40aacfe3765ea14c476789de4bf7bd5efe6
Parent: 2b592a67d69bc22ec32929052320731abd8aad61
Author: David Seifert <soap(a)gentoo.org>
AuthorDate: Wed Feb 22 14:41:08 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 23 16:46:35 2023 +0100
configure.ac: add STATIC_LDFLAGS
Add support for specif STATIC_LDFLAGS when linking static binaries.
---
configure.ac | 2 ++
daemons/dmeventd/Makefile.in | 2 +-
libdm/dm-tools/Makefile.in | 4 ++--
libdm/make.tmpl.in | 1 +
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index cee24c93c..ec36f10ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AS_CASE(["$host_os"],
[linux*], [
# equivalent to -rdynamic
ELDFLAGS="-Wl,--export-dynamic"
+ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
@@ -1884,6 +1885,7 @@ AC_SUBST(SELINUX_PC)
AC_SUBST(SILENT_RULES)
AC_SUBST(SNAPSHOTS)
AC_SUBST(STATICDIR)
+AC_SUBST(STATIC_LDFLAGS)
AC_SUBST(STATIC_LINK)
AC_SUBST(SYSCONFDIR)
AC_SUBST(SYSTEMD_RUN_CMD)
diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in
index af51198aa..f7896e581 100644
--- a/daemons/dmeventd/Makefile.in
+++ b/daemons/dmeventd/Makefile.in
@@ -76,7 +76,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o
dmeventd.static: $(LIB_STATIC) dmeventd.o
@echo " [CC] $@"
- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static dmeventd.o \
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static dmeventd.o \
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
ifeq ("@PKGCONFIG@", "yes")
diff --git a/libdm/dm-tools/Makefile.in b/libdm/dm-tools/Makefile.in
index 9ddb3c261..78d2d719d 100644
--- a/libdm/dm-tools/Makefile.in
+++ b/libdm/dm-tools/Makefile.in
@@ -63,7 +63,7 @@ dmsetup: dmsetup.o $(LIBDM_SHARED)
dmsetup.static: dmsetup.o $(LIBDM_STATIC)
@echo " [CC] $@"
- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static \
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static \
-o $@ $< $(LIBDM_LIBS) $(LIBS) $(STATIC_LIBS)
install_dmsetup_dynamic: dmsetup
@@ -84,7 +84,7 @@ dmfilemapd: dmfilemapd.o $(LIBDM_SHARED)
dmfilemapd.static: dmfilemapd.o $(LIBDM_STATIC)
@echo " [CC] $@"
- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static \
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static \
-o $@ $< $(LIBDM_LIBS) $(LIBS) $(STATIC_LIBS)
install_dmfilemapd_dynamic: dmfilemapd
diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in
index a731687c2..3d032f1b0 100644
--- a/libdm/make.tmpl.in
+++ b/libdm/make.tmpl.in
@@ -59,6 +59,7 @@ DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
LDFLAGS ?= @LDFLAGS@
+STATIC_LDFLAGS += @STATIC_LDFLAGS@
CPPFLAGS ?= @CPPFLAGS@
CLDFLAGS += @CLDFLAGS@
ELDFLAGS += @ELDFLAGS@
7 months, 1 week
main - configure.ac: misc
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2b592a67d69bc22ec32...
Commit: 2b592a67d69bc22ec32929052320731abd8aad61
Parent: 255e8c8eaa0ca76de9ce8da0ebc78e8e0c9a4482
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 22 14:11:50 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 23 16:46:35 2023 +0100
configure.ac: misc
---
configure.ac | 122 +++++++++++++++++++++++++++++------------------------------
1 file changed, 59 insertions(+), 63 deletions(-)
diff --git a/configure.ac b/configure.ac
index 71006d895..cee24c93c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,6 @@ AS_CASE(["$host_os"],
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LIB_SUFFIX="so"
DEVMAPPER="yes"
- BUILD_LVMPOLLD="no"
ODIRECT="yes"
DM_IOCTLS="yes"
SELINUX="yes"
@@ -671,14 +670,6 @@ AS_CASE(["$INTEGRITY"],
AC_DEFINE([INTEGRITY_INTERNAL], 1, [Define to 1 to include built-in support for integrity.])],
[AC_MSG_ERROR([--with-integrity parameter invalid])])
-################################################################################
-# Allow users to override default location for libaio
-# there seems to be no pkg-config support available
-AIO_CFLAGS=
-AIO_LIBS=${AIO_LIBS:--laio}
-AC_ARG_VAR([AIO_CFLAGS], [C compiler flags for AIO])
-AC_ARG_VAR([AIO_LIBS], [linker flags for AIO])
-
################################################################################
dnl -- Disable readline
AC_ARG_ENABLE([readline],
@@ -715,7 +706,7 @@ AC_ARG_WITH(ocfdir,
################################################################################
AC_MSG_CHECKING([for default run directory])
RUN_DIR="/run"
-test -d "/run" || RUN_DIR="/var/run"
+AS_IF([test ! -d "$RUN_DIR"], [RUN_DIR="/var/run"])
AC_MSG_RESULT([$RUN_DIR])
dnl -- Set up pidfile and run directory
AH_TEMPLATE(DEFAULT_PID_DIR)
@@ -748,10 +739,8 @@ AC_MSG_CHECKING([whether to build cluster mirror log daemon])
AC_ARG_ENABLE(cmirrord,
AS_HELP_STRING([--enable-cmirrord],
[enable the cluster mirror log daemon]),
- CMIRRORD=$enableval, CMIRRORD="no")
-AC_MSG_RESULT([$CMIRRORD])
-
-BUILD_CMIRRORD=$CMIRRORD
+ BUILD_CMIRRORD=$enableval, BUILD_CMIRRORD="no")
+AC_MSG_RESULT([$BUILD_CMIRRORD])
################################################################################
dnl -- cmirrord pidfile
@@ -896,8 +885,7 @@ AC_MSG_CHECKING([whether to build lvmpolld])
AC_ARG_ENABLE(lvmpolld,
AS_HELP_STRING([--enable-lvmpolld],
[enable the LVM Polling Daemon]),
- LVMPOLLD=$enableval, LVMPOLLD="no")
-test -n "$LVMPOLLD" && BUILD_LVMPOLLD=$LVMPOLLD
+ BUILD_LVMPOLLD=$enableval, BUILD_LVMPOLLD="no")
AC_MSG_RESULT([$BUILD_LVMPOLLD])
################################################################################
@@ -1686,22 +1674,20 @@ AC_DEFINE_UNQUOTED(LVRESIZE_FS_HELPER_PATH, ["$LVRESIZE_FS_HELPER_PATH"], [Path
################################################################################
dnl -- dmeventd pidfile and executable path
+AC_ARG_WITH(dmeventd-pidfile,
+ AS_HELP_STRING([--with-dmeventd-pidfile=PATH],
+ [dmeventd pidfile [PID_DIR/dmeventd.pid]]),
+ DMEVENTD_PIDFILE=$withval,
+ DMEVENTD_PIDFILE="$DEFAULT_PID_DIR/dmeventd.pid")
+AC_ARG_WITH(dmeventd-path,
+ AS_HELP_STRING([--with-dmeventd-path=PATH],
+ [dmeventd path [EPREFIX/sbin/dmeventd]]),
+ DMEVENTD_PATH=$withval,
+ DMEVENTD_PATH="$SBINDIR/dmeventd")
+
AS_IF([test "$BUILD_DMEVENTD" = "yes"], [
- AC_ARG_WITH(dmeventd-pidfile,
- AS_HELP_STRING([--with-dmeventd-pidfile=PATH],
- [dmeventd pidfile [PID_DIR/dmeventd.pid]]),
- DMEVENTD_PIDFILE=$withval,
- DMEVENTD_PIDFILE="$DEFAULT_PID_DIR/dmeventd.pid")
AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE, ["$DMEVENTD_PIDFILE"],
[Path to dmeventd pidfile.])
-])
-
-AS_IF([test "$BUILD_DMEVENTD" = "yes"], [
- AC_ARG_WITH(dmeventd-path,
- AS_HELP_STRING([--with-dmeventd-path=PATH],
- [dmeventd path [EPREFIX/sbin/dmeventd]]),
- DMEVENTD_PATH=$withval,
- DMEVENTD_PATH="$SBINDIR/dmeventd")
AC_DEFINE_UNQUOTED(DMEVENTD_PATH, ["$DMEVENTD_PATH"],
[Path to dmeventd binary.])
])
@@ -1766,14 +1752,15 @@ AC_ARG_WITH(interface,
AS_HELP_STRING([--with-interface=IFACE],
[choose kernel interface (ioctl) [ioctl]]),
interface=$withval, interface="ioctl")
-test "$interface" != "ioctl" && AC_MSG_ERROR([--with-interface=ioctl required. fs no longer supported.])
+AS_IF([test "$interface" != "ioctl"],
+ [AC_MSG_ERROR([--with-interface=ioctl required. fs no longer supported.])])
AC_MSG_RESULT([$interface])
################################################################################
read DM_LIB_VERSION < "$srcdir"/VERSION_DM 2>/dev/null || DM_LIB_VERSION="Unknown"
AC_DEFINE_UNQUOTED(DM_LIB_VERSION, "$DM_LIB_VERSION", [Library version])
-DM_LIB_PATCHLEVEL=$(cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}')
+DM_LIB_PATCHLEVEL=$($AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}' "$srcdir"/VERSION_DM)
read VER < "$srcdir"/VERSION 2>/dev/null || VER=Unknown
@@ -1789,23 +1776,36 @@ LVM_LIBAPI=$(echo "$VER" | $AWK -F '[[()]]' '{print $2}')
AC_DEFINE_UNQUOTED(LVM_CONFIGURE_LINE, "$CONFIGURE_LINE", [configure command line used])
+################################################################################
+# Allow users to override default location for libaio
+# there seems to be no pkg-config support available
+AIO_CFLAGS=${AIO_CFLAGS:-}
+AIO_LIBS=${AIO_LIBS:--laio}
+AC_ARG_VAR([AIO_CFLAGS], [C compiler flags for AIO])
+AC_ARG_VAR([AIO_LIBS], [linker flags for AIO])
+
AC_ARG_VAR([READLINE_CFLAGS], [C compiler flags for readline])
AC_ARG_VAR([READLINE_LIBS], [linker flags for readline])
################################################################################
AC_SUBST(AWK)
+AC_SUBST(BLKDEACTIVATE)
AC_SUBST(BLKID_PC)
AC_SUBST(BUILD_CMIRRORD)
AC_SUBST(BUILD_DMEVENTD)
-AC_SUBST(BUILD_LVMDBUSD)
-AC_SUBST(BUILD_LVMPOLLD)
-AC_SUBST(BUILD_LVMLOCKD)
-AC_SUBST(BUILD_LOCKDSANLOCK)
+AC_SUBST(BUILD_DMFILEMAPD)
AC_SUBST(BUILD_LOCKDDLM)
AC_SUBST(BUILD_LOCKDDLM_CONTROL)
AC_SUBST(BUILD_LOCKDIDM)
-AC_SUBST(BUILD_DMFILEMAPD)
+AC_SUBST(BUILD_LOCKDSANLOCK)
+AC_SUBST(BUILD_LVMDBUSD)
+AC_SUBST(BUILD_LVMLOCKD)
+AC_SUBST(BUILD_LVMPOLLD)
AC_SUBST(CACHE)
+AC_SUBST(CACHE_CHECK_CMD)
+AC_SUBST(CACHE_DUMP_CMD)
+AC_SUBST(CACHE_REPAIR_CMD)
+AC_SUBST(CACHE_RESTORE_CMD)
AC_SUBST(CFLAGS)
AC_SUBST(CFLOW_CMD)
AC_SUBST(CHMOD)
@@ -1813,8 +1813,10 @@ AC_SUBST(CLDFLAGS)
AC_SUBST(CLDNOWHOLEARCHIVE)
AC_SUBST(CLDWHOLEARCHIVE)
AC_SUBST(CMDLIB)
+AC_SUBST(CMIRRORD_PIDFILE)
AC_SUBST(CONFDIR)
AC_SUBST(COPTIMISE_FLAG)
+AC_SUBST(CPPFLAGS)
AC_SUBST(CSCOPE_CMD)
AC_SUBST(DEBUG)
AC_SUBST(DEFAULT_ARCHIVE_SUBDIR)
@@ -1832,24 +1834,27 @@ AC_SUBST(DEFAULT_SYS_DIR)
AC_SUBST(DEFAULT_SYS_LOCK_DIR)
AC_SUBST(DEFAULT_USE_BLKID_WIPING)
AC_SUBST(DEFAULT_USE_DEVICES_FILE)
-AC_SUBST(DEFAULT_USE_LVMPOLLD)
AC_SUBST(DEFAULT_USE_LVMLOCKD)
+AC_SUBST(DEFAULT_USE_LVMPOLLD)
AC_SUBST(DEVMAPPER)
AC_SUBST(DL_LIBS)
AC_SUBST(DMEVENTD_PATH)
+AC_SUBST(DMEVENTD_PIDFILE)
AC_SUBST(DM_LIB_PATCHLEVEL)
AC_SUBST(ELDFLAGS)
AC_SUBST(FSADM)
AC_SUBST(FSADM_PATH)
-AC_SUBST(LVRESIZE_FS_HELPER_PATH)
-AC_SUBST(BLKDEACTIVATE)
AC_SUBST(INTEGRITY)
AC_SUBST(INTL)
AC_SUBST(JOBS)
AC_SUBST(LDDEPS)
AC_SUBST(LIBS)
AC_SUBST(LIB_SUFFIX)
-AC_SUBST(LVM_VERSION)
+AC_SUBST(localedir)
+AC_SUBST(LVMIMPORTVDO)
+AC_SUBST(LVMIMPORTVDO_PATH)
+AC_SUBST(LVMLOCKD_PIDFILE)
+AC_SUBST(LVMPOLLD_PIDFILE)
AC_SUBST(LVM_LIBAPI)
AC_SUBST(LVM_MAJOR)
AC_SUBST(LVM_MINOR)
@@ -1857,48 +1862,43 @@ AC_SUBST(LVM_PATCHLEVEL)
AC_SUBST(LVM_PATH)
AC_SUBST(LVM_RELEASE)
AC_SUBST(LVM_RELEASE_DATE)
-AC_SUBST(LVMIMPORTVDO)
-AC_SUBST(LVMIMPORTVDO_PATH)
-AC_SUBST(localedir)
+AC_SUBST(LVM_VERSION)
+AC_SUBST(LVRESIZE_FS_HELPER_PATH)
AC_SUBST(MANGLING)
AC_SUBST(MIRRORS)
AC_SUBST(MSGFMT)
+AC_SUBST(M_LIBS)
AC_SUBST(OCF)
AC_SUBST(OCFDIR)
AC_SUBST(ODIRECT)
AC_SUBST(PKGCONFIG)
-AC_SUBST(M_LIBS)
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PYTHON2)
-AC_SUBST(PYTHON3)
AC_SUBST(PYTHON2DIR)
+AC_SUBST(PYTHON3)
AC_SUBST(PYTHON3DIR)
AC_SUBST(RT_LIBS)
AC_SUBST(SBINDIR)
AC_SUBST(SELINUX_LIBS)
AC_SUBST(SELINUX_PC)
-AC_SUBST(SYSCONFDIR)
-AC_SUBST(SYSTEMD_RUN_CMD)
+AC_SUBST(SILENT_RULES)
AC_SUBST(SNAPSHOTS)
AC_SUBST(STATICDIR)
AC_SUBST(STATIC_LINK)
+AC_SUBST(SYSCONFDIR)
+AC_SUBST(SYSTEMD_RUN_CMD)
AC_SUBST(TESTSUITE_DATA)
AC_SUBST(THIN)
AC_SUBST(THIN_CHECK_CMD)
AC_SUBST(THIN_DUMP_CMD)
AC_SUBST(THIN_REPAIR_CMD)
AC_SUBST(THIN_RESTORE_CMD)
-AC_SUBST(CACHE_CHECK_CMD)
-AC_SUBST(CACHE_DUMP_CMD)
-AC_SUBST(CACHE_REPAIR_CMD)
-AC_SUBST(CACHE_RESTORE_CMD)
+AC_SUBST(UDEV_HAS_BUILTIN_BLKID)
AC_SUBST(UDEV_PC)
AC_SUBST(UDEV_RULES)
-AC_SUBST(UDEV_SYNC)
AC_SUBST(UDEV_RULE_EXEC_DETECTION)
-AC_SUBST(UDEV_HAS_BUILTIN_BLKID)
+AC_SUBST(UDEV_SYNC)
AC_SUBST(USE_TRACKING)
-AC_SUBST(SILENT_RULES)
AC_SUBST(USRSBINDIR)
AC_SUBST(VALGRIND_POOL)
AC_SUBST(VDO)
@@ -1907,23 +1907,19 @@ AC_SUBST(VDO_INCLUDE)
AC_SUBST(VDO_LIB)
AC_SUBST(WRITECACHE)
AC_SUBST(WRITE_INSTALL)
-AC_SUBST(DMEVENTD_PIDFILE)
-AC_SUBST(LVMPOLLD_PIDFILE)
-AC_SUBST(LVMLOCKD_PIDFILE)
-AC_SUBST(CMIRRORD_PIDFILE)
AC_SUBST(interface)
AC_SUBST(kerneldir)
-AC_SUBST(missingkernel)
AC_SUBST(kernelvsn)
-AC_SUBST(tmpdir)
-AC_SUBST(udev_prefix)
-AC_SUBST(udevdir)
+AC_SUBST(libexecdir)
+AC_SUBST(missingkernel)
AC_SUBST(systemdsystemunitdir)
AC_SUBST(systemdutildir)
+AC_SUBST(tmpdir)
AC_SUBST(tmpfilesdir)
+AC_SUBST(udevdir)
+AC_SUBST(udev_prefix)
AC_SUBST(usrlibdir)
AC_SUBST(usrsbindir)
-AC_SUBST(libexecdir)
################################################################################
dnl -- First and last lines should not contain files to generate in order to
7 months, 1 week
main - configure.ac: fail configure for missing libraries
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=255e8c8eaa0ca76de9c...
Commit: 255e8c8eaa0ca76de9ce8da0ebc78e8e0c9a4482
Parent: ad66600e480d49c22372231c0a56ea3bf5a9b842
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 20 23:57:56 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 23 16:46:35 2023 +0100
configure.ac: fail configure for missing libraries
When user enables lockd libraris, code needs to fail, when then are
missing. Also when notify-dbus support if enabled, and libsystemd is
missing, abort configuration.
---
configure.ac | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 06184be62..71006d895 100644
--- a/configure.ac
+++ b/configure.ac
@@ -913,7 +913,7 @@ AC_MSG_RESULT([$BUILD_LOCKDSANLOCK])
dnl -- Look for sanlock libraries
AS_IF([test "$BUILD_LOCKDSANLOCK" = "yes"], [
- PKG_CHECK_MODULES(LIBSANLOCKCLIENT, libsanlock_client >= 3.3.0, [BUILD_LVMLOCKD="yes"], $bailout)
+ PKG_CHECK_MODULES(LIBSANLOCKCLIENT, libsanlock_client >= 3.3.0, [BUILD_LVMLOCKD="yes"])
AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
])
@@ -928,7 +928,7 @@ AC_MSG_RESULT([$BUILD_LOCKDDLM])
dnl -- Look for dlm libraries
AS_IF([test "$BUILD_LOCKDDLM" = "yes"], [
- PKG_CHECK_MODULES(LIBDLM, libdlm_lt, [BUILD_LVMLOCKD="yes"], $bailout)
+ PKG_CHECK_MODULES(LIBDLM, libdlm_lt, [BUILD_LVMLOCKD="yes"])
AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
AS_CASE(["$LIBDLM_LIBS"],
[*lpthread*], [
@@ -948,7 +948,7 @@ AC_MSG_RESULT([$BUILD_LOCKDDLM_CONTROL])
dnl -- Look for libdlmcontrol libraries
AS_IF([test "$BUILD_LOCKDDLM_CONTROL" = "yes"], [
- PKG_CHECK_MODULES(LIBDLMCONTROL, [libdlmcontrol >= 3.2], [BUILD_LVMLOCKD="yes"], $bailout)
+ PKG_CHECK_MODULES(LIBDLMCONTROL, [libdlmcontrol >= 3.2], [BUILD_LVMLOCKD="yes"])
AC_DEFINE([LOCKDDLM_CONTROL_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm control option.])
])
@@ -964,7 +964,7 @@ AC_MSG_RESULT([$BUILD_LOCKDIDM])
dnl -- Look for Seagate IDM libraries
AS_IF([test "$BUILD_LOCKDIDM" = "yes"], [
PKG_CHECK_EXISTS(blkid >= 2.24, [
- PKG_CHECK_MODULES(LIBSEAGATEILM, [libseagate_ilm >= 0.1.0], [BUILD_LVMLOCKD="yes"], $bailout)
+ PKG_CHECK_MODULES(LIBSEAGATEILM, [libseagate_ilm >= 0.1.0], [BUILD_LVMLOCKD="yes"])
AC_DEFINE([LOCKDIDM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd IDM option.])
AS_IF([test -z "$LIBSEAGATEILM_LIBS"], [LIBSEAGATEILM_LIBS="-lseagate_ilm"])
], $bailout)
@@ -1093,7 +1093,7 @@ AS_IF([test "$APP_MACHINEID_SUPPORT" = "yes"],
dnl -- Look for libsystemd libraries if needed
AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes" || test "$SYSTEMD_JOURNAL_SUPPORT" = "yes" || test "$APP_MACHINEID_SUPPORT" = "yes"], [
- PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd], [], $bailout)
+ PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd])
])
################################################################################
7 months, 1 week
main - configure.ac: update dlm check
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ad66600e480d49c2237...
Commit: ad66600e480d49c22372231c0a56ea3bf5a9b842
Parent: d91bc6904dce256b06687217ec66caba15b33a7a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 20 21:01:31 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Feb 23 16:46:35 2023 +0100
configure.ac: update dlm check
Check for pkg-config --libs libdlm_lt and test if the returned value
contains word 'pthread' - if so, it's likely a buggy result from
incorrect config file and use directly -ldlm_lt for this case.
---
configure.ac | 8 +++++++-
daemons/lvmlockd/Makefile.in | 3 +--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 86f4941d8..06184be62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -928,8 +928,13 @@ AC_MSG_RESULT([$BUILD_LOCKDDLM])
dnl -- Look for dlm libraries
AS_IF([test "$BUILD_LOCKDDLM" = "yes"], [
- PKG_CHECK_MODULES(LIBDLM, libdlm, [BUILD_LVMLOCKD="yes"], $bailout)
+ PKG_CHECK_MODULES(LIBDLM, libdlm_lt, [BUILD_LVMLOCKD="yes"], $bailout)
AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
+ AS_CASE(["$LIBDLM_LIBS"],
+ [*lpthread*], [
+ dnl -- pkg-congig for libdlm_lt may give us libdlm with libpthread
+ AC_MSG_RESULT([replacing pkg-config --libs libdlm_lt "$LIBDLM_LIBS" with... -ldlm_lt])
+ LIBDLM_LIBS="${LIBDLM_LIBS%%ldlm*}ldlm_lt"])
])
################################################################################
@@ -961,6 +966,7 @@ AS_IF([test "$BUILD_LOCKDIDM" = "yes"], [
PKG_CHECK_EXISTS(blkid >= 2.24, [
PKG_CHECK_MODULES(LIBSEAGATEILM, [libseagate_ilm >= 0.1.0], [BUILD_LVMLOCKD="yes"], $bailout)
AC_DEFINE([LOCKDIDM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd IDM option.])
+ AS_IF([test -z "$LIBSEAGATEILM_LIBS"], [LIBSEAGATEILM_LIBS="-lseagate_ilm"])
], $bailout)
])
diff --git a/daemons/lvmlockd/Makefile.in b/daemons/lvmlockd/Makefile.in
index 24191c439..6d81d72fb 100644
--- a/daemons/lvmlockd/Makefile.in
+++ b/daemons/lvmlockd/Makefile.in
@@ -37,8 +37,7 @@ endif
ifeq ("@BUILD_LOCKDIDM@", "yes")
SOURCES += lvmlockd-idm.c
-# LOCK_LIBS += $(LIBSEAGATEILM_LIBS) $(BLKID_LIBS)
- LOCK_LIBS += -lseagate_ilm $(BLKID_LIBS)
+ LOCK_LIBS += $(LIBSEAGATEILM_LIBS) $(BLKID_LIBS)
endif
CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES))
7 months, 1 week