unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Writing recipe for Crypto++, and getting build errors
@ 2016-09-21 15:24 Adonay Felipe Nogueira
  2016-09-22  1:18 ` Ben Woodcroft
  0 siblings, 1 reply; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2016-09-21 15:24 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 4401 bytes --]

Note: I'm not a programmer, the only thing I can understand is basic
Guile Scheme and basic Bash scripting. So, I'm not really fit to make
changes in the Crypto++'s source files by myself.

I'm writing a recipe for Crypto++ and other packages. I'm not a
programmer, but I decided to try to contribute to Guix by making the
first steps on porting Tahoe-LAFS and related dependencies.

In attachment is the set of recipes I'm writing. The examples given
assume $GUIX_PACKAGE_PATH referring to directories where the
user-supplied recipes can be found.

Doing:

$ guix build --fallback "cryptopp"

... outputs:

# Begin of output
starting phase `build'
make: *** No rule to make target 'dynamic'.  Stop.
phase `build' failed after 0.2 seconds
builder for
`/gnu/store/k863vf0ab6hkdhbm7zgmbfs1c3wdqpqs-cryptopp-5.6.4.drv' failed
with exit code 1
@
build-failed /gnu/store/k863vf0ab6hkdhbm7zgmbfs1c3wdqpqs-cryptopp-5.6.4.drv - 1 builder for `/gnu/store/k863vf0ab6hkdhbm7zgmbfs1c3wdqpqs-cryptopp-5.6.4.drv' failed with exit code 1
guix build: error: build failed: build of
`/gnu/store/k863vf0ab6hkdhbm7zgmbfs1c3wdqpqs-cryptopp-5.6.4.drv' failed
# End of output

However, I did some tests by doing:

$ guix build --fallback --keep-failed "cryptopp"
$ cd "[Failed build path]"
$ sudo --user="[User owner of failed build path]" guix environment
--pure "cryptopp"
$ make "dynamic"

And it **does** start building. If instead of `make "dynamic"`, one does
`make -dnpw "dynamic"` (both in the recipe itself and in the series of
commands given earlier), one can see that:

* The build phase in `guix build` doesn't find the GNUmakefile.

* Attempting the series of commands given earlier, `make` **does** find
the GNUmakefile file.

Besides, someone at #guix suggested me to look at what the NixOS project
did with their Crypto++ package, and it seems they are using it
normally, without removing the dependency on `ldconfig`.

## Additional subject: Absence of `ldconfig`

Seeing the GNUmakefile, it seems to expect some commands to be available
in the environment, so I tried finding those and seeing if the
environment sees them from the profile.

If I remake the environment given before **without** the `--pure`
option, specially if one is using Guix on other distribution, doing:

$ which ar ranlib cp mv egrep chmod mkdir ln ldconfig uname gcc g++ cut
which

... outputs:

# Begin of output
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/ar
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/ranlib
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/cp
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/mv
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/egrep
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/chmod
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/mkdir
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/ln
/sbin/ldconfig
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/uname
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/gcc
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/g++
/gnu/store/4bs2xiv9mr0p8vfy046b4jaqn0958wk4-profile/bin/cut
/usr/bin/which
# End of output

This indicates that `ldconfig` is absent. Someone in #guix told me that
it was supposed to be provided by 

Additionally, `which` was included in the output (comes from the
"debianutils" package on .deb-based distributions) and is also absent,
and the GNUmakefile seems to expect `which` at some point (although I'm
not sure if the build process reached that), so the absence of `which`
might be good to discuss on other bug report.


Respectfully, Adonay.
-- 
# pt-BR: Brasileiro | en: Brazilian

* pt-BR: Palestra sobre liberdade de software (movimento filosófico político-social, não tecnológico).
  * en: Gives talks about software freedom (philosophical, political and social movement, not technological).
* pt-BR: Voluntário avaliador de liberdade de software (para software pagos ou gratuitos).
  * en: Volunteer evaluator of software freedom (for paid software, or gratis software).
* pt-BR: Presta suporte e consultoria básicos sobre software livre.
  * en: Gives basic support and consulting about free/libre software.

## pt-BR: Sobre mim e contato | en: About me and contact
<https://libreplanet.org/wiki/User:Adfeno>


[-- Attachment #1.2: tahoe-lafs.scm --]
[-- Type: text/x-scheme, Size: 15131 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.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 (tahoe-lafs)
  #:use-module ((guix licenses)
      #:select (boost1.0 expat gpl2+))
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages python)
  #:use-module (gnu packages zip)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system python)
  #:use-module (guix download)
  #:use-module (guix packages))

(define-public cryptopp
  ;; TODO: Test reproducibility.
  (package
    (name "cryptopp")
    (version "5.6.4")
    (source
      (origin
        (method url-fetch)
        (uri "http://www.cryptopp.com/cryptopp564.zip")
        (file-name (string-append name "-" version ".zip"))
        (sha256
          (base32
            "1msar24a38rxzq0xgmjf09hzaw2lv6s48vnbbhfrf5awn1vh6hxy"))))
    (build-system gnu-build-system)
    (inputs `(("gcc" ,gcc)
              ("unzip" ,unzip)))
    (arguments `(#:make-flags `(,(string-append "PREFIX="
                                                (assoc-ref %outputs "out")))
                 #:phases (modify-phases %standard-phases
                   (delete `configure) ; FIXME: Configuration is done inside "config.h" file???
                   (replace `build
                     (lambda* _
                       (zero? (system* "make" "dynamic")))))))
    (home-page "http://www.cryptopp.com/")
    (synopsis "Crypto++ Library is a free C++ class library of cryptographic schemes")
    (description "Crypto++ Library is a free C++ class library of cryptographic schemes.
      
      This package was not tested for reproducibility.")
    (license boost1.0)))

(define-public python2-attrs
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-attrs")
    (version "16.2.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/hynek/attrs/archive/"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1fqzm4vw3qk80i3dign4jsdyxfrzyfgp879rndq1z8py9rlml7cw"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2
                 #:tests? #f ; FIXME: Tests require pytest.
                 ))
    (home-page "https://github.com/hynek/attrs")
    (synopsis "Python attributes without boilerplate")
    (description "Python package to ease writing classes by not needing to implement
      object protocols, tuples or namedtuples, and so resulting in higher
      runtime performance.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-characteristic
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-characteristic")
    (version "14.3.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/hynek/characteristic/archive/"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "05p8k68k6bbd02f3xl2n13s4758khgz1impfyg6vfq1c4xci7m26"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2
                 #:tests? #f ; FIXME: Tests require pytest.
                 ))
    (home-page "https://github.com/hynek/characteristic")
    (synopsis "Python attributes without boilerplate")
    (description "Python package with class decorators that ease the chores of implementing
      the most common attribute-related object protocols.
      
      Predecessor of attrs.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-foolscap
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-foolscap")
    (version "0.12.3")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/warner/foolscap/archive/foolscap-"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0p58sz1rs4g6zh88c41fkbf7ih8glpwn1f6xm4bfd1nvmma49s59"))))
    (build-system python-build-system)
    (inputs `(("python2-pyopenssl" ,python2-pyopenssl)
              ("python2-setuptools" ,python2-setuptools)
              ("python2-twisted-tls" ,python2-twisted-tls)))
    (arguments `(#:python ,python-2))
    (home-page "https://foolscap.lothar.com/")
    (synopsis "Remote object-messaging for Python+Twisted")
    (description "Foolscap is an RPC/RMI (Remote Procedure Call / Remote Method Invocation)
      protocol for use with Twisted, derived/inspired by Twisted's built-in
      Perspective Broker package.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-nevow
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-nevow")
    (version "0.14.2")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/twisted/nevow/archive/nevow-"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0in7gdvi7sbxd5ml2qc4lv3lifs2zdwnhgcmpli1q2ba5n5gajkm"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)
              ("python2-twisted" ,python2-twisted)
              ))
    (arguments `(#:python ,python-2))
    (home-page "https://github.com/twisted/nevow")
    (synopsis "Web application construction kit")
    (description "Divmod Nevow is a web application construction kit written in Python. It
      is designed to allow the programmer to express as much of the view logic
      as desired in Python, and includes a pure Python XML expression syntax
      named stan to facilitate this. However it also provides rich support for
      designer-edited templates, using a very small XML attribute language to
      provide bi-directional template manipulation capability.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-pycryptopp
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-pycryptopp")
    (version "0.7.1")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/tahoe-lafs/pycryptopp/archive/pycryptopp-"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0ighsdxrqcms0bg63acyqpfmia9c4d2qzx5p8sp994l3wcqdc7ba"))))
    (build-system python-build-system)
    (inputs `(("cryptopp" ,cryptopp)
              ("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2))
    (home-page "https://tahoe-lafs.org/trac/pycryptopp")
    (synopsis "Python bindings to the Crypto++ library")
    (description "Pycryptopp is a collection of Python interfaces to a few good crypto
      algorithms.
      
      This package was not tested for reproducibility.")
    (license gpl2+)))

(define-public python2-pyutil
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-pyutil")
    (version "2.0.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://pypi.python.org/packages/source/p/pyutil/pyutil"
                            version ".tar.gz"))
        (sha256
          (base32
            "1fsg9yz5mi2sb0h6c1vvcqchx56i89nbvdb5gfgv1ia3b2w5ra8c"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2))
    (home-page "https://tahoe-lafs.org/trac/pyutil")
    (synopsis "A collection of utilities for Python programmers")
    (description "A collection of utilities for Python programmers.
      
      This package was not tested for reproducibility.")
    (license gpl2+)))

(define-public python2-service-identity
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-service-identity")
    (version "16.0.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/pyca/service_identity/archive/"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "10jkwsc4a4iwrsy0kcdj5rjpavwkd51kf4vb2sr2xj3345llp1qp"))))
    (build-system python-build-system)
    (inputs `(("python2-attrs",python2-attrs)
              ("python2-pyasn1" ,python2-pyasn1)
              ("python2-pyasn1-modules" ,python2-pyasn1-modules)
              ("python2-pyopenssl" ,python2-pyopenssl)
              ("python2-setuptools" ,python2-setuptools)
              ))
    (arguments `(
                 #:tests? #f ; FIXME: Tests require pytest.
                 ))
    (arguments `(#:python ,python-2))
    (home-page "https://github.com/pyca/service_identity")
    (synopsis "Service identity verification for pyOpenSSL")
    (description "Use this package if you use pyOpenSSL and don’t want to be MITMed or
      if you want to verify that a PyCA cryptography certificate is valid for
      a certain hostname.
      
      service_identity aspires to give you all the tools you need for verifying
      whether a certificate is valid for the intended purposes.
      
      In the simplest case, this means host name verification. However,
      service_identity implements RFC 6125 fully and plans to add other relevant
      RFCs too.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-twisted-tls
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package (inherit python2-twisted)
    (name "python2-twisted-tls")
    (inputs `(("python2-pyopenssl" ,python2-pyopenssl)
              ("python2-service-identity" ,python2-service-identity)
              ("python2-idna" ,python2-idna)
              ,@(package-inputs python2-twisted)))
    (description (string-append (package-description python2-twisted)
                                 " This package was not tested for reproducibility."))))

(define-public python2-zfec
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-zfec")
    (version "1.4.24")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/tahoe-lafs/zfec/archive/zfec-"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "13d5z6607jzhljna7ylvxqg37d7hsr91p3x4a799064cic11w5fb"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)
              ("python2-pyutil" ,python2-pyutil)
              ))
    (arguments `(#:python ,python-2))
    (home-page "https://tahoe-lafs.org/trac/zfec")
    (synopsis "Efficient, portable erasure coding tool")
    (description "Generate redundant blocks of information such that if some of the blocks
      are lost then the original data can be recovered from the remaining
      blocks. This package includes command-line tools, C API, Python API,
      and Haskell API.
      
      This package was not tested for reproducibility.")
    (license gpl2+)))

(define-public tahoe-lafs
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "tahoe-lafs")
    (version "1.11.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.tahoe-lafs.org/downloads/tahoe-lafs-"
                            version ".tar.gz"))
        (sha256
          (base32
            "09jxb4gwa163yd5jf3qd5691slmkqvmvrxwdsppa0nqvyd4w2lhm"))))
    (build-system python-build-system)
    (inputs `(("python2-characteristic" ,python2-characteristic)
              ("python2-foolscap" ,python2-foolscap)
              ("python2-nevow" ,python2-nevow)
              ("python2-pyasn1" ,python2-pyasn1)
              ("python2-pyasn1-modules" ,python2-pyasn1-modules)
              ("python2-pycrypto" ,python2-pycrypto)
              ("python2-pycryptopp" ,python2-pycryptopp)
              ("python2-pyopenssl" ,python2-pyopenssl)
              ("python2-service-identity" ,python2-service-identity)
              ("python2-setuptools" ,python2-setuptools)
              ("python2-simplejson" ,python2-simplejson)
              ("python2-twisted-tls" ,python2-twisted-tls)
              ("python2-zfec" ,python2-zfec)
              ("python2-zope-interface" ,python2-zope-interface)
              ))
    (arguments `(#:python ,python-2))
    (synopsis "Decentralized storage system with provider-independent security")
    (description "Tahoe-LAFS is a decentralized data store. It distributes your filesystem
      across multiple servers, and even if some of the servers fail or are taken
      over by an attacker, the entire filesystem continues to work correctly
      and to preserve your privacy and security.
      
      This package was not tested for reproducibility.")
    (home-page "https://tahoe-lafs.org/")
    (license gpl2+)))

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-21 15:24 Writing recipe for Crypto++, and getting build errors Adonay Felipe Nogueira
@ 2016-09-22  1:18 ` Ben Woodcroft
  2016-09-22  1:22   ` Ben Woodcroft
  0 siblings, 1 reply; 15+ messages in thread
From: Ben Woodcroft @ 2016-09-22  1:18 UTC (permalink / raw)
  To: Adonay Felipe Nogueira, guix-devel

Welcome Adoney,


On 09/22/2016 01:24 AM, Adonay Felipe Nogueira wrote:
> [..]
> Doing:
>
> $ guix build --fallback "cryptopp"
>
> ... outputs:
>
> # Begin of output
> starting phase `build'
> make: *** No rule to make target 'dynamic'.  Stop.
> phase `build' failed after 0.2 seconds
> builder for
> `/gnu/store/k863vf0ab6hkdhbm7zgmbfs1c3wdqpqs-cryptopp-5.6.4.drv' failed
> with exit code 1
> @
> build-failed /gnu/store/k863vf0ab6hkdhbm7zgmbfs1c3wdqpqs-cryptopp-5.6.4.drv - 1 builder for `/gnu/store/k863vf0ab6hkdhbm7zgmbfs1c3wdqpqs-cryptopp-5.6.4.drv' failed with exit code 1
> guix build: error: build failed: build of
> `/gnu/store/k863vf0ab6hkdhbm7zgmbfs1c3wdqpqs-cryptopp-5.6.4.drv' failed
> # End of output

The problem is that you've been tarbombed, as it were - the zip file 
contains the source code files in its base directory, and then after 
unzipping in the builder a test directory is entered. You can see this 
by inspecting the 'environment-variables' file in the build directory. 
Our usual fix for this is to use 'url-fetch/tarbomb' rather than 
'url-fetch', but it seems that 'url-fetch/tarbomb' does not correctly 
handle zip files.

We should fix 'url-fetch/tarbomb', but in the meantime I suggest 
replacing the unpack phase like so:

                    (replace 'unpack
                      (lambda* (#:key source #:allow-other-keys)
                        (and (zero? (system* "unzip" source "-d" "source"))
                             (begin (chdir "source") #t))))


> ## Additional subject: Absence of `ldconfig`
>
> Seeing the GNUmakefile, it seems to expect some commands to be available
> in the environment, so I tried finding those and seeing if the
> environment sees them from the profile.
>
> [..]
>
> This indicates that `ldconfig` is absent. Someone in #guix told me that
> it was supposed to be provided by

It seems that this line hard-codes the path to ldconfig, so it will need 
to be modified.

LDCONF ?= /sbin/ldconfig -n


> Additionally, `which` was included in the output (comes from the
> "debianutils" package on .deb-based distributions) and is also absent,
> and the GNUmakefile seems to expect `which` at some point (although I'm
> not sure if the build process reached that), so the absence of `which`
> might be good to discuss on other bug report.

'which' is provided by the 'which' package.

Good luck,
ben

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-22  1:18 ` Ben Woodcroft
@ 2016-09-22  1:22   ` Ben Woodcroft
  2016-09-22 14:49     ` Adonay Felipe Nogueira
  0 siblings, 1 reply; 15+ messages in thread
From: Ben Woodcroft @ 2016-09-22  1:22 UTC (permalink / raw)
  To: Adonay Felipe Nogueira, guix-devel



On 09/22/2016 11:18 AM, Ben Woodcroft wrote:
> Welcome Adoney,

Also, I forgot to say, make sure to remove the "-mtune=native" flag from 
the gcc calls, and there is no need to set 'gcc' as an input if you are 
using the gnu-build-system.

ben

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-22  1:22   ` Ben Woodcroft
@ 2016-09-22 14:49     ` Adonay Felipe Nogueira
  2016-09-22 22:43       ` Ben Woodcroft
  2016-09-26  9:30       ` Ludovic Courtès
  0 siblings, 2 replies; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2016-09-22 14:49 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 283 bytes --]

I tried your suggestions, and the unpack phase doesn't seem to be
working as expected. Inspecting **all** the directories created with
--keep-failed shows that the "source" directory wasn't made.

In attachment are the new recipes that I'm using and also the `guix
build` log.

[-- Attachment #1.2: tahoe-lafs.scm --]
[-- Type: text/x-scheme, Size: 15592 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.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 (tahoe-lafs)
  #:use-module ((guix licenses)
      #:select (boost1.0 expat gpl2+))
  #:use-module (gnu packages base)
  #:use-module (gnu packages python)
  #:use-module (gnu packages zip)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system python)
  #:use-module (guix download)
  #:use-module (guix packages))

(define-public cryptopp
  ;; TODO: Test reproducibility.
  (package
    (name "cryptopp")
    (version "5.6.4")
    (source
      (origin
        (method url-fetch)
        (uri "http://www.cryptopp.com/cryptopp564.zip")
        (file-name (string-append name "-" version ".zip"))
        (sha256
          (base32
            "1msar24a38rxzq0xgmjf09hzaw2lv6s48vnbbhfrf5awn1vh6hxy"))
        (modules '((guix build utils)))
        (snippet '(substitute* "GNUmakefile"
                   (("CXXFLAGS \\+= -march=native") "")))))
    (build-system gnu-build-system)
    (inputs `(("unzip" ,unzip)
              ("which" ,which)))
    (arguments '(#:make-flags `(,(string-append "PREFIX="
                                                (assoc-ref %outputs "out"))
                                "LDCONF=echo")
                 #:phases (modify-phases %standard-phases
                   (delete 'configure) ; FIXME: Configuration is done inside "config.h" file???
                   (replace 'build
                     (lambda* (#:key (make-flags '()) #:allow-other-keys)
                       (zero? (apply system* "make" "dynamic" make-flags))))
                   (replace 'unpack
                     (lambda* (#:key source #:allow-other-keys)
                       (and (mkdir "source")
                            (zero? (system* "unzip" source "-d" "source"))
                            (chdir "source")))))))
    (home-page "http://www.cryptopp.com/")
    (synopsis "Crypto++ Library is a free C++ class library of cryptographic schemes")
    (description "Crypto++ Library is a free C++ class library of cryptographic schemes.
      
      This package was not tested for reproducibility.")
    (license boost1.0)))

(define-public python2-attrs
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-attrs")
    (version "16.2.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/hynek/attrs/archive/"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1fqzm4vw3qk80i3dign4jsdyxfrzyfgp879rndq1z8py9rlml7cw"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2
                 #:tests? #f ; FIXME: Tests require pytest.
                 ))
    (home-page "https://github.com/hynek/attrs")
    (synopsis "Python attributes without boilerplate")
    (description "Python package to ease writing classes by not needing to implement
      object protocols, tuples or namedtuples, and so resulting in higher
      runtime performance.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-characteristic
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-characteristic")
    (version "14.3.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/hynek/characteristic/archive/"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "05p8k68k6bbd02f3xl2n13s4758khgz1impfyg6vfq1c4xci7m26"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2
                 #:tests? #f ; FIXME: Tests require pytest.
                 ))
    (home-page "https://github.com/hynek/characteristic")
    (synopsis "Python attributes without boilerplate")
    (description "Python package with class decorators that ease the chores of implementing
      the most common attribute-related object protocols.
      
      Predecessor of attrs.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-foolscap
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-foolscap")
    (version "0.12.3")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/warner/foolscap/archive/foolscap-"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0p58sz1rs4g6zh88c41fkbf7ih8glpwn1f6xm4bfd1nvmma49s59"))))
    (build-system python-build-system)
    (inputs `(("python2-pyopenssl" ,python2-pyopenssl)
              ("python2-setuptools" ,python2-setuptools)
              ("python2-twisted-tls" ,python2-twisted-tls)))
    (arguments `(#:python ,python-2))
    (home-page "https://foolscap.lothar.com/")
    (synopsis "Remote object-messaging for Python+Twisted")
    (description "Foolscap is an RPC/RMI (Remote Procedure Call / Remote Method Invocation)
      protocol for use with Twisted, derived/inspired by Twisted's built-in
      Perspective Broker package.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-nevow
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-nevow")
    (version "0.14.2")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/twisted/nevow/archive/nevow-"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0in7gdvi7sbxd5ml2qc4lv3lifs2zdwnhgcmpli1q2ba5n5gajkm"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)
              ("python2-twisted" ,python2-twisted)
              ))
    (arguments `(#:python ,python-2))
    (home-page "https://github.com/twisted/nevow")
    (synopsis "Web application construction kit")
    (description "Divmod Nevow is a web application construction kit written in Python. It
      is designed to allow the programmer to express as much of the view logic
      as desired in Python, and includes a pure Python XML expression syntax
      named stan to facilitate this. However it also provides rich support for
      designer-edited templates, using a very small XML attribute language to
      provide bi-directional template manipulation capability.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-pycryptopp
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-pycryptopp")
    (version "0.7.1")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/tahoe-lafs/pycryptopp/archive/pycryptopp-"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0ighsdxrqcms0bg63acyqpfmia9c4d2qzx5p8sp994l3wcqdc7ba"))))
    (build-system python-build-system)
    (inputs `(("cryptopp" ,cryptopp)
              ("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2))
    (home-page "https://tahoe-lafs.org/trac/pycryptopp")
    (synopsis "Python bindings to the Crypto++ library")
    (description "Pycryptopp is a collection of Python interfaces to a few good crypto
      algorithms.
      
      This package was not tested for reproducibility.")
    (license gpl2+)))

(define-public python2-pyutil
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-pyutil")
    (version "2.0.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://pypi.python.org/packages/source/p/pyutil/pyutil"
                            version ".tar.gz"))
        (sha256
          (base32
            "1fsg9yz5mi2sb0h6c1vvcqchx56i89nbvdb5gfgv1ia3b2w5ra8c"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2))
    (home-page "https://tahoe-lafs.org/trac/pyutil")
    (synopsis "A collection of utilities for Python programmers")
    (description "A collection of utilities for Python programmers.
      
      This package was not tested for reproducibility.")
    (license gpl2+)))

(define-public python2-service-identity
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-service-identity")
    (version "16.0.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/pyca/service_identity/archive/"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "10jkwsc4a4iwrsy0kcdj5rjpavwkd51kf4vb2sr2xj3345llp1qp"))))
    (build-system python-build-system)
    (inputs `(("python2-attrs",python2-attrs)
              ("python2-pyasn1" ,python2-pyasn1)
              ("python2-pyasn1-modules" ,python2-pyasn1-modules)
              ("python2-pyopenssl" ,python2-pyopenssl)
              ("python2-setuptools" ,python2-setuptools)))
    (arguments `(#:python ,python-2
                 #:tests? #f ; FIXME: Tests require pytest.
                 ))
    (home-page "https://github.com/pyca/service_identity")
    (synopsis "Service identity verification for pyOpenSSL")
    (description "Use this package if you use pyOpenSSL and don’t want to be MITMed or
      if you want to verify that a PyCA cryptography certificate is valid for
      a certain hostname.
      
      service_identity aspires to give you all the tools you need for verifying
      whether a certificate is valid for the intended purposes.
      
      In the simplest case, this means host name verification. However,
      service_identity implements RFC 6125 fully and plans to add other relevant
      RFCs too.
      
      This package was not tested for reproducibility.")
    (license expat)))

(define-public python2-twisted-tls
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package (inherit python2-twisted)
    (name "python2-twisted-tls")
    (inputs `(("python2-pyopenssl" ,python2-pyopenssl)
              ("python2-service-identity" ,python2-service-identity)
              ("python2-idna" ,python2-idna)
              ,@(package-inputs python2-twisted)))
    (description (string-append (package-description python2-twisted)
                                 " This package was not tested for reproducibility."))))

(define-public python2-zfec
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "python2-zfec")
    (version "1.4.24")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/tahoe-lafs/zfec/archive/zfec-"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "13d5z6607jzhljna7ylvxqg37d7hsr91p3x4a799064cic11w5fb"))))
    (build-system python-build-system)
    (inputs `(("python2-setuptools" ,python2-setuptools)
              ("python2-pyutil" ,python2-pyutil)))
    (arguments `(#:python ,python-2))
    (home-page "https://tahoe-lafs.org/trac/zfec")
    (synopsis "Efficient, portable erasure coding tool")
    (description "Generate redundant blocks of information such that if some of the blocks
      are lost then the original data can be recovered from the remaining
      blocks. This package includes command-line tools, C API, Python API,
      and Haskell API.
      
      This package was not tested for reproducibility.")
    (license gpl2+)))

(define-public tahoe-lafs
  ;; TODO: Test with Python 3.
  ;; TODO: Test reproducibility.
  (package
    (name "tahoe-lafs")
    (version "1.11.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.tahoe-lafs.org/downloads/tahoe-lafs-"
                            version ".tar.gz"))
        (sha256
          (base32
            "09jxb4gwa163yd5jf3qd5691slmkqvmvrxwdsppa0nqvyd4w2lhm"))))
    (build-system python-build-system)
    (inputs `(("python2-characteristic" ,python2-characteristic)
              ("python2-foolscap" ,python2-foolscap)
              ("python2-nevow" ,python2-nevow)
              ("python2-pyasn1" ,python2-pyasn1)
              ("python2-pyasn1-modules" ,python2-pyasn1-modules)
              ("python2-pycrypto" ,python2-pycrypto)
              ("python2-pycryptopp" ,python2-pycryptopp)
              ("python2-pyopenssl" ,python2-pyopenssl)
              ("python2-service-identity" ,python2-service-identity)
              ("python2-setuptools" ,python2-setuptools)
              ("python2-simplejson" ,python2-simplejson)
              ("python2-twisted-tls" ,python2-twisted-tls)
              ("python2-zfec" ,python2-zfec)
              ("python2-zope-interface" ,python2-zope-interface)))
    (arguments `(#:python ,python-2))
    (synopsis "Decentralized storage system with provider-independent security")
    (description "Tahoe-LAFS is a decentralized data store. It distributes your filesystem
      across multiple servers, and even if some of the servers fail or are taken
      over by an attacker, the entire filesystem continues to work correctly
      and to preserve your privacy and security.
      
      This package was not tested for reproducibility.")
    (home-page "https://tahoe-lafs.org/")
    (license gpl2+)))

[-- Attachment #1.3: guix build.log --]
[-- Type: text/x-log, Size: 18597 bytes --]

/gnu/store/hzm7zba4lzfjmkp58z5rj84d2ahp8n41-bash-4.3.42/bin/bash: warning: setlocale: LC_ALL: cannot change locale (pt_BR.UTF-8)
warning: failed to install locale: Invalid argument
@ build-started /gnu/store/1bgw7qyfxiznfq9jv1nbimpksdadz7dq-cryptopp-5.6.4.tar.xz.drv - i686-linux /var/log/guix/drvs/1b//gw7qyfxiznfq9jv1nbimpksdadz7dq-cryptopp-5.6.4.tar.xz.drv.bz2
Archive:  /gnu/store/52v106n4y88myk2c8nykymfidq6080ws-cryptopp-5.6.4.zip
  inflating: 3way.cpp                
  inflating: 3way.h                  
  inflating: adhoc.cpp.proto         
  inflating: adler32.cpp             
  inflating: adler32.h               
  inflating: aes.h                   
  inflating: algebra.cpp             
  inflating: algebra.h               
  inflating: algparam.cpp            
  inflating: algparam.h              
  inflating: arc4.cpp                
  inflating: arc4.h                  
  inflating: argnames.h              
  inflating: asn.cpp                 
  inflating: asn.h                   
  inflating: authenc.cpp             
  inflating: authenc.h               
  inflating: base32.cpp              
  inflating: base32.h                
  inflating: base64.cpp              
  inflating: base64.h                
  inflating: basecode.cpp            
  inflating: basecode.h              
  inflating: bench.h                 
  inflating: bds10.zip               
  inflating: bench1.cpp              
  inflating: bench2.cpp              
  inflating: bfinit.cpp              
  inflating: blake2.cpp              
  inflating: blake2.h                
  inflating: blowfish.cpp            
  inflating: blowfish.h              
  inflating: blumshub.cpp            
  inflating: blumshub.h              
  inflating: camellia.cpp            
  inflating: camellia.h              
  inflating: cast.cpp                
  inflating: cast.h                  
  inflating: casts.cpp               
  inflating: cbcmac.cpp              
  inflating: cbcmac.h                
  inflating: ccm.cpp                 
  inflating: ccm.h                   
  inflating: chacha.cpp              
  inflating: chacha.h                
  inflating: channels.cpp            
  inflating: channels.h              
  inflating: cmac.cpp                
  inflating: cmac.h                  
  inflating: config.h                
  inflating: config.recommend        
  inflating: cpu.cpp                 
  inflating: cpu.h                   
  inflating: crc.cpp                 
  inflating: crc.h                   
  inflating: cryptdll.vcxproj        
  inflating: cryptdll.vcxproj.filters  
  inflating: cryptest.sh             
  inflating: cryptest.sln            
  inflating: cryptest.vcxproj        
  inflating: cryptest.vcxproj.user   
  inflating: cryptest.vcxproj.filters  
  inflating: cryptest.nmake          
  inflating: cryptlib.cpp            
  inflating: cryptlib.h              
  inflating: cryptlib.vcxproj        
  inflating: cryptlib.vcxproj.filters  
  inflating: cryptopp.rc             
  inflating: datatest.cpp            
  inflating: default.cpp             
  inflating: default.h               
  inflating: des.cpp                 
  inflating: des.h                   
  inflating: dessp.cpp               
  inflating: dh.cpp                  
  inflating: dh.h                    
  inflating: dh2.cpp                 
  inflating: dh2.h                   
  inflating: dll.cpp                 
  inflating: dll.h                   
  inflating: dlltest.cpp             
  inflating: dlltest.vcxproj         
  inflating: dmac.h                  
  inflating: dsa.cpp                 
  inflating: dsa.h                   
  inflating: eax.cpp                 
  inflating: eax.h                   
  inflating: ec2n.cpp                
  inflating: ec2n.h                  
  inflating: eccrypto.cpp            
  inflating: eccrypto.h              
  inflating: ecp.cpp                 
  inflating: ecp.h                   
  inflating: elgamal.cpp             
  inflating: elgamal.h               
  inflating: emsa2.cpp               
  inflating: emsa2.h                 
  inflating: eprecomp.cpp            
  inflating: eprecomp.h              
  inflating: esign.cpp               
  inflating: esign.h                 
  inflating: factory.h               
  inflating: fhmqv.h                 
  inflating: files.cpp               
  inflating: files.h                 
  inflating: filters.cpp             
  inflating: filters.h               
  inflating: fips140.cpp             
  inflating: fips140.h               
  inflating: fipsalgt.cpp            
  inflating: fipstest.cpp            
  inflating: fltrimpl.h              
  inflating: gcm.cpp                 
  inflating: gcm.h                   
  inflating: gf256.cpp               
  inflating: gf256.h                 
  inflating: gf2_32.cpp              
  inflating: gf2_32.h                
  inflating: gf2n.cpp                
  inflating: gf2n.h                  
  inflating: gfpcrypt.cpp            
  inflating: gfpcrypt.h              
  inflating: gost.cpp                
  inflating: gost.h                  
  inflating: gzip.cpp                
  inflating: gzip.h                  
  inflating: hex.cpp                 
  inflating: hex.h                   
  inflating: hkdf.h                  
  inflating: hmac.cpp                
  inflating: hmac.h                  
  inflating: hmqv.h                  
  inflating: hrtimer.cpp             
  inflating: hrtimer.h               
  inflating: ida.cpp                 
  inflating: ida.h                   
  inflating: idea.cpp                
  inflating: idea.h                  
  inflating: integer.cpp             
  inflating: integer.h               
  inflating: iterhash.cpp            
  inflating: iterhash.h              
  inflating: keccak.cpp              
  inflating: keccak.h                
  inflating: lubyrack.h              
  inflating: luc.cpp                 
  inflating: luc.h                   
  inflating: mars.cpp                
  inflating: mars.h                  
  inflating: marss.cpp               
  inflating: md2.cpp                 
  inflating: md2.h                   
  inflating: md4.cpp                 
  inflating: md4.h                   
  inflating: md5.cpp                 
  inflating: md5.h                   
  inflating: mdc.h                   
  inflating: mersenne.h              
  inflating: misc.cpp                
  inflating: misc.h                  
  inflating: modarith.h              
  inflating: modes.cpp               
  inflating: modes.h                 
  inflating: modexppc.h              
  inflating: mqueue.cpp              
  inflating: mqueue.h                
  inflating: mqv.cpp                 
  inflating: mqv.h                   
  inflating: nbtheory.cpp            
  inflating: nbtheory.h              
  inflating: network.cpp             
  inflating: network.h               
  inflating: nr.h                    
  inflating: oaep.cpp                
  inflating: oaep.h                  
  inflating: oids.h                  
  inflating: osrng.cpp               
  inflating: osrng.h                 
  inflating: panama.cpp              
  inflating: panama.h                
 extracting: pch.cpp                 
  inflating: pch.h                   
  inflating: pkcspad.cpp             
  inflating: pkcspad.h               
  inflating: polynomi.cpp            
  inflating: polynomi.h              
  inflating: pssr.cpp                
  inflating: pssr.h                  
  inflating: pubkey.cpp              
  inflating: pubkey.h                
  inflating: pwdbased.h              
  inflating: queue.cpp               
  inflating: queue.h                 
  inflating: rabin.cpp               
  inflating: rabin.h                 
  inflating: randpool.cpp            
  inflating: randpool.h              
  inflating: rc2.cpp                 
  inflating: rc2.h                   
  inflating: rc5.cpp                 
  inflating: rc5.h                   
  inflating: rc6.cpp                 
  inflating: rc6.h                   
  inflating: rdrand-masm.cmd         
  inflating: rdrand-nasm.sh          
  inflating: rdrand.S                
  inflating: rdrand.asm              
  inflating: rdrand.cpp              
  inflating: rdrand.h                
  inflating: rdtables.cpp            
  inflating: regtest.cpp             
  inflating: resource.h              
  inflating: rijndael.cpp            
  inflating: rijndael.h              
  inflating: ripemd.cpp              
  inflating: ripemd.h                
  inflating: rng.cpp                 
  inflating: rng.h                   
  inflating: rsa.cpp                 
  inflating: rsa.h                   
  inflating: rw.cpp                  
  inflating: rw.h                    
  inflating: safer.cpp               
  inflating: safer.h                 
  inflating: salsa.cpp               
  inflating: salsa.h                 
  inflating: seal.cpp                
  inflating: seal.h                  
  inflating: secblock.h              
  inflating: seckey.h                
  inflating: seed.cpp                
  inflating: seed.h                  
  inflating: serpent.cpp             
  inflating: serpent.h               
  inflating: serpentp.h              
  inflating: sha.cpp                 
  inflating: sha.h                   
  inflating: sha3.cpp                
  inflating: sha3.h                  
  inflating: shacal2.cpp             
  inflating: shacal2.h               
  inflating: shark.cpp               
  inflating: shark.h                 
  inflating: sharkbox.cpp            
  inflating: simple.cpp              
  inflating: simple.h                
  inflating: skipjack.cpp            
  inflating: skipjack.h              
  inflating: smartptr.h              
  inflating: socketft.cpp            
  inflating: socketft.h              
  inflating: sosemanuk.cpp           
  inflating: sosemanuk.h             
  inflating: square.cpp              
  inflating: square.h                
  inflating: squaretb.cpp            
  inflating: stdcpp.h                
  inflating: strciphr.cpp            
  inflating: strciphr.h              
  inflating: tea.cpp                 
  inflating: tea.h                   
  inflating: test.cpp                
  inflating: tftables.cpp            
  inflating: tiger.cpp               
  inflating: tiger.h                 
  inflating: tigertab.cpp            
  inflating: trdlocal.cpp            
  inflating: trdlocal.h              
  inflating: trunhash.h              
  inflating: ttmac.cpp               
  inflating: ttmac.h                 
  inflating: twofish.cpp             
  inflating: twofish.h               
  inflating: validat1.cpp            
  inflating: validat2.cpp            
  inflating: validat3.cpp            
  inflating: validate.h              
  inflating: vmac.cpp                
  inflating: vmac.h                  
  inflating: vc60.zip                
  inflating: vs2005.zip              
  inflating: wait.cpp                
  inflating: wait.h                  
  inflating: wake.cpp                
  inflating: wake.h                  
  inflating: whrlpool.cpp            
  inflating: whrlpool.h              
  inflating: winpipes.cpp            
  inflating: winpipes.h              
  inflating: words.h                 
  inflating: x64dll.asm              
  inflating: x64masm.asm             
  inflating: xtr.cpp                 
  inflating: xtr.h                   
  inflating: xtrcrypt.cpp            
  inflating: xtrcrypt.h              
  inflating: zdeflate.cpp            
  inflating: zdeflate.h              
  inflating: zinflate.cpp            
  inflating: zinflate.h              
  inflating: zlib.cpp                
  inflating: zlib.h                  
  inflating: Doxyfile                
  inflating: GNUmakefile             
  inflating: GNUmakefile-cross       
  inflating: License.txt             
  inflating: Readme.txt              
  inflating: Install.txt             
  inflating: Filelist.txt            
  inflating: CMakeLists.txt          
 extracting: cryptopp-config.cmake   
  inflating: TestData/3desval.dat    
  inflating: TestData/3wayval.dat    
  inflating: TestData/camellia.dat   
  inflating: TestData/cast128v.dat   
  inflating: TestData/cast256v.dat   
  inflating: TestData/descert.dat    
  inflating: TestData/dh1024.dat     
  inflating: TestData/dh2048.dat     
  inflating: TestData/dlie1024.dat   
  inflating: TestData/dlie2048.dat   
  inflating: TestData/dsa1024.dat    
  inflating: TestData/dsa1024b.dat   
  inflating: TestData/dsa512.dat     
  inflating: TestData/elgc1024.dat   
  inflating: TestData/esig1023.dat   
  inflating: TestData/esig1536.dat   
  inflating: TestData/esig2046.dat   
  inflating: TestData/fhmqv160.dat   
  inflating: TestData/fhmqv256.dat   
  inflating: TestData/fhmqv384.dat   
  inflating: TestData/fhmqv512.dat   
  inflating: TestData/gostval.dat    
  inflating: TestData/hmqv160.dat    
  inflating: TestData/hmqv256.dat    
  inflating: TestData/hmqv384.dat    
  inflating: TestData/hmqv512.dat    
  inflating: TestData/ideaval.dat    
  inflating: TestData/luc1024.dat    
  inflating: TestData/luc2048.dat    
  inflating: TestData/lucc1024.dat   
  inflating: TestData/lucc512.dat    
  inflating: TestData/lucd1024.dat   
  inflating: TestData/lucd512.dat    
  inflating: TestData/lucs1024.dat   
  inflating: TestData/lucs512.dat    
  inflating: TestData/marsval.dat    
  inflating: TestData/mqv1024.dat    
  inflating: TestData/mqv2048.dat    
  inflating: TestData/nr1024.dat     
  inflating: TestData/nr2048.dat     
  inflating: TestData/rabi1024.dat   
  inflating: TestData/rabi2048.dat   
  inflating: TestData/rc2val.dat     
  inflating: TestData/rc5val.dat     
  inflating: TestData/rc6val.dat     
  inflating: TestData/rijndael.dat   
  inflating: TestData/rsa1024.dat    
  inflating: TestData/rsa2048.dat    
  inflating: TestData/rsa400pb.dat   
  inflating: TestData/rsa400pv.dat   
  inflating: TestData/rsa512a.dat    
  inflating: TestData/rw1024.dat     
  inflating: TestData/rw2048.dat     
  inflating: TestData/saferval.dat   
  inflating: TestData/serpentv.dat   
  inflating: TestData/shacal2v.dat   
  inflating: TestData/sharkval.dat   
  inflating: TestData/skipjack.dat   
  inflating: TestData/squareva.dat   
  inflating: TestData/twofishv.dat   
  inflating: TestData/usage.dat      
  inflating: TestData/xtrdh171.dat   
  inflating: TestData/xtrdh342.dat   
  inflating: TestVectors/Readme.txt  
  inflating: TestVectors/aes.txt     
  inflating: TestVectors/all.txt     
  inflating: TestVectors/blake2.txt  
  inflating: TestVectors/blake2b.txt  
  inflating: TestVectors/blake2s.txt  
  inflating: TestVectors/camellia.txt  
  inflating: TestVectors/ccm.txt     
  inflating: TestVectors/chacha.txt  
  inflating: TestVectors/cmac.txt    
  inflating: TestVectors/dlies.txt   
  inflating: TestVectors/dsa.txt     
  inflating: TestVectors/dsa_1363.txt  
  inflating: TestVectors/eax.txt     
  inflating: TestVectors/esign.txt   
  inflating: TestVectors/gcm.txt     
  inflating: TestVectors/hkdf.txt    
  inflating: TestVectors/hmac.txt    
  inflating: TestVectors/keccak.txt  
  inflating: TestVectors/mars.txt    
  inflating: TestVectors/nr.txt      
  inflating: TestVectors/panama.txt  
  inflating: TestVectors/rsa_oaep.txt  
  inflating: TestVectors/rsa_pkcs1_1_5.txt  
  inflating: TestVectors/rsa_pss.txt  
  inflating: TestVectors/dsa_rfc6979.txt  
  inflating: TestVectors/rw.txt      
  inflating: TestVectors/salsa.txt   
  inflating: TestVectors/seal.txt    
  inflating: TestVectors/seed.txt    
  inflating: TestVectors/sha.txt     
  inflating: TestVectors/sha3_fips_202.txt  
  inflating: TestVectors/sha3_224_fips_202.txt  
  inflating: TestVectors/sha3_256_fips_202.txt  
  inflating: TestVectors/sha3_384_fips_202.txt  
  inflating: TestVectors/sha3_512_fips_202.txt  
  inflating: TestVectors/shacal2.txt  
  inflating: TestVectors/sosemanuk.txt  
  inflating: TestVectors/tea.txt     
  inflating: TestVectors/ttmac.txt   
  inflating: TestVectors/vmac.txt    
  inflating: TestVectors/wake.txt    
  inflating: TestVectors/whrlpool.txt  
source is under '3way.cpp'
Backtrace:
In ice-9/boot-9.scm:
 157: 10 [catch #t #<catch-closure 8235900> ...]
In unknown file:
   ?: 9 [apply-smob/1 #<catch-closure 8235900>]
In ice-9/boot-9.scm:
  63: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 7 [eval # #]
In ice-9/boot-9.scm:
2401: 6 [save-module-excursion #<procedure 8246c00 at ice-9/boot-9.scm:4045:3 ()>]
4050: 5 [#<procedure 8246c00 at ice-9/boot-9.scm:4045:3 ()>]
1724: 4 [%start-stack load-stack ...]
1729: 3 [#<procedure 824c498 ()>]
In unknown file:
   ?: 2 [primitive-load "/gnu/store/l6606ma58yrjqy0m8fzqwpx96sfwrqqm-cryptopp-5.6.4.tar.xz-builder"]
In ice-9/eval.scm:
 432: 1 [eval # #]
In unknown file:
   ?: 0 [chdir "3way.cpp"]

ERROR: In procedure chdir:
ERROR: In procedure chdir: Not a directory
builder for `/gnu/store/1bgw7qyfxiznfq9jv1nbimpksdadz7dq-cryptopp-5.6.4.tar.xz.drv' failed with exit code 1
@ build-failed /gnu/store/1bgw7qyfxiznfq9jv1nbimpksdadz7dq-cryptopp-5.6.4.tar.xz.drv - 1 builder for `/gnu/store/1bgw7qyfxiznfq9jv1nbimpksdadz7dq-cryptopp-5.6.4.tar.xz.drv' failed with exit code 1
cannot build derivation `/gnu/store/mkbdgv4lpw14xcp8mcg0zj86yxkqb1sc-cryptopp-5.6.4.drv': 1 dependencies couldn't be built
@ build-started /gnu/store/5ylqrwjz79ahg8hah975lwq4ms9j08w2-python2-attrs-16.2.0.tar.gz.drv - i686-linux /var/log/guix/drvs/5y//lqrwjz79ahg8hah975lwq4ms9j08w2-python2-attrs-16.2.0.tar.gz.drv.bz2
cannot build derivation `/gnu/store/mpfx7may0jfbinhmfa5s03ar2scpwip8-python2-pycryptopp-0.7.1.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/g1r9i4s72330cylswcjh5dx6gfq7kn0g-tahoe-lafs-1.11.0.drv': 1 dependencies couldn't be built
guix build: error: build failed: build of `/gnu/store/g1r9i4s72330cylswcjh5dx6gfq7kn0g-tahoe-lafs-1.11.0.drv' failed

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-22 14:49     ` Adonay Felipe Nogueira
@ 2016-09-22 22:43       ` Ben Woodcroft
  2016-09-30 11:39         ` Adonay Felipe Nogueira
  2016-09-26  9:30       ` Ludovic Courtès
  1 sibling, 1 reply; 15+ messages in thread
From: Ben Woodcroft @ 2016-09-22 22:43 UTC (permalink / raw)
  To: Adonay Felipe Nogueira, guix-devel

Hi,

On 09/23/2016 12:49 AM, Adonay Felipe Nogueira wrote:
> I tried your suggestions, and the unpack phase doesn't seem to be
> working as expected. Inspecting **all** the directories created with
> --keep-failed shows that the "source" directory wasn't made.
I believe the problem now is the snippet, the process hasn't made it to 
the unpack phase. Try moving the 'substitute*' to a new phase after 
'unpack'. Commenting out the snippet allowed me to unpack it properly.

Again, this shows some shortcomings in Guix with regards to zip source 
files, it seems.
ben

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-22 14:49     ` Adonay Felipe Nogueira
  2016-09-22 22:43       ` Ben Woodcroft
@ 2016-09-26  9:30       ` Ludovic Courtès
  2016-09-30 11:35         ` Adonay Felipe Nogueira
  2016-09-30 11:39         ` Adonay Felipe Nogueira
  1 sibling, 2 replies; 15+ messages in thread
From: Ludovic Courtès @ 2016-09-26  9:30 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: guix-devel

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

Hello!

Adonay Felipe Nogueira <adfeno@openmailbox.org> skribis:

> Archive:  /gnu/store/52v106n4y88myk2c8nykymfidq6080ws-cryptopp-5.6.4.zip
>   inflating: 3way.cpp                
>   inflating: 3way.h                  

[...]

>    ?: 0 [chdir "3way.cpp"]
>
> ERROR: In procedure chdir:
> ERROR: In procedure chdir: Not a directory

The problem here is that this .zip file is a “tar bomb”, meaning that it
unpacks everything in the current directory, which the apply-snippet
logic isn’t prepared to deal with.

The way we’ve addressed it in the past is by using the
‘url-fetch/tarbomb’ procedure defined in (guix download).  That method
is currently limited to tarballs, so we’d need a variant that deals with
zip files (see patch below).

If ‘url-fetch/zipbomb’ from the patch below works for you, I’ll apply
it.

Thanks!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1778 bytes --]

diff --git a/guix/download.scm b/guix/download.scm
index 649e96b..7f82ff2 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -35,6 +35,7 @@
   #:export (%mirrors
             url-fetch
             url-fetch/tarbomb
+            url-fetch/zipbomb
             download-to-store))
 
 ;;; Commentary:
@@ -427,6 +428,28 @@ own.  This helper makes it easier to deal with \"tar bombs\"."
                                           "xf" #$drv)))
                       #:local-build? #t)))
 
+(define* (url-fetch/zipbomb url hash-algo hash
+                            #:optional name
+                            #:key (system (%current-system))
+                            (guile (default-guile)))
+  "Similar to 'url-fetch' but unpack the zip file at URL in a directory of its
+own.  This helper makes it easier to deal with \"zip bombs\"."
+  (define unzip
+    (module-ref (resolve-interface '(gnu packages zip)) 'unzip))
+
+  (mlet %store-monad ((drv (url-fetch url hash-algo hash
+                                      (string-append "tarbomb-" name)
+                                      #:system system
+                                      #:guile guile)))
+    ;; Take the zip bomb, and simply unpack it as a directory.
+    (gexp->derivation name
+                      #~(begin
+                          (mkdir #$output)
+                          (chdir #$output)
+                          (zero? (system* (string-append #$unzip "/bin/unzip")
+                                          #$drv)))
+                      #:local-build? #t)))
+
 (define* (download-to-store store url #:optional (name (basename url))
                             #:key (log (current-error-port)) recursive?)
   "Download from URL to STORE, either under NAME or URL's basename if

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-26  9:30       ` Ludovic Courtès
@ 2016-09-30 11:35         ` Adonay Felipe Nogueira
  2016-09-30 20:10           ` Ludovic Courtès
  2016-09-30 11:39         ` Adonay Felipe Nogueira
  1 sibling, 1 reply; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2016-09-30 11:35 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

Sorry for taking so long to answer.

How do I use the patch in the source file?

It seems to refer to some Guix internal, not a package definition.

Meanwhile, I'll try to take the patch's content and apply it directly to
the recipe (although my knowledge is very limited).

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-22 22:43       ` Ben Woodcroft
@ 2016-09-30 11:39         ` Adonay Felipe Nogueira
  0 siblings, 0 replies; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2016-09-30 11:39 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel

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

I removed the snippet and tried replacing the unpack phase, and that did
worked around the problem.

Also, I found their Git repository, and that offers the source files in
a directory inside a compressed file.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-26  9:30       ` Ludovic Courtès
  2016-09-30 11:35         ` Adonay Felipe Nogueira
@ 2016-09-30 11:39         ` Adonay Felipe Nogueira
  1 sibling, 0 replies; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2016-09-30 11:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

Also, I forgot to tell: I found their Git repository, and that offers
the source files in a directory inside a compressed file.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-30 11:35         ` Adonay Felipe Nogueira
@ 2016-09-30 20:10           ` Ludovic Courtès
  2016-10-15 20:47             ` Adonay Felipe Nogueira
  0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2016-09-30 20:10 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: guix-devel

Hi,

Adonay Felipe Nogueira <adfeno@openmailbox.org> skribis:

> Sorry for taking so long to answer.
>
> How do I use the patch in the source file?
>
> It seems to refer to some Guix internal, not a package definition.

Right, what I posted is a patch for Guix.  You can store it in a file
and apply it to your local tree with:

  patch -p1 < that-thing.patch

Then, in your package recipe, replace ‘url-fetch’ by ‘url-fetch/zipbomb’.

HTH!

Ludo’.

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-09-30 20:10           ` Ludovic Courtès
@ 2016-10-15 20:47             ` Adonay Felipe Nogueira
  2016-10-15 20:53               ` Efraim Flashner
  0 siblings, 1 reply; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2016-10-15 20:47 UTC (permalink / raw)
  To: guix-devel

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

Note: I'm using Guix with other distribution, not GuixSD.

I was trying to find out what is the "working tree" in my case, and I
decided to investigate "/gnu/store", and I found three possible places
that are directories:

/gnu/store/...-guix-0.11.0-1.4420
/gnu/store/...-guix-latest
/gnu/store/...-guix-source

Which one is my "working tree"?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-10-15 20:47             ` Adonay Felipe Nogueira
@ 2016-10-15 20:53               ` Efraim Flashner
  2016-10-15 21:47                 ` Adonay Felipe Nogueira
  0 siblings, 1 reply; 15+ messages in thread
From: Efraim Flashner @ 2016-10-15 20:53 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: guix-devel

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

On Sat, Oct 15, 2016 at 05:47:01PM -0300, Adonay Felipe Nogueira wrote:
> Note: I'm using Guix with other distribution, not GuixSD.
> 
> I was trying to find out what is the "working tree" in my case, and I
> decided to investigate "/gnu/store", and I found three possible places
> that are directories:
> 
> /gnu/store/...-guix-0.11.0-1.4420
> /gnu/store/...-guix-latest
> /gnu/store/...-guix-source
> 
> Which one is my "working tree"?

ls -l .config/guix/latest
on my machine it points to /gnu/store/...-guix-latest


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-10-15 20:53               ` Efraim Flashner
@ 2016-10-15 21:47                 ` Adonay Felipe Nogueira
  2016-10-17 13:11                   ` Ludovic Courtès
  0 siblings, 1 reply; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2016-10-15 21:47 UTC (permalink / raw)
  To: guix-devel

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

Thank you very much! :)

I have good news: The patch suggested by Ludovic does work. :)

I did a test with a simple recipe (because I no longer need to deal with
zipbomb itself, since I found the tar.gz generated by their repository,
which luckly isn't a tarbomb).

Now, reverting the patch with `patch -p1 -R`. :)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-10-15 21:47                 ` Adonay Felipe Nogueira
@ 2016-10-17 13:11                   ` Ludovic Courtès
  2016-10-17 13:22                     ` Adonay Felipe Nogueira
  0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2016-10-17 13:11 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: guix-devel

Adonay Felipe Nogueira <adfeno@openmailbox.org> skribis:

> I have good news: The patch suggested by Ludovic does work. :)
>
> I did a test with a simple recipe (because I no longer need to deal with
> zipbomb itself, since I found the tar.gz generated by their repository,
> which luckly isn't a tarbomb).
>
> Now, reverting the patch with `patch -p1 -R`. :)

So the proposed ‘url-fetch/zipbomb’ is no longer needed, right?

Thanks for trying it out.

Ludo’.

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

* Re: Writing recipe for Crypto++, and getting build errors
  2016-10-17 13:11                   ` Ludovic Courtès
@ 2016-10-17 13:22                     ` Adonay Felipe Nogueira
  0 siblings, 0 replies; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2016-10-17 13:22 UTC (permalink / raw)
  To: guix-devel

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

Indeed, you're right: I no longer need it. But I decided to test it so
that people can make use of the patch you suggested.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

end of thread, other threads:[~2016-10-17 13:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 15:24 Writing recipe for Crypto++, and getting build errors Adonay Felipe Nogueira
2016-09-22  1:18 ` Ben Woodcroft
2016-09-22  1:22   ` Ben Woodcroft
2016-09-22 14:49     ` Adonay Felipe Nogueira
2016-09-22 22:43       ` Ben Woodcroft
2016-09-30 11:39         ` Adonay Felipe Nogueira
2016-09-26  9:30       ` Ludovic Courtès
2016-09-30 11:35         ` Adonay Felipe Nogueira
2016-09-30 20:10           ` Ludovic Courtès
2016-10-15 20:47             ` Adonay Felipe Nogueira
2016-10-15 20:53               ` Efraim Flashner
2016-10-15 21:47                 ` Adonay Felipe Nogueira
2016-10-17 13:11                   ` Ludovic Courtès
2016-10-17 13:22                     ` Adonay Felipe Nogueira
2016-09-30 11:39         ` Adonay Felipe Nogueira

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).