]>
Commit | Line | Data |
---|---|---|
435fef0d | 1 | %include /usr/lib/rpm/macros.perl |
fb499b48 | 2 | Summary: Reusable cluster resource scripts |
187a7368 | 3 | Summary(pl.UTF-8): Skrypty wielokrotnego użytku do obsługi zasobów klastrowych |
fb499b48 | 4 | Name: resource-agents |
90af1b64 JB |
5 | Version: 3.9.6 |
6 | Release: 1 | |
187a7368 | 7 | License: GPL v2+, LGPL v2.1+ |
fb499b48 | 8 | Group: Daemons |
90af1b64 JB |
9 | Source0: https://github.com/ClusterLabs/resource-agents/archive/v%{version}/%{name}-%{version}.tar.gz |
10 | # Source0-md5: 6873d5a217aee3026193fb85bfa18a4a | |
ad00dd5b | 11 | Source1: ldirectord.init |
4903c17c | 12 | Source2: %{name}.tmpfiles |
bdbf8211 | 13 | Patch0: %{name}-no_header_parsing.patch |
53cd79e0 | 14 | Patch1: %{name}-bash.patch |
a3f1a2a9 | 15 | Patch2: %{name}-ac.patch |
187a7368 JB |
16 | URL: http://www.linux-ha.org/ |
17 | BuildRequires: autoconf >= 2.63 | |
18 | BuildRequires: automake >= 1:1.10.1 | |
fb499b48 | 19 | BuildRequires: cluster-glue-libs-devel |
fd5fc126 | 20 | BuildRequires: docbook-dtd44-xml |
fb499b48 | 21 | BuildRequires: docbook-style-xsl |
187a7368 JB |
22 | BuildRequires: glib2-devel >= 2.0 |
23 | BuildRequires: libnet-devel >= 1.0 | |
fd5fc126 | 24 | BuildRequires: libtool |
25 | BuildRequires: libxslt-progs | |
26 | BuildRequires: openssl-tools | |
187a7368 | 27 | BuildRequires: perl-tools-pod |
fb499b48 ER |
28 | BuildRequires: pkgconfig |
29 | BuildRequires: python-devel | |
435fef0d | 30 | BuildRequires: rpm-perlprov |
fb499b48 | 31 | BuildRequires: which |
4544edf5 | 32 | Requires: cluster-glue |
fb499b48 ER |
33 | Obsoletes: heartbeat-resources < 3.0 |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | Scripts to allow common services to operate in a High Availability | |
38 | environment. | |
39 | ||
187a7368 JB |
40 | %description -l pl.UTF-8 |
41 | Skrypty pozwalające na działanie popularnych usług w środowisku | |
42 | wysokiej dostępności (High Availability). | |
43 | ||
fb499b48 ER |
44 | %package -n ldirectord |
45 | Summary: A Monitoring Daemon for Maintaining High Availability Resources | |
187a7368 | 46 | Summary(pl.UTF-8): Demon monitorujący do utrzymywania zasobów z wysoką dostępnością |
fb499b48 ER |
47 | License: GPL v2+ |
48 | Group: Applications/System | |
ad00dd5b | 49 | Requires(post,preun): /sbin/chkconfig |
fb499b48 | 50 | Requires: ipvsadm |
ad00dd5b | 51 | Requires: rc-scripts |
fb499b48 ER |
52 | Provides: heartbeat-ldirectord |
53 | Obsoletes: heartbeat-ldirectord | |
54 | ||
55 | %description -n ldirectord | |
187a7368 JB |
56 | The Linux Director Daemon (ldirectord) is a stand alone daemon for |
57 | monitoring the services on real servers. Currently, HTTP, HTTPS, and | |
58 | FTP services are supported. ldirectord is simple to install and works | |
59 | with the heartbeat code (http://www.linux-ha.org/). | |
fb499b48 | 60 | |
187a7368 JB |
61 | %description -n ldirectord -l pl.UTF-8 |
62 | Demon Linux Director (ldirectord) to samodzielny demon do | |
63 | monitorowania usług na rzeczywistych serwerach. Obecnie obsługiwane są | |
64 | usługi HTTP, HTTPS i FTP. ldirectord jest prosty do zainstalowania i | |
65 | współpracuje z kodem heartbeat (http://www.linux-ha.org/). | |
fb499b48 ER |
66 | |
67 | %prep | |
90af1b64 | 68 | %setup -q |
bdbf8211 | 69 | %patch0 -p1 |
53cd79e0 | 70 | %patch1 -p1 |
a3f1a2a9 | 71 | %patch2 -p1 |
fb499b48 ER |
72 | |
73 | %build | |
74 | %{__libtoolize} | |
75 | %{__aclocal} | |
a3f1a2a9 | 76 | %{__autoconf} |
fb499b48 ER |
77 | %{__autoheader} |
78 | %{__automake} | |
fb499b48 | 79 | %configure \ |
63a87a2f ER |
80 | FSCK=/sbin/fsck \ |
81 | FUSER=/bin/fuser \ | |
2f11abc1 | 82 | IPTABLES=%{_sbindir}/iptables \ |
63a87a2f ER |
83 | MAILCMD=/bin/mail \ |
84 | MOUNT=/bin/mount \ | |
85 | PING=/bin/ping \ | |
187a7368 JB |
86 | --docdir=%{_docdir}/%{name}-%{version} \ |
87 | --enable-fatal-warnings \ | |
fb499b48 | 88 | --with-initdir=/etc/rc.d/init.d \ |
90af1b64 JB |
89 | --with-ocf-root=%{_prefix}/lib/ocf \ |
90 | --with-systemdsystemunitdir=%{systemdunitdir} | |
fb499b48 ER |
91 | |
92 | %{__make} | |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
4903c17c ŁK |
96 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d \ |
97 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} | |
bdbf8211 | 98 | |
fb499b48 ER |
99 | %{__make} install \ |
100 | DESTDIR=$RPM_BUILD_ROOT | |
101 | ||
2dfad878 | 102 | # in doc |
187a7368 | 103 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/ra-api-1.dtd |
2dfad878 | 104 | |
187a7368 | 105 | %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord |
ad00dd5b ER |
106 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord |
107 | cp -a ldirectord/ldirectord.cf $RPM_BUILD_ROOT%{_sysconfdir}/ha.d | |
4903c17c | 108 | install %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
fb499b48 | 109 | |
fb499b48 | 110 | # Unset execute permissions from things that shouln't have it |
435fef0d | 111 | find $RPM_BUILD_ROOT%{_datadir} -name 'ocf-*' -type f -print0 | xargs -0 chmod a-x |
fb499b48 | 112 | |
2ee01ec2 JR |
113 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
114 | ||
fb499b48 ER |
115 | %clean |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
ad00dd5b | 118 | %post -n ldirectord |
fb499b48 | 119 | /sbin/chkconfig --add ldirectord |
ad00dd5b ER |
120 | %service ldirectord restart |
121 | ||
122 | %preun -n ldirectord | |
123 | if [ "$1" = "0" ]; then | |
124 | %service -q ldirectord stop | |
125 | /sbin/chkconfig --del ldirectord | |
126 | fi | |
fb499b48 ER |
127 | |
128 | %files | |
129 | %defattr(644,root,root,755) | |
a3f1a2a9 | 130 | %doc AUTHORS ChangeLog doc/README.webapps heartbeat/ra-api-1.dtd |
fb499b48 | 131 | %attr(755,root,root) %{_sbindir}/ocf-tester |
2f11abc1 | 132 | %attr(755,root,root) %{_sbindir}/ocft |
fb499b48 | 133 | %attr(755,root,root) %{_sbindir}/sfex_init |
2f11abc1 | 134 | %attr(755,root,root) %{_sbindir}/sfex_stat |
6b4315c3 | 135 | %attr(755,root,root) %{_sbindir}/rhev-check.sh |
187a7368 | 136 | |
bdbf8211 JK |
137 | %dir %{_sysconfdir}/ha.d |
138 | %dir %{_sysconfdir}/ha.d/resource.d | |
fb499b48 | 139 | %{_sysconfdir}/ha.d/shellfuncs |
187a7368 JB |
140 | |
141 | %attr(755,root,root) %{_libdir}/heartbeat/send_arp | |
a3f1a2a9 | 142 | %attr(755,root,root) %{_libdir}/heartbeat/send_ua |
187a7368 JB |
143 | %attr(755,root,root) %{_libdir}/heartbeat/sfex_daemon |
144 | %attr(755,root,root) %{_libdir}/heartbeat/findif | |
145 | %attr(755,root,root) %{_libdir}/heartbeat/tickle_tcp | |
146 | ||
6b4315c3 | 147 | %dir %{_prefix}/lib/ocf |
6b4315c3 | 148 | %dir %{_prefix}/lib/ocf/lib |
149 | %dir %{_prefix}/lib/ocf/lib/heartbeat | |
187a7368 JB |
150 | %{_prefix}/lib/ocf/lib/heartbeat/ocf-* |
151 | %{_prefix}/lib/ocf/lib/heartbeat/*.sh | |
152 | %dir %{_prefix}/lib/ocf/resource.d | |
153 | %dir %{_prefix}/lib/ocf/resource.d/heartbeat | |
154 | %{_prefix}/lib/ocf/resource.d/heartbeat/.ocf-* | |
6b4315c3 | 155 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/heartbeat/* |
187a7368 JB |
156 | %{_prefix}/lib/ocf/resource.d/redhat |
157 | ||
158 | %dir %{_datadir}/cluster | |
6b4315c3 | 159 | %{_datadir}/cluster/*.metadata |
187a7368 | 160 | %attr(755,root,root) %{_datadir}/cluster/*.sh |
6b4315c3 | 161 | %{_datadir}/cluster/SAP* |
162 | %{_datadir}/cluster/svclib_nfslock | |
163 | %{_datadir}/cluster/ocf-shellfuncs | |
187a7368 | 164 | %dir %{_datadir}/cluster/relaxng |
6b4315c3 | 165 | %{_datadir}/cluster/relaxng/* |
187a7368 | 166 | %dir %{_datadir}/cluster/utils |
6b4315c3 | 167 | %attr(755,root,root) %{_datadir}/cluster/utils/* |
187a7368 JB |
168 | |
169 | %{_datadir}/resource-agents | |
170 | ||
171 | %{_includedir}/heartbeat/agent_config.h | |
172 | ||
173 | %attr(1755,root,root) /var/run/resource-agents | |
174 | %{systemdtmpfilesdir}/%{name}.conf | |
175 | ||
176 | %{_mandir}/man7/ocf_heartbeat_*.7* | |
6b4315c3 | 177 | %{_mandir}/man8/ocf-tester.8* |
178 | %{_mandir}/man8/sfex_init.8* | |
179 | ||
fb499b48 ER |
180 | %files -n ldirectord |
181 | %defattr(644,root,root,755) | |
ad00dd5b | 182 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ha.d/ldirectord.cf |
ad00dd5b | 183 | %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/ldirectord |
187a7368 | 184 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ldirectord |
fb499b48 | 185 | %attr(754,root,root) /etc/rc.d/init.d/ldirectord |
90af1b64 | 186 | %{systemdunitdir}/ldirectord.service |
187a7368 JB |
187 | %attr(755,root,root) %{_sbindir}/ldirectord |
188 | %{_mandir}/man8/ldirectord.8* |