wok-current rev 20516

Porting from SliTaz Next: mbedtls, dislocker.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 10:40:07 2018 +0200 (2018-11-02)
parents 1233282eaed0
children 0f8a407d3204
files dislocker/receipt dislocker/stuff/fix-spelling.patch dislocker/stuff/manpage/dislocker-bek.1 dislocker/stuff/manpage/dislocker-metadata.1 mbedtls-dev/receipt mbedtls/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dislocker/receipt	Fri Nov 02 10:40:07 2018 +0200
     1.3 @@ -0,0 +1,44 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="dislocker"
     1.7 +VERSION="0.7.1"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Read/write BitLocker encrypted volumes under Linux"
    1.10 +MAINTAINER="al.bobylev@gmail.com"
    1.11 +LICENSE="GPL2"
    1.12 +WEB_SITE="https://github.com/Aorimn/dislocker"
    1.13 +
    1.14 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.15 +WGET_URL="https://github.com/Aorimn/dislocker/archive/v$VERSION.tar.gz"
    1.16 +
    1.17 +DEPENDS="fuse mbedtls"
    1.18 +BUILD_DEPENDS="cmake mbedtls-dev fuse-dev patch attr"
    1.19 +
    1.20 +compile_rules() {
    1.21 +	# Fix v0.7 upstream path error
    1.22 +	sed -i 's/DIS_MAN \${PROJECT_SOURCE_DIR}/DIS_MAN ../' src/CMakeLists.txt
    1.23 +
    1.24 +	cp $stuff/manpage/* man/linux/
    1.25 +
    1.26 +	patch -p1 -i $stuff/fix-spelling.patch
    1.27 +
    1.28 +	cmake \
    1.29 +		-DCMAKE_INSTALL_PREFIX=/usr \
    1.30 +		-Dlibdir=/usr/lib \
    1.31 +		-D WARN_FLAGS:STRING="-Wall -Wextra" \
    1.32 +		. &&
    1.33 +	make &&
    1.34 +	make DESTDIR=$install install || return 1
    1.35 +
    1.36 +	mkdir -p $install/usr/share/doc/$PACKAGE-$VERSION/
    1.37 +	cp README.md CHANGELOG.md $install/usr/share/doc/$PACKAGE-$VERSION/
    1.38 +
    1.39 +	mkdir -p $install/usr/share/man/man1/
    1.40 +	cp man/linux/dislocker-bek.1 man/linux/dislocker-metadata.1 \
    1.41 +		$install/usr/share/man/man1/
    1.42 +}
    1.43 +
    1.44 +genpkg_rules() {
    1.45 +	mkdir -p $fs/usr/
    1.46 +	cp -a $install/usr/bin/ $install/usr/lib/ $fs/usr/
    1.47 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/dislocker/stuff/fix-spelling.patch	Fri Nov 02 10:40:07 2018 +0200
     2.3 @@ -0,0 +1,148 @@
     2.4 +Description: Fix a few typos on the manpages and source code.
     2.5 +Author: Giovani Augusto Ferreira <giovani@debian.org>
     2.6 +Last-Update: 2016-07-07
     2.7 +Index: dislocker-0.7.1/man/linux/dislocker-file.1
     2.8 +===================================================================
     2.9 +--- dislocker-0.7.1.orig/man/linux/dislocker-file.1
    2.10 ++++ dislocker-0.7.1/man/linux/dislocker-file.1
    2.11 +@@ -2,7 +2,7 @@
    2.12 + .\"
    2.13 + .TH DISLOCKER 1 2011-09-07 "Linux" "DISLOCKER"
    2.14 + .SH NAME
    2.15 +-Dislocker file - Read BitLocker encrypted volumes under Linux, OSX and FreeBSD.
    2.16 ++Dislocker-file \- Read BitLocker encrypted volumes under Linux, OSX and FreeBSD.
    2.17 + .SH SYNOPSIS
    2.18 + dislocker-file [-hqrsv] [-l \fILOG_FILE\fR] [-O \fIOFFSET\fR] [-V \fIVOLUME\fR \fIDECRYPTMETHOD\fR -F[\fIN\fR]] [--] \fINTFS_FILE\fR
    2.19 + 
    2.20 +@@ -16,7 +16,7 @@ This NTFS file won't have any link with
    2.21 + .SH OPTIONS
    2.22 + For program's options description, see dislocker-fuse(1). The only change in the command line is the last argument, which in this case is the \fINTFS_FILE\fR argument:
    2.23 + .PP
    2.24 +-.TB
    2.25 ++.TP
    2.26 + .B NTFS_FILE
    2.27 + the newly created file where NTFS data will be put to, once decrypted from the BitLocker encrypted volume.
    2.28 + .SH EXAMPLES
    2.29 +Index: dislocker-0.7.1/man/linux/dislocker-fuse.1
    2.30 +===================================================================
    2.31 +--- dislocker-0.7.1.orig/man/linux/dislocker-fuse.1
    2.32 ++++ dislocker-0.7.1/man/linux/dislocker-fuse.1
    2.33 +@@ -2,7 +2,7 @@
    2.34 + .\"
    2.35 + .TH DISLOCKER-FUSE 1 2011-09-07 "Linux" "DISLOCKER-FUSE"
    2.36 + .SH NAME
    2.37 +-Dislocker fuse - Read/write BitLocker encrypted volumes under Linux, OSX and FreeBSD.
    2.38 ++Dislocker-fuse \- Read/write BitLocker encrypted volumes under Linux, OSX and FreeBSD.
    2.39 + .SH SYNOPSIS
    2.40 + dislocker-fuse [-hqrsv] [-l \fILOG_FILE\fR] [-O \fIOFFSET\fR] [-V \fIVOLUME\fR \fIDECRYPTMETHOD\fR -F[\fIN\fR]] [-- \fIARGS\fR...]
    2.41 + 
    2.42 +@@ -49,7 +49,7 @@ do NOT display any information.
    2.43 + This option has priority on any previous `\fB-v\fR'. One probably wants to check the return value of the program when using this option
    2.44 + .TP
    2.45 + .B -r, --readonly
    2.46 +-do not allow to write on the BitLocker volume (read only mode)
    2.47 ++do not allow one to write on the BitLocker volume (read only mode)
    2.48 + .TP
    2.49 + .B -s, --stateok
    2.50 + do not check the volume's state, assume it's ok to mount it.
    2.51 +Index: dislocker-0.7.1/src/metadata/datums.c
    2.52 +===================================================================
    2.53 +--- dislocker-0.7.1.orig/src/metadata/datums.c
    2.54 ++++ dislocker-0.7.1/src/metadata/datums.c
    2.55 +@@ -326,7 +326,7 @@ void print_datum_key(DIS_LOGS level, voi
    2.56 + 	datum_key_t* datum = (datum_key_t*) vdatum;
    2.57 + 	char* cipher_str = cipherstr((cipher_t) datum->algo);
    2.58 + 
    2.59 +-	dis_printf(level, "Unkown: \n");
    2.60 ++	dis_printf(level, "Unknown: \n");
    2.61 + 	hexdump(level, (void*) &datum->padd, 2);
    2.62 + 	dis_printf(level, "Algo: %s (%#hx)\n", cipher_str, datum->algo);
    2.63 + 	dis_printf(level, "Key:\n");
    2.64 +@@ -367,7 +367,7 @@ void print_datum_stretch_key(DIS_LOGS le
    2.65 + {
    2.66 + 	datum_stretch_key_t* datum = (datum_stretch_key_t*) vdatum;
    2.67 + 
    2.68 +-	dis_printf(level, "Unkown: \n");
    2.69 ++	dis_printf(level, "Unknown: \n");
    2.70 + 	hexdump(level, (void*) &datum->padd, 2);
    2.71 + 	dis_printf(level, "Algo: %#x\n", datum->algo);
    2.72 + 	dis_printf(level, "Salt: \n");
    2.73 +Index: dislocker-0.7.1/src/metadata/metadata.c
    2.74 +===================================================================
    2.75 +--- dislocker-0.7.1.orig/src/metadata/metadata.c
    2.76 ++++ dislocker-0.7.1/src/metadata/metadata.c
    2.77 +@@ -202,7 +202,7 @@ int dis_metadata_initialize(dis_metadata
    2.78 + 	{
    2.79 + 		dis_printf(
    2.80 + 			L_CRITICAL,
    2.81 +-			"A problem occured during the retrieving of metadata. Abort.\n"
    2.82 ++			"A problem occurred during the retrieving of metadata. Abort.\n"
    2.83 + 		);
    2.84 + 		return DIS_RET_ERROR_METADATA_CHECK;
    2.85 + 	}
    2.86 +Index: dislocker-0.7.1/src/metadata/print_metadata.c
    2.87 +===================================================================
    2.88 +--- dislocker-0.7.1.orig/src/metadata/print_metadata.c
    2.89 ++++ dislocker-0.7.1/src/metadata/print_metadata.c
    2.90 +@@ -59,7 +59,7 @@ void print_volume_header(DIS_LOGS level,
    2.91 + 	format_guid(volume_header->guid, rec_id);
    2.92 + 
    2.93 + 
    2.94 +-	dis_printf(level, "=====[ Volume header informations ]=====\n");
    2.95 ++	dis_printf(level, "=====[ Volume header information ]=====\n");
    2.96 + 	dis_printf(level, "  Signature: '%.8s'\n", volume_header->signature);
    2.97 + 	dis_printf(level, "  Sector size: 0x%1$04x (%1$hu) bytes\n", volume_header->sector_size);
    2.98 + 	dis_printf(level, "  Sector per cluster: 0x%1$02x (%1$hhu) bytes\n", volume_header->sectors_per_cluster);
    2.99 +@@ -122,7 +122,7 @@ void print_information(DIS_LOGS level, d
   2.100 + 	dis_printf(level, "  Current state: %s (%hu)\n", get_state_str(information->curr_state), information->curr_state);
   2.101 + 	dis_printf(level, "  Next state: %s (%hu)\n",    get_state_str(information->next_state), information->next_state);
   2.102 + 	dis_printf(level, "  Encrypted volume size: %1$" PRIu64 " bytes (%1$#" PRIx64 "), ~%2$" PRIu64 " MB\n", information->encrypted_volume_size, information->encrypted_volume_size / (1024*1024));
   2.103 +-	dis_printf(level, "  Size of convertion region: %1$#x (%1$u)\n", information->convert_size);
   2.104 ++	dis_printf(level, "  Size of conversion region: %1$#x (%1$u)\n", information->convert_size);
   2.105 + 	dis_printf(level, "  Number of boot sectors backuped: %1$u sectors (%1$#x)\n", information->nb_backup_sectors);
   2.106 + 	dis_printf(level, "  First metadata header offset:  %#" PRIx64 "\n", information->information_off[0]);
   2.107 + 	dis_printf(level, "  Second metadata header offset: %#" PRIx64 "\n", information->information_off[1]);
   2.108 +@@ -187,7 +187,7 @@ void print_eow_infos(DIS_LOGS level, dis
   2.109 + 
   2.110 + 	bitlocker_eow_infos_t* eow_infos = dis_meta->eow_information;
   2.111 + 
   2.112 +-	dis_printf(level, "=======================[ BitLocker EOW informations ]========================\n");
   2.113 ++	dis_printf(level, "=======================[ BitLocker EOW information ]========================\n");
   2.114 + 	dis_printf(level, "  Signature: '%.8s'\n", eow_infos->signature);
   2.115 + 	dis_printf(level, "  Structure size: 0x%1$04x (%1$hu)\n", eow_infos->header_size);
   2.116 + 	dis_printf(level, "  On-disk size: 0x%1$04x (%1$hu)\n", eow_infos->infos_size);
   2.117 +@@ -243,7 +243,7 @@ void print_data(DIS_LOGS level, dis_meta
   2.118 + 			break;
   2.119 + 
   2.120 + 		dis_printf(level, "\n");
   2.121 +-		dis_printf(level, "=======[ Datum n°%d informations ]=======\n", ++loop);
   2.122 ++		dis_printf(level, "=======[ Datum n°%d information ]=======\n", ++loop);
   2.123 + 		print_one_datum(level, data);
   2.124 + 		dis_printf(level, "=========================================\n");
   2.125 + 
   2.126 +Index: dislocker-0.7.1/src/config.c
   2.127 +===================================================================
   2.128 +--- dislocker-0.7.1.orig/src/config.c
   2.129 ++++ dislocker-0.7.1/src/config.c
   2.130 +@@ -181,7 +181,7 @@ PROGNAME " by " AUTHOR ", v" VERSION " (
   2.131 + "    -p, --recovery-password=[RECOVERY_PASSWORD]\n"
   2.132 + "                          decrypt volume using the recovery password method\n"
   2.133 + "    -q, --quiet           do NOT display anything\n"
   2.134 +-"    -r, --readonly        do not allow to write on the BitLocker volume\n"
   2.135 ++"    -r, --readonly        do not allow one to write on the BitLocker volume\n"
   2.136 + "    -s, --stateok         do not check the volume's state, assume it's ok to mount it\n"
   2.137 + "    -u, --user-password=[USER_PASSWORD]\n"
   2.138 + "                          decrypt volume using the user password method\n"
   2.139 +Index: dislocker-0.7.1/man/linux/dislocker-find.1
   2.140 +===================================================================
   2.141 +--- dislocker-0.7.1.orig/man/linux/dislocker-find.1
   2.142 ++++ dislocker-0.7.1/man/linux/dislocker-find.1
   2.143 +@@ -2,7 +2,7 @@
   2.144 + .\"
   2.145 + .TH DISLOCKER-FIND 1 2011-09-07 "Linux" "DISLOCKER-FIND"
   2.146 + .SH NAME
   2.147 +-Dislocker find - Find BitLocker-encrypted volumes.
   2.148 ++Dislocker-find \- Find BitLocker-encrypted volumes.
   2.149 + .SH SYNOPSIS
   2.150 + dislocker-find [-h] [files...]
   2.151 + .SH DESCRIPTION
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/dislocker/stuff/manpage/dislocker-bek.1	Fri Nov 02 10:40:07 2018 +0200
     3.3 @@ -0,0 +1,45 @@
     3.4 +.TH dislocker-bek "1" "Jul 2017" "DISLOCKER-BEK 0.7.1" "Reads .BEK files and prints information about them".\" Text automatically generated by txt2man
     3.5 +.SH NAME
     3.6 +\fBdislocker-bek \fP- Reads .BEK files and prints information about them
     3.7 +.SH SYNOPSIS
     3.8 +.nf
     3.9 +.fam C
    3.10 +\fBdislocker-bek\fP [\fB-f\fP file.bek]
    3.11 +.fam T
    3.12 +.fi
    3.13 +.fam T
    3.14 +.fi
    3.15 +.SH DESCRIPTION
    3.16 +Dislocker has been designed to read BitLocker encrypted partitions under
    3.17 +a Linux system. The driver used to read volumes encrypted in Windows system
    3.18 +versions of the Vista to 10 and BitLocker-To-Go encrypted partitions,that's
    3.19 +USB/FAT32 partitions.
    3.20 +.PP
    3.21 +BEK file is a BitLocker Encryption Key. BitLocker Drive Encryption is a full
    3.22 +disk encryption feature included with the Microsoft's Windows versions Vista
    3.23 +to 10. It is designed to protect data by providing encryption for entire
    3.24 +volumes.
    3.25 +.PP
    3.26 +The software works with driver composed of a library, with multiple binaries
    3.27 +using this library. Decrypting the partition, you have to give it a mount
    3.28 +point where, once keys are decrypted, a file named dislocker-file appears.
    3.29 +This file is a virtual NTFS partition, so you can mount it as any NTFS
    3.30 +partition and then read from or write to it. Writing to the NTFS virtual
    3.31 +file will change the underlying BitLocker partition content.
    3.32 +.PP
    3.33 +This tool is useful in cryptography managing and forensics investigations.
    3.34 +.SH OPTIONS
    3.35 +.TP
    3.36 +.B
    3.37 +\fB-h\fP
    3.38 +print all options to help
    3.39 +.TP
    3.40 +.B
    3.41 +\fB-f\fP
    3.42 +read information about a .bek file
    3.43 +.SH AUTHOR
    3.44 +The DISLOCKER was written by Romain Coltel <romain.coltel@gmail.com> and 
    3.45 +Hervé Schauer Consultants <Secretariat@hsc.fr>
    3.46 +.PP
    3.47 +This manual page was written by Giovani Augusto Ferreira <giovani@debian.org>
    3.48 +for the Debian project (but may be used by others).
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/dislocker/stuff/manpage/dislocker-metadata.1	Fri Nov 02 10:40:07 2018 +0200
     4.3 @@ -0,0 +1,49 @@
     4.4 +.TH dislocker-metadata "1" "Jul 2017" "DISLOCKER-METADATA 0.7.1" "printing information about a BitLocker-encrypted volume"
     4.5 +.\" Text automatically generated by txt2man
     4.6 +.SH NAME
     4.7 +\fBdislocker-metadata \fP- printing information about a BitLocker-encrypted volume
     4.8 +.SH SYNOPSIS
     4.9 +.nf
    4.10 +.fam C
    4.11 +\fBdislocker-metadata\fP [\fIOPTIONS\fP]
    4.12 +.fam T
    4.13 +.fi
    4.14 +.fam T
    4.15 +.fi
    4.16 +.SH DESCRIPTION
    4.17 +Dislocker has been designed to read BitLocker encrypted partitions under
    4.18 +a Linux system. The driver used to read volumes encrypted in Windows system
    4.19 +versions of the Vista to 10 and BitLocker-To-Go encrypted partitions,that's
    4.20 +USB/FAT32 partitions.
    4.21 +.PP
    4.22 +The software works with driver composed of a library, with multiple binaries
    4.23 +using this library. Decrypting the partition, you have to give it a mount
    4.24 +point where, once keys are decrypted, a file named dislocker-file appears.
    4.25 +This file is a virtual NTFS partition, so you can mount it as any NTFS
    4.26 +partition and then read from or write to it. Writing to the NTFS virtual
    4.27 +file will change the underlying BitLocker partition content.
    4.28 +.PP
    4.29 +This tool is useful in cryptography managing and forensics investigations.
    4.30 +.SH OPTIONS
    4.31 +.TP
    4.32 +.B
    4.33 +\fB-h\fP
    4.34 +print all options to help
    4.35 +.TP
    4.36 +.B
    4.37 +\fB-o\fP
    4.38 +partition offset
    4.39 +.TP
    4.40 +.B
    4.41 +\fB-v\fP
    4.42 +increase verbosity to debug level
    4.43 +.TP
    4.44 +.B
    4.45 +\fB-V\fP VOLUME
    4.46 +volume to get metadata from
    4.47 +.SH AUTHOR
    4.48 +The DISLOCKER was written by Romain Coltel <romain.coltel@gmail.com> and 
    4.49 +Hervé Schauer Consultants <Secretariat@hsc.fr>
    4.50 +.PP
    4.51 +This manual page was written by Giovani Augusto Ferreira <giovani@debian.org>
    4.52 +for the Debian project (but may be used by others).
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/mbedtls-dev/receipt	Fri Nov 02 10:40:07 2018 +0200
     5.3 @@ -0,0 +1,17 @@
     5.4 +# SliTaz package receipt v2.
     5.5 +
     5.6 +PACKAGE="mbedtls-dev"
     5.7 +VERSION="2.6.0"
     5.8 +CATEGORY="development"
     5.9 +SHORT_DESC="Portable cryptographic and SSL/TLS library (ex polarssl) (development files)"
    5.10 +MAINTAINER="al.bobylev@gmail.com"
    5.11 +LICENSE="Apache"
    5.12 +WEB_SITE="https://tls.mbed.org/"
    5.13 +
    5.14 +WANTED="mbedtls"
    5.15 +
    5.16 +genpkg_rules() {
    5.17 +	mkdir -p $fs/usr/lib/
    5.18 +	cp -r $install/usr/include/ $fs/usr/
    5.19 +	cp    $install/usr/lib/*.a  $fs/usr/lib/
    5.20 +}
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/mbedtls/receipt	Fri Nov 02 10:40:07 2018 +0200
     6.3 @@ -0,0 +1,30 @@
     6.4 +# SliTaz package receipt v2.
     6.5 +
     6.6 +PACKAGE="mbedtls"
     6.7 +VERSION="2.6.0"
     6.8 +CATEGORY="security"
     6.9 +SHORT_DESC="Portable cryptographic and SSL/TLS library (ex polarssl)"
    6.10 +MAINTAINER="al.bobylev@gmail.com"
    6.11 +LICENSE="Apache"
    6.12 +WEB_SITE="https://tls.mbed.org/"
    6.13 +
    6.14 +TARBALL="$PACKAGE-$VERSION-gpl.tgz"
    6.15 +WGET_URL="https://tls.mbed.org/download/$TARBALL"
    6.16 +
    6.17 +compile_rules() {
    6.18 +	sed \
    6.19 +		-e 's|//\(#define MBEDTLS_THREADING_C\)|\1|' \
    6.20 +		-e 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' \
    6.21 +		-i include/mbedtls/config.h
    6.22 +	sed -i 's|<time.h>|"platform.h"|' include/mbedtls/ssl.h
    6.23 +
    6.24 +	LDFLAGS="$LDFLAGS -I../include " \
    6.25 +	make SHARED=1 no_test &&
    6.26 +	make DESTDIR=$install/usr install
    6.27 +}
    6.28 +
    6.29 +genpkg_rules() {
    6.30 +	mkdir -p $fs/usr/lib/
    6.31 +	cp -a $install/usr/bin/      $fs/usr/
    6.32 +	cp -a $install/usr/lib/*.so* $fs/usr/lib/
    6.33 +}