X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=amanda.spec;h=e9d0027fb399bf66d5611782e362e782e4322af2;hb=fe5d34f1b356339023f60560098c67118e47b868;hp=50d1fefc74a9f9f0cb0183a72b8f1ae4668fc58f;hpb=84e1a2528f563e7daffc5162e4b90294e34612e7;p=packages%2Famanda.git diff --git a/amanda.spec b/amanda.spec index 50d1fef..e9d0027 100644 --- a/amanda.spec +++ b/amanda.spec @@ -1,124 +1,150 @@ +# +# Conditional build: +# _with_xfs - with support for xfsdump +# Summary: A network-capable tape backup solution Summary(pl): Sieciowo zorientowany system tworzenia kopii zapasowych Name: amanda -Version: 2.4.1p1 -Release: 5 -Copyright: distributable -Group: Networking/Utilities -Group(pl): Sieciowe/Narzêdzia -Source0: ftp://ftp.amanda.org/pub/amanda/%{name}-%{version}.tar.gz -Source1: amanda-srv.crontab -Source2: amanda.inetd -Source3: amandaidx.inetd +Version: 2.4.4 +Release: 1 +License: BSD +Group: Networking/Utilities +Source0: http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz +# Source0-md5: 1f5f0c636707994eb7b5e74b19528323 +Source1: %{name}-srv.crontab +Source2: %{name}.inetd +Source3: %{name}idx.inetd Source4: amidxtape.inetd -Source5: amanda.conf -Patch: amanda-DESTDIR.patch -BuildRequires: flex +Source5: %{name}.conf +Patch0: %{name}-no_libnsl.patch +Patch1: %{name}-bug18322.patch +Patch2: %{name}-no_private_libtool.m4.patch +Patch3: %{name}-ac25x.patch +Patch4: %{name}-chg-zd-mtx-sh.patch +URL: http://www.amanda.org/ +BuildRequires: autoconf >= 2.53 +BuildRequires: automake +BuildRequires: cpio BuildRequires: dump +BuildRequires: flex +BuildRequires: gnuplot +BuildRequires: libtool +BuildRequires: readline-devel >= 4.2 BuildRequires: tar -BuildRequires: cpio -BuildRequires: ncurses-devel >= 5.0 -BuildRequires: readline-devel >= 4.1 -Prereq: /sbin/ldconfig -URL: http://www.amanda.org/ +%{?_with_xfs:BuildRequires: xfsdump} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc -%define _localstatedir /var +%define _localstatedir /var/lib %define _libexecdir %{_libdir}/amanda -%description -AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a backup -system that allows the administrator of a LAN to set up a single master -backup server to back up multiple hosts to a single large capacity tape -drive. AMANDA uses native dump and/or GNU tar facilities and can back up a -large number of workstations running multiple versions of Unix. Newer -versions of AMANDA (including this version) can use SAMBA to back up -Microsoft(TM) Windows95/NT hosts. The amanda package contains the core -AMANDA programs and will need to be installed on both AMANDA clients and -AMANDA servers. Note that you will have to install the amanda-client and -amanda-server packages as well. +%description +AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a +backup system that allows the administrator of a LAN to set up a +single master backup server to back up multiple hosts to a single +large capacity tape drive. AMANDA uses native dump and/or GNU tar +facilities and can back up a large number of workstations running +multiple versions of Unix. Newer versions of AMANDA (including this +version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts. +The amanda package contains the core AMANDA programs and will need to +be installed on both AMANDA clients and AMANDA servers. Note that you +will have to install the amanda-client and amanda-server packages as +well. %description -l pl AMANDA jest sieciowo zorientowanym systemem tworzenia kopii -zapasowych. Umo¿liwia administratorowi sieci tworzenie -kopii z wilku hostów na jednej maszynie wyposa¿onej w pojemny -dysk lub streamer. Nowsze wersje programu umo¿liwiaj± zabezpieczanie -zasobów Microsoft Windows 95/98/NT/2000 przy u¿yciu protoko³u Samba. -Ten pakiet zawiera podstawowe pliki programu i powinien byæ zainstalowany -zarówno na serwerze jak i na kliencie. Pamiêtaj tak¿e o instalacji -pakietów amanda-client i amanda-server! +zapasowych. Umo¿liwia administratorowi sieci tworzenie kopii z kilku +hostów na jednej maszynie wyposa¿onej w pojemny dysk lub streamer. +Nowsze wersje programu umo¿liwiaj± zabezpieczanie zasobów Microsoft +Windows 95/98/NT/2000 przy u¿yciu protoko³u Samba. Ten pakiet zawiera +podstawowe pliki programu i powinien byæ zainstalowany zarówno na +serwerze jak i na kliencie. Pamiêtaj tak¿e o instalacji pakietów +amanda-client i amanda-server! %package libs Summary: Amanda shared libraries Summary(pl): Biblioteki wspó³dzielone pakietu amanda Group: Networking/Utilities -Group(pl): Sieciowe/Narzêdzia +Requires(pre): /usr/bin/getgid +Requires(pre): /bin/id +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/sbin/useradd +Requires(postun): /usr/sbin/groupdel +Requires(postun): /usr/sbin/userdel +Requires(postun): /sbin/ldconfig %description libs Amanda shared libraries. -%description -l pl libs +%description libs -l pl Biblioteki wspó³dzielone pakietu amanda. %package client Summary: The client side of Amanda Summary(pl): Klient Amandy Group: Networking/Utilities -Group(pl): Sieciowe/Narzêdzia -Prereq: /sbin/ldconfig -Prereq: %{name}-libs = %{version} +PreReq: %{name}-libs = %{version} +PreReq: rc-inetd +Requires(post,postun): /sbin/ldconfig +Conflicts: tar < 1.13 %description client -The Amanda-client package should be installed on any machine that will be -backed up by AMANDA (including the server if it also needs to be backed up). -You will also need to install the amanda package to each AMANDA client. +The Amanda-client package should be installed on any machine that will +be backed up by AMANDA (including the server if it also needs to be +backed up). You will also need to install the amanda package to each +AMANDA client. It requires at least one of dump and GNU tar installed. -%description -l pl client +%description client -l pl Ten pakiet powinien byæ zainstalowany ma maszynach, z których -zawarto¶ci bêd± tworzone kopie zapasowe. +zawarto¶ci bêd± tworzone kopie zapasowe. Wymaga zainstalowanego co +najmniej jednego z pakietów dump i GNU tar. %package server Summary: The server side of Amanda Summary(pl): Serwer Amandy Group: Networking/Utilities -Group(pl): Sieciowe/Narzêdzia -Prereq: rc-inetd -Prereq: /sbin/ldconfig +PreReq: %{name}-libs = %{version} +PreReq: rc-inetd +Requires(post,postun): /sbin/ldconfig Requires: gnuplot -Requires: tar -Requires: cpio -Requires: dump Requires: crondaemon Requires: /etc/cron.d -Prereq: %{name}-libs = %{version} +Requires: mt-st +Requires: mtx %description server -The amanda-server package should be installed on the AMANDA server, the -machine attached to the device (such as a tape drive) where backups will be -written. You will also need to install the amanda package to the AMANDA -server. And, if the server is also to be backed up, the server also needs to -have the amanda-client package installed. +The amanda-server package should be installed on the AMANDA server, +the machine attached to the device (such as a tape drive) where +backups will be written. You will also need to install the amanda +package to the AMANDA server. And, if the server is also to be backed +up, the server also needs to have the amanda-client package installed. -%description -l pl server -Ten pakiet powinien byæ zainstalowanych na maszynach, na których -bêd± magazynowane kopie zapasowe (lub do których podpiête s± -urz±dzenia typu streamer). +%description server -l pl +Ten pakiet powinien byæ zainstalowanych na maszynach, na których bêd± +magazynowane kopie zapasowe (lub do których podpiête s± urz±dzenia +typu streamer). %prep %setup -q -%patch -p1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build touch COPYING -automake -LDFLAGS="-s"; export LDFLAGS +rm -f missing +%{__libtoolize} +%{__aclocal} +%{__autoconf} +%{__automake} %configure \ --disable-static \ + --enable-shared \ --with-index-server=localhost \ --with-user=amanda \ --with-group=amanda \ - --with-samba-user=amanda \ --with-tape-device=/dev/null \ --with-ftape-rawdevice=/dev/null \ --with-changer-device=/dev/null \ @@ -127,16 +153,19 @@ LDFLAGS="-s"; export LDFLAGS --with-bsd-security \ --with-buffered-dump \ --with-amandahosts \ - --with-debugging=%{_localstatedir}/amanda/debug + --with-debugging=%{_localstatedir}/amanda/debug \ + --with-gnutar-listdir=%{_localstatedir}/amanda/gnutar-lists \ + --with-tmpdir=/var/tmp -make +%{__make} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/etc/{amanda,cron.d,sysconfig/rc-inetd} \ - $RPM_BUILD_ROOT%{_localstatedir}/state/amanda +install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \ + $RPM_BUILD_ROOT%{_localstatedir}/amanda/gnutar-lists \ + $RPM_BUILD_ROOT%{_mandir}/man1 -make install \ +%{__make} install \ DESTDIR=$RPM_BUILD_ROOT \ SETUID_GROUP=`id -g` @@ -146,26 +175,44 @@ install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda -install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/state/amanda - -strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* +install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda -gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man8/* +> $RPM_BUILD_ROOT%{_sysconfdir}/amandates %clean rm -rf $RPM_BUILD_ROOT +%triggerpostun -- amanda-libs < 2.4.2p2-3 +/usr/sbin/chsh -s /bin/sh amanda + +%triggerpostun -- amanda-libs < 2.4.2p2-12 +/usr/sbin/usermod -G disk amanda + %pre libs -/usr/sbin/groupadd -g 80 -r -f amanda -/usr/sbin/useradd -u 80 -r -d /var/state/amanda -s /bin/false -c "Amanda Backup user" -g amanda amanda +if [ -n "`/usr/bin/getgid amanda`" ]; then + if [ "`getgid amanda`" != "80" ]; then + echo "Error: group amanda doesn't have gid=80. Correct this before installing amanda-libs." 1>&2 + exit 1 + fi +else + /usr/sbin/groupadd -g 80 -r -f amanda +fi +if [ -n "`/bin/id -u amanda 2>/dev/null`" ]; then + if [ "`/bin/id -u amanda`" != "80" ]; then + echo "Error: user amanda doesn't have uid=80. Correct this before installing amanda-libs." 1>&2 + exit 1 + fi +else + /usr/sbin/useradd -u 80 -G disk -r -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda 1>&2 +fi %post libs -p /sbin/ldconfig -%preun libs +%postun libs /sbin/ldconfig if [ "$1" = "0" ]; then - /usr/sbin/groupdel amanda /usr/sbin/userdel amanda + /usr/sbin/groupdel amanda fi %post client @@ -173,7 +220,7 @@ fi if [ -f /var/lock/subsys/rc-inetd ]; then /etc/rc.d/init.d/rc-inetd restart 1>&2 else - echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet sever" 1>&2 + echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server." 1>&2 fi %postun client @@ -187,8 +234,9 @@ fi if [ -f /var/lock/subsys/rc-inetd ]; then /etc/rc.d/init.d/rc-inetd restart 1>&2 else - echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet sever" 1>&2 + echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server." 1>&2 fi +echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2 %postun server /sbin/ldconfig @@ -198,83 +246,108 @@ fi %files libs %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libamanda*.so.*.* -%attr(755,root,root) %{_libdir}/libamtape*.so.*.* +%attr(755,root,root) %{_libdir}/libamanda*.so +%attr(755,root,root) %{_libdir}/libamtape*.so %attr(770,root,amanda) %dir %{_libexecdir} +%attr(770,root,amanda) %dir %{_localstatedir}/amanda %files server %defattr(644,root,root,755) +%doc docs/* %config(noreplace) /etc/sysconfig/rc-inetd/amidxtape %config(noreplace) /etc/sysconfig/rc-inetd/amandaidx -%attr(755,root,root) %{_libexecdir}/amidxtaped -%dir %{_sysconfdir}/amanda -%attr(640,root,amanda) %{_sysconfdir}/amanda/* +%attr(750,amanda,amanda) %dir %{_sysconfdir}/amanda +%config(noreplace) %attr(640,amanda,amanda) %{_sysconfdir}/amanda/* -%attr(660,amanda,amanda) %dir %{_localstatedir}/state/amanda -%{_localstatedir}/state/amanda/* +%attr(664,amanda,amanda) %{_localstatedir}/amanda/*.ps -%attr(640,root,root) /etc/cron.d/amanda-srv +%config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv -%attr(755,root,root) %{_libdir}/libamserver*.so.*.* +%attr(755,root,root) %{_libdir}/libamserver*.so %attr(755,root,root) %{_libexecdir}/amindexd %attr(755,root,root) %{_libexecdir}/amtrmidx %attr(755,root,root) %{_libexecdir}/driver %attr(4754,root,amanda) %{_libexecdir}/dumper -%attr(755,root,root) %{_libexecdir}/getconf %attr(4754,root,amanda) %{_libexecdir}/planner -%attr(755,root,root) %{_libexecdir}/taper +%attr(755,root,root) %{_libexecdir}/amcat.awk +%attr(755,root,root) %{_libexecdir}/amcleanupdisk +%attr(755,root,root) %{_libexecdir}/amidxtaped +%attr(755,root,root) %{_libexecdir}/amlogroll +%attr(755,root,root) %{_libexecdir}/amplot.awk +%attr(755,root,root) %{_libexecdir}/amplot.g +%attr(755,root,root) %{_libexecdir}/amplot.gp +%attr(755,root,root) %{_libexecdir}/amtrmlog %attr(755,root,root) %{_libexecdir}/chg-chio +%attr(755,root,root) %{_libexecdir}/chg-chs +%attr(755,root,root) %{_libexecdir}/chg-juke %attr(755,root,root) %{_libexecdir}/chg-manual -%attr(755,root,root) %{_libexecdir}/chg-multi %attr(755,root,root) %{_libexecdir}/chg-mtx +%attr(755,root,root) %{_libexecdir}/chg-multi +%attr(755,root,root) %{_libexecdir}/chg-rait %attr(755,root,root) %{_libexecdir}/chg-rth -%attr(755,root,root) %{_libexecdir}/chg-chs +%attr(755,root,root) %{_libexecdir}/chg-scsi +%attr(755,root,root) %{_libexecdir}/chg-zd-mtx +%attr(755,root,root) %{_libexecdir}/taper %attr(755,root,root) %{_sbindir}/amadmin -%attr(755,root,root) %{_sbindir}/amcheck -%attr(755,root,root) %{_sbindir}/amflush -%attr(755,root,root) %{_sbindir}/amlabel -%attr(755,root,root) %{_sbindir}/amtape +%attr(4754,root,amanda) %{_sbindir}/amcheck %attr(755,root,root) %{_sbindir}/amcheckdb %attr(755,root,root) %{_sbindir}/amcleanup %attr(755,root,root) %{_sbindir}/amdump +%attr(755,root,root) %{_sbindir}/amflush +%attr(755,root,root) %{_sbindir}/amgetconf +%attr(755,root,root) %{_sbindir}/amlabel %attr(755,root,root) %{_sbindir}/amoverview +%attr(755,root,root) %{_sbindir}/amplot +%attr(755,root,root) %{_sbindir}/amreport %attr(755,root,root) %{_sbindir}/amrmtape +%attr(755,root,root) %{_sbindir}/amstatus +%attr(755,root,root) %{_sbindir}/amtape +%attr(755,root,root) %{_sbindir}/amtapetype %attr(755,root,root) %{_sbindir}/amtoc %attr(755,root,root) %{_sbindir}/amverify -#%attr(755,root,root) %{_sbindir}/amplot -%attr(755,root,root) %{_sbindir}/amreport -%attr(755,root,root) %{_sbindir}/amstatus +%attr(755,root,root) %{_sbindir}/amverifyrun %{_mandir}/man8/amadmin.8* -%{_mandir}/man8/amrmtape.8* -%{_mandir}/man8/amtape.8* -%{_mandir}/man8/amtoc.8* %{_mandir}/man8/amanda.8* %{_mandir}/man8/amcheck.8* +%{_mandir}/man8/amcheckdb.8* %{_mandir}/man8/amcleanup.8* %{_mandir}/man8/amdump.8* %{_mandir}/man8/amflush.8* +%{_mandir}/man8/amgetconf.8* %{_mandir}/man8/amlabel.8* +%{_mandir}/man8/amoverview.8* %{_mandir}/man8/amplot.8* %{_mandir}/man8/amreport.8* +%{_mandir}/man8/amrmtape.8* %{_mandir}/man8/amstatus.8* +%{_mandir}/man8/amtape.8* +%{_mandir}/man8/amtapetype.8* +%{_mandir}/man8/amtoc.8* +%{_mandir}/man8/amverify.8* +%{_mandir}/man8/amverifyrun.8* %files client %defattr(644,root,root,755) %config(noreplace) /etc/sysconfig/rc-inetd/amanda - -%attr(755,root,root) %{_libdir}/libamclient*.so.*.* +%attr(664,root,amanda) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/amandates +%attr(755,root,root) %{_libdir}/libamclient*.so %attr(755,root,root) %{_libexecdir}/versionsuffix %attr(755,root,root) %{_libexecdir}/amandad %attr(4754,root,amanda) %{_libexecdir}/calcsize -%attr(755,root,root) %{_libexecdir}/rundump +%attr(4754,root,amanda) %{_libexecdir}/rundump %attr(4754,root,amanda) %{_libexecdir}/runtar %attr(4754,root,amanda) %{_libexecdir}/selfcheck %attr(755,root,root) %{_libexecdir}/sendbackup %attr(755,root,root) %{_libexecdir}/sendsize %attr(755,root,root) %{_libexecdir}/patch-system %attr(4754,root,amanda) %{_libexecdir}/killpgrp +%attr(755,root,root) %{_sbindir}/amdd +%attr(755,root,root) %{_sbindir}/ammt %attr(755,root,root) %{_sbindir}/amrecover %attr(755,root,root) %{_sbindir}/amrestore +%attr(770,amanda,amanda) %dir %{_localstatedir}/amanda/gnutar-lists +%{_mandir}/man8/amdd.8* +%{_mandir}/man8/ammt.8* %{_mandir}/man8/amrecover.8* %{_mandir}/man8/amrestore.8*