rpms/csync2/devel csync2-README.fedora, NONE, 1.1 csync2-fix-xinetd.patch, NONE, 1.1 csync2-mkcert.sh, NONE, 1.1 csync2.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Ruben Kerkhof (ruben)
fedora-extras-commits at redhat.com
Fri Jan 26 19:11:16 UTC 2007
Author: ruben
Update of /cvs/extras/rpms/csync2/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15968/devel
Modified Files:
.cvsignore sources
Added Files:
csync2-README.fedora csync2-fix-xinetd.patch csync2-mkcert.sh
csync2.spec
Log Message:
auto-import csync2-1.33-4 on branch devel from csync2-1.33-4.src.rpm
--- NEW FILE csync2-README.fedora ---
Getting started with csync2 on Fedora:
There's no need to define the port for csync2 in /etc/services, although the manual says so.
The config file for csync2 is /etc/csync2.cfg
First, define a host group for your system:
mygroup {
host host1 host2;
key /etc/mygroup.key;
include /etc/csync2.cfg;
include /etc/testfile;
}
As an example, we'll sync the file /etc/testfile to host2
csync2 uses ssl for encryption and a pre-shared key for authentication.
Create the pre-shared key:
csync2 -k /etc/mygroup.key
Now you have to scp the configfile and the pre-shared key to host2:
sudo scp /etc/mygroup.key /etc/csync2.cfg root at host2:/etc
We need ssl certificates as well. In the examples directory you can find a script, mkcert.sh,
which creates a self-signed certifate in /etc/csync2_ssl_cert.pem. Create certificates on both your hosts.
csync2 is disabled by default. To start it on both your hosts:
chkconfig csync2 on
service xinetd start
Now you should be able to sync:
sudo csync2 -xv
Happy syncing!
Ruben Kerkhof
ruben at fedoraproject.org
csync2-fix-xinetd.patch:
--- NEW FILE csync2-fix-xinetd.patch ---
--- csync2-1.33/csync2.xinetd.fix-xinetd 2007-01-24 21:18:04.000000000 +0100
+++ csync2-1.33/csync2.xinetd 2007-01-24 21:19:47.000000000 +0100
@@ -1,4 +1,4 @@
-# default: on
+# default: off
# description: csync2
service csync2
{
@@ -9,7 +9,9 @@
group = root
server = /usr/sbin/csync2
server_args = -i
+ port = 30865
+ type = UNLISTED
#log_on_failure += USERID
- disable = no
+ disable = yes
# only_from = 192.168.199.3 192.168.199.4
}
--- NEW FILE csync2-mkcert.sh ---
#!/bin/bash
# generate a self-signed certificate for csync2
SYSCONFDIR=/etc
openssl genrsa -out $SYSCONFDIR/csync2_ssl_key.pem 1024
yes '' | openssl req -new -key $SYSCONFDIR/csync2_ssl_key.pem -out $SYSCONFDIR/csync2_ssl_cert.csr
openssl x509 -req -days 600 -in $SYSCONFDIR/csync2_ssl_cert.csr -signkey $SYSCONFDIR/csync2_ssl_key.pem -out $SYSCONFDIR/csync2_ssl_cert.pem
rm -f $SYSCONFDIR/csync2_ssl_cert.csr
chmod 400 $SYSCONFDIR/csync2_ssl_key.pem
--- NEW FILE csync2.spec ---
Summary: A cluster synchronization tool
Name: csync2
Version: 1.33
Release: 4%{?dist}
Group: Applications/System
License: GPL
URL: http://oss.linbit.com/csync2
Source0: http://oss.linbit.com/csync2/%{name}-%{version}.tar.gz
Source1: csync2-README.fedora
Source2: csync2-mkcert.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: xinetd
BuildRequires: sqlite2-devel, librsync-devel, bison, flex, gnutls-devel, libtasn1-devel
Patch0: csync2-fix-xinetd.patch
%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.
%prep
%setup -q
%patch0 -p1 -b .fix-xinetd
%{__install} -m 644 %{SOURCE1} README.fedora
%build
%configure
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%{__install} -d %{buildroot}%{_localstatedir}/lib/%{name}
%{__install} -p -D -m 644 csync2.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/%{name}
%{__install} -p -D %{SOURCE2} %{buildroot}%{_docdir}/%{name}/examples/mkcert.sh
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_sbindir}/csync2
%{_sbindir}/csync2-compare
%{_mandir}/man1/csync2.1.gz
%config(noreplace) %{_sysconfdir}/csync2.cfg
%config(noreplace) %{_sysconfdir}/xinetd.d/%{name}
%{_docdir}/%{name}/examples/mkcert.sh
%dir %{_localstatedir}/lib/%{name}
%doc README README.fedora AUTHORS COPYING paper.pdf
%changelog
* Thu Jan 25 2007 <ruben at rubenkerkhof.com> 1.33-4
- Included a README.fedora with instructions on how to create a self-signed certificate
- Included a mkcert.sh script to create a self-signed certificate
- Removed the creation of ssl certificate from the %%install section
* Wed Jan 22 2007 <ruben at rubenkerkhof.com> 1.33-3
- Fixed the xinetd file so there's no need to specify the port in /etc/services
- Create ssl certificates
* Mon Jan 22 2007 <ruben at rubenkerkhof.com> 1.33-2
- Some cleanups as per bz review 223633
* Sat Jan 20 2007 <ruben at rubenkerkhof.com> 1.33-1
- Initial import
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/csync2/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 26 Jan 2007 19:09:58 -0000 1.1
+++ .cvsignore 26 Jan 2007 19:10:46 -0000 1.2
@@ -0,0 +1 @@
+csync2-1.33.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/csync2/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 26 Jan 2007 19:09:58 -0000 1.1
+++ sources 26 Jan 2007 19:10:46 -0000 1.2
@@ -0,0 +1 @@
+e16e3c0f4285439cef09a6b63319a0b0 csync2-1.33.tar.gz
More information about the scm-commits
mailing list