I developed the directions on this page using Fedora. However they should work with any RPM based Linux distro. Please note, the section regarding the patches are specific to Fedora and may not apply to your particular distribution. I divided the instructions into two distinct sections, those for Truerypt 5.1a and those for TrueCrypt 6.0a. I highly recommend you follow the instructions for TrueCrypt 6.0a.

Note: The following instructions should be completed by a non-root user, except for a few specific commands as noted in the text. These instructions apply to both installs.

  1. If you have not already done so, configure your home directory so that you can build RPM files without needing root privileges. This involves two steps:

    1. Create an RPM build directory structure in your home directory. I call mine "rpm", you may want to call yours "rpmbuild" or whatever... but choose a name which doesn't already exist. The example assumes you are using "rpm" as the name:

      % cd
      % mkdir -m 755 rpm
      % cd rpm
      % mkdir -m 755 BUILD RPMS SOURCES SPECS SRPMS

    2. Create a .rpmmacros file in your home directory which contains a pointer to the directory structure you just created. I use a second line which marks any RPM packages I build with my own name and email address- while not strictly required, it is a good idea. My file looks like this:

      %_topdir /home/marlowe/rpm
      %packager Patrick R McDonald <marlowe@antagonism.org>

      Obviously you need to substitute the full path to the "rpm" directory within your home directory, as well as your own name and email address.

  2. Build the RPM file

    Download TrueCrypt 5.1a source tarball and WX patch to your ~/rpm/SOURCES directory. If you use Fedora Core 9 or later, you will also need to download gcc-4.3 patch. Due to changes in gcc 4.3, TrueCrypt will not successfully compile without it. You will need to download the truecrypt spec file to your ~/rpm/SPECS directory. The below example covers the commands for a Fedora Core 9 system.

    % cd ~/rpm/SOURCES
    % wget -c http://www.antagonism.org/files/TrueCrypt-5.1a-Source.tar.gz
    % wget -c http://www.antagonism.org/files/truecrypt-5.1a-wx.patch
    % wget -c http://www.antagonism.org/files/truecrypt-5.1a-gcc-4.3.patch
    % cd ~/rpm/SPECS
    % wget -c http://www.antagonism.org/files/truecrypt-5.spec

    If you are not running Fedora Core 9 or later, you need to comment out the following lines in the spec file.

    Patch2: %{name}-%{version}-gcc-4.3.patch
    %patch2 -p2

    Build the RPM from the spec file. The below example covers the command to build the RPM.

    % cd ~/rpm/SPECS
    % rpmbuild -ba truecrypt-5.spec

    (The below section is taken almost verbatim from the following page by John Simpson.

    This should go through the process of configuring and compiling the truecrypt software according to the truecrypt.spec file. It will then "install" the software to a temporary working directory, and then scan that directory to build a list of the files which were installed. It then compares that list to a checklist in the spec file to make sure you aren't missing anything, and you aren't forgetting to include any files which are installed from the source, and then builds the binary RPM files.

    If it complains about missing dependencies, read the error message carefully. In many cases the message will tell you the name of the package or library it needs, and a simple "yum install" command as root will be all you need in order to install what it needs (and then try the "rpmbuild" command again.)

    Download TrueCrypt 6.0a source tarball and WX patch to your ~/rpm/SOURCES directory. You will need to download the truecrypt spec file to your ~/rpm/SPECS directory. The below example covers the commands for a Fedora Core 9 system.

    % cd ~/rpm/SOURCES
    % wget -c http://www.antagonism.org/files/TrueCrypt-6.0a-Source.tar.gz
    % wget -c http://www.antagonism.org/files/truecrypt-6.0a-wx.patch
    % cd ~/rpm/SPECS
    % wget -c http://www.antagonism.org/files/truecrypt-6.spec

    Build the RPM from the spec file. The below example covers the command to build the RPM.

    % cd ~/rpm/SPECS
    % rpmbuild -ba truecrypt-6.spec

    (The below section is taken almost verbatim from the following page by John Simpson.

    This should go through the process of configuring and compiling the truecrypt software according to the truecrypt.spec file. It will then "install" the software to a temporary working directory, and then scan that directory to build a list of the files which were installed. It then compares that list to a checklist in the spec file to make sure you aren't missing anything, and you aren't forgetting to include any files which are installed from the source, and then builds the binary RPM files.

    If it complains about missing dependencies, read the error message carefully. In many cases the message will tell you the name of the package or library it needs, and a simple "yum install" command as root will be all you need in order to install what it needs (and then try the "rpmbuild" command again.)

  3. Install the truecrypt software.

    % su -
    Password:
    # cd ~userid/rpm/RPMS/i386
    # rpm -ivh truecrypt-*
    # exit


Configuring Fedora for TrueCrypt

TrueCrypt requires root privileges to mount a TrueCrypt volume. To allow this, you can configure your system in one of two ways. The first way is to add the user to the wheel group. The issue with this is you may merely want the user to mount and unmount TrueCrypt volumes, rather than executing any and all commands with root privileges. Thus the second way, adding a user to a specific group which is only able to execute the truecrypt command with root privileges. The example below details the commands necessary to configure the second method.

First you need to create a truecrypt group.

# groupadd truecrypt

Next you need to add the user to the truecrypt group as a secondary group. The below example demonstrates this with the user marlowe. Make sure to change the command accordingly.

# usermod -G truecrypt marlowe

The last item is make the appropriate changes to the /etc/sudoers file. The first change is to add the line specifying the truecrypt may run only the command, /usr/bin/truecrypt. The second change is to comment the line, "Default requiretty". Below demonstrates the first line to be added.

## Allows members of the truecrypt group to mount and unmount
## devices in truecrypt
%truecrypt ALL=(root) /usr/bin/truecrypt

When a user goes to mount a TrueCrypt volume, truecrypt will show a dialog box stating "Administrator privileges required" and requesting the user to enter a password. The password requested is the user's password. Once user enters the password, truecrypt will mount the volume.


Downloads

File: TrueCrypt-5.1a-Source.tar.gz
Size: 147,456 bytes
Date: [an error occurred while processing the directive]
MD5: 0dda2dbafae9c161b16dc1fdd2216998
SHA-1: 150ba91fdd10f2370f74538b6d1d49eacc6d00fa
RIPEMD-160: cfa9925499356bf438144bebf11a4d86a75f2158
PGP Signature: TrueCrypt-5.1a-Source.tar.gz.asc
File: truecrypt-5.1a-wx.patch
Size: 855 bytes
Date: [an error occurred while processing the directive]
MD5: 48f29333fd89f4320c85b28fff2ea843
SHA-1: 9811f3acc804a9794323d67513cfdc9e956dceab
RIPEMD-160: 1a8b5422e3a4f72ff5e87523184fdf09a855a6e8
PGP Signature: truecrypt-5.1a-wx.patch.asc
File: truecrypt-5.1a-gcc-4.3.patch
Size: 1,274 bytes
Date: [an error occurred while processing the directive]
MD5: a64fddbd7700dde29ef383915bbd6a79
SHA-1: d69ab75c9b25435f9f1a455fa4a57944db3880e4
RIPEMD-160: 094298efbe8eb9f2295ed1bb66e1daddf5dc57c1
PGP Signature: truecrypt-5.1a-gcc-4.3.patch.asc
File: truecrypt-5.spec
Size: 2,013 bytes
Date: [an error occurred while processing the directive]
MD5: 5081d53aa693c570e0e1197108cb6040
SHA-1: b4e06106955798aecdc52427503b254dade311d5
RIPEMD-160: 1be274443ed998f3d29d7e75ea6d309c7188f413
PGP Signature: truecrypt-5.spec.asc
File: TrueCrypt-6.0a-Source.tar.gz
Size: 1,686,350 bytes
Date: [an error occurred while processing the directive]
MD5: 7281d485a175c161e90526447d9d3fd0
SHA-1: 5ebfe6a79620ced63e6eb33f2cbff6dfa5fd57e9
RIPEMD-160: fafdbe596f1f9cab41917241b1da424635145a00
PGP Signature: TrueCrypt-6.0a-Source.tar.gz.asc
File: truecrypt-6.0a-wx.patch
Size: 855 bytes
Date: [an error occurred while processing the directive]
MD5: 48f29333fd89f4320c85b28fff2ea843
SHA-1: 9811f3acc804a9794323d67513cfdc9e956dceab
RIPEMD-160: 1a8b5422e3a4f72ff5e87523184fdf09a855a6e8
PGP Signature: truecrypt-6.0a-wx.patch.asc
File: truecrypt-6.spec
Size: 2,013 bytes
Date: [an error occurred while processing the directive]
MD5: 81bd1c62bdb555da13fd1d9a75ad429e
SHA-1: 702bddb20ff7b7a795dde78bce2d84e7e4396d91
RIPEMD-160: a12e0e8efc07e33f84430aba083edf81f6ef15f2
PGP Signature: truecrypt-6.spec.asc

2008-07-14 Updated the page to include instructions for TrueCrypt 6.0a. A special thanks to Alec T. Habig who verified for me the instructions for TrueCrypt 6.0a.

2008-07-16 Corrected the version in truecrypt-6.spec. Thanks again, Alec.