workin on openvpn service

2016-10-19 Thread Julien Lepiller
Hi,

I'm currently writing an openvpn service. Here is the patch (wip). It
works for the client part, I didn't test the server part yet (but it
generates a configuration file).

First, how could I make openvpn-config-file look better?

Also, I need to document all of this patch.

When running as a server, the configuration may specify a ccd directory
that contains files with information about clients (one client per
file, named after the CN of the client's certificate). This file can be
used to assign a specific IP to the client, or allow its subnet to
access the VPN. They are tightly coupled with the configuration file.
For instance, to allow "Alice"'s subnet to access the VPN, you would:

create a ccd/Alice file with content:

> iroute 192.168.1.0/24

and add this configuration in the main server's configuration file:

> route 192.168.1.0/24

and optionally (in conjunction with client-to-client):

> push "route 192.168.1.0/24"

So I would like to create a record to contain information for each
client, something like , that would contain a
name, a subnet and a specific VPN IP address ("ifconfig-push" in the ccd
file). The VPN IP has some restrictions on its last byte (should be one
of 1, 5, 9, 13, 17, ..., 253). How would you verify that?

Is this the good approach? Also, how would you create multiple ccd
files for different clients in the same directory (preferably
in /gnu/store)?From 272939aad601f7a0c736449edcfcc64dffe0a370 Mon Sep 17 00:00:00 2001
From: Julien Lepiller 
Date: Tue, 18 Oct 2016 23:16:31 +0200
Subject: [PATCH] gnu: Add openvpn services

* gnu/services/vpn.scm: new file.
* gnu/local.mk(GNU_SYSTEM_MODULES): add it
---
 gnu/local.mk |   1 +
 gnu/services/vpn.scm | 289 +++
 2 files changed, 290 insertions(+)
 create mode 100644 gnu/services/vpn.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 18ba0c2..5c7ab97 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -406,6 +406,7 @@ GNU_SYSTEM_MODULES =\
   %D%/services/sddm.scm\
   %D%/services/spice.scm\
   %D%/services/ssh.scm\
+  %D%/services/vpn.scm\
   %D%/services/web.scm\
   %D%/services/xorg.scm\
 		\
diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm
new file mode 100644
index 000..8c6b720
--- /dev/null
+++ b/gnu/services/vpn.scm
@@ -0,0 +1,289 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Julien Lepiller 
+;;;
+;;; 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 .
+
+(define-module (gnu services vpn)
+  #:use-module (gnu packages vpn)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu services)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu system pam)
+  #:use-module (gnu system shadow)
+  #:use-module (guix gexp)
+  #:use-module (guix records)
+  #:use-module (srfi srfi-26)
+  #:use-module (ice-9 match)
+  #:export (openvpn-configuration
+openvpn-configuration?
+openvpn-client-service-type
+openvpn-client-service
+openvpn-server-service-type
+openvpn-server-service
+
+openvpn-remote-server))
+
+;;;
+;;; OpenVPN.
+;;;
+
+(define-record-type* 
+  openvpn-remote-server make-openvpn-remote-server
+  openvpn-remote-server?
+  (name  openvpn-remote-server-name
+(default "my-server")) ; string (domain name or ip)
+  (port openvpn-remote-server-port
+(default 1194))) ; int
+
+;; TODO: actually use this structure or something similar
+(define-record-type* 
+  openvpn-client-ccd make-openvpn-client-ccd
+  openvpn-client-ccd?
+  (name openvpn-client-cdd-name
+	(default "")) ; string
+  (subnet openvpn-client-ccd-subnet
+	  (default #f)) ; string
+  (ip openvpn-client-ccd-ip
+  (default #f))) ; string
+
+;; openvpn can be started as server or client. Part of the configuration
+;; is common to the two modes of operation, and some are specific to
+;; the server.
+;; TODO: add a list of clients to the server configuration that are
+;; of a specific record type, so we can push their route (if required)
+;; or add entries in ccd.
+;; TODO: add a ccd configuration for the server
+(define-record-type* 
+  openvpn-configuration make-openvpn-configuration
+  openvpn-configuration?
+  ;; common configuration options
+  (pid-file 

Re: [PATCH 7/7] gnu: Add r-bioccheck.

2016-10-19 Thread Roel Janssen

Ricardo Wurmus writes:

> Roel Janssen  writes:
>>
>> Here's the new patch:
>>
>>>From 1d9248098fc507876d77cddc890ea906aef7b83d Mon Sep 17 00:00:00 2001
>> From: Roel Janssen 
>> Date: Wed, 19 Oct 2016 16:43:04 +0200
>> Subject: [PATCH] gnu: Add r-bioccheck.
>>
>> * gnu/packages/bioinformatics.scm (r-bioccheck): New variable.
>> ---
>>  gnu/packages/bioinformatics.scm | 48 
>> +
>>  1 file changed, 48 insertions(+)
>>
>> diff --git a/gnu/packages/bioinformatics.scm 
>> b/gnu/packages/bioinformatics.scm
>> index 3fe7b5f..d21781f 100644
>> --- a/gnu/packages/bioinformatics.scm
>> +++ b/gnu/packages/bioinformatics.scm
>> @@ -5936,6 +5936,54 @@ Bioconductor PDF and HTML documents.  Package 
>> vignettes illustrate use and
>>  functionality.")
>>  (license license:artistic2.0)))
>>  
>> +(define-public r-bioccheck
>> +  (package
>> +(name "r-bioccheck")
>> +(version "1.10.0")
>> +(source (origin
>> +  (method url-fetch)
>> +  (uri (bioconductor-uri "BiocCheck" version))
>> +  (sha256
>> +   (base32
>> +"1rfy37xg1nc2cmgbclvzsi7sgmdcdjiahsx9crgx3yaw7kxgiack"
>> +(properties
>> + `((upstream-name . "BiocCheck")))
>> +(build-system r-build-system)
>> +(arguments
>> + '(#:phases
>> +   (modify-phases %standard-phases
>> + ;; This package can be used by calling BiocCheck() from
>> + ;; within R, or by running R CMD BiocCheck .  This phase
>> + ;; makes sure the latter works.  For this to work, the BiocCheck
>> + ;; script must be somewhere on the PATH (not the R bin directory).
>> + (add-after 'install 'install-bioccheck-subcommand
>> +   (lambda _
>> + (let ((dest-dir (string-append %output "/bin"))
>> +   (script-dir
>> +(string-append %output 
>> "/site-library/BiocCheck/script/")))
>
> We usually prefer to do this
>
> (lambda* (#:key outputs #:allow-other-keys)
>   (let* ((out (assoc-ref outputs "out"))
>  … out …)))
>
> instead of using the magical “%output”.

Ofcourse!  Sorry, I should've known this.


>> +   (mkdir-p dest-dir)
>> +   (zero? (system* "ln" "--symbolic"
>> +   (string-append script-dir "/checkBadDeps.R")
>> +   (string-append dest-dir "/checkBadDeps.R")))
>> +   (zero? (system* "ln" "--symbolic"
>> +   (string-append script-dir "/BiocCheck")
>> +   (string-append dest-dir "/BiocCheck")
>
> Would it work to use “install-file” here (or to use Guile’s “symlink
> oldpath newpath”) instead of shelling out?

I prefer symlinking.  Sorry for being a shell-out.  I updated the patch
to use Guile's @code{symlink} instead (I wasn't aware of this function!).

Here's the new patch:

>From cce8a9580645011cf8f6b259296a4779633aa2af Mon Sep 17 00:00:00 2001
From: Roel Janssen 
Date: Thu, 20 Oct 2016 00:00:33 +0200
Subject: [PATCH] gnu: Add r-bioccheck.

* gnu/packages/bioinformatics.scm (r-bioccheck): New variable.
---
 gnu/packages/bioinformatics.scm | 46 +
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 3fe7b5f..8e426d0 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -5936,6 +5936,52 @@ Bioconductor PDF and HTML documents.  Package vignettes 
illustrate use and
 functionality.")
 (license license:artistic2.0)))
 
+(define-public r-bioccheck
+  (package
+(name "r-bioccheck")
+(version "1.10.0")
+(source (origin
+  (method url-fetch)
+  (uri (bioconductor-uri "BiocCheck" version))
+  (sha256
+   (base32
+"1rfy37xg1nc2cmgbclvzsi7sgmdcdjiahsx9crgx3yaw7kxgiack"
+(properties
+ `((upstream-name . "BiocCheck")))
+(build-system r-build-system)
+(arguments
+ '(#:phases
+   (modify-phases %standard-phases
+ ;; This package can be used by calling BiocCheck() from
+ ;; within R, or by running R CMD BiocCheck .  This phase
+ ;; makes sure the latter works.  For this to work, the BiocCheck
+ ;; script must be somewhere on the PATH (not the R bin directory).
+ (add-after 'install 'install-bioccheck-subcommand
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((dest-dir (string-append (assoc-ref outputs "out") "/bin"))
+   (script-dir
+(string-append %output "/site-library/BiocCheck/script/")))
+   (mkdir-p dest-dir)
+   (symlink (string-append script-dir "/checkBadDeps.R")
+(string-append dest-dir "/checkBadDeps.R"))
+   (symlink (string-append script-dir 

Re: Display diffs between generations.

2016-10-19 Thread Roel Janssen

Ludovic Courtès writes:

> Roel Janssen  skribis:
>
>> Roel Janssen writes:
>>
>>> Ludovic Courtès writes:
>
> [...]
>
 In the discussion that ensued, it seems there was a consensus to provide
 only the diff format:

   https://lists.gnu.org/archive/html/guix-devel/2016-09/msg00385.html

 So it seems all the lights are green.  :-)  Let me know if there’s
 anything we should do to help!
>>>
>>> Thanks for the reminder.  I seem to have a lot to finish up :-).  I will
>>> work out the arguments and post a new version of the patch for final review.
>>
>> My GNU mail hasn't been working for a couple of days, but now that it
>> does, I wonder if the initial patch I sent is fine as-is, since we agree
>> upon only showing the diff format.
>>
>> Should I implement the --no-diff-format option to change to the
>> old behavior?
>
> I don’t think so.  The old behavior will always be available by
> specifying a single generation anyway:
>
>   guix package --list-generations=42
>
> It may be worth mentioning this in the manual.
>
> My understanding of the discussion referred above is that people were
> fine with that (or indifferent ;-)).

Then the following patch should be it.  I applied your genius
suggestions of using @code{display-entry} instead of
@code{display-entries}.  I learned something new again today. :-)

>From 5630a512f16c6677fd5b0b8085e2ef15cb10499b Mon Sep 17 00:00:00 2001
From: Roel Janssen 
Date: Wed, 19 Oct 2016 23:38:11 +0200
Subject: [PATCH] guix package: Display generation diffs.

* guix/ui.scm (display-profile-content-diff): New variable.
* guix/scripts/package.scm (process-query): Use display-profile-content-diff.
---
 guix/scripts/package.scm |  2 +-
 guix/ui.scm  | 27 +++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index b87aee0..5d93b7b 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -670,7 +670,7 @@ processed, #f otherwise."
(define (list-generation number)
  (unless (zero? number)
(display-generation profile number)
-   (display-profile-content profile number)
+   (display-profile-content-diff profile number)
(newline)))
 
(cond ((not (file-exists? profile))  ; XXX: race condition
diff --git a/guix/ui.scm b/guix/ui.scm
index eb85df3..7c835c2 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -87,6 +87,7 @@
 matching-generations
 display-generation
 display-profile-content
+display-profile-content-diff
 roll-back*
 switch-to-generation*
 delete-generation*
@@ -1070,6 +1071,32 @@ DURATION-RELATION with the current time."
   (format #t (_ "~a\t(current)~%") header)
   (format #t "~a~%" header)
 
+(define (display-profile-content-diff profile number)
+  "Display the changed packages in PROFILE compared to generation NUMBER."
+
+  (define (equal-entry? first second)
+(string= (manifest-entry-item first) (manifest-entry-item second)))
+
+  (define (display-entry entry prefix)
+(match entry
+  (($  name version output location _)
+   (format #t " ~a ~a\t~a\t~a\t~a~%" prefix name version output 
location
+
+  (define (list-entries input)
+(manifest-entries (profile-manifest (generation-file-name profile input
+
+  (define (display-diff profile old new)
+(if (= old 0)
+(display-profile-content profile new)
+(let ((added (lset-difference
+  equal-entry? (list-entries new) (list-entries old)))
+  (removed (lset-difference
+equal-entry? (list-entries old) (list-entries new
+  (for-each (cut display-entry <> "+") added)
+  (for-each (cut display-entry <> "-") removed
+
+  (display-diff profile (previous-generation-number profile number) number))
+
 (define (display-profile-content profile number)
   "Display the packages in PROFILE, generation NUMBER, in a human-readable
 way."
-- 
2.10.0

Kind regards,
Roel Janssen



Re: [PATCH 1/1] services: ntpd: Make large clock adjustments if necessary.

2016-10-19 Thread Leo Famulari
On Wed, Oct 19, 2016 at 10:49:32PM +0200, Ludovic Courtès wrote:
> diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
> index 7495179..ce281c5 100644
> --- a/gnu/services/networking.scm
> +++ b/gnu/services/networking.scm
> @@ -265,11 +265,13 @@ Protocol (DHCP) client, on all the non-loopback network 
> interfaces."
>ntp-configuration?
>(ntp  ntp-configuration-ntp
>  (default ntp))
> -  (servers  ntp-configuration-servers))
> +  (servers  ntp-configuration-servers)
> +  (allow-large-adjustment? ntp-allow-large-adjustment?
> +   (default #f)))
>  
>  (define ntp-shepherd-service
>(match-lambda
> -(($  ntp servers)
> +(($  ntp servers allow-large-adjustment?)
>   (let ()
> ;; TODO: Add authentication support.
> (define config
> @@ -296,7 +298,10 @@ restrict -6 ::1\n"))
>(requirement '(user-processes networking))
>(start #~(make-forkexec-constructor
>  (list (string-append #$ntp "/bin/ntpd") "-n"
> -  "-c" #$ntpd.conf "-u" "ntpd")))
> +  "-c" #$ntpd.conf "-u" "ntpd"
> +  #$@(if allow-large-adjustment?
> + '("-g")
> + '()
>(stop #~(make-kill-destructor
>  
>  (define %ntp-accounts
> @@ -331,10 +336,13 @@ restrict -6 ::1\n"))
>ntp-service-activation)
>  
>  (define* (ntp-service #:key (ntp ntp)
> -  (servers %ntp-servers))
> +  (servers %ntp-servers)
> +  allow-large-adjustment?)
>"Return a service that runs the daemon from @var{ntp}, the
>  @uref{http://www.ntp.org, Network Time Protocol package}.  The daemon will
> -keep the system clock synchronized with that of @var{servers}."
> +keep the system clock synchronized with that of @var{servers}.
> +@var{allow-large-adjustment?} determines whether @command{ntpd} is allowed to
> +make an initial adjustment of more than 1,000 seconds."
>(service ntp-service-type
> (ntp-configuration (ntp ntp) (servers servers
>  

> 
> If that’s fine with you, I’ll commit it with a doc update.

It looks good to me! Once we can run GuixSD on armhf or aarch64, I bet
we will have lots of users with hardware lacking a battery-backed real
time clock, and they will appreciate this option.



Re: Guix "ops"

2016-10-19 Thread Christopher Allan Webber
Ludovic Courtès writes:

>> There's a lot of good ideas in this thread.  Will be good to make
>> progress on them!
>
> Yup!  The need for this tool is becoming stronger, especially now that
> we’re starting to run GuixSD on our build farm machines.
>
> Ludo’.

So yeah, I'm going to start playing around with building some on some of
these ideas soonish.  I could use some advice, though.  Assume I'm able
to build the right scheme representation of the system I want to be run
remotely on another machine (whether it's a gexp, whatever).  What's the
right way to go about this?  Assume for the moment that I have a remote
"target" machine already running GuixSD and I can ssh into it.

 - Should I write out an sexp of the system I want to be built, write it
   to a scheme file I copy over, and then invoke the guile command line
   tools to start it up?

 - Should I write out an sexp of the script I want to run and execute it
   as a normal guile program?

 - Should I build the entire derivation of the system I want to run on
   the remote machine locally first, then copy that over?  (I assume
   this is possible, and eventually desirable, especially if doing
   mass deployments?  But it might not be desirable in every case.)
   Would that use the substitute mechanism?

Thoughts and guidance appreciated!
 - Chris



Re: Patches to implement system roll-back and switch-generation

2016-10-19 Thread Ludovic Courtès
Hi Chris,

Chris Marusich  skribis:

> l...@gnu.org (Ludovic Courtès) writes:
>> We can now avoid monadic procedures by using the declarative counterpart
>> of the monadic API.  That is, we could write:
>>
>>   (define (grub-configuration-file …)  ;normal proc
>> (computed-file "grub.cfg" builder))
>>
>> instead of:
>>
>>   (define (grub-configuration-file …)  ;monadic proc
>> (gexp->derivation "grub.cfg" builder))
>>
>> I would welcome such changes.
>>
>
> That's an interesting idea.  However, in this case, I think we need to
> pass the build options (from the parsed command-line arguments) along
> somehow.  How should we set the build options when using the declarative
> 'computed-file' procedure?  It seems like the most obvious way would be
> to pass the build options in as arguments to the 'computed-file'
> procedure, but is there a better way?

Which build options?  There’s a direct correspondence between, say,
‘gexp->derivation’ and ‘computed-file’ and the arguments are essentially
the same.  Unless I’m overlooking something (again!), the change I
suggest above is a mechanical change.

HTH,
Ludo’.



Re: [PATCH] improve nginx-service

2016-10-19 Thread Ludovic Courtès
Hi Julien,

This looks like a great improvement to me!  Sounds nicer than fiddling
with config files.

I suppose we could make ‘nginx-service-type’ extensible (info "(guix)
Service Types and Services") so that people can write services that
define new vhosts?

Julien Lepiller  skribis:

> From 613d5db739d4010be2037fd2fcfc70baca4625aa Mon Sep 17 00:00:00 2001
> From: Julien Lepiller 
> Date: Mon, 26 Sep 2016 23:55:58 +0200
> Subject: [PATCH] services: improve nginx-service configuration
>
> * gnu/services/web.scm (): New record type.
> * doc/guix.texi (Web Services): Document 'nginx-vhost-configuration'.

Please mention the other changes in web.scm: new procedures, changes in
existing procedures, etc.

> +As an alternative to using a @var{config-file}, @var{vhost-list} can be
> +used to specify the list of vhosts required on the host.  For this to work,

“the list of @dfn{virtual hosts} or @dfn{vhosts}”

> +@deftp {Data Type} nginx-vhost-configuration
> +Data type representing the configuration of an nginx virtual host.

@dfn{virtual host}

> +This type has the following parameters:
> +@table @asis
> +@item @code{http-port} (default: 80)

@code{80}; likewise for all the other default values.

> +Nginx will listen for http connection on this port. Set it at #f if nginx 
> should
> +not listen for http (non secure) connection for this vhost.

s/http/HTTP/ and s/#f/@code{#f}/
Please leave two spaces after an end-of-sentence period.

> +(define (list-names names)
> + (match names
> +  ('() "")
> +  ((head tail ...) (string-append (if (eq? head 'default) "_" head)
> +  " "
> +  (list-names tail)

Maybe call it ‘config-value-strings’?  Please add a docstring.  I think
it’d be more readable like this:

  (define (config-value-strings names)
"Return a string denoting the nginx config representation of NAMES,
   a list of foobars…"
(string-concatenate
 (map (match-lambda
('default "_")
((? string? str) str))
  names)))

Could you send an updated patch?

Unless David, who initially wrote this service has objections, this
patch looks good to me with the changes as suggested above.

Thanks!

Ludo’.



Re: [PATCH] gnu: bash-minimal: Assume getcwd works correctly when cross-compiling

2016-10-19 Thread Carlos Sánchez de La Lama
Hi Ludo,

>>> * gnu/packages/bash.scm (bash-minimal): Assume getcwd works correctly
>>> when cross compiling.
>> No tabs please.  Otherwise LGTM, thanks!
> I spoke too fast.  On master (Bash 4.3), this is unnecessary AFAICS:
> 
> --8<---cut here---start->8---
> $ ./pre-inst-env guix build bash-minimal --target=mips64el-linux-gnu 
> --no-grafts --no-build-hook
> /gnu/store/1v6l54xzmzb19hdg5bizvzfz995lh1cp-bash-minimal-4.3.42-doc
> /gnu/store/gawbc9mj2i37ycym06rbybi1k4kn8zfq-bash-minimal-4.3.42-include
> /gnu/store/vic4zf9gpdzrcvj8kimb9cs3049ld60d-bash-minimal-4.3.42
> $ git describe
> v0.11.0-1743-gfe9bdb5
> --8<---cut here---end--->8---

Building bash was never a problem, it worked also for me without the patch. The 
problem is that, when cross-compiling, bash "configure" scrip cannot test 
whether system getcwd works properly or not, and thus decides to use its own 
version of it, which does not correctly work inside bind mounts (and therefore 
fails in the chroot, but works outside it).

Thus, unpatched bash will fail when used to build another derivation. The 
problem was first reported here:

https://lists.gnu.org/archive/html/guix-devel/2013-10/msg00063.html

Although in that case Mark worked it around by having /tmp in a different 
partition, which incidentally causes bash-provided getcwd to work correctly.

Maybe I can put a more detailed explanation on bash.scm; I packed the patch in 
a hurry in case Efraim needed it for its bootstrapping also.

My changes make bash "configure" assume the system getcwd works correctly 
(which in our case we know it does as dependencies are controlled).

> Is this addressing a problem you had with Bash 4.4 (on core-updates)?

No, it happens with bash-4.3 in master (and probably with most other recent 
versions as well).

Thanks!

Carlos




Re: [PATCH] gnu: Add lci.

2016-10-19 Thread ng0
Leo Famulari  writes:

> On Sat, Oct 15, 2016 at 09:01:00PM +, ng0 wrote:
>> From: ng0 
>> 
>> * gnu/packages/lolcode.scm: New file.
>> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
>
>> +(inputs
>> + `(("python-2" ,python-2)
>> +   ("readline" ,readline)))
>
> The output (checked with `guix gc --references) doesn't refer to
> python-2.
>

Hm.. tests folder requires it, and also the setup. untime has to be
checked.. native-input then?



Re: [PATCH 1/1] services: ntpd: Make large clock adjustments if necessary.

2016-10-19 Thread Ludovic Courtès
Leo Famulari  skribis:

> On Thu, Oct 13, 2016 at 07:06:50AM +0200, John Darrington wrote:
>> I think that this should be a configuration item in the service, so that the
>> user can decide whether to have it or not.  I don't think we should force it
>> on the user.   Some applications break if the clock makes large jumps.
>
> I agree. This is really something that the system administrator should
> evaluate and fix on a case-by-case basis.

I agree too!  And I think it’s good idea to have defaults that match
upstream’s defaults.

>> The ntpd authors decided that the default behaviour is not to make large 
>> jumps
>> so I think we should respect that unless there is a good reason to do 
>> otherwise.
>> So I think this should be configurable in /etc/config.scm and the default 
>> should
>> be not to use -g
>
> For me, I have to do this so rarely (and never on the machines I
> currently use) that I am fine with having to run `ntpd -g ...` by hand.
>
> So, if we want to make this configurable in the OS configuration,
> volunteers are welcome to work on it :)

Like this?

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 7495179..ce281c5 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -265,11 +265,13 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
   ntp-configuration?
   (ntp  ntp-configuration-ntp
 (default ntp))
-  (servers  ntp-configuration-servers))
+  (servers  ntp-configuration-servers)
+  (allow-large-adjustment? ntp-allow-large-adjustment?
+   (default #f)))
 
 (define ntp-shepherd-service
   (match-lambda
-(($  ntp servers)
+(($  ntp servers allow-large-adjustment?)
  (let ()
;; TODO: Add authentication support.
(define config
@@ -296,7 +298,10 @@ restrict -6 ::1\n"))
   (requirement '(user-processes networking))
   (start #~(make-forkexec-constructor
 (list (string-append #$ntp "/bin/ntpd") "-n"
-  "-c" #$ntpd.conf "-u" "ntpd")))
+  "-c" #$ntpd.conf "-u" "ntpd"
+  #$@(if allow-large-adjustment?
+ '("-g")
+ '()
   (stop #~(make-kill-destructor
 
 (define %ntp-accounts
@@ -331,10 +336,13 @@ restrict -6 ::1\n"))
   ntp-service-activation)
 
 (define* (ntp-service #:key (ntp ntp)
-  (servers %ntp-servers))
+  (servers %ntp-servers)
+  allow-large-adjustment?)
   "Return a service that runs the daemon from @var{ntp}, the
 @uref{http://www.ntp.org, Network Time Protocol package}.  The daemon will
-keep the system clock synchronized with that of @var{servers}."
+keep the system clock synchronized with that of @var{servers}.
+@var{allow-large-adjustment?} determines whether @command{ntpd} is allowed to
+make an initial adjustment of more than 1,000 seconds."
   (service ntp-service-type
(ntp-configuration (ntp ntp) (servers servers
 

If that’s fine with you, I’ll commit it with a doc update.

Thanks,
Ludo’.


Re: [PATCH 1/2] gnu: Add gucharmap.

2016-10-19 Thread Ludovic Courtès
ren...@openmailbox.org skribis:

> From 1353f9c76e82bb86b93c596403221e9e0dfe3ca7 Mon Sep 17 00:00:00 2001
> From: Rene Saavedra 
> Date: Sun, 9 Oct 2016 14:57:25 -0500
> Subject: [PATCH 1/2] gnu: Add gucharmap.
>
> * gnu/packages/gnome.scm (gucharmap): New variable.

Applied, thank you, and sorry for the delay!

Ludo’.



Re: [PATCH] gnu: Add chromaprint.

2016-10-19 Thread Ludovic Courtès
Hi!

Hartmut Goebel  skribis:

> * gnu/packages/mp3.scm (chromaprint): New variable.

[...]

> +(define-public chromaprint
> +  (package
> +(name "chromaprint")
> +(version "1.3.2")
> +(source (origin
> +  (method url-fetch)
> +  (uri (string-append
> +"https://bitbucket.org/acoustid/chromaprint/downloads/;
> +"chromaprint-" version ".tar.gz"))
> +  (sha256
> +   (base32 "0lln8dh33gslb9cbmd1hcv33pr6jxdwipd8m8gbsyhksiq6r1by3"
> +(build-system cmake-build-system)
> +(arguments
> + `(#:tests? #f ; tests require googletest *sources*

Weird.

> +(synopsis "Audio fingerprinting library")
> +(description "Chromaprint is a library for calculating audio
> +fingerprints which are used by the Acoustid service.  Its main purpose
> +is to provide an accurate identifier for record tracks")
 ^
Missing period.

OK with this change, thank you!

Ludo’.



Re: [PATCH] gnu: Add lci.

2016-10-19 Thread Leo Famulari
On Sat, Oct 15, 2016 at 09:01:00PM +, ng0 wrote:
> From: ng0 
> 
> * gnu/packages/lolcode.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

> +(inputs
> + `(("python-2" ,python-2)
> +   ("readline" ,readline)))

The output (checked with `guix gc --references) doesn't refer to
python-2.



Re: Display diffs between generations.

2016-10-19 Thread Ludovic Courtès
Roel Janssen  skribis:

> Roel Janssen writes:
>
>> Ludovic Courtès writes:

[...]

>>> In the discussion that ensued, it seems there was a consensus to provide
>>> only the diff format:
>>>
>>>   https://lists.gnu.org/archive/html/guix-devel/2016-09/msg00385.html
>>>
>>> So it seems all the lights are green.  :-)  Let me know if there’s
>>> anything we should do to help!
>>
>> Thanks for the reminder.  I seem to have a lot to finish up :-).  I will
>> work out the arguments and post a new version of the patch for final review.
>
> My GNU mail hasn't been working for a couple of days, but now that it
> does, I wonder if the initial patch I sent is fine as-is, since we agree
> upon only showing the diff format.
>
> Should I implement the --no-diff-format option to change to the
> old behavior?

I don’t think so.  The old behavior will always be available by
specifying a single generation anyway:

  guix package --list-generations=42

It may be worth mentioning this in the manual.

My understanding of the discussion referred above is that people were
fine with that (or indifferent ;-)).

Thanks,
Ludo’.



Re: [PATCH] gnu: Add irctest.

2016-10-19 Thread Leo Famulari
On Tue, Oct 18, 2016 at 01:42:24PM +, ng0 wrote:
> * gnu/packages/irc.scm (irctest): New variable.

Cool!

> +  (version (string-append "0.1-" revision "." (string-take commit 7)))

0.1 should be 0.0.0.

> +  (inputs
> +   `(("python-ecdsa" ,python-ecdsa)
> + ("python-psutil" ,python-psutil)
> + ("limnoria" ,limnoria)))

The output does not refer to limnoria:

$ guix gc --references $(./pre-inst-env guix build irctest)
/gnu/store/pn0lc8cl2c7ja8vgkxs2ka8w9vras8i5-python-ecdsa-0.13
/gnu/store/qvmmdi87vypfz90n76ph5knca188wrv8-python-psutil-4.3.0
/gnu/store/z4r53nxw185s5an6kkvs7cgdkwrl1p8l-irctest-0.1-1.548ddb5

Is it just used for building? If so, it should be a native-input.
Otherwise irctest will stop working after garbage collection.



Re: [PATCH] gnu: Add coda.

2016-10-19 Thread Ludovic Courtès
Thomas Danckaert  skribis:

> This is a C library wich also presents a python interface.  It can be
> used just as well without python, so I've made python only a native
> input, not a regular input.  There's currently a non-determinism issue
> for the python interface, related to
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22533
>
> I also tried to automatically generate the string
> “lib/python3.4/site-packages”, so it's updated automatically when the
> python version changes, but didn't manage to do that (for example I
> tried
>
>   (version-major+minor (package-version python))
>
> but the package variable “python” is not available when the build
> expression is turned into a derivation, as far as I understand
> it?). Advice welcome.

I think this is not needed; see below.

> From edb38dfcc09afdef4279728c84d10688b9d0fc71 Mon Sep 17 00:00:00 2001
> From: Thomas Danckaert 
> Date: Wed, 19 Oct 2016 11:44:33 +0200
> Subject: [PATCH] gnu: Add coda.
>
> * gnu/packages/maths.scm (coda): New variable.

[...]

> +(native-search-paths
> + (list (search-path-specification
> +(variable "PYTHONPATH")
> +(files '("lib/python3.4/site-packages")

Unless I’m mistaken this is not needed: this ‘native-search-paths’ entry
belongs in Python itself, not in users of Python.

> +(synopsis "Common interface to various earth observation data formats")
> +(description
> + "The Common Data Access toolbox (CODA) provides a set of interfaces for
> +reading remote sensing data from earth observation data files.  These
> +interfaces consist of command line applications, libraries, interfaces to
> +scientific applications (such as IDL and MATLAB), and interfaces to

Let’s remove MATLAB; we can replace it with Octave if it’s valid.

> +(license license:gpl2)))

Version 2 only?  That is, is the “or any later version” wording missing
from license headers?

Otherwise LGTM.

Could you send an updated patch?

Thank you!

Ludo’.



Re: [PATCH 1/1] gnu: borg: Install more documentation.

2016-10-19 Thread Leo Famulari
On Tue, Oct 18, 2016 at 07:47:53PM +0300, Alex Kost wrote:
> Leo Famulari (2016-10-17 23:03 -0400) wrote:
> 
> > * gnu/packages/backup.scm (borg)[arguments]: Install more documentation
> > in 'install-doc' phase.
> > ---
> >  gnu/packages/backup.scm | 9 -
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> > index eb5e98d..b75e99b 100644
> > --- a/gnu/packages/backup.scm
> > +++ b/gnu/packages/backup.scm
> > @@ -439,8 +439,15 @@ detection, and lossless compression.")
> >   (add-after 'install 'install-doc
> > (lambda* (#:key outputs #:allow-other-keys)
> >   (let* ((out (assoc-ref outputs "out"))
> > -(man (string-append out "/share/man/man1")))
> > +(man (string-append out "/share/man/man1"))
> > +(misc (string-append out "/share/borg/misc")))
> > (and
> > + (for-each (lambda (file)
> 
> Note that the return value of 'for-each' is not specified, so it should
> not be used inside 'and'.  I would just put it before (and (zero? …) …).

Thanks, I've taken that into account.



Re: [PATCH 1/1] gnu: borg: Install more documentation.

2016-10-19 Thread Leo Famulari
On Tue, Oct 18, 2016 at 09:19:19AM +0200, Ricardo Wurmus wrote:
> 
> Leo Famulari  writes:
> 
> > * gnu/packages/backup.scm (borg)[arguments]: Install more documentation
> > in 'install-doc' phase.
> > ---
> >  gnu/packages/backup.scm | 9 -
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> > index eb5e98d..b75e99b 100644
> > --- a/gnu/packages/backup.scm
> > +++ b/gnu/packages/backup.scm
> > @@ -439,8 +439,15 @@ detection, and lossless compression.")
> >   (add-after 'install 'install-doc
> > (lambda* (#:key outputs #:allow-other-keys)
> >   (let* ((out (assoc-ref outputs "out"))
> > -(man (string-append out "/share/man/man1")))
> > +(man (string-append out "/share/man/man1"))
> > +(misc (string-append out "/share/borg/misc")))
> > (and
> > + (for-each (lambda (file)
> > + (install-file file misc))
> 
> I like “cut” from srfi-26 in simple cases like this:
> 
> (for-each (cut install-file <> misc)
>   (find-files …))

Thanks, that is easier to read.

> > +   (find-files "docs/misc"
> > +   (string-append 
> > "create_chunker-params|"
> > +  "internals-picture|"
> > +  "prune-example")))
> 
> I don’t think “string-append” is needed here.  You can just break the
> string and escape the line break.

I decided not to use a regex for this. It's only three files so I just
used a list.



Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.

2016-10-19 Thread Efraim Flashner


On October 19, 2016 10:48:11 PM GMT+03:00, l...@gnu.org wrote:
>Efraim Flashner  skribis:
>
>> On Wed, Oct 19, 2016 at 05:34:17PM +0200, Ludovic Courtès wrote:
>>> csanchez...@gmail.com (Carlos Sánchez de La Lama) skribis:
>>> 
>>> > See
>>> >
>.
>>> 
>>> Could you put this URL next to the “Do not use /bin/sh” comment?
>>> 
>>> > gnu/packages/make-bootstrap.scm (%static-inputs): Use bash from
>PATH.
>>> 
>>> Otherwise LGTM, thanks!
>>> 
>>> Ludo’.
>>> 
>>
>> Was this tested with the other bootstrap binaries?
>
>It changes execv("/bin/sh", …) to execvp("sh", …) so it looks right.
>
>> I'm still having trouble with the aarch64 ones, didn't check if/how
>it
>> affected the ones that are already in Guix (which I assume would be
>> not at all)
>
>What kind of problems?  After this patch?
>
>Thanks,
>Ludo’.

Sorry, unrelated to this patch. Nvm and carry on

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: [PATCH] gnu: bash-minimal: Assume getcwd works correctly when cross-compiling

2016-10-19 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) skribis:

> csanchez...@gmail.com (Carlos Sánchez de La Lama) skribis:
>
>> * gnu/packages/bash.scm (bash-minimal): Assume getcwd works correctly
>> when cross compiling.
>> ---
>>  gnu/packages/bash.scm | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
>> index f3d8517..b07367c 100644
>> --- a/gnu/packages/bash.scm
>> +++ b/gnu/packages/bash.scm
>> @@ -247,7 +247,8 @@ without modification.")
>>   "--disable-nls"
>>  
>>   ,@(if (%current-target-system)
>> -   '("bash_cv_job_control_missing=no")
>> +   '("bash_cv_job_control_missing=no"
>> + "bash_cv_getcwd_malloc=yes")
>
> No tabs please.  Otherwise LGTM, thanks!

I spoke too fast.  On master (Bash 4.3), this is unnecessary AFAICS:

--8<---cut here---start->8---
$ ./pre-inst-env guix build bash-minimal --target=mips64el-linux-gnu 
--no-grafts --no-build-hook
/gnu/store/1v6l54xzmzb19hdg5bizvzfz995lh1cp-bash-minimal-4.3.42-doc
/gnu/store/gawbc9mj2i37ycym06rbybi1k4kn8zfq-bash-minimal-4.3.42-include
/gnu/store/vic4zf9gpdzrcvj8kimb9cs3049ld60d-bash-minimal-4.3.42
$ git describe
v0.11.0-1743-gfe9bdb5
--8<---cut here---end--->8---

Is this addressing a problem you had with Bash 4.4 (on core-updates)?

TIA,
Ludo’.



Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.

2016-10-19 Thread Ludovic Courtès
Efraim Flashner  skribis:

> On Wed, Oct 19, 2016 at 05:34:17PM +0200, Ludovic Courtès wrote:
>> csanchez...@gmail.com (Carlos Sánchez de La Lama) skribis:
>> 
>> > See
>> > .
>> 
>> Could you put this URL next to the “Do not use /bin/sh” comment?
>> 
>> > gnu/packages/make-bootstrap.scm (%static-inputs): Use bash from PATH.
>> 
>> Otherwise LGTM, thanks!
>> 
>> Ludo’.
>> 
>
> Was this tested with the other bootstrap binaries?

It changes execv("/bin/sh", …) to execvp("sh", …) so it looks right.

> I'm still having trouble with the aarch64 ones, didn't check if/how it
> affected the ones that are already in Guix (which I assume would be
> not at all)

What kind of problems?  After this patch?

Thanks,
Ludo’.



Re: [PATCH 01/15] gnu: chez-scheme: Add search-path and fix i686 build.

2016-10-19 Thread Leo Famulari
On Wed, Oct 19, 2016 at 06:28:45PM +0200, Federico Beffa wrote:
> On Mon, Oct 17, 2016 at 3:34 PM, Ludovic Courtès  wrote:
> > Hello Federico,
> >
> > Federico Beffa  skribis:
> >
> >> On Sun, Oct 16, 2016 at 8:25 PM, Ricardo Wurmus  wrote:
> >> From 7875840eb0f0d0d844da40735faabd10b791f0dd Mon Sep 17 00:00:00 2001
> >> From: Federico Beffa 
> >> Date: Mon, 17 Oct 2016 09:01:11 +0200
> >> Subject: [PATCH 02/17] gnu: chez-scheme: Fix i686 build.
> >>
> >> * gnu/packages/scheme.scm (chez-scheme): Add 'configure-flags', generalize
> >>   'configure' phase and simplify 'install-doc' phase.
> 
> This patch was meant to fix the i686 build, but it looks like it doesn't :-(
> 
> The patch adds a 'configure-flags' argument specifying the machine
> type as instructed by Chez '-/configure --help' message. In addition,
> patching of the make files was generalized to recognize compiler flags
> for all architectures (previously it only recognized x86_64 ones).
> However, because I'm short on space I only checked that I didn't break
> the 64bit version and didn't build the 32bit one.

Heh :) I recently dug out my LVM cheat sheet and increased my /gnu/store
capacity by 20 GB. It was worth the 20 minutes of downtime!



Re: [PATCH 2/2] gnu: gajim: Update to 0.16.6.

2016-10-19 Thread Leo Famulari
On Wed, Oct 19, 2016 at 10:20:05AM +0530, Arun Isaac wrote:
> * gnu/packages/messaging.scm (gajim): Update to 0.16.6.

>  (arguments
> - `(;; The only check done by gajim-0.16.x is to check that the
> -   ;; translations are up-to-date, and in 0.16.5 they are not, so
> -   ;; "make check" fails.  Therefore, we disable tests for now.
> -   ;;
> -   ;; XXX TODO Try re-enabling tests in gajim-0.16.6 or later.
> -   ;;
> -   #:tests? #f

Is that comment still true? If so, I think we can leave the tests
disabled.

>   (add-after 'install 'wrap-program
> -  (lambda* (#:key outputs #:allow-other-keys)
> -;; Make sure all Python scripts run with the correct PYTHONPATH.
> -(let ((out (assoc-ref outputs "out"))
> -  (path (getenv "PYTHONPATH")))
> -  (for-each (lambda (name)
> -  (let ((file (string-append out "/bin/" name)))
> -;; Wrapping destroys identification of intended
> -;; application, so we need to override "APP".
> -(substitute* file
> -  (("APP=`basename \\$0`")
> -   (string-append "APP=" name)))
> -(wrap-program file
> -  `("PYTHONPATH" ":" prefix (,path)
> -'("gajim" "gajim-remote" "gajim-history-manager")))
> -#t)
> +   (lambda* (#:key outputs #:allow-other-keys)
> + ;; Make sure all Python scripts run with the correct PYTHONPATH.
> + (let ((out (assoc-ref outputs "out"))
> +   (path (getenv "PYTHONPATH")))
> +   (for-each (lambda (name)
> +   (let ((file (string-append out "/bin/" name)))
> + ;; Wrapping destroys identification of intended
> + ;; application, so we need to override "APP".
> + (substitute* file
> +   (("APP=`basename \\$0`")
> +(string-append "APP=" name)))
> + (wrap-program file
> +   `("PYTHONPATH" ":" prefix (,path)
> + '("gajim" "gajim-remote" "gajim-history-manager")))
> + #t)

This is just an indentation fix, right? Just checking :)



Re: [PATCH 1/2] gnu: gajim: License is "version 3 only".

2016-10-19 Thread Leo Famulari
On Wed, Oct 19, 2016 at 10:20:04AM +0530, Arun Isaac wrote:
> * gnu/packages/messaging.scm (gajim)[license]: Change to GPL3.

Thanks for checking on this!

Indeed, the bulk of the license headers say "version 3 only", so I think
gajim is GPL3. But, I found a few files that are GPL3+, and at least one
2-clause BSD licensed file in 'src/command-system'.

Can you revise this patch to give a license list, with comments
explaining that the package is GPL3 but includes some
differently-licensed components?

> ---
>  gnu/packages/messaging.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
> index 0089da1..37bbed7 100644
> --- a/gnu/packages/messaging.scm
> +++ b/gnu/packages/messaging.scm
> @@ -504,7 +504,7 @@ Among its features are: a tabbed chat window and single 
> window modes; support
>  for group chat (with Multi-User Chat protocol), invitation, chat to group 
> chat
>  transformation; audio and video conferences; file transfer; TLS, GPG and
>  end-to-end encryption support; XML console.")
> -(license license:gpl3+)))
> +(license license:gpl3)))
>  
>  (define-public prosody
>(package
> -- 
> 2.10.1
> 
> 



Re: [PATCH] gnu: libarchive: fix issue 696 in v.3.2.1

2016-10-19 Thread Leo Famulari
On Wed, Oct 19, 2016 at 01:02:43PM +0200, Carlos Sánchez de La Lama wrote:
> Pull request #807 has been made upstream, this fixes Issue 696 on GUIX side
> until a new it is fixed on a libarchive release.
> 
> * gnu/packages/patches/libarchive-issue-696.patch: New file.
> * gnu/local.mk: Register patch.
> * gnu/packages/backup.scm (libarchive): Add patch.
> (libarchive/fixed): Inherit patches from libarchive.

Thanks! Let's wait to see what the libarchive developers say before we
apply it to our package.



Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.

2016-10-19 Thread Efraim Flashner
On Wed, Oct 19, 2016 at 05:34:17PM +0200, Ludovic Courtès wrote:
> csanchez...@gmail.com (Carlos Sánchez de La Lama) skribis:
> 
> > See
> > .
> 
> Could you put this URL next to the “Do not use /bin/sh” comment?
> 
> > gnu/packages/make-bootstrap.scm (%static-inputs): Use bash from PATH.
> 
> Otherwise LGTM, thanks!
> 
> Ludo’.
> 

Was this tested with the other bootstrap binaries? I'm still having
trouble with the aarch64 ones, didn't check if/how it affected the ones
that are already in Guix (which I assume would be not at all)

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


signature.asc
Description: PGP signature


Re: [PATCH 7/7] gnu: Add r-bioccheck.

2016-10-19 Thread Ricardo Wurmus

Roel Janssen  writes:

> Ricardo Wurmus writes:
>
>> Roel Janssen  writes:
>>
>>> * gnu/packages/bioinformatics.scm (r-bioccheck): New variable.
>>> ---
>>>  gnu/packages/bioinformatics.scm | 29 +
>>>  1 file changed, 29 insertions(+)
>>>
>>> diff --git a/gnu/packages/bioinformatics.scm 
>>> b/gnu/packages/bioinformatics.scm
>>> index 902d1d2..00a4161 100644
>>> --- a/gnu/packages/bioinformatics.scm
>>> +++ b/gnu/packages/bioinformatics.scm
>>> @@ -5426,6 +5426,35 @@ like automatically generated help option and usage, 
>>> support for default
>>>  values, positional argument support, etc.")
>>>  
>>>  (license license:gpl2+)))
>>>  
>>> +(define-public r-bioccheck
>>> +  (package
>>> +(name "r-bioccheck")
>>> +(version "1.8.2")
>>> +(source (origin
>>> +  (method url-fetch)
>>> +  (uri (bioconductor-uri "BiocCheck" version))
>>> +  (sha256
>>> +   (base32
>>> +"0bvkhxmr25nb0gkncifbc3x48i5zgls3737g3xais6jx16wd4q35"
>>> +(properties
>>> + `((upstream-name . "BiocCheck")))
>>> +(build-system r-build-system)
>>> +(inputs
>>> + `(("which" ,which)))
>>
>> Is this a native input?
>
> Ah, yes it is.
>
>>> +(propagated-inputs
>>> + `(("r-graph" ,r-graph)
>>> +   ("r-knitr" ,r-knitr)
>>> +   ("r-httr" ,r-httr)
>>> +   ("r-optparse" ,r-optparse)
>>> +   ("r-devtools" ,r-devtools)
>>> +   ("r-biocinstaller" ,r-biocinstaller)
>>> +   ("r-biocviews" ,r-biocviews)))
>>> +(home-page "http://bioconductor.org/packages/BiocCheck;)
>>> +(synopsis "Executes Bioconductor-specific package checks")
>>> +(description "This package executes Bioconductor-specific
>>> +package checks.")
>>
>> Well… okay. :)  It would be nice if it was a little more specific.
>>
>> Maybe:
>>
>>This package contains tools to perform quality checks on R packages
>>that are to be submitted to the Bioconductor repository.
>>
>> WDYT?
>
> I used your description, but added "additional" to it.  I also added a
> custom build phase to make "R CMD BiocCheck" work.
>
> Here's the new patch:
>
>>From 1d9248098fc507876d77cddc890ea906aef7b83d Mon Sep 17 00:00:00 2001
> From: Roel Janssen 
> Date: Wed, 19 Oct 2016 16:43:04 +0200
> Subject: [PATCH] gnu: Add r-bioccheck.
>
> * gnu/packages/bioinformatics.scm (r-bioccheck): New variable.
> ---
>  gnu/packages/bioinformatics.scm | 48 
> +
>  1 file changed, 48 insertions(+)
>
> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index 3fe7b5f..d21781f 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -5936,6 +5936,54 @@ Bioconductor PDF and HTML documents.  Package 
> vignettes illustrate use and
>  functionality.")
>  (license license:artistic2.0)))
>  
> +(define-public r-bioccheck
> +  (package
> +(name "r-bioccheck")
> +(version "1.10.0")
> +(source (origin
> +  (method url-fetch)
> +  (uri (bioconductor-uri "BiocCheck" version))
> +  (sha256
> +   (base32
> +"1rfy37xg1nc2cmgbclvzsi7sgmdcdjiahsx9crgx3yaw7kxgiack"
> +(properties
> + `((upstream-name . "BiocCheck")))
> +(build-system r-build-system)
> +(arguments
> + '(#:phases
> +   (modify-phases %standard-phases
> + ;; This package can be used by calling BiocCheck() from
> + ;; within R, or by running R CMD BiocCheck .  This phase
> + ;; makes sure the latter works.  For this to work, the BiocCheck
> + ;; script must be somewhere on the PATH (not the R bin directory).
> + (add-after 'install 'install-bioccheck-subcommand
> +   (lambda _
> + (let ((dest-dir (string-append %output "/bin"))
> +   (script-dir
> +(string-append %output 
> "/site-library/BiocCheck/script/")))

We usually prefer to do this

(lambda* (#:key outputs #:allow-other-keys)
  (let* ((out (assoc-ref outputs "out"))
 … out …)))

instead of using the magical “%output”.


> +   (mkdir-p dest-dir)
> +   (zero? (system* "ln" "--symbolic"
> +   (string-append script-dir "/checkBadDeps.R")
> +   (string-append dest-dir "/checkBadDeps.R")))
> +   (zero? (system* "ln" "--symbolic"
> +   (string-append script-dir "/BiocCheck")
> +   (string-append dest-dir "/BiocCheck")

Would it work to use “install-file” here (or to use Guile’s “symlink
oldpath newpath”) instead of shelling out?

~~ Ricardo




Re: [PATCH 1/1] gnu: Add libseccomp.

2016-10-19 Thread Leo Famulari
On Wed, Oct 19, 2016 at 12:32:38PM +0100, Marius Bakke wrote:
> Leo Famulari  writes:
> 
> > * gnu/packages/linux.scm (libseccomp): New variable.
> 
> Nice. This LGTM and is reproducible. License appears correct.

Thanks for the review!



Re: [PATCH 1/2] gnu: Add python-axolotl-curve25519.

2016-10-19 Thread Arun Isaac

Arun Isaac writes:

> +(license license:gpl3)))

The file curve/curve25519-donna.c is licensed under a different license
with Google Inc. as the copyright holder. The rest of the code is under
GPL3. So, what license should I specify in the package definition?


signature.asc
Description: PGP signature


Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.

2016-10-19 Thread Ludovic Courtès
csanchez...@gmail.com (Carlos Sánchez de La Lama) skribis:

> See
> .

Could you put this URL next to the “Do not use /bin/sh” comment?

> gnu/packages/make-bootstrap.scm (%static-inputs): Use bash from PATH.

Otherwise LGTM, thanks!

Ludo’.



Re: [PATCH] gnu: bash-minimal: Assume getcwd works correctly when cross-compiling

2016-10-19 Thread Ludovic Courtès
csanchez...@gmail.com (Carlos Sánchez de La Lama) skribis:

> * gnu/packages/bash.scm (bash-minimal): Assume getcwd works correctly
> when cross compiling.
> ---
>  gnu/packages/bash.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
> index f3d8517..b07367c 100644
> --- a/gnu/packages/bash.scm
> +++ b/gnu/packages/bash.scm
> @@ -247,7 +247,8 @@ without modification.")
>   "--disable-nls"
>  
>   ,@(if (%current-target-system)
> -   '("bash_cv_job_control_missing=no")
> +   '("bash_cv_job_control_missing=no"
> +  "bash_cv_getcwd_malloc=yes")

No tabs please.  Otherwise LGTM, thanks!

Ludo’.



Re: [PATCH] gnu: slim: Do not reset session after failed login

2016-10-19 Thread Ludovic Courtès
Hi,

Eric Bavier  skribis:

> The first patch fixes an often-bemoaned usability issue in SLiM.  The
> second is mostly to improve aesthetics, IMHO.

Both are definitely an improvement, so I’m all for it.

If there’s an upstream bug report or commit for the patches, please add
the URL in the patch.

Thanks!

Ludo’.



Re: [PATCH 1/4] gnu: python-rsa: Update to 3.4.2.

2016-10-19 Thread Ludovic Courtès
Hi Leo,

I haven’t built the packages but the 4 patches look good to me.

Thanks!

Ludo’.



Re: Adding rottlog service in ‘%base-services’?

2016-10-19 Thread Ludovic Courtès
David Craven  skribis:

>> Should we add rottlog-service and thus mcron-service to
>> ‘%base-services’?  Is log rotation a basic feature that people expect?
>> WDYT?
>
> Why not. There's two sorts of people. The ones that don't care/know
> will be happy when things just work and the ones that care/know are
> probably defining their own %base-services anyway...

Yeah so I think ‘%base-services’ is bound to remain pretty much the same
forever.

And what about adding it to ‘%desktop-services’?  This one is clearly
for people who expect things to work out of the box.

>> If we do so, we would need to document a way to add mcron jobs from the
>> ‘operating-system’ declaration.  People would no longer be able to write
>> something like this in the ‘services’ field.
>
> Mmh... If we do something like this we shouldn't call it mcron-jobs,
> otherwise we'll have the same problems like with grub - where all
> variables are named grub or grub? or grub.cfg. How about just calling
> it jobs?

Not sure I understand the problem.  ‘mcron-jobs’ wouldn’t collide with
anything else AFAICS, and it would be clearer than just ‘jobs’ no?

So related question: putting ‘mcron-service’ in ‘%base-services’?  It
would be a no-op in the absence of job specifications.

Thanks for your feedback,
Ludo’.



Re: [PATCH 2/2] gnu: Add python-axolotl.

2016-10-19 Thread Hartmut Goebel
Am 19.10.2016 um 16:18 schrieb Arun Isaac:
> +(inputs
> + `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
> +   ("python-dateutil" ,python-dateutil)
> +   ("python-protobuf" ,python-protobuf)
> +   ("python-pycrypto" ,python-pycrypto)))

These must all be propagated-inputs.

The code includes tests in axolotl/tests/ (and maybe elsewhere. Please
check if these are installed and if so, if they can be safely removed.

> +(description "This is a python port of libaxolotl-android
> +originally written by Moxie Marlinspike.  This is a ratcheting forward

Isn't this "python implementation of the axolotl protocol"? Oh, I just
checked the code: It's as ugly as Java code is. So "python port of
libaxolotl-android" is correct.

Did this Moxie Marlinspike write the python port or just the
"libaxolotl-android"? In any case, persons should not be  glamorized in
descriptions. We also do not write "PGP originally developed by Phill
Zimmerman". This only leads to personality cult - and esp. this person
is very debatable.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |



0xBF773B65.asc
Description: application/pgp-keys


Re: [PATCH 7/7] gnu: Add r-bioccheck.

2016-10-19 Thread Roel Janssen

Ricardo Wurmus writes:

> Roel Janssen  writes:
>
>> * gnu/packages/bioinformatics.scm (r-bioccheck): New variable.
>> ---
>>  gnu/packages/bioinformatics.scm | 29 +
>>  1 file changed, 29 insertions(+)
>>
>> diff --git a/gnu/packages/bioinformatics.scm 
>> b/gnu/packages/bioinformatics.scm
>> index 902d1d2..00a4161 100644
>> --- a/gnu/packages/bioinformatics.scm
>> +++ b/gnu/packages/bioinformatics.scm
>> @@ -5426,6 +5426,35 @@ like automatically generated help option and usage, 
>> support for default
>>  values, positional argument support, etc.") 
>> 
>>  (license license:gpl2+)))
>>  
>> +(define-public r-bioccheck
>> +  (package
>> +(name "r-bioccheck")
>> +(version "1.8.2")
>> +(source (origin
>> +  (method url-fetch)
>> +  (uri (bioconductor-uri "BiocCheck" version))
>> +  (sha256
>> +   (base32
>> +"0bvkhxmr25nb0gkncifbc3x48i5zgls3737g3xais6jx16wd4q35"
>> +(properties
>> + `((upstream-name . "BiocCheck")))
>> +(build-system r-build-system)
>> +(inputs
>> + `(("which" ,which)))
>
> Is this a native input?

Ah, yes it is.

>> +(propagated-inputs
>> + `(("r-graph" ,r-graph)
>> +   ("r-knitr" ,r-knitr)
>> +   ("r-httr" ,r-httr)
>> +   ("r-optparse" ,r-optparse)
>> +   ("r-devtools" ,r-devtools)
>> +   ("r-biocinstaller" ,r-biocinstaller)
>> +   ("r-biocviews" ,r-biocviews)))
>> +(home-page "http://bioconductor.org/packages/BiocCheck;)
>> +(synopsis "Executes Bioconductor-specific package checks")
>> +(description "This package executes Bioconductor-specific
>> +package checks.")
>
> Well… okay. :)  It would be nice if it was a little more specific.
>
> Maybe:
>
>This package contains tools to perform quality checks on R packages
>that are to be submitted to the Bioconductor repository.
>
> WDYT?

I used your description, but added "additional" to it.  I also added a
custom build phase to make "R CMD BiocCheck" work.

Here's the new patch:

>From 1d9248098fc507876d77cddc890ea906aef7b83d Mon Sep 17 00:00:00 2001
From: Roel Janssen 
Date: Wed, 19 Oct 2016 16:43:04 +0200
Subject: [PATCH] gnu: Add r-bioccheck.

* gnu/packages/bioinformatics.scm (r-bioccheck): New variable.
---
 gnu/packages/bioinformatics.scm | 48 +
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 3fe7b5f..d21781f 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -5936,6 +5936,54 @@ Bioconductor PDF and HTML documents.  Package vignettes 
illustrate use and
 functionality.")
 (license license:artistic2.0)))
 
+(define-public r-bioccheck
+  (package
+(name "r-bioccheck")
+(version "1.10.0")
+(source (origin
+  (method url-fetch)
+  (uri (bioconductor-uri "BiocCheck" version))
+  (sha256
+   (base32
+"1rfy37xg1nc2cmgbclvzsi7sgmdcdjiahsx9crgx3yaw7kxgiack"
+(properties
+ `((upstream-name . "BiocCheck")))
+(build-system r-build-system)
+(arguments
+ '(#:phases
+   (modify-phases %standard-phases
+ ;; This package can be used by calling BiocCheck() from
+ ;; within R, or by running R CMD BiocCheck .  This phase
+ ;; makes sure the latter works.  For this to work, the BiocCheck
+ ;; script must be somewhere on the PATH (not the R bin directory).
+ (add-after 'install 'install-bioccheck-subcommand
+   (lambda _
+ (let ((dest-dir (string-append %output "/bin"))
+   (script-dir
+(string-append %output "/site-library/BiocCheck/script/")))
+   (mkdir-p dest-dir)
+   (zero? (system* "ln" "--symbolic"
+   (string-append script-dir "/checkBadDeps.R")
+   (string-append dest-dir "/checkBadDeps.R")))
+   (zero? (system* "ln" "--symbolic"
+   (string-append script-dir "/BiocCheck")
+   (string-append dest-dir "/BiocCheck")
+(native-inputs
+ `(("which" ,which)))
+(propagated-inputs
+ `(("r-graph" ,r-graph)
+   ("r-knitr" ,r-knitr)
+   ("r-httr" ,r-httr)
+   ("r-optparse" ,r-optparse)
+   ("r-devtools" ,r-devtools)
+   ("r-biocinstaller" ,r-biocinstaller)
+   ("r-biocviews" ,r-biocviews)))
+(home-page "http://bioconductor.org/packages/BiocCheck;)
+(synopsis "Executes Bioconductor-specific package checks")
+(description "This package contains tools to perform additional quality
+checks on R packages that are to be submitted to the Bioconductor repository.")
+(license license:artistic2.0)))
+
 (define-public r-getopt
   (package

Re: [PATCH 1/2] gnu: Add python-setproctitle and python2-setproctitle.

2016-10-19 Thread Efraim Flashner
On Sun, Sep 25, 2016 at 10:24:36PM +0200, Hartmut Goebel wrote:
> * gnu/packages/python.scm (python-setproctitle, python2-setproctitle):
>   New variables.
> ---
>  gnu/packages/python.scm | 58 
> +
>  1 file changed, 58 insertions(+)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 688a5d4..95a2027 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -10939,3 +10939,61 @@ with an associated set of resolve methods that know 
> how to fetch data.")
>  provide extendible implementations of common aspects of a cloud so that you 
> can
>  focus on building massively scalable web applications.")
>  (license license:expat)))
> +
> +(define-public python-setproctitle
> +(package
> +  (name "python-setproctitle")
> +  (version "1.1.10")
> +  (source
> +(origin
> +  (method url-fetch)
> +  (uri (pypi-uri "setproctitle" version))
> +  (sha256
> +(base32
> +  "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"
> +  (build-system python-build-system)
> +  (arguments
> +   '(#:phases
> + (modify-phases %standard-phases
> +(add-before 'check 'patch-Makefile
> +   ;; Stricly this is only required for the python2 variant.
> +   ;; But adding a phase in an inherited package seems to be
> +   ;; cumbersum. So we patch even for python3.
> +   (lambda _ ;* (#:key inputs #:allow-other-keys)
> + (let ((nose (assoc-ref %build-inputs "python2-nose")))
> +   (if nose
> + (substitute* "Makefile"
> +   (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
> +(string-append nose "/bin/nosetests "
> +#t)))
> +(replace 'check
> +   (lambda _
> + (setenv "PYTHON" (or (which "python3") (which "python")))

 IIRC (or ... here will return true,
 which i'm sure is not the point.

> + (setenv "PYCONFIG" (or (which "python3-config") (which 
> "python-config")))
> + (setenv "CC" "gcc")
> + ;; No need to extend PYTHONPATH so the built package will
> + ;; be found, since the Makefile will build anyway
> + (zero? (system* "make" "check"))
> + )

These close perentheses should be on the previous line

> +  (native-inputs
> +   `(("procps" ,procps))) ; required for tests
> +  (home-page
> +"https://github.com/dvarrazzo/py-setproctitle;)
> +  (synopsis "Setproctitle implementation for Python to customize the process 
> title")
> +  (description "The library allows a process to change its title (as
> +displayed by system tools such as ps and top).
> +
> +Changing the title is mostly useful in multi-process systems, for
> +example when a master process is forked: changing the children's title
> +allows to identify the task each process is busy with.  The technique
> +is used by PostgreSQL and the OpenSSH Server for example.")
> +  (license license:bsd-3)
> +  (properties `((python2-variant . ,(delay python2-setproctitle))
> +
> +(define-public python2-setproctitle
> +  (let ((base (package-with-python2 
> +   (strip-python2-variant python-setproctitle
> +(package
> +  (inherit base)
> +  (native-inputs `(("python2-nose" ,python2-nose)
> +   ,@(package-native-inputs base))
> -- 
> 2.7.4
> 
> 

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


signature.asc
Description: PGP signature


[PATCH 2/2] gnu: Add python-axolotl.

2016-10-19 Thread Arun Isaac
* gnu/packages/python.scm (python-axolotl, python2-axolotl): New variables.
---
 gnu/packages/python.scm | 37 +
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 326b2dd..f0df817 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -79,6 +79,7 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages statistics)
@@ -11091,3 +11092,39 @@ python-axolotl.")
 
 (define-public python2-axolotl-curve25519
   (package-with-python2 python-axolotl-curve25519))
+
+(define-public python-axolotl
+  (package
+(name "python-axolotl")
+(version "0.1.35")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ "https://github.com/tgalal/python-axolotl/archive/;
+ version ".tar.gz"))
+   (file-name (string-append name "-" version ".tar.gz"))
+   (sha256
+(base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"
+(build-system python-build-system)
+(arguments
+ `(;; Prevent creation of the egg. This works around
+   ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
+   #:configure-flags '("--root=/")))
+(inputs
+ `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
+   ("python-dateutil" ,python-dateutil)
+   ("python-protobuf" ,python-protobuf)
+   ("python-pycrypto" ,python-pycrypto)))
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "https://github.com/tgalal/python-axolotl;)
+(synopsis "Python port of libaxolotl-android")
+(description "This is a python port of libaxolotl-android
+originally written by Moxie Marlinspike.  This is a ratcheting forward
+secrecy protocol that works in synchronous and asynchronous messaging
+environments.")
+(license license:gpl3)))
+
+(define-public python2-axolotl
+  (package-with-python2 python-axolotl))
-- 
2.10.1




[PATCH 1/2] gnu: Add python-axolotl-curve25519.

2016-10-19 Thread Arun Isaac
* gnu/packages/python.scm (python-axolotl-curve25519,
  python2-axolotl-curve25519): New variables.
---
 gnu/packages/python.scm | 33 +
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index c5a39f4..326b2dd 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -29,6 +29,7 @@
 ;;; Copyright © 2016 Marius Bakke 
 ;;; Copyright © 2016 Stefan Reichoer 
 ;;; Copyright © 2016 Dylan Jeffers 
+;;; Copyright © 2016 Arun Isaac 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -11058,3 +11059,35 @@ with an associated set of resolve methods that know 
how to fetch data.")
 provide extendible implementations of common aspects of a cloud so that you can
 focus on building massively scalable web applications.")
 (license license:expat)))
+
+(define-public python-axolotl-curve25519
+  (package
+(name "python-axolotl-curve25519")
+(version "0.1")
+(source
+ (origin
+   (method git-fetch)
+   (uri (git-reference
+ (url "git://github.com/tgalal/python-axolotl-curve25519")
+ (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
+   (file-name (string-append name "-" version "-checkout"))
+   (sha256
+(base32
+ "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"
+(build-system python-build-system)
+(arguments
+ `(;; Prevent creation of the egg. This works around
+   ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
+   #:configure-flags '("--root=/")))
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(home-page "https://github.com/tgalal/python-axolotl-curve25519;)
+(synopsis "Python wrapper for curve25519 library")
+(description "This is a python wrapper for the curve25519 library
+with ed25519 signatures.  The C code was pulled from
+libaxolotl-android.  At the moment this wrapper is meant for use by
+python-axolotl.")
+(license license:gpl3)))
+
+(define-public python2-axolotl-curve25519
+  (package-with-python2 python-axolotl-curve25519))
-- 
2.10.1




Re: [PATCH 3/7] gnu: Add r-biocviews.

2016-10-19 Thread Roel Janssen

Ricardo Wurmus writes:

> Roel Janssen  writes:
>
 +(synopsis "Bioconductor structures for vocabularies and narratives of 
 +views")
>>>
>>> I don’t know what this means.  Does this mean “data structures”?  What
>>> is a vocabulary or narrative in this case?
>>
>> No, it means a structured way of describing things by keywords.  It is
>> an attempt at standardizing meta data to create a search function.  A
>> vocabulary is a stricter set of words to use for a purpose.  So, package
>> maintainers should use existing keywords when they reasonably fit
>> instead of creating new keywords who's meaning is almost identical to an
>> existing keyword.
>
> Thanks for the explanation!
>
>> Would the following synopsis and description be good?
>>
>>>(synopsis "Bioconductor package categorization helper")
>>>(description "The purpose of biocViews is to create HTML pages that
>>> categorize packages in a Bioconductor package repository according to 
>>> keywords,
>>> also known as views, in a controlled vocabulary.")
>
> Yes, that’s much better.  Thank you!

Thanks for the quick response!  I pushed it with these changes.

Kind regards,
Roel Janssen



Re: [PATCH] Add iPerf

2016-10-19 Thread Marius Bakke
Benz Schenk  writes:

> On Tue, 18 Oct 2016 22:37:40 +0100
> Marius Bakke  wrote:
>
>> Benz Schenk  writes:
>> 
>> > Hi
>> >
>> > This is my first patch, it's really straight-forward.
>> > But I'm not quite sure about the naming because there's iperf, iperf2
>> > and iperf3 which are different projects. The original iperf is
>> > abandoned and iperf2 is backwards compatible and still gets bug fixes
>> > and iperf3, which this patch is for, is in active development and adds a
>> > lot of new features but also lacks some of the options of previous
>> > versions. Thus it's often referred to as iperf3, which is also the name
>> > of the binary, so I'm not sure wheter the package should better be
>> > called iperf3 or iperf.  
>> 
>> Hi Benz,
>> 
>> Thanks for this patch! I think naming it "iperf" is fine, even though
>> the binary and manual is called iperf3. If we need iperf2 later it can
>> be packaged as "iperf@2".
>> 
>> I'm not sure about the home page: the manual and github page both list
>> http://software.es.net/iperf/ as the home. What is the relation between
>> iperf.fr and this project? Should we not go with the official source?
>> 
>> Other than that I'd like to make the following modifications. This can
>> be done before pushing, no need to send an updated patch:
>> 
>> * Change synopsis to "TCP, UDP and SCTP bandwidth measurement tool".
>> * Update license to match what's in the LICENSE file.
>> * Fix minor typos in the description (bandwith->bandwidth).
>> * Change commit message to match our current convention.
>> * Download the tarball from http://downloads.es.net/pub/iperf/
>> 
>> Are you okay with these changes (including the home page)?
>> 
>> Thanks again, and welcome! :)
>
> Sure thing, I just need the software for uni and got this homepage from
> my advisor.

Thanks for clarifying. I've tested this and pushed it with the mentioned
changes as b747718e230eba267ae158d03d506527bfe1a67a !



Re: [PATCH 3/7] gnu: Add r-biocviews.

2016-10-19 Thread Ricardo Wurmus

Roel Janssen  writes:

>>> +(synopsis "Bioconductor structures for vocabularies and narratives of 
>>> +views")
>>
>> I don’t know what this means.  Does this mean “data structures”?  What
>> is a vocabulary or narrative in this case?
>
> No, it means a structured way of describing things by keywords.  It is
> an attempt at standardizing meta data to create a search function.  A
> vocabulary is a stricter set of words to use for a purpose.  So, package
> maintainers should use existing keywords when they reasonably fit
> instead of creating new keywords who's meaning is almost identical to an
> existing keyword.

Thanks for the explanation!

> Would the following synopsis and description be good?
>
>>(synopsis "Bioconductor package categorization helper")
>>(description "The purpose of biocViews is to create HTML pages that
>> categorize packages in a Bioconductor package repository according to 
>> keywords,
>> also known as views, in a controlled vocabulary.")

Yes, that’s much better.  Thank you!

~~ Ricardo




[PATCH] gnu: Add emacs-d-mode.

2016-10-19 Thread Roel Janssen
Dear Guix,

Here's a patch to add a major mode for the D programming language.

Kind regards,
Roel Janssen

>From 9a83259640de620241bd36254cbae5ec0500a399 Mon Sep 17 00:00:00 2001
From: Roel Janssen 
Date: Wed, 19 Oct 2016 13:22:57 +0200
Subject: [PATCH] gnu: Add emacs-d-mode.

* gnu/packages/emacs.scm (emacs-d-mode): New variable.
---
 gnu/packages/emacs.scm | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 6e9c181..bee4046 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1197,6 +1197,28 @@ and stored in memory.")
 (description "This package provides a modern list API library for Emacs.")
 (license license:gpl3+)))
 
+(define-public emacs-d-mode
+  (package
+(name "emacs-d-mode")
+(version "2.0.8")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/;
+"archive/" version ".tar.gz"))
+  (sha256
+   (base32
+"0knpgi55jm09282aqf8pv55zillpnpzf9f4sgm6gwsmvxf17xaw0"
+(build-system emacs-build-system)
+(propagated-inputs
+ `(("emacs-undercover" ,emacs-undercover)))
+(home-page "https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode;)
+(synopsis "Emacs major mode for editing D code")
+(description "This package provides an Emacs major mode for highlighting
+code written in the D programming language.  This mode is currently known to
+work with Emacs 24 and 25.")
+(license license:gpl2+)))
+
 (define-public emacs-undo-tree
   (package
 (name "emacs-undo-tree")
-- 
2.10.0




[PATCH] gnu: libarchive: fix issue 696 in v.3.2.1

2016-10-19 Thread Carlos Sánchez de La Lama
Pull request #807 has been made upstream, this fixes Issue 696 on GUIX side
until a new it is fixed on a libarchive release.

* gnu/packages/patches/libarchive-issue-696.patch: New file.
* gnu/local.mk: Register patch.
* gnu/packages/backup.scm (libarchive): Add patch.
(libarchive/fixed): Inherit patches from libarchive.
---
 gnu/local.mk|  1 +
 gnu/packages/backup.scm | 15 +---
 gnu/packages/patches/libarchive-issue-696.patch | 51 +
 3 files changed, 61 insertions(+), 6 deletions(-)
 create mode 100644 gnu/packages/patches/libarchive-issue-696.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 5226b49..c887d0f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -619,6 +619,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/libarchive-7zip-heap-overflow.patch \
   %D%/packages/patches/libarchive-fix-symlink-check.patch  \
   %D%/packages/patches/libarchive-fix-filesystem-attacks.patch \
+  %D%/packages/patches/libarchive-issue-696.patch  \
   %D%/packages/patches/libarchive-safe_fprintf-buffer-overflow.patch   \
   %D%/packages/patches/libbonobo-activation-test-race.patch\
   %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 797c06e..9f4d36b 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -181,7 +181,8 @@ backups (called chunks) to allow easy burning to CD/DVD.")
version ".tar.gz"))
(sha256
 (base32
- "1lngng84k1kkljl74q0cdqc3s82vn2kimfm02dgm4d6m7x71mvkj"
+ "1lngng84k1kkljl74q0cdqc3s82vn2kimfm02dgm4d6m7x71mvkj"))
+   (patches (search-patches "libarchive-issue-696.patch"
 (build-system gnu-build-system)
 ;; TODO: Add -L/path/to/nettle in libarchive.pc.
 (inputs
@@ -233,11 +234,13 @@ random access nor for in-place modification.")
 (inherit libarchive)
 (source (origin
   (inherit (package-source libarchive))
-  (patches (search-patches
- "libarchive-7zip-heap-overflow.patch"
- "libarchive-fix-symlink-check.patch"
- "libarchive-fix-filesystem-attacks.patch"
- "libarchive-safe_fprintf-buffer-overflow.patch"))
+  (patches (append
+   (origin-patches (package-source libarchive))
+   (search-patches
+"libarchive-7zip-heap-overflow.patch"
+"libarchive-fix-symlink-check.patch"
+"libarchive-fix-filesystem-attacks.patch"
+"libarchive-safe_fprintf-buffer-overflow.patch")))
 
 (define-public rdup
   (package
diff --git a/gnu/packages/patches/libarchive-issue-696.patch 
b/gnu/packages/patches/libarchive-issue-696.patch
new file mode 100644
index 000..0fafacf
--- /dev/null
+++ b/gnu/packages/patches/libarchive-issue-696.patch
@@ -0,0 +1,51 @@
+From ba1665ee3d1c593c5baf9264cd5c5250eb0c515f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20de=20La=20Lama?=
+ 
+Date: Wed, 19 Oct 2016 09:12:18 +0200
+Subject: [PATCH] Issue 696: ppc64le mache ckech failure
+
+This issue is not ppc64le specific. I have experienced on my
+4.4.22-gnu #1 SMP 1 i686 GNU/Linux. Might be dependant on kernel
+version and/or machine load. POSIX says errors after posix_spawnp
+returns can be signaled by child exitting with an 127 exit code.
+---
+ cpio/test/test_option_lz4.c | 7 +++
+ tar/test/test_option_lz4.c  | 7 +++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/cpio/test/test_option_lz4.c b/cpio/test/test_option_lz4.c
+index d430ac7..afd683d 100644
+--- a/cpio/test/test_option_lz4.c
 b/cpio/test/test_option_lz4.c
+@@ -63,6 +63,13 @@ DEFINE_TEST(test_option_lz4)
+   "but no such program is available on this system.");
+   return;
+   }
++  /* On some systems the error won't be detected until closing
++ time, by a 127 exit error returned by waitpid. */
++  if (strstr(p, "Error closing") != NULL && !canLz4()) {
++  skipping("This version of bsdcpio uses an external lz4 
program "
++  "but no such program is available on this system.");
++  return;
++  }
+   failure("--lz4 option is broken: %s", p);
+   assertEqualInt(r, 0);
+   return;
+diff --git a/tar/test/test_option_lz4.c b/tar/test/test_option_lz4.c
+index 5dc9452..01ca6bb 100644
+--- a/tar/test/test_option_lz4.c
 b/tar/test/test_option_lz4.c
+@@ -63,6 +63,13 @@ DEFINE_TEST(test_option_lz4)
+   "but no such program is available on this system.");
+   return;
+

[PATCH] gnu: Add coda.

2016-10-19 Thread Thomas Danckaert
This is a C library wich also presents a python interface.  It can be 
used just as well without python, so I've made python only a native 
input, not a regular input.  There's currently a non-determinism 
issue for the python interface, related to 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22533


I also tried to automatically generate the string 
“lib/python3.4/site-packages”, so it's updated automatically when the 
python version changes, but didn't manage to do that (for example I 
tried


  (version-major+minor (package-version python))

but the package variable “python” is not available when the build 
expression is turned into a derivation, as far as I understand it?). 
Advice welcome.


Thomas
>From edb38dfcc09afdef4279728c84d10688b9d0fc71 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert 
Date: Wed, 19 Oct 2016 11:44:33 +0200
Subject: [PATCH] gnu: Add coda.

* gnu/packages/maths.scm (coda): New variable.
---
 gnu/packages/maths.scm | 36 
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 07934e3..f28d8b4 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -113,6 +113,42 @@ interactive dialogs to guide them.")
(license license:gpl3+)
(home-page "http://www.gnu.org/software/c-graph/;)))
 
+(define-public coda
+  (package
+(name "coda")
+(version "2.17.3")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "https://github.com/stcorp/coda/releases/download/;
+   version "/coda-" version ".tar.gz"))
+   (sha256
+(base32 "04b9l3wzcix0mnfq77mwnil6cbr8h2mki8myvy0lzn236qcwaq1h"
+(native-inputs
+ `(("fortran" ,gfortran)
+   ("python" ,python)
+   ("python-numpy" ,python-numpy)))
+(inputs
+ `(("zlib" ,zlib)
+   ("hdf4" ,hdf4-alt)
+   ("hdf5" ,hdf5)))
+(build-system gnu-build-system)
+(arguments
+ '(#:configure-flags '("--with-hdf4" "--with-hdf5" "--enable-python")))
+(native-search-paths
+ (list (search-path-specification
+(variable "PYTHONPATH")
+(files '("lib/python3.4/site-packages")
+(synopsis "Common interface to various earth observation data formats")
+(description
+ "The Common Data Access toolbox (CODA) provides a set of interfaces for
+reading remote sensing data from earth observation data files.  These
+interfaces consist of command line applications, libraries, interfaces to
+scientific applications (such as IDL and MATLAB), and interfaces to
+programming languages (such as C, Fortran, Python, and Java).")
+(home-page "https://stcorp.nl/coda;)
+(license license:gpl2)))
+
 (define-public units
   (package
(name "units")
-- 
2.7.4



Re: [PATCH 3/7] gnu: Add r-biocviews.

2016-10-19 Thread Roel Janssen

Ricardo Wurmus writes:

> Roel Janssen  writes:
>
>> * gnu/packages/bioinformatics.scm (r-biocviews): New variable.
>> ---
>>  gnu/packages/bioinformatics.scm | 28 
>>  1 file changed, 28 insertions(+)
>>
>> diff --git a/gnu/packages/bioinformatics.scm 
>> b/gnu/packages/bioinformatics.scm
>> index 3d607cc..fa32075 100644
>> --- a/gnu/packages/bioinformatics.scm
>> +++ b/gnu/packages/bioinformatics.scm
>> @@ -5333,6 +5333,34 @@ CRAN, and (some) github packages.")
>>  the graph algorithms contained in the Boost library.")
>>  (license license:artistic2.0)))
>>  
>> +(define-public r-biocviews
>> +  (package
>> +(name "r-biocviews")
>> +(version "1.40.1")
>> +(source (origin
>> +  (method url-fetch)
>> +  (uri (bioconductor-uri "biocViews" version))
>> +  (sha256
>> +   (base32
>> +"1d1g06zwx3xhc07mdhs5x31730xw08fg3x73xyfj0qdy2ykww3f9"
>> +(properties
>> + `((upstream-name . "biocViews")))
>> +(build-system r-build-system)
>> +(propagated-inputs
>> + `(("r-biobase" ,r-biobase)
>> +   ("r-graph" ,r-graph)
>> +   ("r-rbgl" ,r-rbgl)
>> +   ("r-rcurl" ,r-rcurl)
>> +   ("r-xml" ,r-xml)
>> +   ("r-knitr" ,r-knitr)
>> +   ("r-runit" ,r-runit)))
>> +(home-page "http://bioconductor.org/packages/Biocviews;)
>> +(synopsis "Bioconductor structures for vocabularies and narratives of 
>> +views")
>
> I don’t know what this means.  Does this mean “data structures”?  What
> is a vocabulary or narrative in this case?

No, it means a structured way of describing things by keywords.  It is
an attempt at standardizing meta data to create a search function.  A
vocabulary is a stricter set of words to use for a purpose.  So, package
maintainers should use existing keywords when they reasonably fit
instead of creating new keywords who's meaning is almost identical to an
existing keyword.

Would the following synopsis and description be good?

>(synopsis "Bioconductor package categorization helper")
>(description "The purpose of biocViews is to create HTML pages that
> categorize packages in a Bioconductor package repository according to 
> keywords,
> also known as views, in a controlled vocabulary.")

Thanks for your effort and time.

Kind regards,
Roel Janssen



Re: [PATCH] Add scheme-bytestructures

2016-10-19 Thread Amirouche Boubekki
Updated the patch.

On Tue, Oct 18, 2016 at 4:28 PM Ludovic Courtès  wrote:

> Amirouche Boubekki  skribis:
>
> > On Mon, Oct 10, 2016 at 10:46 PM Ludovic Courtès  wrote:
> >
>

[...]


> >> Please let’s not list all the files.  :-)  Could it instead use
> >> something like (find-files "bytestructures" "\\.scm$")?
> >>
> >
> > The above is a subset of all files. Do you prefer to use `find-files` and
> > exclude some files?
>
> Whichever is the most concise and most maintainable approach (I suspect
> it’s ‘find-files’ + exclude specific files.)
>
> Ludo’.
>

find-files does the right thing, there is no need to filter what it returns.
From ea88bf4b53a63ba0d54f71622d055c32cd7e346e Mon Sep 17 00:00:00 2001
From: Amirouche 
Date: Sun, 9 Oct 2016 12:31:20 +0200
Subject: [PATCH] gnu: Add guile-bytestructures

* gnu/packages/guile.scm (guile-bytestructures): New variable.
---
 gnu/packages/guile.scm | 78 ++
 1 file changed, 78 insertions(+)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 43071e6..a03cb44 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -1267,4 +1267,82 @@ is no support for parsing block and inline level HTML.")
 (define-public guile2.2-commonmark
   (package-for-guile-2.2 guile-commonmark))
 
+(define-public guile-bytestructures
+  (package
+(name "guile-bytestructures")
+(version "20160726.53127f6")
+(source (origin
+  (method git-fetch)
+  (uri (git-reference
+(url "https://github.com/TaylanUB/scheme-bytestructures;)
+(commit "53127f608caf64b34fa41c389b2743b546fbe9da")))
+  (file-name (string-append name "-" version "-checkout"))
+  (sha256
+   (base32
+"0l4nx1vp9fkrgrgwjiycj7nx6wfjfd39rqamv4pmq7issi8mrywq"
+(build-system trivial-build-system)
+(arguments
+ `(#:modules ((guix build utils))
+   #:builder
+   (begin
+ (use-modules (guix build utils)
+  (ice-9 match)
+  (ice-9 popen)
+  (ice-9 rdelim))
+
+ (let* ((out (assoc-ref %outputs "out"))
+(guile (assoc-ref %build-inputs "guile"))
+(effective (read-line
+(open-pipe* OPEN_READ
+(string-append guile "/bin/guile")
+"-c" "(display (effective-version))")))
+(module-dir (string-append out "/share/guile/site/"
+   effective))
+(source (assoc-ref %build-inputs "source"))
+(doc (string-append out "/share/doc/scheme-bytestructures"))
+(scm-files (find-files "bytestructures" "\\.scm$"))
+(guild (string-append (assoc-ref %build-inputs "guile")
+  "/bin/guild")))
+   ;; Make installation directories.
+   (mkdir-p (string-append module-dir "/bytestructures/guile"))
+   (mkdir-p (string-append module-dir "/bytestructures/r6"))
+   (mkdir-p (string-append module-dir "/bytestructures/body"))
+   (mkdir-p doc)
+
+   ;; Compile .scm files and install.
+   (chdir source)
+   (setenv "GUILE_AUTO_COMPILE" "0")
+   (for-each (lambda (file)
+   (let* ((dest-file (string-append module-dir "/"
+file))
+  (go-file (string-append module-dir "/"
+  (substring file 0
+ (string-rindex file #\.))
+  ".go")))
+ ;; Install source module.
+ (copy-file file dest-file)
+ ;; Install compiled module.
+ (unless (zero? (system* guild "compile"
+ "-L" source
+ "-o" go-file
+ file))
+   (error (format #f "Failed to compile ~s to ~s!"
+  file go-file)
+ scm-files)
+
+   ;; Also copy over the README.
+   (install-file "README.md" doc)
+   #t
+(inputs
+ `(("guile" ,guile-2.0)))
+(home-page "https://github.com/TaylanUB/scheme-bytestructures;)
+(synopsis "Structured access to bytevector contents for Guile")
+(description
+ "Guile bytestructures offers a system imitating the type system
+of the C programming language, to be used on bytevectors.  C's type
+system works on raw memory, and Guile works 

Re: Guix on clusters and in HPC

2016-10-19 Thread Thomas Danckaert

From: l...@gnu.org (Ludovic Courtès)
Subject: Guix on clusters and in HPC
Date: Tue, 18 Oct 2016 16:20:43 +0200


So I’ve come up with an initial list of work items going from the
immediate needs to crazy ideas (batch scheduler integration!) that
hopefully make sense to cluster/HPC people.  I’d be happy to get
feedback, suggestions, etc. from whoever is interested!


Here's a semi-crazy suggestion: some HPC people really like the intel 
compiler/math kernel library, so a way to switch toolchains on 
packages, and somehow integrate “foreign” toolchains would suit them. 
But that might be “advocating the use of non-free software” (in fact 
I almost feel like a heretic for bringing this up :-) ...).


best,

Thomas


Re: 01/01: gnu: hdf4: Fix non-x86 architectures.

2016-10-19 Thread Thomas Danckaert

From: Andreas Enge 
Subject: Re: 01/01: gnu: hdf4: Fix non-x86 architectures.
Date: Tue, 18 Oct 2016 21:19:28 +0200


On Mon, Oct 17, 2016 at 04:49:47PM -0400, Mark H Weaver wrote:
Contrary to the commit log message, the only part of this that 
actually

made it into the patch was adding 'hdf4-architectures.patch'.  The
changes to local.mk and maths.scm were not included.


Indeed, this explains why the package still did not compile...
This is fixed in commit 15ca49b220b531864b9ac4d3dcbb218279ca0db3,
thanks a lot for the notice!

Andreas


Thanks to you both for the patches.

I see the arm build is complete now.  I'll wait for mips, and, if 
that succeeds, send the patch to the HDF4 maintainers (though I'd 
expect Debian has already done so?).


Thomas