/[gentoo-x86]/eclass/cvs.eclass
Gentoo

Diff of /eclass/cvs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.53 Revision 1.54
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.53 2004/10/19 19:51:12 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.54 2004/12/13 06:35:06 fafhrd Exp $
4 4
5# Current Maintainer: Tal Peer <coredumb@gentoo.org> 5# Current Maintainer: Tal Peer <coredumb@gentoo.org>
6# Original Author: Dan Armak <danarmak@gentoo.org> 6# Original Author: Dan Armak <danarmak@gentoo.org>
7 7
8# SSH auth code by Danny <danny.milo@gmx.net> 8# SSH auth code by Danny <danny.milo@gmx.net>
343 eval $cmdupdate || die "cvs update command failed" 343 eval $cmdupdate || die "cvs update command failed"
344 elif [ "${mode}" == "checkout" ]; then 344 elif [ "${mode}" == "checkout" ]; then
345 einfo "Running $cmdcheckout" 345 einfo "Running $cmdcheckout"
346 eval $cmdcheckout|| die "cvs checkout command failed" 346 eval $cmdcheckout|| die "cvs checkout command failed"
347 fi 347 fi
348 elif [ "${ECVS_AUTH}" == "ext" ]; then 348 elif [ "${ECVS_AUTH}" == "ext" ] || [ "${ECVS_AUTH}" == "no" ]; then
349 349
350 # Hack to support SSH password authentication 350 # Hack to support SSH password authentication
351 351
352 # Backup environment variable values 352 # Backup environment variable values
353 local CVS_ECLASS_ORIG_CVS_RSH="${CVS_RSH}" 353 local CVS_ECLASS_ORIG_CVS_RSH="${CVS_RSH}"
385except: 385except:
386 pass 386 pass
387newarglist = sys.argv[:] 387newarglist = sys.argv[:]
388EOF 388EOF
389 389
390 # disable X11 forwarding which causes .xauth access violations
391 # - 20041205 Armando Di Cianno <fafhrd@gentoo.org>
392 echo "newarglist.insert(1, '-oClearAllForwardings=yes')" \
393 >> "${CVS_RSH}"
394 echo "newarglist.insert(1, '-oForwardX11=no')" \
395 >> "${CVS_RSH}"
396
390 # Handle SSH host key checking 397 # Handle SSH host key checking
391 398
392 local CVS_ECLASS_KNOWN_HOSTS="${T}/cvs_ssh_known_hosts" 399 local CVS_ECLASS_KNOWN_HOSTS="${T}/cvs_ssh_known_hosts"
393 echo "newarglist.insert(1, '-oUserKnownHostsFile=${CVS_ECLASS_KNOWN_HOSTS}')" \ 400 echo "newarglist.insert(1, '-oUserKnownHostsFile=${CVS_ECLASS_KNOWN_HOSTS}')" \
394 >> "${CVS_RSH}" 401 >> "${CVS_RSH}"
396 if [ -z "${ECVS_SSH_HOST_KEY}" ]; then 403 if [ -z "${ECVS_SSH_HOST_KEY}" ]; then
397 ewarn "Warning: The SSH host key of the remote server will not be verified." 404 ewarn "Warning: The SSH host key of the remote server will not be verified."
398 einfo "A temporary known hosts list will be used." 405 einfo "A temporary known hosts list will be used."
399 local CVS_ECLASS_STRICT_HOST_CHECKING="no" 406 local CVS_ECLASS_STRICT_HOST_CHECKING="no"
400 touch "${CVS_ECLASS_KNOWN_HOSTS}" 407 touch "${CVS_ECLASS_KNOWN_HOSTS}"
401 echo "newarglist.insert(1, '-oStrictHostKeyChecking=no')" \
402 >> "${CVS_RSH}"
403 else 408 else
404 local CVS_ECLASS_STRICT_HOST_CHECKING="yes" 409 local CVS_ECLASS_STRICT_HOST_CHECKING="yes"
405 echo "${ECVS_SSH_HOST_KEY}" > "${CVS_ECLASS_KNOWN_HOSTS}" 410 echo "${ECVS_SSH_HOST_KEY}" > "${CVS_ECLASS_KNOWN_HOSTS}"
406 fi 411 fi
407 412
421 export DISPLAY 426 export DISPLAY
422 427
423 # Create a dummy executable to echo $ECVS_PASS 428 # Create a dummy executable to echo $ECVS_PASS
424 429
425 export SSH_ASKPASS="${T}/cvs_sshechopass" 430 export SSH_ASKPASS="${T}/cvs_sshechopass"
426 431 if [ "${ECVS_AUTH}" != "no" ]; then
427 echo -en "#!/bin/bash\necho \"$ECVS_PASS\"\n" \ 432 echo -en "#!/bin/bash\necho \"$ECVS_PASS\"\n" \
428 > "${SSH_ASKPASS}" 433 > "${SSH_ASKPASS}"
434 else
435 echo -en "#!/bin/bash\nreturn\n" \
436 > "${SSH_ASKPASS}"
429 437
438 fi
430 chmod a+x "${SSH_ASKPASS}" 439 chmod a+x "${SSH_ASKPASS}"
431 fi 440 fi
432 441
433 if [ "${mode}" == "update" ]; then 442 if [ "${mode}" == "update" ]; then
434 einfo "Running $cmdupdate" 443 einfo "Running $cmdupdate"
448 457
449 if [ "${CVS_ECLASS_ORIG_DISPLAY+set}" == "set" ]; then 458 if [ "${CVS_ECLASS_ORIG_DISPLAY+set}" == "set" ]; then
450 export DISPLAY="${CVS_ECLASS_ORIG_DISPLAY}" 459 export DISPLAY="${CVS_ECLASS_ORIG_DISPLAY}"
451 else 460 else
452 unset DISPLAY 461 unset DISPLAY
453 fi
454 elif [ "${ECVS_AUTH}" == "no" ]; then
455 if [ "${mode}" == "update" ]; then
456 einfo "Running $cmdupdate"
457 eval $cmdupdate || die "cvs update command failed"
458 elif [ "${mode}" == "checkout" ]; then
459 einfo "Running $cmdcheckout"
460 eval $cmdcheckout|| die "cvs checkout command failed"
461 fi 462 fi
462 fi 463 fi
463 464
464 # Restore ownership. Not sure why this is needed, but someone 465 # Restore ownership. Not sure why this is needed, but someone
465 # added it in the orig ECVS_RUNAS stuff. 466 # added it in the orig ECVS_RUNAS stuff.

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.20