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