aboutsummaryrefslogtreecommitdiffstats
path: root/freedom-maker
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-09-23 18:53:45 +0200
committerficus <ficus@robocracy.org>2012-09-23 18:53:45 +0200
commit33f0a01e30ed9438debf6a7723cd93ff50effb04 (patch)
tree2dda7820e8651cd9b4a34abb0accd7e1a5434717 /freedom-maker
parent708bc689ab55c7bbcf6c9cde5f23e3389d53f6cf (diff)
downloadtorouter-33f0a01e30ed9438debf6a7723cd93ff50effb04.tar.gz
torouter-33f0a01e30ed9438debf6a7723cd93ff50effb04.zip
remove confusing unused packages
Diffstat (limited to 'freedom-maker')
-rwxr-xr-xfreedom-maker/freedombox-customize49
-rwxr-xr-xfreedom-maker/mk_dreamplug_rootfs121
-rwxr-xr-xfreedom-maker/mk_virtualbox_image31
3 files changed, 0 insertions, 201 deletions
diff --git a/freedom-maker/freedombox-customize b/freedom-maker/freedombox-customize
deleted file mode 100755
index 1f3ee69..0000000
--- a/freedom-maker/freedombox-customize
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-
-import crypt
-import os
-import subprocess
-import sys
-
-
-user = "fbx"
-password = "frdm"
-rootdir = sys.argv[1]
-home = "/home/{0}/".format(user)
-
-
-def runchroot(argv):
- return runcmd(["chroot", rootdir] + argv)
-
-def runcmd(argv, stdin='', ignore_fail=False, **kwargs):
- p = subprocess.Popen(argv, stdin=subprocess.PIPE,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE,
- **kwargs)
- out, err = p.communicate(stdin)
- if p.returncode != 0:
- msg = 'command failed: %s\n%s\n%s' % (argv, out, err)
- if not ignore_fail:
- print (msg)
- raise Exception(msg)
- return out
-
-if __name__ == "__main__":
- print 'Customizing freedombox'
-
- # Create a fboxlite account.
- runchroot(['adduser', '--gecos', user, '--disabled-password', user])
- encrypted = crypt.crypt(password, '..')
- runchroot(['usermod', '-p', encrypted, user])
-
- # Create all projects
- runchroot(['git', 'clone', 'git://github.com/NickDaly/Plinth.git',
- home + 'plinth'])
- runchroot(['git', 'clone', 'git://github.com/jvasile/freedombox-privoxy',
- home + 'freedombox-privoxy'])
- runchroot(['git', 'clone', 'git://github.com/jvasile/withsqlite.git',
- home + 'withsqlite'])
- runchroot(['hg', 'clone', 'https://hg@bitbucket.org/nickdaly/plugserver',
- home + 'plugserver'])
-
- # change home directory ownership appropriately
- runchroot(['chown', '-R', '1000:1000', home])
diff --git a/freedom-maker/mk_dreamplug_rootfs b/freedom-maker/mk_dreamplug_rootfs
deleted file mode 100755
index 0c452e4..0000000
--- a/freedom-maker/mk_dreamplug_rootfs
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2011 by Bdale Garbee <bdale@gag.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-# based on work by <ivan@sanchezortega.es>, who released his script under
-# the following license terms:
-# ----------------------------------------------------------------------------
-# "THE BEER-WARE LICENSE" (Revision 42):
-# As long as you retain this notice you can do whatever you want with
-# this stuff. If we meet some day, and you think this stuff is worth it,
-# you can buy me a beer in return.
-# ----------------------------------------------------------------------------
-
-# mk_dreamplug_rootfs
-#
-# Runs multistrap and readies the resulting root filesystem to silently
-# complete package configuration on the first boot-up.
-#
-# Accepts the multistrap config file name as an argument.
-
-# We don't tolerate errors.
-set -e
-
-architecture=armel
-if [ -n "$1" ]
-then
- architecture=$1
-fi
-
-config=multistrap-configs/torouter-$architecture.conf
-if [ -n "$2" ]
-then
- config=$2
-fi
-
-# users
-hostname='torouter'
-rootpassword='freedom'
-user='fbx'
-userpassword='freedom'
-export hostname
-export rootpassword
-export user
-export userpassword
-
-# where to build images, etc
-basedir=`pwd`/build
-source=`pwd`/source
-target=$basedir/$architecture
-tmpdir=$basedir/tmp
-pkgcache=$tmpdir/aptcache
-homedir=$target/home/$user
-export basedir
-export source
-export target
-export tmpdir
-export pkgcache
-export homedir
-
-# clear any old cruft
-if (mount | grep $target/var/cache/apt)
-then
- umount $target/var/cache/apt/
-fi
-
-# make the directories we'll need.
-mkdir -p $target
-rm -rf $target/*
-mkdir -p $tmpdir
-mkdir -p $pkgcache
-mkdir -p $target/var/cache/apt/ && mount -o bind $pkgcache $target/var/cache/apt/
-mkdir -p $target/var/cache/apt/archives
-mkdir -p $target/usr/bin
-mkdir -p $homedir
-
-# multistrap
-echo "Multistrapping..."
-# XXX: DEATH: work around torrouter.torproject.org GPG key issue
-# multistrap -f $config -d $target
-multistrap --no-auth -f $config -d $target
-rm -f $target/etc/apt/sources.list.d/multistrap-debian.list
-
-# un-do the bind mount so we don't trip over it later
-umount $target/var/cache/apt/
-
-# copy!
-echo "Copying the source directory to the FreedomBox root."
-rsync -av $source/ $target
-
-# add projects to the image to make it a useful FreedomBox.
-bin/projects
-
-# torouter!
-echo "Copying torouter-specific files..."
-# Override the above stuff - we know better
-cp ../packages/torouter-prep/configs/interfaces $target/etc/network/interfaces
-# Stop the libertas module from loading
-cp ../packages/torouter-prep/configs/modprobe.d-blacklist.conf $target/etc/modprobe.d/blacklist.conf
-
-# cleanup and finalize the image so it boots correctly.
-echo "Finalizing..."
-bin/finalize
-
-# finish!
-echo "Syncing..."
-sync
-echo "Finished. You may now copy the rootfs to the plug."
diff --git a/freedom-maker/mk_virtualbox_image b/freedom-maker/mk_virtualbox_image
deleted file mode 100755
index abdd730..0000000
--- a/freedom-maker/mk_virtualbox_image
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# Ensure git\VBoxManage is installed
-# Get vmdebootstrap code
-# Run vmdebootstrap script to create image
-# Convert image to vdi hard drive
-
-# don't tolerate errors.
-set -e
-
-basedir=`pwd`
-IMAGE=$1
-
-# Get vmdebootstrap code
-rm -rf vmdebootstrap
-git clone git://gitorious.org/~nickdaly/vmdebootstrap/nickdalys-vmdebootstrap.git
-
-# Run vmdebootstrap script to create image
-sudo ./vmdebootstrap/vmdebootstrap --log freedombox.log --log-level debug --image $IMAGE.img --hostname freedombox \
- --size 1G --verbose --enable-dhcp --package ssh --package apache2 --package git --package mercurial \
- --package build-essential --package checkinstall --package python-simplejson \
- --mirror http://ftp.uk.debian.org/debian/ --package pandoc --package python-cheetah \
- --package python-argparse \
- --customize=$basedir/freedombox-customize --root-password=password1 --arch=i386
-
-# Convert image to vdi hard drive
-VBoxManage convertdd $IMAGE.img $IMAGE.vdi
-
-#mkdir testing
-#sudo mount -o loop,offset=1048576 freedombox.img testing/
-#sudo umount testing/