Skip to content
Snippets Groups Projects
Verified Commit ed55eaab authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

install packages with explicit TMPDIR

For package installation, the runner $TMPDIR may not be big enough, eg
when rebuilding an initramfs it runs out of space, so use a new function
that sets it explicitly.
parent 8f381b64
Branches
Tags
No related merge requests found
load common load common
begin_borg() { begin_borg() {
apt-get -qq install debootstrap borgbackup install_pkgs debootstrap borgbackup
if [ ! -d "$BN_SRCDIR" ]; then if [ ! -d "$BN_SRCDIR" ]; then
debootstrap --variant=minbase testing "$BN_SRCDIR" debootstrap --variant=minbase testing "$BN_SRCDIR"
fi fi
......
...@@ -241,3 +241,7 @@ makegpgkeys() { ...@@ -241,3 +241,7 @@ makegpgkeys() {
BN_SIGNKEY=$(gpg --keyid-format long -k sign@bntest0 | sed -n '2p' | grep -o '\S\+') BN_SIGNKEY=$(gpg --keyid-format long -k sign@bntest0 | sed -n '2p' | grep -o '\S\+')
export BN_SIGNKEY export BN_SIGNKEY
} }
install_pkgs() {
TMPDIR=/tmp DEBIAN_FRONTEND=noninteractive apt-get -qq install $@
}
load common load common
begin_dup() { begin_dup() {
apt-get -qq install debootstrap duplicity trickle install_pkgs debootstrap duplicity trickle
if [ ! -d /var/cache/bntest ]; then if [ ! -d /var/cache/bntest ]; then
debootstrap --variant=minbase testing "$BN_SRCDIR" debootstrap --variant=minbase testing "$BN_SRCDIR"
fi fi
......
load common load common
begin_mysql() { begin_mysql() {
apt-get -qq install default-mysql-server install_pkgs install default-mysql-server
systemctl is-active mysql || systemctl start mysql systemctl is-active mysql || systemctl start mysql
zcat "${BATS_TEST_DIRNAME}/samples/bntest_p8Cz8k.sql.gz" | mysql --defaults-file=/etc/mysql/debian.cnf zcat "${BATS_TEST_DIRNAME}/samples/bntest_p8Cz8k.sql.gz" | mysql --defaults-file=/etc/mysql/debian.cnf
zcat "${BATS_TEST_DIRNAME}/samples/bntest_v11vJj.sql.gz" | mysql --defaults-file=/etc/mysql/debian.cnf zcat "${BATS_TEST_DIRNAME}/samples/bntest_v11vJj.sql.gz" | mysql --defaults-file=/etc/mysql/debian.cnf
......
load common load common
begin_pgsql() { begin_pgsql() {
apt-get -qq install postgresql install_pkgs postgresql
systemctl is-active postgresql || systemctl start postgresql systemctl is-active postgresql || systemctl start postgresql
sudo -u postgres createuser --superuser root sudo -u postgres createuser --superuser root
createdb bntest_p8Cz8k createdb bntest_p8Cz8k
......
load common load common
begin_rdiff() { begin_rdiff() {
apt-get -qq install debootstrap rdiff-backup cstream install_pkgs install debootstrap rdiff-backup cstream
if [ ! -d /var/cache/bntest ]; then if [ ! -d /var/cache/bntest ]; then
debootstrap --variant=minbase testing /var/cache/bntest debootstrap --variant=minbase testing /var/cache/bntest
fi fi
......
load common load common
begin_rsync() { begin_rsync() {
apt-get -qq install debootstrap rsync install_pkgs debootstrap rsync
if [ ! -d "$BN_SRCDIR" ]; then if [ ! -d "$BN_SRCDIR" ]; then
debootstrap --variant=minbase testing "$BN_SRCDIR" debootstrap --variant=minbase testing "$BN_SRCDIR"
fi fi
......
load common load common
begin_sys() { begin_sys() {
apt-get -qq install debconf-utils hwinfo lvm2 cryptsetup-bin parted install_pkgs debconf-utils hwinfo lvm2 cryptsetup-bin parted
cat << EOF > "${BATS_TMPDIR}/backup.d/test.sys" cat << EOF > "${BATS_TMPDIR}/backup.d/test.sys"
when = manual when = manual
......
load common load common
begin_tar() { begin_tar() {
apt-get -qq install debootstrap ncompress zstd install_pkgs debootstrap ncompress zstd
if [ ! -d "$BN_SRCDIR" ]; then if [ ! -d "$BN_SRCDIR" ]; then
debootstrap --variant=minbase testing "$BN_SRCDIR" debootstrap --variant=minbase testing "$BN_SRCDIR"
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment