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