Re: [PATCH] gnu: Add adwaita-icon-theme.

2015-05-22 Thread Federico Beffa
On Fri, May 22, 2015 at 3:35 AM, 宋文武  wrote:
> Federico Beffa  writes:
>
>>> With 'gtk+', it will:
>>> 1. use gtk-update-icon-cache to build a index-theme.cache   (ok)
>>> 2. use gtk-encode-symbolic-svg to convert symbolic SVGs to PNGs (failed)
>>
>> To enable the SVG functionality of gdk-pixbuf you have to refer to the
>> cache in the librsvg package, not the default in the gdk-pixbuf
>> package. See gnome-themes-standard.
> That's used at runtime, for 'gtk-encode-symbolic-svg', SVG support is
> always needed, so I'd like to wrap it.
>
> And it seems to me that gnome-themes-standard doesn't require librsvg
> to build.  The code to set 'GDK_PIXBUF_MODULE_FILE' in the builder
> doesn't affect anything when running, it's redudant.

I do not remember the details, but I'm pretty sure that at the time I
prepared the package librsvg and the env var were required either to
build or to pass the tests. But, if you find it to be wrong, feel free
to change it.

Regards,
Fede



Re: [PATCH 02/10] gnu: base: Fix a bug that occurs in non-Linux systems.

2015-05-22 Thread Manolis Ragkousis
Ok to push this patch to wip-hurd? As this is something that doesn't
affect Linux,
there is no need to push it to core-updates.
From 6de900b0cf21af361c3b5910b339ecab8ded5e4b Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis 
Date: Thu, 21 May 2015 16:47:26 +0300
Subject: [PATCH 1/5] gnu: base: Fix a bug that occurs in non-Linux systems.

* gnu/packages/base.scm (tar): Apply patch.
* gnu/packages/patches/tar-d_ino_in_dirent-fix.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am  |  1 +
 gnu/packages/base.scm  |  3 +-
 gnu/packages/patches/tar-d_ino_in_dirent-fix.patch | 46 ++
 3 files changed, 49 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/tar-d_ino_in_dirent-fix.patch

diff --git a/gnu-system.am b/gnu-system.am
index 6a82170..da5d08a 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -546,6 +546,7 @@ dist_patch_DATA =		\
   gnu/packages/patches/slim-sigusr1.patch			\
   gnu/packages/patches/soprano-find-clucene.patch		\
   gnu/packages/patches/superlu-dist-scotchmetis.patch		\
+  gnu/packages/patches/tar-d_ino_in_dirent-fix.patch		\
   gnu/packages/patches/tcsh-fix-autotest.patch			\
   gnu/packages/patches/teckit-cstdio.patch			\
   gnu/packages/patches/texi2html-document-encoding.patch	\
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index f2e7fb5..b4344ee 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -140,7 +140,8 @@ implementation offers several extensions over the standard utility.")
 version ".tar.xz"))
 (sha256
  (base32
-  "1wi2zwm4c9r3h3b8y4w0nm0qq897kn8kyj9k22ba0iqvxj48vvk4"
+  "1wi2zwm4c9r3h3b8y4w0nm0qq897kn8kyj9k22ba0iqvxj48vvk4"))
+(patches (list (search-patch "tar-d_ino_in_dirent-fix.patch")
(build-system gnu-build-system)
(synopsis "Managing tar archives")
(description
diff --git a/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch b/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch
new file mode 100644
index 000..d4a2e11
--- /dev/null
+++ b/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch
@@ -0,0 +1,46 @@
+commit e9ddc08da0982f36581ae5a8c7763453ff41cfe8
+Author: Sergey Poznyakoff 
+Date:   Thu Sep 25 00:22:16 2014 +0300
+
+Bugfixes.
+
+* doc/tar.1: Fix typo in font spec.
+* src/tar.c (sort_mode_arg, sort_mode_flag): Protect "inode"
+(SAVEDIR_SORT_INODE) with D_INO_IN_DIRENT
+
+diff --git a/doc/tar.1 b/doc/tar.1
+index 9000627..b91de63 100644
+--- a/doc/tar.1
 b/doc/tar.1
+@@ -879,7 +879,7 @@ Exclude files matching patterns listed in FILE.
+ \fB\-\-strip\-components\fR=\fINUMBER\fR
+ Strip \fINUMBER\fR leading components from file names on extraction.
+ .TP
+-\fB\-\-transform\fR=\fIEXPRESSION\dR, \fB\-\-xform\fR=\fIEXPRESSION\fR
++\fB\-\-transform\fR=\fIEXPRESSION\fR, \fB\-\-xform\fR=\fIEXPRESSION\fR
+ Use sed replace \fIEXPRESSION\fR to transform file names.
+ .SS File name matching options
+ These options affect both exclude and include patterns.
+diff --git a/src/tar.c b/src/tar.c
+index 225c624..f8102e0 100644
+--- a/src/tar.c
 b/src/tar.c
+@@ -1341,14 +1341,18 @@ static char filename_terminator;
+ static char const *const sort_mode_arg[] = {
+   "none",
+   "name",
++#if D_INO_IN_DIRENT
+   "inode",
++#endif
+   NULL
+ };
+ 
+ static int sort_mode_flag[] = {
+ SAVEDIR_SORT_NONE,
+ SAVEDIR_SORT_NAME,
++#if D_INO_IN_DIRENT
+ SAVEDIR_SORT_INODE
++#endif
+ };
+ 
+ ARGMATCH_VERIFY (sort_mode_arg, sort_mode_flag);
\ No newline at end of file
-- 
2.4.1



Re: Add ssd and sawfish-page

2015-05-22 Thread Andreas Enge
Hello,

On Fri, May 22, 2015 at 08:45:30AM +0800, Feng Shu wrote:
> For Sawfish user, the below two packages are very useful, suggest add to guix.
> 1. https://github.com/SawfishWM/ssd
> 2. https://github.com/SawfishWM/sawfish-pager

as Guix is a collaborative project, you are very welcome to try to add them
yourself! You can copy-paste and modify an existing package, the manual
provides some help, and I have given a talk on how to package:
   https://www.gnu.org/software/guix/guix-ghm-andreas-20130823.pdf
It is a bit outdated, but might still be helpful. You can also ask for
help on the mailing list and the irc channel.

Now I would suggest to start with something simple, and am not sure if your
examples fall into that category...

Andreas




Re: Xfce halt permission

2015-05-22 Thread Alex Kost
Daniel Pimentel (2015-05-22 03:13 +0300) wrote:

> Hi Guix, I'd like to add halt permission to normal user in XFCE
> session. The halt binary is in system profile:
> /run/current-system/profile/sbin/halt
> How to add halt binary to my normal user?

As for me, I put the following into "/etc/sudoers" (but not directly –
there is ‘sudoers’ field in ‘operating-system’ declaration):

--8<---cut here---start->8---
Cmnd_Alias HALT = /run/current-system/profile/sbin/reboot, \
  /run/current-system/profile/sbin/halt
 =NOPASSWD: HALT
--8<---cut here---end--->8---

Also I have the following shell aliases (in my ~/.bashrc):

--8<---cut here---start->8---
alias reboot='sudo reboot'
alias halt='sudo halt'
--8<---cut here---end--->8---

After that I can use "halt" and "reboot" as a user (without promting for
a password).  I hope it helps.

-- 
Alex



Re: permission denied: /gnu/store/...guile...

2015-05-22 Thread rekado
 On Fri, 22 May 2015 05:53:51 +0800 Ludovic Courtès wrote 
 
 > Could you try this: 
 >  
 > --8<---cut here---start->8--- 
 > (chdir "/tmp") 
 > (setgroups #()) 
 > (setgid 3) 
 > (setuid 30001) 
 > (pk 'uid/gid (getuid) (getgid)) 
 > (pk 'euid/egid (geteuid) (getegid)) 
 > (let loop ((i 3)) 
 >   (when (< i 1024) 
 > (false-if-exception (close-fdes i)) 
 > (loop (+ 1 i 
 > (execl "/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile" 
 > "guile" 
 >"-c" "(pk 'running (getuid) (geteuid))") 
 > --8<---cut here---end--->8--- 
 >  
 > and then as root run: 
 >  
 >   # guile the-above-file.scm 
 >  
 > It should return zero and print: 
 >  
 > --8<---cut here---start->8--- 
 > ;;; (uid/gid 30001 3) 
 >  
 > ;;; (euid/egid 30001 3) 
 >  
 > ;;; (running 30001 30001) 
 > --8<---cut here---end--->8--- 

I ran it in a guile REPL (as root) and I got the first two outputs, but an 
error on (execl ...).  It's an unhelpful message:

ERROR: In procedure execl:
ERROR: In procedure execl: Permission denied

The backtrace just shows me the line that failed.

When I save it in a file and run that with guile as root I get this error after 
the first two output lines:

Backtrace:
In ice-9/boot-9.scm:
  157: 7 Exception thrown while printing backtrace:
ERROR: In procedure private-lookup: Module named (system vm frame) does not 
exist

ERROR: In procedure execl:
ERROR: In procedure execl: Permission denied

That's all.




Re: Daemon update

2015-05-22 Thread Taylan Ulrich Bayırlı/Kammer
Alexander Vorobiev  writes:

> Doesn't binary distribution have hardcoded /gnu/* paths? I can't use
> those unfortunately. We have a standard configuration of RHEL 6.5
> installed on hundreds of servers and any modifications of the root
> directory (and all other "standard" directories) layout are out of
> question. Would it be too hard to add an environment variable(s)
> pointing to a Guix's store and cache directories so that the binary
> build of the daemon doesn't depend on the hardcoded values?

I'm afraid it's not the daemon itself for which changing the store path
is problematic (although it's not supported at run-time AFAIK, only at
configure-time via --with-store-dir=), it's that any built packages in
/gnu/store are likely to have "hardcoded" absolute references to other
/gnu/store files.

I think this can't really be avoided either, because some pieces of
software have configuration files and such which only support plain file
paths without any dynamic parameterization, meaning the recipe for the
package has to patch said files to contain absolute references to
/gnu/store files when they have to refer to any files from their
dependencies.

For example, when sources of package A contain a dlopen() call to open a
library from package B, then A's source is patched to turn the file name
argument to dlopen() into an absolute path to package B's library file
in /gnu/store.  That is because dlopen() does not support changes to its
search path in a portable manner.  (Maybe one day we will hack dlopen to
fix this, but it's just one example.)

This would mean that to use a non-standard store directory, you will
have to build Guix packages locally, as well as Guix itself.  Unless I'm
missing something.


You could still use the binary tarballs to install Guix on a machine
where you are permitted to, so you can easily compile another Guix via
the method described at the bottom here:

https://lists.gnu.org/archive/html/guix-devel/2015-05/msg00360.html


I'm afraid this doesn't help very much, but it's all I've got. :-\

Taylan



How can I add a package outside the guix source dir?

2015-05-22 Thread Feng Shu

I want to add a package which will used by myself, for example:

I don't want to put it to guix source dir, How can I solve the problem?

#+BEGIN_COMMENT
(define-public emacs-snapshot
  (package (inherit emacs)
   (name "emacs-snapshot")
   (version "20150522.9e41e0b")
   (source (origin
 (method git-fetch)
 (uri (git-reference
   (url "/home/feng/project/emacs")
   (commit "9e41e0bc6a6fdb7a01841db62d8de42d67be534a")))
 (sha256
  (base32
   
"1p50nrmwnx1d6an7daz8fxkj6ylxml7g23b996ba837nlfz3l8ay"
   (native-inputs
`(("autoconf" ,autoconf)
  ("automake" ,automake)
  ,@(package-native-inputs emacs)))
   (arguments
(substitute-keyword-arguments
`(;; Build fails if we allow parallel build.
  #:parallel-build? #f
;; Tests aren't passing for now.
#:tests? #f
,@(package-arguments emacs))
  ((#:phases phases)
   `(modify-phases ,phases
  (add-after 'unpack 'autogen
 (lambda _
   (zero? (system* "sh" "autogen.sh"))
#+END_COMMENT



-- 




Should these files ignored?

2015-05-22 Thread Feng Shu

#+BEGIN_COMMENT
doc/guix.info-1
doc/guix.info-2
po/guix/cs.po
po/guix/da.po
po/guix/de.po
po/guix/eo.po
po/guix/fr.po
po/guix/hu.po
po/guix/pt_BR.po
po/guix/sr.po
po/guix/vi.po
po/packages/de.po
po/packages/eo.po
po/packages/fr.po
po/packages/hu.po
po/packages/pt_BR.po
po/packages/sr.po
po/packages/vi.po
#+END_COMMENT

--




Re: How can I add a package outside the guix source dir?

2015-05-22 Thread Ricardo Wurmus

Feng Shu writes:

> I want to add a package which will used by myself, for example:
>
> I don't want to put it to guix source dir, How can I solve the problem?

Guix respects the environment variable GUIX_PACKAGE_PATH, which you can
point to a directory containing your very own Guile modules with package
definitions.



Re: How can I add a package outside the guix source dir?

2015-05-22 Thread Taylan Ulrich Bayırlı/Kammer
Feng Shu  writes:

> I want to add a package which will used by myself, for example:
>
> I don't want to put it to guix source dir, How can I solve the problem?

You can set the environment variable GUIX_PACKAGE_PATH to
e.g. ~/.guix-packages then put that package definition into
~/.guix-packages/emacs.scm and it should work.

See (info "(guix) Package Modules"),
i.e. https://gnu.org/s/guix/manual/html_node/Package-Modules.html

Taylan



About "collision encountered"

2015-05-22 Thread Feng Shu

I build a emacs-snapshot package, it seem conflict with emacs package,
how to deal with the situation?

```
warning: collision encountered: 
/gnu/store/apmjmf4zsrhzvxvjwlwwq57a299vp6j7-emacs-snapshot-20150522.9e41e0b/bin/ebrowse
 /gnu/store/7h641zcjppzqxszz9a9ahp64wlv8rhsn-emacs-24.5/bin/ebrowse 
warning: arbitrarily choosing 
/gnu/store/apmjmf4zsrhzvxvjwlwwq57a299vp6j7-emacs-snapshot-20150522.9e41e0b/bin/ebrowse
warning: collision encountered: 
/gnu/store/apmjmf4zsrhzvxvjwlwwq57a299vp6j7-emacs-snapshot-20150522.9e41e0b/bin/.emacsclient-wrap-01
 
/gnu/store/7h641zcjppzqxszz9a9ahp64wlv8rhsn-emacs-24.5/bin/.emacsclient-wrap-01 
warning: arbitrarily choosing 
/gnu/store/apmjmf4zsrhzvxvjwlwwq57a299vp6j7-emacs-snapshot-20150522.9e41e0b/bin/.emacsclient-wrap-01
warning: collision encountered: 
/gnu/store/apmjmf4zsrhzvxvjwlwwq57a299vp6j7-emacs-snapshot-20150522.9e41e0b/bin/emacsclient
 /gnu/store/7h641zcjppzqxszz9a9ahp64wlv8rhsn-emacs-24.5/bin/emacsclient 
warning: arbitrarily choosing 
/gnu/store/apmjmf4zsrhzvxvjwlwwq57a299vp6j7-emacs-snapshot-20150522.9e41e0b/bin/emacsclient

```

-- 




Re: About "collision encountered"

2015-05-22 Thread Ricardo Wurmus

Feng Shu writes:

> I build a emacs-snapshot package, it seem conflict with emacs package,
> how to deal with the situation?

You can choose to install the conflicting package into a separate
profile by passing "-p /path/to/my-other-profile" to "guix package".  It
will create a new profile in "/path/to/my-other-profile" and you can run
your emacs-snapshot binaries like so:

/path/to/my-other-profile/bin/emacs




Re: How can I add a package outside the guix source dir?

2015-05-22 Thread Feng Shu
taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

> Feng Shu  writes:
>
>> I want to add a package which will used by myself, for example:
>>
>> I don't want to put it to guix source dir, How can I solve the problem?
>
> You can set the environment variable GUIX_PACKAGE_PATH to
> e.g. ~/.guix-packages then put that package definition into
> ~/.guix-packages/emacs.scm and it should work.

I set GUIX_PACKAGE_PATH like below:

#+BEGIN_SRC shell
export GUIX_PACKAGE_PATH="/home/feng/project/eh-guix-package/"
export PYTHONPATH="$HOME/.guix-profile/lib/python3.4/site-packages"
export 
GUILE_LOAD_PATH="$GUILE_LOAD_PATH:$HOME/.guix-profile/share/guile/site/2.0/"
export 
GUILE_LOAD_COMPILED_PATH="$GUILE_LOAD_PATH:$HOME/.guix-profile/share/guile/site/2.0/"
#+END_SRC

then add file "/home/feng/project/eh-guix-package/"

#+BEGIN_SRC lisp
(define-module (gnu packages emacs-snapshot)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (gnu packages)
  #:use-module (gnu packages emacs))

(define-public emacs-snapshot
  (package (inherit emacs)
   (name "emacs-snapshot")
   (version "20150522.9e41e0b")
   (source (origin
 (method git-fetch)
 (uri (git-reference
   (url "/home/feng/project/emacs")
   (commit "9e41e0bc6a6fdb7a01841db62d8de42d67be534a")))
 (sha256
  (base32
   
"1p50nrmwnx1d6an7daz8fxkj6ylxml7g23b996ba837nlfz3l8ay"
   (native-inputs
`(("autoconf" ,autoconf)
  ("automake" ,automake)
  ,@(package-native-inputs emacs)))
   (arguments
(substitute-keyword-arguments
`(;; Build fails if we allow parallel build.
  #:parallel-build? #f
;; Tests aren't passing for now.
#:tests? #f
,@(package-arguments emacs))
  ((#:phases phases)
   `(modify-phases ,phases
  (add-after 'unpack 'autogen
 (lambda _
   (zero? (system* "sh" "autogen.sh"))

#+END_SRC

but when I run command, it told me that emacs-snapshot module can't be found.

#+BEGIN_COMMENT
guix build -i emacs-snapshot
#+END_COMMENT


>
> See (info "(guix) Package Modules"),
> i.e. https://gnu.org/s/guix/manual/html_node/Package-Modules.html
>
> Taylan

-- 



Re: About "collision encountered"

2015-05-22 Thread Feng Shu
Ricardo Wurmus  writes:

> Feng Shu writes:
>
>> I build a emacs-snapshot package, it seem conflict with emacs package,
>> how to deal with the situation?
>
> You can choose to install the conflicting package into a separate
> profile by passing "-p /path/to/my-other-profile" to "guix package".  It
> will create a new profile in "/path/to/my-other-profile" and you can run
> your emacs-snapshot binaries like so:
>
> /path/to/my-other-profile/bin/emacs

I suggest add a feature, which can detect the underline conflicts. when
conflicts found, ask user type "yes" or "no".

-- 




Is sha256 optional?

2015-05-22 Thread Feng Shu

Is the below code optional?

#+BEGIN_COMMENT
(sha256 (base32 "XXX"))
#+END_COMMENT

--




Re: How can I add a package outside the guix source dir?

2015-05-22 Thread 宋文武
Feng Shu  writes:

> taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
>
>> Feng Shu  writes:
>>
>>> I want to add a package which will used by myself, for example:
>>>
>>> I don't want to put it to guix source dir, How can I solve the problem?
>>
>> You can set the environment variable GUIX_PACKAGE_PATH to
>> e.g. ~/.guix-packages then put that package definition into
>> ~/.guix-packages/emacs.scm and it should work.
>
> I set GUIX_PACKAGE_PATH like below:
>
> #+BEGIN_SRC shell
> export GUIX_PACKAGE_PATH="/home/feng/project/eh-guix-package/"
> export PYTHONPATH="$HOME/.guix-profile/lib/python3.4/site-packages"
> export 
> GUILE_LOAD_PATH="$GUILE_LOAD_PATH:$HOME/.guix-profile/share/guile/site/2.0/"
> export 
> GUILE_LOAD_COMPILED_PATH="$GUILE_LOAD_PATH:$HOME/.guix-profile/share/guile/site/2.0/"
> #+END_SRC
>
> then add file "/home/feng/project/eh-guix-package/"
>
> #+BEGIN_SRC lisp
> (define-module (gnu packages emacs-snapshot)
You should change this to match the module name and file name.
Suppose, this file is named 'emacs.scm', then it should be:

  (define-module (emacs)

Or put in in a same-level sub-directory of your eh-guix-package,
as .../eh-guix-package/gnu/packages/emacs-snapshot.scm.

>   #:use-module ((guix licenses) #:prefix license:)
>   #:use-module (guix packages)
>   #:use-module (guix download)
>   #:use-module (gnu packages)
>   #:use-module (gnu packages emacs))
>
> (define-public emacs-snapshot
>   (package (inherit emacs)
>(name "emacs-snapshot")
>(version "20150522.9e41e0b")
>(source (origin
>  (method git-fetch)
>  (uri (git-reference
>(url "/home/feng/project/emacs")
>(commit 
> "9e41e0bc6a6fdb7a01841db62d8de42d67be534a")))
>  (sha256
>   (base32
>
> "1p50nrmwnx1d6an7daz8fxkj6ylxml7g23b996ba837nlfz3l8ay"
>(native-inputs
> `(("autoconf" ,autoconf)
>   ("automake" ,automake)
>   ,@(package-native-inputs emacs)))
>(arguments
> (substitute-keyword-arguments
> `(;; Build fails if we allow parallel build.
>   #:parallel-build? #f
> ;; Tests aren't passing for now.
> #:tests? #f
> ,@(package-arguments emacs))
>   ((#:phases phases)
>`(modify-phases ,phases
>   (add-after 'unpack 'autogen
>  (lambda _
>(zero? (system* "sh" "autogen.sh"))
>
> #+END_SRC
>
> but when I run command, it told me that emacs-snapshot module can't be
> found.
>
> #+BEGIN_COMMENT
> guix build -i emacs-snapshot
> #+END_COMMENT
>
>
>>
>> See (info "(guix) Package Modules"),
>> i.e. https://gnu.org/s/guix/manual/html_node/Package-Modules.html
The manual does mention it as (17), but it's not very clear how to do
it right.



Re: Reproducible profiles

2015-05-22 Thread 宋文武
David Thompson  writes:

> 宋文武  writes:
>
>> +1 for return 'manifest', in a same way as 'operating-system'.
>> And how about use specification instead of package, so I can:
>>
>>   (manifest
>> (map package-specification->manifest-entry
>>  '("emacs"
>>"font-adobe-source-han-sans:cn")))
>
> I don't like that idea because the text specification is just a syntax
> for shell users.  In Scheme, we can use the package objects directly
> rather than encode them as strings.
Well, by this way, I don't need to figure out which modules packages
belong to.

It works great, thanks!



Re: [PATCH] gnu: Add adwaita-icon-theme.

2015-05-22 Thread Ludovic Courtès
宋文武  skribis:

> From ff7e16bc8b7e803d49d5ee880f31f3f4e1660d3c Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
> Date: Tue, 19 May 2015 16:32:09 +0800
> Subject: [PATCH 1/2] gnu: gtk+: Add SVG support to 'gtk-encode-symbolic-svg'.
>
> * gnu/packages/gtk.scm (gtk+)[inputs]: Add librsvg.
>   [arguments]: Add 'wrap-gtk-encode-symbolic-svg' phase.

[...]

> +'install 'wrap-gtk-encode-symbolic-svg
> +(lambda* (#:key inputs outputs #:allow-other-keys)
> +  (let* ((out (assoc-ref outputs "out"))
> + (prog (string-append out "/bin/gtk-encode-symbolic-svg"))
> + (librsvg (assoc-ref inputs "librsvg"))
> + (loaders.cache (find-files librsvg "^loaders\\.cache$")))
> +(wrap-program prog
> +  `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache
> +%standard-phases))

Could you add a comment there explaining what’s going on?

So ‘gtk-encode-symbolic-svg’ uses that loader mechanism, which is why it
doesn’t actually support SVG out-of-the-box, even if librsvg is already
an input, right?

This would have to be committed in a gtk-rebuild branch.

> From f9aa59c1aca6e30f217d7d2e1c8ae5c6774b66c0 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
> Date: Tue, 12 May 2015 18:42:37 +0800
> Subject: [PATCH 2/2] gnu: Add adwaita-icon-theme.
>
> * gnu/packages/gnome.scm (adwaita-icon-theme): New variable.

OK!

Thanks,
Ludo’.



Re: [PATCH] Add python-{click,redis,rq}

2015-05-22 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> From c4f765bbf7d92b0c643148ccecfe9fb2ccae193a Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 21 May 2015 16:19:00 +0200
> Subject: [PATCH 1/3] gnu: Add python-click.
>
> * gnu/packages/python.scm (python-click, python2-click): New variables.

LGTM.

> From b94c950e90e42076d554b5c49714d13d15b3c2ab Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 21 May 2015 16:24:05 +0200
> Subject: [PATCH 2/3] gnu: Add python-redis.
>
> * gnu/packages/python.scm (python-redis, python2-redis): New variables.

[...]

> +(synopsis "Redis Python Client")

“client” (lowercase).

LGTM.

> From 20fda76565d1854dca3e7b10fc6083c72df16b02 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Thu, 21 May 2015 16:24:55 +0200
> Subject: [PATCH 3/3] gnu: Add python-rq.
>
> * gnu/packages/python.scm (python-rq, python2-rq): New variables.

OK.

Thanks!

Ludo’.



Re: Add ssd and sawfish-page

2015-05-22 Thread Feng Shu
Andreas Enge  writes:

> Hello,
>
> On Fri, May 22, 2015 at 08:45:30AM +0800, Feng Shu wrote:
>> For Sawfish user, the below two packages are very useful, suggest add to 
>> guix.
>> 1. https://github.com/SawfishWM/ssd> 2. 
>> https://github.com/SawfishWM/sawfish-pager
>
> as Guix is a collaborative project, you are very welcome to try to add them
> yourself! You can copy-paste and modify an existing package, the manual
> provides some help, and I have given a talk on how to package:
>https://www.gnu.org/software/guix/guix-ghm-andreas-20130823.pdfIt is a bit 
> outdated, but might still be helpful. You can also ask for
> help on the mailing list and the irc channel.

I have read the sawfish.scm, its code is very complicate and beyond my
ability. 

>
> Now I would suggest to start with something simple, and am not sure if your
> examples fall into that category...
>
> Andreas

-- 




Re: Initializing a 64bit system using guix on a 32bit OS

2015-05-22 Thread Ludovic Courtès
Alex Kost  skribis:

> Hello, I have Guix installed on a 32-bit "ArchLinux", and I use the
> following command to “deploy” a 64-bit GuixSD:
>
> $ guix system init --no-grub --system=x86_64-linux my-os-config.scm /mnt/guix
>
> However, eventually it fails with the following output:
>
> ...
> downloading `/gnu/store/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe' from 
> `http://hydra.gnu.org/nar/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe' (0.0 MiB 
> installed)...
> http://hydra.gnu.org/nar/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe   0.5 
> KiB transferredkilling process 18626
> guix system: error: build failed: a `x86_64-linux' is required to build 
> `/gnu/store/zckxg5v0pdxb22kyl6jrzawj1wwrfjby-locale.drv', but I am a 
> `i686-linux'

It works as long as there are substitutes available, but some
derivations are not substitutable, as you noticed, and since an i686
host cannot run x86_64 code, you get this error.

> So I'm wondering is there a way to init a 64-bit system from a 32-bit
> one or perhaps it's just not possible?

It actually is possible, but a little bit trickier.  Mark did it a few
weeks ago, though in a slightly different context.  The following should
work:

  1. Install an i686 GuixSD, simply with ‘guix system init’, but use an
 x86_64 kernel.  To do that, you need to explicitly ask for an
 x86_64 kernel and Guix (so that the daemon accepts to build x86_64
 things) in the OS config:

   (define linux-libre-x86_64
 (package (inherit linux-libre)
   (arguments `(#:system "x86_64-linux"
,@(package-arguments linux-libre)

   (define guix-x86_64
 (package (inherit guix)
   (arguments `(#:system "x86_64-linux"
,@(package-arguments guix)

   (define %my-services
 ;; Make sure the ‘guix-daemon’ services uses ‘guix-x86_64’.
 (map (lambda (mservice)
(mlet %store-monad ((service mservice))
  (if (memq 'guix-daemon (service-provision service))
  (guix-daemon #:guix guix-x86_64)
  (return service
  %base-services))

   (operating-system
 ;; ...
 (kernel linux-libre-x86_64)
 (services %my-services))

 Normally you’ll get the x86_64 kernel and Guix from hydra.gnu.org,
 so no problem.  The rest of the user-land will still be 32-bit.

  2. Boot into the new system, and from there run ‘guix system
 reconfigure’ with a cleaned up OS config.

Let us know how it goes!

Ludo’.



Re: Guix Oficial Website

2015-05-22 Thread Ludovic Courtès
Luis Felipe López Acevedo  skribis:

> I think I understand the Scheme side of the website now and I'm able
> to build the HTML using the REPL, so I'd like to give it a try.

Excellent, thank you!

Ludo’.



Re: permission denied: /gnu/store/...guile...

2015-05-22 Thread Ludovic Courtès
rekado  skribis:

>  On Fri, 22 May 2015 05:53:51 +0800 Ludovic Courtès wrote 
>  
>  > Could you try this: 
>  >  
>  > --8<---cut here---start->8--- 
>  > (chdir "/tmp") 
>  > (setgroups #()) 
>  > (setgid 3) 
>  > (setuid 30001) 
>  > (pk 'uid/gid (getuid) (getgid)) 
>  > (pk 'euid/egid (geteuid) (getegid)) 
>  > (let loop ((i 3)) 
>  >   (when (< i 1024) 
>  > (false-if-exception (close-fdes i)) 
>  > (loop (+ 1 i 
>  > (execl 
> "/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile" "guile" 
>  >"-c" "(pk 'running (getuid) (geteuid))") 
>  > --8<---cut here---end--->8--- 
>  >  
>  > and then as root run: 
>  >  
>  >   # guile the-above-file.scm 
>  >  
>  > It should return zero and print: 
>  >  
>  > --8<---cut here---start->8--- 
>  > ;;; (uid/gid 30001 3) 
>  >  
>  > ;;; (euid/egid 30001 3) 
>  >  
>  > ;;; (running 30001 30001) 
>  > --8<---cut here---end--->8--- 
>
> I ran it in a guile REPL (as root) and I got the first two outputs, but an 
> error on (execl ...).  It's an unhelpful message:
>
> ERROR: In procedure execl:
> ERROR: In procedure execl: Permission denied

Great, that means that we have a reduced test case now!

Now, could you try to comment out some of the lines before the ‘execl’
until you find which one is responsible for that?

IIRC you said that
"/gnu/store/cnqmkmj40jmssnx6fkf9n0n3bqj5x426-guile-2.0.11/bin/guile" is
555, so normally every user on the machine can run it.  It can only
imagine an obscure kernel or file system setting that would somehow
prevent execution, but we’ll see.

Thank you,
Ludo’.



Re: Daemon update

2015-05-22 Thread Ludovic Courtès
Alexander Vorobiev  skribis:

> Doesn't binary distribution have hardcoded /gnu/* paths?

Yes it does.

> I can't use those unfortunately. We have a standard configuration of
> RHEL 6.5 installed on hundreds of servers and any modifications of the
> root directory (and all other "standard" directories) layout are out
> of question.

OK.  Note that using a store other than /gnu/store prevents you from
using substitutes from hydra.gnu.org (just mentioning it if that is of
interest to you.)

> Would it be too hard to add an environment variable(s) pointing to a
> Guix's store and cache directories so that the binary build of the
> daemon doesn't depend on the hardcoded values?  Thanks, Alex

There are two issues here:

  1. File names hard-coded in the RUNPATH and other places of the
 ‘guix-daemon’ binary of the tarball.

  2. The store directory that ‘guix-daemon’ targets.

#2 can actually be changed at run-time via the (purposefully
undocumented) ‘NIX_STORE_DIR’ environment variable (see ‘test-env.in’ in
the source tree.)

#1 means that if you want to run the ‘guix-daemon’ binary from the
binary tarball, you’ll have to somehow satisfy its requirements.  You
might be able to unpack the tarball in an arbitrary directory, and then
define ‘LD_LIBRARY_PATH’ so that ‘guix-daemon’ finds all the .so files
that it needs and are provided by the binary tarball (libstdc++.so,
libgcrypt.so, libsqlite3.so, libc.so, etc.)

Once ‘guix-daemon’ is running, you could run ‘guix environment guix’,
and from there you could build Guix from source.

But that is really hacky, and perhaps not particularly easier than
building a newer GCC on your machine.

Alternately, you could build a suitable binary tarball on another
machine: just install and configure Guix with the options that you need,
and run ‘make guix-binary.x86_64-linux.tar.xz’.

WDYT?

Ludo’.



Re: About "collision encountered"

2015-05-22 Thread David Thompson
Feng Shu  writes:

> Ricardo Wurmus  writes:
>
>> Feng Shu writes:
>>
>>> I build a emacs-snapshot package, it seem conflict with emacs package,
>>> how to deal with the situation?
>>
>> You can choose to install the conflicting package into a separate
>> profile by passing "-p /path/to/my-other-profile" to "guix package".  It
>> will create a new profile in "/path/to/my-other-profile" and you can run
>> your emacs-snapshot binaries like so:
>>
>> /path/to/my-other-profile/bin/emacs
>
> I suggest add a feature, which can detect the underline conflicts. when
> conflicts found, ask user type "yes" or "no".

We can't do that, as it would be non-deterministic.  If you want to use
2 versions of the same package, an additional profile is the right way
to go.  This is why we have profiles in the first place. :)

-- 
David Thompson
GPG Key: 0FF1D807



Re: [PATCH 02/10] gnu: base: Fix a bug that occurs in non-Linux systems.

2015-05-22 Thread Ludovic Courtès
Manolis Ragkousis  skribis:

> Ok to push this patch to wip-hurd? As this is something that doesn't
> affect Linux,
> there is no need to push it to core-updates.

I think the policy should be to push anything that is not Hurd-specific
to core-updates (or master, whichever is appropriate.)

This patch happens to fix something on GNU/Hurd, but it has no effect on
GNU/Linux, so I would suggest pushing it to core-updates.

WDYT?

> From 6de900b0cf21af361c3b5910b339ecab8ded5e4b Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis 
> Date: Thu, 21 May 2015 16:47:26 +0300
> Subject: [PATCH 1/5] gnu: base: Fix a bug that occurs in non-Linux systems.
>
> * gnu/packages/base.scm (tar): Apply patch.
> * gnu/packages/patches/tar-d_ino_in_dirent-fix.patch: New file.
> * gnu-system.am (dist_patch_DATA): Add it.

[...]

> +++ b/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch
> @@ -0,0 +1,46 @@
> +commit e9ddc08da0982f36581ae5a8c7763453ff41cfe8
> +Author: Sergey Poznyakoff 
> +Date:   Thu Sep 25 00:22:16 2014 +0300
> +
> +Bugfixes.
> +
> +* doc/tar.1: Fix typo in font spec.
> +* src/tar.c (sort_mode_arg, sort_mode_flag): Protect "inode"
> +(SAVEDIR_SORT_INODE) with D_INO_IN_DIRENT
> +
> +diff --git a/doc/tar.1 b/doc/tar.1
> +index 9000627..b91de63 100644
> +--- a/doc/tar.1
>  b/doc/tar.1
> +@@ -879,7 +879,7 @@ Exclude files matching patterns listed in FILE.
> + \fB\-\-strip\-components\fR=\fINUMBER\fR
> + Strip \fINUMBER\fR leading components from file names on extraction.
> + .TP
> +-\fB\-\-transform\fR=\fIEXPRESSION\dR, \fB\-\-xform\fR=\fIEXPRESSION\fR
> ++\fB\-\-transform\fR=\fIEXPRESSION\fR, \fB\-\-xform\fR=\fIEXPRESSION\fR
> + Use sed replace \fIEXPRESSION\fR to transform file names.
> + .SS File name matching options
> + These options affect both exclude and include patterns.
> +diff --git a/src/tar.c b/src/tar.c
> +index 225c624..f8102e0 100644

Could you just remove the doc/tar.1 part of the patch since it’s
unrelated and unneeded?

OK to push to core-updates with this change.

Thank you!

Ludo’.



Re: How can I add a package outside the guix source dir?

2015-05-22 Thread Ludovic Courtès
宋文武  skribis:

> Feng Shu  writes:
>
>> taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

[...]

>>> See (info "(guix) Package Modules"),
>>> i.e. https://gnu.org/s/guix/manual/html_node/Package-Modules.html
> The manual does mention it as (17), but it's not very clear how to do
> it right.

I have pushed a clarification.

Thanks for your feedback,
Ludo’.

--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6154,11 +6154,15 @@ facility is implemented in the @code{(gnu packages)} module.
 @cindex package module search path
 Users can store package definitions in modules with different
 names---e.g., @code{(my-packages emacs)}@footnote{Note that the file
-name and module name must match.  @xref{Modules and the File System,,,
-guile, GNU Guile Reference Manual}, for details.}  These package definitions
+name and module name must match.  For instance, the @code{(my-packages
+emacs)} module must be stored in a @file{my-packages/emacs.scm} file
+relative to the load path specified with @option{--load-path} or
+@code{GUIX_PACKAGE_PATH}.  @xref{Modules and the File System,,,
+guile, GNU Guile Reference Manual}, for details.}.  These package definitions
 will not be visible by default.  Thus, users can invoke commands such as
 @command{guix package} and @command{guix build} have to be used with the
-@code{-e} option so that they know where to find the package, or use the
+@code{-e} option so that they know where to find the package.  Better
+yet, they can use the
 @code{-L} option of these commands to make those modules visible
 (@pxref{Invoking guix build, @code{--load-path}}), or define the
 @code{GUIX_PACKAGE_PATH} environment variable.  This environment


Re: Is sha256 optional?

2015-05-22 Thread Ludovic Courtès
Feng Shu  skribis:

> Is the below code optional?
>
> #+BEGIN_COMMENT
> (sha256 (base32 "XXX"))
> #+END_COMMENT

No it’s not.

Because Guix is about reproducibility, package recipes must specify the
exact source code that they expect, hence this ‘sha256’ field.

That said, if you want to simply use a different source code tarball
without bothering, you can do:

  guix build emacs --with-source=./emacs-24.5.xyz.tar.gz

(info "(guix) Invoking guix build")

HTH,
Ludo’.



Re: Guix "ops"

2015-05-22 Thread David Thompson
Hello again Carlos,

Carlos Sosa  writes:

>   I like the idea of 'guix deploy', and maybe something to propagates
>   given configuration files, like 'guix config prepare' and later 'guix
>   config apply'.
>
> Now, how can I contribute? work the guix command?
>
> Let me know if you have a specific repository or place to find any work
> done on this.

I have just pushed a new branch called "wip-deploy" to the official guix
repository.  Since this branch is prefixed with "wip-", expect it to be
rebased frequently.  There's not much code here yet, but a very simple
prototype has been implemented that supports the creation of local QEMU
VMs.

To take it for a spin, add something like this to a file, let's call it
"deployment.scm":

(use-modules (gnu) (guix gexp))
(use-service-modules databases)
(use-package-modules web databases)

(define dummy-fs
  (file-system
(mount-point "/")
(device "dummy")
(type "dummy")))

(define grub
  (grub-configuration (device "/dev/sda")))

(define timezone "America/New_York")
(define locale "en_US.UTF-8")

;; TODO: Needs nginx-service.
(define web-server
  (machine
   (name "web-server")
   (system (operating-system
 (host-name "web-server")
 (timezone timezone)
 (locale locale)
 (bootloader grub)
 (file-systems
  (list dummy-fs %binary-format-file-system))
 (packages
  (cons nginx %base-packages
   (platform (local-vm #:ip-address "10.0.2.10"

(define db-server
  (machine
   (name "db-server")
   (system (operating-system
 (host-name "db-server")
 (timezone timezone)
 (locale locale)
 (bootloader grub)
 (file-systems
  (list dummy-fs %binary-format-file-system))
 (services
  (cons (postgresql-service)
%base-services))
 (packages (cons postgresql %base-packages
   (platform (local-vm #:ip-address "10.0.2.11"

(deployment
 (name "test-deployment")
 (machines (list web-server db-server)))

Then run the following from your git checkout:

./pre-inst-env guix deploy spawn /path/to/deployment.scm

One caveat: Make sure the file name uses an absolute path for now.  I
haven't cleaned up the code enough to deal with relative file names.

If the command is successful, you will see 2 QEMU windows open up, one
for the web server and one for the database server.  Pretty neat, eh? :)

Now, there's still much work to be done.  Spawning local, temporary VMs
has gotten me over some initial hurdles, but now we need to write a
platform adapter for something more serious so that we can determine the
requirements for "real world" deployment scenarios.  Perhaps we should
look into writing an OpenStack adapter.

There's also unanswered questions like: How should we keep track of
state?  How do we reconfigure already deployed machines?  How do we shut
down a deployment and unprovision the resources it used?  Basically, how
many hooks does the  record type need to cover everything?

Thoughts and help very much wanted!

-- 
David Thompson
GPG Key: 0FF1D807



RFC: building numpy against OpenBLAS.

2015-05-22 Thread Ricardo Wurmus
Hi Guix,

python-numpy currently depends on Atlas, which means that it cannot be
substituted with a binary built elsewhere.  OpenBLAS is an alternative
to Atlas and the binary can be used on all supported CPUs at runtime.
This makes it possible for us to make numpy substitutable.

We currently do not have a working OpenBLAS on MIPS, so the attached
patch selects OpenBLAS as an input only when not on MIPS.  Some
additional configuration happens only unless "atlas" is among the
inputs.

I have successfully compiled numpy and python-scikit-image for both
versions of Python on x86_64 with these changes.  I should say, however,
that there's a note in the numpy sources that warns about a bug under
certain conditions:

# **Warning**: OpenBLAS, by default, is built in multithreaded mode. Due to 
the
# way Python's multiprocessing is implemented, a multithreaded OpenBLAS can
# cause programs using both to hang as soon as a worker process is forked on
# POSIX systems (Linux, Mac).
# This is fixed in Openblas 0.2.9 for the pthread build, the OpenMP build 
using
# GNU openmp is as of gcc-4.9 not fixed yet.
# Python 3.4 will introduce a new feature in multiprocessing, called the
# "forkserver", which solves this problem. For older versions, make sure
# OpenBLAS is built using pthreads or use Python threads instead of
# multiprocessing.
# (This problem does not exist with multithreaded ATLAS.)

I do not know if this is still a problem and I haven't yet tried to
reproduce this.  Our OpenBLAS is not built with openmp, so I think this
problem does not affect us.

Anyway, I just wanted to post this here to ask for opinions.  Maybe this
is a bad idea.  (In my case it makes sense not to use Atlas, because the
compile-time tuning is useless when a shared store is used and clients
use Atlas on machines other than the build host.)

Comments are very welcome!

~~ Ricardo

>From 4b56608674a9c7977cad88ce3f03a9fcb72c93bc Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Fri, 22 May 2015 16:48:05 +0200
Subject: [PATCH] gnu: python-numpy: Build against OpenBLAS.

* gnu/packages/python.scm (python-numpy)[inputs]: Use "openblas" instead of
  "atlas" when not on MIPS.
* gnu/packages/python.scm (python-numpy)[arguments]: Configure build against
  OpenBLAS unless "atlas" is among the inputs.
---
 gnu/packages/python.scm | 38 --
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0916a75..c96296f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2283,7 +2283,9 @@ writing C extensions for Python as easy as Python itself.")
 (build-system python-build-system)
 (inputs
  `(("python-nose" ,python-nose)
-   ("atlas" ,atlas)))
+   ,(if (string-prefix? "mips" (%current-system))
+`("atlas" ,atlas)
+`("openblas" ,openblas
 (native-inputs
  `(("gfortran" ,gfortran-4.8)))
 (arguments
@@ -2291,16 +2293,32 @@ writing C extensions for Python as easy as Python itself.")
(alist-cons-before
 'build 'set-environment-variables
 (lambda* (#:key inputs #:allow-other-keys)
-  (let* ((atlas-threaded
-  (string-append (assoc-ref inputs "atlas")
- "/lib/libtatlas.so"))
- ;; On single core CPUs only the serial library is created.
- (atlas-lib
-  (if (file-exists? atlas-threaded)
-  atlas-threaded
+  (if (assoc-ref inputs "atlas")
+  ;; Link against Atlas
+  (let* ((atlas-threaded
   (string-append (assoc-ref inputs "atlas")
- "/lib/libsatlas.so"
-(setenv "ATLAS" atlas-lib)))
+ "/lib/libtatlas.so"))
+ ;; On single core CPUs only the serial library is created.
+ (atlas-lib
+  (if (file-exists? atlas-threaded)
+  atlas-threaded
+  (string-append (assoc-ref inputs "atlas")
+ "/lib/libsatlas.so"
+(setenv "ATLAS" atlas-lib))
+  ;; Link against OpenBLAS
+  (begin
+(call-with-output-file "site.cfg"
+  (lambda (port)
+(format port "[openblas]
+libraries = openblas
+library_dirs = ~a/lib
+include_dirs = ~a/include
+" (assoc-ref inputs "openblas") (assoc-ref inputs "openblas"
+;; Use "gcc" executable, not "cc".
+(substitute* "numpy/distutils/system_info.py"
+  (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
+   "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"
+   

Re: Is it possible add 'Guix package manager without "make install"' to guix doc?

2015-05-22 Thread Christopher Allan Webber
Feng Shu writes:

> Christopher Allan Webber's blog: Guix package manager without "make install"
>
>
> http://dustycloud.org/blog/guix-package-manager-without-make-install/
>
> seem very useful, is it possible add to guix doc?
>
> Thanks!

I'd have no problems adding it to the doc and licensing it as GFDL
appropriately if people think it would be useful.

It has been referenced a lot on IRC lately, it seems.

However I'm not sure the way it's written currently could be directly
dumped into the documentation.  It seems to need adjustments, though I'm
not sure exactly how it could be adjusted.

 - Chris



Re: Guix "ops"

2015-05-22 Thread Ludovic Courtès
David Thompson  skribis:

> To take it for a spin, add something like this to a file, let's call it
> "deployment.scm":
>
> (use-modules (gnu) (guix gexp))
> (use-service-modules databases)
> (use-package-modules web databases)
> 
> (define dummy-fs
>   (file-system
> (mount-point "/")
> (device "dummy")
> (type "dummy")))
> 
> (define grub
>   (grub-configuration (device "/dev/sda")))
> 
> (define timezone "America/New_York")
> (define locale "en_US.UTF-8")
> 
> ;; TODO: Needs nginx-service.
> (define web-server
>   (machine
>(name "web-server")
>(system (operating-system
>  (host-name "web-server")
>  (timezone timezone)
>  (locale locale)
>  (bootloader grub)
>  (file-systems
>   (list dummy-fs %binary-format-file-system))
>  (packages
>   (cons nginx %base-packages
>(platform (local-vm #:ip-address "10.0.2.10"
> 
> (define db-server
>   (machine
>(name "db-server")
>(system (operating-system
>  (host-name "db-server")
>  (timezone timezone)
>  (locale locale)
>  (bootloader grub)
>  (file-systems
>   (list dummy-fs %binary-format-file-system))
>  (services
>   (cons (postgresql-service)
> %base-services))
>  (packages (cons postgresql %base-packages
>(platform (local-vm #:ip-address "10.0.2.11"
> 
> (deployment
>  (name "test-deployment")
>  (machines (list web-server db-server)))
> 
> Then run the following from your git checkout:
>
> ./pre-inst-env guix deploy spawn /path/to/deployment.scm

Woow, that’s very nice.  The declarations are straightforward and
immediately understandable, I think, which is cool.

Perhaps one addition eventually would be to allow IPs to be
automatically allocated and have host name lookup DTRT in each VM.

> Now, there's still much work to be done.  Spawning local, temporary VMs
> has gotten me over some initial hurdles, but now we need to write a
> platform adapter for something more serious so that we can determine the
> requirements for "real world" deployment scenarios.  Perhaps we should
> look into writing an OpenStack adapter.

As discussed on IRC, I was unsure about OpenStack, but I’ll trust your
judgment.  Maybe Cyril can comment?

Thanks,
Ludo’.



Re: Guix "ops"

2015-05-22 Thread David Thompson
Ludovic Courtès  writes:

> Perhaps one addition eventually would be to allow IPs to be
> automatically allocated and have host name lookup DTRT in each VM.

Do you have any idea how we could do that for local VMs?  There's no
daemon managing the provision of these resources, so I don't know what
strategy can be used to automatically allocate static IPs.

The automagic hostname lookup part is particularly interesting to me.  A
more complete deployment configuration would have the web server
dependent on the db server.  I originally intended to handle this by
delaying the creation of the web server until after the db server was
made, and invoking a procedure that accepted the db server's state as
input and output the correct configuration for the web server.

Thinking out loud here: Maybe 'guix deploy' can kick off the
provisioning for all machines first, and afterwards the OS configs can
be altered to include the correct /etc/hosts file.

> As discussed on IRC, I was unsure about OpenStack, but I’ll trust your
> judgment.  Maybe Cyril can comment?

I threw out OpenStack because it's a self-hostable, free software VM
platform.  I'm open to any other platforms that will exercise the full
range of capabilities that 'guix deploy' needs to be useful.

-- 
David Thompson
GPG Key: 0FF1D807



Re: Is it possible add 'Guix package manager without "make install"' to guix doc?

2015-05-22 Thread Ludovic Courtès
Christopher Allan Webber  skribis:

> Feng Shu writes:
>
>> Christopher Allan Webber's blog: Guix package manager without "make install"
>>
>>
>> http://dustycloud.org/blog/guix-package-manager-without-make-install/
>>
>> seem very useful, is it possible add to guix doc?
>>
>> Thanks!
>
> I'd have no problems adding it to the doc and licensing it as GFDL
> appropriately if people think it would be useful.
>
> It has been referenced a lot on IRC lately, it seems.
>
> However I'm not sure the way it's written currently could be directly
> dumped into the documentation.  It seems to need adjustments, though I'm
> not sure exactly how it could be adjusted.

What I would like is to have a “Guix Development” section in the manual,
along the lines of “Running Guix before it is installed” in ‘HACKING’,
but marked as a developer’s trick.

I do not feel like explicitly inviting users to do “alias
guix=~/guix/pre-inst-env guix”, though, because that seems a bit hacky.
;-)

WDYT?

For the Emacs part, I think setting ‘load-path’,
‘geiser-guile-load-path’, and ‘guix-load-path’ would be enough.  Maybe
that part of the doc needs to be adjusted?

Thanks,
Ludo’.



Re: Initializing a 64bit system using guix on a 32bit OS

2015-05-22 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes:

> Alex Kost  skribis:
>
>> Hello, I have Guix installed on a 32-bit "ArchLinux", and I use the
>> following command to “deploy” a 64-bit GuixSD:
>>
>> $ guix system init --no-grub --system=x86_64-linux my-os-config.scm /mnt/guix
>>
>> However, eventually it fails with the following output:
>>
>> ...
>> downloading `/gnu/store/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe'
>> from
>> `http://hydra.gnu.org/nar/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe'
>> (0.0 MiB installed)...
>> http://hydra.gnu.org/nar/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe  0.5 
>> KiB transferredkilling process 18626
>> guix system: error: build failed: a `x86_64-linux' is required to build 
>> `/gnu/store/zckxg5v0pdxb22kyl6jrzawj1wwrfjby-locale.drv', but I am a 
>> `i686-linux'
>
> It works as long as there are substitutes available, but some
> derivations are not substitutable, as you noticed, and since an i686
> host cannot run x86_64 code, you get this error.
>
>> So I'm wondering is there a way to init a 64-bit system from a 32-bit
>> one or perhaps it's just not possible?
>
> It actually is possible, but a little bit trickier.  Mark did it a few
> weeks ago, though in a slightly different context.  The following should
> work:
>
>   1. Install an i686 GuixSD, simply with ‘guix system init’, but use an
>  x86_64 kernel.  To do that, you need to explicitly ask for an
>  x86_64 kernel and Guix (so that the daemon accepts to build x86_64
>  things) in the OS config:
>
>(define linux-libre-x86_64
>  (package (inherit linux-libre)
>(arguments `(#:system "x86_64-linux"
> ,@(package-arguments linux-libre)

I think this is not sufficient, because it would still use the kernel
config for i686.  Here's what I used for the kernel:

>From 1f6f6c9cfecfc5bf72bdfc97caf7247090c0e1f3 Mon Sep 17 00:00:00 2001
From: Mark H Weaver 
Date: Mon, 20 Apr 2015 23:51:45 -0400
Subject: [PATCH] LOCAL_ONLY: gnu: Add linux-libre-64.

---
 gnu/packages/linux.scm | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 26e9aa9..c42919d 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -64,6 +64,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module ((guix build utils) #:select (alist-replace))
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match))
 
@@ -308,6 +309,15 @@ It has been modified to remove all non-free binary blobs.")
 (license gpl2)
 (home-page "http://www.gnu.org/software/linux-libre/";
 
+(define linux-libre-64
+  (package (inherit linux-libre)
+(arguments
+ `(#:system "x86_64-linux"
+   ,@(package-arguments linux-libre)))
+(native-inputs
+ (alist-replace "kconfig" (list (kernel-config "x86_64-linux"))
+(package-native-inputs linux-libre)
+
 
 ;;;
 ;;; Pluggable authentication modules (PAM).
-- 
2.2.1


Mark


About webkitgtk head file path.

2015-05-22 Thread Feng Shu

I want to build emacs xwidget branch, which require webkitgtk-2.4.
the problem is:


webkitgtk-2.4 package put head files to:

 
/gnu/store/dl8z49pzl3l7wbh2q0hp7dxdxm40vjjj-webkitgtk-2.4.8/include/webkitgtk-1.0/webkit

while xwidget.c include webkit head file like below.

can't find the head files and build fail. how to deal with this problem.

#+BEGIN_COMMENT
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#+END_COMMENT




-- 




Re: Is it possible add 'Guix package manager without "make install"' to guix doc?

2015-05-22 Thread Christopher Allan Webber
Ludovic Courtès writes:

> Christopher Allan Webber  skribis:
>
>> Feng Shu writes:
>>
>>> Christopher Allan Webber's blog: Guix package manager without "make install"
>>>
>>>
>>> http://dustycloud.org/blog/guix-package-manager-without-make-install/
>>>
>>> seem very useful, is it possible add to guix doc?
>>>
>>> Thanks!
>>
>> I'd have no problems adding it to the doc and licensing it as GFDL
>> appropriately if people think it would be useful.
>>
>> It has been referenced a lot on IRC lately, it seems.
>>
>> However I'm not sure the way it's written currently could be directly
>> dumped into the documentation.  It seems to need adjustments, though I'm
>> not sure exactly how it could be adjusted.
>
> What I would like is to have a “Guix Development” section in the manual,
> along the lines of “Running Guix before it is installed” in ‘HACKING’,
> but marked as a developer’s trick.

That sounds like a good idea.

> I do not feel like explicitly inviting users to do “alias
> guix=~/guix/pre-inst-env guix”, though, because that seems a bit hacky.
> ;-)
>
> WDYT?

Do you have an alternative suggestion so that running guix easily in
bash is possible?  Per my current blogpost, this alias is only set up
after running guix-enable.  I agree it's not ideal, and am open to alternatives.

> For the Emacs part, I think setting ‘load-path’,
> ‘geiser-guile-load-path’, and ‘guix-load-path’ would be enough.  Maybe
> that part of the doc needs to be adjusted?

Does that work?  I originally had some different settings but I found
that the right things did not seem to be on the path from the guile
being launched.  Originally I set environment variables from within
emacs (yikes!) so using the pre-install-env version was a
simplification.

Does anyone have an alternative .emacs setup they've tested without a
"make install" that they know works?



Re: About webkitgtk head file path.

2015-05-22 Thread David Thompson
Feng Shu  writes:

> I want to build emacs xwidget branch, which require webkitgtk-2.4.
> the problem is:
>
>
> webkitgtk-2.4 package put head files to:
>
>  
> /gnu/store/dl8z49pzl3l7wbh2q0hp7dxdxm40vjjj-webkitgtk-2.4.8/include/webkitgtk-1.0/webkit
>
> while xwidget.c include webkit head file like below.
>
> can't find the head files and build fail. how to deal with this problem.
>
> #+BEGIN_COMMENT
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> #+END_COMMENT

The build system should be configured such that 'gcc' is run with
a flag like:

-I 
/gnu/store/dl8z49pzl3l7wbh2q0hp7dxdxm40vjjj-webkitgtk-2.4.8/include/webkitgtk-1.0

I'm surprised this isn't the case by default.  Perhaps there's a
configure flag needed to point the build system towards the right prefix
for webkitgtk?

-- 
David Thompson
GPG Key: 0FF1D807



Re: Xfce halt permission

2015-05-22 Thread Daniel Pimentel

On 2015-05-22 05:24, Alex Kost wrote:

Daniel Pimentel (2015-05-22 03:13 +0300) wrote:


Hi Guix, I'd like to add halt permission to normal user in XFCE
session. The halt binary is in system profile:
/run/current-system/profile/sbin/halt
How to add halt binary to my normal user?


As for me, I put the following into "/etc/sudoers" (but not directly –
there is ‘sudoers’ field in ‘operating-system’ declaration):

--8<---cut here---start->8---
Cmnd_Alias HALT = /run/current-system/profile/sbin/reboot, \
  /run/current-system/profile/sbin/halt
 =NOPASSWD: HALT
--8<---cut here---end--->8---

Also I have the following shell aliases (in my ~/.bashrc):

--8<---cut here---start->8---
alias reboot='sudo reboot'
alias halt='sudo halt'
--8<---cut here---end--->8---

After that I can use "halt" and "reboot" as a user (without promting 
for

a password).  I hope it helps.

It's work.

I used it, but I would like to add halt and reboot permission to XFCE.

Thanks.
--
Daniel Pimentel (d4n1)
GnuPG (0B1A1914)
FSF (13054)



Re: permission denied: /gnu/store/...guile...

2015-05-22 Thread Mark H Weaver
The problem turned out to be that on rekado's system, / was owned by
user "rekado" with mode 700.

Mark



Re: permission denied: /gnu/store/...guile...

2015-05-22 Thread Mark H Weaver
Mark H Weaver  writes:

> The problem turned out to be that on rekado's system, / was owned by
> user "rekado" with mode 700.

One possibility is that he created this filesystem from some nice GUI
disk utility from Fedora, before running our USB installer.

Perhaps 'guix system init' should explicitly set the ownership and
permissions on the target root directory?

 Mark



Re: RFC: building numpy against OpenBLAS.

2015-05-22 Thread Eric Bavier

- Ricardo Wurmus  wrote:
> python-numpy currently depends on Atlas, which means that it cannot be
> substituted with a binary built elsewhere.  OpenBLAS is an alternative
> to Atlas and the binary can be used on all supported CPUs at runtime.
> This makes it possible for us to make numpy substitutable.
[...]
> Anyway, I just wanted to post this here to ask for opinions.  Maybe this
> is a bad idea.  (In my case it makes sense not to use Atlas, because the
> compile-time tuning is useless when a shared store is used and clients
> use Atlas on machines other than the build host.)
> 

I would very much like to see OpenBLAS substituted for atlas whereever 
possible.  The runtime performance of OpenBLAS is quite a bit better than 
ATLAS.  I've seen e.g. OpenBLAS to be roughly 20% faster than ATLAS for GEMM 
calls on Sandybridge platforms.

`~Eric




Re: [PATCH] gnu: Add adwaita-icon-theme.

2015-05-22 Thread 宋文武
Ludovic Courtès  writes:

> 宋文武  skribis:
>
>> From ff7e16bc8b7e803d49d5ee880f31f3f4e1660d3c Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
>> Date: Tue, 19 May 2015 16:32:09 +0800
>> Subject: [PATCH 1/2] gnu: gtk+: Add SVG support to 'gtk-encode-symbolic-svg'.
>>
>> * gnu/packages/gtk.scm (gtk+)[inputs]: Add librsvg.
>>   [arguments]: Add 'wrap-gtk-encode-symbolic-svg' phase.
>
> [...]
>
>> +'install 'wrap-gtk-encode-symbolic-svg
>> +(lambda* (#:key inputs outputs #:allow-other-keys)
>> +  (let* ((out (assoc-ref outputs "out"))
>> + (prog (string-append out "/bin/gtk-encode-symbolic-svg"))
>> + (librsvg (assoc-ref inputs "librsvg"))
>> + (loaders.cache (find-files librsvg "^loaders\\.cache$")))
>> +(wrap-program prog
>> +  `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache
>> +%standard-phases))
>
> Could you add a comment there explaining what’s going on?
OK.
>
> So ‘gtk-encode-symbolic-svg’ uses that loader mechanism, which is why it
> doesn’t actually support SVG out-of-the-box, even if librsvg is already
> an input, right?
Yes.
>
> This would have to be committed in a gtk-rebuild branch.
Done.

Thanks for review!



Re: [PATCH] gnu: Add adwaita-icon-theme.

2015-05-22 Thread Mark H Weaver
宋文武  writes:

> Ludovic Courtès  writes:
>> This would have to be committed in a gtk-rebuild branch.
> Done.

I added the gnutls update to that branch and started Hydra building it.

 Mark