From 7f143a185e891055ef2580b68750ade8c7cdaad5 Mon Sep 17 00:00:00 2001 From: Leander Date: Mon, 18 Nov 2019 14:32:16 +0100 Subject: [PATCH 1/7] Export base directory before loading config file (#347) --- build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index a730e44285..d93d4dc91c 100755 --- a/build.sh +++ b/build.sh @@ -122,6 +122,8 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi +BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"} +export BASE_DIR if [ -f config ]; then # shellcheck disable=SC1091 @@ -154,7 +156,6 @@ export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}" export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}" export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}" -BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" export SCRIPT_DIR="${BASE_DIR}/scripts" export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}" export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"} @@ -179,8 +180,6 @@ export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}" export GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"} -export BASE_DIR - export CLEAN export IMG_NAME export APT_PROXY From 5e190333878c45695990a861092991bb5c2cfd15 Mon Sep 17 00:00:00 2001 From: Leander Date: Mon, 18 Nov 2019 15:38:54 +0100 Subject: [PATCH 2/7] Remove accidental trailing brace (#348) --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index d93d4dc91c..b806562d4d 100755 --- a/build.sh +++ b/build.sh @@ -122,7 +122,7 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi -BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"} +BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" export BASE_DIR if [ -f config ]; then From 5456c3801fc7ef99d1563cd54e581cb9b3d54c4a Mon Sep 17 00:00:00 2001 From: Leander Date: Tue, 26 Nov 2019 16:03:48 +0100 Subject: [PATCH 3/7] Explicitly check if postrun script exists in BASE_DIR (#351) --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index b806562d4d..a396b060f1 100755 --- a/build.sh +++ b/build.sh @@ -247,7 +247,7 @@ for EXPORT_DIR in ${EXPORT_DIRS}; do fi done -if [ -x postrun.sh ]; then +if [ -x ${BASE_DIR}/postrun.sh ]; then log "Begin postrun.sh" cd "${BASE_DIR}" ./postrun.sh From d7c1ae21cafc0fd32a907db7de2b9c13ef12d76f Mon Sep 17 00:00:00 2001 From: RaspberryPiFan <49343974+RaspberryPiFan@users.noreply.github.com> Date: Tue, 26 Nov 2019 16:49:49 +0100 Subject: [PATCH 4/7] New types of images. (#352) --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e131ca48f9..7a272f1860 100644 --- a/README.md +++ b/README.md @@ -277,14 +277,13 @@ maintenance and allows for more easy customization. enhancements, etc. This is a base desktop system, with some development tools installed. - - **Stage 4** - Raspbian system meant to fit on a 4GB card. More development + - **Stage 4** - Normal Raspbian image. System meant to fit on a 4GB card. More development tools, an email client, learning tools like Scratch, specialized packages like sonic-pi, system documentation, office productivity, etc. This is the stage that installs all of the things that make Raspbian friendly to new users. - - **Stage 5** - The official Raspbian Desktop image. Right now only adds - Mathematica. + - **Stage 5** - The Raspbian Full image. ### Stage specification From 8bdbbfb099ecac884a901572d126b0fe47de5d95 Mon Sep 17 00:00:00 2001 From: RaspberryPiFan <49343974+RaspberryPiFan@users.noreply.github.com> Date: Wed, 27 Nov 2019 17:11:20 +0100 Subject: [PATCH 5/7] Added stage 5 to the text (#353) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a272f1860..83dd2ad1d7 100644 --- a/README.md +++ b/README.md @@ -291,7 +291,7 @@ If you wish to build up to a specified stage (such as building up to stage 2 for a lite system), place an empty file named `SKIP` in each of the `./stage` directories you wish not to include. -Then add an empty file named `SKIP_IMAGES` to `./stage4` (if building up to stage 2) or +Then add an empty file named `SKIP_IMAGES` to `./stage4` and `./stage5` (if building up to stage 2) or to `./stage2` (if building a minimal system). ```bash From 18c3cebe94c99daf80dcdeaa8bc0f9202de3a943 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 5 Dec 2019 16:08:04 +0100 Subject: [PATCH 6/7] configure unprotected wifi when WPA_PASSWORD is unset (#357) --- README.md | 2 +- stage2/02-net-tweaks/01-run.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 83dd2ad1d7..7ad31db4c2 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ The following environment variables are supported: * `WPA_ESSID`, `WPA_PASSWORD` and `WPA_COUNTRY` (Default: unset) - If these are set, they are use to configure `wpa_supplicant.conf`, so that the raspberry pi can automatically connect to a wifi network on first boot. + If these are set, they are use to configure `wpa_supplicant.conf`, so that the raspberry pi can automatically connect to a wifi network on first boot. If `WPA_ESSID` is set and `WPA_PASSWORD` is unset an unprotected wifi network will be configured. * `ENABLE_SSH` (Default: `0`) diff --git a/stage2/02-net-tweaks/01-run.sh b/stage2/02-net-tweaks/01-run.sh index 3ba2ef9e01..154e515094 100755 --- a/stage2/02-net-tweaks/01-run.sh +++ b/stage2/02-net-tweaks/01-run.sh @@ -14,6 +14,14 @@ if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then on_chroot <> "/etc/wpa_supplicant/wpa_supplicant.conf" EOF +elif [ -v WPA_ESSID ]; then +cat >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" << EOL + +network={ + ssid="${WPA_ESSID}" + key_mgmt=NONE +} +EOL fi # Disable wifi on 5GHz models From 32353a162bfaecc41b6ef218b919ef82a0295e71 Mon Sep 17 00:00:00 2001 From: RaspberryPiFan <49343974+RaspberryPiFan@users.noreply.github.com> Date: Mon, 9 Dec 2019 12:57:26 +0100 Subject: [PATCH 7/7] Updated info about stage4 and stage5 (#359) --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7ad31db4c2..1f8524bdbd 100644 --- a/README.md +++ b/README.md @@ -277,13 +277,13 @@ maintenance and allows for more easy customization. enhancements, etc. This is a base desktop system, with some development tools installed. - - **Stage 4** - Normal Raspbian image. System meant to fit on a 4GB card. More development - tools, an email client, learning tools like Scratch, specialized packages - like sonic-pi, system documentation, office productivity, etc. This is the - stage that installs all of the things that make Raspbian friendly to new - users. + - **Stage 4** - Normal Raspbian image. System meant to fit on a 4GB card. This is the + stage that installs most things that make Raspbian friendly to new + users like system documentation. - - **Stage 5** - The Raspbian Full image. + - **Stage 5** - The Raspbian Full image. More development + tools, an email client, learning tools like Scratch, specialized packages + like sonic-pi, office productivity, etc. ### Stage specification