From: Ricardo Wurmus <rekado@elephly.net>
To: 61744@debbugs.gnu.org
Cc: mirai@makinata.eu
Subject: [bug#61744] [PATCH v2 1/2] services: base: Deprecate 'pam-limits-service' procedure.
Date: Fri, 10 Mar 2023 18:52:43 +0100 [thread overview]
Message-ID: <871qlwo4m8.fsf@elephly.net> (raw)
In-Reply-To: <d319522cc9ff3ca759a5d1ebd8d57d7165e4bdc5.1677197399.git.mirai@makinata.eu>
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:
+(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.
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?
--
Ricardo
next prev parent reply other threads:[~2023-03-10 18:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 0:12 [bug#61744] [PATCH] services: base: Deprecate 'pam-limits-service' procedure Bruno Victal
2023-03-04 21:17 ` [bug#61744] [PATCH v2 1/2] " Bruno Victal
2023-03-04 21:17 ` [bug#61744] [PATCH v2 2/2] services: pam-limits-service-type: Deprecate file-like object support in favour for lists as service value Bruno Victal
2023-03-10 17:52 ` Ricardo Wurmus [this message]
2023-03-11 11:25 ` [bug#61744] [PATCH v2 1/2] services: base: Deprecate 'pam-limits-service' procedure Bruno Victal
2023-03-30 21:08 ` bug#61744: [PATCH] " Ludovic Courtès
2023-03-20 17:49 ` [bug#61744] " Felix Lechner via Guix-patches via
2023-03-30 20:53 ` Ludovic Courtès
2023-03-30 21:19 ` Felix Lechner via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qlwo4m8.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=61744@debbugs.gnu.org \
--cc=mirai@makinata.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).