From patchwork Tue Nov 14 14:09:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 56458 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E317F27BBEA; Tue, 14 Nov 2023 14:10:57 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3744227BBE2 for ; Tue, 14 Nov 2023 14:10:56 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2u7c-00008h-U4; Tue, 14 Nov 2023 09:10:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2u7Q-0008W5-Mb for guix-patches@gnu.org; Tue, 14 Nov 2023 09:10:24 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2u7Q-00027l-Ed for guix-patches@gnu.org; Tue, 14 Nov 2023 09:10:20 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r2u86-0005d6-I2 for guix-patches@gnu.org; Tue, 14 Nov 2023 09:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67175] [PATCH 3/9] services: bitlbee: Remove use of =?utf-8?q?=E2=80=98make-forkexec-constructor/container=E2=80=99=2E?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 Nov 2023 14:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67175 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67175@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 67175-submit@debbugs.gnu.org id=B67175.169997104221516 (code B ref 67175); Tue, 14 Nov 2023 14:11:02 +0000 Received: (at 67175) by debbugs.gnu.org; 14 Nov 2023 14:10:42 +0000 Received: from localhost ([127.0.0.1]:60578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2u7l-0005aw-PO for submit@debbugs.gnu.org; Tue, 14 Nov 2023 09:10:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2u7i-0005aA-Se for 67175@debbugs.gnu.org; Tue, 14 Nov 2023 09:10:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2u6x-0001rX-9s; Tue, 14 Nov 2023 09:09:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=gjqM5RJZzFq8WYPAMn5MThjxiPS0doUChdMxCB+9OgA=; b=MJ48iX9zqihRIzcCFpdp tgFVZ2YLvykegBjyrV+WixWm4HbtUgqDw33e8lyQypwYd6e1owy1myLhqU6UY80VHx1XvB8U2u+Dq zqtNmLbXNJ9NQwDlvqb4KgYccYQYB6pR7ve1rDuN0K71pux9L2DcaLn5RsLlaACHGdn7fb0NhI6Of VO0D4ZHsSoMN0eO35pJVhkVIe0zRMQIQf61OmeGoilen9RjpGB0hQQok9AJlhipxRbx0AEY515a5w 0hrRcTUAhcilROX+OQZV5Ghgv6P5DHpX01pRAicGPdqbrstkTomDEpXsXab3pyy5nLxG9uibADdSS BDTE9LZVhP/3lw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 14 Nov 2023 15:09:12 +0100 Message-ID: <5e1107fcac6fbce929778e3e9cc5c2f1cc655aeb.1699970930.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 --- gnu/services/messaging.scm | 77 +++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 43 deletions(-) diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index c4963936a0..7505810e7c 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -849,56 +849,47 @@ (define bitlbee-shepherd-service (target conf))) #:namespaces (delq 'net %namespaces)))) - (with-imported-modules (source-module-closure - '((gnu build shepherd) - (gnu system file-systems))) - (list (shepherd-service - (provision '(bitlbee)) + (list (shepherd-service + (provision '(bitlbee)) - ;; Note: If networking is not up, then /etc/resolv.conf - ;; doesn't get mapped in the container, hence the dependency - ;; on 'networking'. - (requirement '(user-processes networking)) + ;; Note: If networking is not up, then /etc/resolv.conf + ;; doesn't get mapped in the container, hence the dependency + ;; on 'networking'. + (requirement '(user-processes networking)) - (modules '((gnu build shepherd) - (gnu system file-systems))) - (start #~(if (defined? 'make-inetd-constructor) + (start #~(if (defined? 'make-inetd-constructor) - (make-inetd-constructor - (list #$bitlbee* "-I" "-c" #$conf) - (list (endpoint - (addrinfo:addr - (car (getaddrinfo #$interface - #$(number->string port) - (logior AI_NUMERICHOST - AI_NUMERICSERV)))))) - #:requirements '#$requirement - #:service-name-stem "bitlbee" - #:user "bitlbee" #:group "bitlbee" + (make-inetd-constructor + (list #$bitlbee* "-I" "-c" #$conf) + (list (endpoint + (addrinfo:addr + (car (getaddrinfo #$interface + #$(number->string port) + (logior AI_NUMERICHOST + AI_NUMERICSERV)))))) + #:requirements '#$requirement + #:service-name-stem "bitlbee" + #:user "bitlbee" #:group "bitlbee" - ;; Allow 'bitlbee-purple' to use libpurple plugins. - #:environment-variables - (list (string-append "PURPLE_PLUGIN_PATH=" - #$plugins "/lib/purple-2") - "GUIX_LOCPATH=/run/current-system/locale")) + ;; Allow 'bitlbee-purple' to use libpurple plugins. + #:environment-variables + (list (string-append "PURPLE_PLUGIN_PATH=" + #$plugins "/lib/purple-2") + "GUIX_LOCPATH=/run/current-system/locale")) - (make-forkexec-constructor/container - (list #$(file-append bitlbee "/sbin/bitlbee") - "-n" "-F" "-u" "bitlbee" "-c" #$conf) + (make-forkexec-constructor + (list #$(file-append bitlbee "/sbin/bitlbee") + "-n" "-F" "-u" "bitlbee" "-c" #$conf) - ;; Allow 'bitlbee-purple' to use libpurple plugins. - #:environment-variables - (list (string-append "PURPLE_PLUGIN_PATH=" - #$plugins "/lib/purple-2")) + ;; Allow 'bitlbee-purple' to use libpurple plugins. + #:environment-variables + (list (string-append "PURPLE_PLUGIN_PATH=" + #$plugins "/lib/purple-2")) - #:pid-file "/var/run/bitlbee.pid" - #:mappings (list (file-system-mapping - (source "/var/lib/bitlbee") - (target source) - (writable? #t)))))) - (stop #~(if (defined? 'make-inetd-destructor) - (make-inetd-destructor) - (make-kill-destructor)))))))))) + #:pid-file "/var/run/bitlbee.pid"))) + (stop #~(if (defined? 'make-inetd-destructor) + (make-inetd-destructor) + (make-kill-destructor))))))))) (define %bitlbee-accounts ;; User group and account to run BitlBee.