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