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