From patchwork Tue Oct 17 16:25:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54937 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9D2A027BBEA; Tue, 17 Oct 2023 17:28:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BEA5927BBE2 for ; Tue, 17 Oct 2023 17:28:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsmux-0002Fd-66; Tue, 17 Oct 2023 12:27:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsmuu-0002FH-Vl for guix-patches@gnu.org; Tue, 17 Oct 2023 12:27:36 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsmuu-0002fa-OB for guix-patches@gnu.org; Tue, 17 Oct 2023 12:27:36 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsmvJ-0006dX-Py for guix-patches@gnu.org; Tue, 17 Oct 2023 12:28:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66594] [PATCH] gnu: hplip: Fix USB timeouts. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 17 Oct 2023 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66594 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66594@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169756004925472 (code B ref -1); Tue, 17 Oct 2023 16:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Oct 2023 16:27:29 +0000 Received: from localhost ([127.0.0.1]:60894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsmun-0006cm-4P for submit@debbugs.gnu.org; Tue, 17 Oct 2023 12:27:29 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsmuj-0006cW-5b for submit@debbugs.gnu.org; Tue, 17 Oct 2023 12:27:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsmu9-00022P-RP for guix-patches@gnu.org; Tue, 17 Oct 2023 12:26:49 -0400 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsmu7-0002ZI-WA for guix-patches@gnu.org; Tue, 17 Oct 2023 12:26:49 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id B9EB9206B4 for ; Tue, 17 Oct 2023 18:26:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 16CD6800A0; Tue, 17 Oct 2023 18:26:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XSVvAqymkN-f; Tue, 17 Oct 2023 18:26:19 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7CE8C8009F; Tue, 17 Oct 2023 18:26:19 +0200 (CEST) From: Bruno Victal Date: Tue, 17 Oct 2023 17:25:48 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=185.26.107.241; envelope-from=mirai@makinata.eu; helo=smtpmciv5.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/hplip-usb-timeout.patch: New file. * gnu/local.mk: Register it. * gnu/packages/cups.scm (hplip): Use it. --- gnu/local.mk | 1 + gnu/packages/cups.scm | 1 + gnu/packages/patches/hplip-usb-timeout.patch | 24 ++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 gnu/packages/patches/hplip-usb-timeout.patch base-commit: 7823c6504082a0cfbd98beb301e041fb8bc4e44e diff --git a/gnu/local.mk b/gnu/local.mk index daacd786a7..97634d5210 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1401,6 +1401,7 @@ dist_patch_DATA = \ %D%/packages/patches/heimdal-CVE-2022-45142.patch \ %D%/packages/patches/helm-fix-gcc-9-build.patch \ %D%/packages/patches/highlight-gui-data-dir.patch \ + %D%/packages/patches/hplip-usb-timeout.patch \ %D%/packages/patches/http-parser-CVE-2020-8287.patch \ %D%/packages/patches/htslib-for-stringtie.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 647b89dc03..fc3ff52cbe 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -522,6 +522,7 @@ (define-public hplip (sha256 (base32 "0ihv9ddjrjx5bdf8pwc2fvljkpfzq4qi9r2awm8dgky053v0bk7p")) + (patches (search-patches "hplip-usb-timeout.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/hplip-usb-timeout.patch b/gnu/packages/patches/hplip-usb-timeout.patch new file mode 100644 index 0000000000..b98ed1cc78 --- /dev/null +++ b/gnu/packages/patches/hplip-usb-timeout.patch @@ -0,0 +1,24 @@ +# Source: + +--- a/config_usb_printer.py ++++ b/config_usb_printer.py +@@ -28,6 +28,7 @@ + # Std Lib + import sys + import os ++import time + + # Local + from base.g import * +@@ -181,9 +182,10 @@ + # ******************************* RUNNING FIRMWARE DOWNLOAD TO DEVICE FOR SUPPORTED PRINTER'S + fw_download_req = mq.get('fw-download', False) + if fw_download_req: +- fw_cmd = "hp-firmware -y3 -s %s"%param ++ fw_cmd = "hp-firmware -n -y3 -s %s"%param + log.info(fw_cmd) + fw_sts, fw_out = utils.run(fw_cmd) ++ time.sleep(5) + if fw_sts == 0: + log.debug("Firmware downloaded to %s "%device_uri) + else: