# HG changeset patch # User Aleksej Bobylev # Date 1541148007 -7200 # Node ID 3ed4ba0fc8dbbba452411e0ce0043ae96530f70f # Parent 1233282eaed0050d08ba9b5d733e401f9b8ffa7c Porting from SliTaz Next: mbedtls, dislocker. diff -r 1233282eaed0 -r 3ed4ba0fc8db dislocker/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dislocker/receipt Fri Nov 02 10:40:07 2018 +0200 @@ -0,0 +1,44 @@ +# SliTaz package receipt. + +PACKAGE="dislocker" +VERSION="0.7.1" +CATEGORY="system-tools" +SHORT_DESC="Read/write BitLocker encrypted volumes under Linux" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="GPL2" +WEB_SITE="https://github.com/Aorimn/dislocker" + +TARBALL="$PACKAGE-$VERSION.tar.gz" +WGET_URL="https://github.com/Aorimn/dislocker/archive/v$VERSION.tar.gz" + +DEPENDS="fuse mbedtls" +BUILD_DEPENDS="cmake mbedtls-dev fuse-dev patch attr" + +compile_rules() { + # Fix v0.7 upstream path error + sed -i 's/DIS_MAN \${PROJECT_SOURCE_DIR}/DIS_MAN ../' src/CMakeLists.txt + + cp $stuff/manpage/* man/linux/ + + patch -p1 -i $stuff/fix-spelling.patch + + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -Dlibdir=/usr/lib \ + -D WARN_FLAGS:STRING="-Wall -Wextra" \ + . && + make && + make DESTDIR=$install install || return 1 + + mkdir -p $install/usr/share/doc/$PACKAGE-$VERSION/ + cp README.md CHANGELOG.md $install/usr/share/doc/$PACKAGE-$VERSION/ + + mkdir -p $install/usr/share/man/man1/ + cp man/linux/dislocker-bek.1 man/linux/dislocker-metadata.1 \ + $install/usr/share/man/man1/ +} + +genpkg_rules() { + mkdir -p $fs/usr/ + cp -a $install/usr/bin/ $install/usr/lib/ $fs/usr/ +} diff -r 1233282eaed0 -r 3ed4ba0fc8db dislocker/stuff/fix-spelling.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dislocker/stuff/fix-spelling.patch Fri Nov 02 10:40:07 2018 +0200 @@ -0,0 +1,148 @@ +Description: Fix a few typos on the manpages and source code. +Author: Giovani Augusto Ferreira +Last-Update: 2016-07-07 +Index: dislocker-0.7.1/man/linux/dislocker-file.1 +=================================================================== +--- dislocker-0.7.1.orig/man/linux/dislocker-file.1 ++++ dislocker-0.7.1/man/linux/dislocker-file.1 +@@ -2,7 +2,7 @@ + .\" + .TH DISLOCKER 1 2011-09-07 "Linux" "DISLOCKER" + .SH NAME +-Dislocker file - Read BitLocker encrypted volumes under Linux, OSX and FreeBSD. ++Dislocker-file \- Read BitLocker encrypted volumes under Linux, OSX and FreeBSD. + .SH SYNOPSIS + dislocker-file [-hqrsv] [-l \fILOG_FILE\fR] [-O \fIOFFSET\fR] [-V \fIVOLUME\fR \fIDECRYPTMETHOD\fR -F[\fIN\fR]] [--] \fINTFS_FILE\fR + +@@ -16,7 +16,7 @@ This NTFS file won't have any link with + .SH OPTIONS + 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: + .PP +-.TB ++.TP + .B NTFS_FILE + the newly created file where NTFS data will be put to, once decrypted from the BitLocker encrypted volume. + .SH EXAMPLES +Index: dislocker-0.7.1/man/linux/dislocker-fuse.1 +=================================================================== +--- dislocker-0.7.1.orig/man/linux/dislocker-fuse.1 ++++ dislocker-0.7.1/man/linux/dislocker-fuse.1 +@@ -2,7 +2,7 @@ + .\" + .TH DISLOCKER-FUSE 1 2011-09-07 "Linux" "DISLOCKER-FUSE" + .SH NAME +-Dislocker fuse - Read/write BitLocker encrypted volumes under Linux, OSX and FreeBSD. ++Dislocker-fuse \- Read/write BitLocker encrypted volumes under Linux, OSX and FreeBSD. + .SH SYNOPSIS + dislocker-fuse [-hqrsv] [-l \fILOG_FILE\fR] [-O \fIOFFSET\fR] [-V \fIVOLUME\fR \fIDECRYPTMETHOD\fR -F[\fIN\fR]] [-- \fIARGS\fR...] + +@@ -49,7 +49,7 @@ do NOT display any information. + 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 + .TP + .B -r, --readonly +-do not allow to write on the BitLocker volume (read only mode) ++do not allow one to write on the BitLocker volume (read only mode) + .TP + .B -s, --stateok + do not check the volume's state, assume it's ok to mount it. +Index: dislocker-0.7.1/src/metadata/datums.c +=================================================================== +--- dislocker-0.7.1.orig/src/metadata/datums.c ++++ dislocker-0.7.1/src/metadata/datums.c +@@ -326,7 +326,7 @@ void print_datum_key(DIS_LOGS level, voi + datum_key_t* datum = (datum_key_t*) vdatum; + char* cipher_str = cipherstr((cipher_t) datum->algo); + +- dis_printf(level, "Unkown: \n"); ++ dis_printf(level, "Unknown: \n"); + hexdump(level, (void*) &datum->padd, 2); + dis_printf(level, "Algo: %s (%#hx)\n", cipher_str, datum->algo); + dis_printf(level, "Key:\n"); +@@ -367,7 +367,7 @@ void print_datum_stretch_key(DIS_LOGS le + { + datum_stretch_key_t* datum = (datum_stretch_key_t*) vdatum; + +- dis_printf(level, "Unkown: \n"); ++ dis_printf(level, "Unknown: \n"); + hexdump(level, (void*) &datum->padd, 2); + dis_printf(level, "Algo: %#x\n", datum->algo); + dis_printf(level, "Salt: \n"); +Index: dislocker-0.7.1/src/metadata/metadata.c +=================================================================== +--- dislocker-0.7.1.orig/src/metadata/metadata.c ++++ dislocker-0.7.1/src/metadata/metadata.c +@@ -202,7 +202,7 @@ int dis_metadata_initialize(dis_metadata + { + dis_printf( + L_CRITICAL, +- "A problem occured during the retrieving of metadata. Abort.\n" ++ "A problem occurred during the retrieving of metadata. Abort.\n" + ); + return DIS_RET_ERROR_METADATA_CHECK; + } +Index: dislocker-0.7.1/src/metadata/print_metadata.c +=================================================================== +--- dislocker-0.7.1.orig/src/metadata/print_metadata.c ++++ dislocker-0.7.1/src/metadata/print_metadata.c +@@ -59,7 +59,7 @@ void print_volume_header(DIS_LOGS level, + format_guid(volume_header->guid, rec_id); + + +- dis_printf(level, "=====[ Volume header informations ]=====\n"); ++ dis_printf(level, "=====[ Volume header information ]=====\n"); + dis_printf(level, " Signature: '%.8s'\n", volume_header->signature); + dis_printf(level, " Sector size: 0x%1$04x (%1$hu) bytes\n", volume_header->sector_size); + dis_printf(level, " Sector per cluster: 0x%1$02x (%1$hhu) bytes\n", volume_header->sectors_per_cluster); +@@ -122,7 +122,7 @@ void print_information(DIS_LOGS level, d + dis_printf(level, " Current state: %s (%hu)\n", get_state_str(information->curr_state), information->curr_state); + dis_printf(level, " Next state: %s (%hu)\n", get_state_str(information->next_state), information->next_state); + 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)); +- dis_printf(level, " Size of convertion region: %1$#x (%1$u)\n", information->convert_size); ++ dis_printf(level, " Size of conversion region: %1$#x (%1$u)\n", information->convert_size); + dis_printf(level, " Number of boot sectors backuped: %1$u sectors (%1$#x)\n", information->nb_backup_sectors); + dis_printf(level, " First metadata header offset: %#" PRIx64 "\n", information->information_off[0]); + dis_printf(level, " Second metadata header offset: %#" PRIx64 "\n", information->information_off[1]); +@@ -187,7 +187,7 @@ void print_eow_infos(DIS_LOGS level, dis + + bitlocker_eow_infos_t* eow_infos = dis_meta->eow_information; + +- dis_printf(level, "=======================[ BitLocker EOW informations ]========================\n"); ++ dis_printf(level, "=======================[ BitLocker EOW information ]========================\n"); + dis_printf(level, " Signature: '%.8s'\n", eow_infos->signature); + dis_printf(level, " Structure size: 0x%1$04x (%1$hu)\n", eow_infos->header_size); + dis_printf(level, " On-disk size: 0x%1$04x (%1$hu)\n", eow_infos->infos_size); +@@ -243,7 +243,7 @@ void print_data(DIS_LOGS level, dis_meta + break; + + dis_printf(level, "\n"); +- dis_printf(level, "=======[ Datum n°%d informations ]=======\n", ++loop); ++ dis_printf(level, "=======[ Datum n°%d information ]=======\n", ++loop); + print_one_datum(level, data); + dis_printf(level, "=========================================\n"); + +Index: dislocker-0.7.1/src/config.c +=================================================================== +--- dislocker-0.7.1.orig/src/config.c ++++ dislocker-0.7.1/src/config.c +@@ -181,7 +181,7 @@ PROGNAME " by " AUTHOR ", v" VERSION " ( + " -p, --recovery-password=[RECOVERY_PASSWORD]\n" + " decrypt volume using the recovery password method\n" + " -q, --quiet do NOT display anything\n" +-" -r, --readonly do not allow to write on the BitLocker volume\n" ++" -r, --readonly do not allow one to write on the BitLocker volume\n" + " -s, --stateok do not check the volume's state, assume it's ok to mount it\n" + " -u, --user-password=[USER_PASSWORD]\n" + " decrypt volume using the user password method\n" +Index: dislocker-0.7.1/man/linux/dislocker-find.1 +=================================================================== +--- dislocker-0.7.1.orig/man/linux/dislocker-find.1 ++++ dislocker-0.7.1/man/linux/dislocker-find.1 +@@ -2,7 +2,7 @@ + .\" + .TH DISLOCKER-FIND 1 2011-09-07 "Linux" "DISLOCKER-FIND" + .SH NAME +-Dislocker find - Find BitLocker-encrypted volumes. ++Dislocker-find \- Find BitLocker-encrypted volumes. + .SH SYNOPSIS + dislocker-find [-h] [files...] + .SH DESCRIPTION diff -r 1233282eaed0 -r 3ed4ba0fc8db dislocker/stuff/manpage/dislocker-bek.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dislocker/stuff/manpage/dislocker-bek.1 Fri Nov 02 10:40:07 2018 +0200 @@ -0,0 +1,45 @@ +.TH dislocker-bek "1" "Jul 2017" "DISLOCKER-BEK 0.7.1" "Reads .BEK files and prints information about them".\" Text automatically generated by txt2man +.SH NAME +\fBdislocker-bek \fP- Reads .BEK files and prints information about them +.SH SYNOPSIS +.nf +.fam C +\fBdislocker-bek\fP [\fB-f\fP file.bek] +.fam T +.fi +.fam T +.fi +.SH DESCRIPTION +Dislocker has been designed to read BitLocker encrypted partitions under +a Linux system. The driver used to read volumes encrypted in Windows system +versions of the Vista to 10 and BitLocker-To-Go encrypted partitions,that's +USB/FAT32 partitions. +.PP +BEK file is a BitLocker Encryption Key. BitLocker Drive Encryption is a full +disk encryption feature included with the Microsoft's Windows versions Vista +to 10. It is designed to protect data by providing encryption for entire +volumes. +.PP +The software works with driver composed of a library, with multiple binaries +using this library. Decrypting the partition, you have to give it a mount +point where, once keys are decrypted, a file named dislocker-file appears. +This file is a virtual NTFS partition, so you can mount it as any NTFS +partition and then read from or write to it. Writing to the NTFS virtual +file will change the underlying BitLocker partition content. +.PP +This tool is useful in cryptography managing and forensics investigations. +.SH OPTIONS +.TP +.B +\fB-h\fP +print all options to help +.TP +.B +\fB-f\fP +read information about a .bek file +.SH AUTHOR +The DISLOCKER was written by Romain Coltel and +Hervé Schauer Consultants +.PP +This manual page was written by Giovani Augusto Ferreira +for the Debian project (but may be used by others). diff -r 1233282eaed0 -r 3ed4ba0fc8db dislocker/stuff/manpage/dislocker-metadata.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dislocker/stuff/manpage/dislocker-metadata.1 Fri Nov 02 10:40:07 2018 +0200 @@ -0,0 +1,49 @@ +.TH dislocker-metadata "1" "Jul 2017" "DISLOCKER-METADATA 0.7.1" "printing information about a BitLocker-encrypted volume" +.\" Text automatically generated by txt2man +.SH NAME +\fBdislocker-metadata \fP- printing information about a BitLocker-encrypted volume +.SH SYNOPSIS +.nf +.fam C +\fBdislocker-metadata\fP [\fIOPTIONS\fP] +.fam T +.fi +.fam T +.fi +.SH DESCRIPTION +Dislocker has been designed to read BitLocker encrypted partitions under +a Linux system. The driver used to read volumes encrypted in Windows system +versions of the Vista to 10 and BitLocker-To-Go encrypted partitions,that's +USB/FAT32 partitions. +.PP +The software works with driver composed of a library, with multiple binaries +using this library. Decrypting the partition, you have to give it a mount +point where, once keys are decrypted, a file named dislocker-file appears. +This file is a virtual NTFS partition, so you can mount it as any NTFS +partition and then read from or write to it. Writing to the NTFS virtual +file will change the underlying BitLocker partition content. +.PP +This tool is useful in cryptography managing and forensics investigations. +.SH OPTIONS +.TP +.B +\fB-h\fP +print all options to help +.TP +.B +\fB-o\fP +partition offset +.TP +.B +\fB-v\fP +increase verbosity to debug level +.TP +.B +\fB-V\fP VOLUME +volume to get metadata from +.SH AUTHOR +The DISLOCKER was written by Romain Coltel and +Hervé Schauer Consultants +.PP +This manual page was written by Giovani Augusto Ferreira +for the Debian project (but may be used by others). diff -r 1233282eaed0 -r 3ed4ba0fc8db mbedtls-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbedtls-dev/receipt Fri Nov 02 10:40:07 2018 +0200 @@ -0,0 +1,17 @@ +# SliTaz package receipt v2. + +PACKAGE="mbedtls-dev" +VERSION="2.6.0" +CATEGORY="development" +SHORT_DESC="Portable cryptographic and SSL/TLS library (ex polarssl) (development files)" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="Apache" +WEB_SITE="https://tls.mbed.org/" + +WANTED="mbedtls" + +genpkg_rules() { + mkdir -p $fs/usr/lib/ + cp -r $install/usr/include/ $fs/usr/ + cp $install/usr/lib/*.a $fs/usr/lib/ +} diff -r 1233282eaed0 -r 3ed4ba0fc8db mbedtls/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbedtls/receipt Fri Nov 02 10:40:07 2018 +0200 @@ -0,0 +1,30 @@ +# SliTaz package receipt v2. + +PACKAGE="mbedtls" +VERSION="2.6.0" +CATEGORY="security" +SHORT_DESC="Portable cryptographic and SSL/TLS library (ex polarssl)" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="Apache" +WEB_SITE="https://tls.mbed.org/" + +TARBALL="$PACKAGE-$VERSION-gpl.tgz" +WGET_URL="https://tls.mbed.org/download/$TARBALL" + +compile_rules() { + sed \ + -e 's|//\(#define MBEDTLS_THREADING_C\)|\1|' \ + -e 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' \ + -i include/mbedtls/config.h + sed -i 's||"platform.h"|' include/mbedtls/ssl.h + + LDFLAGS="$LDFLAGS -I../include " \ + make SHARED=1 no_test && + make DESTDIR=$install/usr install +} + +genpkg_rules() { + mkdir -p $fs/usr/lib/ + cp -a $install/usr/bin/ $fs/usr/ + cp -a $install/usr/lib/*.so* $fs/usr/lib/ +}