Last active
December 21, 2018 16:19
-
-
Save lukehinds/952cee9bae8599b1b051970cafbfa51b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo -e "Please run as the root user" | |
exit 1 | |
fi | |
echo -e "Updating Packages" | |
dnf update -y | |
echo -e "Install virtualization package group and deps" | |
dnf install -y @virtualization | |
dnf -y install make \ | |
libtasn1-devel \ | |
expect \ | |
socat \ | |
python3-twisted \ | |
fuse-devel glib2-devel \ | |
gnutls \ | |
gnutls-devel \ | |
gnutls-utils \ | |
tpm-tools \ | |
tpm2-tools \ | |
openssl-devel \ | |
git \ | |
libtool \ | |
autoconf | |
echo -e "Starting / Enabling Libvirt virtualization package group" | |
systemctl start libvirtd | |
systemctl enable libvirt | |
echo -e "Clone and build libtmpms" | |
git clone https://github.com/stefanberger/libtpms | |
cd libtpms/ | |
./bootstrap.sh | |
./configure --prefix=/usr --with-openssl --with-tpm2 | |
make | |
make install | |
echo -e "Clone and build swtpm" | |
cd ../ | |
git clone https://github.com/stefanberger/swtpm | |
cd swtpm/ | |
./autogen.sh --with-openssl --prefix=/usr | |
make -j4 | |
make -j4 check | |
make install | |
echo -e "Build complete" | |
echo -e "Run swtpm --help." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment