Commit e85746a1 authored by Guido Gunther's avatar Guido Gunther

Create distro sources list from specified dist

CI is still enabled by default.
parent 758bfce7
......@@ -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 \
......
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
"
mirror="http://repo.pureos.net/pureos"
apt_sources="deb http://repo.pureos.net/pureos green main"
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment