From 5910bf20b8a68e3d198846294397544ffdace667 Mon Sep 17 00:00:00 2001 From: Antoine Amarilli Date: Wed, 25 Oct 2017 10:55:04 +0200 Subject: [PATCH 1/8] document apt-get workaround Fixes: #1 --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d04743e..469409f 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,33 @@ See https://wiki.debian.org/RaspberryPi3#Preview_image for where to obtain the l ## Option 2: Building your own image -If you prefer, you can build a Debian buster Raspberry Pi 3 image using: +If you prefer, you can build a Debian buster Raspberry Pi 3 image yourself. For +this, first run the following: ```shell git clone --recursive https://github.com/Debian/raspi3-image-spec cd raspi3-image-spec +``` + +Then edit [raspi3.yaml](raspi3.yaml) to select the Debian repository that you +want to use: + +- If you want to use the snapshot with which the build was tested, use + `http://snapshot.debian.org/archive/debian/20171007T213914Z/`. This is what + is pre-configured in raspi3.yaml. However, due to a [missing + feature](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763419) on + snapshots, to make the build work, you have to disable an expiration check + by APT. To do so, edit [raspi3.yaml](raspi3.yaml) to replace all + `apt-get` invocations with `apt-get -o Acquire::Check-Valid-Until=false` +- If you want to use the latest versions of each software, you can replace + `http://snapshot.debian.org/archive/debian/20171007T213914Z/` in raspi3.yaml + with the URL of your favorite Debian mirror. Of course, this means that the + build may break if there are regressions in the latest versions. + +Once you have edited [raspi3.yaml](raspi3.yaml), you can generate the image by +issuing: + +```shell sudo ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log ``` @@ -36,6 +58,3 @@ ssh root@rpi3 # Enter password “raspberry” ``` -## Reproducibility - -The image currently uses http://snapshot.debian.org/archive/debian/20171007T213914Z/ for ensuring a reproducible build. From 284f7891cc54da9a9427cea9e108fcc31d15e3bf Mon Sep 17 00:00:00 2001 From: Antoine Amarilli Date: Wed, 25 Oct 2017 10:57:02 +0200 Subject: [PATCH 2/8] document need to install vmdb2 requirements --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 469409f..67f5879 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ See https://wiki.debian.org/RaspberryPi3#Preview_image for where to obtain the l ## Option 2: Building your own image If you prefer, you can build a Debian buster Raspberry Pi 3 image yourself. For -this, first run the following: +this, first install the +[requirements](https://github.com/larswirzenius/vmdb2/blob/master/README#getting-vmdb2) +of vmdb2. Then run the following: ```shell git clone --recursive https://github.com/Debian/raspi3-image-spec From ba784cb791ff4c7bca0011e59361c66b1681f2d5 Mon Sep 17 00:00:00 2001 From: Antoine Amarilli Date: Wed, 25 Oct 2017 10:57:46 +0200 Subject: [PATCH 3/8] remove unnecessary links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 67f5879..89dfec1 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,14 @@ want to use: is pre-configured in raspi3.yaml. However, due to a [missing feature](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763419) on snapshots, to make the build work, you have to disable an expiration check - by APT. To do so, edit [raspi3.yaml](raspi3.yaml) to replace all + by APT. To do so, edit raspi3.yaml to replace all `apt-get` invocations with `apt-get -o Acquire::Check-Valid-Until=false` - If you want to use the latest versions of each software, you can replace `http://snapshot.debian.org/archive/debian/20171007T213914Z/` in raspi3.yaml with the URL of your favorite Debian mirror. Of course, this means that the build may break if there are regressions in the latest versions. -Once you have edited [raspi3.yaml](raspi3.yaml), you can generate the image by +Once you have edited raspi3.yaml, you can generate the image by issuing: ```shell From 8b11617d6d525dd86634dafbcbdce689924b05e4 Mon Sep 17 00:00:00 2001 From: Antoine Amarilli Date: Wed, 25 Oct 2017 11:09:23 +0200 Subject: [PATCH 4/8] specify a mirror URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89dfec1..23ed83c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ want to use: `apt-get` invocations with `apt-get -o Acquire::Check-Valid-Until=false` - If you want to use the latest versions of each software, you can replace `http://snapshot.debian.org/archive/debian/20171007T213914Z/` in raspi3.yaml - with the URL of your favorite Debian mirror. Of course, this means that the + with `http://deb.debian.org/debian`. Of course, this means that the build may break if there are regressions in the latest versions. Once you have edited raspi3.yaml, you can generate the image by From b3e44ee51e516f2897ee56e8ab241a5de7dd49a0 Mon Sep 17 00:00:00 2001 From: Antoine Amarilli Date: Wed, 25 Oct 2017 11:11:30 +0200 Subject: [PATCH 5/8] add umask and env -i workaround for vmdb2#26 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 23ed83c..fce10b8 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,11 @@ want to use: build may break if there are regressions in the latest versions. Once you have edited raspi3.yaml, you can generate the image by -issuing: +issuing the following: ```shell -sudo ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log +umask 022 +sudo env -i ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log ``` ## Installing the image onto the Raspberry Pi 3 From 5d5fca879430daba9db7b81d729f3ab1482e0870 Mon Sep 17 00:00:00 2001 From: Antoine Amarilli Date: Wed, 25 Oct 2017 11:11:50 +0200 Subject: [PATCH 6/8] point out that bugs can cause unbootable images --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fce10b8..364115b 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,8 @@ want to use: - If you want to use the latest versions of each software, you can replace `http://snapshot.debian.org/archive/debian/20171007T213914Z/` in raspi3.yaml with `http://deb.debian.org/debian`. Of course, this means that the - build may break if there are regressions in the latest versions. + build may break or fail to boot if there are regressions in the latest + versions. Once you have edited raspi3.yaml, you can generate the image by issuing the following: From dff4a405344a9a1dd9caef8c9298b7dff9d3cc3a Mon Sep 17 00:00:00 2001 From: Antoine Amarilli Date: Wed, 25 Oct 2017 11:17:50 +0200 Subject: [PATCH 7/8] clean the environment but keep important variables building the image fails otherwise (encoding issues, missing PATH, etc.); took invocation from https://unix.stackexchange.com/a/49057 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 364115b..1f1d275 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ issuing the following: ```shell umask 022 -sudo env -i ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log +sudo env -i HOME="$HOME" LC_CTYPE="${LC_ALL:-${LC_CTYPE:-$LANG}}" PATH="$PATH" USER="$USER" \ + ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log ``` ## Installing the image onto the Raspberry Pi 3 From 70ddd530f4edd1a5e01bda5c15d7643a3875e337 Mon Sep 17 00:00:00 2001 From: Antoine Amarilli Date: Wed, 25 Oct 2017 11:41:54 +0200 Subject: [PATCH 8/8] simplify environment invocation https://github.com/Debian/raspi3-image-spec/pull/2#discussion_r146799419 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f1d275..8278052 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ issuing the following: ```shell umask 022 -sudo env -i HOME="$HOME" LC_CTYPE="${LC_ALL:-${LC_CTYPE:-$LANG}}" PATH="$PATH" USER="$USER" \ +sudo env -i LC_CTYPE=C.UTF-8 PATH="$PATH" \ ./vmdb2/vmdb2 --output raspi3.img raspi3.yaml --log raspi3.log ```