]> git.pld-linux.org Git - packages/ctdb.git/blob - ctdb.spec
- updated to 2.5
[packages/ctdb.git] / ctdb.spec
1 # TODO
2 # - skip interfaces check:
3 #   checking for iface getifaddrs...
4 #   lo         IP=127.0.0.1 NETMASK=255.0.0.0
5 #   eth0       IP=x.x.x.x NETMASK=255.255.252.0
6 # - add support for /sbin/ss instead of /bin/netstat (ss uses kernel netlink
7 #   which is huge win on server with loads of open tcp sockets)
8 # - patch scripts for pld
9 #
10 # Conditional build:
11 %bcond_without  ibverbs         # InfiniBand support
12 %bcond_without  pcp             # Performance Co-Pilot support
13 #
14 Summary:        A Clustered Database based on Samba's Trivial Database (TDB)
15 Summary(pl.UTF-8):      Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB)
16 Name:           ctdb
17 Version:        2.5
18 Release:        1
19 License:        GPL v3+
20 Group:          Daemons
21 Source0:        http://www.samba.org/ftp/ctdb/%{name}-%{version}.tar.gz
22 # Source0-md5:  274db3a1ec3858092ec7dc960bfd0c40
23 Patch0:         %{name}-ib.patch
24 Patch1:         %{name}-format.patch
25 URL:            http://ctdb.samba.org/
26 %{?with_pcp:BuildRequires:      pcp-devel}
27 BuildRequires:  popt-devel
28 BuildRequires:  rpmbuild(macros) >= 1.268
29 BuildRequires:  talloc-devel
30 BuildRequires:  tdb-devel
31 BuildRequires:  tevent-devel
32 %if %{with ibverbs}
33 BuildRequires:  libibverbs-devel
34 BuildRequires:  librdmacm-devel
35 %endif
36 Requires(post,preun):   /sbin/chkconfig
37 Requires:       coreutils
38 Requires:       psmisc
39 Requires:       rc-scripts
40 Requires:       sed
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 CTDB is a cluster implementation of the TDB database used by Samba and
45 other projects to store temporary data. If an application is already
46 using TDB for temporary data it is very easy to convert that
47 application to be cluster aware and use CTDB instead.
48
49 %description -l pl.UTF-8
50 CTDB to klastrowa implementacja bazy danych TDB używanej w Sambie oraz
51 innych projektach do przechowywania danych tymczasowych. Jeśli jakaś
52 aplikacja już wykorzystuje TDB do trzymania danych tymczasowych,
53 bardzo przerobić ją na klastrowalną, wykorzystującą CTDB.
54
55 %package devel
56 Summary:        CTDB clustered database development package
57 Summary(pl.UTF-8):      Pakiet programistyczny klastrowej bazy danych CTDB
58 Group:          Development/Libraries
59 Requires:       tdb-devel
60 # does not require base
61
62 %description devel
63 Header files etc. you can use to develop CTDB applications.
64
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe i inne, przy użyciu których można tworzyć aplikacje
67 wykorzystujące CTDB.
68
69 %package -n pcp-ctdb
70 Summary:        CTDB PMDA
71 Summary(pl.UTF-8):      PMDA CTDB
72 Group:          Applications/System
73 Requires:       %{name} = %{version}-%{release}
74 Requires:       pcp
75
76 %description -n pcp-ctdb
77 This PMDA extracts metrics from the locally running ctdbd daemon for
78 export to PMCD.
79
80 %description -n pcp-ctdb -l pl.UTF-8
81 Ten PMDA odczytuje pomiary z lokalnie działającego demona ctdbd w celu
82 wyeksportowania do PMCD.
83
84 %prep
85 %setup -q
86 %patch0 -p1
87 %patch1 -p1
88
89 %build
90 %configure \
91         %{?with_pcp:--enable-pmda} \
92         %{?with_ibverbs:--enable-infiniband}
93 %{__make} showflags
94 %{__make}
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{systemdunitdir}}
99
100 %{__make} install \
101         DESTDIR=$RPM_BUILD_ROOT
102
103 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
104 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
105 cp -p config/ctdb.service $RPM_BUILD_ROOT%{systemdunitdir}
106 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
107 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/ctdb.conf <<EOF
108 d /var/run/ctdb 0755 root root -
109 EOF
110
111 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
112 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
113
114 # Remove "*.old" files
115 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
116
117 # fix doc path
118 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
119 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %post
125 /sbin/chkconfig --add ctdb
126 %service ctdb restart
127
128 %preun
129 if [ "$1" -eq "0" ] ; then
130         %service ctdb stop
131         /sbin/chkconfig --del ctdb
132 fi
133
134 %files
135 %defattr(644,root,root,755)
136 %{_docdir}/ctdb-%{version}
137 %dir %{_sysconfdir}/ctdb
138 %{_sysconfdir}/ctdb/events.d
139 %{_sysconfdir}/ctdb/nfs-rpc-checks.d
140 %{_sysconfdir}/ctdb/notify.d
141 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
142 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug-hung-script.sh
143 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug_locks.sh
144 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/gcore_trace.sh
145 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
146 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
147 %{_sysconfdir}/ctdb/statd-callout
148 %attr(755,root,root) %{_sbindir}/ctdbd
149 %attr(755,root,root) %{_sbindir}/ctdbd_wrapper
150 %attr(755,root,root) %{_bindir}/ctdb
151 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
152 %attr(755,root,root) %{_bindir}/ctdb_lock_helper
153 %attr(755,root,root) %{_bindir}/ltdbtool
154 %attr(755,root,root) %{_bindir}/onnode
155 %attr(755,root,root) %{_bindir}/ping_pong
156 %attr(755,root,root) %{_bindir}/smnotify
157 %{systemdunitdir}/ctdb.service
158 %{systemdtmpfilesdir}/ctdb.conf
159 %attr(754,root,root) /etc/rc.d/init.d/ctdb
160 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
161 %attr(440,root,root) /etc/sudoers.d/ctdb
162 %dir /var/run/ctdb
163 %{_mandir}/man1/ctdb.1*
164 %{_mandir}/man1/ctdbd.1*
165 %{_mandir}/man1/ltdbtool.1*
166 %{_mandir}/man1/onnode.1*
167 %{_mandir}/man1/ping_pong.1*
168
169 %files devel
170 %defattr(644,root,root,755)
171 %{_includedir}/ctdb*.h
172 %{_pkgconfigdir}/ctdb.pc
173
174 %files -n pcp-ctdb
175 %defattr(644,root,root,755)
176 %dir /var/lib/pcp/pmdas/ctdb
177 %doc /var/lib/pcp/pmdas/ctdb/README
178 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Install
179 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Remove
180 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/pmdactdb
181 /var/lib/pcp/pmdas/ctdb/domain.h
182 /var/lib/pcp/pmdas/ctdb/help
183 /var/lib/pcp/pmdas/ctdb/pmns
This page took 0.069442 seconds and 3 git commands to generate.