Fix raspbian sources

This commit is contained in:
2026-03-07 04:06:46 -08:00
parent 2d698e6643
commit 74e2382e56
10 changed files with 22 additions and 14 deletions
+8 -7
View File
@@ -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}"
-1
View File
@@ -1 +0,0 @@
ARCH=amd64
-1
View File
@@ -1 +0,0 @@
ARCH=arm64
+2
View File
@@ -0,0 +1,2 @@
# This builds ChillcraftOS for amd64
ARCH=amd64
+2
View File
@@ -0,0 +1,2 @@
# This builds ChillcraftOS for arm64
ARCH=arm64
+3
View File
@@ -0,0 +1,3 @@
# Raspberry Pi OS only targets arm64 since the rpi4
ARCH=arm64
PLATFORM=rpi
+3 -3
View File
@@ -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
+1 -1
View File
@@ -2,4 +2,4 @@ Types: deb
URIs: https://apt.oxmc.me/chillcraftos
Suites: RELEASE
Components: main
Signed-By: /usr/share/keyrings/oxmc.pgp
Signed-By: /usr/share/keyrings/oxmc.gpg
@@ -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
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