Add colord-0.1.13 from the gnome overlay; follow Ubuntu's example and use dbus securi...
authorAlexandre Rostovtsev <tetromino@gentoo.org>
Wed, 19 Oct 2011 05:03:38 +0000 (05:03 +0000)
committerAlexandre Rostovtsev <tetromino@gentoo.org>
Wed, 19 Oct 2011 05:03:38 +0000 (05:03 +0000)
Package-Manager: portage-2.2.0_alpha69/cvs/Linux x86_64

x11-misc/colord/ChangeLog
x11-misc/colord/Manifest
x11-misc/colord/colord-0.1.13.ebuild [new file with mode: 0644]
x11-misc/colord/files/colord-0.1.13-use-dbus-security-for-permissions.patch [new file with mode: 0644]

index 3739c9e00adb87f4e66e258730d9bdc1897204a8..ac137ba97453cd87b22b30e722b5da8e9e2425e3 100644 (file)
@@ -1,6 +1,18 @@
 # ChangeLog for x11-misc/colord
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/colord/ChangeLog,v 1.3 2011/10/05 13:19:17 nirbheek Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/colord/ChangeLog,v 1.4 2011/10/19 05:03:38 tetromino Exp $
+
+*colord-0.1.13 (19 Oct 2011)
+
+  19 Oct 2011; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +colord-0.1.13.ebuild,
+  +files/colord-0.1.13-use-dbus-security-for-permissions.patch:
+  Add colord-0.1.13 from the gnome overlay; fixes bug #385677.
+  Following Ubuntu's example, we now disable polkit support, and switch to dbus
+  security instead. This is necessary to allow users to access colord when it's
+  running as a non-root user; see
+  https://bugs.launchpad.net/ubuntu/+source/colord/+bug/837851 for a
+  discussion. This change fixes polkit-related errors during gnome-3.2 startup.
 
   05 Oct 2011; Nirbheek Chauhan <nirbheek@gentoo.org> colord-0.1.11.ebuild,
   colord-0.1.12.ebuild:
index 92ec401893fd729ed5a8310c29d652f52843d0c7..b415bd3c99b2cce903f9af8c665fe5476fb7ddd5 100644 (file)
@@ -1,27 +1,20 @@
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
 
 AUX colord-0.1.11-fix-automagic-vala.patch 1121 RMD160 acee8cf74c62f12381a4cb89ed7c9ecfa34ca64f SHA1 7ce2fdd5676e72e050fa350e696de9c6ab8e2407 SHA256 b5e431ce7b27de4b5f2664b601f95486dc8ec0c207d1d04d8e98894b0bdd4a04
+AUX colord-0.1.13-use-dbus-security-for-permissions.patch 1787 RMD160 c0aa128152e3447f61fb10bf0d89bfbd5460833e SHA1 b1561756e116023eb32a5f1732bd63fa773ad9a1 SHA256 8a228ad64a9eddbe2e9914e93b78ad7ea243d40e28cf78dfdff53d82322d6f67
 DIST colord-0.1.11.tar.xz 470308 RMD160 58fa3d774197d62812eb4f55002b6e3c414a334b SHA1 b0d686b0adf8dcd737e03b3c8f28582532eee208 SHA256 f30e5a8838b5c15eab7cdde2670e238afe28fc673e4ade7ed6954175f8509799
 DIST colord-0.1.12.tar.xz 440284 RMD160 adeb4c1f3452ee0b23edbf5e4e778fdef2d5b518 SHA1 9bc0c4193c0f790702923e0a783962f0f26487e6 SHA256 72992ed8798e8c140bbcfe570fc65e4e6bbad727a4691142cd018a8ce107165c
+DIST colord-0.1.13.tar.xz 445420 RMD160 e852a095f44d4fabb91c2a5e2b8375c8f961019e SHA1 45c20b87af947f10c9db1d8b3ed809d41b427f03 SHA256 eb3d00653d4a028f4e97f4e61ffa29940c65b42c20d4439e067cb183b725c292
 EBUILD colord-0.1.11.ebuild 1972 RMD160 08a4ad5d6a2f60c9abb3977f4051da07e7878f8c SHA1 9904a7827aef953abc3dd8198fc0b4e51999f9e4 SHA256 4e73c452eeaa3159b3314bcdde82dbc494c660c2a0222a7ee058d6043e5fdb64
 EBUILD colord-0.1.12.ebuild 3479 RMD160 e3918dc11f6f6c5157f7777173af05554b263994 SHA1 6e72d335883f05223967addce456c573f2c3f74b SHA256 dab59cd75ad35f44b0a99a218e2b8909d9b594f093ea13c6b9d7b9dde79abdba
-MISC ChangeLog 837 RMD160 ce2bc4b11b6626fc7394e9c290ffd61e6c6dc893 SHA1 49436f8ed21f547813a3860a9c9ca9e25d1c2143 SHA256 d8832e749c1ee4ebe9dc9ee02c4750425d62f092f5634f4b12b343520e7e9e99
+EBUILD colord-0.1.13.ebuild 3842 RMD160 989d06a014c87f7e5eeb6c4dcee20dd89a645498 SHA1 3693a8f64f69169ecd019d9f8e668d3845f82a21 SHA256 27fb2ff92eedf02f4a05a1b049dd46387deeaf3be26736a8a970e13448caf216
+MISC ChangeLog 1423 RMD160 77fcc544c68fc80423b00469431d855c43354cf1 SHA1 4dbfa0249bebf9d419e4b2afcd86819ed27e5d84 SHA256 1673a8e2935d4a20f77811151c8f271e8a21876b208c902553e5edb65c87232a
 MISC metadata.xml 351 RMD160 cd0e670eb32a888a9b28a82f8991939967381123 SHA1 d42d53e27ded330a8a5da23a1ffc0034bced80fb SHA256 ac4eb4676cf16d1d351488eb4130afa38e494155eec579954757191264e5e5d7
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.18 (GNU/Linux)
 
-iQIcBAEBAgAGBQJOjFlZAAoJEO/kOhxWD91kIEkP/0EBON+6uXlshw+exVNI038z
-bwPUkm8mkmitsYdE/1Fjtv9DmKOgDikjAT7vhAlcHWBrbknFVEtHmeutLQouzIks
-tP+MaaNQepl/8LVx/cX9o2N2RG0QMv17CrYnA1C1KYKrHZHADDLwi4msdB9DU9d6
-sio0cZ2puCLh2I6M1LbnPGMH7UPTMARnL9YFennw4uQEWyMAsqJzAYpUJ0Al1POt
-B3UroaUTTafsyzav5UtgqnhBQY2Y+03H9kDMsNaOZgXuAEpZ9NkN4FeY+kRwfWsv
-rbl58TP3BaL//uLjfiljr7mn5CntIJ29yeM4eAOK2W6xSOLjbY1oxJJfffxMqENd
-u2bkrR9H+8zcioQr3IQH7pLUyg4xdCxAZ3JwvSL35hR5+1WFzu0p2jbqZtY18hrS
-R4/MSyIbIy4iz7/YWfPmFIq/1yUxUOLrOcf7Qh6ntyjA+kSQr6dXewRakUdP2URS
-FbEJNw2ZD20KKZhxgsIanIY6Z8Vc3VJ/2wPG+gZyUrXvuUBDIT3Y2PYZFsXNqGtp
-/EF7TIrnC7y9qnhs7e+Wha3R/EhMZFvuuf7NOplqNDYmyZw5VaHrFUtcH58WrIGA
-jH4N+XDF+do6VIXH0WsI2tXGOVxfZbvmbsMoo9XN2JY/uhrOv0mAzpqc19h+jlpM
-1dtZgA4fVA8iAPKDvwpH
-=mW4o
+iF4EAREIAAYFAk6eWi8ACgkQdjK8w9WeBnBSwAD/YcPObzvg1lGIMzxxjZHgSGQo
+nyBW1Cp5UUc0UtNYFzAA+wSxMRFRR/lI0tKjcXJs0B9bxRNYIR0oDHN/xh1y3hvo
+=mjdV
 -----END PGP SIGNATURE-----
diff --git a/x11-misc/colord/colord-0.1.13.ebuild b/x11-misc/colord/colord-0.1.13.ebuild
new file mode 100644 (file)
index 0000000..bd3db19
--- /dev/null
@@ -0,0 +1,126 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/colord/colord-0.1.13.ebuild,v 1.1 2011/10/19 05:03:38 tetromino Exp $
+
+EAPI="4"
+
+inherit eutils base
+
+DESCRIPTION="System service to accurately color manage input and output devices"
+HOMEPAGE="http://www.freedesktop.org/software/colord/"
+SRC_URI="http://www.freedesktop.org/software/colord/releases/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples +introspection scanner +udev"
+
+# FIXME: raise to libusb-1.0.9:1 when available
+COMMON_DEPEND="
+       dev-db/sqlite:3
+       >=dev-libs/glib-2.28.0:2
+       >=dev-libs/libusb-1.0.8:1
+       >=media-libs/lcms-2.2:2
+       introspection? ( >=dev-libs/gobject-introspection-0.9.8 )
+       scanner? ( media-gfx/sane-backends )
+       udev? ( || ( sys-fs/udev[gudev] sys-fs/udev[extras] ) )
+"
+RDEPEND="${COMMON_DEPEND}
+       media-gfx/shared-color-profiles"
+# Automagic build-time vala dependency if USE=introspection
+DEPEND="${COMMON_DEPEND}
+       dev-libs/libxslt
+       >=dev-util/intltool-0.35
+       dev-util/pkgconfig
+       >=sys-devel/gettext-0.17
+       doc? (
+               app-text/docbook-xml-dtd:4.1.2
+               >=dev-util/gtk-doc-1.9
+       )
+       introspection? ( dev-lang/vala:0.14 )
+"
+
+# FIXME: needs pre-installed dbus service files
+RESTRICT="test"
+
+DOCS=(AUTHORS ChangeLog MAINTAINERS NEWS README TODO)
+
+pkg_setup() {
+       enewgroup colord
+       enewuser colord -1 -1 /var/lib/colord colord
+}
+
+src_prepare() {
+       # Ubuntu patch to allow root and at_console to access colord without polkit;
+       # this behavior matches upstream default polkit settings.
+       epatch "${FILESDIR}/${PN}-0.1.13-use-dbus-security-for-permissions.patch"
+}
+
+src_configure() {
+       # Disable polkit to allow registering devices when colord is running as
+       # non-root; https://bugs.launchpad.net/ubuntu/+source/colord/+bug/837851
+       econf \
+               --disable-examples \
+               --disable-static \
+               --disable-polkit \
+               --enable-reverse \
+               --disable-volume-search \
+               --with-daemon-user=colord \
+               --localstatedir="${EPREFIX}"/var \
+               $(use_enable doc gtk-doc) \
+               $(use_enable introspection) \
+               $(use_enable scanner sane) \
+               $(use_enable udev gudev) \
+               VAPIGEN=$(type -p vapigen-0.14)
+       # parallel make fails in doc/api
+       use doc && MAKEOPTS=-j1
+}
+
+src_install() {
+       base_src_install
+
+       # Ensure config and profile directories exist and are writable
+       local d
+       for d in /var/lib/{color,colord}; do
+               keepdir "${d}"
+               fowners colord:colord "${d}"
+       done
+
+       if use examples; then
+               insinto /usr/share/doc/${PF}/examples
+               doins examples/*.c
+       fi
+
+       find "${D}" -name "*.la" -delete || die
+}
+
+pkg_postinst() {
+       # <=colord-0.1.11 ran as root and used /var/lib/lib/colord to store
+       # configuration files and /var/lib/lib/color for custom color profiles.
+       local old_dir="${EROOT}var/lib/lib/colord"
+       local new_dir="${EROOT}var/lib/colord"
+
+       if [[ -e "${old_dir}/mapping.db" || -e "${old_dir}/storage.db" ]] && \
+          ! [[ -e "${new_dir}/mapping.db" || -e "${new_dir}/storage.db" ]]; then
+               elog "Old colord configuration files are present in ${old_dir}. If you"
+               elog "are upgrading from colord-0.1.11 or older and had previously"
+               elog "customized your color management settings, you will need to copy"
+               elog "these files to ${new_dir} and then change the file ownership"
+               elog "to colord:colord :"
+               elog
+               elog " # cp ${old_dir}/*.db ${new_dir}"
+               elog " # chown colord:colord ${new_dir}/*.db"
+               elog
+       fi
+       old_dir="${EROOT}var/lib/lib/color"
+       new_dir="${EROOT}var/lib/color"
+       if [[ -e "${old_dir}/icc" && ! -e "${new_dir}/icc" ]]; then
+               elog "Old custom color profiles are present in ${old_dir}. If you are"
+               elog "upgrading from colord-0.1.11 or older, you will need to copy them"
+               elog "to ${new_dir} and then change the ownership to colord:colord :"
+               elog
+               elog " # cp -r ${old_dir}/icc ${new_dir}"
+               elog " # chown -R colord:colord ${new_dir}/icc"
+               elog
+       fi
+}
diff --git a/x11-misc/colord/files/colord-0.1.13-use-dbus-security-for-permissions.patch b/x11-misc/colord/files/colord-0.1.13-use-dbus-security-for-permissions.patch
new file mode 100644 (file)
index 0000000..8ae60c2
--- /dev/null
@@ -0,0 +1,36 @@
+Index: colord/data/org.freedesktop.ColorManager.conf.in
+===================================================================
+--- colord.orig/data/org.freedesktop.ColorManager.conf.in      2011-09-01 17:59:58.330626765 +1000
++++ colord/data/org.freedesktop.ColorManager.conf.in   2011-09-01 18:02:25.410628315 +1000
+@@ -16,8 +16,8 @@
+     <allow own="org.freedesktop.ColorManager"/>
+   </policy>
+- <!-- Allow anyone to call into the service - we'll reject callers using PolicyKit -->
+-  <policy context="default">
++ <!-- Use at_console policy rather than PolicyKit to allow running as colord user -->
++  <policy at_console="true">
+     <allow send_destination="org.freedesktop.ColorManager"
+            send_interface="org.freedesktop.ColorManager"/>
+     <allow send_destination="org.freedesktop.ColorManager"
+@@ -32,5 +32,20 @@
+            send_interface="org.freedesktop.DBus.Introspectable"/>
+   </policy>
++  <!-- Also allow root to access the API; cupsd needs to talk to colord -->
++  <policy user="root">
++    <allow send_destination="org.freedesktop.ColorManager"
++           send_interface="org.freedesktop.ColorManager"/>
++    <allow send_destination="org.freedesktop.ColorManager"
++           send_interface="org.freedesktop.ColorManager.Profile"/>
++    <allow send_destination="org.freedesktop.ColorManager"
++           send_interface="org.freedesktop.ColorManager.Device"/>
++    <allow send_destination="org.freedesktop.ColorManager"
++           send_interface="org.freedesktop.ColorManager.Sensor"/>
++    <allow send_destination="org.freedesktop.ColorManager"
++           send_interface="org.freedesktop.DBus.Properties"/>
++    <allow send_destination="org.freedesktop.ColorManager"
++           send_interface="org.freedesktop.DBus.Introspectable"/>
++  </policy>
+ </busconfig>