Search
j0ke.net Open Build Service
>
Projects
>
ha
>
csync2
> csync2.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File csync2.spec of Package csync2 (Revision 27)
Currently displaying revision
27
,
show latest
# csync2 - cluster synchronization tool, 2nd generation # LINBIT Information Technologies GmbH <http://www.linbit.com> # Copyright (C) 2004, 2005 Clifford Wolf <clifford@clifford.at> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # spec file for package csync2 (Version 2.0) # # norootforbuild # neededforbuild librsync openssl openssl-devel glibc-devel libgcc gcc gcc-c++ bison flex %define sqliteversion 2.8.17 BuildRequires: -post-build-checks BuildRequires: sqlite-devel sqlite librsync openssl-devel glibc-devel libgcc gcc gcc-c++ bison flex gnutls gnutls-devel libtasn1-devel libtasn1 file BuildRequires: autoconf automake %if 0%{?suse_version} >= 1100 BuildRequires: libgnutls-devel %endif %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} || 0%{?suse_version} < 1100 BuildRequires: gnutls-devel %endif Requires: librsync openssl file Name: csync2 License: GPL Group: System/Monitoring Requires: sqlite openssl librsync Autoreqprov: on Version: 1.34.99 Release: 4 Source0: csync2-%{version}.tar.gz Source1: sqlite-%{sqliteversion}.tar.gz Source2: create_csync2_ssl.sh Source3: paper.pdf Source4: csync2.logrotate Source5: csync2.cron Patch0: csync2-1.34.99-gnutls.patch ##Patch0: csync2-urandom.patch ##Patch1: csync2-NULL-pointer.patch ##Patch2: csync2-sqlite3-wip.patch URL: http://oss.linbit.com/csync2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Cluster sync tool %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. Authors: -------- Clifford Wolf <clifford.wolf@linbit.com> %prep %setup #patch1 #patch2 tar -C $RPM_BUILD_DIR -xzf %{S:1} %{?suse_update_config:%{suse_update_config}} autoreconf -fi %build export CFLAGS="$RPM_OPT_FLAGS -I/usr/kerberos/include" if ! [ -f configure ]; then ./autogen.sh; fi %patch0 %configure %__make all cd $RPM_BUILD_DIR/sqlite-%{sqliteversion} ./configure --enable-static --disable-shared %__make all %install [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} mkdir -p $RPM_BUILD_ROOT%{_var}/lib/csync2 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.d mkdir -p $RPM_BUILD_ROOT/var/backups/csync2 %__make DESTDIR=%{buildroot} install %__install -m 755 %{S:2} $RPM_BUILD_ROOT%{_sbindir}/csync2_create_ssl.sh %__install -m 644 %{S:3} paper.pdf %__install -m 644 csync2.xinetd $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/csync2 %__install -m 644 %{S:4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/csync2 %__install -m 644 %{S:5} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/csync2 %__install -m 755 $RPM_BUILD_DIR/sqlite-%{sqliteversion}/sqlite $RPM_BUILD_ROOT%{_sbindir}/csync2-sqlite2 %clean [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT make clean %post if ! grep -q "^csync2" %{_sysconfdir}/services ; then echo "csync2 30865/tcp" >>%{_sysconfdir}/services fi if [ $1 == 2 ] ; then for DB in `ls -1A /var/lib/csync2/*.db` ; do # find sqlite2 databases file ${DB} | grep -i "sqlite 2" >/dev/null if [ $? == 0 ] ; then # save sqlite2 databases mv ${DB} ${DB}.rpmsave # migrate sqlite2 databases to sqlite3 if [ -x %{_sbindir}/csync2-sqlite2 ] && [ -x %{_bindir}/sqlite3 ] ; then %{_sbindir}/csync2-sqlite2 ${DB}.rpmsave .dump | %{_bindir}/sqlite3 ${DB} fi fi done fi %files %defattr(-,root,root) %doc ChangeLog README NEWS INSTALL TODO AUTHORS paper.pdf %attr(0755,root,root) %doc csync2_locheck.sh %{_sbindir}/csync2 %{_sbindir}/csync2-compare %{_sbindir}/csync2-sqlite2 %{_sbindir}/csync2_create_ssl.sh %{_var}/lib/csync2 %{_mandir}/man1/csync2.1.gz %config(noreplace) %{_sysconfdir}/xinetd.d/csync2 %config(noreplace) %{_sysconfdir}/csync2.cfg %{_sysconfdir}/logrotate.d/csync2 %{_sysconfdir}/cron.d/csync2 %dir /var/backups %dir /var/backups/csync2 %changelog * Tue Jul 27 2010 Carsten Schoene <cs@linux-administrator.com> - 1.34.99-1 - update to SVN version (20100727) which includes sqlite3 suppport, the last sqlite3 patch leads to segfault * Sun Jul 11 2010 Carsten Schoene <cs@linux-administrator.com> - 1.34-4 - added sqlite3 patch - build sqlite2 binary to migrate old .db files on update * Wed Jan 20 2010 Carsten Schoene <cs@linux-administrator.com> - 1.34-3 - added backup directory to package - added NULL-pointer patch * Mon Sep 08 2008 Carsten Schoene <cs@linux-administrator.com> - 1.34-2 - added logrotate & cron script to package * Thu Sep 04 2008 Carsten Schoene <cs@linux-administrator.com> - update paper.pdf to a new version - added -batch mode in csync2_create_ssl.sh script (which fixes BROKEN PIPE when syncing) - see: http://lists.linbit.com/pipermail/csync2/2006-November/000215.html * Wed Sep 03 2008 Carsten Schoene <cs@linux-administrator.com> - enabled gnutls - add csync2_locheck.sh script - add csync2_create_ssl.sh - add paper.pdf to documentation * Fri Jan 07 2008 Carsten Schoene <cs@linux-administrator.com> - version bump to 1.34 with changes: - Segfault bugfix for 'Identification failed!' case - Tiny cygwin/cs2monitor.c fix: use urandom instead of random - improve output of -TT (diff mode) - if binary files differ, until now they - had looked as if they were identical. - and fixed -TT security problem - Restart write syscall for non-ssl connections when interrupted by SIGALARM - Do not use get_current_dir_name() on *BSD systems - Changed errno=ENODATA to errno=EIO for compatibility with BSD * Tue Dec 06 2005 Clifford Wolf <clifford.wolf@linbit.com> - Some fixes and cleanups for RPM 4.4.1 * Sat Jun 04 2005 Clifford Wolf <clifford.wolf@linbit.com> - xinetd init script is now "%config(noreplace)" - Some tiny cleanups * Mon Dec 10 2004 Tim Jackson <tim@timj.co.uk> - Added xinetd init script - Abstracted some config paths - Tidied * Tue Oct 12 2004 Clifford Wolf <clifford.wolf@linbit.com> - Automatic set sepcs file 'Version' tag * Tue Sep 09 2004 - phil@linbit.com - initial package