SPECS: amanda.spec - cleaned post - added /usr/lib for commands emebedded i...

baggins baggins at pld-linux.org
Mon May 12 14:20:16 CEST 2008


Author: baggins                      Date: Mon May 12 12:20:16 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- cleaned post
- added /usr/lib for commands emebedded in ssh keys

---- Files affected:
SPECS:
   amanda.spec (1.164 -> 1.165) 

---- Diffs:

================================================================
Index: SPECS/amanda.spec
diff -u SPECS/amanda.spec:1.164 SPECS/amanda.spec:1.165
--- SPECS/amanda.spec:1.164	Mon May 12 13:44:59 2008
+++ SPECS/amanda.spec	Mon May 12 14:20:10 2008
@@ -52,6 +52,8 @@
 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
@@ -99,6 +101,8 @@
 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
@@ -123,6 +127,8 @@
 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:	/etc/cron.d
 Requires:	crondaemon
@@ -250,6 +256,13 @@
 
 > $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
@@ -278,8 +291,8 @@
 
 %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`"
 	if [ -z "$HOST" ] ; then
 		COMMENT="root at client"
 	else
@@ -297,8 +310,8 @@
 
 %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 at server"
 	else
@@ -323,6 +336,9 @@
 %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
@@ -523,6 +539,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.165  2008-05-12 12:20:10  baggins
+- cleaned post
+- added /usr/lib for commands emebedded in ssh keys
+
 Revision 1.164  2008-05-12 11:44:59  baggins
 - too much copy-paste
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/amanda.spec?r1=1.164&r2=1.165&f=u



More information about the pld-cvs-commit mailing list