%bcond_without client # without client package
%bcond_without server # without server package
#
+%include /usr/lib/rpm/macros.perl
Summary: A network-capable tape backup solution
Summary(pl.UTF-8): Sieciowo zorientowany system tworzenia kopii zapasowych
Name: amanda
-Version: 2.6.0
-Release: 0.1
+Version: 2.6.0p2
+Release: 1
License: BSD
Group: Networking/Utilities
Source0: http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
-# Source0-md5: c347c1e573c33018f234750ac6435156
+# Source0-md5: 75dcba5a75327ebcd4f197a93b8e8c9c
Source1: %{name}-srv.crontab
Source2: %{name}.inetd
Source3: %{name}idx.inetd
Patch4: %{name}-as_needed.patch
Patch5: %{name}-tapetypes.patch
Patch6: %{name}-FHS.patch
+Patch7: %{name}-no-buildtime-ipv6.patch
+Patch8: %{name}-heimdal.patch
+Patch9: %{name}-amtoc.patch
URL: http://www.amanda.org/
BuildRequires: autoconf >= 2.53
BuildRequires: automake
Requires(post): /bin/hostname
Requires(post): /usr/bin/ssh-keygen
Requires: %{name}-libs = %{version}-%{release}
+Requires: %{name}-perl = %{version}-%{release}
Requires: /etc/cron.d
Requires: crondaemon
Requires: gnuplot
Suggests: openssh-clients
Suggests: openssh-server
Obsoletes: amanda
+Obsoletes: amanda-perl-server
%description server
The amanda-server package should be installed on the AMANDA server,
%description perl -l pl.UTF-8
Wiązania perla dla Amandy.
-%package perl-server
-Summary: Perl bindings for amanda server
-Summary(pl.UTF-8): Wiązania perla dla serwera Amandy
-Group: Networking/Utilities
-Requires: %{name}-perl = %{version}-%{release}
-Requires: %{name}-server = %{version}-%{release}
-
-%description perl-server
-Perl bindings for amanda server.
-
-%description perl-server -l pl.UTF-8
-Wiązania perla dla serwera Amandy.
-
%prep
%setup -q
%patch0 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
%build
-%{__libtoolize}
%{__aclocal} -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive
%{__autoconf}
%{__automake}
--with-fqdn \
%{?with_samba:--with-smbclient=%{_bindir}/smbclient} \
--with-bsd-security \
+ --with-bsdtcp-security \ # needed to talk to ZWC windows clients
--with-ssh-security \
--with-krb5-security \
--without-krb4-security \
--with-debugging=%{_sharedstatedir}/amanda/debug \
--with-tmpdir=/var/tmp \
--with-amperldir=%{perl_vendorarch} \
+ --with-ipv6 \
--disable-installperms
%{__make}
%service -q rc-inetd reload
if [ ! -e /var/lib/amanda/.ssh/id_rsa_amrecover ] ; then
HOST="`/bin/hostname`"
+ FQDNHOST="`/bin/hostname -f`"
if [ -z "$HOST" ] ; then
COMMENT="root@client"
else
/usr/bin/ssh-keygen -t rsa -C $COMMENT -f /var/lib/amanda/.ssh/id_rsa_amrecover -N "" || :
chown amanda:amanda /var/lib/amanda/.ssh/id_rsa_amrecover{,.pub} || :
chmod 600 /var/lib/amanda/.ssh/id_rsa_amrecover{,.pub} || :
+ if [ -n "$FQDNHOST" ]; then
+ echo -n "from=\"$FQDNHOST\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command=\"%{_ulibdir}/amanda/amandad -auth=ssh amindexd amidxtaped\" " >/var/lib/amanda/.ssh/server_authorized_keys
+ cat /var/lib/amanda/.ssh/id_rsa_amrecover.pub >>/var/lib/amanda/.ssh/server_authorized_keys
+
+ echo "Remember to copy the contents of /var/lib/amanda/.ssh/server_authorized_keys to"
+ echo "/var/lib/amanda/.ssh/authorized_keys on amanda server"
+ fi
fi
%postun client
%config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
-%dir %{_libdir}/amanda/application
-%attr(755,root,root) %{_libdir}/amanda/application/amgtar
-%attr(644,root,root) %{_libdir}/amanda/application/generic-dumper
-
%attr(755,root,root) %{_libdir}/amanda/libamdevice*.so
%attr(755,root,root) %{_libdir}/amanda/libamserver*.so
%attr(755,root,root) %{_libdir}/amanda/libamtape*.so
%{_mandir}/man8/amtoc.8*
%{_mandir}/man8/amverify.8*
%{_mandir}/man8/amverifyrun.8*
+
+%{perl_vendorarch}/Amanda/Changer.pm
+%{perl_vendorarch}/Amanda/Cmdline.pm
+%{perl_vendorarch}/Amanda/Device.pm
+%{perl_vendorarch}/Amanda/Logfile.pm
+%{perl_vendorarch}/Amanda/Tapefile.pm
+%dir %{perl_vendorarch}/auto/Amanda/Cmdline
+%dir %{perl_vendorarch}/auto/Amanda/Device
+%dir %{perl_vendorarch}/auto/Amanda/Logfile
+%dir %{perl_vendorarch}/auto/Amanda/Tapefile
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Cmdline/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Device/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Logfile/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Tapefile/*.so
%endif
%if %{with client}
# Commented out so it won't get removed on uninstall
#%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/id_rsa_amrecover*
%attr(640,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/amanda/amandates
+
+%dir %{_libdir}/amanda/application
+%attr(755,root,root) %{_libdir}/amanda/application/amgtar
+%attr(644,root,root) %{_libdir}/amanda/application/generic-dumper
+
%attr(755,root,root) %{_libdir}/amanda/libamclient*.so
%attr(755,root,root) %{_libdir}/amanda/amandad
%attr(755,root,root) %{_libdir}/amanda/noop
%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Debug/*.so
%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Types/*.so
%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Util/*.so
-
-%files perl-server
-%defattr(644,root,root,755)
-%{perl_vendorarch}/Amanda/Changer.pm
-%{perl_vendorarch}/Amanda/Cmdline.pm
-%{perl_vendorarch}/Amanda/Device.pm
-%{perl_vendorarch}/Amanda/Logfile.pm
-%{perl_vendorarch}/Amanda/Tapefile.pm
-%dir %{perl_vendorarch}/auto/Amanda/Cmdline
-%dir %{perl_vendorarch}/auto/Amanda/Device
-%dir %{perl_vendorarch}/auto/Amanda/Logfile
-%dir %{perl_vendorarch}/auto/Amanda/Tapefile
-%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Cmdline/*.so
-%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Device/*.so
-%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Logfile/*.so
-%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Tapefile/*.so