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

Frederik Schwan freswa at archlinux.org
Sun Sep 13 10:07:05 UTC 2020


    Date: Sunday, September 13, 2020 @ 10:07:05
  Author: freswa
Revision: 705075

fix FS#64771

Added:
  xss-lock/trunk/0016-Do-not-core-dump-when-exiting-due-to-loss-of-X-conne.patch
Modified:
  xss-lock/trunk/PKGBUILD

-----------------------------------------------------------------+
 0016-Do-not-core-dump-when-exiting-due-to-loss-of-X-conne.patch |   37 ++++++++++
 PKGBUILD                                                        |   21 +++--
 2 files changed, 51 insertions(+), 7 deletions(-)

Added: 0016-Do-not-core-dump-when-exiting-due-to-loss-of-X-conne.patch
===================================================================
--- 0016-Do-not-core-dump-when-exiting-due-to-loss-of-X-conne.patch	                        (rev 0)
+++ 0016-Do-not-core-dump-when-exiting-due-to-loss-of-X-conne.patch	2020-09-13 10:07:05 UTC (rev 705075)
@@ -0,0 +1,37 @@
+From 11addea193c69833c5aa8e1da72fb9e1b2be2f1d Mon Sep 17 00:00:00 2001
+From: Ian Campbell <ijc at debian.org>
+Date: Sun, 29 Mar 2020 18:03:50 +0800
+Subject: Do not core dump when exiting due to loss of X connection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The `g_critical` function will core dump if critical errors are marked fatal
+(which they are in xss-lock). Instead log as informational and exit.
+
+Thanks to Tomáš Janoušek for the bug report and original patch. Closes:
+---
+ src/xss-lock.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/xss-lock.c b/src/xss-lock.c
+index 31e161d..95f049c 100644
+--- a/src/xss-lock.c
++++ b/src/xss-lock.c
+@@ -161,10 +161,12 @@ screensaver_event_cb(xcb_connection_t *connection, xcb_generic_event_t *event,
+                      const int *const xcb_screensaver_notify)
+ {
+     uint8_t event_type;
+-    
+-    if (!event)
+-        g_critical("X connection lost; exiting.");
+-    
++
++    if (!event) {
++        g_info("X connection lost; exiting.");
++        exit(EXIT_FAILURE);
++    }
++
+     event_type = XCB_EVENT_RESPONSE_TYPE(event);
+     if (event_type == 0) {
+         xcb_generic_error_t *error = (xcb_generic_error_t *)event;

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-13 10:03:30 UTC (rev 705074)
+++ PKGBUILD	2020-09-13 10:07:05 UTC (rev 705075)
@@ -8,7 +8,7 @@
 _commit=1e158fb20108058dbd62bd51d8e8c003c0a48717
 _taghash=1e158fb20108
 pkgver=0.3.0.g$_taghash
-pkgrel=3
+pkgrel=4
 pkgdesc="Use external locker as X screen saver"
 arch=("x86_64")
 url="https://bitbucket.org/raymonad/xss-lock"
@@ -17,18 +17,25 @@
 makedepends=("cmake" "git" "python-docutils")
 optdepends=("bash-completion: for bash completion")
 # source=("${pkgname}-${pkgver}.tar.gz::https://bitbucket.org/raymonad/$pkgname/get/v$pkgver.tar.gz")
-source=("${pkgname}-${pkgver}.tar.gz::https://bitbucket.org/raymonad/xss-lock/get/${_commit}.tar.gz")
+source=("${pkgname}-${pkgver}.tar.gz::https://bitbucket.org/raymonad/xss-lock/get/${_commit}.tar.gz"
+				0016-Do-not-core-dump-when-exiting-due-to-loss-of-X-conne.patch)
 # source=("git+https://bitbucket.org/raymonad/$pkgname.git")
-md5sums=('d7ee0d919c19244366cedbe1f65d39c7')
+b2sums=('40ffe8911f37752b13b5d6b0e9eea742f6498b66f9c961635eaa9573f73a75f1b45fe82a956486e93c0f2171288bbcda7c86889661a34ea99303c32a95bd0742'
+        'd9bc1e8c8a55bb540106f01620aca318a08e1b662f10b294cb4e6c89dca09e73c389a07402d83bfb1369881cfd78a0bcdb45a0d27785f94ed8428710acb012cb')
 
+prepare() {
+	cd raymonad-${pkgname}-${_taghash}
+	patch -Np1 < ../0016-Do-not-core-dump-when-exiting-due-to-loss-of-X-conne.patch
+}
+
 build() {
-	cd "$srcdir/raymonad-$pkgname-$_taghash"
+	cd raymonad-${pkgname}-${_taghash}
 	cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
 	make
 }
 
 package() {
-	cd "$srcdir/raymonad-$pkgname-$_taghash"
-	make DESTDIR="$pkgdir" install
-	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+	cd raymonad-${pkgname}-${_taghash}
+	make DESTDIR="${pkgdir}" install
+	install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
 }


More information about the arch-commits mailing list