From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AP6NGWcjAmRF5wAAbAwnHQ (envelope-from ) for ; Fri, 03 Mar 2023 17:42:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cJVVGGcjAmQmTgAAG6o9tA (envelope-from ) for ; Fri, 03 Mar 2023 17:42:15 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 41A0EE7D9 for ; Fri, 3 Mar 2023 17:42:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pY8Tr-0006qd-Tl; Fri, 03 Mar 2023 11:42:03 -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 1pY8Tq-0006qM-NE for guix-patches@gnu.org; Fri, 03 Mar 2023 11:42:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pY8Tq-0008VG-F4 for guix-patches@gnu.org; Fri, 03 Mar 2023 11:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pY8Tp-0005RF-Sg for guix-patches@gnu.org; Fri, 03 Mar 2023 11:42:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 00/27] Deprecate old-style services. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 03 Mar 2023 16:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal Cc: 61789@debbugs.gnu.org Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167786166120819 (code B ref 61789); Fri, 03 Mar 2023 16:42:01 +0000 Received: (at 61789) by debbugs.gnu.org; 3 Mar 2023 16:41:01 +0000 Received: from localhost ([127.0.0.1]:33805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY8Sr-0005PX-0d for submit@debbugs.gnu.org; Fri, 03 Mar 2023 11:41:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY8So-0005PC-DW for 61789@debbugs.gnu.org; Fri, 03 Mar 2023 11:40:59 -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 1pY8Si-0008Il-AA; Fri, 03 Mar 2023 11:40:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=5nlRRb6bBzBJPBPOtJ5qhX4mqJj0o9sYZrA2XqmvxG0=; b=rDbxsfDOD2M3NYOg8adW UG8Cq5hyUi4OFq+c09aw0XFLKZEUoXMIrWw2jH1pHI+LroVjzcWmt9CLKDxaqoSRsBKHJUjBidd/3 XLygTFcBkoyu2eX9Xx1zO4J0xeEpd2StchDd99bRM51ySN4Ab4Zna1rGytpdr8NnSa4qtvYvCdyi7 QXAUTrY/soGfOzyaLRPhpUSAmlpuZjuv0kTbBjt2OpJQ7L8MaRmnQdaVWYvr3DzefSRvRVLv1RCG0 tZFRezm+kV8/2hNt7AjG4NjIsMLsF7LvWERh5frPoYZDrC6oIpOtTi+47EteeL5Ci/5+3B4zk5Yfm AFUQjfJ6J/WzCQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY8Sh-0007Xa-Qd; Fri, 03 Mar 2023 11:40:52 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Fri, 03 Mar 2023 17:40:49 +0100 In-Reply-To: (Bruno Victal's message of "Sat, 25 Feb 2023 18:57:56 +0000") Message-ID: <87r0u5vlda.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677861735; a=rsa-sha256; cv=none; b=se7PKDV+WG89oCp58ZH9Nxj0Klk073Iewa8uCMOfvfvd3N4tN9UoNi6AKNRjDD/jHesoWG oBZPCJFryN/J+yNLnL58MbWGB7aDGIXJxqtfEn/hWs0APDmcDOQPbwI1t/8N9mvWcI1ZEs F6YEdiar5OP7Pph9gbvIrz1ExIIA2njxyEAAMBZXn3483YToOFueiggp5oUq2EzKoQFOpn 5yBVXqwXKN8HSnT3B8Tte/XGgfmHEHkwFh6x41v04+EwcEuS9zp1peBc13umuxFRkOwyFO M6IM4oYupOVaUv6EgaZXPsnR7y/1q17XO5yrltHWdU9En3oZCPJyh9WH6lzk7A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=rDbxsfDO; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677861735; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5nlRRb6bBzBJPBPOtJ5qhX4mqJj0o9sYZrA2XqmvxG0=; b=VbV/QyLfiuXwpsS2JjIPei8Li3b83C1jhnPT4eXmuxVBnd9NbS1cvTCE6npyRa4zaKBNlN XDPbQi5xlWSn9oZKFBsT2/dWcMRnfM9ImqxCkVQ/LtRr/CfZq2oBLI6BZVtGAlsKm6T1ys w7pSpogLUus8Qlr+/SKVwhy4ytj1qt/2QJjjJwFtrplGOrQ3dwE0YpBb6me6x7iWaBEc4B dPzqCc3AYcrN8BcTyWmAXG43tQg60uAr/4LAkJXquAVnbHoim75cRBiDIZgvr5mWgFOWMT W3b/goOeg0JMJdJOAmVEGX96ZrqK3cUes6XFX4I1crdXd60tjx4I8iI7ZaDHeg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.60 X-Spam-Score: -2.60 X-Migadu-Queue-Id: 41A0EE7D9 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=rDbxsfDO; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: ymMqwo85MitD Hi, Bruno Victal skribis: > * doc/guix.texi (Base Services): Replace pam-limits-service with pam-limi= ts-service-type. > * gnu/packages/benchmark.scm (python-locust)[description]: Update index a= nchor to manual. > * gnu/services/base.scm (pam-limits-service-type): Accept both lists and > file-like objects for compatibility. > (pam-limits-service): Deprecate procedure. [...] > @lisp > -(pam-limits-service > +(service pam-limits-service-type > (list > (pam-limits-entry "@@realtime" 'both 'rtprio 99) > (pam-limits-entry "@@realtime" 'both 'memlock 'unlimited))) Would be nice to indent the service value. :-) > (define pam-limits-service-type > - (let ((security-limits > - ;; Create /etc/security containing the provided "limits.conf" f= ile. > - (lambda (limits-file) > - `(("security/limits.conf" > - ,limits-file)))) > - (pam-extension > + (let ((pam-extension > (lambda (pam) > (let ((pam-limits (pam-entry > (control "required") > (module "pam_limits.so") > - (arguments '("conf=3D/etc/security/limits.= conf"))))) > + (arguments > + '("conf=3D/etc/security/limits.conf"))))) > (if (member (pam-service-name pam) > '("login" "greetd" "su" "slim" "gdm-password" "= sddm" > "sudo" "sshd")) > @@ -1602,7 +1598,26 @@ (define pam-limits-service-type > (inherit pam) > (session (cons pam-limits > (pam-service-session pam)))) > - pam))))) > + pam)))) > + > + ;; XXX: Using file-like objects is deprecated, use lists instead. > + ;; This is to be reduced into the list? case when the depre= cated > + ;; code gets removed. > + ;; Create /etc/security containing the provided "limits.conf" fi= le. > + (security-limits > + (match-lambda > + ((? file-like? obj) > + (warning (G_ "Using file-like value for 'pam-limits-service-= type' > +is deprecated~%")) > + obj) > + ((? list? lst) > + `(("security/limits.conf" > + ,(plain-file "limits.conf" > + (string-join (map pam-limits-entry->string l= st) > + "\n" 'suffix))))) > + (_ (report-error > + (G_ "invalid input for 'pam-limits-service-type'~%")))))) Maybe this change (from file-like to list) should be done separately, for clarity? Also note that =E2=80=98report-error=E2=80=99 prints an error but keeps goi= ng. You probably want to use (raise (formatted-message =E2=80=A6)) instead. Ludo=E2=80=99.