From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kK0vC+cd4mVS6gAA62LTzQ:P1 (envelope-from ) for ; Fri, 01 Mar 2024 19:26:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kK0vC+cd4mVS6gAA62LTzQ (envelope-from ) for ; Fri, 01 Mar 2024 19:26:47 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=LOjOOlRx; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709317607; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=PMDxKgiV9eI6hUx1X9GRmaUJecIhKOAoNlZkl7etS+E=; b=qzxntY4rE15/Z9JCeM8nUxltpL0QuQUtc4KTNKag9yYHJkyUbV9WRm2Inr09P+3gU9Pa8z syGpS9S4usiiHCoLBparsXI2oamIJQ80QFgol8cvTdQoJqSEsxuq3TLlDM5b6Z/mrui73x 8V2DcArSTl+ataYmo7TLTLakvlNt6zP3/LEKSrZ7PP5HwXPXXhkA8gAUmpQqJwas7uI8M7 IO3L5Eq1fjGc4kqe/UwgMbkUkuB1HukzaffTBQ/xtKLIdTLkBZCuIpdEOFMrHfyCoWP2a4 IswDOWpFr3O5TOzxPJRwZIIpNIKBYPjDraDX5Ye9N/GraMaCfn/fykJdcoF7Eg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=LOjOOlRx; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709317607; a=rsa-sha256; cv=none; b=lCoY/kK3Uoa+1c1gAWKPyHCjU8R6tmkHpOhynbIDALeC+rSiZ2wNJxr1awJFduXFLA1GOZ 5ixFnaiq2+g1kx2dJOeVJyc5V/hPoLRL4g89w1CHhpa6Fhb6M9VJWHJts+hYRDJ0pHlVRU F+yQvmYeioAhq3kfpby2XU+M4RnTXKS6BbX/K7K/jEGaonlmrr0anEL1KIe7D5ogCw7lsd ygpVOxcpai6PtVM22r2qf77Ne4ZQQC2GYypZagSOquXQg4UDG7xaxvWW/lpu1e0gvMkVgs VBTXIiMJTCRMqTULc0GpBXVs9nZeSQrO+i/ZDBSDGsfLTyrFHtRg/myMRPeWWA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EDCA96FE68 for ; Fri, 1 Mar 2024 19:26:46 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rg7aN-0004Xf-Ux; Fri, 01 Mar 2024 13:26:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rg7aI-0004X5-6C for help-guix@gnu.org; Fri, 01 Mar 2024 13:26:14 -0500 Received: from mail-108-mta223.mxroute.com ([136.175.108.223]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rg7aF-0007Cn-Ui for help-guix@gnu.org; Fri, 01 Mar 2024 13:26:13 -0500 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta223.mxroute.com (ZoneMTA) with ESMTPSA id 18dfb4429530003bea.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 01 Mar 2024 18:26:04 +0000 X-Zone-Loop: abca978a64ed0d628b4d9347e177de0912c850defd27 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PMDxKgiV9eI6hUx1X9GRmaUJecIhKOAoNlZkl7etS+E=; b=LOjOOlRxdBUVRjHqe9MGYQNRrM hiqbFkPXmjGBzppe8dgo4XxVb/cPOccWCLNOpMovyfXh+rrDK7owPgHqi4vdIniX6ogl4TjGs+gvM JDMYl1UO1MN9rEIb9+uxMqbohUAlzEjzdmm7KYtqiTJ/FyWt0kHcmnzXA1Nn4e6esXHE8AVSihacd Nd+GjoK6Nj2P9dYszylvXmRroFK2h/cEHi+BIBUREmGpvSboST/qIgfXdSDl18mG+TyrCGsh/NYMA enIpuqYK4mP5lJPXJ0ex1UWWmQShyr3yYXyRk4b0VIEwk0pAVr8VO57YDVhfIFO9BPoc596HzVI7J 5ytUlY+Q==; From: Richard Sent To: help-guix@gnu.org Subject: Cuirass custom jobs module syntax? Date: Fri, 01 Mar 2024 13:25:56 -0500 Message-ID: <87a5nh24i3.fsf@freakingpenguin.com> MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.223; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta223.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.27 X-Spam-Score: -5.27 X-Migadu-Queue-Id: EDCA96FE68 X-Migadu-Scanner: mx11.migadu.com X-TUID: hedwH7m6TbD8 Hi all, I'm trying to build operating-system declarations as part of a LAN substitute server, but I can't seem to get Cuirass's custom build type working. My Cuirass specification looks like this: --8<---------------cut here---------------start------------->8--- (define %rsent-cuirass-specs #~(list (specification (name "rsent-systems") ;; TODO: Find out option here to build operating-systems ;; (not images) in rsent channel. (build '(custom (rsent machines lan gibraltar))) (channels (cons #$rsent-channel-gexp %default-channels))))) --8<---------------cut here---------------end--------------->8--- gibraltar has code that looks like --8<---------------cut here---------------start------------->8--- (define-module (rsent machines lan gibraltar) ;; ... #:export (cuirass-jobs)) (define* (gibraltar-jobs store systems #:key source commit) (map (lambda (system) (let ((name (string->symbol (string-append "gibraltar." system)))) (deriviation->job name (operating-system-derivation gibraltar-system)))))) (define (cuirass-jobs store arguments) "Register Cuirass jobs." (define systems (arguments->systems arguments)) ;; Turn off grafts. Grafting is meant to happen on the user's machines. (parameterize ((%graft? #f)) (gibraltar-jobs store systems))) --8<---------------cut here---------------end--------------->8--- When Cuirass evaluates the specification, this error is printed in the logs: --8<---------------cut here---------------start------------->8--- ;; building path(s) `/gnu/store/9rpjz153hxfknlmywyipxcz5yaiag8nw-profile' ;; In thread: ;; uncaught throw to %exception: (#<&inferior-exception arguments: (wrong-type-arg "symbol->string" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "symbol" (rsent machines lan gibraltar)) ((rsent machines lan gibraltar))) ;; inferior: # ;; stack: ((#f ("ice-9/boot-9.scm" 1779 13)) ;; (raise-exception ("ice-9/boot-9.scm" 1682 16)) ;; (raise-exception ("ice-9/boot-9.scm" 1684 16)) ;; (symbol->string (#f #f #f)) ;; (try-module-autoload ("ice-9/boot-9.scm" 3526 15)) ;; (#f ("ice-9/boot-9.scm" 3252 13)) ;; (#f ("ice-9/threads.scm" 389 8)) ;; (resolve-interface ("ice-9/boot-9.scm" 3326 17)) ;; (#f ("gnu/ci.scm" 559 27)) ;; (map1 ("srfi/srfi-1.scm" 585 17)) ;; (append-map ("srfi/srfi-1.scm" 672 15)) ;; (map1 ("srfi/srfi-1.scm" 585 17)) ;; (append-map ("srfi/srfi-1.scm" 672 15)) ;; (cuirass-jobs ("gnu/ci.scm" 499 4)) ;; (#f ("ice-9/eval.scm" 158 9)) ;; (with-exception-handler ("ice-9/boot-9.scm" 1751 10)) ;; (call-with-prompt ("ice-9/boot-9.scm" 723 2)) ;; (#f (#f #f #f)) ;; (#f ("guix/repl.scm" 98 21)) ;; (with-exception-handler ("ice-9/boot-9.scm" 1751 10)) ;; (with-exception-handler ("ice-9/boot-9.scm" 1746 15)) ;; (#f ("guix/repl.scm" 125 7)))>) --8<---------------cut here---------------end--------------->8--- I assume it's angry that my list of symbols isn't a symbol, ergo it can't convert it into a string. However, if I take the code from guix/ci.scm:555 and run it, the module does resolve successfully. --8<---------------cut here---------------start------------->8--- ;; This runs just fine. Code taken from cuirass-jobs in guix/ci.scm:555 (use-modules (srfi srfi-1) (ice-9 match)) (let ((subset '(custom (rsent machines lan gibraltar)))) (match subset (('custom . modules) ;; Build custom modules jobs only. (append-map (lambda (module) (let ((proc (module-ref (resolve-interface module) 'cuirass-jobs))) proc ;no store for testing, just return proc if found )) modules)))) --8<---------------cut here---------------end--------------->8--- Why would (resolve-interface) work with (rsent machines lan gibraltar) in one setting but not in another? Running Guix pull locally with the same channel list works just fine, although the hash of the output profile is different for reasons I don't understand. Just for funsies I did try double quoting, e.g. '(custom '(rsent machines lan gibraltar)), but that didn't help. Appreciate any help or examples on this! -- Take it easy, Richard Sent Making my computer weirder one commit at a time.