]> git.pld-linux.org Git - packages/amanda.git/blame - amanda.spec
- 2.5.2p1
[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
JR
11Version: 2.5.2p1
12Release: 0.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
b2b905b0
JR
35BuildRequires: krb5-devel
36# for kerberos
37BuildRequires: libcom_err-devel
a9736a51 38BuildRequires: libxslt-progs
47d7a19a 39BuildRequires: libtool
e271841a 40BuildRequires: readline-devel >= 4.2
35efb826 41BuildRequires: rpmbuild(macros) >= 1.268
7ba1ec44 42%{?with_samba:BuildRequires: samba-client}
856a76de 43%{?with_xfs:BuildRequires: xfsdump}
c9fdcd61
JR
44Conflicts: shadow < 1:4.0.4.1-4
45Conflicts: pwdutils < 3.1.2-2
316f81cd 46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64e6fb7c 47
ff131879 48%define _localstatedir /var/lib
b083e9f8 49%define _libexecdir %{_libdir}/amanda
50
864ae446 51%description
a895e21d 52AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
53backup system that allows the administrator of a LAN to set up a
54single master backup server to back up multiple hosts to a single
55large capacity tape drive. AMANDA uses native dump and/or GNU tar
56facilities and can back up a large number of workstations running
57multiple versions of Unix. Newer versions of AMANDA (including this
58version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts.
59The amanda package contains the core AMANDA programs and will need to
60be installed on both AMANDA clients and AMANDA servers. Note that you
61will have to install the amanda-client and amanda-server packages as
62well.
64e6fb7c 63
4b4f6542 64%description -l pl.UTF-8
9fa4a022 65AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
4b4f6542
JR
66zapasowych. Umożliwia administratorowi sieci tworzenie kopii z kilku
67hostów na jednej maszynie wyposażonej w pojemny dysk lub streamer.
68Nowsze wersje programu umożliwiają zabezpieczanie zasobów Microsoft
69Windows 95/98/NT/2000 przy użyciu protokołu Samba. Ten pakiet zawiera
70podstawowe pliki programu i powinien być zainstalowany zarówno na
71serwerze jak i na kliencie. Pamiętaj także o instalacji pakietów
a895e21d 72amanda-client i amanda-server!
32595315 73
e48f92a2 74%package libs
75Summary: Amanda shared libraries
9720936a 76Summary(pl.UTF-8): Biblioteki współdzielone pakietu amanda
e48f92a2 77Group: Networking/Utilities
0e3510b6
ER
78Requires(postun): /sbin/ldconfig
79Requires(postun): /usr/sbin/groupdel
80Requires(postun): /usr/sbin/userdel
0da854c3 81Requires(pre): /bin/id
e0651f2a 82Requires(pre): /usr/bin/chsh
934dc2b1 83Requires(pre): /usr/bin/getgid
0da854c3 84Requires(pre): /usr/sbin/groupadd
85Requires(pre): /usr/sbin/useradd
934dc2b1 86Provides: group(amanda)
87Provides: user(amanda)
e48f92a2 88
89%description libs
90Amanda shared libraries.
91
4b4f6542
JR
92%description libs -l pl.UTF-8
93Biblioteki współdzielone pakietu amanda.
e48f92a2 94
64e6fb7c 95%package client
83e7acbd 96Summary: The client side of Amanda
9720936a 97Summary(pl.UTF-8): Klient Amandy
83e7acbd 98Group: Networking/Utilities
2427c166 99Requires(post,postun): /sbin/ldconfig
0e3510b6
ER
100Requires: %{name}-libs = %{version}-%{release}
101Requires: rc-inetd
491e8ea2 102Conflicts: tar < 1.13
64e6fb7c 103
104%description client
a895e21d 105The Amanda-client package should be installed on any machine that will
106be backed up by AMANDA (including the server if it also needs to be
107backed up). You will also need to install the amanda package to each
ff131879 108AMANDA client. It requires at least one of dump and GNU tar installed.
64e6fb7c 109
4b4f6542
JR
110%description client -l pl.UTF-8
111Ten pakiet powinien być zainstalowany ma maszynach, z których
112zawartości będą tworzone kopie zapasowe. Wymaga zainstalowanego co
113najmniej jednego z pakietów dump i GNU tar.
32595315 114
64e6fb7c 115%package server
83e7acbd 116Summary: The server side of Amanda
9720936a 117Summary(pl.UTF-8): Serwer Amandy
83e7acbd 118Group: Networking/Utilities
2427c166 119Requires(post,postun): /sbin/ldconfig
0e3510b6 120Requires: %{name}-libs = %{version}-%{release}
b083e9f8 121Requires: /etc/cron.d
0e3510b6
ER
122Requires: crondaemon
123Requires: gnuplot
4af804ab
JR
124Requires: mt-st
125Requires: mtx
0e3510b6 126Requires: rc-inetd
caae9f77 127Obsoletes: amanda
64e6fb7c 128
129%description server
a895e21d 130The amanda-server package should be installed on the AMANDA server,
131the machine attached to the device (such as a tape drive) where
132backups will be written. You will also need to install the amanda
133package to the AMANDA server. And, if the server is also to be backed
134up, the server also needs to have the amanda-client package installed.
64e6fb7c 135
4b4f6542
JR
136%description server -l pl.UTF-8
137Ten pakiet powinien być zainstalowany na maszynach, na których będą
138magazynowane kopie zapasowe (lub do których podpięte są urządzenia
a895e21d 139typu streamer).
32595315 140
64e6fb7c 141%prep
142%setup -q
7bb8ef98 143%patch0 -p1
144%patch1 -p1
b2b905b0
JR
145# needs rewrite
146#%patch2 -p1
47d7a19a 147%patch3 -p1
05b023d3 148%patch4 -p1
b2b905b0
JR
149%patch5 -p1
150%patch6 -p1
c99cbcb3
JB
151
152# kill libtool.m4 copy
b2b905b0 153tail -n 1291 acinclude.m4 > acinc.tmp
c99cbcb3 154mv -f acinc.tmp acinclude.m4
64e6fb7c 155
156%build
a4b3f4c7 157%{__libtoolize}
20e7e1cf 158%{__aclocal}
5154d365 159%{__autoconf}
5154d365 160%{__automake}
b083e9f8 161%configure \
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
b083e9f8 304%attr(755,root,root) %{_libexecdir}/chg-manual
c99cbcb3 305%attr(755,root,root) %{_libexecdir}/chg-mcutil
b083e9f8 306%attr(755,root,root) %{_libexecdir}/chg-mtx
8ae81366 307%attr(755,root,root) %{_libexecdir}/chg-multi
c99cbcb3 308%attr(755,root,root) %{_libexecdir}/chg-null
eb87556b 309%attr(755,root,root) %{_libexecdir}/chg-rait
b083e9f8 310%attr(755,root,root) %{_libexecdir}/chg-rth
8ae81366 311%attr(755,root,root) %{_libexecdir}/chg-scsi
312%attr(755,root,root) %{_libexecdir}/chg-zd-mtx
5e5c6257
JR
313%attr(755,root,root) %{_libexecdir}/chunker
314%attr(755,root,root) %{_libexecdir}/driver
315%attr(4754,root,amanda) %{_libexecdir}/dumper
316%attr(4754,root,amanda) %{_libexecdir}/planner
8ae81366 317%attr(755,root,root) %{_libexecdir}/taper
5e5c6257 318
b083e9f8 319%attr(755,root,root) %{_sbindir}/amadmin
5e5c6257 320%attr(755,root,root) %{_sbindir}/amaespipe
7bb8ef98 321%attr(4754,root,amanda) %{_sbindir}/amcheck
b083e9f8 322%attr(755,root,root) %{_sbindir}/amcheckdb
323%attr(755,root,root) %{_sbindir}/amcleanup
5e5c6257
JR
324%attr(755,root,root) %{_sbindir}/amcrypt*
325%attr(755,root,root) %{_sbindir}/amdd
b083e9f8 326%attr(755,root,root) %{_sbindir}/amdump
5e5c6257 327%attr(755,root,root) %{_sbindir}/amfetchdump
8ae81366 328%attr(755,root,root) %{_sbindir}/amflush
329%attr(755,root,root) %{_sbindir}/amgetconf
330%attr(755,root,root) %{_sbindir}/amlabel
5e5c6257 331%attr(755,root,root) %{_sbindir}/ammt
b083e9f8 332%attr(755,root,root) %{_sbindir}/amoverview
8ae81366 333%attr(755,root,root) %{_sbindir}/amplot
b083e9f8 334%attr(755,root,root) %{_sbindir}/amreport
5e5c6257 335%attr(755,root,root) %{_sbindir}/amrestore
eb87556b 336%attr(755,root,root) %{_sbindir}/amrmtape
b083e9f8 337%attr(755,root,root) %{_sbindir}/amstatus
8ae81366 338%attr(755,root,root) %{_sbindir}/amtape
eb87556b 339%attr(755,root,root) %{_sbindir}/amtapetype
8ae81366 340%attr(755,root,root) %{_sbindir}/amtoc
341%attr(755,root,root) %{_sbindir}/amverify
eb87556b 342%attr(755,root,root) %{_sbindir}/amverifyrun
5e5c6257 343%{_mandir}/man5/amanda.conf.5*
a72f9c08 344%{_mandir}/man8/amadmin.8*
5e5c6257 345%{_mandir}/man8/amaespipe.8*
a72f9c08 346%{_mandir}/man8/amanda.8*
347%{_mandir}/man8/amcheck.8*
a188c172 348%{_mandir}/man8/amcheckdb.8*
a72f9c08 349%{_mandir}/man8/amcleanup.8*
5e5c6257
JR
350%{_mandir}/man8/amcrypt*.8*
351%{_mandir}/man8/amdd.8*
a72f9c08 352%{_mandir}/man8/amdump.8*
5e5c6257 353%{_mandir}/man8/amfetchdump.8*
a72f9c08 354%{_mandir}/man8/amflush.8*
a188c172 355%{_mandir}/man8/amgetconf.8*
a72f9c08 356%{_mandir}/man8/amlabel.8*
5e5c6257 357%{_mandir}/man8/ammt.8*
a188c172 358%{_mandir}/man8/amoverview.8*
a72f9c08 359%{_mandir}/man8/amplot.8*
360%{_mandir}/man8/amreport.8*
5e5c6257 361%{_mandir}/man8/amrestore.8*
a188c172 362%{_mandir}/man8/amrmtape.8*
a72f9c08 363%{_mandir}/man8/amstatus.8*
a188c172 364%{_mandir}/man8/amtape.8*
eb87556b 365%{_mandir}/man8/amtapetype.8*
a188c172
JB
366%{_mandir}/man8/amtoc.8*
367%{_mandir}/man8/amverify.8*
eb87556b 368%{_mandir}/man8/amverifyrun.8*
a9736a51 369%endif
64e6fb7c 370
a9736a51 371%if %{with client}
64e6fb7c 372%files client
b083e9f8 373%defattr(644,root,root,755)
a7b1b223 374%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
28099f06 375%attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amandates
8ae81366 376%attr(755,root,root) %{_libdir}/libamclient*.so
b083e9f8 377%attr(755,root,root) %{_libexecdir}/amandad
5e5c6257
JR
378%attr(755,root,root) %{_libexecdir}/noop
379%attr(755,root,root) %{_libexecdir}/patch-system
380%attr(755,root,root) %{_libexecdir}/sendbackup
381%attr(755,root,root) %{_libexecdir}/sendsize
382%attr(755,root,root) %{_libexecdir}/versionsuffix
354ce508 383%attr(4754,root,amanda) %{_libexecdir}/calcsize
73d9be9d 384%attr(4754,root,amanda) %{_libexecdir}/killpgrp
7a7fb145 385%attr(4754,root,amanda) %{_libexecdir}/rundump
354ce508 386%attr(4754,root,amanda) %{_libexecdir}/runtar
387%attr(4754,root,amanda) %{_libexecdir}/selfcheck
5e5c6257 388%attr(755,root,root) %{_sbindir}/amoldrecover
b083e9f8 389%attr(755,root,root) %{_sbindir}/amrecover
e7b6054e 390%attr(770,root,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
5e5c6257 391%{_mandir}/man5/amanda-client.conf.5*
a72f9c08 392%{_mandir}/man8/amrecover.8*
a9736a51 393%endif
This page took 0.173554 seconds and 4 git commands to generate.