2016-11-14 20:07:43 +03:00
#!/bin/bash
set -euo pipefail
2016-11-22 06:22:51 +03:00
if test -z " ${ INSIDE_VM :- } " ; then
2016-11-14 20:07:43 +03:00
2016-11-22 06:22:51 +03:00
# do this in the host
. ${ commondir } /libvm.sh
vm_setup
if ! vm_ssh_wait 30; then
echo "ERROR: A running VM is required for 'make vmcheck'."
exit 1
fi
vm_rsync
2017-07-27 17:16:23 +03:00
vm_cmd env INSIDE_VM = 1 /var/roothome/sync/tests/vmcheck/sync.sh
2016-11-22 06:22:51 +03:00
exit 0
2017-09-01 20:33:36 +03:00
fi
2016-11-22 06:22:51 +03:00
2017-09-01 20:33:36 +03:00
set -x
2017-08-03 16:41:18 +03:00
2017-09-01 20:33:36 +03:00
# And then this code path in the VM
2017-08-03 16:41:18 +03:00
2017-09-01 20:33:36 +03:00
ostree admin unlock || :
# Now, overlay our built binaries & config files
INSTTREE = /var/roothome/sync/insttree
rsync -rlv $INSTTREE /usr/ /usr/
if [ -d $INSTTREE /etc ] ; then # on CentOS, the dbus service file is in /usr
rsync -rlv $INSTTREE /etc/ /etc/
fi
restorecon -v /usr/bin/{ rpm-,} ostree /usr/libexec/rpm-ostreed
2017-10-12 17:07:45 +03:00
overrides_dir = /etc/systemd/system/rpm-ostreed.service.d
mkdir -p $overrides_dir
2017-09-01 20:33:36 +03:00
# For our test suite at least, to catch things like
# https://github.com/projectatomic/rpm-ostree/issues/826
2017-10-12 17:07:45 +03:00
cat > $overrides_dir /fatal-warnings.conf << EOF
2017-06-09 23:16:51 +03:00
[ Service]
Environment = G_DEBUG = fatal-warnings
EOF
2017-09-01 20:33:36 +03:00
2017-10-12 17:07:45 +03:00
# In the developer workflow, it's just not helpful to
# have the daemon auto-exit. But let's keep it as a separate
# override file to make it easy to drop if needed.
cat > $overrides_dir /no-idle-exit.conf << EOF
[ Service]
Environment = RPMOSTREE_DEBUG_DISABLE_DAEMON_IDLE_EXIT = 1
EOF
2017-09-01 20:33:36 +03:00
systemctl daemon-reload
systemctl restart rpm-ostreed