From: md@Linux.IT (Marco d'Itri)
To: linux-hotplug@vger.kernel.org
Subject: make glib optional
Date: Sat, 22 Aug 2009 03:36:34 +0000 [thread overview]
Message-ID: <20090822033634.GA2669@bongo.bofh.it> (raw)
[-- 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 --]
next reply other threads:[~2009-08-22 3:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-22 3:36 Marco d'Itri [this message]
2009-08-22 11:51 ` make glib optional 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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090822033634.GA2669@bongo.bofh.it \
--to=md@linux.it \
--cc=linux-hotplug@vger.kernel.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.
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).