truecrypt: Removed
This commit is contained in:
parent
aec45e3e69
commit
d55bfb4797
@ -1,11 +0,0 @@
|
|||||||
drwxr-xr-x root/root lib/
|
|
||||||
drwxr-xr-x root/root lib/modules/
|
|
||||||
drwxr-xr-x root/root lib/modules/<kernel-version>/
|
|
||||||
drwxr-xr-x root/root lib/modules/<kernel-version>/extra/
|
|
||||||
-rw-r--r-- root/root lib/modules/<kernel-version>/extra/truecrypt.ko
|
|
||||||
drwxr-xr-x root/root usr/
|
|
||||||
drwxr-xr-x root/root usr/bin/
|
|
||||||
-rwxr-xr-x root/root usr/bin/truecrypt
|
|
||||||
drwxr-xr-x root/root usr/man/
|
|
||||||
drwxr-xr-x root/root usr/man/man1/
|
|
||||||
-rw-r--r-- root/root usr/man/man1/truecrypt.1.gz
|
|
@ -1,6 +0,0 @@
|
|||||||
144cb38da950e8970c38df2d460543fd truecrypt-4.3a-2.6.23.patch
|
|
||||||
5fd25dfacea831a526f793c8d78cc24e truecrypt-4.3a-2.6.24.patch
|
|
||||||
a22a76f9b38b05ffe3e827bde2c953c5 truecrypt-4.3a.tar.bz2
|
|
||||||
1aaccb83503e0bbcf0f01b181b20fe7e truecrypt-kernel-2.6.29.patch
|
|
||||||
8d7ea2b32e09c4af38681cf3ca19490b truecrypt-kernel-2.6.34.patch
|
|
||||||
8294190bb83500e3230284b3f2256e77 truecrypt-nochecks.patch
|
|
@ -1,32 +0,0 @@
|
|||||||
# Description: Multiplatform disk encryption software
|
|
||||||
# URL: http://www.truecrypt.org
|
|
||||||
# Packager: Alan Mizrahi, alan at mizrahi dot com dot ve
|
|
||||||
# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
|
|
||||||
# Depends on: libdevmapper
|
|
||||||
|
|
||||||
name=truecrypt
|
|
||||||
version=4.3a
|
|
||||||
release=4
|
|
||||||
source=(http://www.mizrahi.com.ve/crux/dist/$name-$version.tar.bz2 truecrypt-4.3a-2.6.23.patch truecrypt-4.3a-2.6.24.patch truecrypt-kernel-2.6.29.patch truecrypt-kernel-2.6.34.patch truecrypt-nochecks.patch)
|
|
||||||
|
|
||||||
# Note: Currently doesn't build as non-root
|
|
||||||
|
|
||||||
build () {
|
|
||||||
cd $name-$version
|
|
||||||
patch -p1 -i $SRC/truecrypt-kernel-2.6.34.patch
|
|
||||||
|
|
||||||
cd Linux
|
|
||||||
patch -p2 -i $SRC/truecrypt-4.3a-2.6.23.patch
|
|
||||||
patch -p2 -i $SRC/truecrypt-4.3a-2.6.24.patch
|
|
||||||
patch -p2 -i $SRC/truecrypt-kernel-2.6.29.patch
|
|
||||||
patch -p2 -i $SRC/truecrypt-nochecks.patch
|
|
||||||
|
|
||||||
# new kernels have an hex2bin function, rename truecrypt's
|
|
||||||
sed -i -e 's|hex2bin|myhex2bin|g' Kernel/Dm-target.c
|
|
||||||
|
|
||||||
./build.sh
|
|
||||||
install -m 755 -D Cli/truecrypt $PKG/usr/bin/truecrypt
|
|
||||||
install -m 644 -D Cli/Man/truecrypt.1 $PKG/usr/man/man1/truecrypt.1
|
|
||||||
install -m 644 -D Kernel/truecrypt.ko $PKG/lib/modules/$(uname -r)/extra/truecrypt.ko
|
|
||||||
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
REQUIREMENTS
|
|
||||||
|
|
||||||
You need Device mapper support in your kernel (CONFIG_BLK_DEV_DM):
|
|
||||||
|
|
||||||
Device Drivers --> Multi-device support (RAID and LVM)
|
|
||||||
[*] Multiple devices driver support (RAID and LVM)
|
|
||||||
<*> Device mapper support
|
|
||||||
|
|
||||||
|
|
||||||
PRE-INSTALL
|
|
||||||
|
|
||||||
POST-INSTALL
|
|
||||||
|
|
||||||
* Run depmod -a
|
|
||||||
|
|
||||||
PRECAUTION
|
|
@ -1,15 +0,0 @@
|
|||||||
diff -urNp truecrypt-4.3a-source-code.org/Linux/Kernel/Dm-target.c truecrypt-4.3a-source-code/Linux/Kernel/Dm-target.c
|
|
||||||
--- truecrypt-4.3a-source-code.org/Linux/Kernel/Dm-target.c 2007-04-24 19:32:06.000000000 +0300
|
|
||||||
+++ truecrypt-4.3a-source-code/Linux/Kernel/Dm-target.c 2007-10-10 23:18:24.000000000 +0200
|
|
||||||
@@ -656,7 +656,11 @@ int __init dm_truecrypt_init(void)
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
|
|
||||||
bio_ctx_cache = kmem_cache_create ("truecrypt-bioctx", sizeof (struct bio_ctx), 0, 0, NULL, NULL);
|
|
||||||
+#else
|
|
||||||
+ bio_ctx_cache = kmem_cache_create ("truecrypt-bioctx", sizeof (struct bio_ctx), 0, 0, NULL);
|
|
||||||
+#endif
|
|
||||||
if (!bio_ctx_cache)
|
|
||||||
{
|
|
||||||
error ("kmem_cache_create failed");
|
|
@ -1,51 +0,0 @@
|
|||||||
diff -Nrup a/Linux/Kernel/Dm-target.c b/Linux/Kernel/Dm-target.c
|
|
||||||
--- a/Linux/Kernel/Dm-target.c 2007-04-24 18:32:06.000000000 +0200
|
|
||||||
+++ b/Linux/Kernel/Dm-target.c 2007-12-22 15:07:56.000000000 +0100
|
|
||||||
@@ -375,7 +375,11 @@ static void dereference_bio_ctx (struct
|
|
||||||
if (!atomic_dec_and_test (&bc->ref_count))
|
|
||||||
return;
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
|
|
||||||
bio_endio (bc->orig_bio, bc->orig_bio->bi_size, bc->error);
|
|
||||||
+#else
|
|
||||||
+ bio_endio (bc->orig_bio, bc->error);
|
|
||||||
+#endif
|
|
||||||
mempool_free (bc, tc->bio_ctx_pool);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -417,24 +421,35 @@ static void work_process (void *qdata)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
|
|
||||||
static int truecrypt_endio (struct bio *bio, unsigned int bytes_done, int error)
|
|
||||||
+#else
|
|
||||||
+static int truecrypt_endio (struct bio *bio, int error)
|
|
||||||
+#endif
|
|
||||||
{
|
|
||||||
struct bio_ctx *bc = (struct bio_ctx *) bio->bi_private;
|
|
||||||
struct target_ctx *tc = (struct target_ctx *) bc->target->private;
|
|
||||||
struct bio_vec *bv;
|
|
||||||
int seg_no;
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
|
|
||||||
trace (1, "end: sc=%llu fl=%ld rw=%ld sz=%d ix=%hd vc=%hd dn=%d er=%d\n",
|
|
||||||
(unsigned long long) bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt, bytes_done, error);
|
|
||||||
+#else
|
|
||||||
+ trace (1, "end: sc=%llu fl=%ld sz=%ld rw=%ld ix=%hd vc=%hd er=%d\n",
|
|
||||||
+ (unsigned long long) bio->bi_sector, bio->bi_flags, bio->bi_size, bio->bi_rw, bio->bi_idx, bio->bi_vcnt, error);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
if (error != 0)
|
|
||||||
bc->error = error;
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
|
|
||||||
if (bio->bi_size)
|
|
||||||
{
|
|
||||||
trace (2, "Outstanding IO: %d\n", bio->bi_size);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
if (bio_data_dir (bio) == READ)
|
|
||||||
{
|
|
@ -1,14 +0,0 @@
|
|||||||
--- truecrypt-4.3a/Linux/Kernel/Dm-target.c.orig 2009-03-30 01:21:25.386081862 +0900
|
|
||||||
+++ truecrypt-4.3a/Linux/Kernel/Dm-target.c 2009-03-30 01:21:46.450270403 +0900
|
|
||||||
@@ -705,10 +705,7 @@
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
|
|
||||||
- r = dm_unregister_target (&truecrypt_target);
|
|
||||||
-
|
|
||||||
- if (r < 0)
|
|
||||||
- error ("unregister failed %d", r);
|
|
||||||
+ dm_unregister_target (&truecrypt_target);
|
|
||||||
|
|
||||||
destroy_workqueue (work_queue);
|
|
||||||
kmem_cache_destroy (bio_ctx_cache);
|
|
@ -1,50 +0,0 @@
|
|||||||
--- truecrypt-4.3a/Linux/Kernel/Dm-target.c.orig 2010-05-17 23:21:41.550280774 +0900
|
|
||||||
+++ truecrypt-4.3a/Linux/Kernel/Dm-target.c 2010-05-17 23:22:15.086944158 +0900
|
|
||||||
@@ -210,7 +210,7 @@
|
|
||||||
}
|
|
||||||
tc->start = sector;
|
|
||||||
|
|
||||||
- if (dm_get_device (ti, argv[TC_ARG_DEV], tc->start, ti->len, dm_table_get_mode (ti->table), &tc->dev))
|
|
||||||
+ if (dm_get_device (ti, argv[TC_ARG_DEV], dm_table_get_mode (ti->table), &tc->dev))
|
|
||||||
{
|
|
||||||
ti->error = "truecrypt: Device lookup failed";
|
|
||||||
goto err;
|
|
||||||
--- truecrypt-4.3a/Common/GfMul.c.orig 2010-05-18 00:15:32.303291101 +0900
|
|
||||||
+++ truecrypt-4.3a/Common/GfMul.c 2010-05-18 00:17:18.773280384 +0900
|
|
||||||
@@ -53,6 +53,7 @@
|
|
||||||
#ifdef LINUX_DRIVER
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
+#include <linux/slab.h>
|
|
||||||
#else
|
|
||||||
#include <memory.h>
|
|
||||||
#endif
|
|
||||||
--- truecrypt-4.3a/Common/Crypto.c.orig 2010-05-18 00:12:47.460807274 +0900
|
|
||||||
+++ truecrypt-4.3a/Common/Crypto.c 2010-05-18 00:17:33.216612793 +0900
|
|
||||||
@@ -16,6 +16,7 @@
|
|
||||||
#ifdef LINUX_DRIVER
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
+#include <linux/slab.h>
|
|
||||||
#else
|
|
||||||
#include <string.h>
|
|
||||||
#endif
|
|
||||||
--- truecrypt-4.3a/Linux/Kernel/Dm-target.c.orig 2010-05-18 00:16:32.969951706 +0900
|
|
||||||
+++ truecrypt-4.3a/Linux/Kernel/Dm-target.c 2010-05-18 00:17:02.470782111 +0900
|
|
||||||
@@ -6,6 +6,8 @@
|
|
||||||
distribution packages.
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#include <linux/slab.h>
|
|
||||||
+
|
|
||||||
#include <linux/bio.h>
|
|
||||||
#include <linux/blkdev.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
@@ -16,7 +18,6 @@
|
|
||||||
#include <linux/moduleparam.h>
|
|
||||||
#include <linux/version.h>
|
|
||||||
#include <linux/workqueue.h>
|
|
||||||
-#include <dm.h>
|
|
||||||
|
|
||||||
#include "Tcdefs.h"
|
|
||||||
#include "Crypto.h"
|
|
@ -1,159 +0,0 @@
|
|||||||
--- truecrypt-4.3a/Linux/build.sh.orig 2010-05-17 23:18:38.256965720 +0900
|
|
||||||
+++ truecrypt-4.3a/Linux/build.sh 2010-05-17 23:19:47.604458859 +0900
|
|
||||||
@@ -11,154 +11,9 @@
|
|
||||||
KERNEL_BUILD=/lib/modules/$KERNEL_VER/build
|
|
||||||
KERNEL_SRC=/lib/modules/$KERNEL_VER/source
|
|
||||||
|
|
||||||
-TMP=.build.sh.tmp
|
|
||||||
-umask 022
|
|
||||||
-
|
|
||||||
-error ()
|
|
||||||
-{
|
|
||||||
- echo "Error: $*" >&2
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-check_kernel_version ()
|
|
||||||
-{
|
|
||||||
- M="$1/Makefile"
|
|
||||||
- [ ! -f "$M" ] && return 1
|
|
||||||
-
|
|
||||||
- VER=$(grep '^VERSION *=' "$M" | head -n 1 | tr -d ' ' | cut -d'=' -f2)
|
|
||||||
- VER=$VER.$(grep '^PATCHLEVEL *=' "$M" | head -n 1 | tr -d ' ' | cut -d'=' -f2)
|
|
||||||
- VER=$VER.$(grep '^SUBLEVEL *=' "$M" | head -n 1 | tr -d ' ' | cut -d'=' -f2)
|
|
||||||
-
|
|
||||||
- [ $VER = $(echo $KERNEL_VER | cut -d- -f1 | cut -d. -f1-3) ] && return 0
|
|
||||||
- return 1
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-# Prerequisites
|
|
||||||
-
|
|
||||||
-echo "Checking build requirements..."
|
|
||||||
-
|
|
||||||
-[ $(id -u) -ne 0 ] && error "Administrator (root) privileges required for kernel source configuration." && exit 1
|
|
||||||
-
|
|
||||||
-V=""
|
|
||||||
-case "$KERNEL_VER" in
|
|
||||||
- [01].*) V=1 ;;
|
|
||||||
- 2.[0-5].*) V=1 ;;
|
|
||||||
- 2.6.[0-4]) V=1 ;;
|
|
||||||
- 2.6.[0-4][.-]*) V=1 ;;
|
|
||||||
-esac
|
|
||||||
-[ "$V" ] && error "TrueCrypt requires Linux kernel 2.6.5 or later" && exit 1
|
|
||||||
-
|
|
||||||
-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux-$KERNEL_VER
|
|
||||||
-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux-source-$KERNEL_VER
|
|
||||||
-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/kernels/$KERNEL_VER-$(uname -p)
|
|
||||||
-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux-$(echo $KERNEL_VER | cut -d'-' -f1)
|
|
||||||
-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux-source-$(echo $KERNEL_VER | cut -d'-' -f1)
|
|
||||||
-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux
|
|
||||||
-
|
|
||||||
-if ! check_kernel_version "$KERNEL_SRC"
|
|
||||||
-then
|
|
||||||
- echo -n "Linux kernel ($KERNEL_VER) source directory [$KERNEL_SRC]: "
|
|
||||||
- read A
|
|
||||||
- [ "$A" ] && KERNEL_SRC="$A"
|
|
||||||
- [ ! -d "$KERNEL_SRC" ] && error "$KERNEL_SRC does not exit" && exit 1
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-if ! check_kernel_version "$KERNEL_SRC"
|
|
||||||
-then
|
|
||||||
- error "Kernel source version in $KERNEL_SRC is not $KERNEL_VER"
|
|
||||||
- exit 1
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-if [ ! -f "$KERNEL_SRC/drivers/md/dm.h" ]
|
|
||||||
-then
|
|
||||||
- error "Kernel source code is incomplete - $KERNEL_SRC/drivers/md/dm.h not found."
|
|
||||||
- exit 1
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-if [ ! -d "$KERNEL_BUILD/include/asm/" -o ! -f "$KERNEL_BUILD/Module.symvers" -o ! -f "$KERNEL_BUILD/.config" ]
|
|
||||||
-then
|
|
||||||
- if [ ! -f "$KERNEL_SRC/.config" ]
|
|
||||||
- then
|
|
||||||
- if [ -f /proc/config.gz -o -f /boot/config-$KERNEL_VER -o -f /boot/config-$(uname -r) ]
|
|
||||||
- then
|
|
||||||
- echo -n "Configure kernel source according to the system configuration? [Y/n]: "
|
|
||||||
- read A
|
|
||||||
- if [ -z "$A" -o "$A" = "y" -o "$A" = "Y" ]
|
|
||||||
- then
|
|
||||||
- echo -n "Configuring kernel source in $KERNEL_SRC... "
|
|
||||||
-
|
|
||||||
- if [ -f /proc/config.gz ]
|
|
||||||
- then
|
|
||||||
- zcat /proc/config.gz >$KERNEL_SRC/.config || exit 1
|
|
||||||
- else
|
|
||||||
- if [ -f /boot/config-$(uname -r) ]
|
|
||||||
- then
|
|
||||||
- cp /boot/config-$(uname -r) $KERNEL_SRC/.config || exit 1
|
|
||||||
- else
|
|
||||||
- cp /boot/config-$KERNEL_VER $KERNEL_SRC/.config || exit 1
|
|
||||||
- fi
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- make -C $KERNEL_SRC oldconfig </dev/null >/dev/null || exit 1
|
|
||||||
- echo Done.
|
|
||||||
- fi
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- if [ ! -f "$KERNEL_SRC/.config" ]
|
|
||||||
- then
|
|
||||||
- error "Kernel not configured. You should run make -C $KERNEL_SRC config"
|
|
||||||
- exit 1
|
|
||||||
- fi
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- if [ ! -d "$KERNEL_SRC/include/asm" ] && grep -q modules_prepare $KERNEL_SRC/Makefile
|
|
||||||
- then
|
|
||||||
- echo -n "Preparing kernel build system in $KERNEL_SRC... "
|
|
||||||
- if ! make -C $KERNEL_SRC modules_prepare >/dev/null 2>$TMP
|
|
||||||
- then
|
|
||||||
- cat $TMP; rm $TMP
|
|
||||||
- exit 1
|
|
||||||
- fi
|
|
||||||
- rm $TMP
|
|
||||||
- echo Done.
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
-
|
|
||||||
- if [ ! -d "$KERNEL_SRC/include/asm" -o ! -f "$KERNEL_SRC/Module.symvers" ]
|
|
||||||
- then
|
|
||||||
- echo -n "Building internal kernel modules (may take a long time)... "
|
|
||||||
- if ! make -C $KERNEL_SRC modules >/dev/null 2>$TMP
|
|
||||||
- then
|
|
||||||
- cat $TMP; rm $TMP
|
|
||||||
- exit 1
|
|
||||||
- fi
|
|
||||||
- rm $TMP
|
|
||||||
- echo Done.
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- if [ ! -d "$KERNEL_SRC/include/asm" ]
|
|
||||||
- then
|
|
||||||
- error "Kernel source code is not prepared for building of modules - $KERNEL_SRC/include/asm not found."
|
|
||||||
- exit 1
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- KERNEL_BUILD=$KERNEL_SRC
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-if [ -f $KERNEL_BUILD/.config ]
|
|
||||||
-then
|
|
||||||
- grep -qi 'CONFIG_BLK_DEV_DM=[YM]' $KERNEL_BUILD/.config || echo "Warning: kernel device mapper support (CONFIG_BLK_DEV_DM) is disabled in $KERNEL_SRC"
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
# Build
|
|
||||||
|
|
||||||
echo -n "Building kernel module... "
|
|
||||||
-cd Kernel && make "KERNEL_SRC=$KERNEL_SRC" "KERNEL_BUILD=$KERNEL_BUILD" NO_WARNINGS=1 >/dev/null
|
|
||||||
-[ $? -ne 0 ] && error "Failed to build kernel module" && exit 1
|
|
||||||
-echo Done.
|
|
||||||
-
|
|
||||||
-echo -n "Building truecrypt... "
|
|
||||||
-cd ../Cli && make NO_WARNINGS=1 >/dev/null
|
|
||||||
-[ $? -ne 0 ] && error "Failed to build truecrypt" && exit 1
|
|
||||||
-echo Done.
|
|
||||||
+cd Kernel && make "KERNEL_SRC=$KERNEL_SRC" "KERNEL_BUILD=$KERNEL_BUILD" NO_WARNINGS=1 && \
|
|
||||||
+cd ../Cli && make NO_WARNINGS=1
|
|
||||||
|
|
||||||
-exit 0
|
|
Loading…
Reference in New Issue
Block a user