#!/bin/bash

groupadd rkt || true
gpasswd -a admin rkt || true

sed -i 's/jessie/testing/g' /etc/apt/sources.list

DEBIAN_FRONTEND=noninteractive apt-get update -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew"
DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew"

DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes build-essential autoconf
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" squashfs-tools patch gnupg golang dbus libacl1-dev systemd-container libssl-dev libsystemd-dev libpam-systemd
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" default-jre
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" git patch bc tar xz-utils openssl
DEBIAN_FRONTEND=noninteractive apt-get build-dep -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" systemd
