Main /
SubversionResources
Installing Subversion
Checking out Ptolemy IISVN vs CVSBelow is a comparison between SVN and CVS. The first two colums were taken from the The Subversion Features List
SVN benefits to Kepler
Building SVN under SolarisSee http://subversion.apache.org/source-code.html We use FSFS for the backend, not Berkeley DB. See http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/2008-June/013097.html Below are the steps to build subversion-1.7.2: I was having various problems installing subversion-1.7.2 under Solaris so I tried autogen.sh wget http://apache.osuosl.org/subversion/subversion-1.7.2.tar.gz gtar -zxf subversion-1.7.2.tar.gz cd subversion-1.7.2 export LD_LIBRARY_PATH=/usr/local/lib bash get-deps.sh bash autogen.sh ./configure --prefix=/usr/local/subversion-1.7.2 --with-ssl --with-libs=/usr/local/ssh/lib --enable-shared="yes" --enable-static="no" --disable-nls gmake >& make.out & export PATH=/usr/bin:${PATH} gmake install >& install.out & Problem: SSL negotiation failed: SSL disabled due to library version mismatchsource.EECS.Berkeley.EDU 9# svn co https://bambi.millennium.berkeley.edu/projects/chess/ptII/trunk ptII svn: E175002: Unable to connect to a repository at URL 'https://bambi.millennium.berkeley.edu/projects/chess/ptII/trunk' svn: E175002: OPTIONS of 'https://bambi.millennium.berkeley.edu/projects/chess/ptII/trunk': SSL negotiation failed: SSL disabled due to library version mismatch (https://bambi.millennium.berkeley.edu) http://www.svnforum.org/threads/35175-SSL-negotiation-failed-Secure-connection-truncated suggests: "So Mozilla, RapidSVN, and TortoiseSVN were all breaking because of the SSLCipherSuite setting (both the original Apache-supplied value, and another value recommended by QualysGuard)." When I upgraded from httpd-2.2.20 to 2.2.22, I noticed that httpd-ssl.conf changed: < SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL --- > SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 However, it looks like the problem is that /usr/local/lib had links to older versions of the openssl libraries. Below are the steps to build Subversion-1.6.17: wget http://subversion.tigris.org/downloads/subversion-deps-1.6.17.tar.gz wget http://subversion.tigris.org/downloads/subversion-1.6.17.tar.gz gtar -zxf subversion-1.6.17.tar.gz gtar -zxf subversion-deps-1.6.17.tar.gz cd subversion-1.6.17 export LDFLAGS="-L/usr/local/lib -R/usr/local/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/lib -R/usr/lib" export LIBS="$LIBS -lintl" export LD_FLAGS=-L/usr/local/lib ./configure --prefix=/usr/local/subversion-1.6.17 --with-ssl --with-libs=/usr/local/ssh/lib --enable-shared="yes" --enable-static="no" --disable-nls cd serf ./configure --with-ssl --with-libs=/usr/local/ssh/lib cd .. gmake export PATH=/usr/bin:${PATH} gmake install See http://bill.sirinek.com/?p=83 "1. Multiple inclusion of file errors while building neon libraries
/build/directory/.libs/libsvn_subr-1.so: attempted multiple inclusion of file Undefined first referenced symbol in file libintl_dgettext main.o (symbol belongs to implicit dependency /usr/local/lib/libintl.so.8) ld: fatal: Symbol referencing errors. No output written to .libs/svnadmin collect2: ld returned 1 exit status I fixed this by doing a two things:
- Make sure the $LIBS variable has “-lintl” included.
- Don’t build static libraries. I’m not sure why you would want to do this anyway. When running the top-level configure, include the options --enable-shared="yes" and --enable-static="no"
Note that during the install step, I got: /bin/bash /export/home1/root/tools/subversion-1.6.12/apr/libtool --mode=install build/install.sh -c -m 755 libaprutil-1.la /usr/local/subversion-1.6.12/lib libtool: install: error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apr/lib gmake[1]: *** [install] Error 1 gmake[1]: Leaving directory `/export/home1/root/tools/subversion-1.6.12/apr-util' gmake: *** [external-install] Error 1 However, I already have We need I tried bash-3.00# /etc/init.d/apachectl configtest httpd: Syntax error on line 430 of /usr/local/apache-2.2.16/conf/httpd.conf: Cannot load /usr/local/apache-2.2.16/modules/mod_dav_svn.so into server: ld.so.1: httpd: fatal: relocation error: file /usr/local/subversion-1.6.12/lib/libsvn_repos-1.so.0: symbol libintl_dgettext: referenced symbol not found but that did not work The link was failing in subversion-1.6.12: Undefined first referenced symbol in file BIO_set_flags ./.libs/libserf-0.a(ssl_buckets.o) BIO_clear_flags ./.libs/libserf-0.a(ssl_buckets.o) SSL_CTX_set_client_cert_cb ./.libs/libserf-0.a(ssl_buckets.o) BIO_test_flags ./.libs/libserf-0.a(ssl_buckets.o) One fix is to edit LIBS = -L/usr/local/lib -lssl -lcrypto -liconv -lintl -lsocket -lz Another fix is to run Another fix is to add /export/home1/root/tools/subversion-1.6.12/apr/libtool --silent --mode=link \ gcc -static -o test/serf_get libserf-0.la test/serf_get.lo \ /export/home1/root/tools/subversion-1.6.12/apr-util/libaprutil-1.la \ -lexpat /export/home1/root/tools/subversion-1.6.12/apr/libapr-1.la -luuid \ -lsendfile -lrt -lsocket -lnsl -lpthread -lm -lz -L/usr/local/lib -lssl -lcrypto The real fix is to use Updating OpenSSL from 0.9.8.g to 0.9.8.o: ./config \ --prefix=/usr/local/openssl-0.9.8o \ --openssldir=/usr/local/openssl-0.9.8o \ -fPIC shared The link was failing in subversion-1.4.5: Undefined first referenced symbol in file libintl_bind_textdomain_codeset /export/home1/root/tools/subversion-1.4.5/subversion/libsvn_subr/.libs/libsvn_subr-1.so libintl_bindtextdomain /export/home1/root/tools/subversion-1.4.5/subversion/libsvn_subr/.libs/libsvn_subr-1.so libintl_dgettext blame-cmd.o ld: fatal: Symbol referencing errors. No output written to .libs/svn collect2: ld returned 1 exit status The fix was to edit -L/usr/local/lib -liconv -lintl and set LIBS = -L/usr/local/lib -liconv -lintl -lsocket -lz Complaints against Subversion
-bash-3.1$ du -sk ptII 332880 ptII -bash-3.1$ du -sk trunk 725648 trunk -bash-3.1$
A user wrote: "I found both Subversive and Subclipse painful; I had to perform significant repairs externally using TortoiseSVN. I even managed to get Subversive to delete a 10MB directory tree by mistake!" "Both Subversive and Subclipse are very dangerous for CVS users. In CVS, folders do not have significant state so you can do what you like when you like. In SVN you MUST commit folder state immediately after committing file state. For instance if you add something to svn:ignore, you must commit the folder, otherwise you risk having an outgoing conflict between svn:ignore outgoing and child folder state incoming. Do not attempt to fix such a conflict with either of Subclipse or Subversive; you just dig a deeper hole. Use TortoiseSVN to get back to all green arrows." "Unfortunately neither subclipse nor subversion have GUI state for folder state comparison so you get no clue as to why folders are in a mess. The GUI is generally inadequate in distinguishing between folder as content and folder as container of children."
preserved. When I do a cvs checkout, the modtimes of the files are preserved. This makes it much easier to see what has recently changed. Here's the svn tree: bash-3.00$ ls -ltr ~/ptII/ptolemy/kernel/util/*Exception.java -rw-r--r-- 1 cxh labstaff 18596 Jun 12 13:10 /home/eecs/cxh/ptII/ptolemy/kernel/util/KernelException.java -rw-r--r-- 1 cxh labstaff 9137 Jun 12 13:10 /home/eecs/cxh/ptII/ptolemy/kernel/util/KernelRuntimeException.java -rw-r--r-- 1 cxh labstaff 5858 Jun 12 13:10 /home/eecs/cxh/ptII/ptolemy/kernel/util/InvalidStateException.java -rw-r--r-- 1 cxh labstaff 3646 Jun 12 13:10 /home/eecs/cxh/ptII/ptolemy/kernel/util/InternalErrorException.java -rw-r--r-- 1 cxh labstaff 5121 Jun 12 13:10 /home/eecs/cxh/ptII/ptolemy/kernel/util/IllegalActionException.java -rw-r--r-- 1 cxh labstaff 4937 Jun 12 13:10 /home/eecs/cxh/ptII/ptolemy/kernel/util/NameDuplicationException.java -rw-r--r-- 1 cxh labstaff 2660 Jun 12 13:10 /home/eecs/cxh/ptII/ptolemy/kernel/util/NoSuchItemException.java Here's the cvs tree: bash-3.00$ ls -ltr ~/src/ptII.cvs/ptolemy/kernel/util/*Exception.java -rw-r--r-- 1 cxh labstaff 5125 Jul 8 2005 /home/eecs/cxh/src/ptII.cvs/ptolemy/kernel/util/IllegalActionException.java -rw-r--r-- 1 cxh labstaff 3650 Jul 8 2005 /home/eecs/cxh/src/ptII.cvs/ptolemy/kernel/util/InternalErrorException.java -rw-r--r-- 1 cxh labstaff 4941 Jul 8 2005 /home/eecs/cxh/src/ptII.cvs/ptolemy/kernel/util/NameDuplicationException.java -rw-r--r-- 1 cxh labstaff 2664 Jul 8 2005 /home/eecs/cxh/src/ptII.cvs/ptolemy/kernel/util/NoSuchItemException.java -rw-r--r-- 1 cxh labstaff 18600 Dec 6 2007 /home/eecs/cxh/src/ptII.cvs/ptolemy/kernel/util/KernelException.java -rw-r--r-- 1 cxh labstaff 9141 Dec 6 2007 /home/eecs/cxh/src/ptII.cvs/ptolemy/kernel/util/KernelRuntimeException.java -rw-r--r-- 1 cxh labstaff 5862 Jun 6 08:13 /home/eecs/cxh/src/ptII.cvs/ptolemy/kernel/util/InvalidStateException.java bash-3.00$ Being able to quickly see which Java file was last updated in the cvs tree is a serious win. Also, the ptII tree includes derived files that are generated by Autoconf, JavaCC and Antlr. If the commit times are not preserved, then the source file might have a mod time later than the derived file which means that either the tool must be run or else the build system must Why doesn't svn preserve mod times?
Still, I miss cvs2cl, which had nice features like clumping non-atomic cvs commits into one block of commits.
It is a drawback in The developer of svn2cl said: I'm afraid that XSLT processing can be quite slow. Some improvements have been made in svn2cl in the past to improve performance but using XSLT there is not much more room for improvement that I can think off while keeping the thing maintainable (not that XSLT templates are maintainable to begin with ;-( ).
You could however try the --group-by-day option or generate the ChangeLog in batches and combine those as a post-processing step. Some projects have a yearly ChangeLog file. Another option is to keep the previous ChangeLog file around and only generate new entries (svn2cl can't do this automatically yet though).
Conversion from CVS
CVS to SVN conversion procedure
Script to fix up cvs#!/bin/sh # $Id$ # Fix up common problems in a CVS repository # 1. Binary files are not properly -kb # Generate a list of files find . -type f | grep -v /CVS/ | sort > /tmp/fixcvs.files # Generate a list of all the files that are listed in # ~/.subversion/config that are not text files. # That is, all the files that are not native line endings egrep -v "(`egrep -v "^#" $HOME/.subversion/config | grep 'svn:eol-style=native' | sed 's@^\([^= ]*\).*$@\1@' | sed 's@\*.@\\\\.@' | awk '{if (NR\ > 1) { printf("|")};printf("%s", $1)}'`)$" /tmp/fixcvs.files | sort > /tmp/fixcvs.nonative # Generate a list of all files that are mime-types egrep "(`egrep -v "^#" $HOME/.subversion/config | grep 'svn:mime-type' | sed 's@^\([^= ]*\).*$@\1@' | sed 's@\*.@\\\\.@' | awk '{if (NR > 1) { pr\ intf("|")};printf("%s", $1)}'`)$" /tmp/fixcvs.files | sort > /tmp/fixcvs.mime echo "The extensions of the files below are not listed in ~/.subversion/config:" comm -23 /tmp/fixcvs.nonative /tmp/fixcvs.mime echo "Checking for binary files that are not -kb" finalResult=0 binaries=`cat /tmp/fixcvs.nonative` for binary in $binaries do echo -n "." #echo -n $binary cvs status $binary | egrep -e "-kb$" > /dev/null status=$? if [ $status -ne 0 ]; then echo "$binary is not -kb?" finalResult=1 fi done exit $finalResult Moving the ptpapers repoI wanted to move the ptpapers repo from CVS to SVN. After doing so, I did a diff and realized that the pdf files in the cvs repo were not checked in with -kb. So, I ran diff -I '\$Id:' -r ptpapers cvs/tmp/ptpapers/trunk/ptpapers >& /tmp/ptpapers.diff egrep "diff -I" /tmp/ptpapers.diff | awk '{print $5}' | egrep -v '(Makefile|sty|xml|bst|tex|cls|bib|txt|figtex2eps|\.m)$' > /tmp/f1 cvs admin -kb `cat /tmp/f1` mkdir /home/cxh/src/cvs2 cd /home/cxh/src/cvs2 ssh source "cd /home; gtar zcf - --exclude=commitlogs cvs_chess/CVSROOT cvs_chess/ptpapers" > ptpapers.cvs.tar.gz tar -zxf ptpapers.cvs.tar.gz mkdir repos cd cvs2svn-2.4.0 ./cvs2svn --default-eol=native --fallback-encoding=utf8 -s /home/cxh/src/cvs2/repos/ptpapers /home/cxh/src/cvs2/cvs_chess/ Problems
./cvs2svn --pass CleanMetadataPass --dry-run -s /tmp/cxh/repos/ptII /tmp/cxh/cvs/ptI
cd ptolemy/vergil svn delete graph svn commit -m "Removed vergil/graph from svn, cvs2svn failed" graph
added Under Eclipse, a Cygwin ssh window flashesWith the default subeclipse installation I get a Cygwin ssh window flashing. describes a fix which is to tell Subclipse to use SVNKit
C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe The backslashes are important However, with this method, I have to type in my passwd everytime or otherwise setup Tortoisesvn to do the right thing Using Subversion with a different ssh user nameThe svn Host source.eecs.berkeley.edu User yourlog where An alternative is to use your remote login in the URL, for example: svn co svn+ssh://yourlog@source.eecs.berkeley.edu/chess/ptII/trunk ptII To illustrate that --username does not work with, ssh I was able to set up svn to use a debugging ssh server as follows:
(:source) svn co --username yourlog svn+ssh://source.eecs.berkeley.edu/chess/ptII/trunk ptII (:sourceend:) Sadly, the Keyboard-interactive (PAM) userauth failed[13] while authenticating: No account present for user Failed keyboard-interactive for <invalid username> from 128.32.48.120 port 55524 ssh2 If I restart sshd on the server with ssh -p 29934 -l yourlog source svnserve -h then the output on the svn server will say: Accepted keyboard-interactive for yourlog from 128.32.48.120 port 55526 ssh2 Subclipse vs SubversionTwo Eclipse plugins: Subclipse and Subversion Subclipse
Chess svn setup design issues
Chess svn set up todo list
Setting up anonymous access under Solaris
#!/sbin/sh # # SVNSERVE - manage the SVN server. # From http://java.sun.com/developer/technicalArticles/javame/add_ons/ # See http://chess.eecs.berkeley.edu/ptolemy/wiki/Ptolemy/Subversion # case "$1" in 'start') if [ -x /usr/local/bin/svnserve ]; then /usr/local/bin/svnserve -d -r /export/home/svn fi ;; 'stop') if /usr/bin/pgrep svnserve >/dev/null 2>&1; then pkill svnserve fi ;; 'restart') /etc/init.d/svnserve stop /etc/init.d/svnserve start ;; esac exit 0
cd /etc/rc2.d ln ../init.d/svnserve S98svnserve
# svn (subversion) pass in quick on bge0 proto tcp from any to 128.32.48.234 port = 3690 flags S keep state group 100 pass in quick on bge0 proto udp from any to 128.32.48.234 port = 3690 flags S keep state group 100
svn co svn://source.eecs.berkeley.edu/ptII/trunk Setting up SVN EmailSee How do I get email about each ptII SVN check in? This is not well documented, so here goes. The
Setting up email for people with non-EECS addresses.By default, source.eecs assumes everyone has an EECS.Berkeley.EDU address. If this is not the case, then as root on source:
mconnect expn username quit Email problemWarning: 'post-commit' hook failed with error output: /export/home/svn/chess/ptIIprivi/hooks/commit-email.pl: use of either `-h' or `--from' is mandatory when sending email using direct SMTP. subversion: not sending emails any more suggests editing #$sendmail = "/usr/sbin/sendmail"; $smtp_server = "127.0.0.1"; to $sendmail = "/usr/sbin/sendmail"; #$smtp_server = "127.0.0.1"; Setting up web accessInstalling Apache
svn: Certificate is not issued by a trusted authorityThe problem is that running svn sometimes not recognize authority. TortoiseSVN does not have this problem.
(Update: Windows 7 users have problems with: Versions of The error is: bash-3.2$ svn co https://source.eecs.berkeley.edu/svn/chess/ptII/trunk ptII Error validating server certificate for 'https://source.eecs.berkeley.edu:443': - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information: - Hostname: source.eecs.berkeley.edu - Valid: from Tue, 15 Jul 2008 08:00:00 GMT until Fri, 16 Jul 2010 07:59:59 GMT - Issuer: Terms of use at https://www.verisign.com/rpa (c)05, VeriSign Trust Network, VeriSign, Inc., US - Fingerprint: da:ff:45:c9:df:6f:b5:73:ec:9c:f8:a7:cc:93:08:84:22:a8:78:3d (R)eject, accept (t)emporarily or accept (p)ermanently? We could just blindly permanently accept the certificate, but this is really wrong since it is bad security hygiene. Finding the cause of the problem and possible solutions is of interest. Below are two workarounds, see also Ptolemy Bugzilla:139 Convert the Ptolemy II repository from CVS to SVN Going to https://source.eecs.berkeley.edu/svn/chess/ptII/trunk in a web browser such as Firefox and examining the certificate does not indicate an error. Editing ~/.subversion/serversKevin Miller's Blog Subversion and Certificate Authorities discusses editing
See also Making SVN trust a new root CA certificate To modify
However, the problem here is that we are downloading the CA file from the website we are trying to verify. Another workaround is to download the root CAs from Verisign. The file we are interested in is openssl x509 -inform DER -in PCA3ss_v4.509 -out PCA3ss_v4.pem -outform PEM To view the contents of the CA file: openssl x509 -text -in PCA3ss_v4.pem Then adjust ssl-authority-files=/Users/cxh/tmp/PCA3ss_v4.pem and do the checkout. At least here, we have the authority file downloaded from Verisign, so we can be fairly certain that svn repository has a legitimate certificate. Fixing OpenSSLIt turns out that the problem is that The OpenSSL software is shipped without any root CA certificate as the OpenSSL project does not have any policy on including or excluding any specific CA and does not intend to set up such a policy. Deciding about which CAs to support is up to application developers or administrators.
Other projects do have other policies so you can for example extract the CA bundle used by Mozilla and/or modssl as described in this article:
However, an updated version of that script can be found at http://www.opensource.apple.com/darwinsource/Current/apache_mod_ssl-690/mod_ssl/pkg.sslcfg/ca-bundle.pl To run this, download ca-bundle.pl and do perl ca-bundle.pl > ca-bundle.crt Running: openssl s_client -connect source.eecs.berkeley.edu:443 -CAfile ca-bundle.crt will return 0, which is correct. See also http://svn.haxx.se/dev/archive-2006-06/0547.shtml - a note about this problem in the svn devel log, which points out http://curl.haxx.se/docs/caextract.html which includes cacert.pem. Here's how to set up openssl on the Mac so that it does not prompt for accepting the certificate:
The certificate authority will be present and svn users should not be prompted to accept the certificate from source.eecs. Also, the openssl s_client -connect source.eecs.berkeley.edu:443 -CApath /System/Library/OpenSSL/certs/ should return Verify return code: 0 (ok) It would be nice if we could import all the Commercial CAs in one fell swoop. Firewall and Proxy ProblemsIf you get:
Or if the Apache Then the problem is likely with a corporate firewall. The first thing to try is to point your web browser at the SVN url. For example, try opening https://source.eecs.berkeley.edu/svn/chess/ptII/trunk, you should get a listing of the files at that location. If you do, then the problem is that the SVN client needs to have its proxy set, see the Subversion FAQ for details. Under TortoiseSVN, you could try setting the TortoiseSVN proxy to match the proxy of your web browser. If you have a proxy autoconfiguration URL, then try entering the URL into your browser and analyzing the code to determine the name of your proxy machine. Another thing to try is to edit the http-proxy-host = <proxyname> http-proxy-port = <proxyport> (Many Thanks to Thomas Mandl and Thomas Huining Feng for the above) Another possibility is discussed at http://groups.google.com/group/pyjamas-dev/browse_thread/thread/682bc1991c2326b6 also - are you behind a firewall, in a corporate environment of some kind? it's very common for corporate firewalls to block HTTPS or to require NTLMSSP authentication on HTTPS.
if that's the case, you will need either:
or:
and then you must do export http_proxy=http://127.0.0.1:NNNN where NNNN is the port that the proxy is running on.
Keyword Substitution and end of line issuesTo enable keyword substition, such as Why is it necessary to add have a pattern for every file? The answer is that Subversion decides that everything is a binary file and that it is safer to check things in and not modify them. However, there should be a repository wide way to set up Another limitation is that the To test this out, if you have read/write permission to the source.eecs.berkeley.edu SVN repositories, try: bash-3.2$ svn co svn+ssh://source.eecs.berkeley.edu/chess/svntest A svntest/README.txt Checked out revision 7. bash-3.2$ cd svntest bash-3.2$ echo '$Id$' > testfile.txt bash-3.2$ svn add testfile.txt A testfile.txt bash-3.2$ svn commit -m "A test for svn keywords: testfile.txt " testfile.txt Adding testfile.txt Transmitting file data . Committed revision 8. bash-3.2$ cat testfile.txt $Id: testfile.txt 8 2009-03-05 01:27:44Z cxh $ bash-3.2$ svn proplist testfile.txt Properties on 'testfile.txt': svn:keywords svn:eol-style Note that Checking Keyword SubstitutionTo check keyword substitution on a file: bash-3.2$ svn proplist README.txt Properties on 'README.txt': svn:keywords svn:eol-style bash-3.2$ svn propget svn:keywords README.txt Author Date Id Revision bash-3.2$ svn propget svn:eol-style README.txt native See Fixing Keyword SubstitutionTo set the keywords: svn propset svn:keywords "Author Date Id Revision" filename svn propset svn:eol-style native filename Keyword problem: one line in auto-props masks anotherhttp://subversion.tigris.org/issues/show_bug.cgi?id=2036 describes a four year old bug where the makefile = svn:eol-style=native;svn:keywords=Author Date Id Revision Makefile = svn:eol-style=native;svn:keywords=Author Date Id Revision then if the user creates a Problem creating two filenames that differ only in caseUnder MacOS with svn-1.4.4: bash-3.2$ echo '$Id$' > makefile bash-3.2$ echo '$Id$' > Makefile bash-3.2$ svn add makefile Makefile A makefile A Makefile bash-3.2$ svn commit -m "config has makefile first" makefile Makefile Adding Makefile Adding makefile svn: Commit failed (details follow): svn: Can't copy '/Users/cxh/src/svntest/.svn/props/makefile.svn-work' to '/Users/cxh/src/svntest/.svn/tmp/props/makefile.svn-work.tmp': No such file or directory However, the same command works under Solaris with svn-1.4.5 Problems with Eclipse and sshThe problem was that if a user had an incorrect password, then the ssh server would block ssh connections: cxh@carson 37% ssh -v xxx.eecs.berkeley.edu >>> Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f >>> debug1: Reading configuration data /etc/ssh/ssh_config >>> debug1: Rhosts Authentication disabled, originating port will not be >>> trusted. >>> debug1: ssh_connect: needpriv 0 >>> debug1: Connecting to source.eecs.berkeley.edu [128.32.48.XX] port 22. >>> debug1: Connection established. >>> debug1: identity file /home/eecs/cxh/.ssh/identity type -1 >>> debug1: identity file /home/eecs/cxh/.ssh/id_rsa type 1 >>> debug1: identity file /home/eecs/cxh/.ssh/id_dsa type -1 >>> ssh_exchange_identification: Connection closed by remote host >>> debug1: Calling cleanup 0x341a0(0x0) >>> cxh@carson 38% netstat on source's console shows that soda1am.Equip has a bunch of TIME_WAIT connections on sshd. soda1am.Equip is the machine through which the connections from AirBears arrive. Looking around on the net finds http://archive.netbsd.se/?ml=openssh-unix-dev&a=2007-10&t=5430083 which suggested editing However, the real question is: Why does this occur? It turns out one of our Eclipse users was using either Subclipse or Subversive to connect via ssh. They had the wrong password, so there were many bogus connections. The account that was causing the problem was using Eclipse on the Mac with these versions of Subversive: (:source) Subversive SVN Connectors 2.1.0 Subversive SVN Team Provider (Inclubation) 0.7.3 SVNKit 1.2.2 Implementation (Optional) 0.7.3 (:sourceend:) I edited # The maximum number of concurrent unauthenticated connections to sshd. # start:rate:full see sshd(1) for more information. # The default is 10 unauthenticated clients. #MaxStartups 10:30:60 # cxh: Updated to 20 to avoid # "ssh_exchange_identification: Connection closed by remote host" messages MaxStartups 20:30:60 # Default is 600 seconds. 0 means no time limit. #LoginGraceTime 600 # cxh: changed to 60 seconds to avoid lock out LoginGraceTime 60 # Maximum number of retries for authentication # Default is 6. Default (if unset) for MaxAuthTriesLog is MaxAuthTries / 2 #MaxAuthTries 5 # cxh: changed to three tries MaxAuthTries 3 MaxAuthTriesLog 0 SvnsyncWe use svnsync on source to get a copy of the Kepler tree. The #!/bin/sh /usr/local/etc/rotate_log -L /export/home2/svn -n 20 svnsync.out /usr/local/bin/svnsync sync file:///export/home2/svn/kepler 2>&1 > svnsync.out The script is run from a cron job every 10 minutes. svnsync: Couldn't get lock on destination repos after 10 attemptsIf svnsync fails with su - svnsync /usr/local/bin/svn propdel svn:sync-lock --revprop -r 0 file:///export/home2/svn/kepler See http://malsserver.blogspot.com/2008/12/failed-to-get-lock-on-destination-repos.html Get repository folder children operation failedAfter upgrading the svn server to 1.7.2 on source, Eclipse Indigo SR1 (M20110909-1335) with "SVNKit 1.3.5 Implementation (Optional) 2.2.2.I20110819-1700 org.polarion.eclipse.team.svn.connector.svnkit16.feature.group Polarion Software" was failing when the URL was The problem is that clicking on org.eclipse.team.svn.core.connector.SVNConnectorException: svn: URL 'svn+ssh://source.eecs.berkeley.edu/chess/ptII/trunk' non-existent in that revision at org.polarion.team.svn.connector.svnkit.SVNKitConnector.handleClientException(SVNKitConnector.java:1415) at org.polarion.team.svn.connector.svnkit.SVNKitConnector.list(SVNKitConnector.java:1264) at org.eclipse.team.svn.core.extension.factory.ThreadNameModifier.list(ThreadNameModifier.java:278) at org.eclipse.team.svn.core.utility.SVNUtility.list(SVNUtility.java:335) at org.eclipse.team.svn.core.svnstorage.SVNRepositoryContainer.getChildren(SVNRepositoryContainer.java:79) at org.eclipse.team.svn.core.operation.remote.GetRemoteFolderChildrenOperation.runImpl(GetRemoteFolderChildrenOperation.java:75) at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:81) at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104) at org.eclipse.team.svn.core.operation.CompositeOperation.runImpl(CompositeOperation.java:95) at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:81) at org.eclipse.team.svn.core.operation.LoggedOperation.run(LoggedOperation.java:39) at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104) at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTaskExternal(ProgressMonitorUtility.java:90) at org.eclipse.team.svn.ui.utility.DefaultCancellableOperationWrapper.run(DefaultCancellableOperationWrapper.java:55) at org.eclipse.team.svn.ui.utility.ScheduledOperationWrapper.run(ScheduledOperationWrapper.java:37) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: org.tigris.subversion.javahl.ClientException: svn: URL 'svn+ssh://source.eecs.berkeley.edu/chess/ptII/trunk' non-existent in that revision at org.tigris.subversion.javahl.JavaHLObjectFactory.throwException(JavaHLObjectFactory.java:779) at org.tmatesoft.svn.core.javahl.SVNClientImpl.throwException(SVNClientImpl.java:1924) at org.tmatesoft.svn.core.javahl.SVNClientImpl.list(SVNClientImpl.java:365) at org.tmatesoft.svn.core.javahl.SVNClientImpl.list(SVNClientImpl.java:337) at org.polarion.team.svn.connector.svnkit.SVNKitConnector.list(SVNKitConnector.java:1253) ... 14 more Caused by: org.tmatesoft.svn.core.SVNException: svn: URL 'svn+ssh://source.eecs.berkeley.edu/chess/ptII/trunk' non-existent in that revision at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.wc.SVNLogClient.doList(SVNLogClient.java:1334) at org.tmatesoft.svn.core.wc.SVNLogClient.doList(SVNLogClient.java:1217) at org.tmatesoft.svn.core.javahl.SVNClientImpl.list(SVNClientImpl.java:350) ... 16 more svnserve ProcessesIt turns out that there were lots of svnserve processes on source.eecs.berkeley.edu. Details may be found at http://svn.haxx.se/tsvnusers/archive-2007-09/0056.shtml and http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407949 My solution was to write a script that killed those processes. However, this script was not super-reliable as it was still possible to run out of swap between times the script ran. #!/bin/sh # If there are more than 100 svnserve processes, then kill them. # process=svnserve max=100 mailto=root # For testing #process=http #max=2 #mailto=cxh processes=`/usr/ucb/ps -auxgww | grep $process | wc -l` if [ "$processes" -gt $max ]; then maillog=/tmp/killsvnserv.$$ count=$processes echo "Starting with $count $process $processes" > $maillog netstat >> $maillog while [ "$count" -gt $max ]; do pkill -o svnserve >> $maillog #echo $count >> $maillog count=`expr $count - 1` done /etc/rc2.d/S98svnserve start >> $maillog /usr/ucb/ps -auxgwww | grep $process >> $maillog /usr/ucb/Mail -s "Source.eecs had $processes $process processes" $mailto < $maillog fi Unfortunately, this script is not super-reliable in that snv: connections will sometimes start to fail because rerunning The cause was Kepler users with IntelliJ were setting up svn in such a way that IntelliJ made many connections to the server. Sean Riddle writes: "From my Kepler directory, I just run:
svn ps svn:ignore "src" ptolemy/ to except ptolemy from version control. "
Sean also pointed out that http://youtrack.jetbrains.net/issue/IDEA-56714 describes the issue. svn: This client is too old to work with working copy '.'; please get a newer Subversion clientIf you use Subversion with Eclipse and install a Subversion plugin that is newer than the command line Subversion downloads may be found at http://subversion.tigris.org/project_packages.html Mac svn detailsI have an updated version of svn installed at My { "DYLD_LIBRARY_PATH" = "/Users/cxh/ptII/vendors/misc/dbxml-2.5.16/install/lib"; "PATH" = "/Users/cxh/ptII/vendors/misc/dbxml-2.5.16/install/bin:/Users/cxh/bin:/Users/cxh/ptII/bin:/usr/local/apache-maven/bin:/opt/subversion/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/usr/local/texlive/2007/bin"; } You can edit Mac: svn killed by signal 15If running See http://tech.barwick.de/development/svn-subversion-fixing-killed-by-signal-15-error.html and http://subversion.tigris.org/issues/show_bug.cgi?id=2580 (Thanks to Gilles Lasnier) Eclipse: svn: Compression of svndiff data failedEclipse was failing with: Checkout operation for 'svn+ssh://source.eecs.berkeley.edu/chess/ptII/trunk' failed. svn: Compression of svndiff data failed It could be that SVNkit needs to be updated.
TortoiseSVNSummary: Windows 7 users have problems with Tortoise SVN, try http://cvsgui.sourceforge.net/ WinCVS instead. Details: In Windows 7, Microsoft changed how some registry entries are handled. TortoiseSVN was using these entries so that in the Windows Explorer file browser, users could right click on a file or directory and perform SVN operations. Apparently, there are a limited number of images that can be used. See http://stackoverflow.com/questions/1057734/tortoisesvn-icons-not-showing-up-under-windows-7 Merging Two SVN RepositoriesDump with: svnadmin dump /export/home/svn/chess/ealpapers > ealpapers.dump I had to create trunk/ptpapers/ealpapers and commit it. Then do the merge: svnadmin load --parent-dir trunk/ptpapers/ealpapers /home/cxh/src/cvs/ptpapers < ealpapers.dump svn externals property: How to check out a repo within another repoTo get accessors to work, we need to do (:source:) cd $PTII/org/terraswarm/accessor svn co https://repo.eecs.berkeley.edu/svn/projects/terraswarm/accessors/trunk/accessors Summary: I did not find a way to do this. The workaround is to have configure check out the repo, which I will do now. Details: See https://www.terraswarm.org/accessors/wiki/Version0/Implement as to why we need to do this. SVN supports externals. http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html states: "Fortunately, Subversion provides support for externals definitions. An externals definition is a mapping of a local directory to the URL—and ideally a particular revision—of a versioned directory. In Subversion, you declare externals definitions in groups using the svn:externals property. You can create or modify this property using svn propset or svn propedit (see the section called “Manipulating Properties”). It can be set on any versioned directory, and its value describes both the external repository location and the client-side directory to which that location should be checked out."
So, in theory, we could add a svn:externals property to the ptII svn repo. However, there are at least two issues here:
The property can have only one value. The above is partly an artifact of repo.eecs, but it is a general problem. I don't think repo.eecs can be modified to better handle this. One idea was to do something complex with HTTPS and redirects, but that is not likely to work. I tried it before and reviewing the web shows that it would work with the browser, but svn will want the user to run svn relocate. Thus, in the near term, we should have $PTII/configure check out https://repo.eecs.berkeley.edu/svn/projects/terraswarm/accessors/trunk/accessors. In the longer term, we should make https://repo.eecs.berkeley.edu/svn/projects/terraswarm/accessors/trunk/accessors publicly readable. Perhaps $PTII/configure could check out the proper URL. Ideally, the code that requires that https://repo.eecs.berkeley.edu/svn/projects/terraswarm/accessors/trunk/accessors be checked out would have a good error message that would tell the user what to do. |