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