make glib optional
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.
Signature · 2 lines
ciao, Marco
extras/udev-acl/70-acl.rules +9 -1
@@ -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"
Quoted 6 lines · Marco d'Itri
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
Quoted 1 line · Kay Sievers
It's not only about udev-acl. We don't do auto-checks. Just disable
So far it is only about udev-acl.
Quoted 1 line
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.
Signature · 2 lines
ciao, Marco
Quoted 4 lines · Marco d'Itri
Quoted 1 line · Kay Sievers
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.
Quoted 3 lines
Quoted 1 line
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
Quoted 3 lines · Marco d'Itri
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
Signature · 3 lines
Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4
Quoted 3 lines · Lennart Poettering
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.
Quoted 3 lines
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:
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.
Signature · 2 lines
ciao, Marco