mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
292e9d9109
to have one single public ip address for the entire cluster. this ip address is attached to lo on all nodes but only the recmaster will respond to arp requests for this address. the recmaster then runs an ipmux process that will pass any incoming packets to this ip address onto the other node sin the cluster based on the ip address of the client host to use this feature one must 1, have one fixed ip address in the customers network attached permanently attached to an interface 2, set CTDB_PUBLI_INTERFACE= to specify on which interface the clients attach to the node 3, CTDB_SINGLE_PUBLI_IP=ip-address to specify which ipaddress should be the "single public ip address" to test with only one single client, attach several ip addresses to the client and ping the public address from the client with different -I options. look in network trace to see to which node the packet is passed onto. (This used to be ctdb commit 50d648c95e4e6d7c2867a034c2b550086d853320)
118 lines
2.6 KiB
RPMSpec
118 lines
2.6 KiB
RPMSpec
%define initdir %{_sysconfdir}/init.d
|
|
|
|
Summary: Clustered TDB
|
|
Vendor: Samba Team
|
|
Packager: Samba Team <samba@samba.org>
|
|
Name: ctdb
|
|
Version: 1.0
|
|
Release: 11
|
|
Epoch: 0
|
|
License: GNU GPL version 3
|
|
Group: System Environment/Daemons
|
|
URL: http://ctdb.samba.org/
|
|
|
|
Source: ctdb-%{version}.tar.gz
|
|
|
|
Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall
|
|
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
|
|
%setup -T -D -n ctdb-%{version} -q
|
|
|
|
%build
|
|
|
|
CC="gcc"
|
|
|
|
## always run autogen.sh
|
|
./autogen.sh
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
|
|
--prefix=%{_prefix} \
|
|
--sysconfdir=%{_sysconfdir} \
|
|
--mandir=%{_mandir} \
|
|
--localstatedir="/var"
|
|
|
|
make showflags
|
|
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
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
install -m644 config/ctdb.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ctdb
|
|
install -m755 config/ctdb.init $RPM_BUILD_ROOT%{initdir}/ctdb
|
|
|
|
# Remove "*.old" files
|
|
find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \;
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%post
|
|
[ -x /sbin/chkconfig ] && /sbin/chkconfig --add ctdb
|
|
|
|
%preun
|
|
if [ $1 = 0 ] ; then
|
|
[ -x /sbin/chkconfig ] && /sbin/chkconfig --del ctdb
|
|
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
|
|
|
|
%{_sysconfdir}/ctdb/functions
|
|
%{_sysconfdir}/ctdb/events.d/README
|
|
%{_sysconfdir}/ctdb/events.d/00.ctdb
|
|
%{_sysconfdir}/ctdb/events.d/10.interface
|
|
%{_sysconfdir}/ctdb/events.d/40.vsftpd
|
|
%{_sysconfdir}/ctdb/events.d/50.samba
|
|
%{_sysconfdir}/ctdb/events.d/60.nfs
|
|
%{_sysconfdir}/ctdb/events.d/61.nfstickle
|
|
%{_sysconfdir}/ctdb/events.d/90.ipmux
|
|
%{_sysconfdir}/ctdb/statd-callout
|
|
%{_sbindir}/ctdbd
|
|
%{_bindir}/ctdb
|
|
%{_bindir}/smnotify
|
|
%{_bindir}/ctdb_ipmux
|
|
%{_bindir}/ctdb_diagnostics
|
|
%{_bindir}/onnode.ssh
|
|
%{_bindir}/onnode.rsh
|
|
%{_bindir}/onnode
|
|
%{_mandir}/man1/ctdb.1.gz
|
|
%{_mandir}/man1/ctdbd.1.gz
|
|
%{_mandir}/man1/onnode.1.gz
|
|
%{_includedir}/ctdb.h
|
|
%{_includedir}/ctdb_private.h
|