Fix apt sources

This commit is contained in:
2025-04-23 04:11:43 -07:00
parent d4fb8f501d
commit 1a6d3aeeed

View File

@@ -2,10 +2,14 @@
# Configure apt sources
install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/"
install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
install -m 644 files/oxmc.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list"
if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then
install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list"
fi
install -m 644 files/oxmc.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/oxmc.list"
# Configure apt proxy
@@ -19,9 +23,11 @@ fi
# Configure apt preferences
install -m 644 files/apt-chillcraftos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/"
# Add raspberrypi-archive-keyring to apt
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/"
if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then
# Add raspberrypi-archive-keyring to apt
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/"
fi
# Add oxmc-archive-keyring to apt
cat files/oxmc.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/oxmc.gpg"
@@ -29,10 +35,10 @@ install -m 644 "${STAGE_WORK_DIR}/oxmc.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d
# Add armhf and arm64 architectures, update and upgrade and cache policy
on_chroot <<- \EOF
ARCH="$(dpkg --print-architecture)"
if [ "$ARCH" = "armhf" ]; then
SYSTEM_ARCH="$(dpkg --print-architecture)"
if [ "$SYSTEM_ARCH" = "armhf" ]; then
dpkg --add-architecture arm64
elif [ "$ARCH" = "arm64" ]; then
elif [ "$SYSTEM_ARCH" = "arm64" ]; then
dpkg --add-architecture armhf
fi
apt-get update