3 %bcond_without xfs # without (possible) support for xfsdump
4 %bcond_without samba # without smbclient support
5 %bcond_without client # without client package
6 %bcond_without server # without server package
8 Summary: A network-capable tape backup solution
9 Summary(pl.UTF-8): Sieciowo zorientowany system tworzenia kopii zapasowych
14 Group: Networking/Utilities
15 Source0: http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
16 # Source0-md5: c347c1e573c33018f234750ac6435156
17 Source1: %{name}-srv.crontab
18 Source2: %{name}.inetd
19 Source3: %{name}idx.inetd
20 Source4: amidxtape.inetd
21 Patch0: %{name}-no_libnsl.patch
22 Patch1: %{name}-chg-zd-mtx-sh.patch
23 Patch2: %{name}-tar.patch
24 Patch3: %{name}-bashizm.patch
25 Patch4: %{name}-as_needed.patch
26 URL: http://www.amanda.org/
27 BuildRequires: autoconf >= 2.53
28 BuildRequires: automake
29 BuildRequires: curl-devel
32 BuildRequires: glib2-devel
33 # curl is broken, see curl-config --libs
34 BuildRequires: keyutils-devel
35 BuildRequires: krb5-devel >= 1.6-4
36 BuildRequires: libtool
37 BuildRequires: libxslt-progs
38 BuildRequires: ncurses-devel
39 BuildRequires: openssh-clients
40 BuildRequires: openssl-devel
41 BuildRequires: perl-devel
42 BuildRequires: readline-devel >= 4.2
43 BuildRequires: rpmbuild(macros) >= 1.268
44 %{?with_samba:BuildRequires: samba-client}
46 %{?with_xfs:BuildRequires: xfsdump}
47 Conflicts: shadow < 1:4.0.4.1-4
48 Conflicts: pwdutils < 3.1.2-2
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
53 backup system that allows the administrator of a LAN to set up a
54 single master backup server to back up multiple hosts to a single
55 large capacity tape drive. AMANDA uses native dump and/or GNU tar
56 facilities and can back up a large number of workstations running
57 multiple versions of Unix. Newer versions of AMANDA (including this
58 version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts.
59 The amanda package contains the core AMANDA programs and will need to
60 be installed on both AMANDA clients and AMANDA servers. Note that you
61 will have to install the amanda-client and amanda-server packages as
64 %description -l pl.UTF-8
65 AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
66 zapasowych. Umożliwia administratorowi sieci tworzenie kopii z kilku
67 hostów na jednej maszynie wyposażonej w pojemny dysk lub streamer.
68 Nowsze wersje programu umożliwiają zabezpieczanie zasobów Microsoft
69 Windows 95/98/NT/2000 przy użyciu protokołu Samba. Ten pakiet zawiera
70 podstawowe pliki programu i powinien być zainstalowany zarówno na
71 serwerze jak i na kliencie. Pamiętaj także o instalacji pakietów
72 amanda-client i amanda-server!
75 Summary: Amanda shared libraries
76 Summary(pl.UTF-8): Biblioteki współdzielone pakietu amanda
77 Group: Networking/Utilities
78 Requires(postun): /usr/sbin/groupdel
79 Requires(postun): /usr/sbin/userdel
80 Requires(pre): /bin/id
81 Requires(pre): /usr/bin/chsh
82 Requires(pre): /usr/bin/getgid
83 Requires(pre): /usr/sbin/groupadd
84 Requires(pre): /usr/sbin/useradd
85 Provides: group(amanda)
86 Provides: user(amanda)
89 Amanda shared libraries.
91 %description libs -l pl.UTF-8
92 Biblioteki współdzielone pakietu amanda.
95 Summary: The client side of Amanda
96 Summary(pl.UTF-8): Klient Amandy
97 Group: Networking/Utilities
98 Requires: %{name}-libs = %{version}-%{release}
100 Conflicts: tar < 1.13
103 The Amanda-client package should be installed on any machine that will
104 be backed up by AMANDA (including the server if it also needs to be
105 backed up). You will also need to install the amanda package to each
106 AMANDA client. It requires at least one of dump and GNU tar installed.
108 %description client -l pl.UTF-8
109 Ten pakiet powinien być zainstalowany ma maszynach, z których
110 zawartości będą tworzone kopie zapasowe. Wymaga zainstalowanego co
111 najmniej jednego z pakietów dump i GNU tar.
114 Summary: The server side of Amanda
115 Summary(pl.UTF-8): Serwer Amandy
116 Group: Networking/Utilities
117 Requires: %{name}-libs = %{version}-%{release}
118 Requires: /etc/cron.d
127 The amanda-server package should be installed on the AMANDA server,
128 the machine attached to the device (such as a tape drive) where
129 backups will be written. You will also need to install the amanda
130 package to the AMANDA server. And, if the server is also to be backed
131 up, the server also needs to have the amanda-client package installed.
133 %description server -l pl.UTF-8
134 Ten pakiet powinien być zainstalowany na maszynach, na których będą
135 magazynowane kopie zapasowe (lub do których podpięte są urządzenia
140 Summary(pl.UTF-8): Serwer Amandy
141 Group: Networking/Utilities
142 Requires: %{name}-libs = %{version}-%{release}
146 %description perl -l pl.UTF-8
150 Summary(pl.UTF-8): Serwer Amandy
151 Group: Networking/Utilities
152 Requires: %{name}-perl = %{version}-%{release}
153 Requires: %{name}-server = %{version}-%{release}
155 %description perl-server
157 %description perl-server -l pl.UTF-8
169 %{__aclocal} -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive
175 GNUPLOT=/usr/bin/gnuplot \
179 RESTORE=/sbin/restore \
180 %{?with_xfs:XFSDUMP=/sbin/xfsdump} \
181 %{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
184 %{!?with_server:--without-server} \
185 %{!?with_client:--without-client} \
186 --with-index-server=localhost \
188 --with-group=amanda \
189 --with-tape-device=/dev/null \
190 --with-ftape-rawdevice=/dev/null \
191 --with-changer-device=/dev/null \
193 %{?with_samba:--with-smbclient=%{_bindir}/smbclient} \
194 --with-bsd-security \
195 --with-ssh-security \
196 --with-krb5-security \
197 --without-krb4-security \
198 --with-buffered-dump \
200 --with-gnutar-listdir=%{_sharedstatedir}/gnutar-lists \
201 --with-amandates=%{_sharedstatedir}/amanda/amandates \
202 --with-debugging=%{_sharedstatedir}/amanda/debug \
203 --with-tmpdir=/var/tmp \
204 --with-amperldir=%{perl_vendorarch} \
205 --disable-installperms
210 rm -rf $RPM_BUILD_ROOT
211 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
212 $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/gnutar-lists
215 DESTDIR=$RPM_BUILD_ROOT
217 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
218 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
219 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
220 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
222 install example/amanda.conf $RPM_BUILD_ROOT%{_sysconfdir}/amanda
223 touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.amandahosts
225 > $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/amandates
227 find $RPM_BUILD_ROOT -name \*.la | xargs rm -f
230 rm -rf $RPM_BUILD_ROOT
232 %triggerpostun libs -- %{name}-libs < 2.5.1p2-1
233 echo "Adding amanda to disk and backup groups"
234 /usr/sbin/usermod -G disk,backup amanda
235 echo "Setting amanda shell to /bin/sh"
236 /usr/bin/chsh -s /bin/sh amanda
237 if [ -f %{_sharedstatedir}/amanda/.amandahosts ]; then
238 echo "Fixing permissions of %{_sharedstatedir}/amanda/.amandahosts file"
239 chown amanda:amanda %{_sharedstatedir}/amanda/.amandahosts
240 chmod 600 %{_sharedstatedir}/amanda/.amandahosts
244 %groupadd -P %{name}-libs -g 80 amanda
245 %useradd -P %{name}-libs -u 80 -G disk,backup -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
248 if [ "$1" = "0" ]; then
254 %service -q rc-inetd reload
257 if [ "$1" = 0 ]; then
258 %service -q rc-inetd reload
262 %service -q rc-inetd reload
263 if [ "$1" = "1" ]; then
264 echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
268 if [ "$1" = 0 ]; then
269 %service -q rc-inetd reload
273 %defattr(644,root,root,755)
274 %doc AUTHORS COPYRIGHT ChangeLog NEWS README ReleaseNotes UPGRADING
275 %attr(755,root,root) %{_libdir}/amanda/libamanda*.so
276 %dir %{_libdir}/amanda
277 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda
278 %attr(600,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/amanda/.amandahosts
282 %defattr(644,root,root,755)
283 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amidxtape
284 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amandaidx
286 %attr(750,root,amanda) %dir %{_sysconfdir}/amanda
287 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/*
289 #%attr(664,root,amanda) %{_sharedstatedir}/amanda/*.ps
290 %{_sharedstatedir}/amanda/example
291 %{_sharedstatedir}/amanda/template.d
293 %config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
295 %dir %{_libdir}/amanda/application
296 %attr(755,root,root) %{_libdir}/amanda/application/amgtar
297 %attr(644,root,root) %{_libdir}/amanda/application/generic-dumper
299 %attr(755,root,root) %{_libdir}/amanda/libamdevice*.so
300 %attr(755,root,root) %{_libdir}/amanda/libamserver*.so
301 %attr(755,root,root) %{_libdir}/amanda/libamtape*.so
302 %attr(755,root,root) %{_libdir}/amanda/librestore*.so
304 %attr(755,root,root) %{_libdir}/amanda/amcat.awk
305 %attr(755,root,root) %{_libdir}/amanda/amcleanupdisk
306 %attr(755,root,root) %{_libdir}/amanda/amidxtaped
307 %attr(755,root,root) %{_libdir}/amanda/amindexd
308 %attr(755,root,root) %{_libdir}/amanda/amlogroll
309 %attr(755,root,root) %{_libdir}/amanda/amplot.awk
310 %attr(755,root,root) %{_libdir}/amanda/amplot.g
311 %attr(755,root,root) %{_libdir}/amanda/amplot.gp
312 %attr(755,root,root) %{_libdir}/amanda/amtrmidx
313 %attr(755,root,root) %{_libdir}/amanda/amtrmlog
314 %attr(755,root,root) %{_libdir}/amanda/chg-chio
315 %attr(755,root,root) %{_libdir}/amanda/chg-chs
316 %attr(755,root,root) %{_libdir}/amanda/chg-disk
317 %attr(755,root,root) %{_libdir}/amanda/chg-iomega
318 %attr(755,root,root) %{_libdir}/amanda/chg-juke
319 %attr(755,root,root) %{_libdir}/amanda/chg-lib.sh
320 %attr(755,root,root) %{_libdir}/amanda/chg-manual
321 %attr(755,root,root) %{_libdir}/amanda/chg-mcutil
322 %attr(755,root,root) %{_libdir}/amanda/chg-mtx
323 %attr(755,root,root) %{_libdir}/amanda/chg-multi
324 %attr(755,root,root) %{_libdir}/amanda/chg-null
325 %attr(755,root,root) %{_libdir}/amanda/chg-rait
326 %attr(755,root,root) %{_libdir}/amanda/chg-rth
327 %attr(755,root,root) %{_libdir}/amanda/chg-scsi
328 %attr(755,root,root) %{_libdir}/amanda/chg-zd-mtx
329 %attr(755,root,root) %{_libdir}/amanda/chunker
330 %attr(755,root,root) %{_libdir}/amanda/driver
331 %attr(4750,root,amanda) %{_libdir}/amanda/dumper
332 %attr(4750,root,amanda) %{_libdir}/amanda/planner
333 %attr(755,root,root) %{_libdir}/amanda/taper
335 %attr(755,root,root) %{_sbindir}/amadmin
336 %attr(755,root,root) %{_sbindir}/amaespipe
337 %attr(4750,root,amanda) %{_sbindir}/amcheck
338 %attr(755,root,root) %{_sbindir}/amcheckdb
339 %attr(755,root,root) %{_sbindir}/amcleanup
340 %attr(755,root,root) %{_sbindir}/amcrypt*
341 %attr(755,root,root) %{_sbindir}/amdd
342 %attr(755,root,root) %{_sbindir}/amdump
343 %attr(755,root,root) %{_sbindir}/amfetchdump
344 %attr(755,root,root) %{_sbindir}/amflush
345 %attr(755,root,root) %{_sbindir}/amgetconf
346 %attr(755,root,root) %{_sbindir}/amlabel
347 %attr(755,root,root) %{_sbindir}/ammt
348 %attr(755,root,root) %{_sbindir}/amoverview
349 %attr(755,root,root) %{_sbindir}/amplot
350 %attr(755,root,root) %{_sbindir}/amreport
351 %attr(755,root,root) %{_sbindir}/amrestore
352 %attr(755,root,root) %{_sbindir}/amrmtape
353 %attr(755,root,root) %{_sbindir}/amstatus
354 %attr(755,root,root) %{_sbindir}/amtape
355 %attr(755,root,root) %{_sbindir}/amtapetype
356 %attr(755,root,root) %{_sbindir}/amtoc
357 %attr(755,root,root) %{_sbindir}/amverify
358 %attr(755,root,root) %{_sbindir}/amverifyrun
359 %{_mandir}/man5/amanda.conf.5*
360 %{_mandir}/man8/amadmin.8*
361 %{_mandir}/man8/amaespipe.8*
362 %{_mandir}/man8/amanda.8*
363 %{_mandir}/man8/amcheck.8*
364 %{_mandir}/man8/amcheckdb.8*
365 %{_mandir}/man8/amcleanup.8*
366 %{_mandir}/man8/amcrypt*.8*
367 %{_mandir}/man8/amdd.8*
368 %{_mandir}/man8/amdump.8*
369 %{_mandir}/man8/amfetchdump.8*
370 %{_mandir}/man8/amflush.8*
371 %{_mandir}/man8/amgetconf.8*
372 %{_mandir}/man8/amlabel.8*
373 %{_mandir}/man8/ammt.8*
374 %{_mandir}/man8/amoverview.8*
375 %{_mandir}/man8/amplot.8*
376 %{_mandir}/man8/amreport.8*
377 %{_mandir}/man8/amrestore.8*
378 %{_mandir}/man8/amrmtape.8*
379 %{_mandir}/man8/amstatus.8*
380 %{_mandir}/man8/amtape.8*
381 %{_mandir}/man8/amtapetype.8*
382 %{_mandir}/man8/amtoc.8*
383 %{_mandir}/man8/amverify.8*
384 %{_mandir}/man8/amverifyrun.8*
389 %defattr(644,root,root,755)
390 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
391 %attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/amanda/amandates
392 %attr(755,root,root) %{_libdir}/amanda/libamclient*.so
393 %attr(755,root,root) %{_libdir}/amanda/amandad
394 %attr(755,root,root) %{_libdir}/amanda/noop
395 %attr(755,root,root) %{_libdir}/amanda/patch-system
396 %attr(755,root,root) %{_libdir}/amanda/sendbackup
397 %attr(755,root,root) %{_libdir}/amanda/sendsize
398 %attr(755,root,root) %{_libdir}/amanda/versionsuffix
399 %attr(4750,root,amanda) %{_libdir}/amanda/calcsize
400 %attr(4750,root,amanda) %{_libdir}/amanda/killpgrp
401 %attr(4750,root,amanda) %{_libdir}/amanda/rundump
402 %attr(4750,root,amanda) %{_libdir}/amanda/runtar
403 %attr(755,root,root) %{_libdir}/amanda/selfcheck
404 %attr(755,root,root) %{_sbindir}/amoldrecover
405 %attr(755,root,root) %{_sbindir}/amrecover
406 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/gnutar-lists
407 %{_mandir}/man5/amanda-client.conf.5*
408 %{_mandir}/man8/amrecover.8*
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_libdir}/amanda/libamglue*.so
414 %dir %{perl_vendorarch}/Amanda
415 %{perl_vendorarch}/Amanda/Config.pm
416 %{perl_vendorarch}/Amanda/Debug.pm
417 %{perl_vendorarch}/Amanda/Paths.pm
418 %{perl_vendorarch}/Amanda/Types.pm
419 %{perl_vendorarch}/Amanda/Util.pm
420 %dir %{perl_vendorarch}/auto/Amanda
421 %dir %{perl_vendorarch}/auto/Amanda/Config
422 %dir %{perl_vendorarch}/auto/Amanda/Debug
423 %dir %{perl_vendorarch}/auto/Amanda/Types
424 %dir %{perl_vendorarch}/auto/Amanda/Util
425 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Config/*.so
426 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Debug/*.so
427 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Types/*.so
428 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Util/*.so
431 %defattr(644,root,root,755)
432 %{perl_vendorarch}/Amanda/Changer.pm
433 %{perl_vendorarch}/Amanda/Cmdline.pm
434 %{perl_vendorarch}/Amanda/Device.pm
435 %{perl_vendorarch}/Amanda/Logfile.pm
436 %{perl_vendorarch}/Amanda/Tapefile.pm
437 %dir %{perl_vendorarch}/auto/Amanda/Cmdline
438 %dir %{perl_vendorarch}/auto/Amanda/Device
439 %dir %{perl_vendorarch}/auto/Amanda/Logfile
440 %dir %{perl_vendorarch}/auto/Amanda/Tapefile
441 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Cmdline/*.so
442 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Device/*.so
443 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Logfile/*.so
444 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Tapefile/*.so