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