Re: [GSoC] Draft proposal for an Install Wizard for Guix

2016-03-26 Thread Thomas Ingram

On 03/26/2016 07:39 AM, Ludovic Courtès wrote:

Personally, I would like to view the “wizard” as a helper, and not as
something that hides everything and turns people into “end users.”

I don’t know how this could translate in the design of the tool.
Perhaps showing the ‘operating-system’ declaration as you suggest is one
thing, and making it easy to view the section of the manual that
corresponds to a particular item, or to jump to the code that defines a
specific service (say), would be helpful too.
Yes as much as it is an installer it should also be an introduction. 
Something that not only lets a user easily input their options but also 
shows them how their settings will be put into config.scm, I'm trying to 
come up with some clever ideas of how to do this in a graceful way.


Thinking about this has lead me to think more about Danny 
Milosavljevic's suggestion

Yeah, personally I'd like to have an emacs form which just displays config.scm 
(and stores it as a normal file) and has some inline documentation on what is 
what and maybe a treeview instead of visible S-Expression parens - and a 
validation process whether the stuff makes sense. When you exit, it just 
instantiates the system.

The partitioning & file system type should also be specified in a declarative 
way in the config [and arguably it already is].

Basically not a lot different from now but just more user-friendly and catching 
more mistakes before instantiation.

ncurses actually isn't as flexible - although it has the benefit that the 
average user is familiar with how it looks.
Basically I was thinking of doing that with an ncurses UI that shows the 
user their config.scm with some documentation and then walks users 
through changing each option. But maybe an emacs installer makes more 
sense as this is the type of interface emacs does very well.


The reason I had avoided proposing an emacs installer previously is I 
worry about confusion from users who are unfamiliar with emacs and how 
to use it. Should we be concerned with that when so many of Guix's great 
features that can be accessed through emacs. Perhaps there could be a 
simple introduction to emacs in the installer as well? On the other hand 
if a user has no experience with emacs throwing that at them along with 
config.scm could be overwhelming.


Anyways just some thoughts I had, any more feedback would be greatly 
appreciated.


Thanks
Thomas Ingram





[PATCH] gnu: pspp: Update to 0.10.0

2016-03-26 Thread John Darrington
* gnu/packages/math.scm (pspp): Update to 0.10.0
---
 gnu/packages/maths.scm | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6d3d134..659d8a2 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -43,6 +43,8 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages flex)
@@ -204,15 +206,14 @@ LP/MIP solver is included in the package.")
 (define-public pspp
   (package
 (name "pspp")
-(version "0.8.5")
+(version "0.10.0")
 (source
  (origin
   (method url-fetch)
-  (uri (string-append "mirror://gnu/pspp/pspp-"
-  version ".tar.gz"))
+  (uri (string-append "mirror://gnu/pspp/pspp-" version ".tar.gz"))
   (sha256
(base32
-"0c8326yykidi94xi7jn27j8iqxc38vc07d4wf5zyk0l8lpzx5vz7"
+ "1nwnxr8mvf8y4lc8h8sd2xn2njwjk42x8mzj91zzv92m2z3vyggg"
 (build-system gnu-build-system)
 (inputs
  `(("cairo" ,cairo)
@@ -220,14 +221,18 @@ LP/MIP solver is included in the package.")
("gettext" ,gnu-gettext)
("gsl" ,gsl)
("libxml2" ,libxml2)
+   ("ncurses" ,ncurses)
("pango" ,pango)
+   ("postgresql",postgresql) ; for the libpq interface
("readline" ,readline)
-   ("gtk" ,gtk+-2)
-   ("gtksourceview" ,gtksourceview-2)
+   ("gtk" ,gtk+)
+   ("gtksourceview" ,gtksourceview)
("zlib" ,zlib)))
 (native-inputs
  `(("glib" ,glib "bin") ;for glib-genmarshal
("perl" ,perl)
+   ("perl-text-diff" ,perl-text-diff)
+   ("postgresql",postgresql) ; Need a postgres server to test the libpq 
interface
("texinfo" ,texinfo)
("pkg-config" ,pkg-config)))
 (home-page "http://www.gnu.org/software/pspp/";)
-- 
2.1.4




Re: RFC: Install Wizard considerations

2016-03-26 Thread Thomas Ingram



On 03/25/2016 03:35 PM, myglc2 wrote:

o) Since GuixSD is much more bleeding-edge than Guix, if we make it
easier to install GuixSD, we make it easier for new users to bleed.

o) The fact of the matter is that GuixSD hardware support is weak
(examples: no boot from MDADM, missing solutions for non-free
hardware). If we make it easy for new users to go in this direction
by making it easy to install, we know that many will hit these issues
and become discouraged.


I agree that GuixSD is currently limited and still beta software, but 
when GuixSD is more feature complete do we want it to be approachable to 
general users or do we want it limited to Guix power users?


My thinking was one day we would want a general user to be able to 
easily use GuixSD, so at some point we'll need a nice friendly 
installer. Maybe I'm misunderstanding the end goals of GuixSD though.



So, IMO, if we want to make it easier for new users to try Guix, right
now we need a Guix/GNU/Linxu install wizard much more than we need a
GuixSD install wizard.

Looking at the big picture, the ideal installer would seamlessly handle
Guix/GNU/Linux and GuixSD installs. It might do something like the
following:

Examine the environment & determine the possible ways that Guix and/or
GuixSD can be installed, then walk the user through choices, for
example:

- netboot?
  - fdisk & GuixSD?
- GNU/Linux system?
  - ?root user?
   - install Guix?
   - put GuixSD netboot on USB?
   - install GuixSD to disk?
   - install GuixSD dual boot?
  - running in user space?
   - guix installed?
- set up git clone?
   - guix not present?
- can you sudo?
 - yes - got to '?root user' above
 - no
  - install Guix in user space?
  - put GuixSD netboot on USB?

In any event, the end user should end up with a functioning Guix setup
in which all guix features described in the manual are working, (except
those requiring root, e.g. guix system reconfigure).
I completely agree that to expand Guix's user base we need to get more 
people using it on any GNU/Linux. I really appreciate the feedback 
although I'm worried I'm a bit too inexperienced, I don't know if I have 
the skill to write something to handle such a diverse set of installs.


This is why I've been aiming to write the GuixSD installer where much of 
it can be easily automated through the lovely operating-system 
declaration which (it's my understand that) is exclusive to GuixSD. 
Perhaps Dyan, who also proposed for GSoC a Guix installer could work on 
this general Guix installer and I could focus on a installer for GuixSD, 
he seems more experienced than me so he would probably have a better 
shot at handling a more complicated install process on other distros.


---
Thomas Ingram




Re: [PATCH 1/3] licenses: Add beerware license.

2016-03-26 Thread Christopher Allan Webber
Leo Famulari writes:

> +(define beerware
> +  (license "Beerware"
> +   "http://people.freebsd.org/~phk/"; ; Scroll down
> +   "https://fedoraproject.org/wiki/Licensing/Beerware";))
> +

Now there's a license name bound to cause some confusion!

It looks free... I think it would be okay to push.  But maybe if only
one or two packages use it it would be better to just use the
non-copyleft license option?



Re: [PATCH 2/2] Add jq

2016-03-26 Thread Jelle Licht
2016-03-27 0:26 GMT+01:00 Leo Famulari :

> On Sat, Mar 26, 2016 at 11:53:24PM +0100, Jelle Licht wrote:
> > From jq's README:
> >
> > To get regexp support you'll also need to install Oniguruma (note that
> jq's
> > > tests require regexp support to pass).
> >
> >
> > So it seems to be an optional dependency (which allows tests to pass and
> > adds functionality). I could make it a build-time dependency, or not.
> > What is the 'guix' way of handling these cases?
>
> In this case I think the description should be changed.
>
> >
> > --
> > Jelle
> >
> >
> > 2016-03-26 23:45 GMT+01:00 Leo Famulari :
> >
> > > On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote:
> > > > +(inputs
> > > > + `(("oniguruma" ,oniguruma)))
> > >
> > > [...]
> > >
> > > > +(description "jq is like sed for JSON data – you can use it to
> > > slice and
> > > > +filter and map and transform structured data with the same ease that
> > > sed, awk,
> > > > +grep and friends let you play with text.  It is written in portable
> C,
> > > and it
> > > > +has zero runtime dependencies.  jq can mangle the data format that
> you
> > > have
> > >^---^
> > >
> > > Since oniguruma is listed as a run-time dependency, does this mean the
> > > description is wrong? Or is oniguruma only needed to build?
> > >
>

^ changed
From 9bc43e4ee37a35ba8e724eac103c39c72d870f75 Mon Sep 17 00:00:00 2001
From: Jelle Licht 
Date: Sat, 26 Mar 2016 22:49:42 +0100
Subject: [PATCH 2/2] gnu: Add jq

* gnu/packages/web.scm: (jq): New variable
---
 gnu/packages/web.scm | 33 +
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 516e623..49fe19e 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer 
 ;;; Copyright © 2015, 2016 Eric Bavier 
 ;;; Copyright © 2015 Eric Dvorsak 
+;;; Copyright © 2016 Jelle Licht 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -52,10 +53,12 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages valgrind)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages statistics))
 
@@ -3109,3 +3112,33 @@ callback or connection interfaces.")
  "Gumbo is an implementation of the HTML5 parsing algorithm implemented as
 a pure C99 library.")
 (license l:asl2.0)))
+
+(define-public jq
+  (package
+(name "jq")
+(version "1.5")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/stedolan/"; name
+  "/releases/download/" name "-" version
+  "/" name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0g29kyz4ykasdcrb0zmbrp2jqs9kv1wz9swx849i2d1ncknbzln4"
+(inputs
+ `(("oniguruma" ,oniguruma)))
+(native-inputs
+ `(;; TODO fix gems to generate documentation
+   ;;("ruby" ,ruby)
+   ;;("bundler" ,bundler)
+   ("valgrind" ,valgrind)))
+(build-system gnu-build-system)
+(home-page "http://stedolan.github.io/jq/";)
+(synopsis "Command-line JSON processor")
+(description "jq is like sed for JSON data – you can use it to slice and
+filter and map and transform structured data with the same ease that sed, awk,
+grep and friends let you play with text.  It is written in portable C.  jq and
+can mangle the data format that you have into the one that you want with very
+little effort, and the program to do so is often shorter and simpler than
+you’d expect.")
+(license (list l:expat l:cc-by3.0
-- 
2.7.3



Re: [PATCH 2/2] Add jq

2016-03-26 Thread Leo Famulari
On Sat, Mar 26, 2016 at 11:53:24PM +0100, Jelle Licht wrote:
> From jq's README:
> 
> To get regexp support you'll also need to install Oniguruma (note that jq's
> > tests require regexp support to pass).
> 
> 
> So it seems to be an optional dependency (which allows tests to pass and
> adds functionality). I could make it a build-time dependency, or not.
> What is the 'guix' way of handling these cases?

In this case I think the description should be changed.

> 
> --
> Jelle
> 
> 
> 2016-03-26 23:45 GMT+01:00 Leo Famulari :
> 
> > On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote:
> > > +(inputs
> > > + `(("oniguruma" ,oniguruma)))
> >
> > [...]
> >
> > > +(description "jq is like sed for JSON data – you can use it to
> > slice and
> > > +filter and map and transform structured data with the same ease that
> > sed, awk,
> > > +grep and friends let you play with text.  It is written in portable C,
> > and it
> > > +has zero runtime dependencies.  jq can mangle the data format that you
> > have
> >^---^
> >
> > Since oniguruma is listed as a run-time dependency, does this mean the
> > description is wrong? Or is oniguruma only needed to build?
> >



[PATCH 3/3] gnu: Add signify.

2016-03-26 Thread Leo Famulari
* gnu/packages/crypto.scm (signify): New variable.
---
 gnu/packages/crypto.scm | 35 +++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index a8d675b..56e2a90 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 David Thompson 
 ;;; Copyright © 2015 Ricardo Wurmus 
+;;; Copyright © 2016 Leo Famulari 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,6 +20,8 @@
 
 (define-module (gnu packages crypto)
   #:use-module (gnu packages)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages libbsd)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -46,3 +49,35 @@
 communication, encryption, decryption, signatures, etc.")
 (license isc)
 (home-page "http://libsodium.org";)))
+
+(define-public signify
+  (package
+(name "signify")
+(version "17")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/aperezdc/signify/";
+  "archive/v" version ".tar.gz"))
+  (sha256
+   (base32
+"0kfv2k1fqck31vwlnicavb0h541ilad9zd7j8zz8x2kx36wwqpr7"
+(build-system gnu-build-system)
+;; TODO Build with libwaive (described in README.md), to implement 
something
+;; like OpenBSD's pledge().
+(arguments
+ `(#:make-flags
+   (list "CC=gcc"
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'check ; no test suite
+(native-inputs
+ `(("pkg-config" ,pkg-config)))
+(inputs
+ `(("libbsd" ,libbsd)))
+(synopsis "Create and verify cryptographic signatures")
+(description "The signify utility creates and verifies cryptographic
+signatures using the elliptic curve Ed25519.")
+(home-page "https://github.com/aperezdc/signify";)
+(license (list bsd-3 bsd-4 isc public-domain ; FIXME: IBM license on 
base64.c?
-- 
2.7.3




[PATCH 1/3] licenses: Add beerware license.

2016-03-26 Thread Leo Famulari
* guix/licenses.scm (beerware): New variable.
---
 guix/licenses.scm | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/guix/licenses.scm b/guix/licenses.scm
index 71c0736..9d5335b 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -29,6 +29,7 @@
   #:export (license? license-name license-uri license-comment
 agpl3 agpl3+
 asl1.1 asl2.0
+beerware
 boost1.0
 bsd-2 bsd-3 bsd-4
 non-copyleft
@@ -110,6 +111,11 @@
"http://directory.fsf.org/wiki/License:Apache2.0";
"https://www.gnu.org/licenses/license-list#apache2";))
 
+(define beerware
+  (license "Beerware"
+   "http://people.freebsd.org/~phk/"; ; Scroll down
+   "https://fedoraproject.org/wiki/Licensing/Beerware";))
+
 (define boost1.0
   (license "Boost 1.0"
"http://directory.fsf.org/wiki/License:Boost1.0";
-- 
2.7.3




[PATCH 2/3] gnu: Add libbsd.

2016-03-26 Thread Leo Famulari
* gnu/packages/libbsd.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am   |  1 +
 gnu/packages/libbsd.scm | 43 +++
 2 files changed, 44 insertions(+)
 create mode 100644 gnu/packages/libbsd.scm

diff --git a/gnu-system.am b/gnu-system.am
index 6cdc1e3..38b6a37 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -181,6 +181,7 @@ GNU_SYSTEM_MODULES =\
   gnu/packages/lego.scm\
   gnu/packages/less.scm\
   gnu/packages/lesstif.scm \
+  gnu/packages/libbsd.scm  \
   gnu/packages/libcanberra.scm \
   gnu/packages/libdaemon.scm   \
   gnu/packages/libedit.scm \
diff --git a/gnu/packages/libbsd.scm b/gnu/packages/libbsd.scm
new file mode 100644
index 000..78efafc
--- /dev/null
+++ b/gnu/packages/libbsd.scm
@@ -0,0 +1,43 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Leo Famulari 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu packages libbsd)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix licenses)
+  #:use-module (guix packages))
+
+(define-public libbsd
+  (package
+(name "libbsd")
+(version "0.8.2")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://libbsd.freedesktop.org/releases/";
+  "libbsd-" version ".tar.xz"))
+  (sha256
+   (base32
+"02i5brb2007sxq3mn862mr7yxxm0g6nj172417hjyvjax7549xmj"
+(build-system gnu-build-system)
+(synopsis "Utility functions from BSD systems")
+(description "This library provides useful functions commonly found on BSD
+systems, and lacking on others like GNU systems, thus making it easier to port
+projects with strong BSD origins, without needing to embed the same code over
+and over again on each project.")
+(home-page "https://libbsd.freedesktop.org/wiki/";)
+(license (list bsd-2 bsd-3 bsd-4 bsd-style expat isc public-domain
-- 
2.7.3




[PATCH 0/3] Adding libbsd and signify

2016-03-26 Thread Leo Famulari
This adds libbsd [0] and a port [1] of OpenBSD's signify tool. [2]

I couldn't figure out where to put libbsd so I made a new module, but
I'm open to advice.

There is one more thing to be resolved: What should I do about the
unusual license from IBM [3] on base64.c? [4]

I searched the net, and all the references I found to this license are
other instances of this base64 C implementation. It doesn't seem to have
been used elsewhere. Advice?

[0]


[1]


[2]


[3]
/*
 * Portions Copyright (c) 1995 by International Business Machines, Inc.
 *
 * International Business Machines, Inc. (hereinafter called IBM) grants
 * permission under its copyrights to use, copy, modify, and distribute this
 * Software with or without fee, provided that the above copyright notice and
 * all paragraphs of this notice appear in all copies, and that the name of IBM
 * not be used in connection with the marketing of any product incorporating
 * the Software or modifications thereof, without specific, written prior
 * permission.
 *
 * To the extent it has a right to do so, IBM grants an immunity from suit
 * under its patents, if any, for the use, sale or manufacture of products to
 * the extent that such products are used for performing Domain Name System
 * dynamic updates in TCP/IP networks by means of the Software.  No immunity is
 * granted for any product per se or for any other function of any product.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
 * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
 * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
 */

[4]


Leo Famulari (3):
  licenses: Add beerware license.
  gnu: Add libbsd.
  gnu: Add signify.

 gnu-system.am   |  1 +
 gnu/packages/crypto.scm | 35 +++
 gnu/packages/libbsd.scm | 43 +++
 guix/licenses.scm   |  6 ++
 4 files changed, 85 insertions(+)
 create mode 100644 gnu/packages/libbsd.scm

-- 
2.7.3




Re: [PATCH 2/2] Add jq

2016-03-26 Thread Alex Griffin
Usually a second package is added which is just a variant on the first.
Something like this:

(define-public jq-no-oniq
  (package
(inherit jq)
    (name "jq-no-onig")
    (inputs '(

But in this case I'm not sure it's worth it. Maybe just remove the part
about zero dependencies from the description instead.
-- 
Alex Griffin


On Sat, Mar 26, 2016, at 05:53 PM, Jelle Licht wrote:
> From jq's README:
> 
>> To get
regexp support you'll also need to install Oniguruma (note that jq's
tests require regexp support to pass).
> 
> So it seems to be an optional dependency (which allows tests to pass and adds 
> functionality). I could make it a build-time dependency, or not.
> What is the 'guix' way of handling these cases?
> 
> --
> Jelle
> 
> 
> 2016-03-26 23:45 GMT+01:00 Leo Famulari :
>> On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote:
>> 
> +    (inputs
>> 
> +     `(("oniguruma" ,oniguruma)))
>> 
>> 
>> 
[...]
>> 
>> 
>> 
> +    (description "jq is like sed for JSON data – you can use it to slice and
>> 
> +filter and map and transform structured data with the same ease that sed, 
> awk,
>> 
> +grep and friends let you play with text.  It is written in portable C, and it
>> 
> +has zero runtime dependencies.  jq can mangle the data format that you have
>> 
       ^---^
>> 
>> 
>> 
Since oniguruma is listed as a run-time dependency, does this mean the
>> 
description is wrong? Or is oniguruma only needed to build?



Re: [PATCH 2/2] Add jq

2016-03-26 Thread Jelle Licht
>From jq's README:

To get regexp support you'll also need to install Oniguruma (note that jq's
> tests require regexp support to pass).


So it seems to be an optional dependency (which allows tests to pass and
adds functionality). I could make it a build-time dependency, or not.
What is the 'guix' way of handling these cases?

--
Jelle


2016-03-26 23:45 GMT+01:00 Leo Famulari :

> On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote:
> > +(inputs
> > + `(("oniguruma" ,oniguruma)))
>
> [...]
>
> > +(description "jq is like sed for JSON data – you can use it to
> slice and
> > +filter and map and transform structured data with the same ease that
> sed, awk,
> > +grep and friends let you play with text.  It is written in portable C,
> and it
> > +has zero runtime dependencies.  jq can mangle the data format that you
> have
>^---^
>
> Since oniguruma is listed as a run-time dependency, does this mean the
> description is wrong? Or is oniguruma only needed to build?
>


On my way to my first patch, need review

2016-03-26 Thread vincent
Even though I don't know if I am accepted for GSoC yet, I thought it would be 
nice to start contributing now! :)

I started by adding the gem wayback_machine_downloader (a very useful piece 
of software by the way).

So I used `guix edit ruby` and I copied it in the Documents folder. Then I 
added somewhere in the middle of the file:

(define-public wayback-machine-downloader
  (package
    (name "wayback-machine-downloader")
    (version "0.2.1")
    (source
  (origin
    (method url-fetch)
    (uri (rubygems-uri
   "wayback_machine_downloader"
   version))
    (sha256
  (base32
    "1nrwm5bc7vqm02m2x0lylxyya446kg0spg6ksi7dfkrad0l9jq8y"
    (build-system ruby-build-system)
    (arguments
   `(#:tests? #f ; no rakefile
  ))

    (native-inputs
 `(("ruby-rake-compiler" ,ruby-rake-compiler)
   ("ruby-minitest" ,ruby-minitest)))

    (synopsis
  "Download website from archive.org's Wayback Machine")
    (description
  "Download any website from the Wayback Machine.  Wayback Machine by 
Internet Archive (archive.org) is an awesome tool to view any website at any 
point of time but lacks an export feature.  Wayback Machine Downloader brings 
exactly this.")
    (home-page
  "https://github.com/hartator/wayback-machine-downloader";)
    (license expat)))


Then I ran: `guix package -i wayback-machine-downloader -f ~/Documents/ruby` 
and it successfully installed.

So my questions are:

1) Do you guys and gals have a better workflow that includes the git repo, so 
I can send a patch? All I saw in the documentation was about building guix 
itself. I guess I could clone somewhere and use `guix package -f`,  but will 
this be a reliable way of testing? And will this make my guix less stable on 
the long run?

2) Should I add "ruby-" before the name of the package? I know technically 
all gems should have "ruby-" before the name, but this is designed to be use 
independently. Could it have multiple names, or is it a bad idea?

3) Where does this package belong in the directory?

4) Is the package declaration itself all right? Are packages sorted or 
organized in any way?

5) I speak fluent French, can I add a description and summary in French?

Thanks!
Vincent


Re: [PATCH 2/2] Add jq

2016-03-26 Thread Leo Famulari
On Sat, Mar 26, 2016 at 11:06:15PM +0100, Jelle Licht wrote:
> +(inputs
> + `(("oniguruma" ,oniguruma)))

[...]

> +(description "jq is like sed for JSON data – you can use it to slice and
> +filter and map and transform structured data with the same ease that sed, 
> awk,
> +grep and friends let you play with text.  It is written in portable C, and it
> +has zero runtime dependencies.  jq can mangle the data format that you have
   ^---^

Since oniguruma is listed as a run-time dependency, does this mean the
description is wrong? Or is oniguruma only needed to build?



Re: [PATCH 2/2] Add jq

2016-03-26 Thread Jelle Licht
Thanks for your feedback Alex.

I have seen some other packages including multiple licenses in the list of
licenses,
so I took that approach.

I also took the liberty of taking your description, which seems to also be
coming directly from the jq website.

While digging into the valgrind issue, I found out that documentation is
currently not being generated;
after looking at what was required for this to work, I worked things out up
to the ruby-sass gem; I might finish
it if I have more time in the near future, but for now;

... jq, attempt two.

~Jelle

2016-03-26 20:13 GMT+01:00 Alex Griffin :

> Heh, I've had this packaged for ages (along with some others) and I've
> put off submitting because I don't have a good workflow yet for
> git+email. I should probably do something about that. Anyway, your
> oniguruma package looks good to me. Here's a few notes about jq:
>
> You listed jq's license at cc-by3.0, but that's only for the docs. Most
> of the jq code is under the x11 license, except a few files which were
> taken from other projects. I don't know how to specify multiple licenses
> - maybe someone more experienced with Guix can chime in?
>
> Your source URL is not stable (the hash will change at any time because
> it's autogenerated by Github and not guaranteed to be identical). I
> would use
> https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz
> instead.
>
> You should add valgrind as a dependency so that the test suite can run.
>
> Finally, your description is a bit sparse. Here's what I wrote:
>
> jq is like sed for JSON data – you can use it to slice and filter
> and map and transform structured data with the same ease that sed,
> awk, grep and friends let you play with text.
>
> It is written in portable C, and it has zero runtime dependencies.
>
> jq can mangle the data format that you have into the one that you
> want with very little effort, and the program to do so is often
> shorter and simpler than you’d expect.
>
> Hope that helps!
> --
> Alex Griffin
>
>
> On Sat, Mar 26, 2016, at 12:41 PM, Jelle Licht wrote:
> > ... and the actual package I wanted to use on guix!
> > Email had 1 attachment:
>
>
> >  * 0002-gnu-Add-jq.patch
> >   3k (text/x-patch)
>
>
From 991ccfdb49c9f18e35e6b99af9052f64a6464b09 Mon Sep 17 00:00:00 2001
From: Jelle Licht 
Date: Sat, 26 Mar 2016 22:49:42 +0100
Subject: [PATCH 2/2] gnu: Add jq

* gnu/packages/web.scm: (jq): New variable
---
 gnu/packages/web.scm | 33 +
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 516e623..c7392c6 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer 
 ;;; Copyright © 2015, 2016 Eric Bavier 
 ;;; Copyright © 2015 Eric Dvorsak 
+;;; Copyright © 2016 Jelle Licht 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -52,10 +53,12 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages valgrind)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages statistics))
 
@@ -3109,3 +3112,33 @@ callback or connection interfaces.")
  "Gumbo is an implementation of the HTML5 parsing algorithm implemented as
 a pure C99 library.")
 (license l:asl2.0)))
+
+(define-public jq
+  (package
+(name "jq")
+(version "1.5")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/stedolan/"; name
+  "/releases/download/" name "-" version
+  "/" name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0g29kyz4ykasdcrb0zmbrp2jqs9kv1wz9swx849i2d1ncknbzln4"
+(inputs
+ `(("oniguruma" ,oniguruma)))
+(native-inputs
+ `(;; TODO fix gems to generate documentation
+   ;;("ruby" ,ruby)
+   ;;("bundler" ,bundler)
+   ("valgrind" ,valgrind)))
+(build-system gnu-build-system)
+(home-page "http://stedolan.github.io/jq/";)
+(synopsis "Command-line JSON processor")
+(description "jq is like sed for JSON data – you can use it to slice and
+filter and map and transform structured data with the same ease that sed, awk,
+grep and friends let you play with text.  It is written in portable C, and it
+has zero runtime dependencies.  jq can mangle the data format that you have
+into the one that you want with very little effort, and the program to do so
+is often shorter and simpler than you’d expect.")
+(license (list l:expat l:cc-by3.0
-- 
2.7.3



Re: [PATCH] scripts: environment: Properly handle SIGINT.

2016-03-26 Thread Thompson, David
On Sat, Mar 26, 2016 at 2:33 PM, Thompson, David
 wrote:
> On Sat, Mar 26, 2016 at 2:23 PM, Ludovic Courtès  wrote:
>> David Thompson  skribis:
>>
>>> * tests/guix-environment-container.sh: Remove obsolete test.
>>
>> [...]
>>
>>> -if guix environment --bootstrap --container \
>>> - --ad-hoc bootstrap-binaries -- kill -SEGV 2
>>> -then false;
>>> -else
>>> -test $? -gt 127
>>> -fi
>>
>> This test was added in light of .  We want to
>> make sure we don’t lose that property.
>>
>> What happens exactly when a signal is sent to PID 1?  I would expect
>> that its parent process, which is outside the container in a waitpid
>> call, would simply get its exit value in the normal way, and thus,
>> changing “2” to “1” in this test should do the trick.  Am I naïve?  :-)
>
> The problem is that a process within the container cannot just kill
> PID 1 since its the init process and the kernel protects it, so
> changing "2" to "1" doesn't work.  The exit status of the environment
> command is 0 in that case because PID 1 never received the signal and
> thus exits normally.
>
> I'll try to come up with a replacement test case, thanks for giving me
> the context in which it was added.  (I should've used 'git blame'
> first.)

Coming up with a replacement test has proved very difficult.  Since
PID 1 is unkillable, I'm having a hell of time coming up with a clever
way to kill a Guile process via a signal.

- Dave



Re: [PATCH] environment: container: Do not remount network files as read-only.

2016-03-26 Thread Thompson, David
On Sat, Mar 26, 2016 at 2:43 PM, Ludovic Courtès  wrote:
> "Thompson, David"  skribis:
>
>> On Fri, Mar 18, 2016 at 4:51 PM, Ludovic Courtès  wrote:
>>> "Thompson, David"  skribis:
>>>
 I noticed that 'guix environment --container --network' didn't work on
 an Ubuntu machine I was on, and the culprit was remounting things like
 /etc/resolv.conf read-only after the initial bind mount.
>>>
>>> [...]
>>>
  (file-system-mapping
   (source file)
   (target file)
 - (writable? #f
 + ;; An unpriviliged user 
 might not
 + ;; be able to remount
 + ;; /etc/resolv.conf as 
 read-only,
 + ;; so we say that it is 
 writable
 + ;; here, even though in 
 practice
 + ;; it is not.
 + (writable? #t
   %network-configuration-files)
>>>
>>> Not sure I understand: why would bind-mounting /etc/resolv.conf
>>> read-only fail?
>>
>> I haven't figured out the exact reason yet, but here's a strace
>> snippet as proof:
>>
>> [pid 11334] mount("/etc/resolv.conf",
>> "/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23da000,
>> MS_RDONLY|MS_BIND, NULL) = 0
>> [pid 11334] mount("/etc/resolv.conf",
>> "/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23e4080,
>> MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = -1 EPERM (Operation not
>> permitted)
>>
>> Another Ubuntu user was able to reproduce this as well.
>
> Looking at the resolvconf man page that Drew mentioned, it seems that
> /etc/resolv.conf is a symlink when resolvconf is in used, right?
>
> If yes, does this make a difference:

/etc/resolv.conf is a symlink, but the patch doesn't work.

> It may be that the result after this is that you get /etc/resolv.conf in
> the container, but it’s a dangling symlink.  But isn’t it the case
> already with the patch you propose?

No,  /etc/resolv.conf appears as a regular file inside the container,
even though it's a symlink outside.  The mount namespace does the
right thing and I can read the contents of it from within the
container.  No dangling symlink! :D

I tried using --expose with a symlink as an attempt to replicate the
problem with another file, but things went fine!  I'm confused.
What's the correct patch here now? :)

- Dave



Re: [PATCH 2/2] Add jq

2016-03-26 Thread Alex Griffin
Heh, I've had this packaged for ages (along with some others) and I've
put off submitting because I don't have a good workflow yet for
git+email. I should probably do something about that. Anyway, your
oniguruma package looks good to me. Here's a few notes about jq:

You listed jq's license at cc-by3.0, but that's only for the docs. Most
of the jq code is under the x11 license, except a few files which were
taken from other projects. I don't know how to specify multiple licenses
- maybe someone more experienced with Guix can chime in?

Your source URL is not stable (the hash will change at any time because
it's autogenerated by Github and not guaranteed to be identical). I
would use
https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz
instead.

You should add valgrind as a dependency so that the test suite can run.

Finally, your description is a bit sparse. Here's what I wrote:

jq is like sed for JSON data – you can use it to slice and filter
and map and transform structured data with the same ease that sed,
awk, grep and friends let you play with text.

It is written in portable C, and it has zero runtime dependencies.

jq can mangle the data format that you have into the one that you
want with very little effort, and the program to do so is often
shorter and simpler than you’d expect.

Hope that helps!
-- 
Alex Griffin


On Sat, Mar 26, 2016, at 12:41 PM, Jelle Licht wrote:
> ... and the actual package I wanted to use on guix!
> Email had 1 attachment:


>  * 0002-gnu-Add-jq.patch
>   3k (text/x-patch)



Re: [PATCH] environment: container: Do not remount network files as read-only.

2016-03-26 Thread Drew C
On Sat, Mar 26, 2016 at 11:43 AM, Ludovic Courtès  wrote:

> "Thompson, David"  skribis:
>
> > On Fri, Mar 18, 2016 at 4:51 PM, Ludovic Courtès  wrote:
> >> "Thompson, David"  skribis:
> >>
> >>> I noticed that 'guix environment --container --network' didn't work on
> >>> an Ubuntu machine I was on, and the culprit was remounting things like
> >>> /etc/resolv.conf read-only after the initial bind mount.
> >>
> >> [...]
> >>
> >>>  (file-system-mapping
> >>>   (source file)
> >>>   (target file)
> >>> - (writable? #f
> >>> + ;; An unpriviliged user
> might not
> >>> + ;; be able to remount
> >>> + ;; /etc/resolv.conf as
> read-only,
> >>> + ;; so we say that it is
> writable
> >>> + ;; here, even though in
> practice
> >>> + ;; it is not.
> >>> + (writable? #t
> >>>   %network-configuration-files)
> >>
> >> Not sure I understand: why would bind-mounting /etc/resolv.conf
> >> read-only fail?
> >
> > I haven't figured out the exact reason yet, but here's a strace
> > snippet as proof:
> >
> > [pid 11334] mount("/etc/resolv.conf",
> > "/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23da000,
> > MS_RDONLY|MS_BIND, NULL) = 0
> > [pid 11334] mount("/etc/resolv.conf",
> > "/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23e4080,
> > MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = -1 EPERM (Operation not
> > permitted)
> >
> > Another Ubuntu user was able to reproduce this as well.
>
> Looking at the resolvconf man page that Drew mentioned, it seems that
> /etc/resolv.conf is a symlink when resolvconf is in used, right?
>

Correct :

$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 29 Oct  2 08:36 /etc/resolv.conf ->
../run/resolvconf/resolv.conf



>
> If yes, does this make a difference:
>
>
>
> It may be that the result after this is that you get /etc/resolv.conf in
> the container, but it’s a dangling symlink.  But isn’t it the case
> already with the patch you propose?
>
> Thanks for finding all these curiosities.  :-)
>
> Ludo’.
>
>


Re: [PATCH] environment: container: Do not remount network files as read-only.

2016-03-26 Thread Drew C
It is Linux Mint 17.3, which is based on Ubuntu Trusty. So, yes, as far as
I know, it should be the same on a modern Ubuntu distro.

http://manpages.ubuntu.com/manpages/lucid/man8/resolvconf.8.html

-- drewc

On Sat, Mar 26, 2016 at 9:49 AM, Thompson, David 
wrote:

> On Sat, Mar 26, 2016 at 12:29 PM, Drew C  wrote:
> >
> > On Sat, Mar 26, 2016 at 7:06 AM, Thompson, David <
> dthomps...@worcester.edu>
> > wrote:
> >>
> >> On Fri, Mar 18, 2016 at 4:51 PM, Ludovic Courtès  wrote:
> >> > "Thompson, David"  skribis:
> >> >
> >> >> I noticed that 'guix environment --container --network' didn't work
> on
> >> >> an Ubuntu machine I was on, and the culprit was remounting things
> like
> >> >> /etc/resolv.conf read-only after the initial bind mount.
> >
> >
> >
> > One thing that I have run across is the following :
> >
> > $ cat /etc/resolv.conf
> > # Dynamic resolv.conf(5) file for glibc resolver(3) generated by
> > resolvconf(8)
> > # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
> > nameserver 127.0.1.1
> >
> > It re-writes that file every time a new network connection is made.
> >
> > $ man resolvconf
> > [...]
> > DESCRIPTION
> >The resolvconf package comprises a simple database for  run-time
> > name‐
> >server information and a simple framework for notifying
> applications
> > of
> >changes in that information.  Resolvconf thus sets  itself  up  as
> > the
> >intermediary  between  programs  that supply nameserver
> information
> > and
> >applications that use that information.
> > [...]
> >
> > I am not at all sure if this is the cause of the issue, but I have run
> into
> > it many times before with WiFi and me trying to edit it to 8.8.8.8, so I
> > figure this is a decent time to bring it up.
>
> Interesting!  Is this on Ubuntu as well?
>
> - Dave
>


Re: [PATCH] environment: container: Do not remount network files as read-only.

2016-03-26 Thread Drew C
On Sat, Mar 26, 2016 at 7:06 AM, Thompson, David 
wrote:

> On Fri, Mar 18, 2016 at 4:51 PM, Ludovic Courtès  wrote:
> > "Thompson, David"  skribis:
> >
> >> I noticed that 'guix environment --container --network' didn't work on
> >> an Ubuntu machine I was on, and the culprit was remounting things like
> >> /etc/resolv.conf read-only after the initial bind mount.
>


One thing that I have run across is the following :

$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by
resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1

It re-writes that file every time a new network connection is made.

$ man resolvconf
[...]
DESCRIPTION
   The resolvconf package comprises a simple database for  run-time
 name‐
   server information and a simple framework for notifying applications
of
   changes in that information.  Resolvconf thus sets  itself  up  as
 the
   intermediary  between  programs  that supply nameserver information
and
   applications that use that information.
[...]

I am not at all sure if this is the cause of the issue, but I have run into
it many times before with WiFi and me trying to edit it to 8.8.8.8, so I
figure this is a decent time to bring it up.

Cheers,

Drew Crampsie



> >
> > [...]
> >
> >>  (file-system-mapping
> >>   (source file)
> >>   (target file)
> >> - (writable? #f
> >> + ;; An unpriviliged user
> might not
> >> + ;; be able to remount
> >> + ;; /etc/resolv.conf as
> read-only,
> >> + ;; so we say that it is
> writable
> >> + ;; here, even though in
> practice
> >> + ;; it is not.
> >> + (writable? #t
> >>   %network-configuration-files)
> >
> > Not sure I understand: why would bind-mounting /etc/resolv.conf
> > read-only fail?
>
> I haven't figured out the exact reason yet, but here's a strace
> snippet as proof:
>
> [pid 11334] mount("/etc/resolv.conf",
> "/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23da000,
> MS_RDONLY|MS_BIND, NULL) = 0
> [pid 11334] mount("/etc/resolv.conf",
> "/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23e4080,
> MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = -1 EPERM (Operation not
> permitted)
>
> Another Ubuntu user was able to reproduce this as well.  I find it
> kind of silly to mount these files read-only because an unprivileged
> user couldn't write to them anyway.  WDYT?
>
> - Dave
>
>


Re: [PATCH] environment: container: Do not remount network files as read-only.

2016-03-26 Thread Ludovic Courtès
"Thompson, David"  skribis:

> On Fri, Mar 18, 2016 at 4:51 PM, Ludovic Courtès  wrote:
>> "Thompson, David"  skribis:
>>
>>> I noticed that 'guix environment --container --network' didn't work on
>>> an Ubuntu machine I was on, and the culprit was remounting things like
>>> /etc/resolv.conf read-only after the initial bind mount.
>>
>> [...]
>>
>>>  (file-system-mapping
>>>   (source file)
>>>   (target file)
>>> - (writable? #f
>>> + ;; An unpriviliged user might 
>>> not
>>> + ;; be able to remount
>>> + ;; /etc/resolv.conf as 
>>> read-only,
>>> + ;; so we say that it is 
>>> writable
>>> + ;; here, even though in 
>>> practice
>>> + ;; it is not.
>>> + (writable? #t
>>>   %network-configuration-files)
>>
>> Not sure I understand: why would bind-mounting /etc/resolv.conf
>> read-only fail?
>
> I haven't figured out the exact reason yet, but here's a strace
> snippet as proof:
>
> [pid 11334] mount("/etc/resolv.conf",
> "/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23da000,
> MS_RDONLY|MS_BIND, NULL) = 0
> [pid 11334] mount("/etc/resolv.conf",
> "/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23e4080,
> MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = -1 EPERM (Operation not
> permitted)
>
> Another Ubuntu user was able to reproduce this as well.

Looking at the resolvconf man page that Drew mentioned, it seems that
/etc/resolv.conf is a symlink when resolvconf is in used, right?

If yes, does this make a difference:

diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 58ccf59..a329eeb 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -378,7 +378,7 @@ corresponds to the symbols listed in FLAGS."
 
 (define (regular-file? file-name)
   "Return #t if FILE-NAME is a regular file."
-  (eq? (stat:type (stat file-name)) 'regular))
+  (memq (stat:type (stat file-name)) '(regular symlink)))
 
 (define* (mount-file-system spec #:key (root "/root"))
   "Mount the file system described by SPEC under ROOT.  SPEC must have the

It may be that the result after this is that you get /etc/resolv.conf in
the container, but it’s a dangling symlink.  But isn’t it the case
already with the patch you propose?

Thanks for finding all these curiosities.  :-)

Ludo’.


Re: [PATCH] scripts: environment: Properly handle SIGINT.

2016-03-26 Thread Thompson, David
On Sat, Mar 26, 2016 at 2:23 PM, Ludovic Courtès  wrote:
> David Thompson  skribis:
>
>> Has anyone ever been really annoyed that C-c doesn't work in a bash
>> shell spawned by 'guix environment'?  Me too!  And I finally got around
>> to fixing it.  I would like to get this in before 0.10.0 is released.
>
> Indeed, that’s annoyed me a few times.  :-)  (C-z does work though.)
>
>> From ec7994eec73d322386abbcd901da1b1d2f6f7733 Mon Sep 17 00:00:00 2001
>> From: David Thompson 
>> Date: Sat, 26 Mar 2016 08:45:08 -0400
>> Subject: [PATCH] scripts: environment: Properly handle SIGINT.
>>
>> Switching to execlp means that the process spawned in a container is PID
>> 1, which obsoleted one of the 'guix environment --container' tests
>> because the init process can't be killed in the usual manner.
>>
>> * guix/scripts/environment.scm (launch-environment/fork): New procedure.
>> (launch-environment): Switch from system* to execlp.  Add handler for
>> SIGINT.
>> (guix-environment): Use launch-environment/fork.
>
> Isn’t it enough to add the ‘sigaction’ call to fix the C-c issue?

No, because system(3) states that "SIGINT and SIGQUIT will be ignored."

> Now, it’s nice to be PID 1 instead of PID 2, but that seems to be a
> separate issue, no?

Ideally, it would be a separate issue, if it weren't for the
above-mentioned issue that makes 'system' not usable for our purposes.

>> * tests/guix-environment-container.sh: Remove obsolete test.
>
> [...]
>
>> -if guix environment --bootstrap --container \
>> - --ad-hoc bootstrap-binaries -- kill -SEGV 2
>> -then false;
>> -else
>> -test $? -gt 127
>> -fi
>
> This test was added in light of .  We want to
> make sure we don’t lose that property.
>
> What happens exactly when a signal is sent to PID 1?  I would expect
> that its parent process, which is outside the container in a waitpid
> call, would simply get its exit value in the normal way, and thus,
> changing “2” to “1” in this test should do the trick.  Am I naïve?  :-)

The problem is that a process within the container cannot just kill
PID 1 since its the init process and the kernel protects it, so
changing "2" to "1" doesn't work.  The exit status of the environment
command is 0 in that case because PID 1 never received the signal and
thus exits normally.

I'll try to come up with a replacement test case, thanks for giving me
the context in which it was added.  (I should've used 'git blame'
first.)

- Dave



Re: [PATCH] scripts: environment: Properly handle SIGINT.

2016-03-26 Thread Ludovic Courtès
David Thompson  skribis:

> Has anyone ever been really annoyed that C-c doesn't work in a bash
> shell spawned by 'guix environment'?  Me too!  And I finally got around
> to fixing it.  I would like to get this in before 0.10.0 is released.

Indeed, that’s annoyed me a few times.  :-)  (C-z does work though.)

> From ec7994eec73d322386abbcd901da1b1d2f6f7733 Mon Sep 17 00:00:00 2001
> From: David Thompson 
> Date: Sat, 26 Mar 2016 08:45:08 -0400
> Subject: [PATCH] scripts: environment: Properly handle SIGINT.
>
> Switching to execlp means that the process spawned in a container is PID
> 1, which obsoleted one of the 'guix environment --container' tests
> because the init process can't be killed in the usual manner.
>
> * guix/scripts/environment.scm (launch-environment/fork): New procedure.
> (launch-environment): Switch from system* to execlp.  Add handler for
> SIGINT.
> (guix-environment): Use launch-environment/fork.

Isn’t it enough to add the ‘sigaction’ call to fix the C-c issue?

Now, it’s nice to be PID 1 instead of PID 2, but that seems to be a
separate issue, no?

> * tests/guix-environment-container.sh: Remove obsolete test.

[...]

> -if guix environment --bootstrap --container \
> - --ad-hoc bootstrap-binaries -- kill -SEGV 2
> -then false;
> -else
> -test $? -gt 127
> -fi

This test was added in light of .  We want to
make sure we don’t lose that property.

What happens exactly when a signal is sent to PID 1?  I would expect
that its parent process, which is outside the container in a waitpid
call, would simply get its exit value in the normal way, and thus,
changing “2” to “1” in this test should do the trick.  Am I naïve?  :-)

Thanks for looking into it!

Ludo’.



[PATCH 2/2] Add jq

2016-03-26 Thread Jelle Licht
... and the actual package I wanted to use on guix!
From 83cfc9414fca3ab57c949e18c1ceb375a179b59c Mon Sep 17 00:00:00 2001
From: Jelle Licht 
Date: Sat, 26 Mar 2016 18:31:23 +0100
Subject: [PATCH 2/2] gnu: Add jq

* gnu/packages/web.scm (jq): New variable
---
 gnu/packages/web.scm | 21 +
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 516e623..e735410 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer 
 ;;; Copyright © 2015, 2016 Eric Bavier 
 ;;; Copyright © 2015 Eric Dvorsak 
+;;; Copyright © 2016 Jelle Licht 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -56,6 +57,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages statistics))
 
@@ -3109,3 +3111,22 @@ callback or connection interfaces.")
  "Gumbo is an implementation of the HTML5 parsing algorithm implemented as
 a pure C99 library.")
 (license l:asl2.0)))
+
+(define-public jq
+  (package
+(name "jq")
+(version "1.5")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/stedolan/";
+  "jq/archive/" name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0r9wac540z8p663xd8gnzgbzxcnqkdzkxs0dwz0x09wcs90pcrnm"
+(inputs
+ `(("oniguruma" ,oniguruma)))
+(build-system gnu-build-system)
+(home-page "http://stedolan.github.io/jq/";)
+(synopsis "Command-line JSON processor")
+(description "jq is a lightweight and flexible command-line JSON processor.")
+(license l:cc-by3.0)))
-- 
2.7.3



[PATCH 1/2] Add oniguruma

2016-03-26 Thread Jelle Licht
Hello guix!

I packaged my first set of guix packages, following the guidelines
mentioned in the online manual as closely as I could. If I still forgot or
misinterpreted one of the steps, some pointers are always welcome.

~Jelle
From 1748b97890d0fc90e81c0e0a302c7e55562873d3 Mon Sep 17 00:00:00 2001
From: Jelle Licht 
Date: Sat, 26 Mar 2016 18:28:31 +0100
Subject: [PATCH 1/2] gnu: Add oniguruma

* gnu/packages/textutils.scm (oniguruma): New variable
---
 gnu/packages/textutils.scm | 21 +
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 73a0532..71cf25b 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015, 2016 Ricardo Wurmus 
 ;;; Copyright © 2015, 2016 Ben Woodcroft 
 ;;; Copyright © 2015 Roel Janssen 
+;;; Copyright © 2016 Jelle Licht 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -271,3 +272,23 @@ Consequently, the computation has a flat performance characteristic,
 correlated with data variation rather than file size.  pfff can be as reliable
 as existing hashing techniques, with provably negligible risk of collisions.")
 (license license:bsd-3)))
+
+(define-public oniguruma
+  (package
+(name "oniguruma")
+(version "5.9.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/kkos/";
+  "oniguruma/releases/download/v" version
+  "/onig-" version ".tar.gz"))
+  (sha256
+   (base32
+"19s79vsclqn170mw0ajwv7j37qsbn4f1yjz3yavnhvva6c820r6m"
+(build-system gnu-build-system)
+(home-page "https://github.com/kkos/oniguruma";)
+(synopsis "Regular expression library")
+(description "Oniguruma is a regular expressions library.  The special
+characteristic of this library is that different character encoding for every
+regular expression object can be specified.")
+(license license:bsd-2)))
-- 
2.7.3



rfc/rfh: i686-w64-mingw32 cross target

2016-03-26 Thread Jan Nieuwenhuizen
Hi,

I'm working on a cross target in an effort to get rid of GUB 1) in
favour of Guix and could do with some help.

I have just succeeded in cross-building hello and running it,
doing

   18:18:36 janneke@drakenvlieg:~/src/mingw-guix
   $ ./pre-inst-env guix build --keep-failed --target=i686-w64-mingw32 hello
   /gnu/store/6556syz1732jnffnp0njikr5g6diqvch-hello-2.10
   18:18:36 janneke@drakenvlieg:~/src/mingw-guix
   $ /gnu/store/5y252qkblhpj639g3bnrc671mz8x920w-profile/bin/wine 
/gnu/store/6556syz1732jnffnp0njikr5g6diqvch-hello-2.10/bin/hello.exe 
   Hello, world!
   18:18:39 janneke@drakenvlieg:~/src/mingw-guix

See https://github.com/janneke/guix/tree/wip-mingw32 or attached patch.
This platform does not have glibc, it uses --with-newlib and I'm not
sure how to fit that in.

In a couple of places I have changed

   (if libc A B)

into

  (cond
   ((equal? target "i686-w64-mingw32") .. specific code)
   (libc A)
   (else B))

and I'm wondering whether to create a `newlib' category, or try
to fit newlib into libc somehow, or...any ideas welcome.

I was hoping to have (cross-libc ) evaluate to
i686-w64-mingw32-runtime, but am puzzled by the effect of this
code in

   gnu.scm (standard-cross-packages):

   `(("cross-gcc" ,(gcc target
(binutils target)
 (if (equal? target "i686-w64-mingw32")
 #f ;;(module-ref cross 'i686-w64-mingw32-runtime)
  (libc target

unless I use #f here, guix wants to build a cross gcc WITH glibc,
instead of using the sans-libc variant.

Anaway, I am using a precompiled binary mingw runtime, as a next step
I'll be looking into building that from source.

Greetings,
Jan

1) GUB -- http://lilypond.org/gub/

>From 65917cb25c496219af0c118a6cd6664646839db4 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen 
Date: Fri, 25 Mar 2016 08:03:54 +0100
Subject: [PATCH] i686-w64-mingw32: new cross target.  WIP

---
 gnu/packages/bootstrap.scm  |   1 +
 gnu/packages/cross-base.scm | 594 ++--
 guix/build-system/gnu.scm   |   4 +-
 3 files changed, 352 insertions(+), 247 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index f5bf069..979ab1d 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -171,6 +171,7 @@ successful, or false to signal an error."
 ;; here just so we can keep going.
 ((string=? system "xtensa-elf") "no-ld.so")
 ((string=? system "avr") "no-ld.so")
+((string=? system "i686-mingw") "no-ld.so")
 
 (else (error "dynamic linker name not known for this system"
  system
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 8bd599c..e2b1dd1 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -23,6 +23,7 @@
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages base)
   #:use-module (gnu packages commencement)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages linux)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -43,38 +44,38 @@
 
 (define (cross p target)
   (package (inherit p)
-(name (string-append (package-name p) "-cross-" target))
-(arguments
- (substitute-keyword-arguments (package-arguments p)
-   ((#:configure-flags flags)
-`(cons ,(string-append "--target=" target)
-   ,flags))
+   (name (string-append (package-name p) "-cross-" target))
+   (arguments
+(substitute-keyword-arguments (package-arguments p)
+  ((#:configure-flags flags)
+   `(cons ,(string-append "--target=" target)
+  ,flags))
 
 (define (package-with-patch original patch)
   "Return package ORIGINAL with PATCH applied."
   (package (inherit original)
-(source (origin (inherit (package-source original))
-  (patches (list patch))
+   (source (origin (inherit (package-source original))
+   (patches (list patch))
 
 (define (cross-binutils target)
   "Return a cross-Binutils for TARGET."
   (let ((binutils (package (inherit binutils)
-(arguments
- (substitute-keyword-arguments (package-arguments
-binutils)
-   ((#:configure-flags flags)
-;; Build with `--with-sysroot' so that ld honors
-;; DT_RUNPATH entries when searching for a needed
-;; library.  This works because as a side effect
-;; `genscripts.sh' sets `USE_LIBPATH=yes', which tells
-;; elf32.em to use DT_RUNPATH in its search list.
-;; See .
-;;
-;; In theory choosing / as the sysroot could le

Re: security-updates merged

2016-03-26 Thread Mark H Weaver
Danny Milosavljevic  writes:
> guix$ git pull # master branch
> guix$ guix environment guix
> guix$ make
> ...
> configure: error: Package requirements (sqlite3 >= 3.6.19) were not met:

l...@gnu.org (Ludovic Courtès) writes:
> Please see:
>
>   https://www.gnu.org/software/guix/manual/html_node/Requirements.html

Did you notice that according to Danny's transcript above, this error
occurred within a shell spawned by "guix environment guix"?

 Mark



Re: Removing compilers that cannot be bootstrapped

2016-03-26 Thread Christopher Allan Webber
Ludovic Courtès writes:

> Ricardo Wurmus  skribis:
>
>> It is probably easier for us to try to write primitive compilers in
>> Guile than to start from scratch each time.  Then the only blob we need
>> to figure out how to bootstrap would be Guile itself.
>
> +1
>
> Though of course, writing a faithful C or Haskell or OCaml compiler is
> huge task, and chances are we’ll always miss compilers for some
> languages.
>
> So I think we should take both routes: on one hand try to come up with
> minimalist Guile implementations of languages (your work with Yale
> Haskell, or the project on Bournish), and on the other, with help from
> the reproducible-builds.org group, raise awareness about the issue among
> compiler writers and users so that the ability to bootstrap from
> another, common programming language becomes a requirement.
>
> Of course Guile itself is pretty big, so we may eventually have to think
> about a “PreScheme” language, as is used to bootstrap Scheme48¹.
> Epsilon²³ contains interesting ideas as well.
>
>
> Ludo’.
>
> ¹ https://en.wikipedia.org/wiki/PreScheme
> ² https://www.gnu.org/software/epsilon/
> ³ http://ageinghacker.net/publications/#phd-thesis

It's a pretty thrilling and enticing idea.  It would be a ton of work.
I think we'd need to get more people excited about and successfully
contributing to Guile for it to happen.  Thus I think we'd really need
to advertise more just how cool Guile's compiler tower is and get people
jazzed up about it.  But bumping into Guile's compiler tower
documentation is one of the reasons I started paying attention to Guile
about a year and a half ago:

  http://dustycloud.org/blog/javascript-beyond-javascript/

I'm sure others would find that narrative compelling.

It would be interesting to see the motivations of multi-language-Guile
from its earliest days come back to the forefront with style and
compelling motivation.

 - Chris



Re: [PATCH] environment: container: Do not remount network files as read-only.

2016-03-26 Thread Thompson, David
On Sat, Mar 26, 2016 at 12:29 PM, Drew C  wrote:
>
> On Sat, Mar 26, 2016 at 7:06 AM, Thompson, David 
> wrote:
>>
>> On Fri, Mar 18, 2016 at 4:51 PM, Ludovic Courtès  wrote:
>> > "Thompson, David"  skribis:
>> >
>> >> I noticed that 'guix environment --container --network' didn't work on
>> >> an Ubuntu machine I was on, and the culprit was remounting things like
>> >> /etc/resolv.conf read-only after the initial bind mount.
>
>
>
> One thing that I have run across is the following :
>
> $ cat /etc/resolv.conf
> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by
> resolvconf(8)
> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
> nameserver 127.0.1.1
>
> It re-writes that file every time a new network connection is made.
>
> $ man resolvconf
> [...]
> DESCRIPTION
>The resolvconf package comprises a simple database for  run-time
> name‐
>server information and a simple framework for notifying applications
> of
>changes in that information.  Resolvconf thus sets  itself  up  as
> the
>intermediary  between  programs  that supply nameserver information
> and
>applications that use that information.
> [...]
>
> I am not at all sure if this is the cause of the issue, but I have run into
> it many times before with WiFi and me trying to edit it to 8.8.8.8, so I
> figure this is a decent time to bring it up.

Interesting!  Is this on Ubuntu as well?

- Dave



Re: [PATCH 13/13] gnu: Add beets.

2016-03-26 Thread Alex Griffin
I tried building with --rounds=4 on my GuixSD machine, but it errored
out after the first build with the same error. Then I tried building
with --check on my Debian machine and it succeeded.

Last night on IRC we were discussing this more and I think Leo was going
to try incorporating something from the nixos beets package, or else
wait until the beets developers could help him.
-- 
Alex Griffin


On Sat, Mar 26, 2016, at 06:41 AM, Ludovic Courtès wrote:
> Leo Famulari  skribis:
> 
> > Can you try building with '#:parallel-tests? #f', as shown in this link?
> 
> I was also going to suggest something along these lines.
> 
> Could you try building with with --rounds=4, say, on your machine?  (Or
> --check if it’s already there.)
> 
> Thanks,
> Ludo’.



[PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.

2016-03-26 Thread alírio eyng

From dac1dfe1d9b6716d1aefa339e5145c26dd798565 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?al=C3=ADrio=20eyng?= 
Date: Sat, 26 Mar 2016 14:39:27 +
Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from
 source.

* gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
[arguments]: Build from source.
* guix/gnu-maintenance.scm (%tarball-rx): Remove comment.
---
 gnu/packages/fonts.scm   | 68 +++-
 guix/gnu-maintenance.scm |  1 -
 2 files changed, 32 insertions(+), 37 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index f07e052..793a30c 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -33,10 +33,12 @@
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages zip)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages zip))
 
 (define-public font-inconsolata
   (package
@@ -260,47 +262,41 @@ sans-serif designed for on-screen reading.  It is used by GNOME@tie{}3.")
 (define-public font-gnu-freefont-ttf
   (package
 (name "font-gnu-freefont-ttf")
-(version "20100919")
+(version "20120503")
 (source (origin
  (method url-fetch)
- (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
+ (uri (string-append "mirror://gnu/freefont/freefont-src-"
  version ".tar.gz"))
  (sha256
   (base32
-   "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"
-(build-system trivial-build-system)
+   "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"
+(build-system gnu-build-system)
 (arguments
- `(#:modules ((guix build utils))
-   #:builder (begin
-   (use-modules (guix build utils)
-(srfi srfi-26))
-
-   (let ((tar  (string-append (assoc-ref %build-inputs
- "tar")
-  "/bin/tar"))
- (PATH (string-append (assoc-ref %build-inputs
- "gzip")
-  "/bin"))
- (font-dir (string-append %output
-  "/share/fonts/truetype"))
- (doc-dir  (string-append %output "/share/doc/"
-  ,name "-" ,version)))
- (setenv "PATH" PATH)
- (system* tar "xvf" (assoc-ref %build-inputs "source"))
-
- (mkdir-p font-dir)
- (mkdir-p doc-dir)
- (chdir (string-append "freefont-" ,version))
- (for-each (lambda (file)
- (let ((dir (if (string-suffix? "ttf" file)
-font-dir
-doc-dir)))
+ `(#:phases (modify-phases %standard-phases
+  (delete 'configure)
+  (replace 'install
+   (lambda _
+ (let ((doc-dir  (string-append %output "/share/doc/"
+,name "-" ,version))
+   (font-dir (string-append %output
+"/share/fonts/truetype")))
+   (mkdir-p doc-dir)
+   (substitute* "Makefile"
+ (("\\$\\(TMPDIR\\)") doc-dir)
+ (("sfd/\\*.ttf") ""))
+   (system* "make" "ttftar")
+   (mkdir-p font-dir)
+   (for-each (lambda (file)
(copy-file file
-  (string-append dir "/" file
-   (find-files "." ""))
-(native-inputs `(("source" ,source)
- ("tar" ,tar)
- ("gzip" ,gzip)))
+  (string-append font-dir "/"
+ (basename file
+ (filter
+   (lambda (file) (string-suffix? "ttf" file))
+   (find-files "." "")))
+   #:test-target "tests"))
+(native-inputs `(("fontforge" ,(package (inherit fontforge)
+ (inputs `(("python-2" ,python-2)
+ ,@(pa

Re: [PATCH] gnu: Add Icedtea 3.0.0pre09

2016-03-26 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> Actually, in this case it’s (again) the ETag header.
>
> ~~~
> rekado in guix: wget -S --spider 
> http://icedtea.classpath.org/hg/icedtea/archive/icedtea-3.0.0pre09.tar.gz
>
> [...]
>
> --2016-03-26 10:02:08--  
> http://icedtea.wildebeest.org/hg/icedtea/archive/icedtea-3.0.0pre09.tar.gz
> Resolving icedtea.wildebeest.org (icedtea.wildebeest.org)... 80.127.118.211
> Connecting to icedtea.wildebeest.org 
> (icedtea.wildebeest.org)|80.127.118.211|:80... connected.
> HTTP request sent, awaiting response... 
>   HTTP/1.1 200 Script output follows
>   Date: Sat, 26 Mar 2016 09:02:18 GMT
>   Server: Apache/2.4.10 (Debian)
>   Content-Disposition: attachment; filename=icedtea-icedtea-3.0.0pre09.tar.gz
>   ETag: 1458585778.0
>   Keep-Alive: timeout=5, max=100
>   Connection: Keep-Alive
>   Content-Type: application/x-gzip
> Length: unspecified [application/x-gzip]
> Remote file exists.
> ~~~
>
> Is this something we want the Guile HTTP client to be more tolerant
> about?

Yes.  This is fixed in Guile 2.0, commit
c5dac3595f42afbd76ab9110d7473bf4d16b0520.

I think we should backport this hack to (guix build download),
essentially through:

  (modules-set! (resolve-module '(web http)) 'parse-entity-tag …)

Thoughts?

Ludo’.



Re: security-updates merged

2016-03-26 Thread Ludovic Courtès
Danny Milosavljevic  skribis:

> configure: error: Package requirements (sqlite3 >= 3.6.19) were not met:

Please see:

  https://www.gnu.org/software/guix/manual/html_node/Requirements.html

Ludo’.



Re: Removing compilers that cannot be bootstrapped

2016-03-26 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> It is probably easier for us to try to write primitive compilers in
> Guile than to start from scratch each time.  Then the only blob we need
> to figure out how to bootstrap would be Guile itself.

+1

Though of course, writing a faithful C or Haskell or OCaml compiler is
huge task, and chances are we’ll always miss compilers for some
languages.

So I think we should take both routes: on one hand try to come up with
minimalist Guile implementations of languages (your work with Yale
Haskell, or the project on Bournish), and on the other, with help from
the reproducible-builds.org group, raise awareness about the issue among
compiler writers and users so that the ability to bootstrap from
another, common programming language becomes a requirement.

Of course Guile itself is pretty big, so we may eventually have to think
about a “PreScheme” language, as is used to bootstrap Scheme48¹.
Epsilon²³ contains interesting ideas as well.


Ludo’.

¹ https://en.wikipedia.org/wiki/PreScheme
² https://www.gnu.org/software/epsilon/
³ http://ageinghacker.net/publications/#phd-thesis



Re: GSOC draft

2016-03-26 Thread Ludovic Courtès
Alex Vong  skribis:

> First, I have withdrawn my proposal since I think it is not good enough.
> Of course I will be exploring guix during summer, since it is a fun
> thing to do. My original thought is to first port a working make-like
> tool and then change it to output g-exps instead of actually performing
> the build.

OK.

>> I would suggest looking at the prototype Make replacement that Eelco
>> Dolstra wrote as part of his PhD thesis on Nix:
>>
>>   http://nixos.org/~eelco/pubs/phd-thesis.pdf (Chapter 10)
>>
> Thanks for the link to the paper. The paper mentioned nix expression. Is
> that what g-exp based on?

G-exps borrow from s-exps (obviously), client-side expression quoting in
HOP¹ (~ and $ come right from there; HOP implements things using
built-in compiler tricks whereas g-exps simply rely on macros, and of
course HOP and g-exps both implement staging but with different
constraints/goals), and string interpolation in Nix.

> What are their name in the case of store-monad?

(guix monads) provides ‘>>=’ and ‘return’.  There’s additional syntactic
sugar such as ‘mlet’, and helpers such as ‘lift’, ‘foldm’, ‘mapm’, etc.
This is partly covered in:

  https://www.gnu.org/software/guix/manual/html_node/The-Store-Monad.html

(Most of the section is not specific to ‘%store-monad’.)

>> There’s also this defunct project about a Make replacement in Guile (not
>> connected to Guix and Nix):
>>
>>   http://home.gna.org/conjure/
>>
> The homepage does not mention guile, is conjure written in guile?

It’s written in Guile I think.  Just mentioned it as a possible source
of inspiration for the EDSLs or APIs it provides.

> Finally, I suggest talking about the monad in the next Guix talks,
> I "assert" people will love it!

Heh, noted.  :-)

Thanks,
Ludo’.

¹ http://hop.inria.fr



Re: [PATCH] environment: container: Do not remount network files as read-only.

2016-03-26 Thread Thompson, David
On Fri, Mar 18, 2016 at 4:51 PM, Ludovic Courtès  wrote:
> "Thompson, David"  skribis:
>
>> I noticed that 'guix environment --container --network' didn't work on
>> an Ubuntu machine I was on, and the culprit was remounting things like
>> /etc/resolv.conf read-only after the initial bind mount.
>
> [...]
>
>>  (file-system-mapping
>>   (source file)
>>   (target file)
>> - (writable? #f
>> + ;; An unpriviliged user might 
>> not
>> + ;; be able to remount
>> + ;; /etc/resolv.conf as 
>> read-only,
>> + ;; so we say that it is 
>> writable
>> + ;; here, even though in 
>> practice
>> + ;; it is not.
>> + (writable? #t
>>   %network-configuration-files)
>
> Not sure I understand: why would bind-mounting /etc/resolv.conf
> read-only fail?

I haven't figured out the exact reason yet, but here's a strace
snippet as proof:

[pid 11334] mount("/etc/resolv.conf",
"/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23da000,
MS_RDONLY|MS_BIND, NULL) = 0
[pid 11334] mount("/etc/resolv.conf",
"/tmp/guix-directory.Rc4nc6//etc/resolv.conf", 0x23e4080,
MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = -1 EPERM (Operation not
permitted)

Another Ubuntu user was able to reproduce this as well.  I find it
kind of silly to mount these files read-only because an unprivileged
user couldn't write to them anyway.  WDYT?

- Dave



Re: Removing compilers that cannot be bootstrapped

2016-03-26 Thread Alex Vong
Chris Marusich  writes:

> Chris Marusich  writes:
>
>
> Sorry for replying to my own post, but I couldn't help myself.  If
> anyone thinks the above sounds too paranoid, remember the Ken Thompson
> hack:
>
> http://www.c2.com/cgi/wiki?TheKenThompsonHack
>
There is a way to defeat this kind of attack. It is called Diverse
Double-Compiling.

Graphical explaination: 
David A. Wheeler’s Page: 

> Chilling!



Re: [PATCH] environment: container: Create dummy home directory and /etc/passwd.

2016-03-26 Thread Thompson, David
On Fri, Mar 18, 2016 at 5:16 PM, Ludovic Courtès  wrote:
> David Thompson  skribis:
>
>> In my recent adventures using 'guix environment --container --network',
>> I noticed that certain tools *really* want to read user information out
>> of /etc/passwd, such as 'git clone' over SSH.  I initially hacked around
>> this by adding code to create a dummy home directory and /etc/passwd in
>> the Bash script I was running inside the container.  After a little
>> thought, I came to the conclusion that 'guix environment --container'
>> should just do this automatically so that the container more closely
>> resembles a real GNU/Linux system.
>
> Yeah, I grumble when I pass --expose=$HOME/.gdbinit and then notice that
> I also have to “export HOME=/home/foo” inside the subshell, for
> instance.
>
>> From 5985be7a5b3b6a5d5a5d3eb3e95983ad96909f2e Mon Sep 17 00:00:00 2001
>> From: David Thompson 
>> Date: Thu, 17 Mar 2016 23:19:25 -0400
>> Subject: [PATCH] environment: container: Create dummy home directory and
>>  /etc/passwd.
>>
>> * guix/scripts/environment.scm (launch-environment/container): Change
>> $HOME to the current user's home directory instead of
>> /homeless-shelter.  Create a dummy /etc/passwd with a single entry for
>> the current user.
>
> [...]
>
>> +;; Create a dummy home directory with the same path as on the
>> +;; host.
>
> s/with the same path/under the same name/  :-)
>
> Perhaps we should add a sentence in the manual about this dummy $HOME?

Done and pushed.  Thanks!

- Dave



[PATCH] scripts: environment: Properly handle SIGINT.

2016-03-26 Thread David Thompson
Has anyone ever been really annoyed that C-c doesn't work in a bash
shell spawned by 'guix environment'?  Me too!  And I finally got around
to fixing it.  I would like to get this in before 0.10.0 is released.

Ludo, I removed one of the tests in guix-environment-container.sh
because it seems obsolete to me now.  Let me know if you think of
another test to replace it.

Thanks!

>From ec7994eec73d322386abbcd901da1b1d2f6f7733 Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Sat, 26 Mar 2016 08:45:08 -0400
Subject: [PATCH] scripts: environment: Properly handle SIGINT.

Switching to execlp means that the process spawned in a container is PID
1, which obsoleted one of the 'guix environment --container' tests
because the init process can't be killed in the usual manner.

* guix/scripts/environment.scm (launch-environment/fork): New procedure.
(launch-environment): Switch from system* to execlp.  Add handler for
SIGINT.
(guix-environment): Use launch-environment/fork.
* tests/guix-environment-container.sh: Remove obsolete test.
---
 guix/scripts/environment.scm| 19 +--
 tests/guix-environment-container.sh |  7 ---
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index ee8f6b1..d554ca2 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -358,8 +358,22 @@ and suitable for 'exit'."
   "Run COMMAND in a new environment containing INPUTS, using the native search
 paths defined by the list PATHS.  When PURE?, pre-existing environment
 variables are cleared before setting the new ones."
+  ;; Properly handle SIGINT, so pressing C-c in an interactive terminal
+  ;; application works.
+  (sigaction SIGINT SIG_DFL)
   (create-environment inputs paths pure?)
-  (apply system* command))
+  (match command
+((program . args)
+ (apply execlp program program args
+
+(define (launch-environment/fork command inputs paths pure?)
+  "Run COMMAND in a new process with an environment containing INPUTS, using
+the native search paths defined by the list PATHS.  When PURE?, pre-existing
+environment variables are cleared before setting the new ones."
+  (match (primitive-fork)
+(0 (launch-environment command inputs paths pure?))
+(pid (match (waitpid pid)
+   ((_ . status) status)
 
 (define* (launch-environment/container #:key command bash user-mappings
profile paths network?)
@@ -582,4 +596,5 @@ message if any test fails."
  (else
   (return
(exit/status
-(launch-environment command profile paths pure?)
+(launch-environment/fork command profile
+ paths pure?)
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh
index aba34a3..da4c6fc 100644
--- a/tests/guix-environment-container.sh
+++ b/tests/guix-environment-container.sh
@@ -81,10 +81,3 @@ grep $(guix build guile-bootstrap) $tmpdir/mounts
 grep -e "$NIX_STORE_DIR/.*-bash" $tmpdir/mounts # bootstrap bash
 
 rm $tmpdir/mounts
-
-if guix environment --bootstrap --container \
-	--ad-hoc bootstrap-binaries -- kill -SEGV 2
-then false;
-else
-test $? -gt 127
-fi
-- 
2.7.3


-- 
David Thompson


Re: [PATCH] gnu: Add gnu-maintain and gnu-standards.

2016-03-26 Thread Jan Nieuwenhuizen
Ludovic Courtès writes:

Hi,

> Please add it to gnu-system.am as well.

Ah yes.

> The ‘miscfiles’ package should probably go to the same module (in a
> separate commit.)

Ok.  Separate patch attached.

> This is an unversioned URL where the file occasionally gets updated in
> place, so it’s unsuitable.
>
> I think this one should instead be taken from
> :pserver:anonym...@cvs.savannah.gnu.org:/sources/gnustandards using
> (guix cvs-download).

It turns out that this url also include maintain.texi, so I combined
that into gnu-standards.

> Could you send an updated patch?

Thanks for your comments, new patch attached.

To be able to build this, I had to patch cvs.scm.  Not sure if
(something like) that should go in too.

Greetings, Jan

>From 87eac0f669515e139f7518cd52480e3346069ba5 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen 
Date: Wed, 23 Mar 2016 22:18:46 +0100
Subject: [PATCH 1/3] gnu: Add gnu-standards.

* gnu/packages/gnu-doc.scm: New file.
* gnu-system.am: Add it.
---
 gnu-system.am|  1 +
 gnu/packages/gnu-doc.scm | 74 
 2 files changed, 75 insertions(+)
 create mode 100644 gnu/packages/gnu-doc.scm

diff --git a/gnu-system.am b/gnu-system.am
index 6cdc1e3..8161632 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -134,6 +134,7 @@ GNU_SYSTEM_MODULES =\
   gnu/packages/gl.scm\
   gnu/packages/glib.scm\
   gnu/packages/gnome.scm			\
+  gnu/packages/gnu-doc.scm			\
   gnu/packages/gnucash.scm			\
   gnu/packages/gnunet.scm			\
   gnu/packages/gnupg.scm			\
diff --git a/gnu/packages/gnu-doc.scm b/gnu/packages/gnu-doc.scm
new file mode 100644
index 000..572647d
--- /dev/null
+++ b/gnu/packages/gnu-doc.scm
@@ -0,0 +1,74 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Jan Nieuwenhuizen 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu packages gnu-doc)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages texinfo)
+
+  #:use-module (guix build-system trivial)
+  #:use-module (guix cvs-download)
+  #:use-module (guix licenses)
+  #:use-module (guix packages))
+
+(define-public gnu-standards
+  (package
+(name "gnu-standards")
+(version "2016-03-25")
+(source
+ (origin
+   (method cvs-fetch)
+   (uri (cvs-reference
+ (root-directory
+  ":pserver:anonym...@cvs.savannah.gnu.org:/sources/gnustandards")
+ (module "gnustandards")
+ (revision "2016-03-25")))
+   (sha256
+(base32
+ "0qn7mzdjqwc6h9prin22x6kj9iqipxpbzldzhmis7q4x4hpi61vj"
+(build-system trivial-build-system)
+(native-inputs `(("gzip" ,gzip)
+ ("source" ,source)
+ ("texinfo" ,texinfo)))
+(arguments
+ `(#:modules ((guix build utils))
+   #:builder
+(begin
+  (use-modules (guix build utils))
+  (let ((gzip (assoc-ref %build-inputs "gzip"))
+(source (assoc-ref %build-inputs "source"))
+(texinfo (assoc-ref %build-inputs "texinfo"))
+(info-dir (string-append %output "/share/info")))
+(setenv "PATH" (string-append gzip "/bin"
+  ":" texinfo "/bin"))
+(mkdir-p info-dir)
+(system* "makeinfo" "--output" info-dir
+ (string-append source "/maintain.texi"))
+(system* "makeinfo" "--output" info-dir
+ (string-append source "/standards.texi"))
+(system* "gzip" (string-append info-dir "/maintain.info"))
+(system* "gzip" (string-append info-dir "/standards.info"))
+(home-page "http://www.gnu.org/prep/standards/";)
+(synopsis "GNU coding standards and maintainer information")
+(description "The GNU Coding Standards were written by Richard Stallman
+and other GNU Project volunteers.  Their purpose is to make the GNU system
+clean, consistent, and easy to install.
+
+The information for maintainers of GNU software has guidelines and advice for
+someone who is the maintainer of a GNU program on behalf of the GNU Project.")
+(license fdl1.3+)))
-- 
2.6.3

>From d115d439a8bb98e1a5fa072ad6c1ea47361e9dc0 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen 

Re: IMPORTANT: expat security update

2016-03-26 Thread Ludovic Courtès
Mark H Weaver  skribis:

> Mark H Weaver  writes:
>> I just pushed a security update for expat.  See:
>>
>>https://lwn.net/Articles/681356/
>
> Bah, nevermind.  I already fixed this bug last July, in commit
> 99e29da15690a696690b28b065e0d1b19c9610db.  That's embarrassing.

No, it means you’re trying to keep us safe, that’s fine.  :-)

Ludo’.



Re: [PATCH 13/13] gnu: Add beets.

2016-03-26 Thread Ludovic Courtès
Leo Famulari  skribis:

> Can you try building with '#:parallel-tests? #f', as shown in this link?

I was also going to suggest something along these lines.

Could you try building with with --rounds=4, say, on your machine?  (Or
--check if it’s already there.)

Thanks,
Ludo’.



Re: [GSoC] Draft proposal for an Install Wizard for Guix

2016-03-26 Thread Ludovic Courtès
Thomas Ingram  skribis:

> On 03/25/2016 09:09 AM, Ludovic Courtès wrote:
>> I like the goals you’re proposing for this installer. How would you
>> go implementing it? The proposal does not explicitly mention a UI
>> library that would be used, and how the UI code would interact with
>> Guix and GuixSD code. 
> I think most of the installer can be done by generating a config.scm
> with the  operating-system declaration that includes the users input
> settings, and I was planning on writing the installer's UI with the
> guile-ncurses library. How does that sound?

Sounds good!

Personally, I would like to view the “wizard” as a helper, and not as
something that hides everything and turns people into “end users.”

I don’t know how this could translate in the design of the tool.
Perhaps showing the ‘operating-system’ declaration as you suggest is one
thing, and making it easy to view the section of the manual that
corresponds to a particular item, or to jump to the code that defines a
specific service (say), would be helpful too.

Thanks,
Ludo’.



Re: GSOC 2016 Application

2016-03-26 Thread Ludovic Courtès
sapient...@openmailbox.org skribis:

> On 2016-03-25 09:03, Chris Marusich wrote:

[...]

>> While it's good to plan for both text and graphical UI, maybe it
>> will be
>> more efficient to pick one to focus on, and treat the other as a
>> stretch
>> goal?
>
> I agree and should turn the GUI interface into a stretch goal.

I agree, let’s focus on guile-ncurses (or maybe libRUIN).

>>> - Design for portability for use in other software distributions that
>>> lack a proper installer wizard
>>
>> Again, this is a nice idea, but it might be more efficient to focus on
>> getting it to work with Guix first.
>>
>>> - An emphasis on rigorous test suites, with stability prioritized>>> over 
>>> features
>>
>> GuixSD is still beta software.  Is it a good idea to make one of your
>> goals be "the installer is stable" when the system it's installing is
>> not stable?
>
> I also agree with your sentiments here that I should prioritize Guix
> before considering other operating systems.

Yes it’s really a GuixSD thing first and foremost.  :-)

Thanks,
Ludo’.



Re: [PATCH] Add MilkyTracker to Guix

2016-03-26 Thread Nils Gillmann
k...@openmailbox.org writes:

> The attached is a patch to gnu/packages/music.scm that allows a
> minimal and functional build of MilkyTracker. I'm unsure if this is
> formatted correctly, but I'm willing to learn. :-)

Thanks!

For Guix we follow the GNU coding standard for patches, which
also include formated commit messages.
https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html

This also requires adding a name + email to the header, a legal
name is not necessarily required, it can also be a pseudonym or a
known name you have.

> --- music.scm.bak 2016-03-25 17:39:35.959715114 -0400
> +++ music.scm 2016-03-25 19:39:44.754396091 -0400
> @@ -78,6 +78,7 @@
>#:use-module (gnu packages rdf)
>#:use-module (gnu packages readline)
>#:use-module (gnu packages rsync)
> +  #:use-module (gnu packages sdl)
>#:use-module (gnu packages tcl)
>#:use-module (gnu packages texinfo)
>#:use-module (gnu packages texlive)
> @@ -1305,3 +1306,26 @@
>  of tools for manipulating and accessing your music.")
>  (license license:expat)))
>  
> +(define-public milkytracker
> +  (package
> +(name "milkytracker")
> +(version "0.90.86")
> +(source (origin
> +   (method url-fetch)
> +   (uri
> +(string-append "http://milkytracker.org/files/milkytracker-";
> +   version
> +   ".tar.gz"))

not necessarily wrong, but as you defined a name:
(string-append "http://milkytracker.org/files/";
   name "-" version ".tar.gz")

> +  (sha256
> +   (base32
> +"0mqjkhvjyp5hnzm1ln3b2qjclviayxylcyml96pjdxgbaqcqa2zz"
> +(build-system gnu-build-system)
> +(arguments
> + '(#:configure-flags `("--without-alsa" "--without-jack")))
> +(inputs
> + `(("sdl" ,sdl)
> +   ("zlib" ,zlib)))
> +(synopsis "MilkyTracker is a free software multi-platform  music tracker 
> for composing music in the MOD and XM module file formats.")

I guess you don't use emacs? We have rules defined for line
length etc, I don't know the exact length at the moment,
something around 68 or 70 if I am right.

> +(description "MilkyTracker is a free software, multi-platform music 
> application for creating .MOD and .XM module files. It attempts to recreate 
> the module replay and user experience of the popular DOS program Fasttracker 
> II, with special playback modes available for improved Amiga ProTracker 2/3 
> compatibility.")

same.

> +(home-page "http://milkytracker.org/";)
> +(license license:gpl3)))

I did not testrun it, but that's the stylistic part I can comment
on right now.

-- 
ng
personal contact: http://krosos.sdf.org
EDN: https://wiki.c3d2.de/EDN




Re: Removing compilers that cannot be bootstrapped

2016-03-26 Thread Jookia
On Sat, Mar 26, 2016 at 09:12:52AM +0100, Ricardo Wurmus wrote:
> GCC itself is not sufficient to build many compilers.  For GHC, for
> example, you need a Haskell compiler such as GHC.  I looked at nhc98 and
> other defunct Haskell compilers, but they all have a bootstrapping step
> that either requires a Haskell compiler or building from generated C
> sources.
> 
> In the case of Haskell I think it would make sense to try to figure out
> how to bootstrap with Hugs, a Haskell interpreter, or with Yale Haskell,
> which I’m trying to port to Guile.
> 
> It is probably easier for us to try to write primitive compilers in
> Guile than to start from scratch each time.  Then the only blob we need
> to figure out how to bootstrap would be Guile itself.

I think this is one of those things that need help from upstream to create a
simpler compiler that we can write a interpreter for.

> ~~ Ricardo

Jookia.



Re: [PATCH] gnu: Add Icedtea 3.0.0pre09

2016-03-26 Thread Ricardo Wurmus

Ludovic Courtès  writes:

>> On IRC there was the idea to provide “url-fetch/wget” which would be
>> less strict compared to the default Guile HTTP client.
>
> We could do that, but I would prefer fixing and/or monkey-patching the
> date header check in Guile.
>
> In this case, if the problem is date header validation, it seems that we
> could monkey-patch the ‘parse-rfc-822-date’ procedure of (web http) to
> do the right thing.

Actually, in this case it’s (again) the ETag header.

~~~
rekado in guix: wget -S --spider 
http://icedtea.classpath.org/hg/icedtea/archive/icedtea-3.0.0pre09.tar.gz

[...]

--2016-03-26 10:02:08--  
http://icedtea.wildebeest.org/hg/icedtea/archive/icedtea-3.0.0pre09.tar.gz
Resolving icedtea.wildebeest.org (icedtea.wildebeest.org)... 80.127.118.211
Connecting to icedtea.wildebeest.org 
(icedtea.wildebeest.org)|80.127.118.211|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 Script output follows
  Date: Sat, 26 Mar 2016 09:02:18 GMT
  Server: Apache/2.4.10 (Debian)
  Content-Disposition: attachment; filename=icedtea-icedtea-3.0.0pre09.tar.gz
  ETag: 1458585778.0
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: application/x-gzip
Length: unspecified [application/x-gzip]
Remote file exists.
~~~

Is this something we want the Guile HTTP client to be more tolerant
about?

~~ Ricardo




Re: Removing compilers that cannot be bootstrapped

2016-03-26 Thread Jookia
Hey,

I have a few quick notes that aren't that relevant.

On Fri, Mar 25, 2016 at 11:55:44PM -0700, Chris Marusich wrote:
> > 1) Write the simplest possible program (or collection of programs) in
> > the simplest possible machine code.  This program serves only one
> > purpose: to enable you to write more code at a higher level of
> > abstraction.  It is effectively a compiler for a very primitive
> > language, but the language it compiles will be one layer of abstraction
> > above machine code, which is a step in the right direction.  This first
> > program must be a "binary blob", since we cannot rely on any existing
> > tools to build it.  It must be simple enough that someone can read and
> > understand it using e.g. a hex editor, provided that they have access to
> > the right reference materials.  Since this program exists only as
> > machine code, it must be documented thoroughly to make it easier to
> > understand.
> >
> > 2) Write source code which, when compiled using the compiler/toolchain
> > From the previous step, produces a new compiler/toolchain that will
> > allow you to write more expressive source code at a higher layer of
> > abstraction.
> >
> > 3) Repeat step (2) as many times as necessary to produce a compiler that
> > is capable of compiling GCC from source.
> >
> > 4) Use the compiler from (3) to compile GCC from source.
> >
> > 5) Use the GCC from (4) to compile the rest of the world from source.
> >
> > If we want to free ourselves from reliance on inscrutable binary blobs,
> > isn't something like that the only way?

I think so. We also have to write bootstrap compilers for other languages, which
is the other end of the stick being burned here. We also need to figure out how
to get the correct source to people with signing.

> Sorry for replying to my own post, but I couldn't help myself.  If
> anyone thinks the above sounds too paranoid, remember the Ken Thompson
> hack:
> 
> http://www.c2.com/cgi/wiki?TheKenThompsonHack
> 
> Chilling!

I try not to think about security too much when it comes to efforts, after all,
it's just a cat and mouse game of probability. I think there was a talk on this
by perhaps Ludovic or Dave about how freedom relates to reproducibility. If we
can't reproduce something, how can we truly have the source code to modify it?

Philosophy aside, I think it's important to know that the clear security benefit
here isn't that we can prevent these attacks, but we will have a smaller set of
code to audit when we have the tools to take a threat model and prevent threats.
For now the closest we could have is to trust whatever platform we're using to
boot code that the CPU with faithfully execute. For now it could be BIOS.

> -- 
> Chris

Jookia.



Re: security-updates merged

2016-03-26 Thread Danny Milosavljevic
Possibly unrelated, but:

guix$ git pull # master branch
guix$ guix environment guix
guix$ make
...
configure: error: Package requirements (sqlite3 >= 3.6.19) were not met:

No package 'sqlite3' found



Re: Removing compilers that cannot be bootstrapped

2016-03-26 Thread Ricardo Wurmus

Chris Marusich  writes:

> Leo Famulari  writes:
>
>> `wget https://blob` doesn't count as reproducible :)
>
> Very true.
>
> Self-hosting compilers are a cute trick, but they're a far cry from
> being reproducible.  They're just inscrutable binary blobs.  If we want
> true reproducibility from the bottom up, then it seems like the only way
> to do it is via a strategy like the following:
>
> 1) Write the simplest possible program (or collection of programs) in
> the simplest possible machine code.  This program serves only one
> purpose: to enable you to write more code at a higher level of
> abstraction.  It is effectively a compiler for a very primitive
> language, but the language it compiles will be one layer of abstraction
> above machine code, which is a step in the right direction.  This first
> program must be a "binary blob", since we cannot rely on any existing
> tools to build it.  It must be simple enough that someone can read and
> understand it using e.g. a hex editor, provided that they have access to
> the right reference materials.  Since this program exists only as
> machine code, it must be documented thoroughly to make it easier to
> understand.
>
> 2) Write source code which, when compiled using the compiler/toolchain
> From the previous step, produces a new compiler/toolchain that will
> allow you to write more expressive source code at a higher layer of
> abstraction.
>
> 3) Repeat step (2) as many times as necessary to produce a compiler that
> is capable of compiling GCC from source.
>
> 4) Use the compiler from (3) to compile GCC from source.
>
> 5) Use the GCC from (4) to compile the rest of the world from source.
>
> If we want to free ourselves from reliance on inscrutable binary blobs,
> isn't something like that the only way?

GCC itself is not sufficient to build many compilers.  For GHC, for
example, you need a Haskell compiler such as GHC.  I looked at nhc98 and
other defunct Haskell compilers, but they all have a bootstrapping step
that either requires a Haskell compiler or building from generated C
sources.

In the case of Haskell I think it would make sense to try to figure out
how to bootstrap with Hugs, a Haskell interpreter, or with Yale Haskell,
which I’m trying to port to Guile.

It is probably easier for us to try to write primitive compilers in
Guile than to start from scratch each time.  Then the only blob we need
to figure out how to bootstrap would be Guile itself.

~~ Ricardo




[PATCH] Add MilkyTracker to Guix

2016-03-26 Thread kei
The attached is a patch to gnu/packages/music.scm that allows a minimal 
and functional build of MilkyTracker. I'm unsure if this is formatted 
correctly, but I'm willing to learn. :-)--- music.scm.bak	2016-03-25 17:39:35.959715114 -0400
+++ music.scm	2016-03-25 19:39:44.754396091 -0400
@@ -78,6 +78,7 @@
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages rsync)
+  #:use-module (gnu packages sdl)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages texlive)
@@ -1305,3 +1306,26 @@
 of tools for manipulating and accessing your music.")
 (license license:expat)))
 
+(define-public milkytracker
+  (package
+(name "milkytracker")
+(version "0.90.86")
+(source (origin
+	  (method url-fetch)
+	  (uri
+	   (string-append "http://milkytracker.org/files/milkytracker-";
+  version
+  ".tar.gz"))
+  (sha256
+   (base32
+"0mqjkhvjyp5hnzm1ln3b2qjclviayxylcyml96pjdxgbaqcqa2zz"
+(build-system gnu-build-system)
+(arguments
+ '(#:configure-flags `("--without-alsa" "--without-jack")))
+(inputs
+ `(("sdl" ,sdl)
+   ("zlib" ,zlib)))
+(synopsis "MilkyTracker is a free software multi-platform music tracker for composing music in the MOD and XM module file formats.")
+(description "MilkyTracker is a free software, multi-platform music application for creating .MOD and .XM module files. It attempts to recreate the module replay and user experience of the popular DOS program Fasttracker II, with special playback modes available for improved Amiga ProTracker 2/3 compatibility.")
+(home-page "http://milkytracker.org/";)
+(license license:gpl3)))


Re: GSOC 2016 Application

2016-03-26 Thread sapientech

Hi Chris thanks for the response!

On 2016-03-25 09:03, Chris Marusich wrote:

I would be happy to share with you the hacky little shell scripts I use
to do this today.  They're simple automations of the manual procedure,
really, but perhaps they could be useful.  I am not familiar with the
implementation details of installer wizards used by other distros, but
I've seen and used my fair share of them.


I would definitely like to see the shell scripts you have -- just let me 
know how you would like to share those files.



- Consider both a text-based and graphical application using
guile-ncurses/libRUIN


While it's good to plan for both text and graphical UI, maybe it will 
be
more efficient to pick one to focus on, and treat the other as a 
stretch

goal?


I agree and should turn the GUI interface into a stretch goal.


- Design for portability for use in other software distributions that
lack a proper installer wizard


Again, this is a nice idea, but it might be more efficient to focus on
getting it to work with Guix first.

- An emphasis on rigorous test suites, with stability prioritized over 
features


GuixSD is still beta software.  Is it a good idea to make one of your
goals be "the installer is stable" when the system it's installing is
not stable?


I also agree with your sentiments here that I should prioritize Guix 
before considering other operating systems.


One reason I think stability is particularly important here though, is 
that installs have to check for a lot of edge cases, and it's generally 
difficult for users to solve the problem since the api is so limited. I 
agree I shouldn't go overboard, as Guile itself is in beta, though :)


Best,
Dylan




Re: GSOC 2016 Application

2016-03-26 Thread sapientech

Hi George,
On 2016-03-25 13:11, myglc2 wrote:

Reading your proposal and another on installation prompted me to write
some general thoughts about Guix installation which you might find
interesting:

http://article.gmane.org/gmane.comp.gnu.guix.devel/18206


You bring up some really good points about encouraging a Guix/GNU/Linux 
installer instead of a GuixSD one. If the installer's aim is to help 
less-experienced users, then we should probably discourage them from 
using GuixSD, at least for now. If others agree, I am happy to move in 
this direction.


I think the installer flow you mentioned in your article would be really 
cool. Maybe we could have a few default setups for novice users who 
might be intimidated by all the choices though!


Thanks George,
Dylan

On 2016-03-25 13:11, myglc2 wrote:

sapient...@openmailbox.org writes:


Hi all,

My name is Dylan, and I am a Swarthmore College student interested in
working with Guix this summer! Attached is my proposal to help develop
an installation wizard for GuixSD. Please let me know if there are any
questions or comments.

I am also interested in applying to work on 8sync/adding an extensible
event loop to GNU Shepard. I will add that proposal soon!

Best,
Dylan


Hey Dylan, this is a very cool proposal.

You said, "Although a good techie should not judge a distro by its
installer wizard, first impressions do matter. A smooth install is
satisfying, which helps establish a good relationship with new users
right away."

I could not agree more!

Reading your proposal and another on installation prompted me to write
some general thoughts about Guix installation which you might find
interesting:

http://article.gmane.org/gmane.comp.gnu.guix.devel/18206

Good luck - George