2007-01-16 00:35:29 +01:00
|
|
|
#
|
2011-03-30 16:21:08 +02:00
|
|
|
# spec file for package rsync
|
2007-01-16 00:35:29 +01:00
|
|
|
#
|
2024-04-18 14:02:12 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2007-01-16 00:35:29 +01:00
|
|
|
#
|
2008-08-14 02:17:50 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-04-15 18:54:23 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:35:29 +01:00
|
|
|
#
|
|
|
|
|
2012-02-08 12:34:26 +01:00
|
|
|
|
2020-08-15 00:58:14 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
%bcond_without xxhash
|
|
|
|
%else
|
|
|
|
%bcond_with xxhash
|
|
|
|
%endif
|
|
|
|
|
2022-09-14 11:18:25 +02:00
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
%bcond_without gcc11
|
|
|
|
%else
|
|
|
|
%bcond_with gcc11
|
|
|
|
%endif
|
|
|
|
|
2023-09-05 14:52:25 +02:00
|
|
|
%if 0%{?suse_version} < 1600
|
2023-09-06 11:58:37 +02:00
|
|
|
%bcond_without slp
|
2023-09-05 14:52:25 +02:00
|
|
|
%else
|
2023-09-06 11:58:37 +02:00
|
|
|
%bcond_with slp
|
2023-09-05 14:52:25 +02:00
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:35:29 +01:00
|
|
|
Name: rsync
|
2024-04-18 14:02:12 +02:00
|
|
|
Version: 3.3.0
|
2011-12-25 22:43:43 +01:00
|
|
|
Release: 0
|
2011-05-05 16:44:17 +02:00
|
|
|
Summary: Versatile tool for fast incremental file transfer
|
2018-04-03 16:52:10 +02:00
|
|
|
License: GPL-3.0-or-later
|
2011-03-29 16:20:06 +02:00
|
|
|
Group: Productivity/Networking/Other
|
2020-07-07 12:01:48 +02:00
|
|
|
URL: https://rsync.samba.org/
|
2022-09-14 12:53:39 +02:00
|
|
|
Source: https://rsync.samba.org/ftp/rsync/src/rsync-%{version}.tar.gz
|
|
|
|
Source1: https://rsync.samba.org/ftp/rsync/src/rsync-patches-%{version}.tar.gz
|
2008-03-11 17:58:40 +01:00
|
|
|
Source2: logrotate.rsync
|
2017-06-14 21:46:07 +02:00
|
|
|
Source3: rsyncd.socket
|
2008-03-11 17:58:40 +01:00
|
|
|
Source4: rsyncd.rc
|
|
|
|
Source5: rsyncd.conf
|
|
|
|
Source6: rsyncd.secrets
|
2011-12-06 17:29:22 +01:00
|
|
|
Source8: rsyncd.service
|
2017-06-14 21:46:07 +02:00
|
|
|
Source9: rsyncd@.service
|
2022-09-14 12:53:39 +02:00
|
|
|
Source10: https://rsync.samba.org/ftp/rsync/src/rsync-%{version}.tar.gz.asc
|
|
|
|
Source11: https://rsync.samba.org/ftp/rsync/src/rsync-patches-%{version}.tar.gz.asc
|
2013-10-25 16:08:03 +02:00
|
|
|
Source12: %{name}.keyring
|
2023-04-11 15:31:23 +02:00
|
|
|
Source13: rsyncd
|
2017-07-13 11:01:36 +02:00
|
|
|
Patch0: rsync-no-libattr.patch
|
2023-12-01 12:33:45 +01:00
|
|
|
Patch2: rsync-usr-etc.patch
|
2011-12-25 22:43:43 +01:00
|
|
|
BuildRequires: autoconf
|
2016-01-07 10:07:12 +01:00
|
|
|
BuildRequires: automake
|
2020-08-15 00:58:14 +02:00
|
|
|
BuildRequires: c++_compiler
|
2011-03-29 16:20:06 +02:00
|
|
|
BuildRequires: libacl-devel
|
2020-07-07 12:01:48 +02:00
|
|
|
BuildRequires: liblz4-devel
|
|
|
|
BuildRequires: libzstd-devel
|
|
|
|
BuildRequires: pkgconfig
|
2011-03-29 16:20:06 +02:00
|
|
|
BuildRequires: popt-devel
|
2017-06-14 21:46:07 +02:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2011-03-29 16:20:06 +02:00
|
|
|
BuildRequires: zlib-devel
|
2020-08-15 00:58:14 +02:00
|
|
|
%if %{with xxhash}
|
|
|
|
BuildRequires: pkgconfig(libxxhash) >= 0.8.0
|
|
|
|
%endif
|
2022-09-14 11:18:25 +02:00
|
|
|
%if %{with gcc11}
|
|
|
|
BuildRequires: gcc11-c++
|
|
|
|
%endif
|
2023-09-06 11:58:37 +02:00
|
|
|
%if %{with slp}
|
2023-09-05 14:52:25 +02:00
|
|
|
BuildRequires: openslp-devel
|
|
|
|
%endif
|
2020-07-07 12:01:48 +02:00
|
|
|
BuildRequires: pkgconfig(openssl)
|
2017-06-14 21:46:07 +02:00
|
|
|
Requires(post): grep
|
|
|
|
Requires(post): sed
|
2009-08-21 17:37:49 +02:00
|
|
|
Recommends: logrotate
|
2007-01-16 00:35:29 +01:00
|
|
|
|
|
|
|
%description
|
2011-05-05 16:44:17 +02:00
|
|
|
Rsync is a fast and extraordinarily versatile file copying tool. It can copy
|
|
|
|
locally, to/from another host over any remote shell, or to/from a remote rsync
|
|
|
|
daemon. It offers a large number of options that control every aspect of its
|
|
|
|
behavior and permit very flexible specification of the set of files to be
|
|
|
|
copied. It is famous for its delta-transfer algorithm, which reduces the amount
|
|
|
|
of data sent over the network by sending only the differences between the
|
|
|
|
source files and the existing files in the destination. Rsync is widely used
|
|
|
|
for backups and mirroring and as an improved copy command for everyday use.
|
2007-01-16 00:35:29 +01:00
|
|
|
|
|
|
|
%prep
|
2017-06-14 21:46:07 +02:00
|
|
|
%setup -q -b 1
|
2022-09-14 12:53:39 +02:00
|
|
|
rm -f zlib/*.h zlib/*.c
|
2020-07-07 12:01:48 +02:00
|
|
|
|
2023-09-06 11:58:37 +02:00
|
|
|
%if %{with slp}
|
2022-09-14 12:53:39 +02:00
|
|
|
patch -p1 < patches/slp.diff
|
2023-09-06 11:58:37 +02:00
|
|
|
%endif
|
2020-07-07 12:01:48 +02:00
|
|
|
|
2022-08-02 16:51:32 +02:00
|
|
|
%autopatch -p1
|
2017-06-14 21:46:07 +02:00
|
|
|
|
2007-01-16 00:35:29 +01:00
|
|
|
%build
|
2012-02-08 12:34:26 +01:00
|
|
|
autoreconf -fiv
|
2022-09-14 11:18:25 +02:00
|
|
|
%if %{with gcc11}
|
|
|
|
export CC=gcc-11
|
|
|
|
export CXX=g++-11
|
|
|
|
%endif
|
2017-06-14 21:46:07 +02:00
|
|
|
export CFLAGS="%{optflags} -fPIC -DPIC -fPIE"
|
2022-09-14 11:18:25 +02:00
|
|
|
export CXXFLAGS="$CFLAGS"
|
2020-08-15 00:58:14 +02:00
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now -fPIE -pie"
|
2008-09-06 03:26:25 +02:00
|
|
|
%configure \
|
2017-06-14 21:46:07 +02:00
|
|
|
--with-included-popt=no \
|
2017-07-25 13:55:46 +02:00
|
|
|
--with-included-zlib=no \
|
2008-09-06 03:26:25 +02:00
|
|
|
--disable-debug \
|
2023-12-01 12:33:45 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
--with-rsyncd-distconf=%{_distconfdir}/rsyncd.conf \
|
|
|
|
%endif
|
2020-08-15 00:58:14 +02:00
|
|
|
%if !%{with xxhash}
|
|
|
|
--disable-xxhash\
|
|
|
|
%endif
|
|
|
|
%ifarch x86_64
|
2024-05-23 14:11:18 +02:00
|
|
|
--enable-roll-simd \
|
2020-08-15 00:58:14 +02:00
|
|
|
%endif
|
2023-09-06 11:58:37 +02:00
|
|
|
%if %{with slp}
|
2008-09-06 03:26:25 +02:00
|
|
|
--enable-slp \
|
2023-09-06 11:58:37 +02:00
|
|
|
%endif
|
2008-09-06 03:26:25 +02:00
|
|
|
--enable-acl-support \
|
|
|
|
--enable-xattr-support
|
2020-07-07 12:01:48 +02:00
|
|
|
%make_build reconfigure
|
|
|
|
%make_build
|
2008-08-14 02:17:50 +02:00
|
|
|
|
2017-07-24 13:09:49 +02:00
|
|
|
%check
|
2024-03-12 20:16:04 +01:00
|
|
|
chmod +x support/*
|
2020-07-07 12:01:48 +02:00
|
|
|
%make_build check
|
2023-07-31 10:34:48 +02:00
|
|
|
chmod -x support/*
|
2017-07-24 13:09:49 +02:00
|
|
|
|
2007-01-16 00:35:29 +01:00
|
|
|
%install
|
2017-06-14 21:46:07 +02:00
|
|
|
%make_install
|
2011-03-29 16:20:06 +02:00
|
|
|
rm -f %{buildroot}%{_sbindir}/rsyncd
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/init.d
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/xinetd.d
|
2020-07-07 12:01:48 +02:00
|
|
|
install -d %{buildroot}%{_sbindir}
|
2023-04-11 15:31:23 +02:00
|
|
|
install -m 755 %{SOURCE13} %{buildroot}%{_sbindir}/rsyncd
|
2020-07-07 12:01:48 +02:00
|
|
|
install -m 755 support/rsyncstats %{buildroot}%{_bindir}
|
2022-06-20 18:10:52 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
install -d %{buildroot}%{_distconfdir}/logrotate.d
|
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_distconfdir}/logrotate.d/rsync
|
2023-12-01 12:33:45 +01:00
|
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_distconfdir}/rsyncd.conf
|
|
|
|
install -m 600 %{SOURCE6} %{buildroot}%{_distconfdir}/rsyncd.secrets
|
|
|
|
echo "# This is a template only. Create your own entries in /etc/rsyncd.secrets" >>%{buildroot}%{_distconfdir}/rsyncd.secrets
|
|
|
|
echo
|
2022-06-20 18:10:52 +02:00
|
|
|
%else
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/logrotate.d
|
2011-03-29 16:20:06 +02:00
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/rsync
|
|
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rsyncd.conf
|
|
|
|
install -m 600 %{SOURCE6} %{buildroot}%{_sysconfdir}/rsyncd.secrets
|
2023-12-01 12:33:45 +01:00
|
|
|
%endif
|
2017-06-14 21:46:07 +02:00
|
|
|
install -D -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/rsyncd@.service
|
|
|
|
install -D -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/rsyncd.service
|
|
|
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/rsyncd.socket
|
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rcrsyncd
|
2024-03-12 20:16:04 +01:00
|
|
|
chmod -x support/*
|
2011-12-06 17:29:22 +01:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre rsyncd.service
|
2022-09-12 16:19:59 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
# Prepare for migration to /usr/etc; save any old .rpmsave
|
2023-12-01 12:33:45 +01:00
|
|
|
for i in logrotate.d/rsync rsyncd.conf rsyncd.secrets; do
|
2022-09-12 16:19:59 +02:00
|
|
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%posttrans
|
|
|
|
# Migration to /usr/etc, restore just created .rpmsave
|
2023-12-01 12:33:45 +01:00
|
|
|
for i in logrotate.d/rsync rsyncd.conf rsyncd.secrets; do
|
2022-09-12 16:19:59 +02:00
|
|
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
|
|
|
|
done
|
|
|
|
%endif
|
2007-01-16 00:35:29 +01:00
|
|
|
|
|
|
|
%preun
|
2011-12-06 17:29:22 +01:00
|
|
|
%service_del_preun rsyncd.service
|
2007-01-16 00:35:29 +01:00
|
|
|
|
|
|
|
%post
|
2011-12-06 17:29:22 +01:00
|
|
|
%service_add_post rsyncd.service
|
2007-01-16 00:35:29 +01:00
|
|
|
|
|
|
|
%postun
|
2011-12-06 17:29:22 +01:00
|
|
|
%service_del_postun rsyncd.service
|
2007-01-16 00:35:29 +01:00
|
|
|
|
|
|
|
%files
|
2020-07-07 12:01:48 +02:00
|
|
|
%license COPYING
|
2023-07-31 10:34:48 +02:00
|
|
|
%doc NEWS.md README.md tech_report.tex support/
|
2017-06-14 21:46:07 +02:00
|
|
|
%{_unitdir}/rsyncd@.service
|
2011-12-06 17:29:22 +01:00
|
|
|
%{_unitdir}/rsyncd.service
|
2017-06-14 21:46:07 +02:00
|
|
|
%{_unitdir}/rsyncd.socket
|
2022-06-20 18:10:52 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
2022-06-21 15:40:46 +02:00
|
|
|
%{_distconfdir}/logrotate.d/rsync
|
2023-12-01 12:33:45 +01:00
|
|
|
%{_distconfdir}/rsyncd.conf
|
|
|
|
%{_distconfdir}/rsyncd.secrets
|
2022-06-20 18:10:52 +02:00
|
|
|
%else
|
2011-03-29 16:20:06 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/rsync
|
2023-12-01 12:33:45 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/rsyncd.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/rsyncd.secrets
|
2022-06-20 18:10:52 +02:00
|
|
|
%endif
|
2008-09-06 03:26:25 +02:00
|
|
|
%{_sbindir}/rcrsyncd
|
|
|
|
%{_sbindir}/rsyncd
|
|
|
|
%{_bindir}/rsyncstats
|
|
|
|
%{_bindir}/rsync
|
2020-07-07 12:01:48 +02:00
|
|
|
%{_bindir}/rsync-ssl
|
|
|
|
%{_mandir}/man1/rsync.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/rsync-ssl.1%{?ext_man}
|
|
|
|
%{_mandir}/man5/rsyncd.conf.5%{?ext_man}
|
2008-01-10 03:03:34 +01:00
|
|
|
|
2007-04-19 01:02:48 +02:00
|
|
|
%changelog
|