From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EYapN15lDGQucwEASxT56A (envelope-from ) for ; Sat, 11 Mar 2023 12:26:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AEmPNl5lDGSlOgEAauVa8A (envelope-from ) for ; Sat, 11 Mar 2023 12:26:22 +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 9464ACEE2 for ; Sat, 11 Mar 2023 12:26:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paxMS-0007L7-7j; Sat, 11 Mar 2023 06:26:04 -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 1paxMQ-0007Kd-1o for guix-patches@gnu.org; Sat, 11 Mar 2023 06:26: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 1paxMP-0008AP-Pb for guix-patches@gnu.org; Sat, 11 Mar 2023 06:26:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1paxMP-0002Z8-Lr for guix-patches@gnu.org; Sat, 11 Mar 2023 06:26:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61744] [PATCH v2 1/2] services: base: Deprecate 'pam-limits-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Mar 2023 11:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61744 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ricardo Wurmus Cc: 61744@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 61744-submit@debbugs.gnu.org id=B61744.16785339279820 (code B ref 61744); Sat, 11 Mar 2023 11:26:01 +0000 Received: (at 61744) by debbugs.gnu.org; 11 Mar 2023 11:25:27 +0000 Received: from localhost ([127.0.0.1]:56649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paxLq-0002YK-Qv for submit@debbugs.gnu.org; Sat, 11 Mar 2023 06:25:27 -0500 Received: from smtpmciv2.myservices.hosting ([185.26.107.238]:33656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paxLo-0002YB-Ob for 61744@debbugs.gnu.org; Sat, 11 Mar 2023 06:25:25 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv2.myservices.hosting (Postfix) with ESMTP id F41A420CEA; Sat, 11 Mar 2023 12:25:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 391218009B; Sat, 11 Mar 2023 12:25:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kbGghzecHDC8; Sat, 11 Mar 2023 12:25:14 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 6AC4E8009A; Sat, 11 Mar 2023 12:25:14 +0100 (CET) Message-ID: <271039c5-c316-7a12-53a2-152b0b186538@makinata.eu> Date: Sat, 11 Mar 2023 11:25:13 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US References: <871qlwo4m8.fsf@elephly.net> From: Bruno Victal In-Reply-To: <871qlwo4m8.fsf@elephly.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678533982; a=rsa-sha256; cv=none; b=dwOqZM/UP/DyTngFHfmVWqj4wbY5ShERTQiez9DsKRrBJLgXIrH7uX2Z+RAKC4oBhzKZjD txEIM4pUYZVvqMqI3qyz/yHs+P+BvgQs4eyOfovqnq8IEnzyM9Dh8fEKF0zK2uh0Hs+IbG SlRsN5SNk2ebY4vzOaraIoMu0BxkiGKhVCu9tqUut8AZKA1ujFSM4kiJQgyIfySMemnca4 3AHgJkm/2bbpUFPRFof8Q7hm85nrdkUpdNg6hdKExP1Iv0BY45RNImOosyosoA3cALRUM/ xKFU1mSSMU93mDsmRqUF1crweUgdMkg8m6Ll78O68E0jOVSVKFY0U6C/klyB0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678533982; 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; bh=Fpm6L10+G+cOo7kmFZ0uWBzuguJABW/m23AFSQ4DcPc=; b=cY+atzmY6Daux8mJLIrkcRxhf5NO5ItLI/W4oar+kx5Uj3tJMYfzIGh1dzSa7DzseS8BRE cqz59U+FxLRD+wK9aGl8MLiZ/BSab8FvzlbsUEPPrjXbeTyoDWr00ctBPQ2K/ZUClVnYwS avOi9wdlXtPKh3cVIBMvRql5zJjhvZjZm3DbNx0bxTRYldyGbrYVroTEz0ukaRSkUi0efD ah3OIyOcCeUi1ah/hpJ+WSB3DCisM10IZiR06Uj4WXwefnAKJnR+22n+ajzTlHZdu3bXfR FWnr3J565/P2s1UjVAF7bWL3fyYzV38tMewDkKaEHu0cOQ7oSzsedavuXSqlWA== X-Migadu-Spam-Score: -3.20 X-Spam-Score: -3.20 X-Migadu-Queue-Id: 9464ACEE2 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none X-TUID: su4PAol6XGOw Hi Ricardo, On 2023-03-10 17:52, Ricardo Wurmus wrote: > Hi, > > thank you for the patches! > > The effective change looks fine to me, but I’m confused about why these > are two patches. The first one introduces this as an example in the > docs: [...] > > +(service > + pam-limits-service-type > + (plain-file > + "limits.conf" > + (string-join > + (map pam-limits-entry->string > + (list (pam-limits-entry "@@realtime" 'both 'rtprio 99) > + (pam-limits-entry "@@realtime" 'both 'memlock 'unlimited))) > + "\n"))) > > But the second removes this again in favour of this prettier form: This was to ensure that each commit is "atomic". > > +(service pam-limits-service-type > + (list > + (pam-limits-entry "@@realtime" 'both 'rtprio 99) > + (pam-limits-entry "@@realtime" 'both 'memlock 'unlimited))) > > Which is really close to the original form: > > -(pam-limits-service > - (list > - (pam-limits-entry "@@realtime" 'both 'rtprio 99) > - (pam-limits-entry "@@realtime" 'both 'memlock 'unlimited))) > > Could you merge these two patches to reduce the number of unnecessary > changes? I don’t think we should change to file-likes as the argument > value for the pam-limits-service-type. The v2 patch-series are a dis-aggregation of the v1 series (save for a bug fix in the match clauses, test suite and using raise instead of report-error) as indicated in the 10/27 patch-series review from #61789. > > Another thing that confused me: > > + (test-equal "/etc/security/limits.conf content matches" > + #$(string-join (map pam-limits-entry->string pam-limit-entries) > + "\n" 'suffix) > + (marionette-eval > + '(call-with-input-file "/etc/security/limits.conf" > + get-string-all) > + marionette)) > > Why use the gexp with a computed value here instead of using just the > plain text of the expected contents of that file? Computing > the expected value in a test where the compared value is computed in the > same way feels like begging the question. > > Or perhaps I’m misunderstanding something here? > I wrote this test suite to simply check that both deprecated and "new" service-type forms work correctly, i.e. the files are present in their locations. (this actually caught a bug within the match clauses in the v1 patch) Cheers, Bruno