]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- typo
[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:  pkgconfig
43 BuildRequires:  readline-devel >= 4.2
44 BuildRequires:  rpmbuild(macros) >= 1.268
45 %{?with_samba:BuildRequires:    samba-client}
46 BuildRequires:  swig
47 %{?with_xfs:BuildRequires:      xfsdump}
48 Conflicts:      shadow < 1:4.0.4.1-4
49 Conflicts:      pwdutils < 3.1.2-2
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53 AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
54 backup system that allows the administrator of a LAN to set up a
55 single master backup server to back up multiple hosts to a single
56 large capacity tape drive. AMANDA uses native dump and/or GNU tar
57 facilities and can back up a large number of workstations running
58 multiple versions of Unix. Newer versions of AMANDA (including this
59 version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts.
60 The amanda package contains the core AMANDA programs and will need to
61 be installed on both AMANDA clients and AMANDA servers. Note that you
62 will have to install the amanda-client and amanda-server packages as
63 well.
64
65 %description -l pl.UTF-8
66 AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
67 zapasowych. Umożliwia administratorowi sieci tworzenie kopii z kilku
68 hostów na jednej maszynie wyposażonej w pojemny dysk lub streamer.
69 Nowsze wersje programu umożliwiają zabezpieczanie zasobów Microsoft
70 Windows 95/98/NT/2000 przy użyciu protokołu Samba. Ten pakiet zawiera
71 podstawowe pliki programu i powinien być zainstalowany zarówno na
72 serwerze jak i na kliencie. Pamiętaj także o instalacji pakietów
73 amanda-client i amanda-server!
74
75 %package libs
76 Summary:        Amanda shared libraries
77 Summary(pl.UTF-8):      Biblioteki współdzielone pakietu amanda
78 Group:          Networking/Utilities
79 Requires(postun):       /usr/sbin/groupdel
80 Requires(postun):       /usr/sbin/userdel
81 Requires(pre):  /bin/id
82 Requires(pre):  /usr/bin/chsh
83 Requires(pre):  /usr/bin/getgid
84 Requires(pre):  /usr/sbin/groupadd
85 Requires(pre):  /usr/sbin/useradd
86 Provides:       group(amanda)
87 Provides:       user(amanda)
88
89 %description libs
90 Amanda shared libraries.
91
92 %description libs -l pl.UTF-8
93 Biblioteki współdzielone pakietu amanda.
94
95 %package client
96 Summary:        The client side of Amanda
97 Summary(pl.UTF-8):      Klient Amandy
98 Group:          Networking/Utilities
99 Requires:       %{name}-libs = %{version}-%{release}
100 Requires:       rc-inetd
101 Conflicts:      tar < 1.13
102
103 %description client
104 The Amanda-client package should be installed on any machine that will
105 be backed up by AMANDA (including the server if it also needs to be
106 backed up). You will also need to install the amanda package to each
107 AMANDA client. It requires at least one of dump and GNU tar installed.
108
109 %description client -l pl.UTF-8
110 Ten pakiet powinien być zainstalowany ma maszynach, z których
111 zawartości będą tworzone kopie zapasowe. Wymaga zainstalowanego co
112 najmniej jednego z pakietów dump i GNU tar.
113
114 %package server
115 Summary:        The server side of Amanda
116 Summary(pl.UTF-8):      Serwer Amandy
117 Group:          Networking/Utilities
118 Requires:       %{name}-libs = %{version}-%{release}
119 Requires:       /etc/cron.d
120 Requires:       crondaemon
121 Requires:       gnuplot
122 Requires:       mt-st
123 Requires:       mtx
124 Requires:       rc-inetd
125 Requires:       tar
126 Requires:       gzip
127 #Suggests:      star
128 Obsoletes:      amanda
129
130 %description server
131 The amanda-server package should be installed on the AMANDA server,
132 the machine attached to the device (such as a tape drive) where
133 backups will be written. You will also need to install the amanda
134 package to the AMANDA server. And, if the server is also to be backed
135 up, the server also needs to have the amanda-client package installed.
136
137 %description server -l pl.UTF-8
138 Ten pakiet powinien być zainstalowany na maszynach, na których będą
139 magazynowane kopie zapasowe (lub do których podpięte są urządzenia
140 typu streamer).
141
142 %package perl
143 Summary:        Perl bindings for amanda
144 Summary(pl.UTF-8):      Wiązania perla dla Amandy
145 Group:          Networking/Utilities
146 Requires:       %{name}-libs = %{version}-%{release}
147
148 %description perl
149 Perl bindings for amanda.
150
151 %description perl -l pl.UTF-8
152 Wiązania perla dla Amandy.
153
154 %package perl-server
155 Summary:        Perl bindings for amanda server
156 Summary(pl.UTF-8):      Wiązania perla dla serwera Amandy
157 Group:          Networking/Utilities
158 Requires:       %{name}-perl = %{version}-%{release}
159 Requires:       %{name}-server = %{version}-%{release}
160
161 %description perl-server
162 Perl bindings for amanda server.
163
164 %description perl-server -l pl.UTF-8
165 Wiązania perla dla serwera Amandy.
166
167 %prep
168 %setup -q
169 %patch0 -p1
170 %patch1 -p1
171 %patch2 -p1
172 %patch3 -p1
173 %patch4 -p1
174
175 %build
176 %{__libtoolize}
177 %{__aclocal} -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive
178 %{__autoconf}
179 %{__automake}
180 %configure \
181         DUMP=/sbin/dump \
182         GNUPLOT=/usr/bin/gnuplot \
183         GZIP=/bin/gzip \
184         MAILER=/bin/mail \
185         MT=/bin/mt \
186         MTX=/usr/sbin/mtx \
187         PRINT=/usr/bin/lpr \
188         RESTORE=/sbin/restore \
189         STAR=/usr/bin/star \
190         %{?with_xfs:XFSDUMP=/sbin/xfsdump} \
191         %{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
192         --disable-static \
193         --enable-shared \
194         %{!?with_server:--without-server} \
195         %{!?with_client:--without-client} \
196         --with-index-server=localhost \
197         --with-user=amanda \
198         --with-group=amanda \
199         --with-tape-device=/dev/null \
200         --with-ftape-rawdevice=/dev/null \
201         --with-changer-device=/dev/null \
202         --with-fqdn \
203         %{?with_samba:--with-smbclient=%{_bindir}/smbclient} \
204         --with-bsd-security \
205         --with-ssh-security \
206         --with-krb5-security \
207         --without-krb4-security \
208         --with-buffered-dump \
209         --with-amandahosts \
210         --with-gnutar-listdir=%{_sharedstatedir}/gnutar-lists \
211         --with-amandates=%{_sharedstatedir}/amanda/amandates \
212         --with-debugging=%{_sharedstatedir}/amanda/debug \
213         --with-tmpdir=/var/tmp \
214         --with-amperldir=%{perl_vendorarch} \
215         --disable-installperms
216
217 %{__make}
218
219 %install
220 rm -rf $RPM_BUILD_ROOT
221 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
222         $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/gnutar-lists \
223         $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/debug/{amandad,client,server}
224
225 %{__make} install \
226         DESTDIR=$RPM_BUILD_ROOT
227
228 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
229 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
230 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
231 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
232
233 install example/amanda.conf $RPM_BUILD_ROOT%{_sysconfdir}/amanda
234 install example/amanda-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/amanda
235 touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.amandahosts
236
237 > $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/amandates
238
239 find $RPM_BUILD_ROOT -name \*.la | xargs rm -f
240
241 %clean
242 rm -rf $RPM_BUILD_ROOT
243
244 %triggerpostun libs -- %{name}-libs < 2.5.1p2-1
245 echo "Adding amanda to disk and backup groups"
246 /usr/sbin/usermod -G disk,backup amanda
247 echo "Setting amanda shell to /bin/sh"
248 /usr/bin/chsh -s /bin/sh amanda
249 if [ -f %{_sharedstatedir}/amanda/.amandahosts ]; then
250         echo "Fixing permissions of %{_sharedstatedir}/amanda/.amandahosts file"
251         chown amanda:amanda %{_sharedstatedir}/amanda/.amandahosts
252         chmod 600 %{_sharedstatedir}/amanda/.amandahosts
253 fi
254
255 %pre libs
256 %groupadd -P %{name}-libs -g 80 amanda
257 %useradd -P %{name}-libs -u 80 -G disk,backup -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
258
259 %postun libs
260 if [ "$1" = "0" ]; then
261         %userremove amanda
262         %groupremove amanda
263 fi
264
265 %post client
266 %service -q rc-inetd reload
267
268 %postun client
269 if [ "$1" = 0 ]; then
270         %service -q rc-inetd reload
271 fi
272
273 %post server
274 %service -q rc-inetd reload
275 if [ "$1" = "1" ]; then
276         echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
277 fi
278
279 %postun server
280 if [ "$1" = 0 ]; then
281         %service -q rc-inetd reload
282 fi
283
284 %files libs
285 %defattr(644,root,root,755)
286 %doc AUTHORS COPYRIGHT ChangeLog NEWS README ReleaseNotes UPGRADING
287 %attr(755,root,root) %{_libdir}/amanda/libamanda*.so
288 %dir %{_libdir}/amanda
289 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda
290 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/debug
291 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/debug/amandad
292 %attr(600,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/amanda/.amandahosts
293
294 %if %{with server}
295 %files server
296 %defattr(644,root,root,755)
297 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amidxtape
298 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amandaidx
299
300 %attr(750,root,amanda) %dir %{_sysconfdir}/amanda
301 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/amanda.conf
302
303 %{_sharedstatedir}/amanda/example
304 %{_sharedstatedir}/amanda/template.d
305 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/debug/server
306
307 %config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
308
309 %dir %{_libdir}/amanda/application
310 %attr(755,root,root) %{_libdir}/amanda/application/amgtar
311 %attr(644,root,root) %{_libdir}/amanda/application/generic-dumper
312
313 %attr(755,root,root) %{_libdir}/amanda/libamdevice*.so
314 %attr(755,root,root) %{_libdir}/amanda/libamserver*.so
315 %attr(755,root,root) %{_libdir}/amanda/libamtape*.so
316 %attr(755,root,root) %{_libdir}/amanda/librestore*.so
317
318 %{_libdir}/amanda/amanda-sh-lib.sh
319 %attr(755,root,root) %{_libdir}/amanda/amcat.awk
320 %attr(755,root,root) %{_libdir}/amanda/amcleanupdisk
321 %attr(755,root,root) %{_libdir}/amanda/amidxtaped
322 %attr(755,root,root) %{_libdir}/amanda/amindexd
323 %attr(755,root,root) %{_libdir}/amanda/amlogroll
324 %attr(755,root,root) %{_libdir}/amanda/amplot.awk
325 %attr(755,root,root) %{_libdir}/amanda/amplot.g
326 %attr(755,root,root) %{_libdir}/amanda/amplot.gp
327 %attr(755,root,root) %{_libdir}/amanda/amtrmidx
328 %attr(755,root,root) %{_libdir}/amanda/amtrmlog
329 %attr(755,root,root) %{_libdir}/amanda/chg-chio
330 %attr(755,root,root) %{_libdir}/amanda/chg-chs
331 %attr(755,root,root) %{_libdir}/amanda/chg-disk
332 %attr(755,root,root) %{_libdir}/amanda/chg-iomega
333 %attr(755,root,root) %{_libdir}/amanda/chg-juke
334 %attr(755,root,root) %{_libdir}/amanda/chg-lib.sh
335 %attr(755,root,root) %{_libdir}/amanda/chg-manual
336 %attr(755,root,root) %{_libdir}/amanda/chg-mcutil
337 %attr(755,root,root) %{_libdir}/amanda/chg-mtx
338 %attr(755,root,root) %{_libdir}/amanda/chg-multi
339 %attr(755,root,root) %{_libdir}/amanda/chg-null
340 %attr(755,root,root) %{_libdir}/amanda/chg-rait
341 %attr(755,root,root) %{_libdir}/amanda/chg-rth
342 %attr(755,root,root) %{_libdir}/amanda/chg-scsi
343 %attr(755,root,root) %{_libdir}/amanda/chg-zd-mtx
344 %attr(755,root,root) %{_libdir}/amanda/chunker
345 %attr(755,root,root) %{_libdir}/amanda/driver
346 %attr(4750,root,amanda) %{_libdir}/amanda/dumper
347 %attr(755,root,root) %{_libdir}/amanda/patch-system
348 %attr(4750,root,amanda) %{_libdir}/amanda/planner
349 %attr(755,root,root) %{_libdir}/amanda/taper
350
351 %attr(755,root,root) %{_sbindir}/amaddclient
352 %attr(755,root,root) %{_sbindir}/amadmin
353 %attr(755,root,root) %{_sbindir}/amaespipe
354 %attr(4750,root,amanda) %{_sbindir}/amcheck
355 %attr(755,root,root) %{_sbindir}/amcheckdb
356 %attr(755,root,root) %{_sbindir}/amcheckdump
357 %attr(755,root,root) %{_sbindir}/amcleanup
358 %attr(755,root,root) %{_sbindir}/amcrypt*
359 %attr(755,root,root) %{_sbindir}/amdd
360 %attr(755,root,root) %{_sbindir}/amdevcheck
361 %attr(755,root,root) %{_sbindir}/amdump
362 %attr(755,root,root) %{_sbindir}/amfetchdump
363 %attr(755,root,root) %{_sbindir}/amflush
364 %attr(755,root,root) %{_sbindir}/amgetconf
365 %attr(755,root,root) %{_sbindir}/amgpgcrypt
366 %attr(755,root,root) %{_sbindir}/amlabel
367 %attr(755,root,root) %{_sbindir}/ammt
368 %attr(755,root,root) %{_sbindir}/amoverview
369 %attr(755,root,root) %{_sbindir}/amplot
370 %attr(755,root,root) %{_sbindir}/amreport
371 %attr(755,root,root) %{_sbindir}/amrestore
372 %attr(755,root,root) %{_sbindir}/amrmtape
373 %attr(755,root,root) %{_sbindir}/amserverconfig
374 %attr(755,root,root) %{_sbindir}/amstatus
375 %attr(755,root,root) %{_sbindir}/amtape
376 %attr(755,root,root) %{_sbindir}/amtapetype
377 %attr(755,root,root) %{_sbindir}/amtoc
378 %attr(755,root,root) %{_sbindir}/amverify
379 %attr(755,root,root) %{_sbindir}/amverifyrun
380 %{_mandir}/man5/amanda.conf.5*
381 %{_mandir}/man8/amaddclient.8*
382 %{_mandir}/man8/amadmin.8*
383 %{_mandir}/man8/amaespipe.8*
384 %{_mandir}/man8/amanda.8*
385 %{_mandir}/man8/amcheck.8*
386 %{_mandir}/man8/amcheckdb.8*
387 %{_mandir}/man8/amcheckdump.8*
388 %{_mandir}/man8/amcleanup.8*
389 %{_mandir}/man8/amcrypt*.8*
390 %{_mandir}/man8/amdd.8*
391 %{_mandir}/man8/amdevcheck.8*
392 %{_mandir}/man8/amdump.8*
393 %{_mandir}/man8/amfetchdump.8*
394 %{_mandir}/man8/amflush.8*
395 %{_mandir}/man8/amgetconf.8*
396 %{_mandir}/man8/amgpgcrypt.8*
397 %{_mandir}/man8/amlabel.8*
398 %{_mandir}/man8/ammt.8*
399 %{_mandir}/man8/amoverview.8*
400 %{_mandir}/man8/amplot.8*
401 %{_mandir}/man8/amreport.8*
402 %{_mandir}/man8/amrestore.8*
403 %{_mandir}/man8/amrmtape.8*
404 %{_mandir}/man8/amserverconfig.8*
405 %{_mandir}/man8/amstatus.8*
406 %{_mandir}/man8/amtape.8*
407 %{_mandir}/man8/amtapetype.8*
408 %{_mandir}/man8/amtoc.8*
409 %{_mandir}/man8/amverify.8*
410 %{_mandir}/man8/amverifyrun.8*
411 %endif
412
413 %if %{with client}
414 %files client
415 %defattr(644,root,root,755)
416 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
417 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/amanda-client.conf
418 %attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/amanda/amandates
419 %attr(755,root,root) %{_libdir}/amanda/libamclient*.so
420 %attr(755,root,root) %{_libdir}/amanda/amandad
421 %attr(755,root,root) %{_libdir}/amanda/noop
422 %attr(755,root,root) %{_libdir}/amanda/sendbackup
423 %attr(755,root,root) %{_libdir}/amanda/sendsize
424 %attr(755,root,root) %{_libdir}/amanda/versionsuffix
425 %attr(4750,root,amanda) %{_libdir}/amanda/calcsize
426 %attr(4750,root,amanda) %{_libdir}/amanda/killpgrp
427 %attr(4750,root,amanda) %{_libdir}/amanda/rundump
428 %attr(4750,root,amanda) %{_libdir}/amanda/runtar
429 %attr(755,root,root) %{_libdir}/amanda/selfcheck
430 %attr(755,root,root) %{_sbindir}/amoldrecover
431 %attr(755,root,root) %{_sbindir}/amrecover
432 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/gnutar-lists
433 %attr(770,root,amanda) %dir %{_sharedstatedir}/amanda/debug/client
434 %{_mandir}/man5/amanda-client.conf.5*
435 %{_mandir}/man8/amrecover.8*
436 %endif
437
438 %files perl
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_libdir}/amanda/libamglue*.so
441 %dir %{perl_vendorarch}/Amanda
442 %{perl_vendorarch}/Amanda/Config.pm
443 %{perl_vendorarch}/Amanda/Debug.pm
444 %{perl_vendorarch}/Amanda/Paths.pm
445 %{perl_vendorarch}/Amanda/Types.pm
446 %{perl_vendorarch}/Amanda/Util.pm
447 %dir %{perl_vendorarch}/auto/Amanda
448 %dir %{perl_vendorarch}/auto/Amanda/Config
449 %dir %{perl_vendorarch}/auto/Amanda/Debug
450 %dir %{perl_vendorarch}/auto/Amanda/Types
451 %dir %{perl_vendorarch}/auto/Amanda/Util
452 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Config/*.so
453 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Debug/*.so
454 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Types/*.so
455 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Util/*.so
456
457 %files perl-server
458 %defattr(644,root,root,755)
459 %{perl_vendorarch}/Amanda/Changer.pm
460 %{perl_vendorarch}/Amanda/Cmdline.pm
461 %{perl_vendorarch}/Amanda/Device.pm
462 %{perl_vendorarch}/Amanda/Logfile.pm
463 %{perl_vendorarch}/Amanda/Tapefile.pm
464 %dir %{perl_vendorarch}/auto/Amanda/Cmdline
465 %dir %{perl_vendorarch}/auto/Amanda/Device
466 %dir %{perl_vendorarch}/auto/Amanda/Logfile
467 %dir %{perl_vendorarch}/auto/Amanda/Tapefile
468 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Cmdline/*.so
469 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Device/*.so
470 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Logfile/*.so
471 %attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Tapefile/*.so
This page took 0.398341 seconds and 4 git commands to generate.