[arch-commits] Commit in truecrypt/repos (14 files)
Levente Polyak
anthraxx at archlinux.org
Thu May 19 15:22:53 UTC 2016
Date: Thursday, May 19, 2016 @ 17:22:53
Author: anthraxx
Revision: 268311
archrelease: copy trunk to testing-i686, testing-x86_64
Added:
truecrypt/repos/testing-i686/
truecrypt/repos/testing-i686/PKGBUILD
(from rev 268310, truecrypt/trunk/PKGBUILD)
truecrypt/repos/testing-i686/fix-invalid-characters.patch
(from rev 268310, truecrypt/trunk/fix-invalid-characters.patch)
truecrypt/repos/testing-i686/gcc6.patch
(from rev 268310, truecrypt/trunk/gcc6.patch)
truecrypt/repos/testing-i686/no-exec-stack.patch
(from rev 268310, truecrypt/trunk/no-exec-stack.patch)
truecrypt/repos/testing-i686/truecrypt-arch-detection.patch
(from rev 268310, truecrypt/trunk/truecrypt-arch-detection.patch)
truecrypt/repos/testing-i686/truecrypt.desktop
(from rev 268310, truecrypt/trunk/truecrypt.desktop)
truecrypt/repos/testing-x86_64/
truecrypt/repos/testing-x86_64/PKGBUILD
(from rev 268310, truecrypt/trunk/PKGBUILD)
truecrypt/repos/testing-x86_64/fix-invalid-characters.patch
(from rev 268310, truecrypt/trunk/fix-invalid-characters.patch)
truecrypt/repos/testing-x86_64/gcc6.patch
(from rev 268310, truecrypt/trunk/gcc6.patch)
truecrypt/repos/testing-x86_64/no-exec-stack.patch
(from rev 268310, truecrypt/trunk/no-exec-stack.patch)
truecrypt/repos/testing-x86_64/truecrypt-arch-detection.patch
(from rev 268310, truecrypt/trunk/truecrypt-arch-detection.patch)
truecrypt/repos/testing-x86_64/truecrypt.desktop
(from rev 268310, truecrypt/trunk/truecrypt.desktop)
-----------------------------------------------+
testing-i686/PKGBUILD | 62 ++++++++++++++++++++++++
testing-i686/fix-invalid-characters.patch | 54 ++++++++++++++++++++
testing-i686/gcc6.patch | 61 +++++++++++++++++++++++
testing-i686/no-exec-stack.patch | 60 +++++++++++++++++++++++
testing-i686/truecrypt-arch-detection.patch | 15 +++++
testing-i686/truecrypt.desktop | 9 +++
testing-x86_64/PKGBUILD | 62 ++++++++++++++++++++++++
testing-x86_64/fix-invalid-characters.patch | 54 ++++++++++++++++++++
testing-x86_64/gcc6.patch | 61 +++++++++++++++++++++++
testing-x86_64/no-exec-stack.patch | 60 +++++++++++++++++++++++
testing-x86_64/truecrypt-arch-detection.patch | 15 +++++
testing-x86_64/truecrypt.desktop | 9 +++
12 files changed, 522 insertions(+)
Copied: truecrypt/repos/testing-i686/PKGBUILD (from rev 268310, truecrypt/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD (rev 0)
+++ testing-i686/PKGBUILD 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,62 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Rémy Oudompheng <remy at archlinux.org>
+# Contributor: Paul Mattal <paul.archlinux.org>
+
+pkgname=truecrypt
+pkgver=7.1a
+pkgrel=4
+epoch=1
+pkgdesc='Free open-source cross-platform disk encryption software'
+url='http://www.truecrypt.org/'
+arch=('i686' 'x86_64')
+license=('custom:TrueCrypt')
+depends=('fuse>=2.8.0' 'wxgtk2.8>=2.8.9' 'libsm' 'device-mapper')
+optdepends=('sudo: mounting encrypted volumes as nonroot users')
+makedepends=('nasm')
+conflicts=('truecrypt-utils')
+replaces=('truecrypt-utils')
+# N.B. Truecrypt's web-based source download is incompatible with
+# makepkg. Source has been placed on ftp.archlinux.org instead
+source=(https://sources.archlinux.org/other/tc/truecrypt-${pkgver}.tar.gz{,.sig}
+ https://sources.archlinux.org/other/tc/pkcs-2.20.tar.gz
+ truecrypt.desktop
+ truecrypt-arch-detection.patch
+ gcc6.patch
+ fix-invalid-characters.patch
+ no-exec-stack.patch)
+sha512sums=('b5e766023168015cb91bfd85c9e2621055dd98408215e02704775861b5070c5a0234a00c64c1bf7faa34e6d0b51ac71cd36169dd7a6f84d7a34ad0cfa304796a'
+ 'SKIP'
+ 'd69d90040da5bc93f91041ed9404f1614a3b1bdc8eddc2bbbd19367f12d2416a6f3af8b0071d77e1273d627148c63ebe7ebe332878fbe9adb8ae33dcc723f473'
+ '1ac13f1888319d6d2f10e03a61e22d68e5fe4a61bbdf8ad364a0fe6f6712cc53dbc1a98fff3fda2ecd57dbe67fcc24fb358c0805ab47eaa12cf14d48f1067e51'
+ 'fac6963c65720f0b13486ff22bdcc2e31e78c39ede2b9561b2c4037ef2c0375f04c4d51dc6067c37aaeb664c3ed70e5747488389737c41807680750c26a8f084'
+ '84175a3677f20b2b03ab29b017b9deecb517a58a640cf667b503cc9375c104b9c0a5d5ea4b3537ba7f12530054a456b466df0afdd935714cd43034b8e6cb2b7c'
+ 'd52826572178a471bb608fd4991766f4f9fa7c5cbf3659922372feb9fdfcbab596d5f1360e30f66613681619672d0be6c5457f5617f5fb1f84061de779831f96'
+ 'c64f9255303a521b4e531ebea574befe80a9f193c9aa42fd9cb552e56d087815ca161b50b593e7c3ede10a65c67dc36d0447dbffb0f4d4614f181a95759c2f79')
+validpgpkeys=('C5F4BAC4A7B22DB8B8F85538E3BA73CAF0D6B1E0') # TrueCrypt Foundation
+
+prepare() {
+ cd ${pkgname}-${pkgver}-source
+ patch -p1 < "${srcdir}/truecrypt-arch-detection.patch"
+ patch -p0 < "${srcdir}/gcc6.patch"
+ patch -p2 < "${srcdir}/fix-invalid-characters.patch"
+ patch -p0 < "${srcdir}/no-exec-stack.patch"
+}
+
+build() {
+ cd ${pkgname}-${pkgver}-source
+ make PKCS11_INC="${srcdir}/pkcs-2.20" \
+ WX_CONFIG=/usr/bin/wx-config-2.8 \
+ TC_EXTRA_LFLAGS+="-ldl ${LDFLAGS}" \
+ TC_EXTRA_CXXFLAGS="${CXXFLAGS}" \
+ TC_EXTRA_CFLAGS="${CFLAGS}"
+}
+
+package() {
+ cd ${pkgname}-${pkgver}-source
+ install -Dm 755 Main/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm 644 "${srcdir}/truecrypt.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dm 644 Resources/Icons/TrueCrypt-48x48.xpm "${pkgdir}/usr/share/pixmaps/truecrypt.xpm"
+ install -Dm 644 License.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:
Copied: truecrypt/repos/testing-i686/fix-invalid-characters.patch (from rev 268310, truecrypt/trunk/fix-invalid-characters.patch)
===================================================================
--- testing-i686/fix-invalid-characters.patch (rev 0)
+++ testing-i686/fix-invalid-characters.patch 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,54 @@
+From 646679da4d79bf7f8af22c44c7ae8498086a88a6 Mon Sep 17 00:00:00 2001
+From: Mounir IDRASSI <mounir.idrassi at idrix.fr>
+Date: Fri, 18 Mar 2016 16:25:48 +0100
+Subject: [PATCH] Linux: Completely fix gcc-5 "Invalid characters encountered"
+ issue on mount. It was caused by an issue of gcc-5 STL implementation that is
+ causing char* pointers retrieved from std::string using c_str method to
+ become invalid in the child of a child process (after two fork calls). The
+ workaround is to first copy the std:string values in the child before calling
+ the second fork.
+
+---
+ src/Platform/Unix/Process.cpp | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/src/Platform/Unix/Process.cpp b/src/Platform/Unix/Process.cpp
+index 388bda6..0770364 100644
+--- a/src/Platform/Unix/Process.cpp
++++ b/src/Platform/Unix/Process.cpp
+@@ -53,13 +53,33 @@ namespace VeraCrypt
+ try
+ {
+ int argIndex = 0;
++ /* Workaround for gcc 5.X issue related to the use of STL (string and list) with muliple fork calls.
++ *
++ * The char* pointers retrieved from the elements of parameter "arguments" are no longer valid after
++ * a second fork is called. "arguments" was created in the parent of the current child process.
++ *
++ * The only solution is to copy the elements of "arguments" parameter in a local string array on this
++ * child process and then use char* pointers retrieved from this local copies before calling fork.
++ *
++ * gcc 4.x doesn't suffer from this issue.
++ *
++ */
++ string argsCopy[array_capacity (args)];
+ if (!execFunctor)
+- args[argIndex++] = const_cast <char*> (processName.c_str());
++ {
++ argsCopy[argIndex++] = processName;
++ }
+
+ foreach (const string &arg, arguments)
+ {
+- args[argIndex++] = const_cast <char*> (arg.c_str());
++ argsCopy[argIndex++] = arg;
+ }
++
++ for (int i = 0; i < argIndex; i++)
++ {
++ args[i] = const_cast <char*> (argsCopy[i].c_str());
++ }
++
+ args[argIndex] = nullptr;
+
+ if (inputData)
Copied: truecrypt/repos/testing-i686/gcc6.patch (from rev 268310, truecrypt/trunk/gcc6.patch)
===================================================================
--- testing-i686/gcc6.patch (rev 0)
+++ testing-i686/gcc6.patch 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,61 @@
+--- Main/Resources.cpp 2016-05-16 16:47:35.846462041 +0200
++++ Main/Resources.cpp 2016-05-16 17:12:21.838202520 +0200
+@@ -45,13 +45,13 @@
+ strBuf.CopyFrom (res);
+ return string (reinterpret_cast <char *> (strBuf.Ptr()));
+ #else
+- static const char LanguageXml[] =
++ static byte LanguageXml[] =
+ {
+ # include "Common/Language.xml.h"
+ , 0
+ };
+
+- return string (LanguageXml);
++ return string ((const char*) LanguageXml);
+ #endif
+ }
+
+@@ -64,13 +64,13 @@
+ strBuf.CopyFrom (res);
+ return string (reinterpret_cast <char *> (strBuf.Ptr()));
+ #else
+- static const char License[] =
++ static byte License[] =
+ {
+ # include "License.txt.h"
+ , 0
+ };
+
+- return string (License);
++ return string ((const char*) License);
+ #endif
+ }
+
+--- Main/Forms/PreferencesDialog.cpp 2016-05-16 17:14:47.704707908 +0200
++++ Main/Forms/PreferencesDialog.cpp 2016-05-16 17:15:56.927964437 +0200
+@@ -414,11 +414,11 @@
+ libExtension = wxDynamicLibrary::CanonicalizeName (L"x");
+
+ #ifdef TC_MACOSX
+- extensions.push_back (make_pair (L"dylib", LangString["DLL_FILES"]));
++ extensions.push_back (make_pair (L"dylib", static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str())));
+ #endif
+ if (!libExtension.empty())
+ {
+- extensions.push_back (make_pair (libExtension.Mid (libExtension.find (L'.') + 1), LangString["DLL_FILES"]));
++ extensions.push_back (make_pair (static_cast<const wchar_t*>(libExtension.Mid (libExtension.find (L'.') + 1).wc_str()), static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str())));
+ extensions.push_back (make_pair (L"*", L""));
+ }
+
+--- Main/GraphicUserInterface.cpp 2016-05-16 17:16:38.724591342 +0200
++++ Main/GraphicUserInterface.cpp 2016-05-16 17:17:09.854562653 +0200
+@@ -1445,7 +1445,7 @@
+ FilePath GraphicUserInterface::SelectVolumeFile (wxWindow *parent, bool saveMode, const DirectoryPath &directory) const
+ {
+ list < pair <wstring, wstring> > extensions;
+- extensions.push_back (make_pair (L"tc", LangString["TC_VOLUMES"]));
++ extensions.push_back (make_pair (L"tc", static_cast<const wchar_t*>(LangString["TC_VOLUMES"].wc_str())));
+
+ FilePathList selFiles = Gui->SelectFiles (parent, LangString[saveMode ? "OPEN_NEW_VOLUME" : "OPEN_VOL_TITLE"], saveMode, false, extensions, directory);
+
Copied: truecrypt/repos/testing-i686/no-exec-stack.patch (from rev 268310, truecrypt/trunk/no-exec-stack.patch)
===================================================================
--- testing-i686/no-exec-stack.patch (rev 0)
+++ testing-i686/no-exec-stack.patch 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,60 @@
+--- Crypto/Aes_hw_cpu.asm.old 2011-06-01 17:12:53.078000001 -0400
++++ Crypto/Aes_hw_cpu.asm 2011-06-01 17:12:53.080000002 -0400
+@@ -328,3 +328,12 @@
+
+
+ %endif ; __BITS__ != 16
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- Crypto/AesSmall_x86.asm.old 2011-06-01 17:12:53.084000002 -0400
++++ Crypto/AesSmall_x86.asm 2011-06-01 17:12:53.086000002 -0400
+@@ -1442,3 +1442,12 @@
+ db v8(0xe1),v8(0x69),v8(0x14),v8(0x63),v8(0x55),v8(0x21),v8(0x0c),v8(0x7d)
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- Crypto/Aes_x64.asm.old 2011-06-01 17:12:53.090000002 -0400
++++ Crypto/Aes_x64.asm 2011-06-01 17:12:53.092000002 -0400
+@@ -905,3 +905,12 @@
+ %endif
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- Crypto/Aes_x86.asm.old 2011-06-01 17:12:53.096000002 -0400
++++ Crypto/Aes_x86.asm 2011-06-01 17:12:53.097000002 -0400
+@@ -644,3 +644,12 @@
+ do_exit
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
Copied: truecrypt/repos/testing-i686/truecrypt-arch-detection.patch (from rev 268310, truecrypt/trunk/truecrypt-arch-detection.patch)
===================================================================
--- testing-i686/truecrypt-arch-detection.patch (rev 0)
+++ testing-i686/truecrypt-arch-detection.patch 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,15 @@
+diff -urN truecrypt-7.0a-source/Makefile truecrypt-7.0a-source.fixed/Makefile
+--- truecrypt-7.0a-source/Makefile 2010-09-05 10:32:10.000000000 -0400
++++ truecrypt-7.0a-source.fixed/Makefile 2011-07-05 21:41:50.296437879 -0400
+@@ -120,10 +120,7 @@
+
+ export CPU_ARCH ?= unknown
+
+-ARCH = $(shell uname -p)
+-ifeq "$(ARCH)" "unknown"
+- ARCH = $(shell uname -m)
+-endif
++ARCH = $(shell uname -m)
+
+ ifneq (,$(filter i386 i486 i586 i686 x86,$(ARCH)))
+ CPU_ARCH = x86
Copied: truecrypt/repos/testing-i686/truecrypt.desktop (from rev 268310, truecrypt/trunk/truecrypt.desktop)
===================================================================
--- testing-i686/truecrypt.desktop (rev 0)
+++ testing-i686/truecrypt.desktop 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Exec=truecrypt
+Icon=truecrypt
+Comment=On-the-fly encryption
+Terminal=false
+Name=TrueCrypt
+StartupNotify=true
+Categories=System;
Copied: truecrypt/repos/testing-x86_64/PKGBUILD (from rev 268310, truecrypt/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,62 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Rémy Oudompheng <remy at archlinux.org>
+# Contributor: Paul Mattal <paul.archlinux.org>
+
+pkgname=truecrypt
+pkgver=7.1a
+pkgrel=4
+epoch=1
+pkgdesc='Free open-source cross-platform disk encryption software'
+url='http://www.truecrypt.org/'
+arch=('i686' 'x86_64')
+license=('custom:TrueCrypt')
+depends=('fuse>=2.8.0' 'wxgtk2.8>=2.8.9' 'libsm' 'device-mapper')
+optdepends=('sudo: mounting encrypted volumes as nonroot users')
+makedepends=('nasm')
+conflicts=('truecrypt-utils')
+replaces=('truecrypt-utils')
+# N.B. Truecrypt's web-based source download is incompatible with
+# makepkg. Source has been placed on ftp.archlinux.org instead
+source=(https://sources.archlinux.org/other/tc/truecrypt-${pkgver}.tar.gz{,.sig}
+ https://sources.archlinux.org/other/tc/pkcs-2.20.tar.gz
+ truecrypt.desktop
+ truecrypt-arch-detection.patch
+ gcc6.patch
+ fix-invalid-characters.patch
+ no-exec-stack.patch)
+sha512sums=('b5e766023168015cb91bfd85c9e2621055dd98408215e02704775861b5070c5a0234a00c64c1bf7faa34e6d0b51ac71cd36169dd7a6f84d7a34ad0cfa304796a'
+ 'SKIP'
+ 'd69d90040da5bc93f91041ed9404f1614a3b1bdc8eddc2bbbd19367f12d2416a6f3af8b0071d77e1273d627148c63ebe7ebe332878fbe9adb8ae33dcc723f473'
+ '1ac13f1888319d6d2f10e03a61e22d68e5fe4a61bbdf8ad364a0fe6f6712cc53dbc1a98fff3fda2ecd57dbe67fcc24fb358c0805ab47eaa12cf14d48f1067e51'
+ 'fac6963c65720f0b13486ff22bdcc2e31e78c39ede2b9561b2c4037ef2c0375f04c4d51dc6067c37aaeb664c3ed70e5747488389737c41807680750c26a8f084'
+ '84175a3677f20b2b03ab29b017b9deecb517a58a640cf667b503cc9375c104b9c0a5d5ea4b3537ba7f12530054a456b466df0afdd935714cd43034b8e6cb2b7c'
+ 'd52826572178a471bb608fd4991766f4f9fa7c5cbf3659922372feb9fdfcbab596d5f1360e30f66613681619672d0be6c5457f5617f5fb1f84061de779831f96'
+ 'c64f9255303a521b4e531ebea574befe80a9f193c9aa42fd9cb552e56d087815ca161b50b593e7c3ede10a65c67dc36d0447dbffb0f4d4614f181a95759c2f79')
+validpgpkeys=('C5F4BAC4A7B22DB8B8F85538E3BA73CAF0D6B1E0') # TrueCrypt Foundation
+
+prepare() {
+ cd ${pkgname}-${pkgver}-source
+ patch -p1 < "${srcdir}/truecrypt-arch-detection.patch"
+ patch -p0 < "${srcdir}/gcc6.patch"
+ patch -p2 < "${srcdir}/fix-invalid-characters.patch"
+ patch -p0 < "${srcdir}/no-exec-stack.patch"
+}
+
+build() {
+ cd ${pkgname}-${pkgver}-source
+ make PKCS11_INC="${srcdir}/pkcs-2.20" \
+ WX_CONFIG=/usr/bin/wx-config-2.8 \
+ TC_EXTRA_LFLAGS+="-ldl ${LDFLAGS}" \
+ TC_EXTRA_CXXFLAGS="${CXXFLAGS}" \
+ TC_EXTRA_CFLAGS="${CFLAGS}"
+}
+
+package() {
+ cd ${pkgname}-${pkgver}-source
+ install -Dm 755 Main/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm 644 "${srcdir}/truecrypt.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dm 644 Resources/Icons/TrueCrypt-48x48.xpm "${pkgdir}/usr/share/pixmaps/truecrypt.xpm"
+ install -Dm 644 License.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:
Copied: truecrypt/repos/testing-x86_64/fix-invalid-characters.patch (from rev 268310, truecrypt/trunk/fix-invalid-characters.patch)
===================================================================
--- testing-x86_64/fix-invalid-characters.patch (rev 0)
+++ testing-x86_64/fix-invalid-characters.patch 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,54 @@
+From 646679da4d79bf7f8af22c44c7ae8498086a88a6 Mon Sep 17 00:00:00 2001
+From: Mounir IDRASSI <mounir.idrassi at idrix.fr>
+Date: Fri, 18 Mar 2016 16:25:48 +0100
+Subject: [PATCH] Linux: Completely fix gcc-5 "Invalid characters encountered"
+ issue on mount. It was caused by an issue of gcc-5 STL implementation that is
+ causing char* pointers retrieved from std::string using c_str method to
+ become invalid in the child of a child process (after two fork calls). The
+ workaround is to first copy the std:string values in the child before calling
+ the second fork.
+
+---
+ src/Platform/Unix/Process.cpp | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/src/Platform/Unix/Process.cpp b/src/Platform/Unix/Process.cpp
+index 388bda6..0770364 100644
+--- a/src/Platform/Unix/Process.cpp
++++ b/src/Platform/Unix/Process.cpp
+@@ -53,13 +53,33 @@ namespace VeraCrypt
+ try
+ {
+ int argIndex = 0;
++ /* Workaround for gcc 5.X issue related to the use of STL (string and list) with muliple fork calls.
++ *
++ * The char* pointers retrieved from the elements of parameter "arguments" are no longer valid after
++ * a second fork is called. "arguments" was created in the parent of the current child process.
++ *
++ * The only solution is to copy the elements of "arguments" parameter in a local string array on this
++ * child process and then use char* pointers retrieved from this local copies before calling fork.
++ *
++ * gcc 4.x doesn't suffer from this issue.
++ *
++ */
++ string argsCopy[array_capacity (args)];
+ if (!execFunctor)
+- args[argIndex++] = const_cast <char*> (processName.c_str());
++ {
++ argsCopy[argIndex++] = processName;
++ }
+
+ foreach (const string &arg, arguments)
+ {
+- args[argIndex++] = const_cast <char*> (arg.c_str());
++ argsCopy[argIndex++] = arg;
+ }
++
++ for (int i = 0; i < argIndex; i++)
++ {
++ args[i] = const_cast <char*> (argsCopy[i].c_str());
++ }
++
+ args[argIndex] = nullptr;
+
+ if (inputData)
Copied: truecrypt/repos/testing-x86_64/gcc6.patch (from rev 268310, truecrypt/trunk/gcc6.patch)
===================================================================
--- testing-x86_64/gcc6.patch (rev 0)
+++ testing-x86_64/gcc6.patch 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,61 @@
+--- Main/Resources.cpp 2016-05-16 16:47:35.846462041 +0200
++++ Main/Resources.cpp 2016-05-16 17:12:21.838202520 +0200
+@@ -45,13 +45,13 @@
+ strBuf.CopyFrom (res);
+ return string (reinterpret_cast <char *> (strBuf.Ptr()));
+ #else
+- static const char LanguageXml[] =
++ static byte LanguageXml[] =
+ {
+ # include "Common/Language.xml.h"
+ , 0
+ };
+
+- return string (LanguageXml);
++ return string ((const char*) LanguageXml);
+ #endif
+ }
+
+@@ -64,13 +64,13 @@
+ strBuf.CopyFrom (res);
+ return string (reinterpret_cast <char *> (strBuf.Ptr()));
+ #else
+- static const char License[] =
++ static byte License[] =
+ {
+ # include "License.txt.h"
+ , 0
+ };
+
+- return string (License);
++ return string ((const char*) License);
+ #endif
+ }
+
+--- Main/Forms/PreferencesDialog.cpp 2016-05-16 17:14:47.704707908 +0200
++++ Main/Forms/PreferencesDialog.cpp 2016-05-16 17:15:56.927964437 +0200
+@@ -414,11 +414,11 @@
+ libExtension = wxDynamicLibrary::CanonicalizeName (L"x");
+
+ #ifdef TC_MACOSX
+- extensions.push_back (make_pair (L"dylib", LangString["DLL_FILES"]));
++ extensions.push_back (make_pair (L"dylib", static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str())));
+ #endif
+ if (!libExtension.empty())
+ {
+- extensions.push_back (make_pair (libExtension.Mid (libExtension.find (L'.') + 1), LangString["DLL_FILES"]));
++ extensions.push_back (make_pair (static_cast<const wchar_t*>(libExtension.Mid (libExtension.find (L'.') + 1).wc_str()), static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str())));
+ extensions.push_back (make_pair (L"*", L""));
+ }
+
+--- Main/GraphicUserInterface.cpp 2016-05-16 17:16:38.724591342 +0200
++++ Main/GraphicUserInterface.cpp 2016-05-16 17:17:09.854562653 +0200
+@@ -1445,7 +1445,7 @@
+ FilePath GraphicUserInterface::SelectVolumeFile (wxWindow *parent, bool saveMode, const DirectoryPath &directory) const
+ {
+ list < pair <wstring, wstring> > extensions;
+- extensions.push_back (make_pair (L"tc", LangString["TC_VOLUMES"]));
++ extensions.push_back (make_pair (L"tc", static_cast<const wchar_t*>(LangString["TC_VOLUMES"].wc_str())));
+
+ FilePathList selFiles = Gui->SelectFiles (parent, LangString[saveMode ? "OPEN_NEW_VOLUME" : "OPEN_VOL_TITLE"], saveMode, false, extensions, directory);
+
Copied: truecrypt/repos/testing-x86_64/no-exec-stack.patch (from rev 268310, truecrypt/trunk/no-exec-stack.patch)
===================================================================
--- testing-x86_64/no-exec-stack.patch (rev 0)
+++ testing-x86_64/no-exec-stack.patch 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,60 @@
+--- Crypto/Aes_hw_cpu.asm.old 2011-06-01 17:12:53.078000001 -0400
++++ Crypto/Aes_hw_cpu.asm 2011-06-01 17:12:53.080000002 -0400
+@@ -328,3 +328,12 @@
+
+
+ %endif ; __BITS__ != 16
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- Crypto/AesSmall_x86.asm.old 2011-06-01 17:12:53.084000002 -0400
++++ Crypto/AesSmall_x86.asm 2011-06-01 17:12:53.086000002 -0400
+@@ -1442,3 +1442,12 @@
+ db v8(0xe1),v8(0x69),v8(0x14),v8(0x63),v8(0x55),v8(0x21),v8(0x0c),v8(0x7d)
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- Crypto/Aes_x64.asm.old 2011-06-01 17:12:53.090000002 -0400
++++ Crypto/Aes_x64.asm 2011-06-01 17:12:53.092000002 -0400
+@@ -905,3 +905,12 @@
+ %endif
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- Crypto/Aes_x86.asm.old 2011-06-01 17:12:53.096000002 -0400
++++ Crypto/Aes_x86.asm 2011-06-01 17:12:53.097000002 -0400
+@@ -644,3 +644,12 @@
+ do_exit
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
Copied: truecrypt/repos/testing-x86_64/truecrypt-arch-detection.patch (from rev 268310, truecrypt/trunk/truecrypt-arch-detection.patch)
===================================================================
--- testing-x86_64/truecrypt-arch-detection.patch (rev 0)
+++ testing-x86_64/truecrypt-arch-detection.patch 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,15 @@
+diff -urN truecrypt-7.0a-source/Makefile truecrypt-7.0a-source.fixed/Makefile
+--- truecrypt-7.0a-source/Makefile 2010-09-05 10:32:10.000000000 -0400
++++ truecrypt-7.0a-source.fixed/Makefile 2011-07-05 21:41:50.296437879 -0400
+@@ -120,10 +120,7 @@
+
+ export CPU_ARCH ?= unknown
+
+-ARCH = $(shell uname -p)
+-ifeq "$(ARCH)" "unknown"
+- ARCH = $(shell uname -m)
+-endif
++ARCH = $(shell uname -m)
+
+ ifneq (,$(filter i386 i486 i586 i686 x86,$(ARCH)))
+ CPU_ARCH = x86
Copied: truecrypt/repos/testing-x86_64/truecrypt.desktop (from rev 268310, truecrypt/trunk/truecrypt.desktop)
===================================================================
--- testing-x86_64/truecrypt.desktop (rev 0)
+++ testing-x86_64/truecrypt.desktop 2016-05-19 15:22:53 UTC (rev 268311)
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Exec=truecrypt
+Icon=truecrypt
+Comment=On-the-fly encryption
+Terminal=false
+Name=TrueCrypt
+StartupNotify=true
+Categories=System;
More information about the arch-commits
mailing list