From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: hurd: Add Hurd Minimal. Date: Sun, 25 May 2014 01:12:01 +0200 Message-ID: <87y4xq4vr2.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoL6l-0000Ld-Of for Guix-devel@gnu.org; Sat, 24 May 2014 19:12:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoL6h-0006a9-8T for Guix-devel@gnu.org; Sat, 24 May 2014 19:12:07 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:39389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoL6g-0006a0-Tr for Guix-devel@gnu.org; Sat, 24 May 2014 19:12:03 -0400 In-Reply-To: (Manolis Ragkousis's message of "Sat, 24 May 2014 19:57:37 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Manolis Ragkousis Cc: Guix-devel@gnu.org Manolis Ragkousis skribis: > This patch adds Hurd minimal package which builds 'libihash.a' and a > patch which disables linking of libihash against glibc. Next is the > glibc/hurd package, but I will send it later/tomorrow cause there is > something I need to ask the Hurd guys first. Great, keep up the good work. :-) > From 137cb57dfb6b983521f758992a4424301acb4281 Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis > Date: Sat, 24 May 2014 17:17:49 +0000 > Subject: [PATCH] gnu: hurd: Add Hurd Minimal. > > * gnu/packages/hurd.scm (hurd-minimal): New variable. > * gnu/packages/patches/hurd-minimal.patch: New patch. > * gnu-system.am (dist_patch_DATA): Add it. [...] > +(define-public hurd-minimal > + (package > + (name "hurd-minimal") > + (version "0.5") > + (source=20 > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "git://git.savannah.gnu.org/hurd/hurd")=20 > + (commit "353fe33eb2481a14dc324c7c2e52b2032df86465"))) It may be OK currently if the version of hurd-headers does not match that of the actual hurd, but we=E2=80=99ll have to be cautious. Eventually we should consider changing hurd-headers to use the same source (and hurd-minimal and hurd would just use (package-source hurd-headers).) > + (outputs '("out")) Can be omitted (it=E2=80=99s the same as the default value.) > + (arguments > + `(#:out-of-source? #t > + #:phases (alist-replace > + 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out"))) > + ;; We need to copy libihash.a to the output folder = manually, > + ;; since there is no target for that in the makefile > + (copy-recursively "libihash" > + (string-append out "/libihash")) This creates /gnu/store/.../libihash/{libihash.a,Makefile,ihash.c,ihash.o,...}. Is it really what=E2=80=99d intended? I would expect that the intent is to create /gnu/store/.../{lib/libihash.a,include/ihash.h}, no? > + (lambda* (#:key inputs source #:allow-other-keys) > + (let ((glibc (assoc-ref inputs "glibc-hurd-headers"= ))) > + (zero? (system* "autoreconf" "-vif")) > + #t)) Can be simplified to: (lambda _ (zero? (system* "autoreconf" "-vfi"))) Note that the effect of the trailing #t above was to ignore the result of =E2=80=98system*=E2=80=99, which means ignoring errors when they occur. > --- /dev/null > +++ b/gnu/packages/patches/minimal-hurd.patch Please add a line or two in the patch saying what it does, and linking to the original discussion. > @@ -0,0 +1,47 @@ > +diff --git a/configure.ac b/configure.ac > +index ecabfdf..7ede6db 100644 > +--- a/configure.ac > ++++ b/configure.ac > +@@ -83,6 +83,13 @@ AC_PROG_INSTALL > + AC_PROG_AWK > + AC_PROG_SED > +=20 > ++if test "x$cross_compiling" =3D "xyes"; then > ++ # It may be that we don't have a working libc yet, for instance > ++ # because we're bootstrapping the cross-compilation tool chain. > ++ # Thus, use this undocumented Autoconf macro designed for this. > ++ AC_NO_EXECUTABLES > ++ echo done > ++fi I gather that this works as advertised, but could you confirm by replying to ? That would allow us to push the patch upstream. > +-# Check if libc contains getgrouplist and/or uselocale. > +-AC_CHECK_FUNCS(getgrouplist uselocale) > ++# We do not need to check if libc contains getgrouplist=20 > ++# and/or uselocale for now. > ++# AC_CHECK_FUNCS(getgrouplist uselocale) I=E2=80=99ve just posted a patch for that, we=E2=80=99ll see. > +-# Check for Sun RPC headers and library. > ++# Check only for Sun RPC headers. We do not need the library yet. > + AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=3Dyes], [HAVE_SUN_RPC=3Dno= ]) > +-AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=3Dno]) > ++# AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=3Dno]) > + AC_SUBST([HAVE_SUN_RPC]) What=E2=80=99s the problem that=E2=80=99s addressed here? Thanks, Ludo=E2=80=99.