[PATCH] gnu: veracrypt: New package

  • Open
  • quality assurance status badge
Details
3 participants
  • Maxime Devos
  • Ryan Sundberg
  • Steven Roose
Owner
unassigned
Submitted by
Ryan Sundberg
Severity
normal
R
R
Ryan Sundberg wrote on 5 Oct 2021 08:54
(address . guix-patches@gnu.org)(name . Ryan Sundberg)(address . ryan@arctype.co)
20211005065418.29878-1-ryan@arctype.co
Adds a package for the Veracrypt disk encrption program

* gnu/packages/crypto.scm: Add veracrypt
---
gnu/packages/crypto.scm | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (73 lines)
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index af1412c44e..42c9916582 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -43,6 +43,7 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages aidc)
#:use-module (gnu packages attr)
+ #:use-module (gnu packages assembly)
#:use-module (gnu packages autotools)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
@@ -80,6 +81,7 @@
#:use-module (gnu packages tcl)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
+ #:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xml)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -1462,3 +1464,50 @@ via FUSE without root permissions. It is similar to EncFS, but provides
additional security and privacy measures such as hiding file sizes and directory
structure. However CryFS is not considered stable yet by the developers.")
(license license:lgpl3+)))
+
+(define-public veracrypt
+ (package
+ (name "veracrypt")
+ (version "1.24")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://www.veracrypt.fr/code/VeraCrypt/snapshot/VeraCrypt_"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0nn44x7ldkblgkndrd726nkil5bsdaki7j11xi21pr1gjrp7kq2g"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'build-env
+ (lambda* (#:key outputs #:allow-other-keys)
+ (chdir "src")
+ (setenv "CC" "gcc")
+ (setenv "DESTDIR" (assoc-ref outputs "out"))
+ #t))
+ (add-after 'install 'fix-install
+ (lambda* (#:key outputs version #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file (string-append out "/usr/bin/veracrypt") (string-append out "/bin"))
+ (copy-recursively (string-append out "/usr/share/applications") (string-append out "/share/applications"))
+ (copy-recursively (string-append out "/usr/share/pixmaps") (string-append out "/share/pixmaps"))
+ (copy-recursively (string-append out "/usr/share/doc/veracrypt/HTML") (string-append out "/share/doc/veracrypt-1.24/HTML"))
+ (delete-file-recursively (string-append out "/usr"))))))
+ ; Veracrypt only has a test suite for Windows.
+ #:tests? #f))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("yasm" ,yasm)))
+ (inputs
+ `(("fuse" ,fuse)
+ ("wxwidgets" ,wxwidgets)))
+ (propagated-inputs
+ `(("lvm2" ,lvm2)))
+ (home-page "https://www.veracrypt.fr/")
+ (synopsis "Disk encryption software")
+ (description "VeraCrypt is a free open source disk encryption software
+based on TrueCrypt 7.1a.")
+ (license license:asl2.0)))
--
2.31.1
M
M
Maxime Devos wrote on 5 Oct 2021 09:43
11e92801d4735f81e9b18263e93c65405b6c9fe9.camel@telenet.be
Ryan Sundberg via Guix-patches via schreef op ma 04-10-2021 om 23:54 [-0700]:
Toggle quote (43 lines)
> Adds a package for the Veracrypt disk encrption program
>
> * gnu/packages/crypto.scm: Add veracrypt
> ---
> gnu/packages/crypto.scm | 49 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
> diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
> index af1412c44e..42c9916582 100644
> --- a/gnu/packages/crypto.scm
> +++ b/gnu/packages/crypto.scm
> @@ -43,6 +43,7 @@
> #:use-module (gnu packages admin)
> #:use-module (gnu packages aidc)
> #:use-module (gnu packages attr)
> + #:use-module (gnu packages assembly)
> #:use-module (gnu packages autotools)
> #:use-module (gnu packages boost)
> #:use-module (gnu packages check)
> @@ -80,6 +81,7 @@
> #:use-module (gnu packages tcl)
> #:use-module (gnu packages tls)
> #:use-module (gnu packages version-control)
> + #:use-module (gnu packages wxwidgets)
> #:use-module (gnu packages xml)
> #:use-module ((guix licenses) #:prefix license:)
> #:use-module (guix packages)
> @@ -1462,3 +1464,50 @@ via FUSE without root permissions. It is similar to EncFS, but provides
> additional security and privacy measures such as hiding file sizes and directory
> structure. However CryFS is not considered stable yet by the developers.")
> (license license:lgpl3+)))
> +
> +(define-public veracrypt
> + (package
> + (name "veracrypt")
> + (version "1.24")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://www.veracrypt.fr/code/VeraCrypt/snapshot/VeraCrypt_"
> + version ".tar.gz"))

On https://veracrypt.fr/en/Home.html, I see there's a version
VeraCrypt 1.24-Update8 with bug fixes.

Toggle quote (12 lines)
> + (sha256
> + (base32 "0nn44x7ldkblgkndrd726nkil5bsdaki7j11xi21pr1gjrp7kq2g"))))
> + (build-system gnu-build-system)
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (delete 'configure)
> + (add-before 'build 'build-env
> + (lambda* (#:key outputs #:allow-other-keys)
> + (chdir "src")
> + (setenv "CC" "gcc")

I'm surprised (setenv "CC" "gcc") was necessary, because src/Makefile
sets "export CC ?= gcc".

Use (cc-for-target) instead of "gcc" to make veracrypt cross-compilable.
The makefile uses "g++" in some places, shis might need to be (g++-for-target)
instead.

The makefile adds -maes, -msse2 and -msse3 on i*86 and x86_64. You might
want to check these are normally available on all i686 CPUs.

The makefile calls "uname -m" to determine the architecture that's it being
compiled for, while that command determines the architecture of the build
machine.

There's a bunch of files in src/Boot/EFI that look like binary files.
These need to be removed or built from source.


Toggle quote (26 lines)
> + (setenv "DESTDIR" (assoc-ref outputs "out"))
> + #t))
> + (add-after 'install 'fix-install
> + (lambda* (#:key outputs version #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (install-file (string-append out "/usr/bin/veracrypt") (string-append out "/bin"))
> + (copy-recursively (string-append out "/usr/share/applications") (string-append out "/share/applications"))
> + (copy-recursively (string-append out "/usr/share/pixmaps") (string-append out "/share/pixmaps"))
> + (copy-recursively (string-append out "/usr/share/doc/veracrypt/HTML") (string-append out "/share/doc/veracrypt-1.24/HTML"))
> + (delete-file-recursively (string-append out "/usr"))))))
> + ; Veracrypt only has a test suite for Windows.
> + #:tests? #f))
> + (native-inputs
> + `(("pkg-config" ,pkg-config)
> + ("yasm" ,yasm)))
> + (inputs
> + `(("fuse" ,fuse)
> + ("wxwidgets" ,wxwidgets)))
> + (propagated-inputs
> + `(("lvm2" ,lvm2)))
> + (home-page "https://www.veracrypt.fr/")
> + (synopsis "Disk encryption software")
> + (description "VeraCrypt is a free open source disk encryption software
> +based on TrueCrypt 7.1a.")
> + (license license:asl2.0)))

src/Boot/Bios.h has a line ‘ Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.’
That license is non-free according to http://directory.fsf.org/wiki/License:TrueCrypt.
That line appears in other source files as well.


Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVwCDRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7li+AQC18XPAmiptfeZrqx9Ovboy0Mdw
y5Vb51uBsQZqEkJFmQEAmSXEUJK+YSpSv8fb8DCbkiWvarL4tFashJzpe6JfVQM=
=69y1
-----END PGP SIGNATURE-----


S
S
Steven Roose wrote on 5 Sep 2023 10:48
(no subject)
(address . 51024@debbugs.gnu.org)
9aa3c295-ecb1-95b5-9730-f241a3fa4e45@roose.io
Any update on this? I'm interested in this package..

I see VeraCrypt atm is at version 1.25.9, so this package definition is
one version behind.
?