diff --git a/doxygen/PKGBUILD b/doxygen/PKGBUILD index 0f4fa8c..9a4cf69 100644 --- a/doxygen/PKGBUILD +++ b/doxygen/PKGBUILD @@ -73,4 +73,3 @@ license=('GPL') sha256sums=(2a3ee47f7276b759f74bac7614c05a1296a5b028d3f6a79a88e4c213db78e7dc) # doxygen-1.9.6.tar.gz - diff --git a/itstool/0001-Fix-the-crash-from-912099.patch b/itstool/0001-Fix-the-crash-from-912099.patch new file mode 100644 index 0000000..326b849 --- /dev/null +++ b/itstool/0001-Fix-the-crash-from-912099.patch @@ -0,0 +1,90 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tanguy Ortolo +Date: Fri, 7 Dec 2018 00:00:00 +0000 +Subject: [PATCH] Fix the crash from #912099 + +ITS Tool 2.0.4 crashes when building some documentation, as reported in #912099. +This comes from translations with invalid XML markup, which ITS Tool fails to +merge (which is not abnormal), and to report these issues, needlessly encodes +the original msgstr from unicode to bytes, causing it to be recoded using the +default ascii codec, which fails when the msgstr contains anything out of ascii. + +This patch removes the useless decoding, avoiding the failing subsequent +recoding. It also explicitly encodes the output strings to be able to print them +in all cases, even when the output encoding cannot be detected. + +Bug: https://github.com/itstool/itstool/issues/25 +Bug-Debian: https://bugs.debian.org/912099 +Forwarded: https://github.com/itstool/itstool/issues/25 +--- + itstool.in | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/itstool.in b/itstool.in +index c21ad4bfeb86..f34673581c88 100755 +--- a/itstool.in ++++ b/itstool.in +@@ -44,9 +44,22 @@ if PY3: + else: + return str(s) + ustr_type = str ++ def pr_str(s): ++ """Return a string that can be safely print()ed""" ++ # Since print works on both bytes and unicode, just return the argument ++ return s + else: + string_types = basestring, + ustr = ustr_type = unicode ++ def pr_str(s): ++ """Return a string that can be safely print()ed""" ++ if isinstance(s, str): ++ # Since print works on str, just return the argument ++ return s ++ else: ++ # print may not work on unicode if the output encoding cannot be ++ # detected, so just encode with UTF-8 ++ return unicode.encode(s, 'utf-8') + + NS_ITS = 'http://www.w3.org/2005/11/its' + NS_ITST = 'http://itstool.org/extensions/' +@@ -1077,36 +1090,36 @@ class Document (object): + if strict: + raise + else: +- sys.stderr.write('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( ++ sys.stderr.write(pr_str('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( + (lang + ' ') if lang is not None else '', +- msgstr.encode('utf-8'))) ++ msgstr))) + self._xml_err = '' + return node + def scan_node(node): + children = [child for child in xml_child_iter(node)] + for child in children: + if child.type != 'element': + continue + if child.ns() is not None and child.ns().content == NS_BLANK: + ph_node = msg.get_placeholder(child.name).node + if self.has_child_elements(ph_node): + self.merge_translations(translations, None, ph_node, strict=strict) + newnode = ph_node.copyNode(1) + newnode.setTreeDoc(self._doc) + child.replaceNode(newnode) + else: + repl = self.get_translated(ph_node, translations, strict=strict, lang=lang) + child.replaceNode(repl) + scan_node(child) + try: + scan_node(trnode) + except: + if strict: + raise + else: +- sys.stderr.write('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( ++ sys.stderr.write(pr_str('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( + (lang + ' ') if lang is not None else '', +- msgstr.encode('utf-8'))) ++ msgstr))) + self._xml_err = '' + ctxt.doc().freeDoc() + return node diff --git a/itstool/PKGBUILD b/itstool/PKGBUILD new file mode 100644 index 0000000..76fdb86 --- /dev/null +++ b/itstool/PKGBUILD @@ -0,0 +1,57 @@ +#!/usr/bin/bash +# JOBoRun : Jwm OpenBox Obarun RUNit +# Maintainer : Joe Bo Run +# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname" +# Website : https://pozol.eu +#-----------------------------------------| DESCRIPTION |--------------------------------------- + +pkgname=itstool +pkgver=2.0.7 +pkgrel=01 +epoch=1 +pkgdesc="XML to PO and back again" +arch=(any) +url="http://itstool.org/" +depends=(python libxml2 docbook-xml) +makedepends=(git) +_commit=f1c6544dcd83a73a5ccea9e0c48cf9a47e006190 # tags/2.0.7^0 +source=("git+https://github.com/itstool/itstool#commit=$_commit" + 0001-Fix-the-crash-from-912099.patch) + +pkgver() { + cd $pkgname + git describe --tags | sed 's/-/+/g' +} + +prepare() { + cd $pkgname + + # https://src.fedoraproject.org/rpms/itstool/blob/rawhide/f/itstool-2.0.5-fix-crash-wrong-encoding.patch + git apply -3 ../0001-Fix-the-crash-from-912099.patch + + autoreconf -fvi +} + +build() { + cd $pkgname + ./configure --prefix=/usr + make +} + +check() { + cd $pkgname + make check +} + +package() { + cd $pkgname + make DESTDIR="$pkgdir" install +} + +#---- license gpg-key sha256sums ---- + +license=(GPL3) + +sha256sums=(SKIP + b43cea38118aaefa6724136d142dcc7099cd6de04cf2e226f53d4310dfe207cc) # 0001-Fix-the-crash-from-912099.patch + diff --git a/itstool/PKGBUILD-arch b/itstool/PKGBUILD-arch new file mode 100644 index 0000000..1196c46 --- /dev/null +++ b/itstool/PKGBUILD-arch @@ -0,0 +1,48 @@ +# Maintainer: Jan Alexander Steffens (heftig) +# Contributor: Michael Pusterhofer + +pkgname=itstool +pkgver=2.0.7 +pkgrel=1 +epoch=1 +pkgdesc="XML to PO and back again" +arch=(any) +url="http://itstool.org/" +license=(GPL3) +depends=(python libxml2 docbook-xml) +makedepends=(git) +_commit=f1c6544dcd83a73a5ccea9e0c48cf9a47e006190 # tags/2.0.7^0 +source=("git+https://github.com/itstool/itstool#commit=$_commit" + 0001-Fix-the-crash-from-912099.patch) +sha256sums=('SKIP' + 'b43cea38118aaefa6724136d142dcc7099cd6de04cf2e226f53d4310dfe207cc') + +pkgver() { + cd $pkgname + git describe --tags | sed 's/-/+/g' +} + +prepare() { + cd $pkgname + + # https://src.fedoraproject.org/rpms/itstool/blob/rawhide/f/itstool-2.0.5-fix-crash-wrong-encoding.patch + git apply -3 ../0001-Fix-the-crash-from-912099.patch + + autoreconf -fvi +} + +build() { + cd $pkgname + ./configure --prefix=/usr + make +} + +check() { + cd $pkgname + make check +} + +package() { + cd $pkgname + make DESTDIR="$pkgdir" install +} diff --git a/itstool/clean b/itstool/clean new file mode 100644 index 0000000..c0ddbaa --- /dev/null +++ b/itstool/clean @@ -0,0 +1 @@ +rm -rf {src,pkg,itstool} diff --git a/itstool/deps b/itstool/deps new file mode 100644 index 0000000..8defb45 --- /dev/null +++ b/itstool/deps @@ -0,0 +1,7 @@ +python +libxml2 +docbook-xml + +git +autoconf +automake diff --git a/libx11/0001-Revert_Update_XPutBackEvent.diff b/libx11/0001-Revert_Update_XPutBackEvent.diff new file mode 100644 index 0000000..d249457 --- /dev/null +++ b/libx11/0001-Revert_Update_XPutBackEvent.diff @@ -0,0 +1,57 @@ +From 88399e01be679bfcc9a5e8922ffe2c47f0e56dee Mon Sep 17 00:00:00 2001 +From: Yuxuan Shui +Date: Tue, 3 Jan 2023 15:09:28 +0000 +Subject: [PATCH] Revert "Update XPutBackEvent() to support clients that put + back unpadded events" + +This reverts commit d6d6cba90215d323567fef13d6565756c9956f60. + +The reverted commit intended to fix the problem where an unpadded X +event struct is passed into XPutBackEvent, by creating a padded struct +with _XEventToWire and _XWireToEvent. However, _XWireToEvent updates the +last sequence number in Display, which may cause xlib to complain about +lost sequence numbers. + +IMO, the problem that commit tried to solve is a bug in the client +library, and workaround it inside Xlib is bad practice, especially given +the problem it caused. Plus, the offender cited in the original commit +message, freeglut, has already fixed this problem. + +Fixes: #176 #174 + +Signed-off-by: Yuxuan Shui +--- + src/PutBEvent.c | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/src/PutBEvent.c b/src/PutBEvent.c +index f7b74b31..0f9df342 100644 +--- a/src/PutBEvent.c ++++ b/src/PutBEvent.c +@@ -79,22 +79,9 @@ XPutBackEvent ( + register XEvent *event) + { + int ret; +- xEvent wire = {0}; +- XEvent lib = {0}; +- Status (*fp)(Display *, XEvent *, xEvent *); +- int type = event->type & 0177; + + LockDisplay(dpy); +- fp = dpy->wire_vec[type]; +- if (fp == NULL) +- fp = _XEventToWire; +- ret = (*fp)(dpy, event, &wire); +- if (ret) +- { +- ret = (*dpy->event_vec[type])(dpy, &lib, &wire); +- if (ret) +- ret = _XPutBackEvent(dpy, &lib); +- } ++ ret = _XPutBackEvent(dpy, event); + UnlockDisplay(dpy); + return ret; + } +-- +GitLab + diff --git a/libx11/PKGBUILD b/libx11/PKGBUILD index 39c4d56..77625be 100644 --- a/libx11/PKGBUILD +++ b/libx11/PKGBUILD @@ -7,7 +7,7 @@ pkgname=libx11 pkgver=1.8.3 -pkgrel=03 +pkgrel=04 pkgdesc="X11 client-side library w/o ipv6" arch=(x86_64) url="https://xorg.freedesktop.org/" @@ -17,17 +17,13 @@ depends=('libxcb' 'xorgproto') makedepends=('xorg-util-macros' 'xtrans') # options=('debug') ## uncomment this line to have the debug pkg produced source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.xz{,.sig} - 176.diff - 177.diff) + 0001-Revert_Update_XPutBackEvent.diff) prepare() { cd libX11-${pkgver} - # https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/176 - # should fix FS#76669 - patch -Np1 -i ../176.diff - # https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/177 - # should fix FS#76860 - patch -Np1 -i ../177.diff + # 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 } build() { @@ -67,7 +63,6 @@ validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith #validpgpkeys=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb #validpgpkeys=('3BB639E56F861FA2E86505690FDD682D974CA72A') # Matt Turner @@ -27,12 +25,9 @@ validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith