diff --git a/build-image b/build-image index 4bbe45cfeb5cff254d4d71c945f6ddb99af8b950..b953a2510805d2c2272bc742f6d11d9e46655022 100755 --- a/build-image +++ b/build-image @@ -56,6 +56,7 @@ NULL= uboot_bin= build_tarball= want_qcow2= +apt_sources= while getopts ":hb:d:T:B" opt; do case ${opt} in @@ -88,6 +89,8 @@ bootimg="${pureos_board}.img" . conf/board . conf/packages +# shellcheck source=conf/dists/buster +. conf/dists/"${distro}" echo "Building ${bootimg} (board_type: ${board_type}, arch: ${arch}, build_type: ${build_type})" echo "Installing extra packages ${packages}" @@ -105,6 +108,10 @@ fi [ "${board_type}" != "nitrogen6" ] || fetch_nitrogen_uboot_upgrade "${pureos_board}" "${kernel_url}" files/ +# Preserve newlines as '|' +# shellcheck disable=SC2001 +escaped_apt_sources=$(echo "${apt_sources}" | sed 's/$/|/g') + set -x sudo pureos_board="${pureos_board}" \ distro="${distro}" \ @@ -114,6 +121,7 @@ sudo pureos_board="${pureos_board}" \ qemu="${qemu}" \ fdt_file="${fdt_file}" \ build_tarball="${build_tarball}" \ + apt_sources="${escaped_apt_sources}" \ vmdebootstrap \ --enable-dhcp \ --verbose --image "${bootimg}" --log "tmp/${bootimg}.log" --size 3600M \ diff --git a/conf/dists/buster b/conf/dists/buster new file mode 100644 index 0000000000000000000000000000000000000000..cef0f91d165da6d5d7e5323b0a5b4bdc3b8e71f5 --- /dev/null +++ b/conf/dists/buster @@ -0,0 +1,8 @@ +mirror="http://deb.debian.org/debian" +apt_sources="deb http://deb.debian.org/debian buster main contrib non-free +deb-src http://deb.debian.org/debian buster main contrib non-free +deb http://deb.debian.org/debian buster-updates main contrib non-free +deb-src http://deb.debian.org/debian buster-updates main contrib non-free +deb http://security.debian.org/debian-security buster/updates main contrib non-free +deb-src http://security.debian.org/debian-security buster/updates main contrib non-free +" diff --git a/conf/dists/green b/conf/dists/green new file mode 100644 index 0000000000000000000000000000000000000000..67e9ace34395e0df5448db43c8b2bccef3a53c67 --- /dev/null +++ b/conf/dists/green @@ -0,0 +1,2 @@ +mirror="http://repo.pureos.net/pureos" +apt_sources="deb http://repo.pureos.net/pureos green main" diff --git a/conf/packages b/conf/packages index 11d0647e04f299b81ebab9170fdbd08ab409a02a..f7e8d05699430988525ed7c16afbf254d8e328f4 100644 --- a/conf/packages +++ b/conf/packages @@ -89,7 +89,6 @@ packages=" ca-certificates cloud-initramfs-growroot dosfstools - firmware-ti-connectivity flatpak libnss-systemd locales diff --git a/root.sh b/root.sh index fbbe7b1630333614df3d5eb851dfbd2add720405..0acacd327f1977e4d90c4e7f706501626fe064c1 100755 --- a/root.sh +++ b/root.sh @@ -24,8 +24,6 @@ set -u set -x -mirror=deb.debian.org - echo "Configuring ${distro} in ${basedir} for board ${pureos_board}" # bindmount qemu into the rootfs so we can chroot into it if needed @@ -197,14 +195,9 @@ function install_pkgs() function setup_apt() { - cat << EOF > "${basedir}/etc/apt/sources.list" -deb http://$mirror/debian $distro main contrib non-free -deb-src http://$mirror/debian $distro main contrib non-free -deb http://$mirror/debian $distro-updates main contrib non-free -deb-src http://$mirror/debian $distro-updates main contrib non-free -deb http://security.debian.org/debian-security $distro/updates main contrib non-free -deb-src http://security.debian.org/debian-security $distro/updates main contrib non-free -EOF + echo "${apt_sources}" | sed 's/|/\n/g' > "${basedir}/etc/apt/sources.list" + echo "Set sources list to:" + cat "${basedir}/etc/apt/sources.list" cat << EOF > "${basedir}/etc/apt/sources.list.d/ci.list" deb http://ci.puri.sm/ scratch librem5