From 9a9dde2d8cd06437d98f9acff7b904203bee4dda Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 11 Aug 2011 19:18:17 +0000 Subject: [PATCH] pre-release fixes incl make distclean and configure --with-raid=none/shared --- Makefile.in | 5 ++++- WHATS_NEW | 8 ++++---- configure | 3 ++- configure.in | 1 + daemons/dmeventd/plugins/Makefile.in | 22 +++++++++++++++++++--- lib/raid/.exported_symbols | 1 + lib/raid/Makefile.in | 26 ++++++++++++++++++++++++++ make.tmpl.in | 3 ++- tools/dmsetup.c | 2 +- 9 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 lib/raid/.exported_symbols create mode 100644 lib/raid/Makefile.in diff --git a/Makefile.in b/Makefile.in index 38c41a3c2..654685ffa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -32,10 +32,12 @@ ifeq ("@APPLIB@", "yes") SUBDIRS += liblvm endif +# FIXME Should use intermediate Makefiles here! ifeq ($(MAKECMDGOALS),distclean) SUBDIRS = doc include man scripts \ lib tools daemons libdm \ - udev po liblvm test/api test + udev po liblvm test/api test \ + unit-tests/datastruct unit-tests/mm unit-tests/regex endif DISTCLEAN_DIRS += lcov_reports* DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl @@ -141,6 +143,7 @@ RUBY=ruby1.9 -Ireport-generators/lib -Ireport-generators/test .PHONEY: unit-test ruby-test test-programs # FIXME: put dependencies on libdm and liblvm +# FIXME: Should be handled by Makefiles in subdirs, not here at top level. test-programs: cd unit-tests/regex && $(MAKE) cd unit-tests/datastruct && $(MAKE) diff --git a/WHATS_NEW b/WHATS_NEW index 8a6f5a79c..a196d962b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -8,14 +8,14 @@ Version 2.02.87 - Fix possible format instance memory leaks and premature releases in _vg_read. Suppress locking error messages in monitoring init scripts. If pipe in clvmd fails, return busy instead of using uninitialised descriptors. - Add dmeventd monitoring shared library for RAID. - Add RAID metadata devices to considered devices in _add_lv_to_dtree. + Add dmeventd monitoring shared library for raid. + Add raid metadata devices to considered devices in _add_lv_to_dtree. Fix renaming of RAID logical volumes. Replace free_vg with release_vg and move it to vg.c. Remove INCONSISTENT_VG flag from the code. Remove lock from cache even if unlock fails. Initialise clvmd locks before lvm context to avoid open descriptor leaks. - Remove obsoleted GULM clvmd cluster locking support. + Remove obsolete gulm clvmd cluster locking support. Suppress low-level locking errors and warnings while using --sysinit. Remove unused inconsistent_seqno variable in _vg_read(). Remove meaningless const type qualifiers on cast type. @@ -23,7 +23,7 @@ Version 2.02.87 - Add test for fcntl error in singlenode client code. Remove --force option from lvrename manpage. Add missing new line in lvrename help text. - Add basic support for RAID 1/4/5/6 (i.e. create, remove, display) + Add basic support for MD RAID 1/4/5/6 as new segment type called raid. Change DEFAULT_UDEV_SYNC to 1 so udev_sync is used even without any config. Add systemd unit file to provide lvm2 monitoring. Compare also file size to detect changed config file. diff --git a/configure b/configure index b7ad62a97..327cac84d 100755 --- a/configure +++ b/configure @@ -10165,7 +10165,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 doc/Makefile doc/example.conf 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/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/Makefile test/Makefile test/api/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 doc/Makefile doc/example.conf 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 libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/Makefile test/Makefile test/api/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 @@ -10877,6 +10877,7 @@ do "lib/mirror/Makefile") CONFIG_FILES="$CONFIG_FILES lib/mirror/Makefile" ;; "lib/replicator/Makefile") CONFIG_FILES="$CONFIG_FILES lib/replicator/Makefile" ;; "lib/misc/lvm-version.h") CONFIG_FILES="$CONFIG_FILES lib/misc/lvm-version.h" ;; + "lib/raid/Makefile") CONFIG_FILES="$CONFIG_FILES lib/raid/Makefile" ;; "lib/snapshot/Makefile") CONFIG_FILES="$CONFIG_FILES lib/snapshot/Makefile" ;; "libdm/Makefile") CONFIG_FILES="$CONFIG_FILES libdm/Makefile" ;; "libdm/libdevmapper.pc") CONFIG_FILES="$CONFIG_FILES libdm/libdevmapper.pc" ;; diff --git a/configure.in b/configure.in index 3af1853a8..dd68e5e39 100644 --- a/configure.in +++ b/configure.in @@ -1396,6 +1396,7 @@ lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h +lib/raid/Makefile lib/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc diff --git a/daemons/dmeventd/plugins/Makefile.in b/daemons/dmeventd/plugins/Makefile.in index ff1ccaecd..6c51c9f2b 100644 --- a/daemons/dmeventd/plugins/Makefile.in +++ b/daemons/dmeventd/plugins/Makefile.in @@ -16,10 +16,26 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -SUBDIRS += lvm2 mirror snapshot raid +SUBDIRS += lvm2 + +ifneq ("@MIRRORS@", "none") + SUBDIRS += mirror +endif + +ifneq ("@SNAPSHOTS@", "none") + SUBDIRS += snapshot +endif + +ifneq ("@RAID@", "none") + SUBDIRS += raid +endif + +ifeq ($(MAKECMDGOALS),distclean) + SUBDIRS = lvm2 mirror snapshot raid +endif include $(top_builddir)/make.tmpl -mirror: lvm2 snapshot: lvm2 - +mirror: lvm2 +raid: lvm2 diff --git a/lib/raid/.exported_symbols b/lib/raid/.exported_symbols new file mode 100644 index 000000000..1c92c6a39 --- /dev/null +++ b/lib/raid/.exported_symbols @@ -0,0 +1 @@ +init_segtype diff --git a/lib/raid/Makefile.in b/lib/raid/Makefile.in new file mode 100644 index 000000000..73a1f800f --- /dev/null +++ b/lib/raid/Makefile.in @@ -0,0 +1,26 @@ +# +# Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved. +# Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. +# +# This file is part of LVM2. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ + +SOURCES = raid.c + +LIB_SHARED = liblvm2raid.$(LIB_SUFFIX) +LIB_VERSION = $(LIB_VERSION_LVM) + +include $(top_builddir)/make.tmpl + +install: install_lvm2_plugin diff --git a/make.tmpl.in b/make.tmpl.in index a58b313f5..a9d52359e 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -363,7 +363,8 @@ $(LIB_STATIC): $(OBJECTS) cleandir: $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(CLEAN_CFLOW) $(LDDEPS) \ $(POTFILES) $(SOURCES:%.c=%.d) $(SOURCES:%.c=%.gcno) $(SOURCES:%.c=%.gcda) \ - $(SOURCES2:%.c=%.o) $(SOURCES2:%.c=%.d) $(SOURCES2:%.c=%.gcno) $(SOURCES2:%.c=%.gcda) + $(SOURCES2:%.c=%.o) $(SOURCES2:%.c=%.d) $(SOURCES2:%.c=%.gcno) $(SOURCES2:%.c=%.gcda) \ + .exported_symbols_generated Makefile core clean: $(SUBDIRS.clean) cleandir diff --git a/tools/dmsetup.c b/tools/dmsetup.c index f1911d473..fbdbc6acb 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -3479,7 +3479,7 @@ int main(int argc, char **argv) doit: multiple_devices = (cmd->repeatable_cmd && argc != 2 && - (argc != 1 || (!_switches[UUID_ARG] && !_switches[MAJOR_ARG]))); + (argc != 1 || (!_switches[UUID_ARG] && !_switches[MAJOR_ARG]))); do { if (!cmd->fn(cmd, argc--, argv++, NULL, multiple_devices)) { fprintf(stderr, "Command failed\n"); -- 2.43.5