Skip to content

Commit 549681f

Browse files
committed
Updates to avoid common pitfalls when changing the RELEASE variable
Fixes RPi-Distro#635, fixes RPi-Distro#645, fixes RPi-Distro#632
1 parent 47e34ef commit 549681f

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ Getting started is as simple as cloning this repository on your build machine. Y
2727
can do so with:
2828

2929
```bash
30-
git clone --depth 1 https://github.com/RPI-Distro/pi-gen.git
30+
git clone https://github.com/RPI-Distro/pi-gen.git
3131
```
3232

33-
Using `--depth 1` with `git clone` will create a shallow clone, only containing
33+
`--depth 1` can be added afer `git clone` to create a shallow clone, only containing
3434
the latest revision of the repository. Do not do this on your development machine.
3535

3636
Also, be careful to clone the repository to a base path **NOT** containing spaces.
@@ -80,8 +80,11 @@ The following environment variables are supported:
8080

8181
* `RELEASE` (Default: bullseye)
8282

83-
The release version to build images against. Valid values are jessie, stretch,
84-
buster, bullseye, and testing.
83+
The release version to build images against. Valid values are any supported
84+
Debian release. However, since different releases will have different sets of
85+
packages available, you'll need to either modify your stages accordingly, or
86+
checkout the appropriate branch. For example, if you'd like to build a
87+
`buster` image, you should do so from the `buster` branch.
8588

8689
* `APT_PROXY` (Default: unset)
8790

@@ -489,7 +492,7 @@ A 64 bit image can be generated from the `arm64` branch in this repository. Just
489492
replace the command from [this section](#getting-started-with-building-your-images)
490493
by the one below, and follow the rest of the documentation:
491494
```bash
492-
git clone --depth 1 --branch arm64 https://github.com/RPI-Distro/pi-gen.git
495+
git clone --branch arm64 https://github.com/RPI-Distro/pi-gen.git
493496
```
494497

495498
If you want to generate a 64 bits image from a Raspberry Pi running a 32 bits

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}
226226
export FIRST_USER_NAME=${FIRST_USER_NAME:-pi}
227227
export FIRST_USER_PASS
228228
export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0}
229-
export RELEASE=${RELEASE:-bullseye}
229+
export RELEASE=${RELEASE:-bullseye} # Don't forget to update stage0/prerun.sh
230230
export WPA_ESSID
231231
export WPA_PASSWORD
232232
export WPA_COUNTRY

stage0/prerun.sh

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/bash -e
22

3+
if [ "$RELEASE" != "bullseye" ]; then
4+
echo "WARNING: RELEASE does not match the intended option for this branch."
5+
echo " Please check the relevant README.md section."
6+
fi
7+
38
if [ ! -d "${ROOTFS_DIR}" ] || [ "${USE_QCOW2}" = "1" ]; then
49
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/
510
fi

0 commit comments

Comments
 (0)