mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-08 11:52:32 +01:00
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.
This commit is contained in:
parent
8f381b6415
commit
ed55eaab73
@ -1,7 +1,7 @@
|
||||
load common
|
||||
|
||||
begin_borg() {
|
||||
apt-get -qq install debootstrap borgbackup
|
||||
install_pkgs debootstrap borgbackup
|
||||
if [ ! -d "$BN_SRCDIR" ]; then
|
||||
debootstrap --variant=minbase testing "$BN_SRCDIR"
|
||||
fi
|
||||
|
@ -241,3 +241,7 @@ makegpgkeys() {
|
||||
BN_SIGNKEY=$(gpg --keyid-format long -k sign@bntest0 | sed -n '2p' | grep -o '\S\+')
|
||||
export BN_SIGNKEY
|
||||
}
|
||||
|
||||
install_pkgs() {
|
||||
TMPDIR=/tmp DEBIAN_FRONTEND=noninteractive apt-get -qq install $@
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
load common
|
||||
|
||||
begin_dup() {
|
||||
apt-get -qq install debootstrap duplicity trickle
|
||||
install_pkgs debootstrap duplicity trickle
|
||||
if [ ! -d /var/cache/bntest ]; then
|
||||
debootstrap --variant=minbase testing "$BN_SRCDIR"
|
||||
fi
|
||||
|
@ -1,7 +1,7 @@
|
||||
load common
|
||||
|
||||
begin_mysql() {
|
||||
apt-get -qq install default-mysql-server
|
||||
install_pkgs install default-mysql-server
|
||||
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_v11vJj.sql.gz" | mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
|
@ -1,7 +1,7 @@
|
||||
load common
|
||||
|
||||
begin_pgsql() {
|
||||
apt-get -qq install postgresql
|
||||
install_pkgs postgresql
|
||||
systemctl is-active postgresql || systemctl start postgresql
|
||||
sudo -u postgres createuser --superuser root
|
||||
createdb bntest_p8Cz8k
|
||||
|
@ -1,7 +1,7 @@
|
||||
load common
|
||||
|
||||
begin_rdiff() {
|
||||
apt-get -qq install debootstrap rdiff-backup cstream
|
||||
install_pkgs install debootstrap rdiff-backup cstream
|
||||
if [ ! -d /var/cache/bntest ]; then
|
||||
debootstrap --variant=minbase testing /var/cache/bntest
|
||||
fi
|
||||
|
@ -1,7 +1,7 @@
|
||||
load common
|
||||
|
||||
begin_rsync() {
|
||||
apt-get -qq install debootstrap rsync
|
||||
install_pkgs debootstrap rsync
|
||||
if [ ! -d "$BN_SRCDIR" ]; then
|
||||
debootstrap --variant=minbase testing "$BN_SRCDIR"
|
||||
fi
|
||||
|
@ -1,7 +1,7 @@
|
||||
load common
|
||||
|
||||
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"
|
||||
when = manual
|
||||
|
@ -1,7 +1,7 @@
|
||||
load common
|
||||
|
||||
begin_tar() {
|
||||
apt-get -qq install debootstrap ncompress zstd
|
||||
install_pkgs debootstrap ncompress zstd
|
||||
if [ ! -d "$BN_SRCDIR" ]; then
|
||||
debootstrap --variant=minbase testing "$BN_SRCDIR"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user