From mboxrd@z Thu Jan 1 00:00:00 1970 From: md@Linux.IT (Marco d'Itri) Date: Sat, 22 Aug 2009 03:36:34 +0000 Subject: make glib optional Message-Id: <20090822033634.GA2669@bongo.bofh.it> MIME-Version: 1 Content-Type: multipart/mixed; boundary="KFztAG8eRSV9hGtP" List-Id: To: linux-hotplug@vger.kernel.org --KFztAG8eRSV9hGtP Content-Type: multipart/mixed; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. --=20 ciao, Marco --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=test_for_glib Content-Transfer-Encoding: quoted-printable --- a/extras/udev-acl/70-acl.rules +++ b/extras/udev-acl/70-acl.rules @@ -47,8 +47,16 @@ ENV{ID_SMARTCARD_READER}=3D=3D"*?", ENV{ACL_ # joysticks SUBSYSTEM=3D=3D"input", ENV{ID_CLASS}=3D=3D"joystick", ENV{ACL_MANAGE}=3D"= 1" =20 +LABEL=3D"acl_apply" + +ENV{ACL_MANAGE}!=3D"?*", GOTO=3D"acl_end" + +# Glib is not declared as a package dependency, so check that it is actual= ly +# installed before running udev-acl. +TEST!=3D"/usr/lib/libglib-2.0.so.0", GOTO=3D"acl_end" + # apply ACL for all locally logged in users -LABEL=3D"acl_apply", ENV{ACL_MANAGE}=3D=3D"?*", TEST=3D=3D"/var/run/Consol= eKit/database", \ +TEST=3D=3D"/var/run/ConsoleKit/database", \ RUN+=3D"udev-acl --action=3D$env{ACTION} --device=3D$env{DEVNAME}" =20 LABEL=3D"acl_end" --UlVJffcvxoiEqYs2-- --KFztAG8eRSV9hGtP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqPZ8IACgkQFGfw2OHuP7HapgCZAYX3z6XniiDVCubzXk0RGvPz EJ8Anic+dx7cwIngMgaLJsV6TyspHcZU =+w1X -----END PGP SIGNATURE----- --KFztAG8eRSV9hGtP--