mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/cups to 2.3.3op2-2
This commit is contained in:
parent
2411f17449
commit
386f51a485
2 changed files with 60 additions and 3 deletions
|
@ -8,7 +8,7 @@ pkgbase="cups"
|
||||||
pkgname=('libcups' 'cups')
|
pkgname=('libcups' 'cups')
|
||||||
#_commit=be75d5d99a54c5f62608f7b9e98748d4c7045ec1 # master 2020-11-27
|
#_commit=be75d5d99a54c5f62608f7b9e98748d4c7045ec1 # master 2020-11-27
|
||||||
pkgver=2.3.3op2
|
pkgver=2.3.3op2
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
epoch=1
|
epoch=1
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
license=('Apache' 'custom')
|
license=('Apache' 'custom')
|
||||||
|
@ -30,7 +30,10 @@ source=(#https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgve
|
||||||
cups-1.6.2-statedir.patch
|
cups-1.6.2-statedir.patch
|
||||||
# bugfixes
|
# bugfixes
|
||||||
cups-freebind.patch
|
cups-freebind.patch
|
||||||
guid.patch)
|
guid.patch
|
||||||
|
# upstream fixes
|
||||||
|
increase_timeout.patch
|
||||||
|
)
|
||||||
sha256sums=('deb3575bbe79c0ae963402787f265bfcf8d804a71fc2c94318a74efec86f96df'
|
sha256sums=('deb3575bbe79c0ae963402787f265bfcf8d804a71fc2c94318a74efec86f96df'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'd87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9'
|
'd87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9'
|
||||||
|
@ -39,7 +42,8 @@ sha256sums=('deb3575bbe79c0ae963402787f265bfcf8d804a71fc2c94318a74efec86f96df'
|
||||||
'ff3eb0782af0405f5dafe89e04b1b4ea7a49afc5496860d724343bd04f375832'
|
'ff3eb0782af0405f5dafe89e04b1b4ea7a49afc5496860d724343bd04f375832'
|
||||||
'23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af'
|
'23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af'
|
||||||
'3385047b9ac8a7b13aeb8f0ca55d15f793ce7283516db0155fe28a67923c592d'
|
'3385047b9ac8a7b13aeb8f0ca55d15f793ce7283516db0155fe28a67923c592d'
|
||||||
'd4537526c1e075866ae22ad263da000fc2a592d36c26b79a459a1cfdade2bb2d')
|
'd4537526c1e075866ae22ad263da000fc2a592d36c26b79a459a1cfdade2bb2d'
|
||||||
|
'2ca30beed3e67314dd44edfb2ada9a89301e4cb058b72e9d2704d130e5f57d1c')
|
||||||
validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security@cups.org>
|
validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security@cups.org>
|
||||||
validpgpkeys+=('45D083946E3035282B3CCA9AF434104235DA97EB') # "CUPS.org <security@cups.org>"
|
validpgpkeys+=('45D083946E3035282B3CCA9AF434104235DA97EB') # "CUPS.org <security@cups.org>"
|
||||||
validpgpkeys+=('845464660B686AAB36540B6F999559A027815955') # "Michael R Sweet <michael.r.sweet@gmail.com>"
|
validpgpkeys+=('845464660B686AAB36540B6F999559A027815955') # "Michael R Sweet <michael.r.sweet@gmail.com>"
|
||||||
|
@ -69,6 +73,9 @@ prepare() {
|
||||||
# FS#56818 - https://github.com/apple/cups/issues/5236
|
# FS#56818 - https://github.com/apple/cups/issues/5236
|
||||||
patch -Np1 -i "${srcdir}"/guid.patch
|
patch -Np1 -i "${srcdir}"/guid.patch
|
||||||
|
|
||||||
|
# FS#70382 - https://github.com/OpenPrinting/cups/pull/160
|
||||||
|
patch -Np1 -i "${srcdir}"/increase_timeout.patch
|
||||||
|
|
||||||
# Rebuild configure script for not zipping man-pages.
|
# Rebuild configure script for not zipping man-pages.
|
||||||
aclocal -I config-scripts
|
aclocal -I config-scripts
|
||||||
autoconf -I config-scripts
|
autoconf -I config-scripts
|
||||||
|
|
50
extra/cups/increase_timeout.patch
Normal file
50
extra/cups/increase_timeout.patch
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
From 1e495c5e8b14d55b9773f864bdf600f5c8ab5317 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||||
|
Date: Wed, 24 Mar 2021 13:22:11 +0100
|
||||||
|
Subject: [PATCH] Some older USB devices (Samsung ML series) are not capable of
|
||||||
|
sending
|
||||||
|
|
||||||
|
USB bulks within reading timeout (250ms) when `usb` backend is reading
|
||||||
|
data from back-channel. The transaction ends with timeout, the whole
|
||||||
|
job ends garbled and the device prints out 'INTERNAL ERROR - Incomplete
|
||||||
|
Session by time out'.
|
||||||
|
|
||||||
|
This behavior is a regression introduced by commit db53b49265ba, which
|
||||||
|
simplified the read loop, but put a 250ms timeout instead of the
|
||||||
|
original 60s in `libusb_bulk_transfer()`.
|
||||||
|
|
||||||
|
The timeout used in this PR is tested by two Fedora users
|
||||||
|
([Samsung ML-2240](https://bugzilla.redhat.com/show_bug.cgi?id=1942326),
|
||||||
|
[Samsung ML-1665](https://bugzilla.redhat.com/show_bug.cgi?id=1935318))
|
||||||
|
and works for them.
|
||||||
|
---
|
||||||
|
backend/usb-libusb.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
|
||||||
|
index d6b0eb423..06e420fbd 100644
|
||||||
|
--- a/backend/usb-libusb.c
|
||||||
|
+++ b/backend/usb-libusb.c
|
||||||
|
@@ -1704,7 +1704,7 @@ static void *read_thread(void *reference)
|
||||||
|
readstatus = libusb_bulk_transfer(g.printer->handle,
|
||||||
|
g.printer->read_endp,
|
||||||
|
readbuffer, rbytes,
|
||||||
|
- &rbytes, 250);
|
||||||
|
+ &rbytes, 2000);
|
||||||
|
if (readstatus == LIBUSB_SUCCESS && rbytes > 0)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n", (int)rbytes);
|
||||||
|
@@ -1718,11 +1718,11 @@ static void *read_thread(void *reference)
|
||||||
|
fputs("DEBUG: Got USB return aborted during read.\n", stderr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * Make sure this loop executes no more than once every 250 miliseconds...
|
||||||
|
+ * Make sure this loop executes no more than once every 2 seconds...
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ((g.wait_eof || !g.read_thread_stop))
|
||||||
|
- usleep(250000);
|
||||||
|
+ sleep(2);
|
||||||
|
}
|
||||||
|
while (g.wait_eof || !g.read_thread_stop);
|
||||||
|
|
Loading…
Reference in a new issue