summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2006-12-06 21:31:02 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2006-12-06 21:31:02 +0000
commitc0a03bcda2de8fb4456bf44ba39579545b4dad3e (patch)
tree76581acaa050960d535f125850852eccb0426369 /app-crypt/truecrypt
parentStable on Alpha. (diff)
downloadgentoo-2-c0a03bcda2de8fb4456bf44ba39579545b4dad3e.tar.gz
gentoo-2-c0a03bcda2de8fb4456bf44ba39579545b4dad3e.tar.bz2
gentoo-2-c0a03bcda2de8fb4456bf44ba39579545b4dad3e.zip
linux-2.6.19 support, closes bug#157228 thanks to Timothy Redaelli
(Portage version: 2.1.1-r2)
Diffstat (limited to 'app-crypt/truecrypt')
-rw-r--r--app-crypt/truecrypt/ChangeLog8
-rw-r--r--app-crypt/truecrypt/files/digest-truecrypt-4.2a-r13
-rw-r--r--app-crypt/truecrypt/files/truecrypt-4.2a-2.6.19.patch38
-rw-r--r--app-crypt/truecrypt/truecrypt-4.2a-r1.ebuild105
4 files changed, 153 insertions, 1 deletions
diff --git a/app-crypt/truecrypt/ChangeLog b/app-crypt/truecrypt/ChangeLog
index 002b115fa45c..058cc40c34ba 100644
--- a/app-crypt/truecrypt/ChangeLog
+++ b/app-crypt/truecrypt/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-crypt/truecrypt
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/ChangeLog,v 1.8 2006/10/09 06:33:50 alonbl Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/ChangeLog,v 1.9 2006/12/06 21:31:02 alonbl Exp $
+
+*truecrypt-4.2a-r1 (06 Dec 2006)
+
+ 06 Dec 2006; Alon Bar-Lev <alonbl@gentoo.org>
+ +files/truecrypt-4.2a-2.6.19.patch, +truecrypt-4.2a-r1.ebuild:
+ linux-2.6.19 support, closes bug#157228 thanks to Timothy Redaelli
09 Oct 2006; Alon Bar-Lev <alonbl@gentoo.org> truecrypt-4.2a.ebuild:
Fixed kernel location. Added no strip support, thanks to Tristan Heaven for
diff --git a/app-crypt/truecrypt/files/digest-truecrypt-4.2a-r1 b/app-crypt/truecrypt/files/digest-truecrypt-4.2a-r1
new file mode 100644
index 000000000000..6aac1268b685
--- /dev/null
+++ b/app-crypt/truecrypt/files/digest-truecrypt-4.2a-r1
@@ -0,0 +1,3 @@
+MD5 6e60ead403fe23355f61341ccce68ff1 truecrypt-4.2a-source-code.tar.gz 1088418
+RMD160 8d5b142f9cc7de5693b527f8d708d9e1ebd1e2b3 truecrypt-4.2a-source-code.tar.gz 1088418
+SHA256 ba1892584bf52b5a12eef185563705774566a70537d139aef8770477dfe9636f truecrypt-4.2a-source-code.tar.gz 1088418
diff --git a/app-crypt/truecrypt/files/truecrypt-4.2a-2.6.19.patch b/app-crypt/truecrypt/files/truecrypt-4.2a-2.6.19.patch
new file mode 100644
index 000000000000..ea81d2cfadb5
--- /dev/null
+++ b/app-crypt/truecrypt/files/truecrypt-4.2a-2.6.19.patch
@@ -0,0 +1,38 @@
+--- Linux/Kernel/Dm-target.c.orig 2006-06-28 12:36:28.000000000 +0200
++++ Linux/Kernel/Dm-target.c 2006-10-23 00:05:33.000000000 +0200
+@@ -29,6 +29,7 @@
+ int trace_level = 0;
+
+ #define MSG_PREFIX "truecrypt: "
++#define DM_MSG_PREFIX MSG_PREFIX
+ #define error(fmt, args...) printk(KERN_ERR MSG_PREFIX fmt, ## args)
+ #define trace(level, fmt, args...) level <= trace_level && printk(KERN_DEBUG MSG_PREFIX fmt, ## args)
+ #define dbg(fmt, args...) printk(KERN_DEBUG MSG_PREFIX fmt, ## args)
+@@ -124,8 +125,13 @@
+ if (p)
+ return p;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++ trace (3, "congestion_wait\n");
++ congestion_wait (direction, HZ / 50);
++#else
+ trace (3, "blk_congestion_wait\n");
+ blk_congestion_wait (direction, HZ / 50);
++#endif
+ }
+ }
+
+@@ -496,8 +502,13 @@
+ trace (3, "bio_alloc (%hd)\n", bio_segments (bio));
+ while (!(bion = bio_alloc (GFP_NOIO | __GFP_NOMEMALLOC, bio_segments (bio))))
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++ trace (3, "congestion_wait\n");
++ congestion_wait (bio_data_dir (bio), HZ / 50);
++#else
+ trace (3, "blk_congestion_wait\n");
+ blk_congestion_wait (bio_data_dir (bio), HZ / 50);
++#endif
+ }
+
+ bion->bi_bdev = tc->dev->bdev;
diff --git a/app-crypt/truecrypt/truecrypt-4.2a-r1.ebuild b/app-crypt/truecrypt/truecrypt-4.2a-r1.ebuild
new file mode 100644
index 000000000000..a0ea7a3c977c
--- /dev/null
+++ b/app-crypt/truecrypt/truecrypt-4.2a-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/truecrypt-4.2a-r1.ebuild,v 1.1 2006/12/06 21:31:02 alonbl Exp $
+
+inherit linux-mod toolchain-funcs
+
+DESCRIPTION="Free open-source disk encryption software"
+HOMEPAGE="http://www.truecrypt.org/"
+SRC_URI="http://www.truecrypt.org/downloads/truecrypt-${PV}-source-code.tar.gz"
+
+LICENSE="truecrypt-collective-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="virtual/linux-sources
+ sys-fs/device-mapper"
+
+RDEPEND="sys-fs/device-mapper"
+
+BUILD_PARAMS="KERNEL_SRC=${KERNEL_DIR} NO_WARNINGS=1"
+BUILD_TARGETS="truecrypt"
+MODULE_NAMES="truecrypt(block:${S}/Linux/Kernel)"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ dmcrypt_check
+ kernel_is lt 2 6 5 && die 'requires at least 2.6.5 kernel version'
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}"_kernel-2.6.18-rc1_fix.patch
+ epatch "${FILESDIR}/${P}"-2.6.19.patch
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ linux-mod_pkg_setup
+}
+
+src_compile() {
+ linux-mod_src_compile || die "Truecrypt module compilation failed."
+ cd "${S}/Linux/Cli"
+ einfo "Building truecrypt utility"
+ tc-export CC
+ # remove kernel linked crypt stuff
+ emake clean || die "make clean failed"
+ emake truecrypt NO_STRIP=1 || die "Compile and/or linking of TrueCrypt Linux CLI application failed."
+}
+
+src_test() {
+ "${S}/Linux/Cli/truecrypt" --test
+}
+
+pkg_preinst() {
+ # unload truecrypt modules if already loaded
+ /sbin/rmmod truecrypt >&- 2>&-
+ if grep -q "^truecrypt" /proc/modules
+ then
+ die "Please dismount all mounted TrueCrypt volumes"
+ fi
+}
+
+src_install() {
+ # installing files
+ dobin Linux/Cli/truecrypt
+ doman Linux/Cli/Man/truecrypt.1
+ dodoc Readme.txt 'Release/Setup Files/TrueCrypt User Guide.pdf'
+
+ # installing kernel module
+ linux-mod_src_install
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ einfo " For TrueCrypt 4.2 to work you have to load a "
+ einfo " kernel module. This can be done in three ways: "
+ einfo
+ einfo " 1. Loading the module automatically by the running kernel. "
+ einfo " For this 'Automatic kernel module loading' needs to be "
+ einfo " enabled (CONFIG_KMOD=y). "
+ einfo " 2. Loading the module manually before mounting the volume. "
+ einfo " Try 'modprobe truecrypt' as root to load the module. "
+ einfo " 3. Load the module during boot by listing it in "
+ einfo " '/etc/modules.autoload.d/kernel-2.6' "
+}
+
+dmcrypt_check() {
+ ebegin "Checking for Device mapper support (BLK_DEV_DM)"
+ linux_chkconfig_present BLK_DEV_DM
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ ewarn "TrueCrypt requires Device mapper support!"
+ ewarn "Please enable Device mapper support in your kernel config, found at:"
+ ewarn "(for 2.6 kernels)"
+ ewarn
+ ewarn " Device Drivers"
+ ewarn " Multi-Device Support"
+ ewarn " <*> Device mapper support"
+ ewarn
+ ewarn "and recompile your kernel if you want this package to work."
+ epause 10
+ fi
+}
+