SHA256
1
0
forked from pool/rsync

Accepting request 98194 from network

add autoconf to buildrequires (forwarded request 97543 from coolo)

OBS-URL: https://build.opensuse.org/request/show/98194
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rsync?expand=0&rev=39
This commit is contained in:
Stephan Kulow 2011-12-27 13:20:21 +00:00 committed by Git OBS Bridge
commit 64ed45c9d4
3 changed files with 52 additions and 15 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Dec 21 10:42:30 UTC 2011 - coolo@suse.com
- add autoconf as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Fri Nov 25 01:38:07 UTC 2011 - crrodriguez@opensuse.org
- Add systemd unit
- Do not BuildRequire textlive
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 12 03:40:40 UTC 2011 - crrodriguez@opensuse.org Wed Oct 12 03:40:40 UTC 2011 - crrodriguez@opensuse.org

View File

@ -15,7 +15,6 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
%define with_system_zlib 0 %define with_system_zlib 0
%if 0%{?suse_version} < 1120 %if 0%{?suse_version} < 1120
%define _initddir %{_sysconfdir}/init.d %define _initddir %{_sysconfdir}/init.d
@ -23,11 +22,11 @@
Name: rsync Name: rsync
Version: 3.0.9 Version: 3.0.9
Release: 8 Release: 0
License: GPL-3.0+
Summary: Versatile tool for fast incremental file transfer Summary: Versatile tool for fast incremental file transfer
Url: http://rsync.samba.org/ License: GPL-3.0+
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Url: http://rsync.samba.org/
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source1: %{name}-patches-%{version}.tar.bz2 Source1: %{name}-patches-%{version}.tar.bz2
Source2: logrotate.rsync Source2: logrotate.rsync
@ -36,9 +35,10 @@ Source4: rsyncd.rc
Source5: rsyncd.conf Source5: rsyncd.conf
Source6: rsyncd.secrets Source6: rsyncd.secrets
Source7: rsync-server.firewall Source7: rsync-server.firewall
Source8: rsyncd.service
Patch3: system-zlib.diff Patch3: system-zlib.diff
BuildRequires: autoconf
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libpng
BuildRequires: openslp-devel BuildRequires: openslp-devel
BuildRequires: popt-devel BuildRequires: popt-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -47,15 +47,14 @@ PreReq: %insserv_prereq
PreReq: grep PreReq: grep
PreReq: sed PreReq: sed
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1020
BuildRequires: texlive-latex
%else
BuildRequires: te_ams
BuildRequires: te_latex
%endif
%if 0%{?suse_version} > 1010 %if 0%{?suse_version} > 1010
Recommends: logrotate Recommends: logrotate
%endif %endif
%if 0%{?suse_version} > 1140
BuildRequires: systemd
%{?systemd_requires}
%define has_systemd 1
%endif
%description %description
Rsync is a fast and extraordinarily versatile file copying tool. It can copy Rsync is a fast and extraordinarily versatile file copying tool. It can copy
@ -87,9 +86,6 @@ autoconf
--enable-acl-support \ --enable-acl-support \
--enable-xattr-support --enable-xattr-support
make %{?_smp_mflags} make %{?_smp_mflags}
latex tech_report
latex tech_report
dvips tech_report -o tech_report.ps
%install %install
%if 0%{?suse_version} < 1120 %if 0%{?suse_version} < 1120
@ -112,25 +108,45 @@ install -m 600 %{SOURCE6} %{buildroot}%{_sysconfdir}/rsyncd.secrets
ln -sf ../../etc/init.d/rsyncd %{buildroot}%{_sbindir}/rcrsyncd ln -sf ../../etc/init.d/rsyncd %{buildroot}%{_sbindir}/rcrsyncd
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/rsync-server install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/rsync-server
%if 0%{?has_systemd}
install -D -m 0644 %SOURCE8 %{buildroot}%{_unitdir}/rsyncd.service
%endif
%pre
%if 0%{?has_systemd}
%service_add_pre rsyncd.service
%endif
%preun %preun
%stop_on_removal rsyncd %stop_on_removal rsyncd
%if 0%{?has_systemd}
%service_del_preun rsyncd.service
%endif
%post %post
%fillup_and_insserv rsyncd %fillup_and_insserv rsyncd
if ! grep -q "^pid file" /etc/rsyncd.conf ; then if ! grep -q "^pid file" /etc/rsyncd.conf ; then
sed -i -e "/^log file/{;p;s@\(.*\)@pid file = /var/run/rsyncd.pid@;}" /etc/rsyncd.conf sed -i -e "/^log file/{;p;s@\(.*\)@pid file = /var/run/rsyncd.pid@;}" /etc/rsyncd.conf
fi fi
%if 0%{?has_systemd}
%service_add_post rsyncd.service
%endif
%postun %postun
%restart_on_update rsyncd %restart_on_update rsyncd
%insserv_cleanup %insserv_cleanup
%if 0%{?has_systemd}
%service_del_postun rsyncd.service
%endif
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%if 0%{?has_systemd}
%{_unitdir}/rsyncd.service
%endif
%config(noreplace) %{_sysconfdir}/rsyncd.conf %config(noreplace) %{_sysconfdir}/rsyncd.conf
%config(noreplace) %{_sysconfdir}/rsyncd.secrets %config(noreplace) %{_sysconfdir}/rsyncd.secrets
%config(noreplace) %{_sysconfdir}/logrotate.d/rsync %config(noreplace) %{_sysconfdir}/logrotate.d/rsync
@ -143,6 +159,6 @@ rm -rf %{buildroot}
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/* %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/*
%doc %{_mandir}/man1/rsync.1.gz %doc %{_mandir}/man1/rsync.1.gz
%doc %{_mandir}/man5/rsyncd.conf.5.gz %doc %{_mandir}/man5/rsyncd.conf.5.gz
%doc COPYING NEWS README tech_report.ps tech_report.tex %doc COPYING NEWS README tech_report.tex
%changelog %changelog

10
rsyncd.service Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=Start the rsync server daemon
After=network.target
[Service]
ExecStart=/usr/sbin/rsyncd --daemon --no-detach
IOSchedulingClass=idle
CPUSchedulingPolicy=batch
[Install]
WantedBy=multi-user.target