all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Add mcrypt
@ 2014-05-24  5:40 Eric Bavier
  2014-05-24  8:53 ` Andreas Enge
  2014-05-24 10:19 ` Nikita Karetnikov
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Bavier @ 2014-05-24  5:40 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 74 bytes --]

This patch adds Mcrypt, and two library dependencies.  Comments welcome.


[-- Attachment #2: 0001-gnu-Add-mcrypt.patch --]
[-- Type: text/x-diff, Size: 7376 bytes --]

From 252fe352e78fab9a66d50049cdce561072ff29df Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Sat, 24 May 2014 00:27:34 -0500
Subject: [PATCH] gnu: Add mcrypt.

* gnu/packages/mcrypt.scm: New file.
* gnu/packages/patches/mhash-keygen-test-segfault.patch: New patch.
* gnu-system.am (GNU_SYSTEM_MODULES): Add file.
  (dist_patch_DATA): Add patch.
---
 gnu-system.am                                      |    2 +
 gnu/packages/mcrypt.scm                            |  131 ++++++++++++++++++++
 .../patches/mhash-keygen-test-segfault.patch       |   13 ++
 3 files changed, 146 insertions(+)
 create mode 100644 gnu/packages/mcrypt.scm
 create mode 100644 gnu/packages/patches/mhash-keygen-test-segfault.patch

diff --git a/gnu-system.am b/gnu-system.am
index d7ea31b..7eece81 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -151,6 +151,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/make-bootstrap.scm		\
   gnu/packages/maths.scm			\
   gnu/packages/mc.scm				\
+  gnu/packages/mcrypt.scm			\
   gnu/packages/messaging.scm			\
   gnu/packages/mit-krb5.scm			\
   gnu/packages/moe.scm				\
@@ -320,6 +321,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/make-impure-dirs.patch			\
   gnu/packages/patches/mc-fix-ncurses-build.patch		\
   gnu/packages/patches/mcron-install.patch			\
+  gnu/packages/patches/mhash-keygen-test-segfault.patch		\
   gnu/packages/patches/mit-krb5-init-fix.patch			\
   gnu/packages/patches/mpc123-initialize-ao.patch		\
   gnu/packages/patches/openssl-CVE-2010-5298.patch		\
diff --git a/gnu/packages/mcrypt.scm b/gnu/packages/mcrypt.scm
new file mode 100644
index 0000000..785eb83
--- /dev/null
+++ b/gnu/packages/mcrypt.scm
@@ -0,0 +1,131 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mcrypt)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses) #:select (gpl2+))
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages file))
+
+(define-public mcrypt
+  (package
+    (name "mcrypt")
+    (version "2.6.8")
+    (source
+     (origin
+      (method url-fetch)
+
+      (uri (string-append "mirror://sourceforge/mcrypt/mcrypt-"
+                          version ".tar.gz"))
+      (sha256
+       (base32
+        "161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("zlib" ,zlib)
+       ("libmcrypt" ,libmcrypt)
+       ("libmhash" ,libmhash)))
+    (home-page "http://mcrypt.sourceforge.net/")
+    (synopsis "")
+    (description
+     "MCrypt is a replacement for the old crypt() package and crypt(1)
+command, with extensions.  It allows developers to use a wide range of
+encryption functions, without making drastic changes to their code.  It allows
+users to encrypt files or data streams without having to be cryptographers.
+The companion to MCrypt is Libmcrypt, which contains the actual encryption
+functions themselves, and provides a standardized mechanism for accessing
+them.")
+    (license gpl2+)))
+
+(define-public libmcrypt
+  (package
+    (name "libmcrypt")
+    (version "2.5.8")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://sourceforge/mcrypt/libmcrypt-"
+                          version ".tar.gz"))
+      (sha256
+       (base32
+        "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"))))
+    (build-system gnu-build-system)
+    (native-inputs `(("file" ,file)))
+    (arguments
+     `(#:phases (alist-cons-before
+                 'configure 'patch-configure
+                 (lambda _
+                   (substitute* "configure"
+                     (("/usr/bin/file")
+                      (which "file"))))
+                 %standard-phases)))
+    (home-page "http://mcrypt.sourceforge.net/")
+    (synopsis "Encryption algorithm library")
+    (description
+     "Libmcrypt is a data encryption library.  The library is thread safe and
+provides encryption and decryption functions.  This version of the library
+supports many encryption algorithms and encryption modes.  Some algorithms
+which are supported: SERPENT, RIJNDAEL, 3DES, GOST, SAFER+, CAST-256, RC2,
+XTEA, 3WAY, TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.")
+    (license gpl2+)))
+
+(define-public libmhash
+  (package
+    (name "libmhash")
+    (version "0.9.9.9")
+    (source
+     (origin
+      (method url-fetch)
+
+      (uri (string-append "mirror://sourceforge/mhash/mhash-"
+                          version ".tar.bz2"))
+      (sha256
+       (base32
+        "1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn"))
+      (patches (list (search-patch "mhash-keygen-test-segfault.patch")))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("file" ,file)
+       ("perl" ,perl)))                 ;for tests
+    (arguments
+     `(#:phases (alist-cons-before
+                 'configure 'patch-configure
+                 (lambda _
+                   (substitute* "configure"
+                     (("/usr/bin/file")
+                      (which "file"))))
+                 %standard-phases)))
+    (home-page "http://mhash.sourceforge.net/")
+    (synopsis "Thread-safe hash library")
+    (description
+     "mhash is a thread-safe hash library, implemented in C, and provides a
+uniform interface to a large number of hash algorithms. These algorithms can
+be used to compute checksums, message digests, and other signatures. The HMAC
+support implements the basics for message authentication, following RFC 2104.
+
+Algorithms currently supplied are:
+
+CRC-32, CRC-32B, ALDER-32, MD-2, MD-4, MD-5, RIPEMD-128, RIPEMD-160,
+RIPEMD-256, RIPEMD-320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, HAVAL-128,
+HAVAL-160, HAVAL-192, HAVAL-256, TIGER, TIGER-128, TIGER-160, GOST, WHIRLPOOL,
+SNEFRU-128, SNEFRU-256")
+    (license gpl2+)))
diff --git a/gnu/packages/patches/mhash-keygen-test-segfault.patch b/gnu/packages/patches/mhash-keygen-test-segfault.patch
new file mode 100644
index 0000000..3bd9f43
--- /dev/null
+++ b/gnu/packages/patches/mhash-keygen-test-segfault.patch
@@ -0,0 +1,13 @@
+This patch from resolution of https://sourceforge.net/p/mhash/bugs/37/
+
+--- a/src/keygen_test.c
++++ b/src/keygen_test.c
+@@ -121,8 +121,6 @@
+ 	
+ 	mhash_keygen_ext(KEYGEN_S2K_SALTED, data, key, keysize, password, passlen);
+ 
+-	mutils_memset(tmp, 0, keysize * 2);
+-
+ 	tmp = mutils_asciify(key, keysize);
+ 
+ 	result = mutils_strcmp((mutils_word8 *) KEY2, tmp);
-- 
1.7.9.5


[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


-- 
Eric Bavier

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add mcrypt
  2014-05-24  5:40 [PATCH] Add mcrypt Eric Bavier
@ 2014-05-24  8:53 ` Andreas Enge
  2014-05-24 22:34   ` Ludovic Courtès
  2014-05-24 10:19 ` Nikita Karetnikov
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Enge @ 2014-05-24  8:53 UTC (permalink / raw)
  To: Eric Bavier; +Cc: Guix-devel

On Sat, May 24, 2014 at 12:40:31AM -0500, Eric Bavier wrote:
> +    (native-inputs `(("file" ,file)))
> +    (arguments
> +     `(#:phases (alist-cons-before
> +                 'configure 'patch-configure
> +                 (lambda _
> +                   (substitute* "configure"
> +                     (("/usr/bin/file")
> +                      (which "file"))))
> +                 %standard-phases)))

Is this really needed? Lots of packages using the autotools look for "file",
and when it is not available, nothing bad seems to happen. I was told before
to just not bother.

Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add mcrypt
  2014-05-24  5:40 [PATCH] Add mcrypt Eric Bavier
  2014-05-24  8:53 ` Andreas Enge
@ 2014-05-24 10:19 ` Nikita Karetnikov
  2014-05-24 13:59   ` Taylan Ulrich Bayirli/Kammer
  1 sibling, 1 reply; 6+ messages in thread
From: Nikita Karetnikov @ 2014-05-24 10:19 UTC (permalink / raw)
  To: Eric Bavier; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

> This patch adds Mcrypt, and two library dependencies.  Comments
> welcome.

I believe the libraries should be listed in the commit message as new
variables.  Ludo, WDYT?

> +      (method url-fetch)
> +
> +      (uri (string-append "mirror://sourceforge/mcrypt/mcrypt-"

Extraneous newline.

> +    (synopsis "")

Empty synopsis.

> +       ("perl" ,perl)))                 ;for tests

Usually, one puts a space after ‘;’.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add mcrypt
  2014-05-24 10:19 ` Nikita Karetnikov
@ 2014-05-24 13:59   ` Taylan Ulrich Bayirli/Kammer
  2014-05-24 22:33     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Taylan Ulrich Bayirli/Kammer @ 2014-05-24 13:59 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: Guix-devel

Nikita Karetnikov <nikita@karetnikov.org> writes:

>> +       ("perl" ,perl)))                 ;for tests
>
> Usually, one puts a space after ‘;’.

Not according to http://mumble.net/~campbell/scheme/style.txt and
Emacs's M-; (which just follows that document anyway).

Taylan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add mcrypt
  2014-05-24 13:59   ` Taylan Ulrich Bayirli/Kammer
@ 2014-05-24 22:33     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2014-05-24 22:33 UTC (permalink / raw)
  To: Taylan Ulrich Bayirli/Kammer; +Cc: Guix-devel

Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> skribis:

> Nikita Karetnikov <nikita@karetnikov.org> writes:
>
>>> +       ("perl" ,perl)))                 ;for tests
>>
>> Usually, one puts a space after ‘;’.
>
> Not according to http://mumble.net/~campbell/scheme/style.txt and
> Emacs's M-; (which just follows that document anyway).

It reads:

  The only comments in which omission of a space between the semicolon
  and the text is acceptable are margin comments.

which I take as “it’s OK to have one space for margin comments as well”,
which is what I do.  :-)

I prefer it with the additional space, but I’m fine either way.

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add mcrypt
  2014-05-24  8:53 ` Andreas Enge
@ 2014-05-24 22:34   ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2014-05-24 22:34 UTC (permalink / raw)
  To: Andreas Enge; +Cc: Guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> On Sat, May 24, 2014 at 12:40:31AM -0500, Eric Bavier wrote:
>> +    (native-inputs `(("file" ,file)))
>> +    (arguments
>> +     `(#:phases (alist-cons-before
>> +                 'configure 'patch-configure
>> +                 (lambda _
>> +                   (substitute* "configure"
>> +                     (("/usr/bin/file")
>> +                      (which "file"))))
>> +                 %standard-phases)))
>
> Is this really needed? Lots of packages using the autotools look for "file",
> and when it is not available, nothing bad seems to happen. I was told before
> to just not bother.

Agreed.

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> This patch adds Mcrypt, and two library dependencies.  Comments
>> welcome.
>
> I believe the libraries should be listed in the commit message as new
> variables.  Ludo, WDYT?

Agreed, in the subject line.

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-24 22:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-24  5:40 [PATCH] Add mcrypt Eric Bavier
2014-05-24  8:53 ` Andreas Enge
2014-05-24 22:34   ` Ludovic Courtès
2014-05-24 10:19 ` Nikita Karetnikov
2014-05-24 13:59   ` Taylan Ulrich Bayirli/Kammer
2014-05-24 22:33     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.