summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2011-10-19 05:03:38 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2011-10-19 05:03:38 +0000
commit9e98932dfd5020d90aa85d4e7868184c85be2012 (patch)
tree4e22bc9e7a65c95aed89ed6f9552ec47def7ad1a /x11-misc/colord
parentVersion bump to new snapshot with zones support. (diff)
downloadgentoo-2-9e98932dfd5020d90aa85d4e7868184c85be2012.tar.gz
gentoo-2-9e98932dfd5020d90aa85d4e7868184c85be2012.tar.bz2
gentoo-2-9e98932dfd5020d90aa85d4e7868184c85be2012.zip
Add colord-0.1.13 from the gnome overlay; follow Ubuntu's example and use dbus security instead of polkit (required when daemon is running as non-root); fixes bug #385677.
(Portage version: 2.2.0_alpha69/cvs/Linux x86_64)
Diffstat (limited to 'x11-misc/colord')
-rw-r--r--x11-misc/colord/ChangeLog14
-rw-r--r--x11-misc/colord/colord-0.1.13.ebuild126
-rw-r--r--x11-misc/colord/files/colord-0.1.13-use-dbus-security-for-permissions.patch36
3 files changed, 175 insertions, 1 deletions
diff --git a/x11-misc/colord/ChangeLog b/x11-misc/colord/ChangeLog
index 3739c9e00adb..ac137ba97453 100644
--- a/x11-misc/colord/ChangeLog
+++ b/x11-misc/colord/ChangeLog
@@ -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:
diff --git a/x11-misc/colord/colord-0.1.13.ebuild b/x11-misc/colord/colord-0.1.13.ebuild
new file mode 100644
index 000000000000..bd3db197493a
--- /dev/null
+++ b/x11-misc/colord/colord-0.1.13.ebuild
@@ -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
index 000000000000..8ae60c2b8d10
--- /dev/null
+++ b/x11-misc/colord/files/colord-0.1.13-use-dbus-security-for-permissions.patch
@@ -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>
+