diff --git a/csync2-fix-xinetd.patch b/csync2-fix-xinetd.patch deleted file mode 100644 index 67e9559..0000000 --- a/csync2-fix-xinetd.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: csync2-2.0+git.1368794815.cf835a7/csync2.xinetd -=================================================================== ---- csync2-2.0+git.1368794815.cf835a7.orig/csync2.xinetd -+++ csync2-2.0+git.1368794815.cf835a7/csync2.xinetd -@@ -1,4 +1,4 @@ --# default: on -+# default: off - # description: csync2 - service csync2 - { -@@ -9,7 +9,9 @@ service csync2 - group = root - server = /usr/sbin/csync2 - server_args = -i -l -+ port = 30865 -+ type = UNLISTED - #log_on_failure += USERID -- disable = no -+ disable = yes - # only_from = 192.168.199.3 192.168.199.4 - } diff --git a/csync2.changes b/csync2.changes index e9d1e77..c608f4f 100644 --- a/csync2.changes +++ b/csync2.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Jul 19 13:46:24 UTC 2017 - tchvatal@suse.com + +- 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 + ------------------------------------------------------------------- Thu Jul 13 11:24:17 UTC 2017 - olaf@aepfle.de diff --git a/csync2.spec b/csync2.spec index 8b40fe5..b8a8a3f 100644 --- a/csync2.spec +++ b/csync2.spec @@ -16,13 +16,12 @@ # -Summary: Cluster synchronization tool -License: GPL-2.0+ -Group: Productivity/Clustering/HA - Name: csync2 Version: 2.0+git.1461714863.10636a4 Release: 0 +Summary: Cluster synchronization tool +License: GPL-2.0+ +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 @@ -30,15 +29,12 @@ Source1: csync2-README.quickstart Source2: csync2-rm-ssl-cert Source3: csync2.socket Source4: csync2@.service -# PATCH-FIX-UPSTREAM -- csync2-fix-xinetd.patch tserong@suse.com -- disables csync2 in xinetd by default, fixes port. -Patch0: csync2-fix-xinetd.patch # PATCH-FIX-UPSTREAM -- add-ac_prog_cpp.patch tserong@suse.com -- fix ugly ./configure warnings about missing headers Patch10: add-ac_prog_cpp.patch # PATCH-FIX-UPSTREAM -- fix-sonames.patch tserong@suse.com -- use properly versioned sonames in dlopen() Patch12: fix-sonames.patch # PATCH-FIX-UPSTREAM -- add-COPYING.patch tserong@suse.com -- ensure COPYING is present in docfiles and thus %doc Patch13: add-COPYING.patch - BuildRequires: autoconf BuildRequires: automake BuildRequires: bison @@ -47,21 +43,13 @@ 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 -Requires(post): openssl -Requires: sqlite3 -%if 0%{?suse_version} >= 1210 -BuildRequires: systemd -%endif -# texlive is for pdflatex to build PDF version of the manual -BuildRequires: texlive-latex -%if 0%{?suse_version} > 1220 -BuildRequires: texlive-nopageno -%endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Csync2 is a cluster synchronization tool. It can be used to keep files on @@ -71,25 +59,21 @@ It is expedient for HA-clusters, HPC-clusters, COWs and server farms. %prep %setup -q -%{?suse_update_config:%{suse_update_config}} - -%patch0 -p1 %patch10 -p1 %patch12 -p1 %patch13 -p1 %build -export CFLAGS="%{optflags}" -if ! [ -f configure ]; then ./autogen.sh; fi -%configure --enable-sqlite3 \ - --sysconfdir=%{_sysconfdir}/csync2 --docdir=%{_docdir}/%{name} - +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 -D -m 644 csync2.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/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} @@ -106,14 +90,14 @@ touch %{buildroot}%{_sysconfdir}/csync2/csync2_ssl_cert.pem %service_add_post csync2.socket umask 077 if [ ! -f %{_sysconfdir}/csync2/csync2_ssl_key.pem ]; then -/usr/bin/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/csync2/csync2_ssl_key.pem 2>/dev/null +%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/csync2/csync2_ssl_key.pem 2>/dev/null fi FQDN=`hostname` if [ "x${FQDN}" = "x" ]; then FQDN=localhost.localdomain fi if [ ! -f %{_sysconfdir}/csync2/csync2_ssl_cert.pem ]; then -cat << EOF | /usr/bin/openssl req -new -key %{_sysconfdir}/csync2/csync2_ssl_key.pem -x509 -days 3000 -out %{_sysconfdir}/csync2/csync2_ssl_cert.pem 2>/dev/null +cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/csync2/csync2_ssl_key.pem -x509 -days 3000 -out %{_sysconfdir}/csync2/csync2_ssl_cert.pem 2>/dev/null -- SomeState SomeCity @@ -135,7 +119,6 @@ fi %service_del_postun csync2.socket %files -%defattr(-,root,root) %{_sbindir}/csync2 %{_sbindir}/csync2-compare %{_unitdir}/csync2.socket @@ -145,7 +128,6 @@ fi %{_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-rm-ssl-cert