]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- rel 1
[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.5.2p1
12 Release:        1
13 License:        BSD
14 Group:          Networking/Utilities
15 Source0:        http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
16 # Source0-md5:  da1234b12e1e34f8535f1c6269d27788
17 Source1:        %{name}-srv.crontab
18 Source2:        %{name}.inetd
19 Source3:        %{name}idx.inetd
20 Source4:        amidxtape.inetd
21 Source5:        %{name}.conf
22 Patch0:         %{name}-no_libnsl.patch
23 Patch1:         %{name}-ac25x.patch
24 # needs rewrite
25 Patch2:         %{name}-chg-zd-mtx-sh.patch
26 Patch3:         %{name}-tar.patch
27 Patch4:         %{name}-as_needed.patch
28 Patch5:         %{name}-bashizm.patch
29 Patch6:         %{name}-no-static-krb5.patch
30 URL:            http://www.amanda.org/
31 BuildRequires:  autoconf >= 2.53
32 BuildRequires:  automake
33 BuildRequires:  dump
34 BuildRequires:  flex
35 BuildRequires:  krb5-devel >= 1.6-4
36 BuildRequires:  libxslt-progs
37 BuildRequires:  libtool
38 BuildRequires:  readline-devel >= 4.2
39 BuildRequires:  rpmbuild(macros) >= 1.268
40 %{?with_samba:BuildRequires:    samba-client}
41 %{?with_xfs:BuildRequires:      xfsdump}
42 Conflicts:      shadow < 1:4.0.4.1-4
43 Conflicts:      pwdutils < 3.1.2-2
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         _localstatedir  /var/lib
47 %define         _libexecdir     %{_libdir}/amanda
48
49 %description
50 AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
51 backup system that allows the administrator of a LAN to set up a
52 single master backup server to back up multiple hosts to a single
53 large capacity tape drive. AMANDA uses native dump and/or GNU tar
54 facilities and can back up a large number of workstations running
55 multiple versions of Unix. Newer versions of AMANDA (including this
56 version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts.
57 The amanda package contains the core AMANDA programs and will need to
58 be installed on both AMANDA clients and AMANDA servers. Note that you
59 will have to install the amanda-client and amanda-server packages as
60 well.
61
62 %description -l pl.UTF-8
63 AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
64 zapasowych. Umożliwia administratorowi sieci tworzenie kopii z kilku
65 hostów na jednej maszynie wyposażonej w pojemny dysk lub streamer.
66 Nowsze wersje programu umożliwiają zabezpieczanie zasobów Microsoft
67 Windows 95/98/NT/2000 przy użyciu protokołu Samba. Ten pakiet zawiera
68 podstawowe pliki programu i powinien być zainstalowany zarówno na
69 serwerze jak i na kliencie. Pamiętaj także o instalacji pakietów
70 amanda-client i amanda-server!
71
72 %package libs
73 Summary:        Amanda shared libraries
74 Summary(pl.UTF-8):      Biblioteki współdzielone pakietu amanda
75 Group:          Networking/Utilities
76 Requires(postun):       /sbin/ldconfig
77 Requires(postun):       /usr/sbin/groupdel
78 Requires(postun):       /usr/sbin/userdel
79 Requires(pre):  /bin/id
80 Requires(pre):  /usr/bin/chsh
81 Requires(pre):  /usr/bin/getgid
82 Requires(pre):  /usr/sbin/groupadd
83 Requires(pre):  /usr/sbin/useradd
84 Provides:       group(amanda)
85 Provides:       user(amanda)
86
87 %description libs
88 Amanda shared libraries.
89
90 %description libs -l pl.UTF-8
91 Biblioteki współdzielone pakietu amanda.
92
93 %package client
94 Summary:        The client side of Amanda
95 Summary(pl.UTF-8):      Klient Amandy
96 Group:          Networking/Utilities
97 Requires(post,postun):  /sbin/ldconfig
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(post,postun):  /sbin/ldconfig
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 Obsoletes:      amanda
126
127 %description server
128 The amanda-server package should be installed on the AMANDA server,
129 the machine attached to the device (such as a tape drive) where
130 backups will be written. You will also need to install the amanda
131 package to the AMANDA server. And, if the server is also to be backed
132 up, the server also needs to have the amanda-client package installed.
133
134 %description server -l pl.UTF-8
135 Ten pakiet powinien być zainstalowany na maszynach, na których będą
136 magazynowane kopie zapasowe (lub do których podpięte są urządzenia
137 typu streamer).
138
139 %prep
140 %setup -q
141 %patch0 -p1
142 %patch1 -p1
143 # needs rewrite
144 #%patch2 -p1
145 %patch3 -p1
146 %patch4 -p1
147 %patch5 -p1
148 %patch6 -p1
149
150 # kill libtool.m4 copy
151 tail -n 1291 acinclude.m4 > acinc.tmp
152 mv -f acinc.tmp acinclude.m4
153
154 %build
155 %{__libtoolize}
156 %{__aclocal}
157 %{__autoconf}
158 %{__automake}
159 %configure \
160         MT=/bin/mt \
161         MTX=/usr/sbin/mtx \
162         GNUPLOT=/usr/bin/gnuplot \
163         MAILER=/bin/mail \
164         PRINT=/usr/bin/lpr \
165         DUMP=/sbin/dump \
166         RESTORE=/sbin/restore \
167         %{?with_xfs:XFSDUMP=/sbin/xfsdump} \
168         %{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
169         --disable-static \
170         --enable-shared \
171         %{!?with_server:--without-server} \
172         %{!?with_client:--without-client} \
173         --with-index-server=localhost \
174         --with-user=amanda \
175         --with-group=amanda \
176         --with-tape-device=/dev/null \
177         --with-ftape-rawdevice=/dev/null \
178         --with-changer-device=/dev/null \
179         --with-fqdn \
180         %{?with_samba:--with-smbclient=%{_bindir}/smbclient} \
181         --with-bsd-security \
182         --with-ssh-security \
183         --with-krb5-security \
184         --without-krb4-security \
185         --with-buffered-dump \
186         --with-amandahosts \
187         --with-debugging=%{_localstatedir}/amanda/debug \
188         --with-gnutar-listdir=%{_localstatedir}/amanda/gnutar-lists \
189         --with-tmpdir=/var/tmp
190
191 %{__make}
192
193 %install
194 rm -rf $RPM_BUILD_ROOT
195 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
196         $RPM_BUILD_ROOT%{_localstatedir}/amanda/gnutar-lists \
197         $RPM_BUILD_ROOT%{_mandir}/man1
198
199 %{__make} install \
200         DESTDIR=$RPM_BUILD_ROOT \
201         SETUID_GROUP=`id -g`
202
203 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
204 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
205 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
206 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
207
208 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
209 install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda
210 touch $RPM_BUILD_ROOT%{_localstatedir}/amanda/.amandahosts
211
212 > $RPM_BUILD_ROOT%{_sysconfdir}/amandates
213
214 %clean
215 rm -rf $RPM_BUILD_ROOT
216
217 %triggerpostun libs -- %{name}-libs < 2.5.1p2-1
218 echo "Adding amanda to disk and backup groups"
219 /usr/sbin/usermod -G disk,backup amanda
220 echo "Setting amanda shell to /bin/sh"
221 /usr/bin/chsh -s /bin/sh amanda
222 if [ -f %{_localstatedir}/amanda/.amandahosts ]; then
223         echo "Fixing permissions of %{_localstatedir}/amanda/.amandahosts file"
224         chown amanda:amanda %{_localstatedir}/amanda/.amandahosts
225         chmod 600 %{_localstatedir}/amanda/.amandahosts
226 fi
227
228 %pre libs
229 %groupadd -P %{name}-libs -g 80 amanda
230 %useradd -P %{name}-libs -u 80 -G disk,backup -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
231
232 %post   libs -p /sbin/ldconfig
233
234 %postun libs
235 /sbin/ldconfig
236 if [ "$1" = "0" ]; then
237         %userremove amanda
238         %groupremove amanda
239 fi
240
241 %post client
242 /sbin/ldconfig
243 %service -q rc-inetd reload
244
245 %postun client
246 /sbin/ldconfig
247 if [ "$1" = 0 ]; then
248         %service -q rc-inetd reload
249 fi
250
251 %post server
252 /sbin/ldconfig
253 %service -q rc-inetd reload
254 if [ "$1" = "1" ]; then
255         echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
256 fi
257
258 %postun server
259 /sbin/ldconfig
260 if [ "$1" = 0 ]; then
261         %service -q rc-inetd reload
262 fi
263
264 %files libs
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_libdir}/libamanda*.so
267 %dir %{_libexecdir}
268 %attr(770,root,amanda) %dir %{_localstatedir}/amanda
269 %attr(600,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/amanda/.amandahosts
270
271 %if %{with server}
272 %files server
273 %defattr(644,root,root,755)
274 %doc docs/*
275 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amidxtape
276 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amandaidx
277
278 %attr(750,root,amanda) %dir %{_sysconfdir}/amanda
279 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/*
280
281 %attr(664,root,amanda) %{_localstatedir}/amanda/*.ps
282
283 %config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
284
285 %attr(755,root,root) %{_libdir}/libamserver*.so
286 %attr(755,root,root) %{_libdir}/libamtape*.so
287 %attr(755,root,root) %{_libdir}/librestore*.so
288
289 %attr(755,root,root) %{_libexecdir}/amcat.awk
290 %attr(755,root,root) %{_libexecdir}/amcleanupdisk
291 %attr(755,root,root) %{_libexecdir}/amidxtaped
292 %attr(755,root,root) %{_libexecdir}/amindexd
293 %attr(755,root,root) %{_libexecdir}/amlogroll
294 %attr(755,root,root) %{_libexecdir}/amplot.awk
295 %attr(755,root,root) %{_libexecdir}/amplot.g
296 %attr(755,root,root) %{_libexecdir}/amplot.gp
297 %attr(755,root,root) %{_libexecdir}/amtrmidx
298 %attr(755,root,root) %{_libexecdir}/amtrmlog
299 %attr(755,root,root) %{_libexecdir}/chg-chio
300 %attr(755,root,root) %{_libexecdir}/chg-chs
301 %attr(755,root,root) %{_libexecdir}/chg-disk
302 %attr(755,root,root) %{_libexecdir}/chg-iomega
303 %attr(755,root,root) %{_libexecdir}/chg-juke
304 %attr(755,root,root) %{_libexecdir}/chg-lib.sh
305 %attr(755,root,root) %{_libexecdir}/chg-manual
306 %attr(755,root,root) %{_libexecdir}/chg-mcutil
307 %attr(755,root,root) %{_libexecdir}/chg-mtx
308 %attr(755,root,root) %{_libexecdir}/chg-multi
309 %attr(755,root,root) %{_libexecdir}/chg-null
310 %attr(755,root,root) %{_libexecdir}/chg-rait
311 %attr(755,root,root) %{_libexecdir}/chg-rth
312 %attr(755,root,root) %{_libexecdir}/chg-scsi
313 %attr(755,root,root) %{_libexecdir}/chg-zd-mtx
314 %attr(755,root,root) %{_libexecdir}/chunker
315 %attr(755,root,root) %{_libexecdir}/driver
316 %attr(4754,root,amanda) %{_libexecdir}/dumper
317 %attr(4754,root,amanda) %{_libexecdir}/planner
318 %attr(755,root,root) %{_libexecdir}/taper
319
320 %attr(755,root,root) %{_sbindir}/amadmin
321 %attr(755,root,root) %{_sbindir}/amaespipe
322 %attr(4754,root,amanda) %{_sbindir}/amcheck
323 %attr(755,root,root) %{_sbindir}/amcheckdb
324 %attr(755,root,root) %{_sbindir}/amcleanup
325 %attr(755,root,root) %{_sbindir}/amcrypt*
326 %attr(755,root,root) %{_sbindir}/amdd
327 %attr(755,root,root) %{_sbindir}/amdump
328 %attr(755,root,root) %{_sbindir}/amfetchdump
329 %attr(755,root,root) %{_sbindir}/amflush
330 %attr(755,root,root) %{_sbindir}/amgetconf
331 %attr(755,root,root) %{_sbindir}/amlabel
332 %attr(755,root,root) %{_sbindir}/ammt
333 %attr(755,root,root) %{_sbindir}/amoverview
334 %attr(755,root,root) %{_sbindir}/amplot
335 %attr(755,root,root) %{_sbindir}/amreport
336 %attr(755,root,root) %{_sbindir}/amrestore
337 %attr(755,root,root) %{_sbindir}/amrmtape
338 %attr(755,root,root) %{_sbindir}/amstatus
339 %attr(755,root,root) %{_sbindir}/amtape
340 %attr(755,root,root) %{_sbindir}/amtapetype
341 %attr(755,root,root) %{_sbindir}/amtoc
342 %attr(755,root,root) %{_sbindir}/amverify
343 %attr(755,root,root) %{_sbindir}/amverifyrun
344 %{_mandir}/man5/amanda.conf.5*
345 %{_mandir}/man8/amadmin.8*
346 %{_mandir}/man8/amaespipe.8*
347 %{_mandir}/man8/amanda.8*
348 %{_mandir}/man8/amcheck.8*
349 %{_mandir}/man8/amcheckdb.8*
350 %{_mandir}/man8/amcleanup.8*
351 %{_mandir}/man8/amcrypt*.8*
352 %{_mandir}/man8/amdd.8*
353 %{_mandir}/man8/amdump.8*
354 %{_mandir}/man8/amfetchdump.8*
355 %{_mandir}/man8/amflush.8*
356 %{_mandir}/man8/amgetconf.8*
357 %{_mandir}/man8/amlabel.8*
358 %{_mandir}/man8/ammt.8*
359 %{_mandir}/man8/amoverview.8*
360 %{_mandir}/man8/amplot.8*
361 %{_mandir}/man8/amreport.8*
362 %{_mandir}/man8/amrestore.8*
363 %{_mandir}/man8/amrmtape.8*
364 %{_mandir}/man8/amstatus.8*
365 %{_mandir}/man8/amtape.8*
366 %{_mandir}/man8/amtapetype.8*
367 %{_mandir}/man8/amtoc.8*
368 %{_mandir}/man8/amverify.8*
369 %{_mandir}/man8/amverifyrun.8*
370 %endif
371
372 %if %{with client}
373 %files client
374 %defattr(644,root,root,755)
375 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
376 %attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amandates
377 %attr(755,root,root) %{_libdir}/libamclient*.so
378 %attr(755,root,root) %{_libexecdir}/amandad
379 %attr(755,root,root) %{_libexecdir}/noop
380 %attr(755,root,root) %{_libexecdir}/patch-system
381 %attr(755,root,root) %{_libexecdir}/sendbackup
382 %attr(755,root,root) %{_libexecdir}/sendsize
383 %attr(755,root,root) %{_libexecdir}/versionsuffix
384 %attr(4754,root,amanda) %{_libexecdir}/calcsize
385 %attr(4754,root,amanda) %{_libexecdir}/killpgrp
386 %attr(4754,root,amanda) %{_libexecdir}/rundump
387 %attr(4754,root,amanda) %{_libexecdir}/runtar
388 %attr(4754,root,amanda) %{_libexecdir}/selfcheck
389 %attr(755,root,root) %{_sbindir}/amoldrecover
390 %attr(755,root,root) %{_sbindir}/amrecover
391 %attr(770,root,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
392 %{_mandir}/man5/amanda-client.conf.5*
393 %{_mandir}/man8/amrecover.8*
394 %endif
This page took 0.056375 seconds and 4 git commands to generate.