Re: missing input and more

2015-02-05 Thread 宋文武
2015-02-05 15:05 GMT+08:00  :
> Hi Guix,
>
> during my packaging attempts of connman (which looks good so far) I
> found that gnutls is missing "install-time" dependency - zlib.
>
> 1] ldd shows run-time dependency:
> $ ldd
> /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so |
> grep libz
>libz.so.1 =>
> /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1
> (0x7fe4fac9)
>
> 2] pkg-config rants about not filled dependencies when building against
> gnutls
>
> In
> /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/pkgconfig/gnutls.pc
> you can see
>
> Libs.private: -lz-lgmp
> Requires.private: nettle, hogweed, libtasn1, zlib
>
>
> That is something which should be solved by "propagate-input"?
Yes, zlib should be a propagate-input of gnutls.
>
> Both dependency requirements types are quite easy to detect. I'm not
> sure if they shouldn't be done in package build
> (maintaining mapping for pkg-config *.pc --> package)
>
> or we should just invest time into package validation afterwards.
>
> WDYT?
>
> S_W



Re: Helping programs find their icons

2015-02-05 Thread Andreas Enge
Would it not help to add hicolor-icon-theme as a propagated input to
some packages? Or maybe add it as a propagated input inside
glib-or-gtk-build-system if that is possible?

Andreas




Re: [PATCH] gnu: gnutls: Configure location of system-wide trust store

2015-02-05 Thread Andreas Enge
Hello Mark,

On Wed, Feb 04, 2015 at 10:35:57AM -0500, Mark H Weaver wrote:
> Since GnuTLS updates require so much rebuilding, I would prefer to wait
> for Hydra to finish the rebuild of intel platforms on another branch
> before merging into master.

I just cherry-picked the new gnutls into master.

Could you push your updated patch to wip-gnutls? It is currently just
a copy of master. We can cherry-pick it back once hydra has finished
rebuilding.

Andreas




Re: missing input and more

2015-02-05 Thread Andreas Enge
On Thu, Feb 05, 2015 at 08:05:03AM +0100, sleep_wal...@suse.cz wrote:
> 1] ldd shows run-time dependency:
> $ ldd 
> /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so | 
> grep libz
>libz.so.1 => 
> /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1 
> (0x7fe4fac9)

That is fine - so there is a dependency, but our rpath recoding handles it.
So far, there is no need for zlib as a propagated input - we do not need to
install it into the user profile when installing gnutls.

> Libs.private: -lz-lgmp
> Requires.private: nettle, hogweed, libtasn1, zlib

Reading up the documentation of pkg-config:
"Requires and Requires.private define other modules needed by the library.
It is usually preferred to use the private variant of Requires to avoid
exposing unnecessary libraries to the program that is linking with your
library. If the program will not be using the symbols of the required library,
it should not be linking directly to that library."

So as I understand this, there is no need to propagate the zlib input.

Or am I getting it wrong?

Andreas




issues with offloading

2015-02-05 Thread Ricardo Wurmus
Hi Guix,

I'm trying to set up offloading such that I can have a powerful build
host compile stuff for me when my workstation isn't strong enough.  I
bumped into a couple of issues while doing this, prompting me to write
this email to discuss what might be changed to improve this.

* lsh required

  The manual does not appear to mention that for offloading lsh is
  expected to be installed on the submitting host.  Since I only had
  OpenSSH installed (on the local workstation and the remote server) I
  decided to redefine %lsh-command and %lshg-command:

(define %lsh-command "ssh")
(define %lshg-command "ssh")

  When the command in these variables does not exist there is no error
  message at all.  I only discovered the issue because machine-load
  returned +inf.0 for every machine in the list (defined in
  /etc/guix/machines.scm) and looped indefinitely to find a suitable
  machine.

  Here are some recommendations:

  - make %lsh-command and %lshg-command configurable or mention in the
documentation that lsh must be available in the PATH.

  - print an error message when "remote-pipe" fails due to not finding
the command specified in %lsh-command / %lshg-command

  - only run once over the machines given in /etc/guix/machines.scm
instead of looping indefinitely, or alternatively print the reason
for skipping a machine (e.g. by stating that machine-load is +inf.0)

* does not work with unpriviledged user

  I assumed that all I needed was an SSH key for an unprivileged user on
  the remote machine in order to log on to the remote build host and
  talk to the local guix-daemon there.  However, we actually run Guile
  scripts on the remote instead of letting the privileged daemon perform
  known-to-be-safe commands.

  This is a problem with register-gc-root, for example.  It creates a
  directory in %state-directory where an unprivileged user likely has no
  write permissions.  This mkdir fails silently because register-gc-root
  does not bother checking the result of

(false-if-exception (mkdir root-directory))

  When the root-directory (e.g. /var/guix/gcroots/tmp) cannot be created
  by the remote user running the guile script, the following (symlink
  ...) fails.

  Recommendations:

  - instead of sending a script to be executed by a remote Guile process
running as the unprivileged SSH user it may make sense to bake this
feature into the daemon.  The daemon has permissions on
%state-directory anyway, while a regular user probably shouldn't.

  - check the return value of (false-if-exception (mkdir
root-directory)), or do not use false-if-exception at all to fail
right there when the directory should be created rather than failing
when the symlink to a non-existing directory cannot be created.
This would arguably result in a clearer error message.

This is as far as I got.  What do you think?

~~ Ricardo



Re: missing input and more

2015-02-05 Thread 宋文武
Andreas Enge  writes:

> On Thu, Feb 05, 2015 at 08:05:03AM +0100, sleep_wal...@suse.cz wrote:
>> 1] ldd shows run-time dependency:
>> $ ldd 
>> /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so | 
>> grep libz
>>libz.so.1 => 
>> /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1 
>> (0x7fe4fac9)
>
> That is fine - so there is a dependency, but our rpath recoding handles it.
> So far, there is no need for zlib as a propagated input - we do not need to
> install it into the user profile when installing gnutls.
>
>> Libs.private: -lz-lgmp
>> Requires.private: nettle, hogweed, libtasn1, zlib
>
> Reading up the documentation of pkg-config:
> "Requires and Requires.private define other modules needed by the library.
> It is usually preferred to use the private variant of Requires to avoid
> exposing unnecessary libraries to the program that is linking with your
> library. If the program will not be using the symbols of the required library,
> it should not be linking directly to that library."
Ah, I think libraries in 'Requires.private' should also be propagated,
otherwise, we got:
  $ pkg-config --cflags gnutls
  = Package 'zlib', required by 'GnuTLS', not found
If not propagated, other packages use gnutls have to add zlib to inputs,
even they never use it.

I just pushed a commit to propagate zlib for gnutls,
hope I'm not wrong ;-)
>
> So as I understand this, there is no need to propagate the zlib input.
>
> Or am I getting it wrong?
>
> Andreas



New Esperanto PO file for 'guix-packages' (version 0.8.1)

2015-02-05 Thread Translation Project Robot
Hello, gentle maintainer.

This is a message from the Translation Project robot.

A revised PO file for textual domain 'guix-packages' has been submitted
by the Esperanto team of translators.  The file is available at:

http://translationproject.org/latest/guix-packages/eo.po

(We can arrange things so that in the future such files are automatically
e-mailed to you when they arrive.  Ask at the address below if you want this.)

All other PO files for your package are available in:

http://translationproject.org/latest/guix-packages/

Please consider including all of these in your next release, whether
official or a pretest.

Whenever you have a new distribution with a new version number ready,
containing a newer POT file, please send the URL of that distribution
tarball to the address below.  The tarball may be just a pretest or a
snapshot, it does not even have to compile.  It is just used by the
translators when they need some extra translation context.

The following HTML page has been updated:

http://translationproject.org/domain/guix-packages.html

If any question arises, please contact the translation coordinator.

Thank you for all your work,

The Translation Project robot, in the
name of your translation coordinator.





Re: [PATCH] gnu: Add ngircd.

2015-02-05 Thread Taylan Ulrich Bayırlı/Kammer
I had time to tinker around and, with willingness from the ngIRCd
developers to patch their test suite, came up with a relatively simple
solution.

The relevant patch to the test suite is not necessarily as portable as
ngIRCd requires it to be (or maybe it is) so this might not be the patch
that will make it upstream, but on the meanwhile here it is.

>From fa3385f7f36ab9b7c17d7b80455d96669af24a50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 
Date: Sat, 31 Jan 2015 22:03:25 +0100
Subject: [PATCH] gnu: Add ngircd.

* gnu/packages/messaging.scm (ngircd): New variable.
* gnu/packages/patches/ngircd-no-dns-in-tests.patch: New file.
* gnu/packages/patches/ngircd-handle-zombies.patch: New file.
* gnu-system.am (dist_patch_DATA): Add them.
---
 gnu-system.am |   3 +
 gnu/packages/messaging.scm|  46 ++-
 gnu/packages/patches/ngircd-handle-zombies.patch  |  36 +++
 gnu/packages/patches/ngircd-no-dns-in-tests.patch | 368 ++
 4 files changed, 452 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/ngircd-handle-zombies.patch
 create mode 100644 gnu/packages/patches/ngircd-no-dns-in-tests.patch

diff --git a/gnu-system.am b/gnu-system.am
index 706ad57..3daec97 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -197,6 +197,7 @@ GNU_SYSTEM_MODULES =\
   gnu/packages/ncurses.scm			\
   gnu/packages/netpbm.scm			\
   gnu/packages/nettle.scm			\
+  gnu/packages/ngircd.scm			\
   gnu/packages/ninja.scm			\
   gnu/packages/node.scm\
   gnu/packages/noweb.scm			\
@@ -433,6 +434,8 @@ dist_patch_DATA =		\
   gnu/packages/patches/mupdf-buildsystem-fix.patch		\
   gnu/packages/patches/mutt-CVE-2014-9116.patch			\
   gnu/packages/patches/net-tools-bitrot.patch			\
+  gnu/packages/patches/ngircd-handle-zombies.patch		\
+  gnu/packages/patches/ngircd-no-dns-in-tests.patch		\
   gnu/packages/patches/ninja-tests.patch			\
   gnu/packages/patches/nss-pkgconfig.patch			\
   gnu/packages/patches/nvi-assume-preserve-path.patch		\
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index f6d0cf5..82fdbe6 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Mark H Weaver 
 ;;; Copyright © 2014 Julien Lepiller 
+;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,8 +37,11 @@
   #:use-module (gnu packages gnutls)
   #:use-module (gnu packages python)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages check))
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu packages linux))
 
 (define-public libotr
   (package
@@ -159,4 +163,44 @@ dictionaries.  HexChat can be extended with multiple addons.")
 (home-page "http://hexchat.net/";)
 (license gpl2+)))
 
+(define-public ngircd
+  (package
+(name "ngircd")
+(version "22")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://arthur.barton.de/pub/ngircd/ngircd-";
+  version ".tar.xz"))
+  (sha256
+   (base32
+"17k3g9qd9d010czk5846qxvzkmw4fihv8l6m2a2287crbxm3xhd4"))
+  (patches (list (search-patch "ngircd-no-dns-in-tests.patch")
+ (search-patch "ngircd-handle-zombies.patch")
+(build-system gnu-build-system)
+;; Needed for the test suite.
+(native-inputs `(("procps" ,procps)
+ ("expect" ,expect)
+ ("inetutils" ,inetutils)))
+;; XXX Add more inputs to enable more features, e.g. IDENT, libiconv.
+(inputs `(("zlib" ,zlib)
+  ("gnutls" ,gnutls)))
+(arguments
+ `(#:configure-flags
+   `("--with-gnutls" "--enable-ipv6")
+   #:phases
+   ;; Necessary for the test suite, should it be enabled in the future.
+   (alist-cons-after
+'configure 'post-configure
+(lambda _
+  (substitute* "src/ngircd/Makefile"
+(("/bin/sh") (which "sh"
+%standard-phases)))
+(home-page "http://ngircd.barton.de/";)
+(synopsis "Lightweight Internet Relay Chat server for small networks")
+(description
+ "ngIRCd is a lightweight Internet Relay Chat server for small or private
+networks.  It is easy to configure, can cope with dynamic IP addresses, and
+supports IPv6, SSL-protected connections as well as PAM for authentication.")
+(license gpl2+)))
+
 ;;; messaging.scm ends here
diff --git a/gnu/packages/patches/ngircd-handle-zombies.patch b/gnu/packages/patches/ngircd-handle-zombies.patch
new file mode 100644
index 000..99475ba
--- /dev/null
+++ b/gnu/packages/patches/ngircd-handle-zombies.patch
@@ -0,0 +1,36 @@
+The Guile process taking 

Re: missing input and more

2015-02-05 Thread Tomas Cech
At Thu, 05 Feb 2015 19:01:18 +0800,
宋文武 wrote:
> 
> Andreas Enge  writes:
> 
> > On Thu, Feb 05, 2015 at 08:05:03AM +0100, sleep_wal...@suse.cz wrote:
> >> 1] ldd shows run-time dependency:
> >> $ ldd 
> >> /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so 
> >> | grep libz
> >>libz.so.1 => 
> >> /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1 
> >> (0x7fe4fac9)
> >
> > That is fine - so there is a dependency, but our rpath recoding handles it.
> > So far, there is no need for zlib as a propagated input - we do not need to
> > install it into the user profile when installing gnutls.
> >
> >> Libs.private: -lz-lgmp
> >> Requires.private: nettle, hogweed, libtasn1, zlib
> >
> > Reading up the documentation of pkg-config:
> > "Requires and Requires.private define other modules needed by the library.
> > It is usually preferred to use the private variant of Requires to avoid
> > exposing unnecessary libraries to the program that is linking with your
> > library. If the program will not be using the symbols of the required 
> > library,
> > it should not be linking directly to that library."
> Ah, I think libraries in 'Requires.private' should also be propagated,
> otherwise, we got:
>   $ pkg-config --cflags gnutls
>   = Package 'zlib', required by 'GnuTLS', not found
> If not propagated, other packages use gnutls have to add zlib to inputs,
> even they never use it.

That is exactly my case I found and have to add workaround for that.
 
> I just pushed a commit to propagate zlib for gnutls,
> hope I'm not wrong ;-)

Perfect, thanks!


But that fixed only one problem while we should do something dependencies in
general.

Imagine I have not came with this bug and some other people would just added
zlib to the inputs. We could have it wrong on multiple places and when we
would replace gnutls with something else in future, it would stay there
unnoticed.

I can hack some script to do the checks but I believe that everyone would
appreciate clean solution which would check dependencies after build as a part
of build process...

S_W



Re: [PATCH]: Add Ant.

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

> this patch adds ant-minimal, a minimal configuration of Apache Ant.  Ant
> can be configured with lots of optional libraries, but since most of
> these libraries are built with Ant, I think it makes sense to provide a
> minimal version.

Yes.

> A wart is that Ant (even in the minimal configuration) depends on
> hamcrest-core, which can only be built with Ant.  The good news is that
> it appears that hamcrest-core is only used for running the tests after
> Ant is built.

What you did (referring to hamcrest-core.jar) is fine.  Turning off
tests in ant-minimal would also be fine, IMO; perhaps even preferable,
since that avoids another pre-build binary.  WDYT?

> I used the gnu-build-system instead of the trivial-build-system, because
> using the trivial-build-system required me to write a lot more code in
> order to unpack the tarball, patch shebangs, add tools to the PATH,
> etc.  Using the gnu-build-system I only had to remove a few phases to
> make it work.  Maybe we need a somewhat more powerful version of the
> trivial-build-system.

Makes sense.

> From a8cf4bbd4a8147215a84f27e4aa6247163b4fdf4 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus 
> Date: Fri, 30 Jan 2015 16:57:13 +0100
> Subject: [PATCH] gnu: Add Ant.
>
> * gnu/packages/java.scm (ant-minimal): New variable.
> ---
>  gnu/packages/java.scm | 48 
>  1 file changed, 48 insertions(+)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 4a86f63..46ff798 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -48,6 +48,54 @@
>#:use-module (gnu packages zip)
>#:use-module (gnu packages texinfo))
>  
> +(define-public ant-minimal
> +  (package
> +(name "ant")

s/ant/ant-minimal/

Perhaps it could additionally be made private, because users will have
no reason to use the minimal variant, no?

> +(description
> + "Ant is a platform-independent build tool for Java.")

Could you expound a bit, saying it’s similar to ‘make’, has build
recipes written in XML, is especially convenient for Java projects,
etc.?

I’ll reply to your other comments.

Thanks,
Ludo’.



Re: [PATCH]: Add Ant.

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

> A couple more things:
>
> * the installation script copies MS DOS batch scripts to $out/bin, which
>   we could do without.

Indeed.  :-)  Would be best to get rid of them.

> * there are many launcher scripts for Ant: bash scripts, perl scripts,
>   Python scripts ... Does ant-minimal need to get perl and python as
>   inputs or can we do without these additional dependencies?

By launcher scripts, do you mean the ‘ant’ command?  I suppose it’s
enough to have one of them, and the Bash version is probably the one
with the smallest disk space footprint, no?

> * to use Ant without problems ANT_HOME and JAVA_HOME really should be
>   set appropriately (ANT_HOME to $out of the ant-minimal package,
>   JAVA_HOME to $out of icedtea6).  Should I suggest these two paths as
>   search paths by adding something like this to ant-minimal (for
>   ANT_HOME) and icedtea6 (for JAVA_HOME)?
>
> (native-search-paths
>  (list (search-path-specification
> (variable "ANT_HOME")
> (files '(".")

Since Ant is generally used via the ‘ant’ command (AIUI), what about
wrapping that command so that ANT_HOME and JAVA_HOME are set
appropriately?

Thanks,
Ludo’.



Re: problem with building gcc-cross-4.8.3 for i686-pc-gnu

2015-02-05 Thread Ludovic Courtès
Marek Benc  skribis:

> The attached patch does the following:
>   1.) Adds the name of the dynamic linker to gnu/packages/bootstrap.scm
>   2.) Adds code to gnu/package/gcc to substitute the default dynamic
> linker in gcc/config/arch/gnu.h for the one to be used.
>   3.) Changes how the build system arguments for cross-gcc are created:
> A.) They're now in a separate procedure, reflecting how it's done
> in vanilla guix.
> B.) A bug is fixed that caused the native ld.so to be picked over
> the target one.
> C.) Fixed the 'set-cross-path phase so that it also checks for
> hurd-related packages, and checks package existence before passing
> anything to the string-handling functions.

This all looks good to me.  However, this should really be 5 different
patches so as to ease review, bisection, etc.  Could you do that?

Please prefer one message per patch, as with ‘git send-email’.

TIA!

Ludo’.



Re: Helping programs find their icons

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

> Hello Guix,
>
> I've investigated why wicd-gtk is unable to find its icons and fixed it.
> Looking at the output of strace, I found that when wicd-gtk looks for
> icons, it searches for 'index.theme' files in many different directories
> of the form:
>
>   /gnu/store/.../share/icons/hicolor/
>
> The icons it wanted were in one of the directories it searched, but
> apparently the lack of 'index.theme' inhibited it from loading the fonts
> from that directory.
>
> I've found only one package that includes
> share/icons/hicolor/index.theme, and that's 'hicolor-icon-theme'.  The
> 'index.theme' file turned out to be quite generic.  It describes the
> directory structure, but does not list the individual icons present.
>
> I modified the 'wicd' package to copy 'index.theme' from
> 'hicolor-icon-theme' into the same directory of 'wicd', and that fixed
> the problem: wicd-gtk now has working icons.
I think you mean the icon now show in wicd-gtk itself?
then wrap it with XDG_DATA_DIRS=$hicolor-icon-theme/share:$wicd/share
should have same effect.
>
> However, this problem is quite widespread.  Many of our gtk packages
> install icons into $out/share/icons/hicolor but have no 'index.theme',
> and I suspect that's the reason the xfce application menu is missing so
> many icons.
>
>   inkscape-0.91
>   emacs-24.4
>   gtk+-3.14.7
>   xfce4-session-4.10.0
>   xfwm4-4.10.0
>   exo-0.8.0
>   thunar-1.4.0
>   xfce4-panel-4.10.0
>   xfdesktop-4.10.0
>   xfce4-battery-plugin-1.0.5
>   transmission-2.84
This is another story, I think the icon finding path is:

THEME=0
for dir in "$XDG_DATA_DIRS:$out/share"; do
  if [ ! -e "$dir/icons/hicolor/index.theme" && $THEME = 0 ]; then
continue 
  else
THEME=1
  fi
  
  if [ -e "$dir/icons/hicoror/icon-theme.cache" ]; then
icon = $(lookup from icon-theme.cache)
if $icon; then
  return $icon
else
  continue # even we may have the icon in dir
  fi

  icon = $(lookup from dir) # slow
  if $icon; then
return $icon
  fi
done

I just pushed the 'xfce' meta-package, it use 'glib-or-gtk-build-system'
to set a XDG_DATA_DIRS contain xfce4-panel, xfce4-battery-plugin, etc.
Icons from those propagated packages can be found, but packages from
user's profile can not.

The problem is we have a incomplete icon-theme.cache in profile,
we should either remove it or generate a complete one.

>
> I think it might be helpful to add a post-install phase to
> 'glib-or-gtk-build-system' that installs 'index.theme' from
> 'hicolor-icon-theme' if $out/share/icons/hicolor exists.
>
> We might also have to install 'index.theme' from 'gnome-icon-theme' if
> $out/share/icons/gnome exists.
>
> That is, unless someone has a better suggestion.  Any ideas?
>
> Thanks,
>   Mark



Re: problem with building gcc-cross-4.8.3 for i686-pc-gnu

2015-02-05 Thread Ludovic Courtès
Marek Benc  skribis:

> On 01/31/2015 11:13 PM, Marek Benc wrote:
>
>>
>> The current issue is that, when building cross-gcc, when it reaches
>> libgomp, configure fails when trying to create a dummy binary. For some
>> reason, the compiled cross-compiler needs --rpath to specify where
>> shared libraries are, as without it, it can't find libmachuser.so and
>> libhurduser.so, which causes it to fail.
>>
>
> Well, I figured out a way to solve it, however, I don't know if the
> change is acceptable, since it alters how cross-compilers work.
>
> In the attached patch, which builds upon the one from my previous
> email, I made cross compilers not use binutils' ld directly, but
> instead use the ld-wrapper script.
>
> This means that while the Hurd cross compiler now works, binaries made
> by cross compilers have their library paths hard-coded into their
> RPATH section, which means that they're less flexible, which might be
> a problem. For some reason, the hurd cross-linker can't find libraries
> without specifying a --rpath, which is strange imho.

Using RUNPATH is not a problem: it’s what we always do.  ;-)

That said, in practice we haven’t done anything special about it in
cross-compilation contexts and things have worked fine.  I believe this
is due to the fact that we’ve only built things that use Libtool, and
Libtool adds --rpath automatically.

Another thing I don’t understand is that we use "--disable-libgomp" in
‘cross-gcc-arguments’, which means that the first cross-gcc (sans libc)
does not build libgomp.  What are things going wrong here?

Thanks,
Ludo’.



Re: [PATCH] gnu: Add ngircd.

2015-02-05 Thread Ludovic Courtès
taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> From 34b2efd8244caf0cd16c1aa510209a54def148b7 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>  
> Date: Sat, 31 Jan 2015 22:03:25 +0100
> Subject: [PATCH] gnu: Add ngircd.
>
> * gnu/packages/messaging.scm (ngircd): New variable.
> * gnu/packages/patches/ngircd-no-dns-in-tests.patch: New file.
> * gnu-system.am (dist_patch_DATA): Add it.

Perhaps Mark should have the last say, but at least this looks good to me.

> +;; XXX Add more inputs to enable more features, e.g. IDENT, libiconv.

iconv is part of glibc, so you can remove it from here.

Thanks,
Ludo’.



Orc fails to build

2015-02-05 Thread Andreas Enge
Hello,

orc fails its tests on i686 and mips on hydra:
   http://hydra.gnu.org/build/233541
   http://hydra.gnu.org/build/233919/nixlog/1/tail-reload ,
together with gstreamer* for which it is an input.

The failing function is test-limits. Something to do with 32/64 bit?

Andreas




Re: Guix System Distribution now FSF-endorsed

2015-02-05 Thread Daniel Pimentel

On 2015-02-04 19:19, l...@gnu.org wrote:

"jaccas (pjfcl)"  skribis:


On the distribution have been included in the FSF list and for the
chosen name. Simple is better.


Thanks!

I actually forgot to mention it on this list:


http://www.fsf.org/news/fsf-adds-guix-system-distribution-to-list-of-endorsed-distributions
  http://www.gnu.org/distros/free-distros.html

This is indeed good news!

Ludo’.

In soon the Guix GSD will be in distrowatch too, I request it.

Congratulation for Guix Team (users and developers), FSF and the Free 
Software moviment :D

--
Daniel Pimentel (d4n1)



Re: [PATCHES] Add wicd and wicd-service

2015-02-05 Thread Daniel Pimentel

On 2015-02-04 22:22, Mark H Weaver wrote:

Mark H Weaver  writes:


* Unless run as root, the user interfaces to configure wicd via dbus
  always fail.  The wicd dbus configuration file is supposed to allow
  anyone in the 'netdev' group to access and configure the daemon, but
  this doesn't work.  I could use some help debugging this.


This all works now, without running the clients as root! :)
I'm not sure which change in my configuration made things start 
working.


* I added my user to the 'netdev' group in my os-configuration for the
  first time, whereas earlier I simply edited /etc/group by hand and
  rebooted.

* I just added Ludovic's new suggested 'name-service-switch'
  configuration with nss-mdns support.

* I'm now running on current 'master', and there have been some changes
  there since my earlier testing.

I was pleased to discover that our xfce already includes a panel 
applet

to configure wicd


And this is working as well, although it seems unable to find some of
the icons.  Anyway, it's a step in the right direction :)

 Enjoy!
   Mark

Great news! Thanks,
--
Daniel Pimentel (d4n1)



Re: Orc fails to build

2015-02-05 Thread 宋文武
Andreas Enge  writes:

> Hello,
>
> orc fails its tests on i686 and mips on hydra:
>http://hydra.gnu.org/build/233541
>http://hydra.gnu.org/build/233919/nixlog/1/tail-reload ,
> together with gstreamer* for which it is an input.
>
> The failing function is test-limits. Something to do with 32/64 bit?
Find it:
  https://bugzilla.gnome.org/show_bug.cgi?id=735273
  
So I think we have to disable the tests?
>
> Andreas



Re: Guix System Distribution now FSF-endorsed

2015-02-05 Thread Taylan Ulrich Bayırlı/Kammer
Daniel Pimentel  writes:

> In soon the Guix GSD will be in distrowatch too, I request it.

This makes me worry because DistroWatch seems strongly focused on "Linux
distros".  Maybe it will be fine if the description states clearly what
Guix System Distribution really is...  (I'm aware that Trisquel,
Parabola, etc. are there too.  Not sure what to think of that either.)

Taylan



Re: [PATCH] gnu: Add ngircd.

2015-02-05 Thread Taylan Ulrich Bayırlı/Kammer
l...@gnu.org (Ludovic Courtès) writes:

> taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:
>
>> From 34b2efd8244caf0cd16c1aa510209a54def148b7 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>>  
>> Date: Sat, 31 Jan 2015 22:03:25 +0100
>> Subject: [PATCH] gnu: Add ngircd.
>>
>> * gnu/packages/messaging.scm (ngircd): New variable.
>> * gnu/packages/patches/ngircd-no-dns-in-tests.patch: New file.
>> * gnu-system.am (dist_patch_DATA): Add it.
>
> Perhaps Mark should have the last say, but at least this looks good to me.
>
>> +;; XXX Add more inputs to enable more features, e.g. IDENT, libiconv.
>
> iconv is part of glibc, so you can remove it from here.
>
> Thanks,
> Ludo’.

I see; I just had to explicitly add --with-iconv.

I also added PAM now.  There's an ugly form with two layers of
quasiquote and unquote though; tell me if there's a better way to do it.

(And this is based on the version of this patch with the test-suite
patch for zombie processes.  Tell me if I should base it on the one
without that patch.)

>From 00385310b307cc76fb0e4125a7013dbeb558691e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 
Date: Sat, 31 Jan 2015 22:03:25 +0100
Subject: [PATCH] gnu: Add ngircd.

* gnu/packages/messaging.scm (ngircd): New variable.
* gnu/packages/patches/ngircd-no-dns-in-tests.patch: New file.
* gnu/packages/patches/ngircd-handle-zombies.patch: New file.
* gnu-system.am (dist_patch_DATA): Add them.
---
 gnu-system.am |   3 +
 gnu/packages/messaging.scm|  56 +++-
 gnu/packages/patches/ngircd-handle-zombies.patch  |  36 +++
 gnu/packages/patches/ngircd-no-dns-in-tests.patch | 368 ++
 4 files changed, 462 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/ngircd-handle-zombies.patch
 create mode 100644 gnu/packages/patches/ngircd-no-dns-in-tests.patch

diff --git a/gnu-system.am b/gnu-system.am
index 706ad57..3daec97 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -197,6 +197,7 @@ GNU_SYSTEM_MODULES =\
   gnu/packages/ncurses.scm			\
   gnu/packages/netpbm.scm			\
   gnu/packages/nettle.scm			\
+  gnu/packages/ngircd.scm			\
   gnu/packages/ninja.scm			\
   gnu/packages/node.scm\
   gnu/packages/noweb.scm			\
@@ -433,6 +434,8 @@ dist_patch_DATA =		\
   gnu/packages/patches/mupdf-buildsystem-fix.patch		\
   gnu/packages/patches/mutt-CVE-2014-9116.patch			\
   gnu/packages/patches/net-tools-bitrot.patch			\
+  gnu/packages/patches/ngircd-handle-zombies.patch		\
+  gnu/packages/patches/ngircd-no-dns-in-tests.patch		\
   gnu/packages/patches/ninja-tests.patch			\
   gnu/packages/patches/nss-pkgconfig.patch			\
   gnu/packages/patches/nvi-assume-preserve-path.patch		\
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index f6d0cf5..520746c 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Mark H Weaver 
 ;;; Copyright © 2014 Julien Lepiller 
+;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,8 +37,11 @@
   #:use-module (gnu packages gnutls)
   #:use-module (gnu packages python)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages check))
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu packages linux))
 
 (define-public libotr
   (package
@@ -159,4 +163,54 @@ dictionaries.  HexChat can be extended with multiple addons.")
 (home-page "http://hexchat.net/";)
 (license gpl2+)))
 
+(define-public ngircd
+  (package
+(name "ngircd")
+(version "22")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://arthur.barton.de/pub/ngircd/ngircd-";
+  version ".tar.xz"))
+  (sha256
+   (base32
+"17k3g9qd9d010czk5846qxvzkmw4fihv8l6m2a2287crbxm3xhd4"))
+  (patches (list (search-patch "ngircd-no-dns-in-tests.patch")
+ (search-patch "ngircd-handle-zombies.patch")
+(build-system gnu-build-system)
+;; Needed for the test suite.
+(native-inputs `(("procps" ,procps)
+ ("expect" ,expect)
+ ("inetutils" ,inetutils)))
+;; XXX Add libident, libwrap.
+(inputs `(("zlib" ,zlib)
+  ("gnutls" ,gnutls)
+  ,@(if (string-suffix? "-linux"
+(or (%current-target-system)
+(%current-system)))
+`(("linux-pam" ,linux-pam))
+'(
+(arguments
+ `(#:configure-flags
+   `("--with-gnutls" "--with-iconv" "--enable-ipv6"
+ ,,@(if (string-suffix

Re: Guix System Distribution now FSF-endorsed

2015-02-05 Thread Ricardo Wurmus

Daniel Pimentel writes:
> In soon the Guix GSD will be in distrowatch too, I request it.

The "Guix Guix System Distribution", eh? ;)

When using the abbreviation "GSD" for "Guix System Distribution" I
recommend prefixing it with "GNU" to avoid confusion.

~~ Ricardo



Re: Guix System Distribution now FSF-endorsed

2015-02-05 Thread Thompson, David
On Thu, Feb 5, 2015 at 9:33 AM, Ricardo Wurmus
 wrote:
>
> Daniel Pimentel writes:
>> In soon the Guix GSD will be in distrowatch too, I request it.
>
> The "Guix Guix System Distribution", eh? ;)
>
> When using the abbreviation "GSD" for "Guix System Distribution" I
> recommend prefixing it with "GNU" to avoid confusion.

"GuixSD" is the officially approved abbreviation, "Guix System
Distribution" being the full name.  Let's make sure that the text that
will be on DistroWatch is accurate.

- Dave



Re: Guix System Distribution now FSF-endorsed

2015-02-05 Thread Daniel Pimentel

On 2015-02-05 11:28, taylanbayi...@gmail.com wrote:

Daniel Pimentel  writes:


In soon the Guix GSD will be in distrowatch too, I request it.


This makes me worry because DistroWatch seems strongly focused on 
"Linux

distros".  Maybe it will be fine if the description states clearly what
Guix System Distribution really is...  (I'm aware that Trisquel,
Parabola, etc. are there too.  Not sure what to think of that either.)

Taylan
It's true Taylan, but I would like that distrowatch put the minimal 
description about Guix GSD. Several users know distrowatch and it's a 
big database about GNU/Linux, so the Guix GSD must there is too, I 
think.


Sorry for it :(
--
Daniel Pimentel (d4n1)



Re: Guix System Distribution now FSF-endorsed

2015-02-05 Thread Daniel Pimentel

On 2015-02-05 11:33, Ricardo Wurmus wrote:

Daniel Pimentel writes:

In soon the Guix GSD will be in distrowatch too, I request it.


The "Guix Guix System Distribution", eh? ;)

When using the abbreviation "GSD" for "Guix System Distribution" I
recommend prefixing it with "GNU" to avoid confusion.

~~ Ricardo

Sorry for error name.

GuixSD :)
--
Daniel Pimentel (d4n1)



Re: Orc fails to build

2015-02-05 Thread Andreas Enge
On Thu, Feb 05, 2015 at 10:18:48PM +0800, 宋文武 wrote:
> Find it:
>   https://bugzilla.gnome.org/show_bug.cgi?id=735273
> So I think we have to disable the tests?

Good find! If you can without too much effort, it would be nice to add a
patch that disables exactly this test. In any case, please add a comment
to the link above. Thanks!

Andreas




Re: [PATCH] gnu: Add ngircd.

2015-02-05 Thread Mark H Weaver
taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

> +(arguments
> + `(#:configure-flags
> +   `("--with-gnutls" "--with-iconv" "--enable-ipv6"
> + ,,@(if (string-suffix? "-linux"
> +(or (%current-target-system)
> +(%current-system)))
> +'("--with-pam")
> +'()))

There's no need for two levels of quasiquote here, and it unnecessarily
complicates the unquoting.  How about changing the inner quasiquote to
normal quote?  It should come out like this:

(arguments
 `(#:configure-flags
   '("--with-gnutls" "--with-iconv" "--enable-ipv6"
 ,@(if (string-suffix? "-linux"
   (or (%current-target-system)
   (%current-system)))
   '("--with-pam")
   '()))

> +   #:phases
> +   ;; Necessary for the test suite, should it be enabled in the future.

You can remove the ", should it be enabled in the future".

Modulo these little nitpicks, it looks good to me.  Please push!

 Thanks,
   Mark



Re: missing input and more

2015-02-05 Thread Andreas Enge
On Thu, Feb 05, 2015 at 07:01:18PM +0800, 宋文武 wrote:
> Ah, I think libraries in 'Requires.private' should also be propagated,
> otherwise, we got:
>   $ pkg-config --cflags gnutls
>   = Package 'zlib', required by 'GnuTLS', not found
> If not propagated, other packages use gnutls have to add zlib to inputs,
> even they never use it.

For whatever reason, this command works for me:
$ pkg-config --cflags gnutls
-I/gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/include 
-I/gnu/store/gayyfjxgsbpym1dcnd3b9mzwj2fz3jvj-nettle-2.7.1/include 
-I/gnu/store/dm9cnj2ng8a58l88j4bs9zjf78ysjprv-libtasn1-4.2/include

with the one that was currently in my profile, and
$ pkg-config --cflags gnutls
-I/gnu/store/msknn44rcfwfall90lz1kcklsd34iy21-gnutls-3.3.12/include 
-I/gnu/store/gayyfjxgsbpym1dcnd3b9mzwj2fz3jvj-nettle-2.7.1/include 
-I/gnu/store/dm9cnj2ng8a58l88j4bs9zjf78ysjprv-libtasn1-4.2/include

with the latest version.

Andreas




Re: missing input and more

2015-02-05 Thread Andreas Enge
On Thu, Feb 05, 2015 at 12:57:27PM +0100, Tomas Cech wrote:
> But that fixed only one problem while we should do something dependencies in
> general.
> 
> Imagine I have not came with this bug and some other people would just added
> zlib to the inputs. We could have it wrong on multiple places and when we
> would replace gnutls with something else in future, it would stay there
> unnoticed.
> 
> I can hack some script to do the checks but I believe that everyone would
> appreciate clean solution which would check dependencies after build as a part
> of build process...

Maybe we could extend "guix lint" so that it compiles the package and performs
checks on the output (for instance, looking for .pc files and checking
whether libraries are correctly propagated)?

Andreas




[PATCH 0/4] gnu: Fix ld.so detection of cross-compilers for the GNU Hurd system.

2015-02-05 Thread Marek Benc

On 02/05/2015 01:38 PM, Ludovic Courtès wrote:



This all looks good to me.  However, this should really be 5 different
patches so as to ease review, bisection, etc.  Could you do that?

Please prefer one message per patch, as with ‘git send-email’.



Sure thing, just finished splitting/converting them, will post them 
right away.


Keep in mind, all of these patches are for the wip-hurd branch.



Ludo’.



--
Marek.



[PATCH 2/4] gnu: cross-base: Make it aware of non-Linux (ie. Hurd)

2015-02-05 Thread Marek Benc
This fixes the problem Manolis was facing earlier, with string-append 
getting an #f argument.


--
Marek.
>From 4dc55bfe59bf60c4f55a7e54da2f5ee17589ff9e Mon Sep 17 00:00:00 2001
From: Marek Benc 
Date: Thu, 5 Feb 2015 17:01:14 +0100
Subject: [PATCH] gnu: cross-base: Make it aware of non-Linux (ie. Hurd)
 systems.

* gnu/packages/cross-base.scm (cross-gcc-arguments): Make 'set-cross-path aware of the Hurd.

---
 gnu/packages/cross-base.scm | 25 ++---
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index e051756..1ebe862 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -129,23 +129,34 @@ may be either a libc package or #f.)"
  `(alist-cons-before
'configure 'set-cross-path
(lambda* (#:key inputs #:allow-other-keys)
- ;; Add the cross-Linux headers to CROSS_CPATH, and remove them
+ ;; Add the cross-kernel headers to CROSS_CPATH, and remove them
  ;; from CPATH.
  (let ((libc  (assoc-ref inputs "libc"))
(linux (assoc-ref inputs
- "libc/cross-linux-headers")))
+ "libc/cross-linux-headers"))
+   (mach  (assoc-ref inputs
+ "libc/cross-gnumach-headers"))
+   (hurd  (assoc-ref inputs
+ "libc/cross-hurd-headers"))
+   (hurd-minimal (assoc-ref inputs
+ "libc/cross-hurd-minimal")))
 
(define (cross? x)
  ;; Return #t if X is a cross-libc or a cross-kernel.
  (or (string-prefix? libc x)
- (string-prefix? linux x)))
+ (if linux(string-prefix? linux x) #f)
+ (if hurd (string-prefix? hurd  x) #f)
+ (if mach (string-prefix? mach  x) #f)
+ (if hurd-minimal (string-prefix? hurd-minimal x) #f)))
 
(setenv "CROSS_CPATH"
-   (string-append libc  "/include:"
-  linux "/include"))
+   (string-append libc "/include"
+  (if linux (string-append ":" linux "/include") "")
+  (if hurd  (string-append ":" hurd  "/include"
+   ":" mach  "/include") "")))
(setenv "CROSS_LIBRARY_PATH"
-   (string-append libc "/lib"))
-
+   (string-append libc "/lib"
+  (if hurd-minimal (string-append ":" hurd-minimal "/lib") "")))
 
(let ((cpath   (search-path-as-string->list
(getenv "CPATH")))
-- 
2.2.1



[PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems.

2015-02-05 Thread Marek Benc
In the gcc package, the system-dependent paths to the dynamic linker get 
substituted before building, but only for Linux systems. This patch adds 
the substitution for GNU systems.


--
Marek.
>From 7ae53fd611dd78a8c185734dad268428a8b931a8 Mon Sep 17 00:00:00 2001
From: Marek Benc 
Date: Thu, 5 Feb 2015 17:12:54 +0100
Subject: [PATCH] gnu: gcc: Also substitute the dynamic linker name for GNU
 (ie. Hurd) systems.

* gnu/packages/gcc.scm (gcc-4.7): Also substitute the dynamic linker name for GNU (ie. Hurd) systems.

---
 gnu/packages/gcc.scm | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 0260158..271d277 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -186,6 +186,13 @@ where the OS part is overloaded to denote a specific ABI---into GCC
suffix
(string-append libc ,(glibc-dynamic-linker)
 
+(substitute* (find-files "gcc/config"
+ "^gnu(64|-elf)?\\.h$")
+  (("#define GNU_USER_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
+   (format #f "#define GNU_USER_DYNAMIC_LINKER~a \"~a\"~%"
+   suffix
+   (string-append libc ,(glibc-dynamic-linker)
+
 ;; Tell where to find libstdc++, libc, and `?crt*.o', except
 ;; `crt{begin,end}.o', which come with GCC.
 (substitute* (find-files "gcc/config"
-- 
2.2.1



[PATCH 1/4] gnu: Move the cross-gcc build system arguments into a separate procedure.

2015-02-05 Thread Marek Benc
This one is actually just a copy/paste from the master branch. It 
includes a fix to the problem of cross compilers compiling binaries with 
the building system's ld.so in mind, I take no credit for this.


--
Marek.
>From b4665f3e98d70e6efb34b0f945477b4336a51e7d Mon Sep 17 00:00:00 2001
From: Marek Benc 
Date: Thu, 5 Feb 2015 16:53:38 +0100
Subject: [PATCH] gnu: Move the cross-gcc build system arguments into a
 separate procedure.

* /gnu/packages/cross-base.scm (cross-gcc-arguments): New variable.
   (cross-gcc): Make use of the procedure above.

---
 gnu/packages/cross-base.scm | 194 +++-
 1 file changed, 101 insertions(+), 93 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index f881096..e051756 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -67,6 +67,106 @@
 `(cons "--with-sysroot=/" ,flags)))
 (cross binutils target)))
 
+(define (cross-gcc-arguments target libc)
+  "Return build system arguments for a cross-gcc for TARGET, using LIBC (which
+may be either a libc package or #f.)"
+  ;; Set the current target system so that 'glibc-dynamic-linker' returns the
+  ;; right name.
+  (parameterize ((%current-target-system target))
+(substitute-keyword-arguments (package-arguments gcc-4.8)
+  ((#:configure-flags flags)
+   `(append (list ,(string-append "--target=" target)
+  ,@(if libc
+'()
+`( ;; Disable features not needed at this stage.
+  "--disable-shared" "--enable-static"
+
+  ;; Disable C++ because libstdc++'s configure
+  ;; script otherwise fails with "Link tests are not
+  ;; allowed after GCC_NO_EXECUTABLES."
+  "--enable-languages=c"
+
+  "--disable-threads"  ;libgcc, would need libc
+  "--disable-libatomic"
+  "--disable-libmudflap"
+  "--disable-libgomp"
+  "--disable-libssp"
+  "--disable-libquadmath"
+  "--disable-decimal-float" ;would need libc
+  )))
+
+,(if libc
+ flags
+ `(remove (cut string-match "--enable-languages.*" <>)
+  ,flags
+  ((#:make-flags flags)
+   (if libc
+   `(let ((libc (assoc-ref %build-inputs "libc")))
+  ;; FLAGS_FOR_TARGET are needed for the target libraries to receive
+  ;; the -Bxxx for the startfiles.
+  (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
+,flags))
+   flags))
+  ((#:phases phases)
+   (let ((phases
+  `(alist-cons-after
+'install 'make-cross-binutils-visible
+(lambda* (#:key outputs inputs #:allow-other-keys)
+  (let* ((out  (assoc-ref outputs "out"))
+ (libexec  (string-append out "/libexec/gcc/"
+  ,target))
+ (binutils (string-append
+(assoc-ref inputs "binutils-cross")
+"/bin/" ,target "-")))
+(for-each (lambda (file)
+(symlink (string-append binutils file)
+ (string-append libexec "/"
+file)))
+  '("as" "ld" "nm"))
+#t))
+,phases)))
+ (if libc
+ `(alist-cons-before
+   'configure 'set-cross-path
+   (lambda* (#:key inputs #:allow-other-keys)
+ ;; Add the cross-Linux headers to CROSS_CPATH, and remove them
+ ;; from CPATH.
+ (let ((libc  (assoc-ref inputs "libc"))
+   (linux (assoc-ref inputs
+ "libc/cross-linux-headers")))
+
+   (define (cross? x)
+ ;; Return #t if X is a cross-libc or a cross-kernel.
+ (or (string-prefix? libc x)
+ (string-prefix? linux x)))
+
+   (setenv "CROSS_CPATH"
+   (string-append libc  "/include:"
+  linux "/include"))
+   (setenv "CROSS_LIBRARY_PATH"
+   (string-append libc "/lib"))
+
+
+   (let ((cpath   (search-path-as-string->list
+   (getenv "CPATH")))
+ (libpath (search-p

[PATCH 3/4] gnu: bootstrap: Add the location of where ld.so is located on Hurd systems.

2015-02-05 Thread Marek Benc

This one should be pretty self explanatory.

--
Marek.
>From 098ca112becb95199d3e66078b75fbf5b9b54a69 Mon Sep 17 00:00:00 2001
From: Marek Benc 
Date: Thu, 5 Feb 2015 17:07:18 +0100
Subject: [PATCH] gnu: bootstrap: Add the location of where ld.so is located on
 Hurd systems.

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add the dynamic linker for i686-gnu.

---
 gnu/packages/bootstrap.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 71ccb19..6a8d09a 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -156,6 +156,7 @@ check whether everything is alright."
   (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
 ((string=? system "i686-linux") "/lib/ld-linux.so.2")
 ((string=? system "mips64el-linux") "/lib/ld.so.1")
+((string=? system "i686-gnu") "/lib/ld.so.1")
 (else (error "dynamic linker name not known for this system"
  system
 
-- 
2.2.1



Re: [PATCH 1/4] gnu: Move the cross-gcc build system arguments into a separate procedure.

2015-02-05 Thread Mark H Weaver
Marek Benc  writes:
> This one is actually just a copy/paste from the master branch. It
> includes a fix to the problem of cross compilers compiling binaries
> with the building system's ld.so in mind, I take no credit for this.

Please don't copy/paste from the master branch.  Merging the master
branch into the wip-hurd branch would be best.  'git cherry-pick'ing
selected commits from the master branch might also be okay, but not as
good.

 Mark



Re: [PATCH 1/4] gnu: Move the cross-gcc build system arguments into a separate procedure.

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

> Marek Benc  writes:
>> This one is actually just a copy/paste from the master branch. It
>> includes a fix to the problem of cross compilers compiling binaries
>> with the building system's ld.so in mind, I take no credit for this.
>
> Please don't copy/paste from the master branch.  Merging the master
> branch into the wip-hurd branch would be best.

Even better: rebase wip-hurd on current master.  I made several changes
to the same code that you are changing, so it will require some
adjustments.

Thanks!
  Mark



wip-hurd branch rebased with master

2015-02-05 Thread Manolis Ragkousis
These patches  are the commits from wip-hurd branch rebased on top of master.
From e7db980d40dec4623488e44be4304ec54c2ae354 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis 
Date: Tue, 27 Jan 2015 18:39:47 +
Subject: [PATCH 2/2] gnu: cross-base: Add support to cross-build libc for
 GNU/Hurd.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/cross-base.scm (cross-libc): Build libc based on
  GLIBC/HURD when TARGET is "i686-pc-gnu".

---
 gnu/packages/cross-base.scm | 168 
 1 file changed, 140 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 5a67d4b..ffb0f3f 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -24,6 +24,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages hurd)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -268,39 +269,150 @@ XBINUTILS and the cross tool chain."
("cross-binutils" ,xbinutils)
,@(package-native-inputs linux-libre-headers)
 
-  (package (inherit glibc)
-(name (string-append "glibc-cross-" target))
-(arguments
- (substitute-keyword-arguments
- `(;; Disable stripping (see above.)
-   #:strip-binaries? #f
+(define xgnumach-headers
+(package (inherit gnumach-headers)
+  (name (string-append (package-name gnumach-headers)
+   "-cross-" target))
 
-   ;; This package is used as a target input, but it should not have
-   ;; the usual cross-compilation inputs since that would include
-   ;; itself.
-   #:implicit-cross-inputs? #f
+  (native-inputs `(("cross-gcc" ,xgcc)
+   ("cross-binutils" ,xbinutils)
+   ,@(package-native-inputs gnumach-headers)
 
-   ,@(package-arguments glibc))
-   ((#:configure-flags flags)
-`(cons ,(string-append "--host=" target)
-   ,flags))
-   ((#:phases phases)
-`(alist-cons-before
-  'configure 'set-cross-linux-headers-path
-  (lambda* (#:key inputs #:allow-other-keys)
-(let ((linux (assoc-ref inputs "linux-headers")))
-  (setenv "CROSS_CPATH"
-  (string-append linux "/include"))
-  #t))
+  (define xmig
+(package (inherit mig)
+  (name (string-append "mig-cross"))
+  (arguments
+   (substitute-keyword-arguments (package-arguments mig)
+ ((#:configure-flags flags)
+  `(cons ,(string-append "--host=" target)
+ ,flags
+
+  (propagated-inputs `(("cross-gnumach-headers" ,xgnumach-headers)))
+  (native-inputs `(("cross-gcc" ,xgcc)
+   ("cross-binutils" ,xbinutils)
+   ,@(package-native-inputs mig)
+
+  (define xhurd-headers
+(package (inherit hurd-headers)
+  (name (string-append (package-name hurd-headers)
+   "-cross-" target))
+
+  (native-inputs `(("cross-gcc" ,xgcc)
+   ("cross-binutils" ,xbinutils)
+   ("cross-mig" ,xmig)
+   ,@(alist-delete "mig"(package-native-inputs hurd-headers))
+
+  (define xglibc/hurd-headers
+(package (inherit glibc/hurd-headers)
+  (name (string-append (package-name glibc/hurd-headers)
+   "-cross-" target))
+
+  (arguments
+   (substitute-keyword-arguments (package-arguments glibc/hurd-headers)
+ ((#:phases phases)
+  `(alist-cons-before
+'pre-configure 'set-cross-headers-path
+(lambda* (#:key inputs #:allow-other-keys)
+  (let ((mach (assoc-ref inputs "gnumach-headers"))
+(hurd (assoc-ref inputs "hurd-headers")))
+(setenv "CROSS_CPATH"
+(string-append mach "/include:"
+   hurd "/include"
+,phases
+
+  (propagated-inputs `(("gnumach-headers" ,xgnumach-headers)
+   ("hurd-headers" ,xhurd-headers)))
+
+  (native-inputs `(("cross-gcc" ,xgcc)
+   ("cross-binutils" ,xbinutils)
+   ("cross-mig" ,xmig)
+   ,@(alist-delete "mig"(package-native-inputs glibc/hurd-headers))
+
+  (define xhurd-minimal
+(package (inherit hurd-minimal)
+  (name (string-append (package-name hurd-minimal)
+   "-cross-" target))
+  (arguments
+   (substitute-keyword-arguments (package-arguments hurd-minimal)
+ ((#:phases phases)
+  `(alist-cons-before
+'configure 'set-cross-headers-path
+(lambda* (#:key inputs #:allow-other-keys)
+  (let ((gl

Re: wip-hurd branch rebased with master

2015-02-05 Thread Manolis Ragkousis
I was saying to Ludovic at fosdem that when rebasing to master,
trying to build glibc/hurd you get the error:

In unknown file:
   ?: 0 [string-append "--with-headers=" #f "/include"]

ERROR: In procedure string-append:
ERROR: In procedure string-append: Wrong type (expecting string): #f

the error is a result of this configure flag which glibc/hurd inherits
from the glibc/linux recipe

(string-append "--with-headers="
   (assoc-ref %build-inputs "linux-headers")
   "/include")

So my question is, why didn't I have a problem with the older version
of guix at wip-hurd
and I have that problem now?


qms7wk79qs2fn8n57ppjv3cd12m4kp-glibc-hurd-cross-i686-pc-gnu-2.18.drv.bz2
Description: BZip2 compressed data


Re: [PATCH 3/4] gnu: bootstrap: Add the location of where ld.so is located on Hurd systems.

2015-02-05 Thread Manolis Ragkousis
On 5 February 2015 at 16:29, Marek Benc  wrote:
> This one should be pretty self explanatory.

I have done the same on my local branch so this one can be safely
applied on wip-hurd branch.



Re: missing input and more

2015-02-05 Thread Ludovic Courtès
Andreas Enge  skribis:

> Maybe we could extend "guix lint" so that it compiles the package and performs
> checks on the output (for instance, looking for .pc files and checking
> whether libraries are correctly propagated)?

That would be costly and probably difficult to automate: it’s almost
doable for .pc files, but hardly so for .h files.

Ludo’.



Re: problem with building gcc-cross-4.8.3 for i686-pc-gnu

2015-02-05 Thread Marek Benc



On 02/05/2015 09:26 PM, Ludovic Courtès wrote:

Marek Benc  skribis:


On 02/05/2015 01:44 PM, Ludovic Courtès wrote:



Another thing I don’t understand is that we use "--disable-libgomp" in
‘cross-gcc-arguments’, which means that the first cross-gcc (sans libc)
does not build libgomp.  What are things going wrong here?



I think it's because libgomp is a part of libgcc, and that needs the C
library, that's what the comments say at least.


(Why off-list?)  Libgomp is the OpenMP run-time support library, which
we don’t require when bootstrapping.



Sorry, I pressed the wrong button on my email client... silly me. I also 
might have not understood your question then...


Its build system tests whether the compiler works, and it does that by 
building a dummy binary. However, the binary fails to link as the linker 
can't find libmachuser and libhurduser, which are provided by libc, 
without --rpath. (If this is what you were asking about)


>

Ludo’.



--
Marek.



Re: Helping programs find their icons

2015-02-05 Thread Ludovic Courtès
Mark H Weaver  skribis:

> However, this problem is quite widespread.  Many of our gtk packages
> install icons into $out/share/icons/hicolor but have no 'index.theme',
> and I suspect that's the reason the xfce application menu is missing so
> many icons.
>
>   inkscape-0.91
>   emacs-24.4
>   gtk+-3.14.7
>   xfce4-session-4.10.0
>   xfwm4-4.10.0
>   exo-0.8.0
>   thunar-1.4.0
>   xfce4-panel-4.10.0
>   xfdesktop-4.10.0
>   xfce4-battery-plugin-1.0.5
>   transmission-2.84
>
> I think it might be helpful to add a post-install phase to
> 'glib-or-gtk-build-system' that installs 'index.theme' from
> 'hicolor-icon-theme' if $out/share/icons/hicolor exists.

As 宋文武 suggests, glib-or-gtk-build-system may solve the problem if we
add ‘hicolor-icon-theme’ to the inputs, because it would automatically
add it to $XDG_DATA_DIRS.  Wouldn’t it?

Currently things like Evince, for instance, do find their icons.
GIMP and Inkscape are fine too, but I think they use slightly different
mechanisms.

Thanks,
Ludo’.



Re: 01/01: gnu: gnutls: Propagate zlib.

2015-02-05 Thread Ludovic Courtès
???  skribis:

> commit 122ddc595e22a933dbffaad1153876cc7ea2203b
> Author: 宋文武 
> Date:   Thu Feb 5 18:46:59 2015 +0800
>
> gnu: gnutls: Propagate zlib.
> 
> * gnu/packages/gnutls.scm (gnutls): Move zlib to 'propagated-inputs'.

[...]

>  (inputs
>   `(("guile" ,guile-2.0)
> -   ("zlib" ,guix:zlib)
> ("perl" ,perl)))
>  (propagated-inputs
>   `(("libtasn1" ,libtasn1)
> ("nettle" ,nettle)
> -   ("which" ,which)))
> +   ("which" ,which)
> +   ("zlib" ,guix:zlib)))

Could you add a comment explaining why this needs to be propagated?

TIA,
Ludo’.



Re: [PATCH] Add 'waf-build-system'.

2015-02-05 Thread Ricardo Wurmus

>>> From adc52a74fb12943fd77c97bf75a2092e839f9024 Mon Sep 17 00:00:00 2001
>>> From: Ricardo Wurmus 
>>> Date: Wed, 28 Jan 2015 22:39:03 +0100
>>> Subject: [PATCH] Add 'waf-build-system'.
>>>
>>> * guix/build-system/waf.scm, guix/build/waf-build-system.scm: New files.
>>> * Makefile.am (MODULES): Add them.
>>
>> Could you add a few lines to guix.texi, under “Build Systems”?  Other
>> than that this looks good to me.
>
> I'll try and send an updated patch.

Attached is an updated patch that also includes changes to the "Build
Systems" section in guix.texi.

Does this suffice?

~~ Ricardo

>From cab477edc91b3959b10825c12609535bcef66895 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 5 Feb 2015 22:41:24 +0100
Subject: [PATCH] build: Add 'waf-build-system'.

* guix/build-system/waf.scm,
  guix/build/waf-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document waf-build-system.
---
 Makefile.am |   2 +
 doc/guix.texi   |  12 
 guix/build-system/waf.scm   | 128 
 guix/build/waf-build-system.scm |  86 +++
 4 files changed, 228 insertions(+)
 create mode 100644 guix/build-system/waf.scm
 create mode 100644 guix/build/waf-build-system.scm

diff --git a/Makefile.am b/Makefile.am
index 67367d6..6a4a09b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,7 @@ MODULES =	\
   guix/build-system/gnu.scm			\
   guix/build-system/perl.scm			\
   guix/build-system/python.scm			\
+  guix/build-system/waf.scm			\
   guix/build-system/ruby.scm			\
   guix/build-system/trivial.scm			\
   guix/ftp-client.scm\
@@ -71,6 +72,7 @@ MODULES =	\
   guix/build/perl-build-system.scm		\
   guix/build/python-build-system.scm		\
   guix/build/ruby-build-system.scm		\
+  guix/build/waf-build-system.scm		\
   guix/build/store-copy.scm			\
   guix/build/utils.scm\
   guix/build/union.scm\
diff --git a/doc/guix.texi b/doc/guix.texi
index b3c7365..70c9c01 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1899,6 +1899,18 @@ Which Ruby package is used can be specified with the @code{#:ruby}
 parameter.
 @end defvr
 
+@defvr {Scheme Variable} waf-build-system
+This variable is exported by @code{(guix build-system waf)}.  It
+implements a build procedure around the @code{waf} script.  The common
+phases---@code{configure}, @code{build}, and @code{install}---are
+implemented by passing their names as arguments to the @code{waf}
+script.
+
+The @code{waf} script is executed by the Python interpreter.  Which
+Python package is used to run the script can be specified with the
+@code{#:python} parameter.
+@end defvr
+
 Lastly, for packages that do not need anything as sophisticated, a
 ``trivial'' build system is provided.  It is trivial in the sense that
 it provides basically no support: it does not pull any implicit inputs,
diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm
new file mode 100644
index 000..494cb95
--- /dev/null
+++ b/guix/build-system/waf.scm
@@ -0,0 +1,128 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Ricardo Wurmus 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (guix build-system waf)
+  #:use-module (guix store)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix derivations)
+  #:use-module (guix build-system)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix build-system python)
+#:select (default-python default-python2))
+  #:use-module (ice-9 match)
+  #:use-module (srfi srfi-26)
+  #:export (waf-build
+waf-build-system))
+
+;; Commentary:
+;;
+;; Standard build procedure for applications using 'waf'.  This is very
+;; similar to the 'python-build-system' and is implemented as an extension of
+;; 'gnu-build-system'.
+;;
+;; Code:
+
+(define* (lower name
+#:key source inputs native-inputs outputs system target
+(python (default-python))
+#:allow-other-keys
+#:rest arguments)
+  "Return a bag for NAME."
+  (define private-keywords
+'(#:source #:target #:python #:inputs #:native-inputs))
+
+  (and (not target)   ;XXX: no cross-compilation
+   (bag
+ 

Re: issues with offloading

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

> * lsh required
>
>   The manual does not appear to mention that for offloading lsh is
>   expected to be installed on the submitting host.  Since I only had
>   OpenSSH installed (on the local workstation and the remote server) I
>   decided to redefine %lsh-command and %lshg-command:
>
> (define %lsh-command "ssh")
> (define %lshg-command "ssh")

That won’t work because the command-line options that are passed are
lsh-specific.

>   When the command in these variables does not exist there is no error
>   message at all.  I only discovered the issue because machine-load
>   returned +inf.0 for every machine in the list (defined in
>   /etc/guix/machines.scm) and looped indefinitely to find a suitable
>   machine.
>
>   Here are some recommendations:
>
>   - make %lsh-command and %lshg-command configurable or mention in the
> documentation that lsh must be available in the PATH.

Yes.

>   - print an error message when "remote-pipe" fails due to not finding
> the command specified in %lsh-command / %lshg-command

Done.

However, there’s a wip-guile-ssh branch, which ideally is the future: it
uses the Guile-SSH library instead of invoking lsh.  This should improve
integration and error handling.

There were issues with old versions of Guile-SSH that have been
addressed since, so we should rebase it and see how well it works.

>   - only run once over the machines given in /etc/guix/machines.scm
> instead of looping indefinitely, or alternatively print the reason
> for skipping a machine (e.g. by stating that machine-load is +inf.0)

Yes.

> * does not work with unpriviledged user

[...]

>   This is a problem with register-gc-root, for example.  It creates a
>   directory in %state-directory where an unprivileged user likely has no
>   write permissions.  This mkdir fails silently because register-gc-root
>   does not bother checking the result of
>
> (false-if-exception (mkdir root-directory))
>
>   When the root-directory (e.g. /var/guix/gcroots/tmp) cannot be created
>   by the remote user running the guile script, the following (symlink
>   ...) fails.

The idea was that /var/guix/gcroots/tmp would be created by the
administrator and made world-writable (similarly,
/var/guix/gcroots/profiles/per-user/$USER is writable by $USER.)

However, this is not documented and does not happen automatically.

I think this could be worked around by doing everything in a single
process on the remote side: we would run a single program there that
would take care of reporting missing store items, importing them,
performing the build, and writing the result.  That way, we would no
longer need the special directory for GC roots.

Needs some more thought.

>   Recommendations:
>
>   - instead of sending a script to be executed by a remote Guile process
> running as the unprivileged SSH user it may make sense to bake this
> feature into the daemon.  The daemon has permissions on
> %state-directory anyway, while a regular user probably shouldn't.

I don’t think this is a good idea.

>   - check the return value of (false-if-exception (mkdir
> root-directory)), or do not use false-if-exception at all to fail
> right there when the directory should be created rather than failing
> when the symlink to a non-existing directory cannot be created.
> This would arguably result in a clearer error message.

I’ve improved that.

I realize there are several ways all this could be improved, most
notably: a) one remote process, b) Guile-SSH.  Let’s see what we can
do.

Thanks for your feedback!

Ludo’.