services: bitlbee: Remove use of ‘make-forkexec-constructor/container’.
This will only affect systems running Shepherd < 0.9.0, which was released in August 2022. * gnu/services/messaging.scm (bitlbee-shepherd-service): Remove ‘with-imported-modules’ and ‘modules’ field. Use ‘make-forkexec-constructor’ instead of ‘make-forkexec-constructor/container’ when ‘make-inetd-constructor’ is missing. Change-Id: I35a0487bccaee4799ad0d81388d540e5c7891f7e
This commit is contained in:
parent
bcad46cde6
commit
d3ffa06a4d
1 changed files with 34 additions and 43 deletions
|
@ -849,56 +849,47 @@ string, you could instantiate a prosody service like this:
|
||||||
(target conf)))
|
(target conf)))
|
||||||
#:namespaces (delq 'net %namespaces))))
|
#:namespaces (delq 'net %namespaces))))
|
||||||
|
|
||||||
(with-imported-modules (source-module-closure
|
(list (shepherd-service
|
||||||
'((gnu build shepherd)
|
(provision '(bitlbee))
|
||||||
(gnu system file-systems)))
|
|
||||||
(list (shepherd-service
|
|
||||||
(provision '(bitlbee))
|
|
||||||
|
|
||||||
;; Note: If networking is not up, then /etc/resolv.conf
|
;; Note: If networking is not up, then /etc/resolv.conf
|
||||||
;; doesn't get mapped in the container, hence the dependency
|
;; doesn't get mapped in the container, hence the dependency
|
||||||
;; on 'networking'.
|
;; on 'networking'.
|
||||||
(requirement '(user-processes networking))
|
(requirement '(user-processes networking))
|
||||||
|
|
||||||
(modules '((gnu build shepherd)
|
(start #~(if (defined? 'make-inetd-constructor)
|
||||||
(gnu system file-systems)))
|
|
||||||
(start #~(if (defined? 'make-inetd-constructor)
|
|
||||||
|
|
||||||
(make-inetd-constructor
|
(make-inetd-constructor
|
||||||
(list #$bitlbee* "-I" "-c" #$conf)
|
(list #$bitlbee* "-I" "-c" #$conf)
|
||||||
(list (endpoint
|
(list (endpoint
|
||||||
(addrinfo:addr
|
(addrinfo:addr
|
||||||
(car (getaddrinfo #$interface
|
(car (getaddrinfo #$interface
|
||||||
#$(number->string port)
|
#$(number->string port)
|
||||||
(logior AI_NUMERICHOST
|
(logior AI_NUMERICHOST
|
||||||
AI_NUMERICSERV))))))
|
AI_NUMERICSERV))))))
|
||||||
#:requirements '#$requirement
|
#:requirements '#$requirement
|
||||||
#:service-name-stem "bitlbee"
|
#:service-name-stem "bitlbee"
|
||||||
#:user "bitlbee" #:group "bitlbee"
|
#:user "bitlbee" #:group "bitlbee"
|
||||||
|
|
||||||
;; Allow 'bitlbee-purple' to use libpurple plugins.
|
;; Allow 'bitlbee-purple' to use libpurple plugins.
|
||||||
#:environment-variables
|
#:environment-variables
|
||||||
(list (string-append "PURPLE_PLUGIN_PATH="
|
(list (string-append "PURPLE_PLUGIN_PATH="
|
||||||
#$plugins "/lib/purple-2")
|
#$plugins "/lib/purple-2")
|
||||||
"GUIX_LOCPATH=/run/current-system/locale"))
|
"GUIX_LOCPATH=/run/current-system/locale"))
|
||||||
|
|
||||||
(make-forkexec-constructor/container
|
(make-forkexec-constructor
|
||||||
(list #$(file-append bitlbee "/sbin/bitlbee")
|
(list #$(file-append bitlbee "/sbin/bitlbee")
|
||||||
"-n" "-F" "-u" "bitlbee" "-c" #$conf)
|
"-n" "-F" "-u" "bitlbee" "-c" #$conf)
|
||||||
|
|
||||||
;; Allow 'bitlbee-purple' to use libpurple plugins.
|
;; Allow 'bitlbee-purple' to use libpurple plugins.
|
||||||
#:environment-variables
|
#:environment-variables
|
||||||
(list (string-append "PURPLE_PLUGIN_PATH="
|
(list (string-append "PURPLE_PLUGIN_PATH="
|
||||||
#$plugins "/lib/purple-2"))
|
#$plugins "/lib/purple-2"))
|
||||||
|
|
||||||
#:pid-file "/var/run/bitlbee.pid"
|
#:pid-file "/var/run/bitlbee.pid")))
|
||||||
#:mappings (list (file-system-mapping
|
(stop #~(if (defined? 'make-inetd-destructor)
|
||||||
(source "/var/lib/bitlbee")
|
(make-inetd-destructor)
|
||||||
(target source)
|
(make-kill-destructor)))))))))
|
||||||
(writable? #t))))))
|
|
||||||
(stop #~(if (defined? 'make-inetd-destructor)
|
|
||||||
(make-inetd-destructor)
|
|
||||||
(make-kill-destructor))))))))))
|
|
||||||
|
|
||||||
(define %bitlbee-accounts
|
(define %bitlbee-accounts
|
||||||
;; User group and account to run BitlBee.
|
;; User group and account to run BitlBee.
|
||||||
|
|
Reference in a new issue