Subject: bug#46209: 46043 breaks booting with custom shepherd package

From: Maxime Devos <[email-masked]>
Date: Sun, 31 Jan 2021 17:26:37 +0100

On Sun, 2021-01-31 at 15:46 +0300, Oleg Pykhalov wrote:
> Before applied patch [1] I used a hack to override shepherd package:
> 
>     (module-set! (resolve-module '(gnu packages admin)) 'shepherd shepherd-patched)
> 
> Now on Guix commit eb6b061 I cannot use the previous override, and also
> the mentioned in [1] way overriding shepherd package doesn't work:
> 
>     (shepherd-root-service-type config => (shepherd-configuration
>                                            (inherit config)
>                                            (shepherd shepherd-patched)))
> 
> I got error about undefined ‘#:supplementary-groups’ which added in
> ‘shepherd-patched’, so I assume my ‘shepherd-patched’ package not used.
> 
> [1] https://issues.guix.gnu.org/46043

Can you post your operating system configuration definition?
Also, were does the error about undefined "#:supplementary-groups"
appear? When booting, when reconfiguring a ‘live’ system, when
guix is compiling the shepherd services to .go?

A pitfall to take in mind: it's the ‘essential-services’ field
you need to modify, not the ‘services’ field of ‘operating-system’.
My original example at [1] was incorrect.  A corrected example:

(operating-system
 [...]
 (services [don't modify this])
 (essential-services
  (modify-services (operating-system-default-essential-services
                    this-operating-system)
    (shepherd-root-service-type c =>
                                (shepherd-configuration
                                 (inherit c)
                                 (shepherd-patched))))))

Maxime
-- 
Maxime Devos <[email-masked]>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos