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