]>
Commit | Line | Data |
---|---|---|
1aa91be3 | 1 | # NOTE: obsoleted by -cman subpackages from cluster.spec (3.x) |
ed6d5f29 | 2 | # |
3 | # Conditional build: | |
e8fc3769 | 4 | %bcond_with libonly # build package only with lib (needed bootstrap with ccs) |
ed6d5f29 | 5 | # |
762dc73d | 6 | Summary: General-purpose symmetric cluster manager |
8f0dac7b | 7 | Summary(pl.UTF-8): Zarządca symetrycznych klastrów ogólnego przeznaczenia |
cb602c2e | 8 | Name: cman |
1aa91be3 JB |
9 | Version: 2.03.11 |
10 | Release: 1 | |
c66b6748 | 11 | License: GPL v2 |
cb602c2e | 12 | Group: Applications/System |
a6bd5743 | 13 | Source0: ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz |
1aa91be3 | 14 | # Source0-md5: 712b9f583472d1de614641bc0f4a0aaf |
c1252bfc | 15 | Source1: %{name}.init |
16 | Source2: %{name}.sysconfig | |
1aa91be3 | 17 | Patch0: cluster-kernel.patch |
c31c0e69 | 18 | URL: http://sources.redhat.com/cluster/cman/ |
74ef85ee | 19 | %{!?with_libonly:BuildRequires: ccs-devel >= 2.03.10} |
e6276ceb | 20 | BuildRequires: ncurses-devel |
1aa91be3 | 21 | %{!?with_libonly:BuildRequires: openais-devel < 1.0} |
c66b6748 | 22 | BuildRequires: perl-base |
e8fc3769 | 23 | Requires: %{name}-libs = %{version}-%{release} |
cb602c2e AM |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %define _sbindir /sbin | |
27 | ||
e8fc3769 JB |
28 | # aliasing problems in qdisk/disk.c |
29 | %define specflags -fno-strict-aliasing | |
30 | ||
cb602c2e AM |
31 | %description |
32 | MAN is a symmetric, general-purpose, kernel-based cluster manager. It | |
33 | has two parts. Connection Manager (cnxman) handles membership, | |
34 | messaging, quorum, event notification and transitions. Service Manager | |
35 | (sm) handles "service groups" which are a general way of representing | |
36 | and managing instances of external systems that require cluster | |
37 | management. The CMAN cluster manager is the foundational system upon | |
38 | which DLM, GFS, CLVM, and Fence all depend. The CMAN API in the kernel | |
39 | and userspace is general and available for other programs to use. | |
40 | ||
6153d48e JR |
41 | %description -l pl.UTF-8 |
42 | MAN to zarządca opartych na jądrze symetrycznych klastrów ogólnego | |
43 | przeznaczenia. Składa się z dwóch części. Zarządca połączeń | |
44 | (Connection Manager, cnxman) obsługuje członkostwo, komunikację, | |
45 | kworum, powiadamianie o zdarzeniach i przejścia. Zarządca usług | |
46 | (Service Manager, sm) obsługuje "grupy usług", które są ogólnym | |
47 | sposobem reprezentacji i zarządzania instancjami zewnętrznych systemów | |
48 | wymagających zarządzania klastrem. Zarządca klastrów CMAN to | |
49 | podstawowy system, na którym polegają DLM, GFS, CLVM i Fence. API | |
50 | CMAN-a w jądrze i przestrzeni użytkownika jest ogólne i w całości | |
51 | dostępne do wykorzystania w innych programach. | |
762dc73d | 52 | |
e8fc3769 JB |
53 | %package libs |
54 | Summary: CMAN library | |
55 | Summary(pl.UTF-8): Biblioteka CMAN | |
56 | Group: Libraries | |
f24bf85c JB |
57 | Obsoletes: gulm |
58 | Obsoletes: gulm-devel | |
59 | Obsoletes: gulm-static | |
334cd07c | 60 | Obsoletes: iddev |
f24bf85c JB |
61 | Obsoletes: magma |
62 | Obsoletes: magma-devel | |
63 | Obsoletes: magma-plugins | |
64 | Obsoletes: magma-static | |
48676e79 | 65 | Conflicts: cman < 2.00.00-2 |
e8fc3769 JB |
66 | |
67 | %description libs | |
68 | CMAN library. | |
69 | ||
70 | %description libs -l pl.UTF-8 | |
71 | Biblioteka CMAN. | |
72 | ||
9d5dca7b JB |
73 | %package devel |
74 | Summary: CMAN header files | |
8f0dac7b | 75 | Summary(pl.UTF-8): Pliki nagłówkowe CMAN |
9d5dca7b | 76 | Group: Development/Libraries |
e8fc3769 | 77 | Requires: %{name}-libs = %{version}-%{release} |
9d5dca7b JB |
78 | |
79 | %description devel | |
80 | CMAN header files. | |
81 | ||
6153d48e JR |
82 | %description devel -l pl.UTF-8 |
83 | Pliki nagłówkowe CMAN. | |
9d5dca7b | 84 | |
a6bd5743 AM |
85 | %package static |
86 | Summary: CMAN static library | |
8f0dac7b | 87 | Summary(pl.UTF-8): Biblioteka statyczna CMAN |
a6bd5743 | 88 | Group: Development/Libraries |
4a979529 | 89 | Requires: %{name}-devel = %{version}-%{release} |
c66b6748 | 90 | |
a6bd5743 AM |
91 | %description static |
92 | CMAN static library. | |
c66b6748 | 93 | |
fbced621 | 94 | %description static -l pl.UTF-8 |
a6bd5743 AM |
95 | Biblioteka statyczna CMAN. |
96 | ||
97 | %prep | |
98 | %setup -q -n cluster-%{version} | |
1aa91be3 | 99 | %patch0 -p1 |
a6bd5743 | 100 | |
e06c11ed JB |
101 | # there are warnings caused by some unused variables |
102 | %{__sed} -i -e 's/-Werror //' %{name}/qdisk/Makefile | |
103 | ||
cb602c2e AM |
104 | %build |
105 | ./configure \ | |
74ef85ee JB |
106 | --cc="%{__cc}" \ |
107 | --cflags="%{rpmcflags} -Wall" \ | |
108 | --ldflags="%{rpmldflags}" \ | |
cb602c2e | 109 | --incdir=%{_includedir} \ |
e6276ceb | 110 | --ncursesincdir=%{_includedir}/ncurses \ |
cb602c2e | 111 | --libdir=%{_libdir} \ |
a4c8a87c | 112 | --libexecdir=%{_libdir} \ |
cb602c2e AM |
113 | --mandir=%{_mandir} \ |
114 | --prefix=%{_prefix} \ | |
74ef85ee JB |
115 | --sbindir=%{_sbindir} \ |
116 | --without_gfs \ | |
117 | --without_gfs2 \ | |
118 | --without_gnbd \ | |
119 | --without_kernel_modules | |
e6276ceb | 120 | |
74ef85ee | 121 | %{__make} -C %{name}%{?with_libonly:/lib} |
cb602c2e AM |
122 | |
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
c1252bfc | 125 | install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d} |
cb602c2e | 126 | |
e8fc3769 | 127 | %{__make} -C %{name}%{?with_libonly:/lib} install \ |
cb602c2e AM |
128 | DESTDIR=$RPM_BUILD_ROOT |
129 | ||
74ef85ee | 130 | %if %{without libonly} |
e8fc3769 JB |
131 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
132 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
74ef85ee | 133 | %endif |
c1252bfc | 134 | |
cb602c2e AM |
135 | %clean |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
b6ba0aed | 138 | %post |
c1252bfc | 139 | /sbin/chkconfig --add %{name} |
140 | ||
c1252bfc | 141 | %preun |
142 | if [ "$1" = "0" ]; then | |
143 | %service -q %{name} stop | |
144 | /sbin/chkconfig --del %{name} | |
145 | fi | |
146 | ||
e8fc3769 JB |
147 | %post libs -p /sbin/ldconfig |
148 | %postun libs -p /sbin/ldconfig | |
149 | ||
58a4b58e | 150 | %if %{without libonly} |
cb602c2e AM |
151 | %files |
152 | %defattr(644,root,root,755) | |
c1252bfc | 153 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
154 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
e06c11ed | 155 | # TODO: PLDify |
e8fc3769 | 156 | #%attr(754,root,root) /etc/rc.d/init.d/qdiskd |
e06c11ed JB |
157 | %attr(755,root,root) %{_sbindir}/cman_tool |
158 | %attr(755,root,root) %{_sbindir}/mkqdisk | |
159 | %attr(755,root,root) %{_sbindir}/qdiskd | |
a4c8a87c | 160 | %attr(755,root,root) %{_libdir}/lcrso/service_cman.lcrso |
c66b6748 | 161 | %{_mandir}/man5/cman.5* |
46f80b5f | 162 | %{_mandir}/man5/qdisk.5* |
c66b6748 | 163 | %{_mandir}/man8/cman_tool.8* |
46f80b5f JB |
164 | %{_mandir}/man8/mkqdisk.8* |
165 | %{_mandir}/man8/qdiskd.8* | |
ed6d5f29 | 166 | %endif |
9d5dca7b | 167 | |
e8fc3769 JB |
168 | %files libs |
169 | %defattr(644,root,root,755) | |
170 | %attr(755,root,root) %{_libdir}/libcman.so.*.* | |
74ef85ee | 171 | %attr(755,root,root) %ghost %{_libdir}/libcman.so.2 |
e8fc3769 | 172 | |
9d5dca7b JB |
173 | %files devel |
174 | %defattr(644,root,root,755) | |
0cbf36cb | 175 | %attr(755,root,root) %{_libdir}/libcman.so |
74ef85ee | 176 | %{_includedir}/libcman.h |
a6bd5743 AM |
177 | |
178 | %files static | |
179 | %defattr(644,root,root,755) | |
0cbf36cb | 180 | %{_libdir}/libcman.a |