Fixed: #737710 - provide native systemd services
This commit is contained in:
parent
f534c746bd
commit
3bfee3e3eb
36
rsync.spec
36
rsync.spec
@ -7,15 +7,21 @@
|
|||||||
Summary: A program for synchronizing files over a network
|
Summary: A program for synchronizing files over a network
|
||||||
Name: rsync
|
Name: rsync
|
||||||
Version: 3.0.9
|
Version: 3.0.9
|
||||||
Release: 5%{?prerelease}%{?dist}
|
Release: 6%{?prerelease}%{?dist}
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
URL: http://rsync.samba.org/
|
URL: http://rsync.samba.org/
|
||||||
|
|
||||||
Source0: ftp://rsync.samba.org/pub/rsync/rsync-%{version}%{?prerelease}.tar.gz
|
Source0: ftp://rsync.samba.org/pub/rsync/rsync-%{version}%{?prerelease}.tar.gz
|
||||||
Source1: ftp://rsync.samba.org/pub/rsync/rsync-patches-%{version}%{?prerelease}.tar.gz
|
Source1: ftp://rsync.samba.org/pub/rsync/rsync-patches-%{version}%{?prerelease}.tar.gz
|
||||||
Source2: rsync.xinetd
|
Source2: rsyncd.socket
|
||||||
|
Source3: rsyncd.service
|
||||||
|
Source4: rsyncd.conf
|
||||||
|
Source5: rsyncd.sysconfig
|
||||||
BuildRequires: libacl-devel, libattr-devel, autoconf, popt-devel, zlib-devel
|
BuildRequires: libacl-devel, libattr-devel, autoconf, popt-devel, zlib-devel
|
||||||
Requires: zlib
|
Requires: zlib
|
||||||
|
Requires(post): systemd-units
|
||||||
|
Requires(preun): systemd-units
|
||||||
|
Requires(postun): systemd-units
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
|
|
||||||
Patch0: rsync-3.0.10-lose-track.patch
|
Patch0: rsync-3.0.10-lose-track.patch
|
||||||
@ -56,7 +62,7 @@ rm -fr autom4te.cache
|
|||||||
autoconf -o configure.sh
|
autoconf -o configure.sh
|
||||||
autoheader && touch config.h.in
|
autoheader && touch config.h.in
|
||||||
|
|
||||||
%configure
|
%configure
|
||||||
|
|
||||||
make proto
|
make proto
|
||||||
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
|
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
|
||||||
@ -65,8 +71,11 @@ make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%makeinstall INSTALLCMD='install -p' INSTALLMAN='install -p'
|
%makeinstall INSTALLCMD='install -p' INSTALLMAN='install -p'
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d
|
|
||||||
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name}
|
install -D -m644 %{SOURCE3} $RPM_BUILD_ROOT/%{_unitdir}/rsyncd.service
|
||||||
|
install -D -m644 %{SOURCE2} $RPM_BUILD_ROOT/%{_unitdir}/rsyncd.socket
|
||||||
|
install -D -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/rsyncd.conf
|
||||||
|
install -D -m644 %{SOURCE5} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/rsyncd
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -74,12 +83,27 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc COPYING NEWS OLDNEWS README support/ tech_report.tex
|
%doc COPYING NEWS OLDNEWS README support/ tech_report.tex
|
||||||
%config(noreplace) %{_sysconfdir}/xinetd.d/%{name}
|
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_mandir}/man1/%{name}.1*
|
%{_mandir}/man1/%{name}.1*
|
||||||
%{_mandir}/man5/rsyncd.conf.5*
|
%{_mandir}/man5/rsyncd.conf.5*
|
||||||
|
%config(noreplace) %{_sysconfdir}/rsyncd.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysconfig/rsyncd
|
||||||
|
%{_unitdir}/rsyncd.socket
|
||||||
|
%{_unitdir}/rsyncd.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_post rsyncd.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun rsyncd.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart rsyncd.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 15 2012 Michal Luscon <mluscon@redhat.com> 3.0.9-6
|
||||||
|
- Systemd units for rsync
|
||||||
|
|
||||||
* Tue Oct 23 2012 Michal Luscon <mluscon@redhat.com> 3.0.9-5
|
* Tue Oct 23 2012 Michal Luscon <mluscon@redhat.com> 3.0.9-5
|
||||||
- Reverted: #495310 - rsync contains forked copy of zlib
|
- Reverted: #495310 - rsync contains forked copy of zlib
|
||||||
|
|
||||||
|
14
rsync.xinetd
14
rsync.xinetd
@ -1,14 +0,0 @@
|
|||||||
# default: off
|
|
||||||
# description: The rsync server is a good addition to an ftp server, as it \
|
|
||||||
# allows crc checksumming etc.
|
|
||||||
service rsync
|
|
||||||
{
|
|
||||||
disable = yes
|
|
||||||
flags = IPv6
|
|
||||||
socket_type = stream
|
|
||||||
wait = no
|
|
||||||
user = root
|
|
||||||
server = /usr/bin/rsync
|
|
||||||
server_args = --daemon
|
|
||||||
log_on_failure += USERID
|
|
||||||
}
|
|
20
rsyncd.conf
Normal file
20
rsyncd.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# /etc/rsyncd: configuration file for rsync daemon mode
|
||||||
|
|
||||||
|
# See rsyncd.conf man page for more options.
|
||||||
|
|
||||||
|
# configuration examlple:
|
||||||
|
|
||||||
|
# uid = nobody
|
||||||
|
# gid = nobody
|
||||||
|
# use chroot = yes
|
||||||
|
# max connections = 4
|
||||||
|
# pid file = /var/run/rsyncd.pid
|
||||||
|
# exclude = lost+found/
|
||||||
|
# transfer logging = yes
|
||||||
|
# timeout = 900
|
||||||
|
# ignore nonreadable = yes
|
||||||
|
# dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
|
||||||
|
|
||||||
|
# [ftp]
|
||||||
|
# path = /home/ftp
|
||||||
|
# comment = ftp export area
|
9
rsyncd.service
Normal file
9
rsyncd.service
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=fast remote file copy program daemon
|
||||||
|
ConditionPathExists=/etc/rsyncd.conf
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/rsync --daemon --no-detach "$OPTIONS"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
10
rsyncd.socket
Normal file
10
rsyncd.socket
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Rsync Server Socket
|
||||||
|
Conflicts=rsyncd.service
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=873
|
||||||
|
Accept=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
1
rsyncd.sysconfig
Normal file
1
rsyncd.sysconfig
Normal file
@ -0,0 +1 @@
|
|||||||
|
OPTIONS=""
|
Loading…
Reference in New Issue
Block a user