# Install apt dependencies
echo Installing necessary apt dependencies in the chroot
sudo apt-get update -y
-sudo apt-get upgrade -y
sudo apt-get install -y automake binutils-dev bison build-essential \
sysvinit-utils sysvinit-core \
ccache clang cmake doxygen dvipng flex gcc git graphviz \
#!/bin/bash
#
# Relies on install-hdl-apt-reqs being run first
+# which has already added buster-backports (and pinned libcurl3-gnutls, sigh)
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
-fi
-# for qemu 5.2 use debian/buster backports
-cat << EOF > /etc/apt/sources.list.d/buster_backports.list
-deb http://deb.debian.org/debian buster-backports main
-EOF
-
-# oooo annoying, pin preferences for buster-backports
-cat << EOF > /etc/apt/preferences.d/99buster-backports
-Package: *
-Pin: release a=buster-backports
-Pin-Priority: 900
-EOF
apt-get update -y
-apt-get upgrade -y
apt-get install -y python3-pykwalify \
python3-pyelftools
then echo "Please run as root"
exit
fi
-# for qemu 5.2 use debian/buster backports
-cat << EOF > /etc/apt/sources.list.d/buster_backports.list
-deb http://deb.debian.org/debian buster-backports main
-EOF
-
-# oooo annoying, pin preferences for buster-backports
-cat << EOF > /etc/apt/preferences.d/99buster-backports
-Package: *
-Pin: release a=buster-backports
-Pin-Priority: 900
-
-Package: libcurl3-gnutls
-Pin: release a=stable
-Pin-Priority: 901
-EOF
-
apt-get update -y
-apt-get upgrade -y
apt-get install -y autoconf \
bison \
build-essential \
#!/bin/bash
+# Relies on mk-deb-chroot adding buster-backports
+
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
-echo "deb http://deb.debian.org/debian buster-backports main" | tee \
- -a /etc/apt/sources.list
+
apt-get update -y
-apt-get upgrade -y
apt-get install -y build-essential \
cmake \
git \
"
fi
+#!!! buster backports is needed for a lot of things
+cat << EOF > /opt/chroot/$chrootdir/etc/apt/sources.list.d/buster_backports.list
+deb http://deb.debian.org/debian buster-backports main
+EOF
+
+# oooo annoying, pin preferences for buster-backports
+cat << EOF > /opt/chroot/$chrootdir/etc/apt/preferences.d/99buster-backports
+Package: *
+Pin: release a=buster-backports
+Pin-Priority: 900
+
+Package: libcurl3-gnutls:amd64
+Pin: release a=stable
+Pin-Priority: 901
+EOF
+
# Install apt dependencies in the chroot
cd /tmp
schroot -c $chrootdir /bin/bash --directory=/tmp << EOF
#!/bin/bash
+# Relies on install-hdl-apt-reqs being run first
+# which has already added buster-backports (and pinned libcurl3-gnutls, sigh)
+
if [ "$EUID" -ne 0 ]
then echo "Please run as root using 'sudo bash'"
exit
fi
-#!!! buster backports is needed for cmake
-cat << EOF > /etc/apt/sources.list.d/buster_backports.list
-deb http://deb.debian.org/debian buster-backports main
-EOF
-
-# oooo annoying, pin preferences for buster-backports
-cat << EOF > /etc/apt/preferences.d/99buster-backports
-Package: *
-Pin: release a=buster-backports
-Pin-Priority: 900
-
-Package: libcurl3-gnutls:amd64
-Pin: release a=stable
-Pin-Priority: 901
-EOF
-
-# upgrade to buster-backports
-apt-get update -y
-apt-get upgrade -y
-
# change into $SUDO_USER home directory
cd /home/$SUDO_USER
mkdir -p src/symbiflow