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