This commit is contained in:
Bob Mottram 2017-07-18 13:17:53 +01:00
commit c33d3ac1d2
11 changed files with 133 additions and 40 deletions

37
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,37 @@
There are many ways to contribute.
# Software Testing
Currently there isn't any CI system and with the increasing number of apps there is always the need to test on different or new hardware. Pick some hardware. Try installing the system onto it.
* Are the instructions clear enough?
* Were there any failures during the install?
* Do any of the apps fail?
Reporting any failures, either as issues or by any other method is very useful.
# Physical Testing
Testing of the mesh system in various environments. What's the maximum range for a given wifi adapter? What type of cantennas or reflectors work best on an ultra-low budget? Which wifi adapters have free software drivers? What are the simplest antenna designs which are quickest to make? Perhaps antenna advice or example deployment descriptions could be part of the documentation.
# Documentation
* Improving descriptions of processes or apps
* Fixing spelling or typos
* Adding any documentation which might be missing
* Better screenshots for apps
* Translations for the website, within the *doc* subdirectory.
* Translations of the manpages with the *man* subdirectory.
# Artwork
The project doesn't have much of this. There are some desktop backgrounds within the *img/backgrounds* subdirectory which could be improved. Cute mascots and things like that can also help to attract interest. The mesh variant of the system has desktop icons which could also be better.
# Security Auditing
Looking for any obvious security mistakes, doing pentesting on an installed test system and reporting the results would be useful. There are already many STIG tests in the *tests* subdirectory, but having more wouldn't hurt.
# Campaigning
Ensuring that the internet doesn't become far less neutral than it already is. Encouraging ISPs not to have policies which ban people from running servers. Promoting and raising awareness that self-hosting is a thing which is actually useful. All of these activities are incredibly important to allow self-hosting to remain a viable possibility. ISPs are the bottleneck, and if they implement bad government mandated policies then it may become no longer practical or legal to run your own internet systems on your own hardware in your own home.
# Adding more apps or maintaining existing ones
Typically apps are pegged to a known good commit. One useful thing is to try recent commits and see if the app installs successfully. Do any new packages need to be installed, or old ones removed? See the developer's guide for how to add new apps to the system.
# Code Audit
It's all just bash scripts and the more eyeballs on it the more likely that mistakes will be found and fixed.
# Blogging
Just blogging about the project can help to inform people that decentralised systems exist and that they don't need to be trapped in the cloud services of $bigcorp. Even if you find some aspect of the project which sucks badly, blogging about it is one way to provide feedback which could lead to future improvements being made.

11
code-of-conduct.md Normal file
View File

@ -0,0 +1,11 @@
Instead of having some tedious *Code of Conduct* which tries to micro-manage how folks communicate privately with each other this project has a set of guiding principles, which are as follows:
* Enable users to help themselves to provide their own personal software infrastructure.
* Enable users to help each other to provide software infrastructure for a community.
* Principle of self-management: apps should require miniumum configuration and maintain themselves as far as possible.
* There should be no single point of failure. Assume that other servers can and will fail occasionally.
* Minimum data retention. Only store the data which users actually want or need, and within apps implement the function which allows logging to be turned off.
* Respect other users right to run their own stuff and have their own policies on their own hardware.
* Remove as many intermediating organisations as possible. For example, Google tracking embedded within some Free Software apps.
* No tollbooths, rent-seeking, gatekeepers or paywalls.
* Maximize energy efficiency. No systems which fundamentally depend upon proof-of-work block solving or other compute-heavy methods. The target here is small single board computers.

View File

@ -16,14 +16,19 @@
* Introduction
Freedombone consists of a set of bash scripts. There are a lot of them, but they're not very complicated. If you're familiar with the GNU/Linux commandline and can hack a bash script then you can probably add a new app or fix a bug in the system. There are no trendy development frameworks to learn or to get in your way.
* Community Statement
This project doesn't require you to take any special pledge of allegiance or subscribe to any guru's list of commandments. It does not care about your gender, race, national flag or political alignment. It is agnostic towards your religion or lack thereof. It doesn't give one hoot as to whether you are young or old, rich or poor, gay, trans, straight or just "other". It does not care if you like your eggs sunny side up or if you are a vegan.
* Substitute for a Code of Conduct
Instead of having some tedious /Code of Conduct/ which tries to micro-manage how folks communicate privately with each other this project has a set of guiding principles, which are as follows:
This is an inclusive project which will take patches or pull requests from anyone, in a generous manner along the lines described by the late Pieter Hintjens in his book /Social Architecture/. Any useful patch is likely to be merged so long as it is submitted under a license compatible with AGPL3. Copyright assignment is not required.
* Enable users to help themselves to provide their own personal software infrastructure.
* Enable users to help each other to provide software infrastructure for a community.
* Principle of self-management: apps should require miniumum configuration and maintain themselves as far as possible.
* There should be no single point of failure. Assume that other servers can and will fail occasionally.
* Minimum data retention. Only store the data which users actually want or need, and within apps implement the function which allows logging to be turned off.
* Respect other users right to run their own stuff and have their own policies on their own hardware.
* Remove as many intermediating organisations as possible. For example, Google tracking embedded within some Free Software apps.
* No tollbooths, rent-seeking, gatekeepers or paywalls.
* Maximize energy efficiency. No systems which fundamentally depend upon proof-of-work block solving or other compute-heavy methods. The target here is small single board computers.
Freedombone is a free system. That's free as in no secret source. For anything. Although there's nothing to stop you from adding proprietary utilities or apps if you wish, any patches containing closed stuff or which create dependencies upon closed systems will be regarded as trash and ignored.
This project also has a no bullshit policy. Anyone trying to cause a ruckus by trolling or engaging in behavior which is disruptive or disrespectful to others will be speedily blocked and ignored. Life's too short, and there's too much to be done.
* Adding extra apps
Suppose you have some internet application which you want to add to the system. To do this you need to create an app script which tells the system how to install/remove and also backup/restore. The script should be designed to work with the current stable version of Debian.

View File

@ -351,7 +351,7 @@ function upgrade_gnusocial {
rm /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/install.php
fi
if [ -d $INSTALL_DIR/pleroma ]; then
if [ -f /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php ]; then
if [ -f /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php ]; then
mv /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index.php /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/index_qvitter.php
fi

View File

@ -365,7 +365,7 @@ function upgrade_postactiv {
rm /var/www/$POSTACTIV_DOMAIN_NAME/htdocs/install.php
fi
if [ -d $INSTALL_DIR/pleroma ]; then
if [ -f /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php ]; then
if [ -f /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php ]; then
mv /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index.php /var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/index_qvitter.php
fi

View File

@ -50,9 +50,16 @@ for d in /home/*/ ; do
# add the archive to .muttrc if needed
if [ -f $MUTTRC ]; then
MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC)
BACKUP_DIRECTORY=archive-$(date +"%Y")
YR=$(date +"%Y")
PREV_YR=$((YR - 1))
BACKUP_DIRECTORY=archive-$YR
PREV_BACKUP_DIRECTORY=archive-$PREV_YR
if [[ $MUTT_MAILBOXES != *$BACKUP_DIRECTORY* ]]; then
sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$BACKUP_DIRECTORY|g" $MUTTRC
if [[ $MUTT_MAILBOXES == *$PREV_BACKUP_DIRECTORY* ]]; then
sed -i "s|$PREV_BACKUP_DIRECTORY|$PREV_BACKUP_DIRECTORY =$BACKUP_DIRECTORY|g" $MUTTRC
else
sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$BACKUP_DIRECTORY|g" $MUTTRC
fi
chown $USERNAME:$USERNAME $MUTTRC
fi
fi

View File

@ -552,6 +552,17 @@ if [[ $VARIANT == 'usb' ]]; then
IMAGE_NAME=$'usb'
fi
if [[ $VARIANT == 'beaglebonewifi' ]]; then
if [ ! $WIFI_SSID ]; then
WIFI_SSID=${PROJECT_NAME}
fi
if [ ! "$WIFI_PASSPHRASE" ]; then
WIFI_PASSPHRASE=${PROJECT_NAME}
fi
WIFI_TYPE='wpa2-psk'
WIFI_HOTSPOT='yes'
fi
# append amnesic to the image name if needed
if [[ $AMNESIC != 'no' ]]; then
IMAGE_NAME="${IMAGE_NAME}-amnesic"

View File

@ -1045,7 +1045,7 @@ function image_setup_utils {
fi
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
chroot "$rootdir" apt-get -yq install grub2 lvm2 initramfs-tools
chroot "$rootdir" apt-get -yq install grub2 lvm2
fi
chroot "$rootdir" apt-get -yq install locales locales-all debconf
@ -1356,7 +1356,7 @@ chroot "$rootdir" apt-get install -y libnss-mdns libnss-myhostname libnss-gw-nam
chroot "$rootdir" apt-get install -y locales locales-all debconf wireless-tools wpasupplicant usbutils
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'i386' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' ]]; then
chroot "$rootdir" apt-get install -y cryptsetup zsh pinentry-curses iotop bc
chroot "$rootdir" apt-get install -y grub2 hostapd lvm2 initramfs-tools
chroot "$rootdir" apt-get install -y grub2 hostapd lvm2
fi
sed -i "s|#host-name=.*|host-name=${LOCAL_NAME}|g" $rootdir/etc/avahi/avahi-daemon.conf

View File

@ -94,11 +94,16 @@ EOF
}
beaglebone_flash() {
bbb_version=$1
# allow flash-kernel to work without valid /proc contents
# ** this doesn't *really* work, since there are too many checks
# that fail in an emulated environment! We'll have to do it by
# hand below anyway...
export FK_MACHINE="TI AM335x BeagleBone"
if [[ "$bbb_version" == 'wireless' ]]; then
export FK_MACHINE="TI AM335x BeagleBone Black Wireless"
else
export FK_MACHINE="TI AM335x BeagleBone Black"
fi
apt-get install -y flash-kernel
}
@ -228,7 +233,7 @@ case "$MACHINE" in
;;
beaglebonewifi)
beaglebone_setup_boot wireless
beaglebone_flash
beaglebone_flash wireless
beaglebone_repack_kernel wireless
enable_serial_console ttyO0
;;

View File

@ -85,6 +85,19 @@ CHECK_MESSAGE="Check your internet connection, /etc/network/interfaces and /etc/
# Default diffie-hellman key length in bits
DH_KEYLENGTH=2048
function support_256_colours {
if ! grep 'xterm-256color' /etc/skel/.profile; then
echo '' >> /etc/skel/.profile
echo 'export TERM=xterm-256color' >> /etc/skel/.profile
fi
if ! grep 'xterm-256color' /home/$MY_USERNAME/.profile; then
echo '' >> /home/$MY_USERNAME/.profile
echo 'export TERM=xterm-256color' >> /home/$MY_USERNAME/.profile
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.profile
fi
}
function detect_usb_drive {
# sets to the highest available drive letter
# which is likely to be the last drive connected
@ -240,7 +253,7 @@ function initial_setup {
fi
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
apt-get -yq install grub2 lvm2 initramfs-tools
apt-get -yq install grub2 lvm2
fi
if [ ! -d $INSTALL_DIR ]; then
@ -679,6 +692,9 @@ function setup_utils {
function_check remove_management_engine_interface
remove_management_engine_interface
function_check support_256_colours
support_256_colours
function_check enable_predictable_device_names
enable_predictable_device_names

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2017-07-01 Sat 20:33 -->
<!-- 2017-07-18 Tue 11:19 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
@ -246,37 +246,38 @@ for the JavaScript code in this tag.
<center><h1>Developers Guide</h1></center>
<div id="outline-container-orgebff6ef" class="outline-2">
<h2 id="orgebff6ef">Introduction</h2>
<div class="outline-text-2" id="text-orgebff6ef">
<div id="outline-container-orgeb19df0" class="outline-2">
<h2 id="orgeb19df0">Introduction</h2>
<div class="outline-text-2" id="text-orgeb19df0">
<p>
Freedombone consists of a set of bash scripts. There are a lot of them, but they're not very complicated. If you're familiar with the GNU/Linux commandline and can hack a bash script then you can probably add a new app or fix a bug in the system. There are no trendy development frameworks to learn or to get in your way.
</p>
</div>
</div>
<div id="outline-container-org771f3cc" class="outline-2">
<h2 id="org771f3cc">Community Statement</h2>
<div class="outline-text-2" id="text-org771f3cc">
<div id="outline-container-org70ef738" class="outline-2">
<h2 id="org70ef738">Substitute for a Code of Conduct</h2>
<div class="outline-text-2" id="text-org70ef738">
<p>
This project doesn't require you to take any special pledge of allegiance or subscribe to any guru's list of commandments. It does not care about your gender, race, national flag or political alignment. It is agnostic towards your religion or lack thereof. It doesn't give one hoot as to whether you are young or old, rich or poor, gay, trans, straight or just "other". It does not care if you like your eggs sunny side up or if you are a vegan.
Instead of having some tedious <i>Code of Conduct</i> which tries to micro-manage how folks communicate privately with each other this project has a set of guiding principles, which are as follows:
</p>
<p>
This is an inclusive project which will take patches or pull requests from anyone, in a generous manner along the lines described by the late Pieter Hintjens in his book <i>Social Architecture</i>. Any useful patch is likely to be merged so long as it is submitted under a license compatible with AGPL3. Copyright assignment is not required.
</p>
<p>
Freedombone is a free system. That's free as in no secret source. For anything. Although there's nothing to stop you from adding proprietary utilities or apps if you wish, any patches containing closed stuff or which create dependencies upon closed systems will be regarded as trash and ignored.
</p>
<p>
This project also has a no bullshit policy. Anyone trying to cause a ruckus by trolling or engaging in behavior which is disruptive or disrespectful to others will be speedily blocked and ignored. Life's too short, and there's too much to be done.
</p>
<ul class="org-ul">
<li>Enable users to help themselves to provide their own personal software infrastructure.</li>
<li>Enable users to help each other to provide software infrastructure for a community.</li>
<li>Principle of self-management: apps should require miniumum configuration and maintain themselves as far as possible.</li>
<li>There should be no single point of failure. Assume that other servers can and will fail occasionally.</li>
<li>Minimum data retention. Only store the data which users actually want or need, and within apps implement the function which allows logging to be turned off.</li>
<li>Respect other users right to run their own stuff and have their own policies on their own hardware.</li>
<li>Remove as many intermediating organisations as possible. For example, Google tracking embedded within some Free Software apps.</li>
<li>No tollbooths, rent-seeking, gatekeepers or paywalls.</li>
<li>Maximize energy efficiency. No systems which fundamentally depend upon proof-of-work block solving or other compute-heavy methods. The target here is small single board computers.</li>
</ul>
</div>
</div>
<div id="outline-container-orgd032712" class="outline-2">
<h2 id="orgd032712">Adding extra apps</h2>
<div class="outline-text-2" id="text-orgd032712">
<div id="outline-container-orgce166ed" class="outline-2">
<h2 id="orgce166ed">Adding extra apps</h2>
<div class="outline-text-2" id="text-orgce166ed">
<p>
Suppose you have some internet application which you want to add to the system. To do this you need to create an app script which tells the system how to install/remove and also backup/restore. The script should be designed to work with the current stable version of Debian.
</p>
@ -554,9 +555,9 @@ Submit your working app to <b><a href="https://github.com/bashrc/freedombone/iss
</div>
</div>
<div id="outline-container-org169d9d2" class="outline-2">
<h2 id="org169d9d2">Customising mesh images</h2>
<div class="outline-text-2" id="text-org169d9d2">
<div id="outline-container-org2e7b384" class="outline-2">
<h2 id="org2e7b384">Customising mesh images</h2>
<div class="outline-text-2" id="text-org2e7b384">
<p>
If you want to make your own specially branded version of the mesh images, such as for a particular event, then to change the default desktop backgrounds edit the images within <b>img/backgrounds</b> and to change the available avatars and desktop icons edit the images within <b>img/avatars</b>. Re-create disk images using the instructions shown previously.
</p>