Commit a25b51b5 authored by Guido Gunther's avatar Guido Gunther

Only use CI packages if distro ends in '+ci'

parent 22a25f4b
......@@ -12,7 +12,7 @@ usage() {
echo "Usage : $1 "
echo " -h Display this help message."
echo " -b [imx6|imx8|qemu-x86_64] select the board type."
echo " -d <distro> optional select the puros distro"
echo " -d <distro> distro to use. [ green, buster, green+ci, buster+ci ]"
echo " -T [ci|unstable] use the artifacts from this build for the image"
echo " -B build rootfs tarball as well"
}
......@@ -48,7 +48,7 @@ setup_loop() {
cwd=$(pwd)
distro=${DIST:-buster}
distro=${DIST:-buster+ci}
mirror=${MIRROR:-"http://deb.debian.org/debian"}
pureos_board=imx6
build_type=unstable
......@@ -84,6 +84,10 @@ while getopts ":hb:d:T:B" opt; do
esac
done
# If distro ends in CI use ci packages and cleanup distro name
[[ "${distro}" =~ \+ci ]] && ci_pkgs=1 || ci_pkgs=0
distro="${distro/+ci}"
kernel_url=https://storage.puri.sm/librem5/binaries/${build_type}/latest/files/
bootimg="${pureos_board}.img"
......@@ -92,7 +96,7 @@ bootimg="${pureos_board}.img"
# shellcheck source=conf/dists/buster
. conf/dists/"${distro}"
echo "Building ${bootimg} (board_type: ${board_type}, arch: ${arch}, build_type: ${build_type})"
echo "Building ${bootimg} (board_type: ${board_type}, arch: ${arch}, build_type: ${build_type}, ci_pkgs: ${ci_pkgs})"
echo "Installing extra packages ${packages}"
mkdir -p tmp/ files/
......@@ -122,6 +126,7 @@ sudo pureos_board="${pureos_board}" \
fdt_file="${fdt_file}" \
build_tarball="${build_tarball}" \
apt_sources="${escaped_apt_sources}" \
ci_pkgs="${ci_pkgs}" \
vmdebootstrap \
--enable-dhcp \
--verbose --image "${bootimg}" --log "tmp/${bootimg}.log" --size 3600M \
......
......@@ -196,17 +196,18 @@ function setup_apt()
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
EOF
cat << EOF > "${basedir}/etc/apt/apt.conf.d/71-no-recommends"
APT::Install-Recommends "0";
APT::Install-Suggests "0";
EOF
chroot ${basedir} apt-get install -y gnupg
cat data/ci-repo.key | chroot ${basedir} apt-key add -
if [ "${ci_pkgs}" -gt 0 ]; then
cat << EOF > "${basedir}/etc/apt/sources.list.d/ci.list"
deb http://ci.puri.sm/ scratch librem5
EOF
cat data/ci-repo.key | chroot ${basedir} apt-key add -
fi
}
......
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