Re: [PATCH 1/7] guix: git: Support shallow git clones if a tag is available

2015-10-26 Thread Andy Wingo
Hi,

On Sun 25 Oct 2015 21:30, l...@gnu.org (Ludovic Courtès) writes:

> Christopher Allan Webber  skribis:
>
>> Ludovic Courtès writes:
>>
>>> Andy Wingo  skribis:
>>>
 * guix/build/git.scm (git-fetch): Instead of cloning the remote repo, use 
 the
   lower-level "init" / "fetch" / "checkout" operations.  This lets us make 
 a
   shallow checkout if we are checking out a tag.

 * guix/git-download.scm (): Add tag field.
   (git-fetch): Support git references with tags but no commits.
>>>
>>> This sounds like a nice improvement.  Please move the “This lets us”
>>> sentence to a comment, and drop the newline between entries.
>>
>> This does look like a nice improvement!  It seems like it kind of got
>> dropped on the floor.  Is there still interest?
>
> Yes!  Would you like to look into it?  :-)

I can do it :)  I just rebased and updated after a couple months, and so
I have the patch fresh :)  Sorry for the delay; I am a creature of habit
and using Guix on the machine with that patch broke all my habits :P

Andy



Re: [PATCH] build-system/haskell: CONFIG_SHELL env variable.

2015-10-26 Thread Paul van der Walt
Hey Ludo,

On 2015-10-25 at 22:58, quoth Ludovic Courtès:
>> * gnu/packages/haskell.scm (ghc-network): Remove CONFIG_SHELL patch.
>> * gnu/packages/haskell.scm (ghc-old-time): Remove CONFIG_SHELL patch.
>> * gnu/packages/haskell.scm (ghc-sdl-image): Remove CONFIG_SHELL patch.
>> * gnu/packages/haskell.scm (ghc-sdl-mixer): Remove CONFIG_SHELL patch.
>> * gnu/packages/haskell.scm (ghc-sdl): Remove CONFIG_SHELL patch.
>> * gnu/packages/haskell.scm (ghc-unix-time): Remove CONFIG_SHELL patch.
>> * gnu/packages/haskell.scm (ghc-x11): Remove CONFIG_SHELL patch.
>
> Please use the shorter style, and mention the “syntactical” change:
>
>   * gnu/packages/haskell.scm (ghc-network, ghc-old-time,
> ghc-sdl-image)[arguments]: Remove 'fix-/bin/sh’ phase.
>
> Apart from this, LGTM.

Thank you; fixed and pushed! :)

p.



Re: Environment containers

2015-10-26 Thread Daniel Pimentel

It's great!

Thanks,

--
Daniel Pimentel (d4n1 3:)



Re: [PATCH 2/2] gnu: Add Mlucas.

2015-10-26 Thread Paul van der Walt
Hello Alex,

On 2015-10-25 at 07:12, quoth Alex Vong:
> Subject: [PATCH 2/2] gnu: Add Mlucas.
>
> ...
> 
> * gnu/packages/mlucas.scm: New file.

I'm not an expert, and i'm not 100% sure on this so it's an honest
question, but does this application really deserve a new package file?
Shouldn't mlucas perhaps be added to maths.scm?

Cheers,
p.



Re: [PATCH 2/2] gnu: Add Mlucas.

2015-10-26 Thread Alex Vong
Hi Paul,

I don't know there is maths.scm! Is there a general guideline on where
to put new package definition? For example, putting elisp packages in
emacs.scm is pretty obvious but how about other cases?

Cheers,
Alex

On 26/10/2015, Paul van der Walt  wrote:
> Hello Alex,
>
> On 2015-10-25 at 07:12, quoth Alex Vong:
>> Subject: [PATCH 2/2] gnu: Add Mlucas.
>>
>> ...
>>
>> * gnu/packages/mlucas.scm: New file.
>
> I'm not an expert, and i'm not 100% sure on this so it's an honest
> question, but does this application really deserve a new package file?
> Shouldn't mlucas perhaps be added to maths.scm?
>
> Cheers,
> p.
>



Re: [PATCH 2/2] gnu: Add Mlucas.

2015-10-26 Thread Paul van der Walt

On 2015-10-26 at 12:49, quoth Alex Vong:
> I don't know there is maths.scm! Is there a general guideline on where
> to put new package definition? For example, putting elisp packages in
> emacs.scm is pretty obvious but how about other cases?

I am far from the right person to be answering this question, but my
heuristic is usually something like "find another similar
package/application and append the definition to that file".  In other
cases, it's ambiguous though, for example i recently added 'dosbox to
games.scm (even though it's not a game) and 'cmus to music.scm (even
though it's a media player and music.scm also contains a lot of
music-making software, but one of the alternatives, mpd.scm, seemed too
specific).  I guess it's a seat-of-your-pants thing, but i am open to
correction.

Cheers,
p.



Re: Environment containers

2015-10-26 Thread Alex Vong
On 26/10/2015, Daniel Pimentel  wrote:
> It's great!
>
> Thanks,
>
> --
> Daniel Pimentel (d4n1 3:)
>
>

Indeed. With my limited disk space, I find point 3 most attractive. I
also like how the store immutability avoids the duplication problem.
The latest version is not yet available from guix pull though.

Cheers,
Alex



Re: Environment containers

2015-10-26 Thread Ludovic Courtès
"Thompson, David"  skribis:

> I am pleased to announce that the patch for adding Linux container
> support to 'guix environment' has just landed in master!

Thanks for all the work, this is all very exciting!

Ludo’.



Re: Environment containers

2015-10-26 Thread Taylan Ulrich Bayırlı/Kammer
"Thompson, David"  writes:

> Hello Guix hackers,
>
> I am pleased to announce that the patch for adding Linux container
> support to 'guix environment' has just landed in master!
>
> Why is this cool, you ask?  Well, it enables one to truly isolate
> development environments from the rest of the system, much more so
> than --pure does.  The --pure option only clears the environment
> variables, but --container goes further and "unshares" kernel
> resources (such as the user, mount, and pid namespaces) and creates a
> chroot environment that has no file system access to what might be
> considered "impurities."  The only file systems from the host that
> make it into the container by default are the current working
> directory and the store paths for all of the needed software.  This is
> especially useful when running Guix on top of another host distro,
> where sometimes things from the host sneak into your build environment
> because a tool decided to inspect the contents of /usr or something.
>
> You can use it like this:
>
> guix environment --container guix
>
> The above command will create an isolated container with everything
> you need to build Guix from source.
>
> There's more fun to be had, too.  Sometimes it's nice to make ad-hoc
> sandboxes just to play around in.  The below command will run a
> sandboxed Guile REPL:
>
> guix environment --container --ad-hoc guile -- guile
>
> By default, containers have no network access.  To share the host
> network, use the --network flag.
>
> This is just the beginning!  There's lots more to do.  It would be
> nice to be able to create a network bridge so that the container can
> have network access without sharing the host devices, a la Docker and
> friends.  It would also be great to incorporate cgroups to arbitrarily
> restrict container resources.
>
> Coming soon is 'guix system container', which creates full-blown
> GuixSD containers.
>
> Since I mentioned Docker, I'd like to point some significant
> advantages that Guix containers have over other implementations:
>
> 1) The container tools I'm working on are completely declarative.  No
> imperative Dockerfiles!  This means that you don't have to worry about
> order of operations, something that you have to think about constantly
> when using Docker, especially when trying to maximize the use of the
> image cache.
>
> 2) There are no disk images.  Disk images are opaque blobs that are
> often not reproducible, whereas the items in the Guix store tell you
> the full story of how the software came to be.  Thus, Guix containers
> do not worry at all about the complications involved with layering
> disk images in an overlayfs-style setup.  They are simply not needed.
>
> 3) Software and other files shared amongst many containers are
> deduplicated system-wide.  This is a big deal from my perspective.
> With Docker, container images *must* share as many base image layers
> as possible to take advantage of deduplication, and there's
> limitations to how smart overlay file systems can be to do
> deduplication in memory (citation missing because I can't find the
> article that explained the issues.)  Some people say that Docker is a
> higher-level form of static linking, but instead of static linking the
> executables, you "statically link" an entire, albeit more minimal,
> operating system for each application that you run.  I'm inclined to
> agree, and I'm happy to say that Guix doesn't have this problem.  A
> store item present in N containers exists in exactly one place: in the
> host store.  We take great advantage of bind mounts to share
> everything without duplication.  Once again the fundamental building
> block of every Guix tool, the immutable store, proves to be an
> invaluable asset in overcoming the problems of our imperative
> predecessors and contemporaries.
>
> I hope this excites some of you.  Containers are all the rage right
> now, and they have some seriously good properties if you can look past
> the Docker hype.  I'd love to get some more hands to help make Guix
> containers more featureful and robust in order to compete with the
> mainstream tools.
>
> Until next time, happy hacking!
>
> - Dave

After some PEBKAC David helped me sort out over IRC, I got this running.
Thanks! :-)


Also, for Debian 8 users and maybe others, this might help:

sudo sysctl -w kernel.unprivileged_userns_clone=1

Credit goes to Efraim.

Taylan



Re: [PATCH] scripts: environment: Allow mixing regular and ad-hoc packages.

2015-10-26 Thread Ludovic Courtès
David Thompson  skribis:

> Thanks to Leo for bringing up this missing feature on IRC.  I've been
> meaning to implement this for awhile but lacked motivation. ;)
>
> With this patch, you can freely compose packages whose inputs should be
> in the environment with ad-hoc packages that should be added to the
> environment directly.  For example, here's how to create a Guix
> development environment that additionally has strace:
>
> guix environment guix --ad-hoc strace
>
> The --load and --expression options are --ad-hoc aware as well.  Yay,
> composability!

Swell!

> From 6a1c0b03a0083cc521be5c28a438ed5ecafd2b9d Mon Sep 17 00:00:00 2001
> From: David Thompson 
> Date: Sun, 25 Oct 2015 22:33:33 -0400
> Subject: [PATCH] scripts: environment: Allow mixing regular and ad-hoc
>  packages.
>
> This patch changes the --ad-hoc flag to be positional.  That is, the
> packages that appear before --ad-hoc are interpreted as packages whose
> inputs should be in the environment; the packages that appear after are
> interpreted as packages to be directly added to the environment.
>
> * guix/scripts/environment.scm (tag-package-arg, compact): New
>   procedures.
>   (%options): Tweak the handlers for --load and --expression options.
>   (options/resolve-packages): Preserve package mode tag.
>   (parse-args): Tweak argument handler to use package tagging procedure.
>   (guix-environment): Apply ad-hoc behavior on a per package basis.
> * doc/guix.texi ("invoking guix environment"): Document new behavior of
>   --ad-hoc.

Could you add a test in guix-environment.sh based on the output of
--search-paths, similar to what is already done with ‘gnu-make-boot0’?

Other than that it LGTM!

Thanks,
Ludo’.



Re: Environment containers

2015-10-26 Thread Thompson, David
On Mon, Oct 26, 2015 at 10:37 AM, Taylan Ulrich Bayırlı/Kammer
 wrote:

> Also, for Debian 8 users and maybe others, this might help:
>
> sudo sysctl -w kernel.unprivileged_userns_clone=1

Yes, user namespaces are a must-have for this to work.  I will prepare
patches that mention this in the manual and add a test to 'guix
environment' that can detect if user namespaces are unavailable and
display a more helpful error message.

Thanks for bring the UX issues to my attention!

- Dave



Re: [PATCH] Add PePr.

2015-10-26 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> From 6aa9c0cb97350d5cccb43a78e69e2b8887347df0 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Fri, 2 Oct 2015 16:37:03 +0200
> Subject: [PATCH] gnu: Add PePr.
>
> * gnu/packages/bioinformatics.scm (pepr): New variable.

[...]

> +   (modify-phases %standard-phases
> + (add-after 'unpack 'disable-egg
> +  (lambda _
> +(substitute* "setup.py"
> +  (("from setuptools import setup")
> +   "from distutils.core import setup"))

It would be nice if we had a bug ID or something to refer to this issue:
we don’t want to duplicate the explanation everywhere, yet it’d be nice
to have a pointer to the explanation.  WDYT?

> +(description
> + "PePr is a ChIP-Seq peak calling or differential binding analysis tool
> +that is primarily designed for data with biological replicates.  It uses a
> +negative binomial distribution to model the read counts among the samples in
> +the same group, and look for consistent differences between ChIP and control
> +group or two ChIP groups run under different conditions.  PePr was published
> +on Bioinformatics on Jun 2014.")

I’d remove the last sentence.

Otherwise LGTM.

Thank you!

Ludo’.



Re: [PATCH] Fix subread on non-x86_64

2015-10-26 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> the attached patch should fix the build of subread on non-x86_64 by
> overriding the CC and CCFLAGS variables, which by default are set to
> contain a lot of x86_64 optimisations.

Nice!  Could you add a comment explaining that?

> From 71a37b56d0962f0db4009bdb6a88c22025278a00 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Fri, 23 Oct 2015 14:16:27 +0200
> Subject: [PATCH] gnu: subread: Use SSE optimizations on x86_64 only.
>
> * gnu/packages/bioinformatics.scm (subread)[arguments]: Override CC and
>   CCFLAGS conditionally dependent on target system.

[...]

> +   (if (string-prefix? "x86_64" system)
> +   (string-append "CCFLAGS=" (string-join (append flags 
> flags64) " "))
> +   (string-append "CCFLAGS=" (string-join flags " "

The last argument to ‘string-join’ can be omitted here.

OK with these two changes.

It may be a good case for ‘guix challenge’ here: If things like
-mtune=native or FDO creep in, ‘guix challenge’ is likely to flag them.

Thanks,
Ludo’.



Re: Environment containers

2015-10-26 Thread Christopher Allan Webber
David, you are kicking ass on this.  *Thank you* so much for working so
hard to get this in... I know it was a challenging task, but I think
this helps pave the way for even greater things!

Keep on rocking for the free world,
 - Chris





Re: Environment containers

2015-10-26 Thread Thompson, David
On Mon, Oct 26, 2015 at 12:23 PM, Christopher Allan Webber
 wrote:
> David, you are kicking ass on this.  *Thank you* so much for working so
> hard to get this in... I know it was a challenging task, but I think
> this helps pave the way for even greater things!

Thanks for your kind words, Chris!  Much appreciated.

- Dave



[PATCH] gnu: guile-next: Update to 20151025.e5bccb6

2015-10-26 Thread Christopher Allan Webber
BTW, should I be requesting commit access for smaller changes like this,
like updating version numbers?

>From 3655de659692d40a0ad9d61e7aad2967e20515bc Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber 
Date: Mon, 26 Oct 2015 14:04:56 -0500
Subject: [PATCH] gnu: guile-next: Update to 20151025.e5bccb6

* gnu/packages/guile.scm (guile-next): Update to 20151025.e5bccb6.
---
 gnu/packages/guile.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index e778bf0..da75add 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -189,15 +189,15 @@ without requiring the source code to be rewritten.")
 (define-public guile-next
   (package (inherit guile-2.0)
 (name "guile-next")
-(version "20150815.00884bb")
+(version "20151025.e5bccb6")
 (source (origin
   (method git-fetch)
   (uri (git-reference
 (url "git://git.sv.gnu.org/guile.git")
-(commit "00884bb79fff41fdf5f22f24a74e366a94a14c9b")))
+(commit "e5bccb6e5df3485152bc6501e1f36275e09c6352")))
   (sha256
(base32
-"0qk8m9aq3i7pzw6npim58xmsvjqfz5kl1pkyb6b43awn2vydydi5"
+"0z7ywryfcargrpz8hdrz6sfs06c2h2y9baqin3mbjvvg96a5bx47"
 
 (arguments
  (substitute-keyword-arguments `(;; Tests aren't passing for now.
-- 
2.1.4



[PATCH] upstream: Add 'description' field to 'upstream-updater'.

2015-10-26 Thread Alex Kost
Ludovic Courtès (2015-10-26 00:46 +0300) wrote:

> Alex Kost  skribis:
>
>> From 6d82f6384902e7de837a4dbfc86c524dbfd9145a Mon Sep 17 00:00:00 2001
>> From: Alex Kost 
>> Date: Thu, 22 Oct 2015 10:51:17 +0300
>> Subject: [PATCH] refresh: Add '--list-updaters' option.
>>
>> * guix/scripts/refresh.scm (list-updaters-and-exit): New procedure.
>>   (%options, show-help): Add '--list-updaters' option.
>> * doc/guix.texi (Invoking guix refresh): Document it.
>
> [...]
>
>> +@item --list-updaters
>> +@itemx -L
>> +List available updaters and exit.
>
> Maybe add: “(see @option{--type} below.)”

As I put it right after ‘--type’ option, I'll use “above”, not “below”.

> OK to push with this change!

Thanks!  I think I better modify it so that ‘guix lint --list-checkers’
will also display descriptions, and I push it after (with) the attached
patch.

> To make it even more useful, I wonder if we should add a ‘description’
> field to updaters.

I like it!

> The best way to do that would probably be by definition
>  with ‘define-record-type*’ (because ‘description’ is
> a known keyword for xgettext, as per po/guix/Makevars.)
>
> WDYT?

Great, thanks for the pointers!  The patch is attached (I hope I missed
nothing there).

>From 19cee5ca983f663117d272382d7063d48e273cd0 Mon Sep 17 00:00:00 2001
From: Alex Kost 
Date: Mon, 26 Oct 2015 21:24:53 +0300
Subject: [PATCH] upstream: Add 'description' field to 'upstream-updater'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Suggested by Ludovic Courtès .

* guix/upstream.scm (): Use 'define-record-type*'.
  [description]: New field.
  (lookup-updater): Adjust accordingly.
* guix/gnu-maintenance.scm (%gnu-updater): Likewise.
* guix/import/cran.scm (%cran-updater): Likewise.
* guix/import/elpa.scm (%elpa-updater): Likewise.
---
 guix/gnu-maintenance.scm |  8 +---
 guix/import/cran.scm |  8 +---
 guix/import/elpa.scm |  8 +---
 guix/upstream.scm| 15 +--
 4 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 5af1b88..e1455cc 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -413,8 +413,10 @@ for instance, whose releases are now uploaded to elpa.gnu.org."
(gnu-package? package)))
 
 (define %gnu-updater
-  (upstream-updater 'gnu
-non-emacs-gnu-package?
-latest-release*))
+  (upstream-updater
+   (name 'gnu)
+   (description "Updater for GNU packages")
+   (pred non-emacs-gnu-package?)
+   (latest latest-release*)))
 
 ;;; gnu-maintenance.scm ends here
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 6284c9e..4b53d5e 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -236,8 +236,10 @@ representation of the package page."
   (string-prefix? "r-" (package-name package)))
 
 (define %cran-updater
-  (upstream-updater 'cran
-cran-package?
-latest-release))
+  (upstream-updater
+   (name 'cran)
+   (description "Updater for CRAN packages")
+   (pred cran-package?)
+   (latest latest-release)))
 
 ;;; cran.scm ends here
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 37fc2b8..8c10668 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -272,8 +272,10 @@ as \"debbugs\"."
 (define %elpa-updater
   ;; The ELPA updater.  We restrict it to packages hosted on elpa.gnu.org
   ;; because for other repositories, we typically grab the source elsewhere.
-  (upstream-updater 'elpa
-package-from-gnu.org?
-latest-release))
+  (upstream-updater
+   (name 'elpa)
+   (description "Updater for ELPA packages")
+   (pred package-from-gnu.org?)
+   (latest latest-release)))
 
 ;;; elpa.scm ends here
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 9300113..219ae05 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015 Ludovic Courtès 
+;;; Copyright © 2015 Alex Kost 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +46,7 @@
 upstream-updater
 upstream-updater?
 upstream-updater-name
+upstream-updater-description
 upstream-updater-predicate
 upstream-updater-latest
 
@@ -109,18 +111,19 @@ correspond to the same version."
 ;;; Auto-update.
 ;;;
 
-(define-record-type 
-  (upstream-updater name pred latest)
+(define-record-type* 
+  upstream-updater make-upstream-updater
   upstream-updater?
-  (name  upstream-updater-name)
-  (pred  upstream-updater-predicate)
-  (latestupstream-updater-latest))
+  (nameupstream-updater-name)
+  (description upstream-updater-description)
+  (predupstream-updater-predicate)
+  (latest  upstream-updater-latest))
 
 (define (lookup-updater package updaters)
   "Return an updater among UPDATERS t

[PATCH] gnu: Add yapet.

2015-10-26 Thread Aljosha Papsch

Hi,

this is a text based password manager which stores password entries in 
an encrypted file.


Aljosha
>From 9488a87c2b85d5c9b7e7715475afb14f9af0ca6d Mon Sep 17 00:00:00 2001
From: Aljosha Papsch 
Date: Mon, 26 Oct 2015 22:27:05 +0100
Subject: [PATCH] gnu: Add yapet.

* gnu/packages/password-utils.scm (yapet): New variable.
---
 gnu/packages/password-utils.scm | 34 ++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 921ade1..c6484ec 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Steve Sprang 
 ;;; Copyright © 2015 Efraim Flashner 
+;;; Copyright © 2015 Aljosha Papsch 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,8 +25,12 @@
   #:use-module (guix download)
   #:use-module (guix packages)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
@@ -104,3 +109,32 @@ For copying and pasting secrets into web browsers and other graphical
 applications, there is xclip integration." )
 (home-page "http://dthompson.us/pages/software/shroud.html";)
 (license license:gpl3+)))
+
+(define-public yapet
+  (package
+(name "yapet")
+(version "1.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://www.guengel.ch/myapps/yapet/downloads/yapet-";
+  version
+  ".tar.bz2"))
+  (sha256
+   (base32
+"0ydbnqw6icdh07pnv2w6dhvq501bdfvrklv4xmyr8znca9d753if"
+(build-system gnu-build-system)
+(inputs
+ `(("ncurses" ,ncurses)
+   ("openssl" ,openssl)))
+(native-inputs
+ `(("gettext" ,gnu-gettext)
+   ("pkg-config" ,pkg-config)))
+(synopsis "Yet Another Password Encryption Tool")
+(description "YAPET is a text based password manager using the Blowfish
+encryption algorithm.  Because of its small footprint and very few library
+dependencies, it is suited for installing on desktop and server systems alike.
+The text based user interface allows to run YAPET easy and painlessly in a
+Secure Shell session.  Two companion utilities enable users to convert
+CSV files to YAPET and vice versa.")
+(home-page "http://www.guengel.ch/myapps/yapet/";)
+(license license:gpl3+)))
-- 
2.6.1



[PATCH] scripts: build: Add --file option.

2015-10-26 Thread David Thompson
This is to accompany the --install-from-file option I added to 'guix
package' awhile back.  Makes it easy for folks to build one-off package
files like the 'guix.scm' files I keep in my personal repos.

>From d3dd1b2d05f17702f7fa6095132db00e2146e702 Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Mon, 26 Oct 2015 18:09:28 -0400
Subject: [PATCH] scripts: build: Add --file option.

* guix/scripts/build.scm (show-help): Add help text for --file option.
  (%options): Add --file option.
  (options/resolve-packages): Handle 'file' options.
* tests/guix-build.sh: Add tests.
* doc/guix.texi ("invoking guix build"): Add doc.
---
 doc/guix.texi  | 13 +
 guix/scripts/build.scm | 45 -
 tests/guix-build.sh| 27 +++
 3 files changed, 68 insertions(+), 17 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7715b72..abd8de3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3615,6 +3615,19 @@ The @var{options} may be zero or more of the following:
 
 @table @code
 
+@item --file=@var{file}
+@itemx -e @var{file}
+
+Build the package or derivation that the code within @var{file}
+evaluates to.
+
+As an example, @var{file} might contain a package definition like this
+(@pxref{Defining Packages}):
+
+@example
+@verbatiminclude package-hello.scm
+@end example
+
 @item --expression=@var{expr}
 @itemx -e @var{expr}
 Build the package or derivation @var{expr} evaluates to.
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index a357cf8..ee7e5b9 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -290,6 +290,9 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
   (display (_ "
   -e, --expression=EXPR  build the package or derivation EXPR evaluates to"))
   (display (_ "
+  -f, --file=FILEbuild the package or derivation that the code within
+ FILE evaluates to"))
+  (display (_ "
   -S, --source   build the packages' source derivations"))
   (display (_ "
   --sources[=TYPE]   build source derivations; TYPE may optionally be one
@@ -359,6 +362,9 @@ must be one of 'package', 'all', or 'transitive'~%")
  (option '(#\e "expression") #t #f
  (lambda (opt name arg result)
(alist-cons 'expression arg result)))
+ (option '(#\f "file") #t #f
+ (lambda (opt name arg result)
+   (alist-cons 'file arg result)))
  (option '(#\n "dry-run") #f #f
  (lambda (opt name arg result)
(alist-cons 'dry-run? #t result)))
@@ -422,29 +428,34 @@ packages."
   (define system
 (or (assoc-ref opts 'system) (%current-system)))
 
+  (define (object->argument obj)
+(match obj
+  ((? package? p)
+   `(argument . ,p))
+  ((? procedure? proc)
+   (let ((drv (run-with-store store
+(mbegin %store-monad
+  (set-guile-for-build (default-guile))
+  (proc))
+#:system system)))
+ `(argument . ,drv)))
+  ((? gexp? gexp)
+   (let ((drv (run-with-store store
+(mbegin %store-monad
+  (set-guile-for-build (default-guile))
+  (gexp->derivation "gexp" gexp
+#:system system)
+ `(argument . ,drv)
+
   (map (match-lambda
 (('argument . (? string? spec))
  (if (store-path? spec)
  `(argument . ,spec)
  `(argument . ,(specification->package spec
+(('file . file)
+ (object->argument (load* file (make-user-module '()
 (('expression . str)
- (match (read/eval str)
-   ((? package? p)
-`(argument . ,p))
-   ((? procedure? proc)
-(let ((drv (run-with-store store
- (mbegin %store-monad
-   (set-guile-for-build (default-guile))
-   (proc))
- #:system system)))
-  `(argument . ,drv)))
-   ((? gexp? gexp)
-(let ((drv (run-with-store store
- (mbegin %store-monad
-   (set-guile-for-build (default-guile))
-   (gexp->derivation "gexp" gexp
- #:system system)
-  `(argument . ,drv)
+ (object->argument (read/eval str)))
 (opt opt))
opts))
 
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index a72ce09..f7fb3c5 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -167,6 +167,33 @@ guix build -e "(begin
 guix build -e '#~(mkdir #$output)' -d
 guix build -e '#~(mkdir #$output)' -d | grep 'gexp\.drv'
 
+# Building from a package file.
+cat > "$module_dir/package.scm"< "$module_dir/proc.scm"

Re: [PATCH] gnu: Add xcompmgr

2015-10-26 Thread Ludovic Courtès
Cyrill Schenkel  skribis:

> From 55122d4c14231f3646db902bc2b88469fc9e Mon Sep 17 00:00:00 2001
> From: Cyrill Schenkel 
> Date: Fri, 23 Oct 2015 16:38:16 +0200
> Subject: [PATCH] gnu: Add xcompmgr
>
> * gnu/packages/xorg.scm (xcompmgr): New variable.

[...]

> +(license (license:x11-style "file://COPYING"

I changed that to
http://cgit.freedesktop.org/xorg/app/xcompmgr/tree/COPYING, which is
more convenient, and applied it.

Thank you!

Ludo’.



Re: [PATCH] gnu: guile-next: Update to 20151025.e5bccb6

2015-10-26 Thread Ludovic Courtès
Christopher Allan Webber  skribis:

> BTW, should I be requesting commit access for smaller changes like this,
> like updating version numbers?

Sure, hereby granted! :-)  See “Commit Access” for the rules.

> From 3655de659692d40a0ad9d61e7aad2967e20515bc Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber 
> Date: Mon, 26 Oct 2015 14:04:56 -0500
> Subject: [PATCH] gnu: guile-next: Update to 20151025.e5bccb6
>
> * gnu/packages/guile.scm (guile-next): Update to 20151025.e5bccb6.

OK, please push.

Thank you & happy hacking!

Ludo’.



Re: [PATCH] gnu: Add yapet.

2015-10-26 Thread Ludovic Courtès
Aljosha Papsch  skribis:

> From 9488a87c2b85d5c9b7e7715475afb14f9af0ca6d Mon Sep 17 00:00:00 2001
> From: Aljosha Papsch 
> Date: Mon, 26 Oct 2015 22:27:05 +0100
> Subject: [PATCH] gnu: Add yapet.
>
> * gnu/packages/password-utils.scm (yapet): New variable.

Applied.

> +(native-inputs
> + `(("gettext" ,gnu-gettext)

I removed Gettext from here since it’s unnecessary.

> +The text based user interface allows to run YAPET easy and painlessly in a
> +Secure Shell session.  Two companion utilities enable users to convert

And I took the liberty to remove “painlessly” here for the same reason.
:-)

Thank you!

Ludo’.



[PATCH] system: container: Update to new service API.

2015-10-26 Thread David Thompson
Getting up to speed with the changes that were made during the service
API rewrite.

>From d3dd1b2d05f17702f7fa6095132db00e2146e702 Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Mon, 26 Oct 2015 18:09:28 -0400
Subject: [PATCH] scripts: build: Add --file option.

* guix/scripts/build.scm (show-help): Add help text for --file option.
  (%options): Add --file option.
  (options/resolve-packages): Handle 'file' options.
* tests/guix-build.sh: Add tests.
* doc/guix.texi ("invoking guix build"): Add doc.
---
 doc/guix.texi  | 13 +
 guix/scripts/build.scm | 45 -
 tests/guix-build.sh| 27 +++
 3 files changed, 68 insertions(+), 17 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7715b72..abd8de3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3615,6 +3615,19 @@ The @var{options} may be zero or more of the following:
 
 @table @code
 
+@item --file=@var{file}
+@itemx -e @var{file}
+
+Build the package or derivation that the code within @var{file}
+evaluates to.
+
+As an example, @var{file} might contain a package definition like this
+(@pxref{Defining Packages}):
+
+@example
+@verbatiminclude package-hello.scm
+@end example
+
 @item --expression=@var{expr}
 @itemx -e @var{expr}
 Build the package or derivation @var{expr} evaluates to.
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index a357cf8..ee7e5b9 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -290,6 +290,9 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
   (display (_ "
   -e, --expression=EXPR  build the package or derivation EXPR evaluates to"))
   (display (_ "
+  -f, --file=FILEbuild the package or derivation that the code within
+ FILE evaluates to"))
+  (display (_ "
   -S, --source   build the packages' source derivations"))
   (display (_ "
   --sources[=TYPE]   build source derivations; TYPE may optionally be one
@@ -359,6 +362,9 @@ must be one of 'package', 'all', or 'transitive'~%")
  (option '(#\e "expression") #t #f
  (lambda (opt name arg result)
(alist-cons 'expression arg result)))
+ (option '(#\f "file") #t #f
+ (lambda (opt name arg result)
+   (alist-cons 'file arg result)))
  (option '(#\n "dry-run") #f #f
  (lambda (opt name arg result)
(alist-cons 'dry-run? #t result)))
@@ -422,29 +428,34 @@ packages."
   (define system
 (or (assoc-ref opts 'system) (%current-system)))
 
+  (define (object->argument obj)
+(match obj
+  ((? package? p)
+   `(argument . ,p))
+  ((? procedure? proc)
+   (let ((drv (run-with-store store
+(mbegin %store-monad
+  (set-guile-for-build (default-guile))
+  (proc))
+#:system system)))
+ `(argument . ,drv)))
+  ((? gexp? gexp)
+   (let ((drv (run-with-store store
+(mbegin %store-monad
+  (set-guile-for-build (default-guile))
+  (gexp->derivation "gexp" gexp
+#:system system)
+ `(argument . ,drv)
+
   (map (match-lambda
 (('argument . (? string? spec))
  (if (store-path? spec)
  `(argument . ,spec)
  `(argument . ,(specification->package spec
+(('file . file)
+ (object->argument (load* file (make-user-module '()
 (('expression . str)
- (match (read/eval str)
-   ((? package? p)
-`(argument . ,p))
-   ((? procedure? proc)
-(let ((drv (run-with-store store
- (mbegin %store-monad
-   (set-guile-for-build (default-guile))
-   (proc))
- #:system system)))
-  `(argument . ,drv)))
-   ((? gexp? gexp)
-(let ((drv (run-with-store store
- (mbegin %store-monad
-   (set-guile-for-build (default-guile))
-   (gexp->derivation "gexp" gexp
- #:system system)
-  `(argument . ,drv)
+ (object->argument (read/eval str)))
 (opt opt))
opts))
 
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index a72ce09..f7fb3c5 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -167,6 +167,33 @@ guix build -e "(begin
 guix build -e '#~(mkdir #$output)' -d
 guix build -e '#~(mkdir #$output)' -d | grep 'gexp\.drv'
 
+# Building from a package file.
+cat > "$module_dir/package.scm"< "$module_dir/proc.scm"

Re: [PATCH] system: container: Update to new service API.

2015-10-26 Thread Thompson, David
On Mon, Oct 26, 2015 at 8:19 PM, David Thompson
 wrote:
> Getting up to speed with the changes that were made during the service
> API rewrite.

Sorry, wrong patch file!  Here's the correct one.
From 54f221aa3dda8596a4b3bc57a0e911b5c8ce37c9 Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Mon, 26 Oct 2015 20:12:55 -0400
Subject: [PATCH] system: container: Update to new service API.

* gnu/services.scm (activation-script->script): Add #:container?
  argument.
  (activation-script): Add #:container? argument.  Omit kernel tweaks
  when creating a script for a container.
* gnu/system.scm (operating-system-activation-script): Pass #:container?
  argument to 'activation-service->script'.
* gnu/system/linux-container.scm (system-container): Fix breaking
  changes introduced by new  data type.
---
 gnu/services.scm   | 22 +-
 gnu/system.scm |  2 +-
 gnu/system/linux-container.scm | 14 --
 3 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index d0fe0ad..cb4987d 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -216,13 +216,15 @@ variable is not set---hence the need for this wrapper."
   (apply execl #$modprobe
  (cons #$modprobe (cdr (command-line
 
-(define* (activation-service->script service)
+(define* (activation-service->script service #:key container?)
   "Return as a monadic value the activation script for SERVICE, a service of
-ACTIVATION-SCRIPT-TYPE."
-  (activation-script (service-parameters service)))
+ACTIVATION-SCRIPT-TYPE.  When CONTAINER? is true, build the container variant
+of the script."
+  (activation-script (service-parameters service) #:container? container?))
 
-(define (activation-script gexps)
-  "Return the system's activation script, which evaluates GEXPS."
+(define* (activation-script gexps #:key container?)
+  "Return the system's activation script, which evaluates GEXPS.  When
+CONTAINER? is true, return a script suitable for a Linux container."
   (define %modules
 '((gnu build activation)
   (gnu build linux-boot)
@@ -256,11 +258,13 @@ ACTIVATION-SCRIPT-TYPE."
 (activate-/bin/sh
  (string-append #$(canonical-package bash) "/bin/sh"))
 
-;; Tell the kernel to use our 'modprobe' command.
-(activate-modprobe #$modprobe)
+#$@(if container?
+   ;; Tell the kernel to use our 'modprobe' command.
+   #~((activate-modprobe #$modprobe)
 
-;; Let users debug their own processes!
-(activate-ptrace-attach)
+  ;; Let users debug their own processes!
+  (activate-ptrace-attach))
+   #~())
 
 ;; Run the services' activation snippets.
 ;; TODO: Use 'load-compiled'.
diff --git a/gnu/system.scm b/gnu/system.scm
index aa76882..0ab0094 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -599,7 +599,7 @@ etc."
   (let* ((services   (operating-system-services os #:container? container?))
  (activation (fold-services services
 #:target-type activation-service-type)))
-(activation-service->script activation)))
+(activation-service->script activation #:container? container?)))
 
 (define* (operating-system-boot-script os #:key container?)
   "Return the boot script for OS---i.e., the code started by the initrd once
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index fdf7460..abe816f 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -25,6 +25,7 @@
   #:use-module (guix derivations)
   #:use-module (guix monads)
   #:use-module (gnu build linux-container)
+  #:use-module (gnu services)
   #:use-module (gnu system)
   #:use-module (gnu system file-systems)
   #:export (mapping->file-system
@@ -50,14 +51,15 @@
   "Return a derivation that builds OS as a Linux container."
   (mlet* %store-monad
   ((profile (operating-system-profile os))
-   (etc (operating-system-etc-directory os))
+   (etc  -> (operating-system-etc-directory os))
(boot(operating-system-boot-script os #:container? #t))
(locale  (operating-system-locale-directory os)))
-(file-union "system-container"
-`(("boot" ,#~#$boot)
-  ("profile" ,#~#$profile)
-  ("locale" ,#~#$locale)
-  ("etc" ,#~#$etc)
+(lower-object
+ (file-union "system-container"
+ `(("boot" ,#~#$boot)
+   ("profile" ,#~#$profile)
+   ("locale" ,#~#$locale)
+   ("etc" ,#~#$etc))
 
 (define (containerized-operating-system os mappings)
   "Return an operating system based on OS for use in a Linux container
-

Re: [PATCH 13/15] scripts: system: Add 'container' action.

2015-10-26 Thread Thompson, David
So, It's been awhile. I cleaned up the docs as per your suggestions.
Attaching the updated patch just so someone can give it another look
before I push it.  My "system: container: Update to new service API."
patch must be pushed first, though.

Thanks!

- Dave
From 5dde31ef51502726a2915cc4faba81f4fadb851c Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Mon, 8 Jun 2015 09:04:38 -0400
Subject: [PATCH] scripts: system: Add 'container' action.

* guix/scripts/system.scm (show-help): Display 'container' action.
  (system-derivation-for-action, guix-system): Add 'container' case.
  (perform-action): Skip GRUB config generation when building a container.
* doc/guix.texi (Invoking guix system): Document it.
---
 doc/guix.texi  | 21 +
 gnu/system/linux-container.scm |  7 ++-
 guix/scripts/system.scm| 19 +--
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 20bf284..3491cfb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7183,6 +7183,27 @@ using the following command:
 # dd if=$(guix system disk-image my-os.scm) of=/dev/sdc
 @end example
 
+@item container
+Return a script to run the operating system declared in @var{file}
+within a container.  Containers are a set of lightweight isolation
+mechanisms provided by the kernel Linux-libre.  Containers are
+substantially less resource-demanding than full virtual machines since
+the kernel, shared objects, and other resources can be shared with the
+host system; this also means they provide thinner isolation.
+
+Currently, the script must be run as root in order to support more than
+a single user and group.  The container shares its store with the host
+system.
+
+As with the @code{vm} action (@pxref{guix system vm}), additional file
+systems to be shared between the host and container can be specified
+using the @option{--share} and @option{--expose} options:
+
+@example
+guix system container my-config.scm \
+   --expose=$HOME --share=$HOME/tmp=/exchange
+@end example
+
 @end table
 
 @var{options} can contain any of the common build options provided by
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index abe816f..c2eb773 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -108,7 +108,12 @@ that will be shared with the host system."
 (setenv "TMPDIR" "/tmp")
 (setenv "GUIX_NEW_SYSTEM" #$os-drv)
 (for-each mkdir-p '("/run" "/bin" "/etc" "/home" "/var"))
-(primitive-load (string-append #$os-drv "/boot"))
+(primitive-load (string-append #$os-drv "/boot")))
+  ;; A range of 65536 uid/gids is used to cover 16 bits worth of
+  ;; users and groups, which is sufficient for most cases.
+  ;;
+  ;; See: http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html#--private-users=
+  #:host-uids 65536)))
 
   (gexp->script "run-container" script
 #:modules '((ice-9 match)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index d847c75..4bf9ac9 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -34,6 +34,7 @@
   #:use-module (gnu build install)
   #:use-module (gnu system)
   #:use-module (gnu system file-systems)
+  #:use-module (gnu system linux-container)
   #:use-module (gnu system vm)
   #:use-module (gnu system grub)
   #:use-module (gnu services)
@@ -406,6 +407,8 @@ PATTERN, a string.  When PATTERN is #f, display all the system generations."
   (case action
 ((build init reconfigure)
  (operating-system-derivation os))
+((container)
+ (container-script os #:mappings mappings))
 ((vm-image)
  (system-qemu-image os #:disk-image-size image-size))
 ((vm)
@@ -438,10 +441,12 @@ building anything."
 #:full-boot? full-boot?
 #:mappings mappings))
(grub  (package->derivation grub))
-   (grub.cfg  (operating-system-grub.cfg os
- (if (eq? 'init action)
- '()
- (previous-grub-entries
+   (grub.cfg  (if (eq? 'container action)
+  (return #f)
+  (operating-system-grub.cfg os
+ (if (eq? 'init action)
+ '()
+ (previous-grub-entries)
(drvs   -> (if (and grub? (memq action '(init reconfigure)))
   (list sys grub grub.cfg)
   (list sys)))
@@ -524,6 +529,8 @@ Build the operating system declared in FILE according to ACTION.\n"))
   (display (_ "\
buildbuild the operating 

Re: [PATCH 15/15] scripts: Add 'container' subcommand.

2015-10-26 Thread Thompson, David
Dusting this patch off.  Here's a fresh patch!

- Dave
From f5312c2445d774c9355c947d3c748d064740246e Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Wed, 1 Jul 2015 20:32:07 -0400
Subject: [PATCH] scripts: Add 'container' subcommand.

* guix/scripts/container.scm: New file.
* guix/scripts/container/exec.scm: New file.
* po/guix/POTFILES.in: Add them.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Invoking guix container): New section.
---
 Makefile.am |  2 +
 doc/guix.texi   | 54 ++
 guix/scripts/container.scm  | 63 ++
 guix/scripts/container/exec.scm | 86 +
 po/guix/POTFILES.in |  2 +
 5 files changed, 207 insertions(+)
 create mode 100644 guix/scripts/container.scm
 create mode 100644 guix/scripts/container/exec.scm

diff --git a/Makefile.am b/Makefile.am
index 4f90b1d..1582af3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -128,6 +128,8 @@ MODULES =	\
   guix/scripts/edit.scm\
   guix/scripts/size.scm\
   guix/scripts/graph.scm			\
+  guix/scripts/container.scm			\
+  guix/scripts/container/exec.scm		\
   guix.scm	\
   $(GNU_SYSTEM_MODULES)
 
diff --git a/doc/guix.texi b/doc/guix.texi
index 3491cfb..271b24b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -144,6 +144,7 @@ Utilities
 * Invoking guix environment::   Setting up development environments.
 * Invoking guix publish::   Sharing substitutes.
 * Invoking guix challenge:: Challenging substitute servers.
+* Invoking guix container:: Process isolation.
 
 GNU Distribution
 
@@ -3582,6 +3583,7 @@ programming interface of Guix in a convenient way.
 * Invoking guix environment::   Setting up development environments.
 * Invoking guix publish::   Sharing substitutes.
 * Invoking guix challenge:: Challenging substitute servers.
+* Invoking guix container:: Process isolation.
 @end menu
 
 @node Invoking guix build
@@ -4985,6 +4987,58 @@ URLs to compare to.
 @end table
 
 
+@node Invoking guix container
+@section Invoking @command{guix container}
+@cindex container
+
+Note: This tool is experimental.  The interface is subject to radical
+change in the future.
+
+The purpose of @command{guix container} is to manipulate processes
+running within an isolated environment, commonly known as a
+``container,'' typically created by the @command{guix environment}
+(@pxref{Invoking guix environment}) and @command{guix system container}
+(@pxref{Invoking guix system}) commands.
+
+The general syntax is:
+
+@example
+guix container @var{action} @var{options}@dots{}
+@end example
+
+@var{action} specifies the operation to perform with a container, and
+@var{options} specifies the context-specific arguments for the action.
+
+The following actions are available:
+
+@table @code
+@item exec
+Execute a command within the context of a running container.
+
+The syntax is:
+
+@example
+guix container exec @var{pid} @var{program} @var{arguments}@dots{}
+@end example
+
+@var{pid} specifies the process ID of the running container.
+@var{program} specifies an executable file name within the container's
+root file system.  @var{arguments} are the additional options that will
+be passed to @var{program}.
+
+The following command launches an interactive login shell inside a
+GuixSD container, started by @command{guix system container}, and whose
+process ID is 9001:
+
+@example
+guix container exec 9001 /run/current-system/profile/bin/bash --login
+@end example
+
+Note that the @var{pid} cannot be the parent process of a container.  It
+must be the container's PID 1 or one of its child processes.
+
+@end table
+
 @c *
 @node GNU Distribution
 @chapter GNU Distribution
diff --git a/guix/scripts/container.scm b/guix/scripts/container.scm
new file mode 100644
index 000..cd9f345
--- /dev/null
+++ b/guix/scripts/container.scm
@@ -0,0 +1,63 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 David Thompson 
+;;;
+;;; 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 (guix scripts container)
+  #:use-module (ice-9 match)
+  #:use-module (guix ui)
+  #:export (guix-container))
+
+(define (show-help)
+  (display (_ "Usage: guix container ACTION ARGS..

[PATCH 1/1] gnu: lua: Build with dynamic library support.

2015-10-26 Thread Leo Famulari
* gnu/packages/lua.scm (lua, lua-5.1)[arguments]: Set the make flags
  properly for each version of lua.
---
 gnu/packages/lua.scm | 25 +
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 87f53d1..7699a91 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -24,6 +24,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages readline))
 
@@ -47,7 +48,7 @@
#:test-target "test"
#:phases (alist-replace
  'build
- (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux")))
+ (lambda _ (zero? (system* "make" "MYCFLAGS=-fPIC" "linux")))
  (alist-replace
   'install
   (lambda* (#:key outputs #:allow-other-keys)
@@ -77,7 +78,23 @@ for configuration, scripting, and rapid prototyping.")
  version ".tar.gz"))
  (sha256
   (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))
- (patches (list (search-patch "lua51-liblua-so.patch")))
+ (patches (list (search-patch "lua51-liblua-so.patch")
+(arguments
+  (substitute-keyword-arguments (package-arguments lua)
+((#:phases lua-phases)
+  `(modify-phases ,lua-phases
+ (replace
+   'build
+   (lambda _
+ (and
+  (zero? (system* "make" (string-append
+"MYCFLAGS="
+(string-join '("-fPIC "
+   "-DLUA_USE_LINUX "
+   "MYLIBS=-Wl,-E "
+   "-ldl -lreadline "
+   "-lhistory -lncurses")))
+"linux")))
 
 (define-public luajit
   (package
@@ -89,8 +106,8 @@ for configuration, scripting, and rapid prototyping.")
   version ".tar.gz"))
   (sha256
(base32 "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6rgjm"))
- (patches (list (search-patch "luajit-symlinks.patch")
-(search-patch "luajit-no_ldconfig.patch")
+  (patches (list (search-patch "luajit-symlinks.patch")
+ (search-patch "luajit-no_ldconfig.patch")
 (build-system gnu-build-system)
 (arguments
  '(#:tests? #f  ;luajit is distributed without tests
-- 
2.6.1




[PATCH 0/1] lua: Build with dynamic library support

2015-10-26 Thread Leo Famulari
This patch fixes the make flags on lua-5.2 and lua-5.1. Each version has
a different Makefile that handles the flags differently.

Notably, this enables the use of dynamic libraries with Lua.

Leo Famulari (1):
  gnu: lua: Build with dynamic library support.

 gnu/packages/lua.scm | 25 +
 1 file changed, 21 insertions(+), 4 deletions(-)

-- 
2.6.1




Re: Environment containers

2015-10-26 Thread Alex Vong
On 26/10/2015, Thompson, David  wrote:
> On Mon, Oct 26, 2015 at 10:37 AM, Taylan Ulrich Bayırlı/Kammer
>  wrote:
>
>> Also, for Debian 8 users and maybe others, this might help:
>>
>> sudo sysctl -w kernel.unprivileged_userns_clone=1
>
> Yes, user namespaces are a must-have for this to work.  I will prepare
> patches that mention this in the manual and add a test to 'guix
> environment' that can detect if user namespaces are unavailable and
> display a more helpful error message.
>
I think the patch could be considered a fix for
 as well. How do
you think?

Thanks!

> Thanks for bring the UX issues to my attention!
>
> - Dave
>
>