[arch-commits] Commit in lib32-libxi/trunk (PKGBUILD fix-gtk2-segfault.patch)

2017-06-23 Thread Laurent Carlier
Date: Friday, June 23, 2017 @ 06:12:22
  Author: lcarlier
Revision: 239743

upgpkg: lib32-libxi 1.7.9-1

upstream update 1.7.9

Modified:
  lib32-libxi/trunk/PKGBUILD
Deleted:
  lib32-libxi/trunk/fix-gtk2-segfault.patch

-+
 PKGBUILD|   21 +---
 fix-gtk2-segfault.patch |  241 --
 2 files changed, 6 insertions(+), 256 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-06-23 06:08:15 UTC (rev 239742)
+++ PKGBUILD2017-06-23 06:12:22 UTC (rev 239743)
@@ -4,30 +4,21 @@
 
 _pkgbasename=libxi
 pkgname=lib32-$_pkgbasename
-pkgver=1.7.7
-pkgrel=2
+pkgver=1.7.9
+pkgrel=1
 pkgdesc="X11 Input extension library (32-bit)"
 arch=('x86_64')
-url="http://xorg.freedesktop.org;
+url="https://xorg.freedesktop.org;
 depends=('lib32-libxext' 'lib32-libxfixes' 'inputproto' $_pkgbasename)
 makedepends=('pkgconfig' 'xorg-util-macros' gcc-multilib automake)
 options=(!libtool)
 license=('custom')
-source=(${url}/releases/individual/lib/libXi-${pkgver}.tar.bz2{,.sig}
-fix-gtk2-segfault.patch)
-sha256sums=('996f834fa57b9b33ba36690f6f5c6a29320bc8213022943912462d8015b1e030'
-'SKIP'
-'34ac1854b6bb14cbb048ddbd20cce7a4b2ad1e8ffa6b116aa20b0dfc56655c4b')
+source=(${url}/releases/individual/lib/libXi-${pkgver}.tar.bz2{,.sig})
+sha256sums=('c2e6b8ff84f9448386c1b5510a5cf5a16d788f76db018194dacdc200180faf45'
+'SKIP')
 validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer
 validpgpkeys+=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb 

 
-prepare() {
-  cd "${srcdir}/libXi-${pkgver}"
-
-  #fix FS#51298
-  patch -Np1 -i ../fix-gtk2-segfault.patch
-}
-
 build() {
   export CC="gcc -m32"
   export CXX="g++ -m32"

Deleted: fix-gtk2-segfault.patch
===
--- fix-gtk2-segfault.patch 2017-06-23 06:08:15 UTC (rev 239742)
+++ fix-gtk2-segfault.patch 2017-06-23 06:12:22 UTC (rev 239743)
@@ -1,241 +0,0 @@
-From patchwork Thu Oct 13 03:58:22 2016
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [v2,libXi,1/2] SizeClassInfo can return 0 even without an error
-From: Peter Hutterer 
-X-Patchwork-Id: 115413
-Message-Id: <1476331103-24072-1-git-send-email-peter.hutte...@who-t.net>
-To: xorg-de...@lists.freedesktop.org
-Cc: Niels Ole Salscheider 
-Date: Thu, 13 Oct 2016 13:58:22 +1000
-
-From: Niels Ole Salscheider 
-
-Catch the error case separately. Commit 19a9cd607d added length checking to
-SizeClassInfo but re-used the return value of 0 for an error. A device without
-classes (as is initialized by xf86-input-libinput for tablets) can
-legitimately return 0 and erroneously triggers an error.
-Fix this by using a separate value for the error.
-
-Reproducible by calling XListInputDevices() with a tablet attached.
-
-This fixes a regression introduced in commit 19a9cd607d.
-
-Signed-off-by: Niels Ole Salscheider 
-Signed-off-by: Peter Hutterer 

-Changes to v1:
-- don't touch *size until we're sure.
-- expand commit message
-
-Niels:
-I left you as author and your signed-off-by since it's essentially your
-patch with a minor change.
-
- src/XListDev.c | 24 +---
- 1 file changed, 13 insertions(+), 11 deletions(-)
-
-diff --git a/src/XListDev.c b/src/XListDev.c
-index f850cd0..e4bd3d5 100644
 a/src/XListDev.c
-+++ b/src/XListDev.c
-@@ -73,27 +73,28 @@ static int pad_to_xid(int base_size)
- return ((base_size + padsize - 1)/padsize) * padsize;
- }
- 
--static size_t
--SizeClassInfo(xAnyClassPtr *any, size_t len, int num_classes)
-+static int
-+SizeClassInfo(xAnyClassPtr *any, size_t len, int num_classes, size_t *size)
- {
--int size = 0;
- int j;
-+size_t sz = 0;
-+
- for (j = 0; j < num_classes; j++) {
- switch ((*any)->class) {
- case KeyClass:
--size += pad_to_xid(sizeof(XKeyInfo));
-+sz += pad_to_xid(sizeof(XKeyInfo));
- break;
- case ButtonClass:
--size += pad_to_xid(sizeof(XButtonInfo));
-+sz += pad_to_xid(sizeof(XButtonInfo));
- break;
- case ValuatorClass:
- {
- xValuatorInfoPtr v;
- 
- if (len < sizeof(v))
--return 0;
-+return 1;
- v = (xValuatorInfoPtr) *any;
--size += pad_to_xid(sizeof(XValuatorInfo) +
-+sz += pad_to_xid(sizeof(XValuatorInfo) +
- (v->num_axes * sizeof(XAxisInfo)));
- break;
- }
-@@ -101,11 +102,13 @@ 

[arch-commits] Commit in lib32-libxi/trunk (PKGBUILD fix-gtk2-segfault.patch)

2016-10-13 Thread Laurent Carlier
Date: Thursday, October 13, 2016 @ 16:42:48
  Author: lcarlier
Revision: 192199

upgpkg: lib32-libxi 1.7.7-2

fix FS#51298

Added:
  lib32-libxi/trunk/fix-gtk2-segfault.patch
Modified:
  lib32-libxi/trunk/PKGBUILD

-+
 PKGBUILD|   15 ++
 fix-gtk2-segfault.patch |  241 ++
 2 files changed, 253 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-10-13 16:18:33 UTC (rev 192198)
+++ PKGBUILD2016-10-13 16:42:48 UTC (rev 192199)
@@ -5,7 +5,7 @@
 _pkgbasename=libxi
 pkgname=lib32-$_pkgbasename
 pkgver=1.7.7
-pkgrel=1
+pkgrel=2
 pkgdesc="X11 Input extension library (32-bit)"
 arch=('x86_64')
 url="http://xorg.freedesktop.org;
@@ -13,12 +13,21 @@
 makedepends=('pkgconfig' 'xorg-util-macros' gcc-multilib automake)
 options=(!libtool)
 license=('custom')
-source=(${url}/releases/individual/lib/libXi-${pkgver}.tar.bz2{,.sig})
+source=(${url}/releases/individual/lib/libXi-${pkgver}.tar.bz2{,.sig}
+fix-gtk2-segfault.patch)
 sha256sums=('996f834fa57b9b33ba36690f6f5c6a29320bc8213022943912462d8015b1e030'
-'SKIP')
+'SKIP'
+'34ac1854b6bb14cbb048ddbd20cce7a4b2ad1e8ffa6b116aa20b0dfc56655c4b')
 validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer
 validpgpkeys+=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb 

 
+prepare() {
+  cd "${srcdir}/libXi-${pkgver}"
+
+  #fix FS#51298
+  patch -Np1 -i ../fix-gtk2-segfault.patch
+}
+
 build() {
   export CC="gcc -m32"
   export CXX="g++ -m32"

Added: fix-gtk2-segfault.patch
===
--- fix-gtk2-segfault.patch (rev 0)
+++ fix-gtk2-segfault.patch 2016-10-13 16:42:48 UTC (rev 192199)
@@ -0,0 +1,241 @@
+From patchwork Thu Oct 13 03:58:22 2016
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [v2,libXi,1/2] SizeClassInfo can return 0 even without an error
+From: Peter Hutterer 
+X-Patchwork-Id: 115413
+Message-Id: <1476331103-24072-1-git-send-email-peter.hutte...@who-t.net>
+To: xorg-de...@lists.freedesktop.org
+Cc: Niels Ole Salscheider 
+Date: Thu, 13 Oct 2016 13:58:22 +1000
+
+From: Niels Ole Salscheider 
+
+Catch the error case separately. Commit 19a9cd607d added length checking to
+SizeClassInfo but re-used the return value of 0 for an error. A device without
+classes (as is initialized by xf86-input-libinput for tablets) can
+legitimately return 0 and erroneously triggers an error.
+Fix this by using a separate value for the error.
+
+Reproducible by calling XListInputDevices() with a tablet attached.
+
+This fixes a regression introduced in commit 19a9cd607d.
+
+Signed-off-by: Niels Ole Salscheider 
+Signed-off-by: Peter Hutterer 
+---
+Changes to v1:
+- don't touch *size until we're sure.
+- expand commit message
+
+Niels:
+I left you as author and your signed-off-by since it's essentially your
+patch with a minor change.
+
+ src/XListDev.c | 24 +---
+ 1 file changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/src/XListDev.c b/src/XListDev.c
+index f850cd0..e4bd3d5 100644
+--- a/src/XListDev.c
 b/src/XListDev.c
+@@ -73,27 +73,28 @@ static int pad_to_xid(int base_size)
+ return ((base_size + padsize - 1)/padsize) * padsize;
+ }
+ 
+-static size_t
+-SizeClassInfo(xAnyClassPtr *any, size_t len, int num_classes)
++static int
++SizeClassInfo(xAnyClassPtr *any, size_t len, int num_classes, size_t *size)
+ {
+-int size = 0;
+ int j;
++size_t sz = 0;
++
+ for (j = 0; j < num_classes; j++) {
+ switch ((*any)->class) {
+ case KeyClass:
+-size += pad_to_xid(sizeof(XKeyInfo));
++sz += pad_to_xid(sizeof(XKeyInfo));
+ break;
+ case ButtonClass:
+-size += pad_to_xid(sizeof(XButtonInfo));
++sz += pad_to_xid(sizeof(XButtonInfo));
+ break;
+ case ValuatorClass:
+ {
+ xValuatorInfoPtr v;
+ 
+ if (len < sizeof(v))
+-return 0;
++return 1;
+ v = (xValuatorInfoPtr) *any;
+-size += pad_to_xid(sizeof(XValuatorInfo) +
++sz += pad_to_xid(sizeof(XValuatorInfo) +
+ (v->num_axes * sizeof(XAxisInfo)));
+ break;
+ }
+@@ -101,11 +102,13 @@ SizeClassInfo(xAnyClassPtr *any, size_t len, int 
num_classes)
+ break;
+ }
+ if ((*any)->length > len)
+-return 0;
++return 1;
+ *any =