diff --git a/Makefile.am b/Makefile.am index fccaca493..85c5fe0d3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,178 +1,186 @@ # # Copyright (C) 2008 Andrew Beekhof # Copyright (C) 2011 Fabio M. Di Nitto # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # 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. # MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DRF/config-h.in \ missing install-sh autoscan.log configure.scan \ DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar \ compile config.guess config.sub depcomp SPEC = $(PACKAGE_NAME).spec TARFILES = $(PACKAGE_NAME)-$(VERSION).tar.bz2 \ $(PACKAGE_NAME)-$(VERSION).tar.gz SUBDIRS = if BUILD_RGMANAGER SUBDIRS += rgmanager RGMANAGER = without else RGMANAGER = with endif if BUILD_LINUX_HA SUBDIRS += include heartbeat tools ldirectord doc systemd LINUX_HA = without else LINUX_HA = with endif if WITH_COMPAT_HABINDIR COMPAT_HABINDIR = without else COMPAT_HABINDIR = with endif EXTRA_DIST = autogen.sh .version make/release.mk \ make/git-version-gen make/gitlog-to-changelog \ AUTHORS COPYING COPYING.GPLv3 COPYING.LGPL ChangeLog \ $(SPEC).in install-exec-local: if BUILD_LINUX_HA $(INSTALL) -d -m 1755 $(DESTDIR)$(HA_RSCTMPDIR) $(LN_S) ../../lib/heartbeat/ocf-binaries $(DESTDIR)${OCF_RA_DIR_PREFIX}/heartbeat/.ocf-binaries $(LN_S) ../../lib/heartbeat/ocf-directories $(DESTDIR)${OCF_RA_DIR_PREFIX}/heartbeat/.ocf-directories $(LN_S) ../../lib/heartbeat/ocf-returncodes $(DESTDIR)${OCF_RA_DIR_PREFIX}/heartbeat/.ocf-returncodes $(LN_S) ../../lib/heartbeat/ocf-shellfuncs $(DESTDIR)${OCF_RA_DIR_PREFIX}/heartbeat/.ocf-shellfuncs endif if BUILD_RGMANAGER if BUILD_LINUX_HA $(LN_S) ${CLUSTERDATA} $(DESTDIR)${OCF_RA_DIR_PREFIX}/redhat endif $(INSTALL) -d $(DESTDIR)/$(LOGDIR) endif dist-clean-local: rm -f autoconf automake autoheader $(TARFILES) uninstall-local: rmdir $(DESTDIR)/$(LOGDIR) || :; if BUILD_LINUX_HA rm -f $(DESTDIR)${OCF_RA_DIR_PREFIX}/heartbeat/.ocf-binaries rm -f $(DESTDIR)${OCF_RA_DIR_PREFIX}/heartbeat/.ocf-directories rm -f $(DESTDIR)${OCF_RA_DIR_PREFIX}/heartbeat/.ocf-returncodes rm -f $(DESTDIR)${OCF_RA_DIR_PREFIX}/heartbeat/.ocf-shellfuncs if BUILD_RGMANAGER rm -f $(DESTDIR)${OCF_RA_DIR_PREFIX}/redhat endif endif BUILT_SOURCES = .version .version: echo $(VERSION) > $@-t && mv $@-t $@ dist-hook: gen-ChangeLog $(SPEC) echo $(VERSION) > $(distdir)/.tarball-version rm -f $(distdir)/$(SPEC) && \ cp $(top_srcdir)/$(SPEC) $(distdir)/$(SPEC) gen_start_date = 2000-01-01 .PHONY: gen-ChangeLog gen-ChangeLog: if test -d .git; then \ LC_ALL=C $(top_srcdir)/make/gitlog-to-changelog \ --since=$(gen_start_date) > $(distdir)/cl-t; \ rm -f $(distdir)/ChangeLog.devel; \ mv $(distdir)/cl-t $(distdir)/ChangeLog.devel; \ fi ## make rpm/srpm section. $(SPEC): $(SPEC).in rm -f $@-t $@ date="$(shell LC_ALL=C date "+%a %b %d %Y")" && \ specver="1" && \ rcver="" && \ dirty="" && \ alphatag="" && \ numcomm="" && \ ver="$(VERSION)" && \ if echo $$ver | grep -q -- "-dirty$$"; then \ dirty="dirty" && \ echo VERSION IS DIRTY && \ ver=`echo $$ver | sed -e "s/-dirty$$//"`; \ fi && \ echo $$ver && \ if echo $$ver | grep -q -- "-"; then \ alphatag=`echo $$ver | sed -e "s/.*-//"` && \ echo VERSION HAS ALPHATAG && \ ver=`echo $$ver | sed -e "s/-.*//"`; \ fi && \ echo $$ver && \ if [ -n "$$alphatag" ]; then \ echo VERSION HAS NUMCOMMITS && \ numcomm=`echo $$ver | sed -e 's/.*\.//'` && \ ver=`echo $$ver | sed -e 's/.'$$numcomm'$$//'`; \ fi && \ if echo $$ver | grep -q "\.[[:digit:]]rc[[:digit:]]"; then \ rpmver=`echo $$ver | sed -e "s/rc[[:digit:]].*//g"` && \ rcver=`echo $$ver | sed -e "s/.*\(rc[[:digit:]]\).*/\1/g"` && \ specver="0"; \ else \ rpmver=$$ver; \ fi && \ echo $$rpmver $$rcver && \ sed \ -e "s#@version@#$$rpmver#g" \ -e "s#@alphatag@#$$alphatag#g" \ -e "s#@numcomm@#$$numcomm#g" \ -e "s#@dirty@#$$dirty#g" \ -e "s#@date@#$$date#g" \ -e "s#@specver@#$$specver#g" \ -e "s#@rcver@#$$rcver#g" \ -e "s#@rgmanager@#$(RGMANAGER)#g" \ -e "s#@linux-ha@#$(LINUX_HA)#g" \ -e "s#@compat-habindir@#$(COMPAT_HABINDIR)#g" \ $< > $@-t; \ if [ -z "$$dirty" ]; then sed -i -e "s#%glo.*dirty.*##g" $@-t; fi; \ if [ -z "$$alphatag" ]; then sed -i -e "s#%glo.*alphatag.*##g" $@-t; fi; \ if [ -z "$$numcomm" ]; then sed -i -e "s#%glo.*numcomm.*##g" $@-t; fi; \ if [ -z "$$rcver" ]; then sed -i -e "s#%glo.*rcver.*##g" $@-t; fi chmod a-w $@-t mv $@-t $@ $(TARFILES): $(MAKE) dist RPMBUILDOPTS = --define "_sourcedir $(abs_builddir)" \ --define "_specdir $(abs_builddir)" \ --define "_builddir $(abs_builddir)" \ --define "_srcrpmdir $(abs_builddir)" \ --define "_rpmdir $(abs_builddir)" srpm: clean $(MAKE) $(SPEC) $(TARFILES) rpmbuild $(RPMBUILDOPTS) --nodeps -bs $(SPEC) rpm: clean $(MAKE) $(SPEC) $(TARFILES) rpmbuild $(RPMBUILDOPTS) -ba $(SPEC) +spellcheck: make/spellcheck-ignore +if BUILD_LINUX_HA + $(MAKE) -C heartbeat $@ +endif +if BUILD_RGMANAGER + : not implemented for RGManager-compat agents +endif + clean-generic: rm -rf $(SPEC) $(TARFILES) diff --git a/heartbeat/Makefile.am b/heartbeat/Makefile.am index 8f7d2841a..86d721bb6 100644 --- a/heartbeat/Makefile.am +++ b/heartbeat/Makefile.am @@ -1,202 +1,212 @@ # Makefile.am for OCF RAs # # Author: Sun Jing Dong # Copyright (C) 2004 IBM # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # 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. # MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = $(ocf_SCRIPTS) $(ocfcommon_DATA) \ $(common_DATA) $(hb_DATA) $(dtd_DATA) \ README AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/linux-ha halibdir = $(libexecdir)/heartbeat ocfdir = $(OCF_RA_DIR_PREFIX)/heartbeat dtddir = $(datadir)/$(PACKAGE_NAME) dtd_DATA = ra-api-1.dtd metadata.rng if USE_IPV6ADDR_AGENT ocf_PROGRAMS = IPv6addr else ocf_PROGRAMS = endif if IPV6ADDR_COMPATIBLE halib_PROGRAMS = send_ua else halib_PROGRAMS = endif IPv6addr_SOURCES = IPv6addr.c IPv6addr_utils.c send_ua_SOURCES = send_ua.c IPv6addr_utils.c IPv6addr_LDADD = -lplumb $(LIBNETLIBS) send_ua_LDADD = $(LIBNETLIBS) ocf_SCRIPTS = azure-events \ AoEtarget \ AudibleAlarm \ ClusterMon \ CTDB \ Delay \ Dummy \ EvmsSCC \ Evmsd \ Filesystem \ ICP \ IPaddr \ IPaddr2 \ IPsrcaddr \ LVM \ LinuxSCSI \ lvmlockd \ LVM-activate \ MailTo \ ManageRAID \ ManageVE \ NodeUtilization \ Pure-FTPd \ Raid1 \ Route \ SAPDatabase \ SAPInstance \ SendArp \ ServeRAID \ SphinxSearchDaemon \ Squid \ Stateful \ SysInfo \ VIPArip \ VirtualDomain \ WAS \ WAS6 \ WinPopup \ Xen \ Xinetd \ ZFS \ aliyun-vpc-move-ip \ anything \ apache \ asterisk \ aws-vpc-move-ip \ aws-vpc-route53 \ awseip \ awsvip \ azure-lb \ clvm \ conntrackd \ db2 \ dhcpd \ dnsupdate \ docker \ eDir88 \ ethmonitor \ exportfs \ fio \ galera \ garbd \ gcp-pd-move \ gcp-vpc-move-ip \ gcp-vpc-move-vip \ gcp-vpc-move-route \ iSCSILogicalUnit \ iSCSITarget \ ids \ iface-bridge \ iface-vlan \ ipsec \ iscsi \ jboss \ jira \ kamailio \ lxc \ lxd-info \ machine-info \ mariadb \ minio \ mysql \ mysql-proxy \ nagios \ named \ nfsnotify \ nfsserver \ nginx \ openstack-cinder-volume \ openstack-floating-ip \ openstack-info \ oraasm \ oracle \ oralsnr \ ovsmonitor \ pgagent \ pgsql \ pingd \ podman \ portblock \ postfix \ pound \ proftpd \ rabbitmq-cluster \ redis \ rkt \ rsyncd \ rsyslog \ scsi2reservation \ sfex \ sg_persist \ mpathpersist \ slapd \ sybaseASE \ symlink \ syslog-ng \ tomcat \ varnish \ vmware \ vsftpd \ zabbixserver ocfcommondir = $(OCF_LIB_DIR_PREFIX)/heartbeat ocfcommon_DATA = ocf-shellfuncs \ ocf-binaries \ ocf-directories \ ocf-returncodes \ ocf-rarun \ ocf-distro \ apache-conf.sh \ http-mon.sh \ sapdb-nosha.sh \ sapdb.sh \ lvm-clvm.sh \ lvm-plain.sh \ lvm-tag.sh \ ora-common.sh \ mysql-common.sh \ nfsserver-redhat.sh \ findif.sh \ ocf.py # Legacy locations hbdir = $(sysconfdir)/ha.d hb_DATA = shellfuncs check: $(ocf_SCRIPTS:=.check) %.check: % OCF_ROOT=$(abs_srcdir) OCF_FUNCTIONS_DIR=$(abs_srcdir) ./$< meta-data | xmllint --path $(abs_srcdir) --noout --relaxng $(abs_srcdir)/metadata.rng - + +do_spellcheck = printf '[%s]\n' "$(agent)"; \ + OCF_ROOT=$(abs_srcdir) OCF_FUNCTIONS_DIR=$(abs_srcdir) \ + ./$(agent) meta-data 2>/dev/null \ + | xsltproc $(top_srcdir)/make/extract_text.xsl - \ + | aspell pipe list -d en_US --ignore-case \ + --home-dir=$(top_srcdir)/make -p spellcheck-ignore \ + | sed -n 's|^&\([^:]*\):.*|\1|p'; +spellcheck: + @$(foreach agent,$(ocf_SCRIPTS), $(do_spellcheck)) diff --git a/make/spellcheck-ignore b/make/spellcheck-ignore new file mode 100644 index 000000000..8d8149c4b --- /dev/null +++ b/make/spellcheck-ignore @@ -0,0 +1,165 @@ +personal_ws-1.1 en 500 +abap +acpi +addrlabel +arping +ase +asm +async +awscli +backend +basename +cfg +chroot +chrooted +cib +cidr +cli +clvmd +cmd +cmirrord +conf +config +conntrackd +corosync +crm +cron +csync +ctdb +ctl +dev +devs +dhcp +dhcpd +dirs +dlm +dname +dns +edirectory +exportfs +failover +filesystem +fio +fsck +fsid +fstype +ftpd +fullname +galera +gid +hostname +init +ipaddr +ipc +iptables +iscsi +isql +jboss +jira +jvm +kamailio +kamctl +ldap +ldapsearch +libvirt +libvirtd +localhost +lockd +logfile +loopback +lvm +lvmlockd +lxc +lxd +malloc +manpage +minio +mkdir +mpathpersist +multipath +multistate +mybackend +mysqld +nagios +netmask +nfs +nfsd +ng +ng's +nginx +nof +nsenter +ocf +ocs +olcpidfile +openstack +openvz +oradebug +orauser +param +params +pcmk +pgsql +pid +pidfile +pingd +pipefs +pkill +podman +portblock +postfix +proftpd +prout +qdisk +qemu +rabbitmq +rk +rkt +rpc +rsync +rsyncd +rsyslog +rundir +runtime +sanlock +sapcontrol +saphostagent +sapinstance +sark +sbin +sg +sigkill +sigterm +slapd +statusurl +stderr +stdout +stonith +subdirectory +subnet +sunrpc +sybase +symlink +sysconfig +syslog +systemd +tcp +udp +ulimit +uri +usr +utils +varnishd +vcl +virsh +virtualized +vlan +vmware +vmx +vsftpd +wget +whitespace +xen +xinetd +zabbix +zfs