]> git.pld-linux.org Git - packages/amanda.git/blame - amanda.spec
- rel 1
[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
b2b905b0 11Version: 2.5.2p1
bea54b14 12Release: 1
8ae81366 13License: BSD
241d28fd 14Group: Networking/Utilities
0b2b22ac 15Source0: http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
b2b905b0 16# Source0-md5: da1234b12e1e34f8535f1c6269d27788
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 23Patch1: %{name}-ac25x.patch
b2b905b0 24# needs rewrite
c99cbcb3
JB
25Patch2: %{name}-chg-zd-mtx-sh.patch
26Patch3: %{name}-tar.patch
05b023d3 27Patch4: %{name}-as_needed.patch
b2b905b0
JR
28Patch5: %{name}-bashizm.patch
29Patch6: %{name}-no-static-krb5.patch
5dbc26fb 30URL: http://www.amanda.org/
a188c172 31BuildRequires: autoconf >= 2.53
7bb8ef98 32BuildRequires: automake
b083e9f8 33BuildRequires: dump
47d7a19a 34BuildRequires: flex
eba98501 35BuildRequires: krb5-devel >= 1.6-4
a9736a51 36BuildRequires: libxslt-progs
47d7a19a 37BuildRequires: libtool
e271841a 38BuildRequires: readline-devel >= 4.2
35efb826 39BuildRequires: rpmbuild(macros) >= 1.268
7ba1ec44 40%{?with_samba:BuildRequires: samba-client}
856a76de 41%{?with_xfs:BuildRequires: xfsdump}
c9fdcd61
JR
42Conflicts: shadow < 1:4.0.4.1-4
43Conflicts: pwdutils < 3.1.2-2
316f81cd 44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64e6fb7c 45
ff131879 46%define _localstatedir /var/lib
b083e9f8 47%define _libexecdir %{_libdir}/amanda
48
864ae446 49%description
a895e21d 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.
64e6fb7c 61
4b4f6542 62%description -l pl.UTF-8
9fa4a022 63AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
4b4f6542
JR
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
a895e21d 70amanda-client i amanda-server!
32595315 71
e48f92a2 72%package libs
73Summary: Amanda shared libraries
9720936a 74Summary(pl.UTF-8): Biblioteki współdzielone pakietu amanda
e48f92a2 75Group: Networking/Utilities
0e3510b6
ER
76Requires(postun): /sbin/ldconfig
77Requires(postun): /usr/sbin/groupdel
78Requires(postun): /usr/sbin/userdel
0da854c3 79Requires(pre): /bin/id
e0651f2a 80Requires(pre): /usr/bin/chsh
934dc2b1 81Requires(pre): /usr/bin/getgid
0da854c3 82Requires(pre): /usr/sbin/groupadd
83Requires(pre): /usr/sbin/useradd
934dc2b1 84Provides: group(amanda)
85Provides: user(amanda)
e48f92a2 86
87%description libs
88Amanda shared libraries.
89
4b4f6542
JR
90%description libs -l pl.UTF-8
91Biblioteki współdzielone pakietu amanda.
e48f92a2 92
64e6fb7c 93%package client
83e7acbd 94Summary: The client side of Amanda
9720936a 95Summary(pl.UTF-8): Klient Amandy
83e7acbd 96Group: Networking/Utilities
2427c166 97Requires(post,postun): /sbin/ldconfig
0e3510b6
ER
98Requires: %{name}-libs = %{version}-%{release}
99Requires: rc-inetd
491e8ea2 100Conflicts: tar < 1.13
64e6fb7c 101
102%description client
a895e21d 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
ff131879 106AMANDA client. It requires at least one of dump and GNU tar installed.
64e6fb7c 107
4b4f6542
JR
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.
32595315 112
64e6fb7c 113%package server
83e7acbd 114Summary: The server side of Amanda
9720936a 115Summary(pl.UTF-8): Serwer Amandy
83e7acbd 116Group: Networking/Utilities
2427c166 117Requires(post,postun): /sbin/ldconfig
0e3510b6 118Requires: %{name}-libs = %{version}-%{release}
b083e9f8 119Requires: /etc/cron.d
0e3510b6
ER
120Requires: crondaemon
121Requires: gnuplot
4af804ab
JR
122Requires: mt-st
123Requires: mtx
0e3510b6 124Requires: rc-inetd
caae9f77 125Obsoletes: amanda
64e6fb7c 126
127%description server
a895e21d 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.
64e6fb7c 133
4b4f6542
JR
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
a895e21d 137typu streamer).
32595315 138
64e6fb7c 139%prep
140%setup -q
7bb8ef98 141%patch0 -p1
142%patch1 -p1
b2b905b0
JR
143# needs rewrite
144#%patch2 -p1
47d7a19a 145%patch3 -p1
05b023d3 146%patch4 -p1
b2b905b0
JR
147%patch5 -p1
148%patch6 -p1
c99cbcb3
JB
149
150# kill libtool.m4 copy
b2b905b0 151tail -n 1291 acinclude.m4 > acinc.tmp
c99cbcb3 152mv -f acinc.tmp acinclude.m4
64e6fb7c 153
154%build
a4b3f4c7 155%{__libtoolize}
20e7e1cf 156%{__aclocal}
5154d365 157%{__autoconf}
5154d365 158%{__automake}
b083e9f8 159%configure \
bea54b14
JR
160 MT=/bin/mt \
161 MTX=/usr/sbin/mtx \
c01c2959 162 GNUPLOT=/usr/bin/gnuplot \
67f09374
JB
163 MAILER=/bin/mail \
164 PRINT=/usr/bin/lpr \
165 DUMP=/sbin/dump \
166 RESTORE=/sbin/restore \
a9736a51
JR
167 %{?with_xfs:XFSDUMP=/sbin/xfsdump} \
168 %{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
fa26b3d0 169 --disable-static \
8ae81366 170 --enable-shared \
a9736a51
JR
171 %{!?with_server:--without-server} \
172 %{!?with_client:--without-client} \
64e6fb7c 173 --with-index-server=localhost \
fa26b3d0 174 --with-user=amanda \
175 --with-group=amanda \
fa26b3d0 176 --with-tape-device=/dev/null \
177 --with-ftape-rawdevice=/dev/null \
178 --with-changer-device=/dev/null \
179 --with-fqdn \
7ba1ec44 180 %{?with_samba:--with-smbclient=%{_bindir}/smbclient} \
fa26b3d0 181 --with-bsd-security \
a9736a51 182 --with-ssh-security \
b2b905b0
JR
183 --with-krb5-security \
184 --without-krb4-security \
fa26b3d0 185 --with-buffered-dump \
83e7acbd 186 --with-amandahosts \
66496ded 187 --with-debugging=%{_localstatedir}/amanda/debug \
ff131879 188 --with-gnutar-listdir=%{_localstatedir}/amanda/gnutar-lists \
d519fb96 189 --with-tmpdir=/var/tmp
fa26b3d0 190
f8165eb1 191%{__make}
64e6fb7c 192
193%install
194rm -rf $RPM_BUILD_ROOT
a895e21d 195install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
c0406759 196 $RPM_BUILD_ROOT%{_localstatedir}/amanda/gnutar-lists \
197 $RPM_BUILD_ROOT%{_mandir}/man1
b083e9f8 198
15ce42ff 199%{__make} install \
b083e9f8 200 DESTDIR=$RPM_BUILD_ROOT \
fa26b3d0 201 SETUID_GROUP=`id -g`
202
b083e9f8 203install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
4b4b52b8
JR
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
b083e9f8 207
1a0c2171 208install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
ff131879 209install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda
e7b6054e 210touch $RPM_BUILD_ROOT%{_localstatedir}/amanda/.amandahosts
ff131879
JB
211
212> $RPM_BUILD_ROOT%{_sysconfdir}/amandates
b083e9f8 213
fa26b3d0 214%clean
64e6fb7c 215rm -rf $RPM_BUILD_ROOT
216
e28e7d88
JR
217%triggerpostun libs -- %{name}-libs < 2.5.1p2-1
218echo "Adding amanda to disk and backup groups"
a9736a51 219/usr/sbin/usermod -G disk,backup amanda
e28e7d88
JR
220echo "Setting amanda shell to /bin/sh"
221/usr/bin/chsh -s /bin/sh amanda
a148ef70
JR
222if [ -f %{_localstatedir}/amanda/.amandahosts ]; then
223 echo "Fixing permissions of %{_localstatedir}/amanda/.amandahosts file"
2fcd18b8 224 chown amanda:amanda %{_localstatedir}/amanda/.amandahosts
a148ef70
JR
225 chmod 600 %{_localstatedir}/amanda/.amandahosts
226fi
611427b2 227
0da854c3 228%pre libs
edb8d306 229%groupadd -P %{name}-libs -g 80 amanda
a9736a51 230%useradd -P %{name}-libs -u 80 -G disk,backup -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
0da854c3 231
66496ded 232%post libs -p /sbin/ldconfig
b083e9f8 233
277a8aa8
JB
234%postun libs
235/sbin/ldconfig
0da854c3 236if [ "$1" = "0" ]; then
934dc2b1 237 %userremove amanda
238 %groupremove amanda
0da854c3 239fi
240
b083e9f8 241%post client
242/sbin/ldconfig
35efb826 243%service -q rc-inetd reload
b083e9f8 244
245%postun client
246/sbin/ldconfig
35efb826
ER
247if [ "$1" = 0 ]; then
248 %service -q rc-inetd reload
47123b2c 249fi
b083e9f8 250
251%post server
252/sbin/ldconfig
35efb826 253%service -q rc-inetd reload
856a76de
JB
254if [ "$1" = "1" ]; then
255 echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
256fi
b083e9f8 257
258%postun server
259/sbin/ldconfig
35efb826
ER
260if [ "$1" = 0 ]; then
261 %service -q rc-inetd reload
47123b2c 262fi
64e6fb7c 263
e48f92a2 264%files libs
83e7acbd 265%defattr(644,root,root,755)
8ae81366 266%attr(755,root,root) %{_libdir}/libamanda*.so
5f0d47e3 267%dir %{_libexecdir}
e7b6054e 268%attr(770,root,amanda) %dir %{_localstatedir}/amanda
a9736a51 269%attr(600,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/amanda/.amandahosts
370a4eb3 270
a9736a51 271%if %{with server}
64e6fb7c 272%files server
b083e9f8 273%defattr(644,root,root,755)
c42c18c1 274%doc docs/*
a7b1b223 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
b083e9f8 277
e7b6054e 278%attr(750,root,amanda) %dir %{_sysconfdir}/amanda
279%config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/*
b083e9f8 280
e7b6054e 281%attr(664,root,amanda) %{_localstatedir}/amanda/*.ps
b083e9f8 282
a04af4fe 283%config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
b083e9f8 284
8ae81366 285%attr(755,root,root) %{_libdir}/libamserver*.so
5e5c6257
JR
286%attr(755,root,root) %{_libdir}/libamtape*.so
287%attr(755,root,root) %{_libdir}/librestore*.so
288
8ae81366 289%attr(755,root,root) %{_libexecdir}/amcat.awk
290%attr(755,root,root) %{_libexecdir}/amcleanupdisk
291%attr(755,root,root) %{_libexecdir}/amidxtaped
5e5c6257 292%attr(755,root,root) %{_libexecdir}/amindexd
8ae81366 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
5e5c6257 297%attr(755,root,root) %{_libexecdir}/amtrmidx
8ae81366 298%attr(755,root,root) %{_libexecdir}/amtrmlog
b083e9f8 299%attr(755,root,root) %{_libexecdir}/chg-chio
8ae81366 300%attr(755,root,root) %{_libexecdir}/chg-chs
c99cbcb3
JB
301%attr(755,root,root) %{_libexecdir}/chg-disk
302%attr(755,root,root) %{_libexecdir}/chg-iomega
eb87556b 303%attr(755,root,root) %{_libexecdir}/chg-juke
eba98501 304%attr(755,root,root) %{_libexecdir}/chg-lib.sh
b083e9f8 305%attr(755,root,root) %{_libexecdir}/chg-manual
c99cbcb3 306%attr(755,root,root) %{_libexecdir}/chg-mcutil
b083e9f8 307%attr(755,root,root) %{_libexecdir}/chg-mtx
8ae81366 308%attr(755,root,root) %{_libexecdir}/chg-multi
c99cbcb3 309%attr(755,root,root) %{_libexecdir}/chg-null
eb87556b 310%attr(755,root,root) %{_libexecdir}/chg-rait
b083e9f8 311%attr(755,root,root) %{_libexecdir}/chg-rth
8ae81366 312%attr(755,root,root) %{_libexecdir}/chg-scsi
313%attr(755,root,root) %{_libexecdir}/chg-zd-mtx
5e5c6257
JR
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
8ae81366 318%attr(755,root,root) %{_libexecdir}/taper
5e5c6257 319
b083e9f8 320%attr(755,root,root) %{_sbindir}/amadmin
5e5c6257 321%attr(755,root,root) %{_sbindir}/amaespipe
7bb8ef98 322%attr(4754,root,amanda) %{_sbindir}/amcheck
b083e9f8 323%attr(755,root,root) %{_sbindir}/amcheckdb
324%attr(755,root,root) %{_sbindir}/amcleanup
5e5c6257
JR
325%attr(755,root,root) %{_sbindir}/amcrypt*
326%attr(755,root,root) %{_sbindir}/amdd
b083e9f8 327%attr(755,root,root) %{_sbindir}/amdump
5e5c6257 328%attr(755,root,root) %{_sbindir}/amfetchdump
8ae81366 329%attr(755,root,root) %{_sbindir}/amflush
330%attr(755,root,root) %{_sbindir}/amgetconf
331%attr(755,root,root) %{_sbindir}/amlabel
5e5c6257 332%attr(755,root,root) %{_sbindir}/ammt
b083e9f8 333%attr(755,root,root) %{_sbindir}/amoverview
8ae81366 334%attr(755,root,root) %{_sbindir}/amplot
b083e9f8 335%attr(755,root,root) %{_sbindir}/amreport
5e5c6257 336%attr(755,root,root) %{_sbindir}/amrestore
eb87556b 337%attr(755,root,root) %{_sbindir}/amrmtape
b083e9f8 338%attr(755,root,root) %{_sbindir}/amstatus
8ae81366 339%attr(755,root,root) %{_sbindir}/amtape
eb87556b 340%attr(755,root,root) %{_sbindir}/amtapetype
8ae81366 341%attr(755,root,root) %{_sbindir}/amtoc
342%attr(755,root,root) %{_sbindir}/amverify
eb87556b 343%attr(755,root,root) %{_sbindir}/amverifyrun
5e5c6257 344%{_mandir}/man5/amanda.conf.5*
a72f9c08 345%{_mandir}/man8/amadmin.8*
5e5c6257 346%{_mandir}/man8/amaespipe.8*
a72f9c08 347%{_mandir}/man8/amanda.8*
348%{_mandir}/man8/amcheck.8*
a188c172 349%{_mandir}/man8/amcheckdb.8*
a72f9c08 350%{_mandir}/man8/amcleanup.8*
5e5c6257
JR
351%{_mandir}/man8/amcrypt*.8*
352%{_mandir}/man8/amdd.8*
a72f9c08 353%{_mandir}/man8/amdump.8*
5e5c6257 354%{_mandir}/man8/amfetchdump.8*
a72f9c08 355%{_mandir}/man8/amflush.8*
a188c172 356%{_mandir}/man8/amgetconf.8*
a72f9c08 357%{_mandir}/man8/amlabel.8*
5e5c6257 358%{_mandir}/man8/ammt.8*
a188c172 359%{_mandir}/man8/amoverview.8*
a72f9c08 360%{_mandir}/man8/amplot.8*
361%{_mandir}/man8/amreport.8*
5e5c6257 362%{_mandir}/man8/amrestore.8*
a188c172 363%{_mandir}/man8/amrmtape.8*
a72f9c08 364%{_mandir}/man8/amstatus.8*
a188c172 365%{_mandir}/man8/amtape.8*
eb87556b 366%{_mandir}/man8/amtapetype.8*
a188c172
JB
367%{_mandir}/man8/amtoc.8*
368%{_mandir}/man8/amverify.8*
eb87556b 369%{_mandir}/man8/amverifyrun.8*
a9736a51 370%endif
64e6fb7c 371
a9736a51 372%if %{with client}
64e6fb7c 373%files client
b083e9f8 374%defattr(644,root,root,755)
a7b1b223 375%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
28099f06 376%attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amandates
8ae81366 377%attr(755,root,root) %{_libdir}/libamclient*.so
b083e9f8 378%attr(755,root,root) %{_libexecdir}/amandad
5e5c6257
JR
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
354ce508 384%attr(4754,root,amanda) %{_libexecdir}/calcsize
73d9be9d 385%attr(4754,root,amanda) %{_libexecdir}/killpgrp
7a7fb145 386%attr(4754,root,amanda) %{_libexecdir}/rundump
354ce508 387%attr(4754,root,amanda) %{_libexecdir}/runtar
388%attr(4754,root,amanda) %{_libexecdir}/selfcheck
5e5c6257 389%attr(755,root,root) %{_sbindir}/amoldrecover
b083e9f8 390%attr(755,root,root) %{_sbindir}/amrecover
e7b6054e 391%attr(770,root,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
5e5c6257 392%{_mandir}/man5/amanda-client.conf.5*
a72f9c08 393%{_mandir}/man8/amrecover.8*
a9736a51 394%endif
This page took 0.198206 seconds and 4 git commands to generate.