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