Re: [PATCH 5/5] gnu: Add python-hy.

2016-01-15 Thread 宋文武
l...@gnu.org (Ludovic Courtès) writes:

> 宋文武  skribis:
>
>> * gnu/packages/python.scm (python-hy, python2-hy): New variables.
>
> [...]
>
>> +(home-page "http://hylang.org/";)
>> +(synopsis "Lisp frontend to Python")
>> +(description
>> + "Hy is a dialect of Lisp that's embedded in Python.
>> +
>> +Since Hy transforms its Lisp code into the Python Abstract Syntax Tree, you
>> +have the whole world of Python at your fingertips, in Lisp form.")
>
> I would remove the newline.
>
> Otherwise LGTM, thanks!
Pushed, thanks for the review!



Re: [PATCH] Update glade.

2016-01-15 Thread Ricardo Wurmus

Ludovic Courtès  writes:

> Ricardo Wurmus  skribis:
>
>> This makes it possible to build “gnunet-gtk” with the latest version of
>> GTK+.  I chose to disable the three tests, because they require an X
>> server with libGL support for software rendering.  I couldn’t get this
>> to work even after adding “xorg-server” and “mesa”, and starting Xvfb
>> before tests.
>
> OK.
>
>> From 48a7ac38ee0f5554c844a503d5ed232a5816eb07 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus 
>> Date: Thu, 14 Jan 2016 11:03:49 +0100
>> Subject: [PATCH] gnu: glade: Update to 3.18.5.
>>
>> * gnu/packages/gnome.scm (glade): Update to 3.18.5.
>> [arguments]: Disable tests; add "fix-docbook" phase.
>> [inputs]: Replace "gtk+-2" with "gtk+".
>> [native-inputs]: Add "itstool", "libxslt", "docbook-xml", "docbook-xsl";
>> replace "python" with "python-2".
>
> [...]
>
>> + (add-before 'configure 'fix-docbook
>> +   (lambda* (#:key inputs #:allow-other-keys)
>> + (substitute* "man/Makefile.in"
>> +   
>> (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl";)
>> +(string-append (assoc-ref inputs "docbook-xsl")
>> +   "/xml/xsl/docbook-xsl-"
>> +   ,(package-version docbook-xsl)
>> +   "/manpages/docbook.xsl")))
>> + (setenv "XML_CATALOG_FILES"
>> + (string-append (assoc-ref inputs "docbook-xml")
>> +"/xml/dtd/docbook/catalog.xml"))
>
> I’m surprised that this is needed: since libxml2 is an input, and since
> libxml2 defines XML_CATALOG_FILES as its search path, XML_CATALOG_FILES
> should automatically be set, no?

Oh, you are right.  I just rebuilt it without that setenv part and it
does work fine.

I’ll push with that change.  Thanks for the review!

~~ Ricardo




Re: [PATCH] Add audit.

2016-01-15 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> the tests for this package cannot easily be fixed by
>
>#:phases
>(modify-phases %standard-phases
>  (add-after 'unpack 'fix-tests
>(lambda _
>  (substitute* "auparse/test/auparse_test.ref"
>(("\\(root\\)") "(unknown(0))"))
>  #t)))
>
> because for *some* of them “(root)” is returned (while for *most* of
> them its “(unknown(0))”).  Ideas on how to fix the tests are very
> welcome!

How does it get that info?

One thing to know is that /etc/passwd in the build environment contains
only two entries, and no entry for root/0; quoth build.cc:

--8<---cut here---start->8---
writeFile(chrootRootDir + "/etc/passwd",
(format(
"nixbld:x:%1%:%2%:Nix build user:/:/noshell\n"
"nobody:x:65534:65534:Nobody:/:/noshell\n")
% (buildUser.enabled() ? buildUser.getUID() : getuid())
% (buildUser.enabled() ? buildUser.getGID() : getgid())).str());
--8<---cut here---end--->8---

Thus, getpwuid(0) and getpwnam("root") both fail.

> From c4948bc06b30e4e55810b82cc458cd6a429b6f80 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Wed, 13 Jan 2016 16:00:06 +0100
> Subject: [PATCH] gnu: Add audit.
>
> * gnu/packages/admin.scm (audit): New variable.

[...]

> +(synopsis "Userspace component to the Linux auditing system")

I’d write “User-space”.

> +(description
> + "auditd is the userspace component to the Linux auditing system.  It's

Maybe something like: “… to the Linux auditing system, which allows
logging of system calls made by user-land processes.”

Would be nice if we could fix those tests before pushing it.

Thanks,
Ludo’.



[PATCH] gnu: boost: Enable tests.

2016-01-15 Thread Eric Bavier
This patch turns boost package tests on.  22 of 120 test suites are 
skipped due to know test failures, many of which still fail with the 
upstream development version 
(http://www.boost.org/development/tests/master/developer/summary.html).


Building and running the tests obviously adds to the overall build time, 
but I think most of us here are in agreement that running tests is 
better than not.


It would be nice to get this patch tested on MIPS or ARM, in case there 
are other failing test suites that should be documented and skipped on 
those systems.


--
`~EricFrom 76322bff6b4de1c0fe810506f451de733c60683a Mon Sep 17 00:00:00 2001
From: Eric Bavier 
Date: Fri, 15 Jan 2016 14:46:26 -0600
Subject: [PATCH] gnu: boost: Enable tests.

* gnu/packages/boost.scm (boost)[arguments]: Replace 'check' phase.
---
 gnu/packages/boost.scm | 122 -
 1 file changed, 121 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 0a644e8..a69ebc2 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -66,7 +66,11 @@
 '("--without-context"
   "--without-coroutine" "--without-coroutine2")
 '()
-   `(#:tests? #f
+   `(#:modules ((ice-9 rdelim)
+(ice-9 regex)
+(srfi srfi-1)
+(guix build gnu-build-system)
+(guix build utils))
  #:phases
  (modify-phases %standard-phases
(replace
@@ -92,6 +96,122 @@
 (lambda* (#:key outputs #:allow-other-keys)
   (zero? (system* "./b2" ,@build-flags
(replace
+'check
+;; The provided method for running all tests (executing b2 in the
+;; "status" directory) requires a large amount of disk space
+;; (>20G) because it does not clean up build artifacts after
+;; successfully running a test suite.  So instead we run each test
+;; individually, which only requires ~7.7G.
+(lambda* (#:key outputs #:allow-other-keys)
+  (let ((b2 (string-append (getcwd) "/b2"))
+(test-dirs
+ ;; The instructions at
+ ;; http://www.boost.org/development/running_regression_tests.html
+ ;; to run b2 in each libs//test is not entirely
+ ;; accurate.  Some tests are in subdirectories and others
+ ;; in top-level directories.  So instead we read the list
+ ;; of test directories from status/Jamfile.v2
+ (let ((port (open-input-file "status/Jamfile.v2"))
+   (start-rx (make-regexp "^run-tests libs :"))
+   (end-rx (make-regexp "^[[:space:]]*;"))
+   (dir-rx (make-regexp "^[[:space:]]*([a-z0-9/_]+)")))
+   (let loop ((collecting #f)
+  (dirs '()))
+ (let* ((line (read-line port))
+(start (regexp-exec start-rx line))
+(end (regexp-exec end-rx line)))
+   (cond
+(start (loop #t dirs))
+((and collecting end)
+ (begin
+   (close-port port)
+   (reverse! dirs)))
+(collecting
+ (loop #t (cons (match:substring
+ (regexp-exec dir-rx line)
+ 1)
+dirs)))
+(else (loop #f dirs)))
+;; Several libraries have known-failing test cases, so
+;; skip those.
+(skip '(;; Some tests have not been updated for changes in
+;; Boost.Random,
+;; e.g. weighted_p_square_cumul_dist.cpp
+"accumulators"
+;; Some tests fail with 'Network is unreachable'
+"asio"
+;; ptr_list_inserter fails with 'check
+;; typeid(*--a_set.end()) == typeid(FooBar) has
+;; failed'
+"assign"
+;; stl_concept_covering: error: no match for
+;; 'operator=='
+"concept_check"
+;; bench_alloc.test: error: 'assert' was not
+;; declared in this scope.
+"container/bench"
+;; Compilation failures: member_ccs,
+;; mem

Re: go package (was docker compose)

2016-01-15 Thread Ludovic Courtès
Jeff Mickey  skribis:

> * "Thompson, David"  [2016-01-11 10:44]:
>> I hear someone has a working Go package that hasn't been submitted
>> yet, so maybe we'll have Docker itself available someday.  That will
>> be interesting. :)
>
> I've gotten excited a few times on IRC, but unfortunately every time I
> run into weird libgcc_s issues with how go does it's linking (which is
> really assembling post link).
>
> Here are my current go-1.4.3 and go-1.5.3 packages:
>
> https://github.com/codemac/guix-pkgs/blob/master/tmp/codemac/packages/go.scm
>
> They still fail if you ever link against anything that dynamically links
> against glibc. This means any go program that uses the net, os/user,
> runtime or cgo packages fail to execute complaining they can't find
> libgcc_s. I've tried just about everything imagineable, and it's unclear
> to me how the nix gcc + glibc packages differ from the guix ones.

Not sure if that helps, but one of the differences is that Guix uses GCC
directly, albeit with a few modifications to its default “spec file”
such that libgcc_s and libc are automatically found (search for
GNU_USER_TARGET_LIB_SPEC in (gnu packages gcc).)

Conversely, Nixpkgs uses a wrapper around the real compiler; the wrapper
is a shell script that adds flags a bunch of flags such as
‘-dynamic-linker’:

  
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/cc-wrapper/cc-wrapper.sh

> I'd love help / suggestions, I use golang at my day job so I'm motivated
> to get this fixed. I have a pretty good idea of what the go package
> system could look like for guix without us distributing PILES of
> statically linked go poop as well, but that's a separate discussion.

:-)

Sounds like with what you and Efraim have been doing we’ll hopefully get
there soon!

Ludo’.



Re: [PATCH] Update glade.

2016-01-15 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> This makes it possible to build “gnunet-gtk” with the latest version of
> GTK+.  I chose to disable the three tests, because they require an X
> server with libGL support for software rendering.  I couldn’t get this
> to work even after adding “xorg-server” and “mesa”, and starting Xvfb
> before tests.

OK.

> From 48a7ac38ee0f5554c844a503d5ed232a5816eb07 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 14 Jan 2016 11:03:49 +0100
> Subject: [PATCH] gnu: glade: Update to 3.18.5.
>
> * gnu/packages/gnome.scm (glade): Update to 3.18.5.
> [arguments]: Disable tests; add "fix-docbook" phase.
> [inputs]: Replace "gtk+-2" with "gtk+".
> [native-inputs]: Add "itstool", "libxslt", "docbook-xml", "docbook-xsl";
> replace "python" with "python-2".

[...]

> + (add-before 'configure 'fix-docbook
> +   (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "man/Makefile.in"
> +   
> (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl";)
> +(string-append (assoc-ref inputs "docbook-xsl")
> +   "/xml/xsl/docbook-xsl-"
> +   ,(package-version docbook-xsl)
> +   "/manpages/docbook.xsl")))
> + (setenv "XML_CATALOG_FILES"
> + (string-append (assoc-ref inputs "docbook-xml")
> +"/xml/dtd/docbook/catalog.xml"))

I’m surprised that this is needed: since libxml2 is an input, and since
libxml2 defines XML_CATALOG_FILES as its search path, XML_CATALOG_FILES
should automatically be set, no?

Otherwise LGTM, thanks!

I agree with Efraim that switching to GTK+ 3.x is good idea.

Ludo’.



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

2016-01-15 Thread Ludovic Courtès
Leo Famulari  skribis:

> On Wed, Jan 13, 2016 at 10:27:13PM -0500, Leo Famulari wrote:
>> On Wed, Jan 13, 2016 at 03:17:28PM +0100, Ludovic Courtès wrote:
>> > Leo Famulari  skribis:
>> > 
>> > > * gnu/packages/audio.scm (espeak): New variable.
>> > 
>> > If you think eSpeak-ng is not ready yet, or is sufficiently different,
>> > it’s OK to package eSpeak.
>> 
>> I'm looking into it.
>
> I think it will be a great replacement for eSpeak, but it's not ready
> yet, in my opinion.

OK, so that’s a good reason to package eSpeak!

Thanks,
Ludo’.



Re: [PATCH 4/5] gnu: Add python-rply.

2016-01-15 Thread Ludovic Courtès
宋文武  skribis:

> * gnu/packages/python.scm (python-rply): New variables.

[...]

> +(home-page "")

Wrong!  :-)

> +(synopsis
> + "Pure Python based parser that also works with RPython")

“Parser generator for Python”?

Otherwise LGTM.

Ludo’.



Re: [PATCH 2/3] gnu: Add go-1.4.

2016-01-15 Thread Ludovic Courtès
Efraim Flashner  skribis:

> On Thu, 14 Jan 2016 16:12:35 +0100
> l...@gnu.org (Ludovic Courtès) wrote:

[...]

>> Also, what’s CSP-style?  :-)
>
> I have no idea :) I scanned golang.org but didn't see anything that looked
> usable, so I hit up Wikipedia and that's what it spit out. It seems wikipedia
> says: https://en.wikipedia.org/wiki/Communicating_sequential_processes "In
> computer science, communicating sequential processes (CSP) is a formal
> language for describing patterns of interaction in concurrent systems."

Oh, interesting!  It might be worth replacing “CSP-style” in the
description with “in the style of communicating sequential processes
(CSP)”.

Thanks,
Ludo’.



Re: Freezing core-updates soon

2016-01-15 Thread Ludovic Courtès
Mark H Weaver  skribis:

> On core-updates, automake failed its test suite on both x86_64 and i686,
> leading to over 2000 dependency failures.
>
>   http://hydra.gnu.org/build/943102
>   http://hydra.gnu.org/build/97

Fixed in 89b4823, thanks!

Ludo’.



Re: [PATCH 5/5] gnu: Add python-hy.

2016-01-15 Thread Ludovic Courtès
宋文武  skribis:

> * gnu/packages/python.scm (python-hy, python2-hy): New variables.

[...]

> +(home-page "http://hylang.org/";)
> +(synopsis "Lisp frontend to Python")
> +(description
> + "Hy is a dialect of Lisp that's embedded in Python.
> +
> +Since Hy transforms its Lisp code into the Python Abstract Syntax Tree, you
> +have the whole world of Python at your fingertips, in Lisp form.")

I would remove the newline.

Otherwise LGTM, thanks!

Ludo’.



Small texlive variant

2016-01-15 Thread Andreas Enge
Hello,

the first attached patch adds a small texlive variant. I spent quite some
time determining things to delete from texlive-texmf so that the result
would still be usable, but I am certain the result is not minimal in the
strict sense of the word. So I wondered whether the package should not be
called "texlive-small" instead, but we already have a certain convention
of using the suffix "-minimal" internally. I export the variable, but as
I see it, its main use will be as a native-input to build documentation
in packages. In my case, I am interested in pari-gp, which is modified
by the second patch to build its documentation. For testing, you may call
   `./pre-inst-env guix build texlive-minimal`/bin/xdvi `./pre-inst-env guix 
build pari-gp`/share/pari/doc/tutorial
after applying the patches.

>From texlive-texmf, I deleted the subdirectory "doc" (1753 MB) and "source"
(250 MB), and large chunks of "fonts", bringing it down from 1591 MB
to 116 MB. There are probably parts of the 267 MB of "tex" that could be
deleted as well, but I do not feel motivated to investigate further.

./pre-inst-env guix size texlive
/gnu/store/pjmxca0nww2bp6hkwz7cjlh4s26ymxs2-texlive-2015  4223.2 
0.3   0.0%
/gnu/store/0wkmf926dv9ck8y1pk5p2lxw95kf7z9d-texlive-texmf-20154222.9  
3710.3  87.9%
/gnu/store/0h4cs6krz1rsfjl17rpy5mjr3bfap5lp-texlive-bin-2015   507.2
49.5   1.2%
...

./pre-inst-env guix size texlive-minimal
/gnu/store/9flmncm9plf7y3bs6yj0nnpr7zlwagi2-texlive-minimal-2015 937.5  
   0.3   0.0%
/gnu/store/y8shfzsg82b37zlzx29bza686gcr5162-texlive-texmf-minimal-2015   937.1  
 428.4  45.7%
/gnu/store/0h4cs6krz1rsfjl17rpy5mjr3bfap5lp-texlive-bin-2015 507.2  
  49.5   5.3%
...

It should be possible to build texlive-minimal with a stripped-down variant
of texlive-bin, but I do not feel it is worth the effort.

The next thing to do would be to replace the occurrences of "texlive" in
packages by "texlive-minimal" (and to make sure they are in native-inputs),
to have the branch built by hydra and to check whether texlive-minimal is
not too minimal for building all documentation.

But before that, I am waiting for your comments.

Andreas

>From f8a4aabcdf2ec156f42a87708078c065ad4fe43f Mon Sep 17 00:00:00 2001
From: Andreas Enge 
Date: Fri, 15 Jan 2016 16:00:47 +0100
Subject: [PATCH 1/2] gnu: Add texlive-minimal.

* gnu/packages/texlive.scm (texlive-texmf-minimal, texlive-minimal):
  New variables.
---
 gnu/packages/texlive.scm | 122 ++-
 1 file changed, 121 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/texlive.scm b/gnu/packages/texlive.scm
index 0b2dec4..319a52e 100644
--- a/gnu/packages/texlive.scm
+++ b/gnu/packages/texlive.scm
@@ -24,6 +24,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
@@ -45,7 +46,9 @@
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages zip)
-  #:autoload   (gnu packages texinfo) (texinfo))
+  #:autoload   (gnu packages texinfo) (texinfo)
+  #:use-module (ice-9 ftw)
+  #:use-module (srfi srfi-1))
 
 (define texlive-extra-src
   (origin
@@ -284,6 +287,123 @@ This package contains the complete TeX Live 
distribution.")
(license (license:fsf-free "http://tug.org/texlive/copying.html";))
(home-page "http://www.tug.org/texlive/";)))
 
+
+;; texlive-texmf-minimal is a pruned, small version of the texlive tree,
+;; in particular dropping documentation and fonts.
+(define-public texlive-texmf-minimal
+  (package (inherit texlive-texmf)
+   (name "texlive-texmf-minimal")
+   (arguments
+(substitute-keyword-arguments
+ (package-arguments texlive-texmf)
+ ((#:modules modules)
+  `((ice-9 ftw)
+(srfi srfi-1)
+,@modules))
+ ((#:phases phases)
+  `(modify-phases ,phases
+ (add-after 'unpack 'prune
+   (lambda _
+ (with-directory-excursion "texmf-dist"
+   (for-each delete-file-recursively
+ '("doc" "source" "tex4ht"))
+   ;; Delete all subdirectories of "fonts", except for those
+   ;; named "cm", that is, "afm/public/amsfonts/cm",
+   ;; "map/dvips/cm", "pk/ljfour/public/cm" (which is effectively
+   ;; all of "pk"), "source/public/cm", "tfm/public/cm" and
+   ;; "type1/public/amsfonts/cm".
+   ;; Inside "tfm", apparently more subdirectories are needed for
+   ;; successful bootstrapping of the formats, so we keep
+   ;; "tfm/public".
+   (with-directory-excursion "fonts"
+ (for-each delete-file-recursively
+   (lset-difference equal?
+(scandir ".")
+   

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

2016-01-15 Thread Ludovic Courtès
宋文武  skribis:

> * gnu/packages/python.scm (python-clint, python2-clint): New variables.

[...]

> +(home-page "https://github.com/kennethreitz/clint";)
> +(synopsis "Command line interface tools")
> +(description
> + "Clint is a Python module filled with a set of tools for developing
> +commandline applications.")

s/commandline/command-line/

s/applications./applications, including tools for colored and indented
output, progress bar display, and pipes./

OK with this change.

Ludo’.



Re: [PATCH 3/5] gnu: Add python-astor.

2016-01-15 Thread Ludovic Courtès
宋文武  skribis:

> * gnu/packages/python.scm (python-astor, python2-astor): New variables.

OK!

Ludo'.



Re: [PATCH 1/5] gnu: Add python-args.

2016-01-15 Thread Ludovic Courtès
宋文武  skribis:

> * gnu/packages.scm (python-args, python2-args): New variables.

[...]

> +(home-page "https://github.com/kennethreitz/args";)
> +(synopsis "CLI argument interface")

What about “Command-line argument parser”?

> +(description
> + "This module provides the CLI argument interface for clint.")

This seems wrong, no?  Maybe: “This package provides a Python library to
parse command-line arguments.”

OK with these changes.

Thanks,
Ludo’.



Re: [PATCH] Add ant-build-system.

2016-01-15 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> I’ve used it successfully to package the Java projects hamcrest-core,
> junit, osgi-annotation, osgi-core, log4j-api, and javax-mail.

Nice.

> It’s especially useful in cases where a project does *not* use Ant and
> would otherwise require building with Maven or recursively calling javac
> on all source files (as currently done for swt), because it can generate
> a simple Ant build file with all the right targets.  This cuts a lot of
> boilerplate from Java packages.

The idea of generating a ‘build.xml’ file is quite unexpected, but I see
that it’s useful.

> The build.xml it generates contains a target “touch” which is run before
> wrapping up the compiled .class files in a jar archive; this target
> ensures that the timestamps of all archived files are reset, so the
> produced jars can be (and in case of the above-mentioned packages)
> deterministic.

Cool.

What should we do about packages that do provide a ‘build.xml’?  I
suppose their jars will most likely include timestamps by default,
right?

If that is the case, maybe we should instead add an additional phase
that would, say, unpack all the installed tarballs, reset timestamps,
and repack them?

> From 284f79ae6ba584603e58228c7c9ee73ac135912d Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Tue, 29 Dec 2015 16:56:49 +0100
> Subject: [PATCH] build: Add Ant build system.
>
> * guix/build-system/ant.scm: New file.
> * guix/build/ant-build-system: New file.
> * Makefile.am (MODULES): Add new files.
> * doc/guix.texi (Build Systems): Document ant-build-system.

[...]

> +(define (default-build.xml jar-name prefix)
> +  "Create a simple build.xml with standard targets for Ant."
> +  (let ((file (open-output-file "build.xml")))

Slightly better to use:

  (call-with-output-file "build.xml"
(lambda (port)
  ;; …
  ))

because it makes sure the port is closed whenever the dynamic extent of
the body is left.

> +(define* (configure #:key inputs outputs (jar-name #f)
> +#:allow-other-keys)
> +  (when jar-name
> +(default-build.xml jar-name
> +  (string-append (assoc-ref outputs "out")

The second ‘default-build.xml’ argument should be aligned under the
first.

> +(define* (install #:key (make-flags '()) #:allow-other-keys)
> +  (zero? (apply system* `("ant" "install" ,@make-flags

Should we add a post-install phase or something that makes sure that
.jar files are always installed in the same place, say under lib/java,
similar to the ‘validate-documentation-location’?

Thank you!

Ludo’.



Re: Reproducible Build Summit

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

> Manolis and I had the pleasure to attend the first “Reproducible Build
> Summit” this week, wonderfully well organized by Debian hackers Lunar
> and Holger, along with other brilliant people, and with the support of
> the Linux Foundation, the Open Technology Fund, and Google.
>
>   https://reproducible-builds.org/events/athens2015/

Minutes are now available at this URL.

Ludo’.



[PATCH 0/1] Show to use vm-image

2016-01-15 Thread Leo Famulari
This patch on the manual explains how to use the output of
`guix system vm-image`.

Thoughts?

It seems wrong to repeat the command-line like that, but I don't know a
better way to explain the elements of the command. On the other hand,
the annotated version is hard to read as a command-line. Should it
change somehow, or is it fine?

I tried booting i686 on x86_64 and it didn't work, so I didn't mention
the possibility.

Leo Famulari (1):
  doc: Show how to boot result of 'vm-image'.

 doc/guix.texi | 41 ++---
 1 file changed, 38 insertions(+), 3 deletions(-)

-- 
2.6.4




[PATCH 1/1] doc: Show how to boot result of 'vm-image'.

2016-01-15 Thread Leo Famulari
* doc/guix.texi (Invoking guix system): Explain how to boot the QEMU
images created by vm-image.
---
 doc/guix.texi | 41 ++---
 1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index e583e8c..51165b4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9058,9 +9058,6 @@ Return a virtual machine or disk image of the operating 
system declared
 in @var{file} that stands alone.  Use the @option{--image-size} option
 to specify the size of the image.
 
-When using @code{vm-image}, the returned image is in qcow2 format, which
-the QEMU emulator can efficiently use.
-
 When using @code{disk-image}, a raw disk image is produced; it can be
 copied as is to a USB stick, for instance.  Assuming @code{/dev/sdc} is
 the device corresponding to a USB stick, one can copy the image on it
@@ -9070,6 +9067,44 @@ using the following command:
 # dd if=$(guix system disk-image my-os.scm) of=/dev/sdc
 @end example
 
+When using @code{vm-image}, the returned image is in qcow2 format, which
+the QEMU emulator can efficiently use.
+
+To run the image in QEMU, copy it out of the store and give yourself
+permission to write to the copy. When invoking QEMU, you must choose a
+system emulator that is suitable for your hardware platform.  Here is a
+minimal QEMU invocation that will boot GuixSD on x86_64 hardware:
+
+@example
+$ qemu-system-x86_64 \
+-net user \
+-net nic,model=virtio \
+-enable-kvm \
+-m 256 \
+/tmp/qemu-image
+@end example
+
+And the annotated version:
+
+@example
+# Hardware platform to emulate. This should match the host.
+$ qemu-system-x86_64 \
+# Unpriviliged user mode networking. Guest can access host but not vice
+# versa. If you don't choose a network stack, the boot will fail.
+-net user \
+# You must create a network interface of a given model. If you don't
+# create a NIC, the boot will fail. You can get a list of available NIC
+# models by running `qemu-system-x86_64 -net nic,model=help`.
+-net nic,model=virtio \
+# If your system is x86 with hardware virtualization extensions,
+# enabling the kernel virtual machine will make things run faster.
+-enable-kvm \
+# RAM available to the guest OS. Defaults to 128 megabytes, which is not
+# enough for the Guix daemon.
+-m 256 \
+/tmp/qemu-image
+@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
-- 
2.6.4