2007-06-03 11:39:11 +04:00
%define initdir %{_sysconfdir}/init.d
2007-05-28 00:48:18 +04:00
Summary : Clustered TDB
Vendor : Samba Team
Packager : Samba Team <samba@samba.org>
Name : ctdb
Version : 1.0
2008-01-06 05:25:17 +03:00
Release : 20
2007-05-28 00:48:18 +04:00
Epoch : 0
2007-07-10 09:29:31 +04:00
License : GNU GPL version 3
2007-05-28 00:48:18 +04:00
Group : System Environment/Daemons
2007-06-01 15:10:49 +04:00
URL : http://ctdb.samba.org/
2007-05-28 00:48:18 +04:00
2007-06-11 06:30:32 +04:00
Source : ctdb-%{version} .tar.gz
2007-05-28 00:48:18 +04:00
2007-06-01 17:33:01 +04:00
Prereq : /sbin/chkconfig /bin/mktemp /usr/bin/killall
2007-05-28 00:48:18 +04:00
Prereq : fileutils sed /etc/init.d
Provides : ctdb = %{version}
Prefix : /usr
BuildRoot : %{_tmppath} /%{name} -%{version} -root
%description
ctdb is the clustered database used by samba
#######################################################################
%prep
%setup -q
# setup the init script and sysconfig file
2007-06-01 17:25:33 +04:00
%setup -T -D -n ctdb-%{version} -q
2007-05-28 00:48:18 +04:00
%build
2007-05-29 09:15:00 +04:00
CC=" g c c "
2007-05-28 00:48:18 +04:00
## always run autogen.sh
./autogen.sh
2007-10-15 07:31:09 +04:00
CFLAGS=" $RPM_OPT_FLAGS $ E X T R A - O 0 - D _ G N U _ S O U R C E " ./configure \
2007-05-28 00:48:18 +04:00
--prefix=%{_prefix} \
2007-05-29 10:23:47 +04:00
--sysconfdir=%{_sysconfdir} \
2007-06-09 09:28:32 +04:00
--mandir=%{_mandir} \
2007-05-29 10:23:47 +04:00
--localstatedir=" / v a r "
2007-05-28 00:48:18 +04:00
2007-05-29 09:52:03 +04:00
make showflags
2007-05-28 00:48:18 +04:00
make
%install
# Clean up in case there is trash left from a previous build
rm -rf $RPM_BUILD_ROOT
# Create the target build directory hierarchy
mkdir -p $RPM_BUILD_ROOT %{_sysconfdir} /sysconfig
2007-06-03 11:39:11 +04:00
mkdir -p $RPM_BUILD_ROOT %{_sysconfdir} /init.d
2007-05-28 00:48:18 +04:00
2007-05-29 09:15:00 +04:00
make DESTDIR=$RPM_BUILD_ROOT install
2007-05-28 00:48:18 +04:00
2007-06-02 13:40:07 +04:00
install -m644 config/ctdb.sysconfig $RPM_BUILD_ROOT %{_sysconfdir} /sysconfig/ctdb
install -m755 config/ctdb.init $RPM_BUILD_ROOT %{initdir} /ctdb
2007-05-29 16:53:28 +04:00
2007-05-28 00:48:18 +04:00
# Remove "*.old" files
find $RPM_BUILD_ROOT -name " * . o l d " -exec rm -f {} \;
%clean
rm -rf $RPM_BUILD_ROOT
%post
2007-06-01 17:25:33 +04:00
[ -x /sbin/chkconfig ] && /sbin/chkconfig --add ctdb
2007-05-28 00:48:18 +04:00
%preun
if [ $1 = 0 ] ; then
2007-06-01 17:25:33 +04:00
[ -x /sbin/chkconfig ] && /sbin/chkconfig --del ctdb
2007-05-28 00:48:18 +04:00
fi
exit 0
%postun
if [ " $ 1 " -ge " 1 " ]; then
%{initdir} /ctdb restart >/dev/null 2>&1
fi
#######################################################################
## Files section ##
#######################################################################
%files
%defattr (-,root,root)
%config (noreplace) %{_sysconfdir} /sysconfig/ctdb
%attr (755,root,root) %config %{initdir} /ctdb
2007-06-01 14:54:26 +04:00
%{_sysconfdir} /ctdb/functions
2007-08-15 05:36:01 +04:00
%{_sysconfdir} /ctdb/events.d/README
2007-08-15 09:01:31 +04:00
%{_sysconfdir} /ctdb/events.d/00.ctdb
2007-06-04 09:09:03 +04:00
%{_sysconfdir} /ctdb/events.d/10.interface
2007-06-05 12:14:01 +04:00
%{_sysconfdir} /ctdb/events.d/40.vsftpd
2007-06-04 09:09:03 +04:00
%{_sysconfdir} /ctdb/events.d/50.samba
%{_sysconfdir} /ctdb/events.d/60.nfs
2007-07-06 04:54:42 +04:00
%{_sysconfdir} /ctdb/events.d/61.nfstickle
2007-10-08 08:05:22 +04:00
%{_sysconfdir} /ctdb/events.d/90.ipmux
2008-01-07 06:31:13 +03:00
%{_sysconfdir} /ctdb/events.d/91.lvs
2007-05-31 05:09:45 +04:00
%{_sysconfdir} /ctdb/statd-callout
2007-05-29 09:15:00 +04:00
%{_sbindir} /ctdbd
%{_bindir} /ctdb
2007-08-04 04:16:37 +04:00
%{_bindir} /smnotify
2007-10-08 08:05:22 +04:00
%{_bindir} /ctdb_ipmux
2007-09-05 08:20:34 +04:00
%{_bindir} /ctdb_diagnostics
2007-05-30 05:17:52 +04:00
%{_bindir} /onnode.ssh
%{_bindir} /onnode.rsh
%{_bindir} /onnode
2007-06-09 09:28:32 +04:00
%{_mandir} /man1/ctdb.1.gz
2007-06-10 04:45:52 +04:00
%{_mandir} /man1/ctdbd.1.gz
2007-06-12 07:44:01 +04:00
%{_mandir} /man1/onnode.1.gz
2007-05-28 00:48:18 +04:00
%{_includedir} /ctdb.h
2007-05-29 16:53:28 +04:00
%{_includedir} /ctdb_private.h
2007-12-04 07:50:43 +03:00
%changelog
2008-01-06 05:25:17 +03:00
* Sun Jan 06 2008 : Version 1.0.20
- new transaction based recovery code
2008-01-05 01:52:53 +03:00
* Sat Jan 05 2008 : Version 1.0.19
- fixed non-master bug
- big speedup in recovery for large databases
- lots of changes to improve tdb and ctdb for high churn databases
2007-12-27 02:19:09 +03:00
* Thu Dec 27 2007 : Version 1.0.18
- fixed crash bug in monitor_handler
2007-12-04 07:50:43 +03:00
* Tue Dec 04 2007 : Version 1.0.17
- fixed bugs related to ban/unban of nodes
- fixed a race condition that could lead to monitoring being permanently disabled,
which would lead to long recovery times
- make deterministic IPs the default
- fixed a bug related to continuous recovery
- added a debugging option --node-ip