]> git.pld-linux.org Git - packages/rsync.git/blob - rsync.spec
- versioned Obsoletes for replaced rsyncd package
[packages/rsync.git] / rsync.spec
1 # TODO:
2 #   3.1.3 rsyncd segfaults very early in server rsync:// mode (both inetd and standalone)
3 #   rsync[27223]: segfault at 7468 ip 00007f4281c56e81 sp 00007ffc29186160 error 4 in libc-2.27.so[7f4281bd3000+1b4000]
4 #
5 # Conditional build:
6 %bcond_with     rsh     # set remote shell command to rsh instead of ssh (old behaviour)
7 %bcond_with     fadvise # apply fadvise patch
8 %bcond_without  tests   # perform "make test"
9 #
10 Summary:        Program for efficient remote updates of files
11 Summary(es.UTF-8):      Programa para actualizar archivos remotos de forma eficiente
12 Summary(ko.UTF-8):      네트워크를 통한 파일동기화를 위한 프로그램
13 Summary(pl.UTF-8):      Program do wydajnego zdalnego uaktualniania plików
14 Summary(pt_BR.UTF-8):   Programa para atualizar arquivos remotos de forma eficiente
15 Summary(ru.UTF-8):      Программа для эффективного удаленного обновления файлов
16 Summary(uk.UTF-8):      Програма для ефективного віддаленого оновлення файлів
17 Summary(zh_CN.UTF-8):   [通讯]传输工具
18 Summary(zh_TW.UTF-8):   [喙啪]\e$(B6G?i火(c\e(B
19 Name:           rsync
20 Version:        3.3.0
21 Release:        1
22 Epoch:          1
23 License:        GPL v3+
24 Group:          Networking/Utilities
25 Source0:        https://rsync.samba.org/ftp/rsync/%{name}-%{version}.tar.gz
26 # Source0-md5:  f5c17f9c9164ef9e60d9d8c96b23da06
27 Source1:        https://rsync.samba.org/ftp/rsync/%{name}-patches-%{version}.tar.gz
28 # Source1-md5:  68e78b9d6aaf1e58f018685513b5a0c3
29 Source2:        %{name}.inet
30 Source3:        %{name}.init
31 Source4:        %{name}.sysconfig
32 Source5:        %{name}d.logrotate
33 Source6:        %{name}.tmpfiles
34 Patch0:         %{name}-config.patch
35 Patch1:         %{name}-fadvise.patch
36 Patch2:         rsync-norandomfailure.patch
37 URL:            https://rsync.samba.org/
38 BuildRequires:  acl-devel
39 BuildRequires:  autoconf >= 2.69
40 BuildRequires:  automake
41 BuildRequires:  libstdc++-devel
42 BuildRequires:  lz4-devel
43 BuildRequires:  openssl-devel
44 BuildRequires:  popt-devel
45 BuildRequires:  python3 >= 1:3
46 BuildRequires:  python3-commonmark
47 BuildRequires:  rpmbuild(macros) >= 1.318
48 BuildRequires:  xxHash-devel >= 0.8.0
49 BuildRequires:  zlib-devel
50 BuildRequires:  zstd-devel
51 %if %{with tests}
52 BuildRequires:  fakeroot >= 1.26
53 %endif
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %define         _duplicate_files_terminate_build        0
57 %define         _sysconfdir     /etc/rsyncd
58
59 %description
60 rsync is a replacement for rcp that has many more features.
61
62 rsync uses the "rsync algorithm" which provides a very fast method for
63 bringing remote files into sync. It does this by sending just the
64 differences in the files across the link, without requiring that both
65 sets of files are present at one of the ends of the link beforehand.
66
67 A technical report describing the rsync algorithm is included with
68 this package.
69
70 %description -l es.UTF-8
71 rsync es un substituto más rápido y flexible para rcp que permite la
72 sincronización de archivos o directorios, vía red, de forma rápida y
73 eficiente, entre diferentes máquinas transfiriendo solamente las
74 diferencias entre estos directorios de forma compactada. No necesita
75 que ninguna de las máquinas tengan una copia de lo que está en la
76 otra. Está disponible en este paquete, una relación técnica
77 describiendo el algoritmo usado por el rsync.
78
79 %description -l ko.UTF-8
80 Rsync는 원격 호스트 파일을 매우 빨리 동기화하는데 신뢰할만한
81 알고리즘을 사용한다. Rsync는 파일의 전체를 보내는 것 대신에 네트웍을
82 통해 파일의 다른 부분만을 전송하기 때문에 빠르다. Rsync는 강력한 미러
83 프로세스 혹은 rcp 커멘드를 통한 더 우수한 대체용으로써 사용된다. rsync
84 알고리즘을 묘사하는 기술적인 내용은 이 꾸러미에 포함되어 있다.
85
86 %description -l pl.UTF-8
87 Rsync jest zamiennikiem programu rcp z bardziej rozbudowaną składnią
88 poleceń. Program ten używa efektywnego algorytmu "rsync" w czasie
89 komunikacji i transportu plików do systemu zdalnego. Dokumentacja
90 techniczna nowego algorytmu została również dołączona do pakietu.
91
92 %description -l pt_BR.UTF-8
93 O rsync é um substituto mais rápido e flexível para o rcp permitindo
94 sincronização de arquivos ou diretórios via rede de forma rápida e
95 eficiente entre diferentes máquinas transferindo somente as diferenças
96 entre estes diretórios de forma compactada. Ele não precisa que
97 nenhuma das máquinas tenha uma cópia do que está na outra.
98
99 Um relatório técnico descrevendo o algoritmo usado pelo rsync está
100 disponível neste pacote.
101
102 %description -l ru.UTF-8
103 rsync - это более быстрая и гибкая альтернатива rcp, позволяющая
104 быструю и эффективную по отношению к ресурсам сети синхронизацию
105 файлов или каталогов на различных машинах путем передачи только
106 различий между ними в компрессированном виде. При этом совершенно не
107 обязательно, чтобы одна машина имела у себя копию того, что есть на
108 другой машине.
109
110 %description -l uk.UTF-8
111 rsync - це швидша та гнучкіша альтернатива rcp, яка забезпечує швидку
112 та ефективну по відношенню до ресурсів мережі синхронізацію файлів чи
113 каталогів на різних машинах шляхом передачі лише відмінностей між ними
114 в компресованому виді. При цьому зовсім не обов'язково, щоб одна
115 машина мала в себе копію того, що є на іншій машині.
116
117 %package -n rsyncd-inetd
118 Summary:        Files necessary to run rsync in daemon mode
119 Summary(pl.UTF-8):      Pliki niezbędne do uruchomienia rsynca w trybie serwera
120 Group:          Networking/Daemons
121 Requires:       %{name} = %{epoch}:%{version}-%{release}
122 Requires:       rc-inetd
123 Provides:       rsyncd
124 Obsoletes:      rsyncd < 2.5.6
125 Obsoletes:      rsyncd-standalone
126
127 %description -n rsyncd-inetd
128 rsync is a replacement for rcp that has many more features.
129
130 rsync uses the "rsync algorithm" which provides a very fast method for
131 bringing remote files into sync. It does this by sending just the
132 differences in the files across the link, without requiring that both
133 sets of files are present at one of the ends of the link beforehand.
134
135 A technical report describing the rsync algorithm is included with
136 this package.
137
138 %description -n rsyncd-inetd -l pl.UTF-8
139 Rsync jest zamiennikiem programu rcp z bardziej rozbudowaną składnią
140 poleceń. Program ten używa efektywnego algorytmu "rsync" w czasie
141 komunikacji i transportu plików do systemu zdalnego. Dokumentacja
142 techniczna nowego algorytmu została również dołączona do pakietu.
143
144 %package -n rsyncd-standalone
145 Summary:        Files necessary to run rsync in daemon mode
146 Summary(pl.UTF-8):      Pliki niezbędne do uruchomienia rsynca w trybie serwera
147 Group:          Networking/Daemons
148 Requires(post,preun):   /sbin/chkconfig
149 Requires:       %{name} = %{epoch}:%{version}-%{release}
150 Provides:       rsyncd
151 Obsoletes:      rsyncd < 2.5.6
152 Obsoletes:      rsyncd-inetd
153
154 %description -n rsyncd-standalone
155 rsync is a replacement for rcp that has many more features.
156
157 rsync uses the "rsync algorithm" which provides a very fast method for
158 bringing remote files into sync. It does this by sending just the
159 differences in the files across the link, without requiring that both
160 sets of files are present at one of the ends of the link beforehand.
161
162 A technical report describing the rsync algorithm is included with
163 this package.
164
165 %description -n rsyncd-standalone -l pl.UTF-8
166 Rsync jest zamiennikiem programu rcp z bardziej rozbudowaną składnią
167 poleceń. Program ten używa efektywnego algorytmu "rsync" w czasie
168 komunikacji i transportu plików do systemu zdalnego. Dokumentacja
169 techniczna nowego algorytmu została również dołączona do pakietu.
170
171 %prep
172 %setup -q -b1
173 %patch0 -p1
174 %{?with_fadvise:%patch1 -p1}
175 %patch2 -p1
176
177 sed -i -e 's|#!/usr/bin/env bash|#!/bin/bash|' rsync-ssl
178
179 rm -f *.old
180
181 %build
182 %{__aclocal} -I m4
183 %{__autoheader}
184 %{__autoconf}
185 %configure \
186         LIBS="-lcrypto" \
187         --enable-acl-support \
188         --disable-debug \
189         --enable-ipv6 \
190         --enable-xattr-support \
191         --with-included-zlib=no \
192         %{?with_rsh:--with-rsh=rsh} \
193         --with-rsyncd-conf=%{_sysconfdir}/rsyncd.conf
194 %{__make} proto
195 %{__make}
196
197 %{?with_tests:%{__make} test}
198
199 %install
200 rm -rf $RPM_BUILD_ROOT
201 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{sysconfig/rc-inetd,rc.d/init.d,logrotate.d,env.d},/var/{log,run/rsyncd}} \
202         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
203
204 %{__make} install \
205         prefix=$RPM_BUILD_ROOT%{_prefix} \
206         mandir=$RPM_BUILD_ROOT%{_mandir} \
207         bindir=$RPM_BUILD_ROOT%{_bindir}
208
209 :> $RPM_BUILD_ROOT/var/log/rsyncd.log
210 :> $RPM_BUILD_ROOT%{_sysconfdir}/rsyncd.secrets
211
212 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/rsyncd.conf
213 #log file = /var/log/rsyncd.log
214 EOF
215
216 cat << 'EOF' > $RPM_BUILD_ROOT/etc/env.d/CVSIGNORE
217 #CVSIGNORE=
218 EOF
219 cat << 'EOF' > $RPM_BUILD_ROOT/etc/env.d/RSYNC_RSH
220 #RSYNC_RSH=
221 EOF
222 cat << 'EOF' > $RPM_BUILD_ROOT/etc/env.d/RSYNC_PROXY
223 #RSYNC_PROXY=
224 EOF
225 cat << 'EOF' > $RPM_BUILD_ROOT/etc/env.d/RSYNC_PASSWORD
226 #RSYNC_PASSWORD=
227 EOF
228
229 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/rsyncd
230 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/rsyncd
231 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rsyncd
232 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/rsyncd
233 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/rsyncd.conf
234
235 %clean
236 rm -rf $RPM_BUILD_ROOT
237
238 %post
239 %env_update
240
241 %postun
242 %env_update
243
244 %post -n rsyncd-inetd
245 %service -q rc-inetd reload
246
247 %postun -n rsyncd-inetd
248 if [ "$1" = "0" ]; then
249         %service -q rc-inetd reload
250 fi
251
252 %post -n rsyncd-standalone
253 /sbin/chkconfig --add rsyncd
254 %service rsyncd restart "rsync server"
255
256 %preun -n rsyncd-standalone
257 if [ "$1" = "0" ]; then
258         %service rsyncd stop
259         /sbin/chkconfig --del rsyncd
260 fi
261
262 %files
263 %defattr(644,root,root,755)
264 %doc README.md NEWS.md TODO support
265 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/CVSIGNORE
266 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/RSYNC_PASSWORD
267 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/RSYNC_PROXY
268 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/RSYNC_RSH
269 %attr(755,root,root) %{_bindir}/rsync
270 %attr(755,root,root) %{_bindir}/rsync-ssl
271 %{_mandir}/man1/rsync.1*
272 %{_mandir}/man1/rsync-ssl.1*
273
274 %files -n rsyncd-inetd
275 %defattr(644,root,root,755)
276 %dir %{_sysconfdir}
277 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rsyncd.conf
278 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rsyncd.secrets
279 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/rsyncd
280 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/rsyncd
281 %attr(640,root,root) %ghost /var/log/rsyncd.log
282 %{_mandir}/man5/rsyncd.conf.5*
283
284 %files -n rsyncd-standalone
285 %defattr(644,root,root,755)
286 %dir %{_sysconfdir}
287 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rsyncd.conf
288 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rsyncd.secrets
289 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rsyncd
290 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/rsyncd
291 %attr(640,root,root) %ghost /var/log/rsyncd.log
292 %attr(754,root,root) /etc/rc.d/init.d/rsyncd
293 %{systemdtmpfilesdir}/rsyncd.conf
294 %dir /var/run/rsyncd
295 %{_mandir}/man5/rsyncd.conf.5*
This page took 0.076386 seconds and 4 git commands to generate.