Thursday, June 29, 2006

Gentoo Trac with existing subversion project

sudo emerge trac sqlite pysqlite
sudo webapp-config -I -d project/trac trac 0.9.5 #this will create the symlinks for the site, http://localhost/project/trac
sudo trac-admin /var/lib/trac/project/ initenv #sets up the trac environment for the project
sudo chown apache:apache -R /var/lib/trac/project
sudo tracd -8000 /var/lib/trac/project

OR to run in apache

emerge mod_fastcgi
#add "-D FASTCGI" to /etc/conf.d/apache

#add FastCgiServer /var/www/localhost/cgi-bin/trac.fcgi -idle-timeout 120 -initial-env TRAC_ENV=/var/lib/trac/project -processes 5
# to /etc/apache/httpd.conf

# SetEnv TRAC_ENV "/var/lib/trac/project"

# ScriptAlias /project /var/www/localhost/cgi-bin/trac.cgi
# to virtual hosts file

#add users
sudo htpasswd2 -c /etc/apach2/trac.htpasswd admin

#then add
# AuthType Basic
# AuthName "Trac"
# AuthUserFile /etc/apache2/trac.htpasswd
# Require valid-user

#to virtual hosts file

Tuesday, June 20, 2006

Parallels vs VMWare 4.x

I have reason to install Windows under linux, again (sadly). Given my recent experience of trying out Parallels on my MacBook, I thought I'd compare it to VMWare in Linux. I purchased a VMWare 4.x license two years ago and it worked decently enough in Gentoo.

This time around, after emering it, there was network issues that I have heretofore not experienced. Then, for reasons I could not find, it wouldn't boot from the cd in the drive. This is when I decided to emerge Parallels (granted their ebuild is homebrewed, but still). Paraellels workstation is *so* much easier to install and configure, it's just not even funny. It's so simplistic, and it just worked! No network issues, no cd issues, it just worked. Just as simple and fast as on the Mac.

Wednesday, June 14, 2006

Subversion, Apache2, DAV & SAMBA

In order to easily facilitate a consolidated nightly backup we decided to mount (via SAMBA) a win2k3 share to store our Subversion repositories (Subversion being on a Gentoo box). Been live a week, today we had our first issue. The following message appeared on the "svn ci" output:

snc: Commit failed:

svn: Can't move '/opt/svn_repos/CrucialConversationsLP/db/current.3.tmp' to '/opt/svn_repos/CrucialConversationsLP/db/current': Text file busy.

svn: MERGE of '/svn/repos/CrucialConversationsLP': 409 Conflict

followed by this (apache2's error-log):

[Wed Jun 14 14:05:04 2006] [error] [client] Could not MERGE resource "/svn/repos/CrucialConversationsLP/!svn/act/e920f6b2-3416-0410-b60c-8a4adf2ad0ca" into "/svn/repos/CrucialConversationsLP/courses/Crucial Conversations/slides". [409, #0]
[Wed Jun 14 14:05:04 2006] [error] [client] An error occurred while committing the transaction. [409, #26]
[Wed Jun 14 14:05:04 2006] [error] [client] Can't move '/opt/svn_repos/CrucialConversationsLP/db/current.10.tmp' to '/opt/svn_repos/CrucialConversationsLP/db/current': Text file busy [409, #26]

lsof did not indicate that the "current" file was open.

The solution to this issue (for the time being) was to unmount the share and remount it. Then commits worked just fine. I also tried adding and committing test files on other projects, no issues there. So if this crops up again we'll consider an alternative backup scheme and perchance go down the NFS road.

Monday, June 05, 2006

macbook RAM

If you're a developer and you just bought a new MacBook, spare yourself the lag headache and upgrade to 2G RAM (got mine for $160 @ I was about to send mine back convinced that something was wrong for how slow it was running. Sure it's warm, but with maxed ourtRAM, it sure hops.

simplified ssh and ssh-agent

(condensed version of
ssh-keygen -t dsa
scp ~/.ssh/ server_user@server:~/
ssh server_user@server "cat ~/ >> ~/.ssh/authorized_keys"

ssh-add id-dsa