unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Alex Kost <alezost@gmail.com>
Cc: 27155@debbugs.gnu.org
Subject: bug#27155: [PATCH 0/2] Support service extensions on the "final" service values
Date: Mon, 05 Jun 2017 12:06:51 +0200	[thread overview]
Message-ID: <8760gag344.fsf@gnu.org> (raw)
In-Reply-To: <87o9u3q15q.fsf@gmail.com> (Alex Kost's message of "Sun, 04 Jun 2017 17:26:41 +0300")

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2017-06-03 23:21 +0200) wrote:

[...]

>> Not liking the “sudo” aspect of this patch, I thought it would be
>> natural if service types could control how customizations apply.  That
>> way, the PAM or /etc service could still guarantee, for instance, that
>> customization does not add or remove entries, and so on.
>
> Ouch, that's what I don't like.  I think a full control is better.
> You'll never know what a user might want to do, and giving a user a full
> freedom (even to break a system!) would be a great feature.  So I'm
> against such guarantees that strict users in modifying their systems.

Just to be clear: I do want users to be able to modify their system as
they see fit.  The argument is about how we should structure these
modifications.

In the end, people can always define and use their own services, or even
‘set!’ things.  But if we can provide users with control over their
system in a structured way, I think it’s beneficial: they can do complex
customizations of their system and still reason about them.

>> So at this point, I started wondering whether we should just allow
>> service types to declare several extension points.  So for PAM, we’d do:
>>
>> (define pam-service-addition
>>   ;; The extension point to add PAM services.
>>   (service-extension-point
>>     (compose concatenate)
>>     (extend append)))
>>
>> (define pam-service-cutomization
>>   ;; The extension point to customize PAM services.
>>   (service-extension-point
>>     (compose compose)
>>     (extend append)))
>>
>> (define pam-root-service-type
>>   (service-type (name 'pam)
>>                 (extensions (list (service-extension etc-service-type
>>                                                      /etc-entry)))
>>
>>                 (extension-points (list pam-service-addtion
>>                                         pam-service-customization))))
>>
>> But then ‘service-extension’ would need to specify not only the target
>> service type but also the target extension point, which means more
>> boilerplate, etc.
>
> I don't have a deep understanding of services, but your suggestion seems
> (to me) to have the following downsides:
>
> - More additional work – to determine (and implement) what aspects of
>   services should and what should not be modified by a user.
>
> - Less freedom (comparing to your previous solution) for users in
>   modifying services.

I see what you mean.

Ludo’, who thinks some more.

  reply	other threads:[~2017-06-05 10:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30 21:58 bug#27155: [PATCH 0/2] Support service extensions on the "final" service values Ludovic Courtès
2017-05-30 22:05 ` bug#27155: [PATCH 1/2] DRAFT services: Extensions can specify a "finalization" procedure Ludovic Courtès
2017-05-30 22:05   ` bug#27155: [PATCH 2/2] system: pam: Remove custom API to transform PAM services Ludovic Courtès
2017-06-01  9:57 ` bug#27155: [PATCH 0/2] Support service extensions on the "final" service values Alex Kost
2017-06-01 11:24   ` Ludovic Courtès
2017-06-03 21:21 ` Ludovic Courtès
2017-06-04 14:26   ` Alex Kost
2017-06-05 10:06     ` Ludovic Courtès [this message]
2017-06-05 12:52 ` Ricardo Wurmus
2017-06-06 23:07   ` Ludovic Courtès
2017-06-15 17:12     ` [bug#27155] " 宋文武
2017-06-21 13:06       ` Ludovic Courtès

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=8760gag344.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=27155@debbugs.gnu.org \
    --cc=alezost@gmail.com \
    /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).