[arch-commits] Commit in libxkbcommon/trunk (2 files)

Jan Steffens heftig at archlinux.org
Sun Oct 20 19:12:41 UTC 2019


    Date: Sunday, October 20, 2019 @ 19:12:40
  Author: heftig
Revision: 365242

0.9.0-2

Added:
  libxkbcommon/trunk/0001-context-Don-t-fail-to-create-the-context-if-HOME-isn.patch
Modified:
  libxkbcommon/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-context-Don-t-fail-to-create-the-context-if-HOME-isn.patch |   41 ++++++++++
 PKGBUILD                                                        |   11 +-
 2 files changed, 49 insertions(+), 3 deletions(-)

Added: 0001-context-Don-t-fail-to-create-the-context-if-HOME-isn.patch
===================================================================
--- 0001-context-Don-t-fail-to-create-the-context-if-HOME-isn.patch	                        (rev 0)
+++ 0001-context-Don-t-fail-to-create-the-context-if-HOME-isn.patch	2019-10-20 19:12:40 UTC (rev 365242)
@@ -0,0 +1,41 @@
+From 1cd54b5e37730aee3e3c92262241fcdbab4407ac Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Sun, 20 Oct 2019 19:06:19 +0000
+Subject: [PATCH] context: Don't fail to create the context if HOME isn't
+ available
+
+E.g. when Mutter has CAP_SYS_NICE and thus secure_getenv returns NULL.
+
+Fixes https://bugs.archlinux.org/task/64191
+---
+ src/context.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/context.c b/src/context.c
+index f43ee0a..6d86dd1 100644
+--- a/src/context.c
++++ b/src/context.c
+@@ -81,13 +81,13 @@ xkb_context_include_path_append_default(struct xkb_context *ctx)
+     int ret = 0;
+ 
+     home = secure_getenv("HOME");
+-    if (!home)
+-        return ret;
+-    err = asprintf(&user_path, "%s/.xkb", home);
+-    if (err <= 0)
+-        return ret;
+-    ret |= xkb_context_include_path_append(ctx, user_path);
+-    free(user_path);
++    if (home != NULL) {
++        err = asprintf(&user_path, "%s/.xkb", home);
++        if (err <= 0)
++            return ret;
++        ret |= xkb_context_include_path_append(ctx, user_path);
++        free(user_path);
++    }
+ 
+     root = secure_getenv("XKB_CONFIG_ROOT");
+     if (root != NULL)
+-- 
+2.23.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-10-20 16:54:09 UTC (rev 365241)
+++ PKGBUILD	2019-10-20 19:12:40 UTC (rev 365242)
@@ -5,7 +5,7 @@
 pkgbase=libxkbcommon
 pkgname=(libxkbcommon libxkbcommon-doc libxkbcommon-x11)
 pkgver=0.9.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Keymap handling library for toolkits and window systems"
 url="https://xkbcommon.org/"
 arch=(x86_64)
@@ -14,8 +14,10 @@
 makedepends=(libxcb doxygen git graphviz wayland wayland-protocols meson)
 checkdepends=(xorg-server-xvfb libgl)
 _commit=a88a0710f95c0422f52c54d9bad14b2cc45e3dd0  # tags/xkbcommon-0.9.0^0
-source=("git+https://github.com/xkbcommon/libxkbcommon#commit=$_commit")
-md5sums=('SKIP')
+source=("git+https://github.com/xkbcommon/libxkbcommon#commit=$_commit"
+        0001-context-Don-t-fail-to-create-the-context-if-HOME-isn.patch)
+sha256sums=('SKIP'
+            '62794414d698648eba9d05723f5c6a9b0bc8c3e1d611548932e3c5eb06e3c00e')
 
 pkgver() {
   cd $pkgbase
@@ -25,6 +27,9 @@
 prepare() {
   cd $pkgbase
 
+  # https://bugs.archlinux.org/task/64191
+  git apply -3 ../0001-context-Don-t-fail-to-create-the-context-if-HOME-isn.patch
+
   printf '%s\n' >>doc/Doxyfile.in \
     HAVE_DOT=yes DOT_IMAGE_FORMAT=svg INTERACTIVE_SVG=yes
 }



More information about the arch-commits mailing list