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