Posted by Jim Morris
Sun, 18 Feb 2007 23:32:00 GMT
I have updated the Capistrano local subversion module and added a perforce one.
The original article is here.
I have added rsync as an option to speed up
the deployment to remote servers, To use that option install this
version,
in the example below I have installed the file into my rails projects
lib/tasks directory.
When the rsync option is set the deployment method will use rsync over
ssh to synchronize between a local cache of the subversion project and
a remote cache, minimizing the amount of data uploaded to the server.
To use rsync use this in the deploy.rb...
require 'lib/tasks/local_subversion_rsync.rb'
set :scm, Capistrano::SCM::LocalSubversionRsync
set :repository_is_not_reachable_from_remote, true
set :use_rsync, true
set :local_rsync_cache, "/home/user/projects/aproject/cache"
set :remote_rsync_cache, "/var/www/webapp/cache"
set :rsync_username, "ausername"
set :rsync_excludes, ["*.bak", "*.log"]
The rsync_username and rsync_excludes are optional.
The :rsync_username option sets the username that ssh uses to login
to use rsync. Leave it blank if it is the same as your current login
name.
The :rsync_excludes option allows you to pass --exclude options to
rsync, using the rsync syntax for exclusions, this is an array of
patterns to exclude.
Note you must do a local SVN checkout to the directory specified by
local_rsync_cache at least once before using this method.
Also the directory specified by remote_rsync_cache must exist on the server.
The perforce version of the scm module that allows the perforce server
to be accessed locally only is
here,
note that this does not currently support the rsync option
or write to the revisions.log.
Read more...
Posted in Rails | Tags capistrano | 1 comment | no trackbacks
Posted by Jim Morris
Sun, 04 Feb 2007 06:32:35 GMT
The version of beagle available as a standard package with Ubuntu
Edgy 6.10, is horribly buggy and uses a lot of memory (2Gbytes on my
machine).
I wanted to build the latest version of Beagle (0.2.15.1) on my system which is
actually KUbuntu, and this required a lot of effort! I had to install
a bunch of added support libraries for gtk which do not appear to be
installed by default on KUbuntu. I downloaded the latest source from
here.
Here is a list of what I installed using sudo aptitude install many are suggested
here the rest I
discovered by trial and error.
libmono-sharpzip2.84-cil
mono
mono-devel
libmono-dev
libgdiplus
libxml-parser-perl
libsqlite0
libsqlite0-dev
libexif12
libexif-dev
shared-mime-info
libgmime2
libgmime2-dev
gtk-sharp2
libgmime1
libgmime-2.0-2-dev
libgmime2.2-cil
libbeagle0
libmono-sqlite1.0-cil
mono-gmcs
mono-classlib-2.0
gnome-vfs-extfs
libgnome-vfs-dev
libxml2-dev
libgconf2-dev
libbonobo2-dev
libbz2-dev
fam
libfam-dev
libgnomevfs2-dev
libgnome2-dev
libgtk2.0-dev
librsvg2-dev
python-gtk2-dev
gnome-sharp2
gtk-sharp
It turned out that the installed version of mono is not high enough to build the
latest version of beagle, so I installed the latest version of mono
manually into /opt/mono. You can get it
here, I got the Generic Mono 1.2.2.1_1 Linux
installer from
here.
To use this the following exports need to be done, usually in ~/.bashrc
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
export PATH="/opt/mono/mono-1.2.2.1/bin:$PATH"
export PKG_CONFIG_PATH="/opt/mono/mono-1.2.2.1/lib/pkgconfig:$PKG_CONFIG_PATH"
export MANPATH="/opt/mono/mono-1.2.2.1/share/man:$MANPATH"
export LD_LIBRARY_PATH="/opt/mono/mono-1.2.2.1/lib:$LD_LIBRARY_PATH"
Additionally I needed to do this...
export MONO_PATH=/opt/mono/mono-1.2.2.1/lib/:/opt/mono/mono-1.2.2.1/lib/mono/gtk-sharp-2.0:/usr/lib/cli/gmime-sharp-2.2:/usr/lib/cli/gsf-sharp-0.0
when I got a bunch of build errors, and run errors, presumably from mono.
I am not a c sharp programmer, and know nothing about mono, so I am
not sure why these search paths are needed, but they are.
After all the above you can use the standard...
./configure
make
sudo make install
to build and install beagle.
I also turned on extended attributes on my ext3 partition as explained
here.
Then run beagle (making sure the above export is done first otherwise
it uses the wrong version of mono and can't find some of the mono
libraries.)
As far as I can see it is now running and indexing my disk, and the
memory usage is pretty low, and the cpu usage is tolerable.
If anyone can add good explanations please do so in the comments
section.
UPDATE This recipe also works with beagle 0.2.16
Posted in Linux | Tags beagle, edgy, kubuntu | 1 comment | no trackbacks