systemtap/plans/ci/prepare/prepare.sh
Martin Cermak 20a55c19f6 CI tests: SELinux setup common for all the tests
Userspace probing needs custom SELinux setup so that systemtap
can do userspace probing using dyninst.  See check_dyninst_sebools()
in stapdyn/dynutil.cxx for details.

This update moves such SELinux setup out from the userspace-probes
testcase, and makes it common for all the systemtap CI tests.
2021-06-14 18:44:12 +02:00

36 lines
901 B
Bash
Executable File

#!/bin/bash
export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS"
export DEBUGINFOD_TIMEOUT=300
# On Rawhide, the running kernel packages won't probably be avail in
# configured repos. Debuginfo isn't a problem, we access that using
# the debuginfod.
__install_deps ()
{
TMPD=$(mktemp -d)
pushd $TMPD
koji download-build --rpm kernel-`uname -r` --arch `uname -i`
koji download-build --rpm kernel-devel-`uname -r` --arch `uname -i`
koji download-build --rpm kernel-modules-`uname -r` --arch `uname -i`
dnf -y install kernel{,-devel,-modules}-`uname -r`.rpm
popd
rm -rf $TMPD
}
set -xe
# Install needed packages
stap-prep || __install_deps
stap-prep
# Report installed packages
stap-report
# Set up SELinux so that it allows for userspace probing
setsebool allow_execmod on
setsebool allow_execstack on
setsebool deny_ptrace off
set +xe