From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R8Qo9-0007UT-PK for garchives@archives.gentoo.org; Tue, 27 Sep 2011 06:06:22 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4600521C18B; Tue, 27 Sep 2011 06:06:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 08C1521C181 for ; Tue, 27 Sep 2011 06:06:08 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5975A1B401D for ; Tue, 27 Sep 2011 06:06:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id B0D9580042 for ; Tue, 27 Sep 2011 06:06:07 +0000 (UTC) From: "Alexandre Restovtsev" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexandre Restovtsev" Message-ID: Subject: [gentoo-commits] proj/gnome:master commit in: x11-misc/colord/ X-VCS-Repository: proj/gnome X-VCS-Files: x11-misc/colord/colord-0.1.12.ebuild x11-misc/colord/colord-9999.ebuild X-VCS-Directories: x11-misc/colord/ X-VCS-Committer: tetromino X-VCS-Committer-Name: Alexandre Restovtsev X-VCS-Revision: cc7a30f7a403697b2e94412a9fd6d9fde4311232 Date: Tue, 27 Sep 2011 06:06:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 173adf8d14120416200c968e31ae0c61 commit: cc7a30f7a403697b2e94412a9fd6d9fde4311232 Author: Alexandre Rostovtsev gmail com> AuthorDate: Mon Sep 26 07:02:18 2011 +0000 Commit: Alexandre Restovtsev gmail com> CommitDate: Tue Sep 27 06:05:17 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gnome.git;a=3D= commit;h=3Dcc7a30f7 x11-misc/colord: add 0.1.12 Add new colord version. Following the example of Debian, for security we should run colord as a non-root user and refrain from automatically scanning user directories for color profiles. --- x11-misc/colord/colord-0.1.12.ebuild | 135 ++++++++++++++++++++++++++++= ++++++ x11-misc/colord/colord-9999.ebuild | 48 ++++++++++++- 2 files changed, 182 insertions(+), 1 deletions(-) diff --git a/x11-misc/colord/colord-0.1.12.ebuild b/x11-misc/colord/color= d-0.1.12.ebuild new file mode 100644 index 0000000..34b74ca --- /dev/null +++ b/x11-misc/colord/colord-0.1.12.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3D"4" + +inherit eutils base +if [[ ${PV} =3D 9999 ]]; then + GCONF_DEBUG=3D"no" + inherit gnome2-live # need all the hacks from gnome2-live_src_prepare +fi + +DESCRIPTION=3D"System service to accurately color manage input and outpu= t devices" +HOMEPAGE=3D"http://www.freedesktop.org/software/colord/" +if [[ ${PV} =3D 9999 ]]; then + EGIT_REPO_URI=3D"git://gitorious.org/colord/master.git" +else + SRC_URI=3D"http://www.freedesktop.org/software/colord/releases/${P}.tar= .xz" +fi + +LICENSE=3D"GPL-2" +SLOT=3D"0" +if [[ ${PV} =3D 9999 ]]; then + KEYWORDS=3D"" +else + KEYWORDS=3D"~amd64 ~x86" +fi +IUSE=3D"doc examples +introspection scanner +udev" + +# XXX: raise to libusb-1.0.9:1 when available +COMMON_DEPEND=3D" + dev-db/sqlite:3 + >=3Ddev-libs/glib-2.28.0:2 + >=3Ddev-libs/libusb-1.0.8:1 + >=3Dmedia-libs/lcms-2.2:2 + >=3Dsys-auth/polkit-0.97 + introspection? ( >=3Ddev-libs/gobject-introspection-0.9.8 ) + scanner? ( media-gfx/sane-backends ) + udev? ( || ( sys-fs/udev[gudev] sys-fs/udev[extras] ) ) +" +RDEPEND=3D"${COMMON_DEPEND} + media-gfx/shared-color-profiles" +# XXX: automagic build-time vala dependency if USE=3Dintrospection +DEPEND=3D"${COMMON_DEPEND} + app-text/docbook-sgml-utils + dev-libs/libxslt + >=3Ddev-util/intltool-0.35 + dev-util/pkgconfig + >=3Dsys-devel/gettext-0.17 + doc? ( + app-text/docbook-xml-dtd:4.1.2 + >=3Ddev-util/gtk-doc-1.9 + ) + introspection? ( dev-lang/vala:0.12 ) +" + +# FIXME: needs pre-installed dbus service files +RESTRICT=3D"test" + +DOCS=3D(AUTHORS ChangeLog MAINTAINERS NEWS README TODO) + +pkg_setup() { + enewgroup colord + enewuser colord -1 -1 /var/lib/colord colord +} + +src_configure() { + econf \ + --disable-examples \ + --disable-static \ + --enable-polkit \ + --enable-reverse \ + --disable-volume-search \ + --with-daemon-user=3Dcolord \ + --localstatedir=3D"${EPREFIX}"/var \ + $(use_enable doc gtk-doc) \ + $(use_enable introspection) \ + $(use_enable scanner sane) \ + $(use_enable udev gudev) \ + VAPIGEN=3D$(type -p vapigen-0.12) + # parallel make fails in doc/api + use doc && MAKEOPTS=3D-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 + + # additional documentation files not included in tarball releases + [[ ${PV} =3D 9999 ]] && use doc && dodoc doc/*.txt doc/*.svg + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins examples/*.c + fi + + find "${D}" -name "*.la" -delete || die +} + +pkg_postinst() { + # <=3Dcolord-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=3D"${EROOT}var/lib/lib/colord" + local new_dir=3D"${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" ]]; th= en + 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=3D"${EROOT}var/lib/lib/color" + new_dir=3D"${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 the= m" + 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/colord-9999.ebuild b/x11-misc/colord/colord-= 9999.ebuild index e966c19..34b74ca 100644 --- a/x11-misc/colord/colord-9999.ebuild +++ b/x11-misc/colord/colord-9999.ebuild @@ -4,7 +4,7 @@ =20 EAPI=3D"4" =20 -inherit base +inherit eutils base if [[ ${PV} =3D 9999 ]]; then GCONF_DEBUG=3D"no" inherit gnome2-live # need all the hacks from gnome2-live_src_prepare @@ -59,12 +59,20 @@ RESTRICT=3D"test" =20 DOCS=3D(AUTHORS ChangeLog MAINTAINERS NEWS README TODO) =20 +pkg_setup() { + enewgroup colord + enewuser colord -1 -1 /var/lib/colord colord +} + src_configure() { econf \ --disable-examples \ --disable-static \ --enable-polkit \ --enable-reverse \ + --disable-volume-search \ + --with-daemon-user=3Dcolord \ + --localstatedir=3D"${EPREFIX}"/var \ $(use_enable doc gtk-doc) \ $(use_enable introspection) \ $(use_enable scanner sane) \ @@ -77,6 +85,13 @@ src_configure() { src_install() { base_src_install =20 + # 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 + # additional documentation files not included in tarball releases [[ ${PV} =3D 9999 ]] && use doc && dodoc doc/*.txt doc/*.svg =20 @@ -87,3 +102,34 @@ src_install() { =20 find "${D}" -name "*.la" -delete || die } + +pkg_postinst() { + # <=3Dcolord-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=3D"${EROOT}var/lib/lib/colord" + local new_dir=3D"${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" ]]; th= en + 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=3D"${EROOT}var/lib/lib/color" + new_dir=3D"${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 the= m" + 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 +}