unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 34154@debbugs.gnu.org
Subject: [bug#34154] [PATCH] /etc/os-release
Date: Mon, 21 Jan 2019 12:17:40 +0200	[thread overview]
Message-ID: <20190121101740.GB11658@macbook41> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 315 bytes --]

Currently GuixSD ships without an '/etc/os-release' file. This simple
service aims to correct this.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: 0001-services-Add-os-release-file.patch --]
[-- Type: text/plain, Size: 1753 bytes --]

From 57918a48ee7c649470ab20cb7337bc5528df515e Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Mon, 21 Jan 2019 12:16:31 +0200
Subject: [PATCH] services: Add os-release-file.

* gnu/services/base.scm (%os-release-file): New variable.
(%base-services): Add it.
---
 gnu/services/base.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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")))
+
 \f
 (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"))))))
-- 
2.20.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2019-01-21 10:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 10:17 Efraim Flashner [this message]
2019-01-22 21:38 ` [bug#34154] [PATCH] /etc/os-release Ludovic Courtès
2019-01-23  7:20   ` Efraim Flashner
2019-01-23  9:59     ` Ludovic Courtès
2019-01-23 11:37       ` Ricardo Wurmus
2019-01-23 14:32         ` ng0
2019-01-25  8:42           ` Ludovic Courtès
     [not found] <36-bJau0GXybxv0BCxV-3SwgyEOOpj8KkmW1cRyfydTJzckzhn2zBRx8qNWri1qfgek9BgNRoZFA8pYKtdABNNnMnrBWTPvc2e1-dOYB5Yw=@protonmail.com>
2021-08-06  3:06 ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190121101740.GB11658@macbook41 \
    --to=efraim@flashner.co.il \
    --cc=34154@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).