]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- ncurses need tinfo
[packages/amanda.git] / amanda.spec
1 #
2 # Conditional build:
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
7 #
8 Summary:        A network-capable tape backup solution
9 Summary(pl.UTF-8):      Sieciowo zorientowany system tworzenia kopii zapasowych
10 Name:           amanda
11 Version:        2.6.0
12 Release:        0.1
13 License:        BSD
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
30 BuildRequires:  dump
31 BuildRequires:  flex
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}
45 BuildRequires:  swig
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)
50
51 %description
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
62 well.
63
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!
73
74 %package libs
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)
87
88 %description libs
89 Amanda shared libraries.
90
91 %description libs -l pl.UTF-8
92 Biblioteki współdzielone pakietu amanda.
93
94 %package client
95 Summary:        The client side of Amanda
96 Summary(pl.UTF-8):      Klient Amandy
97 Group:          Networking/Utilities
98 Requires:       %{name}-libs = %{version}-%{release}
99 Requires:       rc-inetd
100 Conflicts:      tar < 1.13
101
102 %description client
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.
107
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.
112
113 %package server
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
119 Requires:       crondaemon
120 Requires:       gnuplot
121 Requires:       mt-st
122 Requires:       mtx
123 Requires:       rc-inetd
124 Requires:       tar
125 Requires:       gzip
126 #Suggests:      star
127 Obsoletes:      amanda
128
129 %description server
130 The amanda-server package should be installed on the AMANDA server,
131 the machine attached to the device (such as a tape drive) where
132 backups will be written. You will also need to install the amanda
133 package to the AMANDA server. And, if the server is also to be backed
134 up, the server also needs to have the amanda-client package installed.
135
136 %description server -l pl.UTF-8
137 Ten pakiet powinien być zainstalowany na maszynach, na których będą
138 magazynowane kopie zapasowe (lub do których podpięte są urządzenia
139 typu streamer).
140
141 %package perl
142 Summary:        Perl bindings for amanda
143 Summary(pl.UTF-8):      Wiązania perla dla Amandy
144 Group:          Networking/Utilities
145 Requires:       %{name}-libs = %{version}-%{release}
146
147 %description perl
148 Perl bindings for amanda.
149
150 %description perl -l pl.UTF-8
151 Wiązania perla dla Amandy.
152
153 %package perl-server
154 Summary:        Perl bindings for amanda server
155 Summary(pl.UTF-8):      Wiązania perla dla serwera Amandy
156 Group:          Networking/Utilities
157 Requires:       %{name}-perl = %{version}-%{release}
158 Requires:       %{name}-server = %{version}-%{release}
159
160 %description perl-server
161 Perl bindings for amanda server.
162
163 %description perl-server -l pl.UTF-8
164 Wiązania perla dla serwera Amandy.
165
166 %prep
167 %setup -q
168 %patch0 -p1
169 %patch1 -p1
170 %patch2 -p1
171 %patch3 -p1
172 %patch4 -p1
173
174 %build
175 %{__libtoolize}
176 %{__aclocal} -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive
177 %{__autoconf}
178 %{__automake}
179 %configure \
180         DUMP=/sbin/dump \
181         GNUPLOT=/usr/bin/gnuplot \
182         GZIP=/bin/gzip \
183         MAILER=/bin/mail \
184         MT=/bin/mt \
185         MTX=/usr/sbin/mtx \
186         PRINT=/usr/bin/lpr \
187         RESTORE=/sbin/restore \
188         STAR=/usr/bin/star \
189         %{?with_xfs:XFSDUMP=/sbin/xfsdump} \
190         %{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
191         --disable-static \
192         --enable-shared \
193         %{!?with_server:--without-server} \
194         %{!?with_client:--without-client} \
195         --with-index-server=localhost \
196         --with-user=amanda \
197         --with-group=amanda \
198         --with-tape-device=/dev/null \
199         --with-ftape-rawdevice=/dev/null \
200         --with-changer-device=/dev/null \
201         --with-fqdn \
202         %{?with_samba:--with-smbclient=%{_bindir}/smbclient} \
203         --with-bsd-security \
204         --with-ssh-security \
205         --with-krb5-security \
206         --without-krb4-security \
207         --with-buffered-dump \
208         --with-amandahosts \
209         --with-gnutar-listdir=%{_sharedstatedir}/gnutar-lists \
210         --with-amandates=%{_sharedstatedir}/amanda/amandates \
211         --with-debugging=%{_sharedstatedir}/amanda/debug \
212         --with-tmpdir=/var/tmp \
213         --with-amperldir=%{perl_vendorarch} \
214         --disable-installperms
215
216 %{__make}
217
218 %install
219 rm -rf $RPM_BUILD_ROOT
220 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
221         $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/gnutar-lists \
222         $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/debug/{amandad,client,server}
223
224 %{__make} install \
225         DESTDIR=$RPM_BUILD_ROOT
226
227 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
228 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
229 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
230 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
231
232 install example/amanda.conf $RPM_BUILD_ROOT%{_sysconfdir}/amanda
233 install example/amanda-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/amanda
234 touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.amandahosts
235
236 > $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/amandates
237
238 find $RPM_BUILD_ROOT -name \*.la | xargs rm -f
239
240 %clean
241 rm -rf $RPM_BUILD_ROOT
242
243 %triggerpostun libs -- %{name}-libs < 2.5.1p2-1
244 echo "Adding amanda to disk and backup groups"
245 /usr/sbin/usermod -G disk,backup amanda
246 echo "Setting amanda shell to /bin/sh"
247 /usr/bin/chsh -s /bin/sh amanda
248 if [ -f %{_sharedstatedir}/amanda/.amandahosts ]; then
249         echo "Fixing permissions of %{_sharedstatedir}/amanda/.amandahosts file"
250         chown amanda:amanda %{_sharedstatedir}/amanda/.amandahosts
251         chmod 600 %{_sharedstatedir}/amanda/.amandahosts
252 fi
253
254 %pre libs
255 %groupadd -P %{name}-libs -g 80 amanda
256 %useradd -P %{name}-libs -u 80 -G disk,backup -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
257
258 %postun libs
259 if [ "$1" = "0" ]; then
260         %userremove amanda
261         %groupremove amanda
262 fi
263
264 %post client
265 %service -q rc-inetd reload
266
267 %postun client
268 if [ "$1" = 0 ]; then
269         %service -q rc-inetd reload
270 fi
271
272 %post server
273 %service -q rc-inetd reload
274 if [ "$1" = "1" ]; then
275         echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
276 fi
277
278 %postun server
279 if [ "$1" = 0 ]; then
280         %service -q rc-inetd reload
281 fi
282
283 %files libs
284 %defattr(644,root,root,755)
285 %doc AUTHORS COPYRIGHT ChangeLog NEWS README ReleaseNotes UPGRADING
286 %attr(755,root,root) %{_libdir}/amanda/libamanda*.so
287 %dir %{_libdir}/amanda
288 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda
289 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/debug
290 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/debug/amandad
291 %attr(600,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/amanda/.amandahosts
292
293 %if %{with server}
294 %files server
295 %defattr(644,root,root,755)
296 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amidxtape
297 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amandaidx
298
299 %attr(750,root,amanda) %dir %{_sysconfdir}/amanda
300 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/amanda.conf
301
302 %{_sharedstatedir}/amanda/example
303 %{_sharedstatedir}/amanda/template.d
304 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/debug/server
305
306 %config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
307
308 %dir %{_libdir}/amanda/application
309 %attr(755,root,root) %{_libdir}/amanda/application/amgtar
310 %attr(644,root,root) %{_libdir}/amanda/application/generic-dumper
311
312 %attr(755,root,root) %{_libdir}/amanda/libamdevice*.so
313 %attr(755,root,root) %{_libdir}/amanda/libamserver*.so
314 %attr(755,root,root) %{_libdir}/amanda/libamtape*.so
315 %attr(755,root,root) %{_libdir}/amanda/librestore*.so
316
317 %{_libdir}/amanda/amanda-sh-lib.sh
318 %attr(755,root,root) %{_libdir}/amanda/amcat.awk
319 %attr(755,root,root) %{_libdir}/amanda/amcleanupdisk
320 %attr(755,root,root) %{_libdir}/amanda/amidxtaped
321 %attr(755,root,root) %{_libdir}/amanda/amindexd
322 %attr(755,root,root) %{_libdir}/amanda/amlogroll
323 %attr(755,root,root) %{_libdir}/amanda/amplot.awk
324 %attr(755,root,root) %{_libdir}/amanda/amplot.g
325 %attr(755,root,root) %{_libdir}/amanda/amplot.gp
326 %attr(755,root,root) %{_libdir}/amanda/amtrmidx
327 %attr(755,root,root) %{_libdir}/amanda/amtrmlog
328 %attr(755,root,root) %{_libdir}/amanda/chg-chio
329 %attr(755,root,root) %{_libdir}/amanda/chg-chs
330 %attr(755,root,root) %{_libdir}/amanda/chg-disk
331 %attr(755,root,root) %{_libdir}/amanda/chg-iomega
332 %attr(755,root,root) %{_libdir}/amanda/chg-juke
333 %attr(755,root,root) %{_libdir}/amanda/chg-lib.sh
334 %attr(755,root,root) %{_libdir}/amanda/chg-manual
335 %attr(755,root,root) %{_libdir}/amanda/chg-mcutil
336 %attr(755,root,root) %{_libdir}/amanda/chg-mtx
337 %attr(755,root,root) %{_libdir}/amanda/chg-multi
338 %attr(755,root,root) %{_libdir}/amanda/chg-null
339 %attr(755,root,root) %{_libdir}/amanda/chg-rait
340 %attr(755,root,root) %{_libdir}/amanda/chg-rth
341 %attr(755,root,root) %{_libdir}/amanda/chg-scsi
342 %attr(755,root,root) %{_libdir}/amanda/chg-zd-mtx
343 %attr(755,root,root) %{_libdir}/amanda/chunker
344 %attr(755,root,root) %{_libdir}/amanda/driver
345 %attr(4750,root,amanda) %{_libdir}/amanda/dumper
346 %attr(755,root,root) %{_libdir}/amanda/patch-system
347 %attr(4750,root,amanda) %{_libdir}/amanda/planner
348 %attr(755,root,root) %{_libdir}/amanda/taper
349
350 %attr(755,root,root) %{_sbindir}/amaddclient
351 %attr(755,root,root) %{_sbindir}/amadmin
352 %attr(755,root,root) %{_sbindir}/amaespipe
353 %attr(4750,root,amanda) %{_sbindir}/amcheck
354 %attr(755,root,root) %{_sbindir}/amcheckdb
355 %attr(755,root,root) %{_sbindir}/amcheckdump
356 %attr(755,root,root) %{_sbindir}/amcleanup
357 %attr(755,root,root) %{_sbindir}/amcrypt*
358 %attr(755,root,root) %{_sbindir}/amdd
359 %attr(755,root,root) %{_sbindir}/amdevcheck
360 %attr(755,root,root) %{_sbindir}/amdump
361 %attr(755,root,root) %{_sbindir}/amfetchdump
362 %attr(755,root,root) %{_sbindir}/amflush
363 %attr(755,root,root) %{_sbindir}/amgetconf
364 %attr(755,root,root) %{_sbindir}/amgpgcrypt
365 %attr(755,root,root) %{_sbindir}/amlabel
366 %attr(755,root,root) %{_sbindir}/ammt
367 %attr(755,root,root) %{_sbindir}/amoverview
368 %attr(755,root,root) %{_sbindir}/amplot
369 %attr(755,root,root) %{_sbindir}/amreport
370 %attr(755,root,root) %{_sbindir}/amrestore
371 %attr(755,root,root) %{_sbindir}/amrmtape
372 %attr(755,root,root) %{_sbindir}/amserverconfig
373 %attr(755,root,root) %{_sbindir}/amstatus
374 %attr(755,root,root) %{_sbindir}/amtape
375 %attr(755,root,root) %{_sbindir}/amtapetype
376 %attr(755,root,root) %{_sbindir}/amtoc
377 %attr(755,root,root) %{_sbindir}/amverify
378 %attr(755,root,root) %{_sbindir}/amverifyrun
379 %{_mandir}/man5/amanda.conf.5*
380 %{_mandir}/man8/amaddclient.8*
381 %{_mandir}/man8/amadmin.8*
382 %{_mandir}/man8/amaespipe.8*
383 %{_mandir}/man8/amanda.8*
384 %{_mandir}/man8/amcheck.8*
385 %{_mandir}/man8/amcheckdb.8*
386 %{_mandir}/man8/amcheckdump.8*
387 %{_mandir}/man8/amcleanup.8*
388 %{_mandir}/man8/amcrypt*.8*
389 %{_mandir}/man8/amdd.8*
390 %{_mandir}/man8/amdevcheck.8*
391 %{_mandir}/man8/amdump.8*
392 %{_mandir}/man8/amfetchdump.8*
393 %{_mandir}/man8/amflush.8*
394 %{_mandir}/man8/amgetconf.8*
395 %{_mandir}/man8/amgpgcrypt.8*
396 %{_mandir}/man8/amlabel.8*
397 %{_mandir}/man8/ammt.8*
398 %{_mandir}/man8/amoverview.8*
399 %{_mandir}/man8/amplot.8*
400 %{_mandir}/man8/amreport.8*
401 %{_mandir}/man8/amrestore.8*
402 %{_mandir}/man8/amrmtape.8*
403 %{_mandir}/man8/amserverconfig.8*
404 %{_mandir}/man8/amstatus.8*
405 %{_mandir}/man8/amtape.8*
406 %{_mandir}/man8/amtapetype.8*
407 %{_mandir}/man8/amtoc.8*
408 %{_mandir}/man8/amverify.8*
409 %{_mandir}/man8/amverifyrun.8*
410 %endif
411
412 %if %{with client}
413 %files client
414 %defattr(644,root,root,755)
415 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
416 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/amanda-client.conf
417 %attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/amanda/amandates
418 %attr(755,root,root) %{_libdir}/amanda/libamclient*.so
419 %attr(755,root,root) %{_libdir}/amanda/amandad
420 %attr(755,root,root) %{_libdir}/amanda/noop
421 %attr(755,root,root) %{_libdir}/amanda/sendbackup
422 %attr(755,root,root) %{_libdir}/amanda/sendsize
423 %attr(755,root,root) %{_libdir}/amanda/versionsuffix
424 %attr(4750,root,amanda) %{_libdir}/amanda/calcsize
425 %attr(4750,root,amanda) %{_libdir}/amanda/killpgrp
426 %attr(4750,root,amanda) %{_libdir}/amanda/rundump
427 %attr(4750,root,amanda) %{_libdir}/amanda/runtar
428 %attr(755,root,root) %{_libdir}/amanda/selfcheck
429 %attr(755,root,root) %{_sbindir}/amoldrecover
430 %attr(755,root,root) %{_sbindir}/amrecover
431 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/gnutar-lists
432 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/debug/client
433 %{_mandir}/man5/amanda-client.conf.5*
434 %{_mandir}/man8/amrecover.8*
435 %endif
436
437 %files perl
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/amanda/libamglue*.so
440 %dir %{perl_vendorarch}/Amanda
441 %{perl_vendorarch}/Amanda/Config.pm
442 %{perl_vendorarch}/Amanda/Debug.pm
443 %{perl_vendorarch}/Amanda/Paths.pm
444 %{perl_vendorarch}/Amanda/Types.pm
445 %{perl_vendorarch}/Amanda/Util.pm
446 %dir %{perl_vendorarch}/auto/Amanda
447 %dir %{perl_vendorarch}/auto/Amanda/Config
448 %dir %{perl_vendorarch}/auto/Amanda/Debug
449 %dir %{perl_vendorarch}/auto/Amanda/Types
450 %dir %{perl_vendorarch}/auto/Amanda/Util
451 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Config/*.so
452 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Debug/*.so
453 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Types/*.so
454 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Util/*.so
455
456 %files perl-server
457 %defattr(644,root,root,755)
458 %{perl_vendorarch}/Amanda/Changer.pm
459 %{perl_vendorarch}/Amanda/Cmdline.pm
460 %{perl_vendorarch}/Amanda/Device.pm
461 %{perl_vendorarch}/Amanda/Logfile.pm
462 %{perl_vendorarch}/Amanda/Tapefile.pm
463 %dir %{perl_vendorarch}/auto/Amanda/Cmdline
464 %dir %{perl_vendorarch}/auto/Amanda/Device
465 %dir %{perl_vendorarch}/auto/Amanda/Logfile
466 %dir %{perl_vendorarch}/auto/Amanda/Tapefile
467 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Cmdline/*.so
468 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Device/*.so
469 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Logfile/*.so
470 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Tapefile/*.so
This page took 0.053453 seconds and 3 git commands to generate.