ctdb-scripts: Parameterise 60.nfs with $CTDB_NFS_CALLOUT
[nivanova/samba-autobuild/.git] / ctdb / packaging / RPM / ctdb.spec.in
index b7d1befc4cdb46bccec0779c27a34db21f922585..25d2be7e2b5f42dbcf36c90763754682198c3b74 100644 (file)
@@ -28,14 +28,18 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
 #      "--with system_talloc"
 #      "--with system_tdb"
 #      "--with system_tevent"
-%define with_included_talloc %{?_with_system_talloc: 0} %{?!_with_system_talloc: 1}
-%define with_included_tdb %{?_with_system_tdb: 0} %{?!_with_system_tdb: 1}
-%define with_included_tevent %{?_with_system_tevent: 0} %{?!_with_system_tevent: 1}
+#%define with_included_talloc %{?_with_system_talloc: 0} %{?!_with_system_talloc: 1}
+#%define with_included_tdb %{?_with_system_tdb: 0} %{?!_with_system_tdb: 1}
+#%define with_included_tevent %{?_with_system_tevent: 0} %{?!_with_system_tevent: 1}
+
+%define with_included_talloc 0
+%define with_included_tevent 0
+%define with_included_tdb 0
 
 # Required minimum library versions when building with system libraries
 %define libtalloc_version 2.0.8
 %define libtdb_version 1.2.11
-%define libtevent_version 0.9.18
+%define libtevent_version 0.9.16
 
 %if ! %with_included_talloc
 BuildRequires: libtalloc-devel >= %{libtalloc_version}
@@ -83,29 +87,20 @@ fi
 
 export CC
 
-## always run autogen.sh
-./autogen.sh
-
-CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
-%if %with_included_talloc
-       --with-included-talloc \
-%endif
-%if %with_included_tdb
-       --with-included-tdb \
-%endif
-%if %with_included_tevent
-       --with-included-tevent \
-%endif
+CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./buildtools/bin/waf configure \
+       --builtin-libraries=replace,popt \
+       --bundled-libraries=!talloc,!tevent,!tdb \
+       --minimum-library-version=talloc:%libtalloc_version,tdb:%libtdb_version,tevent:%libtevent_version \
 %if %with_pcp_pmda
        --enable-pmda \
 %endif
        --prefix=%{_prefix} \
+       --libdir=%{_libdir} \
        --sysconfdir=%{_sysconfdir} \
        --mandir=%{_mandir} \
        --localstatedir="/var"
 
-make docdir=%{_docdir} showflags
-make docdir=%{_docdir}
+./buildtools/bin/waf build
 
 %install
 # Clean up in case there is trash left from a previous build
@@ -115,7 +110,7 @@ rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d
 
-make DESTDIR=$RPM_BUILD_ROOT docdir=%{_docdir} install install_tests
+DESTDIR=$RPM_BUILD_ROOT ./buildtools/bin/waf install
 
 install -m644 config/ctdb.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ctdb
 
@@ -127,7 +122,11 @@ mkdir -p $RPM_BUILD_ROOT%{initdir}
 install -m755 config/ctdb.init $RPM_BUILD_ROOT%{initdir}/ctdb
 %endif
 
+# This is a hack. All documents should be installed in /usr/share/doc.
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ctdb/events.d/README
 cp config/events.d/README README.eventscripts
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ctdb/nfs-checks.d/README
+cp config/nfs-checks.d/README README.nfs-checks.d
 cp config/notify.d.README README.notify.d
 
 # Remove "*.old" files
@@ -169,6 +168,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/ctdb/events.d/00.ctdb
 %{_sysconfdir}/ctdb/events.d/01.reclock
 %{_sysconfdir}/ctdb/events.d/10.interface
+%{_sysconfdir}/ctdb/events.d/10.external
 %{_sysconfdir}/ctdb/events.d/13.per_ip_routing
 %{_sysconfdir}/ctdb/events.d/11.natgw
 %{_sysconfdir}/ctdb/events.d/11.routing
@@ -185,26 +185,35 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/ctdb/events.d/70.iscsi
 %{_sysconfdir}/ctdb/events.d/91.lvs
 %{_sysconfdir}/ctdb/events.d/99.timeout
-%config(noreplace) %{_sysconfdir}/ctdb/nfs-rpc-checks.d/10.statd.check
-%config(noreplace) %{_sysconfdir}/ctdb/nfs-rpc-checks.d/20.nfsd.check
-%config(noreplace) %{_sysconfdir}/ctdb/nfs-rpc-checks.d/30.lockd.check
-%config(noreplace) %{_sysconfdir}/ctdb/nfs-rpc-checks.d/40.mountd.check
-%config(noreplace) %{_sysconfdir}/ctdb/nfs-rpc-checks.d/50.rquotad.check
+%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/10.status.check
+%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/20.nfs.check
+%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/30.nlockmgr.check
+%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/40.mountd.check
+%config(noreplace) %{_sysconfdir}/ctdb/nfs-checks.d/50.rquotad.check
 %{_sysconfdir}/ctdb/statd-callout
+%{_sysconfdir}/ctdb/nfs-linux-kernel-callout
 %{_sbindir}/ctdbd
 %{_sbindir}/ctdbd_wrapper
 %{_bindir}/ctdb
 %{_bindir}/ctdb_lock_helper
+%{_bindir}/ctdb_event_helper
 %{_bindir}/smnotify
 %{_bindir}/ping_pong
 %{_bindir}/ltdbtool
 %{_bindir}/ctdb_diagnostics
 %{_bindir}/onnode
+%dir %{_libdir}
+%{_libdir}/ctdb/lib*
 %{_mandir}/man1/ctdb.1.gz
 %{_mandir}/man1/ctdbd.1.gz
+%{_mandir}/man1/ctdbd_wrapper.1.gz
 %{_mandir}/man1/onnode.1.gz
 %{_mandir}/man1/ltdbtool.1.gz
 %{_mandir}/man1/ping_pong.1.gz
+%{_mandir}/man5/ctdbd.conf.5.gz
+%{_mandir}/man7/ctdb.7.gz
+%{_mandir}/man7/ctdb-statistics.7.gz
+%{_mandir}/man7/ctdb-tunables.7.gz
 %{_libdir}/pkgconfig/ctdb.pc
 
 
@@ -222,6 +231,7 @@ development libraries for ctdb
 %{_includedir}/ctdb_protocol.h
 %{_includedir}/ctdb_private.h
 %{_includedir}/ctdb_typesafe_cb.h
+%{_includedir}/ctdb_version.h
 
 %package tests
 Summary: CTDB test suite
@@ -290,7 +300,7 @@ Performance Co-Pilot (PCP) support for CTDB
  - New version 1.10
 * Tue May 25 2010 : Version 1.9
  - Lots of changes
-* Wed Mar 25 2010 : Version 1.0.114
+* Thu Mar 25 2010 : Version 1.0.114
  - Lots of changes from Metze
 * Wed Jan 13 2010 : Version 1.0.113
  - Incorrect use of dup2() could cause ctdb to spin eating 100% cpu.
@@ -416,7 +426,7 @@ Performance Co-Pilot (PCP) support for CTDB
  - Try to avoid running the "monitor" event when databases are frozen.
  - Add logging for every time we create a filedescriptor so we can trap
    fd leaks.
-* Thu Oct 14 2009 : Version 1.0.97
+* Wed Oct 14 2009 : Version 1.0.97
  - From martins : update onnode.
    Update onnode to allow specifying an alternative nodes file from
    the command line and also to be able to specify hostnames on the
@@ -446,9 +456,9 @@ Performance Co-Pilot (PCP) support for CTDB
    while waiting for the second databaso to become locked.
  - Be aggressive and ban nodes where the recovery transaction start call
    fails.
-* Thu Oct 10 2009 : Version 1.0.94
+* Sat Oct 10 2009 : Version 1.0.94
  - Be very aggressive and quickly ban nodes that can not freeze their databases
-* Tue Oct 8 2009 : Version 1.0.93
+* Thu Oct 8 2009 : Version 1.0.93
  - When adding an ip, make sure to update this assignment on all nodes
    so it wont show up as -1 on other nodes.
  - When adding an ip and immediately deleting it, it was possible that
@@ -620,7 +630,7 @@ Performance Co-Pilot (PCP) support for CTDB
  - include 11.natgw eventscript in thew install so that the NATGW feature works
 * Tue Mar 31 2009 : Version 1.0.77
  - Update the 99.routing eventscript to also try to add the routes (back) during a releaseip event. Similar to the reasons why we must add addresses back during releaseip in 10.interfaces
-* Wed Mar 24 2009 : Version 1.0.76
+* Wed Mar 25 2009 : Version 1.0.76
  - Add a debugging command "xpnn" which can print the pnn of the node even when ctdbd is not running.
  - Redo the NATGW implementation to allow multiple disjoing NATGW groups in the same cluster.
 * Tue Mar 24 2009 : Version 1.0.75
@@ -694,7 +704,7 @@ Performance Co-Pilot (PCP) support for CTDB
  - Update "ctdb ping" to return an error code if the ping fail so that it
    can be used in scripts.
  - Update to how to synchronize management of node flags across the cluster.
-* Thu Dec 3 2008 : Version 1.0.67
+* Wed Dec 3 2008 : Version 1.0.67
  - Add a document describing the recovery process.
  - Fix a bug in "ctdb setdebug" where it would refuse to set a negative
    debug level.
@@ -722,7 +732,7 @@ Performance Co-Pilot (PCP) support for CTDB
    line tool. If set, this overrides the default socket the ctdb tool will
    use.
  - Add logging of high latency operations.
-* Mon Oct 22 2008 : Version 1.0.64
+* Wed Oct 22 2008 : Version 1.0.64
  - Add a context and a timed event so that once we have been in recovery for
    too long we drop all public addresses.
 * Mon Oct 20 2008 : Version 1.0.63