[arch-commits] Commit in truecrypt/trunk (4 files)
Levente Polyak
anthraxx at archlinux.org
Thu May 19 15:22:41 UTC 2016
Date: Thursday, May 19, 2016 @ 17:22:41
Author: anthraxx
Revision: 268310
upgpkg: truecrypt 1:7.1a-4 (ABI fix)
Added:
truecrypt/trunk/fix-invalid-characters.patch
truecrypt/trunk/gcc6.patch
truecrypt/trunk/no-exec-stack.patch
Modified:
truecrypt/trunk/PKGBUILD
------------------------------+
PKGBUILD | 79 ++++++++++++++++++++++-------------------
fix-invalid-characters.patch | 54 ++++++++++++++++++++++++++++
gcc6.patch | 61 +++++++++++++++++++++++++++++++
no-exec-stack.patch | 60 +++++++++++++++++++++++++++++++
4 files changed, 219 insertions(+), 35 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-05-19 13:42:47 UTC (rev 268309)
+++ PKGBUILD 2016-05-19 15:22:41 UTC (rev 268310)
@@ -1,53 +1,62 @@
-# $Id$
-# Maintainer: Paul Mattal <paul.archlinux.org>
+# 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=3
+pkgrel=4
epoch=1
-pkgdesc="Free open-source cross-platform disk encryption software"
-url="http://www.truecrypt.org/"
+pkgdesc='Free open-source cross-platform disk encryption software'
+url='http://www.truecrypt.org/'
arch=('i686' 'x86_64')
-license=('custom') # TrueCrypt License v2.6
+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')
-optdepends=('sudo: mounting encrypted volumes as nonroot users')
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' \
- "${pkgname}.desktop" \
- "${pkgname}-arch-detection.patch")
-md5sums=('102d9652681db11c813610882332ae48'
- '5bca3d15b35d0725ff3317e568062ad8'
- 'ce6a707b79411e82e8e558aa03e764b0'
- '183b9bf04a943454d4e216130bcbac01'
- '00ea70fa8437de877b31b027ac2b4060')
+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 "${srcdir}/${pkgname}-${pkgver}-source"
-
- # Work around buggy CPU type detection
- patch -Np1 -i ../${pkgname}-arch-detection.patch
-
- # Build
- export WX_CONFIG=/usr/bin/wx-config-2.8
- make PKCS11_INC="${srcdir}/pkcs-2.20" LFLAGS+="-ldl"
+ 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 "${srcdir}/${pkgname}-${pkgver}-source"
+ 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}"
+}
- # Install Binary
- install -D -m755 Main/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
-
- # Install Desktop file and Icon
- install -D -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- install -D -m644 Resources/Icons/TrueCrypt-48x48.xpm "${pkgdir}/usr/share/pixmaps/truecrypt.xpm"
-
- # Install License
- install -D -m644 License.txt "${pkgdir}/usr/share/licenses/${pkgname}/License.txt"
-}
+# vim: ts=2 sw=2 et:
Added: fix-invalid-characters.patch
===================================================================
--- fix-invalid-characters.patch (rev 0)
+++ fix-invalid-characters.patch 2016-05-19 15:22:41 UTC (rev 268310)
@@ -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)
Added: gcc6.patch
===================================================================
--- gcc6.patch (rev 0)
+++ gcc6.patch 2016-05-19 15:22:41 UTC (rev 268310)
@@ -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);
+
Added: no-exec-stack.patch
===================================================================
--- no-exec-stack.patch (rev 0)
+++ no-exec-stack.patch 2016-05-19 15:22:41 UTC (rev 268310)
@@ -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
More information about the arch-commits
mailing list