]>
Commit | Line | Data |
---|---|---|
5f5a8b21 | 1 | # |
2 | # Conditional build: | |
7f28cb4a | 3 | %bcond_without xattr # support for Linux extented attributes |
cd96d2aa | 4 | %bcond_without static # dar_static program |
7f28cb4a JB |
5 | %bcond_without static_libs # static library (required for dar_static) |
6 | %bcond_without threads # threading using libthreadar library | |
7 | %bcond_without python # CPython (3.x) binding | |
097d504f | 8 | # |
7f28cb4a JB |
9 | %if %{without static_libs} |
10 | %undefine with_static | |
a5f8478f | 11 | %endif |
12 | # | |
fbe89be6 | 13 | Summary: dar makes backup of a directory tree and files |
83798cfc | 14 | Summary(pl.UTF-8): dar - narzędzie do tworzenia kopii zapasowych drzew katalogów i plików |
fbe89be6 | 15 | Name: dar |
7f28cb4a | 16 | Version: 2.7.14 |
cd96d2aa JB |
17 | Release: 1 |
18 | License: GPL v2+ | |
0e3cdb42 | 19 | Group: Applications/Archiving |
7f28cb4a JB |
20 | Source0: https://downloads.sourceforge.net/dar/%{name}-%{version}.tar.gz |
21 | # Source0-md5: 268f9e3c799eff1fcc2881baf7e45beb | |
097d504f | 22 | Patch0: %{name}-opt.patch |
fbe89be6 | 23 | URL: http://dar.linux.free.fr/ |
7f28cb4a | 24 | %{?with_xattr:BuildRequires: attr-devel >= 2.4.16-3} |
cd96d2aa | 25 | BuildRequires: autoconf >= 2.69 |
097d504f | 26 | BuildRequires: automake |
efc8da18 | 27 | BuildRequires: bzip2-devel |
7f28cb4a | 28 | BuildRequires: curl-devel |
e4cfcb7c | 29 | BuildRequires: doxygen >= 1:1.3 |
c5440f43 | 30 | BuildRequires: e2fsprogs-devel |
93d5d6ae | 31 | BuildRequires: gettext-tools |
cd96d2aa | 32 | BuildRequires: gpgme-devel >= 1.2.0 |
853009b5 | 33 | BuildRequires: groff |
7f28cb4a | 34 | BuildRequires: libargon2-devel |
cd96d2aa JB |
35 | BuildRequires: libcap-devel |
36 | BuildRequires: libgcrypt-devel >= 1.6.0 | |
0aa85ee6 | 37 | BuildRequires: libgpg-error-devel |
7f28cb4a JB |
38 | BuildRequires: librsync-devel |
39 | BuildRequires: libstdc++-devel >= 6:5 | |
40 | %{?with_threads:BuildRequires: libthreadar-devel >= 1.3.1} | |
57d80953 | 41 | BuildRequires: libtool >= 2:1.4d |
7f28cb4a | 42 | BuildRequires: lz4-devel |
cd96d2aa | 43 | BuildRequires: lzo-devel >= 2 |
7f28cb4a JB |
44 | BuildRequires: pkgconfig |
45 | %if %{with python} | |
46 | BuildRequires: python3-devel >= 1:3.2 | |
47 | BuildRequires: python3-pybind11 | |
48 | %endif | |
49 | BuildRequires: sed >= 4.0 | |
cd96d2aa | 50 | BuildRequires: xz-devel |
efc8da18 | 51 | BuildRequires: zlib-devel |
7f28cb4a | 52 | BuildRequires: zstd-devel >= 1.3 |
42343508 | 53 | %if %{with static} |
7f28cb4a | 54 | %{?with_xattr:BuildRequires: attr-static} |
efc8da18 | 55 | BuildRequires: bzip2-static |
7cd544cd | 56 | BuildRequires: curl-static |
5f5a8b21 | 57 | BuildRequires: glibc-static |
e4895387 | 58 | BuildRequires: gpgme-static |
7cd544cd | 59 | BuildRequires: libargon2-static |
e4895387 | 60 | BuildRequires: libassuan-static |
2a49a8ba | 61 | BuildRequires: libgcrypt-static |
62 | BuildRequires: libgpg-error-static | |
7f28cb4a JB |
63 | BuildRequires: librsync-static |
64 | BuildRequires: libstdc++-static >= 6:5 | |
65 | %{?with_threads:BuildRequires: libthreadar-static >= 1.3.1} | |
66 | BuildRequires: lz4-static | |
2a49a8ba | 67 | BuildRequires: lzo-static |
e4895387 | 68 | BuildRequires: xz-static |
5f5a8b21 | 69 | BuildRequires: zlib-static |
7f28cb4a | 70 | BuildRequires: zstd-static >= 1.3 |
5f5a8b21 | 71 | %endif |
5a9f3364 | 72 | Requires: %{name}-libs = %{version}-%{release} |
fbe89be6 | 73 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
74 | ||
a5f8478f | 75 | # don't generate `Requires' for sample scripts |
76 | %define _noautoreq bash perl | |
77 | ||
fbe89be6 | 78 | %description |
fbe89be6 | 79 | dar is a shell command, that makes backup of a directory tree and |
80 | files. | |
81 | ||
82 | FILTERS: dar is able to backup from total file system to a single | |
83 | file. Additionally a mechanism of filters permits, based on the | |
84 | filename, to exclude or include some files while backing up or | |
85 | restoring a directory tree. In the other side, a secondary filter | |
86 | mechanism permits to exclude some branches of a directory tree, or to | |
87 | only include some branches. | |
88 | ||
89 | DIFFERENTIAL BACKUP: When making a backup with dar, you have the | |
90 | possibility to make a full backup or a differential backup. A full | |
91 | backup, as expected makes backup of all files as specified on the | |
92 | command line (with or without filters). Instead, a differential | |
93 | backup, (over filter mechanism), saves only files that have changed | |
94 | since a given reference backup. Additionally, files that existed in | |
95 | the reference backup and which do no more exist at the time of the | |
96 | differential backup are recorded in the backup. At recovery time, | |
97 | (unless you deactivate it), restoring a differential backup will | |
98 | update changed files and new files, but also remove files that have | |
99 | been recorded as deleted. Note that the reference backup can be a full | |
100 | backup or another differential backup. This way you can make a first | |
101 | full backup, then many differential backup, each taking as reference | |
102 | the last backup made. | |
103 | ||
104 | SLICES: Dar stands for Disk ARchive. From the beginning it was | |
105 | designed to be able to split an archive over several removable media | |
106 | whatever their number is and whatever their size is. Thus dar is able | |
107 | to save over old floppy disk, CD-R, DVD-R, CD-RW, DVD-RW, Zip, Jazz, | |
108 | etc... Dar is not concerned by un/mounting a removable medium, instead | |
109 | it is independent of hardware. Given the size, it will split the | |
110 | archive in several files (called SLICES), eventually pausing before | |
111 | creating the next one, allowing this way, the user to un/mount a | |
112 | medium, burn the file on CD-R, send it by email (if your mail system | |
113 | does not allow huge file in emails, dar can help you here also). By | |
114 | default, (no size specified), dar will make one slice whatever its | |
115 | size is. Additionally, the size of the first slice can be specified | |
116 | separately, if for example you want first to fulfil a partially filled | |
117 | disk before starting using empty ones. Last, at restoration time, dar | |
118 | will just pause and prompt the user asking a slice only if it is | |
119 | missing. | |
120 | ||
121 | COMPRESSION: last, dar can use compression. By default no compression | |
122 | is used. Actually only gzip algorithm is implemented, but some room | |
123 | has been done for bzip2 and any other compression algorithm. Note | |
124 | that, compression is made before slices, which means that using | |
125 | compression with slices, will not make slices smaller, but will | |
126 | probably make less slices in the backup. | |
127 | ||
128 | DIRECT ACCESS: even using compression dar has not to read the whole | |
129 | backup to extract one file. This way if you just want to restore one | |
130 | file from a huge backup, the process will be much faster than using | |
131 | tar. Dar first reads the catalogue (i.e. the contents of the backup), | |
132 | then it goes directly to the location of the saved file(s) you want to | |
133 | restore and proceed to restoration. In particular using slices dar | |
134 | will ask only for the slice(s) containing the file(s) to restore. | |
135 | ||
136 | HARD LINK CONSIDERATION: hard links are now properly saved. They are | |
137 | properly restored if possible. If for example restoring across a | |
138 | mounted filesystem, hard linking will fail, but dar will then | |
139 | duplicate the inode and file content, issuing a warning. | |
140 | ||
141 | EXTENDED ATTRIBUTES: support for extended attributes have to be | |
142 | activated at compilation time (see INSTALL). Dar is able to save and | |
143 | restore EA, all or just those of a given namespace (system or user). | |
144 | If no EA have been saved and restoration occurs over a file that has | |
145 | EA, they will be preserved. But if they have been saved empty for a | |
146 | given file, any existing EA for that file will be removed at | |
147 | restoration time, unless -u and/or -U is given on command-line. | |
148 | ||
149 | ARCHIVE TESTING thanks to CRC (cyclic redundancy checks), dar is able | |
150 | to detect data corruption in the archive. Only the file where data | |
151 | corruption occurred will not be possible to restore, but dar will | |
152 | restore the other even when compression is used. | |
153 | ||
154 | USING PIPES dar is now able to produce an archive to its standard | |
155 | output or named pipe. it is also able to read an archive through a | |
156 | pair of pipes, to take a remote archive as reference, or even to | |
157 | restore data from a remote archive. This way it is now possible to | |
158 | store an archive remotely and in total security (if using encrypted | |
159 | means) | |
160 | ||
161 | ISOLATION the catalogue (i.e.: the contents of an archive), can be | |
162 | extracted (this operation is called isolation) to a small file, that | |
163 | can in turn be used as reference for differential archive. There is no | |
164 | more need to provide an archive to be able to create a differential | |
165 | backup over it, just its catalogue is necessary. | |
166 | ||
167 | RE-SHAPE SLICES OF AN EXISTING ARCHIVE the external program named | |
168 | "dar_xform" is able to change the size of slices of a given archive. | |
169 | The resulting archive is totally identical to archives directly | |
170 | created by dar. Source archive can be taken from a set of slice, from | |
171 | standard input or even a named pipe. | |
172 | ||
9b828d75 JR |
173 | %description -l pl.UTF-8 |
174 | dar jest poleceniem powłoki, które tworzy kopie zapasowe drzew | |
175 | katalogów i plików. Możliwości: | |
176 | - Filtry: dar może tworzyć kopię zapasową całego systemu plików do | |
177 | pojedynczego pliku; mechanizm filtrów pozwala wyłączać lub dołączać | |
b0d714a3 | 178 | pliki przy tworzeniu kopii lub odtwarzaniu z niej. |
9b828d75 JR |
179 | - Backup różnicowy: dar może tworzyć kopie pełne lub różnicowe |
180 | (zawierające tylko te pliki, które zmieniły się od innego backupu) | |
181 | - Części (slices): dar oznacza "Disk ARchive". Od początku ma | |
182 | możliwość dzielenia archiwów na różne nośniki wymienialne, | |
183 | niezależnie od ich liczby i rozmiaru (można tworzyć kopie na CD-R, | |
b0d714a3 | 184 | DVD-R, CD-RW, Zip, Jazz...). |
9b828d75 | 185 | - Kompresja: domyślnie dar nie kompresuje danych; ma zaimplementowany |
b0d714a3 | 186 | algorytm gzip, jest przygotowywany do bzip2 i innych. Kompresja jest |
9b828d75 JR |
187 | wykonywana przed podziałem na części. |
188 | - Bezpośredni dostęp: nawet w przypadku użycia kompresji, dar nie musi | |
189 | czytać całej kopii aby odtworzyć jeden plik. Najpierw odczytuje | |
190 | katalog, następnie skacze od razu do właściwego miejsca. | |
191 | - Obsługa twardych dowiązań: dar zachowuje i odtwarza je w miarę | |
192 | możliwości; w przypadku niemożliwości wykonania dowiązania, powiela | |
193 | plik i wypisuje ostrzeżenie. | |
194 | - Obsługa rozszerzonych atrybutów (zależnie od opcji kompilacji): dar | |
195 | potrafi zachowywać i odtwarzać rozszerzone atrybuty - wszystkie lub | |
196 | tylko dotyczące danej przestrzeni nazw (systemowej lub użytkownika). | |
197 | - Testowanie archiwów: dzięki użyciu CRC dar wykrywa uszkodzone dane; | |
198 | tylko uszkodzone pliki nie zostaną odtworzone, reszta tak - nawet w | |
199 | przypadku użycia kompresji. | |
200 | - Użycie rurek - dar może wyprodukować archiwum na standardowe wyjście | |
201 | lub do nazwanej rurki. Może także czytać archiwum z pary rurek, a | |
202 | nawet odtwarzać ze zdalnego archiwum. | |
203 | - Rozdzielenie: katalog (zawartość archiwum) może być wyciągnięty do | |
204 | małego pliku, który może być używany jako odniesienie dla | |
205 | różnicowego backupu. | |
206 | - Przekształcanie części istniejącego archiwum: zewnętrzny program o | |
207 | nazwie dar_xform jest w stanie zmieniać rozmiary części podanego | |
208 | archiwum. Może czytać z zestawu kawałków, standardowego wejścia lub | |
b0d714a3 JB |
209 | nazwanej rurki. |
210 | ||
5f5a8b21 | 211 | %package static |
b67216c8 | 212 | Summary: Static version of dar backup tool |
83798cfc | 213 | Summary(pl.UTF-8): Statyczna wersja archiwizatora dar |
23b7ee86 | 214 | Group: Applications/Archiving |
5f5a8b21 | 215 | |
216 | %description static | |
217 | Static version of dar backup tool. | |
218 | ||
9b828d75 | 219 | %description static -l pl.UTF-8 |
5f5a8b21 | 220 | Statyczna wersja archiwizatora dar. |
221 | ||
5a9f3364 JB |
222 | %package libs |
223 | Summary: Shared version of dar library | |
83798cfc | 224 | Summary(pl.UTF-8): Współdzielona wersja biblioteki dar |
c8a764ad | 225 | Group: Libraries |
7f28cb4a | 226 | %{?with_xattr:Requires: attr >= 2.4.16-3} |
cd96d2aa JB |
227 | Requires: gpgme >= 1.2.0 |
228 | Requires: libgcrypt >= 1.6.0 | |
7f28cb4a JB |
229 | %{?with_threads:Requires: libthreadar >= 1.3.1} |
230 | Requires: zstd >= 1.3 | |
5a9f3364 JB |
231 | |
232 | %description libs | |
233 | Shared version of dar library. | |
234 | ||
9b828d75 JR |
235 | %description libs -l pl.UTF-8 |
236 | Współdzielona wersja biblioteki dar. | |
5a9f3364 | 237 | |
09a398d2 | 238 | %package devel |
c8a764ad | 239 | Summary: Header files to develop dar software |
83798cfc | 240 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki dar |
c8a764ad | 241 | Group: Development/Libraries |
242 | Requires: %{name}-libs = %{version}-%{release} | |
7f28cb4a | 243 | %{?with_xattr:Requires: attr-devel >= 2.4.16-3} |
b7684ca4 | 244 | Requires: bzip2-devel |
7f28cb4a JB |
245 | Requires: gpgme-devel >= 1.2.0 |
246 | Requires: libargon2-devel | |
cd96d2aa JB |
247 | Requires: libcap-devel |
248 | Requires: libgcrypt-devel >= 1.6.0 | |
249 | Requires: libgpg-error-devel | |
7f28cb4a JB |
250 | Requires: librsync-devel |
251 | Requires: libstdc++-devel >= 6:5 | |
252 | %{?with_threads:Requires: libthreadar-devel >= 1.3.1} | |
253 | Requires: lz4-devel | |
cd96d2aa JB |
254 | Requires: lzo-devel >= 2 |
255 | Requires: xz-devel | |
3cc31188 | 256 | Requires: zlib-devel |
7f28cb4a | 257 | Requires: zstd-devel >= 1.3 |
09a398d2 | 258 | |
259 | %description devel | |
097d504f | 260 | Header files to develop software which operates on dar. |
09a398d2 | 261 | |
9b828d75 JR |
262 | %description devel -l pl.UTF-8 |
263 | Pliki nagłówkowe potrzebne do rozwoju oprogramowania korzystającego z | |
097d504f JB |
264 | dara. |
265 | ||
266 | %package libs-static | |
267 | Summary: Static version of dar library | |
83798cfc | 268 | Summary(pl.UTF-8): Statyczna wersja biblioteki dar |
c8a764ad | 269 | Group: Development/Libraries |
270 | Requires: %{name}-devel = %{version}-%{release} | |
097d504f JB |
271 | |
272 | %description libs-static | |
273 | Static version of dar library. | |
274 | ||
9b828d75 | 275 | %description libs-static -l pl.UTF-8 |
097d504f | 276 | Statyczna wersja biblioteki dar. |
09a398d2 | 277 | |
bca9e56e | 278 | %package doc |
279 | Summary: dar - documentation | |
83798cfc | 280 | Summary(pl.UTF-8): dar - dokumentacja |
bca9e56e | 281 | Group: Documentation |
282 | Requires: %{name} = %{version}-%{release} | |
283 | ||
284 | %description doc | |
285 | Dar ducumentation. | |
286 | ||
aa8e3fd8 | 287 | %description doc -l pl.UTF-8 |
bca9e56e | 288 | Dokumentacja dla dar. |
289 | ||
7f28cb4a JB |
290 | %package -n python3-libdar |
291 | Summary: Python 3 binding for dar library | |
292 | Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki dar | |
293 | Group: Libraries/Python | |
294 | Requires: %{name}-libs = %{version}-%{release} | |
295 | ||
296 | %description -n python3-libdar | |
297 | Python 3 binding for dar library. | |
298 | ||
299 | %description -n python3-libdar -l pl.UTF-8 | |
300 | Wiązanie Pythona 3 do biblioteki dar. | |
301 | ||
fbe89be6 | 302 | %prep |
303 | %setup -q | |
e42712d8 | 304 | %patch0 -p1 |
fbe89be6 | 305 | |
7f28cb4a JB |
306 | %{__sed} -i -e 's,\$(libdir)/python3/dist-packages,%{py3_sitedir},' src/python/Makefile.am |
307 | ||
fbe89be6 | 308 | %build |
a5f8478f | 309 | %{__gettextize} |
09a398d2 | 310 | %{__libtoolize} |
311 | %{__aclocal} | |
312 | %{__autoconf} | |
313 | %{__autoheader} | |
314 | %{__automake} | |
315 | %configure \ | |
248dd4dd | 316 | %{!?with_static:--disable-dar-static} \ |
7f28cb4a | 317 | %{!?with_xattr:--disable-ea-support} \ |
12760b79 | 318 | --enable-mode=64 \ |
7f28cb4a | 319 | %{!?with_python:--disable-python-binding} \ |
23b7ee86 | 320 | --enable-static%{!?with_static_libs:=no} \ |
7f28cb4a | 321 | %{!?with_threads:--disable-threadar} \ |
09a398d2 | 322 | --disable-upx |
323 | %{__make} | |
fbe89be6 | 324 | |
325 | %install | |
326 | rm -rf $RPM_BUILD_ROOT | |
42343508 | 327 | %{?with_static:install -d $RPM_BUILD_ROOT/bin} |
5f5a8b21 | 328 | |
097d504f JB |
329 | %{__make} install \ |
330 | DESTDIR=$RPM_BUILD_ROOT | |
fbe89be6 | 331 | |
cd96d2aa | 332 | %{?with_static:%{__mv} $RPM_BUILD_ROOT{%{_bindir},/bin}/dar_static} |
5f5a8b21 | 333 | |
bca9e56e | 334 | ln -sf %{_datadir}/%{name} misc/doc |
a9720b1c | 335 | |
cd96d2aa JB |
336 | # obsoleted by pkg-config |
337 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libdar64.la | |
338 | ||
7f28cb4a JB |
339 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/dar/{libdar_test.py,pybind11_libdar.cpp,python/libdar_test.py} |
340 | ||
bac87f6c KK |
341 | %find_lang %{name} |
342 | ||
fbe89be6 | 343 | %clean |
344 | rm -rf $RPM_BUILD_ROOT | |
345 | ||
5a9f3364 JB |
346 | %post libs -p /sbin/ldconfig |
347 | %postun libs -p /sbin/ldconfig | |
09a398d2 | 348 | |
bac87f6c | 349 | %files -f %{name}.lang |
fbe89be6 | 350 | %defattr(644,root,root,755) |
cd96d2aa | 351 | %doc AUTHORS ChangeLog NEWS README THANKS TODO misc/doc |
407d29c6 | 352 | %attr(755,root,root) %{_bindir}/dar* |
edcac7c2 | 353 | %dir %{_datadir}/%{name} |
407d29c6 | 354 | %{_mandir}/man1/dar*.1* |
651df1b8 | 355 | %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/darrc |
5f5a8b21 | 356 | |
cd96d2aa JB |
357 | %if %{with static} |
358 | %files static | |
359 | %defattr(644,root,root,755) | |
360 | %attr(755,root,root) /bin/dar_static | |
361 | %endif | |
362 | ||
97597b5c | 363 | %files libs |
5a9f3364 | 364 | %defattr(644,root,root,755) |
12760b79 | 365 | %attr(755,root,root) %{_libdir}/libdar64.so.*.*.* |
7f28cb4a | 366 | %attr(755,root,root) %ghost %{_libdir}/libdar64.so.6000 |
97597b5c | 367 | |
09a398d2 | 368 | %files devel |
369 | %defattr(644,root,root,755) | |
12760b79 | 370 | %attr(755,root,root) %{_libdir}/libdar64.so |
09a398d2 | 371 | %{_includedir}/dar |
853009b5 | 372 | %{_pkgconfigdir}/libdar64.pc |
09a398d2 | 373 | |
9369df59 | 374 | %if %{with static_libs} |
097d504f JB |
375 | %files libs-static |
376 | %defattr(644,root,root,755) | |
12760b79 | 377 | %{_libdir}/libdar64.a |
9369df59 | 378 | %endif |
bca9e56e | 379 | |
380 | %files doc | |
381 | %defattr(644,root,root,755) | |
407d29c6 JB |
382 | %{_datadir}/%{name}/html |
383 | %{_datadir}/%{name}/man | |
384 | %{_datadir}/%{name}/mini-howto | |
385 | %{_datadir}/%{name}/samples | |
7f28cb4a | 386 | %{_datadir}/%{name}/*.css |
407d29c6 JB |
387 | %{_datadir}/%{name}/*.dtd |
388 | %{_datadir}/%{name}/*.jpg | |
389 | %{_datadir}/%{name}/*.html | |
390 | %{_datadir}/%{name}/*.txt | |
391 | %{_datadir}/%{name}/README | |
7f28cb4a JB |
392 | |
393 | %if %{with python} | |
394 | %files -n python3-libdar | |
395 | %defattr(644,root,root,755) | |
396 | %attr(755,root,root) %{py3_sitedir}/libdar.cpython-*.so | |
397 | %endif |