diff --git a/ell/PKGBUILD b/ell/PKGBUILD index 0a507f3..f9a3e6c 100644 --- a/ell/PKGBUILD +++ b/ell/PKGBUILD @@ -7,7 +7,7 @@ pkgname=ell pkgver=0.64 -pkgrel=01 +pkgrel=02 pkgdesc="Embedded Linux library" url="https://01.org/ell" #url="https://git.kernel.org/pub/scm/libs/ell/ell.git/" @@ -51,5 +51,5 @@ validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # "Marcel Holtmann +Date: Wed, 31 Jan 2024 20:26:40 +0900 +Subject: [PATCH 1/2] ximcp: Unmark to fabricate key events with XKeyEvent + serial + +_XimProtoKeypressFilter() and _XimProtoKeyreleaseFilter() can +receive XKeyEvent from both the typing on the keyboard and the +callback of XIM_FORWARD_EVENT. + +If the filter functions unmark to fabricate XKeyEvent from the typing +on the keyboard during receiving XKeyEvent from the callback of +XIM_FORWARD_EVENT with typing keys very quickly likes an bar code +scanner (or evemu-play), XIM server cannot receive some key events and +it causes the key typing order to get scrambled. + +Now XIM client saves the serial in XKeyEvent and the filter functions +unmark to fabricate XKeyEvent from the callback of XIM_FORWARD_EVENT +only. + +Fixes: #198 +--- + modules/im/ximcp/imDefFlt.c | 8 ++--- + modules/im/ximcp/imDefIm.c | 1 + + modules/im/ximcp/imDefLkup.c | 58 ++++++++++++++++++++++++++++++++---- + src/xlibi18n/XimintP.h | 17 +++++++++++ + 4 files changed, 75 insertions(+), 9 deletions(-) + +diff --git a/modules/im/ximcp/imDefFlt.c b/modules/im/ximcp/imDefFlt.c +index 44cc6884..834b9db4 100644 +--- a/modules/im/ximcp/imDefFlt.c ++++ b/modules/im/ximcp/imDefFlt.c +@@ -142,9 +142,9 @@ _XimProtoKeypressFilter( + { + Xim im = (Xim)ic->core.im; + +- if (IS_FABRICATED(im)) { ++ if (_XimIsFabricatedSerial(im, ev->serial)) { + _XimPendingFilter(ic); +- UNMARK_FABRICATED(im); ++ _XimUnfabricateSerial(im, ev->serial); + return NOTFILTERD; + } + +@@ -203,9 +203,9 @@ _XimProtoKeyreleaseFilter( + { + Xim im = (Xim)ic->core.im; + +- if (IS_FABRICATED(im)) { ++ if (_XimIsFabricatedSerial(im, ev->serial)) { + _XimPendingFilter(ic); +- UNMARK_FABRICATED(im); ++ _XimUnfabricateSerial(im, ev->serial); + return NOTFILTERD; + } + +diff --git a/modules/im/ximcp/imDefIm.c b/modules/im/ximcp/imDefIm.c +index fe4d18ba..ac7f1195 100644 +--- a/modules/im/ximcp/imDefIm.c ++++ b/modules/im/ximcp/imDefIm.c +@@ -430,6 +430,7 @@ _XimPreConnect( + return False; + + im->private.proto.im_window = im_window; ++ im->private.proto.fabricated_serial = 0; + return True; + } + +diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c +index dd1adf53..5192e8c1 100644 +--- a/modules/im/ximcp/imDefLkup.c ++++ b/modules/im/ximcp/imDefLkup.c +@@ -341,6 +341,54 @@ _XimForwardEvent( + return _XimForwardEventCore(ic, ev, sync); + } + ++Bool ++_XimFabricateSerial( ++ Xim im, ++ unsigned long serial) ++{ ++ if (!serial) ++ return False; ++ if (serial == im->private.proto.fabricated_serial) { ++ fprintf(stderr, "%s,%d: The key event is already fabricated.\n", __FILE__, __LINE__); ++ return False; ++ } ++ if (im->private.proto.fabricated_serial) ++ fprintf(stderr, "%s,%d: Tried to fabricate a wrong key event.\n", __FILE__, __LINE__); ++ ++ MARK_FABRICATED(im); ++ im->private.proto.fabricated_serial = serial; ++ return True; ++} ++ ++Bool ++_XimUnfabricateSerial( ++ Xim im, ++ unsigned long serial) ++{ ++ if (!serial) ++ return False; ++ if (!im->private.proto.fabricated_serial) { ++ fprintf(stderr, "%s,%d: The key event is already unfabricated.\n", __FILE__, __LINE__); ++ return False; ++ } ++ if (serial != im->private.proto.fabricated_serial) ++ fprintf(stderr, "%s,%d: Tried to unfabricate a wrong key event.\n", __FILE__, __LINE__); ++ ++ im->private.proto.fabricated_serial = 0; ++ UNMARK_FABRICATED(im); ++ return True; ++} ++ ++Bool ++_XimIsFabricatedSerial( ++ Xim im, ++ unsigned long serial) ++{ ++ if (!serial) ++ return False; ++ return (serial == im->private.proto.fabricated_serial); ++} ++ + static void + _XimProcEvent( + Display *d, +@@ -355,7 +403,7 @@ _XimProcEvent( + ev->xany.serial |= serial << 16; + ev->xany.send_event = False; + ev->xany.display = d; +- MARK_FABRICATED(ic->core.im); ++ _XimFabricateSerial((Xim)ic->core.im, ev->xany.serial); + return; + } + +@@ -704,10 +752,6 @@ _XimCommitRecv( + + (void)_XimRespSyncReply(ic, flag); + +- if (ic->private.proto.registed_filter_event +- & (KEYPRESS_MASK | KEYRELEASE_MASK)) +- MARK_FABRICATED(im); +- + bzero(&ev, sizeof(ev)); /* uninitialized : found when running kterm under valgrind */ + + ev.type = KeyPress; +@@ -719,6 +763,10 @@ _XimCommitRecv( + + ev.time = 0L; + ev.serial = LastKnownRequestProcessed(im->core.display); ++ ++ if (ic->private.proto.registed_filter_event ++ & (KEYPRESS_MASK | KEYRELEASE_MASK)) ++ _XimFabricateSerial(im, ev.serial); + /* FIXME : + I wish there were COMMENTs (!) about the data passed around. + */ +diff --git a/src/xlibi18n/XimintP.h b/src/xlibi18n/XimintP.h +index 674da029..2a51e2ed 100644 +--- a/src/xlibi18n/XimintP.h ++++ b/src/xlibi18n/XimintP.h +@@ -149,6 +149,8 @@ typedef struct _XimProtoPrivateRec { + XimTransRegDispatcher register_dispatcher; + XimTransCallDispatcher call_dispatcher; + XPointer spec; ++ ++ unsigned long fabricated_serial; + } XimProtoPrivateRec; + + /* +@@ -307,4 +309,19 @@ typedef struct _XicProtoPrivateRec { + #define XIM_MAXIMNAMELEN 64 + #define XIM_MAXLCNAMELEN 64 + ++Bool ++_XimFabricateSerial( ++ Xim im, ++ unsigned long serial); ++ ++Bool ++_XimUnfabricateSerial( ++ Xim im, ++ unsigned long serial); ++ ++Bool ++_XimIsFabricatedSerial( ++ Xim im, ++ unsigned long serial); ++ + #endif /* _XIMINTP_H */ +-- +GitLab + + +From 041b5291f0956c5cda5054be2981c0d02b009a4c Mon Sep 17 00:00:00 2001 +From: Takao Fujiwara +Date: Wed, 31 Jan 2024 20:27:57 +0900 +Subject: [PATCH 2/2] imDefLkup: Commit first info in XimCommitInfo + +Xic.private.proto.commit_info can receive multiple XimCommitInfo +when typing keys very quickly like an bar code scanner (or evemu-play) +and the first info in XimCommitInfo should be committed to keep +the typing key order. + +Fixes: #198 +--- + modules/im/ximcp/imDefLkup.c | 60 +++++++++++++++++++++++++++++------- + 1 file changed, 49 insertions(+), 11 deletions(-) + +diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c +index 5192e8c1..6ffe6f48 100644 +--- a/modules/im/ximcp/imDefLkup.c ++++ b/modules/im/ximcp/imDefLkup.c +@@ -640,22 +640,47 @@ _XimRegCommitInfo( + } + + static void +-_XimUnregCommitInfo( +- Xic ic) ++_XimUnregRealCommitInfo( ++ Xic ic, ++ Bool reverse) + { + XimCommitInfo info; ++ XimCommitInfo prev_info = NULL; + +- if (!(info = ic->private.proto.commit_info)) ++ info = ic->private.proto.commit_info; ++ while (reverse && info) { ++ if (!info->next) ++ break; ++ prev_info = info; ++ info = info->next; ++ } ++ if (!info) + return; + +- + Xfree(info->string); + Xfree(info->keysym); +- ic->private.proto.commit_info = info->next; ++ if (prev_info) ++ prev_info->next = info->next; ++ else ++ ic->private.proto.commit_info = info->next; + Xfree(info); + return; + } + ++static void ++_XimUnregCommitInfo( ++ Xic ic) ++{ ++ _XimUnregRealCommitInfo(ic, False); ++} ++ ++static void ++_XimUnregFirstCommitInfo( ++ Xic ic) ++{ ++ _XimUnregRealCommitInfo(ic, True); ++} ++ + void + _XimFreeCommitInfo( + Xic ic) +@@ -665,6 +690,19 @@ _XimFreeCommitInfo( + return; + } + ++static XimCommitInfo ++_XimFirstCommitInfo( ++ Xic ic) ++{ ++ XimCommitInfo info = ic->private.proto.commit_info; ++ while (info) { ++ if (!info->next) ++ break; ++ info = info->next; ++ } ++ return info; ++} ++ + static Bool + _XimProcKeySym( + Xic ic, +@@ -1059,7 +1097,7 @@ _XimProtoMbLookupString( + state = &tmp_state; + + if ((ev->type == KeyPress) && (ev->keycode == 0)) { /* Filter function */ +- if (!(info = ic->private.proto.commit_info)) { ++ if (!(info = _XimFirstCommitInfo(ic))) { + *state = XLookupNone; + return 0; + } +@@ -1075,7 +1113,7 @@ _XimProtoMbLookupString( + else + *state = XLookupKeySym; + } +- _XimUnregCommitInfo(ic); ++ _XimUnregFirstCommitInfo(ic); + + } else if (ev->type == KeyPress) { + ret = _XimLookupMBText(ic, ev, buffer, bytes, keysym, NULL); +@@ -1122,7 +1160,7 @@ _XimProtoWcLookupString( + state = &tmp_state; + + if (ev->type == KeyPress && ev->keycode == 0) { /* Filter function */ +- if (!(info = ic->private.proto.commit_info)) { ++ if (!(info = _XimFirstCommitInfo(ic))) { + *state = XLookupNone; + return 0; + } +@@ -1138,7 +1176,7 @@ _XimProtoWcLookupString( + else + *state = XLookupKeySym; + } +- _XimUnregCommitInfo(ic); ++ _XimUnregFirstCommitInfo(ic); + + } else if (ev->type == KeyPress) { + ret = _XimLookupWCText(ic, ev, buffer, bytes, keysym, NULL); +@@ -1185,7 +1223,7 @@ _XimProtoUtf8LookupString( + state = &tmp_state; + + if (ev->type == KeyPress && ev->keycode == 0) { /* Filter function */ +- if (!(info = ic->private.proto.commit_info)) { ++ if (!(info = _XimFirstCommitInfo(ic))) { + *state = XLookupNone; + return 0; + } +@@ -1201,7 +1239,7 @@ _XimProtoUtf8LookupString( + else + *state = XLookupKeySym; + } +- _XimUnregCommitInfo(ic); ++ _XimUnregFirstCommitInfo(ic); + + } else if (ev->type == KeyPress) { + ret = _XimLookupUTF8Text(ic, ev, buffer, bytes, keysym, NULL); +-- +GitLab + diff --git a/libx11/PKGBUILD b/libx11/PKGBUILD index a01aea0..e9137c7 100644 --- a/libx11/PKGBUILD +++ b/libx11/PKGBUILD @@ -7,7 +7,7 @@ pkgname=libx11 pkgver=1.8.8 -pkgrel=02 +pkgrel=03 pkgdesc="X11 client-side library w/o ipv6" url="https://xorg.freedesktop.org/" _url="https://gitlab.freedesktop.org/xorg/lib/libx11" @@ -15,19 +15,15 @@ _url="https://gitlab.freedesktop.org/xorg/lib/libx11" # https://lists.archlinux.org/pipermail/arch-dev-public/2019-December/029767.html depends=('libxcb' 'glibc' 'xorgproto') makedepends=('xorg-util-macros' 'xtrans') -#source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.xz{,.sig} -# 176.diff -# 0001-Revert_Update_XPutBackEvent.diff) -source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.xz{,.sig}) -#prepare() { -# cd libX11-${pkgver} -# # https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/180 // fixes also MR #176/#187 -# # should fix FS#76669; FS#69295; FS#76860 -# patch -Np1 -i ../0001-Revert_Update_XPutBackEvent.diff -# # https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/176 -# # should fix FS#76669 -# patch -Np1 -i ../176.diff -#} +source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.xz{,.sig} + MR236.patch) + +prepare() { + cd libX11-${pkgver} + # revert incompatible change - #1 + # https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/205 + patch -R -p1 -i ../MR236.patch +} build() { cd libX11-${pkgver} @@ -66,8 +62,15 @@ license=('MIT AND X11') #validpgpkeys=('C383B778255613DFDB409D91DB221A6900000011') # "Keith Packard " validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith + +sha512sums=('4e7ce8f2d88b9475f960ea1d5730ece8953509e0c057cf2d0a2f5fa6a36e6577b0dcd7f16ac91b8fdd804aabec6d7e8f3067a3a8667bd2e41d72dd68ab70ef82' + 'SKIP' + 'e07b0a7e77c6472019caa9b8c00a065f80f6fcfad292ce939994a420b8fbb3ab226511df566f85a6f944a2b8e0ea0398aa4372ae675d6ef7d6fe7448bf52248c') + sha256sums=(46afaebb2dd1a3a7348c0544a4b1c88c51de4bda885fde57d2cf98427ee5cbf6 # libX11-1.8.8.tar.xz - a7d57456c94d5cb8ed8d173abf44c72f5d889ff35568f64b6b6e082b46402803) # libX11-1.8.8.tar.xz.sig + a7d57456c94d5cb8ed8d173abf44c72f5d889ff35568f64b6b6e082b46402803 # libX11-1.8.8.tar.xz.sig + 614dabfb372c9a9d3d0f875cf945715176425338b54244ad797d2cd5b1c28d5c) # MR236.patch -## 34ca6e6fdb3ed30e8fdead41168064795e17d6ec19ea0cae48e4d5edd0d643b5 libx11-1.8.8-02-x86_64.pkg.tar.lz + +## b8232a185c045a720fed5f3107f459bb16e1a4c134ad6374d1ed37b4c6e2ceee libx11-1.8.8-03-x86_64.pkg.tar.lz diff --git a/libx11/PKGBUILD-arch b/libx11/PKGBUILD-arch index dc980e7..b045a23 100644 --- a/libx11/PKGBUILD-arch +++ b/libx11/PKGBUILD-arch @@ -2,7 +2,7 @@ pkgname=libx11 pkgver=1.8.8 -pkgrel=2 +pkgrel=3 pkgdesc="X11 client-side library" arch=(x86_64) url="https://gitlab.freedesktop.org/xorg/lib/libx11" @@ -11,15 +11,24 @@ url="https://gitlab.freedesktop.org/xorg/lib/libx11" depends=('libxcb' 'glibc' 'xorgproto') makedepends=('xorg-util-macros' 'xtrans') license=('MIT AND X11') -source=(https://xorg.freedesktop.org//releases/individual/lib/libX11-${pkgver}.tar.xz{,.sig}) +source=(https://xorg.freedesktop.org//releases/individual/lib/libX11-${pkgver}.tar.xz{,.sig} + MR236.patch) sha512sums=('4e7ce8f2d88b9475f960ea1d5730ece8953509e0c057cf2d0a2f5fa6a36e6577b0dcd7f16ac91b8fdd804aabec6d7e8f3067a3a8667bd2e41d72dd68ab70ef82' - 'SKIP') + 'SKIP' + 'e07b0a7e77c6472019caa9b8c00a065f80f6fcfad292ce939994a420b8fbb3ab226511df566f85a6f944a2b8e0ea0398aa4372ae675d6ef7d6fe7448bf52248c') validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith #validpgpkeys=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb #validpgpkeys=('3BB639E56F861FA2E86505690FDD682D974CA72A') # Matt Turner #validpgpkeys=('995ED5C8A6138EB0961F18474C09DD83CAAA50B2') # Adam Jackson #validpgpkeys=('C383B778255613DFDB409D91DB221A6900000011') # "Keith Packard " +prepare() { + cd libX11-${pkgver} + # revert incompatible change - #1 + # https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/205 + patch -R -p1 -i ../MR236.patch +} + build() { cd libX11-${pkgver} ./configure --prefix=/usr \ diff --git a/openmpi/PKGBUILD b/openmpi/PKGBUILD index ea2c0c7..3114869 100644 --- a/openmpi/PKGBUILD +++ b/openmpi/PKGBUILD @@ -8,7 +8,7 @@ pkgbase=openmpi pkgname=(openmpi) # openmpi-docs) pkgver=5.0.2 -pkgrel=07 +pkgrel=08 pkgdesc='High performance message passing library (MPI)' url='https://www.open-mpi.org' makedepends=(cuda gcc-fortran gcc-libs glibc hip-runtime-amd hwloc libevent @@ -118,5 +118,3 @@ license=('BSD-3-Clause AND LicenseRef-MPICH') sha256sums=(ee46ad8eeee2c3ff70772160bff877cbf38c330a0bc3b3ddc811648b3396698f) # openmpi-5.0.2.tar.bz2 -## ee46ad8eeee2c3ff70772160bff877cbf38c330a0bc3b3ddc811648b3396698f openmpi-5.0.2.tar.bz2 - diff --git a/openmpi/PKGBUILD-arch b/openmpi/PKGBUILD-arch index a2a38e6..7e64bd8 100644 --- a/openmpi/PKGBUILD-arch +++ b/openmpi/PKGBUILD-arch @@ -9,7 +9,7 @@ pkgname=( openmpi-docs ) pkgver=5.0.2 -pkgrel=7 +pkgrel=8 pkgdesc='High performance message passing library (MPI)' arch=(x86_64) url='https://www.open-mpi.org'