unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCHES] Get elogind-service working as intended
Date: Fri, 04 Sep 2015 09:57:45 +0200	[thread overview]
Message-ID: <87d1xyk45i.fsf@igalia.com> (raw)
In-Reply-To: <87a8t3mc2v.fsf@netris.org> (Mark H. Weaver's message of "Thu, 03 Sep 2015 17:23:36 -0400")

On Thu 03 Sep 2015 23:23, Mark H Weaver <mhw@netris.org> writes:

> These patches are needed to get Andy's elogind-service working as
> intended, e.g. to allow things like suspend-on-lid-close and various
> hot keys to work.
>
> I'm not really happy with any of these, so if someone wants to solve
> these problems in a better way, please don't hesitate to do so :)
>
> Comments and suggestions welcome.

Thanks for doing this!  I suggest we apply, just to get things working,
then work on expanding <service> to have more fields.  I can do that
later this morning.  I note also that there is still more work to do
related to PAM.

The problem is that there are services whose configuration should depend
on the set of services.  For example udev, which should add rules
corresponding to the colord service, etc.

Now one option would be to depend on on the set of services but on the
set of packages in the system install.  I agree with Mark that this is a
bad idea because you don't want to have to audit a package before adding
it to the system install.  On the other hand if privileges like
installing a udev rule are only accessible from services, that's easier
to audit because there are fewer services.

So then, for example, the elogind service would indicate that it
installs udev rules, dbus interfaces, and polkit rules from the elogind
package.  The udev service would then query all services, adding rules
from services that indicate that they extend the udev configuration.  To
do this I propose a "finalize-configuration" field in services.  First,
the services are collected into a list, as they are now.  Next, Guix
does something like this:

  (define (finalize-services services)
    (map (lambda (service)
           ((service-finalize service) service services))
         services))

The default service-finalize will be (lambda (service services)
service).  WDYT?

Cheers,

Andy

  reply	other threads:[~2015-09-04  7:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 21:23 [PATCHES] Get elogind-service working as intended Mark H Weaver
2015-09-04  7:57 ` Andy Wingo [this message]
2015-09-06 21:23   ` Service refactoring Ludovic Courtès
2015-09-08  8:47     ` Andy Wingo
2015-09-08 10:12       ` Ludovic Courtès
2015-09-08 10:33         ` Andy Wingo
2015-09-08 14:48     ` Mark H Weaver
2015-09-10 16:05       ` Ludovic Courtès
2015-09-10 16:14       ` Ludovic Courtès
2015-09-20 15:42     ` Ludovic Courtès
2015-09-21  8:18       ` Andy Wingo
2015-09-21 16:00         ` Ludovic Courtès
2015-09-24  0:33           ` Thompson, David
2015-09-24  7:41             ` Ludovic Courtès
2015-09-24  9:33               ` 宋文武
2015-09-24 17:09                 ` Ludovic Courtès
2015-09-25 22:50               ` Christopher Allan Webber
2015-09-26 12:50                 ` Ludovic Courtès
2015-09-30  8:59       ` Ludovic Courtès
2015-10-10 21:01         ` Ludovic Courtès
2015-09-10 16:03 ` [PATCHES] Get elogind-service working as intended 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=87d1xyk45i.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.org \
    /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).