From db7e7f1e5a0aac816022105fcd317631ab77ce2b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 13:39:30 +0100 Subject: [PATCH 01/35] Tidying --- src/freedombone-app-ipfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-app-ipfs b/src/freedombone-app-ipfs index cc791d46..c660ae46 100755 --- a/src/freedombone-app-ipfs +++ b/src/freedombone-app-ipfs @@ -34,7 +34,7 @@ IN_DEFAULT_INSTALL=0 SHOW_ON_ABOUT=0 IPFS_GO_REPO_BASE="github.com/ipfs/go-ipfs" -IPFS_GO_REPO='https://github.com/ipfs/go-ipfs' +IPFS_GO_REPO="https://$IPFS_GO_REPO_BASE" IPFS_COMMIT='6fdfaaf6e4783ae1be7b348e7a6bc0640982c7df' IPFS_PORT=4001 IPFS_NODE_VERSION='6.2.2' From c8e0dae8416fb73263093f2007110d0db45f2c54 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 13:54:23 +0100 Subject: [PATCH 02/35] Try installing patchwork on mesh images --- src/freedombone-image-customise | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 10d12a1f..64a63e9d 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -561,6 +561,27 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= +install_patchwork() { + chroot "$rootdir" apt-get g++ m4 libtool automake nodejs + chroot "$rootdir" apt-get libxext-dev libxtst-dev libxkbfile-dev + git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork + + cat < $rootdir/usr/bin/install_patchwork +#!/bin/bash +cd /etc/patchwork +npm install +EOF + chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork + chroot "$rootdir" /usr/bin/install_patchwork + if [ ! -f /usr/bin/patchwork ]; then + if [ ! -f /usr/local/bin/patchwork ]; then + echo $'Unable to install SSB Patchwork peer' + exit 783524 + fi + fi + rm $rootdir/usr/bin/install_patchwork +} + initialise_mesh() { if [[ $VARIANT != "mesh"* ]]; then return @@ -597,6 +618,7 @@ initialise_mesh() { install_tomb #install_tahoelafs #install_librevault + install_patchwork install_ipfs install_tox install_web_server From 15de7db0ea8e3b43752bd0ab897c74fc6ce1a8d6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 14:05:58 +0100 Subject: [PATCH 03/35] install --- src/freedombone-image-customise | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 64a63e9d..aacb31da 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -562,8 +562,8 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= install_patchwork() { - chroot "$rootdir" apt-get g++ m4 libtool automake nodejs - chroot "$rootdir" apt-get libxext-dev libxtst-dev libxkbfile-dev + chroot "$rootdir" apt-get install g++ m4 libtool automake nodejs + chroot "$rootdir" apt-get install libxext-dev libxtst-dev libxkbfile-dev git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork cat < $rootdir/usr/bin/install_patchwork From 90e086eb88c127779dde2cbfd0304e006737f16a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 14:17:37 +0100 Subject: [PATCH 04/35] quiet --- src/freedombone-image-customise | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index aacb31da..60d14846 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -562,8 +562,8 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= install_patchwork() { - chroot "$rootdir" apt-get install g++ m4 libtool automake nodejs - chroot "$rootdir" apt-get install libxext-dev libxtst-dev libxkbfile-dev + chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs + chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork cat < $rootdir/usr/bin/install_patchwork From 6756137f150dec554e96e65405d535e5ef234aef Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 14:51:37 +0100 Subject: [PATCH 05/35] Install npm in mesh image --- src/freedombone-image-customise | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 60d14846..28746f33 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -564,6 +564,15 @@ INSTALLING_MESH= install_patchwork() { chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev + + wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh + if [ ! -f $rootdir/root/npm_install.sh ]; then + echo $'Unable to download npm installer' + exit 8793636 + fi + chroot "$rootdir" chmod +x /root/npm_install.sh + chroot "$rootdir" /root/npm_install.sh + git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork cat < $rootdir/usr/bin/install_patchwork From e58eef0651ff6a2f9bde2f7c20c47d73e421b17f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 16:04:12 +0100 Subject: [PATCH 06/35] Search for node --- src/freedombone-image-customise | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 28746f33..a2838cf7 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -562,9 +562,11 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= install_patchwork() { - chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs + chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev + chroot "$rootdir" which node + chroot "$rootdir" which nodejs wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh if [ ! -f $rootdir/root/npm_install.sh ]; then echo $'Unable to download npm installer' From 1fd767b7c31063016f08ed3982427a5f5d1a8f2b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 16:31:20 +0100 Subject: [PATCH 07/35] Check for presence of node --- src/freedombone-image-customise | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index a2838cf7..eacca2a8 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -565,8 +565,13 @@ install_patchwork() { chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev - chroot "$rootdir" which node - chroot "$rootdir" which nodejs + if [ -f $rootdir/usr/bin/nodejs ]; then + cp $rootdir/usr/bin/nodejs $rootdir/usr/bin/node + fi + if [ ! -f $rootdir/usr/bin/node ]; then + echo $'/usr/bin/node not found' + exit 7235728 + fi wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh if [ ! -f $rootdir/root/npm_install.sh ]; then echo $'Unable to download npm installer' From cd143fdefc5bb07ac7093c9c54e819b78664eefb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 18:50:14 +0100 Subject: [PATCH 08/35] Specify npm version --- src/freedombone-image-customise | 14 +++++++++----- src/freedombone-utils-nodejs | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index eacca2a8..b4ee1684 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -572,13 +572,17 @@ install_patchwork() { echo $'/usr/bin/node not found' exit 7235728 fi - wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh - if [ ! -f $rootdir/root/npm_install.sh ]; then - echo $'Unable to download npm installer' - exit 8793636 + if [ -f /usr/share/npm/bin/npm-cli.js ]; then + ln -s /usr/share/npm/bin/npm-cli.js /usr/bin/npm + else + wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh + if [ ! -f $rootdir/root/npm_install.sh ]; then + echo $'Unable to download npm installer' + exit 8793636 + fi fi chroot "$rootdir" chmod +x /root/npm_install.sh - chroot "$rootdir" /root/npm_install.sh + chroot "$rootdir" /root/npm_install.sh $NPM_VERSION git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 8155d8f0..78d9ce4b 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -35,7 +35,7 @@ VARIANTS='mesh' # change these versions at your peril. Things will often crash if you don't # have specifically the correct versions -NODEJS_VERSION='6.10.1' +NODEJS_VERSION='6.11.3' NODEJS_N_VERSION='2.1.7' NPM_VERSION='4.0.5' From 0c0e2b9ecc7a033a5e05fc422fecb465f1956254 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 18:52:55 +0100 Subject: [PATCH 09/35] Tidying --- src/freedombone-image-customise | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index b4ee1684..834be2f7 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -580,9 +580,9 @@ install_patchwork() { echo $'Unable to download npm installer' exit 8793636 fi + chroot "$rootdir" chmod +x /root/npm_install.sh + chroot "$rootdir" /root/npm_install.sh $NPM_VERSION fi - chroot "$rootdir" chmod +x /root/npm_install.sh - chroot "$rootdir" /root/npm_install.sh $NPM_VERSION git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork From c6b7001cab691298d7a34d7e613a4d8f064a55b1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 19:41:14 +0100 Subject: [PATCH 10/35] npm version --- src/freedombone-image-customise | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 834be2f7..76555c33 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -581,7 +581,7 @@ install_patchwork() { exit 8793636 fi chroot "$rootdir" chmod +x /root/npm_install.sh - chroot "$rootdir" /root/npm_install.sh $NPM_VERSION + chroot "$rootdir" npm_install=$NPM_VERSION /root/npm_install.sh fi git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork From 164481ce2e29da4efc5950320d0fbbc6d67bf332 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 20:00:46 +0100 Subject: [PATCH 11/35] Different way of setting the npm version --- src/freedombone-image-customise | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 76555c33..81d833d0 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -581,7 +581,8 @@ install_patchwork() { exit 8793636 fi chroot "$rootdir" chmod +x /root/npm_install.sh - chroot "$rootdir" npm_install=$NPM_VERSION /root/npm_install.sh + sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh + chroot "$rootdir" /root/npm_install.sh fi git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork From 575f0b29e8279cf39c52aa221df2bcf85e01b4b1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 22:16:12 +0100 Subject: [PATCH 12/35] Install electron for SSB on mesh --- src/freedombone-image-customise | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 81d833d0..f2026c1a 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -585,6 +585,8 @@ install_patchwork() { chroot "$rootdir" /root/npm_install.sh fi + chroot "$rootdir" npm install electron-prebuilt -g + git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork cat < $rootdir/usr/bin/install_patchwork From 223d0b7dcb4aaf3d02c301aff4b5e8f305741e66 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Sep 2017 22:29:34 +0100 Subject: [PATCH 13/35] Electron version --- src/freedombone-image-customise | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index f2026c1a..f192fe51 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -585,7 +585,7 @@ install_patchwork() { chroot "$rootdir" /root/npm_install.sh fi - chroot "$rootdir" npm install electron-prebuilt -g + chroot "$rootdir" npm install electron@1.7.6 -g git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork From 3555879d7c3319aa464ffb5455ac0a3ec1163e41 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 13 Sep 2017 19:22:04 +0100 Subject: [PATCH 14/35] global --- src/freedombone-image-customise | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index f192fe51..2bb4464c 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -585,14 +585,12 @@ install_patchwork() { chroot "$rootdir" /root/npm_install.sh fi - chroot "$rootdir" npm install electron@1.7.6 -g - git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork cat < $rootdir/usr/bin/install_patchwork #!/bin/bash cd /etc/patchwork -npm install +npm install -g EOF chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork chroot "$rootdir" /usr/bin/install_patchwork From 370561d40f6dfbba4c1ab6d50fffbe421f1156bd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 13 Sep 2017 20:10:28 +0100 Subject: [PATCH 15/35] Tidying of mesh install of nodejs --- src/freedombone-image-customise | 25 +---------------- src/freedombone-utils-nodejs | 50 +++++++++++++++------------------ 2 files changed, 24 insertions(+), 51 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 2bb4464c..70a95345 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -562,29 +562,6 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= install_patchwork() { - chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl - chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev - - if [ -f $rootdir/usr/bin/nodejs ]; then - cp $rootdir/usr/bin/nodejs $rootdir/usr/bin/node - fi - if [ ! -f $rootdir/usr/bin/node ]; then - echo $'/usr/bin/node not found' - exit 7235728 - fi - if [ -f /usr/share/npm/bin/npm-cli.js ]; then - ln -s /usr/share/npm/bin/npm-cli.js /usr/bin/npm - else - wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh - if [ ! -f $rootdir/root/npm_install.sh ]; then - echo $'Unable to download npm installer' - exit 8793636 - fi - chroot "$rootdir" chmod +x /root/npm_install.sh - sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh - chroot "$rootdir" /root/npm_install.sh - fi - git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork cat < $rootdir/usr/bin/install_patchwork @@ -1506,12 +1483,12 @@ admin_user_sudo create_generic_image atheros_wifi continue_installation +image_install_nodejs initialise_mesh configure_wifi configure_user_interface image_setup_utils image_install_inadyn -image_install_nodejs image_preinstall_repos # remove downloaded packages diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 78d9ce4b..4fdb4a4c 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -44,39 +44,35 @@ NPM_VERSION='4.0.5' NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps function mesh_install_nodejs { - # Note: this has to be jessie for now - wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > ${rootdir}/root/node.gpg.key - chroot "${rootdir}" apt-key add /root/node.gpg.key - echo "deb https://deb.nodesource.com/node_6.x jessie main" > ${rootdir}/etc/apt/sources.list.d/nodesource.list - echo "deb-src https://deb.nodesource.com/node_6.x jessie main" >> ${rootdir}/etc/apt/sources.list.d/nodesource.list - chroot "${rootdir}" apt-get update - chroot "${rootdir}" apt-get -yq install nodejs curl + chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl + chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev if [ ! -f ${rootdir}/usr/bin/nodejs ]; then echo $'nodejs was not installed' exit 63962 fi - # TODO this doesn't work -# cat < ${rootdir}/root/install-nodejs.sh -##!/bin/bash -#npm install -g npm@${NPM_VERSION} --save -#npm install -g n@${NODEJS_N_VERSION} --save -#n ${NODEJS_VERSION} -#npm install -g pug@2.0.0-beta6 --save -#npm install -g graceful-fs@4.1.10 --save -#npm install -g minimatch@3.0.3 --save -#npm install -g npm@${NPM_VERSION} --save -#cp /usr/local/bin/node /usr/bin/nodejs -#cp /usr/local/bin/npm /usr/bin/npm -#EOF -# chroot "${rootdir}" chmod +x /root/install-nodejs.sh -# chroot "${rootdir}" /root/install-nodejs.sh -# if [ ! "$?" = "0" ]; then -# chroot "${rootdir}" rm -f /root/install-nodejs.sh -# exit 7632572 -# fi -# chroot "${rootdir}" rm -f /root/install-nodejs.sh + if [ -f $rootdir/usr/bin/nodejs ]; then + cp $rootdir/usr/bin/nodejs $rootdir/usr/bin/node + fi + + if [ ! -f $rootdir/usr/bin/node ]; then + echo $'/usr/bin/node not found' + exit 7235728 + fi + + if [ -f /usr/share/npm/bin/npm-cli.js ]; then + ln -s /usr/share/npm/bin/npm-cli.js /usr/bin/npm + else + wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh + if [ ! -f $rootdir/root/npm_install.sh ]; then + echo $'Unable to download npm installer' + exit 8793636 + fi + chroot "$rootdir" chmod +x /root/npm_install.sh + sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh + chroot "$rootdir" /root/npm_install.sh + fi } function remove_nodejs { From 4bef56f305f62c7f9c0cd0295bfbd72e45d2a5d9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 13 Sep 2017 22:19:19 +0100 Subject: [PATCH 16/35] Try to install electron --- src/freedombone-image-customise | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 70a95345..1c53be70 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -567,7 +567,8 @@ install_patchwork() { cat < $rootdir/usr/bin/install_patchwork #!/bin/bash cd /etc/patchwork -npm install -g +npm install electron --save-dev --save-exact +npm install EOF chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork chroot "$rootdir" /usr/bin/install_patchwork From 34f82b7d5710f6f2f24e0c4c0a1679f9bd8ad8c2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 13 Sep 2017 22:54:56 +0100 Subject: [PATCH 17/35] Set npm architecture --- src/freedombone-image-customise | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 1c53be70..21980956 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -567,6 +567,7 @@ install_patchwork() { cat < $rootdir/usr/bin/install_patchwork #!/bin/bash cd /etc/patchwork +echo 'npm_config_arch=ia32' > ~/.npmrc npm install electron --save-dev --save-exact npm install EOF From bee662a55d202b41697329b535c930a8d58e7ecf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 13 Sep 2017 23:14:21 +0100 Subject: [PATCH 18/35] Different architecture specification method --- src/freedombone-image-customise | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 21980956..7bb3c4ed 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -567,8 +567,7 @@ install_patchwork() { cat < $rootdir/usr/bin/install_patchwork #!/bin/bash cd /etc/patchwork -echo 'npm_config_arch=ia32' > ~/.npmrc -npm install electron --save-dev --save-exact +npm install --arch=ia32 electron npm install EOF chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork From 15b6762f79a37bb80f0c1852b63cdd5abdcfeb7d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 14 Sep 2017 12:28:14 +0100 Subject: [PATCH 19/35] npm architecture --- src/freedombone-image-customise | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 7bb3c4ed..de95e087 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -562,13 +562,21 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= install_patchwork() { + NPM_ARCH='ia32' + if [[ $ARCHITECTURE == 'arm'* ]]; then + NPM_ARCH='armv7l' + fi + if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then + NPM_ARCH='x64' + fi + git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork cat < $rootdir/usr/bin/install_patchwork #!/bin/bash cd /etc/patchwork -npm install --arch=ia32 electron -npm install +npm install --arch=$NPM_ARCH electron +npm install --arch=$NPM_ARCH EOF chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork chroot "$rootdir" /usr/bin/install_patchwork From 33fe399457d154ad7dbabaa96711cd0f62ce913a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 14 Sep 2017 13:19:30 +0100 Subject: [PATCH 20/35] Update node version on mesh build --- src/freedombone-image-customise | 8 +------- src/freedombone-utils-nodejs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index de95e087..42114ee3 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -562,13 +562,7 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= install_patchwork() { - NPM_ARCH='ia32' - if [[ $ARCHITECTURE == 'arm'* ]]; then - NPM_ARCH='armv7l' - fi - if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then - NPM_ARCH='x64' - fi + get_npm_arch git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 4fdb4a4c..ed680ed6 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -43,6 +43,16 @@ NPM_VERSION='4.0.5' # so that it can be removed if tere are no apps which need it NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps +function get_npm_arch { + NPM_ARCH='ia32' + if [[ $ARCHITECTURE == 'arm'* ]]; then + NPM_ARCH='armv7l' + fi + if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then + NPM_ARCH='x64' + fi +} + function mesh_install_nodejs { chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev @@ -73,6 +83,14 @@ function mesh_install_nodejs { sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh chroot "$rootdir" /root/npm_install.sh fi + if [ ! -f $rootdir/usr/bin/npm ]; then + echo $'npm was not installed' + exit 5290462 + fi + + # update from the old debian nodejs version + get_npm_arch + chroot "$rootdir" npm install --arch=$NPM_ARCH node@$NODEJS_VERSION -g } function remove_nodejs { From 388f3d61688b98e54ea7d517073f1aaa480a8c44 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 14 Sep 2017 13:34:22 +0100 Subject: [PATCH 21/35] Set n architecture --- src/freedombone-utils-nodejs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index ed680ed6..9f0290a8 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -44,12 +44,15 @@ NPM_VERSION='4.0.5' NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps function get_npm_arch { + N_ARCH='x86' NPM_ARCH='ia32' if [[ $ARCHITECTURE == 'arm'* ]]; then NPM_ARCH='armv7l' + N_ARCH='arm' fi if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then NPM_ARCH='x64' + N_ARCH='x64' fi } @@ -90,7 +93,8 @@ function mesh_install_nodejs { # update from the old debian nodejs version get_npm_arch - chroot "$rootdir" npm install --arch=$NPM_ARCH node@$NODEJS_VERSION -g + chroot "$rootdir" npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save + chroot "$rootdir" n --arch $N_ARCH ${NODEJS_VERSION} } function remove_nodejs { From 052e01be4d08c326fdab704aa161e6bfcde6a43a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 14 Sep 2017 17:18:51 +0100 Subject: [PATCH 22/35] Ensure npm version doesn't get reverted --- src/freedombone-utils-nodejs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 9f0290a8..ed109acf 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -95,6 +95,7 @@ function mesh_install_nodejs { get_npm_arch chroot "$rootdir" npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save chroot "$rootdir" n --arch $N_ARCH ${NODEJS_VERSION} + chroot "$rootdir" npm install -g --arch $NPM_ARCH npm@${NPM_VERSION} --save } function remove_nodejs { From c4a8f8718f0c881ee394be92a90eb7e32dba0c06 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 14 Sep 2017 17:20:50 +0100 Subject: [PATCH 23/35] Include leveldown --- src/freedombone-image-customise | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 42114ee3..77871a45 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -569,8 +569,9 @@ install_patchwork() { cat < $rootdir/usr/bin/install_patchwork #!/bin/bash cd /etc/patchwork -npm install --arch=$NPM_ARCH electron -npm install --arch=$NPM_ARCH +npm install --arch=$NPM_ARCH electron --save -g +npm install --arch=$NPM_ARCH leveldown --save -g +npm install --arch=$NPM_ARCH --save -g EOF chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork chroot "$rootdir" /usr/bin/install_patchwork From ea29e62157979ddcec7c032ecf2304b131a0be03 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 15 Sep 2017 10:28:18 +0100 Subject: [PATCH 24/35] Question about clearnet domains #71 --- doc/EN/faq.org | 3 + src/freedombone-image-customise | 7 +- website/EN/faq.html | 260 +++++++++++++++++--------------- 3 files changed, 143 insertions(+), 127 deletions(-) diff --git a/doc/EN/faq.org b/doc/EN/faq.org index 61dfcebb..7d4bdada 100644 --- a/doc/EN/faq.org +++ b/doc/EN/faq.org @@ -24,6 +24,7 @@ | [[Why not support building images for Raspberry Pi?]] | | [[Why use Tor? I've heard it's used by bad people]] | | [[How is Tor integrated with Freedombone?]] | +| Can I add a clearnet domain to an onion build? | | [[Why use Github?]] | | [[Keys and emails should not be stored on servers. Why do you do that?]] | | [[./mirrors.html][I have a question about mirrors or upstream repositories]] | @@ -100,6 +101,8 @@ Tor is installed by default, but it's not configured as a relay or exit node. Fr When you install an app you will be able to access it from its onion address. Even if you're running the "onion only" build, this only means that sites are accessible via onion addresses. It doesn't mean that everything gets routed through Tor. If full anonymity is your aim then it's probably a good idea to just stick strictly to using TAILS. +* Can I add a clearnet domain to an onion build? +You could if you manually edited the relevant nginx configuration files and installed some dynamic DNS system yourself. If you already have sysadmin knowledge then that's probably not too hard. But the builds created with the *onion-addresses-only* option aren't really intended to support access via clearnet domains. * Why use Github? Github is paradoxically a centralized, closed and proprietary system which happens to mostly host free and open source projects. Up until now it has been relatively benign, but at some point in the name of "growth" it will likely start becoming more evil, or just become like SourceForge - which was also once much loved by FOSS developers, but turned into a den of malvertizing. diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 77871a45..af1d7e14 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -569,9 +569,10 @@ install_patchwork() { cat < $rootdir/usr/bin/install_patchwork #!/bin/bash cd /etc/patchwork -npm install --arch=$NPM_ARCH electron --save -g -npm install --arch=$NPM_ARCH leveldown --save -g -npm install --arch=$NPM_ARCH --save -g +npm install --arch=$NPM_ARCH electron +npm install --arch=$NPM_ARCH +#npm rebuild --arch=$NPM_ARCH leveldown +npm rebuild --arch=$NPM_ARCH EOF chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork chroot "$rootdir" /usr/bin/install_patchwork diff --git a/website/EN/faq.html b/website/EN/faq.html index 51893231..f27eade9 100644 --- a/website/EN/faq.html +++ b/website/EN/faq.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -257,35 +257,39 @@ for the JavaScript code in this tag. -What applications are supported? +What applications are supported? -I don't have a static IP address. Can I still install this system? +I don't have a static IP address. Can I still install this system? -Why Freedombone and not FreedomBox? +Why Freedombone and not FreedomBox? -Why not support building images for Raspberry Pi? +Why not support building images for Raspberry Pi? -Why use Tor? I've heard it's used by bad people +Why use Tor? I've heard it's used by bad people -How is Tor integrated with Freedombone? +How is Tor integrated with Freedombone? -Why use Github? +Can I add a clearnet domain to an onion build? -Keys and emails should not be stored on servers. Why do you do that? +Why use Github? + + + +Keys and emails should not be stored on servers. Why do you do that? @@ -293,103 +297,103 @@ for the JavaScript code in this tag. -Why can't I access my .onion site with a Tor browser? +Why can't I access my .onion site with a Tor browser? -What is the best hardware to run this system on? +What is the best hardware to run this system on? -Can I add more users to the system? +Can I add more users to the system? -Why not use Signal for mobile chat? +Why not use Signal for mobile chat? -What is the most secure chat app to use on mobile? +What is the most secure chat app to use on mobile? -How do I remove a user from the system? +How do I remove a user from the system? -Why is logging for web sites turned off by default? +Why is logging for web sites turned off by default? -How do I reset the tripwire? +How do I reset the tripwire? -Is metadata protected? +Is metadata protected? -How do I create email processing rules? +How do I create email processing rules? -Why isn't dynamic DNS working? +Why isn't dynamic DNS working? -How do I change my encryption settings? +How do I change my encryption settings? -How do I get a domain name? +How do I get a domain name? -How do I get a "real" SSL/TLS/HTTPS certificate? +How do I get a "real" SSL/TLS/HTTPS certificate? -How do I renew a Let's Encrypt certificate? +How do I renew a Let's Encrypt certificate? -I tried to renew a Let's Encrypt certificate and it failed. What should I do? +I tried to renew a Let's Encrypt certificate and it failed. What should I do? -Why not use the services of $company instead? They took the Seppuku pledge +Why not use the services of $company instead? They took the Seppuku pledge -Why does my email keep getting rejected as spam by Gmail/etc? +Why does my email keep getting rejected as spam by Gmail/etc? -Tor is censored/blocked in my area. What can I do? +Tor is censored/blocked in my area. What can I do? -I want to block a particular domain from getting its content into my social network sites +I want to block a particular domain from getting its content into my social network sites -The mesh system doesn't boot from USB drive +The mesh system doesn't boot from USB drive -
-

What applications are supported?

-
+
+

What applications are supported?

+

See here for the complete list of apps. In addition to those as part of the base install you get an email server.

-
-

I don't have a static IP address. Can I still install this system?

-
+
+

I don't have a static IP address. Can I still install this system?

+

Yes. The minimum requirements are to have some hardware that you can install Debian onto and also that you have administrator access to your internet router so that you can forward ports to the system which has Freedombone installed.

@@ -399,17 +403,17 @@ The lack of a static IP address can be worked around by using a dynamic DNS serv

-
-

Why Freedombone and not FreedomBox?

-
+
+

Why Freedombone and not FreedomBox?

+

When the project began in late 2013 the FreedomBox project seemed to be going nowhere, and was only designed to work with the DreamPlug hardware. There was some new hardware out - the Beaglebone Black - which could run Debian and was also a free hardware design so seemed more appropriate. Hence the name "Freedombone", being like FreedomBox but on a Beaglebone. There are some similarities and differences between the two projects:

-
-

Similarities

-
+
+

Similarities

+
  • Uses freedom-maker and vmdebootstrap to build debian images
  • Supports the use of Tor onion addresses to access websites
  • @@ -423,9 +427,9 @@ When the project began in late 2013 the FreedomBox project seemed to be going no
-
-

Differences

-
+
+

Differences

+
  • FreedomBox is a Debian pure blend. Freedombone is not
  • Freedombone only supports Free Software. FreedomBox includes some closed binary boot blobs for certain ARM boards
  • @@ -440,9 +444,9 @@ When the project began in late 2013 the FreedomBox project seemed to be going no
-
-

Why not support building images for Raspberry Pi?

-
+
+

Why not support building images for Raspberry Pi?

+

The FreedomBox project supports Raspberry Pi builds, and the image build system for Freedombone is based on the same system. However, although the Raspberry Pi can run a version of Debian it requires a closed proprietary blob in order to boot the hardware. Who knows what that blob might contain or what exploits it could facilitate. From an adversarial point of view if you were trying to deliver "bulk equipment interference" then it doesn't get any better than piggybacking on something which has control of the boot process, and hence all subsequently run processes.

@@ -452,9 +456,9 @@ So although the Raspberry Pi is cheap and hugely popular it's not supported by t

-
-

Why use Tor? I've heard it's used by bad people

-
+
+

Why use Tor? I've heard it's used by bad people

+

Before you run screaming for the hills based upon whatever scare story you may have just read in the mainstream media there are a few things worthy of consideration. Tor is installed by default on Freedombone, but not as a relay or exit node. It's only used to provide onion addresses so that this gives you or the viewers of your sites some choice about how they access the information. It also allows you to subscribe to and read RSS feeds privately.

@@ -472,9 +476,9 @@ The media may also have sold you torrid tales about individual Tor project devel

-
-

How is Tor integrated with Freedombone?

-
+
+

How is Tor integrated with Freedombone?

+

Within this project Tor is used more to provide accessibility than the anonymity factor for which Tor is better known. The onion address system provides a way of being able to access sites even if you don't own a conventional domain name or don't have administrator access to your local internet router to be able to do port forwarding.

@@ -492,9 +496,17 @@ Even if you're running the "onion only" build, this only means that sites are ac

-
-

Why use Github?

-
+
+

Can I add a clearnet domain to an onion build?

+
+

+You could if you manually edited the relevant nginx configuration files and installed some dynamic DNS system yourself. If you already have sysadmin knowledge then that's probably not too hard. But the builds created with the onion-addresses-only option aren't really intended to support access via clearnet domains. +

+
+
+
+

Why use Github?

+

Github is paradoxically a centralized, closed and proprietary system which happens to mostly host free and open source projects. Up until now it has been relatively benign, but at some point in the name of "growth" it will likely start becoming more evil, or just become like SourceForge - which was also once much loved by FOSS developers, but turned into a den of malvertizing.

@@ -512,9 +524,9 @@ Currently many of the repositories used for applications which are not yet packa

-
-

Keys and emails should not be stored on servers. Why do you do that?

-
+
+

Keys and emails should not be stored on servers. Why do you do that?

+

Ordinarily this is good advice. However, the threat model for a device in your home is different from the one for a generic server in a massive warehouse. Compare and contrast:

@@ -572,9 +584,9 @@ In the home environment a box with a good firewall and no GUI components install
-
-

Why can't I access my .onion site with a Tor browser?

-
+
+

Why can't I access my .onion site with a Tor browser?

+

Probably you need to add the site to the NoScript whitelist. Typically click/press on the noscript icon (or select from the menu on mobile) then select whitelist and add the site URL. You may also need to disable HTTPS Everywhere when using onion addresses, which don't use https.

@@ -584,9 +596,9 @@ Another factor to be aware of is that it can take a while for the onion address

-
-

What is the best hardware to run this system on?

-
+
+

What is the best hardware to run this system on?

+

It was originally designed to run on the Beaglebone Black, but that should be regarded as the most minimal system, because it's single core and has by today's standards a small amount of memory. Obviously the more powerful the hardware is the faster things like web pages (blog, social networking, etc) will be served but the more electricity such a system will require if you're running it 24/7. A good compromise between performance and energy consumption is something like an old netbook. The battery of an old netbook or laptop even gives you UPS capability to keep the system going during brief power outages or cable re-arrangements, and that means using full disk encryption on the server also becomes more practical.

@@ -596,9 +608,9 @@ It was originally designed to run on the Beaglebone Black, but that should be re

-
-

Can I add more users to the system?

-
+
+

Can I add more users to the system?

+

Yes. Freedombone can support a small number of users, for a "friends and family" type of home installation. This gives them access to an email account, XMPP, SIP phone and the blog (depending on whether the variant which you installed includes those).

@@ -621,9 +633,9 @@ Another point is that Freedombone installations are not intended to support many

-
-

Why not use Signal for mobile chat?

-
+
+

Why not use Signal for mobile chat?

+

Celebrities recommend Signal. It's Free Software so it must be good, right?

@@ -646,9 +658,9 @@ To give credit where it's due Signal is good, but it could be a lot better. The

-
-

What is the most secure chat app to use on mobile?

-
+
+

What is the most secure chat app to use on mobile?

+

On mobile there are various options. The apps which are likely to be most secure are ones which have end-to-end encryption enabled by default and which can also be onion routed via Orbot. End-to-end encryption secures the content of the message and onion routing obscures the metadata, making it hard for a passive adversary to know who is communicating with who.

@@ -658,13 +670,13 @@ The current safest way to chat is to use Conv

-There are many other fashionable chat apps with end-to-end security, but often they are closed source, have a single central server or can't be onion routed. It's also important to remember that closed source chat apps should be assumed to be untrustworthy, since their security cannot be independently verified. +There are many other fashionable chat apps with end-to-end security, but often they are closed source, have a single central server or can't be onion routed. It's also important to remember that closed source chat apps should be assumed to be untrustworthy, since their security cannot be independently verified.

-
-

How do I remove a user from the system?

-
+
+

How do I remove a user from the system?

+

To remove a user:

@@ -679,9 +691,9 @@ Select Administrator controls then Manage Users and then Delete

-
-

Why is logging for web sites turned off by default?

-
+
+

Why is logging for web sites turned off by default?

+

If you're making profits out of the logs by running large server warehouses and then data mining what users click on - as is the business model of well known internet companies - then logging everything makes total sense. However, if you're running a home server then logging really only makes sense if you're trying to diagnose some specific problem with the system, and outside of that context logging everything becomes more of a liability than an asset.

@@ -695,9 +707,9 @@ On the Freedombone system web logs containing IP addresses are turned off by def

-
-

How do I reset the tripwire?

-
+
+

How do I reset the tripwire?

+

The tripwire will be automatically reset once per week. If you want to reset it earlier then do the following:

@@ -712,9 +724,9 @@ Select Administrator controls then "reset tripwire" using cursors and spa

-
-

Is metadata protected?

-
+
+

Is metadata protected?

+

"We kill people based on metadata" @@ -730,9 +742,9 @@ Even when using Freedombone metadata analysis by third parties is still possible

-
-

How do I create email processing rules?

-
+
+

How do I create email processing rules?

+
ssh username@domainname -p 2222
 
@@ -788,9 +800,9 @@ Spamassassin is also available and within Mutt you can use the S (shift+s) key t

-
-

Why isn't dynamic DNS working?

-
+
+

Why isn't dynamic DNS working?

+

If you run the command:

@@ -813,9 +825,9 @@ https://www.privateinternetaccess.com/pages/whats-my-ip/
-
-

How do I change my encryption settings?

-
+
+

How do I change my encryption settings?

+

Suppose that some new encryption vulnerability has been announced and that you need to change your encryption settings. Maybe an algorithm thought to be secure is now no longer so and you need to remove it. You can change your settings by doing the following:

@@ -830,9 +842,9 @@ Select Administrator controls then select Security Settings. You w

-
-

How do I get a domain name?

-
+
+

How do I get a domain name?

+

Suppose that you have bought a domain name (rather than using a free subdomain on freedns) and you want to use that instead.

@@ -896,9 +908,9 @@ You should now be able to send an email from postmaster@mynewdomainname a
-
-

How do I get a "real" SSL/TLS/HTTPS certificate?

-
+
+

How do I get a "real" SSL/TLS/HTTPS certificate?

+

If you did the full install or selected the social variant then the system will have tried to obtain a Let's Encrypt certificate automatically during the install process. If this failed for any reason, or if you have created a new site which you need a certificate for then do the following:

@@ -917,9 +929,9 @@ One thing to be aware of is that Let's Encrypt doesn't support many dynamic DNS

-
-

How do I renew a Let's Encrypt certificate?

-
+
+

How do I renew a Let's Encrypt certificate?

+

Normally certificates will be automatically renewed once per month, so you don't need to be concerned about it. If anything goes wrong with the automatic renewal then you should receive a warning email.

@@ -938,9 +950,9 @@ Select Administrator controls then Security settings then Renew

-
-

I tried to renew a Let's Encrypt certificate and it failed. What should I do?

-
+
+

I tried to renew a Let's Encrypt certificate and it failed. What should I do?

+

Most likely it's because Let's Encrypt doesn't support your particular domain or subdomain. Currently free subdomains tend not to work. You'll need to buy a domain name, link it to your dynamic DNS account and then do:

@@ -955,17 +967,17 @@ Select Administrator controls then Security settings then Creat

-
-

Why not use the services of $company instead? They took the Seppuku pledge

-
+
+

Why not use the services of $company instead? They took the Seppuku pledge

+

That pledge is utterly worthless. Years ago people trusted Google in the same sort of way, because they promised not be be evil and because a lot of the engineers working for them seemed like honest types who were "on our side". Post-nymwars and post-PRISM we know exactly how much Google cared about the privacy and security of its users. But Google is only one particular example. In general don't trust pledges made by companies, even if the people running them seem really sincere.

-
-

Why does my email keep getting rejected as spam by Gmail/etc?

-
+
+

Why does my email keep getting rejected as spam by Gmail/etc?

+

Welcome to the world of email. Email is really the archetypal decentralized service, developed during the early days of the internet. In principle anyone can run an email server, and that's exactly what you're doing with Freedombone. Email is very useful, but it has a big problem, and that's that the protocols are totally insecure. That made it easy for spammers to do their thing, and in response highly elaborate spam filtering and blocking systems were developed. Chances are that your emails are being blocked in this way. Sometimes the blocking is so indisciminate that entire countries are excluded. What can you do about it? Unless you control the block list at the receiving end you may not be able to do much unless you can find an email proxy server which is trusted by the receiving server.

@@ -996,9 +1008,9 @@ So the situation with email presently is pretty bad, and there's a clear selecti

-
-

Tor is censored/blocked in my area. What can I do?

-
+
+

Tor is censored/blocked in my area. What can I do?

+

If you can find some details for an obfs4 Tor bridge (its IP address, port number and key or nickname) then you can set up the system to use it to connect to the Tor network. Unlike relay nodes the IP addresses for bridges are not public information and so can't be easily known and added to block lists by authoritarian regimes or over-zealous ISPs.

@@ -1029,9 +1041,9 @@ Return to the home page
-
-

I want to block a particular domain from getting its content into my social network sites

-
+
+

I want to block a particular domain from getting its content into my social network sites

+

If you're being pestered by some domain which contains bad/illegal/harrassing content or irritating users you can block domains at the firewall level. Go to the administrator control panel and select domain blocking. You can then block, unblock and view the list of blocked domains.

@@ -1046,9 +1058,9 @@ Select Administrator controls then Domain blocking.
-
-

The mesh system doesn't boot from USB drive

-
+
+

The mesh system doesn't boot from USB drive

+

If the system doesn't boot and reports an error which includes /dev/mapper/loop0p1 then reboot with Ctrl-Alt-Del and when you see the grub menu press e and manually change /dev/mapper/loop0p1 to /dev/sdb1, then press Ctrl-x. If that doesn't work then reboot and try /dev/sdc1 instead.

From 338dbbe3f992470be5524f900e71968b7217f7ef Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 15 Sep 2017 10:29:51 +0100 Subject: [PATCH 25/35] Add link --- doc/EN/faq.org | 2 +- website/EN/faq.html | 256 ++++++++++++++++++++++---------------------- 2 files changed, 129 insertions(+), 129 deletions(-) diff --git a/doc/EN/faq.org b/doc/EN/faq.org index 7d4bdada..634258b9 100644 --- a/doc/EN/faq.org +++ b/doc/EN/faq.org @@ -24,7 +24,7 @@ | [[Why not support building images for Raspberry Pi?]] | | [[Why use Tor? I've heard it's used by bad people]] | | [[How is Tor integrated with Freedombone?]] | -| Can I add a clearnet domain to an onion build? | +| [[Can I add a clearnet domain to an onion build?]] | | [[Why use Github?]] | | [[Keys and emails should not be stored on servers. Why do you do that?]] | | [[./mirrors.html][I have a question about mirrors or upstream repositories]] | diff --git a/website/EN/faq.html b/website/EN/faq.html index f27eade9..8ee8d73d 100644 --- a/website/EN/faq.html +++ b/website/EN/faq.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -257,39 +257,39 @@ for the JavaScript code in this tag. -What applications are supported? +What applications are supported? -I don't have a static IP address. Can I still install this system? +I don't have a static IP address. Can I still install this system? -Why Freedombone and not FreedomBox? +Why Freedombone and not FreedomBox? -Why not support building images for Raspberry Pi? +Why not support building images for Raspberry Pi? -Why use Tor? I've heard it's used by bad people +Why use Tor? I've heard it's used by bad people -How is Tor integrated with Freedombone? +How is Tor integrated with Freedombone? -Can I add a clearnet domain to an onion build? +Can I add a clearnet domain to an onion build? -Why use Github? +Why use Github? -Keys and emails should not be stored on servers. Why do you do that? +Keys and emails should not be stored on servers. Why do you do that? @@ -297,103 +297,103 @@ for the JavaScript code in this tag. -Why can't I access my .onion site with a Tor browser? +Why can't I access my .onion site with a Tor browser? -What is the best hardware to run this system on? +What is the best hardware to run this system on? -Can I add more users to the system? +Can I add more users to the system? -Why not use Signal for mobile chat? +Why not use Signal for mobile chat? -What is the most secure chat app to use on mobile? +What is the most secure chat app to use on mobile? -How do I remove a user from the system? +How do I remove a user from the system? -Why is logging for web sites turned off by default? +Why is logging for web sites turned off by default? -How do I reset the tripwire? +How do I reset the tripwire? -Is metadata protected? +Is metadata protected? -How do I create email processing rules? +How do I create email processing rules? -Why isn't dynamic DNS working? +Why isn't dynamic DNS working? -How do I change my encryption settings? +How do I change my encryption settings? -How do I get a domain name? +How do I get a domain name? -How do I get a "real" SSL/TLS/HTTPS certificate? +How do I get a "real" SSL/TLS/HTTPS certificate? -How do I renew a Let's Encrypt certificate? +How do I renew a Let's Encrypt certificate? -I tried to renew a Let's Encrypt certificate and it failed. What should I do? +I tried to renew a Let's Encrypt certificate and it failed. What should I do? -Why not use the services of $company instead? They took the Seppuku pledge +Why not use the services of $company instead? They took the Seppuku pledge -Why does my email keep getting rejected as spam by Gmail/etc? +Why does my email keep getting rejected as spam by Gmail/etc? -Tor is censored/blocked in my area. What can I do? +Tor is censored/blocked in my area. What can I do? -I want to block a particular domain from getting its content into my social network sites +I want to block a particular domain from getting its content into my social network sites -The mesh system doesn't boot from USB drive +The mesh system doesn't boot from USB drive
-
-

What applications are supported?

-
+
+

What applications are supported?

+

See here for the complete list of apps. In addition to those as part of the base install you get an email server.

-
-

I don't have a static IP address. Can I still install this system?

-
+
+

I don't have a static IP address. Can I still install this system?

+

Yes. The minimum requirements are to have some hardware that you can install Debian onto and also that you have administrator access to your internet router so that you can forward ports to the system which has Freedombone installed.

@@ -403,17 +403,17 @@ The lack of a static IP address can be worked around by using a dynamic DNS serv

-
-

Why Freedombone and not FreedomBox?

-
+
+

Why Freedombone and not FreedomBox?

+

When the project began in late 2013 the FreedomBox project seemed to be going nowhere, and was only designed to work with the DreamPlug hardware. There was some new hardware out - the Beaglebone Black - which could run Debian and was also a free hardware design so seemed more appropriate. Hence the name "Freedombone", being like FreedomBox but on a Beaglebone. There are some similarities and differences between the two projects:

-
-

Similarities

-
+
+

Similarities

+
  • Uses freedom-maker and vmdebootstrap to build debian images
  • Supports the use of Tor onion addresses to access websites
  • @@ -427,9 +427,9 @@ When the project began in late 2013 the FreedomBox project seemed to be going no
-
-

Differences

-
+
+

Differences

+
  • FreedomBox is a Debian pure blend. Freedombone is not
  • Freedombone only supports Free Software. FreedomBox includes some closed binary boot blobs for certain ARM boards
  • @@ -444,9 +444,9 @@ When the project began in late 2013 the FreedomBox project seemed to be going no
-
-

Why not support building images for Raspberry Pi?

-
+
+

Why not support building images for Raspberry Pi?

+

The FreedomBox project supports Raspberry Pi builds, and the image build system for Freedombone is based on the same system. However, although the Raspberry Pi can run a version of Debian it requires a closed proprietary blob in order to boot the hardware. Who knows what that blob might contain or what exploits it could facilitate. From an adversarial point of view if you were trying to deliver "bulk equipment interference" then it doesn't get any better than piggybacking on something which has control of the boot process, and hence all subsequently run processes.

@@ -456,9 +456,9 @@ So although the Raspberry Pi is cheap and hugely popular it's not supported by t

-
-

Why use Tor? I've heard it's used by bad people

-
+
+

Why use Tor? I've heard it's used by bad people

+

Before you run screaming for the hills based upon whatever scare story you may have just read in the mainstream media there are a few things worthy of consideration. Tor is installed by default on Freedombone, but not as a relay or exit node. It's only used to provide onion addresses so that this gives you or the viewers of your sites some choice about how they access the information. It also allows you to subscribe to and read RSS feeds privately.

@@ -476,9 +476,9 @@ The media may also have sold you torrid tales about individual Tor project devel

-
-

How is Tor integrated with Freedombone?

-
+
+

How is Tor integrated with Freedombone?

+

Within this project Tor is used more to provide accessibility than the anonymity factor for which Tor is better known. The onion address system provides a way of being able to access sites even if you don't own a conventional domain name or don't have administrator access to your local internet router to be able to do port forwarding.

@@ -496,17 +496,17 @@ Even if you're running the "onion only" build, this only means that sites are ac

-
-

Can I add a clearnet domain to an onion build?

-
+
+

Can I add a clearnet domain to an onion build?

+

You could if you manually edited the relevant nginx configuration files and installed some dynamic DNS system yourself. If you already have sysadmin knowledge then that's probably not too hard. But the builds created with the onion-addresses-only option aren't really intended to support access via clearnet domains.

-
-

Why use Github?

-
+
+

Why use Github?

+

Github is paradoxically a centralized, closed and proprietary system which happens to mostly host free and open source projects. Up until now it has been relatively benign, but at some point in the name of "growth" it will likely start becoming more evil, or just become like SourceForge - which was also once much loved by FOSS developers, but turned into a den of malvertizing.

@@ -524,9 +524,9 @@ Currently many of the repositories used for applications which are not yet packa

-
-

Keys and emails should not be stored on servers. Why do you do that?

-
+
+

Keys and emails should not be stored on servers. Why do you do that?

+

Ordinarily this is good advice. However, the threat model for a device in your home is different from the one for a generic server in a massive warehouse. Compare and contrast:

@@ -584,9 +584,9 @@ In the home environment a box with a good firewall and no GUI components install
-
-

Why can't I access my .onion site with a Tor browser?

-
+
+

Why can't I access my .onion site with a Tor browser?

+

Probably you need to add the site to the NoScript whitelist. Typically click/press on the noscript icon (or select from the menu on mobile) then select whitelist and add the site URL. You may also need to disable HTTPS Everywhere when using onion addresses, which don't use https.

@@ -596,9 +596,9 @@ Another factor to be aware of is that it can take a while for the onion address

-
-

What is the best hardware to run this system on?

-
+
+

What is the best hardware to run this system on?

+

It was originally designed to run on the Beaglebone Black, but that should be regarded as the most minimal system, because it's single core and has by today's standards a small amount of memory. Obviously the more powerful the hardware is the faster things like web pages (blog, social networking, etc) will be served but the more electricity such a system will require if you're running it 24/7. A good compromise between performance and energy consumption is something like an old netbook. The battery of an old netbook or laptop even gives you UPS capability to keep the system going during brief power outages or cable re-arrangements, and that means using full disk encryption on the server also becomes more practical.

@@ -608,9 +608,9 @@ It was originally designed to run on the Beaglebone Black, but that should be re

-
-

Can I add more users to the system?

-
+
+

Can I add more users to the system?

+

Yes. Freedombone can support a small number of users, for a "friends and family" type of home installation. This gives them access to an email account, XMPP, SIP phone and the blog (depending on whether the variant which you installed includes those).

@@ -633,9 +633,9 @@ Another point is that Freedombone installations are not intended to support many

-
-

Why not use Signal for mobile chat?

-
+
+

Why not use Signal for mobile chat?

+

Celebrities recommend Signal. It's Free Software so it must be good, right?

@@ -658,9 +658,9 @@ To give credit where it's due Signal is good, but it could be a lot better. The

-
-

What is the most secure chat app to use on mobile?

-
+
+

What is the most secure chat app to use on mobile?

+

On mobile there are various options. The apps which are likely to be most secure are ones which have end-to-end encryption enabled by default and which can also be onion routed via Orbot. End-to-end encryption secures the content of the message and onion routing obscures the metadata, making it hard for a passive adversary to know who is communicating with who.

@@ -670,13 +670,13 @@ The current safest way to chat is to use Conv

-There are many other fashionable chat apps with end-to-end security, but often they are closed source, have a single central server or can't be onion routed. It's also important to remember that closed source chat apps should be assumed to be untrustworthy, since their security cannot be independently verified. +There are many other fashionable chat apps with end-to-end security, but often they are closed source, have a single central server or can't be onion routed. It's also important to remember that closed source chat apps should be assumed to be untrustworthy, since their security cannot be independently verified.

-
-

How do I remove a user from the system?

-
+
+

How do I remove a user from the system?

+

To remove a user:

@@ -691,9 +691,9 @@ Select Administrator controls then Manage Users and then Delete

-
-

Why is logging for web sites turned off by default?

-
+
+

Why is logging for web sites turned off by default?

+

If you're making profits out of the logs by running large server warehouses and then data mining what users click on - as is the business model of well known internet companies - then logging everything makes total sense. However, if you're running a home server then logging really only makes sense if you're trying to diagnose some specific problem with the system, and outside of that context logging everything becomes more of a liability than an asset.

@@ -707,9 +707,9 @@ On the Freedombone system web logs containing IP addresses are turned off by def

-
-

How do I reset the tripwire?

-
+
+

How do I reset the tripwire?

+

The tripwire will be automatically reset once per week. If you want to reset it earlier then do the following:

@@ -724,9 +724,9 @@ Select Administrator controls then "reset tripwire" using cursors and spa

-
-

Is metadata protected?

-
+
+

Is metadata protected?

+

"We kill people based on metadata" @@ -742,9 +742,9 @@ Even when using Freedombone metadata analysis by third parties is still possible

-
-

How do I create email processing rules?

-
+
+

How do I create email processing rules?

+
ssh username@domainname -p 2222
 
@@ -800,9 +800,9 @@ Spamassassin is also available and within Mutt you can use the S (shift+s) key t

-
-

Why isn't dynamic DNS working?

-
+
+

Why isn't dynamic DNS working?

+

If you run the command:

@@ -825,9 +825,9 @@ https://www.privateinternetaccess.com/pages/whats-my-ip/
-
-

How do I change my encryption settings?

-
+
+

How do I change my encryption settings?

+

Suppose that some new encryption vulnerability has been announced and that you need to change your encryption settings. Maybe an algorithm thought to be secure is now no longer so and you need to remove it. You can change your settings by doing the following:

@@ -842,9 +842,9 @@ Select Administrator controls then select Security Settings. You w

-
-

How do I get a domain name?

-
+
+

How do I get a domain name?

+

Suppose that you have bought a domain name (rather than using a free subdomain on freedns) and you want to use that instead.

@@ -908,9 +908,9 @@ You should now be able to send an email from postmaster@mynewdomainname a
-
-

How do I get a "real" SSL/TLS/HTTPS certificate?

-
+
+

How do I get a "real" SSL/TLS/HTTPS certificate?

+

If you did the full install or selected the social variant then the system will have tried to obtain a Let's Encrypt certificate automatically during the install process. If this failed for any reason, or if you have created a new site which you need a certificate for then do the following:

@@ -929,9 +929,9 @@ One thing to be aware of is that Let's Encrypt doesn't support many dynamic DNS

-
-

How do I renew a Let's Encrypt certificate?

-
+
+

How do I renew a Let's Encrypt certificate?

+

Normally certificates will be automatically renewed once per month, so you don't need to be concerned about it. If anything goes wrong with the automatic renewal then you should receive a warning email.

@@ -950,9 +950,9 @@ Select Administrator controls then Security settings then Renew

-
-

I tried to renew a Let's Encrypt certificate and it failed. What should I do?

-
+
+

I tried to renew a Let's Encrypt certificate and it failed. What should I do?

+

Most likely it's because Let's Encrypt doesn't support your particular domain or subdomain. Currently free subdomains tend not to work. You'll need to buy a domain name, link it to your dynamic DNS account and then do:

@@ -967,17 +967,17 @@ Select Administrator controls then Security settings then Creat

-
-

Why not use the services of $company instead? They took the Seppuku pledge

-
+
+

Why not use the services of $company instead? They took the Seppuku pledge

+

That pledge is utterly worthless. Years ago people trusted Google in the same sort of way, because they promised not be be evil and because a lot of the engineers working for them seemed like honest types who were "on our side". Post-nymwars and post-PRISM we know exactly how much Google cared about the privacy and security of its users. But Google is only one particular example. In general don't trust pledges made by companies, even if the people running them seem really sincere.

-
-

Why does my email keep getting rejected as spam by Gmail/etc?

-
+
+

Why does my email keep getting rejected as spam by Gmail/etc?

+

Welcome to the world of email. Email is really the archetypal decentralized service, developed during the early days of the internet. In principle anyone can run an email server, and that's exactly what you're doing with Freedombone. Email is very useful, but it has a big problem, and that's that the protocols are totally insecure. That made it easy for spammers to do their thing, and in response highly elaborate spam filtering and blocking systems were developed. Chances are that your emails are being blocked in this way. Sometimes the blocking is so indisciminate that entire countries are excluded. What can you do about it? Unless you control the block list at the receiving end you may not be able to do much unless you can find an email proxy server which is trusted by the receiving server.

@@ -1008,9 +1008,9 @@ So the situation with email presently is pretty bad, and there's a clear selecti

-
-

Tor is censored/blocked in my area. What can I do?

-
+
+

Tor is censored/blocked in my area. What can I do?

+

If you can find some details for an obfs4 Tor bridge (its IP address, port number and key or nickname) then you can set up the system to use it to connect to the Tor network. Unlike relay nodes the IP addresses for bridges are not public information and so can't be easily known and added to block lists by authoritarian regimes or over-zealous ISPs.

@@ -1041,9 +1041,9 @@ Return to the home page
-
-

I want to block a particular domain from getting its content into my social network sites

-
+
+

I want to block a particular domain from getting its content into my social network sites

+

If you're being pestered by some domain which contains bad/illegal/harrassing content or irritating users you can block domains at the firewall level. Go to the administrator control panel and select domain blocking. You can then block, unblock and view the list of blocked domains.

@@ -1058,9 +1058,9 @@ Select Administrator controls then Domain blocking.
-
-

The mesh system doesn't boot from USB drive

-
+
+

The mesh system doesn't boot from USB drive

+

If the system doesn't boot and reports an error which includes /dev/mapper/loop0p1 then reboot with Ctrl-Alt-Del and when you see the grub menu press e and manually change /dev/mapper/loop0p1 to /dev/sdb1, then press Ctrl-x. If that doesn't work then reboot and try /dev/sdc1 instead.

From 44d8d33d565f27e7408f73cbd93c89fe5dfb146e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 15 Sep 2017 19:21:09 +0100 Subject: [PATCH 26/35] Rebuild electron --- src/freedombone-image-customise | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index af1d7e14..8d20ea6b 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -561,18 +561,22 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= +PATCHWORK_REPO="https://github.com/ssbc/patchwork" +PATCHWORK_COMMIT='25cb5fbe705ef585e23e59387689122668c9c1b3' + install_patchwork() { get_npm_arch - git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork + git clone $PATCHWORK_REPO $rootdir/etc/patchwork + cd $rootdir/etc/patchwork + git checkout $PATCHWORK_COMMIT -b $PATCHWORK_COMMIT cat < $rootdir/usr/bin/install_patchwork #!/bin/bash cd /etc/patchwork -npm install --arch=$NPM_ARCH electron -npm install --arch=$NPM_ARCH -#npm rebuild --arch=$NPM_ARCH leveldown -npm rebuild --arch=$NPM_ARCH +npm install --arch=$NPM_ARCH --build-from-source +npm install --arch=$NPM_ARCH --save-dev electron-rebuild +./node_modules/.bin/electron-rebuild EOF chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork chroot "$rootdir" /usr/bin/install_patchwork From d0eb13b5ec8d8fd9a1e42d0506c63119bc5de53a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 15 Sep 2017 19:50:23 +0100 Subject: [PATCH 27/35] Installing npm on mesh image --- src/freedombone-utils-nodejs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index ed109acf..c40cbd05 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -74,28 +74,26 @@ function mesh_install_nodejs { exit 7235728 fi - if [ -f /usr/share/npm/bin/npm-cli.js ]; then - ln -s /usr/share/npm/bin/npm-cli.js /usr/bin/npm - else - wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh - if [ ! -f $rootdir/root/npm_install.sh ]; then - echo $'Unable to download npm installer' - exit 8793636 - fi - chroot "$rootdir" chmod +x /root/npm_install.sh - sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh - chroot "$rootdir" /root/npm_install.sh + wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh + if [ ! -f $rootdir/root/npm_install.sh ]; then + echo $'Unable to download npm installer' + exit 8793636 fi + chroot "$rootdir" chmod +x /root/npm_install.sh + sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh + chroot "$rootdir" /root/npm_install.sh + if [ ! -f $rootdir/usr/bin/npm ]; then echo $'npm was not installed' exit 5290462 fi + cp $rootdir/usr/bin/npm $rootdir/root/npm # update from the old debian nodejs version get_npm_arch chroot "$rootdir" npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save chroot "$rootdir" n --arch $N_ARCH ${NODEJS_VERSION} - chroot "$rootdir" npm install -g --arch $NPM_ARCH npm@${NPM_VERSION} --save + cp $rootdir/root/npm $rootdir/usr/bin/npm } function remove_nodejs { From f6810fbba6fee149ab6dd01e130bdd7f739501b5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 15 Sep 2017 22:15:40 +0100 Subject: [PATCH 28/35] Zero the initial drive bytes --- src/freedombone-image | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedombone-image b/src/freedombone-image index 3f620d85..61335f06 100755 --- a/src/freedombone-image +++ b/src/freedombone-image @@ -700,6 +700,7 @@ if [[ $IMAGE_TYPE != "qemu"* ]]; then fi echo '' echo " unxz -k ${PROJECT_NAME}*.img.xz" + echo ' sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8' echo " sudo dd bs=1M if=${PROJECT_NAME}*.img of=/dev/sdX conv=fdatasync" echo '' fi From c44743a509a57272d13bfb7f850cbe24bce6143a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 15 Sep 2017 22:20:14 +0100 Subject: [PATCH 29/35] Zero initial bytes --- doc/EN/homeserver.org | 1 + doc/EN/mesh.org | 3 ++ website/EN/homeserver.html | 5 +- website/EN/mesh.html | 105 +++++++++++++++++++------------------ 4 files changed, 61 insertions(+), 53 deletions(-) diff --git a/doc/EN/homeserver.org b/doc/EN/homeserver.org index 10ec3626..c327bf46 100644 --- a/doc/EN/homeserver.org +++ b/doc/EN/homeserver.org @@ -74,6 +74,7 @@ Now plug in the USB thumb drive, and do the same again. Notice which drive lette You can now copy the image to the USB thumb drive, replacing *sdX* with the identifier of the USB thumb drive. Don't include any numbers (so for example use *sdc* instead of *sdc1*). #+begin_src bash +dd if=/dev/zero of=/dev/sdX bs=1M count=8 dd bs=1M if=myimagefile.img of=/dev/sdX conv=fdatasync #+end_src diff --git a/doc/EN/mesh.org b/doc/EN/mesh.org index 23ac027a..c8d6d2dc 100644 --- a/doc/EN/mesh.org +++ b/doc/EN/mesh.org @@ -73,6 +73,7 @@ gpg --verify freedombone-meshclient-3_all-i386.img.xz.sig sha256sum freedombone-meshclient-3_all-i386.img.xz 74f9eaad479f84d3bf9cb002067074d35a97028145e781c5746c74577f777ee5 unxz freedombone-meshclient-3_all-i386.img.xz +sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8 sudo dd bs=1M if=freedombone-meshclient-3_all-i386.img of=/dev/sdX conv=fdatasync #+end_src @@ -88,6 +89,7 @@ gpg --verify freedombone-meshclient-insecure-3_all-i386.img.xz.sig sha256sum freedombone-meshclient-insecure-3_all-i386.img.xz f1c5df24a4bfca47bd5c41dfd2568925e63a1abf83aecf0250480b4b8edc071d unxz freedombone-meshclient-insecure-3_all-i386.img.xz +sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8 sudo dd bs=1M if=freedombone-meshclient-insecure-3_all-i386.img of=/dev/sdX conv=fdatasync #+end_src @@ -154,6 +156,7 @@ Now plug in the USB thumb drive, and do the same again. Notice which drive lette You can now copy the image to the USB thumb drive, replacing *sdX* with the identifier of the USB thumb drive. Don't include any numbers (so for example use *sdc* instead of *sdc1*). #+begin_src bash +sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8 sudo dd bs=1M if=myimagefile.img of=/dev/sdX conv=fdatasync #+end_src diff --git a/website/EN/homeserver.html b/website/EN/homeserver.html index b3cbb688..69b25da0 100644 --- a/website/EN/homeserver.html +++ b/website/EN/homeserver.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -340,7 +340,8 @@ You can now copy the image to the USB thumb drive, replacing sdX with the

-
dd bs=1M if=myimagefile.img of=/dev/sdX conv=fdatasync
+
dd if=/dev/zero of=/dev/sdX bs=1M count=8
+dd bs=1M if=myimagefile.img of=/dev/sdX conv=fdatasync
 
diff --git a/website/EN/mesh.html b/website/EN/mesh.html index 7bd191e7..02fa117c 100644 --- a/website/EN/mesh.html +++ b/website/EN/mesh.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -274,13 +274,13 @@ for the JavaScript code in this tag. -What the system can do +What the system can do - -Disk Images +Disk Images - -Building Disk Images +Building Disk Images - -How to use it +How to use it @@ -293,9 +293,9 @@ The Freedombone Mesh is a wireless solution for autonomous communication that ca Mesh networks are useful as a quick way to make a fully decentralised communications system which is not connected to or reliant upon the internet. Think festivals, hacker conferences, onboard ships at sea, disaster/war zones, small business internal office communications, protests, remote areas of the world, temporary "digital blackouts", scientific expeditions and off-world space colonies. The down side is that you can't access any internet content. The upside is that you can securely communicate with anyone on the local mesh. No ISPs. No payments or subscriptions beyond the cost of obtaining the hardware. Systems need to be within wifi range of each other for the mesh to be created. It can be an ultra-convenient way to do purely local communications.

-
-

What the system can do

-
+
+

What the system can do

+
  • Discovery of other users on the network
  • Text based chat, one-to-one and in groups
  • @@ -316,13 +316,13 @@ This system should be quite scalable. Both qTox and IPFS are based upon distribu
-
-

Disk Images

-
+
+

Disk Images

+
-
-

Writing many images quickly

-
+
+

Writing many images quickly

+

There may be situations where you need to write the same disk image to multiple drives at the same time in order to maximize rate of deployment. In the instructions given below the dd command is used for writing to the target drive, but to write to multiple drives you can use a tool such as GNOME MultiWriter.

@@ -346,9 +346,9 @@ Or on Debian based systems:
-
-

Client images

-
+
+

Client images

+
@@ -369,6 +369,7 @@ gpg --verify freedombone-meshclient-3_all-i386.img.xz.sig sha256sum freedombone-meshclient-3_all-i386.img.xz 74f9eaad479f84d3bf9cb002067074d35a97028145e781c5746c74577f777ee5 unxz freedombone-meshclient-3_all-i386.img.xz +sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8 sudo dd bs=1M if=freedombone-meshclient-3_all-i386.img of=/dev/sdX conv=fdatasync
@@ -389,22 +390,23 @@ gpg --verify freedombone-meshclient-insecure-3_all-i386.img.xz.sig sha256sum freedombone-meshclient-insecure-3_all-i386.img.xz f1c5df24a4bfca47bd5c41dfd2568925e63a1abf83aecf0250480b4b8edc071d unxz freedombone-meshclient-insecure-3_all-i386.img.xz +sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8 sudo dd bs=1M if=freedombone-meshclient-insecure-3_all-i386.img of=/dev/sdX conv=fdatasync
-
-

Router images

-
+
+

Router images

+

Routers are intended to build network coverage for an area using small and low cost hardware. You can bolt them to walls or leave them on window ledges. They don't have any user interface and their only job is to haul network traffic across the mesh and to enable peers to find each other via running bootstrap nodes for Tox and IPFS. Copy the image to a microSD card and insert it into the router, plug in an Atheros wifi dongle and power on. That should be all you need to do.

-
-

Beaglebone Black

-
+
+

Beaglebone Black

+
@@ -441,9 +443,9 @@ There is still a software freedom issue with the Beaglebone Black, but it doesn'
-
-

Building Disk Images

-
+
+

Building Disk Images

+

It's better not to trust images downloaded from random places on the interwebs. Chances are that unless you are in the web of trust of the above GPG signatures then they don't mean very much to you. If you actually want something trustworthy then build the images from scratch. It will take some time. Here's how to do it.

@@ -499,7 +501,8 @@ You can now copy the image to the USB thumb drive, replacing sdX with the

-
sudo dd bs=1M if=myimagefile.img of=/dev/sdX conv=fdatasync
+
sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8
+sudo dd bs=1M if=myimagefile.img of=/dev/sdX conv=fdatasync
 
@@ -530,9 +533,9 @@ The resulting image can be copied to a microSD card, inserted into a Beaglebone
-
-

Customisation

-
+
+

Customisation

+

If you want to make your own specially branded version, such as for a particular event, then to change the default desktop backgrounds edit the images within img/backgrounds and to change the available avatars and desktop icons edit the images within img/avatars. Re-create disk images using the instructions shown previously.

@@ -542,9 +545,9 @@ If you need particular dconf commands to alter desktop appearance or beha

-
-

How to use it

-
+
+

How to use it

+

When you first boot from the USB drive the system will create some encryption keys, assign a unique network address to the system and then reboot itself. When that's done you should see a prompt asking for a username. This username just makes it easy for others to initially find you on the mesh and will appear in the list of users.

@@ -554,9 +557,9 @@ After a minute or two if you are within wifi range and there is at least one oth

-
-

Boot trouble

-
+
+

Boot trouble

+

If the system doesn't boot and reports an error which includes /dev/mapper/loop0p1 then reboot with Ctrl-Alt-Del and when you see the grub menu press e and manually change /dev/mapper/loop0p1 to /dev/sdb1, then press Ctrl-x. If that doesn't work then reboot and try /dev/sdc1 instead.

@@ -566,9 +569,9 @@ After the system has booted successfully the problem should resolve itself on su

-
-

Set the Date

-
+
+

Set the Date

+

On the ordinary internet the date and time of your system would be set automatically via NTP. But this is not the internet and so you will need to manually ensure that your date and time settings are correct. You might need to periodically do this if your clock drifts. It's not essential that the time on your system be highly accurate, but if it drifts too far or goes back to epoch then things could become a little confusing in regard to the order of blog posts.

@@ -578,9 +581,9 @@ On the ordinary internet the date and time of your system would be set automatic

-
-

Check network status

-
+
+

Check network status

+

Unlike with ordinary wifi, on the mesh you don't get a signal strength icon and so it's not simple to see if you have a good connection.

@@ -604,9 +607,9 @@ When you are finished close the window and then select the Network Restart
-
-

Chat System

-
+
+

Chat System

+

Ensure that you're within wifi range of at least one other mesh peer (could be a router or client) and then you should see that the Chat and Other Users icons appear. Select the users icon and you should see a list of users on the mesh. Select the Chat icon and once you are connected you should see the status light turn green. If after a few minutes you don't get the green status light then try closing and re-opening the Tox chat application. Select the plus button to add a friend and then copy and paste in a Tox ID from the users list.

@@ -665,9 +668,9 @@ At present video doesn't work reliably, but text and voice chat do work well.
-
-

Sharing Files

-
+
+

Sharing Files

+

You can make files publicly available on the network simply by dragging and dropping them into the Public folder on the desktop. To view the files belonging to another user select the desktop icon called Visit a site and enter the username or Tox ID of the other user.

@@ -682,9 +685,9 @@ You can make files publicly available on the network simply by dragging and drop
-
-

Blogging

-
+
+

Blogging

+

To create a blog post select the Blog icon on the desktop and then use the up and down cursor keys, space bar and enter key to add a new entry. Edit the title of the entry and add your text. You can also include photos if you wish - just copy them to the CreateBlog/content/images directory and then link to them as shown.

From f5020f8a524b39234ec8f1d7ce5608d49da4ea48 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 16 Sep 2017 10:36:23 +0100 Subject: [PATCH 30/35] Smaller meshclient image --- src/freedombone-image | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-image b/src/freedombone-image index 61335f06..f0f04158 100755 --- a/src/freedombone-image +++ b/src/freedombone-image @@ -544,7 +544,7 @@ if [[ $VARIANT == 'meshclient' || $VARIANT == 'meshusb' ]]; then fi if [ ! $IMAGE_SIZE_SPECIFIED ]; then - IMAGE_SIZE=7.8G + IMAGE_SIZE=6G fi fi From 102c98cd3acd7806381413999ba2850f3d704ee3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 16 Sep 2017 11:10:59 +0100 Subject: [PATCH 31/35] Larger image size is needed during build --- src/freedombone-image | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-image b/src/freedombone-image index f0f04158..f5b4fc99 100755 --- a/src/freedombone-image +++ b/src/freedombone-image @@ -544,7 +544,7 @@ if [[ $VARIANT == 'meshclient' || $VARIANT == 'meshusb' ]]; then fi if [ ! $IMAGE_SIZE_SPECIFIED ]; then - IMAGE_SIZE=6G + IMAGE_SIZE=7.5G fi fi From e27f7843efe7a0dc74548842529d9e18a930cea5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 17 Sep 2017 10:35:11 +0100 Subject: [PATCH 32/35] Install git-ssb on mesh --- src/freedombone-image-customise | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 8d20ea6b..f9c4dd80 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -577,6 +577,7 @@ cd /etc/patchwork npm install --arch=$NPM_ARCH --build-from-source npm install --arch=$NPM_ARCH --save-dev electron-rebuild ./node_modules/.bin/electron-rebuild +npm install --arch=$NPM_ARCH git-ssb EOF chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork chroot "$rootdir" /usr/bin/install_patchwork From 3ebd4d372df3d7e77c5c20c278d347e45b3e15f3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 17 Sep 2017 10:57:53 +0100 Subject: [PATCH 33/35] Port used for SSB udp broadcasts on lan --- src/freedombone-mesh-batman | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedombone-mesh-batman b/src/freedombone-mesh-batman index bb71f27e..796e73dc 100755 --- a/src/freedombone-mesh-batman +++ b/src/freedombone-mesh-batman @@ -155,6 +155,8 @@ function stop { iptables -D INPUT -p tcp --dport $LIBREVAULT_PORT -j ACCEPT iptables -D INPUT -p udp --dport $LIBREVAULT_PORT -j ACCEPT iptables -D INPUT -p tcp --dport $TAHOELAFS_PORT -j ACCEPT + # SSB/Patchwork + iptables -D INPUT -p udp --dport 8008 -j ACCEPT systemctl restart network-manager } @@ -307,6 +309,8 @@ function start { iptables -A INPUT -p tcp --dport $LIBREVAULT_PORT -j ACCEPT iptables -A INPUT -p udp --dport $LIBREVAULT_PORT -j ACCEPT iptables -A INPUT -p tcp --dport $TAHOELAFS_PORT -j ACCEPT + # SSB/Patchwork + iptables -A INPUT -p udp --dport 8008 -j ACCEPT systemctl restart avahi-daemon From 3e4e0c3007a0f0ce7e90b89e51e662b4d0be5164 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 17 Sep 2017 11:23:41 +0100 Subject: [PATCH 34/35] SSB also needs tcp for posts --- src/freedombone-mesh-batman | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/freedombone-mesh-batman b/src/freedombone-mesh-batman index 796e73dc..83981c3a 100755 --- a/src/freedombone-mesh-batman +++ b/src/freedombone-mesh-batman @@ -157,6 +157,7 @@ function stop { iptables -D INPUT -p tcp --dport $TAHOELAFS_PORT -j ACCEPT # SSB/Patchwork iptables -D INPUT -p udp --dport 8008 -j ACCEPT + iptables -D INPUT -p tcp --dport 8008 -j ACCEPT systemctl restart network-manager } @@ -311,6 +312,7 @@ function start { iptables -A INPUT -p tcp --dport $TAHOELAFS_PORT -j ACCEPT # SSB/Patchwork iptables -A INPUT -p udp --dport 8008 -j ACCEPT + iptables -A INPUT -p tcp --dport 8008 -j ACCEPT systemctl restart avahi-daemon From 2e630eb991cefb32ed3033c9f6e60e110f6bc274 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 17 Sep 2017 13:24:39 +0100 Subject: [PATCH 35/35] Patchwork commit for dark theme --- src/freedombone-image-customise | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index f9c4dd80..9077100d 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -562,7 +562,7 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= PATCHWORK_REPO="https://github.com/ssbc/patchwork" -PATCHWORK_COMMIT='25cb5fbe705ef585e23e59387689122668c9c1b3' +PATCHWORK_COMMIT='60111a9e3385d65be0d17aa0d15fd20e5fb311ce' install_patchwork() { get_npm_arch