From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOnuo-0003XB-5s for guix-patches@gnu.org; Sat, 24 Jun 2017 12:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOnuk-0005bD-GW for guix-patches@gnu.org; Sat, 24 Jun 2017 12:28:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33183) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOnuk-0005Zy-Bn for guix-patches@gnu.org; Sat, 24 Jun 2017 12:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dOnuk-0004MU-30 for guix-patches@gnu.org; Sat, 24 Jun 2017 12:28:02 -0400 Subject: [bug#27475] Add kashmir, crypto++, opendht-with-msgpack-c++-11, and some updates. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOntm-0002b7-TS for guix-patches@gnu.org; Sat, 24 Jun 2017 12:27:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOntj-0002rw-8j for guix-patches@gnu.org; Sat, 24 Jun 2017 12:27:02 -0400 Received: from lb1.openmailbox.org ([5.79.108.160]:47888 helo=mail.openmailbox.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOnti-0002lL-PA for guix-patches@gnu.org; Sat, 24 Jun 2017 12:26:59 -0400 From: Adonay Felipe Nogueira Date: Sat, 24 Jun 2017 13:26:48 -0300 Message-ID: <8737apqrlj.fsf@openmailbox.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27475@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Guix! :) Here follows a series of patches, it's part of the attempt to package GNU Ring. However, these contributions don't need custom patches from Savir Faire Linux. The only doubt is in regards to the need to have a variant of msgpack that uses C++ 11 instead, and have a variant of opendht that makes use of such msgpack variant instead. Respectfully, Adonay. --=20 - [[https://libreplanet.org/wiki/User:Adfeno]] - Palestrante e consultor sobre /software/ livre (n=C3=A3o confundir com gratis). - "WhatsApp"? Ele n=C3=A3o =C3=A9 livre, por isso n=C3=A3o uso. Iguais a el= e prefiro GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard que est=C3=A1 no endere=C3=A7o acima aos teus contatos. - Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu aceito, mas n=C3=A3o repasso. Entrego apenas em formatos favor=C3=A1veis = ao /software/ livre. Favor entrar em contato em caso de d=C3=BAvida. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="gnu packages cpp (kashmir).patch" Content-Transfer-Encoding: quoted-printable >From 4622ca4c1ba0ef42c1b0db1070727c072365fbf6 Mon Sep 17 00:00:00 2001 From: Adonay Felipe Nogueira Date: Sat, 24 Jun 2017 11:53:49 -0300 Subject: [PATCH] gnu: Add kashmir. * gnu/packages/cpp.scm (kashmir): New variable. --- gnu/packages/cpp.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++= +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index da19255..228be99 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2017 Ethan R. Jones +;;; Copyright =C2=A9 2017 Adonay "adfeno" Felipe Nogueira ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,9 +21,58 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix build utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:use-module (gnu packages) - #:use-module (gnu packages autotools)) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages compression)) + +(define-public kashmir + (let ((release "0") + (commit "2f3913f49c4ac7f9bff9224db5178f6f8f0ff3ee") + (revision 1)) + (package + (name "kashmir") + (version (if (zero? revision) + release + (string-append release "-" + (number->string revision) + "." (string-take commit 7)))) + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/Corvusoft/" name + "-dependency/archive/" commit ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "11hbh3d7w74gng9qgz3hdrzvxjgil1pymk2bzxv1ajh9vp60xxs9")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((gzip (assoc-ref %build-inputs "gzip")) + (source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar"))) + (setenv "PATH" (string-append gzip "/bin:" + tar "/bin")) + (mkdir-p %output) + (system* "tar" "-xvf" source "-C" %output) + (chdir %output) + (for-each (lambda (file) + (rename-file file "kashmir-dependency")) + (find-files "." "kashmir-dependency-" #:directories? #t)))))) + (native-inputs + `(("source" ,source) + ("tar" ,tar) + ("gzip" ,gzip))) + (synopsis "C++ library providing I/O, MD5, SHA-1, random number strin= g, and UUID operations") + (description "The Kashmir Library provides features allowing usage of= I/O formatting and state saving; MD5 and SHA-1 hashing; random number stre= ams, and UUID generation.") + (home-page "https://github.com/corvusoft/kashmir-dependency") + (license license:boost1.0)))) =20 (define-public libzen (package --=20 1.9.1 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="gnu packages crypto (crypto++).patch" Content-Transfer-Encoding: quoted-printable >From 6e390fd37c1562188c0c40a3d4c9c8987462abd1 Mon Sep 17 00:00:00 2001 From: Adonay Felipe Nogueira Date: Sat, 24 Jun 2017 13:09:46 -0300 Subject: [PATCH] gnu: Add crypto++. * gnu/packages/crypto.scm (crypto++): New variable. --- gnu/packages/crypto.scm | 103 ++++++++++++++++++++++++++++++++++++++++++++= +++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index 6f02d86..4d32750 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -6,6 +6,8 @@ ;;; Copyright =C2=A9 2016 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2016 ng0 ;;; Copyright =C2=A9 2016, 2017 Eric Bavier +;;; Copyright =C2=A9 2017 Marius Bakke +;;; Copyright =C2=A9 2017 Adonay "adfeno" Felipe Nogueira ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +31,7 @@ #:use-module (gnu packages attr) #:use-module (gnu packages autotools) #:use-module (gnu packages boost) + #:use-module (gnu packages compression) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages gettext) #:use-module (gnu packages gnupg) @@ -50,9 +53,107 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build utils) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) - #:use-module (guix build-system python)) + #:use-module (guix build-system python) + #:use-module (guix utils) + #:use-module (ice-9 match)) + +(define-public crypto++ + (let ((release "5.6.5") + (revision 1)) + (package + (name "crypto++") + (version (if (zero? revision) + release + (string-append release "-" + (number->string revision)))) + (source (origin + (method url-fetch) + (uri (let ((numeric-version + (match (string-split release #\.) + ((first-digit other-digits ...) + (string-append first-digit + (string-concatenate + other-digits)))))) + (string-append "https://cryptopp.com/cryptopp" + numeric-version ".zip"))) + (sha256 + (base32 + "0d1cqdz369ivi082k59025wvxzywvkizw7i0pf5h0a1izs3g8pm7")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + `(,(string-append "PREFIX=3D" (assoc-ref %outputs "out")) + ,(string-append "BINDIR=3D" (assoc-ref %outputs "bin") "/bin") + ,(string-append "DATADIR=3D" (assoc-ref %outputs "doc") "/share") + "DISABLE_CXXFLAGS_OPTIMIZATIONS=3D1" + ;; Override "/sbin/ldconfig" with simply "echo" since + ;; we don't need ldconfig(8). + "LDCONF=3Decho") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source + ;; They have made a zip-bomb. + (lambda _ (chdir "..") #t)) + (add-after 'enter-source 'disable-optimizations + (lambda _ + ;; XXX: The disable optimizations + ;; flag above is not recognized in + ;; the current version. See + ;; https://github.com/weidai11/cryptopp/pull/354. + ;; For now, just remove it the dirty + ;; way. + (substitute* "GNUmakefile" + (("-march=3Dnative") "")) + #t)) + (delete 'configure) + (add-after 'build 'build-shared + (lambda _ + ;; By default, only the static + ;; library is built. + (zero? + (system* "make" "shared")))) + (add-after 'install 'move-static-library + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (static (assoc-ref outputs "static")) + (slib (string-append static "/lib"))) + (mkdir-p slib) + (for-each (lambda (file) + (install-file file slib) + (delete-file file)) + (find-files lib "\\.l?a$")) + #t))) + (add-after 'move-static-library 'add-so-version-symlink + ;; The library is named + ;; MAJOR.MINOR.PATCHLEVEL. Some + ;; programs expect a MAJOR.MINOR + ;; symlink. + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (major+minor ,(version-major+minor release))) + (with-directory-excursion (string-append out "/lib") + (symlink (string-append "libcryptopp.so." ,release) + (string-append "libcryptopp.so." major+minor)) + #t))))))) + (outputs + '("out" ; 6.4M shared library and headers + "bin" ; 6.3M cryptest.exe + "doc" ; 6.4M documentation and examples + "static")) ; 15M static library + (native-inputs + `(("unzip" ,unzip))) + (synopsis "C++ class library of cryptographic schemes") + (description "Crypto++ is a large collection of cryptograhic +algorithms and related utilities for C++.") + (home-page "https://cryptopp.com") + ;; The compilation is licensed under Boost 1.0, while + ;; most individual files are in the public domain. + ;; Should we add two licenses? + (license license:boost1.0)))) =20 (define-public libsodium (package --=20 1.9.1 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="gnu packages crypto (opendht opendht-with-msgpack-c++-11) serialization (msgpack-c++-11).patch" Content-Transfer-Encoding: quoted-printable >From f8af42e7a9348610d5a413c0838ae22dda47da0b Mon Sep 17 00:00:00 2001 From: Adonay Felipe Nogueira Date: Sat, 24 Jun 2017 12:54:16 -0300 Subject: [PATCH] gnu: Add msgpack-c++-11 and opendht variant. opendht: Upda= te to 1.3.3-5. * gnu/packages/crypto.scm (opendht): Update to 1.3.3-5. * gnu/packages/crypto.scm (opendht-with-msgpack-c++-11): New variable. * gnu/packages/serialization.scm (msgpack-c++-11): New variable. --- gnu/packages/crypto.scm | 98 +++++++++++++++++++++-----------------= ---- gnu/packages/serialization.scm | 12 +++++- 2 files changed, 60 insertions(+), 50 deletions(-) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index 6f02d86..38211be 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -6,6 +6,7 @@ ;;; Copyright =C2=A9 2016 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2016 ng0 ;;; Copyright =C2=A9 2016, 2017 Eric Bavier +;;; Copyright =C2=A9 2017 Adonay "adfeno" Felipe Nogueira ;;; ;;; This file is part of GNU Guix. ;;; @@ -117,58 +118,57 @@ OpenBSD tool of the same name.") "See base64.c in the distributio= n for the license from IBM."))))) =20 - (define-public opendht - (package - (name "opendht") - (version "0.6.1") - (source - (origin - (method url-fetch) - (uri - (string-append - "https://github.com/savoirfairelinux/" name - "/archive/" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (modules '((guix build utils))) - (snippet - '(begin - (delete-file-recursively "src/argon2") - (substitute* "src/Makefile.am" - (("./argon2/libargon2.la") "") - (("SUBDIRS =3D argon2") "")) - (substitute* "src/crypto.cpp" - (("argon2/argon2.h") "argon2.h")) - (substitute* "configure.ac" - (("src/argon2/Makefile") "")))) - (sha256 - (base32 - "09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x")))) - (build-system gnu-build-system) - (inputs - `(("gnutls" ,gnutls) - ("nettle" ,nettle) - ("readline" ,readline) - ("argon2" ,argon2))) - (propagated-inputs - `(("msgpack" ,msgpack))) ;included in several installed hea= ders - (native-inputs - `(("autoconf" ,autoconf) - ("pkg-config" ,pkg-config) - ("automake" ,automake) - ("libtool" ,libtool))) - (arguments - `(#:configure-flags '("--disable-tools" "--disable-python") - #:phases (modify-phases %standard-phases - (add-before 'configure 'autoconf - (lambda _ - (zero? (system* "autoreconf" "-vfi"))))))) - (home-page "https://github.com/savoirfairelinux/opendht/") - (synopsis "Distributed Hash Table (DHT) library") - (description "OpenDHT is a Distributed Hash Table (DHT) library. It m= ay + (let ((release "1.3.3") + (revision 5)) + (package + (name "opendht") + (version (if (zero? revision) + release + (string-append release "-" + (number->string revision)))) + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/savoirfairelinux/" name + "/archive/" release ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "07c8pj3wd7vmz505w508nlc4pssv38ca9s1asv8ydq9qvppd780b")))) + (build-system gnu-build-system) + (inputs + `(("gnutls" ,gnutls) + ("nettle" ,nettle) + ("readline" ,readline))) + (propagated-inputs + `(("argon2" ,argon2) + ("msgpack" ,msgpack))) ; included in several installed headers + (native-inputs + `(("autoconf" ,autoconf) + ("pkg-config" ,pkg-config) + ("automake" ,automake) + ("libtool" ,libtool))) + (arguments + `(#:configure-flags '("--with-argon2") + #:phases (modify-phases %standard-phases + (add-before 'configure 'autoconf + (lambda _ + (zero? + (system* "autoreconf" "-vfi"))))))) + (home-page "https://github.com/savoirfairelinux/opendht/") + (synopsis "Distributed Hash Table (DHT) library") + (description "OpenDHT is a Distributed Hash Table (DHT) library. It = may be used to manage peer-to-peer network connections as needed for real time communication.") - (license license:gpl3))) + (license license:gpl3+)))) + +(define-public opendht-with-msgpack-c++-11 + (package + (inherit opendht) + (name "opendht-with-msgpack-c++-11") + (propagated-inputs + `(("msgpack-c++-11" ,msgpack-c++-11) + ,@(alist-delete "msgpack" (package-propagated-inputs opendht)))))) =20 (define-public encfs (package diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 6a3d8f9..ad50ef5 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -5,6 +5,7 @@ ;;; Copyright =C2=A9 2016 Marius Bakke ;;; Copyright =C2=A9 2016 Efraim Flashner ;;; Copyright =C2=A9 2017 Corentin Bocquillon +;;; Copyright =C2=A9 2017 Adonay "adfeno" Felipe Nogueira ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,7 +89,6 @@ arbitrary data types and reversibly turns them into diffe= rent representations, such as compact binary encodings, XML, or JSON.") (license license:bsd-3))) =20 - (define-public msgpack (package (name "msgpack") @@ -133,6 +133,16 @@ such as compact binary encodings, XML, or JSON.") serialization.") (license license:boost1.0))) =20 +(define-public msgpack-c++-11 + (package + (inherit msgpack) + (name "msgpack-c++-11") + (arguments + (substitute-keyword-arguments (package-arguments msgpack) + ((#:make-flags msgpack-make-flags) + `(append ,msgpack-make-flags + '("-DMSGPACK_CXX11=3DON"))))))) + (define-public libmpack (package (name "libmpack") --=20 1.9.1 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="gnu packages password-utils (argon2).patch" Content-Transfer-Encoding: quoted-printable >From b61ac13661a9188394285ac83991d5eb3853d1d6 Mon Sep 17 00:00:00 2001 From: Adonay Felipe Nogueira Date: Sat, 24 Jun 2017 12:02:01 -0300 Subject: [PATCH] gnu: argon2: Update to 20161029-4.9e3ae0f. * gnu/packages/password-utils.scm (argon2): Update to 20161029-4.9e3ae0f. --- gnu/packages/password-utils.scm | 94 +++++++++++++++++++++++++++----------= ---- 1 file changed, 62 insertions(+), 32 deletions(-) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.= scm index 9cfacdb..0c56acc 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -10,6 +10,7 @@ ;;; Copyright =C2=A9 2017 Leo Famulari ;;; Copyright =C2=A9 2017 Cl=C3=A9ment Lassieur ;;; Copyright =C2=A9 2017 Tobias Geerinckx-Rice +;;; Copyright =C2=A9 2017 Adonay "adfeno" Felipe Nogueira ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,6 +29,7 @@ =20 (define-module (gnu packages password-utils) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build utils) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix download) @@ -346,39 +348,67 @@ through the pass command.") (license license:gpl2+))) =20 (define-public argon2 - (package - (name "argon2") - (version "20161029") - (source - (origin - (method url-fetch) - (uri - (string-append "https://github.com/P-H-C/phc-winner-argon2/archive= /" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1rymikbysasdadm325jx69i0q19d9srqkny69jwmhswlidr4j07y")))) - (build-system gnu-build-system) - (arguments - `(#:test-target "test" - #:make-flags '("CC=3Dgcc") - #:phases - (modify-phases %standard-phases - (delete 'configure) - (replace 'install - (lambda _ - (let ((out (assoc-ref %outputs "out"))) - (install-file "argon2" (string-append out "/bin")) - (install-file "libargon2.a" (string-append out "/lib")) - (install-file "libargon2.so" (string-append out "/lib")) - (copy-recursively "include" - (string-append out "/include")))))))) - (home-page "https://www.argon2.com/") - (synopsis "Password hashing library") - (description "Argon2 provides a key derivation function that was decla= red + (let ((release "20161029") + (commit "9e3ae0f5e91eced6de3c28a9b61f2d91200119e3") + (revision 4)) + (package + (name "argon2") + (version (if (zero? revision) + release + (string-append release "-" + (number->string revision) + "." (string-take commit 7)))) + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/P-H-C/phc-winner-argon2/arc= hive/" + commit ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "Makefile" + (("ifneq \\(\\$\\(OPTTEST\\), 0\\)") + "ifneq (1, 0)")))) + (sha256 + (base32 + "122rpbrl2lbhgwj7sanbgyn81dnp3azr8ydxr5sc0rwqlyg3iqdp")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:make-flags '("CC=3Dgcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'fix-pkg-config-and-makefile + (lambda _ + (substitute* "libargon2.pc" + (("/usr") + (assoc-ref %outputs "out")) + (("@HOST_MULTIARCH@") + ,(or (%current-target-system) + (%current-system))) + (("@UPSTREAM_VER@") + ,release)))) + (replace 'install + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (install-file "argon2" + (string-append out "/bin")) + (install-file "libargon2.a" + (string-append out "/lib")) + (install-file "libargon2.so.0" + (string-append out "/lib")) + (install-file "libargon2.pc" + (string-append out "/lib/pkgconfig")) + (copy-recursively "include" + (string-append out "/include")) + (symlink (string-append out "/lib/libargon2.so.0") + (string-append out "/lib/libargon2.so")))))))) + (home-page "https://www.argon2.com/") + (synopsis "Password hashing library") + (description "Argon2 provides a key derivation function that was decl= ared winner of the 2015 Password Hashing Competition.") - (license license:cc0))) + (license license:cc0)))) =20 (define-public python-bcrypt (package --=20 1.9.1 --=-=-=--