Re: NSS test failure on armhf

2017-04-17 Thread Marius Bakke
Leo Famulari  writes:

> On Mon, Apr 17, 2017 at 11:23:43PM +0200, Marius Bakke wrote:
>> Hello!
>> 
>> Since version 3.30.1, one test consistently fails on armhf. It is the
>> same as in this bug report, although we don't see the exception:
>> 
>> https://bugzilla.mozilla.org/show_bug.cgi?id=1351459
>> 
>> I initially thought this was due to stalls in the build process as we've
>> seen before and tried increasing the timeouts in a790f2620, but that
>> should probably be reverted.
>> 
>> What should we do? We can either patch out this test, or go back to
>> 3.30. Here are the release notes for 3.30.1:
>> 
>> https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.30.1_release_notes
>> 
>> It fixes a non-public bug in the base64 implementation, but introduced a
>> test failure on at least two arches.
>> 
>> Any preference?
>
> Since there were no changes to the set of certificates between 3.30 and
> 3.30.1 [0], I would revert it for now.

I reverted it. Luckily Hydra still has substitutes for 3.30 :)


signature.asc
Description: PGP signature


Re: NSS test failure on armhf

2017-04-17 Thread Leo Famulari
On Mon, Apr 17, 2017 at 11:23:43PM +0200, Marius Bakke wrote:
> Hello!
> 
> Since version 3.30.1, one test consistently fails on armhf. It is the
> same as in this bug report, although we don't see the exception:
> 
> https://bugzilla.mozilla.org/show_bug.cgi?id=1351459
> 
> I initially thought this was due to stalls in the build process as we've
> seen before and tried increasing the timeouts in a790f2620, but that
> should probably be reverted.
> 
> What should we do? We can either patch out this test, or go back to
> 3.30. Here are the release notes for 3.30.1:
> 
> https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.30.1_release_notes
> 
> It fixes a non-public bug in the base64 implementation, but introduced a
> test failure on at least two arches.
> 
> Any preference?

Since there were no changes to the set of certificates between 3.30 and
3.30.1 [0], I would revert it for now.

[0]
https://wiki.mozilla.org/NSS:Release_Versions


signature.asc
Description: PGP signature


Re: libxml2: Wrong separator in XML_CATALOG_FILES?

2017-04-17 Thread Hartmut Goebel
Am 13.04.2017 um 16:44 schrieb Ludovic Courtès:
> Specifically, catalog.c in libxml2 has this:
>
>   /* the XML_CATALOG_FILES envvar is allowed to contain a
>  space-separated list of entries. */

Thanks for digging into this. I'm still wondering about this
non-standard implementation, though.

-- 
Regards
Hartmut Goebel

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




UEFI support in boot image

2017-04-17 Thread Marius Bakke
Ludovic Courtès  writes:

> Marius Bakke  skribis:
>
>> Ludovic Courtès  writes:
>>
>>>3. UEFI support documented and possibly improved.
>>>
>>>   We can certainly document the UEFI setup and add the /boot/efi
>>>   partition in some of the ‘operating-system’ examples.
>>>
>>>   The more difficult part is the installation: do we need to make a
>>>   second, UEFI-specific, installation image?  When I installed
>>>   GuixSD on UEFI, I booted our installation image as “legacy”, but
>>>   then GRUB would default to a legacy install, not a UEFI install:
>>>
>>> https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00799.html
>>>
>>>   I’m not sure exactly what needs to be done.  Thoughts?
>>
>> I plan to work on this over the next few days. The most common way is to
>> create a "hybrid" disk image that supports both UEFI and BIOS boot. IIRC
>> Debian achieves this by using Isolinux to create the EFI payload and
>> chainload to Grub. More information next week :-)
>
> Awesome, thanks for volunteering!

Apologies for the late follow-up, but I finally found some time to work
on this.

I've attached a few patches as a humble beginning, but currently the
"format-partition" code in (gnu build vm) needs to learn some
filesystem-specific parameters. So, I don't think it will be ready for
the upcoming release.

I have also done some reading and don't think we can use isolinux as it
requires an image in ISO 9660 format. Nor does the syslinux utilities
actually support chainloading grub from UEFI as I had hoped.

So I think we'll have to offer UEFI as a standalone image, at least to
begin with. Unfortunately I also believe it needs to be generated from a
UEFI system, but this grub limitation can hopefully be lifted.

Anyway, here is the current status (advice on the FIXME appreciated):

From 25b01f9a219338580b6f7a7449bba8ff90c2176c Mon Sep 17 00:00:00 2001
From: Marius Bakke 
Date: Tue, 11 Apr 2017 10:47:38 +0200
Subject: [PATCH 1/4] vm: Add support for arbitrary partition flags.

* gnu/build/vm.scm (): Change BOOTABLE? to FLAGS.
(initialize-partition-table): Pass each flag to parted.
(initialize-hard-disk): Search for root partition by "boot" flag.
* gnu/system/vm.scm (qemu-image): Adjust partitions accordingly.
---
 gnu/build/vm.scm  | 22 --
 gnu/system/vm.scm |  2 +-
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 1eb9a4c45..f6a028868 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -41,7 +41,7 @@
 partition-size
 partition-file-system
 partition-label
-partition-bootable?
+partition-flags
 partition-initializer
 
 root-partition-initializer
@@ -141,7 +141,7 @@ the #:references-graphs parameter of 'derivation'."
   (sizepartition-size)
   (file-system partition-file-system (default "ext4"))
   (label   partition-label (default #f))
-  (bootable?   partition-bootable? (default #f))
+  (flags   partition-flags (default '()))
   (initializer partition-initializer (default (const #t
 
 (define (fold2 proc seed1 seed2 lst)  ;TODO: factorize
@@ -168,9 +168,10 @@ actual /dev name based on DEVICE."
 (cons* "mkpart" "primary" "ext2"
(format #f "~aB" offset)
(format #f "~aB" (+ offset (partition-size part)))
-   (if (partition-bootable? part)
-   `("set" ,(number->string index) "boot" "on")
-   '(
+   (apply append (map (lambda (flag)
+(cons* "set" (number->string index) flag
+   "on" '()))
+  (partition-flags part)
 
   (define (options partitions offset)
 (let loop ((partitions partitions)
@@ -300,8 +301,17 @@ in PARTITIONS, and using BOOTCFG as its bootloader configuration file.
 
 Each partition is initialized by calling its 'initializer' procedure,
 passing it a directory name where it is mounted."
+
+  (define (find-root-partition partitions)
+"Return the first partition found with the boot flag set."
+;; FIXME: This probably does not work. What's the best way to do this?
+(find (match-lambda
+(($  _ _ _ _ flags)
+ (member "boot" flags)))
+  partitions))
+
   (let* ((partitions (initialize-partition-table device partitions))
- (root   (find partition-bootable? partitions))
+ (root   (find-root-partition partitions))
  (target "/fs"))
 (unless root
   (error "no bootable partition specified" partitions))
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 374d8b663..e8a8463d5 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -229,7 +229,7 @@ the image."
 (* 10 (expt 2 20
 

Staging

2017-04-17 Thread Leo Famulari
On Mon, Apr 17, 2017 at 09:33:12PM +0200, Marius Bakke wrote:
> @Leo, others: I don't anticipate more staging updates in a while, should
> we try and get this merged?

Sure, I merged master into staging and started an evaluation of the
staging branch.


signature.asc
Description: PGP signature


Re: Non-graphical GRUB configuration

2017-04-17 Thread Leo Famulari
On Mon, Apr 17, 2017 at 09:44:06AM -0400, myglc2 wrote:
> Hey Leo, As reported earlier, this works for me. IMO it is good to
> go. If there is anything I can do to help, please let me know.

I'm glad to hear it!

Because this change would make it possible to break your GuixSD system
in new ways, I do want to add some input validation and grub.cfg syntax
checking before I push it to the master branch.

I'd like to finish it this week, but help is always welcome. If anyone
plans to help, please reply here so we don't duplicate effort :)


signature.asc
Description: PGP signature


Re: [PATCH 01/20] gnu: Add python-radon

2017-04-17 Thread Leo Famulari
On Fri, Apr 14, 2017 at 01:13:01PM +0300, Muriithi Frederick Muriuki wrote:
> * gnu/packages/python.scm (python-radon): New variable.

Thanks for these patches!

I've sent my patch-specific comments. Can you also run `guix lint` on
each new package? I noticed a few minor issues in synopses, and there
are problem a few more issues lurking.

Once you decide what to do about the comments you've received, please do
one of the following:

1) Send an updated patch series to , or
2) Write back here to say that this is the final revision of the
patches.


signature.asc
Description: PGP signature


Re: [PATCH 05/20] gnu: Add python-sphinx-1.3.3

2017-04-17 Thread Leo Famulari
On Sat, Apr 15, 2017 at 07:38:57PM +0200, Hartmut Goebel wrote:
> Am 15.04.2017 um 19:28 schrieb Hartmut Goebel:
> > Am 14.04.2017 um 12:13 schrieb Muriithi Frederick Muriuki:
> >>  (define-public python2-sphinx-rtd-theme-0.1.9
> >>(package-with-python2 python-sphinx-rtd-theme-0.1.9))
> >> +
> >> +(define-public python-sphinx-1.3.3
> >> +  ;; python-httpretty has a hard requirement for
> >> +  ;; sphinx == 1.3.3
> > Please test if it works with an up-to-date version of sphinx, too. There
> > are very few reasons for requiring strict version of a tool like sphinx
> > or sphinx-rtd-them. And we should avoid adding versions over versions of
> > packages.
> https://github.com/gabrielfalcao/HTTPretty/blob/0.8.14/requirements.txt
> says:
> 
> # HTTPretty doesn't have any requirements per se so far. yay!
> 
> So I assume you take the version definitions in "development.txt" as
> "hard requirement" - but this file only defines *one* valid set of
> dependencies. So please review *all* the packages you say
> "python-httpretty has a hard requirement" and try to get rid of them. It
> may be even better to patch or "substitute" httpretty to make it work
> with our set of versions instead of piling of version of packages used
> only for this one. Thanks.

I agree, it would be best if we could avoid collecting many versions of
packages like Sphinx; it will become a pain to maintain them later.

On the other hand, it is also a burden to maintain patches against
upstream code. Both approaches cost human time and energy.

Personally, I think it's up to Frederick how he decides to handle this,
since he will be maintaining these packages in the future :)


signature.asc
Description: PGP signature


Re: [PATCH 17/20] gnu: Add python-httpretty

2017-04-17 Thread Leo Famulari
On Fri, Apr 14, 2017 at 01:13:17PM +0300, Muriithi Frederick Muriuki wrote:
> * gnu/packages/python.scm (python-httpretty): New variable.

> +(arguments
> + `(;; One of ipdb's dependency keeps failing with a response
> +   ;; of 410, "Gone"
> +   ;; The dependency seems to have a name "texlive-texmf-2016"
> +   ;; and seems to be one of texlive's dependencies
> +   ;; As such, the tests for this will fail due to the missing
> +   ;; dependency ("python-ipdb" ,python-ipdb)
> +   #:tests? #f))

When the substituter fails, it should suggest that you re-try the
command with '--fallback'.

Does it matter that httpretty would be missing this dependency and
failing its test suite?


signature.asc
Description: PGP signature


Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Petter

Thanks Leo!

On 2017-04-17 20:18, Leo Famulari wrote:

On Mon, Apr 17, 2017 at 07:55:35PM +0200, Petter wrote:

Hi Leo,

Good point! As the build succeeded I didn't think any of it. This 
could be

important for other architectures than what Sergei and I are using.

However,
> find /tmp/go/src/cmd/ -name '*asm\.c*'
doesn't return any file. Looks like they've removed these files. I'm 
pretty
sure they're working to "free" their source of C code, so I wouldn't 
expect

these files to reappear in a later release either.


Indeed, I must have been looking at an old version of the Go source
tree.

With this information I think it's safe to remove the asm.c 
substitution.


Yup! I pushed the update as c04ef86e8114225f5e5859f379582ba6f69aacfb.




Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Leo Famulari
On Mon, Apr 17, 2017 at 07:55:35PM +0200, Petter wrote:
> Hi Leo,
> 
> Good point! As the build succeeded I didn't think any of it. This could be
> important for other architectures than what Sergei and I are using.
> 
> However,
> > find /tmp/go/src/cmd/ -name '*asm\.c*'
> doesn't return any file. Looks like they've removed these files. I'm pretty
> sure they're working to "free" their source of C code, so I wouldn't expect
> these files to reappear in a later release either.

Indeed, I must have been looking at an old version of the Go source
tree.

> With this information I think it's safe to remove the asm.c substitution.

Yup! I pushed the update as c04ef86e8114225f5e5859f379582ba6f69aacfb.


signature.asc
Description: PGP signature


Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Petter

Hi Leo,

Good point! As the build succeeded I didn't think any of it. This could 
be important for other architectures than what Sergei and I are using.


However,

find /tmp/go/src/cmd/ -name '*asm\.c*'
doesn't return any file. Looks like they've removed these files. I'm 
pretty sure they're working to "free" their source of C code, so I 
wouldn't expect these files to reappear in a later release either.


With this information I think it's safe to remove the asm.c 
substitution.


Best,
Petter

On 2017-04-17 19:18, Leo Famulari wrote:

On Mon, Apr 17, 2017 at 03:37:49PM +0200, Petter wrote:

Hi Sergei,

I definitely think your fix deserves recognition. Without it I would
certainly have been unable to build 1.8(.1)? this month. While editing 
the
recipe is trivial mechanical wise, figuring out what to change was not 
:)


Sorry to hear about your issues; I'm on x86_64 and Linux as well 
though...


> $ /gnu/store/b4gflqj64yvksq7959r6m22mf9lzdy69-go-1.8.1/bin/go version
> go version go1.8.1 linux/amd64

Hope you'll be able to work this out!

Thanks for fixing Go 1.8 :)


Yes, thanks to both of you for picking this up :)

@@ -300,8 +301,8 @@ sequential processes (CSP) concurrent programming 
features added.")
(("/etc/services") (string-append net-base 
"/etc/services")))

  (substitute* "time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path))
- (substitute* (find-files "cmd" "asm.c")
-   (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
+ (substitute* (find-files "cmd" "\\.go")
+   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))


The substitution that is removed here would still patch some files.
Shouldn't we adjust the old substitution to also match '/lib64', as 
well

as add the new substitution?

I've attached a patch for that.




Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Leo Famulari
On Mon, Apr 17, 2017 at 03:37:49PM +0200, Petter wrote:
> Hi Sergei,
> 
> I definitely think your fix deserves recognition. Without it I would
> certainly have been unable to build 1.8(.1)? this month. While editing the
> recipe is trivial mechanical wise, figuring out what to change was not :)
> 
> Sorry to hear about your issues; I'm on x86_64 and Linux as well though...
> 
> > $ /gnu/store/b4gflqj64yvksq7959r6m22mf9lzdy69-go-1.8.1/bin/go version
> > go version go1.8.1 linux/amd64
> 
> Hope you'll be able to work this out!
> 
> Thanks for fixing Go 1.8 :)

Yes, thanks to both of you for picking this up :)

> @@ -300,8 +301,8 @@ sequential processes (CSP) concurrent programming 
> features added.")
> (("/etc/services") (string-append net-base 
> "/etc/services")))
>   (substitute* "time/zoneinfo_unix.go"
> (("/usr/share/zoneinfo/") tzdata-path))
> - (substitute* (find-files "cmd" "asm.c")
> -   (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
> + (substitute* (find-files "cmd" "\\.go")
> +   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))

The substitution that is removed here would still patch some files.
Shouldn't we adjust the old substitution to also match '/lib64', as well
as add the new substitution?

I've attached a patch for that.
From c64da0b22a602302d9262b7e76ce7a95bee97f95 Mon Sep 17 00:00:00 2001
From: Petter 
Date: Mon, 17 Apr 2017 15:14:18 +0200
Subject: [PATCH] gnu: go: Update to 1.8.1.

* gnu/packages/golang.scm (go-1.7): Replace with ...
(go-1.8): New variable.
[arguments]: Modify substitutions in 'prebuild' phase.
(go): Update to go-1.8.
---
 gnu/packages/golang.scm | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 00630ce06..f84622bae 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3,8 +3,9 @@
 ;;; Copyright © 2016 Matthew Jordan 
 ;;; Copyright © 2016 Andy Wingo 
 ;;; Copyright © 2016 Ludovic Courtès 
-;;; Copyright © 2016 Petter 
+;;; Copyright © 2016, 2017 Petter 
 ;;; Copyright © 2016, 2017 Leo Famulari 
+;;; Copyright © 2017 Sergei Trofimovich 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -197,11 +198,11 @@ garbage collection, various safety features and in the 
style of communicating
 sequential processes (CSP) concurrent programming features added.")
 (license license:bsd-3)))
 
-(define-public go-1.7
+(define-public go-1.8
   (package
 (inherit go-1.4)
 (name "go")
-(version "1.7.5")
+(version "1.8.1")
 (source
  (origin
(method url-fetch)
@@ -209,7 +210,7 @@ sequential processes (CSP) concurrent programming features 
added.")
name version ".src.tar.gz"))
(sha256
 (base32
- "058q57zmi23rflingzhy1b87yl69mb62ql2psfxqr7q7l89lb0sf"
+ "0mqf8ydxdx1pwmrs8p8wl5y1qrplzxmxzgb6vkghy4l67z0g9nik"
 (arguments
  (substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -301,7 +302,9 @@ sequential processes (CSP) concurrent programming features 
added.")
  (substitute* "time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path))
  (substitute* (find-files "cmd" "asm.c")
-   (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
+   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
+ (substitute* (find-files "cmd" "\\.go")
+   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
  #t)))
(add-before 'build 'set-bootstrap-variables
  (lambda* (#:key outputs inputs #:allow-other-keys)
@@ -364,4 +367,4 @@ sequential processes (CSP) concurrent programming features 
added.")
  `(("go" ,go-1.4)
,@(package-native-inputs go-1.4)
 
-(define-public go go-1.7)
+(define-public go go-1.8)
-- 
2.12.2



signature.asc
Description: PGP signature


Re: Non-graphical GRUB configuration

2017-04-17 Thread myglc2
On 04/05/2017 at 07:59 Leo Famulari writes:

> On Sun, Apr 02, 2017 at 05:06:20PM -0400, Leo Famulari wrote:
>> Based on the GRUB manual [0], how about this plan?
>> 
>> We'd add these fields to (grub-configuration): 
>> 
>> terminal-outputs: One or more symbols: console, serial, gfxterm,
>> ofconsole, vga_text. Default gfxterm.
>> 
>> terminal-inputs: One or more symbols: console, serial, ofconsole,
>> at_keyboard,usb_keyboard. Default unset.
>> 
>> If 'terminal-inputs' or 'serial-*' are unset, we do what we do now:
>> nothing. If 'terminal-outputs' is unset, we also do the same thing we
>> now, which is set it to gfxterm.
>> 
>> If any of them are set, we'd insert the corresponding text into the
>> generated grub.cfg.
>> 
>> If terminal-outputs does not include the symbol 'gfxterm', we'd disable
>> the "setup_gfxterm" function.
>
> Here's a WIP patch that I'd like some advice about. It does insert the
> relevant text into grub.cfg, although I recommend testing it in a
> virtual machine for now.
>
> Questions:
>
> 1) In general, is this approach okay?
>
> 2) I think that (grub-setup-io) should be used in
> (grub-configuration-file) instead of (eye-candy). But, when I try
> calling it there, in the builder, it has no effect on grub.cfg. Any
> suggestions for debugging this?

Hey Leo, As reported earlier, this works for me. IMO it is good to
go. If there is anything I can do to help, please let me know.



Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Petter

Hi Sergei,

I definitely think your fix deserves recognition. Without it I would 
certainly have been unable to build 1.8(.1)? this month. While editing 
the recipe is trivial mechanical wise, figuring out what to change was 
not :)


Sorry to hear about your issues; I'm on x86_64 and Linux as well 
though...



$ /gnu/store/b4gflqj64yvksq7959r6m22mf9lzdy69-go-1.8.1/bin/go version
go version go1.8.1 linux/amd64


Hope you'll be able to work this out!

Thanks for fixing Go 1.8 :)

Best,
Petter

On 2017-04-17 14:54, Sergei Trofimovich wrote:

On Mon, 17 Apr 2017 14:16:06 +0200
Petter  wrote:


Hi,

With this patch I'm not sure how to properly handle Copyright. I've
taken a guess and prepared a
patch anyway.

Here's the situation.

Updating to 1.8 was not trivial. A fix has been posted in a comment by
Sergei Trofimovich on
github[1]. It's a proper Guix patch, updating Go to 1.8, with the fix
and the trivial update stuff,
but as far as I can see not actually submitted to Guix.

[1] https://github.com/golang/go/issues/19132#issuecomment-285897612

After this Go 1.8.1 has been released. The attached patch has the
trivial update stuff for 1.8.1
and the fix by Sergei. I added Sergei to the Copyright section, but 
I'm

not sure if this is
correct, and if this is the way to do it. Also, I didn't find his 
e-mail

address, so I just added
his github page, in ()...

A little messy, please let me know if I should do something 
differently.


I consider the fix itself trivial thus I'm perfectly fine with not 
being

attributed at all. Apologies for making it hard to track me down.
I've added one of emails to github's front page.

[ While the fix is trivial debugging was a bit more fun :) ]

If you still like to add attribution (or have other reasons) feel free
to add "Sergei Trofimovich "

I didn't get to submitting something that works because some unrelated
go-1.8.0 tests failed for me.

go-1.8.1 fails in a similar way, but if it works for you
it's very probable just my environment (x86_64-linux):

guix-master $ ./pre-inst-env guix build go-1.8

  # ../misc/cgo/test
  runtime/cgo: pthread_create failed: Resource temporarily unavailable
  scatter = 0x55ffc0
  hello from C
  sqrt is: 0
  SIGABRT: abort
  PC=0x771232c4 m=12 sigcode=18446744073709551610

Thanks for finishing go update!From ae8434c72d75f68fa25571bee72084a623661a57 Mon Sep 17 00:00:00 2001
From: Petter 
Date: Mon, 17 Apr 2017 15:14:18 +0200
Subject: [PATCH] gnu: go: Update to 1.8.1.

* gnu/packages/golang.scm (go): Update to 1.8.1.
---
 gnu/packages/golang.scm | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 00630ce06..90a809eb2 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3,8 +3,9 @@
 ;;; Copyright © 2016 Matthew Jordan 
 ;;; Copyright © 2016 Andy Wingo 
 ;;; Copyright © 2016 Ludovic Courtès 
-;;; Copyright © 2016 Petter 
+;;; Copyright © 2016, 2017 Petter 
 ;;; Copyright © 2016, 2017 Leo Famulari 
+;;; Copyright © 2017 Sergei Trofimovich 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -197,11 +198,11 @@ garbage collection, various safety features and in the style of communicating
 sequential processes (CSP) concurrent programming features added.")
 (license license:bsd-3)))
 
-(define-public go-1.7
+(define-public go-1.8
   (package
 (inherit go-1.4)
 (name "go")
-(version "1.7.5")
+(version "1.8.1")
 (source
  (origin
(method url-fetch)
@@ -209,7 +210,7 @@ sequential processes (CSP) concurrent programming features added.")
name version ".src.tar.gz"))
(sha256
 (base32
- "058q57zmi23rflingzhy1b87yl69mb62ql2psfxqr7q7l89lb0sf"
+ "0mqf8ydxdx1pwmrs8p8wl5y1qrplzxmxzgb6vkghy4l67z0g9nik"
 (arguments
  (substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -300,8 +301,8 @@ sequential processes (CSP) concurrent programming features added.")
(("/etc/services") (string-append net-base "/etc/services")))
  (substitute* "time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path))
- (substitute* (find-files "cmd" "asm.c")
-   (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
+ (substitute* (find-files "cmd" "\\.go")
+   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
  #t)))
(add-before 'build 'set-bootstrap-variables
  (lambda* (#:key outputs inputs #:allow-other-keys)
@@ -364,4 +365,4 @@ sequential processes (CSP) concurrent programming features added.")
  `(("go" ,go-1.4)
,@(package-native-inputs go-1.4)
 
-(define-public go 

Re: [PATCH] gnu: node: Update to 7.8.0.

2017-04-17 Thread Danny Milosavljevic
Hi Jelle,

since the node build seems to fail by timeout quite often I pushed the update 
of node to 7.8.0 to master as 3759deaba1413270e623be7b56b7a4b3856fb6e8 and 
added a timeout of 1 h.  We might need to increase it some more later, let's 
see.



Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Sergei Trofimovich
On Mon, 17 Apr 2017 14:16:06 +0200
Petter  wrote:

> Hi,
> 
> With this patch I'm not sure how to properly handle Copyright. I've 
> taken a guess and prepared a
> patch anyway.
> 
> Here's the situation.
> 
> Updating to 1.8 was not trivial. A fix has been posted in a comment by 
> Sergei Trofimovich on
> github[1]. It's a proper Guix patch, updating Go to 1.8, with the fix 
> and the trivial update stuff,
> but as far as I can see not actually submitted to Guix.
> 
> [1] https://github.com/golang/go/issues/19132#issuecomment-285897612
> 
> After this Go 1.8.1 has been released. The attached patch has the 
> trivial update stuff for 1.8.1
> and the fix by Sergei. I added Sergei to the Copyright section, but I'm 
> not sure if this is
> correct, and if this is the way to do it. Also, I didn't find his e-mail 
> address, so I just added
> his github page, in ()...
> 
> A little messy, please let me know if I should do something differently.

I consider the fix itself trivial thus I'm perfectly fine with not being
attributed at all. Apologies for making it hard to track me down.
I've added one of emails to github's front page.

[ While the fix is trivial debugging was a bit more fun :) ]

If you still like to add attribution (or have other reasons) feel free
to add "Sergei Trofimovich "

I didn't get to submitting something that works because some unrelated
go-1.8.0 tests failed for me.

go-1.8.1 fails in a similar way, but if it works for you
it's very probable just my environment (x86_64-linux):

guix-master $ ./pre-inst-env guix build go-1.8

  # ../misc/cgo/test
  runtime/cgo: pthread_create failed: Resource temporarily unavailable
  scatter = 0x55ffc0
  hello from C
  sqrt is: 0
  SIGABRT: abort
  PC=0x771232c4 m=12 sigcode=18446744073709551610

Thanks for finishing go update!

-- 

  Sergei


pgpkJjhmE5FdV.pgp
Description: Цифровая подпись OpenPGP


Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Tobias Geerinckx-Rice
Petter,

There's a copyright header in Guix already, with an e-mail address, so I
doubt Sergei will mind:

  $ grep -r Sergei *
  gnu/packages/re2c.scm:;;; Copyright © 2017 Sergei Trofimovich <...>

While I suspect Sergei's already subscribed to this list, I've CC'd that
adress just in case. Hence the complete quote below.

Kind regards,

T G-R

On 17/04/17 14:16, Petter wrote:
> Hi,
> 
> With this patch I'm not sure how to properly handle Copyright. I've 
> taken a guess and prepared a patch anyway.
> 
> Here's the situation.
> 
> Updating to 1.8 was not trivial. A fix has been posted in a comment
> by Sergei Trofimovich on github[1]. It's a proper Guix patch,
> updating Go to 1.8, with the fix and the trivial update stuff, but as
> far as I can see not actually submitted to Guix.
> 
> [1] https://github.com/golang/go/issues/19132#issuecomment-285897612
> 
> After this Go 1.8.1 has been released. The attached patch has the 
> trivial update stuff for 1.8.1 and the fix by Sergei. I added Sergei
> to the Copyright section, but I'm not sure if this is correct, and if
> this is the way to do it. Also, I didn't find his e-mail address, so
> I just added his github page, in ()...
> 
> A little messy, please let me know if I should do something
> differently.



signature.asc
Description: OpenPGP digital signature


[PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Petter

Hi,

With this patch I'm not sure how to properly handle Copyright. I've 
taken a guess and prepared a

patch anyway.

Here's the situation.

Updating to 1.8 was not trivial. A fix has been posted in a comment by 
Sergei Trofimovich on
github[1]. It's a proper Guix patch, updating Go to 1.8, with the fix 
and the trivial update stuff,

but as far as I can see not actually submitted to Guix.

[1] https://github.com/golang/go/issues/19132#issuecomment-285897612

After this Go 1.8.1 has been released. The attached patch has the 
trivial update stuff for 1.8.1
and the fix by Sergei. I added Sergei to the Copyright section, but I'm 
not sure if this is
correct, and if this is the way to do it. Also, I didn't find his e-mail 
address, so I just added

his github page, in ()...

A little messy, please let me know if I should do something differently.

Best,
PetterFrom 9b24372fc95ac32e774bbaa1c5219b771fcd1cda Mon Sep 17 00:00:00 2001
From: Petter 
Date: Mon, 17 Apr 2017 13:36:16 +0200
Subject: [PATCH] gnu: go: Update to 1.8.1.

* gnu/packages/golang.scm (go): Update to 1.8.1.
---
 gnu/packages/golang.scm | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 00630ce06..1864f780a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3,8 +3,9 @@
 ;;; Copyright © 2016 Matthew Jordan 
 ;;; Copyright © 2016 Andy Wingo 
 ;;; Copyright © 2016 Ludovic Courtès 
-;;; Copyright © 2016 Petter 
+;;; Copyright © 2016, 2017 Petter 
 ;;; Copyright © 2016, 2017 Leo Famulari 
+;;; Copyright © 2017 Sergei Trofimovich (https://github.com/trofi)
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -197,11 +198,11 @@ garbage collection, various safety features and in the style of communicating
 sequential processes (CSP) concurrent programming features added.")
 (license license:bsd-3)))
 
-(define-public go-1.7
+(define-public go-1.8
   (package
 (inherit go-1.4)
 (name "go")
-(version "1.7.5")
+(version "1.8.1")
 (source
  (origin
(method url-fetch)
@@ -209,7 +210,7 @@ sequential processes (CSP) concurrent programming features added.")
name version ".src.tar.gz"))
(sha256
 (base32
- "058q57zmi23rflingzhy1b87yl69mb62ql2psfxqr7q7l89lb0sf"
+ "0mqf8ydxdx1pwmrs8p8wl5y1qrplzxmxzgb6vkghy4l67z0g9nik"
 (arguments
  (substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -300,8 +301,8 @@ sequential processes (CSP) concurrent programming features added.")
(("/etc/services") (string-append net-base "/etc/services")))
  (substitute* "time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path))
- (substitute* (find-files "cmd" "asm.c")
-   (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
+ (substitute* (find-files "cmd" "\\.go")
+   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
  #t)))
(add-before 'build 'set-bootstrap-variables
  (lambda* (#:key outputs inputs #:allow-other-keys)
@@ -364,4 +365,4 @@ sequential processes (CSP) concurrent programming features added.")
  `(("go" ,go-1.4)
,@(package-native-inputs go-1.4)
 
-(define-public go go-1.7)
+(define-public go go-1.8)
-- 
2.11.1



Re: Services can now have a default value

2017-04-17 Thread Ricardo Wurmus

Ludovic Courtès  writes:

> With commit 1bb895eabf74a1e571887eb1521915e668a5c28d, service types can
> declare a default value for their instances.  After this one can write:
>
>   (service openssh-service-type)
>
> instead of:
>
>   (service openssh-service-type (openssh-configuration))
>
> A bit of typing saved!

Yeah, I like it!  Thanks!

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




Re: Services can now have a default value

2017-04-17 Thread Ricardo Wurmus

ng0  writes:

> Before I lock myself out, this is the definition for defaults.
> So:
>  (service openssh-service-type
>   (openssh-configuration
> (port-number 12121)))
>
> becomes:
>   (service openssh-service-type
>   (port-number 12121))
>
> or is this just a definition for defaults and not the configuration, and
> when the configuration is specified it is still like before this commit?

The “openssh-service-type” has a default value
“(openssh-configuration)”.  If you want to override parts of the default
configuration you can use the “modify-services” syntax.  Your second
snippet is incorrect, because “service” expects a type and a
configuration value, but you gave it a type and “(port-number 12121)”,
which is not a valid configuration.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




Re: G-Expressions for boot-parameters or grub-configuration-file ?

2017-04-17 Thread Danny Milosavljevic
Hi Mathieu,

> Here's a sligtly modified version of your patch that works for "guix
> reconfigure", I didn't tried any other use-cases.

Thanks! I can confirm that it works for that use-case.

I think it would be a possible way to get a handle on the "--load" complexity.  
Since it's not possible to store the store reference into the content-addressed 
"parameters" file this synthesizes it in the procedure that reads from the file.

Also, "--load" is not grub-specific - so having it inside the grub handler 
module in the first place was ... weird.

What do you think of this approach?

Still open is to make sure that the following doesn't happen (although it 
didn't happen to me yet so far):
1. read-boot-parameters-file prepends "--load" (etc)
2. guix stores the result into the "parameters" file
3. on the next "system reconfigure", read-boot-parameters-file reads it from 
the "parameters" file and prepends "--load" again, giving two sets of "--load" 
in the result.  I think this would eventually lead to ever-changing hash values.

> I switched operating-system-boot-parameters into a monadic procedure,
> because operating-system-initrd-file is also a monadic procedure.

Yes, thanks!

> I'll send a new version of my patch set soon taking your remarks into
> account.

Okay.  I'll review it.



Re: G-Expressions for boot-parameters or grub-configuration-file ?

2017-04-17 Thread Mathieu Othacehe

Hi Danny,

Here's a sligtly modified version of your patch that works for "guix
reconfigure", I didn't tried any other use-cases.

I switched operating-system-boot-parameters into a monadic procedure,
because operating-system-initrd-file is also a monadic procedure.

I'll send a new version of my patch set soon taking your remarks into
account.

Thanks,

Mathieu

diff --git a/gnu/system.scm b/gnu/system.scm
index 89c4150f9..949eeb2bd 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -73,7 +73,7 @@
 operating-system-hosts-file
 operating-system-kernel
 operating-system-kernel-file
-operating-system-kernel-arguments
+operating-system-all-kernel-arguments
 operating-system-initrd
 operating-system-users
 operating-system-groups
@@ -109,7 +109,7 @@
 boot-parameters-kernel
 boot-parameters-kernel-arguments
 boot-parameters-initrd
-read-boot-parameters
+read-boot-parameters-file
 
 local-host-aliases
 %setuid-programs
@@ -122,6 +122,12 @@
 ;;;
 ;;; Code:
 
+(define (bootable-kernel-arguments kernel-arguments system root-device)
+  (cons* (string-append "--root=" root-device)
+ #~(string-append "--system=" #$system)
+ #~(string-append "--load=" #$system "/boot")
+ kernel-arguments))
+
 ;; System-wide configuration.
 ;; TODO: Add per-field docstrings/stexi.
 (define-record-type*  operating-system
@@ -182,6 +188,11 @@
   (sudoers-file operating-system-sudoers-file ; file-like
 (default %sudoers-specification)))
 
+(define (operating-system-all-kernel-arguments os system root-device)
+  (bootable-kernel-arguments (operating-system-kernel-arguments os)
+ system
+ root-device))
+
 
 ;;;
 ;;; Services.
@@ -735,30 +746,14 @@ populate the \"old entries\" menu."
   (mlet* %store-monad
   ((system  (operating-system-derivation os))
(root-fs ->  (operating-system-root-file-system os))
-   (store-fs -> (operating-system-store-file-system os))
-   (label ->(kernel->boot-label (operating-system-kernel os)))
-   (kernel ->   (operating-system-kernel-file os))
-   (initrd  (operating-system-initrd-file os))
(root-device -> (if (eq? 'uuid (file-system-title root-fs))
(uuid->string (file-system-device root-fs))
(file-system-device root-fs)))
-   (entries ->  (list (menu-entry
-   (label label)
-
-   ;; The device where the kernel and initrd live.
-   (device (fs->boot-device store-fs))
-   (device-mount-point
-(file-system-mount-point store-fs))
-
-   (linux kernel)
-   (linux-arguments
-(cons* (string-append "--root=" root-device)
-   #~(string-append "--system=" #$system)
-   #~(string-append "--load=" #$system
-"/boot")
-   (operating-system-kernel-arguments os)))
-   (initrd initrd)
-(grub-configuration-file (operating-system-bootloader os) entries
+   (entries  (operating-system-boot-parameters
+  os
+  system
+  root-device)))
+(grub-configuration-file (operating-system-bootloader os) (list entries)
  #:old-entries old-entries)))
 
 (define (fs->boot-device fs)
@@ -769,6 +764,24 @@ device in a ."
 ((label) (file-system-device fs))
 (else #f)))
 
+(define (operating-system-boot-parameters os system root-device)
+  "Return a  record that describes the boot parameters of OS.
+SYSTEM is optional.  If given, adds kernel arguments for that system to ."
+  (mlet* %store-monad ((initrd   (operating-system-initrd-file os))
+   (store ->   (operating-system-store-file-system os))
+   (label ->   (kernel->boot-label (operating-system-kernel os
+(return (boot-parameters
+ (label label)
+ (root-device root-device)
+ (kernel (operating-system-kernel-file os))
+ (kernel-arguments
+  (if system
+  (operating-system-all-kernel-arguments os system root-device)
+  (operating-system-kernel-arguments os)))
+ (initrd initrd)
+ (store-device (fs->boot-device store))
+ (store-mount-point (file-system-mount-point store))
+
 (define (operating-system-parameters-file os)
   "Return a file that describes the boot parameters of OS.  The primary use of
 this file is the reconstruction of GRUB menu entries for old configurations."