Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1583582
 поиск   регистрация   авторизация 
 
Группа :: Архивирование/Резервное копирование
Пакет: amanda

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

%def_disable static

%def_with M24

%if_with M24
%define _release alt1.M24.1
%else
%define _release alt2
%endif

Name: amanda
Version: 2.5.0
Release: %_release
Packager: Grigory Batalov <bga at altlinux.ru>

Summary: The server side of the AMANDA tape backup system
Summary(ru_RU.KOI8-R): Серверная часть системы резервного копирования AMANDA
License: BSD
Group: Archiving/Backup
Url: http://www.amanda.org

Source0: http://download.sourceforge.net/amanda/%name-%{version}p2.tar.bz2
Source1: amanda.crontab.bz2
Source2: __README_QUICKSETUP__.bz2
Source3: amanda.conf.bz2
Source4: disklist.bz2
Source5: amanda-xinetd.bz2
Source6: amandaidx-xinetd.bz2
Source7: amidxtape-xinetd.bz2
Source8: amandahosts.bz2
Patch0: amanda-2.4.2-bug18322.patch.bz2
Patch1: amanda-2.4.2p2-append-patch.bz2
Patch2: amanda-2.4.4-alt-request.patch.gz
Patch3: amanda-2.4.4p1-alt-juke_dir.patch
Patch4: amanda-2.5.0-alt-shmctl.patch
Patch5: amanda-2.4.4p2-alt-gnuplot.patch
Patch6: amanda-2.5.0-alt-nochown.patch.gz
Patch7: amanda-2.5.0-alt-perl.patch
Patch8: amanda-2.5.0-alt-libs.patch
Patch9: amanda-2.5.0-alt-tinfo.patch
Patch10: amanda-2.5.0-alt-no-smbclient.patch

# Added on Wed Mar 29 2006

BuildRequires: libtinfo-devel libreadline-devel
BuildRequires: flex xsltproc
#BuildRequires: dump xfsdump ncompress gnuplot mailx mt-st samba-client

Requires: dump xfsdump ncompress gnuplot mailx mt-st samba-client %name-common = %version

%description
The %name 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 %name-common package to the AMANDA server.
And, if the server is also to be backed up, the server also needs to have
the %name-client package installed.

%description -l ru_RU.KOI8-R
Пакет %name должен быть установлен на сервер AMANDA, машину к которой
подключено устройство резервного копирования (например, накопитель
на ленте). Вам также потребуется установить пакет %name-common.
Кроме того, если сервер также нужно архивировать, установите на него
пакет %name-client.

%package common
Summary: A network-capable tape backup solution
Summary(ru_RU.KOI8-R): Резервное копирование на ленту с поддержкой сети
Group: Archiving/Backup
Requires: tar

%description common
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 %name 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 ru_RU.KOI8-R common
AMANDA - the Advanced Maryland Automatic Network Disk Archiver,
Передовой автоматический архиватор сетевых дисков из Мэриленда - это
система резервного копирования, позволяющая администратору сети
использовать один архивный сервер для копирования данных на ленту
с нескольких машин. AMANDA базируется на возможностях dump и/или GNU tar
и может работать с большим числом рабочих станций и различными версиями
Unix. Последние версии AMANDA также могут работать с Microsoft(TM)
Windows95/NT при помощи SAMBA. Пакет %name содержит ключевые компоненты
AMANDA и должен быть установлен как на машины-клиенты, так и на сервер.

%package client
Summary: The client component of the AMANDA tape backup system
Summary(ru_RU.KOI8-R): Клиентская часть системы резервного копирования AMANDA
Group: Archiving/Backup
Requires: %name-common = %version

%description client
The %name-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 %name package to each
AMANDA client.

%description -l ru_RU.KOI8-R client
Пакет %name-client предназначен для машин, с которых будет осуществляться
резервное копирование (включая сервер, если его тоже нужно архивировать).
Вам также потребуется установить пакет %name.

%package devel
Summary: Development libraries of AMANDA
Summary(ru_RU.KOI8-R): Библиотеки AMANDA для разработчиков
Group: Development/Other
Requires: %name-common = %version %name-client = %version %name = %version

%description devel
The %name-devel package should be installed on any machine that will
be used to develop amanda applications.

%description -l ru_RU.KOI8-R devel
Пакет %name-devel предназначен для разработки приложений на основе AMANDA.

%package devel-static
Summary: Static development libraries of AMANDA
Summary(ru_RU.KOI8-R): Статические библиотеки AMANDA для разработчиков
Group: Development/Other
Requires: %name-devel = %version

%description devel-static
The %name-devel-static package should be installed on any machine
that will be used to develop statically linked amanda applications.

%description -l ru_RU.KOI8-R devel-static
Пакет %name-devel-static предназначен для сборки статически слинкованных
приложений на основе AMANDA.

%prep
%setup -q -n %name-%{version}p2
%patch0 -p1 -b .bug18322
#%patch2 -p1
%patch3 -p0
%patch4 -p1
%patch5 -p1
%patch6 -p0
%patch7 -p0
%patch8 -p0
%patch9 -p0
%patch10 -p0
gzip ChangeLog

# re-apply this one when the patch is updated,

# there's too many rejects as is.
#%patch1 -p1 -b .append

find . -type f -name '*.[hc]' -print0 | xargs subst 's,<varargs.h>,<stdarg.h>,g'

%build
autoreconf -ifsv
export XFSDUMP=/sbin/xfsdump
export XFSRESTORE=/sbin/xfsrestore
export SAMBA_CLIENT=%_bindir/smbclient
export GNUPLOT=%_bindir/gnuplot
export MT=/bin/mt
export MAILER=/bin/mail
export DUMP=/sbin/dump
export RESTORE=/sbin/restore
export COMPRESS=%_bindir/compress
%configure \
   --enable-shared \
   --with-index-server=localhost \
   --with-gnutar=/bin/tar \
   --with-gnutar-listdir=%_localstatedir/amanda/gnutar-lists \
   --with-dumperdir=%_libdir/amanda \
   --with-db=text \
   --with-amandahosts \
   --with-user=amanda \
   --with-group=disk \
   --with-debugging \
   --with-ssh-security \
   --libexecdir=%_libdir/amanda \
   --program-transform-name="" \
   %{subst_enable static}
%make_build && \
(cd common-src; %make_build bsdsecurity)

%install
%make_install install DESTDIR=%buildroot libexecdir=%_libdir/amanda

mkdir -p %buildroot%_sysconfdir/xinetd.d
bzip2 -cd %SOURCE5 > %buildroot%_sysconfdir/xinetd.d/amanda
bzip2 -cd %SOURCE6 > %buildroot%_sysconfdir/xinetd.d/amandaidx
bzip2 -cd %SOURCE7 > %buildroot%_sysconfdir/xinetd.d/amidxtape
chmod 640 %buildroot%_sysconfdir/xinetd.d/*

mkdir -p %buildroot%_localstatedir/amanda
bzip2 -cd %SOURCE8 > %buildroot%_localstatedir/amanda/.amandahosts
chmod 660 %buildroot%_localstatedir/amanda/.amandahosts

mkdir -p examples
cp example/* examples
rm -f examples/Makefile*
rm -f examples/config.site

cp common-src/bsdsecurity %buildroot%_sbindir

bzip2 -cd %SOURCE2 > docs/__README_QUICKSETUP__

{ cd %buildroot
 mkdir -p .%_sysconfdir/amanda/DailySet1
 bzip2 -cd %SOURCE1 > .%_sysconfdir/amanda/crontab.sample
 bzip2 -cd %SOURCE3 > .%_sysconfdir/amanda/DailySet1/amanda.conf
 bzip2 -cd %SOURCE4 > .%_sysconfdir/amanda/DailySet1/disklist
 touch .%_sysconfdir/amandates

 mkdir -p .%_localstatedir/amanda/gnutar-lists
 mkdir -p .%_localstatedir/amanda/DailySet1/index
}

# remove installed docs which we let RPM handle to install

rm -rf %buildroot%_datadir/amanda

# Control settings

mkdir -p %buildroot%_sysconfdir/control.d/facilities
for i in %_libdir/amanda/dumper %_libdir/amanda/planner %_sbindir/amcheck \
        %_libdir/amanda/calcsize %_libdir/amanda/killpgrp \
%_libdir/amanda/rundump %_libdir/amanda/runtar; do
  PROGNAME=`basename $i`
  cat > %buildroot%_sysconfdir/control.d/facilities/$PROGNAME << EOF
#!/bin/sh

. /etc/control.d/functions

BINARY=$i

new_fmode public 4710 root disk
new_fmode restricted 700 root root

control_fmode "\$BINARY" "\$*" || exit 1
EOF
done
chmod 0755 %buildroot%_sysconfdir/control.d/facilities/*

# remove non-packaged files                                                    

rm -f %buildroot%_libdir/*.la                                                

### amanda ###

%pre
[ $1 -eq 1 ] || /usr/sbin/control-dump dumper planner amcheck

%post
%post_ldconfig
[ $1 -eq 1 ] || /usr/sbin/control-restore dumper planner amcheck

%postun -p %postun_ldconfig

### amanda-common ###

%pre common
/usr/sbin/useradd -M -n -g disk -r -d %_localstatedir/amanda -s /dev/null \
-c "system user for %name" amanda >/dev/null 2>&1 || :

%post common -p %post_ldconfig

%postun common -p %postun_ldconfig

### amanda-client ###

%pre client
[ $1 -eq 1 ] || /usr/sbin/control-dump calcsize killpgrp rundump runtar

%post client
%post_ldconfig
[ $1 -eq 1 ] || /usr/sbin/control-restore calcsize killpgrp rundump runtar

%postun client -p %postun_ldconfig
###

%files common
%_libdir/libamanda-*.so
%_libdir/libamtape-*.so
%attr(-,amanda,disk) %dir %_localstatedir/amanda/
%attr(-,amanda,disk) %dir %_sysconfdir/amanda/
%dir %_libdir/amanda/
%attr(600,amanda,disk) %config(noreplace) %_localstatedir/amanda/.amandahosts
%attr(-,amanda,disk) %config(noreplace) %_sysconfdir/amandates

%files
%doc examples docs/*.txt docs/__README_QUICKSETUP__ COPYRIGHT* NEWS README ChangeLog.gz
%attr(4710,root,disk) %_libdir/amanda/dumper
%attr(4710,root,disk) %_libdir/amanda/planner
%attr(4710,root,disk) %_sbindir/amcheck
%config %_sysconfdir/control.d/facilities/dumper
%config %_sysconfdir/control.d/facilities/planner
%config %_sysconfdir/control.d/facilities/amcheck
%_libdir/libamserver-*.so
%_libdir/librestore-*.so
%config(noreplace) %_sysconfdir/xinetd.d/amandaidx
%config(noreplace) %_sysconfdir/xinetd.d/amidxtape
%_libdir/amanda/amidxtaped
%_libdir/amanda/amindexd
%_libdir/amanda/amlogroll
%_sbindir/amrestore
%_libdir/amanda/amtrmidx
%_libdir/amanda/amtrmlog
%_libdir/amanda/driver
%_libdir/amanda/chunker
%_libdir/amanda/taper
%_libdir/amanda/amcleanupdisk
%_libdir/amanda/chg-iomega
%_libdir/amanda/chg-scsi
%_libdir/amanda/chg-manual
%_libdir/amanda/chg-multi
%_libdir/amanda/chg-mtx
%_libdir/amanda/chg-rth
%_libdir/amanda/chg-chs
%_libdir/amanda/chg-chio
%_libdir/amanda/chg-zd-mtx
%_libdir/amanda/chg-disk
%_libdir/amanda/chg-mcutil
%_libdir/amanda/chg-null
%_libdir/amanda/amcat.awk
%_libdir/amanda/amplot.awk
%_libdir/amanda/amplot.g
%_libdir/amanda/amplot.gp
%_sbindir/amadmin
%_sbindir/amflush
%_sbindir/amgetconf
%_sbindir/amlabel
%_sbindir/amtape
%_sbindir/amreport
%_sbindir/amcheckdb
%_sbindir/amcleanup
%_sbindir/amdump
%_sbindir/amoverview
%_sbindir/amrmtape
%_sbindir/amtoc
%_sbindir/amverify
%_sbindir/amstatus
%_sbindir/amplot
%_sbindir/amdd
%_sbindir/ammt
%_sbindir/amverifyrun
%_sbindir/amtapetype
%_sbindir/amaespipe
%_sbindir/amcrypt
%_sbindir/amfetchdump
%attr(-,amanda,disk) %dir %_localstatedir/amanda/DailySet1/
%attr(-,amanda,disk) %dir %_localstatedir/amanda/DailySet1/index
%attr(-,amanda,disk) %dir %_sysconfdir/amanda/DailySet1
%attr(-,amanda,disk) %config(noreplace) %_sysconfdir/amanda/DailySet1/amanda.conf
%attr(-,amanda,disk) %config(noreplace) %_sysconfdir/amanda/crontab.sample
%attr(-,amanda,disk) %config(noreplace) %_sysconfdir/amanda/DailySet1/disklist
%_mandir/man8/amplot.8*
%_man8dir/amanda.8*
%_man8dir/amadmin.8*
%_man8dir/amcheck.8*
%_man8dir/amcheckdb.8*
%_man8dir/amcleanup.8*
%_man8dir/amdump.8*
%_man8dir/amflush.8*
%_man8dir/amlabel.8*
%_man8dir/amoverview.8*
%_man8dir/amrmtape.8*
%_man8dir/amtape.8*
%_man8dir/amtoc.8*
%_man8dir/amverify.8*
%_man8dir/amstatus.8*
%_man8dir/amreport.8*
%_man8dir/amdd.8*
%_man8dir/amgetconf.8*
%_man8dir/ammt.8*
%_man8dir/amverifyrun.8*
%_man8dir/amtapetype.8*
%_man8dir/amaespipe.8*
%_man8dir/amcrypt.8*
%_man8dir/amfetchdump.8*
%_man8dir/amrestore.8*
%_man5dir/amanda.conf.5*

%files client
%config(noreplace) %_sysconfdir/xinetd.d/amanda
%attr(4710,root,disk) %_libdir/amanda/calcsize
%attr(4710,root,disk) %_libdir/amanda/killpgrp
%attr(4710,root,disk) %_libdir/amanda/rundump
%attr(4710,root,disk) %_libdir/amanda/runtar
%config %_sysconfdir/control.d/facilities/calcsize
%config %_sysconfdir/control.d/facilities/killpgrp
%config %_sysconfdir/control.d/facilities/rundump
%config %_sysconfdir/control.d/facilities/runtar
%_libdir/libamclient-*.so
%_libdir/amanda/amandad
#%_libdir/amanda/amqde
%_libdir/amanda/patch-system
%_libdir/amanda/selfcheck
%_libdir/amanda/sendbackup
%_libdir/amanda/sendsize
%_libdir/amanda/versionsuffix
%_libdir/amanda/chg-juke
%_libdir/amanda/chg-rait
%_libdir/amanda/noop
%_libdir/amanda/generic-dumper
%_libdir/amanda/gnutar
%_sbindir/amrecover
%_sbindir/bsdsecurity
%attr(-,amanda,disk) %_localstatedir/amanda/gnutar-lists/
%_man8dir/amrecover.8*

%files devel
%_libdir/libamanda.so
%_libdir/libamtape.so
%_libdir/libamclient.so
%_libdir/libamserver.so
%_libdir/librestore.so

%if_enabled static
%files devel-static
%_libdir/libamanda.a
%_libdir/libamtape.a
%_libdir/libamclient.a
%_libdir/libamserver.a
%endif

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005