Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432914 - app-crypt/tcplay (new package) TrueCrypt
Summary: app-crypt/tcplay (new package) TrueCrypt
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Crypto team [DISABLED]
URL: https://github.com/bwalex/tc-play
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-26 23:31 UTC by ivan+gentoo
Modified: 2013-10-05 16:08 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild updated to filter -Werror and check for required kernel modules (tcplay-0.10-r1.ebuild,1.51 KB, patch)
2012-11-14 21:46 UTC, Richard Ash
Details | Diff
tcplay-0.11.ebuild (tcplay-0.11.ebuild,1.46 KB, text/plain)
2013-01-05 19:25 UTC, Jan Nárovec
Details
tcplay-1.1_pre20130629.ebuild (tcplay-1.1_pre20130629.ebuild,1.71 KB, text/plain)
2013-07-27 01:36 UTC, Manuel Rüger (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ivan+gentoo 2012-08-26 23:31:25 UTC
tcplay is a BSD-licensed command-line TrueCrypt implementation that uses dm-crypt:

https://github.com/bwalex/tc-play

I've had luck compiling it on Gentoo and using it to mount TrueCrypt-encrypted NTFS partitions.

The only alternative right now, TrueCrypt, has a more-restrictive license and a fetch restriction.
Comment 1 Michael Weber (RETIRED) gentoo-dev 2012-08-28 12:38:34 UTC
I've added a version to my overlay (layman -a xmw) for now [1],
the library does build [2], I have no chance to test the functionality.

The Makefiles lists -ldevmapper -luuid which doesn't end up in the final program.

[1] http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=6fcdabb157099b0b0fad3e841b9ef64f8173f0c5
[2] https://github.com/bwalex/tc-play/issues/12
Comment 2 Richard Ash 2012-09-25 20:48:45 UTC
Not sure this is the right place for build issues, but here goes. I tried this on a mostly-stable amd64 system. It doesn't compile with the following error:

>>> Compiling source in /var/tmp/portage/app-crypt/tcplay-0.10-r1/work/tcplay-0.10 ...
make -j 6 -l 4.0 SYSTEM=linux PBKDF_BACKEND=gcrypt program lib 
x86_64-pc-linux-gnu-gcc -O2 -march=native -mtune=native -pipe -fomit-frame-pointer -Wsystem-headers -Werror -Wall -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wold-style-definition -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -D_GNU_SOURCE -o tcplay main.c tcplay.c crc32.c safe_mem.c io.c hdr.c humanize.c crypto.c generic_xts.c crypto-gcrypt.c pbkdf2-gcrypt.c -lgcrypt -ldevmapper -luuid -Wl,-O1 -Wl,--as-needed
cc1: warnings being treated as errors
io.c: In function ‘read_passphrase’:
io.c:388:3: error: signed and unsigned type in conditional expression
io.c:388:3: error: signed and unsigned type in conditional expression
make: *** [program] Error 1

This is because the supplied Makefile has -Werror in the CFLAGS, which is not a good idea. The error comes from a line which looks like this:
 FD_SET(fd, &fds);
i.e. is inside a macro, whose man page doesn't indicate a problem.

Extending the sed invocation to remove the -Werror flag solved the compilation problem. The resulting binary works fine on a FAT32 volume in a file once you read the man page on how to use losetup to make it into a device.

Also passed as an upstream issue at
https://github.com/bwalex/tc-play/issues/13
Comment 3 Richard Ash 2012-11-14 21:46:33 UTC
Created attachment 329566 [details, diff]
ebuild updated to filter -Werror and check for required kernel modules

I have now used this successfully on amd64 and x86 to access FAT32 encrypted volume in a file via the loopback device (as per docs). This required getting all the required modules into the kernel configuration, I simply added all the ones listed here:
 http://en.gentoo-wiki.com/wiki/TrueCrypt#Requirements

Checks for all of these are now in the ebuild to avoid others getting the inscrutable errors that occur if the required modules are not available at runtime.
Comment 4 Jan Nárovec 2013-01-05 19:25:15 UTC
Created attachment 334566 [details]
tcplay-0.11.ebuild
Comment 5 Manuel Rüger (RETIRED) gentoo-dev 2013-07-27 01:36:50 UTC
Created attachment 354276 [details]
tcplay-1.1_pre20130629.ebuild

Here's an updated version for tcplay-1.x 

It uses cmake-utils to install and tries to make tests work. 
Unfortunately they need root privileges and not every test is successfull.

Also available via my overlay, see:
https://git.overlays.gentoo.org/gitweb/?p=user/mrueg.git;a=commit;h=81eb7309add99bd11256f8de2b7ae7b25932c363


Feel free to test and report if it's working!
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2013-07-27 21:08:59 UTC
Hi,

I really much prefer to use the classic make and not cmake.

Opened[1], hope these issues will be addressed.

Anyway, will wait until 1.1 release.

Thanks,


[1] https://github.com/bwalex/tc-play/issues/38
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2013-10-05 16:08:02 UTC
tc-play-1.1 in tree.