From patchwork Thu Apr 14 09:25:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 38575 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0C58E27BBE9; Thu, 14 Apr 2022 10:26:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 63A7C27BBEA for ; Thu, 14 Apr 2022 10:26:22 +0100 (BST) Received: from localhost ([::1]:37552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nevk5-0000GI-IO for patchwork@mira.cbaines.net; Thu, 14 Apr 2022 05:26:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nevjn-0000G0-7T for guix-patches@gnu.org; Thu, 14 Apr 2022 05:26:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nevjl-0008U8-Pp for guix-patches@gnu.org; Thu, 14 Apr 2022 05:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nevjl-0002bH-K3 for guix-patches@gnu.org; Thu, 14 Apr 2022 05:26:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48314] [PATCH v4] Install guix system on Raspberry Pi Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Apr 2022 09:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48314 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "48314@debbugs.gnu.org" <48314@debbugs.gnu.org> Cc: Stefan , Maxime Devos Received: via spool by 48314-submit@debbugs.gnu.org id=B48314.16499283379953 (code B ref 48314); Thu, 14 Apr 2022 09:26:01 +0000 Received: (at 48314) by debbugs.gnu.org; 14 Apr 2022 09:25:37 +0000 Received: from localhost ([127.0.0.1]:55173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nevjN-0002aS-3t for submit@debbugs.gnu.org; Thu, 14 Apr 2022 05:25:37 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:39177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nevjK-0002a9-Qv for 48314@debbugs.gnu.org; Thu, 14 Apr 2022 05:25:35 -0400 Date: Thu, 14 Apr 2022 09:25:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1649928328; bh=XGG08LxcFhPp9upfIIYv8IEGtObblByo88gQBq6d7uA=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=s787afL/IG6oXsKZosNhMlp+CbKzpl44OeApiIZZ1Qf5R0Dvsl1ZFrBkGXbcql4zK xYXCBADVZjzHOWIIbr+ZYBxmo1/AhksXXEW9wDhZaSxvaokyOZOvJO16vOvPrNR91S 6PMgBzCbmP4GEiOQeK80FtYnLRs2fTFDjbHY0xg7TPF/s/NetQ8KVYXEFylynNwPLq 5sDZ8OzRjZat3UnemjpvD3s0EEsLYd2dy8bYGNn9Agj/1VCKFakPVS1qbn3DpYmC+D DHvxl1BueIv1EBG06hEhwkF2w8mxxb5FDxzqmokISY1ZZYEyvVBh9FK9t+9Nk0IZsa CZIiugmW39zPw== Message-ID: In-Reply-To: References: <19E4796A-B0DB-444F-8773-2E8D3EF6132D@vodafonemail.de> <1JV7YdNsB7LB0ij9pMN5ktIsdpU8g98Lpu0yOrl_r6wFvRjqRJ5XqOktugKlia2rSeyNVEwY0b8VJrFJr1TsWgOIo-JW6EmTpj6Bz4dNzxQ=@protonmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches > > > +        `(modify-phases ,phases > > +           (replace 'configure > > > To get rid of the #< error, replace this by > > #~(modify-phases #$phases [...]) > > (and replace the , by #$ etc). > > Greetings, > Maxime. Thanks for the suggestion Maxime. Here's patch with fixes where I attempt to rewrite the section of the code using Gexps. Still it ends in error as there is some mistake in the Gexps I made. $ ./pre-inst-env guix system build gnu/system/examples/raspberry-pi-64.tmpl ;;; note: source file /home/cpethod/guix/gnu/packages/linux.scm ;;; newer than compiled /home/pethod/guix/gnu/packages/linux.go substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0% The following derivation will be built: /gnu/store/zvy703ldgicckqgnggsnz0a21394hb9f-linux-libre-arm64-generic-5.16.19.drv building /gnu/store/zvy703ldgicckqgnggsnz0a21394hb9f-linux-libre-arm64-generic-5.16.19.drv... ice-9/psyntax.scm:2794:12: In procedure syntax-violation: Syntax error: /gnu/store/2xjp40qfmrdjg28zqsd919cjg00n9wrv-linux-libre-arm64-generic-5.16.19-builder:1:3387: source expression failed to match any pattern in form (let* ((srcarch #{$#}# (system->linux-srcarch (or (%current-target-system) (%current-system)))) (configs (string-append "arch/" srcarch "/configs/")) (guix_defconfig (string-append configs "guix_defconfig"))) #{$#}# (cond ((not defconfig) $~ (begin (apply (assoc-ref #{$#phases}# (quote configure)) arguments) (invoke "make" "savedefconfig") (rename-file "defconfig" guix_defconfig))) ((string? defconfig) $~ (rename-file (string-append configs #{$#defconfig}#) guix_defconfig)) (else (quote (copy-file (assoc-ref inputs "guix_defconfig") guix_defconfig)))) (modify-defconfig guix_defconfig (quote #{$#configs}#)) #{$#@}# (if extra-version $~ ((setenv "EXTRAVERSION" #{$#}# (string-append "-" extra-version))) (quote ())) (invoke "make" "guix_defconfig")) builder for `/gnu/store/zvy703ldgicckqgnggsnz0a21394hb9f-linux-libre-arm64-generic-5.16.19.drv' failed with exit code 1 build of /gnu/store/zvy703ldgicckqgnggsnz0a21394hb9f-linux-libre-arm64-generic-5.16.19.drv failed View build log at '/var/log/guix/drvs/zv/y703ldgicckqgnggsnz0a21394hb9f-linux-libre-arm64-generic-5.16.19.drv.gz'. guix system: error: build of `/gnu/store/zvy703ldgicckqgnggsnz0a21394hb9f-linux-libre-arm64-generic-5.16.19.drv' failed ---- Petr From 57643003418f13d49e45582ef2a6d25de6b36595 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Thu, 14 Apr 2022 11:18:27 +0200 Subject: [PATCH v4] Attempt to fix modify-linux procedure using Gexp. diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 61dac905f8..e1ad6069f8 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1293,15 +1293,15 @@ (define*-public (modify-linux #:key name (replace 'configure (lambda* (#:key inputs #:allow-other-keys #:rest arguments) (let* ((srcarch - ,(system->linux-srcarch (or (%current-target-system) + $#(system->linux-srcarch (or (%current-target-system) (%current-system)))) (configs (string-append "arch/" srcarch "/configs/")) (guix_defconfig (string-append configs "guix_defconfig"))) - ,(cond + $#(cond ((not defconfig) - `(begin + $~(begin ;; Call the original 'configure phase. - (apply (assoc-ref ,phases 'configure) arguments) + (apply (assoc-ref $#phases 'configure) arguments) ;; Save a defconfig file. (invoke "make" "savedefconfig") ;; Move the saved defconfig to the proper location. @@ -1309,19 +1309,18 @@ (define*-public (modify-linux #:key name guix_defconfig))) ((string? defconfig) ;; Use another existing defconfig from the Linux sources. - `(rename-file (string-append configs ,defconfig) + $~(rename-file (string-append configs $#defconfig) guix_defconfig)) (else ;; Copy the defconfig input to the proper location. '(copy-file (assoc-ref inputs "guix_defconfig") guix_defconfig))) - (modify-defconfig guix_defconfig ',configs) - ,@(if extra-version - `((setenv "EXTRAVERSION" - ,(string-append "-" extra-version))) + (modify-defconfig guix_defconfig '$#configs) + $#@(if extra-version + $~((setenv "EXTRAVERSION" + $#(string-append "-" extra-version))) '()) - (invoke "make" "guix_defconfig")) - #t)))))) + (invoke "make" "guix_defconfig")))))))) (native-inputs (append (if (or (not defconfig) (string? defconfig)) -- 2.34.0