From 05580bbff0f6d905dd9a81035bc003acea0272e2290a9e817dda94505f0b2be3 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Thu, 22 Aug 2013 09:22:31 +0000 Subject: [PATCH] *** WORK IN PROGRESS - DO NOT SHIP *** OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/csync2?expand=0&rev=21 --- _service | 16 ++++ add-ac_prog_cpp.patch | 12 +++ csync2-1.34.tar.gz | 3 - csync2-2.0+git.1368794815.cf835a7.tar.bz2 | 3 + csync2.changes | 7 ++ csync2.spec | 97 ++++++++++++----------- 6 files changed, 90 insertions(+), 48 deletions(-) create mode 100644 _service create mode 100644 add-ac_prog_cpp.patch delete mode 100644 csync2-1.34.tar.gz create mode 100644 csync2-2.0+git.1368794815.cf835a7.tar.bz2 diff --git a/_service b/_service new file mode 100644 index 0000000..a4fe9ef --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + git://git.linbit.com/csync2.git + git + .git + 2.0+git.%ct.%h + master + + + + csync2*.tar + bz2 + + + + diff --git a/add-ac_prog_cpp.patch b/add-ac_prog_cpp.patch new file mode 100644 index 0000000..2aa3f07 --- /dev/null +++ b/add-ac_prog_cpp.patch @@ -0,0 +1,12 @@ +Index: csync2-2.0+git.1368794815.cf835a7/configure.ac +=================================================================== +--- csync2-2.0+git.1368794815.cf835a7.orig/configure.ac ++++ csync2-2.0+git.1368794815.cf835a7/configure.ac +@@ -29,6 +29,7 @@ AM_CONFIG_HEADER(config.h) + + # Checks for programs. + AC_PROG_CC ++AC_PROG_CPP + AC_PROG_INSTALL + AC_PROG_YACC + AM_PROG_LEX diff --git a/csync2-1.34.tar.gz b/csync2-1.34.tar.gz deleted file mode 100644 index c0e0c3b..0000000 --- a/csync2-1.34.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32b250dd4a0353f71015c5c3961174b975dd5e799e4a084e8f6d00792bd8c833 -size 222765 diff --git a/csync2-2.0+git.1368794815.cf835a7.tar.bz2 b/csync2-2.0+git.1368794815.cf835a7.tar.bz2 new file mode 100644 index 0000000..9f3abd3 --- /dev/null +++ b/csync2-2.0+git.1368794815.cf835a7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9613f71d49c15b3b4b1d4d747f0bc9f397ff0823dd9daaf2743ab93bd298781 +size 91654 diff --git a/csync2.changes b/csync2.changes index 041b5ac..f7781a9 100644 --- a/csync2.changes +++ b/csync2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Aug 21 05:38:19 UTC 2013 - tserong@suse.com + +*** WORK IN PROGRESS - DO NOT SHIP *** + +- Update to upstream version 2.0-rc2 + ------------------------------------------------------------------- Fri May 10 12:56:38 UTC 2013 - tserong@suse.com diff --git a/csync2.spec b/csync2.spec index 0ba028f..053d55a 100644 --- a/csync2.spec +++ b/csync2.spec @@ -17,68 +17,75 @@ Summary: Cluster synchronization tool -License: GPL-2.0+ and LGPL-2.1+ +License: GPL-2.0+ Group: Productivity/Clustering/HA Name: csync2 -Version: 1.34 +Version: 2.0+git.1368794815.cf835a7 Release: 0 Url: http://oss.linbit.com/csync2/ -Source0: http://oss.linbit.com/csync2/%{name}-%{version}.tar.gz +#Source0: http://oss.linbit.com/csync2/%{name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.bz2 Source1: csync2-README.quickstart Source2: csync2-rm-ssl-cert +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch0: csync2-fix-xinetd.patch -Patch1: fix-missing-sentinels.diff -%if 0%{?suse_version} > 1120 -Patch2: csync2-1.34-pure-gnutls-r2.patch -BuildRequires: pkg-config -%endif +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch3: force-debug-stderr-off-inetd.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch4: bind-to-local-hostname.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires(post): openssl -Requires: gnutls -Requires: sqlite2 -Requires: xinetd +Patch10: add-ac_prog_cpp.patch + +Requires: openssl +Requires: sqlite3 +BuildRequires: autoconf +BuildRequires: automake BuildRequires: bison BuildRequires: flex BuildRequires: libgnutls-devel -%if 0%{?sles_version} == 11 -BuildRequires: libgnutls-extra-devel -%endif -BuildRequires: libtasn1-devel -BuildRequires: sqlite2-devel -%if 0%{?suse_version} > 1210 +BuildRequires: libmysqlclient-devel BuildRequires: librsync-devel -%else -BuildRequires: librsync -%endif +BuildRequires: librsync-devel +BuildRequires: pkgconfig +BuildRequires: postgresql-devel +BuildRequires: sqlite3-devel +# texlive is for pdflatex to build PDF version of the manual +BuildRequires: texlive-latex +BuildRequires: texlive-nopageno + +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Csync2 is a cluster synchronization tool. It can be used to keep files -on multiple hosts in a cluster in sync. Csync2 can handle complex -setups with much more than just 2 hosts, handle file deletions and can -detect conflicts. It is expedient for HA-clusters, HPC-clusters, COWs -and server farms. +Csync2 is a cluster synchronization tool. It can be used to keep files on +multiple hosts in a cluster in sync. Csync2 can handle complex setups with +much more than just 2 hosts, handle file deletions and can detect conflicts. +It is expedient for HA-clusters, HPC-clusters, COWs and server farms. %prep -%setup -q -%patch0 -p1 -b .fix-xinetd -%patch1 -p1 -%if 0%{?suse_version} > 1120 -%patch2 -p1 -%endif -%patch3 -p1 -%patch4 -p1 +%setup +# Is this next really necessary? +%{?suse_update_config:%{suse_update_config}} + +#%patch0 -p1 -b .fix-xinetd +# might actually want patch3 +#%patch3 -p1 +# patch4 needs rewriting, presumably +#%patch4 -p1 +#%patch10 -p1 install -p -m 644 %{SOURCE1} README.quickstart %build -%configure --sysconfdir=%{_sysconfdir}/csync2 -make %{?_smp_mflags} +export CFLAGS="$RPM_OPT_FLAGS -I/usr/include/pgsql" +if ! [ -f configure ]; then ./autogen.sh; fi +%configure --enable-mysql --enable-postgres --enable-sqlite3 \ + --sysconfdir=%{_sysconfdir}/csync2 --docdir=%{_docdir}/%{name} + +make all +#make %{?_smp_mflags} %install -make install DESTDIR=%{buildroot} -mkdir -p %{buildroot}%{_var}/lib/csync2 +%makeinstall +mkdir -p %{buildroot}%{_localstatedir}/lib/csync2 install -p -D -m 644 csync2.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/csync2 install -p -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/csync2-rm-ssl-cert # We need these empty files to be able to %%ghost them @@ -109,21 +116,21 @@ fi %preun # Cleanup all databases upon last removal if [ $1 -eq 0 ]; then - %{__rm} -f %{_var}/lib/csync2/* + rm -f %{_localstatedir}/lib/csync2/* fi %files -%defattr(-,root,root,-) -%doc README README.quickstart AUTHORS COPYING paper.pdf +%defattr(-,root,root) +%{_sbindir}/csync2 +%{_sbindir}/csync2-compare +%dir %{_localstatedir}/lib/csync2/ +%{_docdir}/%{name} %dir %{_sysconfdir}/csync2/ %config(noreplace) %{_sysconfdir}/csync2/csync2.cfg %config(noreplace) %{_sysconfdir}/xinetd.d/csync2 %ghost %config %{_sysconfdir}/csync2/csync2_ssl_key.pem %ghost %config %{_sysconfdir}/csync2/csync2_ssl_cert.pem -%{_sbindir}/csync2 -%{_sbindir}/csync2-compare %{_sbindir}/csync2-rm-ssl-cert %{_mandir}/man1/csync2.1* -%dir %{_var}/lib/csync2/ %changelog