[arch-commits] Commit in colord/repos/extra-x86_64 (3 files)

Jan Steffens heftig at archlinux.org
Wed Apr 17 14:46:54 UTC 2019


    Date: Wednesday, April 17, 2019 @ 14:46:53
  Author: heftig
Revision: 350839

archrelease: copy trunk to extra-x86_64

Added:
  colord/repos/extra-x86_64/0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch
    (from rev 350838, colord/trunk/0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch)
  colord/repos/extra-x86_64/PKGBUILD
    (from rev 350838, colord/trunk/PKGBUILD)
Deleted:
  colord/repos/extra-x86_64/PKGBUILD

-----------------------------------------------------------------+
 0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch |   41 ++
 PKGBUILD                                                        |  137 +++++-----
 2 files changed, 112 insertions(+), 66 deletions(-)

Copied: colord/repos/extra-x86_64/0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch (from rev 350838, colord/trunk/0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch)
===================================================================
--- 0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch	                        (rev 0)
+++ 0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch	2019-04-17 14:46:53 UTC (rev 350839)
@@ -0,0 +1,41 @@
+From 072d27fa368246a9c2bfbd8ba9f9c662ecda0b88 Mon Sep 17 00:00:00 2001
+Message-Id: <072d27fa368246a9c2bfbd8ba9f9c662ecda0b88.1555511658.git.jan.steffens at gmail.com>
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Wed, 17 Apr 2019 16:29:57 +0200
+Subject: [PATCH] trivial: Fix error checking for sd_pid_get_session and
+ sd_session_get_seat
+
+These functions can return a positive integer on success. Fix the
+conditions to only regard negative return values as errors.
+
+Fixes commit 6ffe2f6aae4bdc8331cab1fd9379ed8aef759749.
+Fixes https://bugs.archlinux.org/task/37014
+---
+ src/cd-main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cd-main.c b/src/cd-main.c
+index 514ae5c..ffcecb8 100644
+--- a/src/cd-main.c
++++ b/src/cd-main.c
+@@ -491,15 +491,15 @@ cd_main_get_seat_for_process (guint pid)
+ 
+ 	/* get session the process belongs to */
+ 	rc = sd_pid_get_session (pid, &sd_session);
+-	if (rc != 0) {
++	if (rc < 0) {
+ 		g_warning ("failed to get session [pid %u]: %s",
+ 			   pid, strerror (-rc));
+ 		goto out;
+ 	}
+ 
+ 	/* get the seat the session is on */
+ 	rc = sd_session_get_seat (sd_session, &sd_seat);
+-	if (rc != 0) {
++	if (rc < 0) {
+ 		g_warning ("failed to get seat for session %s [pid %u]: %s",
+ 			   sd_session, pid, strerror (-rc));
+ 		goto out;
+-- 
+2.21.0
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-04-17 14:46:41 UTC (rev 350838)
+++ PKGBUILD	2019-04-17 14:46:53 UTC (rev 350839)
@@ -1,66 +0,0 @@
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
-# Contributor: Ionut Biru <ibiru at archlinux.org>
-
-pkgbase=colord
-pkgname=(colord colord-sane)
-pkgver=1.4.4
-pkgrel=1
-pkgdesc="System daemon for managing color devices"
-url="https://www.freedesktop.org/software/colord"
-arch=(x86_64)
-license=(GPL2)
-depends=(lcms2 libgusb polkit sqlite dconf dbus libgudev shared-mime-info systemd-libs udev)
-makedepends=(gobject-introspection vala sane bash-completion argyllcms git meson gtk-doc systemd
-             docbook-xsl)
-options=(!emptydirs)
-_commit=233e642f730e46e026c1fe45d36ea298de1e00fe  # tags/1.4.4^0
-source=("git+https://github.com/hughsie/colord#commit=$_commit")
-sha256sums=('SKIP')
-validpgpkeys=('163EB50119225DB3DF8F49EA17ACBA8DFA970E17')  # Richard Hughes
-
-pkgver() {
-  cd colord
-  git describe --tags | sed 's/-/+/g'
-}
-
-prepare() {
-  cd colord
-}
-
-build() {
-  arch-meson colord build \
-    -D libcolordcompat=true \
-    -D sane=true \
-    -D vapi=true \
-    -D print_profiles=true \
-    -D daemon_user=colord
-  ninja -C build
-}
-
-check() {
-  meson test -C build
-}
-
-package_colord() {
-  optdepends=('argyllcms: color profiling'
-              'colord-sane: SANE support')
-  replaces=(shared-color-profiles)
-
-  DESTDIR="$pkgdir" meson install -C build
-
-  echo 'u colord - "Color management daemon" /var/lib/colord' |
-    install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/colord.conf"
-
-### Split colord-sane
-  mkdir -p colord-sane/usr/lib/colord-plugins
-  mv {"$pkgdir",colord-sane}/usr/lib/colord-sane
-  mv {"$pkgdir",colord-sane}/usr/lib/colord-plugins/libcolord_sensor_sane.so
-}
-
-package_colord-sane() {
-  pkgdesc+=" (SANE support)"
-  depends=("colord=$pkgver-$pkgrel" sane)
-  mv colord-sane/* "$pkgdir"
-}
-
-# vim:set sw=2 et:

Copied: colord/repos/extra-x86_64/PKGBUILD (from rev 350838, colord/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-04-17 14:46:53 UTC (rev 350839)
@@ -0,0 +1,71 @@
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+# Contributor: Ionut Biru <ibiru at archlinux.org>
+
+pkgbase=colord
+pkgname=(colord colord-sane)
+pkgver=1.4.4
+pkgrel=2
+pkgdesc="System daemon for managing color devices"
+url="https://www.freedesktop.org/software/colord"
+arch=(x86_64)
+license=(GPL2)
+depends=(lcms2 libgusb polkit sqlite dconf dbus libgudev shared-mime-info systemd-libs udev)
+makedepends=(gobject-introspection vala sane bash-completion argyllcms git meson gtk-doc systemd
+             docbook-xsl)
+options=(!emptydirs)
+_commit=233e642f730e46e026c1fe45d36ea298de1e00fe  # tags/1.4.4^0
+source=("git+https://github.com/hughsie/colord#commit=$_commit"
+        0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch)
+sha256sums=('SKIP'
+            '90df20f7962a24a97b92fcaa7178c263f4b00ba1e90ff2dc5efdb7e97873b3a1')
+validpgpkeys=('163EB50119225DB3DF8F49EA17ACBA8DFA970E17')  # Richard Hughes
+
+pkgver() {
+  cd colord
+  git describe --tags | sed 's/-/+/g'
+}
+
+prepare() {
+  cd colord
+
+  # https://bugs.archlinux.org/task/37014
+  patch -Np1 -i ../0001-trivial-Fix-error-checking-for-sd_pid_get_session-an.patch
+}
+
+build() {
+  arch-meson colord build \
+    -D libcolordcompat=true \
+    -D sane=true \
+    -D vapi=true \
+    -D print_profiles=true \
+    -D daemon_user=colord
+  ninja -C build
+}
+
+check() {
+  meson test -C build
+}
+
+package_colord() {
+  optdepends=('argyllcms: color profiling'
+              'colord-sane: SANE support')
+  replaces=(shared-color-profiles)
+
+  DESTDIR="$pkgdir" meson install -C build
+
+  echo 'u colord - "Color management daemon" /var/lib/colord' |
+    install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/colord.conf"
+
+### Split colord-sane
+  mkdir -p colord-sane/usr/lib/colord-plugins
+  mv {"$pkgdir",colord-sane}/usr/lib/colord-sane
+  mv {"$pkgdir",colord-sane}/usr/lib/colord-plugins/libcolord_sensor_sane.so
+}
+
+package_colord-sane() {
+  pkgdesc+=" (SANE support)"
+  depends=("colord=$pkgver-$pkgrel" sane)
+  mv colord-sane/* "$pkgdir"
+}
+
+# vim:set sw=2 et:


More information about the arch-commits mailing list