* make glib optional
@ 2009-08-22 3:36 Marco d'Itri
2009-08-22 11:51 ` Kay Sievers
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Marco d'Itri @ 2009-08-22 3:36 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 438 bytes --]
I do not know how other distributions feel about this, but I fully
expect to be flamed if I suggested to add 2 MB of glib to the Debian
base system just to support ConsoleKit's ACLs.
The attached patch checks that glib is actually installed before trying
to run udev-acl.
Also, at boot time glib may be missing anyway since it is in /usr/lib/.
IMO udev-acl should be distributed with ConsoleKit, not udev.
--
ciao,
Marco
[-- Attachment #1.2: test_for_glib --]
[-- Type: text/plain, Size: 716 bytes --]
--- a/extras/udev-acl/70-acl.rules
+++ b/extras/udev-acl/70-acl.rules
@@ -47,8 +47,16 @@ ENV{ID_SMARTCARD_READER}=="*?", ENV{ACL_
# joysticks
SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ACL_MANAGE}="1"
+LABEL="acl_apply"
+
+ENV{ACL_MANAGE}!="?*", GOTO="acl_end"
+
+# Glib is not declared as a package dependency, so check that it is actually
+# installed before running udev-acl.
+TEST!="/usr/lib/libglib-2.0.so.0", GOTO="acl_end"
+
# apply ACL for all locally logged in users
-LABEL="acl_apply", ENV{ACL_MANAGE}=="?*", TEST=="/var/run/ConsoleKit/database", \
+TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
LABEL="acl_end"
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: make glib optional
2009-08-22 3:36 make glib optional Marco d'Itri
@ 2009-08-22 11:51 ` Kay Sievers
2009-08-22 12:02 ` Marco d'Itri
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2009-08-22 11:51 UTC (permalink / raw)
To: linux-hotplug
On Sat, Aug 22, 2009 at 05:36, Marco d'Itri<md@linux.it> wrote:
> I do not know how other distributions feel about this, but I fully
> expect to be flamed if I suggested to add 2 MB of glib to the Debian
> base system just to support ConsoleKit's ACLs.
>
> The attached patch checks that glib is actually installed before trying
> to run udev-acl.
It's not only about udev-acl. We don't do auto-checks. Just disable
the extras explicitly with the existing switch if you want that.
Kay
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: make glib optional
2009-08-22 3:36 make glib optional Marco d'Itri
2009-08-22 11:51 ` Kay Sievers
@ 2009-08-22 12:02 ` Marco d'Itri
2009-08-22 12:09 ` Kay Sievers
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Marco d'Itri @ 2009-08-22 12:02 UTC (permalink / raw)
To: linux-hotplug
On Aug 22, Kay Sievers <kay.sievers@vrfy.org> wrote:
> It's not only about udev-acl. We don't do auto-checks. Just disable
So far it is only about udev-acl.
> the extras explicitly with the existing switch if you want that.
I do not want to disable it since it is useful on desktop systems which
have ConsoleKit installed, this is not the point.
--
ciao,
Marco
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: make glib optional
2009-08-22 3:36 make glib optional Marco d'Itri
2009-08-22 11:51 ` Kay Sievers
2009-08-22 12:02 ` Marco d'Itri
@ 2009-08-22 12:09 ` Kay Sievers
2009-08-23 13:42 ` Lennart Poettering
2009-08-23 16:52 ` Marco d'Itri
4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2009-08-22 12:09 UTC (permalink / raw)
To: linux-hotplug
On Sat, Aug 22, 2009 at 14:02, Marco d'Itri<md@linux.it> wrote:
> On Aug 22, Kay Sievers <kay.sievers@vrfy.org> wrote:
>
>> It's not only about udev-acl. We don't do auto-checks. Just disable
> So far it is only about udev-acl.
It's more.
>> the extras explicitly with the existing switch if you want that.
> I do not want to disable it since it is useful on desktop systems which
> have ConsoleKit installed, this is not the point.
These systems need GUdev too.
Kay
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: make glib optional
2009-08-22 3:36 make glib optional Marco d'Itri
` (2 preceding siblings ...)
2009-08-22 12:09 ` Kay Sievers
@ 2009-08-23 13:42 ` Lennart Poettering
2009-08-23 16:52 ` Marco d'Itri
4 siblings, 0 replies; 6+ messages in thread
From: Lennart Poettering @ 2009-08-23 13:42 UTC (permalink / raw)
To: linux-hotplug
On Sat, 22.08.09 05:36, Marco d'Itri (md@Linux.IT) wrote:
> I do not know how other distributions feel about this, but I fully
> expect to be flamed if I suggested to add 2 MB of glib to the Debian
> base system just to support ConsoleKit's ACLs.
This patch is incredibly ugly, and broken. The most obvious issue is
for example that on Fedora glib is in /lib, and on multilib machines it is
even in /lib64.
If you dislike glib that much then I'd suggest splitting off udev-acl
and the rules files into a seperate package and then have ckit depend
on it. But this explicit check you suggested is just failure.
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: make glib optional
2009-08-22 3:36 make glib optional Marco d'Itri
` (3 preceding siblings ...)
2009-08-23 13:42 ` Lennart Poettering
@ 2009-08-23 16:52 ` Marco d'Itri
4 siblings, 0 replies; 6+ messages in thread
From: Marco d'Itri @ 2009-08-23 16:52 UTC (permalink / raw)
To: linux-hotplug
On Aug 23, Lennart Poettering <lennart@poettering.net> wrote:
> This patch is incredibly ugly, and broken. The most obvious issue is
> for example that on Fedora glib is in /lib, and on multilib machines it is
> even in /lib64.
It does not pretend to be universal, it was just a proof of concept for
the initial packaging. I already have a version which uses ldd to find
out the library name.
> If you dislike glib that much then I'd suggest splitting off udev-acl
> and the rules files into a seperate package and then have ckit depend
> on it. But this explicit check you suggested is just failure.
The point is not disliking glib, but disliking gratuitously inflating
the base system of 2 MB when it can easily be avoided.
Debian officially supports much more than desktop/server systems, and
many of them have no use for ConsoleKit. Even popularity-contest (whose
statistics are biased against smaller/embedded systems) shows that while
udev is almost universal, glib is not installed on 15% of the sample:
http://qa.debian.org/popcon-graph.php?packages=udev+libglib2.0-0+module-init-tools&show_installed=on&want_legend=on&want_ticks=on&from_date=&to_date=&hlght_date=&date_fmt=%25Y-%25m&beenhere=1
I considered generating another binary package just for udev-acl, but it
seemed overkill for an 8 KB program. I still think it would be simpler
to just make it part of ConsoleKit since it has no use without it.
--
ciao,
Marco
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-08-23 16:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22 3:36 make glib optional Marco d'Itri
2009-08-22 11:51 ` Kay Sievers
2009-08-22 12:02 ` Marco d'Itri
2009-08-22 12:09 ` Kay Sievers
2009-08-23 13:42 ` Lennart Poettering
2009-08-23 16:52 ` Marco d'Itri
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 NNTP newsgroup(s).