Today’s task. Trying to get Enterprise Architect working with subversion.

Enterprise Architect runs under CrossOver Office on linux (Wine) and getting it to work with subversion is not as straightforward as one might like (but the folks at sparxsystems are very helpful!)

The first step is to verify that we can use subversion within crossover office.

I installed the standard windows 32 bit binary into my EA bottle.

The two repositories I am interested in working with are available via https:// and svn+ssh://, and neither worked straightforwardly (I think the sparxsystems folk have only worked with regular svn:// repositories thus far).

To test access, I created simple batch files of the form:

"C:\Program Files\Subversion\bin\svn.exe" checkout "https://url-stuff" > svnlog.log &2> svnlog-err.log


"C:\Program Files\Subversion\bin\svn.exe" checkout "svn+ssh://url-stuff" > svnlog.log &2> svnlog-err.log

which I put in my /home/user/.cxoffice/ea/drive_c/ directory with names something like batfile.bat. (In both cases, the repositories already exist and work fine with linux subversion).

We can then run those windows bat files with a unix script like this one:

/home/user/cxoffice/bin/wine --bottle "ea" --untrusted --workdir "/home/user/.cxoffice/ea""/drive_c" -- "/home/user/.cxoffice/ea/drive_c/batfile.bat"

Neither work. The two error messages I got were:

  • (https:) svn: Network socket initialization failed
  • (svn+ssh:) svn: Can’t create tunnel: File not found

I haven’t made much progress with the former. Googling yielded this query to the wine list. The author got no response and currently has no solution (I checked with him personally).

However, I made real progress with the latter. The best advice I found was this, but there were enough things to think about for the wine environment that it’s worth documenting here.

  1. I spent some fruitless time trying to install tortoiseSVN into my EA bottle under crossover. (It seems to work, but under a win2000 bottle, and EA needs a win98 bottle). I then tried Putty … which installed fine. You’ll need the lot (make sure you download the installer not the simple .exe).
  2. You will need a public key and private key set up so that the batch files run by EA (and you in testing) can work, so we get that done first.
  3. On my laptop, I used
ssh-keygen -t rsa

to get a public and private key pair (thanks). For the moment I’m using no passphrase (the laptop disk itself is encrypted).

  1. Now I had a pair of keys sitting in my laptop ~/.ssh/ directory.

  2. The repository I want to get to lives on server, so I log into server, so the public key needs to be there. I changed directory into my .ssh directory there, and

    1. created an empty file authorized_keys (just “touch authorized_keys”)

    2. opened that file up, and copied in the public key from my laptop directory.

    3. Then I tested that key pair from the command line (under linux, ssh you@server). Fine.

  3. Then putty has to be encouraged to use that private key.

    1. Putty doesn’t understand the openssh private key file we’ve just generated, so we need to convert it.
      1. A copy visible to windows is needed (i.e. copied away from the hidden .ssh directory).
      2. Run puttygen from the crossover office run windows command (browse to the executable in the Putty Program Files directory).
      3. Now click on File> Load Private Key and load the file, then save the private key out as .ppk file. Delete the copy of the private key, and move the .ppk file somewhere special on your drive_c in your windows partition.
  4. Now you need to make sure that ssh is configured to use your putty. So, that means putting

ssh = "C:\Program Files\PuTTY\plink.exe" -i "C:\\yourdir\\yourfile.ppk"

in your subversion config file (which lives in

.cxoffice/yourEABottle/drive_c/Windows/Application Data/Subversion

And now at least I can checkout a working copy …

I’ll try and integrate that with EA another day, and the https problem will have to wait too. That lot took more than twice the time I allocated for it …

trackbacks (1)

More on the windows subversion client under wine. (from “Bryan’s Blog” on (on Thursday 17 April, 2008)

… by way of notes wrt to the https problems …