]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- 2.5.2p1
[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:        0.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
36 # for kerberos
37 BuildRequires:  libcom_err-devel
38 BuildRequires:  libxslt-progs
39 BuildRequires:  libtool
40 BuildRequires:  readline-devel >= 4.2
41 BuildRequires:  rpmbuild(macros) >= 1.268
42 %{?with_samba:BuildRequires:    samba-client}
43 %{?with_xfs:BuildRequires:      xfsdump}
44 Conflicts:      shadow < 1:4.0.4.1-4
45 Conflicts:      pwdutils < 3.1.2-2
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define         _localstatedir  /var/lib
49 %define         _libexecdir     %{_libdir}/amanda
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):       /sbin/ldconfig
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(post,postun):  /sbin/ldconfig
100 Requires:       %{name}-libs = %{version}-%{release}
101 Requires:       rc-inetd
102 Conflicts:      tar < 1.13
103
104 %description client
105 The Amanda-client package should be installed on any machine that will
106 be backed up by AMANDA (including the server if it also needs to be
107 backed up). You will also need to install the amanda package to each
108 AMANDA client. It requires at least one of dump and GNU tar installed.
109
110 %description client -l pl.UTF-8
111 Ten pakiet powinien być zainstalowany ma maszynach, z których
112 zawartości będą tworzone kopie zapasowe. Wymaga zainstalowanego co
113 najmniej jednego z pakietów dump i GNU tar.
114
115 %package server
116 Summary:        The server side of Amanda
117 Summary(pl.UTF-8):      Serwer Amandy
118 Group:          Networking/Utilities
119 Requires(post,postun):  /sbin/ldconfig
120 Requires:       %{name}-libs = %{version}-%{release}
121 Requires:       /etc/cron.d
122 Requires:       crondaemon
123 Requires:       gnuplot
124 Requires:       mt-st
125 Requires:       mtx
126 Requires:       rc-inetd
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 %prep
142 %setup -q
143 %patch0 -p1
144 %patch1 -p1
145 # needs rewrite
146 #%patch2 -p1
147 %patch3 -p1
148 %patch4 -p1
149 %patch5 -p1
150 %patch6 -p1
151
152 # kill libtool.m4 copy
153 tail -n 1291 acinclude.m4 > acinc.tmp
154 mv -f acinc.tmp acinclude.m4
155
156 %build
157 %{__libtoolize}
158 %{__aclocal}
159 %{__autoconf}
160 %{__automake}
161 %configure \
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-manual
305 %attr(755,root,root) %{_libexecdir}/chg-mcutil
306 %attr(755,root,root) %{_libexecdir}/chg-mtx
307 %attr(755,root,root) %{_libexecdir}/chg-multi
308 %attr(755,root,root) %{_libexecdir}/chg-null
309 %attr(755,root,root) %{_libexecdir}/chg-rait
310 %attr(755,root,root) %{_libexecdir}/chg-rth
311 %attr(755,root,root) %{_libexecdir}/chg-scsi
312 %attr(755,root,root) %{_libexecdir}/chg-zd-mtx
313 %attr(755,root,root) %{_libexecdir}/chunker
314 %attr(755,root,root) %{_libexecdir}/driver
315 %attr(4754,root,amanda) %{_libexecdir}/dumper
316 %attr(4754,root,amanda) %{_libexecdir}/planner
317 %attr(755,root,root) %{_libexecdir}/taper
318
319 %attr(755,root,root) %{_sbindir}/amadmin
320 %attr(755,root,root) %{_sbindir}/amaespipe
321 %attr(4754,root,amanda) %{_sbindir}/amcheck
322 %attr(755,root,root) %{_sbindir}/amcheckdb
323 %attr(755,root,root) %{_sbindir}/amcleanup
324 %attr(755,root,root) %{_sbindir}/amcrypt*
325 %attr(755,root,root) %{_sbindir}/amdd
326 %attr(755,root,root) %{_sbindir}/amdump
327 %attr(755,root,root) %{_sbindir}/amfetchdump
328 %attr(755,root,root) %{_sbindir}/amflush
329 %attr(755,root,root) %{_sbindir}/amgetconf
330 %attr(755,root,root) %{_sbindir}/amlabel
331 %attr(755,root,root) %{_sbindir}/ammt
332 %attr(755,root,root) %{_sbindir}/amoverview
333 %attr(755,root,root) %{_sbindir}/amplot
334 %attr(755,root,root) %{_sbindir}/amreport
335 %attr(755,root,root) %{_sbindir}/amrestore
336 %attr(755,root,root) %{_sbindir}/amrmtape
337 %attr(755,root,root) %{_sbindir}/amstatus
338 %attr(755,root,root) %{_sbindir}/amtape
339 %attr(755,root,root) %{_sbindir}/amtapetype
340 %attr(755,root,root) %{_sbindir}/amtoc
341 %attr(755,root,root) %{_sbindir}/amverify
342 %attr(755,root,root) %{_sbindir}/amverifyrun
343 %{_mandir}/man5/amanda.conf.5*
344 %{_mandir}/man8/amadmin.8*
345 %{_mandir}/man8/amaespipe.8*
346 %{_mandir}/man8/amanda.8*
347 %{_mandir}/man8/amcheck.8*
348 %{_mandir}/man8/amcheckdb.8*
349 %{_mandir}/man8/amcleanup.8*
350 %{_mandir}/man8/amcrypt*.8*
351 %{_mandir}/man8/amdd.8*
352 %{_mandir}/man8/amdump.8*
353 %{_mandir}/man8/amfetchdump.8*
354 %{_mandir}/man8/amflush.8*
355 %{_mandir}/man8/amgetconf.8*
356 %{_mandir}/man8/amlabel.8*
357 %{_mandir}/man8/ammt.8*
358 %{_mandir}/man8/amoverview.8*
359 %{_mandir}/man8/amplot.8*
360 %{_mandir}/man8/amreport.8*
361 %{_mandir}/man8/amrestore.8*
362 %{_mandir}/man8/amrmtape.8*
363 %{_mandir}/man8/amstatus.8*
364 %{_mandir}/man8/amtape.8*
365 %{_mandir}/man8/amtapetype.8*
366 %{_mandir}/man8/amtoc.8*
367 %{_mandir}/man8/amverify.8*
368 %{_mandir}/man8/amverifyrun.8*
369 %endif
370
371 %if %{with client}
372 %files client
373 %defattr(644,root,root,755)
374 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
375 %attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amandates
376 %attr(755,root,root) %{_libdir}/libamclient*.so
377 %attr(755,root,root) %{_libexecdir}/amandad
378 %attr(755,root,root) %{_libexecdir}/noop
379 %attr(755,root,root) %{_libexecdir}/patch-system
380 %attr(755,root,root) %{_libexecdir}/sendbackup
381 %attr(755,root,root) %{_libexecdir}/sendsize
382 %attr(755,root,root) %{_libexecdir}/versionsuffix
383 %attr(4754,root,amanda) %{_libexecdir}/calcsize
384 %attr(4754,root,amanda) %{_libexecdir}/killpgrp
385 %attr(4754,root,amanda) %{_libexecdir}/rundump
386 %attr(4754,root,amanda) %{_libexecdir}/runtar
387 %attr(4754,root,amanda) %{_libexecdir}/selfcheck
388 %attr(755,root,root) %{_sbindir}/amoldrecover
389 %attr(755,root,root) %{_sbindir}/amrecover
390 %attr(770,root,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
391 %{_mandir}/man5/amanda-client.conf.5*
392 %{_mandir}/man8/amrecover.8*
393 %endif
This page took 0.098402 seconds and 4 git commands to generate.