+#
+# Conditional build:
+%bcond_without xfs # without (possible) support for xfsdump
+%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): Sieciowo zorientowany system tworzenia kopii zapasowych
+Summary(pl.UTF-8): Sieciowo zorientowany system tworzenia kopii zapasowych
Name: amanda
-Version: 2.4.1p1
-Release: 1
-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.6.1p2
+Release: 4
+License: BSD
+Group: Networking/Utilities
+Source0: http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
+# Source0-md5: 816ef0101b6d968c5df7d7d7e793caed
+Source1: %{name}-srv.crontab
+Source2: %{name}.inetd
+Source3: %{name}idx.inetd
Source4: amidxtape.inetd
-Source5: amanda.conf
-BuildRequires: flex
+Patch0: %{name}-no_libnsl.patch
+Patch1: %{name}-chg-zd-mtx-sh.patch
+Patch2: %{name}-tar.patch
+Patch3: %{name}-bashizm.patch
+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}-glib2.24.patch
+URL: http://www.amanda.org/
+BuildRequires: autoconf >= 2.53
+BuildRequires: automake
+BuildRequires: curl-devel >= 7.10.0
BuildRequires: dump
-BuildRequires: tar
+BuildRequires: flex
+BuildRequires: glib2-devel
+BuildRequires: gnuplot
+# curl is broken, see curl-config --libs
+BuildRequires: keyutils-devel
+BuildRequires: heimdal-devel
+BuildRequires: libtool
+BuildRequires: libxslt-progs
BuildRequires: ncurses-devel
-BuildRequires: readline-devel
-Prereq: /sbin/ldconfig
-URL: http://www.amanda.org/
-BuildRoot: /tmp/%{name}-%{version}-root
-
-%define _sysconfdir /etc
-%define _localstatedir /var
-%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 -l pl
-Sieciowo zorientowany system tworzenia kopii zapasowych
-
-%package libs
-Summary: Amanda shared libraries
-Summary(pl): Biblioteki wspó³dzielone pakietu amanda
+BuildRequires: openssh-clients
+BuildRequires: openssl-devel
+BuildRequires: perl-devel >= 5.6.0
+BuildRequires: pkgconfig
+BuildRequires: readline-devel >= 4.2
+BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpm-perlprov
+%{?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
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _ulibdir %{_prefix}/lib
+
+%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.UTF-8
+AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
+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 common
+Summary: Amanda common files
+Summary(pl.UTF-8): Wspólne pliki pakietu amanda
Group: Networking/Utilities
-Group(pl): Sieciowe/Narzêdzia
-
-%description libs
-Amanda shared libraries.
-
-%description -l pl libs
-Summary(pl): Biblioteki wspó³dzielone pakietu amanda.
+Requires(postun): /usr/sbin/groupdel
+Requires(postun): /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/chsh
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires: setup >= 2.6.1-1
+Provides: group(amanda)
+Provides: user(amanda)
+Obsoletes: amanda-libs
+Obsoletes: amanda-perl
+
+%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 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.
+
+Amanda common files.
+
+%description common -l pl.UTF-8
+AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
+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!
+
+Wspólne pliki pakietu amanda.
%package client
Summary: The client side of Amanda
-Summary(pl): Klient Amandy
+Summary(pl.UTF-8): Klient Amandy
Group: Networking/Utilities
-Group(pl): Sieciowe/Narzêdzia
-Prereq: /sbin/ldconfig
-Requires: %{name}-libs = %{version}
+Requires(post): /bin/hostname
+Requires(post): /usr/bin/ssh-keygen
+Requires: %{name}-common = %{version}-%{release}
+Requires: rc-inetd
+Suggests: openssh-clients
+Suggests: openssh-server
+Suggests: tar
+Suggests: gzip
+Suggests: star
+Conflicts: tar < 1.15
%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
-Ten pakiet powinien byæ zainstalowany ma maszynach, z których
-zawarto¶ci bêd± tworzone kopie zapasowe.
+%description client -l pl.UTF-8
+Ten pakiet powinien być zainstalowany ma maszynach, z których
+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
+Summary(pl.UTF-8): Serwer Amandy
Group: Networking/Utilities
-Group(pl): Sieciowe/Narzêdzia
-Prereq: rc-inetd
-Prereq: /sbin/ldconfig
-Requires: gnuplot
-Requires: tar
-Requires: cpio
-Requires: dump
-Requires: %{name}-libs = %{version}
-Requires: crondaemon
+Requires(post): /bin/hostname
+Requires(post): /usr/bin/ssh-keygen
+Requires: %{name}-common = %{version}-%{release}
Requires: /etc/cron.d
+Requires: crondaemon
+Requires: gnuplot
+Requires: mt-st
+Requires: mtx
+Requires: rc-inetd
+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, 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.UTF-8
+Ten pakiet powinien być zainstalowany na maszynach, na których będą
+magazynowane kopie zapasowe (lub do których podpięte są urządzenia
+typu streamer).
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p2
%build
-LDFLAGS="-s"; export LDFLAGS
+%{__aclocal} -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive
+%{__autoconf}
+%{__automake}
%configure \
+ DUMP=/sbin/dump \
+ GNUPLOT=/usr/bin/gnuplot \
+ GZIP=/bin/gzip \
+ MAILER=/bin/mail \
+ MT=/bin/mt \
+ MTX=/usr/sbin/mtx \
+ PRINT=/usr/bin/lpr \
+ RESTORE=/sbin/restore \
+ STAR=/usr/bin/star \
+ %{?with_xfs:XFSDUMP=/sbin/xfsdump} \
+ %{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
--disable-static \
+ --enable-shared \
+ %{!?with_server:--without-server} \
+ %{!?with_client:--without-client} \
--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 \
--with-fqdn \
- --with-smbclient=%{_bindir}/smbclient \
+ %{?with_samba:--with-smbclient=%{_bindir}/smbclient} \
--with-bsd-security \
+ --with-bsdtcp-security \
+ --with-ssh-security \
+ --with-krb5-security \
+ --without-krb4-security \
--with-buffered-dump \
--with-amandahosts \
- --with-debugging=%{_localstatedir}/amanda/debug
+ --with-configdir=%{_sysconfdir}/amanda \
+ --with-gnutar-listdir=%{_sharedstatedir}/amanda/gnutar-lists \
+ --with-amandates=%{_sharedstatedir}/amanda/amandates \
+ --with-debugging=%{_sharedstatedir}/amanda/debug \
+ --with-tmpdir=/var/tmp \
+ --with-amperldir=%{perl_vendorarch} \
+ --with-ipv6 \
+ --disable-installperms
-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%{_sharedstatedir}/amanda/{.gnupg,.ssh,gnutar-lists} \
+ $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/debug/{amandad,client,server}
-make install \
- DESTDIR=$RPM_BUILD_ROOT \
- SETUID_GROUP=`id -g`
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
+sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
+sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
+sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
+
+install example/amanda.conf $RPM_BUILD_ROOT%{_sysconfdir}/amanda
+install example/amanda-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/amanda
+touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.amandahosts
-install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
-install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/state/amanda
+touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.ssh/{,client_}authorized_keys
+touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.ssh/id_rsa_amdump{,.pub}
+touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.ssh/id_rsa_amrecover{,.pub}
-strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*
+> $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/amandates
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man8/*
+# Amanda tools generate ssh keys with embeded commands pointing to /usr/lib
+# Tools can't be "fixed" because keys generated on server are to be used on client
+if [ "%{_lib}" != "lib" ] ; then
+ install -d $RPM_BUILD_ROOT%{_ulibdir}
+ ln -s %{_libdir}/amanda $RPM_BUILD_ROOT%{_ulibdir}/amanda
+fi
+
+find $RPM_BUILD_ROOT -name \*.la | xargs rm -f
%clean
rm -rf $RPM_BUILD_ROOT
-%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
+%triggerpostun common -- amanda-libs < 2.6.0p2-3
+echo "Adding amanda to disk and tape groups"
+/usr/sbin/usermod -G disk,tape amanda
+echo "Setting amanda shell to /bin/sh"
+/usr/bin/chsh -s /bin/sh amanda
+if [ -f %{_sharedstatedir}/amanda/.amandahosts ]; then
+ echo "Fixing permissions of %{_sharedstatedir}/amanda/.amandahosts file"
+ chown amanda:amanda %{_sharedstatedir}/amanda/.amandahosts
+ chmod 600 %{_sharedstatedir}/amanda/.amandahosts
+fi
-%post libs -p /sbin/ldconfig
+%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
-%preun libs
-/sbin/ldconfig
+%postun common
if [ "$1" = "0" ]; then
- /usr/sbin/groupdel amanda
- /usr/sbin/userdel mananda
+ %userremove amanda
+ %groupremove amanda
fi
%post client
-/sbin/ldconfig
-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
+%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
+ COMMENT="root@$HOST"
+ fi
+ /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
-/sbin/ldconfig
-if [ -f /var/lock/subsys/rc-inetd ]; then
- /etc/rc.d/init.d/rc-inetd restart
+if [ "$1" = 0 ]; then
+ %service -q rc-inetd reload
fi
%post server
-/sbin/ldconfig
-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
+%service -q rc-inetd reload
+if [ ! -e /var/lib/amanda/.ssh/id_rsa_amdump ] ; then
+ HOST="`/bin/hostname`"
+ if [ -z "$HOST" ] ; then
+ COMMENT="amanda@server"
+ else
+ COMMENT="amanda@$HOST"
+ fi
+ /usr/bin/ssh-keygen -t rsa -C $COMMENT -f /var/lib/amanda/.ssh/id_rsa_amdump -N "" || :
+ chown amanda:amanda /var/lib/amanda/.ssh/id_rsa_amdump{,.pub} || :
+ chmod 600 /var/lib/amanda/.ssh/id_rsa_amdump{,.pub} || :
+fi
+if [ "$1" = "1" ]; then
+ echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
fi
%postun server
-/sbin/ldconfig
-if [ -f /var/lock/subsys/rc-inetd ]; then
- /etc/rc.d/init.d/rc-inetd restart
+if [ "$1" = 0 ]; then
+ %service -q rc-inetd reload
fi
-%files libs
+%files common
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libamanda*.so.*.*
-%attr(755,root,root) %{_libdir}/libamtape*.so.*.*
-%attr(770,root,amanda) %dir %{_libexecdir}
-
+%doc AUTHORS COPYRIGHT ChangeLog NEWS README ReleaseNotes UPGRADING
+%attr(755,root,root) %{_libdir}/amanda/libamanda*.so
+%attr(755,root,root) %{_libdir}/amanda/libamar*.so
+%attr(755,root,root) %{_libdir}/amanda/libamglue*.so
+%attr(750,amanda,amanda) %dir %{_sysconfdir}/amanda
+%dir %{_libdir}/amanda
+%if %{_lib} != "lib"
+%{_ulibdir}/amanda
+%endif
+%attr(755,root,root) %{_sbindir}/amarchiver
+%attr(750,amanda,amanda) %dir %{_datadir}/amanda
+%attr(750,amanda,amanda) %dir %{_datadir}/amanda/example
+%attr(750,amanda,amanda) %dir %{_datadir}/amanda/example/label-templates
+%attr(640,amanda,amanda) %{_datadir}/amanda/example/*amanda*
+%attr(640,amanda,amanda) %{_datadir}/amanda/example/label-templates/*.ps
+%attr(750,amanda,amanda) %dir %{_datadir}/amanda/template.d
+%attr(640,amanda,amanda) %{_datadir}/amanda/template.d/*
+%attr(750,amanda,amanda) %dir %{_sharedstatedir}/amanda
+%attr(700,amanda,amanda) %dir %{_sharedstatedir}/amanda/.ssh
+%attr(700,amanda,amanda) %dir %{_sharedstatedir}/amanda/.gnupg
+%attr(750,amanda,amanda) %dir %{_sharedstatedir}/amanda/debug
+%attr(750,amanda,amanda) %dir %{_sharedstatedir}/amanda/debug/amandad
+%attr(600,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/amanda/.amandahosts
+# Commented out so it won't get removed on uninstall
+#%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/authorized_keys
+%{_mandir}/man5/amanda-archive-format.5*
+%{_mandir}/man7/amanda-auth.7*
+%{_mandir}/man7/amanda-scripts.7*
+%{_mandir}/man8/script-email.8*
+%{_mandir}/man8/amarchiver.8*
+
+%dir %{perl_vendorarch}/Amanda
+%{perl_vendorarch}/Amanda/Archive.pm
+%{perl_vendorarch}/Amanda/BigIntCompat.pm
+%{perl_vendorarch}/Amanda/Config.pm
+%{perl_vendorarch}/Amanda/Constants.pm
+%{perl_vendorarch}/Amanda/Debug.pm
+%{perl_vendorarch}/Amanda/MainLoop.pm
+%{perl_vendorarch}/Amanda/Paths.pm
+%{perl_vendorarch}/Amanda/Script.pm
+%{perl_vendorarch}/Amanda/Script_App.pm
+%{perl_vendorarch}/Amanda/Tests.pm
+%{perl_vendorarch}/Amanda/Types.pm
+%{perl_vendorarch}/Amanda/Util.pm
+%dir %{perl_vendorarch}/auto/Amanda
+%dir %{perl_vendorarch}/auto/Amanda/Archive
+%dir %{perl_vendorarch}/auto/Amanda/Config
+%dir %{perl_vendorarch}/auto/Amanda/Debug
+%dir %{perl_vendorarch}/auto/Amanda/MainLoop
+%dir %{perl_vendorarch}/auto/Amanda/Tests
+%dir %{perl_vendorarch}/auto/Amanda/Types
+%dir %{perl_vendorarch}/auto/Amanda/Util
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Archive/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Config/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Debug/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/MainLoop/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Tests/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Types/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Util/*.so
+
+%if %{with server}
%files server
%defattr(644,root,root,755)
-%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(660,amanda,amanda) %dir %{_localstatedir}/state/amanda
-%{_localstatedir}/state/amanda/*
-
-%attr(640,root,root) /etc/cron.d/amanda-srv
-
-%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(755,root,root) %{_libexecdir}/dumper
-%attr(755,root,root) %{_libexecdir}/getconf
-%attr(755,root,root) %{_libexecdir}/planner
-%attr(755,root,root) %{_libexecdir}/taper
-%attr(755,root,root) %{_libexecdir}/chg-chio
-%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-rth
-%attr(755,root,root) %{_libexecdir}/chg-chs
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amidxtape
+%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
+
+# Commented out so it won't get removed on uninstall
+#%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/client_authorized_keys
+#%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/id_rsa_amdump*
+
+%attr(750,amanda,amanda) %dir %{_sharedstatedir}/amanda/debug/server
+
+%config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
+
+%attr(755,root,root) %{_libdir}/amanda/libamdevice*.so
+%attr(755,root,root) %{_libdir}/amanda/libamserver*.so
+%attr(755,root,root) %{_libdir}/amanda/libamxfer*.so
+%attr(755,root,root) %{_libdir}/amanda/librestore*.so
+
+%{_libdir}/amanda/amanda-sh-lib.sh
+%attr(755,root,root) %{_libdir}/amanda/amcat.awk
+%attr(755,root,root) %{_libdir}/amanda/amcleanupdisk
+%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) %{_libdir}/amanda/amplot.awk
+%attr(755,root,root) %{_libdir}/amanda/amplot.g
+%attr(755,root,root) %{_libdir}/amanda/amplot.gp
+%attr(755,root,root) %{_libdir}/amanda/amtrmidx
+%attr(755,root,root) %{_libdir}/amanda/amtrmlog
+%attr(755,root,root) %{_libdir}/amanda/chg-chio
+%attr(755,root,root) %{_libdir}/amanda/chg-chs
+%attr(755,root,root) %{_libdir}/amanda/chg-disk
+%attr(755,root,root) %{_libdir}/amanda/chg-glue
+%attr(755,root,root) %{_libdir}/amanda/chg-iomega
+%attr(755,root,root) %{_libdir}/amanda/chg-juke
+%attr(755,root,root) %{_libdir}/amanda/chg-lib.sh
+%attr(755,root,root) %{_libdir}/amanda/chg-manual
+%attr(755,root,root) %{_libdir}/amanda/chg-mcutil
+%attr(755,root,root) %{_libdir}/amanda/chg-mtx
+%attr(755,root,root) %{_libdir}/amanda/chg-multi
+%attr(755,root,root) %{_libdir}/amanda/chg-null
+%attr(755,root,root) %{_libdir}/amanda/chg-rait
+%attr(755,root,root) %{_libdir}/amanda/chg-rth
+%attr(755,root,root) %{_libdir}/amanda/chg-scsi
+%attr(755,root,root) %{_libdir}/amanda/chg-zd-mtx
+%attr(755,root,root) %{_libdir}/amanda/chunker
+%attr(755,root,root) %{_libdir}/amanda/driver
+%attr(4750,root,amanda) %{_libdir}/amanda/dumper
+%attr(4750,root,amanda) %{_libdir}/amanda/planner
+%attr(755,root,root) %{_libdir}/amanda/taper
+
+%attr(755,root,root) %{_sbindir}/activate-devpay
+%attr(755,root,root) %{_sbindir}/amaddclient
%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(755,root,root) %{_sbindir}/amaespipe
+%attr(4750,root,amanda) %{_sbindir}/amcheck
%attr(755,root,root) %{_sbindir}/amcheckdb
+%attr(755,root,root) %{_sbindir}/amcheckdump
%attr(755,root,root) %{_sbindir}/amcleanup
+%attr(755,root,root) %{_sbindir}/amcrypt*
+%attr(755,root,root) %{_sbindir}/amdevcheck
%attr(755,root,root) %{_sbindir}/amdump
+%attr(755,root,root) %{_sbindir}/amfetchdump
+%attr(755,root,root) %{_sbindir}/amflush
+%attr(755,root,root) %{_sbindir}/amgetconf
+%attr(755,root,root) %{_sbindir}/amgpgcrypt
+%attr(755,root,root) %{_sbindir}/amlabel
%attr(755,root,root) %{_sbindir}/amoverview
-%attr(755,root,root) %{_sbindir}/amrmtape
-%attr(755,root,root) %{_sbindir}/amtoc
-%attr(755,root,root) %{_sbindir}/amverify
-#%attr(755,root,root) %{_sbindir}/amplot
+%attr(755,root,root) %{_sbindir}/amplot
%attr(755,root,root) %{_sbindir}/amreport
+%attr(755,root,root) %{_sbindir}/amrestore
+%attr(755,root,root) %{_sbindir}/amrmtape
+%attr(755,root,root) %{_sbindir}/amserverconfig
+%attr(755,root,root) %{_sbindir}/amservice
%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}/amvault
+%{_mandir}/man5/amanda.conf.5*
+%{_mandir}/man5/disklist.5*
+%{_mandir}/man5/tapelist.5*
+%{_mandir}/man7/amanda-changers.7*
+%{_mandir}/man7/amanda-devices.7*
+%{_mandir}/man8/amaddclient.8*
%{_mandir}/man8/amadmin.8*
-%{_mandir}/man8/amrmtape.8*
-%{_mandir}/man8/amtape.8*
-%{_mandir}/man8/amtoc.8*
+%{_mandir}/man8/amaespipe.8*
%{_mandir}/man8/amanda.8*
%{_mandir}/man8/amcheck.8*
+%{_mandir}/man8/amcheckdb.8*
+%{_mandir}/man8/amcheckdump.8*
%{_mandir}/man8/amcleanup.8*
+%{_mandir}/man8/amcrypt*.8*
+%{_mandir}/man8/amdevcheck.8*
%{_mandir}/man8/amdump.8*
+%{_mandir}/man8/amfetchdump.8*
%{_mandir}/man8/amflush.8*
+%{_mandir}/man8/amgetconf.8*
+%{_mandir}/man8/amgpgcrypt.8*
%{_mandir}/man8/amlabel.8*
+%{_mandir}/man8/amoverview.8*
%{_mandir}/man8/amplot.8*
%{_mandir}/man8/amreport.8*
+%{_mandir}/man8/amrestore.8*
+%{_mandir}/man8/amrmtape.8*
+%{_mandir}/man8/amserverconfig.8*
+%{_mandir}/man8/amservice.8*
%{_mandir}/man8/amstatus.8*
-
+%{_mandir}/man8/amtape.8*
+%{_mandir}/man8/amtapetype.8*
+%{_mandir}/man8/amtoc.8*
+%{_mandir}/man8/amvault.8*
+
+%{perl_vendorarch}/Amanda/Changer.pm
+%dir %{perl_vendorarch}/Amanda/Changer
+%{perl_vendorarch}/Amanda/Changer/*.pm
+%{perl_vendorarch}/Amanda/Cmdline.pm
+%dir %{perl_vendorarch}/Amanda/DB
+%{perl_vendorarch}/Amanda/DB/*.pm
+%{perl_vendorarch}/Amanda/Device.pm
+%{perl_vendorarch}/Amanda/Logfile.pm
+%{perl_vendorarch}/Amanda/Process.pm
+%{perl_vendorarch}/Amanda/Tapelist.pm
+%{perl_vendorarch}/Amanda/Xfer.pm
+%dir %{perl_vendorarch}/auto/Amanda/Cmdline
+%dir %{perl_vendorarch}/auto/Amanda/Device
+%dir %{perl_vendorarch}/auto/Amanda/Logfile
+%dir %{perl_vendorarch}/auto/Amanda/Tapelist
+%dir %{perl_vendorarch}/auto/Amanda/Xfer
+%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/Tapelist/*.so
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Xfer/*.so
+%endif
+
+%if %{with client}
%files client
%defattr(644,root,root,755)
-%config(noreplace) /etc/sysconfig/rc-inetd/amanda
-
-%attr(755,root,root) %{_libdir}/libamclient*.so.*.*
-%attr(755,root,root) %{_libexecdir}/versionsuffix
-%attr(755,root,root) %{_libexecdir}/amandad
-%attr(755,root,root) %{_libexecdir}/calcsize
-%attr(755,root,root) %{_libexecdir}/rundump
-%attr(755,root,root) %{_libexecdir}/runtar
-%attr(755,root,root) %{_libexecdir}/selfcheck
-%attr(755,root,root) %{_libexecdir}/sendbackup
-%attr(755,root,root) %{_libexecdir}/sendsize
-%attr(755,root,root) %{_libexecdir}/patch-system
-%attr(755,root,root) %{_libexecdir}/killpgrp
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
+%config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/amanda-client.conf
+# 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(755,root,root) %{_libdir}/amanda/application/amlog-script
+%attr(755,root,root) %{_libdir}/amanda/application/amsamba
+%attr(755,root,root) %{_libdir}/amanda/application/amstar
+%attr(755,root,root) %{_libdir}/amanda/application/amzfs*
+%attr(755,root,root) %{_libdir}/amanda/application/script-email
+
+%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) %{_libdir}/amanda/patch-system
+%attr(755,root,root) %{_libdir}/amanda/sendbackup
+%attr(755,root,root) %{_libdir}/amanda/sendsize
+%attr(755,root,root) %{_libdir}/amanda/teecount
+%attr(755,root,root) %{_libdir}/amanda/versionsuffix
+%attr(4750,root,amanda) %{_libdir}/amanda/calcsize
+%attr(4750,root,amanda) %{_libdir}/amanda/killpgrp
+%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}/amoldrecover
%attr(755,root,root) %{_sbindir}/amrecover
-%attr(755,root,root) %{_sbindir}/amrestore
+%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/amrecover.8*
-%{_mandir}/man8/amrestore.8*
+%{_mandir}/man8/amgtar.8*
+%{_mandir}/man8/amsamba.**
+%{_mandir}/man8/amstar.8*
+%{_mandir}/man8/amzfs*.8*
+
+%{perl_vendorarch}/Amanda/Application.pm
+%dir %{perl_vendorarch}/Amanda/Application
+%{perl_vendorarch}/Amanda/Application/Zfs.pm
+%dir %{perl_vendorarch}/auto/Amanda/Application
+%attr(755,root,root) %{perl_vendorarch}/auto/Amanda/Application/*.so
+%endif