OCF support
cover OCF support
Updated patch from
https://bugzilla.redhat.com/show_bug.cgi?id=646854
First two patches are modifing surrounding Makefiles so recursive makefile is easier (FIXME: write better recursive target) Second one tries to avoid unexpected installation to live system (but as the target is rather hidden one - it's probably hard to hit) (FIXME: write make help with supported targets)
OCF patch:
user needs to configure --enable-ocf so it gets installed with make install target by default.
Otherwise he might use make install_ocf to get only ocf files installed. With disabled (default) ocf support - no files are installed.
Zdenek Kabelac (3):
Use include make.tmpl as other headers
Add ${prefix}
ocf support
configure.in | 10 ++ include/Makefile.in | 18 +--- make.tmpl.in | 8 +- scripts/Makefile.in | 23 +++- scripts/VolumeGroup.ocf | 279 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 316 insertions(+), 22 deletions(-) create mode 100644 scripts/VolumeGroup.ocf
--
1.7.3.2
PATCH 1/3 Use include make.tmpl as other headers
--- include/Makefile.in | 18 ++---------------- 1 files changed, 2 insertions(+), 16 deletions(-)
include/Makefile.in +2 -16
@@ -1,6 +1,6 @@ # # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -12,15 +12,11 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -SHELL = /bin/sh - srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -LN_S = @LN_S@ - -.PHONY: clean distclean all install pofile install_cluster install_device-mapper +include $(top_builddir)/make.tmpl all: .symlinks_created
@@ -37,14 +33,4 @@ pofile: all device-mapper: all -clean: - -install: - -install_cluster: - -install_device-mapper: - -install_lvm2: - cflow: all
Signature · 1 line
1.7.3.2
PATCH 2/3 Add ${prefix}
In reply to Zdenek KabelacAvoid files to be written into the live system if lvm was configured with diferent --prefix.
Also put path into one variable initd_dir.
--- scripts/Makefile.in | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
scripts/Makefile.in +5 -4
@@ -14,6 +14,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ +initd_dir = $(DESTDIR)${prefix}/etc/rc.d/init.d include $(top_builddir)/make.tmpl
@@ -33,13 +34,13 @@ install: install_lvm2 # FIXME Customise for other distributions install_initscripts: - $(INSTALL_DIR) $(DESTDIR)/etc/rc.d/init.d - $(INSTALL_SCRIPT) lvm2_monitoring_init_red_hat $(DESTDIR)/etc/rc.d/init.d/lvm2-monitor + $(INSTALL_DIR) $(initd_dir) + $(INSTALL_SCRIPT) lvm2_monitoring_init_red_hat $(initd_dir)/lvm2-monitor ifneq ("@CLVMD@", "none") - $(INSTALL_SCRIPT) clvmd_init_red_hat $(DESTDIR)/etc/rc.d/init.d/clvmd + $(INSTALL_SCRIPT) clvmd_init_red_hat $(initd_dir)/clvmd endif ifeq ("@BUILD_CMIRRORD@", "yes") - $(INSTALL_SCRIPT) cmirrord_init_red_hat $(DESTDIR)/etc/rc.d/init.d/cmirrord + $(INSTALL_SCRIPT) cmirrord_init_red_hat $(initd_dir)/cmirrord endif DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat lvm2_monitoring_init_red_hat
Signature · 1 line
1.7.3.2
PATCH 2/3 Add ${prefix}
Dne 2.11.2010 15:10, Zdenek Kabelac napsal(a):
Quoted 6 lines
Avoid files to be written into the live system if lvm was configured with diferent --prefix.
Also put path into one variableinitd_dir.Signed-off-by Zdenek Kabelac <[email protected]>---
Updated version with initdir defined in make.tmpl.in
Zdenek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-prefix.patch
Type: text/x-patch
Size: 1622 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20101105/ebfd7f40/attachment.bin>
PATCH 3/3 ocf support
In reply to Zdenek KabelacUpdated patch from Florian Haas from Linux-HA project.
CF patch:
user needs to configure --enable-ocf so it gets installed with make install target by default. Otherwise user can use:
make install_ocf to get only ocf files installed. With disabled (default) ocf support - no files are installed.
--- configure.in | 10 ++ make.tmpl.in | 8 +- scripts/Makefile.in | 14 ++- scripts/VolumeGroup.ocf | 279 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 309 insertions(+), 2 deletions(-) create mode 100644 scripts/VolumeGroup.ocf
configure.in +10 -0
@@ -361,6 +361,15 @@ AC_ARG_ENABLE(realtime, AC_MSG_RESULT($REALTIME) ################################################################################ +dnl -- disable OCF resource agents +AC_MSG_CHECKING(whether to enable OCF resource agents) +AC_ARG_ENABLE(ocf, + AC_HELP_STRING([--enable-ocf], + [enable Open Cluster Framework (OCF) compliant resource agents]), + OCF=$enableval, OCF=no) +AC_MSG_RESULT($OCF) + +################################################################################ dnl -- Init pkg-config with dummy invokation: dnl -- this is required because PKG_CHECK_MODULES macro is expanded dnl -- to initialize the pkg-config environment only at the first invokation,
@@ -1317,6 +1326,7 @@ AC_SUBST(LVM_PATCHLEVEL) AC_SUBST(LVM_RELEASE) AC_SUBST(LVM_RELEASE_DATE) AC_SUBST(MIRRORS) +AC_SUBST(OCF) AC_SUBST(REPLICATORS) AC_SUBST(MSGFMT) AC_SUBST(PKGCONFIG)
make.tmpl.in +7 -1
@@ -1,7 +1,7 @@ # @configure_input@ # # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -175,6 +175,7 @@ POTFILES = $(SOURCES:%.c=%.pot) .PHONY: all pofile distclean clean cleandir cflow device-mapper .PHONY: install install_cluster install_device-mapper install_lvm2 .PHONY: install_lib_shared install_dm_plugin install_lvm2_plugin +.PHONY: install_ocf .PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean) .PHONY: $(SUBDIRS.pofile) $(SUBDIRS.install_cluster) $(SUBDIRS.cflow) .PHONY: $(SUBDIRS.device-mapper) $(SUBDIRS.install-device-mapper)
@@ -184,6 +185,7 @@ SUBDIRS.install := $(SUBDIRS:=.install) SUBDIRS.install_cluster := $(SUBDIRS:=.install_cluster) SUBDIRS.install_device-mapper := $(SUBDIRS:=.install_device-mapper) SUBDIRS.install_lvm2 := $(SUBDIRS:=.install_lvm2) +SUBDIRS.install_ocf := $(SUBDIRS:=.install_ocf) SUBDIRS.pofile := $(SUBDIRS:=.pofile) SUBDIRS.cflow := $(SUBDIRS:=.cflow) SUBDIRS.clean := $(SUBDIRS:=.clean)
@@ -197,6 +199,7 @@ install: all $(SUBDIRS.install) install_cluster: all $(SUBDIRS.install_cluster) install_device-mapper: $(SUBDIRS.install_device-mapper) install_lvm2: $(SUBDIRS.install_lvm2) +install_ocf: $(SUBDIRS.install_ocf) cflow: $(SUBDIRS.cflow) $(SUBDIRS): $(SUBDIRS.device-mapper)
@@ -217,6 +220,9 @@ $(SUBDIRS.install_device-mapper): device-mapper $(SUBDIRS.install_lvm2): $(SUBDIRS) $(MAKE) -C $(@:.install_lvm2=) install_lvm2 +$(SUBDIRS.install_ocf): + $(MAKE) -C $(@:.install_ocf=) install_ocf + $(SUBDIRS.clean): -$(MAKE) -C $(@:.clean=) clean
scripts/Makefile.in +13 -1
@@ -15,6 +15,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ initd_dir = $(DESTDIR)${prefix}/etc/rc.d/init.d +ocf_scriptdir = $(DESTDIR)${prefix}/usr/lib/ocf/resource.d/lvm2 include $(top_builddir)/make.tmpl
@@ -23,14 +24,25 @@ ifeq ("@FSADM@", "yes") SCRIPTS += fsadm.sh endif +OCF_SCRIPTS = +ifeq ("@OCF@", "yes") + OCF_SCRIPTS += VolumeGroup.ocf +endif + vpath %.sh $(srcdir) %_install: %.sh $(INSTALL_PROGRAM) -D $< $(sbindir)/$(basename $(<F)) +%_install: %.ocf + $(INSTALL_DIR) $(ocf_scriptdir) + $(INSTALL_SCRIPT) $< $(ocf_scriptdir)/$(basename $(<F)) + install_lvm2: $(SCRIPTS:.sh=_install) -install: install_lvm2 +install_ocf: $(OCF_SCRIPTS:.ocf=_install) + +install: install_lvm2 install_ocf # FIXME Customise for other distributions install_initscripts:
scripts/VolumeGroup.ocf new file +279 -0
279 lines not on this page · raw message
Signature · 1 line
1.7.3.2
PATCH 3/3 ocf support
Dne 2.11.2010 15:10, Zdenek Kabelac napsal(a):
Quoted 10 lines
Updated patch from Florian Haas from Linux-HA project.
CF patch:
user needs to configure --enable-ocf so it gets installed with make install target by default. Otherwise user can use:
makeinstall_ocfto get only ocf files installed. With disabled (default) ocf support - no files are installed.Signed-off-by Zdenek Kabelac <[email protected]>---
Updated version with ocf_scriptdir defined in make.tmpl.in
Zdenek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ocf-support.patch
Type: text/x-patch
Size: 11907 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20101105/be4aec88/attachment.bin>