]> git.pld-linux.org Git - packages/amanda.git/blame_incremental - amanda.spec
- rel 1
[packages/amanda.git] / amanda.spec
... / ...
CommitLineData
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#
8Summary: A network-capable tape backup solution
9Summary(pl.UTF-8): Sieciowo zorientowany system tworzenia kopii zapasowych
10Name: amanda
11Version: 2.5.2p1
12Release: 1
13License: BSD
14Group: Networking/Utilities
15Source0: http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
16# Source0-md5: da1234b12e1e34f8535f1c6269d27788
17Source1: %{name}-srv.crontab
18Source2: %{name}.inetd
19Source3: %{name}idx.inetd
20Source4: amidxtape.inetd
21Source5: %{name}.conf
22Patch0: %{name}-no_libnsl.patch
23Patch1: %{name}-ac25x.patch
24# needs rewrite
25Patch2: %{name}-chg-zd-mtx-sh.patch
26Patch3: %{name}-tar.patch
27Patch4: %{name}-as_needed.patch
28Patch5: %{name}-bashizm.patch
29Patch6: %{name}-no-static-krb5.patch
30URL: http://www.amanda.org/
31BuildRequires: autoconf >= 2.53
32BuildRequires: automake
33BuildRequires: dump
34BuildRequires: flex
35BuildRequires: krb5-devel >= 1.6-4
36BuildRequires: libxslt-progs
37BuildRequires: libtool
38BuildRequires: readline-devel >= 4.2
39BuildRequires: rpmbuild(macros) >= 1.268
40%{?with_samba:BuildRequires: samba-client}
41%{?with_xfs:BuildRequires: xfsdump}
42Conflicts: shadow < 1:4.0.4.1-4
43Conflicts: pwdutils < 3.1.2-2
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%define _localstatedir /var/lib
47%define _libexecdir %{_libdir}/amanda
48
49%description
50AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
51backup system that allows the administrator of a LAN to set up a
52single master backup server to back up multiple hosts to a single
53large capacity tape drive. AMANDA uses native dump and/or GNU tar
54facilities and can back up a large number of workstations running
55multiple versions of Unix. Newer versions of AMANDA (including this
56version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts.
57The amanda package contains the core AMANDA programs and will need to
58be installed on both AMANDA clients and AMANDA servers. Note that you
59will have to install the amanda-client and amanda-server packages as
60well.
61
62%description -l pl.UTF-8
63AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
64zapasowych. Umożliwia administratorowi sieci tworzenie kopii z kilku
65hostów na jednej maszynie wyposażonej w pojemny dysk lub streamer.
66Nowsze wersje programu umożliwiają zabezpieczanie zasobów Microsoft
67Windows 95/98/NT/2000 przy użyciu protokołu Samba. Ten pakiet zawiera
68podstawowe pliki programu i powinien być zainstalowany zarówno na
69serwerze jak i na kliencie. Pamiętaj także o instalacji pakietów
70amanda-client i amanda-server!
71
72%package libs
73Summary: Amanda shared libraries
74Summary(pl.UTF-8): Biblioteki współdzielone pakietu amanda
75Group: Networking/Utilities
76Requires(postun): /sbin/ldconfig
77Requires(postun): /usr/sbin/groupdel
78Requires(postun): /usr/sbin/userdel
79Requires(pre): /bin/id
80Requires(pre): /usr/bin/chsh
81Requires(pre): /usr/bin/getgid
82Requires(pre): /usr/sbin/groupadd
83Requires(pre): /usr/sbin/useradd
84Provides: group(amanda)
85Provides: user(amanda)
86
87%description libs
88Amanda shared libraries.
89
90%description libs -l pl.UTF-8
91Biblioteki współdzielone pakietu amanda.
92
93%package client
94Summary: The client side of Amanda
95Summary(pl.UTF-8): Klient Amandy
96Group: Networking/Utilities
97Requires(post,postun): /sbin/ldconfig
98Requires: %{name}-libs = %{version}-%{release}
99Requires: rc-inetd
100Conflicts: tar < 1.13
101
102%description client
103The Amanda-client package should be installed on any machine that will
104be backed up by AMANDA (including the server if it also needs to be
105backed up). You will also need to install the amanda package to each
106AMANDA client. It requires at least one of dump and GNU tar installed.
107
108%description client -l pl.UTF-8
109Ten pakiet powinien być zainstalowany ma maszynach, z których
110zawartości będą tworzone kopie zapasowe. Wymaga zainstalowanego co
111najmniej jednego z pakietów dump i GNU tar.
112
113%package server
114Summary: The server side of Amanda
115Summary(pl.UTF-8): Serwer Amandy
116Group: Networking/Utilities
117Requires(post,postun): /sbin/ldconfig
118Requires: %{name}-libs = %{version}-%{release}
119Requires: /etc/cron.d
120Requires: crondaemon
121Requires: gnuplot
122Requires: mt-st
123Requires: mtx
124Requires: rc-inetd
125Obsoletes: amanda
126
127%description server
128The amanda-server package should be installed on the AMANDA server,
129the machine attached to the device (such as a tape drive) where
130backups will be written. You will also need to install the amanda
131package to the AMANDA server. And, if the server is also to be backed
132up, the server also needs to have the amanda-client package installed.
133
134%description server -l pl.UTF-8
135Ten pakiet powinien być zainstalowany na maszynach, na których będą
136magazynowane kopie zapasowe (lub do których podpięte są urządzenia
137typu streamer).
138
139%prep
140%setup -q
141%patch0 -p1
142%patch1 -p1
143# needs rewrite
144#%patch2 -p1
145%patch3 -p1
146%patch4 -p1
147%patch5 -p1
148%patch6 -p1
149
150# kill libtool.m4 copy
151tail -n 1291 acinclude.m4 > acinc.tmp
152mv -f acinc.tmp acinclude.m4
153
154%build
155%{__libtoolize}
156%{__aclocal}
157%{__autoconf}
158%{__automake}
159%configure \
160 MT=/bin/mt \
161 MTX=/usr/sbin/mtx \
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
194rm -rf $RPM_BUILD_ROOT
195install -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
203install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
204sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
205sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
206sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
207
208install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
209install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda
210touch $RPM_BUILD_ROOT%{_localstatedir}/amanda/.amandahosts
211
212> $RPM_BUILD_ROOT%{_sysconfdir}/amandates
213
214%clean
215rm -rf $RPM_BUILD_ROOT
216
217%triggerpostun libs -- %{name}-libs < 2.5.1p2-1
218echo "Adding amanda to disk and backup groups"
219/usr/sbin/usermod -G disk,backup amanda
220echo "Setting amanda shell to /bin/sh"
221/usr/bin/chsh -s /bin/sh amanda
222if [ -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
226fi
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
236if [ "$1" = "0" ]; then
237 %userremove amanda
238 %groupremove amanda
239fi
240
241%post client
242/sbin/ldconfig
243%service -q rc-inetd reload
244
245%postun client
246/sbin/ldconfig
247if [ "$1" = 0 ]; then
248 %service -q rc-inetd reload
249fi
250
251%post server
252/sbin/ldconfig
253%service -q rc-inetd reload
254if [ "$1" = "1" ]; then
255 echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
256fi
257
258%postun server
259/sbin/ldconfig
260if [ "$1" = 0 ]; then
261 %service -q rc-inetd reload
262fi
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-lib.sh
305%attr(755,root,root) %{_libexecdir}/chg-manual
306%attr(755,root,root) %{_libexecdir}/chg-mcutil
307%attr(755,root,root) %{_libexecdir}/chg-mtx
308%attr(755,root,root) %{_libexecdir}/chg-multi
309%attr(755,root,root) %{_libexecdir}/chg-null
310%attr(755,root,root) %{_libexecdir}/chg-rait
311%attr(755,root,root) %{_libexecdir}/chg-rth
312%attr(755,root,root) %{_libexecdir}/chg-scsi
313%attr(755,root,root) %{_libexecdir}/chg-zd-mtx
314%attr(755,root,root) %{_libexecdir}/chunker
315%attr(755,root,root) %{_libexecdir}/driver
316%attr(4754,root,amanda) %{_libexecdir}/dumper
317%attr(4754,root,amanda) %{_libexecdir}/planner
318%attr(755,root,root) %{_libexecdir}/taper
319
320%attr(755,root,root) %{_sbindir}/amadmin
321%attr(755,root,root) %{_sbindir}/amaespipe
322%attr(4754,root,amanda) %{_sbindir}/amcheck
323%attr(755,root,root) %{_sbindir}/amcheckdb
324%attr(755,root,root) %{_sbindir}/amcleanup
325%attr(755,root,root) %{_sbindir}/amcrypt*
326%attr(755,root,root) %{_sbindir}/amdd
327%attr(755,root,root) %{_sbindir}/amdump
328%attr(755,root,root) %{_sbindir}/amfetchdump
329%attr(755,root,root) %{_sbindir}/amflush
330%attr(755,root,root) %{_sbindir}/amgetconf
331%attr(755,root,root) %{_sbindir}/amlabel
332%attr(755,root,root) %{_sbindir}/ammt
333%attr(755,root,root) %{_sbindir}/amoverview
334%attr(755,root,root) %{_sbindir}/amplot
335%attr(755,root,root) %{_sbindir}/amreport
336%attr(755,root,root) %{_sbindir}/amrestore
337%attr(755,root,root) %{_sbindir}/amrmtape
338%attr(755,root,root) %{_sbindir}/amstatus
339%attr(755,root,root) %{_sbindir}/amtape
340%attr(755,root,root) %{_sbindir}/amtapetype
341%attr(755,root,root) %{_sbindir}/amtoc
342%attr(755,root,root) %{_sbindir}/amverify
343%attr(755,root,root) %{_sbindir}/amverifyrun
344%{_mandir}/man5/amanda.conf.5*
345%{_mandir}/man8/amadmin.8*
346%{_mandir}/man8/amaespipe.8*
347%{_mandir}/man8/amanda.8*
348%{_mandir}/man8/amcheck.8*
349%{_mandir}/man8/amcheckdb.8*
350%{_mandir}/man8/amcleanup.8*
351%{_mandir}/man8/amcrypt*.8*
352%{_mandir}/man8/amdd.8*
353%{_mandir}/man8/amdump.8*
354%{_mandir}/man8/amfetchdump.8*
355%{_mandir}/man8/amflush.8*
356%{_mandir}/man8/amgetconf.8*
357%{_mandir}/man8/amlabel.8*
358%{_mandir}/man8/ammt.8*
359%{_mandir}/man8/amoverview.8*
360%{_mandir}/man8/amplot.8*
361%{_mandir}/man8/amreport.8*
362%{_mandir}/man8/amrestore.8*
363%{_mandir}/man8/amrmtape.8*
364%{_mandir}/man8/amstatus.8*
365%{_mandir}/man8/amtape.8*
366%{_mandir}/man8/amtapetype.8*
367%{_mandir}/man8/amtoc.8*
368%{_mandir}/man8/amverify.8*
369%{_mandir}/man8/amverifyrun.8*
370%endif
371
372%if %{with client}
373%files client
374%defattr(644,root,root,755)
375%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
376%attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amandates
377%attr(755,root,root) %{_libdir}/libamclient*.so
378%attr(755,root,root) %{_libexecdir}/amandad
379%attr(755,root,root) %{_libexecdir}/noop
380%attr(755,root,root) %{_libexecdir}/patch-system
381%attr(755,root,root) %{_libexecdir}/sendbackup
382%attr(755,root,root) %{_libexecdir}/sendsize
383%attr(755,root,root) %{_libexecdir}/versionsuffix
384%attr(4754,root,amanda) %{_libexecdir}/calcsize
385%attr(4754,root,amanda) %{_libexecdir}/killpgrp
386%attr(4754,root,amanda) %{_libexecdir}/rundump
387%attr(4754,root,amanda) %{_libexecdir}/runtar
388%attr(4754,root,amanda) %{_libexecdir}/selfcheck
389%attr(755,root,root) %{_sbindir}/amoldrecover
390%attr(755,root,root) %{_sbindir}/amrecover
391%attr(770,root,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
392%{_mandir}/man5/amanda-client.conf.5*
393%{_mandir}/man8/amrecover.8*
394%endif
This page took 0.061572 seconds and 4 git commands to generate.