diff --git a/build.sh b/build.sh index 8128568..f684a64 100755 --- a/build.sh +++ b/build.sh @@ -262,6 +262,7 @@ export PUBKEY_SSH_FIRST_USER export CLEAN export APT_PROXY +export TEMP_REPO export STAGE export STAGE_DIR diff --git a/docs/config.md b/docs/config.md index 68f1e00..7bdb5a2 100644 --- a/docs/config.md +++ b/docs/config.md @@ -31,6 +31,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 diff --git a/export-image/00-allow-rerun/00-run.sh b/export-image/00-allow-rerun/00-run.sh index ffc0d39..f525ae2 100755 --- a/export-image/00-allow-rerun/00-run.sh +++ b/export-image/00-allow-rerun/00-run.sh @@ -1,10 +1,6 @@ #!/bin/bash -e if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then - if [ ! -x "${ROOTFS_DIR}/usr/bin/qemu-arm-static" ]; then - cp /usr/bin/qemu-arm-static "${ROOTFS_DIR}/usr/bin/" - fi - if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" fi diff --git a/export-image/01-set-sources/01-run.sh b/export-image/01-set-sources/01-run.sh index cf783c5..9387751 100755 --- a/export-image/01-set-sources/01-run.sh +++ b/export-image/01-set-sources/01-run.sh @@ -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 diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index da6ab55..777ca8c 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -133,9 +133,9 @@ none | *) esac if [ -f "${SBOM_FILE}" ]; then - xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/image_$(basename "${SBOM_FILE}").xz" + xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/$(basename "${SBOM_FILE}").xz" fi if [ -f "${BMAP_FILE}" ]; then - xz -c "${BMAP_FILE}" > "$DEPLOY_DIR/image_$(basename "${BMAP_FILE}").xz" + cp "$BMAP_FILE" "$DEPLOY_DIR/" fi cp "$INFO_FILE" "$DEPLOY_DIR/" diff --git a/export-image/prerun.sh b/export-image/prerun.sh index e59e58d..c878ff5 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -19,11 +19,11 @@ ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 400 * 1024 * 1024) / 1" | bc)" BOOT_PART_START=$((ALIGN)) BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN)) -ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE)) -ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN)) -RECOVERY_PART_START=$((ROOT_PART_START + ROOT_PART_SIZE)) +RECOVERY_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE)) RECOVERY_PART_SIZE=$(((RECOVERY_SIZE + ALIGN - 1) / ALIGN * ALIGN)) -IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE + RECOVERY_PART_SIZE)) +ROOT_PART_START=$((RECOVERY_PART_START + RECOVERY_PART_SIZE)) +ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN)) +IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + RECOVERY_PART_SIZE + ROOT_PART_SIZE)) echo "Estimated sizes:" echo " Boot partition: $((BOOT_PART_SIZE / 1024 / 1024))MB" diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh index 27927df..26d968e 100755 --- a/stage0/00-configure-apt/00-run.sh +++ b/stage0/00-configure-apt/00-run.sh @@ -20,6 +20,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 + # Configure apt preferences install -m 644 files/apt-chillcraftos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/" diff --git a/stage2/02-net-tweaks/00-packages b/stage2/02-net-tweaks/00-packages index 308e8d0..cedf05f 100644 --- a/stage2/02-net-tweaks/00-packages +++ b/stage2/02-net-tweaks/00-packages @@ -1,3 +1,3 @@ -wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek +wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-realtek firmware-mediatek firmware-marvell-prestera- network-manager net-tools diff --git a/stage3/00-install-packages/01-packages-nr b/stage3/00-install-packages/01-packages-nr index 2980e65..92ac768 100644 --- a/stage3/00-install-packages/01-packages-nr +++ b/stage3/00-install-packages/01-packages-nr @@ -2,5 +2,5 @@ xserver-xorg xinit menu-xdg yad zenity xdg-utils gvfs-backends gvfs-fuse -gdm3 gnome-themes-extra-data gnome-icon-theme papirus-icon-theme +gdm3 gnome-themes-extra-data gnome-icon-theme gnome-keyring