From: Alon Bar-Lev Date: Wed, 6 Dec 2006 21:31:02 +0000 (+0000) Subject: linux-2.6.19 support, closes bug#157228 thanks to Timothy Redaelli X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bad0499ca0b33d534aafa766a6d663f8ac1d64c3;p=gentoo.git linux-2.6.19 support, closes bug#157228 thanks to Timothy Redaelli Package-Manager: portage-2.1.1-r2 --- 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 + +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 truecrypt-4.2a.ebuild: Fixed kernel location. Added no strip support, thanks to Tristan Heaven for diff --git a/app-crypt/truecrypt/Manifest b/app-crypt/truecrypt/Manifest index b79bb492543a..f75f7686ea7d 100644 --- a/app-crypt/truecrypt/Manifest +++ b/app-crypt/truecrypt/Manifest @@ -6,6 +6,10 @@ AUX truecrypt-4.2-nosectorformat.patch 2849 RMD160 b768b33f3a2faf958a96581edb354 MD5 8b2f309ee8ede7314be4166d7dff9750 files/truecrypt-4.2-nosectorformat.patch 2849 RMD160 b768b33f3a2faf958a96581edb354e203df59c59 files/truecrypt-4.2-nosectorformat.patch 2849 SHA256 08ecf0cc0f5a68e4b6761c33448bd0a560b2a66bad48025ef91551e97dca9518 files/truecrypt-4.2-nosectorformat.patch 2849 +AUX truecrypt-4.2a-2.6.19.patch 1210 RMD160 3636cd13741aa1c07225c2034103400f86b81da3 SHA1 bafe37681e8c81722da69c9d17f5f13e7e290e01 SHA256 a5719e30865166ef7b273abfe05e0a64a530506e8b277ddd3cf82dc27bc321c7 +MD5 30024fe076ec948d512b34a291618ff4 files/truecrypt-4.2a-2.6.19.patch 1210 +RMD160 3636cd13741aa1c07225c2034103400f86b81da3 files/truecrypt-4.2a-2.6.19.patch 1210 +SHA256 a5719e30865166ef7b273abfe05e0a64a530506e8b277ddd3cf82dc27bc321c7 files/truecrypt-4.2a-2.6.19.patch 1210 AUX truecrypt-4.2a-makefile.patch 1646 RMD160 31343f923d8807bb8eb2482e0a01822b012c9bed SHA1 c9ca37521e0861c3ccc24550f862eacb14bc6242 SHA256 714f9670aff535a4c5b698b87e17006cb1d735312edd2dcbe42c04bee6a2daf2 MD5 18bc8dafc18102ceb3d725f60d6efa05 files/truecrypt-4.2a-makefile.patch 1646 RMD160 31343f923d8807bb8eb2482e0a01822b012c9bed files/truecrypt-4.2a-makefile.patch 1646 @@ -20,14 +24,18 @@ EBUILD truecrypt-4.2-r1.ebuild 2915 RMD160 2308c8db56a0e66eeb8db82a0295a61288d02 MD5 68a91f3966a56b1039da4d94eb160eed truecrypt-4.2-r1.ebuild 2915 RMD160 2308c8db56a0e66eeb8db82a0295a61288d02084 truecrypt-4.2-r1.ebuild 2915 SHA256 8b9380f43e727dcc992363c111fd5152c6e951cab99abb7a97d8a7e7ebef6bbb truecrypt-4.2-r1.ebuild 2915 +EBUILD truecrypt-4.2a-r1.ebuild 2962 RMD160 b2b218229c9352de34122726f2ef50f00fd9f54c SHA1 282293befcebf1f5f1d2240240379f73695432b8 SHA256 3f86d40550448fb715b93a72ad4f7d372dd11d2cbc79e8dc3deaa83af57eab20 +MD5 f7293287951a92701aaec4bd9263ac33 truecrypt-4.2a-r1.ebuild 2962 +RMD160 b2b218229c9352de34122726f2ef50f00fd9f54c truecrypt-4.2a-r1.ebuild 2962 +SHA256 3f86d40550448fb715b93a72ad4f7d372dd11d2cbc79e8dc3deaa83af57eab20 truecrypt-4.2a-r1.ebuild 2962 EBUILD truecrypt-4.2a.ebuild 2919 RMD160 5ade48e86ad35e02e67c16a3fcde3d4bd1e905d0 SHA1 e0241328099644114ebf19c402bcc817f777eb98 SHA256 2e6f9b22a310387f6dfb61ced5e9a0ee9ca82229d62e75140835750cf7f76f78 MD5 a48f7f3f0176555a2d9945f4a4e46551 truecrypt-4.2a.ebuild 2919 RMD160 5ade48e86ad35e02e67c16a3fcde3d4bd1e905d0 truecrypt-4.2a.ebuild 2919 SHA256 2e6f9b22a310387f6dfb61ced5e9a0ee9ca82229d62e75140835750cf7f76f78 truecrypt-4.2a.ebuild 2919 -MISC ChangeLog 1645 RMD160 eb2237227e6ffa1205ecf4e5f17beef587a9327c SHA1 243c878ee2425f13bbb102bb0fcfe2b9d6726c6d SHA256 9fa0534cdff8ba41d02019e2c709e5293c919c495207b713a17a09cb7056f098 -MD5 687753e5006a6860a71bdfed4c6b0447 ChangeLog 1645 -RMD160 eb2237227e6ffa1205ecf4e5f17beef587a9327c ChangeLog 1645 -SHA256 9fa0534cdff8ba41d02019e2c709e5293c919c495207b713a17a09cb7056f098 ChangeLog 1645 +MISC ChangeLog 1862 RMD160 3b508da470615072d6151150afc1b6020666d854 SHA1 58c115d45c7a2a11f38200026b7577ab5e6b10b6 SHA256 75d094a6d8068773a889e7cbb18f9f7aefc3f5d4344191a9421c1d79d7c1833e +MD5 5563bb635ab9944679af31d2cb7dd707 ChangeLog 1862 +RMD160 3b508da470615072d6151150afc1b6020666d854 ChangeLog 1862 +SHA256 75d094a6d8068773a889e7cbb18f9f7aefc3f5d4344191a9421c1d79d7c1833e ChangeLog 1862 MISC metadata.xml 224 RMD160 74db96ad8aa1d285d83ae93a9f4a767335f55c15 SHA1 d86a171d981b45e7ed0c0b3b5059d2a63c811001 SHA256 9e9ce661a9fdb45a535ad875a247b700a70745359b27533ec29a6a46fa708e86 MD5 566cf4f89e44670d0aba4a745913d748 metadata.xml 224 RMD160 74db96ad8aa1d285d83ae93a9f4a767335f55c15 metadata.xml 224 @@ -38,3 +46,6 @@ SHA256 200aa4f6243ac5b5f4cff0aa69d85c25b74456555c04e5db2b2e1327d7f0e9a6 files/di MD5 a99bad1b52e32e9cd558e789e2fe1454 files/digest-truecrypt-4.2a 283 RMD160 1d9b3feac90fb5546a1d6fc89c493bc7e89f41f8 files/digest-truecrypt-4.2a 283 SHA256 cd3851eb2af9bac302c5f4c005182d63300cf2031178fef1a1aef525b23209f8 files/digest-truecrypt-4.2a 283 +MD5 a99bad1b52e32e9cd558e789e2fe1454 files/digest-truecrypt-4.2a-r1 283 +RMD160 1d9b3feac90fb5546a1d6fc89c493bc7e89f41f8 files/digest-truecrypt-4.2a-r1 283 +SHA256 cd3851eb2af9bac302c5f4c005182d63300cf2031178fef1a1aef525b23209f8 files/digest-truecrypt-4.2a-r1 283 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 +} +