Commit 60e03680 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

Merge branch 'check-patched' into 'master'

Check for patched packages

See merge request Librem5/image-builder!98
parents 266a34bd 693c2efe
......@@ -205,6 +205,7 @@ set -x
sudo pureos_board="${pureos_board}" \
distro="${distro}" \
packages="${packages} ${board_packages}" \
patched="${patched}" \
http_proxy="${http_apt_proxy:-${http_proxy:-}}" \
https_proxy="${https_apt_proxy:-${https_proxy:-}}" \
qemu="${qemu}" \
......
# Packages to install on all dev boards
packages="
librem5-gnome
librem5-dev-tools
librem5-gnome-dev
"
# Packages that are patched (need to have a magic tag in their version number)
# See https://source.puri.sm/snippets/20
patched="
flash-kernel
libgl1-mesa-dri
"
......@@ -100,6 +100,21 @@ function build_tarball()
}
function check_patched()
{
if [ -z "${patched}" ]; then
return
fi
for pkg in ${patched}; do
if ! chroot "${basedir}" dpkg -s ${pkg} | grep "^Version: .*pureos"; then
echo "${pkg} is not a patched version."
exit 1
fi
done
}
function cleanup_chroot()
{
chroot "${basedir}" apt-get clean
......@@ -200,7 +215,7 @@ function setup_apt()
APT::Install-Recommends "0";
APT::Install-Suggests "0";
EOF
chroot ${basedir} apt-get install -y gnupg
chroot "${basedir}" apt-get install -y gnupg
if [ "${ci_pkgs}" -gt 0 ]; then
cat << EOF > "${basedir}/etc/apt/sources.list.d/ci.list"
......@@ -244,9 +259,9 @@ function create_report()
{
echo "Installed packages:"
chroot "${basedir}" dpkg -l
echo -e "\nInstalled apt keys:"
echo -e "\\nInstalled apt keys:"
chroot "${basedir}" apt-key list
echo -e "\nKernels:"
echo -e "\\nKernels:"
ls -l "${basedir}/boot"
}
......@@ -286,6 +301,7 @@ case "${pureos_board}" in
;;
esac
check_patched
create_report > "./tmp/${pureos_board}-report.log"
create_stamp
......
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