9f55eb0d6d
- Update patches * Add 0001-Add-COPYING-as-docfile.patch * Add 0002-Patch-sonames.patch * Add 0003-Set-AC_PROG_CPP-in-configure.ac.patch * Remove add-COPYING.patch * Remove add-ac_prog_cpp.patch * Remove fix-sonames.patch - comparison of peer names provided via command line should not be case sensitive (bsc#1082576) - fix for inetd stderr >& stdout - fix log message when generating backup files, demote log level - document -l and -N switches - Avoid systemd service removal errors when uninstalling (bsc#1093165) - Remove systemd dep in favor of systemd-rpm-macros - Format a bit with spec-cleaner - Add proper dependency over openssl - Remove all the tex deps as we now reduce from 300 to 160 buildrequires - Remove xinetd service and use only socket activation to keep only one tool for the job * Also remove patch csync2-fix-xinetd.patch - Requires(post) hostname|openssl - Avoid runtime dependency on systemd, the macros can all deal with its absence. - Ensure csync@.service template instances are disabled on package removal. - Update to csync2-2.0-6-g10636a4: - Document the -N flag to bind csync2 to a specific ip address. - fix diff mode truncation to first 512 byte - fix diff mode prefix substitution - Drop merged patches: - Remove csync2-librsync-1.0.0.patch - Remove fix-csync2_ssl_cert-filename.patch - Add csync2-librsync-1.0.0.patch: Fix build with librsync 1.0.0. - Ensure COPYING file is included in package + Added add-COPYING.patch - Update to upstream version 2.0-rc2. Changes since 1.34 too numerous to list, but include: + Database abstraction layer (default build uses sqlite3) + IPv6 support + Native GnuTLS support + tempdir and lock-timeout config options + do-local-only config option for actions - Reworked patches and extra source being carried in openSUSE: + Added csync2.socket and csync2@.service for use via systemd + Added add-ac_prog_cpp.patch + Added fix-csync2_ssl_cert-filename.patch + Added fix-sonames.patch + Updated csync2-fix-xinetd.patch + Updated README.quickstart + Removed fix-missing-sentinels.diff (upstream) + Removed csync2-1.34-pure-gnutls-r2.patch (obsolete) + Removed force-debug-stderr-off-inetd.patch (obsolete) + Removed bind-to-local-hostname.patch (obsolete) - Try to bind to "local" IP explicitly to avoid "identification failed" errors with multiple IPs on same subnet (bnc#757327) + Added bind-to-local-hostname.patch - update license to new format - Drop requirement on libgnutls-extra-devel (unnecessary on openSUSE) - Force debug output off completely when running under xinetd (fixes protocol breakage when target directories don't exist; bnc#752563) - factory has librsync split into devel package - Remove explicit lib dependencies from spec file - Add csync2-rm-ssl-cert helper script (bnc#709811) - Remove redundant tags/sections from specfile - Fix build against gnutls 2.8 in factory (integrated patch from http://bugs.gentoo.org/show_bug.cgi?id=274213) - fix build against current openssl - Init import of csync2 for DRBD configuration file sync (fate#307419) OBS-URL: https://build.opensuse.org/request/show/705600 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/csync2?expand=0&rev=52
132 lines
4.4 KiB
RPMSpec
132 lines
4.4 KiB
RPMSpec
#
|
|
# spec file for package csync2
|
|
#
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: csync2
|
|
Version: 2.0+git.1542296533.b974921
|
|
Release: 0
|
|
Summary: Cluster synchronization tool
|
|
License: GPL-2.0-or-later
|
|
Group: Productivity/Clustering/HA
|
|
Url: http://oss.linbit.com/csync2/
|
|
#Source0: http://oss.linbit.com/csync2/%{name}-%{version}.tar.gz
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
Source1: csync2-README.quickstart
|
|
Source2: csync2-rm-ssl-cert
|
|
Source3: csync2.socket
|
|
Source4: csync2@.service
|
|
# PATCH-FIX-UPSTREAM -- tserong@suse.com -- fix ugly ./configure warnings about missing headers
|
|
Patch10: 0003-Set-AC_PROG_CPP-in-configure.ac.patch
|
|
# PATCH-FIX-UPSTREAM -- tserong@suse.com -- use properly versioned sonames in dlopen()
|
|
Patch12: 0002-Patch-sonames.patch
|
|
# PATCH-FIX-UPSTREAM -- tserong@suse.com -- ensure COPYING is present in docfiles and thus %doc
|
|
Patch13: 0001-Add-COPYING-as-docfile.patch
|
|
BuildRequires: autoconf
|
|
BuildRequires: automake
|
|
BuildRequires: bison
|
|
BuildRequires: flex
|
|
BuildRequires: libgnutls-devel
|
|
BuildRequires: librsync-devel
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: sqlite3-devel
|
|
BuildRequires: systemd-rpm-macros
|
|
Requires: sqlite3
|
|
Requires(post): openssl
|
|
%if 0%{?suse_version} > 1320
|
|
# Conflicts with net-tools in Leap
|
|
Requires(post): hostname
|
|
%endif
|
|
|
|
%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
|
|
%patch10 -p1
|
|
%patch12 -p1
|
|
%patch13 -p1
|
|
|
|
%build
|
|
autoreconf -fvi
|
|
%configure \
|
|
--enable-sqlite3 \
|
|
--sysconfdir=%{_sysconfdir}/csync2 \
|
|
--docdir=%{_docdir}/%{name}
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
%make_install
|
|
mkdir -p %{buildroot}%{_localstatedir}/lib/csync2
|
|
install -p -m 644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/README.quickstart
|
|
install -p -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/csync2-rm-ssl-cert
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
install -p -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/
|
|
install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/
|
|
# We need these empty files to be able to %%ghost them
|
|
touch %{buildroot}%{_sysconfdir}/csync2/csync2_ssl_key.pem
|
|
touch %{buildroot}%{_sysconfdir}/csync2/csync2_ssl_cert.pem
|
|
|
|
%pre
|
|
%service_add_pre csync2.socket
|
|
|
|
%post
|
|
%service_add_post csync2.socket
|
|
umask 077
|
|
if [ ! -f %{_sysconfdir}/csync2/csync2_ssl_key.pem ]; then
|
|
%{_bindir}/openssl genrsa -out %{_sysconfdir}/csync2/csync2_ssl_key.pem 1024
|
|
fi
|
|
FQDN=`hostname`
|
|
if [ "x${FQDN}" = "x" ]; then
|
|
FQDN=localhost.localdomain
|
|
fi
|
|
if [ ! -f %{_sysconfdir}/csync2/csync2_ssl_cert.pem ]; then
|
|
yes '' | %{_bindir}/openssl req -new -key %{_sysconfdir}/csync2/csync2_ssl_key.pem -out %{_sysconfdir}/csync2/csync2_ssl_cert.csr
|
|
%{_bindir}/openssl x509 -req -days 3000 -in %{_sysconfdir}/csync2/csync2_ssl_cert.csr -signkey %{_sysconfdir}/csync2/csync2_ssl_key.pem \
|
|
-out %{_sysconfdir}/csync2/csync2_ssl_cert.pem
|
|
rm %{_sysconfdir}/csync2/csync2_ssl_cert.csr
|
|
fi
|
|
|
|
%preun
|
|
%service_del_preun csync2.socket
|
|
# Cleanup all databases upon last removal
|
|
if [ $1 -eq 0 ]; then
|
|
rm -f %{_localstatedir}/lib/csync2/*
|
|
fi
|
|
|
|
%postun
|
|
%service_del_postun csync2.socket
|
|
|
|
%files
|
|
%{_sbindir}/csync2
|
|
%{_sbindir}/csync2-compare
|
|
%{_unitdir}/csync2.socket
|
|
%{_unitdir}/csync2@.service
|
|
%dir %{_localstatedir}/lib/csync2/
|
|
# Using docdir here ensures correct doc file tagging
|
|
%{_docdir}/%{name}
|
|
%dir %{_sysconfdir}/csync2/
|
|
%config(noreplace) %{_sysconfdir}/csync2/csync2.cfg
|
|
%ghost %config %{_sysconfdir}/csync2/csync2_ssl_key.pem
|
|
%ghost %config %{_sysconfdir}/csync2/csync2_ssl_cert.pem
|
|
%{_sbindir}/csync2-rm-ssl-cert
|
|
%{_mandir}/man1/csync2.1*
|
|
|
|
%changelog
|