From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id OPm7F2Knd2V0aAAAkFu2QA (envelope-from ) for ; Tue, 12 Dec 2023 01:20:50 +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 kA7bEmKnd2UuCgEA62LTzQ (envelope-from ) for ; Tue, 12 Dec 2023 01:20:50 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=GU3jrTFS; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702340450; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=UqGmJbZLhgWUTZsL4LSLkTSlsIL3qJr2LRhhzqT914Y=; b=eGgaX/Ct50CYNquCr/bCk6BycSIgu3fQfn11H53X8NufBH2t0qKhFTcOOwp7W4/k1yjRX+ Tum/6Ln2gnJLYG+a/XYhtu/bA7FCHcLkAynOJFSsgQvvEF42xIb+KceVv2fNX12yG+k6kq OQLOptI1lcWeQpHV7V0apHC4LOCMojnDb5jwDCpBrI1fNSb5tzgegA0uhZSWiZGpvzGqxC Tbs6K6Tj929GIcDvYcZXFxkre1LZOlQ+tA2+VQx7URXc3yQrvnzhzBJs6DnP7i85LnflFV G4VCEcDeWB8VurGTC+poYCckJoIqARzvOBnQKa17NXt02nzRMfVmPqRKbN6Kyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702340450; a=rsa-sha256; cv=none; b=Ts0PeQcO+KXBeP2kANlCoiP8qbZXxsbDEGz3jpQ/bWStvHTmm/TqWAc/m2SCcjm8fBgA2Q VrbprJm27Ja2O13xWubQWyNojojuqpZGsMfBuBoj+hJ7tAiiS6HY/Vg4I4ybDrsVGvpMiH 8ryEfwkua2UvPE+Aq78uXIL0CzWbd2CVAZ6tpM2a93SOh3neu6zpXaidT3RP+V9Mel0Pa+ /HmtW+C0LAlyFqo1Td/RemqUVKeYZ2nX5kZtQcG7XFxCIo3YfSkjJpGFpmtNALD908dELB C7RMIkhEehSONjEUdpl0vdPK59tcU9o9Nu9tgfRWeEMXSJPlu2XSP3g3+8qfZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=GU3jrTFS; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org 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 0500B40DE1 for ; Tue, 12 Dec 2023 01:20:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCqVN-0008M0-JS; Mon, 11 Dec 2023 19:20:09 -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 1rCqVJ-0008L9-P3 for guix-devel@gnu.org; Mon, 11 Dec 2023 19:20:07 -0500 Received: from sail-ipv4.us-core.com ([208.82.101.137]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rCqVH-0006an-IS for guix-devel@gnu.org; Mon, 11 Dec 2023 19:20:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=9tBaBvE8kgX6nQK A9VTkOzPTyNx5+sHoqI99RQJ0wY0=; h=date:subject:cc:to:from; d=lease-up.com; b=GU3jrTFSi4H+zy0yMAcIPx0Gq4qkS59a9buw8LJuSmX/6TyMbIcB nDWKNmJlYkz0xgc4P5w9Yv61Kt4g16AxiDdguBBtRmr04872sQfiYwukTlI5aShmNyfaiX 6WMkjBWXS82710KddDvkbMUVND2MxoExhkcfxmen8Yufjw8kA= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 5202a5ab (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Tue, 12 Dec 2023 00:19:59 +0000 (UTC) To: guix-devel@gnu.org Cc: Subject: Type of 'os' in gnu/system.scm Date: Mon, 11 Dec 2023 16:19:59 -0800 Message-ID: <87h6kob7bk.fsf@lease-up.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=208.82.101.137; envelope-from=felix.lechner@lease-up.com; helo=sail-ipv4.us-core.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Felix Lechner From: Felix Lechner via "Development of GNU Guix and the GNU System distribution." Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.91 X-Spam-Score: -1.91 X-Migadu-Queue-Id: 0500B40DE1 X-Migadu-Scanner: mx11.migadu.com X-TUID: QVN4ZyNHtIFY Hi, Looking at this definition in gnu/system.scm [1] I am trying to figure out what 'os' is: (define* (operating-system-kernel-arguments os root-device #:key (version %boot-parameters-version)) "Return all the kernel arguments, including the ones not specified directly by the user. VERSION should match that of the target record object that will contain the kernel parameters." (append (bootable-kernel-arguments os root-device version) (operating-system-user-kernel-arguments os))) The same file also contains a record definition for so it seemed reasonable to assume that 'os' referred to such a record. In fact, the second procedure inside the 'append' above, operating-system-user-kernel-arguments, is one of the accessors [2] (even though the name does not match the field). In the first procedure bootable-kernel-arguments [3] however, 'os' (which is called 'system' there) is used like a string, although inside a gexp: (define* (bootable-kernel-arguments system root-device version) "Return a list of kernel arguments (gexps) to boot SYSTEM from ROOT-DEVICE. VERSION is the target version of the boot-parameters record." ;; If the version is newer than 0, we use the new style initrd parameter ;; names, otherwise we use the legacy ones. This is to maintain backward ;; compatibility when producing bootloader configurations for older ;; generations. (define version>0? (> version 0)) (list (string-append (if version>0? "root=" "--root=") ;; Note: Always use the DCE format because that's what ;; (gnu build linux-boot) expects for the 'root' ;; kernel command-line option. (file-system-device->string root-device #:uuid-type 'dce)) #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system) #~(string-append (if #$version>0? "gnu.load=" "--load=") #$system "/boot"))) I know objects in the store become paths when unquoted via '#$'. Does that also work for Guix records declared via define-record-type* [4] (please note the asterisk)? Thanks! Kind regards Felix [1] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system.scm#n319 [2] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system.scm#n231 [3] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system.scm#n207 [4] https://git.savannah.gnu.org/cgit/guix.git/tree/guix/records.scm#n282