From patchwork Mon Jan 21 10:17:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 774 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 1BAE916A47; Mon, 21 Jan 2019 10:18:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id AA38B16A40 for ; Mon, 21 Jan 2019 10:18:10 +0000 (GMT) Received: from localhost ([127.0.0.1]:51290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glWef-0002YI-Sv for patchwork@mira.cbaines.net; Mon, 21 Jan 2019 05:18:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glWea-0002UZ-68 for guix-patches@gnu.org; Mon, 21 Jan 2019 05:18:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glWeY-0003a0-Dg for guix-patches@gnu.org; Mon, 21 Jan 2019 05:18:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40174) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glWeY-0003Zt-AF for guix-patches@gnu.org; Mon, 21 Jan 2019 05:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1glWeY-0006zp-5p for guix-patches@gnu.org; Mon, 21 Jan 2019 05:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34154] [PATCH] /etc/os-release Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Jan 2019 10:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34154 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34154@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154806587426873 (code B ref -1); Mon, 21 Jan 2019 10:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jan 2019 10:17:54 +0000 Received: from localhost ([127.0.0.1]:39455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glWeP-0006zN-Nz for submit@debbugs.gnu.org; Mon, 21 Jan 2019 05:17:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glWeN-0006zA-CS for submit@debbugs.gnu.org; Mon, 21 Jan 2019 05:17:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:33618) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1glWeI-0003S7-2p for submit@debbugs.gnu.org; Mon, 21 Jan 2019 05:17:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glWeH-0002OR-1f for guix-patches@gnu.org; Mon, 21 Jan 2019 05:17:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glWeG-0003RG-47 for guix-patches@gnu.org; Mon, 21 Jan 2019 05:17:45 -0500 Received: from flashner.co.il ([178.62.234.194]:42942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glWeF-0003QD-PU for guix-patches@gnu.org; Mon, 21 Jan 2019 05:17:44 -0500 Received: from localhost (unknown [188.120.128.87]) by flashner.co.il (Postfix) with ESMTPSA id 69967400E6 for ; Mon, 21 Jan 2019 10:17:41 +0000 (UTC) Date: Mon, 21 Jan 2019 12:17:40 +0200 From: Efraim Flashner Message-ID: <20190121101740.GB11658@macbook41> MIME-Version: 1.0 Content-Disposition: inline X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.11.0 (2018-11-25) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" X-getmail-retrieved-from-mailbox: Patches Currently GuixSD ships without an '/etc/os-release' file. This simple service aims to correct this. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index d2baea0dd..7af3142cf 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2294,6 +2294,17 @@ to handle." (requirement requirement) (name-servers name-servers))))) +(define %os-release-file + (plain-file "os-release" + (string-append + "NAME=\"GNU Guix\"\n" + "PRETTY_NAME=\"GNU Guix\"\n" + "VERSION=\""((@ (guix packages) package-version) guix)"\"\n" + "ID=guix\n" + "HOME_URL=\"https://www.gnu.org/software/guix/\"\n" + "SUPPORT_URL=\"https://www.gnu.org/software/guix/help/\"\n" + "BUG_REPORT_URL=\"mailto:bug-guix@gnu.org\"\n"))) + (define %base-services ;; Convenience variable holding the basic services. @@ -2340,6 +2351,9 @@ to handle." (udev-configuration (rules (list lvm2 fuse alsa-utils crda)))) + (service special-files-service-type + `(("/etc/os-release" ,%os-release-file))) + (service special-files-service-type `(("/bin/sh" ,(file-append (canonical-package bash) "/bin/sh"))))))