parent
bab84df735
commit
3e211a5e77
@ -0,0 +1,186 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# managing our work at the cryptobox
|
||||
#
|
||||
# development actions:
|
||||
# chroot - run first tests in a chroot environment
|
||||
# qemu - run the qemu emulation
|
||||
# upload - copy your local files to tmpfs on a running cryptobox
|
||||
# diff - compare tmpfs-files on a running cryptobox with the original
|
||||
# merge - apply the diff to the local copy
|
||||
#
|
||||
# problems of this script:
|
||||
# - chroot has to run as root
|
||||
#
|
||||
|
||||
set -ue
|
||||
|
||||
# get the path of a configuration file - local configuration files
|
||||
# supersede default files
|
||||
# parameter: base name of the configuration file
|
||||
function get_config_file()
|
||||
{
|
||||
[ -e "$LOCALCONF_DIR/$1" ] && echo "$LOCALCONF_DIR/$1" && return 0
|
||||
[ -e "$DEFAULTCONF_DIR/$1" ] && echo "$DEFAULTCONF_DIR/$1" && return 0
|
||||
echo "configuration file ($1) not found!" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# the base directory of your local development files
|
||||
ROOT_DIR=$(dirname "$0")
|
||||
|
||||
# the template (default) configuration directory
|
||||
DEFAULTCONF_DIR="$ROOT_DIR/etc-defaults.d"
|
||||
|
||||
# your local configuration directory (existing files supersede the defaults)
|
||||
LOCALCONF_DIR="$ROOT_DIR/etc-local.d"
|
||||
|
||||
# local configuration directory - contains scripts to be executed after
|
||||
# 'configure'
|
||||
CUSTOM_CONFIGURE_DIR="$ROOT_DIR/configure-local.d"
|
||||
|
||||
# template directory for cryptobox specific configuration
|
||||
TEMPLATE_DIR="cbox-tree.d"
|
||||
|
||||
# dfsbuild config
|
||||
CONFIG=$(get_config_file dfs-cbox.conf)
|
||||
|
||||
# the chroot-wrapper within the cryptobox
|
||||
CHROOT_START="/usr/lib/cryptobox/chroot-start.sh"
|
||||
|
||||
# qemu network configuration file
|
||||
QEMU_IFUP_FILE=$(get_config_file qemu-ifup)
|
||||
|
||||
# to connect to a development cryptobox with ssh
|
||||
SSH_CONFIG_FILE=$(get_config_file ssh_config)
|
||||
|
||||
# extract the hostname of the cryptobox from the ssh_config file
|
||||
SSH_HOST=$(grep "^Host " "$SSH_CONFIG_FILE" | head -1 | sed 's/^Host *\(.*\)$/\1/')
|
||||
|
||||
|
||||
############# include local configuration ##############
|
||||
|
||||
if [ -e "$(get_config_file cbox-dev.conf)" ]
|
||||
then source "$(get_config_file cbox-dev.conf)"
|
||||
else echo "local cbox-dev.conf ($(get_config_file cbox-dev.conf)) does not exist!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# image directory created by dfsbuild
|
||||
# the BUILD_DIR is defined in the local cbox-dev.conf
|
||||
IMAGE_DIR="$BUILD_DIR/image"
|
||||
|
||||
|
||||
####################### functions ######################
|
||||
|
||||
|
||||
function qemu_boot()
|
||||
{
|
||||
# create a virtual harddisk image file
|
||||
if [ ! -e "$HD_IMAGE" ]
|
||||
then echo "Creating temporary harddisk image ..."
|
||||
dd if=/dev/zero of="$HD_IMAGE" bs=1M count=20
|
||||
fi
|
||||
echo "Starting qemu ..."
|
||||
qemu -cdrom "$IMAGE_FILE" -m 96 -hda "$IMAGE_FILE" -boot d -n "$QEMU_IFUP_FILE" || true
|
||||
# remove iptables rules
|
||||
"$QEMU_IFUP_FILE" stop
|
||||
}
|
||||
|
||||
|
||||
function upload2box()
|
||||
# upload local files to a development cryptobox
|
||||
# this is necessary to use an "old" development cd with
|
||||
# new code - this affects only the web-interface and the
|
||||
# cbox-manage.sh-script (the boot behaviour stays the same)
|
||||
#
|
||||
# of course, only the directories that are mapped to tmpfs can
|
||||
# be updated this way
|
||||
{
|
||||
local DIRS="var/www usr/share/cryptobox usr/lib/cryptobox"
|
||||
[ -e "$TMP_DIR" ] || mkdir -p "$TMP_DIR"
|
||||
for a in $DIRS
|
||||
do mkdir -p "$TMP_DIR/$a"
|
||||
cp -r "$TEMPLATE_DIR/$a/." "$TMP_DIR/$a"
|
||||
done
|
||||
find "$TMP_DIR" -type d -name '\.svn' | while read a
|
||||
do rm -rf "$a"
|
||||
done
|
||||
echo "Copying local files to the cryptobox ... "
|
||||
if scp -F "$SSH_CONFIG_FILE" -rpq "$TMP_DIR/." cryptobox:/tmp/mirror
|
||||
then echo "Set the base for future diffs to current state ..."
|
||||
ssh -F "$SSH_CONFIG_FILE" "$SSH_HOST" "$DEV_FEATURES_SCRIPT" set_diff_base
|
||||
else echo 'ERROR: copying failed!'
|
||||
fi
|
||||
rm -rf "$TMP_DIR"
|
||||
}
|
||||
|
||||
|
||||
function merge_from_box()
|
||||
# merge a diff from a running development cryptobox into
|
||||
# your local copy
|
||||
{
|
||||
echo "Check for collisions ... (dry-run)"
|
||||
if box_diff | patch --dry-run -p1 -d "$TEMPLATE_DIR"
|
||||
then echo
|
||||
echo "Applying diff ..."
|
||||
box_diff | patch -p1 -d "$TEMPLATE_DIR"
|
||||
echo
|
||||
echo "Set the base for future diffs to current state ..."
|
||||
ssh -F "$SSH_CONFIG_FILE" "$SSH_HOST" "$DEV_FEATURES_SCRIPT" set_diff_base
|
||||
else echo "Merging will fail - do it manually!"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# get the diff of a running cryptobox system between its current state
|
||||
# and its original content
|
||||
function box_diff()
|
||||
{
|
||||
ssh -F "$SSH_CONFIG_FILE" "$SSH_HOST" "$DEV_FEATURES_SCRIPT" diff
|
||||
}
|
||||
|
||||
############################# main #####################################
|
||||
|
||||
[ $# -eq 0 ] && echo "[`basename $0`] - no arguments supplied - maybe you want to use '--help'"
|
||||
|
||||
ACTION=--help
|
||||
[ $# -gt 0 ] && ACTION=$1
|
||||
|
||||
case "$1" in
|
||||
diff )
|
||||
# get a diff from a running development cryptobox
|
||||
box_diff
|
||||
;;
|
||||
merge )
|
||||
merge_from_box
|
||||
;;
|
||||
upload )
|
||||
upload2box
|
||||
;;
|
||||
chroot )
|
||||
if [ ! -x "$IMAGE_DIR/$CHROOT_START" ]
|
||||
then echo "the chroot init script ("$IMAGE_DIR/$CHROOT_START") is not executable"
|
||||
echo "maybe you should run '`basename $0` cb-config' first"
|
||||
else chroot "$IMAGE_DIR" "$CHROOT_START"
|
||||
fi
|
||||
;;
|
||||
qemu )
|
||||
qemu_boot
|
||||
;;
|
||||
ssh )
|
||||
ssh -F "$SSH_CONFIG_FILE" "$SSH_HOST"
|
||||
;;
|
||||
help|--help )
|
||||
echo "Syntax: `basename $0` ( qemu | chroot | upload | diff | merge | help )"
|
||||
echo
|
||||
;;
|
||||
* )
|
||||
echo -e "unknown action: $1"
|
||||
echo
|
||||
$0 help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
@ -0,0 +1,106 @@
|
||||
|
||||
<a id="top"></a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-27ea5a3ee88c7c2dfcfd4124719aadd726f1e2da">Overview</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-737db576c5f42abc0c78574d0ce5077809f288cb">Settings</a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-9d97886ad41e38cb6afe343aa68ff652030ab06b">dfsbuild settings</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-c2ae24a50a3706711c1a42e26176768438d4f160">CryptoBox development configuration</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-90ac95d2e5a50160cbf72b884b7b469a29c2fea1">SSH connection</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-6798893e2e3fd89a72b5b6821a0d3d08125367b9">qemu network configuration</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
<p> </p>
|
||||
<hr>
|
||||
<p> </p>
|
||||
<p><em>back to <a href="/cryptobox?action=doc&page=CryptoBoxDev">CryptoBoxDev</a></em> </p>
|
||||
|
||||
<h2 id="head-27ea5a3ee88c7c2dfcfd4124719aadd726f1e2da">Overview</h2>
|
||||
|
||||
<p>The following sections are useful, if you want to change the default settings of your personal <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> development environment. </p>
|
||||
<p>You should have completed the steps described in <a href="/cryptobox?action=doc&page=CryptoBoxDevPreparation">CryptoBoxDevPreparation</a>. </p>
|
||||
|
||||
<h2 id="head-737db576c5f42abc0c78574d0ce5077809f288cb">Settings</h2>
|
||||
|
||||
|
||||
<h3 id="head-9d97886ad41e38cb6afe343aa68ff652030ab06b">dfsbuild settings</h3>
|
||||
|
||||
<p>All settings for <em>dfsbuild</em> can be found in <em>etc-defaults.d/dfs-cbox.conf</em>. </p>
|
||||
<p>If you want to change any of them, you should do the following: </p>
|
||||
<ol type="1">
|
||||
<li><p>copy <em>etc-defaults.d/dfs-cbox.conf</em> file to <em>etc-local.d/</em> </p>
|
||||
</li>
|
||||
<li><p>change <em>etc-local.d/dfs-cbox.conf</em> according to your needs </p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>This allows you to use your own (personal) settings, without interfering with files under version control. </p>
|
||||
|
||||
<h3 id="head-c2ae24a50a3706711c1a42e26176768438d4f160">CryptoBox development configuration</h3>
|
||||
|
||||
<p>Some settings regarding the building, configuring and validating of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> can be found in <em>etc-defaults.d/cbox-dev.conf</em>. </p>
|
||||
<p>If you want to change any of them, you should do the following: </p>
|
||||
<ol type="1">
|
||||
<li><p>copy <em>etc-defaults.d/cbox-dev.conf</em> file to <em>etc-local.d/</em> </p>
|
||||
</li>
|
||||
<li><p>change <em>etc-local.d/cbox-dev.conf</em> according to your needs </p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3 id="head-90ac95d2e5a50160cbf72b884b7b469a29c2fea1">SSH connection</h3>
|
||||
|
||||
<p>The file <em>etc-defaults.d/ssh_config</em> is used to establish a connection to a running <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> system. </p>
|
||||
<p>It can be necessary to change these settings, if: </p>
|
||||
<ul>
|
||||
<li><p> you do not want to use the default IP for the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> </p>
|
||||
</li>
|
||||
<li><p> or the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> is not within your local network. </p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>If you want to change some settings, you should do the following: </p>
|
||||
<ol type="1">
|
||||
<li><p>copy <em>etc-defaults.d/ssh_config</em> file to <em>etc-local.d/</em> </p>
|
||||
</li>
|
||||
<li><p>change <em>etc-local.d/ssh_config</em> according to your needs </p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3 id="head-6798893e2e3fd89a72b5b6821a0d3d08125367b9">qemu network configuration</h3>
|
||||
|
||||
<p>The file <em>etc-defauolts.d/qemu-ifup</em> is used for the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> emulation with <em>qemu</em>. See <tt>man qemu</tt> for details. </p>
|
||||
<p>If you want to change some settings, you should do the following: </p>
|
||||
<ol type="1">
|
||||
<li><p>copy <em>etc-defaults.d/qemu-ifup</em> file to <em>etc-local.d/</em> </p>
|
||||
</li>
|
||||
<li><p>change <em>etc-local.d/qemu-ifup</em> according to your needs </p>
|
||||
</li>
|
||||
</ol>
|
||||
<a id="bottom"></a>
|
||||
|
||||
</div>
|
||||
<p id="pageinfo" class="info" lang="en" dir="ltr">last edited 2005-09-05 16:14:50 by <span title="">lars</span></p>
|
||||
|
||||
</div> <!-- end page -->
|
||||
|
||||
|
||||
|
@ -0,0 +1,72 @@
|
||||
|
||||
<a id="top"></a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-5b50aeed8139c95e5a2670d4248978d942c5edd6">Software requirements</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-e988a63aa4744649892e3c85e239927edb01f336">Get the source</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-6524f2e3068fa6e4eb4e9fb3c4b84b34cf36b353">First try</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-08bd0ad2103b9f58bd026d64c0bcb333f3bbd90b">Finished</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
<p> </p>
|
||||
<hr>
|
||||
<p> </p>
|
||||
<p><em>back to <a href="/cryptobox?action=doc&page=CryptoBoxDev">CryptoBoxDev</a></em> </p>
|
||||
|
||||
<h2 id="head-5b50aeed8139c95e5a2670d4248978d942c5edd6">Software requirements</h2>
|
||||
|
||||
<p>We use <a class="external" href="http://debian.org"><img src="/cryptobox-img/moin-www.png" alt="[WWW]" height="11" width="11"> Debian</a> as our development environment. This was a natural choice, as the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a>-LiveCD is also based on Debian. Other distributions should work too, of course - <a class="interwiki" title="Acronym" href="http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=YMMV"><img src="/cryptobox-img/moin-inter.png" alt="[Acronym]" height="16" width="16">YMMV</a>. </p>
|
||||
<p>required: </p>
|
||||
<ul>
|
||||
<li><p> <a class="interwiki" title="DebianPackage" href="http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&subword=1&version=all&release=all&keywords=dfsbuild"><img src="/cryptobox-img/moin-inter.png" alt="[DebianPackage]" height="16" width="16">dfsbuild</a> </p>
|
||||
</li>
|
||||
<li><p> <a class="interwiki" title="DebianPackage" href="http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&subword=1&version=all&release=all&keywords=subversion"><img src="/cryptobox-img/moin-inter.png" alt="[DebianPackage]" height="16" width="16">subversion</a> </p>
|
||||
</li>
|
||||
<li><p> <a class="interwiki" title="DebianPackage" href="http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&subword=1&version=all&release=all&keywords=chroot"><img src="/cryptobox-img/moin-inter.png" alt="[DebianPackage]" height="16" width="16">chroot</a> </p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>recommended: </p>
|
||||
<ul>
|
||||
<li><p> <a class="interwiki" title="DebianPackage" href="http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&subword=1&version=all&release=all&keywords=apt-cacher"><img src="/cryptobox-img/moin-inter.png" alt="[DebianPackage]" height="16" width="16">apt-cacher</a> or <a class="interwiki" title="DebianPackage" href="http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&subword=1&version=all&release=all&keywords=apt-proxy"><img src="/cryptobox-img/moin-inter.png" alt="[DebianPackage]" height="16" width="16">apt-proxy</a> </p>
|
||||
</li>
|
||||
<li><p> <a class="interwiki" title="DebianPackage" href="http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&subword=1&version=all&release=all&keywords=qemu"><img src="/cryptobox-img/moin-inter.png" alt="[DebianPackage]" height="16" width="16">qemu</a> </p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="head-e988a63aa4744649892e3c85e239927edb01f336">Get the source</h2>
|
||||
|
||||
<p>Download the latest release from our <a class="external" href="http://subversion.tigris.org"><img src="/cryptobox-img/moin-www.png" alt="[WWW]" height="11" width="11"> subversion</a>-Repository:
|
||||
</p>
|
||||
<pre>
|
||||
svn checkout https://svn.systemausfall.org/svn/cryptobox/trunk </pre>
|
||||
|
||||
<h2 id="head-6524f2e3068fa6e4eb4e9fb3c4b84b34cf36b353">First try</h2>
|
||||
|
||||
<p>run <tt>./cbox-build.sh release</tt> as <em>root</em> - hopefully, there should be no errors <img src="/cryptobox-img/smile.png" alt=":)" height="15" width="15"> </p>
|
||||
<p>Hint: This step will fail, if you did not install <em>apt-cacher</em>. See <a href="/cryptobox?action=doc&page=CryptoBoxDevCustomBuild">CryptoBoxDevCustomBuild</a> for details on how to change build-configuration settings (in this case: <em>mirror</em> in <em>dfs.cbox.conf</em>). </p>
|
||||
|
||||
<h2 id="head-08bd0ad2103b9f58bd026d64c0bcb333f3bbd90b">Finished</h2>
|
||||
|
||||
<p>Now you can start to pariticipate in the development of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> or simply customize your own <a href="/wikis/howto/CryptoBox">CryptoBox</a>-LiveCD. </p>
|
||||
<p>See <a href="/cryptobox?action=doc&page=CryptoBoxDevWorkFlow">CryptoBoxDevWorkFlow</a> for details of how to use the developer's tools of the <a href="/wikis/howto/CryptoBox">CryptoBox</a>. </p>
|
||||
<p><a href="/cryptobox?action=doc&page=CryptoBoxDevCustomBuild">CryptoBoxDevCustomBuild</a> shows some examples for local customizations of the <a href="/wikis/howto/CryptoBox">CryptoBox</a>. </p>
|
||||
<a id="bottom"></a>
|
||||
|
||||
</div>
|
||||
<p id="pageinfo" class="info" lang="en" dir="ltr">last edited 2005-09-05 13:50:51 by <span title="">lars</span></p>
|
||||
|
||||
</div> <!-- end page -->
|
||||
|
||||
|
||||
|
@ -0,0 +1,153 @@
|
||||
|
||||
<a id="top"></a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-adacf7a8271d3f6fe8bdfb9773ac3b1f4b050f9a">Preparations</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-61cec4152bb64ed5799ae7422f7150a4e3bc4860">Create a CryptoBox-LiveCD - step by step</a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-0ace019b2e7f624b4af95b328aa511a0453bd656">Build the base system</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-b12afd5dca3afd8290b311944f1dd1ab3d16fa6f">Configure the base image</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-22535d762de22b1c0b1be445d1ee560bc72a481f">Remove development features</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-09b84611139bf8f53380587b5b09588d97b4ff1c">Create an iso image</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-c78fdb473369885eacd6cb10fcfb00cad50f2670">Burn the CD</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-995d4701e181a853fd1d87811b76e802a1c61d96">Test the CryptoBox-LiveCD</a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-25203ae5362d0bbc82ec84b349fb463c1e615b48">Chroot: quick & dirty tests</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-2278b94f0a24871a501d80c4e6e0c53d1f5621ca">Qemu: nearly complete emulation</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-0692ec42b1a03fdbc5eb920dd05b86c5f04130e6">Debugging and merging</a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-b163acd694c2681db27c18414367513219cfc06f">Development on a running system</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-4bfb5d81f79e604fd8a4eb20a6d709bc65562fe3">Uploading a new release</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
<p> </p>
|
||||
<hr>
|
||||
<p> </p>
|
||||
<p><em>back to <a href="/cryptobox?action=doc&page=CryptoBoxDev">CryptoBoxDev</a></em> </p>
|
||||
|
||||
<h2 id="head-adacf7a8271d3f6fe8bdfb9773ac3b1f4b050f9a">Preparations</h2>
|
||||
|
||||
<p>You should have completed the steps described in <a href="/cryptobox?action=doc&page=CryptoBoxDevPreparation">CryptoBoxDevPreparation</a>. </p>
|
||||
|
||||
<h2 id="head-61cec4152bb64ed5799ae7422f7150a4e3bc4860">Create a CryptoBox-LiveCD - step by step</h2>
|
||||
|
||||
<p>The following steps can be executed in the order of their appearance. </p>
|
||||
<p>Usually there is no need to repeat the whole process, after you changed some parts of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a>. Especially the first step (building of the base system with <em>dfsbuild</em>) may usually be skipped. </p>
|
||||
<p>Every step of the building process must be executed as <em>root</em>. </p>
|
||||
|
||||
<h3 id="head-0ace019b2e7f624b4af95b328aa511a0453bd656">Build the base system</h3>
|
||||
|
||||
<p>Run <tt>./cbox-build.sh dfsbuild</tt> to create the base system for the LiveCD. </p>
|
||||
<p>The result can be found in <em>_builddir/cd1/image</em>. </p>
|
||||
<p>If you do not want to use the <em><a class="interwiki" title="DebianPackage" href="http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&subword=1&version=all&release=all&keywords=apt-cacher"><img src="/cryptobox-img/moin-inter.png" alt="[DebianPackage]" height="16" width="16">apt-cacher</a></em> to save bandwith and time, then you should modify the <em>mirror</em>-setting in <em>dfs.cbox.conf</em> (see <a href="/cryptobox?action=doc&page=CryptoBoxDevCustomBuild">CryptoBoxDevCustomBuild</a> for details). </p>
|
||||
|
||||
<h3 id="head-b12afd5dca3afd8290b311944f1dd1ab3d16fa6f">Configure the base image</h3>
|
||||
|
||||
<p>Run <tt>./cbox-build.sh config</tt> to copy the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a>-specific files to the base image. </p>
|
||||
<p>TODO: link to cbox-build.sh-manpage </p>
|
||||
|
||||
<h3 id="head-22535d762de22b1c0b1be445d1ee560bc72a481f">Remove development features</h3>
|
||||
|
||||
<p>The original base system, that was created by <em>dfsbuild</em> contains a lot packages and some scripts, that are only useful during development. You should remove them, as they case severe security implications. </p>
|
||||
<p>To reduce the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a>-LiveCD to the usable minimum for operational use, you should run <tt>./cbox-build.sh harden</tt>. </p>
|
||||
|
||||
<h3 id="head-09b84611139bf8f53380587b5b09588d97b4ff1c">Create an iso image</h3>
|
||||
|
||||
<p>To burn a <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a>-LiveCD, you need an bootable <em>iso9660</em>-image. </p>
|
||||
<p>Create the <em>iso</em> image with <tt>./cbox-build.sh iso</tt>. The resulting file can be found at <em>_builddir/cd1/cryptobox.iso</em>. </p>
|
||||
|
||||
<h3 id="head-c78fdb473369885eacd6cb10fcfb00cad50f2670">Burn the CD</h3>
|
||||
|
||||
<p>Do it manually: <tt>cdrecord -v dev=0,0,0 _builddir/cd1/cryptobox.iso</tt> (change the <em>dev</em> setting according to your setup). </p>
|
||||
<p>Let the script do it for you: <tt>./cbox-build.sh burn</tt> (maybe you have to change the <em>CDWRITER</em> setting in <em>cbox-dev.conf</em> - see <a href="/cryptobox?action=doc&page=CryptoBoxDevCustomBuild">CryptoBoxDevCustomBuild</a>). </p>
|
||||
<p>Of course, it is not wise to use CD-R media. Use CD-RW instead. </p>
|
||||
|
||||
<h2 id="head-995d4701e181a853fd1d87811b76e802a1c61d96">Test the CryptoBox-LiveCD</h2>
|
||||
|
||||
<p>This section is only useful for developers, who want to improve or change the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> system. </p>
|
||||
|
||||
<h3 id="head-25203ae5362d0bbc82ec84b349fb463c1e615b48">Chroot: quick & dirty tests</h3>
|
||||
|
||||
<p>If you modified the <em>perl</em>- or <em>shell</em>-scripts of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a>, then you can check for syntax errors by running them in a <em>chroot</em> environment. Be careful: you have access to all ressources of your computer, while you are working within a <em>chroot</em> environment - so you can easily repartition your real disk ... </p>
|
||||
<p>To start a <em>chroot</em> environment, you can execute <tt>./cbox-build.sh chroot</tt>. </p>
|
||||
<p>For more intensive tests, you may use <em>qemu</em> (see below) or burn real LiveCDs - of course this would take much more time. </p>
|
||||
|
||||
<h3 id="head-2278b94f0a24871a501d80c4e6e0c53d1f5621ca">Qemu: nearly complete emulation</h3>
|
||||
|
||||
<p>The processor emulator <a class="external" href="http://fabrice.bellard.free.fr/qemu"><img src="/cryptobox-img/moin-www.png" alt="[WWW]" height="11" width="11"> qemu</a> allows you test the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> in a virtual environment, that is completely separated from your real computer's resources. It is the tool of choice, if you do nat have a real computer around for testing. </p>
|
||||
<p>Beware - there are some problems, when using <em>qemu</em>: </p>
|
||||
<ul>
|
||||
<li><p> <em>smbd</em> does not start (segfault) </p>
|
||||
</li>
|
||||
<li><p> ??? </p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>To start a <em>qemu</em> emulation of the <em>iso</em> image, you may type: <tt>./cbox-build.sh qemu</tt>. </p>
|
||||
|
||||
<h2 id="head-0692ec42b1a03fdbc5eb920dd05b86c5f04130e6">Debugging and merging</h2>
|
||||
|
||||
<p>This section is only useful for developers, who want to develop on a running <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> system (emulated or real). </p>
|
||||
<p>You may access the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> directly or you can use <em>ssh</em> to open a remote session (<tt>./cbox-build.sh ssh</tt>). </p>
|
||||
|
||||
<h3 id="head-b163acd694c2681db27c18414367513219cfc06f">Development on a running system</h3>
|
||||
|
||||
<p>When you run an emulation or test a real LiveCD, you may encounter problems and bugs. To test your fixes for these problems, it is convenient, to change the running test system. Afterwards you can merge these changes to your local development copy. </p>
|
||||
<p>Type <tt>./cbox-build.sh diff</tt> to see the changes, you made on the running <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> system. </p>
|
||||
<p>Type <tt>./cbox-build.sh merge</tt> to merge these changes to your local working copy. </p>
|
||||
|
||||
<h3 id="head-4bfb5d81f79e604fd8a4eb20a6d709bc65562fe3">Uploading a new release</h3>
|
||||
|
||||
<p>Alternatively you may also upload a new version of your local working copy to the running <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> system. </p>
|
||||
<p>Type <tt>./cbox-build.sh upload</tt> - beware: all recent changes you made to the running <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> system, are lost. </p>
|
||||
<a id="bottom"></a>
|
||||
|
||||
</div>
|
||||
<p id="pageinfo" class="info" lang="en" dir="ltr">last edited 2005-09-05 16:13:58 by <span title="">lars</span></p>
|
||||
|
||||
</div> <!-- end page -->
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue