[Swan-dev] multiple vm builds in separate /source sub-directories
Andrew Cagney
andrew.cagney at gmail.com
Thu Feb 26 18:16:11 EET 2015
I got ticked off at having to do the ~/libreswan source-tree shuffle
Turns out, with a few little tweaks its possible to have multiple
source trees under /source (/testing? lets just not go there).
Specifically:
On the target I have:
# ls -F /source
baseline/ makefiles/ testdir/ ...
so that I can then do:
# cd /source/baseline
# swan-update
and, from the host:
$ cd ~/libreswan/makefiles/testing/pluto && make update
and it 'does the right thing'' (I don't want to know what make check would do).
For reference, the hacks are:
- set up separate source and testing directories (must contain full
source tree), I used ~/libreswan ~/libreswan/testdir (which contains a
full source tree)
- fix install.sh/uninstall.sh to look for top_srcdir, and not libreswan/
- tweak testdir/kvimsetup.sh for the above vis:
TESTDIR=~/libreswan/testdir/testing and LIBRESWANSRCDIR=~/libreswan
and re-build the vms (/source -> ~/libreswan and /testing ->
~/libreswan/testdir/testing)
- wilfully delete the 'cd /source' line in swan-* scripts, assume
you're in the correct directory; something better is needed, perhaps
only cd if there isn't ./kvmsetup.sh.sample.
- hack "make update" _ runkvm.py to run swan-update et.al. from the
correct directory; anyone know a good way to determine where /source
is pointing?
Some can be merged, some need thought:
- swan-* scripts can be hacked to detect old vs new (for instance if
there's no kvmsetup.sh.sample, then try /source)
- it's an XOR: either /source points to a source tree, or /source
contains source trees; perhaps there should be a /build mount, but
that seems like over kill. I'm pretty sure a backward compatible
default is required.
- you need to manually tweak kvmsetup.sh to point testing somewhere
else and then update the VMs, perhaps the install scripts could be a
little smarter?
- finally, should testing from /source work at all, ever?
Andrew
More information about the Swan-dev
mailing list