From 74e2382e56d1a994abc829c27acd6716b23b81e4 Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Sat, 7 Mar 2026 04:06:46 -0800 Subject: [PATCH] Fix raspbian sources --- build.sh | 15 ++++++++------- build_amd64 | 1 - build_arm64 | 1 - configs/build_amd64 | 2 ++ configs/build_arm64 | 2 ++ configs/build_rpi | 3 +++ stage0/00-configure-apt/00-run.sh | 6 +++--- .../00-configure-apt/files/{oxmc.pgp => oxmc.gpg} | 0 stage0/00-configure-apt/files/oxmc.sources | 2 +- stage0/00-configure-apt/files/raspbian.sources | 4 +++- 10 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 build_amd64 delete mode 100644 build_arm64 create mode 100644 configs/build_amd64 create mode 100644 configs/build_arm64 create mode 100644 configs/build_rpi rename stage0/00-configure-apt/files/{oxmc.pgp => oxmc.gpg} (100%) diff --git a/build.sh b/build.sh index c1ff77f..ebde029 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ run_sub_stage() { log "Begin ${SUB_STAGE_DIR}" pushd "${SUB_STAGE_DIR}" >/dev/null for i in {00..99}; do - for DEBCONF_FILE in "${i}-debconf-${ARCH}" "${i}-debconf-arm-only" "${i}-debconf"; do + for DEBCONF_FILE in "${i}-debconf-${ARCH}" "${i}-debconf-${PLATFORM}-only" "${i}-debconf-arm-only" "${i}-debconf"; do if [ -f "${SUB_STAGE_DIR}/${DEBCONF_FILE}" ]; then # Skip arm-only if not arm if [[ "${DEBCONF_FILE}" == *"-debconf-arm-only" ]] && [[ "${ARCH}" != "armhf" && "${ARCH}" != "arm64" ]]; then @@ -23,7 +23,7 @@ EOF log "End ${SUB_STAGE_DIR}/${DEBCONF_FILE}" fi done - for PACKAGE_LIST in "${i}-packages-nr-${ARCH}" "${i}-packages-nr-arm-only" "${i}-packages-nr"; do + for PACKAGE_LIST in "${i}-packages-nr-${ARCH}" "${i}-packages-nr-${PLATFORM}-only" "${i}-packages-nr-arm-only" "${i}-packages-nr"; do if [ -f "${SUB_STAGE_DIR}/${PACKAGE_LIST}" ]; then # Skip arm-only packages if not arm architecture if [[ "${PACKAGE_LIST}" == *"-nr-arm-only" ]] && [[ "${ARCH}" != "armhf" && "${ARCH}" != "arm64" ]]; then @@ -43,7 +43,7 @@ EOF log "End ${SUB_STAGE_DIR}/${PACKAGE_LIST}" fi done - for PACKAGE_LIST in "${i}-packages-${ARCH}" "${i}-packages-arm-only" "${i}-packages"; do + for PACKAGE_LIST in "${i}-packages-${ARCH}" "${i}-packages-${PLATFORM}-only" "${i}-packages-arm-only" "${i}-packages"; do if [ -f "${SUB_STAGE_DIR}/${PACKAGE_LIST}" ]; then # Skip arm-only packages if not arm architecture if [[ "${PACKAGE_LIST}" == *"-packages-arm-only" ]] && [[ "${ARCH}" != "armhf" && "${ARCH}" != "arm64" ]]; then @@ -63,7 +63,7 @@ EOF log "End ${SUB_STAGE_DIR}/${PACKAGE_LIST}" fi done - for PATCH_DIR in "${i}-patches-${ARCH}" "${i}-patches-arm-only" "${i}-patches"; do + for PATCH_DIR in "${i}-patches-${ARCH}" "${i}-patches-${PLATFORM}-only" "${i}-patches-arm-only" "${i}-patches"; do if [ -d "${SUB_STAGE_DIR}/${PATCH_DIR}" ]; then # Check arm-only patches should only apply for armhf/arm64 if [[ "${PATCH_DIR}" == *"-patches-arm-only" ]] && [[ "${ARCH}" != "armhf" && "${ARCH}" != "arm64" ]]; then @@ -101,7 +101,7 @@ EOF log "End ${SUB_STAGE_DIR}/${PATCH_DIR}" fi done - for RUN_SCRIPT in "${i}-run-${ARCH}.sh" "${i}-run-arm-only.sh" "${i}-run.sh"; do + for RUN_SCRIPT in "${i}-run-${ARCH}.sh" "${i}-run-${PLATFORM}-only.sh" "${i}-run-arm-only.sh" "${i}-run.sh"; do if [ -x "${SUB_STAGE_DIR}/${RUN_SCRIPT}" ]; then # Skip arm-only if not arm if [[ "${RUN_SCRIPT}" == *"-arm-only.sh" ]] && [[ "${ARCH}" != "armhf" && "${ARCH}" != "arm64" ]]; then @@ -115,7 +115,7 @@ EOF log "Skip ${SUB_STAGE_DIR}/${i}-run.sh (not executable)" fi done - for CHROOT_SCRIPT in "${i}-run-chroot-${ARCH}.sh" "${i}-run-chroot-arm-only.sh" "${i}-run-chroot.sh"; do + for CHROOT_SCRIPT in "${i}-run-chroot-${ARCH}.sh" "${i}-run-chroot-${PLATFORM}-only.sh" "${i}-run-chroot-arm-only.sh" "${i}-run-chroot.sh"; do if [ -f "${SUB_STAGE_DIR}/${CHROOT_SCRIPT}" ]; then # Skip arm-only if not arm if [[ "${CHROOT_SCRIPT}" == *"-arm-only.sh" ]] && [[ "${ARCH}" != "armhf" && "${ARCH}" != "arm64" ]]; then @@ -161,7 +161,7 @@ run_stage() { fi for SUB_STAGE_DIR in "${STAGE_DIR}"/*; do if [ -d "${SUB_STAGE_DIR}" ]; then - if [ ! -f "${SUB_STAGE_DIR}/SKIP" ] && [ ! -f "${SUB_STAGE_DIR}/SKIP_${ARCH}" ]; then + if [ ! -f "${SUB_STAGE_DIR}/SKIP" ] && [ ! -f "${SUB_STAGE_DIR}/SKIP_${ARCH}" ] && { [ -z "${PLATFORM}" ] || [ ! -f "${SUB_STAGE_DIR}/SKIP_${PLATFORM}" ]; }; then run_sub_stage fi fi @@ -228,6 +228,7 @@ export PI_GEN_REPO=${PI_GEN_REPO:-https://github.com/RPi-Distro/pi-gen} export PI_GEN_RELEASE=${PI_GEN_RELEASE:-Raspberry Pi reference} export ARCH="${ARCH:-arm64}" +export PLATFORM="${PLATFORM:-}" export RELEASE=${RELEASE:-trixie} export IMG_NAME="${IMG_NAME:-chillcraftos-$RELEASE-$ARCH}" diff --git a/build_amd64 b/build_amd64 deleted file mode 100644 index 92ac6f4..0000000 --- a/build_amd64 +++ /dev/null @@ -1 +0,0 @@ -ARCH=amd64 diff --git a/build_arm64 b/build_arm64 deleted file mode 100644 index c6b56f9..0000000 --- a/build_arm64 +++ /dev/null @@ -1 +0,0 @@ -ARCH=arm64 diff --git a/configs/build_amd64 b/configs/build_amd64 new file mode 100644 index 0000000..3e44ca2 --- /dev/null +++ b/configs/build_amd64 @@ -0,0 +1,2 @@ +# This builds ChillcraftOS for amd64 +ARCH=amd64 diff --git a/configs/build_arm64 b/configs/build_arm64 new file mode 100644 index 0000000..bc6d086 --- /dev/null +++ b/configs/build_arm64 @@ -0,0 +1,2 @@ +# This builds ChillcraftOS for arm64 +ARCH=arm64 diff --git a/configs/build_rpi b/configs/build_rpi new file mode 100644 index 0000000..cf3dca6 --- /dev/null +++ b/configs/build_rpi @@ -0,0 +1,3 @@ +# Raspberry Pi OS only targets arm64 since the rpi4 +ARCH=arm64 +PLATFORM=rpi diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh index c5d9103..836fb43 100755 --- a/stage0/00-configure-apt/00-run.sh +++ b/stage0/00-configure-apt/00-run.sh @@ -4,8 +4,8 @@ true > "${ROOTFS_DIR}/etc/apt/sources.list" # Add APT Sources -if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then - # On arm64/armhf systems (RpiOS only currently) add rpios sources +if [ "${PLATFORM}" == "rpi" ]; then + # On rpi platforms add rpi sources install -m 644 files/raspbian.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" install -m 644 files/raspi.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspbian.sources" @@ -21,7 +21,7 @@ fi # Configure oxmc apt sources install -m 644 files/oxmc.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/oxmc.sources" -install -m 644 files/oxmc.pgp "${ROOTFS_DIR}/usr/share/keyrings/" +install -m 644 files/oxmc.gpg "${ROOTFS_DIR}/usr/share/keyrings/" # Configure apt proxy if [ -n "$APT_PROXY" ]; then diff --git a/stage0/00-configure-apt/files/oxmc.pgp b/stage0/00-configure-apt/files/oxmc.gpg similarity index 100% rename from stage0/00-configure-apt/files/oxmc.pgp rename to stage0/00-configure-apt/files/oxmc.gpg diff --git a/stage0/00-configure-apt/files/oxmc.sources b/stage0/00-configure-apt/files/oxmc.sources index 98cd4d4..4db157b 100644 --- a/stage0/00-configure-apt/files/oxmc.sources +++ b/stage0/00-configure-apt/files/oxmc.sources @@ -2,4 +2,4 @@ Types: deb URIs: https://apt.oxmc.me/chillcraftos Suites: RELEASE Components: main -Signed-By: /usr/share/keyrings/oxmc.pgp \ No newline at end of file +Signed-By: /usr/share/keyrings/oxmc.gpg \ No newline at end of file diff --git a/stage0/00-configure-apt/files/raspbian.sources b/stage0/00-configure-apt/files/raspbian.sources index 5a14699..ee8e40a 100644 --- a/stage0/00-configure-apt/files/raspbian.sources +++ b/stage0/00-configure-apt/files/raspbian.sources @@ -3,4 +3,6 @@ URIs: http://raspbian.raspberrypi.com/raspbian/ Architectures: armhf Suites: RELEASE Components: main contrib non-free rpi -Signed-By: /usr/share/keyrings/raspbian-archive-keyring.pgp \ No newline at end of file +Signed-By: /usr/share/keyrings/raspbian-archive-keyring.pgp +# TODO: Remove Trusted once Raspbian reissues their key with SHA256+ (SHA1 rejected by sqv since 2026-02-01) +Trusted: yes \ No newline at end of file