From patchwork Fri Oct 28 10:07:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Marusich X-Patchwork-Id: 16894 Received: (qmail 124756 invoked by uid 89); 28 Oct 2016 10:10:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=262, 7, Hx-languages-length:2791, 1216, 7367 X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Oct 2016 10:09:54 +0000 Received: from localhost ([::1]:47954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c046i-0005kj-Uo for patchwork@sourceware.org; Fri, 28 Oct 2016 06:09:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c044j-0004QY-9l for guix-devel@gnu.org; Fri, 28 Oct 2016 06:07:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c044i-0003yC-BK for guix-devel@gnu.org; Fri, 28 Oct 2016 06:07:49 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:33562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c044i-0003xr-2P for guix-devel@gnu.org; Fri, 28 Oct 2016 06:07:48 -0400 Received: by mail-pf0-x243.google.com with SMTP id i85so872154pfa.0 for ; Fri, 28 Oct 2016 03:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0l3KJSFNW2dIZygJOuTGcffW8UaE6howywoFjcqHa0Q=; b=HqR71jBCZ1NUWdVGx+0zFd/vG9KMS83HfRXbGDOUQFoA9XXbatSYiHUf7L6U+57YcL sHPrCWKL2v16QH/IK+nJHCRmp6xqueSqNwfYbg+2i1wUdcuQZGH4CvImonQAWyWuNpsZ tywgi/vlMhu49Clr8lgOWqGsjwWDpdIegO/yQhX2UFxkKASelazUCdYkYWmCsy110WzQ Oum2I6Q2y9kYqFVCcelPgRlyqVprDTckhVoWL5e+bvDi3b6X7+IRPiMa62krF4T/OsBR Z6oLkVJG/W9muQlKIciNYQlwSFIW+do5S3jPQUcYS9wAdZA9n2B4PXfNJiUNZhJsRgT6 ZQNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0l3KJSFNW2dIZygJOuTGcffW8UaE6howywoFjcqHa0Q=; b=c8fW29EFxIxm1b737WUqHotaaEcbCQAaqi3sxdltgqeSRxXHm4Er7SCapQ8DRTpQCF nY16ztLO6fgmnTNrmBgv0T9MzKb6RLX8z+umAv7LbYxlZ5fnxX+uk2Ycd5d9HjkgNZDV E76zhbV3LdLAzs3ubgYSeDlGq9xqo+S4C53ERsWvQwJyL4vL1Fp1A+ngMYI66UF73KKJ jx116qh0XEt+Y3Hg5ki1V32csiRP4XM4cGNMIP70IDEp1ITVcjuZYnRMuwR765bR/q1o xgl7xVkG2PLVJLld/ZTmrgp52qtkBL/HH8qF506oDGNO7UQkhAGAgzMTt0NrsKgOOLeO o40A== X-Gm-Message-State: ABUngveV5qN9QYPLhkzqQWYnAr4XOoBzlcwPkA5/Z3u2XjPZF4dqV+EbUfKlvCfs4PX7Ww== X-Received: by 10.98.130.79 with SMTP id w76mr2733682pfd.101.1477649266664; Fri, 28 Oct 2016 03:07:46 -0700 (PDT) Received: from garuda.hsd1.wa.comcast.net. ([2601:602:9d80:188d:4e0f:6eff:fef6:70b9]) by smtp.gmail.com with ESMTPSA id t7sm17798508pfa.22.2016.10.28.03.07.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Oct 2016 03:07:46 -0700 (PDT) From: cmmarusich@gmail.com To: guix-devel@gnu.org Subject: [PATCH 02/10] Add 'device' field to Date: Fri, 28 Oct 2016 03:07:19 -0700 Message-Id: <20161028100727.1182-3-cmmarusich@gmail.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161028100727.1182-1-cmmarusich@gmail.com> References: <20161028100727.1182-1-cmmarusich@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::243 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" From: Chris Marusich * gnu/system/grub.scm (): add field 'device'. * gnu/system.scm (grub-configuration-file): use a dummy value for 'device'. * guix/scripts/system.scm (previous-grub-entries): use a dummy value for 'device'. In a future commit, we will restructure the grub.cfg generation logic to use this information, to enable the implementation of 'guix system switch-generation' and 'guix system roll-back'. --- gnu/system.scm | 1 + gnu/system/grub.scm | 4 +++- guix/scripts/system.scm | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/system.scm b/gnu/system.scm index ff84b63..f9f63a0 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -736,6 +736,7 @@ listed in OS. The C library expects to find it under (file-system-device root-fs))) (entries -> (list (menu-entry (label label) + (device #f) ;; stub value, not used yet (linux kernel) (linux-arguments (cons* (string-append "--root=" root-device) diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index 249b415..859f33a 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2016 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -121,6 +122,7 @@ object denoting a file name." menu-entry make-menu-entry menu-entry? (label menu-entry-label) + (device menu-entry-device) ; file system uuid, label, or #f (linux menu-entry-linux) (linux-arguments menu-entry-linux-arguments (default '())) ; list of string-valued gexps @@ -262,7 +264,7 @@ corresponding to old generations of the system." (define entry->gexp (match-lambda - (($ label linux arguments initrd) + (($ label device linux arguments initrd) ;; Use the right file names for LINUX and STORE-FS in case STORE-FS is ;; not the "/" file system. (let ((linux (strip-mount-point store-fs linux)) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 0519ab8..8f0b8cd 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2016 Alex Kost +;;; Copyright © 2016 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -384,6 +385,7 @@ it atomically, and then run OS's activation script." (label (string-append label " (#" (number->string number) ", " (seconds->string time) ")")) + (device #f) ; stub value, not used yet (linux kernel) (linux-arguments (cons* (string-append "--root=" root-device)