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