• R/O
  • SSH

pm_diskd: Commit

※ リポジトリは、pm-diskd ブランチが https://github.com/linux-ha-japan/pm_diskd-1.0 へ、pm-diskd-2.0ブランチが https://github.com/linux-ha-japan/pm_diskd へ移行しました。

Pacemaker 対応ディスク故障監視機能。

Pacemaker-1.0公式リポジトリのクローンに対し、パッチ作成用のブランチを作成して管理する。
ブランチ名: pm-diskd

初回 hg clone 実行後は、hg update -r pm-diskd を実行すること。

Heartbeat-2.1.4 用 hb-diskd(*) のPacemaker対応版
(*) http://sourceforge.jp/projects/linux-ha/releases/?package_id=10555


Commit MetaInfo

Revisionea96e59eae1b98d62c37baa939d53047c15eec04 (tree)
Time2010-10-08 16:10:54
AuthorYoshihikoSATO
CommiterYoshihikoSATO

Log Message

Add pm_diskd.spec, and modify make rpm

Change Summary

Incremental Difference

diff -r 049f1587d11e -r ea96e59eae1b GNUmakefile
--- a/GNUmakefile Fri Oct 08 15:51:35 2010 +0900
+++ b/GNUmakefile Fri Oct 08 16:10:54 2010 +0900
@@ -1,116 +1,26 @@
1-#
2-# Copyright (C) 2008 Andrew Beekhof
3-#
4-# This program is free software; you can redistribute it and/or
5-# modify it under the terms of the GNU General Public License
6-# as published by the Free Software Foundation; either version 2
7-# of the License, or (at your option) any later version.
8-#
9-# This program is distributed in the hope that it will be useful,
10-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-# GNU General Public License for more details.
13-#
14-# You should have received a copy of the GNU General Public License
15-# along with this program; if not, write to the Free Software
16-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17-#
18-
191 -include Makefile
202
21-PACKAGE ?= pacemaker
3+PACKAGE = pm_diskd
224
23-# Force 'make dist' to be consistent with 'make export'
24-#distdir = $(PACKAGE)-$(VERSION)
25-distdir = $(PACKAGE)
26-TARFILE = $(distdir).tar.bz2
27-DIST_ARCHIVES = $(TARFILE)
28-
29-LAST_RELEASE = Pacemaker-1.0.9.1
30-STABLE_SERIES = stable-1.0
5+distdir = $(PACKAGE)
6+TARFILE = $(PACKAGE).tar.bz2
7+SPEC = $(PACKAGE).spec
318
329 RPM_ROOT = $(shell pwd)
3310 RPM_OPTS = --define "_sourcedir $(RPM_ROOT)" \
34- --define "_specdir $(RPM_ROOT)" \
35- --define "_srcrpmdir $(RPM_ROOT)" \
11+ --define "_specdir $(RPM_ROOT)"
3612
37-# Default to fedora compliant spec files
38-# SLES: /etc/SuSE-release
39-# openSUSE: /etc/SuSE-release
40-# RHEL: /etc/redhat-release
41-# Fedora: /etc/fedora-release, /etc/redhat-release, /etc/system-release
42-getdistro = $(shell test -e /etc/SuSE-release || echo fedora; test -e /etc/SuSE-release && echo suse)
43-DISTRO ?= $(call getdistro)
44-TAG ?= tip
13+TAG ?= tip
4514
4615 export:
4716 rm -f $(TARFILE)
4817 hg archive -t tbz2 -r $(TAG) $(TARFILE)
4918 echo `date`: Rebuilt $(TARFILE) from $(TAG)
5019
51-pacemaker-fedora.spec: pacemaker.spec
52- cp $(PACKAGE).spec $(PACKAGE)-$(DISTRO).spec
53- @echo Rebuilt $@
54-
55-pacemaker-epel.spec: pacemaker.spec
56- cp $(PACKAGE).spec $(PACKAGE)-$(DISTRO).spec
57- @echo Rebuilt $@
58-
59-pacemaker-suse.spec: pacemaker.spec
60- cp $(PACKAGE).spec $@
61- sed -i.sed s:%{_docdir}/%{name}:%{_docdir}/%{name}-%{version}:g $@
62- sed -i.sed s:corosynclib:libcorosync:g $@
63- sed -i.sed s:pacemaker-libs:libpacemaker3:g $@
64- sed -i.sed s:heartbeat-libs:heartbeat:g $@
65- sed -i.sed s:cluster-glue-libs:libglue:g $@
66- sed -i.sed s:libselinux-devel:automake:g $@
67- sed -i.sed s:lm_sensors-devel:automake:g $@
68- sed -i.sed s:bzip2-devel:libbz2-devel:g $@
69- sed -i.sed s:Development/Libraries:Development/Libraries/C\ and\ C++:g $@
70- sed -i.sed s:System\ Environment/Daemons:Productivity/Clustering/HA:g $@
71- sed -i.sed s:\#global\ py_sitedir:\%global\ py_sitedir:g $@
72- @echo Rebuilt $@
73-
74-srpm: export $(PACKAGE)-$(DISTRO).spec
20+srpm: export
7521 rm -f *.src.rpm
76- rpmbuild -bs --define "dist .$(DISTRO)" $(RPM_OPTS) $(PACKAGE)-$(DISTRO).spec
22+ rpmbuild -bs --nodeps $(RPM_OPTS) $(SPEC)
7723
7824 rpm: srpm
79- @echo To create custom builds, edit the flags and options in $(PACKAGE)-$(DISTRO).spec first
80- rpmbuild --rebuild $(RPM_ROOT)/*.src.rpm
81-
82-mock: srpm
83- -rm -rf $(RPM_ROOT)/mock
84- mock --root=fedora-12-x86_64 --resultdir=$(RPM_ROOT)/mock --rebuild $(RPM_ROOT)/*.src.rpm
85-
86-scratch:
87- hg commit -m "DO-NOT-PUSH"
88- make mock
89- hg rollback
90-
91-deb:
92- echo To make create custom builds, edit the configure flags in debian/rules first
93- dpkg-buildpackage -rfakeroot -us -uc
94-
95-global: clean-generic
96- gtags -q
25+ rpmbuild -ba $(RPM_OPTS) $(SPEC)
9726
98-global-html: global
99- htags -sanhIT
100-
101-global-www: global-html
102- rsync -avzxlSD --progress HTML/ root@clusterlabs.org:/var/lib/global/pacemaker
103-
104-changes:
105- @printf "\n* `date +"%a %b %d %Y"` `hg showconfig ui.username` $(VERSION)-1"
106- @printf "\n- Update source tarball to revision: `hg id`"
107- @printf "\n- Statistics:\n"
108- @printf " Changesets: `hg log -M --template "{desc|firstline|strip}\n" -r $(LAST_RELEASE):tip | wc -l`\n"
109- @printf " Diff: "
110- @hg diff -r $(LAST_RELEASE):tip | diffstat | tail -n 1
111- @printf "\n- Changes since $(LAST_RELEASE)\n"
112- @hg log -M --template " + {desc|firstline|strip}\n" -r $(LAST_RELEASE):tip | grep -v -e Dev: -e Low: -e Hg: -e "Added tag.*for changeset" | sort -uf
113- @printf "\n"
114-
115-rel-tags: tags
116- find . -name TAGS -exec sed -i.sed 's:\(.*\)/\(.*\)/TAGS:\2/TAGS:g' \{\} \;
diff -r 049f1587d11e -r ea96e59eae1b pm_diskd.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pm_diskd.spec Fri Oct 08 16:10:54 2010 +0900
@@ -0,0 +1,94 @@
1+########################################
2+# Derived definitions
3+########################################
4+%define name pm_diskd
5+%define version 1.0
6+%define release 1.el5
7+%define prefix /usr
8+%define libdir %{_libdir}
9+#
10+%define __check_files %{nil}
11+#
12+#
13+#
14+Summary: Pacemaker Diskcheck Module
15+Name: %{name}
16+Version: %{version}
17+Release: %{release}
18+Group: Applications
19+Source: %{name}.tar.bz2
20+License: GPL/LGPL
21+Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
22+BuildRoot: %{_tmppath}/%{name}-%{version}
23+BuildRequires: make
24+Requires: pacemaker >= 1.0.9
25+
26+########################################
27+%description
28+########################################
29+Pacemaker Diskcheck Module
30+
31+########################################
32+%prep
33+########################################
34+rm -rf $RPM_BUILD_ROOT
35+%setup -q -n %{name}
36+pushd $RPM_BUILD_DIR/%{name}
37+./autogen.sh
38+./configure
39+popd
40+
41+########################################
42+%build
43+########################################
44+pushd $RPM_BUILD_DIR/%{name}/lib
45+make DESTDIR=$RPM_BUILD_ROOT
46+popd
47+pushd $RPM_BUILD_DIR/%{name}/pengine
48+make DESTDIR=$RPM_BUILD_ROOT
49+popd
50+pushd $RPM_BUILD_DIR/%{name}/tools
51+make DESTDIR=$RPM_BUILD_ROOT
52+popd
53+
54+########################################
55+%install
56+########################################
57+pushd $RPM_BUILD_DIR/%{name}/tools
58+make DESTDIR=$RPM_BUILD_ROOT install
59+popd
60+pushd $RPM_BUILD_DIR/%{name}/extra/resources
61+make DESTDIR=$RPM_BUILD_ROOT install
62+popd
63+
64+########################################
65+%clean
66+########################################
67+if
68+ [ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]
69+then
70+ rm -rf $RPM_BUILD_ROOT
71+fi
72+rm -rf $RPM_BUILD_DIR/%{name}
73+
74+########################################
75+%post
76+########################################
77+true
78+########################################
79+%preun
80+########################################
81+true
82+########################################
83+%postun
84+########################################
85+true
86+
87+########################################
88+%files
89+########################################
90+%defattr(755,root,root)
91+
92+%{_libdir}/heartbeat/diskd
93+/usr/lib/ocf/resource.d/pacemaker/diskd
94+
Show on old repository browser