From 30a1528ae13f993291496ac8e73b5ac0a6f82585 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 18 Mar 2019 14:49:18 +0000 Subject: [PATCH 1/7] Switch to using parted's machine parseable output (#270) --- export-image/prerun.sh | 16 ++++++---------- export-noobs/prerun.sh | 16 ++++++---------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/export-image/prerun.sh b/export-image/prerun.sh index 7345792cdb..7e0d1eb3c1 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -37,16 +37,12 @@ p w EOF -PARTED_OUT=$(parted -s "${IMG_FILE}" unit b print) -BOOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^ 1'| xargs echo -n \ -| cut -d" " -f 2 | tr -d B) -BOOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^ 1'| xargs echo -n \ -| cut -d" " -f 4 | tr -d B) - -ROOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^ 2'| xargs echo -n \ -| cut -d" " -f 2 | tr -d B) -ROOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^ 2'| xargs echo -n \ -| cut -d" " -f 4 | tr -d B) +PARTED_OUT=$(parted -sm "${IMG_FILE}" unit b print) +BOOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 2 | tr -d B) +BOOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 4 | tr -d B) + +ROOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^2:' | cut -d':' -f 2 | tr -d B) +ROOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^2:' | cut -d':' -f 4 | tr -d B) BOOT_DEV=$(losetup --show -f -o "${BOOT_OFFSET}" --sizelimit "${BOOT_LENGTH}" "${IMG_FILE}") ROOT_DEV=$(losetup --show -f -o "${ROOT_OFFSET}" --sizelimit "${ROOT_LENGTH}" "${IMG_FILE}") diff --git a/export-noobs/prerun.sh b/export-noobs/prerun.sh index b4b56b2e26..54e0c59f07 100755 --- a/export-noobs/prerun.sh +++ b/export-noobs/prerun.sh @@ -9,16 +9,12 @@ cp "${WORK_DIR}/export-image/${IMG_FILENAME}${IMG_SUFFIX}.img" "${STAGE_WORK_DIR rm -rf "${NOOBS_DIR}" -PARTED_OUT=$(parted -s "${IMG_FILE}" unit b print) -BOOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^ 1'| xargs echo -n \ -| cut -d" " -f 2 | tr -d B) -BOOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^ 1'| xargs echo -n \ -| cut -d" " -f 4 | tr -d B) - -ROOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^ 2'| xargs echo -n \ -| cut -d" " -f 2 | tr -d B) -ROOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^ 2'| xargs echo -n \ -| cut -d" " -f 4 | tr -d B) +PARTED_OUT=$(parted -sm "${IMG_FILE}" unit b print) +BOOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 2 | tr -d B) +BOOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 4 | tr -d B) + +ROOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^2:' | cut -d':' -f 2 | tr -d B) +ROOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^2:' | cut -d':' -f 4 | tr -d B) BOOT_DEV=$(losetup --show -f -o "${BOOT_OFFSET}" --sizelimit "${BOOT_LENGTH}" "${IMG_FILE}") ROOT_DEV=$(losetup --show -f -o "${ROOT_OFFSET}" --sizelimit "${ROOT_LENGTH}" "${IMG_FILE}") From 3e9b176fab620e00bb36b9a94646aaf376160a49 Mon Sep 17 00:00:00 2001 From: XECDesign Date: Fri, 29 Mar 2019 19:45:31 +0000 Subject: [PATCH 2/7] stage2: install rng-tools https://github.com/raspberrypi/linux/issues/2799 --- stage2/01-sys-tweaks/00-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index f058ffb79c..4a1f3a15c1 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -23,3 +23,4 @@ htop man-db policykit-1 ssh-import-id +rng-tools From ee11b802b556fc43d4998749e75aba6a97257b1a Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 27 Mar 2019 15:39:56 +0000 Subject: [PATCH 3/7] stage2: ethtool --- stage2/01-sys-tweaks/00-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 4a1f3a15c1..b1e1de696b 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -24,3 +24,4 @@ man-db policykit-1 ssh-import-id rng-tools +ethtool From e910bf55ac92e27c6e77043e8995bcb5e0a2d742 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 2 Apr 2019 18:52:11 +0100 Subject: [PATCH 4/7] Update release notes --- export-noobs/00-release/files/release_notes.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/export-noobs/00-release/files/release_notes.txt b/export-noobs/00-release/files/release_notes.txt index 3a71c1e1ff..2ebd3f5978 100644 --- a/export-noobs/00-release/files/release_notes.txt +++ b/export-noobs/00-release/files/release_notes.txt @@ -1,5 +1,20 @@ UNRELEASED: - * + * Chromium browser updated to version 72 + * VLC media player updated to version 3.0.6 + * RealVNC Server updated to version 6.4.0 + * Flash player updated to version 32.0.0.156 + * Performance improvements to SDL library + * Performance improvements to pixman library + * Option to set display underscan added to startup wizard + * Mounted external drives now displayed on desktop by default + * Network plugin modified for improved compatibility with wpa_passphrase + * SD Card Copier tweaks to reduce copy failures + * Various minor bug fixes and appearance tweaks + * Added ethtool + * Added rng-tools + * Add PINN restore support + * Linux kernel 4.14.98 + * Raspberry Pi firmware f8939644f7bd3065068787f1f92b3f3c79cf3de9 2018-11-13: * Two versions of image created - "base" image has no optional software packages included; "full" image has all optional packages - Removed from "base" image - LibreOffice, Thonny, Scratch, Scratch 2, Sonic Pi, Minecraft, Python Games, SmartSim, SenseHAT Emulator From 042f769edb5b1a8162b5b7bac8f461106d561128 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 17 Apr 2019 12:49:08 +0100 Subject: [PATCH 5/7] Add new changelog entry --- export-noobs/00-release/files/release_notes.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/export-noobs/00-release/files/release_notes.txt b/export-noobs/00-release/files/release_notes.txt index 2ebd3f5978..37ccee0714 100644 --- a/export-noobs/00-release/files/release_notes.txt +++ b/export-noobs/00-release/files/release_notes.txt @@ -1,4 +1,6 @@ UNRELEASED: + * +2019-04-08: * Chromium browser updated to version 72 * VLC media player updated to version 3.0.6 * RealVNC Server updated to version 6.4.0 From 407663a57f380bdd779820392210c4309b1e719d Mon Sep 17 00:00:00 2001 From: Hugo Hromic Date: Thu, 25 Apr 2019 10:11:57 +0100 Subject: [PATCH 6/7] Silence shellcheck warnings (#279) * SC1091: the `config` file might not be present, which is normal. * SC2086: Double quote to prevent globbing and word splitting. Tested clean output using: `find -name "*.sh" -exec shellcheck -x {} \;` --- build-docker.sh | 1 + build.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-docker.sh b/build-docker.sh index c969ba2884..cb30c52eb9 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -15,6 +15,7 @@ fi set -e if [ -f config ]; then + # shellcheck disable=SC1091 source config fi diff --git a/build.sh b/build.sh index c41a87fcdb..084d5c6703 100755 --- a/build.sh +++ b/build.sh @@ -203,8 +203,8 @@ if [[ ! "$FIRST_USER_NAME" =~ ^[a-z][-a-z0-9_]*$ ]]; then exit 1 fi -if [[ -n "${APT_PROXY}" ]] && ! curl --silent ${APT_PROXY} >/dev/null ; then - echo "Could not reach APT_PROXY server:" ${APT_PROXY} +if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then + echo "Could not reach APT_PROXY server: ${APT_PROXY}" exit 1 fi From 8acf95f237d3e0bbc5c698bcae2ad4f99efecccc Mon Sep 17 00:00:00 2001 From: Hugo Hromic Date: Thu, 25 Apr 2019 10:28:48 +0100 Subject: [PATCH 7/7] Do not assume the changelog file is always present for the info file (#280) The `(..)/raspberrypi-kernel/changelog.Debian.gz` file is not guaranteed to be present in the built `ROOTFS_DIR`, for example when building very minimal images without package documentation. In these cases, the `firmware` variable will be left empty and the subsequent calls to `curl` will return large 404 HTML content from GitHub. Instead, simply check if the changelog file exists before using it. --- export-image/04-finalise/01-run.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index c33de6dec4..8a2d24952f 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -50,17 +50,19 @@ cp "$ROOTFS_DIR/etc/rpi-issue" "$INFO_FILE" { - firmware=$(zgrep "firmware as of" \ - "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" | \ - head -n1 | sed -n 's|.* \([^ ]*\)$|\1|p') - printf "\nFirmware: https://github.com/raspberrypi/firmware/tree/%s\n" "$firmware" + if [ -f "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" ]; then + firmware=$(zgrep "firmware as of" \ + "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" | \ + head -n1 | sed -n 's|.* \([^ ]*\)$|\1|p') + printf "\nFirmware: https://github.com/raspberrypi/firmware/tree/%s\n" "$firmware" - kernel="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/git_hash")" - printf "Kernel: https://github.com/raspberrypi/linux/tree/%s\n" "$kernel" + kernel="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/git_hash")" + printf "Kernel: https://github.com/raspberrypi/linux/tree/%s\n" "$kernel" - uname="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/uname_string7")" + uname="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/uname_string7")" + printf "Uname string: %s\n" "$uname" + fi - printf "Uname string: %s\n" "$uname" printf "\nPackages:\n" dpkg -l --root "$ROOTFS_DIR" } >> "$INFO_FILE"