unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: 46209@debbugs.gnu.org
Subject: bug#46209: 46043 breaks booting with custom shepherd package
Date: Sun, 31 Jan 2021 21:35:59 +0100	[thread overview]
Message-ID: <5240046905c259cac672ab29cc4da791675aa99d.camel@telenet.be> (raw)
In-Reply-To: <87lfc8lwdx.fsf@gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1051 bytes --]

On Sun, 2021-01-31 at 22:49 +0300, Oleg Pykhalov wrote:
>   (operating-system
> 
>     (inherit base-system)
> 
>     (essential-services
> 
>      (modify-services (operating-system-default-essential-services base-system)
> 
>        (shepherd-root-service-type config => (shepherd-configuration
> 
>                                               (inherit config)
> 
>                                               (shepherd shepherd)))))))

I'm currently running "guix time-machine etcetera", which hasn't completed yet,
but here's some quick speculation on what could have went wrong:

You shouldn't write (operating-system-default-essential-services base-system),
but rather (operating-system-default-essential-services this-operating-system).

The essential-services field is thunked, basically that means that the expression
under essential-services can refer to the operating-system definition itself,
using the macro this-operating-system.

A  potentially fixed configuration is attached, I'll try to run it in a VM.

[-- Attachment #1.1.2: Type: text/html, Size: 1908 bytes --]

[-- Attachment #1.2: reproduce-shepherd-bug.scm --]
[-- Type: text/x-scheme, Size: 2741 bytes --]

;; Generation 120	Jan 31 2021 01:15:12	(current)
;;   guix eb6b061
;;     repository URL: https://git.savannah.gnu.org/git/guix.git
;;     branch: master
;;     commit: eb6b061320418fdbd49ecb72c366e43ff7a38dbc
;;
;; env GUIX_PACKAGE_PATH=$PWD guix system build vm-image.tmpl
;; env GUIX_PACKAGE_PATH=$PWD guix system vm vm-image.tmpl

(use-modules (gnu) (guix) (srfi srfi-1))
(use-service-modules shepherd networking ssh)
(use-package-modules admin bootloaders certs nano)

(operating-system
 (host-name "gnu")
 (timezone "Etc/UTC")
 (locale "en_US.utf8")

 (firmware '())

 ;; Below we assume /dev/vda is the VM's hard disk.
 ;; Adjust as needed.
 (bootloader (bootloader-configuration
              (bootloader grub-bootloader)
              (target "/dev/vda")
              (terminal-outputs '(console))))
 (file-systems (cons (file-system
                      (mount-point "/")
                      (device "/dev/vda1")
                      (type "ext4"))
                     %base-file-systems))

 (users (cons (user-account
               (name "guest")
               (comment "GNU Guix Live")
               (password "")	;no password
               (group "users")
               (supplementary-groups '("wheel" "netdev"
                                       "audio" "video")))
              %base-user-accounts))

 ;; Our /etc/sudoers file.  Since 'guest' initially has an empty password,
 ;; allow for password-less sudo.
 (sudoers-file (plain-file "sudoers" "
root ALL=(ALL) ALL
%wheel ALL=NOPASSWD: ALL\n"))

 (packages (append (list nano nss-certs)
                   %base-packages))

 (essential-services
  (modify-services
   (operating-system-default-essential-services this-operating-system)
   (shepherd-root-service-type config => (shepherd-configuration
					  (inherit config)
					  (shepherd shepherd)))))
 (services
  (append (list ;; Uncomment the line below to add an SSH server.
           ;;(service openssh-service-type)

           ;; Use the DHCP client service rather than NetworkManager.
           (service dhcp-client-service-type))

          ;; Remove GDM, ModemManager, NetworkManager, and wpa-supplicant,
          ;; which don't make sense in a VM.
          (remove (lambda (service)
		    (let ((type (service-kind service)))
                      (or (memq type
                                (list wpa-supplicant-service-type
                                      network-manager-service-type
                                      modem-manager-service-type))
                          (eq? 'network-manager-applet
                               (service-type-name type)))))
                  %base-services))))


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2021-01-31 20:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31 12:46 bug#46209: 46043 breaks booting with custom shepherd package Oleg Pykhalov
2021-01-31 16:26 ` Maxime Devos
2021-01-31 19:49   ` Oleg Pykhalov
2021-01-31 20:35     ` Maxime Devos [this message]
2021-01-31 20:57     ` Maxime Devos
2021-01-31 22:40       ` Oleg Pykhalov
2021-01-31 21:09     ` Maxime Devos
2021-01-31 22:55       ` Oleg Pykhalov
2021-02-01  8:15         ` Maxime Devos
2021-02-01  9:18         ` Ludovic Courtès
2021-02-01 18:51           ` Oleg Pykhalov

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=5240046905c259cac672ab29cc4da791675aa99d.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=46209@debbugs.gnu.org \
    --cc=go.wigust@gmail.com \
    /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).