From unknown Sat Jun 21 10:20:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#26341 <26341@debbugs.gnu.org> To: bug#26341 <26341@debbugs.gnu.org> Subject: Status: [PATCH] build: vm: Add missing module. Reply-To: bug#26341 <26341@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:20:20 +0000 retitle 26341 [PATCH] build: vm: Add missing module. reassign 26341 guix-patches submitter 26341 Mathieu Othacehe severity 26341 normal tag 26341 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 11:02:47 2017 Received: (at submit) by debbugs.gnu.org; 2 Apr 2017 15:02:47 +0000 Received: from localhost ([127.0.0.1]:57622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuh1i-0004Le-RO for submit@debbugs.gnu.org; Sun, 02 Apr 2017 11:02:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuh1h-0004LR-8G for submit@debbugs.gnu.org; Sun, 02 Apr 2017 11:02:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuh1b-0005DL-9m for submit@debbugs.gnu.org; Sun, 02 Apr 2017 11:02:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52595) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cuh1b-0005DH-6c for submit@debbugs.gnu.org; Sun, 02 Apr 2017 11:02:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuh1Z-0001oc-AT for guix-patches@gnu.org; Sun, 02 Apr 2017 11:02:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuh1W-00057r-7N for guix-patches@gnu.org; Sun, 02 Apr 2017 11:02:37 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:32806) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cuh1W-000572-1a for guix-patches@gnu.org; Sun, 02 Apr 2017 11:02:34 -0400 Received: by mail-wr0-x242.google.com with SMTP id u18so27070258wrc.0 for ; Sun, 02 Apr 2017 08:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=REAr+u7lhi1LwsGHKDj9nNhzXwcMGFLWIGrh8jypRS0=; b=lUT1zWXmQHiMY+8E+9kBXfKbsOrVi52chHesC4FWCmhr8kptWyi/xAValgrD7Mawor QONxRABpq1oAsW6zNfygTcQiPoMn4fG24fH372knlXnKtqIZsBP3Pxk4zG3BhvzWkJ05 /MWc9rshB7/QkJQyG2EEot4DDT1AQPupLOPR9LLn0yXwvthmPdBZYb9jipLESheJznJ9 Uw8keOy7KjtbEw27MFlFqM5ZtVNGr+0OzbMIIig2MJKxRlV4GKWQKX2ycuO/mlxC9rtl Bh5eEBwmVia/J6SYWWnVGgIgRHkbyCfxfcQoUKl5QvHkA77+HC2qBH7Ag7rjT+oM/jv0 1fjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=REAr+u7lhi1LwsGHKDj9nNhzXwcMGFLWIGrh8jypRS0=; b=GASCgfqApL0mtfPcVYKC3F6/ceGwEbGijPl0wVcK3z7z4FHsME/wbX3gUcwYTHmxnt /p/9Op2pRDCpersYzbXF1AR54w6QO4o6ni2trMFmLlZaxpYj7/faPbB1Oqy0W1RcKLV4 Tt5ppkDRApBdnZcY/7laiOZDiUCQYPNOYc1V2U3fL7Orz4r8IzjIem+F6hfpcygxcEo0 q0MnB5JtUMNly2EAtprclnLG9UNZHi88zhPngZ2S2CekXiC0E/Evu6C2ov9UAIh5oY1k ab3iPezgRzcZ5pZBrNeSYlFPKzWt0YlHg5ceLQDV05FGiDmpn+TvySxsZ+na/pQjzP24 yTmA== X-Gm-Message-State: AFeK/H0MX+AwFUHAi13nwI7aIF7M8BFSjQxHGomYtZqIKM0Soirk7tbObuvYYEWNjgQPew== X-Received: by 10.28.113.73 with SMTP id m70mr6357311wmc.12.1491145352935; Sun, 02 Apr 2017 08:02:32 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id l141sm10594472wma.32.2017.04.02.08.02.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 08:02:32 -0700 (PDT) From: Mathieu Othacehe To: guix-patches@gnu.org Subject: [PATCH] build: vm: Add missing module. Date: Sun, 2 Apr 2017 17:01:57 +0200 Message-Id: <20170402150157.7149-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) * gnu/build/vm.scm (define-module): Use module (guix build syscalls). It fixes the following warnings during guix build : gnu/build/vm.scm:233:3: warning: possibly unbound variable `mount' gnu/build/vm.scm:238:3: warning: possibly unbound variable `umount' gnu/build/vm.scm:268:8: warning: possibly unbound variable `mount' gnu/build/vm.scm:276:8: warning: possibly unbound variable `umount' gnu/build/vm.scm:315:4: warning: possibly unbound variable `mount' gnu/build/vm.scm:323:4: warning: possibly unbound variable `umount' --- gnu/build/vm.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 766163e1d..cc705832c 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -22,6 +22,7 @@ (define-module (gnu build vm) #:use-module (guix build utils) #:use-module (guix build store-copy) + #:use-module (guix build syscalls) #:use-module (gnu build linux-boot) #:use-module (gnu build install) #:use-module (guix records) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 04 08:41:39 2017 Received: (at 26341) by debbugs.gnu.org; 4 Apr 2017 12:41:39 +0000 Received: from localhost ([127.0.0.1]:59864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvNmE-00033T-QX for submit@debbugs.gnu.org; Tue, 04 Apr 2017 08:41:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvNmD-00033E-Gr for 26341@debbugs.gnu.org; Tue, 04 Apr 2017 08:41:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvNm3-00050o-9Q for 26341@debbugs.gnu.org; Tue, 04 Apr 2017 08:41:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvNm3-00050g-4q; Tue, 04 Apr 2017 08:41:27 -0400 Received: from [193.50.110.182] (port=53830 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cvNm2-00006j-Jl; Tue, 04 Apr 2017 08:41:26 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. References: <20170402150157.7149-1-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 04 Apr 2017 14:41:23 +0200 In-Reply-To: <20170402150157.7149-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sun, 2 Apr 2017 17:01:57 +0200") Message-ID: <8760iks5u4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Mathieu, Mathieu Othacehe skribis: > * gnu/build/vm.scm (define-module): Use module (guix build syscalls). > > It fixes the following warnings during guix build : > > gnu/build/vm.scm:233:3: warning: possibly unbound variable `mount' > gnu/build/vm.scm:238:3: warning: possibly unbound variable `umount' > gnu/build/vm.scm:268:8: warning: possibly unbound variable `mount' > gnu/build/vm.scm:276:8: warning: possibly unbound variable `umount' > gnu/build/vm.scm:315:4: warning: possibly unbound variable `mount' > gnu/build/vm.scm:323:4: warning: possibly unbound variable `umount' This is weird but on purpose: this module is used in a context, in (gnu system vm), where =E2=80=98guile-static-stripped=E2=80=99 is running, in th= e initrd. And =E2=80=98guile-static-stripped=E2=80=99 has =E2=80=98guile-linux-syscal= ls.patch=E2=80=99, which adds bindings for =E2=80=98mount=E2=80=99, =E2=80=98umount=E2=80=99, etc. Conversely, (guix build syscalls) relies on the ability to do dlopen(NULL) and to resolve =E2=80=9Cmount=E2=80=9D et al. from libc.so. T= his cannot work with the statically-linked Guile, which is why we have =E2=80=98guile-linux-syscalls.patch=E2=80=99. So this patch cannot be applied as is, and I think it would break things that use (gnu build vm). That said, we should improve this. Perhaps something along the lines of the attached patch would work. Could you try and send an updated patch? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 5aae1530f..e108d6169 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -462,7 +462,9 @@ the returned procedure is called." (define UMOUNT_NOFOLLOW 8) (define mount - (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) + (let ((proc (if (module-defined? the-scm-module 'mount) + (module-ref the-scm-module 'mount) + (syscall->procedure int "mount" `(* * * ,unsigned-long *))))) (lambda* (source target type #:optional (flags 0) options #:key (update-mtab? #f)) "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 05 06:30:39 2017 Received: (at 26341) by debbugs.gnu.org; 5 Apr 2017 10:30:39 +0000 Received: from localhost ([127.0.0.1]:33197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cviD1-0007bt-62 for submit@debbugs.gnu.org; Wed, 05 Apr 2017 06:30:39 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:35719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cviCz-0007bf-5x for 26341@debbugs.gnu.org; Wed, 05 Apr 2017 06:30:37 -0400 Received: by mail-wr0-f172.google.com with SMTP id k6so7473373wre.2 for <26341@debbugs.gnu.org>; Wed, 05 Apr 2017 03:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=t8MrSSKQzu77U2aBbtrwWdCbYPmRygFjlHcjNX594cA=; b=R36U1xuY3HD/sjkENn44yfc/QMPmQainyOcqkxbAOnM5hHyGq8jS8BeK/JxfTHmpto qUWcLeKc3JllBDmhWXtnuDv61gtgUQLl9iHj8p+IF9saGD3jt8sPapWlJzzd53hdbK/l ahiB3IXXD8UuJQnXjY+NQMi8XYpkZgImoy90S4xur7t2193+T2zXMRzr7YIYKdwpPmsb ARsa3TXY2hdAz+rbrigu3Bizkrla7jh0bR4JBAquMIy42wR+du5gClgU+zhI82KM88DW PreoUu8anQ5+fvcJfL+zj7QPjjfxbRYY5j6aL/whW5HvLMNdt4AFn6CAhoyHMVoidJEP yIQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=t8MrSSKQzu77U2aBbtrwWdCbYPmRygFjlHcjNX594cA=; b=RrhugmJLlOaufDnfXl/kfOqqR2ksOHMehXIbVsnWpDtLaVzhEKlKJbIssWdIVLpaAy HHiiydgOEXkQ4fkGvcY1sUUDuvARW+1wZOGNAnXOw55tNjRR8LBMsrL+ndYSy7FyJte1 9sGFY4bWEjVosDeqwhWN1bxibZKnYVJJVEhPeUhBYBfL0LekPGe8C+kDNeEEVxwmcDzZ ijzH5X7RkHguizvRBS8SizKTXZEQ3w50aLHou+ESBiImz+jwJicM7gXBuCpK6kw4d4SE qPvO0mTDcw40CxwyDLp6n5HuVfDCdb8hTquXajVaqY89VycwmymLUVarcn572mIROKQU W1Xw== X-Gm-Message-State: AFeK/H21cJk+H4QMRWwBCSBmabtsOD3WRTvl9/V5Ikb8WEddBRHYnXom1AdFQJ9N8gk4tg== X-Received: by 10.223.149.99 with SMTP id 90mr24222083wrs.7.1491388230757; Wed, 05 Apr 2017 03:30:30 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id v188sm7220101wmg.11.2017.04.05.03.30.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2017 03:30:30 -0700 (PDT) References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. In-reply-to: <8760iks5u4.fsf@gnu.org> Date: Wed, 05 Apr 2017 12:30:35 +0200 Message-ID: <86bmsbrvsk.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Ludo, > That said, we should improve this. Perhaps something along the lines of > the attached patch would work. > > Could you try and send an updated patch? Well, I tried a "guix system vm ..." with just my patch and it worked. I agree with you it shouldn't work because it is not possible to use FFI in static Guile. I don't exactly what happend but it might be something like that : (gnu build vm) -- uses module ----> (guix build syscalls) (with my patch) | | | | | -------- provides | | | | v v | mount umount (FFI versions) | -------------> (gnu build linux-boot) | | uses (gnu build file-systems) | | overrides mount and unount with libguile versions if you're using static Guile. So we end-up using libguile mount and umount in (gnu build vm) and not FFI versions of (guix build syscalls). However, it is still a good idea to allow modules to use (guix build syscalls) independently of the fact that they are running inside static Guile or not. So the attached patch (your previous patch, sligtly modified) could be ok ? Thank you, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 05 06:32:32 2017 Received: (at 26341) by debbugs.gnu.org; 5 Apr 2017 10:32:32 +0000 Received: from localhost ([127.0.0.1]:33201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cviEq-0007eo-HN for submit@debbugs.gnu.org; Wed, 05 Apr 2017 06:32:32 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:33806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cviEp-0007eX-6P for 26341@debbugs.gnu.org; Wed, 05 Apr 2017 06:32:31 -0400 Received: by mail-wr0-f173.google.com with SMTP id t20so7622024wra.1 for <26341@debbugs.gnu.org>; Wed, 05 Apr 2017 03:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=IZC0KwfukT3o295+Xna7a4a0/QhY92O9GnpeFKSIITM=; b=MXjK+jdFDmM46CcoOHomdF9SXefVKtIgdHa7CKIvxBe6lEUbEnFhNLER3Lf6QEG0XP 25CffGbRrGtZDWhS9wpJwwYp+iq9JKuCcoZ1N2NDXmGe39aYvIYgZKbag340Av14Hp6s N4V5OvcdqXEQJGW48roVUWh2Aqh3kd46emN09RfBW0M7oa3iQTXchFBTkeTQrgxYEiz+ ohG8zy2W16EWqzZtjXBsVkMI/QhLN24OA8gmtFBUlBh6iE6N7gYkoZ0wytPh6ORoCAzC DFMA7O0bTg51Ks9Tz3EPhgOJODXMtddleF3F8oR+xin/753gAck3nsHlswrL3CErpIEX BSLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=IZC0KwfukT3o295+Xna7a4a0/QhY92O9GnpeFKSIITM=; b=Xg3f3rynirqNpdv+/FeQv40wZuOYQRWllWwqoYsOeXz77saARSNaigKPcjw19nCBem zKoG6CMBv6C29DJZIMLLowH0rT9i2PFbPc3TcW1xRc4p3XarThIyMU+DBgOi6ULXAdYF EM4eNK5YMNvWA2F22EoX5V1VtzUZmdgN5U1QQ8EfULoVmtgjZ3rjq2dHjJHoIiow1UDz XMOkU7qNs9ARdUngNREpqEYXOPhc3d7ZbXeo4bsvAWGgjam4YA0E3J8naCkor8C8iVT1 LEkCOBaFHKPqY0wLJ1bIFaVl8XeGsOqwz7b9jFdg+zuiOp7gESstnm46h9Q+8cK1PzfQ rvZA== X-Gm-Message-State: AFeK/H2q4CTgY7+17b/7e4WCRjsz1WQoJas2hk8DW86Lx2zPyVp+3CRAKvVqlb/h/OopkQ== X-Received: by 10.28.6.213 with SMTP id 204mr13421313wmg.68.1491388345617; Wed, 05 Apr 2017 03:32:25 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id t16sm15581926wra.44.2017.04.05.03.32.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2017 03:32:24 -0700 (PDT) References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> <86bmsbrvsk.fsf@gmail.com> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. In-reply-to: <86bmsbrvsk.fsf@gmail.com> Date: Wed, 05 Apr 2017 12:32:30 +0200 Message-ID: <86a87vrvpd.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) --=-=-= Content-Type: text/plain The attached patch ... Sorry Mathie --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=mount.patch diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 3fa318df3..2de664aa7 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -462,51 +462,51 @@ the returned procedure is called." (define UMOUNT_NOFOLLOW 8) (define mount - (let ((proc (if (module-defined? the-scm-module 'mount) - (module-ref the-scm-module 'mount) - (syscall->procedure int "mount" `(* * * ,unsigned-long *))))) - (lambda* (source target type #:optional (flags 0) options - #:key (update-mtab? #f)) - "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS + (if (module-defined? the-scm-module 'mount) + (module-ref the-scm-module 'mount) + (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) + (lambda* (source target type #:optional (flags 0) options + #:key (update-mtab? #f)) + "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS may be a bitwise-or of the MS_* constants, and OPTIONS may be a string. When FLAGS contains MS_REMOUNT, SOURCE and TYPE are ignored. When UPDATE-MTAB? is true, update /etc/mtab. Raise a 'system-error' exception on error." - (let-values (((ret err) - (proc (if source - (string->pointer source) - %null-pointer) - (string->pointer target) - (if type - (string->pointer type) - %null-pointer) - flags - (if options - (string->pointer options) - %null-pointer)))) - (unless (zero? ret) - (throw 'system-error "mount" "mount ~S on ~S: ~A" - (list source target (strerror err)) - (list err))) - (when update-mtab? - (augment-mtab source target type options)))))) + (let-values (((ret err) + (proc (if source + (string->pointer source) + %null-pointer) + (string->pointer target) + (if type + (string->pointer type) + %null-pointer) + flags + (if options + (string->pointer options) + %null-pointer)))) + (unless (zero? ret) + (throw 'system-error "mount" "mount ~S on ~S: ~A" + (list source target (strerror err)) + (list err))) + (when update-mtab? + (augment-mtab source target type options))))))) (define umount - (let ((proc (if (module-defined? the-scm-module 'umount) - (module-ref the-scm-module 'umount) - (syscall->procedure int "umount2" `(* ,int))))) - (lambda* (target #:optional (flags 0) - #:key (update-mtab? #f)) - "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* + (if (module-defined? the-scm-module 'umount) + (module-ref the-scm-module 'umount) + (let ((proc (syscall->procedure int "umount2" `(* ,int)))) + (lambda* (target #:optional (flags 0) + #:key (update-mtab? #f)) + "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* constants from ." - (let-values (((ret err) - (proc (string->pointer target) flags))) - (unless (zero? ret) - (throw 'system-error "umount" "~S: ~A" - (list target (strerror err)) - (list err))) - (when update-mtab? - (remove-from-mtab target)))))) + (let-values (((ret err) + (proc (string->pointer target) flags))) + (unless (zero? ret) + (throw 'system-error "umount" "~S: ~A" + (list target (strerror err)) + (list err))) + (when update-mtab? + (remove-from-mtab target))))))) (define (mount-points) "Return the mounts points for currently mounted file systems." --=-=-= Content-Type: text/plain u --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 05 17:35:29 2017 Received: (at 26341) by debbugs.gnu.org; 5 Apr 2017 21:35:29 +0000 Received: from localhost ([127.0.0.1]:34116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvsaO-00037v-S4 for submit@debbugs.gnu.org; Wed, 05 Apr 2017 17:35:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvsaN-00037j-Hk for 26341@debbugs.gnu.org; Wed, 05 Apr 2017 17:35:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvsaE-0007Qy-AJ for 26341@debbugs.gnu.org; Wed, 05 Apr 2017 17:35:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvsaE-0007Qt-6u; Wed, 05 Apr 2017 17:35:18 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60888 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cvsaD-0003BG-Hu; Wed, 05 Apr 2017 17:35:17 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> <86bmsbrvsk.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 05 Apr 2017 23:35:15 +0200 In-Reply-To: <86bmsbrvsk.fsf@gmail.com> (Mathieu Othacehe's message of "Wed, 05 Apr 2017 12:30:35 +0200") Message-ID: <87k26yler0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello! Mathieu Othacehe skribis: >> That said, we should improve this. Perhaps something along the lines of >> the attached patch would work. >> >> Could you try and send an updated patch? > > Well, I tried a "guix system vm ..." with just my patch and it worked. I > agree with you it shouldn't work because it is not possible to use FFI > in static Guile. > > I don't exactly what happend but it might be something like that : > > (gnu build vm) -- uses module ----> (guix build syscalls) (with my patch) > | | > | | > | -------- provides > | | | > | v v > | mount umount (FFI versions) > | > -------------> (gnu build linux-boot) > | > | uses > (gnu build file-systems) > | > | > overrides mount and > unount with libguile > versions if you're > using static Guile. > > So we end-up using libguile mount and umount in (gnu build vm) and not > FFI versions of (guix build syscalls). Yeah, I think there must have been a =E2=80=9C(guix build syscalls) overrid= es core binding =E2=80=98mount=E2=80=99=E2=80=9D warning, and Guile chose the = core binding over the other one so things turned out to work fine. > However, it is still a good idea to allow modules to use (guix build > syscalls) independently of the fact that they are running inside static > Guile or not. Agreed! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 05 17:39:24 2017 Received: (at 26341) by debbugs.gnu.org; 5 Apr 2017 21:39:24 +0000 Received: from localhost ([127.0.0.1]:34136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvse9-0003F9-2V for submit@debbugs.gnu.org; Wed, 05 Apr 2017 17:39:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvse4-0003Es-KO for 26341@debbugs.gnu.org; Wed, 05 Apr 2017 17:39:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvsdw-0000YY-Fy for 26341@debbugs.gnu.org; Wed, 05 Apr 2017 17:39:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvsdw-0000YQ-Cc; Wed, 05 Apr 2017 17:39:08 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60890 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cvsdv-0006BK-RR; Wed, 05 Apr 2017 17:39:08 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> <86bmsbrvsk.fsf@gmail.com> <86a87vrvpd.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 05 Apr 2017 23:39:06 +0200 In-Reply-To: <86a87vrvpd.fsf@gmail.com> (Mathieu Othacehe's message of "Wed, 05 Apr 2017 12:32:30 +0200") Message-ID: <87efx6lekl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Mathieu Othacehe skribis: > diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm > index 3fa318df3..2de664aa7 100644 > --- a/guix/build/syscalls.scm > +++ b/guix/build/syscalls.scm > @@ -462,51 +462,51 @@ the returned procedure is called." > (define UMOUNT_NOFOLLOW 8) >=20=20 > (define mount > - (let ((proc (if (module-defined? the-scm-module 'mount) > - (module-ref the-scm-module 'mount) > - (syscall->procedure int "mount" `(* * * ,unsigned-long= *))))) > - (lambda* (source target type #:optional (flags 0) options > - #:key (update-mtab? #f)) > - "Mount device SOURCE on TARGET as a file system TYPE. Optionally,= FLAGS > + (if (module-defined? the-scm-module 'mount) > + (module-ref the-scm-module 'mount) > + (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long= *)))) > + (lambda* (source target type #:optional (flags 0) options > + #:key (update-mtab? #f)) > + "Mount device SOURCE on TARGET as a file system TYPE. Optiona= lly, FLAGS > may be a bitwise-or of the MS_* constants, and OPTIONS may= be a > string. When FLAGS contains MS_REMOUNT, SOURCE and TYPE are ignored. W= hen > UPDATE-MTAB? is true, update /etc/mtab. Raise a 'system-error' exceptio= n on > error." That introduces a slight difference: in one case #:update-mtab? is not honored. That said, it=E2=80=99s probably OK to ignore it; maybe leave an = =E2=80=9CXXX=E2=80=9D comment above just in case. ;-) Otherwise LGTM. Can you send a =E2=80=98git format-patch=E2=80=99 thing? (Otherwise I coul= d write the commit log on your behalf.) Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 06 02:55:07 2017 Received: (at 26341) by debbugs.gnu.org; 6 Apr 2017 06:55:07 +0000 Received: from localhost ([127.0.0.1]:34356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw1Jz-000277-HQ for submit@debbugs.gnu.org; Thu, 06 Apr 2017 02:55:07 -0400 Received: from mail-wr0-f177.google.com ([209.85.128.177]:36249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw1Jx-00026X-ID for 26341@debbugs.gnu.org; Thu, 06 Apr 2017 02:55:05 -0400 Received: by mail-wr0-f177.google.com with SMTP id w11so43563826wrc.3 for <26341@debbugs.gnu.org>; Wed, 05 Apr 2017 23:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:message-id:in-reply-to :date:mime-version:content-transfer-encoding; bh=t1Pyx22ilMEQHAEPrAFt7juz4KtdTv1OD88aqRRQew8=; b=HbDlfPBHIaR1xCQaxZlgPQumctwr0EGcv2Sh/XDh1lDnpP0wiYM0PGukyv6peeDhL9 whjgDutpbHOZuS94qBhjJL+SkjWJvsJ59F1n8m8//esNK5nbRRBSc4/TgroIMDscrRaG cjdjpzLggWrT0yOK5pfKMlp7rWxy7lGqnIL/cCSNHXgSFmq/LK+519OoT5rXI4no/nCy MaA0Bt6nFk6Hue7876V9A7IkflK7Ackn0quvtr6WJSH4emPPIXBKUuE0/ml2uLWTKJ2q bi9AzWEyBopd20mZadw1ihPtRLmvltpcU107pe9swUKeqUbBKD8z9ZDt/FU/d7xKcsOJ +RlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :message-id:in-reply-to:date:mime-version:content-transfer-encoding; bh=t1Pyx22ilMEQHAEPrAFt7juz4KtdTv1OD88aqRRQew8=; b=F0eZszIsiNheRNEtHMRqriUnAsZHOZPb87195fsLSYm4tof0uAQGvzuUrwM+a6r69C IS0rzNzXlXxjAqGRsywOP6fqEeFdVI+wkk3jrvHVDvZvML0dpB/A4jRQ03EbKoM4W9BR P9zjzMj1Y8IgToxVGbjQhpMCF4B9n95M6t9p3UWFCQk9yNuFmXk14VD044Ob3vkT87nK 8Dc5XQa8watjIM8+qkDK9vwI/+EudYI66qojmC0qnPG3Uf/M7JnfoVanekppg6GD+O2Y 1qvB1mfKx+isZbfFe2NuHARH8h+m8e/44cc1xo6ZrdCUe2OXAAGYUCAZreg9yNxpPP9u dZOQ== X-Gm-Message-State: AFeK/H0VqBv6G+CpRPnVuFmr9lzdaC9fTS8leY4nvISli7/+RtWIetLpJupTPX8+0CBkWQ== X-Received: by 10.28.139.195 with SMTP id n186mr23635563wmd.139.1491461699613; Wed, 05 Apr 2017 23:54:59 -0700 (PDT) Received: from wyvern ([80.12.27.126]) by smtp.gmail.com with ESMTPSA id a66sm867345wrc.58.2017.04.05.23.54.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2017 23:54:58 -0700 (PDT) References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> <86bmsbrvsk.fsf@gmail.com> <86a87vrvpd.fsf@gmail.com> <87efx6lekl.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. Message-ID: <8660iif2k4.fsf@gmail.com> In-reply-to: <87efx6lekl.fsf@gnu.org> Date: Thu, 06 Apr 2017 08:55:09 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > That introduces a slight difference: in one case #:update-mtab? is not > honored. That said, it’s probably OK to ignore it; maybe leave an “XXX” > comment above just in case. ;-) Ok ! > Can you send a ‘git format-patch’ thing? (Otherwise I could write the > commit log on your behalf.) Sure, I'll send new patches ! I have a follow-up question. Would it be ok to do the same thing for other warnings on syscalls, 'reboot' for example ? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 06 02:56:06 2017 Received: (at 26341) by debbugs.gnu.org; 6 Apr 2017 06:56:06 +0000 Received: from localhost ([127.0.0.1]:34361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw1Kv-000290-RA for submit@debbugs.gnu.org; Thu, 06 Apr 2017 02:56:06 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw1Kt-00028J-SV for 26341@debbugs.gnu.org; Thu, 06 Apr 2017 02:56:04 -0400 Received: by mail-wr0-f193.google.com with SMTP id o21so3316776wrb.3 for <26341@debbugs.gnu.org>; Wed, 05 Apr 2017 23:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=4PAdqTXQZ5KQE1osm9S1VUsNJIqF+NA7wolU5D7z3J4=; b=DTAg6J7ABaaRrnqn+uEFz5HEwdtp68rikunAIs0zkJKjxvOtOASkKdtMB6aAxkoeTx mYJ024YcUrg9QecJjJaAXEo1dAGxFB1X4R6XF4lfORXXFGnbNprePJ9QFY30qd8kzaxX xvglmLOmwkaPE09EOKA3s+Sd4RqEKS+g4Zo5jOPso0mNuWJRB8x+LGWGte/hnFt+1Lsk sPfp9iJ9BOgs8kiuTE0DG0mCRH6LZ2k+G+P01JlndXtS44u3iv0t670EiQWfsgO3IuUJ yG7MI2UykzagYzJ00lupqpik5HSMVJ3gLUW408pe7YrrlQP7jGJf1MIDmHFbCy513fZK VA3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4PAdqTXQZ5KQE1osm9S1VUsNJIqF+NA7wolU5D7z3J4=; b=iFDyBdfsB4GREVPFrs1O8/Bwj8W0npiGgUlDlfS0y6lUtrjEDnQUaiVcocnPvz1o2b FNdDuRbB4iA0JWOXB2Dh1Rd4kbRZ0D3inlv/qp3rk795xc9Ej+zPn68jX32Obl+XRwck xnritga8JQZeCVyCiS+MmH6UDw5YXwwpc7UpYXtuhbi7GfzqmVyR2EQ/zU0TL+HqzZ5Q 3CNefI/oI6nZbomUsbTzqXZSyJcTR0TkDr8l1Edf2AI6nn9qYcD6XBspfAQEkQb9jn7T A4LWDL9YVUqJEM04tnKR+DgETGr5VmsWsqKVKi0Lwh9suJ8IidFY6WbEDJfLrP+xAYC3 namQ== X-Gm-Message-State: AFeK/H32009cMXRibhNzARrZaFXq71ML0d/GjCG3iB3T5dVMbgF5BlG+NrYkvazx6mgAFw== X-Received: by 10.223.164.6 with SMTP id d6mr29602925wra.132.1491461758053; Wed, 05 Apr 2017 23:55:58 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id o196sm25193887wmg.12.2017.04.05.23.55.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 23:55:57 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 1/2] build: syscalls: Allow mount and umount use from static Guile. Date: Thu, 6 Apr 2017 08:55:44 +0200 Message-Id: <20170406065545.20624-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * guix/build/syscalls.scm (mount): Use Guile core mount if called from static Guile, otherwise use FFI based mount implementation. (umount): Ditto. This allows to use (guix build syscalls) from a module independently of calling context. --- guix/build/syscalls.scm | 86 +++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 5aae1530f..4bcb2a871 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -462,47 +462,57 @@ the returned procedure is called." (define UMOUNT_NOFOLLOW 8) (define mount - (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) - (lambda* (source target type #:optional (flags 0) options - #:key (update-mtab? #f)) - "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS -may be a bitwise-or of the MS_* constants, and OPTIONS may be a -string. When FLAGS contains MS_REMOUNT, SOURCE and TYPE are ignored. When -UPDATE-MTAB? is true, update /etc/mtab. Raise a 'system-error' exception on -error." - (let-values (((ret err) - (proc (if source - (string->pointer source) - %null-pointer) - (string->pointer target) - (if type - (string->pointer type) - %null-pointer) - flags - (if options - (string->pointer options) - %null-pointer)))) - (unless (zero? ret) - (throw 'system-error "mount" "mount ~S on ~S: ~A" - (list source target (strerror err)) - (list err))) - (when update-mtab? - (augment-mtab source target type options)))))) + ;; If called from the statically linked Guile, use Guile core 'mount'. + ;; Otherwise, use an FFI binding to define 'mount'. + ;; XXX: '#:update-mtab?' is not implemented by core 'mount'. + (if (module-defined? the-scm-module 'mount) + (module-ref the-scm-module 'mount) + (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) + (lambda* (source target type #:optional (flags 0) options + #:key (update-mtab? #f)) + "Mount device SOURCE on TARGET as a file system TYPE. +Optionally, FLAGS may be a bitwise-or of the MS_* +constants, and OPTIONS may be a string. When FLAGS contains +MS_REMOUNT, SOURCE and TYPE are ignored. When UPDATE-MTAB? is true, +update /etc/mtab. Raise a 'system-error' exception on error." + (let-values (((ret err) + (proc (if source + (string->pointer source) + %null-pointer) + (string->pointer target) + (if type + (string->pointer type) + %null-pointer) + flags + (if options + (string->pointer options) + %null-pointer)))) + (unless (zero? ret) + (throw 'system-error "mount" "mount ~S on ~S: ~A" + (list source target (strerror err)) + (list err))) + (when update-mtab? + (augment-mtab source target type options))))))) (define umount - (let ((proc (syscall->procedure int "umount2" `(* ,int)))) - (lambda* (target #:optional (flags 0) - #:key (update-mtab? #f)) - "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* + ;; If called from the statically linked Guile, use Guile core 'umount'. + ;; Otherwise, use an FFI binding to define 'umount'. + ;; XXX: '#:update-mtab?' is not implemented by core 'umount'. + (if (module-defined? the-scm-module 'umount) + (module-ref the-scm-module 'umount) + (let ((proc (syscall->procedure int "umount2" `(* ,int)))) + (lambda* (target #:optional (flags 0) + #:key (update-mtab? #f)) + "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* constants from ." - (let-values (((ret err) - (proc (string->pointer target) flags))) - (unless (zero? ret) - (throw 'system-error "umount" "~S: ~A" - (list target (strerror err)) - (list err))) - (when update-mtab? - (remove-from-mtab target)))))) + (let-values (((ret err) + (proc (string->pointer target) flags))) + (unless (zero? ret) + (throw 'system-error "umount" "~S: ~A" + (list target (strerror err)) + (list err))) + (when update-mtab? + (remove-from-mtab target))))))) (define (mount-points) "Return the mounts points for currently mounted file systems." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 06 02:56:08 2017 Received: (at 26341) by debbugs.gnu.org; 6 Apr 2017 06:56:08 +0000 Received: from localhost ([127.0.0.1]:34363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw1Ky-000299-5W for submit@debbugs.gnu.org; Thu, 06 Apr 2017 02:56:08 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw1Ku-00028L-JM for 26341@debbugs.gnu.org; Thu, 06 Apr 2017 02:56:04 -0400 Received: by mail-wr0-f195.google.com with SMTP id t20so8437537wra.2 for <26341@debbugs.gnu.org>; Wed, 05 Apr 2017 23:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R13riSafQFMko2fzBpVIJeJiucwFTKneJDY9ZhFypLQ=; b=iuceklsYYHIsklqm6xa9FZH9CvqEQNqfj1om948Y+MOxeP/GvtPj2L1qn99/ozeWSU TS2CDB5E/ORfEp9r+RamXQ9T9Or3eJpD7h4p5zt/qKJuceSfFEIMeU6ZLrwXrrNdNX1j dy0gm7hta9ncy5q9Vgx32A7ke58I1KZBs4mU1c8opnQRFzZB6fcC0bpsZU3Wr4hZ/HHd ZEnJoizRKQQup69YhaPufGT8NkvFOhEBBx/vBm6vOB8UQERXQvwh6iuNmCxCzCwNCuMQ QnE7g2FQOwtzplxulX6zJCiCEP9KiDdZv2pJpcqXLQqeVjD8J9ehFeu4ZBZ1NiR+sS8x I7Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R13riSafQFMko2fzBpVIJeJiucwFTKneJDY9ZhFypLQ=; b=TvfWoC37AckTZOqPSlEWdopten9TJXLLFHrYYihcxTQRKQ+G4KOuYVFwY9IxH/jyrz TO2DspaGwTR1Cktyftkx94l1g1KaVfrzZ8ZCQM5zxidSBPlxkTDC2qS2YDWOOCA+mc4w RJ0oB0LMtHmYFhF1rZh/1TgDl7tLi820esr5NXAmJjvwiy3Z1rNBhbzpaf/8KfFzfxTl EM/aOVljEYJgr9Yy057TDu9+7m7GeB4hXMS/ryPb4WOzcWSUKQ0b7Poh9Ot6PzErr4Cq BKxK0phQerW4dxF3l697KsSF+h3+9LzSgD1C5v+yHx9GmJoUFAIH29jbXmsrds9g+eYZ katg== X-Gm-Message-State: AFeK/H3kgOVi+9bHZqlVIMKqMwG2CZcW1yfnVV9z0Tu+s1ybwBsJ9dGz As2m3sRaSGLZkg== X-Received: by 10.28.35.151 with SMTP id j145mr22177758wmj.50.1491461758899; Wed, 05 Apr 2017 23:55:58 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id o196sm25193887wmg.12.2017.04.05.23.55.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 23:55:58 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 2/2] build: vm: Add missing module. Date: Thu, 6 Apr 2017 08:55:45 +0200 Message-Id: <20170406065545.20624-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170406065545.20624-1-m.othacehe@gmail.com> References: <20170406065545.20624-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/build/vm.scm (define-module): Use module (guix build syscalls). It fixes the following warnings during guix build : gnu/build/vm.scm:233:3: warning: possibly unbound variable `mount' gnu/build/vm.scm:238:3: warning: possibly unbound variable `umount' gnu/build/vm.scm:268:8: warning: possibly unbound variable `mount' gnu/build/vm.scm:276:8: warning: possibly unbound variable `umount' gnu/build/vm.scm:315:4: warning: possibly unbound variable `mount' gnu/build/vm.scm:323:4: warning: possibly unbound variable `umount' This was not possible until commit f05346979 because we had to be sure that Guile core implementation of 'mount' and 'umount' was used in initrd context. --- gnu/build/vm.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 60ee18ebe..44a3000eb 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -21,6 +21,7 @@ (define-module (gnu build vm) #:use-module (guix build utils) #:use-module (guix build store-copy) + #:use-module (guix build syscalls) #:use-module (gnu build linux-boot) #:use-module (gnu build install) #:use-module (guix records) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 06 04:10:38 2017 Received: (at 26341) by debbugs.gnu.org; 6 Apr 2017 08:10:38 +0000 Received: from localhost ([127.0.0.1]:34405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw2V4-000429-97 for submit@debbugs.gnu.org; Thu, 06 Apr 2017 04:10:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw2V2-00041w-Do for 26341@debbugs.gnu.org; Thu, 06 Apr 2017 04:10:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cw2Ut-0004CA-EA for 26341@debbugs.gnu.org; Thu, 06 Apr 2017 04:10:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cw2Ut-0004C6-Ad; Thu, 06 Apr 2017 04:10:27 -0400 Received: from [193.50.110.167] (port=54294 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cw2Us-0007K7-P9; Thu, 06 Apr 2017 04:10:27 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> <86bmsbrvsk.fsf@gmail.com> <86a87vrvpd.fsf@gmail.com> <87efx6lekl.fsf@gnu.org> <8660iif2k4.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Thu, 06 Apr 2017 10:10:24 +0200 In-Reply-To: <8660iif2k4.fsf@gmail.com> (Mathieu Othacehe's message of "Thu, 06 Apr 2017 08:55:09 +0200") Message-ID: <8760ii0xe7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Mathieu Othacehe skribis: >> That introduces a slight difference: in one case #:update-mtab? is not >> honored. That said, it=E2=80=99s probably OK to ignore it; maybe leave = an =E2=80=9CXXX=E2=80=9D >> comment above just in case. ;-) > > Ok ! > >> Can you send a =E2=80=98git format-patch=E2=80=99 thing? (Otherwise I c= ould write the >> commit log on your behalf.) > > Sure, I'll send new patches ! > > I have a follow-up question. Would it be ok to do the same thing for > other warnings on syscalls, 'reboot' for example ? Sure! Likewise for =E2=80=98network-interface-flags=E2=80=99 and =E2=80=98set-network-interface-flags=E2=80=99, which guile-linux-syscalls.p= atch defines in exactly the same way as (guix build syscalls). Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 07 17:36:43 2017 Received: (at 26341) by debbugs.gnu.org; 7 Apr 2017 21:36:43 +0000 Received: from localhost ([127.0.0.1]:36870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwbYf-0005bD-RC for submit@debbugs.gnu.org; Fri, 07 Apr 2017 17:36:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwbYe-0005b0-NA for 26341@debbugs.gnu.org; Fri, 07 Apr 2017 17:36:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwbYU-0008Dt-Ch for 26341@debbugs.gnu.org; Fri, 07 Apr 2017 17:36:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwbYU-0008Dp-9j; Fri, 07 Apr 2017 17:36:30 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:43324 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cwbYT-0002b1-N5; Fri, 07 Apr 2017 17:36:30 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> <86bmsbrvsk.fsf@gmail.com> <86a87vrvpd.fsf@gmail.com> <87efx6lekl.fsf@gnu.org> <8660iif2k4.fsf@gmail.com> <8760ii0xe7.fsf@gnu.org> Date: Fri, 07 Apr 2017 23:36:27 +0200 In-Reply-To: <8760ii0xe7.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 06 Apr 2017 10:10:24 +0200") Message-ID: <871st3uch0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Mathieu Othacehe skribis: > >>> That introduces a slight difference: in one case #:update-mtab? is not >>> honored. That said, it=E2=80=99s probably OK to ignore it; maybe leave= an =E2=80=9CXXX=E2=80=9D >>> comment above just in case. ;-) >> >> Ok ! >> >>> Can you send a =E2=80=98git format-patch=E2=80=99 thing? (Otherwise I = could write the >>> commit log on your behalf.) >> >> Sure, I'll send new patches ! >> >> I have a follow-up question. Would it be ok to do the same thing for >> other warnings on syscalls, 'reboot' for example ? > > Sure! Likewise for =E2=80=98network-interface-flags=E2=80=99 and > =E2=80=98set-network-interface-flags=E2=80=99, which guile-linux-syscalls= .patch defines > in exactly the same way as (guix build syscalls). I=E2=80=99ve applied the first patches in the meantime. I noticed that we get this at boot time (from the initrd): WARNING: (gnu build file-systems): imported module (guix build syscalls) = overrides core binding `mount' To get rid of it, (guix build syscalls) should in fact #:re-export those bindings (or #:replace). Annoying. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 05:24:23 2017 Received: (at 26341) by debbugs.gnu.org; 8 Apr 2017 09:24:23 +0000 Received: from localhost ([127.0.0.1]:37078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwmbX-0007Mr-2M for submit@debbugs.gnu.org; Sat, 08 Apr 2017 05:24:23 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwmbU-0007Mb-UI for 26341@debbugs.gnu.org; Sat, 08 Apr 2017 05:24:21 -0400 Received: by mail-wr0-f195.google.com with SMTP id g19so23005768wrb.0 for <26341@debbugs.gnu.org>; Sat, 08 Apr 2017 02:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=1UqJXhTJB5DXVGwxPW0KKuGX7ARKc3zHP6lVlAkn10c=; b=X1Ob3EeY6GAn1fzIgvNsIC+x33G29FTlvWhYBpkbn+w9Ip3xBYMuJjtpH7kDtmhPSl LGdp4qudlcXNYCemu7Zw+4FQCXjuGPVMjfUoh8nfVHTISOBCrlBlGcWtY6tSq57YCt9k FeRPlilNBH9tslPzHTXGZpCnXhr07xVHhdZQKu+x/5PCB/bQJqIOHS2U+MFFpv00BIv5 OiCS5TUT0tFS3f5x+u2i9HqIwUVejJzUf1ik+6HB9b55DxFqXJsjI0JUlO026JuY7jdI B135UnJ5xQA//p697LPUcln4o0ctA25ESmtrK0O4RfEbfDR2oIMbBnIeigKUq6XN0Gq7 uXZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=1UqJXhTJB5DXVGwxPW0KKuGX7ARKc3zHP6lVlAkn10c=; b=SuF46s+OsAY3pa7U8ql90BNbiFVHRZjGUE7DignRZMasZ51Y+BMQM5N8YVCjmX6HfR 1muc/g4JsEsj7Fkp/g2xec0hSDqlb9ankg+B4AINatN9BllLlkUDTeLQhngVgShBwZXj vTEUaVLmjuRL6m3lwe1HfUi4U5eui9/NFcZ4BFvm0UF9Ry6vWnbh8UHw1EXh+z3aGxq4 chuBTlx081Ip92oriTFBwddpWz4B1OuCI9JRxBh7VhgPpfBjiRIyUn8aeg0geXy9YDqH ARvk9cG/QfJBYwMye2ZdpeXC1oTBufFCmlsuykkK3Yzmcv7KDjn1NgS93WGCZIeNudhR A6ug== X-Gm-Message-State: AN3rC/55UmEVyJhf8r3EMZWTg9CSkZ9AWPBzRj9NFCXC0yYnPqapuhcfHhurtB1ZJjvgiA== X-Received: by 10.223.133.133 with SMTP id 5mr2660192wrt.83.1491643455017; Sat, 08 Apr 2017 02:24:15 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id v14sm9183905wra.65.2017.04.08.02.24.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Apr 2017 02:24:14 -0700 (PDT) References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> <86bmsbrvsk.fsf@gmail.com> <86a87vrvpd.fsf@gmail.com> <87efx6lekl.fsf@gnu.org> <8660iif2k4.fsf@gmail.com> <8760ii0xe7.fsf@gnu.org> <871st3uch0.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26341: [PATCH] build: vm: Add missing module. In-reply-to: <871st3uch0.fsf@gnu.org> Date: Sat, 08 Apr 2017 11:24:13 +0200 Message-ID: <87inmf1cci.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Ludo, > To get rid of it, (guix build syscalls) should in fact #:re-export those > bindings (or #:replace). Annoying. Thanks for applying. Yes I saw, I'll propose a serie soon that fixes all those warnings at compilation time and run-time. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 12:03:42 2017 Received: (at 26341) by debbugs.gnu.org; 8 Apr 2017 16:03:42 +0000 Received: from localhost ([127.0.0.1]:38325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwspy-0004L0-Gy for submit@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:42 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwspx-0004Kd-4q for 26341@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:41 -0400 Received: by mail-wr0-f195.google.com with SMTP id t20so23809919wra.2 for <26341@debbugs.gnu.org>; Sat, 08 Apr 2017 09:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=iHuCHlLhfH2jFnS1TKUrlfUEEL7DXceNpwQMrVIhkA8=; b=RL2xBiv/DkyOYYpxUmi6CsvvUNUnozB5GYSvPpZphq70TMR54TgDCJUKbKGtIzRloH vz/kmS0DkhYZtHoQddcUXbOAiJATLFJcm0ofnCmYLwL7wIcYI4aqw8y7VCZXYmfvRNAG Dj+cuzjPfqchY+Fnjm7sPK+FMwIF2hD2Yy1Uqo2fNIBvuj7scoCwcKah/4TODvQOY7Q8 97zcrw9fXzKnbZn9yQs6PdslZMpjxnBcsXzTW7kdt+BuAiyWa8AwFyv/8ZmCsLh7BlHG sqkucWv9q+rqPKfwpwj5Nift4ASbOkJ5p3asaYZ8Z/y74wEYdadlVFNc3jQ0LY4WHvNl 9oag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iHuCHlLhfH2jFnS1TKUrlfUEEL7DXceNpwQMrVIhkA8=; b=RMW0cNnGOUTxgTlBFG81d7GbaXwlVy/hLyetsJ/wxV1KCKn5p8jm41kVhJoZGhSHu0 Xq20X7rQmfqX9/Nosk/UU9fM1HXIfw9RRJEvSJ2rANGlBcGcBt2UloFkmmJq38U5qwSf M5lUkLCxVUUvmmNBg0MUhQBw4ZHUE0m1RXxBGGGLbFkn77ieOvcUua7hP9kcT8hkqZBP hcL03YGV4UTOYEQ9CvEXz/OfDxuODJryVCkReZg9SI5zT5MbLM8Y9I1L3CXtDL+Gsll3 9UMh/0Gg/hfILTv690b/StBaMwCpug9B3ENLhITH0uBq54PZSjIQp38KOhPnxZ34ia7v W4+w== X-Gm-Message-State: AFeK/H27+ohBP4iPbPhgSfZnOvZjYj07ROu//tV6KoO8T9hI1seiodgwKqqpKcgkfQHrFA== X-Received: by 10.223.139.142 with SMTP id o14mr40612229wra.9.1491667415543; Sat, 08 Apr 2017 09:03:35 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id k13sm3182493wmi.28.2017.04.08.09.03.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 09:03:34 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 0/5] Fix warnings related to syscalls in static Guile. Date: Sat, 8 Apr 2017 18:03:24 +0200 Message-Id: <20170408160329.4068-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This serie fixes the remaining warnings both at compilation and during initrd execution. Thank you, Mathieu Mathieu Othacehe (5): build: syscalls: Add reboot. build: syscalls: Allow use to network-interface syscalls independently of calling context. build: syscalls: Add mount and umount to #:replace list. build: syscalls: Add load-linux-module. build: Fix compilation warnings. gnu/build/file-systems.scm | 15 +-- gnu/build/linux-boot.scm | 2 + gnu/build/linux-modules.scm | 2 + guix/build/syscalls.scm | 258 +++++++++++++++++++++++++++----------------- 4 files changed, 163 insertions(+), 114 deletions(-) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 12:03:43 2017 Received: (at 26341) by debbugs.gnu.org; 8 Apr 2017 16:03:44 +0000 Received: from localhost ([127.0.0.1]:38328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwspz-0004LD-MT for submit@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:43 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:33578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwspy-0004Kf-1h for 26341@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:42 -0400 Received: by mail-wr0-f176.google.com with SMTP id g19so81340005wrb.0 for <26341@debbugs.gnu.org>; Sat, 08 Apr 2017 09:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ALVHpUAJvWunDr2kUB4DTHiBxb5/LtRojhtTYLpKSJI=; b=X0t6zL8CY2xOZC6ul3chKiH4KLxidmMIkXiVeg8Ts7/fAJuO3+mbw1DxtxYdEQStEn JmrSSppXd7VoiNur1l+00vMmD90gx/2VRPsnY8gjUehPZUlvICH3QIZ448fKhzhmGyDD 711RcJ+puIJON/1NkPZr/qWMXKkoXjWmdCpW67HInRavq1vXeAu2z8ILt4qtq9qELAUu 15oQU+cLGFSCqR8jkYSs8Fx2ff5mCSXX4mF+yA2CiSYBH3YhAdlyIibI8EAEahx++8Yl kiy5XR4sfYMmD6F1QeM/HFUQ6nX01/dHLN2x7RKrv6mH0Vjb3BFXs0pdxll5vtTi/unr TzAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ALVHpUAJvWunDr2kUB4DTHiBxb5/LtRojhtTYLpKSJI=; b=cqzBb0M+9wxcqIC11X+zpUD/CgwP+2SOWXn4OLZqevv0QBjOAaRAfnKT+dIVch/YvJ 5AamJJyQErOu1yOY3I/Di+B6aKQvvZw2ARWazIi/E/X0FOr1z7BkovtZD6ce+PITrfZo +qS0MwklDAnZiA2tW6XiNGNq5zOaNE2s91iQ2cw6MiocmfMkp4Mp4puzkwPXXIFw3UMt vb9zJj8/SNYQYSxTH1B0MQrtIhaLODsL8bU+2eWblMELdnOFNsrkpIczb1hbJiW9jbgO S6GjqUHqqXE8XCIkecJwxlU9WCg1/xABtUAFD9ey9kC01VTrBX0YMgSyE5zDgf7EUaCw 5T4w== X-Gm-Message-State: AFeK/H1NRPjB+juW/aw/Pl4MF8xy9Yy3XQfY8P8wYmUBAUbj0ZPdf9Hycg0N05juKR2TRA== X-Received: by 10.223.178.131 with SMTP id g3mr21956230wrd.12.1491667416396; Sat, 08 Apr 2017 09:03:36 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id k13sm3182493wmi.28.2017.04.08.09.03.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 09:03:35 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 1/5] build: syscalls: Add reboot. Date: Sat, 8 Apr 2017 18:03:25 +0200 Message-Id: <20170408160329.4068-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170408160329.4068-1-m.othacehe@gmail.com> References: <20170408160329.4068-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * guix/build/syscalls.scm (static-or-ffi): New macro. Used to dispatch between static Guile core implementation and FFI version. (reboot): New export procedure. Reimplemented from guile-linux-syscalls.patch. (RB_AUTOBOOT, ..., RB_KEXEC): New exported flags replacing static Guile flags. --- guix/build/syscalls.scm | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 4bcb2a871..af5ec4b6a 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2015 David Thompson ;;; Copyright © 2015 Mark H Weaver +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -144,7 +145,15 @@ utmpx-address login-type utmpx-entries - (read-utmpx-from-port . read-utmpx))) + (read-utmpx-from-port . read-utmpx)) + #:replace (RB_AUTOBOOT + RB_HALT_SYSTEM + RB_ENABLED_CAD + RB_DISABLE_CAD + RB_POWER_OFF + RB_SW_SUSPEND + RB_KEXEC + reboot)) ;;; Commentary: ;;; @@ -409,6 +418,13 @@ the returned procedure is called." (error (format #f "~a: syscall->procedure failed: ~s" name args)))))) +(define-syntax-rule (static-or-ffi symbol ffi-procedure) + "If SYMBOL is defined in the core Guile module, return the associated +procedure, otherwise return FFI-PROCEDURE." + (if (module-defined? the-scm-module symbol) + (module-ref the-scm-module symbol) + ffi-procedure)) + ;;; ;;; File systems. @@ -547,6 +563,24 @@ constants from ." (list device (strerror err)) (list err))))))) +(define RB_AUTOBOOT #x01234567) +(define RB_HALT_SYSTEM #xcdef0123) +(define RB_ENABLED_CAD #x89abcdef) +(define RB_DISABLE_CAD 0) +(define RB_POWER_OFF #x4321fedc) +(define RB_SW_SUSPEND #xd000fce2) +(define RB_KEXEC #x45584543) + +(define reboot + (static-or-ffi + 'reboot + (let ((proc (syscall->procedure int "reboot" (list int)))) + (lambda* (#:optional (cmd RB_AUTOBOOT)) + (let-values (((ret err) (proc cmd))) + (unless (zero? ret) + (throw 'system-error "reboot" "~S: ~A" + (list cmd (strerror err)) + (list err)))))))) (define (kernel? pid) "Return #t if PID designates a \"kernel thread\" rather than a normal user-land process." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 12:03:46 2017 Received: (at 26341) by debbugs.gnu.org; 8 Apr 2017 16:03:46 +0000 Received: from localhost ([127.0.0.1]:38332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwsq1-0004LW-VX for submit@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:46 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:33160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwspy-0004Kh-W3 for 26341@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:43 -0400 Received: by mail-wr0-f194.google.com with SMTP id g19so23847235wrb.0 for <26341@debbugs.gnu.org>; Sat, 08 Apr 2017 09:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7wDIgepsrMcM5yU8+NTnVkgePwO6uI1Vu3oTobNzjLI=; b=ElB0Y0997e1g+2ahc7GzFaFeTU73j+ijCXWJ4GPKiHUVUNCgh4nzwsa15VTNIeA3kT MFwg3gBXWs7r2kWmSX49nrRXN/iXyUAuZTWC+S73s82S4kTpmym7HAATmMBQZtVRSZGz Fuhh0KdjNJYIeI2yff4feyXStwd4jjlMoixxrc6qkUgNd9n5H4v3A0d+bLLRIGq5HIad PwfBQFwjoV/NDWhyRHEr9LQDR/nouwzf+txu6lPSvxVOvdfQu5NsKWEGycT98sbwTbsV kxnej2sAenjwSz+WkwCd28Hsa4wDIz2/tkZS/ppCtIAz9FUg2w+CiLjxgqHaW64hZxGJ 8Dlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7wDIgepsrMcM5yU8+NTnVkgePwO6uI1Vu3oTobNzjLI=; b=QXdz6Po7+XE+NiuluxP6kurzQY/JCbmiXfgJlSp0XIkR6n6poPx+o4nnYkYrVcZ6ny AQuJoQn9dASHwhebQukqr/gduu4izp8ApQBoddsuj7YYv4FblTfbjC1TfoA4cGfQRQ1L atpiDcuWZLlpYpbzR/Z407vrJ6JCNhmoXSWM6zfCVTCaq93ENzv3jRKqjvAMzGXaLmNn BUKYXUNQJgFas/sREdOsLuG70r9LQXvTZQbDKJ/Xx/IVfMvEyJW6lfUruBxJLxPRSUIs EdbYDM2IkGIAt/ZlUBgwpFcDy1wzXdjZ3/w0RU+ey4w2NPZqy6cD8F3nmFfwas+p8rVY WQeg== X-Gm-Message-State: AFeK/H3CfAt217KqjzeYx/EynKPFD0lTC2C78lVDznkv0B9rS9Lg3/oG6EaF3aYXcknaCA== X-Received: by 10.223.134.50 with SMTP id 47mr38956739wrv.50.1491667417290; Sat, 08 Apr 2017 09:03:37 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id k13sm3182493wmi.28.2017.04.08.09.03.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 09:03:36 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 2/5] build: syscalls: Allow use to network-interface syscalls independently of calling context. Date: Sat, 8 Apr 2017 18:03:26 +0200 Message-Id: <20170408160329.4068-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170408160329.4068-1-m.othacehe@gmail.com> References: <20170408160329.4068-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * guix/build/syscalls.scm (network-interface-flags): Use static-or-ffi macro and add to #:replace list. (set-network-interface-flags): Ditto. (set-network-interface-address): Ditto. (IFF_UP, IFF_BROADCAST and IFF_LOOPBACK): Move from #:export to #:replace. --- guix/build/syscalls.scm | 123 ++++++++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 57 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index af5ec4b6a..6afbfb86e 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -84,17 +84,11 @@ PF_PACKET AF_PACKET - IFF_UP - IFF_BROADCAST - IFF_LOOPBACK all-network-interface-names network-interface-names - network-interface-flags network-interface-netmask loopback-network-interface? network-interface-address - set-network-interface-flags - set-network-interface-address set-network-interface-netmask set-network-interface-up configure-network-interface @@ -153,7 +147,13 @@ RB_POWER_OFF RB_SW_SUSPEND RB_KEXEC - reboot)) + reboot + IFF_UP + IFF_BROADCAST + IFF_LOOPBACK + network-interface-flags + set-network-interface-flags + set-network-interface-address)) ;;; Commentary: ;;; @@ -1066,26 +1066,29 @@ that are not up." (else (loop interfaces)))))))) -(define (network-interface-flags socket name) - "Return a number that is the bit-wise or of 'IFF*' flags for network +(define network-interface-flags + (static-or-ffi + 'network-interface-flags + (lambda (socket name) + "Return a number that is the bit-wise or of 'IFF*' flags for network interface NAME." - (let ((req (make-bytevector ifreq-struct-size))) - (bytevector-copy! (string->utf8 name) 0 req 0 - (min (string-length name) (- IF_NAMESIZE 1))) - (let-values (((ret err) - (%ioctl (fileno socket) SIOCGIFFLAGS - (bytevector->pointer req)))) - (if (zero? ret) - - ;; The 'ifr_flags' field is IF_NAMESIZE bytes after the beginning of - ;; 'struct ifreq', and it's a short int. - (bytevector-sint-ref req IF_NAMESIZE (native-endianness) - (sizeof short)) - - (throw 'system-error "network-interface-flags" - "network-interface-flags on ~A: ~A" - (list name (strerror err)) - (list err)))))) + (let ((req (make-bytevector ifreq-struct-size))) + (bytevector-copy! (string->utf8 name) 0 req 0 + (min (string-length name) (- IF_NAMESIZE 1))) + (let-values (((ret err) + (%ioctl (fileno socket) SIOCGIFFLAGS + (bytevector->pointer req)))) + (if (zero? ret) + + ;; The 'ifr_flags' field is IF_NAMESIZE bytes after the + ;; beginning of 'struct ifreq', and it's a short int. + (bytevector-sint-ref req IF_NAMESIZE (native-endianness) + (sizeof short)) + + (throw 'system-error "network-interface-flags" + "network-interface-flags on ~A: ~A" + (list name (strerror err)) + (list err)))))))) (define (loopback-network-interface? name) "Return true if NAME designates a loopback network interface." @@ -1094,38 +1097,44 @@ interface NAME." (close-port sock) (not (zero? (logand flags IFF_LOOPBACK))))) -(define (set-network-interface-flags socket name flags) - "Set the flag of network interface NAME to FLAGS." - (let ((req (make-bytevector ifreq-struct-size))) - (bytevector-copy! (string->utf8 name) 0 req 0 - (min (string-length name) (- IF_NAMESIZE 1))) - ;; Set the 'ifr_flags' field. - (bytevector-uint-set! req IF_NAMESIZE flags (native-endianness) - (sizeof short)) - (let-values (((ret err) - (%ioctl (fileno socket) SIOCSIFFLAGS - (bytevector->pointer req)))) - (unless (zero? ret) - (throw 'system-error "set-network-interface-flags" - "set-network-interface-flags on ~A: ~A" - (list name (strerror err)) - (list err)))))) +(define set-network-interface-flags + (static-or-ffi + 'set-network-interface-flags + (lambda (socket name flags) + "Set the flag of network interface NAME to FLAGS." + (let ((req (make-bytevector ifreq-struct-size))) + (bytevector-copy! (string->utf8 name) 0 req 0 + (min (string-length name) (- IF_NAMESIZE 1))) + ;; Set the 'ifr_flags' field. + (bytevector-uint-set! req IF_NAMESIZE flags (native-endianness) + (sizeof short)) + (let-values (((ret err) + (%ioctl (fileno socket) SIOCSIFFLAGS + (bytevector->pointer req)))) + (unless (zero? ret) + (throw 'system-error "set-network-interface-flags" + "set-network-interface-flags on ~A: ~A" + (list name (strerror err)) + (list err)))))))) -(define (set-network-interface-address socket name sockaddr) - "Set the address of network interface NAME to SOCKADDR." - (let ((req (make-bytevector ifreq-struct-size))) - (bytevector-copy! (string->utf8 name) 0 req 0 - (min (string-length name) (- IF_NAMESIZE 1))) - ;; Set the 'ifr_addr' field. - (write-socket-address! sockaddr req IF_NAMESIZE) - (let-values (((ret err) - (%ioctl (fileno socket) SIOCSIFADDR - (bytevector->pointer req)))) - (unless (zero? ret) - (throw 'system-error "set-network-interface-address" - "set-network-interface-address on ~A: ~A" - (list name (strerror err)) - (list err)))))) +(define set-network-interface-address + (static-or-ffi + 'set-network-interface-address + (lambda (socket name sockaddr) + "Set the address of network interface NAME to SOCKADDR." + (let ((req (make-bytevector ifreq-struct-size))) + (bytevector-copy! (string->utf8 name) 0 req 0 + (min (string-length name) (- IF_NAMESIZE 1))) + ;; Set the 'ifr_addr' field. + (write-socket-address! sockaddr req IF_NAMESIZE) + (let-values (((ret err) + (%ioctl (fileno socket) SIOCSIFADDR + (bytevector->pointer req)))) + (unless (zero? ret) + (throw 'system-error "set-network-interface-address" + "set-network-interface-address on ~A: ~A" + (list name (strerror err)) + (list err)))))))) (define (set-network-interface-netmask socket name sockaddr) "Set the network mask of interface NAME to SOCKADDR." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 12:03:46 2017 Received: (at 26341) by debbugs.gnu.org; 8 Apr 2017 16:03:47 +0000 Received: from localhost ([127.0.0.1]:38334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwsq2-0004LY-Ed for submit@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:46 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwspz-0004Ki-W4 for 26341@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:44 -0400 Received: by mail-wr0-f193.google.com with SMTP id t20so23810003wra.2 for <26341@debbugs.gnu.org>; Sat, 08 Apr 2017 09:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nqNszOorBWOiwn8XfedP6H3L2wjSNh/H5meGyT4kvNA=; b=gxn6rWNB78OGFpTauNNyVdUoQco3yPojVzJYUaHRC6QJHsuxBVoyAn+PbmNRYxiOQP 0UPDEQJMCYfyQwhbnef0YNpZTAV2EPGufr4W5DrhGmeE6otnWLr98mOGYwK018HfFmdt xNG40b+R2Rg421TJxqahufHkiXojGwsqIaZriGSZvC8zQp7HNHDzhW48qcOUwnewHFZx HrpGjL64bGzc/vaiqO5+HLpuTatRaTXk8ucCB3cOrixLYErhYY0TB8UKqU9CgpvmHaiE zv48rlZfSX65BwfDir/XmuJReR4+55gczHbEVQQZ5w5GuhjfsSXicn+v9T4VuXXorhAA Pegg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nqNszOorBWOiwn8XfedP6H3L2wjSNh/H5meGyT4kvNA=; b=KFULOD4RvlsWak5yQfdTUmACZDnooa0iiPbuLmhWat0kNfcx/t2waiu3xT4BHEgPWC 61xswQfd+nbEWvyvrnQRBExuAT7XnYrNzIVzj8OLxV2z7fOsjJIu0xyFwUB1TdWe29ih q1zTVBnvLX77fSDLn85FfF9V5ewyKD7smBTp6b+Lcb3WVYtP2PqhzIQuTekVOxOb0s6B ltkkJMTGvWvc0Misf7LdHAybud5VGdIqtRGzvhH83qg3IhROwLoVUAvboVyj+ovY6qI3 H5nmlB4eDPyQtIt+ZFpnYzOSBmX++wpBy7ehPYBtHhfxzIHl3purYS3FC+SoSe3gy7i6 fBVA== X-Gm-Message-State: AFeK/H3+nKCXLVTgcKHgKlU8VYs+R4v17tMJrW7gey+t5VOdOWQTeff2QLB/aVU0auuW9w== X-Received: by 10.223.168.23 with SMTP id l23mr17627773wrc.185.1491667418209; Sat, 08 Apr 2017 09:03:38 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id k13sm3182493wmi.28.2017.04.08.09.03.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 09:03:37 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 3/5] build: syscalls: Add mount and umount to #:replace list. Date: Sat, 8 Apr 2017 18:03:27 +0200 Message-Id: <20170408160329.4068-4-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170408160329.4068-1-m.othacehe@gmail.com> References: <20170408160329.4068-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * guix/build/syscalls.scm (mount): Use static-or-ffi macro and move from #:export list to #:replace list. (umount): Ditto. --- guix/build/syscalls.scm | 86 +++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 45 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 6afbfb86e..42071e7b1 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -45,8 +45,6 @@ MNT_EXPIRE UMOUNT_NOFOLLOW restart-on-EINTR - mount - umount mount-points swapon swapoff @@ -140,7 +138,9 @@ login-type utmpx-entries (read-utmpx-from-port . read-utmpx)) - #:replace (RB_AUTOBOOT + #:replace (mount + umount + RB_AUTOBOOT RB_HALT_SYSTEM RB_ENABLED_CAD RB_DISABLE_CAD @@ -478,57 +478,53 @@ procedure, otherwise return FFI-PROCEDURE." (define UMOUNT_NOFOLLOW 8) (define mount - ;; If called from the statically linked Guile, use Guile core 'mount'. - ;; Otherwise, use an FFI binding to define 'mount'. ;; XXX: '#:update-mtab?' is not implemented by core 'mount'. - (if (module-defined? the-scm-module 'mount) - (module-ref the-scm-module 'mount) - (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) - (lambda* (source target type #:optional (flags 0) options - #:key (update-mtab? #f)) - "Mount device SOURCE on TARGET as a file system TYPE. + (static-or-ffi + 'mount + (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) + (lambda* (source target type #:optional (flags 0) options + #:key (update-mtab? #f)) + "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS may be a bitwise-or of the MS_* constants, and OPTIONS may be a string. When FLAGS contains MS_REMOUNT, SOURCE and TYPE are ignored. When UPDATE-MTAB? is true, update /etc/mtab. Raise a 'system-error' exception on error." - (let-values (((ret err) - (proc (if source - (string->pointer source) - %null-pointer) - (string->pointer target) - (if type - (string->pointer type) - %null-pointer) - flags - (if options - (string->pointer options) - %null-pointer)))) - (unless (zero? ret) - (throw 'system-error "mount" "mount ~S on ~S: ~A" - (list source target (strerror err)) - (list err))) - (when update-mtab? - (augment-mtab source target type options))))))) + (let-values (((ret err) + (proc (if source + (string->pointer source) + %null-pointer) + (string->pointer target) + (if type + (string->pointer type) + %null-pointer) + flags + (if options + (string->pointer options) + %null-pointer)))) + (unless (zero? ret) + (throw 'system-error "mount" "mount ~S on ~S: ~A" + (list source target (strerror err)) + (list err))) + (when update-mtab? + (augment-mtab source target type options))))))) (define umount - ;; If called from the statically linked Guile, use Guile core 'umount'. - ;; Otherwise, use an FFI binding to define 'umount'. ;; XXX: '#:update-mtab?' is not implemented by core 'umount'. - (if (module-defined? the-scm-module 'umount) - (module-ref the-scm-module 'umount) - (let ((proc (syscall->procedure int "umount2" `(* ,int)))) - (lambda* (target #:optional (flags 0) - #:key (update-mtab? #f)) - "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* + (static-or-ffi + 'umount + (let ((proc (syscall->procedure int "umount2" `(* ,int)))) + (lambda* (target #:optional (flags 0) + #:key (update-mtab? #f)) + "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* constants from ." - (let-values (((ret err) - (proc (string->pointer target) flags))) - (unless (zero? ret) - (throw 'system-error "umount" "~S: ~A" - (list target (strerror err)) - (list err))) - (when update-mtab? - (remove-from-mtab target))))))) + (let-values (((ret err) + (proc (string->pointer target) flags))) + (unless (zero? ret) + (throw 'system-error "umount" "~S: ~A" + (list target (strerror err)) + (list err))) + (when update-mtab? + (remove-from-mtab target))))))) (define (mount-points) "Return the mounts points for currently mounted file systems." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 12:03:48 2017 Received: (at 26341) by debbugs.gnu.org; 8 Apr 2017 16:03:48 +0000 Received: from localhost ([127.0.0.1]:38337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwsq3-0004Lr-Uv for submit@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:48 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwsq1-0004Kl-66 for 26341@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:45 -0400 Received: by mail-wm0-f68.google.com with SMTP id x75so2844359wma.1 for <26341@debbugs.gnu.org>; Sat, 08 Apr 2017 09:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I//oRUAVYQla22xU3LA6DpWu4qfphN12Klb/pOT2Wcc=; b=TS+fqOIIHs2m8uoK8Q/oox7qablcenmMyDEMxcYxMfbPGER7g66LgBPkfEzlkTbim4 bCoLqaB1HzNKOvJqKa+qeC73I7AKFarsE9aRserNWJGk5ee63ZKb4GXQDZIYopw8Tt8M Bp5PtjmBuhbt4EBNq2k9i2iKxmoa3BUZbnOo5CT732U3sUoVQk/VsUbhf1j/XnC+L0KD 1Z46byErZuoyTvWLWNu9Y7xcZSqfWD7c0ls4I3OpFtf4phJqmcVNu9hf9n7kvfBKAX/h iAqHR13QUQbZFMkpAa4STry8ep+u4nTjP9PQYryflNY6rvljoWBmdR1TD7iVsEuSi/8h Iliw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=I//oRUAVYQla22xU3LA6DpWu4qfphN12Klb/pOT2Wcc=; b=Yir0QcY6rmwOLJfQIJ49DpSNJosiTKMZ4ZI+kIDrcp7Yjna8+G72TsxjzpGb4M9TIG heSjZMRdePayLMyfRLuQnZZ5yBtxUkW+MImhX0CNSW35i2D17fW/93LQbPSH5KGvdKuz X865HBZsqQQTZxHy3Bke9ivklwxa8MU4NIxLZ+NwndW456hXfuLTq8LOOI5QFZ3vratZ xUrnLPJBG4SzZxL3G4ckWgU4UewNKl+jhf9eMGILARyHct6+JzAa12KxBtlfN/bZhMmV bUfmgmY/OEaxbisibq3pNDjZQ7nCvhR+aV61/FJ0ihfq4GecpTerznNhLiesOtm7PVoY c3BQ== X-Gm-Message-State: AN3rC/5Z0Ekh5iftpcTLm6sMcK/DtBDrFsZOL8iDPtYQnQBGmA78j19y 9bcR88wWzQqcPg== X-Received: by 10.28.18.207 with SMTP id 198mr3994789wms.133.1491667419560; Sat, 08 Apr 2017 09:03:39 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id k13sm3182493wmi.28.2017.04.08.09.03.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 09:03:38 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 4/5] build: syscalls: Add load-linux-module. Date: Sat, 8 Apr 2017 18:03:28 +0200 Message-Id: <20170408160329.4068-5-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170408160329.4068-1-m.othacehe@gmail.com> References: <20170408160329.4068-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * guix/build/syscalls.scm (load-linux-module): New procedure. Reimplemented from guile-linux-syscalls.patch. Add to #:replace list. --- guix/build/syscalls.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 42071e7b1..14d97fb61 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -148,6 +148,7 @@ RB_SW_SUSPEND RB_KEXEC reboot + load-linux-module IFF_UP IFF_BROADCAST IFF_LOOPBACK @@ -577,6 +578,22 @@ constants from ." (throw 'system-error "reboot" "~S: ~A" (list cmd (strerror err)) (list err)))))))) + +(define load-linux-module + (static-or-ffi + 'load-linux-module + (let ((proc (syscall->procedure int "init_module" + (list '* unsigned-long '*)))) + (lambda* (data #:optional (options "")) + (let-values (((ret err) + (proc (bytevector->pointer data) + (bytevector-length data) + (string->pointer options)))) + (unless (zero? ret) + (throw 'system-error "load-linux-module" "~A" + (list (strerror err)) + (list err)))))))) + (define (kernel? pid) "Return #t if PID designates a \"kernel thread\" rather than a normal user-land process." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 12:03:48 2017 Received: (at 26341) by debbugs.gnu.org; 8 Apr 2017 16:03:48 +0000 Received: from localhost ([127.0.0.1]:38339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwsq4-0004Lu-5c for submit@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:48 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:38607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwsq2-0004Ko-D7 for 26341@debbugs.gnu.org; Sat, 08 Apr 2017 12:03:47 -0400 Received: by mail-wm0-f41.google.com with SMTP id t189so10903234wmt.1 for <26341@debbugs.gnu.org>; Sat, 08 Apr 2017 09:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AosKn5rhjaVafS/SiS59MZlQVLsfcfgFwqIgQXqbGKk=; b=eh+6Si11qQU4+ICfPYwQqy7ihYfrTPxWPFFqdC1h/RtYiYTus8k0adot+33X7NOpWU hAhhOh1Mgiz4JKtBmwXD17BTynlpLGxz+1LrC0Lbv/1havAqKYO8NBj0EZGWab0F0J60 vJ6EN8a5BnEkAolrdohkVDmEznThqAbL19iPKHExWjMrpBSvAQY3AdZ2Pv2E70he0M2I K+R8SJSvpl+xOWz7ancqE3h1n9TmysnD4Rs68nYE4CQbw1FvH70f9NwmMyNIhiK830c1 /I4tu8HfekAK7gHJWPDeoj358sFDHqBCx3TMCwDrIti25cK8OnPi4/Wh6Rok8QY4MLjJ 3+CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AosKn5rhjaVafS/SiS59MZlQVLsfcfgFwqIgQXqbGKk=; b=budM1LpwhUn732e9WRgGSbFPVI+qeJeO7Y/9rJhEJWAAiknZVANgLm+a3bjESpcxLI w4+r2OND+TLV1MJe2XMyKzJoMm3R9XiZKYC+huDXJ7xxGaRDMHnZaHoWEQBti+86ex6n xEsfOaDKTNUOZLxt0FrQ7uK1V+rlk7SeqH5W73E4zk0czvWYJ3SqHmWKgnwAYTtrEhgk 36ZwCLrWUD5kKW5onXL+rY5sK1lCq1SHdmh1/aVEWsy6YXdZwPW2/B0A2GhKTWzVRuWG hIYYxtIQMa4LNymN2iq+ylOjOagnOSCu2LQXnAzsBuOFTF+vG8x95ELfCAWZ2MUZfeD/ Mwzg== X-Gm-Message-State: AN3rC/5wYgsE76iepvR/Uvhn+nTfxMVWW3JtboLicQv9zCbukDvKlR9B LoRfluzbW0CDmIA7 X-Received: by 10.28.34.6 with SMTP id i6mr3629410wmi.41.1491667420615; Sat, 08 Apr 2017 09:03:40 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id k13sm3182493wmi.28.2017.04.08.09.03.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 09:03:39 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 5/5] build: Fix compilation warnings. Date: Sat, 8 Apr 2017 18:03:29 +0200 Message-Id: <20170408160329.4068-6-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170408160329.4068-1-m.othacehe@gmail.com> References: <20170408160329.4068-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/build/linux-boot.scm (define-module): Use (guix build syscalls). * gnu/build/linux-modules.scm (define-module): Ditto. * gnu/build/file-systems (define-module): Stop re-exporting mount, umount and MS_* flags as this is now safe to include (guix build syscalls) instead. (mount): Remove procedure. (umount): Ditto. --- gnu/build/file-systems.scm | 15 ++------------- gnu/build/linux-boot.scm | 2 ++ gnu/build/linux-modules.scm | 2 ++ 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index fe98df95d..eb9f07861 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2016, 2017 David Craven +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,12 +48,7 @@ mount-flags->bit-mask check-file-system - mount-file-system) - #:re-export (mount - umount - MS_BIND - MS_MOVE - MS_RDONLY)) + mount-file-system)) ;;; Commentary: ;;; @@ -61,13 +57,6 @@ ;;; ;;; Code: -;; 'mount' is already defined in the statically linked Guile used for initial -;; RAM disks, in which case the bindings in (guix build syscalls) do not work -;; (the FFI bindings do not work there). Override them in that case. -(when (module-defined? the-scm-module 'mount) - (set! mount (@ (guile) mount)) - (set! umount (@ (guile) umount))) - (define (bind-mount source target) "Bind-mount SOURCE at TARGET." (mount source target "" MS_BIND)) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index c34a3f7c1..360ef3fae 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 ftw) #:use-module (guix build utils) + #:use-module (guix build syscalls) #:use-module (gnu build linux-modules) #:use-module (gnu build file-systems) #:export (mount-essential-file-systems diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm index d7feb3a08..5ca7bf8e3 100644 --- a/gnu/build/linux-modules.scm +++ b/gnu/build/linux-modules.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2016 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,6 +19,7 @@ (define-module (gnu build linux-modules) #:use-module (guix elf) + #:use-module (guix build syscalls) #:use-module (rnrs io ports) #:use-module (rnrs bytevectors) #:use-module (srfi srfi-1) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 05:42:31 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 09:42:31 +0000 Received: from localhost ([127.0.0.1]:40560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxVqB-0000j7-DZ for submit@debbugs.gnu.org; Mon, 10 Apr 2017 05:42:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxVqA-0000ir-5C for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 05:42:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxVq0-0004nt-79 for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 05:42:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxVq0-0004np-35; Mon, 10 Apr 2017 05:42:20 -0400 Received: from [193.50.110.120] (port=50000 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cxVpz-0004v2-G1; Mon, 10 Apr 2017 05:42:19 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH 1/5] build: syscalls: Add reboot. References: <20170408160329.4068-1-m.othacehe@gmail.com> <20170408160329.4068-2-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Mon, 10 Apr 2017 11:42:16 +0200 In-Reply-To: <20170408160329.4068-2-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sat, 8 Apr 2017 18:03:25 +0200") Message-ID: <87lgr8fvk7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi Mathieu, Mathieu Othacehe skribis: > * guix/build/syscalls.scm (static-or-ffi): New macro. Used to dispatch be= tween > static Guile core implementation and FFI version. > (reboot): New export procedure. Reimplemented from guile-linux-syscalls.p= atch. > (RB_AUTOBOOT, ..., RB_KEXEC): New exported flags replacing static Guile f= lags. [...] > + #:replace (RB_AUTOBOOT > + RB_HALT_SYSTEM > + RB_ENABLED_CAD > + RB_DISABLE_CAD > + RB_POWER_OFF > + RB_SW_SUSPEND > + RB_KEXEC > + reboot)) The problem is that we cannot #:replace unconditionally (when not using the patched Guile, there=E2=80=99s nothing to replace=C2=B9). So perhaps we should remove #:export, #:replace, and #:re-export for =E2=80=98mount=E2=80=99 & co, and instead have a macro like this: (define-syntax define-as-needed (syntax-rules () "Define VARIABLE. If VARIABLE already exists in (guile) then re-expo= rt it, otherwise export the newly-defined VARIABLE." ((_ (proc args ...) body ...) (define-as-needed proc (lambda (args ...) body ...))) ((_ variable value) (begin (when (module-defined? the-scm-module 'variable) (re-export variable)) (define variable (if (module-defined? the-scm-module 'variable) (module-ref the-scm-module 'variable) value)) (unless (module-defined? the-scm-module 'variable) (export variable)))))) (define-as-needed RB_AUTOBOOT #x123) (define-as-needed (mount foo bar) 'baz) WDYT? Sorry that this simple thing ends up being complicated! ;-) Thank you, Ludo=E2=80=99. =C2=B9 In practice #:replace works even when there=E2=80=99s nothing to rep= lace, but I=E2=80=99d rather not rely on it. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 09:18:27 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 13:18:27 +0000 Received: from localhost ([127.0.0.1]:40673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxZD9-0007sD-HM for submit@debbugs.gnu.org; Mon, 10 Apr 2017 09:18:27 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxZD8-0007rw-84 for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 09:18:26 -0400 Received: by mail-wm0-f52.google.com with SMTP id u2so37147873wmu.0 for <26341@debbugs.gnu.org>; Mon, 10 Apr 2017 06:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=wWo/8Kh3gPb56dFWSx4sngdBdFGbsucqCqn17ZRSKwQ=; b=RquAc3YpPUDuV6VY7hiM1JBtmmdmXaLykkrOTP0KiWiD067laADYCMjJmViJ563tJS 3LpF9L+VEs9dQXypVuhOQC5todsIPoa0wg2K625DEpxRyneG+vDzB9vmfz+nIvl8C+fm i87ZkE/cUjkryEy45ABlyf7IeIDw0FrH5vf5U3xAJPF1EccRYIxpe8PfVXuwYNOBsa5X J85VGIrpQXRQEg/gIObJ1zcCffssz6x2TluhC5NchvnfICrVHy3WqLlQLu/zjCSOYyhy ULOntwp+t+wDgGGr51QdwZC7F3Ybn9EMEMbdHwxxTv4TNANOJCsw9weGNdSLR0i8aW9M oHMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=wWo/8Kh3gPb56dFWSx4sngdBdFGbsucqCqn17ZRSKwQ=; b=n4pGgSFwF/J+xLauz7ywOk31FiHtjosjXXG5gg1dOnZvWDgz9vJIIczZOooX0B/cx2 8V1xZV+7GFPczbAADR52khag503z8DRtIMLBZHjZCrDNV75SZjeBtz+0YlyoAd4sH7q+ 7Yr2UEX1sS1p9pxlfmhHt+ZR+4+U1Vbogw4nvqNc3YvL36eu9qpB5uPmTTS8ybl4lF1V Tkt6Xc0N183/eSh2nQbZ5WCjFw+wntQFkJc0pL3CWK+ob5PvP56BX9i+Fk61jgjzqTwL KvOoHNww6DW55adU1PAbenyYgHKBKixlhuR7udpFQeC/S47H1QdY/B6areyIQIAwFMvQ u51g== X-Gm-Message-State: AN3rC/6IFTLGhZpTOK0FTcaObUJJdqHTPGTrM39wH9BnvWRpxQXeJrE5Bf/iLrDTuWaRWA== X-Received: by 10.28.153.4 with SMTP id b4mr9544719wme.58.1491830300333; Mon, 10 Apr 2017 06:18:20 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id l90sm10293016wmi.25.2017.04.10.06.18.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Apr 2017 06:18:19 -0700 (PDT) References: <20170408160329.4068-1-m.othacehe@gmail.com> <20170408160329.4068-2-m.othacehe@gmail.com> <87lgr8fvk7.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26341: [PATCH 1/5] build: syscalls: Add reboot. In-reply-to: <87lgr8fvk7.fsf@gnu.org> Date: Mon, 10 Apr 2017 15:18:30 +0200 Message-ID: <8637dgs8nt.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hey Ludo, > The problem is that we cannot #:replace unconditionally (when not using > the patched Guile, there’s nothing to replace¹). Yes I was relying on #:replace ability to just export the symbol if there's nothing to replace (as explained in your note¹). > > WDYT? Anyway, your macro seems a nicer way than dealing with export/replace. I gave it a try and everything still seems warning free. My only concern is that it won't be obvious for people who want to use reboot or mount or any other syscall that they have to use (guix build syscalls) because the #:export list won't contain those syscalls. Maybe a big explanation on top of the file would be enough ? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 09:42:03 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 13:42:03 +0000 Received: from localhost ([127.0.0.1]:40695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxZZz-0008Sr-Dz for submit@debbugs.gnu.org; Mon, 10 Apr 2017 09:42:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxZZy-0008SE-6u for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 09:42:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxZZq-0004hc-2y for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 09:41:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxZZq-0004hY-0H; Mon, 10 Apr 2017 09:41:54 -0400 Received: from [193.50.110.120] (port=52632 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cxZZp-0003Gm-F5; Mon, 10 Apr 2017 09:41:53 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH 1/5] build: syscalls: Add reboot. References: <20170408160329.4068-1-m.othacehe@gmail.com> <20170408160329.4068-2-m.othacehe@gmail.com> <87lgr8fvk7.fsf@gnu.org> <8637dgs8nt.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Mon, 10 Apr 2017 15:41:51 +0200 In-Reply-To: <8637dgs8nt.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 10 Apr 2017 15:18:30 +0200") Message-ID: <87mvbobcrk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi, Mathieu Othacehe skribis: >> The problem is that we cannot #:replace unconditionally (when not using >> the patched Guile, there=E2=80=99s nothing to replace=C2=B9). > > Yes I was relying on #:replace ability to just export the symbol if > there's nothing to replace (as explained in your note=C2=B9). > >> >> WDYT? > > Anyway, your macro seems a nicer way than dealing with export/replace. > I gave it a try and everything still seems warning free. > > My only concern is that it won't be obvious for people who want to use > reboot or mount or any other syscall that they have to use (guix build > syscalls) because the #:export list won't contain those syscalls. > > Maybe a big explanation on top of the file would be enough ? Yes, I think it would be enough. Also, the initrd is the only context where one can omit (use-modules (guix build syscalls)) so I think people will choose to use it by default. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 13:18:15 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 17:18:15 +0000 Received: from localhost ([127.0.0.1]:41422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxC-0005SU-S6 for submit@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:14 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxB-0005SI-WD for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:14 -0400 Received: by mail-wm0-f66.google.com with SMTP id q125so10784191wmd.3 for <26341@debbugs.gnu.org>; Mon, 10 Apr 2017 10:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=JsOf9QuW6FZ7ykiAVw1u75lW0+F8ZsXH6bQc+4F5On0=; b=t/X1xUDhgKPXKTPoJk87b5wauRq2tKj6VmL6rX0s4ecwOgpGIs6DjqjKguAIfkuAMT y2iEAFTrcfYDXmPcxuntwHXTyIIfM8R876SAcw3OM9c0anOJvwruE1CbbqwzXkRAmLMg 774I51t5LT0GRWdkTyMELud/f14n/oQL37CEzYprlzBKU7dCznIAcDH4lFqlEK5PTaK+ fzR3rg3ofrcT8CGQIK2gPkSslLCYpl1QjFXN7M3dHPzpsYxyfnzt/kAS1NfIMmqpa9xL JC+82Xsr9qHCc3YOf0PIXajYG02oF4nrt9tQ7wm8j4Rhmaz6RQXVhu/Wo+AbejmO6zPE 8gtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=JsOf9QuW6FZ7ykiAVw1u75lW0+F8ZsXH6bQc+4F5On0=; b=ML6PAlP3qjW+7AqfNHwBz+/6wiGEV1dqSJdwvWuE2Mcqd5KDyHxc2YGwo/slotZMOl SR1qUD091ZaWzah18xXsYWpGKaIvJEZVuDGA57UM4GBCRAbmoxm3M5VkUEF7hphz9vlj HzcQ9mn0MDfJZojoiyhXKSClLhUX2k1BIxS/5/p5FrgUOETQ0Z/r621hq+Tty8ie9DfK CM10gZ3CfceWzm32xMYW7stTTyKLZu9oRrDWMEmKZ+a1Z6mmsOQX2Grfc1Gkh03EnlGN qAApj17yXWap6Hpc3EjbQXkd8uhWmDJysycEcllZFx+UPH7FhGfB907bBEvcMk310He1 UBPQ== X-Gm-Message-State: AN3rC/6uqlbpUcj2VVlBUSF7qTtNN2E0sDxD4RvJByAciyDMrcnZ1A2dJdDKHBzIXvzV5Q== X-Received: by 10.28.150.83 with SMTP id y80mr10361847wmd.53.1491844688267; Mon, 10 Apr 2017 10:18:08 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m90sm11037470wmi.34.2017.04.10.10.18.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Apr 2017 10:18:07 -0700 (PDT) References: <20170408160329.4068-1-m.othacehe@gmail.com> <20170408160329.4068-2-m.othacehe@gmail.com> <87lgr8fvk7.fsf@gnu.org> <8637dgs8nt.fsf@gmail.com> <87mvbobcrk.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26341: [PATCH 1/5] build: syscalls: Add reboot. In-reply-to: <87mvbobcrk.fsf@gnu.org> Date: Mon, 10 Apr 2017 19:18:06 +0200 Message-ID: <87y3v8yyep.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26341 Cc: 26341@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) > Yes, I think it would be enough. Ok so, here's a new serie using this macro ! Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 13:18:27 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 17:18:27 +0000 Received: from localhost ([127.0.0.1]:41426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxP-0005Sz-15 for submit@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:27 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxO-0005Sh-1T for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:26 -0400 Received: by mail-wm0-f42.google.com with SMTP id o81so44447841wmb.1 for <26341@debbugs.gnu.org>; Mon, 10 Apr 2017 10:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5bI2dtpVpw/bBObDJKSkuxOFhMZ+zyTe6YJ0uIkxJeg=; b=YAXNzgahoDWRTHHvKlhTAFOyijsf6K8JwuAEQHiSeA6jyb7IZl5Eg1A+MJtwwaijlY 0RPVM0qN9mBLyo0ve6PyoG4R3FkP27KfIN834RU29xTSxSzXB6j/7JHlxUgerBY72F3G baowv7yVsTRYxdDc0EC9ndcshtvZR333HcSKhHSAP6AXXiR+ExDoNYFbtxpuuhgO5xkq 3Fc7In56nvSbQniMDQwvEnsdPk5P5aFz5pwU5gkN2gRxaJT8H0Vx+JMenIqG5wrsANBq ERXs/hD3QYoBrAopuvOxO/f8k/EibPZ7auEq+KKyBpZMCOWQnqTzgQlHz+X6AO862XZ1 1WEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5bI2dtpVpw/bBObDJKSkuxOFhMZ+zyTe6YJ0uIkxJeg=; b=hamyeO3cQmOqgEZE8hdDlU30vqRz5vGcuTXBVHpbcKR0MuMaup3vF6eBpNkBfVqYWO TwBYyefXDWF9q9jSCvLVBH/29M2kljT3W4vi4LTZC5DSP0ZnB0ahfGijLaOxiilQhppl KerYsOCBO4CdN1TswgaRH1klvs315+mdtM8XB5a4xiTUPC/sQ0NGKGLJMjQDeojzYd3d um1yxX4TjQw5QokCbB9O20qXXOmZgQRjjH5eF8eevfyUB1JdhnMtnmqZO3vewm9ZcEre aSmNiEUnFVylA1T0w0m3aQ1JGjNY0XmiLXOl8GNvcgotKOmtD2Rs0HvFbJUx5zIh0kKp RVMw== X-Gm-Message-State: AN3rC/4biCcfjJNdXxF4MMPRBNl+XVPGr0lyUaHTX0wAC6WFyGRz76QajjbO8t/tgcJJaQ== X-Received: by 10.28.151.81 with SMTP id z78mr10933404wmd.95.1491844700236; Mon, 10 Apr 2017 10:18:20 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id u9sm11075908wme.8.2017.04.10.10.18.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 10:18:19 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 1/5] build: syscalls: Add reboot. Date: Mon, 10 Apr 2017 19:18:10 +0200 Message-Id: <20170410171814.18461-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * guix/build/syscalls.scm (define-as-needed): New macro. (reboot): New procedure. Reimplemented from guile-linux-syscalls.patch. (RB_AUTOBOOT, ..., RB_KEXEC): New flags copied from static Guile patch. Co-Authored-By: Ludovic Courtès --- guix/build/syscalls.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 4bcb2a871..0de39aee6 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2015 David Thompson ;;; Copyright © 2015 Mark H Weaver +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -149,8 +150,19 @@ ;;; Commentary: ;;; ;;; This module provides bindings to libc's syscall wrappers. It uses the -;;; FFI, and thus requires a dynamically-linked Guile. (For statically-linked -;;; Guile, we instead apply 'guile-linux-syscalls.patch'.) +;;; FFI, and thus requires a dynamically-linked Guile. +;;; +;;; Some syscalls are already defined in statically-linked Guile by applying +;;; 'guile-linux-syscalls.patch'. +;;; +;;; Visibility of syscall's symbols shared between this module and static Guile +;;; is a bit delicate. It is handled by 'define-as-needed' macro. +;;; +;;; This macro is used to export symbols in dynamic Guile context, and to +;;; re-export them in static Guile context. +;;; +;;; This way, even if they don't appear in #:export list, it is safe to use +;;; syscalls from this module in static or dynamic Guile context. ;;; ;;; Code: @@ -409,6 +421,25 @@ the returned procedure is called." (error (format #f "~a: syscall->procedure failed: ~s" name args)))))) +(define-syntax define-as-needed + (syntax-rules () + "Define VARIABLE. If VARIABLE already exists in (guile) then re-export it, + otherwise export the newly-defined VARIABLE." + ((_ (proc args ...) body ...) + (define-as-needed proc (lambda* (args ...) body ...))) + ((_ variable value) + (begin + (when (module-defined? the-scm-module 'variable) + (re-export variable)) + + (define variable + (if (module-defined? the-scm-module 'variable) + (module-ref the-scm-module 'variable) + value)) + + (unless (module-defined? the-scm-module 'variable) + (export variable)))))) + ;;; ;;; File systems. @@ -547,6 +578,22 @@ constants from ." (list device (strerror err)) (list err))))))) +(define-as-needed RB_AUTOBOOT #x01234567) +(define-as-needed RB_HALT_SYSTEM #xcdef0123) +(define-as-needed RB_ENABLED_CAD #x89abcdef) +(define-as-needed RB_DISABLE_CAD 0) +(define-as-needed RB_POWER_OFF #x4321fedc) +(define-as-needed RB_SW_SUSPEND #xd000fce2) +(define-as-needed RB_KEXEC #x45584543) + +(define-as-needed (reboot #:optional (cmd RB_AUTOBOOT)) + (let ((proc (syscall->procedure int "reboot" (list int)))) + (let-values (((ret err) (proc cmd))) + (unless (zero? ret) + (throw 'system-error "reboot" "~S: ~A" + (list cmd (strerror err)) + (list err)))))) + (define (kernel? pid) "Return #t if PID designates a \"kernel thread\" rather than a normal user-land process." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 13:18:28 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 17:18:28 +0000 Received: from localhost ([127.0.0.1]:41429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxQ-0005TG-BM for submit@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:28 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxO-0005Sj-P4 for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:27 -0400 Received: by mail-wm0-f68.google.com with SMTP id d79so10801269wmi.2 for <26341@debbugs.gnu.org>; Mon, 10 Apr 2017 10:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vJ4pmi8eTbtomivS8Ava/XWN9Ax78wRdZ2AyIo1ybf4=; b=XD7h06n4eIXoh9U4pWVgt+ksOACUkQDyV8J1ofZ0BiORQSy9MBIcEdjeHzEExcErHy EhKSmJr/ZgPLeao175FSXqFCzRKahx1htPQBXL8IR7M+w0nALCYjBgkxMdz7n3nq+D7I Ux8ktC44MVRkSTZcSZUxfdFlfBABAsGPwoPfXFcsS2QDZV4uH6Debz2nh0Hr1lsO0zhv S3D9qi5fHfBlVY+GxJiTL/rjYhgDzJ6wSFf/MVYlp1IYDYSdOACksMDNmHUiEEoPMJq7 MjGKVnO4DTgWTs55CsOdE86brW+FLkUOYlY9xCV4Pn1s3HVlxV0ONbOVlwkv1lb7kxFW v49w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vJ4pmi8eTbtomivS8Ava/XWN9Ax78wRdZ2AyIo1ybf4=; b=ZZxLKCxrKLnsD7u35DExZ1aXIi/C5Vw43bXnuzSBWBddWxSR4q45B/YRaFoSU5ZWyW eMeYipq7R54sD+OR/R0E99k9mR3LdUvUUQzEfocbJANIDc1klmWoLf8yybZYdFgkRFls 8GG8nZOfLbtZtXe9yrFA7cQjhAVqHBPlD9GJTGA/NtBJ/o+ZpnbV9zhvW/baPVjFsuVM tB3brQU2IWH8tEAAdKLbAfJYEZeL00jjtQ0DvKseRqX5uRHryW065TT3AFRsFQprCMVq Blfgvo1bVi1jLk+m1oC/pBu7fLlUiBSGYMMl+WUgmbU4AWusYKkXQ+kSNBdsdBfwqm8Q V/Zw== X-Gm-Message-State: AN3rC/5OTJGkeY0bLbaXuHRB5GZl9qp9PSLKN5wJ6BLVQWrPtvmb+TRp pk4lbpUszgouXEYX X-Received: by 10.28.0.201 with SMTP id 192mr7431192wma.126.1491844700960; Mon, 10 Apr 2017 10:18:20 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id u9sm11075908wme.8.2017.04.10.10.18.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 10:18:20 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 2/5] build: syscalls: Use define-as-needed for mount and umount. Date: Mon, 10 Apr 2017 19:18:11 +0200 Message-Id: <20170410171814.18461-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170410171814.18461-1-m.othacehe@gmail.com> References: <20170410171814.18461-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * guix/build/syscalls.scm (mount): Use define-as-needed macro and remove from export list. (umount): Ditto. --- guix/build/syscalls.scm | 86 ++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 48 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 0de39aee6..79a0da7c5 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -45,8 +45,6 @@ MNT_EXPIRE UMOUNT_NOFOLLOW restart-on-EINTR - mount - umount mount-points swapon swapoff @@ -492,58 +490,50 @@ the returned procedure is called." (define MNT_EXPIRE 4) (define UMOUNT_NOFOLLOW 8) -(define mount - ;; If called from the statically linked Guile, use Guile core 'mount'. - ;; Otherwise, use an FFI binding to define 'mount'. - ;; XXX: '#:update-mtab?' is not implemented by core 'mount'. - (if (module-defined? the-scm-module 'mount) - (module-ref the-scm-module 'mount) - (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) - (lambda* (source target type #:optional (flags 0) options +(define-as-needed (mount source target type + #:optional (flags 0) options #:key (update-mtab? #f)) - "Mount device SOURCE on TARGET as a file system TYPE. + "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS may be a bitwise-or of the MS_* constants, and OPTIONS may be a string. When FLAGS contains MS_REMOUNT, SOURCE and TYPE are ignored. When UPDATE-MTAB? is true, update /etc/mtab. Raise a 'system-error' exception on error." - (let-values (((ret err) - (proc (if source - (string->pointer source) - %null-pointer) - (string->pointer target) - (if type - (string->pointer type) - %null-pointer) - flags - (if options - (string->pointer options) - %null-pointer)))) - (unless (zero? ret) - (throw 'system-error "mount" "mount ~S on ~S: ~A" - (list source target (strerror err)) - (list err))) - (when update-mtab? - (augment-mtab source target type options))))))) - -(define umount - ;; If called from the statically linked Guile, use Guile core 'umount'. - ;; Otherwise, use an FFI binding to define 'umount'. - ;; XXX: '#:update-mtab?' is not implemented by core 'umount'. - (if (module-defined? the-scm-module 'umount) - (module-ref the-scm-module 'umount) - (let ((proc (syscall->procedure int "umount2" `(* ,int)))) - (lambda* (target #:optional (flags 0) - #:key (update-mtab? #f)) - "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* + ;; XXX: '#:update-mtab?' is not implemented by core 'mount'. + (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) + (let-values (((ret err) + (proc (if source + (string->pointer source) + %null-pointer) + (string->pointer target) + (if type + (string->pointer type) + %null-pointer) + flags + (if options + (string->pointer options) + %null-pointer)))) + (unless (zero? ret) + (throw 'system-error "mount" "mount ~S on ~S: ~A" + (list source target (strerror err)) + (list err))) + (when update-mtab? + (augment-mtab source target type options))))) + +(define-as-needed (umount target + #:optional (flags 0) + #:key (update-mtab? #f)) + "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* constants from ." - (let-values (((ret err) - (proc (string->pointer target) flags))) - (unless (zero? ret) - (throw 'system-error "umount" "~S: ~A" - (list target (strerror err)) - (list err))) - (when update-mtab? - (remove-from-mtab target))))))) + ;; XXX: '#:update-mtab?' is not implemented by core 'umount'. + (let ((proc (syscall->procedure int "umount2" `(* ,int)))) + (let-values (((ret err) + (proc (string->pointer target) flags))) + (unless (zero? ret) + (throw 'system-error "umount" "~S: ~A" + (list target (strerror err)) + (list err))) + (when update-mtab? + (remove-from-mtab target))))) (define (mount-points) "Return the mounts points for currently mounted file systems." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 13:18:30 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 17:18:30 +0000 Received: from localhost ([127.0.0.1]:41433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxS-0005Te-Jy for submit@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:30 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxQ-0005Sn-0c for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:28 -0400 Received: by mail-wm0-f53.google.com with SMTP id w64so44619889wma.0 for <26341@debbugs.gnu.org>; Mon, 10 Apr 2017 10:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iL2udg4Km84QH+XRxWA/yPSHenAuRkMzR3ZrrtnEYk4=; b=TRYWgYwQHWOx8YbrYtgJ2ZrWX0/nxwtzNucZoRRcUrXWkm6lwdYVUEYFbIYGVN0l3E glvv84fBbZsX0qkHZ+MFTLcE5cIIvyj6uupEUcyrfekgto7gEZzGeYUhXGOxtIUVU7XZ Q79enhjOtWWJYFk0Vr+aebLR//zTQOU8MG/VP0LFe5s6Vsk+KRAU2TLaaADusr7o077h KwdK++tCQVsKSZTr8vWwKTBTMvSpayoDGNzof90gss4m5ZQSIl/7d+h4wGvfOvRsa+wk 0hbQYDLCsUeX4ZVmITzdS419apuBcxEGQdfFohnJ9ZQveZdn5VgfqRviRv3BGoD0O3dT bPkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iL2udg4Km84QH+XRxWA/yPSHenAuRkMzR3ZrrtnEYk4=; b=pK6LW2efn/pbF6EZU5b5IumQyszKGW2VMVyp1HlzovtenJjoReV7XoX9+SOcywcoVM qEMRbi/BOOc1Z6Pkgmfj4sDuxBCyZDCFwFnsynVNX4HPrpwOt+pPfMHZQMq6ww5Ch7np lpnTn3tVKBQRE72Sg/Lu/6+KnGFMj2I6QD+JS4sCU2bEa/7eHLYQGEfS3vF1CEfaABr0 4u7KK8GpotsshUtXehjEwNyD54Qy2YDz3b9XbwRt4PQ4eVP6qKj4m30AAxU7vHnW1xCU YLD6WgQszq48jnudTy+cWKSIjuQ5g+oNEMKj8+8e0nIpc0tZZ+lEzukmEtXjGeKUeFbu dPzw== X-Gm-Message-State: AN3rC/6C1oOpkGM9UL37cAV3h6YNr7iA3mwnvTh4ieM/IeLHbzNcis+V It52oSjYzEGJoujM X-Received: by 10.28.66.77 with SMTP id p74mr11732856wma.107.1491844702229; Mon, 10 Apr 2017 10:18:22 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id u9sm11075908wme.8.2017.04.10.10.18.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 10:18:21 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 3/5] build: syscalls: Use define-as-needed for network-interface syscalls. Date: Mon, 10 Apr 2017 19:18:12 +0200 Message-Id: <20170410171814.18461-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170410171814.18461-1-m.othacehe@gmail.com> References: <20170410171814.18461-1-m.othacehe@gmail.com> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * guix/build/syscalls.scm (network-interface-flags): Use define-as-needed macro and remove from export list. (set-network-interface-flags): Ditto. (set-network-interface-address): Ditto. (IFF_UP, IFF_BROADCAST and IFF_LOOPBACK): Ditto. --- guix/build/syscalls.scm | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 79a0da7c5..d1f3cd65c 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -82,17 +82,11 @@ PF_PACKET AF_PACKET - IFF_UP - IFF_BROADCAST - IFF_LOOPBACK all-network-interface-names network-interface-names - network-interface-flags network-interface-netmask loopback-network-interface? network-interface-address - set-network-interface-flags - set-network-interface-address set-network-interface-netmask set-network-interface-up configure-network-interface @@ -920,9 +914,9 @@ exception if it's already taken." ;; Flags and constants from . -(define IFF_UP #x1) ;Interface is up -(define IFF_BROADCAST #x2) ;Broadcast address valid. -(define IFF_LOOPBACK #x8) ;Is a loopback net. +(define-as-needed IFF_UP #x1) ;Interface is up +(define-as-needed IFF_BROADCAST #x2) ;Broadcast address valid. +(define-as-needed IFF_LOOPBACK #x8) ;Is a loopback net. (define IF_NAMESIZE 16) ;maximum interface name size @@ -1069,7 +1063,7 @@ that are not up." (else (loop interfaces)))))))) -(define (network-interface-flags socket name) +(define-as-needed (network-interface-flags socket name) "Return a number that is the bit-wise or of 'IFF*' flags for network interface NAME." (let ((req (make-bytevector ifreq-struct-size))) @@ -1080,8 +1074,8 @@ interface NAME." (bytevector->pointer req)))) (if (zero? ret) - ;; The 'ifr_flags' field is IF_NAMESIZE bytes after the beginning of - ;; 'struct ifreq', and it's a short int. + ;; The 'ifr_flags' field is IF_NAMESIZE bytes after the + ;; beginning of 'struct ifreq', and it's a short int. (bytevector-sint-ref req IF_NAMESIZE (native-endianness) (sizeof short)) @@ -1097,7 +1091,7 @@ interface NAME." (close-port sock) (not (zero? (logand flags IFF_LOOPBACK))))) -(define (set-network-interface-flags socket name flags) +(define-as-needed (set-network-interface-flags socket name flags) "Set the flag of network interface NAME to FLAGS." (let ((req (make-bytevector ifreq-struct-size))) (bytevector-copy! (string->utf8 name) 0 req 0 @@ -1114,7 +1108,7 @@ interface NAME." (list name (strerror err)) (list err)))))) -(define (set-network-interface-address socket name sockaddr) +(define-as-needed (set-network-interface-address socket name sockaddr) "Set the address of network interface NAME to SOCKADDR." (let ((req (make-bytevector ifreq-struct-size))) (bytevector-copy! (string->utf8 name) 0 req 0 -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 13:18:31 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 17:18:31 +0000 Received: from localhost ([127.0.0.1]:41435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxS-0005Tg-T3 for submit@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:31 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33913) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxR-0005Sp-3Z for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:29 -0400 Received: by mail-wm0-f67.google.com with SMTP id x75so10796018wma.1 for <26341@debbugs.gnu.org>; Mon, 10 Apr 2017 10:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=d/0hdD+mkhuhUJLpG8HNahc19m9L1GUyJ3de6Qel25g=; b=KJ2Ra/x0szp6k2sOm5cJPHixZ9agCH5eHXrxp3vYbuDMIVliYm3T98AL+L3cJHN7C2 Yi9vP5RMSBthMTY5h4DsarPyvc+rHtV5/4sVWd0mXTekv/hA9/wr/e9K6GDAIt3sg0VE pYxbJtalMGiskdLhDHpYqsEjdlzT0nyz/PKTOrXrZiAx+3Y+UZb+gCh8qB/Is6KveB8j UwV83S+rThfU/oDYOBuemESE7kTdWTrpjhaGUY70mIIuLevvz945efZae276wctf7+MC BIXg5LvOin8Blcm2suWpUoO5H+x9uQN37U1zBoQx0Ap5xn4Ae7hJ25QvrhhlZH7QAIC8 5+ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d/0hdD+mkhuhUJLpG8HNahc19m9L1GUyJ3de6Qel25g=; b=oKIo+aEJKYiR1QfA/ya87xrUbWXKfWizOla2SYQnSCSbned/u5OfSLvM+w9goX2LRy GBTV/bOq3xRYQfY84OEFLxdSW+VTMFXPGWNzMDe5MSXKTyNNrWp4ezzY0iNvvfeOqV9D GJBY1GlRqumjvaGBSzEoTYbMf6/4XEoWV3wmin95WPGPtEJjq8HD0q8eI4ok9BqAj5vA qfvfC8/t2B0qL2W7EnjH9m5iJxYvDtb01EHVKTtML2I7uFDxZf+byMYJDaZk6mTdhTm6 SvnssweNYtIy7XccUXc+0GltyD0e0j+HwYWpUuCWBpv3RrscXDia91/t+eOq1S4hwGd0 OUGA== X-Gm-Message-State: AN3rC/6FyQg8QrAA8Yfw8HJcgL60BCp2NCylQwRQcmRGaL8adInFFmvW Wqr9V1Jq0JRLfw== X-Received: by 10.28.163.68 with SMTP id m65mr10976889wme.19.1491844703493; Mon, 10 Apr 2017 10:18:23 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id u9sm11075908wme.8.2017.04.10.10.18.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 10:18:22 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 4/5] build: syscalls: Add load-linux-module. Date: Mon, 10 Apr 2017 19:18:13 +0200 Message-Id: <20170410171814.18461-4-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170410171814.18461-1-m.othacehe@gmail.com> References: <20170410171814.18461-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * guix/build/syscalls.scm (load-linux-module): New procedure. Reimplemented from guile-linux-syscalls.patch. --- guix/build/syscalls.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index d1f3cd65c..0529c228a 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -578,6 +578,18 @@ constants from ." (list cmd (strerror err)) (list err)))))) +(define-as-needed (load-linux-module data #:optional (options "")) + (let ((proc (syscall->procedure int "init_module" + (list '* unsigned-long '*)))) + (let-values (((ret err) + (proc (bytevector->pointer data) + (bytevector-length data) + (string->pointer options)))) + (unless (zero? ret) + (throw 'system-error "load-linux-module" "~A" + (list (strerror err)) + (list err)))))) + (define (kernel? pid) "Return #t if PID designates a \"kernel thread\" rather than a normal user-land process." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 13:18:34 2017 Received: (at 26341) by debbugs.gnu.org; 10 Apr 2017 17:18:34 +0000 Received: from localhost ([127.0.0.1]:41437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxW-0005Ty-4O for submit@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:34 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxcxR-0005Sr-TF for 26341@debbugs.gnu.org; Mon, 10 Apr 2017 13:18:30 -0400 Received: by mail-wm0-f51.google.com with SMTP id u2so42804104wmu.0 for <26341@debbugs.gnu.org>; Mon, 10 Apr 2017 10:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AosKn5rhjaVafS/SiS59MZlQVLsfcfgFwqIgQXqbGKk=; b=lMZKMPRPMUhYO7W4m5+3Lhq+0nuEvCeVmy6OxADrjMdc2dUgdLPbNFTlN8aWH7R+rG JrLnT/RskAhYAQJ7y5WdYpIXbpC341EKY9SKzYEOY1NpP2sBlHZm5dnnLjMNNRXkk5er GF3WeqiaMQDlkyGrLUW6cljE5OKylaEfwmS3djJZQliaguITZnfSh5VVCX+9SYIil7y4 qScJT2KcrppEj4QlsBc4RsJF1qiIGF/DrYeJ2yWvnhm7VjLOL6Lyft07qhZpeJ2TjPSE KHP0scdrcxkadv9JquR9hwRczkQTpstnVb8q+PxFFGfuUlI4KrUpEMu99u28k9OmmX1b Navg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AosKn5rhjaVafS/SiS59MZlQVLsfcfgFwqIgQXqbGKk=; b=E12gipMdAoWDXOFJZtfaPA0YJdSJe34mZYk3JYTXvpZ8TSA27+QB440lz/PbjTabuG VjYhUcHY5ZRYfI9RBzRbEwKD5dpQKDbHEqOb3fK/ohoW5SZXUsAlRFm6DrUtBe1csfUX Ph48HShwux6fPhbbX2qBbZvP/Ze769MPOpghxswOxGcSnJjHe9/0hZiv3TGrjJHv7UE2 4Pw3c0VcWuO9M3l1DJD4cTOW8RpgyEa4eJXy9jG3/vhLzxBInAO5n4Uoyel80eAHBJ2M KsG6qNBYc2Q8NKuNBUYQ8DqzD5oeiKzCuff66vCH8lSYhKZwjdtPLn04T4HImNZFmjLa yA0g== X-Gm-Message-State: AN3rC/75dTjbQi3ftPOIv86ptrJcsGEFBS8osef+43CBFXGn03XKJ/iTkX5KL2+1h5geLw== X-Received: by 10.28.154.198 with SMTP id c189mr6994989wme.45.1491844704242; Mon, 10 Apr 2017 10:18:24 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id u9sm11075908wme.8.2017.04.10.10.18.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 10:18:23 -0700 (PDT) From: Mathieu Othacehe To: 26341@debbugs.gnu.org Subject: [PATCH 5/5] build: Fix compilation warnings. Date: Mon, 10 Apr 2017 19:18:14 +0200 Message-Id: <20170410171814.18461-5-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170410171814.18461-1-m.othacehe@gmail.com> References: <20170410171814.18461-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26341 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/build/linux-boot.scm (define-module): Use (guix build syscalls). * gnu/build/linux-modules.scm (define-module): Ditto. * gnu/build/file-systems (define-module): Stop re-exporting mount, umount and MS_* flags as this is now safe to include (guix build syscalls) instead. (mount): Remove procedure. (umount): Ditto. --- gnu/build/file-systems.scm | 15 ++------------- gnu/build/linux-boot.scm | 2 ++ gnu/build/linux-modules.scm | 2 ++ 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index fe98df95d..eb9f07861 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2016, 2017 David Craven +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,12 +48,7 @@ mount-flags->bit-mask check-file-system - mount-file-system) - #:re-export (mount - umount - MS_BIND - MS_MOVE - MS_RDONLY)) + mount-file-system)) ;;; Commentary: ;;; @@ -61,13 +57,6 @@ ;;; ;;; Code: -;; 'mount' is already defined in the statically linked Guile used for initial -;; RAM disks, in which case the bindings in (guix build syscalls) do not work -;; (the FFI bindings do not work there). Override them in that case. -(when (module-defined? the-scm-module 'mount) - (set! mount (@ (guile) mount)) - (set! umount (@ (guile) umount))) - (define (bind-mount source target) "Bind-mount SOURCE at TARGET." (mount source target "" MS_BIND)) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index c34a3f7c1..360ef3fae 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 ftw) #:use-module (guix build utils) + #:use-module (guix build syscalls) #:use-module (gnu build linux-modules) #:use-module (gnu build file-systems) #:export (mount-essential-file-systems diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm index d7feb3a08..5ca7bf8e3 100644 --- a/gnu/build/linux-modules.scm +++ b/gnu/build/linux-modules.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2016 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,6 +19,7 @@ (define-module (gnu build linux-modules) #:use-module (guix elf) + #:use-module (guix build syscalls) #:use-module (rnrs io ports) #:use-module (rnrs bytevectors) #:use-module (srfi srfi-1) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 11 05:15:35 2017 Received: (at 26341-done) by debbugs.gnu.org; 11 Apr 2017 09:15:35 +0000 Received: from localhost ([127.0.0.1]:41960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxrtf-0006PY-L9 for submit@debbugs.gnu.org; Tue, 11 Apr 2017 05:15:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxrte-0006PM-0y for 26341-done@debbugs.gnu.org; Tue, 11 Apr 2017 05:15:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxrtT-0003pb-Nh for 26341-done@debbugs.gnu.org; Tue, 11 Apr 2017 05:15:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxrtT-0003pU-KS; Tue, 11 Apr 2017 05:15:23 -0400 Received: from [193.50.110.157] (port=45980 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cxrtT-0001he-1v; Tue, 11 Apr 2017 05:15:23 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH 1/5] build: syscalls: Add reboot. References: <20170402150157.7149-1-m.othacehe@gmail.com> <20170410171814.18461-1-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 11 Apr 2017 11:15:20 +0200 In-Reply-To: <20170410171814.18461-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Mon, 10 Apr 2017 19:18:10 +0200") Message-ID: <87tw5vtidz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341-done Cc: 26341-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi! Perfect, I removed =E2=80=9Cbuild:=E2=80=9D from the subject line (it=E2=80= =99s usually for things that relate to the configury and makefiles) and pushed the whole series. Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 11 07:39:18 2017 Received: (at 26341-done) by debbugs.gnu.org; 11 Apr 2017 11:39:18 +0000 Received: from localhost ([127.0.0.1]:42014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxu8k-0003Ig-8F for submit@debbugs.gnu.org; Tue, 11 Apr 2017 07:39:18 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:32845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxu8j-0003IS-9m for 26341-done@debbugs.gnu.org; Tue, 11 Apr 2017 07:39:17 -0400 Received: by mail-wm0-f50.google.com with SMTP id y18so13257067wmh.0 for <26341-done@debbugs.gnu.org>; Tue, 11 Apr 2017 04:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=sQgjH1ICwhubA1zpQg82CK/iCe/VPzi7GK5vEwQ4i9g=; b=QJOuDQgRQPUykLhlmI+ndOFhGci1HAdSUiy48tQ1ftUC1SFh8m0eiwsqhsJ2FKeYUg P7IBzidzmB6UxFIy1Bu72a1JnOvssrE1w/cmVIEw2y3aUeopC9rdUTTQHlG/mkkpmeoH PutnDn8IphTTlyaJgImxVJJ7yEfNai82W8x5LPIeHSKO8KVTLuZHpd/rzzZs4dNNnRVE AuYKIovwTIEt0C0KZ8WVfyx4cEjOCshs3+6DRSsedeKgBryYxGHtLRvsQ6b5aIgnL8g1 SwAE62vAjJpDNz1SOMy9SyjFMz4XEonqYAog7BQV5HziM5iQ79oP8Fxen6YOW0EU5Ybm tVGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=sQgjH1ICwhubA1zpQg82CK/iCe/VPzi7GK5vEwQ4i9g=; b=IbuMEaGW9bqZm694qbZDqJDMsu/XyzPXlcbmyUXEkj/qMss45+FLEMsk42hcvsBcvz bh7Focnmr/LqwEZPVrS0Y/ESno0VOzKUwi8V9LCNHv1/BQijG0NNJltYxBQkPUlO2703 QsvrH9OYXIOrAme3MqoNjeYoTLBCM4CxhXsMxInd9kJzy8lbg2/qijw5wz7tLi8Dx03s fjx3tGFL/zpUZsGzLH8dVV0/3X8yyOzT9HirC8S5eEjJUY12Q6Tc5Cmhe03D4TaF3LaW tERYWhhl4VgEl25nkew0DNna/PS5Xk6QzYfCPB5XdR1vmsJXkh1jSHZgnkG+7Y2Pjprp h8Tw== X-Gm-Message-State: AN3rC/74zhq3em3iaB2ynSvpChMwmu/3+ZGrHZRg56tlCWLIq1B0j4nxBUfYrtjEAK7Peg== X-Received: by 10.28.217.136 with SMTP id q130mr13255574wmg.132.1491910751258; Tue, 11 Apr 2017 04:39:11 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id h20sm2145498wmd.29.2017.04.11.04.39.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Apr 2017 04:39:10 -0700 (PDT) References: <20170402150157.7149-1-m.othacehe@gmail.com> <20170410171814.18461-1-m.othacehe@gmail.com> <87tw5vtidz.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26341: [PATCH 1/5] build: syscalls: Add reboot. In-reply-to: <87tw5vtidz.fsf@gnu.org> Date: Tue, 11 Apr 2017 13:39:22 +0200 Message-ID: <86vaqbqil1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26341-done Cc: 26341-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Ludo, Thanks for merging :) While we are talking of build warnings, the only remaining warnings are related to cairo : ... gnu/build/svg.scm:36:12: warning: possibly unbound variable `cairo-create' gnu/build/svg.scm:36:26: warning: possibly unbound variable `cairo-image-surface-create' gnu/build/svg.scm:38:4: warning: possibly unbound variable `cairo-scale' gnu/build/svg.scm:39:4: warning: possibly unbound variable `cairo-set-source-surface' ... This file mentions closed bug http://bugs.gnu.org/12202. Is there something that can be done ? Thank you, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 11 08:20:36 2017 Received: (at 26341-done) by debbugs.gnu.org; 11 Apr 2017 12:20:36 +0000 Received: from localhost ([127.0.0.1]:42033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxumh-0004Fo-VI for submit@debbugs.gnu.org; Tue, 11 Apr 2017 08:20:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxumg-0004Fb-Sw for 26341-done@debbugs.gnu.org; Tue, 11 Apr 2017 08:20:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxumV-0000kw-O7 for 26341-done@debbugs.gnu.org; Tue, 11 Apr 2017 08:20:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxumV-0000ks-L1; Tue, 11 Apr 2017 08:20:23 -0400 Received: from [193.50.110.157] (port=46564 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cxumV-0004Ai-0R; Tue, 11 Apr 2017 08:20:23 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26341: [PATCH 1/5] build: syscalls: Add reboot. References: <20170402150157.7149-1-m.othacehe@gmail.com> <20170410171814.18461-1-m.othacehe@gmail.com> <87tw5vtidz.fsf@gnu.org> <86vaqbqil1.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Germinal an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 11 Apr 2017 14:20:20 +0200 In-Reply-To: <86vaqbqil1.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 11 Apr 2017 13:39:22 +0200") Message-ID: <87fuhft9tn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26341-done Cc: 26341-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Heya, Mathieu Othacehe skribis: > While we are talking of build warnings, the only remaining warnings are > related to cairo : > > ... > gnu/build/svg.scm:36:12: warning: possibly unbound variable `cairo-create' > gnu/build/svg.scm:36:26: warning: possibly unbound variable `cairo-image-= surface-create' > gnu/build/svg.scm:38:4: warning: possibly unbound variable `cairo-scale' > gnu/build/svg.scm:39:4: warning: possibly unbound variable `cairo-set-sou= rce-surface' > ... > > This file mentions closed bug http://bugs.gnu.org/12202. Is there > something that can be done ? Good question! In fact it doesn=E2=80=99t make much sense to have =E2=80= =98make=E2=80=99 compile this file since it=E2=80=99s only used on the =E2=80=9Cbuild side= =E2=80=9D, from (gnu system grub). So perhaps we should simply adjust Makefile.am & co. to not build this file. Thoughts? (I think there=E2=80=99s a couple of other files in a similar situation.) Ludo=E2=80=99. From unknown Sat Jun 21 10:20:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 10 May 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator