Re: Subdirectories in GUIX_PACKAGE_PATH

2017-06-30 Thread Ludovic Courtès
Hello,

Ricardo Wurmus  skribis:

> Christopher Baines  writes:
>
>> Recently I had problems with the way GUIX_PACKAGE_PATH was working with
>> govuk-guix [1]. Currently, I'm using a separate directory for the
>> GUIX_PACKAGE_PATH that contains symlinks to a subset of the Guile
>> modules necessary for the packages in the repository.
>>
>> I think support (whether intentional or otherwise) for this approach was
>> removed in [2].
>
> Looks like this was removed in an attempt to improve performance over
> NFS.  The “scheme-files” procedure now includes a comment:
>
>   ;; XXX: We don't recurse if we find a symlink.
>
> Would it not be better to fix this instead of adding support for special
> syntax in GUIX_PACKAGE_PATH?

Indeed, apologies for the breakage.

I think the patch below fixes it.  It incurs overhead only when a
symlink is encountered, which is reasonable I think.

Chris & Alex: could you give it a try and report back?

Thanks in advance,
Ludo’.

diff --git a/guix/discovery.scm b/guix/discovery.scm
index 292df2bd9..b1731de93 100644
--- a/guix/discovery.scm
+++ b/guix/discovery.scm
@@ -60,11 +60,20 @@ DIRECTORY is not accessible."
  (case (entry-type absolute properties)
((directory)
 (append (scheme-files absolute) result))
-   ((regular symlink)
-;; XXX: We don't recurse if we find a symlink.
+   ((regular)
 (if (string-suffix? ".scm" name)
 (cons absolute result)
 result))
+   ((symlink)
+(cond ((string-suffix? ".scm" name)
+   (cons absolute result))
+  ((stat absolute #f)
+   =>
+   (match-lambda
+ (#f result)
+ ((= stat:type 'directory)
+  (append (scheme-files absolute)
+  result))
(else
 result))
   '()


Re: Evaluation of master failed on Hydra

2017-06-30 Thread Ludovic Courtès
Mark H Weaver  skribis:

> The evaluation of 'master' (commit 588b22575) on Hydra failed with the
> following error.

[...]

>  770: 6 [operating-system-derivation # # #f]
> In gnu/services.scm:
>  672: 5 [loop #]
> In srfi/srfi-1.scm:
>  575: 4 [map # (# # 
> #)]
> In gnu/services.scm:
>  537: 3 [packages->profile-entry (# # # # ...)]
> In guix/profiles.scm:
>  302: 2 [packages->manifest (# # # # ...)]
> In srfi/srfi-1.scm:
>  575: 1 [map # (# # # # 
> ...)]
> In guix/profiles.scm:
>  303: 0 [# #]
>
> guix/profiles.scm:303:8: In procedure # guix/profiles.scm:303:8 (expr)>:
> guix/profiles.scm:303:8: Throw to key `match-error' with args `("match" "no 
> matching pattern" #)'.

Fixed in 87941d1df473511f0f75737e81a51a106132c9de.

This is due to a difference in how Guile 2.0 handles nested modules:

--8<---cut here---start->8---
$ guix environment --ad-hoc guile@2.0 guile2.0-guix --pure -- guile

[...]

scheme@(guile-user)> ,m (gnu system)
scheme@(gnu system)> shadow
$1 = #
scheme@(gnu system)> (version)
$2 = "2.0.14"
--8<---cut here---end--->8---

versus:

--8<---cut here---start->8---
$ guix environment --ad-hoc guile guix --pure -- guile

[...]

scheme@(guile-user)> ,m (gnu system)
scheme@(gnu system)> shadow
$1 = #
scheme@(gnu system)> (version)
$2 = "2.2.2"
--8<---cut here---end--->8---

Thanks for the heads-up,
Ludo’.



Re: core-updates on Hurd

2017-06-30 Thread Ludovic Courtès
Hi rennes,

rennes  skribis:

> currently the guix core-updates branch on GNU/Hurd, after start  
> guix-daemon and issue the command './pre-inst-env guix build hello'  
> fails with:
> --
> guix build: error: lstat: No such file or directory:  
> "/home/jin/guix/gnu/packages/zation.scm"

It could be a portability bug in a new ‘scandir*’ procedure (see commit
fa73c1937364872560c509f02b3d7648a5bed006).

Could you either print the names that ‘scandir*’ returns at its call
site in (guix discovery) like this:

--8<---cut here---start->8---
diff --git a/guix/discovery.scm b/guix/discovery.scm
index 292df2bd9..2d7a1ffdb 100644
--- a/guix/discovery.scm
+++ b/guix/discovery.scm
@@ -50,7 +50,7 @@ DIRECTORY is not accessible."
   ;; Use 'scandir*' so we can avoid an extra 'lstat' for each entry, as
   ;; opposed to Guile's 'scandir' or 'file-system-fold'.
   (fold-right (lambda (entry result)
-(match entry
+(match (pk entry)
   (("." . _)
result)
   ((".." . _)
--8<---cut here---end--->8---

… and/or run ‘./pre-inst-env rpctrace guix build hello’ to see what’s
going on?

HTH!

Ludo’.



Re: Continuing the work on the recipes related to GNU Ring

2017-06-30 Thread Adonay Felipe Nogueira
Hi, I have sent some patches, see
[[http://lists.gnu.org/archive/html/guix-patches/2017-06/msg00831.html]].

-- 
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre, por isso não uso. Iguais a ele prefiro
  GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard
  que está no endereço acima aos teus contatos.
- Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu
  aceito, mas não repasso. Entrego apenas em formatos favoráveis ao
  /software/ livre. Favor entrar em contato em caso de dúvida.



Re: 01/01: gnu: glibc/linux: Add patches for CVE-2017-1000366.

2017-06-30 Thread Mark H Weaver
Hi Ludovic,

l...@gnu.org (Ludovic Courtès) writes:

> civodul pushed a commit to branch core-updates
> in repository guix.
>
> commit 503a4df904b8d4b82caebdb17db9c5f76a952418
> Author: Ludovic Courtès 
> Date:   Thu Jun 29 12:53:14 2017 +0200
>
> gnu: glibc/linux: Add patches for CVE-2017-1000366.
> 
> * gnu/packages/patches/glibc-CVE-2017-1000366-pt1.patch,
> gnu/packages/patches/glibc-CVE-2017-1000366-pt2.patch,
> gnu/packages/patches/glibc-CVE-2017-1000366-pt3.patch: New files.
> * gnu/local.mk (dist_patch_DATA): Add them.
> * gnu/packages/base.scm (glibc/linux)[source](patches): Add them.
> [replacement]: Remove.
> (glibc-2.25-patched): Remove.
> (glibc-2.24, glibc-2.23, glibc-2.22, glibc-2.21)
> (glibc-locales): Remove 'replacement' field.

Why did you remove the (replacement #f) fields from glibc-2.24,
glibc-2.23, glibc-2.22, and glibc-2.21?  Keeping the inherited
replacements will never do the right thing here, because the inherited
replacement will always be for a newer version of glibc.

It would be nice to have things arranged in such a way that we can
simply add a replacement for 'glibc/linux', when needed.  We did that
work for CVE-2017-1000366.  It would be good not to revert that work,
to facilitate future security updates.

More generally, I think we need to give more thought to how to handle
'replacement' fields when we inherit packages, in order to do the right
thing when the inherited package is grafted.  One way is to override
(replacement #f).  Another is to use the 'package/inherit' macro from
(guix packages), which applies the same overrides to the replacement.
I can't think of a case where it's proper to leave the 'replacement'
unchanged when inheriting a package.

What do you think?

  Mark



Re: Local caching behavior affected by network state

2017-06-30 Thread Ricardo Wurmus

Leo Famulari  writes:

> I've noticed confusing behavior regarding the memoized cache, which
> depends on the state of the network connection.
[…]
> So, when I am offline, I have to use --fallback for the local cache to
> work.

I see this too, especially since the glibc graft, because all packages
are now grafted.  Here’s a package I have just built with “guix build
axoloti”.  Then I go offline and try to install it:

--8<---cut here---start->8---
guix package -i axoloti
[…]
The following package will be upgraded:
   axoloti  1.0.12 → 1.0.12 
/gnu/store/v74k2b6mivsmz1q00slpl9dxjlg9qa3r-axoloti-1.0.12


Starting download of 
/gnu/store/jjprvyxxwxy27y1djs20wg04sljjaww4-glibc-2.25.tar.xz
>From http://ftpmirror.gnu.org/glibc/glibc-2.25.tar.xz...
ERROR: In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/jjprvyxxwxy27y1djs20wg04sljjaww4-glibc-2.25.tar.xz
>From ftp://ftp.cs.tu-berlin.de/pub/gnu/glibc/glibc-2.25.tar.xz...
ERROR: In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/jjprvyxxwxy27y1djs20wg04sljjaww4-glibc-2.25.tar.xz
>From ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/glibc/glibc-2.25.tar.xz...
ERROR: In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/jjprvyxxwxy27y1djs20wg04sljjaww4-glibc-2.25.tar.xz
>From http://ftp.gnu.org/pub/gnu/glibc/glibc-2.25.tar.xz...
ERROR: In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/jjprvyxxwxy27y1djs20wg04sljjaww4-glibc-2.25.tar.xz
>From 
>http://mirror.hydra.gnu.org/file/glibc-2.25.tar.xz/sha256/1813dzkgw6v8q8q1m4v96yfis7vjqc9pslqib6j9mrwh6fxxjyq6...
ERROR: In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/jjprvyxxwxy27y1djs20wg04sljjaww4-glibc-2.25.tar.xz
>From 
>http://tarballs.nixos.org/sha256/1813dzkgw6v8q8q1m4v96yfis7vjqc9pslqib6j9mrwh6fxxjyq6...
ERROR: In procedure getaddrinfo: Name or service not known
failed to download 
"/gnu/store/jjprvyxxwxy27y1djs20wg04sljjaww4-glibc-2.25.tar.xz" from 
"mirror://gnu/glibc/glibc-2.25.tar.xz"
builder for `/gnu/store/fwfj4y8sqswhgq53r82im26fr0880rp8-glibc-2.25.tar.xz.drv' 
failed to produce output path 
`/gnu/store/jjprvyxxwxy27y1djs20wg04sljjaww4-glibc-2.25.tar.xz'
cannot build derivation 
`/gnu/store/19kvn28ypyh8prmwdmynkghxiz9b4bz1-glibc-2.25.tar.xz.drv': 1 
dependencies couldn't be built
cannot build derivation 
`/gnu/store/2mx66l7miv2brgnnl5scc66xhqbw6hzn-glibc-2.25.drv': 1 dependencies 
couldn't be built
guix package: error: build failed: build of 
`/gnu/store/2mx66l7miv2brgnnl5scc66xhqbw6hzn-glibc-2.25.drv' failed
--8<---cut here---end--->8---

The same is true for running “guix build” for a package that has already
been built:

--8<---cut here---start->8---
rekado in ~: guix build axoloti
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
@ build-started /gnu/store/25bi2vjnbw46y0qkgqh4p03idj02wzjq-axoloti-1.0.12.drv 
- x86_64-linux 
/var/log/guix/drvs/25//bi2vjnbw46y0qkgqh4p03idj02wzjq-axoloti-1.0.12.drv.bz2
[…]
/gnu/store/shkwjz6q2x411kf2s4y0n3gcwg792kfz-axoloti-1.0.12
rekado in ~: guix build axoloti
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
/gnu/store/shkwjz6q2x411kf2s4y0n3gcwg792kfz-axoloti-1.0.12
rekado in ~: [disconnects from the Internet]
rekado in ~: guix build axoloti
@ substituter-started 
/gnu/store/8d05y04l3mrfsrsspyckh413zq6az54w-glibc-2.25.tar.xz 
/gnu/store/nrd0v38d61l8y16vqkb1gws0bw45q885-guix-0.13.0-2.de9d8f0/libexec/guix/substitute
Downloading 
https:

Re: Local caching behavior affected by network state

2017-06-30 Thread Leo Famulari
On Fri, Jun 30, 2017 at 09:07:06PM +0200, Ricardo Wurmus wrote:
> 
> Leo Famulari  writes:
> 
> > I've noticed confusing behavior regarding the memoized cache, which
> > depends on the state of the network connection.
> […]
> > So, when I am offline, I have to use --fallback for the local cache to
> > work.

Update: Sometimes even --fallback does not help, and Guix still tries to
build stuff when I think it doesn't need to.


signature.asc
Description: PGP signature


Re: The current state of Aarch64 on Guix

2017-06-30 Thread Ricardo Wurmus

Efraim Flashner  writes:

> Currently Aarch64 support in guix is pretty good, as long as you don't
> mind compiling for yourself :).
[…]
> It sounds like its all doom and gloom, but its not too bad. `guix
> package -A | wc -l' shows me 5341 (5208 without sablevm-classpath),
> compared with ~5600 on x86_64.

Thank you for your excellent work on making Guix ready for aarch64!
Impressive!

-- 
Ricardo

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




[PATCH] fpm2 package derivation

2017-06-30 Thread Thomas Sigurdsen
Hi, just managed to make this work, ran it through guix lint and think it
should be allright. With that said I'm more than happy for feedback seeing as
I'm a guile newbie and never contributed much to anything before (even though
my papers say I have training as a programmer :P ).

Not sure if this is the right place to ask, but I'll go ahead: the previous
version that did not build was this:

https://notabug.org/thomassgn/guixsd-configuration/src/8dd3f613371b7f1ab28111f061f6735646174ee0/modules/tms/fpm2.scm

I don't understand why this did not work and the working definition does. I
arrived at the new working definition by looking at the definition of xfig
and nvi (also in gnu/packages/).

Quite happy just making this derivation install through guix!

Patch:
0001-Add-package-derivation-for-fpm2-v0.79.patch

From a73b8d8351279dadbb11a12097d1dfe488075df9 Mon Sep 17 00:00:00 2001
From: Thomas Sigurdsen 
Date: Fri, 30 Jun 2017 22:54:10 +0200
Subject: [PATCH] Add package derivation for fpm2 v0.79

---
 gnu/packages/password-utils.scm | 54
+ 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 08591d108..f3e1f0a00 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -446,3 +446,57 @@ use pass, the standard unix password manager, as the
credential backend for your git repositories.  This is achieved by explicitly
defining mappings between hosts and entries in the password store.")
 (license license:lgpl3+)))
+
+(define-public fpm2
+  (package
+(name "fpm2")
+(version "0.79")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://als.regnet.cz/fpm2/download/fpm2-";
+  version ".tar.bz2"))
+  (sha256
+   (base32
+"19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"
+(build-system gnu-build-system)
+(inputs `(("gtk2" ,gtk+-2)
+  ("gnupg" ,gnupg)
+  ("libxml2" ,libxml2)))
+(native-inputs `(("pkgconfig" ,pkg-config)
+ ("intltool" ,intltool)))
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (add-before
+ 'configure 'pre-configure
+   (lambda _
+   (let* ((poinc (open-output-file "po/POTFILES.in")))
+ (begin
+   (newline poinc)
+   (display "data/fpm2.desktop.in" poinc)
+   (newline poinc)
+   (display "data/fpm2.desktop.in.in" poinc)
+   (newline poinc)
+   (display "fpm2.glade" poinc)
+   (newline poinc)
+   (display "src/callbacks.c" poinc)
+   (newline poinc)
+   (display "src/fpm.c" poinc)
+   (newline poinc)
+   (display "src/fpm_file.c" poinc)
+   (newline poinc)
+   (display "src/interface.c" poinc)
+   (newline poinc)
+   (display "src/support.c" poinc)
+   (newline poinc)
+   (display "fpm2.glade" poinc)
+   (newline poinc)
+   (close-port poinc
+(synopsis "Manages, generates and stores passwords encrypted")
+(description "FPM2 is GTK2 port from Figaro's Password Manager
+originally developed by John Conneely, with some new enhancements.
+
+Upstream development seems to have stopped. It is therefore recommended
+to use a different password manager.  ")
+(home-page "http://als.regnet.cz/fpm2/";)
+(license license:gpl2)))
-- 
2.13.2

>From a73b8d8351279dadbb11a12097d1dfe488075df9 Mon Sep 17 00:00:00 2001
From: Thomas Sigurdsen 
Date: Fri, 30 Jun 2017 22:54:10 +0200
Subject: [PATCH] Add package derivation for fpm2 v0.79

---
 gnu/packages/password-utils.scm | 54 +
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 08591d108..f3e1f0a00 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -446,3 +446,57 @@ use pass, the standard unix password manager, as the credential backend for
 your git repositories.  This is achieved by explicitly defining mappings
 between hosts and entries in the password store.")
 (license license:lgpl3+)))
+
+(define-public fpm2
+  (package
+(name "fpm2")
+(version "0.79")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://als.regnet.cz/fpm2/download/fpm2-";
+  version ".tar.bz2"))
+  (sha256
+   (base32
+"19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"
+(build-system gnu-build-system)
+(inputs `(("gtk2" ,gtk+-2)
+  ("gnupg" ,gnupg)
+  ("l

Re: 01/01: gnu: glibc/linux: Add patches for CVE-2017-1000366.

2017-06-30 Thread Mark H Weaver
Another problem with this commit is that it fails to add
"glibc-vectorized-strcspn-guards.patch", so it will fail to build on
i686, as described in .

Also, it leaves the 'patches' fields in glibc-2.24, glibc-2.23,
glibc-2.22, and glibc-2.21.  Those should be removed.

I'll fix it up.

Mark



emacs-exwm-x update error

2017-06-30 Thread Feng Shu

feng@tumashu:~/project/guix $ ./pre-inst-env guix package -u emacs-exwm-x
;;; note: source file /home/feng/project/guix/gnu/packages/emacs.scm
;;;   newer than compiled /home/feng/project/guix/gnu/packages/emacs.go
;;; note: source file /home/feng/project/guix/gnu/packages/emacs.scm
;;;   newer than compiled 
/run/current-system/profile/lib/guile/2.2/site-ccache/gnu/packages/emacs.go
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.

substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 
100.0%
The following package will be upgraded:
   emacs-exwm-x 1.0-2.2099138 → 1.6 
/gnu/store/b05317amv8xp7kg297rjfqma8f9pp91d-emacs-exwm-x-1.6

guix package: error: profile contains conflicting entries for emacs-exwm:out
guix package: error:   first entry: emacs-exwm@0.14:out 
/gnu/store/6v3xzl7xpbgkg9fy6rhfbbizps61yysd-emacs-exwm-0.14
guix package: error:... propagated from emacs-exwm-x@1.6
guix package: error:   second entry: emacs-exwm@0.13:out 
/gnu/store/j39k3hiyxskr78k2pbybvgq1nwczdgvq-emacs-exwm-0.13



--