master - tests: typo in aux
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3eb2d4d2ce3c66...
Commit: 3eb2d4d2ce3c660fb5bd99c2093a00cb8f2fa4d5
Parent: 20e9ec35836fc4dd8064f40068e5be83dbf67bfa
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 11 16:14:24 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 11 16:14:24 2015 +0200
tests: typo in aux
Ooops editor grabbed q in test.
---
test/lib/aux.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 0985767..ef25117 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -841,7 +841,7 @@ devices/cache_dir = "$TESTDIR/etc"
devices/default_data_alignment = 1
devices/dir = "$DM_DEV_DIR"
devices/filter = "a|.*|"
-qdevices/global_filter = [ "a|$DM_DEV_DIR/mapper/.*pv[0-9_]*$|", "r|.*|" ]
+devices/global_filter = [ "a|$DM_DEV_DIR/mapper/.*pv[0-9_]*$|", "r|.*|" ]
devices/md_component_detection = 0
devices/scan = "$DM_DEV_DIR"
devices/sysfs_scan = 1
9 years
master - makefiles: move clean
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=20e9ec35836fc4...
Commit: 20e9ec35836fc4dd8064f40068e5be83dbf67bfa
Parent: 62e7a6ca1a3479017b026c380a97c9f826b087da
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 11 16:08:58 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 11 16:08:58 2015 +0200
makefiles: move clean
Move clean: target below, so it's not a default target to execute.
---
Makefile.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index ac806bb..a180d10 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -49,8 +49,6 @@ tools.distclean: test.distclean
endif
DISTCLEAN_DIRS += lcov_reports*
DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
-clean:
- $(RM) -r build
include make.tmpl
@@ -103,6 +101,8 @@ conf.generate: tools
VER = LVM2.@LVM_MAJOR@.@LVM_MINOR@.(a)LVM_PATCHLEVEL@
CLEAN_TARGETS += $(VER).tgz
+clean:
+ $(RM) -r build
dist:
@echo "Generating $(VER).tgz";\
9 years
master - makefile: cleanup after build
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=62e7a6ca1a3479...
Commit: 62e7a6ca1a3479017b026c380a97c9f826b087da
Parent: fabc19b73cb08f1a80bbf558b858110520ee8b53
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 11 15:52:11 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 11 15:53:46 2015 +0200
makefile: cleanup after build
Provide cleaning rules for build dir and release tgz.
---
Makefile.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 30c2c89..ac806bb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -49,6 +49,8 @@ tools.distclean: test.distclean
endif
DISTCLEAN_DIRS += lcov_reports*
DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
+clean:
+ $(RM) -r build
include make.tmpl
@@ -100,6 +102,7 @@ check check_system check_cluster check_local check_lvmetad unit: all
conf.generate: tools
VER = LVM2.@LVM_MAJOR@.@LVM_MINOR@.(a)LVM_PATCHLEVEL@
+CLEAN_TARGETS += $(VER).tgz
dist:
@echo "Generating $(VER).tgz";\
9 years
master - tests: disable lvmetad and lvmpolld
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fabc19b73cb08f...
Commit: fabc19b73cb08f1a80bbf558b858110520ee8b53
Parent: b5b3ad14a83b1c5a876b11b27c825d473110d9f5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 11 15:45:34 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 11 15:53:21 2015 +0200
tests: disable lvmetad and lvmpolld
Since now we enable those by default when compiled with those daemons,
explicitely disable them in tests when needed.
Alphabetically sort configurables.
---
test/lib/aux.sh | 60 +++++++++++++++++++++++++++++-------------------------
1 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index cb0fe4f..0985767 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -816,6 +816,8 @@ generate_config() {
fi
LVM_TEST_LOCKING=${LVM_TEST_LOCKING:-1}
+ LVM_TEST_LVMETAD=${LVM_TEST_LVMETAD:-0}
+ LVM_TEST_LVMPOLLD=${LVM_TEST_LVMPOLLD:-0}
if test "$DM_DEV_DIR" = "/dev"; then
LVM_VERIFY_UDEV=${LVM_VERIFY_UDEV:-0}
else
@@ -823,46 +825,48 @@ generate_config() {
fi
test -f "$config_values" || {
cat > "$config_values" <<-EOF
-devices/dir = "$DM_DEV_DIR"
-devices/scan = "$DM_DEV_DIR"
-devices/filter = "a|.*|"
-devices/global_filter = [ "a|$DM_DEV_DIR/mapper/.*pv[0-9_]*$|", "r|.*|" ]
+activation/checks = 1
+activation/monitoring = 0
+activation/polling_interval = 0
+activation/retry_deactivation = 1
+activation/snapshot_autoextend_percent = 50
+activation/snapshot_autoextend_threshold = 50
+activation/udev_rules = 1
+activation/udev_sync = 1
+activation/verify_udev_operations = $LVM_VERIFY_UDEV
+allocation/wipe_signatures_when_zeroing_new_lvs = 0
+backup/archive = 0
+backup/backup = 0
devices/cache_dir = "$TESTDIR/etc"
-devices/sysfs_scan = 1
devices/default_data_alignment = 1
+devices/dir = "$DM_DEV_DIR"
+devices/filter = "a|.*|"
+qdevices/global_filter = [ "a|$DM_DEV_DIR/mapper/.*pv[0-9_]*$|", "r|.*|" ]
devices/md_component_detection = 0
-log/syslog = 0
-log/indent = 1
-log/level = 9
-log/file = "$TESTDIR/debug.log"
-log/overwrite = 1
-log/activation = 1
-log/verbose = 0
-activation/retry_deactivation = 1
-backup/backup = 0
-backup/archive = 0
+devices/scan = "$DM_DEV_DIR"
+devices/sysfs_scan = 1
global/abort_on_internal_errors = 1
+global/cache_check_executable = "$LVM_TEST_CACHE_CHECK_CMD"
+global/cache_dump_executable = "$LVM_TEST_CACHE_DUMP_CMD"
+global/cache_repair_executable = "$LVM_TEST_CACHE_REPAIR_CMD"
global/detect_internal_vg_cache_corruption = 1
+global/fallback_to_local_locking = 0
global/library_dir = "$TESTDIR/lib"
global/locking_dir = "$TESTDIR/var/lock/lvm"
global/locking_type=$LVM_TEST_LOCKING
global/si_unit_consistency = 1
-global/fallback_to_local_locking = 0
-global/cache_check_executable = "$LVM_TEST_CACHE_CHECK_CMD"
-global/cache_dump_executable = "$LVM_TEST_CACHE_DUMP_CMD"
-global/cache_repair_executable = "$LVM_TEST_CACHE_REPAIR_CMD"
global/thin_check_executable = "$LVM_TEST_THIN_CHECK_CMD"
global/thin_dump_executable = "$LVM_TEST_THIN_DUMP_CMD"
global/thin_repair_executable = "$LVM_TEST_THIN_REPAIR_CMD"
-activation/checks = 1
-activation/udev_sync = 1
-activation/udev_rules = 1
-activation/verify_udev_operations = $LVM_VERIFY_UDEV
-activation/polling_interval = 0
-activation/snapshot_autoextend_percent = 50
-activation/snapshot_autoextend_threshold = 50
-activation/monitoring = 0
-allocation/wipe_signatures_when_zeroing_new_lvs = 0
+global/use_lvmetad = $LVM_TEST_LVMETAD
+global/use_lvmpolld = $LVM_TEST_LVMPOLLD
+log/activation = 1
+log/file = "$TESTDIR/debug.log"
+log/indent = 1
+log/level = 9
+log/overwrite = 1
+log/syslog = 0
+log/verbose = 0
EOF
}
9 years
master - spec: now generated
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b5b3ad14a83b1c...
Commit: b5b3ad14a83b1c5a876b11b27c825d473110d9f5
Parent: 7de615339571be4b0ee593b58d5e1c5abd661c4c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 11 14:30:54 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 11 14:40:54 2015 +0200
spec: now generated
---
spec/source.inc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/spec/source.inc b/spec/source.inc
index 21fbf7d..36cb30f 100644
--- a/spec/source.inc
+++ b/spec/source.inc
@@ -72,12 +72,12 @@
# Do not reset Release to 1 unless both lvm2 and device-mapper
# versions are increased together.
-%define device_mapper_version 1.02.75
+%define device_mapper_version 1.02.97
Summary: Userland logical volume management tools
Name: lvm2
-Version: 2.02.96
-Release: 4%{?dist}
+Version: 2.02.120
+Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
URL: http://sources.redhat.com/lvm2
9 years
master - makefiles: dist and rpm target
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7de615339571be...
Commit: 7de615339571be4b0ee593b58d5e1c5abd661c4c
Parent: ed8ea6cb2f0f915cc357c210d3112d3fed234854
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 11 14:28:55 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 11 14:36:58 2015 +0200
makefiles: dist and rpm target
Basic support for upstream 'build' of rpm packages.
Make spec file generated.
2 new simple targets:
make dist - create LVM2.MAJOR.MINOR.PATCHLEVEL.tgz from git files.
make rpm - some generic rpmbuilder using spec files.
Create packages in build/ subdir.
DO NOT USE created rpms in any distribution!
---
Makefile.in | 20 +++++++++-
configure | 3 +-
configure.in | 1 +
spec/source.inc.in | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 135 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index bce7bee..30c2c89 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
#
# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
-# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2004-2015 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
#
@@ -15,6 +15,8 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
SUBDIRS = conf daemons include lib libdaemon libdm man scripts tools
@@ -97,6 +99,22 @@ check check_system check_cluster check_local check_lvmetad unit: all
conf.generate: tools
+VER = LVM2.@LVM_MAJOR@.@LVM_MINOR@.(a)LVM_PATCHLEVEL@
+
+dist:
+ @echo "Generating $(VER).tgz";\
+ git ls-tree -r HEAD --name-only | xargs tar --transform "s,^,$(VER)/," -zcf $(VER).tgz
+
+rpm: dist
+ $(MKDIR_P) build/SPECS build/SOURCES
+ ln -sf $(abs_top_srcdir)/spec/lvm2.spec build/SPECS
+ ln -sf $(abs_top_srcdir)/spec/build.inc build/SOURCES
+ ln -sf $(abs_top_srcdir)/spec/macros.inc build/SOURCES
+ ln -sf $(abs_top_srcdir)/spec/packages.inc build/SOURCES
+ ln -sf $(abs_top_srcdir)/spec/source.inc build/SOURCES
+ ln -sf $(abs_top_builddir)/$(VER).tgz build/SOURCES
+ rpmbuild -v --define "_topdir $(abs_top_builddir)/build" -ba build/SPECS/lvm2.spec
+
generate: conf.generate
$(MAKE) -C conf generate
diff --git a/configure b/configure
index 7c1ffe0..7e0146c 100755
--- a/configure
+++ b/configure
@@ -13241,7 +13241,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
################################################################################
-ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile daemons/lvmpolld/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile
liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/
Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
+ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile daemons/lvmpolld/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile
liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile spec/source.inc test/Makefile test/api/Mak
efile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -14002,6 +14002,7 @@ do
"scripts/lvm2_pvscan_systemd_red_hat@.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_pvscan_systemd_red_hat@.service" ;;
"scripts/lvm2_tmpfiles_red_hat.conf") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_tmpfiles_red_hat.conf" ;;
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
+ "spec/source.inc") CONFIG_FILES="$CONFIG_FILES spec/source.inc" ;;
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
"test/api/Makefile") CONFIG_FILES="$CONFIG_FILES test/api/Makefile" ;;
"test/unit/Makefile") CONFIG_FILES="$CONFIG_FILES test/unit/Makefile" ;;
diff --git a/configure.in b/configure.in
index 83358f5..6ff5bbe 100644
--- a/configure.in
+++ b/configure.in
@@ -1944,6 +1944,7 @@ scripts/lvm2_monitoring_systemd_red_hat.service
scripts/lvm2_pvscan_systemd_red_hat@.service
scripts/lvm2_tmpfiles_red_hat.conf
scripts/Makefile
+spec/source.inc
test/Makefile
test/api/Makefile
test/unit/Makefile
diff --git a/spec/source.inc.in b/spec/source.inc.in
new file mode 100644
index 0000000..c1d1012
--- /dev/null
+++ b/spec/source.inc.in
@@ -0,0 +1,113 @@
+%import macros.inc
+
+##############################################################
+# Defaults (rawhide)...
+
+%global enable_profiling 0
+%global enable_testsuite 0
+%global enable_udev 1
+%global enable_systemd 1
+%global enable_cmirror 1
+
+%global buildreq_cluster corosync-devel >= 1.99.9-1, dlm-devel >= 3.99.1-1
+%global req_cluster corosync >= 1.99.9-1, dlm >= 3.99.2-1
+%with clvmd corosync
+
+# TODO %global req_dm_persistent device-mapper-persistent-data >= 0.1.4
+%with cache internal
+%with thin internal
+%with thin_check %{_sbindir}/thin_check
+%with thin_repair %{_sbindir}/thin_repair
+%with thin_dump %{_sbindir}/thin_dump
+
+%global buildreq_udev systemd-devel
+%global req_udev udev >= 181-1
+
+%service lvmetad 1
+
+##############################################################
+
+%if %{fedora} == 16 || %{rhel} == 6
+%global enable_systemd 0
+
+%global buildreq_udev libudev-devel
+%global buildreq_cluster openaislib-devel >= 1.1.1-1, clusterlib-devel >= 3.0.6-1, corosynclib-devel >= 1.2.0-1
+
+%global req_udev udev >= 158-1
+%global req_cluster openais >= 1.1.1-1, cman >= 3.0.6-1, corosync >= 1.2.0-1
+
+%global _udevbasedir /lib/udev
+%global _udevdir %{_udevbasedir}/rules.d
+%endif
+
+%if %{fedora} == 16
+%with cache none
+%with thin none
+%with thin_check
+%with thin_repair
+%with thin_dump
+%endif
+
+##############################################################
+
+%if %{fedora} == 17
+%global buildreq_udev systemd-devel
+%global buildreq_cluster corosync-devel >= 1.99.9-1, dlm-devel >= 3.99.1-1
+
+%global req_udev udev >= 181-1
+%global req_dm_persistent device-mapper-persistent-data >= 0.1.4
+%global req_cluster corosync >= 1.99.9-1, dlm >= 3.99.2-1
+%endif
+
+##############################################################
+# same as FC 16 above, only with older udev
+
+%if %{rhel} == 6
+%define req_udev udev >= 147-2
+%global req_dm_persistent device-mapper-persistent-data >= 0.1.4
+%endif
+
+##############################################################
+
+# Do not reset Release to 1 unless both lvm2 and device-mapper
+# versions are increased together.
+
+%define device_mapper_version @DM_LIB_PATCHLEVEL@
+
+Summary: Userland logical volume management tools
+Name: lvm2
+Version: @LVM_MAJOR@.@LVM_MINOR@.(a)LVM_PATCHLEVEL@
+Release: 1%{?dist}
+License: GPLv2
+Group: System Environment/Base
+URL: http://sources.redhat.com/lvm2
+Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
+Source91: source.inc
+Source92: build.inc
+Source93: packages.inc
+Source94: macros.inc
+
+BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
+BuildRequires: ncurses-devel
+BuildRequires: readline-devel
+BuildRequires: module-init-tools
+BuildRequires: pkgconfig
+
+# Expands to nothing unless at least 2 arguments are given
+%define maybe() \
+%if %(test -n "%{?2}" && echo 1 || echo 0) \
+%* \
+%endif
+%define ifwith() \
+%if %(if echo %{with_flags} | grep -q %1; then echo 1; else echo 0; fi)
+
+%maybe BuildRequires: %{?buildreq_udev}
+%maybe BuildRequires: %{?buildreq_cluster}
+
+%description
+LVM2 includes all of the support for handling read/write operations on
+physical volumes (hard disks, RAID-Systems, magneto optical, etc.,
+multiple devices (MD), see mdadd(8) or even loop devices, see
+losetup(8)), creating volume groups (kind of virtual disks) from one
+or more physical volumes and creating one or more logical volumes
+(kind of logical partitions) in volume groups.
9 years
master - spec: writable instalation
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ed8ea6cb2f0f91...
Commit: ed8ea6cb2f0f915cc357c210d3112d3fed234854
Parent: 725136b57eef7a61e506a445d43e6632882dc0bf
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 11 13:51:49 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 11 14:36:31 2015 +0200
spec: writable instalation
rpmbuild needs writable binaries (for debug symbol extraction)
---
spec/build.inc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/spec/build.inc b/spec/build.inc
index 176fdb1..30c6402 100644
--- a/spec/build.inc
+++ b/spec/build.inc
@@ -24,6 +24,7 @@
--enable-applib \
--enable-cmdlib \
--enable-dmeventd \
+ --enable-write_install \
%{configure_flags}
make %{?_smp_mflags}
9 years
master - configure: use_lvmetad/polld configurable
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=725136b57eef7a...
Commit: 725136b57eef7a61e506a445d43e6632882dc0bf
Parent: 18066949282613fad1981804297b3bba01bcc3bd
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 11 13:49:41 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 11 14:36:10 2015 +0200
configure: use_lvmetad/polld configurable
Configure provides proper settings for
use_lvmetad and use_lvmpolld conf setttings.
When the build of polld & lvmetad, these settings
are enabled by default unless explicitelly disabled
with --disable-use-lvmetad/--disable-use-lvmpolld.
---
WHATS_NEW | 1 +
conf/example.conf.in | 4 +-
configure | 50 ++++++++++++++++++++++++++++++++++++++++++
configure.in | 28 +++++++++++++++++++++++
lib/config/config_settings.h | 4 +-
lib/misc/configure.h.in | 6 +++++
6 files changed, 89 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7052016..e4fe6b6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.120 -
===============================
+ Configure lvm.conf for use_lvmetad and use_lvmpolld.
Add lvpoll for cmdline communication with lvmpolld.
Add lvmpolld acting as a free-standing version of polldaemon.
Properly validate PV size for pvcreate --restorefile.
diff --git a/conf/example.conf.in b/conf/example.conf.in
index e16aa7f..843e62d 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -820,7 +820,7 @@ global {
# lvmetad is not compatible with locking_type 3 (clustering).
# LVM prints warnings and ignores lvmetad if this combination
# is seen.
- use_lvmetad = 0
+ use_lvmetad = @DEFAULT_USE_LVMETAD@
# Configuration option global/thin_check_executable.
# The full path to the thin_check command.
@@ -947,7 +947,7 @@ global {
# spawned in lvmpolld's service cgroup.
#
# When set to 0 lvm falls back to classical polling.
- use_lvmpolld = 0
+ use_lvmpolld = @DEFAULT_USE_LVMPOLLD@
}
# Configuration section activation.
diff --git a/configure b/configure
index 8c51c71..7c1ffe0 100755
--- a/configure
+++ b/configure
@@ -700,6 +700,8 @@ DMEVENTD_PATH
DMEVENTD
DL_LIBS
DEVMAPPER
+DEFAULT_USE_LVMPOLLD
+DEFAULT_USE_LVMETAD
DEFAULT_SYS_DIR
DEFAULT_SPARSE_SEGTYPE
DEFAULT_RUN_DIR
@@ -915,8 +917,10 @@ enable_testing
enable_valgrind_pool
enable_devmapper
enable_lvmetad
+enable_use_lvmetad
with_lvmetad_pidfile
enable_lvmpolld
+enable_use_lvmpolld
with_lvmpolld_pidfile
enable_blkid_wiping
enable_udev_systemd_background_jobs
@@ -1631,7 +1635,9 @@ Optional Features:
--enable-valgrind-pool enable valgrind awareness of pools
--disable-devmapper disable LVM2 device-mapper interaction
--enable-lvmetad enable the LVM Metadata Daemon
+ --disable-use-lvmetad disable usage of LVM Metadata Daemon
--enable-lvmpolld enable the LVM Polling Daemon
+ --disable-use-lvmpolld disable usage of LVM Poll Daemon
--disable-blkid_wiping disable libblkid detection of signatures when wiping
and use native code instead
--disable-udev-systemd-background-jobs
@@ -10844,6 +10850,20 @@ $as_echo "$LVMETAD" >&6; }
BUILD_LVMETAD=$LVMETAD
if test "$BUILD_LVMETAD" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmetad" >&5
+$as_echo_n "checking defaults for use_lvmetad... " >&6; }
+ # Check whether --enable-use_lvmetad was given.
+if test "${enable_use_lvmetad+set}" = set; then :
+ enableval=$enable_use_lvmetad; case ${enableval} in
+ yes) DEFAULT_USE_LVMETAD=1 ;;
+ *) DEFAULT_USE_LVMETAD=0 ;;
+ esac
+else
+ DEFAULT_USE_LVMETAD=1
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMETAD" >&5
+$as_echo "$DEFAULT_USE_LVMETAD" >&6; }
$as_echo "#define LVMETAD_SUPPORT 1" >>confdefs.h
@@ -10861,8 +10881,15 @@ cat >>confdefs.h <<_ACEOF
#define LVMETAD_PIDFILE "$LVMETAD_PIDFILE"
_ACEOF
+else
+ DEFAULT_USE_LVMETAD=0
fi
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_USE_LVMETAD $DEFAULT_USE_LVMETAD
+_ACEOF
+
+
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmpolld" >&5
$as_echo_n "checking whether to build lvmpolld... " >&6; }
@@ -10877,6 +10904,20 @@ $as_echo "$LVMPOLLD" >&6; }
BUILD_LVMPOLLD=$LVMPOLLD
if test "$BUILD_LVMPOLLD" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmpolld" >&5
+$as_echo_n "checking defaults for use_lvmpolld... " >&6; }
+ # Check whether --enable-use_lvmpolld was given.
+if test "${enable_use_lvmpolld+set}" = set; then :
+ enableval=$enable_use_lvmpolld; case ${enableval} in
+ yes) DEFAULT_USE_LVMPOLLD=1 ;;
+ *) DEFAULT_USE_LVMPOLLD=0 ;;
+ esac
+else
+ DEFAULT_USE_LVMPOLLD=1
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMPOLLD" >&5
+$as_echo "$DEFAULT_USE_LVMPOLLD" >&6; }
$as_echo "#define LVMPOLLD_SUPPORT 1" >>confdefs.h
@@ -10894,8 +10935,15 @@ cat >>confdefs.h <<_ACEOF
#define LVMPOLLD_PIDFILE "$LVMPOLLD_PIDFILE"
_ACEOF
+else
+ DEFAULT_USE_LVMPOLLD=0
fi
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_USE_LVMPOLLD $DEFAULT_USE_LVMPOLLD
+_ACEOF
+
+
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libblkid detection of signatures when wiping" >&5
$as_echo_n "checking whether to enable libblkid detection of signatures when wiping... " >&6; }
@@ -13190,6 +13238,8 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
+
+
################################################################################
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile daemons/lvmpolld/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile
liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/
Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
diff --git a/configure.in b/configure.in
index 1887757..83358f5 100644
--- a/configure.in
+++ b/configure.in
@@ -1067,6 +1067,15 @@ AC_MSG_RESULT($LVMETAD)
BUILD_LVMETAD=$LVMETAD
if test "$BUILD_LVMETAD" = yes; then
+ AC_MSG_CHECKING([defaults for use_lvmetad])
+ AC_ARG_ENABLE(use_lvmetad,
+ AC_HELP_STRING([--disable-use-lvmetad],
+ [disable usage of LVM Metadata Daemon]),
+ [case ${enableval} in
+ yes) DEFAULT_USE_LVMETAD=1 ;;
+ *) DEFAULT_USE_LVMETAD=0 ;;
+ esac], DEFAULT_USE_LVMETAD=1)
+ AC_MSG_RESULT($DEFAULT_USE_LVMETAD)
AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.])
AC_ARG_WITH(lvmetad-pidfile,
@@ -1076,7 +1085,11 @@ if test "$BUILD_LVMETAD" = yes; then
LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid")
AC_DEFINE_UNQUOTED(LVMETAD_PIDFILE, ["$LVMETAD_PIDFILE"],
[Path to lvmetad pidfile.])
+else
+ DEFAULT_USE_LVMETAD=0
fi
+AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMETAD, [$DEFAULT_USE_LVMETAD],
+ [Use lvmetad by default.])
################################################################################
dnl -- Build lvmpolld
@@ -1090,6 +1103,15 @@ AC_MSG_RESULT($LVMPOLLD)
BUILD_LVMPOLLD=$LVMPOLLD
if test "$BUILD_LVMPOLLD" = yes; then
+ AC_MSG_CHECKING([defaults for use_lvmpolld])
+ AC_ARG_ENABLE(use_lvmpolld,
+ AC_HELP_STRING([--disable-use-lvmpolld],
+ [disable usage of LVM Poll Daemon]),
+ [case ${enableval} in
+ yes) DEFAULT_USE_LVMPOLLD=1 ;;
+ *) DEFAULT_USE_LVMPOLLD=0 ;;
+ esac], DEFAULT_USE_LVMPOLLD=1)
+ AC_MSG_RESULT($DEFAULT_USE_LVMPOLLD)
AC_DEFINE([LVMPOLLD_SUPPORT], 1, [Define to 1 to include code that uses lvmpolld.])
AC_ARG_WITH(lvmpolld-pidfile,
@@ -1099,7 +1121,11 @@ if test "$BUILD_LVMPOLLD" = yes; then
LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid")
AC_DEFINE_UNQUOTED(LVMPOLLD_PIDFILE, ["$LVMPOLLD_PIDFILE"],
[Path to lvmpolld pidfile.])
+else
+ DEFAULT_USE_LVMPOLLD=0
fi
+AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMPOLLD, [$DEFAULT_USE_LVMPOLLD],
+ [Use lvmpolld by default.])
################################################################################
dnl -- Enable blkid wiping functionality
@@ -1748,6 +1774,8 @@ AC_SUBST(DEFAULT_RAID10_SEGTYPE)
AC_SUBST(DEFAULT_RUN_DIR)
AC_SUBST(DEFAULT_SPARSE_SEGTYPE)
AC_SUBST(DEFAULT_SYS_DIR)
+AC_SUBST(DEFAULT_USE_LVMETAD)
+AC_SUBST(DEFAULT_USE_LVMPOLLD)
AC_SUBST(DEVMAPPER)
AC_SUBST(DLM_CFLAGS)
AC_SUBST(DLM_LIBS)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 59a7c1c..2bbafc3 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -780,7 +780,7 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa
"was never a valid path in the /dev filesystem.\n"
"Enable this option to reinstate the previous format.\n")
-cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), NULL, 0, NULL,
+cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LVMETAD, vsn(2, 2, 93), NULL, 0, NULL,
"Use lvmetad to cache metadata and reduce disk scanning.\n"
"When enabled (and running), lvmetad provides LVM commands\n"
"with VG metadata and PV state. LVM commands then avoid\n"
@@ -920,7 +920,7 @@ cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, D
"Some of the checks may be expensive, so it's best to use\n"
"this only when there seems to be a problem.\n")
-cfg(global_use_lvmpolld_CFG, "use_lvmpolld", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 120), NULL, 0, NULL,
+cfg(global_use_lvmpolld_CFG, "use_lvmpolld", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LVMPOLLD, vsn(2, 2, 120), NULL, 0, NULL,
"Indicates whether to use lvmpolld instead of classical polldaemon (a process\n"
"forked off an initiating lvm command) or not. When set to 1 and native systemd\n"
"service is installed in the system lvm starts using lvmpolld. lvmpolld gets\n"
diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in
index 45a8462..f28cc79 100644
--- a/lib/misc/configure.h.in
+++ b/lib/misc/configure.h.in
@@ -95,6 +95,12 @@
/* Path to LVM system directory. */
#undef DEFAULT_SYS_DIR
+/* Use lvmetad by default. */
+#undef DEFAULT_USE_LVMETAD
+
+/* Use lvmpolld by default. */
+#undef DEFAULT_USE_LVMPOLLD
+
/* Define to 1 to enable LVM2 device-mapper interaction. */
#undef DEVMAPPER_SUPPORT
9 years
master - metadata: use log_debug_metadata instead of general log_debug for BA debug messages
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=18066949282613...
Commit: 18066949282613fad1981804297b3bba01bcc3bd
Parent: e3ccf980236a842cfc13be11726be651b127afb0
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon May 11 11:07:53 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon May 11 11:07:53 2015 +0200
metadata: use log_debug_metadata instead of general log_debug for BA debug messages
---
lib/format_text/import_vsn1.c | 2 +-
lib/format_text/text_label.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c
index 5e8e049..3030bad 100644
--- a/lib/format_text/import_vsn1.c
+++ b/lib/format_text/import_vsn1.c
@@ -251,7 +251,7 @@ static int _read_pv(struct format_instance *fid,
_read_uint64(pvn, "ba_start", &ba_start);
_read_uint64(pvn, "ba_size", &size);
if (ba_start && size) {
- log_debug("Found bootloader area specification for PV %s "
+ log_debug_metadata("Found bootloader area specification for PV %s "
"in metadata: ba_start=%" PRIu64 ", ba_size=%" PRIu64 ".",
pv_dev_name(pv), ba_start, size);
pv->ba_start = ba_start;
diff --git a/lib/format_text/text_label.c b/lib/format_text/text_label.c
index 599be41..4ad2ccd 100644
--- a/lib/format_text/text_label.c
+++ b/lib/format_text/text_label.c
@@ -418,8 +418,8 @@ static int _text_read(struct labeller *l, struct device *dev, void *buf,
if (!(ext_version = xlate32(pvhdr_ext->version)))
goto out;
- log_debug("%s: PV header extension version %" PRIu32 " found",
- dev_name(dev), ext_version);
+ log_debug_metadata("%s: PV header extension version %" PRIu32 " found",
+ dev_name(dev), ext_version);
/* Bootloader areas */
dlocn_xl = pvhdr_ext->bootloader_areas_xl;
9 years
master - tests: missed conversion
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e3ccf980236a84...
Commit: e3ccf980236a842cfc13be11726be651b127afb0
Parent: abcab54cca4b4f9ff157a5f51718c69ffdf34c7a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat May 9 09:15:29 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat May 9 09:17:26 2015 +0200
tests: missed conversion
Assuming it should test same number as other functions.
---
test/shell/pvmove-resume-1.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/pvmove-resume-1.sh b/test/shell/pvmove-resume-1.sh
index e8564fa..0070826 100644
--- a/test/shell/pvmove-resume-1.sh
+++ b/test/shell/pvmove-resume-1.sh
@@ -112,7 +112,7 @@ lvchange_single() {
aux check_lvmpolld_init_rq_count 1 "$vg/pvmove0"
aux check_lvmpolld_init_rq_count 1 "$vg1/pvmove0"
else
- check_spawned_bg_procs_count $1
+ test $(aux count_processes_with_tag) -eq $1
fi
}
9 years