Browse Source

restructuring to be continued ...

master
lars 17 years ago
parent
commit
6038faf4f6
  1. 65
      cbox-build.sh
  2. 0
      cbox-tree.d/etc/cryptobox/cryptobox.conf
  3. 0
      cbox-tree.d/etc/cryptobox/openssl.cnf
  4. 0
      cbox-tree.d/etc/init.d/cb-devel-features.sh
  5. 0
      cbox-tree.d/etc/init.d/cb-mount-config.sh
  6. 0
      cbox-tree.d/etc/init.d/cb-network.sh
  7. 0
      cbox-tree.d/etc/init.d/cb-services.sh
  8. 0
      cbox-tree.d/etc/rc0.d/K10cb-devel-features
  9. 0
      cbox-tree.d/etc/rc0.d/K22cb-services
  10. 0
      cbox-tree.d/etc/rc0.d/K34cb-network
  11. 0
      cbox-tree.d/etc/rc0.d/K39cb-mount-config
  12. 0
      cbox-tree.d/etc/rc2.d/S98cb-services
  13. 0
      cbox-tree.d/etc/rc2.d/S99cb-devel-features
  14. 0
      cbox-tree.d/etc/rc6.d/K10cb-devel-features
  15. 0
      cbox-tree.d/etc/rc6.d/K22cb-services
  16. 0
      cbox-tree.d/etc/rc6.d/K34cb-network
  17. 0
      cbox-tree.d/etc/rc6.d/K39cb-mount-config
  18. 0
      cbox-tree.d/etc/rcS.d/S22cb-mount-config
  19. 0
      cbox-tree.d/etc/rcS.d/S37cb-network
  20. 0
      cbox-tree.d/etc/samba/smb.conf
  21. 0
      cbox-tree.d/mnt/crypto/info.txt
  22. 0
      cbox-tree.d/usr/lib/cryptobox/cbox-manage.sh
  23. 0
      cbox-tree.d/usr/lib/cryptobox/check_smb_idle.sh
  24. 0
      cbox-tree.d/usr/lib/cryptobox/chroot-start.sh
  25. 0
      cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh
  26. 0
      cbox-tree.d/usr/lib/cryptobox/devel-features.sh
  27. 0
      cbox-tree.d/usr/lib/cryptobox/firewall.sh
  28. 0
      cbox-tree.d/usr/lib/cryptobox/make_stunnel_cert.sh
  29. 0
      cbox-tree.d/usr/lib/perl5/ClearSilver.pm
  30. 0
      cbox-tree.d/usr/lib/perl5/auto/ClearSilver/.packlist
  31. 0
      cbox-tree.d/usr/lib/perl5/auto/ClearSilver/ClearSilver.bs
  32. 0
      cbox-tree.d/usr/lib/perl5/auto/ClearSilver/ClearSilver.so
  33. 0
      cbox-tree.d/usr/share/cryptobox/defaults/ip
  34. 0
      cbox-tree.d/usr/share/cryptobox/defaults/language
  35. 0
      cbox-tree.d/usr/share/cryptobox/defaults/timeout
  36. 0
      cbox-tree.d/usr/share/cryptobox/lang/de.hdf
  37. 0
      cbox-tree.d/usr/share/cryptobox/lang/en.hdf
  38. 0
      cbox-tree.d/usr/share/cryptobox/templates/config_form.cs
  39. 0
      cbox-tree.d/usr/share/cryptobox/templates/doc.cs
  40. 0
      cbox-tree.d/usr/share/cryptobox/templates/error.cs
  41. 0
      cbox-tree.d/usr/share/cryptobox/templates/footer.cs
  42. 0
      cbox-tree.d/usr/share/cryptobox/templates/header.cs
  43. 0
      cbox-tree.d/usr/share/cryptobox/templates/init_form.cs
  44. 0
      cbox-tree.d/usr/share/cryptobox/templates/intro.cs
  45. 0
      cbox-tree.d/usr/share/cryptobox/templates/macros.cs
  46. 0
      cbox-tree.d/usr/share/cryptobox/templates/main.cs
  47. 0
      cbox-tree.d/usr/share/cryptobox/templates/mount_form.cs
  48. 0
      cbox-tree.d/usr/share/cryptobox/templates/nav.cs
  49. 0
      cbox-tree.d/usr/share/cryptobox/templates/show_log.cs
  50. 0
      cbox-tree.d/usr/share/cryptobox/templates/shutdown_form.cs
  51. 0
      cbox-tree.d/usr/share/cryptobox/templates/umount_form.cs
  52. 0
      cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBox.html
  53. 0
      cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDev.html
  54. 0
      cbox-tree.d/var/www/cgi-bin/cryptobox.pl
  55. 0
      cbox-tree.d/var/www/cryptobox
  56. 0
      cbox-tree.d/var/www/cryptobox.css
  57. 0
      cbox-tree.d/var/www/errors/err404.html
  58. 0
      cbox-tree.d/var/www/img/backg.gif
  59. 0
      cbox-tree.d/var/www/img/evil_small.png
  60. 0
      cbox-tree.d/var/www/img/evil_test.png
  61. 0
      cbox-tree.d/var/www/img/list.gif
  62. 0
      cbox-tree.d/var/www/index.html
  63. 0
      defaults.conf.d/dfs.cbox.conf
  64. 0
      defaults.conf.d/qemu-ifup
  65. 0
      defaults.conf.d/ssh_config
  66. 0
      tools/userdocexport.sh

65
cbox-build.sh

@ -21,49 +21,80 @@
# merge - apply the diff to the local copy
#
# final action:
# release - the same as "dfsbuild config iso"
# release - the same as "dfsbuild config harden iso"
#
#
# problems of this script:
# - has to run as root, because dfsbuild, config, iso, chroot, devel,
# revert and release need root privileges
# - 'harden' is strangely integrated
#
# you may run this script with multiple arguments, e.g.:
# cb-build.sh dfsbuild config iso qemu
#
# the action "release" does what it says :)
# (all developer's features like sshd, writable templates and
# the test-suite are deactivated)
# the test-suite are deactivated, some packages get removed)
#
set -ue
# dfsbuild config
CONFIG="dfs.cbox.conf"
# 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"
# the build directory (will be ERASED without warning)
BUILDDIR="_builddir/cd1"
BUILDDIR="$ROOT_DIR/_builddir/cd1"
# image directory created by dfsbuild
IMAGE_DIR_ORIG="$BUILDDIR/image"
# a working copy of the image directory
IMAGE_DIR="$BUILDDIR/image-working"
# template directory for cryptobox specific configuration
TEMPLATE_DIR="cryptobox.conf.d"
TEMPLATE_DIR="cbox-tree.d"
# the iso image
IMAGE_FILE="$BUILDDIR/cryptobox.iso"
# dfsbuild config
CONFIG="dfs.cbox.conf"
# temporary directory
TMP_DIR="/tmp/`basename $0`-$$"
# the virtual harddisk image used for qemu
HD_IMAGE="/tmp/`basename $0`-testplatte.img"
# mkisofs options (the option "-U" is not clean, but it prevents long filenames from getting mapped)
# mkisofs options (the option "-U" is not clean, but it prevents long
# filenames from getting mapped)
MKISOFS_OPTIONS="-allow-multidot -U -D -iso-level 3 -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 1 -boot-info-table -pad -R"
# the chroot-wrapper within the cryptobox
CHROOTSTART="/usr/lib/cryptobox/chroot-start.sh"
# for burning a CD
CDWRITER="0,0,0"
LOCALCONF_DIR=local.conf.d
# for development diffs and merges from a running cryptobox
SSH_CONFIG_FILE="$LOCALCONF_DIR/ssh-options"
SSH_HOST=cryptobox
REMOTE_COMMAND="/usr/lib/cryptobox/devel-features.sh"
CUSTOM_CONFIGURE_DIR=$LOCALCONF_DIR/custom-configure.d
SSH_CONFIG_FILE="$LOCALCONF_DIR/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/')
# the script within the box, that does the development 'diff'
DEVEL_FEATURES_SCRIPT="/usr/lib/cryptobox/devel-features.sh"
# local configuration directory - contains scripts to be executed after
# 'configure'
CUSTOM_CONFIGURE_DIR="$ROOT_DIR/configure-local.d"
function run_dfsbuild()
@ -186,7 +217,7 @@ function upload2devel()
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 $REMOTE_COMMAND set_diff_base
ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $DEVEL_FEATURES_SCRIPT set_diff_base
else echo 'ERROR: copying failed!'
fi
rm -rf "$TMP_DIR"
@ -199,13 +230,13 @@ function merge_from_devel()
{
check_ssh_defaults
echo "Check for collisions ... (dry-run)"
if ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $REMOTE_COMMAND diff | patch --dry-run -p1 -d "$TEMPLATE_DIR"
if ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $DEVEL_FEATURES_SCRIPT diff | patch --dry-run -p1 -d "$TEMPLATE_DIR"
then echo
echo "Applying diff ..."
ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $REMOTE_COMMAND diff | patch -p1 -d "$TEMPLATE_DIR"
ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $DEVEL_FEATURES_SCRIPT diff | patch -p1 -d "$TEMPLATE_DIR"
echo
echo "Set the base for future diffs to current state ..."
ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $REMOTE_COMMAND set_diff_base
ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $DEVEL_FEATURES_SCRIPT set_diff_base
else echo "Merging will fail - do it manually!"
fi
}
@ -241,7 +272,7 @@ while [ $# -gt 0 ]
diff )
# get a diff from a running development cryptobox
check_ssh_defaults
ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $REMOTE_COMMAND diff
ssh -F "$SSH_CONFIG_FILE" $SSH_HOST $DEVEL_FEATURES_SCRIPT diff
;;
merge )
merge_from_devel

0
cryptobox.conf.d/etc/cryptobox/cryptobox.conf → cbox-tree.d/etc/cryptobox/cryptobox.conf

0
cryptobox.conf.d/etc/cryptobox/openssl.cnf → cbox-tree.d/etc/cryptobox/openssl.cnf

0
cryptobox.conf.d/etc/init.d/cb-devel-features.sh → cbox-tree.d/etc/init.d/cb-devel-features.sh

0
cryptobox.conf.d/etc/init.d/cb-mount-config.sh → cbox-tree.d/etc/init.d/cb-mount-config.sh

0
cryptobox.conf.d/etc/init.d/cb-network.sh → cbox-tree.d/etc/init.d/cb-network.sh

0
cryptobox.conf.d/etc/init.d/cb-services.sh → cbox-tree.d/etc/init.d/cb-services.sh

0
cryptobox.conf.d/etc/rc0.d/K10cb-devel-features → cbox-tree.d/etc/rc0.d/K10cb-devel-features

0
cryptobox.conf.d/etc/rc0.d/K22cb-services → cbox-tree.d/etc/rc0.d/K22cb-services

0
cryptobox.conf.d/etc/rc0.d/K34cb-network → cbox-tree.d/etc/rc0.d/K34cb-network

0
cryptobox.conf.d/etc/rc0.d/K39cb-mount-config → cbox-tree.d/etc/rc0.d/K39cb-mount-config

0
cryptobox.conf.d/etc/rc2.d/S98cb-services → cbox-tree.d/etc/rc2.d/S98cb-services

0
cryptobox.conf.d/etc/rc2.d/S99cb-devel-features → cbox-tree.d/etc/rc2.d/S99cb-devel-features

0
cryptobox.conf.d/etc/rc6.d/K10cb-devel-features → cbox-tree.d/etc/rc6.d/K10cb-devel-features

0
cryptobox.conf.d/etc/rc6.d/K22cb-services → cbox-tree.d/etc/rc6.d/K22cb-services

0
cryptobox.conf.d/etc/rc6.d/K34cb-network → cbox-tree.d/etc/rc6.d/K34cb-network

0
cryptobox.conf.d/etc/rc6.d/K39cb-mount-config → cbox-tree.d/etc/rc6.d/K39cb-mount-config

0
cryptobox.conf.d/etc/rcS.d/S22cb-mount-config → cbox-tree.d/etc/rcS.d/S22cb-mount-config

0
cryptobox.conf.d/etc/rcS.d/S37cb-network → cbox-tree.d/etc/rcS.d/S37cb-network

0
cryptobox.conf.d/etc/samba/smb.conf → cbox-tree.d/etc/samba/smb.conf

0
cryptobox.conf.d/mnt/crypto/info.txt → cbox-tree.d/mnt/crypto/info.txt

0
cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh → cbox-tree.d/usr/lib/cryptobox/cbox-manage.sh

0
cryptobox.conf.d/usr/lib/cryptobox/check_smb_idle.sh → cbox-tree.d/usr/lib/cryptobox/check_smb_idle.sh

0
cryptobox.conf.d/usr/lib/cryptobox/chroot-start.sh → cbox-tree.d/usr/lib/cryptobox/chroot-start.sh

0
cryptobox.conf.d/usr/lib/cryptobox/configure-cryptobox.sh → cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh

0
cryptobox.conf.d/usr/lib/cryptobox/devel-features.sh → cbox-tree.d/usr/lib/cryptobox/devel-features.sh

0
cryptobox.conf.d/usr/lib/cryptobox/firewall.sh → cbox-tree.d/usr/lib/cryptobox/firewall.sh

0
cryptobox.conf.d/usr/lib/cryptobox/make_stunnel_cert.sh → cbox-tree.d/usr/lib/cryptobox/make_stunnel_cert.sh

0
cryptobox.conf.d/usr/lib/perl5/ClearSilver.pm → cbox-tree.d/usr/lib/perl5/ClearSilver.pm

0
cryptobox.conf.d/usr/lib/perl5/auto/ClearSilver/.packlist → cbox-tree.d/usr/lib/perl5/auto/ClearSilver/.packlist

0
cryptobox.conf.d/usr/lib/perl5/auto/ClearSilver/ClearSilver.bs → cbox-tree.d/usr/lib/perl5/auto/ClearSilver/ClearSilver.bs

0
cryptobox.conf.d/usr/lib/perl5/auto/ClearSilver/ClearSilver.so → cbox-tree.d/usr/lib/perl5/auto/ClearSilver/ClearSilver.so

0
cryptobox.conf.d/usr/share/cryptobox/defaults/ip → cbox-tree.d/usr/share/cryptobox/defaults/ip

0
cryptobox.conf.d/usr/share/cryptobox/defaults/language → cbox-tree.d/usr/share/cryptobox/defaults/language

0
cryptobox.conf.d/usr/share/cryptobox/defaults/timeout → cbox-tree.d/usr/share/cryptobox/defaults/timeout

0
cryptobox.conf.d/usr/share/cryptobox/lang/de.hdf → cbox-tree.d/usr/share/cryptobox/lang/de.hdf

0
cryptobox.conf.d/usr/share/cryptobox/lang/en.hdf → cbox-tree.d/usr/share/cryptobox/lang/en.hdf

0
cryptobox.conf.d/usr/share/cryptobox/templates/config_form.cs → cbox-tree.d/usr/share/cryptobox/templates/config_form.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/doc.cs → cbox-tree.d/usr/share/cryptobox/templates/doc.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/error.cs → cbox-tree.d/usr/share/cryptobox/templates/error.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/footer.cs → cbox-tree.d/usr/share/cryptobox/templates/footer.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/header.cs → cbox-tree.d/usr/share/cryptobox/templates/header.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/init_form.cs → cbox-tree.d/usr/share/cryptobox/templates/init_form.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/intro.cs → cbox-tree.d/usr/share/cryptobox/templates/intro.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/macros.cs → cbox-tree.d/usr/share/cryptobox/templates/macros.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/main.cs → cbox-tree.d/usr/share/cryptobox/templates/main.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/mount_form.cs → cbox-tree.d/usr/share/cryptobox/templates/mount_form.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/nav.cs → cbox-tree.d/usr/share/cryptobox/templates/nav.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/show_log.cs → cbox-tree.d/usr/share/cryptobox/templates/show_log.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/shutdown_form.cs → cbox-tree.d/usr/share/cryptobox/templates/shutdown_form.cs

0
cryptobox.conf.d/usr/share/cryptobox/templates/umount_form.cs → cbox-tree.d/usr/share/cryptobox/templates/umount_form.cs

0
cryptobox.conf.d/usr/share/doc/cryptobox/html/CryptoBox.html → cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBox.html

0
cryptobox.conf.d/usr/share/doc/cryptobox/html/CryptoBoxDev.html → cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDev.html

0
cryptobox.conf.d/var/www/cgi-bin/cryptobox.pl → cbox-tree.d/var/www/cgi-bin/cryptobox.pl

0
cryptobox.conf.d/var/www/cryptobox → cbox-tree.d/var/www/cryptobox

0
cryptobox.conf.d/var/www/cryptobox.css → cbox-tree.d/var/www/cryptobox.css

0
cryptobox.conf.d/var/www/errors/err404.html → cbox-tree.d/var/www/errors/err404.html

0
cryptobox.conf.d/var/www/img/backg.gif → cbox-tree.d/var/www/img/backg.gif

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
cryptobox.conf.d/var/www/img/evil_small.png → cbox-tree.d/var/www/img/evil_small.png

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
cryptobox.conf.d/var/www/img/evil_test.png → cbox-tree.d/var/www/img/evil_test.png

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

0
cryptobox.conf.d/var/www/img/list.gif → cbox-tree.d/var/www/img/list.gif

Before

Width:  |  Height:  |  Size: 51 B

After

Width:  |  Height:  |  Size: 51 B

0
cryptobox.conf.d/var/www/index.html → cbox-tree.d/var/www/index.html

0
dfs.cbox.conf → defaults.conf.d/dfs.cbox.conf

0
defaults.conf.d/qemu-ifup.default → defaults.conf.d/qemu-ifup

0
defaults.conf.d/ssh-options.default → defaults.conf.d/ssh_config

0
defaults.conf.d/userdocexport.sh → tools/userdocexport.sh

Loading…
Cancel
Save