%bcond_without samba # without smbclient support
%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: 3.2.1
-Release: 2
+Version: 3.3.2
+Release: 4
License: BSD
Group: Networking/Utilities
-Source0: http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
-# Source0-md5: 52448420a04d27b8ce47ef397b0a7061
+Source0: http://downloads.sourceforge.net/amanda/%{name}-%{version}.tar.gz
+# Source0-md5: 1a6cfe47eaee121f22540ac5fa58c366
Source1: %{name}-srv.crontab
Source2: %{name}.inetd
Source3: %{name}idx.inetd
# http://amanda.svn.sourceforge.net/viewvc/amanda/amanda/branches/3_2/contrib/convert-zd-mtx-to-robot.sh
Source6: convert-zd-mtx-to-robot.sh
Source7: %{name}-ssh_config
+# https://github.com/janekr/amlvm-snapshot
+Source8: amlvm-snapshot.conf
+Source9: amlvm-snapshot.pl
+Source10: amlvm-snapshot.README
Patch0: %{name}-no_libnsl.patch
Patch1: %{name}-chg-zd-mtx-sh.patch
Patch2: %{name}-tar.patch
Patch7: %{name}-no-buildtime-ipv6.patch
Patch8: %{name}-heimdal.patch
Patch9: %{name}-ac.patch
-Patch10: %{name}-amstar-exclude.patch
Patch11: %{name}-amstar-exclude-fix.patch
Patch12: %{name}-krb5-auth.patch
+Patch13: %{name}-stdio.patch
+Patch14: %{name}-amstar-device.patch
URL: http://www.amanda.org/
BuildRequires: autoconf >= 2.53
BuildRequires: automake
BuildRequires: flex
BuildRequires: glib2-devel
BuildRequires: gnuplot
+BuildRequires: rpmbuild(macros) >= 1.654
# curl is broken, see curl-config --libs
-BuildRequires: keyutils-devel
BuildRequires: heimdal-devel
+BuildRequires: keyutils-devel
BuildRequires: libtool
BuildRequires: libxslt-progs
BuildRequires: ncurses-devel
BuildRequires: perl-devel >= 5.6.0
BuildRequires: pkgconfig
BuildRequires: readline-devel >= 4.2
-BuildRequires: rpmbuild(macros) >= 1.559
BuildRequires: rpm-perlprov
+BuildRequires: rpmbuild(macros) >= 1.654
%{?with_samba:BuildRequires: samba-client}
BuildRequires: swig
%{?with_xfs:BuildRequires: xfsdump}
-Conflicts: shadow < 1:4.0.4.1-4
Conflicts: pwdutils < 3.1.2-2
+Conflicts: shadow < 1:4.0.4.1-4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# for some unknown reason those get detected in R but not in P (Tie::StdHash comes from perl)
-%define _noautoreq 'perl(Tie::StdHash)' 'perl(Amanda::Recovery::Clerk::Feedback)' 'perl(Amanda::Taper::Scribe::Feedback)'
+%define _noautoreq_perl Tie::StdHash Amanda::Recovery::Clerk::Feedback Amanda::Taper::Scribe::Feedback
%define _ulibdir %{_prefix}/lib
Requires(post): /usr/bin/ssh-keygen
Requires: %{name}-common = %{version}-%{release}
Requires: rc-inetd
+Suggests: gzip
Suggests: openssh-clients
Suggests: openssh-server
-Suggests: tar
-Suggests: gzip
Suggests: star
+Suggests: tar
Conflicts: tar < 1.15
%description client
%patch7 -p1
%patch8 -p1
%patch9 -p1
-%patch10 -p2
%patch11 -p1
%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+cp -a %{SOURCE10} .
%build
%{__aclocal} -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive
touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.ssh/id_rsa_amdump{,.pub}
touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.ssh/id_rsa_amrecover{,.pub}
+%if %{with server}
+install -p %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/amanda/lvm-snapshot.conf
+%endif
+
+%if %{with client}
+sed -e 's|@@PERL_VENDORARCH@@|%{perl_vendorarch}|' %{SOURCE9} >$RPM_BUILD_ROOT%{_libdir}/amanda/application/amlvm-snapshot
+%endif
+
> $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/amandates
# Amanda tools generate ssh keys with embeded commands pointing to /usr/lib
chmod 600 %{_sharedstatedir}/amanda/.amandahosts
fi
+%triggerpostun common -- amanda-common < 3.3
+%banner %{name}-common -e << EOF
+In amanda 3.3 the default auth has changed to "bsdtcp",
+if you are using the default "bsd" then you must add it
+to your configuration:
+
+ * in amanda.conf
+ * in amanda-client.conf
+ * in dumptype/disklist
+ * in inetd (if no '-auth' argument to amandad)
+EOF
+
%pre common
%groupadd -P %{name}-common -g 80 amanda
%useradd -P %{name}-common -u 80 -G disk,tape -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
%files common
%defattr(644,root,root,755)
-%doc AUTHORS COPYRIGHT ChangeLog NEWS README ReleaseNotes UPGRADING
+%doc AUTHORS COPYRIGHT ChangeLog NEWS README ReleaseNotes UPGRADING amlvm-snapshot.README
%attr(755,root,root) %{_libdir}/amanda/libamanda*.so
%attr(755,root,root) %{_libdir}/amanda/libamar*.so
%attr(755,root,root) %{_libdir}/amanda/libamxfer*.so
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amandaidx
%config(noreplace) %verify(not md5 mtime size) %attr(640,amanda,amanda) %{_sysconfdir}/amanda/amanda.conf
+%config(noreplace) %verify(not md5 mtime size) %attr(640,amanda,amanda) %{_sysconfdir}/amanda/lvm-snapshot.conf
# Commented out so it won't get removed on uninstall
#%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/client_authorized_keys
%attr(755,root,root) %{_libdir}/amanda/libamserver*.so
%attr(755,root,root) %{_libdir}/amanda/amcat.awk
-%attr(755,root,root) %{_libdir}/amanda/amcleanupdisk
%attr(755,root,root) %{_libdir}/amanda/amcheck-device
+%attr(755,root,root) %{_libdir}/amanda/amdumpd
%attr(755,root,root) %{_libdir}/amanda/amidxtaped
%attr(755,root,root) %{_libdir}/amanda/amindexd
%attr(755,root,root) %{_libdir}/amanda/amlogroll
%attr(755,root,root) %{_sbindir}/amcheckdb
%attr(755,root,root) %{_sbindir}/amcheckdump
%attr(755,root,root) %{_sbindir}/amcleanup
+%attr(755,root,root) %{_sbindir}/amcleanupdisk
%attr(755,root,root) %{_sbindir}/amconvert-zd-mtx-to-robot.sh
%attr(755,root,root) %{_sbindir}/amdevcheck
%attr(755,root,root) %{_sbindir}/amdump
%{_mandir}/man7/amanda-changers.7*
%{_mandir}/man7/amanda-compatibility.7*
%{_mandir}/man7/amanda-devices.7*
+%{_mandir}/man7/amanda-interactivity.7*
%{_mandir}/man7/amanda-taperscan.7*
%{_mandir}/man8/amaddclient.8*
%{_mandir}/man8/amadmin.8*
%{_mandir}/man8/amcheckdb.8*
%{_mandir}/man8/amcheckdump.8*
%{_mandir}/man8/amcleanup.8*
+%{_mandir}/man8/amcleanupdisk.8*
%{_mandir}/man8/amdevcheck.8*
%{_mandir}/man8/amdump.8*
%{_mandir}/man8/amfetchdump.8*
%{perl_vendorarch}/Amanda/Device.pm
%{perl_vendorarch}/Amanda/Disklist.pm
%{perl_vendorarch}/Amanda/Holding.pm
-%{perl_vendorarch}/Amanda/Interactive.pm
-%dir %{perl_vendorarch}/Amanda/Interactive
-%{perl_vendorarch}/Amanda/Interactive/*.pm
+%{perl_vendorarch}/Amanda/Interactivity.pm
+%dir %{perl_vendorarch}/Amanda/Interactivity
+%{perl_vendorarch}/Amanda/Interactivity/*.pm
%{perl_vendorarch}/Amanda/Logfile.pm
%dir %{perl_vendorarch}/Amanda/Recovery
%{perl_vendorarch}/Amanda/Recovery/*.pm
%{perl_vendorarch}/Amanda/Report.pm
%dir %{perl_vendorarch}/Amanda/Report
%{perl_vendorarch}/Amanda/Report/*.pm
+%{perl_vendorarch}/Amanda/ScanInventory.pm
%{perl_vendorarch}/Amanda/Tapelist.pm
%dir %{perl_vendorarch}/Amanda/Taper
%{perl_vendorarch}/Amanda/Taper/*.pm
%dir %{_libdir}/amanda/application
%attr(4750,root,amanda) %{_libdir}/amanda/application/amgtar
%attr(755,root,root) %{_libdir}/amanda/application/amlog-script
+%attr(755,root,root) %{_libdir}/amanda/application/amlvm-snapshot
%attr(755,root,root) %{_libdir}/amanda/application/ampgsql
%attr(755,root,root) %{_libdir}/amanda/application/amraw
%attr(755,root,root) %{_libdir}/amanda/application/amsamba
%attr(4750,root,amanda) %{_libdir}/amanda/rundump
%attr(4750,root,amanda) %{_libdir}/amanda/runtar
%attr(755,root,root) %{_libdir}/amanda/selfcheck
+%attr(755,root,root) %{_sbindir}/amdump_client
%attr(755,root,root) %{_sbindir}/amoldrecover
%attr(755,root,root) %{_sbindir}/amrecover
%attr(750,amanda,amanda) %dir %{_sharedstatedir}/amanda/gnutar-lists
%attr(750,amanda,amanda) %dir %{_sharedstatedir}/amanda/debug/client
%{_mandir}/man7/amanda-applications.7*
%{_mandir}/man5/amanda-client.conf.5*
+%{_mandir}/man8/amdump_client.8*
%{_mandir}/man8/amgtar.8*
%{_mandir}/man8/ampgsql.8*
%{_mandir}/man8/amrecover.8*