Linux HOWTOs

About | Home | Search


HOWTO: trousers
Description: Open-source Trusted Computing Group Software Stack
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# TrouSerS 0.3.14
# ===============
# TCG = Trusted Computing Group
# TPM = Trusted Platform Module

# If you ever want to remove TrouSerS, or clean up old files before
# installing a new version, skip down to the bottom

# Prerequisites:
# GTK 2.x (optional; if you want the GUI pop-up)
# OpenSSL
# gmp (instead of OpenSSL?; --with-gmp)

# Get it
cd
test -f installed/trousers-0.3.14.tar.gz &&
 mv -f installed/trousers-0.3.14.tar.gz .
test ! -f trousers-0.3.14.tar.gz &&
 wget https://downloads.sf.net/trousers/trousers-0.3.14.tar.gz

# Verify tarball w/ sha1sum:
# (this came from mine, so only proves that yours is the same)
echo "9ca2cc9e1179465f6c5d9055e2b855e25031b85a  trousers-0.3.14.tar.gz" | \
sha1sum -c

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "trousers-*" -exec rm -r {} \;
mkdir trousers-0.3.14
tar xzvf ~/trousers-0.3.14.tar.gz -C trousers-0.3.14
cd trousers-0.3.14
test $UID = 0 && chown -R root:root .

# Read ./README, check out the mailing lists, bug tracker, etc. via
# the SourceForge project page

# If OpenSSL is installed in the < 1.1.0 default prefix of /usr/local/ssl
# use --with-openssl=/usr/local/ssl and if you are 64-bit, you may also
# need to use LDFLAGS=-L/usr/local/ssl/lib64 before it can find the
# libraries

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --libdir=/usr/local/lib64 --mandir=/usr/local/man

# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --mandir=/usr/local/man

# Build it
make

# Become root to install it
su

# Install it
make install
ldconfig

# Become yourself again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/trousers-*.tar.*
mv trousers-0.3.14.tar.gz installed/


# If you ever want to uninstall TrouSerS, this should do it:
cd
su
killall tcsd > /dev/null 2>&1
sleep 2
killall -9 tcsd > /dev/null 2>&1
test -d src/trousers-* && ( cd src/trousers-* ; make uninstall )
test -d /usr/local/include/trousers/ && rm -r /usr/local/include/trousers
test -d /usr/local/include/tss && rm -r /usr/local/include/tss
( cd /usr/local/lib ; rm -f libtddl.* libtspi.* )
test -d /usr/local/lib64 &&
 ( cd /usr/local/lib64 ; rm -f libtddl.* libtspi.* )
test -d /usr/local/var/lib/tpm && rm -r /usr/local/var/lib/tmp
rm -f /usr/local/etc/tcsd.conf /usr/local/man/man3/Tspi_*.3 \
/usr/local/man/man5/tcsd.conf.5 /usr/local/man/man8/tcsd.8 \
/usr/local/sbin/tcsd
userdel tss
groupdel tss
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "trousers-*" -exec rm -r {} \;
rm -f ~/installed/trousers-*.tar.*

Back to the list


Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>