Add TEMP_REPO variable
This commit is contained in:
parent
260c17db0e
commit
ca3d54e7e7
@ -80,6 +80,13 @@ The following environment variables are supported:
|
||||
will not be included in the image, making it safe to use an `apt-cacher` or
|
||||
similar package for development.
|
||||
|
||||
* `TEMP_REPO` (Default: unset)
|
||||
|
||||
An additional temporary apt repo to be used during the build process. This
|
||||
could be useful if you require pre-release software to be included in the
|
||||
image. The variable should contain sources in [one-line-style format](https://manpages.debian.org/stable/apt/sources.list.5.en.html#ONE-LINE-STYLE_FORMAT).
|
||||
"RELEASE" will be replaced with the RELEASE variable.
|
||||
|
||||
* `BASE_DIR` (Default: location of `build.sh`)
|
||||
|
||||
**CAUTION**: Currently, changing this value will probably break build.sh
|
||||
|
1
build.sh
1
build.sh
@ -222,6 +222,7 @@ export PUBKEY_SSH_FIRST_USER
|
||||
|
||||
export CLEAN
|
||||
export APT_PROXY
|
||||
export TEMP_REPO
|
||||
|
||||
export STAGE
|
||||
export STAGE_DIR
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete
|
||||
on_chroot << EOF
|
||||
apt-get update
|
||||
|
@ -12,6 +12,13 @@ else
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||
fi
|
||||
|
||||
if [ -n "$TEMP_REPO" ]; then
|
||||
install -m 644 /dev/null "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
echo "$TEMP_REPO" | sed "s/RELEASE/$RELEASE/g" > "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
else
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
fi
|
||||
|
||||
cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg"
|
||||
install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
|
||||
on_chroot <<- \EOF
|
||||
|
Loading…
x
Reference in New Issue
Block a user