SOURCES: truecrypt-build.patch (NEW), truecrypt-4.2a_kernel-2.6.18...

mwinkler mwinkler at pld-linux.org
Tue Oct 24 22:40:42 CEST 2006


Author: mwinkler                     Date: Tue Oct 24 20:40:42 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- initial, 2.6.18 ok

---- Files affected:
SOURCES:
   truecrypt-build.patch (NONE -> 1.1)  (NEW), truecrypt-4.2a_kernel-2.6.18-rc1_fix.patch (NONE -> 1.1)  (NEW), truecrypt-4.2-nosectorformat.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/truecrypt-build.patch
diff -u /dev/null SOURCES/truecrypt-build.patch:1.1
--- /dev/null	Tue Oct 24 22:40:42 2006
+++ SOURCES/truecrypt-build.patch	Tue Oct 24 22:40:37 2006
@@ -0,0 +1,51 @@
+--- truecrypt-4.2a/Linux/build.sh-orig	2006-10-24 20:32:31.358859750 +0000
++++ truecrypt-4.2a/Linux/build.sh	2006-10-24 20:34:59.416112750 +0000
+@@ -15,20 +15,13 @@
+ 	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 = $(uname -r | cut -d- -f1 | cut -d. -f1-3) ] && return 0
+-	return 1
++	return 0
+ }
+ 
+ # Prerequisites
+ 
+ echo "Checking build requirements..."
+ 
+-[ $(id -u) -ne 0 ] && error "Administrator (root) privileges required for kernel source configuration." && exit 1
+-
+ V=""
+ case "$(uname -r)" in
+ 	[01].*) V=1 ;;
+@@ -38,25 +31,7 @@
+ esac
+ [ "$V" ] && error "TrueCrypt requires Linux kernel 2.6.5 or later" && exit 1
+ 
+-KERNEL_SRC=/usr/src/linux-source-$(uname -r)
+-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux-source-$(uname -r | cut -d'-' -f1)
+-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux-$(uname -r)
+-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux-$(uname -r | cut -d'-' -f1)
+-check_kernel_version "$KERNEL_SRC" || KERNEL_SRC=/usr/src/linux
+-
+-if ! check_kernel_version "$KERNEL_SRC"
+-then
+-	echo -n "Linux kernel ($(uname -r)) 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 $(uname -r)"
+-	exit 1
+-fi
++KERNEL_SRC=$1
+ 
+ if [ ! -f "$KERNEL_SRC/drivers/md/dm.h" ]
+ then

================================================================
Index: SOURCES/truecrypt-4.2a_kernel-2.6.18-rc1_fix.patch
diff -u /dev/null SOURCES/truecrypt-4.2a_kernel-2.6.18-rc1_fix.patch:1.1
--- /dev/null	Tue Oct 24 22:40:42 2006
+++ SOURCES/truecrypt-4.2a_kernel-2.6.18-rc1_fix.patch	Tue Oct 24 22:40:37 2006
@@ -0,0 +1,13 @@
+--- truecrypt-4.2a/Linux/Kernel/Dm-target.c	2006-06-28 12:36:28.000000000 +0200
++++ truecrypt-4.2a_fixed/Linux/Kernel/Dm-target.c	2006-07-14 19:02:40.000000000 +0200
+@@ -26,6 +26,10 @@
+ #error Linux kernel 2.6.5 or later required
+ #endif
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
++#define DM_MSG_PREFIX "truecrypt"
++#endif
++
+ int trace_level = 0;
+ 
+ #define MSG_PREFIX "truecrypt: "

================================================================
Index: SOURCES/truecrypt-4.2-nosectorformat.patch
diff -u /dev/null SOURCES/truecrypt-4.2-nosectorformat.patch:1.1
--- /dev/null	Tue Oct 24 22:40:42 2006
+++ SOURCES/truecrypt-4.2-nosectorformat.patch	Tue Oct 24 22:40:37 2006
@@ -0,0 +1,77 @@
+--- ./Linux/Kernel/Dm-target.c.orig	2006-06-06 21:31:51.000000000 +1000
++++ ./Linux/Kernel/Dm-target.c	2006-06-06 21:45:08.000000000 +1000
+@@ -161,7 +161,7 @@
+ 		goto err;
+ 	}
+ 
+-	if (sscanf (argv[ARG_SEC], SECTOR_FORMAT, &tc->start) != 1)
++	if (sscanf (argv[ARG_SEC], "%Lu", &tc->start) != 1)
+ 	{
+ 		ti->error = "truecrypt: Invalid device sector";
+ 		goto err;
+@@ -224,14 +224,14 @@
+ 	}
+ 
+ 	// Read-only start sector
+-	if (sscanf (argv[ARG_RO_START], SECTOR_FORMAT, &tc->read_only_start) != 1)
++	if (sscanf (argv[ARG_RO_START], "%Lu", &tc->read_only_start) != 1)
+ 	{
+ 		ti->error = "truecrypt: Invalid read-only start sector";
+ 		goto err;
+ 	}
+ 
+ 	// Read-only end sector
+-	if (sscanf (argv[ARG_RO_END], SECTOR_FORMAT, &tc->read_only_end) != 1)
++	if (sscanf (argv[ARG_RO_END], "%Lu", &tc->read_only_end) != 1)
+ 	{
+ 		ti->error = "truecrypt: Invalid read-only end sector";
+ 		goto err;
+@@ -375,8 +375,8 @@
+ 	int seg_no;
+ 	
+ 	trace (3, "truecrypt_endio (%p, %d, %d)\n", bio, bytes_done, error);
+-	trace (1, "end: sc=" SECTOR_FORMAT " fl=%ld rw=%ld sz=%d ix=%hd vc=%hd dn=%d er=%d\n",
+-		bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt, bytes_done, error);
++	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);
+ 
+ 	if (error != 0)
+ 		bc->error = error;
+@@ -420,8 +420,8 @@
+ 	int seg_no;
+ 
+ 	trace (3, "truecrypt_map (%p, %p, %p)\n", ti, bio, map_context);
+-	trace (1, "map: sc=" SECTOR_FORMAT " fl=%ld rw=%ld sz=%d ix=%hd vc=%hd\n",
+-		bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt);
++	trace (1, "map: sc=%llu fl=%ld rw=%ld sz=%d ix=%hd vc=%hd\n",
++		(unsigned long long) bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt);
+ 
+ 	// Write protection
+ 	if (bio_data_dir (bio) == WRITE && READ_ONLY (tc))
+@@ -547,7 +547,7 @@
+ 
+ 	atomic_inc (&bc->ref_count);
+ 
+-	trace (3, "generic_make_request (rw=%ld sc=" SECTOR_FORMAT ")\n", bion->bi_rw, bion->bi_sector);
++	trace (3, "generic_make_request (rw=%ld sc=%llu )\n", bion->bi_rw,(unsigned long long) bion->bi_sector);
+ 	generic_make_request (bion);
+ 
+ 	dereference_bio_ctx (bc);
+@@ -569,13 +569,13 @@
+ 		{
+ 			char name[32];
+ 			format_dev_t (name, tc->dev->bdev->bd_dev);
+-			snprintf (result, maxlen, "%d %d 0 0 %s " SECTOR_FORMAT " " SECTOR_FORMAT " " SECTOR_FORMAT " %Ld %Ld %d %s",
++			snprintf (result, maxlen, "%d %d 0 0 %s %llu %llu %llu %Ld %Ld %d %s",
+ 				tc->ci->ea,
+ 				tc->ci->mode,
+ 				name,
+-				tc->start,
+-				tc->read_only_start,
+-				tc->read_only_end,
++				(unsigned long long) tc->start,
++				(unsigned long long) tc->read_only_start,
++				(unsigned long long) tc->read_only_end,
+ 				tc->mtime,
+ 				tc->atime,
+ 				tc->flags,
================================================================


More information about the pld-cvs-commit mailing list