On Sun, 2021-01-31 at 22:49 +0300, Oleg Pykhalov wrote:
> [...]
> First of all I want to ask did you try to override Shepherd yourself?

Yes, and I can confirm I could use #:supplementary-groups in
service definitions.  I override Shepherd with the mechanism in [1],
not with module-set!, however.

> It would be helpful to have a paragraph in the documentation how to
> override the Shepherd, and if you know a proper way, please add a small
> example of operating-system definition with overriden Shepherd and a
> basic service like OpenSSH.

Yes, would be very helpful, especially as it's easy to get wrong.
I'm currently occupied with other things, though.  As for an example:
your system configuration might do (as adjusted per previous e-mails),
with the following block ...

 (essential-services
  (modify-services
   (operating-system-default-essential-services this-operating-system)
   (shepherd-root-service-type 
config => (shepherd-configuration
                                          (inherit config)
                                          (shep
herd shepherd)))))
replaced by ...

 (essential-services
  (modify-services
   (operating-system-default-essential-services this-operating-system)
   (shepherd-root-service-type 
config => (shepherd-configuration
                                          (inherit config)
                                          (shep
herd shepherd-patched)))))

(otherwise no change in Shepherd is made), where shepherd-patched should
be defined somewhere in the beginning of the configuration file.
You could use your own shepherd-patched, or my shepherd-latest (attached):

[1] https://issues.guix.gnu.org/46043

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2020 Pierre Langlois <[email protected]>
;;; Copyright © 2020 Tobias Geerinckx-Rice <[email protected]>
;;; Copyright © 2021 Maxime Devos <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (extra-packages)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages man))

(define-public shepherd-latest
  (let ((commit "4c5176f5a7a5a1e7d7f258f585e8ed127a21b99a")
        (revision "1"))
    (package
      (inherit shepherd)
      (version (git-version "0.8.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://git.savannah.gnu.org/git/shepherd.git";)
               (commit commit)))
         (file-name (git-file-name "shepherd" version))
         (sha256
          (base32 "0x7njnvhxmay4xz4pyh9b982bhxys089nysz95paz3vhf1253fr6"))))
      (arguments
       '(#:configure-flags '("--localstatedir=/var")
         #:phases
         (modify-phases %standard-phases
           ;; XXX less duplication (gpodder)
           ;; 'msgmerge' introduces non-determinism by resetting the
           ;; POT-Creation-Date in .po files.
           (add-after 'bootstrap 'do-not-run-msgmerge
             (lambda _
               (substitute* "Makefile.in"
                 (("msgmerge") "true"))
               #t))
           (add-after 'unpack 'make-po-files-writable
             (lambda _
               (for-each
                (lambda (f)
                  (chmod f #o664))
                (find-files "po"))
               #t)))))
      (native-inputs
       `(("autoconf" ,autoconf)
         ("automake" ,automake)
         ("gettext" ,gettext-minimal)
         ("texinfo" ,texinfo)
         ("help2man" ,help2man)
         ,@(package-native-inputs shepherd))))))

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to