2008/10/26
2008/10/25
Make ecosconfig tool play fair with a Subversion repository
eCos ecosconfig tool has been designed with CVS repository in mind.
However, if you need to store your eCos base code into a Subversion repository, ecosconfig goes mad: it considers any hidden directory, such as .svn SVN administrative dir from a SVN working copy, as an eCos package candidate for inclusion in the eCos build system.
The net result is a ton of stupid warning messages that plague the log output of an eCos code build session.
The following patch prevent ecosconfig from parsing .svn directories.
Note that a better, more generic fix would be to actually ignore any hidden directory, that is a directory which starts with a dot character.
diff -r -u -x '*.svn*' vendor/ecos/host/libcdl/database.cxx new/ecos/host/libcdl/database.cxx
--- vendor/ecos/host/libcdl/database.cxx 2008-10-25 17:15:22.000000000 +0200
+++ new/ecos/host/libcdl/database.cxx 2008-10-14 00:35:28.000000000 +0200
@@ -221,7 +221,8 @@
unsigned int i;
interp->locate_subdirs(pkgdir, subdirs);
for (i = 0; i < subdirs.size(); i++) {
- if (("CVS" == subdirs[i]) || ("cvs" == subdirs[i])) {
+ if (("CVS" == subdirs[i]) || ("cvs" == subdirs[i]) || \
+ (".svn" == subdirs[i])) {
continue;
}
if ("" != package.script) {
Only in branches/host_tools/ecostools/host/libcdl/doc: .cvsignore
diff -r -u -x '*.svn*' vendor/ecos/host/libcdl/interp.cxx new/ecos/host/libcdl/interp.cxx
--- vendor/ecos/host/libcdl/interp.cxx 2008-10-25 17:15:22.000000000 +0200
+++ new/ecos/host/libcdl/interp.cxx 2008-10-14 00:35:28.000000000 +0200
@@ -1179,7 +1179,7 @@
foreach entry [glob -nocomplain -- $pattern] { \n\
if ([file isdirectory $entry]) { \n\
set entry [file tail $entry] \n\
- if {($entry != \"CVS\") && ($entry != \"cvs\")} { \n\
+ if {($entry != \"CVS\") && ($entry != \"cvs\") && ($entry != \".svn\")} { \n\
lappend result $entry \n\
} \n\
} \n\
Building Subversion 1.5 on a Mac
I often need the latest SVN client and server tools on my Mac, but I do not need nor want the fink or macports tools. SVN 1.5 brings very nice features, such as merging.
The following instructions are for Leopard machines. Instructions won't work on a Tiger or earlier OS X releases.
You'll need a working development environment - the following instructions assume you've already installed the GNU toolchain which comes with Xcode (GCC 4.0)
# Download the latest SVN 1.5.x archive # replace 'x' with the actual release (1.5.4 by the time of writing)
wget http://subversion.tigris.org/downloads/subversion-1.5.x.tar.bz2# Download the latest companion archive for SVN 1.5.x
wget http://subversion.tigris.org/downloads/subversion-deps-1.5.x.tar.bz2# Untar the main archive
tar xjvf ../subversion-1.5.?.tar.bz2# Untar the missing dependencies (and only these ones)
tar xjvf ../subversion-deps-1.5.?.tar.bz2 subversion-1.5.?/neon subversion-1.5.?/serf# Let's start. It would be nice to perform an out-of-source build of SVN, but early SVN 1.5.x release simply do not build in an out-of-source environment. So fall back to a in-source build for now
cd subversion-1.5.?/# Be sure to use the simplest PATH environment. # If you have installed other tools (such as MacPorts or fink, you might run into dependencies nightmares)
export PATH=/usr/bin:/bin:/usr/sbin:/sbin# Use the following configure settings. SVN will be installed in /usr/local/subversion, so it's easy to get rid of this version and/or replace it with a future release
./configure --enable-shared --disable-static --with-apxs --with-ssl --with-apr=/usr/bin/apr-1-config --with-apr-util=/usr/bin/apu-1-config --prefix=/usr/local/subversion# Before starting to build SVN, you need to edit serf/Makefile, and remove every single occurence of "-static", or the build would fail
vim serf/Makefile :%s/-static//g :wq# Start the build. # Nearly everyone owns a multi-core CPU Mac nowadays, so let speed up the build, spawning several processes at once
make -j2# Optional: if you need the Python modules, let's build them
make -j2 swig-py# Leopard comes with a built-in release of Subversion (1.4.x) # Let's backup the Apache modules first
pushd /usr/libexec/apache2/ sudo mv mod_authz_svn.so mod_authz_svn.so.orig sudo mv mod_dav_svn.so mod_dav_svn.so.orig popd# Install the fresh built version of Subversion to /usr/local/
subversion sudo make install# Optional: install Python Subversion wrapper
sudo make install-swig-py# Optional: replace the default Python wrapper with the new ones pushd /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python
sudo mv svn svn.orig sudo mv libsvn libsvn.orig sudo ln -s /usr/local/subversion/lib/svn-python/svn sudo ln -s /usr/local/subversion/lib/svn-python/libsvn popd# Optional but recommended: # SVN 1.5 working copies cannot be used with a prior release of SVN, such as the one that comes with Leopard. If you access a 1.4 WC with a 1.5 client, the WC is automatically updated to the 1.5 format, which prevent any further access from the default 1.4 tools. To avoid compatibility issue, I recommend you only use *one* major release of SVN tools on your machine # Replace the pristine release of SVN with the new one
pushd /usr/bin for f in svn*; do sudo mv $f $f.orig; sudo ln -s /usr/local/subversion/bin/$f; done popd# Once you double check SVN 1.5.x is up and running, you can get rid of your source+build directory
cd .. rm -rf subversion-*Enjoy !
$> svn --version svn, version 1.5.4 (r33841) compiled Oct 24 2008, 23:31:22