Re: LVM support

2015-04-16 Thread Tomáš Čech

On Wed, Apr 15, 2015 at 02:32:14PM +0200, Ludovic Courtès wrote:

Tomáš Čech sleep_wal...@gnu.org skribis:


as project for my Hackweek in SUSE I decided to spend my time on LVM
support in GuixSD - something I miss greatly. This also means that
I'll have much less time for that after this week :(


Well this is nice already!


So far I spent time on reviving my GuixSD installation and preparing
staticly linked binaries for initrd. I have now lvm2 package with
extra output static.


Don’t worry about static linking or anything: you can use any package,
including dynamically-linked, and it will be magically added to the
initrd if needed.

Then as a second step, since that’ll probably be very big, you can work
on statically-linked variants of the relevant packages (as done for
‘e2fsck/static’.)


I did this already :)




Now the simplest way would be to simply call

vgchange --activate y

Matching configuration could be one configuration option:
(use-lvm?)


That would scan all block devices and look for LVM signature.

Pros:
- it's super simple!
Cons:
- if LVM with filesystem required at boot-time is not found, error
 is not detected or returned by LVM itself



Slightly bit more complicated way could be

vgchange --activate y volume_group_name

for every volume group defined in system configuration. Matching configuration 
could be
(logical-volume-groups '(system data))

e.g. specify list of volume group names used by system.

Pros:
- still simple
- if group activation fails, I can detect it and report it to user

Cons:
- some block devices with LVM may not be available at boot-time (like
 iSCSI devices accessible through network only or Luks devices
 available after entering password)

That is my current approach.



I could also specify whether it should be made available at boot time or not
(logical-volume-groups '('(system #t)
'(data   #f)))

(sorry for my poor Scheme taste here :)

Pros:
- with this I could say that volume group system should be activated
 at boot time, but data should be activated later.

Cons:
- starting to be more complicated - I need both initrd stage LVM
 activation and root filesystem stage LVM activation (implemented as
 service? which dependencies it has?)


Sorry I’m not really familiar with LVM.


It's implemented using device mapper but instead of mapping one block
device to another you map one block device to whole group (like
playground where you can do anything).




Technically, if LVM volumes are mapped devices, the best would be to
define a mapped-device-kind structure for them, as discussed on IRC
(like ‘luks-device-mapping’ in (gnu system).)


I didn't like the idea first because it felt confusing and
unatural. Words like `mapping' and `source' and `target' are
misleading. But from programming POV it seems to be the easisest
approach in the end.

(define-record-type* mapped-device mapped-device
 make-mapped-device
 mapped-device?
 (sourcemapped-device-source);string
 (targetmapped-device-target);string
 (type  mapped-device-type)) ;mapped-device-kind
	  
`source' will be ignored (I not only don't need it but I don't even

know how to pass it or what it should do). `target' will be used for
volume group name. mapped-device-kind structure is easily applicable.


On the other hand problem starts with need-for-boot?. Device mapped
device will be activated during the boot (which is desirable for LVM)
only if there is filesystem which uses such device and has
`need-for-boot?' set to #t.

I needed to tweak operating-system-boot-mapped-devices to not filter
mappings of the new type at all. Now it seems to generate initrd
capable of booting root filesystem from LVM :)

The thing is that this design is not nice. I always admired Scheme's
power in expressing things naturally. mapped-device interface is for
mapping 1 block device to 1 block device which will contain 1
filesystem.


Design I'm thinking about would follow file-system structure. For
device property (I'm not sure if this is proper word in Scheme for
item of record type) to define functions like `partition' (disk,
number), `mapped-device' (source, target, type), `logical-volume' (group,
volume) and whatever would be needed further. You could then express
your mount in more powerful way like:

(partition sda 1)

(mapped-device
 (partition sda 2)
 encrypted_swap
 luks-mapping-type)

(logical-volume
 system_group
 root)


(mapped-device
 (logical-volume some_group some_volume)
 encrypted data
 luks-mapping-type)

etc.


Of course, it would lead to more complicated code to handle such
configuration, but it would definitely feel more natural.

When other block device type (like iSCSI) would be required, just
another function (or whatever it is) would be implemented.

Please don't tell me 'this is not how Guix works' :)

Best regards,

S_W



Re: [PATCH] Add FASTX Toolkit.

2015-04-16 Thread Ricardo Wurmus

Ludovic Courtès writes:

 Ricardo Wurmus ricardo.wur...@mdc-berlin.de skribis:

 fastx-toolkit installs three m4 files to $out/share/aclocal, and
 libgtextutils installs an empty $out/share/aclocal directoy.  I
 reported this upstream, but I did not add a phase to remove these files,
 because I think it's not a big deal.  Is this okay or should I modify
 the sources to avoid installing these files?

 What’s wrong with these files?  It looks fine to me, and it’s the
 standard directory for Autoconf macros.  So no problem IMO.  :-)

They are not necessary to use fastx-toolkit, so I'd rather avoid the
clutter.  The author seems to agree and is willing to accept patches to
fix this.

 +(home-page http://hannonlab.cshl.edu/fastx_toolkit;)

 Maybe the github.com URL?

Okay.

I pushed the two commits with the suggested changes.  Thanks for the
review!

~~ Ricardo





Re: [PATCH] gnu: Add Biopython.

2015-04-16 Thread Andreas Enge
On Thu, Apr 16, 2015 at 10:46:11AM +0200, Ricardo Wurmus wrote:
   http://www.biopython.org/DIST/LICENSE

It starts like this:
Permission to use, copy, modify, and distribute this software and its
documentation with or without modifications and for any purpose and
without fee is hereby granted

Does the provision without fee make it non-free?

Otherwise, I think you could use non-copyleft (which takes additional
arguments just like x11-style).

Andreas




[PATCH] gnu: Add subread.

2015-04-16 Thread Ricardo Wurmus
From fd34c03a72d280bc623af5edfc2a28a570c26784 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus ricardo.wur...@mdc-berlin.de
Date: Thu, 16 Apr 2015 11:19:45 +0200
Subject: [PATCH] gnu: Add subread.

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 0fd6c0c..7da6c75 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1444,6 +1444,45 @@ sequences.)
 ;; STAR is licensed under GPLv3 or later; htslib is MIT-licensed.
 (license license:gpl3+)))
 
+(define-public subread
+  (package
+(name subread)
+(version 1.4.6-p2)
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+mirror://sourceforge/subread/subread-
+version -source.tar.gz))
+  (sha256
+   (base32
+06sv9mpcsdj6p68y15d6gi70lca3lxmzk0dn61hg0kfsa7rxmsr3
+(build-system gnu-build-system)
+(arguments
+ `(#:tests? #f ;no check target
+   #:make-flags '(-f Makefile.Linux)
+   #:phases
+   (alist-cons-after
+'unpack 'enter-dir
+(lambda _ (chdir src) #t)
+(alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+   (let ((bin (string-append (assoc-ref outputs out) /bin/)))
+ (mkdir-p bin)
+ (copy-recursively ../bin bin)))
+ ;; no configure script
+ (alist-delete 'configure %standard-phases)
+(inputs `((zlib ,zlib)))
+(home-page http://bioinf.wehi.edu.au/subread-package/;)
+(synopsis Tool kit for processing next-gen sequencing data)
+(description
+ The subread package contains the following tools: subread aligner, a
+general-purpose read aligner; subjunc aligner: detecting exon-exon junctions
+and mapping RNA-seq reads; featureCounts: counting mapped reads for genomic
+features; exactSNP: a SNP caller that discovers SNPs by testing signals
+against local background noises.)
+(license license:gpl3+)))
+
 (define-public shogun
   (package
 (name shogun)
-- 
2.1.0




Re: [PATCH] gnu: Add Biopython.

2015-04-16 Thread Ricardo Wurmus

Ludovic Courtès writes:

 Ricardo Wurmus ricardo.wur...@mdc-berlin.de skribis:

 From ca3474b1a639e43d708aad4385057cd84e3cce8b Mon Sep 17 00:00:00 2001
 From: Ricardo Wurmus ricardo.wur...@mdc-berlin.de
 Date: Wed, 15 Apr 2015 17:46:35 +0200
 Subject: [PATCH] gnu: Add Biopython.

 * gnu/packages/bioinformatics.scm (python-biopython, python2-biopython): New
   variables.

 [...]

 +(home-page http://biopython.org/;)
 +(synopsis Set of tools for biological computation in Python)

 s/Set of//

Okay.

 +(description
 + Biopython is a set of tools for biological computation written in 
 Python
 +by an international team of developers.)

 What about removing “written ...” and instead giving a few keywords of
 the features/algorithms it implements?

I've changed the description to this:

 Biopython is a set of tools for biological computation including parsers
for bioinformatics files into Python data structures; interfaces to common
bioinformatics programs; a standard sequence class and tools for performing
common operations on them; code to perform data classification; code for
dealing with alignments; code making it easy to split up parallelizable tasks
into separate processes; and more.

After checking the license again, I have doubts whether it really is
Expat.  The wording of the license differs from that of the Expat
license, though the meaning is very similar.

  http://www.biopython.org/DIST/LICENSE
  http://directory.fsf.org/wiki/License:Expat

FWIW, Fedora names the license MIT in their python-biopython package.
Is it really okay for me to use license:expat or should I use a
different one?

~~ Ricardo



Re: LVM support

2015-04-16 Thread Ludovic Courtès
Tomáš Čech sleep_wal...@gnu.org skribis:

 On Wed, Apr 15, 2015 at 02:32:14PM +0200, Ludovic Courtès wrote:

[...]

Sorry I’m not really familiar with LVM.

 It's implemented using device mapper but instead of mapping one block
 device to another you map one block device to whole group (like
 playground where you can do anything).

What do you mean by “whole group”?  A tree under /dev/mapper?

Technically, if LVM volumes are mapped devices, the best would be to
define a mapped-device-kind structure for them, as discussed on IRC
(like ‘luks-device-mapping’ in (gnu system).)

 I didn't like the idea first because it felt confusing and
 unatural. Words like `mapping' and `source' and `target' are
 misleading. But from programming POV it seems to be the easisest
 approach in the end.

I would think the terms are pretty descriptive, esp. when looking at the
corresponding section of the manual, but I’m biased.  ;-)

Now, my understanding of your message is not so much that the terms are
misleading, but rather that the abstraction is bogus (which appears to
be the case based on what you say.)

 On the other hand problem starts with need-for-boot?. Device mapped
 device will be activated during the boot (which is desirable for LVM)
 only if there is filesystem which uses such device and has
 `need-for-boot?' set to #t.

Right.  I was hesitant about this approach actually, see 9cb426b8.

 I needed to tweak operating-system-boot-mapped-devices to not filter
 mappings of the new type at all. Now it seems to generate initrd
 capable of booting root filesystem from LVM :)

Nice!  Could you post your working version of the patch, just to make
things more concrete?

 The thing is that this design is not nice. I always admired Scheme's
 power in expressing things naturally. mapped-device interface is for
 mapping 1 block device to 1 block device which will contain 1
 filesystem.

Understood.  This has nothing to do with Scheme, really.  :-)

 Design I'm thinking about would follow file-system structure. For
 device property (I'm not sure if this is proper word in Scheme for
 item of record type) to define functions like `partition' (disk,
 number), `mapped-device' (source, target, type), `logical-volume' (group,
 volume) and whatever would be needed further. You could then express
 your mount in more powerful way like:

 (partition sda 1)

 (mapped-device
  (partition sda 2)
  encrypted_swap
  luks-mapping-type)

 (logical-volume
  system_group
  root)


 (mapped-device
  (logical-volume some_group some_volume)
  encrypted data
  luks-mapping-type)

 etc.

I see.  Looks good!

Does the volume some_group/some_volume have an associated /dev node or
tree?  What does it look like?

Really a detail, but I think /dev/sda2 or (partition /dev/sda2) is
enough; no need to abstract it, IMO, since device node name is up to the
user.

 Of course, it would lead to more complicated code to handle such
 configuration, but it would definitely feel more natural.

 When other block device type (like iSCSI) would be required, just
 another function (or whatever it is) would be implemented.

Anything special about iSCSI?  I would expect iSCSI partitions/disks to
just have block devices as usual, no?

Thank you!

Ludo’.



[PATCH 3/3] gnu: mig: Update to 1.5

2015-04-16 Thread Manolis Ragkousis

From 05a4b3418891609f30ac5ec7c84f1f79b1d99b6c Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis manolis...@gmail.com
Date: Thu, 16 Apr 2015 14:00:17 +0300
Subject: [PATCH 3/3] gnu: mig: Update to 1.5

* gnu/packages/hurd.scm (mig): Update to version 1.5.
---
 gnu/packages/hurd.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index d4d513e..5115609 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -63,7 +63,7 @@
 (define-public mig
   (package
 (name mig)
-(version 1.4)
+(version 1.5)
 (source
  (origin
   (method url-fetch)
@@ -71,7 +71,7 @@
   version .tar.gz))
   (sha256
(base32
-1jgzggnbp22sa8z5dilm43zy12vlf1pjxfb3kh13xrfhcay0l97b
+13r1pg8icyc0pl082z7k36i440pr1f3nr7ahig3rrc0r7qndqmk9
 (build-system gnu-build-system)
 (inputs `((gnumach-headers ,gnumach-headers)))
 (native-inputs
-- 
2.3.5



Re: [PATCH 1/3] gnu: gnumach-headers: Update to 1.5

2015-04-16 Thread Ludovic Courtès
Manolis Ragkousis manolis...@gmail.com skribis:

 If you are okay with that, I will push them to master.

Sure, OK for all 3 patches!

Ludo’.



Re: [PATCH] gnu: Add Biopython.

2015-04-16 Thread John Darrington
On Thu, Apr 16, 2015 at 11:00:30AM +0200, Andreas Enge wrote:
 
 It starts like this:
 Permission to use, copy, modify, and distribute this software and its
 documentation with or without modifications and for any purpose and
 without fee is hereby granted
 
 Does the provision without fee make it non-free?
 
I don't think it does.

From a native English speaker's perspective, I think it is free.  It 
says for any purpose.Ipso facto, any purpose embraces for the purpose
of pecuniary gain through charges for distribution.

The important words are: Permission ... without fee ... is hereby granted.
In other words, the licensor does not demand a fee before granting that 
permission.
If it had said Permission ... upon payment of fee ... will be granted. Then 
that
would have made the thing non-free.

I think the confusion is arising because some people might interpret 
for any purpose and without fee to mean: for any purpose except distribution 
in exchange for a fee ...

Maybe the licensors should amend the text just to avoid this possible 
misunderstanding, but in the meantime I don't think it is a problem.

(I am not a lawyer.  But I am also not illiterate.)

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature


[PATCH 1/3] gnu: gnumach-headers: Update to 1.5

2015-04-16 Thread Manolis Ragkousis
If you are okay with that, I will push them to master.
From 2fc2e412ee60c9b520ea264010c1b060212ddb7f Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis manolis...@gmail.com
Date: Thu, 16 Apr 2015 13:09:02 +0300
Subject: [PATCH 1/3] gnu: gnumach-headers: Update to 1.5

* gnu/packages/hurd.scm (gnumach-headers): Update to version 1.5.
---
 gnu/packages/hurd.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 8ac78d3..901a173 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -29,7 +29,7 @@
 (define-public gnumach-headers
   (package
 (name gnumach-headers)
-(version 1.4)
+(version 1.5)
 (source
  (origin
   (method url-fetch)
@@ -37,7 +37,7 @@
   version .tar.gz))
   (sha256
(base32
-0r371wsm7imx356p0xsls5hifb1gf9y90rm1phr0qkahbmfk9hlv
+0wsf57q4h6xl2jn28d423qx7zplmhpnf9ssm4f1c0sf8513xm81j
 (build-system gnu-build-system)
 (arguments
 `(#:phases (alist-replace
-- 
2.3.5



[PATCH 2/3] gnu: hurd-headers: Update to 0.6

2015-04-16 Thread Manolis Ragkousis

From 26324bbff65fbae21cabd7ff87cacd6f70100184 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis manolis...@gmail.com
Date: Thu, 16 Apr 2015 13:51:55 +0300
Subject: [PATCH 2/3] gnu: hurd-headers: Update to 0.6

* gnu/packages/hurd.scm (hurd-headers): Update to version 0.6.
---
 gnu/packages/hurd.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 901a173..d4d513e 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -92,14 +92,14 @@ communication.)
 (define-public hurd-headers
   (package
 (name hurd-headers)
-(version 0.5)
+(version 0.6)
 (source (origin
   (method url-fetch)
   (uri (string-append mirror://gnu/hurd/hurd-
   version .tar.gz))
   (sha256
(base32
-0lvkz3r0ngb4bsn2hzdc9vjpyrfa3ls36jivrvy1n7f7f55zan7q
+059lbspbpcjpcq5jf98f47jw9sm0ngs3x6phxax53m3rwca1fk7y
 (build-system gnu-build-system)
 (native-inputs
  `(;; Autoconf shouldn't be necessary but there seems to be a bug in the
-- 
2.3.5



Re: [PATCH] gnu: Add Biopython.

2015-04-16 Thread Ludovic Courtès
Andreas Enge andr...@enge.fr skribis:

 On Thu, Apr 16, 2015 at 10:46:11AM +0200, Ricardo Wurmus wrote:
   http://www.biopython.org/DIST/LICENSE

 It starts like this:
 Permission to use, copy, modify, and distribute this software and its
 documentation with or without modifications and for any purpose and
 without fee is hereby granted

 Does the provision without fee make it non-free?

Good point, you may be right.  Biopython is in Debian and derivatives
AFAICS though, but it could have slipped through the cracks.

Ricardo: could you check with licens...@gnu.org?

We’ll have to await an answer.

Thanks,
Ludo’.



[PATCH] gnu: Add gitolite.

2015-04-16 Thread David Thompson
Gitolite is a lightweight tool for managing access control to Git
repositories.  We use it at the FSF and it works pretty well.

AFAICT, I've managed to avoid propogating Perl, but I have to propagate
OpenSSH and Git for now.  They are referenced in too many scripts in too
many ways for a regexp substitution to do a good job.  Fixing this
requires working with the upstream maintainers, I think.

From 12a8ab427800a004059c847742fa40bf35de1bb2 Mon Sep 17 00:00:00 2001
From: David Thompson da...@gnu.org
Date: Thu, 16 Apr 2015 03:23:52 -0400
Subject: [PATCH] gnu: Add gitolite.

* gnu/packages/version-control.scm (gitolite): New variable.
* gnu/packages/patches/gitolite-openssh-6.8-compat.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am  |  1 +
 .../patches/gitolite-openssh-6.8-compat.patch  | 25 ++
 gnu/packages/version-control.scm   | 58 ++
 3 files changed, 84 insertions(+)
 create mode 100644 gnu/packages/patches/gitolite-openssh-6.8-compat.patch

diff --git a/gnu-system.am b/gnu-system.am
index c581d79..967033b 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -414,6 +414,7 @@ dist_patch_DATA =		\
   gnu/packages/patches/flex-bison-tests.patch			\
   gnu/packages/patches/gawk-shell.patch\
   gnu/packages/patches/gcc-cross-environment-variables.patch	\
+  gnu/packages/patches/gitolite-openssh-6.8-compat.patch	\
   gnu/packages/patches/glib-tests-desktop.patch			\
   gnu/packages/patches/glib-tests-homedir.patch			\
   gnu/packages/patches/glib-tests-prlimit.patch			\
diff --git a/gnu/packages/patches/gitolite-openssh-6.8-compat.patch b/gnu/packages/patches/gitolite-openssh-6.8-compat.patch
new file mode 100644
index 000..d9dbc87
--- /dev/null
+++ b/gnu/packages/patches/gitolite-openssh-6.8-compat.patch
@@ -0,0 +1,25 @@
+From ed807a40c6683960e357bc995b3acf721ec088b4 Mon Sep 17 00:00:00 2001
+From: Sitaram Chamarty sita...@atc.tcs.com
+Date: Thu, 19 Mar 2015 05:17:59 +0530
+Subject: [PATCH] openssh 6.8 compat
+
+---
+ src/triggers/post-compile/ssh-authkeys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/triggers/post-compile/ssh-authkeys b/src/triggers/post-compile/ssh-authkeys
+index 84dda73..d5f5d8b 100755
+--- a/src/triggers/post-compile/ssh-authkeys
 b/src/triggers/post-compile/ssh-authkeys
+@@ -115,7 +115,7 @@ sub fp_file {
+ my $f  = shift;
+ my $fp = `ssh-keygen -l -f '$f'`;
+ chomp($fp);
+-_die fingerprinting failed for '$f' unless $fp =~ /([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f])+)/;
++_die fingerprinting failed for '$f' unless $fp =~ /([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f])+)/ or $fp =~ m(SHA256:([A-ZA-z0-9+/]+));
+ $fp = $1;
+ return $fp;
+ }
+-- 
+2.2.1
+
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 48e16a1..c22950b 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -48,6 +48,7 @@
   #:use-module (gnu packages nano)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages openssl)
+  #:use-module (gnu packages ssh)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -401,6 +402,63 @@ linear.  It will test every change between two points in the DAG.  It will
 also walk each side of a merge and test those changes individually.)
   (license (x11-style file://LICENSE)
 
+(define-public gitolite
+  (package
+(name gitolite)
+(version 3.6.2)
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+https://github.com/sitaramc/gitolite/archive/v;
+version .tar.gz))
+  (file-name (string-append name - version .tar.gz))
+  ;; Commit ed807a4 upstream
+  (patches (list (search-patch gitolite-openssh-6.8-compat.patch)))
+  (sha256
+   (base32
+1gsgzi9ayb4rablki3mqr11b0h8db4xg43df660marfpacmkfb01
+(build-system gnu-build-system)
+(arguments
+ '(#:tests? #f ; no tests
+   #:phases (modify-phases %standard-phases
+  (delete configure)
+  (delete build)
+  (add-before install patch-scripts
+(lambda* (#:key inputs #:allow-other-keys)
+  (let ((perl (string-append (assoc-ref inputs perl)
+ /bin/perl)))
+;; This seems to take care of every shell script that
+;; calls Perl.
+(substitute* (find-files . .*)
+  (( perl -)
+   (string-append   perl  -))
+  (replace install
+(lambda* (#:key outputs #:allow-other-keys)
+  (let* ((output (assoc-ref outputs out))
+ (sharedir 

Re: [PATCH] gnu: Add Biopython.

2015-04-16 Thread Ricardo Wurmus

Ludovic Courtès writes:

 Andreas Enge andr...@enge.fr skribis:

 On Thu, Apr 16, 2015 at 10:46:11AM +0200, Ricardo Wurmus wrote:
   http://www.biopython.org/DIST/LICENSE

 It starts like this:
 Permission to use, copy, modify, and distribute this software and its
 documentation with or without modifications and for any purpose and
 without fee is hereby granted

 Does the provision without fee make it non-free?

 Good point, you may be right.  Biopython is in Debian and derivatives
 AFAICS though, but it could have slipped through the cracks.

 Ricardo: could you check with licens...@gnu.org?

Sure, I'll write them and post an update here when I get a reply.

~~ Ricardo



Re: [PATCH] gnu: Add Biopython.

2015-04-16 Thread Ludovic Courtès
John Darrington j...@darrington.wattle.id.au skribis:

 On Thu, Apr 16, 2015 at 11:00:30AM +0200, Andreas Enge wrote:
  
  It starts like this:
  Permission to use, copy, modify, and distribute this software and its
  documentation with or without modifications and for any purpose and
  without fee is hereby granted
  
  Does the provision without fee make it non-free?
  
 I don't think it does.

 From a native English speaker's perspective, I think it is free.  It 
 says for any purpose.Ipso facto, any purpose embraces for the purpose
 of pecuniary gain through charges for distribution.

 The important words are: Permission ... without fee ... is hereby granted.
 In other words, the licensor does not demand a fee before granting that 
 permission.
 If it had said Permission ... upon payment of fee ... will be granted. Then 
 that
 would have made the thing non-free.

Oooh.  IOW “without fee” applies to “Permission”, not to “to use, copy,
modify, and distribute”, right?

That makes sense.  I think I was fooled in the past by similar wording.

Does it sound like 100% non-ambiguous to native speakers reading here?

Thanks,
Ludo’.



[PATCH] gnu: Add eXpress.

2015-04-16 Thread Ricardo Wurmus
From 16e9535b2dad21cd585b6da94296f94164103de0 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus ricardo.wur...@mdc-berlin.de
Date: Thu, 16 Apr 2015 15:16:57 +0200
Subject: [PATCH 1/2] gnu: Add bamtools.

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 7da6c75..1e665ba 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -46,6 +46,29 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages zip))
 
+(define-public bamtools
+  (package
+(name bamtools)
+(version 2.3.0)
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+https://github.com/pezmaster31/bamtools/archive/v;
+version .tar.gz))
+  (file-name (string-append name - version .tar.gz))
+  (sha256
+   (base32
+1brry29bw2xr2l9pqn240rkqwayg85b8qq78zk2zs6nlspk4d018
+(build-system cmake-build-system)
+(arguments `(#:tests? #f)) ;no check target
+(inputs `((zlib ,zlib)))
+(home-page https://github.com/pezmaster31/bamtools;)
+(synopsis C++ API and command-line toolkit for working with BAM data)
+(description
+ BamTools provides both a C++ API and a command-line toolkit for handling
+BAM files.)
+(license license:expat)))
+
 (define-public bedops
   (package
 (name bedops)
-- 
2.1.0

From c65294547718078189bc920be8e5b07d57470060 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus ricardo.wur...@mdc-berlin.de
Date: Thu, 16 Apr 2015 15:18:10 +0200
Subject: [PATCH 2/2] gnu: Add eXpress.

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1e665ba..bb31107 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -28,6 +28,7 @@
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages file)
   #:use-module (gnu packages java)
@@ -37,6 +38,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages swig)
@@ -530,6 +532,51 @@ file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.)
 other types of unwanted sequence from high-throughput sequencing reads.)
 (license license:expat)))
 
+(define-public express
+  (package
+(name express)
+(version 1.5.1)
+(source (origin
+  (method url-fetch)
+  (uri
+   (string-append
+http://bio.math.berkeley.edu/eXpress/downloads/express-;
+version /express- version -src.tgz))
+  (sha256
+   (base32
+03rczxd0gjp2l1jxcmjfmf5j94j77zqyxa6x063zsc585nj40n0c
+(build-system cmake-build-system)
+(arguments
+ `(#:tests? #f ;no check target
+   #:phases
+   (alist-cons-after
+'unpack 'use-shared-boost-libs-and-set-bamtools-paths
+(lambda* (#:key inputs #:allow-other-keys)
+  (substitute* CMakeLists.txt
+((set\\(Boost_USE_STATIC_LIBS ON\\))
+ set(Boost_USE_STATIC_LIBS OFF))
+((\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/bamtools/include)
+ (string-append (assoc-ref inputs bamtools) /include/bamtools)))
+  (substitute* src/CMakeLists.txt
+((\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/\\.\\./bamtools/lib)
+ (string-append (assoc-ref inputs bamtools) /lib/bamtools)))
+  #t)
+%standard-phases)))
+(inputs
+ `((boost ,boost)
+   (bamtools ,bamtools)
+   (protobuf ,protobuf)
+   (zlib ,zlib)))
+(home-page http://bio.math.berkeley.edu/eXpress;)
+(synopsis Streaming quantification for high-throughput genomic sequencing)
+(description
+ eXpress is a streaming tool for quantifying the abundances of a set of
+target sequences from sampled subsequences.  Example applications include
+transcript-level RNA-Seq quantification, allele-specific/haplotype expression
+analysis (from RNA-Seq), transcription factor binding quantification in
+ChIP-Seq, and analysis of metagenomic data.)
+(license license:artistic2.0)))
+
 (define-public fastx-toolkit
   (package
 (name fastx-toolkit)
-- 
2.1.0



core-updates merge really imminent

2015-04-16 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) skribis:

 If there are no objections, we’ll let Hydra build all of ‘core-updates’
 and merge it afterwards–i.e., within 2-3 days.

Ahem, sometimes, days last real long.

But we’re getting there!  http://hydra.gnu.org/jobset/gnu/core-updates
shows that most things are built.  The remaining noticeable failures
are: Qt 5 (6 packages depend on it; Qt 4 is fine), Numpy, and a few MIPS
issues.

  http://hydra.gnu.org/eval/103845#tabs-still-fail

Yesterday, Mark found a bug in the new ld-wrapper whereby, when used in
a user profile (via the ‘gcc-toolchain’ package), it would incorrectly
flag ~/.guix-profile/lib/libfoo.so as “impure.”

To work around that ‘gcc-toolchain’ is now using a fixed ld-wrapper
(commit 77db91a), meaning that we don’t have to rebuild the world right
away (although it would be good to do so for the release IMO.)

Long story short: I’ll merge tomorrow if there are no strong objections.
Please fix the remaining packages!

Thanks,
Ludo’.



Re: LVM support

2015-04-16 Thread Tomáš Čech

On Thu, Apr 16, 2015 at 02:47:52PM +0200, Ludovic Courtès wrote:

Tomáš Čech sleep_wal...@gnu.org skribis:


On Wed, Apr 15, 2015 at 02:32:14PM +0200, Ludovic Courtès wrote:


[...]


Sorry I’m not really familiar with LVM.


It's implemented using device mapper but instead of mapping one block
device to another you map one block device to whole group (like
playground where you can do anything).


What do you mean by “whole group”?  A tree under /dev/mapper?


From device node POV it generates
/dev/volume_group_name/logical_volume_name and it also creates
/dev/mapper/volume_group_name-logical_volume_name and
/dev/dm-number.

From block device perspective it adds another level of partitioning
to physical volume partitions. You gather block devices (can be
partitions, disks, anything), create volume group to join the space
into one entity and then create logical volumes without caring where
it really is. Logical volumes are useful for resizing, adding and
removing filesystems - it has always the same device node.





Technically, if LVM volumes are mapped devices, the best would be to
define a mapped-device-kind structure for them, as discussed on IRC
(like ‘luks-device-mapping’ in (gnu system).)


I didn't like the idea first because it felt confusing and
unatural. Words like `mapping' and `source' and `target' are
misleading. But from programming POV it seems to be the easisest
approach in the end.


I would think the terms are pretty descriptive, esp. when looking at the
corresponding section of the manual, but I’m biased.  ;-)


I meant in LVM context of course.


Now, my understanding of your message is not so much that the terms are
misleading, but rather that the abstraction is bogus (which appears to
be the case based on what you say.)


On the other hand problem starts with need-for-boot?. Device mapped
device will be activated during the boot (which is desirable for LVM)
only if there is filesystem which uses such device and has
`need-for-boot?' set to #t.


Right.  I was hesitant about this approach actually, see 9cb426b8.


Ah, OK, I didn't updated since I started to work on LVM.


I needed to tweak operating-system-boot-mapped-devices to not filter
mappings of the new type at all. Now it seems to generate initrd
capable of booting root filesystem from LVM :)


Nice!  Could you post your working version of the patch, just to make
things more concrete?


I attach patch to this mail.


The thing is that this design is not nice. I always admired Scheme's
power in expressing things naturally. mapped-device interface is for
mapping 1 block device to 1 block device which will contain 1
filesystem.


Understood.  This has nothing to do with Scheme, really.  :-)


Design I'm thinking about would follow file-system structure. For
device property (I'm not sure if this is proper word in Scheme for
item of record type) to define functions like `partition' (disk,
number), `mapped-device' (source, target, type), `logical-volume' (group,
volume) and whatever would be needed further. You could then express
your mount in more powerful way like:

(partition sda 1)

(mapped-device
 (partition sda 2)
 encrypted_swap
 luks-mapping-type)

(logical-volume
 system_group
 root)


(mapped-device
 (logical-volume some_group some_volume)
 encrypted data
 luks-mapping-type)

etc.


I see.  Looks good!

Does the volume some_group/some_volume have an associated /dev node or
tree?  What does it look like?


Yes, it does, I described above.


Really a detail, but I think /dev/sda2 or (partition /dev/sda2) is
enough; no need to abstract it, IMO, since device node name is up to the
user.


Well, I faced situations where such freedom of expression would be
handy, but there were rare. sda says that it is the first found scsi
device in the system but it doesn't say anything about accessibility
of the device (`local-disk' should be introduced as well I think).


Of course, it would lead to more complicated code to handle such
configuration, but it would definitely feel more natural.

When other block device type (like iSCSI) would be required, just
another function (or whatever it is) would be implemented.


Anything special about iSCSI?  I would expect iSCSI partitions/disks to
just have block devices as usual, no?


Yes, but when you have root filesystem on iSCSI, you need to perform
other actions to make that block device available as with device
mapping or LVM...

(You need to configure and establish connection to iSCSI target.)



Ad the progress - current state of the patch is that it should work
for filesystems mounted from initrd. And is ugly.

As I understand the problem, created device nodes are missing after
switch-root and it seems it tried to mount filesystems before starting
eudev. I'll have a look on that again after some sleep.

Thank you for your comments.

S_W

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index caec80f..18d1f06 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ 

[PATCH] gnu: Add libsrtp.

2015-04-16 Thread David Hashe
* gnu/packages/telephony.scm (libsrtp): New variable.
---
 gnu/packages/telephony.scm | 24 
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index b9e38c3..4506690 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 John Darrington j...@gnu.org
 ;;; Copyright © 2015 Andreas Enge andr...@enge.fr
+;;; Copyright © 2015 David Hashe david.ha...@dhashe.com
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +21,7 @@
 (define-module (gnu packages telephony)
   #:use-module (gnu packages)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
   #:use-module (guix licenses)
   #:use-module (guix packages)
@@ -183,3 +185,25 @@ internet.)
(license gpl3+)
(home-page http://www.gnu.org/software/sipwitch;)))
 
+(define-public libsrtp
+  (package
+(name libsrtp)
+(version 1.5.2)
+(source (origin
+ (method url-fetch)
+ (uri (string-append https://github.com/cisco/libsrtp/archive/v;
+  version .tar.gz))
+ (sha256
+  (base32
+   1njf62f6sazz2q7qc4j495v1pga385whkmxxyr8hfz1ragiyzqc6
+(native-inputs
+ `((procps ,procps)))
+(build-system gnu-build-system)
+(arguments
+ `(#:test-target runtest))
+(synopsis Secure RTP (SRTP) Reference Implementation)
+(description This package provides an implementation of the Secure
+Real-time Transport Protocol (SRTP), the Universal Security Transform (UST),
+and a supporting cryptographic kernel.)
+(home-page https://github.com/cisco/libsrtp;)
+(license bsd-3)))
-- 
1.9.1