]> git.pld-linux.org Git - packages/amanda.git/blobdiff - amanda.spec
- 2.6.0p1
[packages/amanda.git] / amanda.spec
index 9d361aa2bd23baa60db26e8cb51f34465d79a792..73fbf62ad0a300103ddf9052ee72f212a1ecdbd3 100644 (file)
@@ -5,15 +5,16 @@
 %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
+Version:       2.6.0p1
 Release:       0.1
 License:       BSD
 Group:         Networking/Utilities
 Source0:       http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
-# Source0-md5: c347c1e573c33018f234750ac6435156
+# Source0-md5: afadad80e0a27963a24b510755470983
 Source1:       %{name}-srv.crontab
 Source2:       %{name}.inetd
 Source3:       %{name}idx.inetd
@@ -25,6 +26,8 @@ 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
 URL:           http://www.amanda.org/
 BuildRequires: autoconf >= 2.53
 BuildRequires: automake
@@ -51,6 +54,8 @@ 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
@@ -98,6 +103,8 @@ Biblioteki współdzielone pakietu amanda.
 Summary:       The client side of Amanda
 Summary(pl.UTF-8):     Klient Amandy
 Group:         Networking/Utilities
+Requires(post):        /bin/hostname
+Requires(post):        /usr/bin/ssh-keygen
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      rc-inetd
 Suggests:      openssh-clients
@@ -122,7 +129,10 @@ najmniej jednego z pakietów dump i GNU tar.
 Summary:       The server side of Amanda
 Summary(pl.UTF-8):     Serwer Amandy
 Group:         Networking/Utilities
+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
@@ -132,6 +142,7 @@ 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,
@@ -157,19 +168,6 @@ Perl bindings for amanda.
 %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
@@ -179,6 +177,8 @@ Wiązania perla dla serwera Amandy.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 %build
 %{__libtoolize}
@@ -216,11 +216,12 @@ Wiązania perla dla serwera Amandy.
        --with-buffered-dump \
        --with-amandahosts \
        --with-configdir=%{_sysconfdir}/amanda \
-       --with-gnutar-listdir=%{_sharedstatedir}/gnutar-lists \
+       --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}
@@ -249,6 +250,13 @@ touch $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/.ssh/id_rsa_amrecover{,.pub}
 
 > $RPM_BUILD_ROOT%{_sharedstatedir}/amanda/amandates
 
+# 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
@@ -277,8 +285,9 @@ fi
 
 %post client
 %service -q rc-inetd reload
-if [ -x /usr/bin/ssh-keygen -a ! -e /var/lib/amanda/.ssh/id_rsa_amrecover ] ; then
-       HOST="`hostname`"
+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
@@ -287,6 +296,13 @@ if [ -x /usr/bin/ssh-keygen -a ! -e /var/lib/amanda/.ssh/id_rsa_amrecover ] ; th
        /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
@@ -296,8 +312,8 @@ fi
 
 %post server
 %service -q rc-inetd reload
-if [ -x /usr/bin/ssh-keygen -a ! -e /var/lib/amanda/.ssh/id_rsa_amdump ] ; then
-       HOST="`hostname`"
+if [ ! -e /var/lib/amanda/.ssh/id_rsa_amdump ] ; then
+       HOST="`/bin/hostname`"
        if [ -z "$HOST" ] ; then
                COMMENT="amanda@server"
        else
@@ -322,13 +338,17 @@ fi
 %attr(755,root,root) %{_libdir}/amanda/libamanda*.so
 %attr(750,amanda,amanda) %dir %{_sysconfdir}/amanda
 %dir %{_libdir}/amanda
+%if %{_lib} != "lib"
+%{_ulibdir}/amanda
+%endif
 %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
-%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/authorized_keys
+# Commented out so it won't get removed on uninstall
+#%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/authorized_keys
 
 %if %{with server}
 %files server
@@ -338,8 +358,9 @@ fi
 
 %config(noreplace) %verify(not md5 mtime size) %attr(640,amanda,amanda) %{_sysconfdir}/amanda/amanda.conf
 
-%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/client_authorized_keys
-%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/id_rsa_amdump*
+# 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/example
 %attr(750,amanda,amanda) %dir %{_sharedstatedir}/amanda/example/label-templates
@@ -351,10 +372,6 @@ fi
 
 %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
@@ -453,6 +470,20 @@ fi
 %{_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}
@@ -460,8 +491,14 @@ fi
 %defattr(644,root,root,755)
 %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
-%attr(600,amanda,amanda) %ghost %{_sharedstatedir}/amanda/.ssh/id_rsa_amrecover*
+# 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
@@ -499,19 +536,3 @@ fi
 %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
This page took 0.038775 seconds and 4 git commands to generate.