Message ID | cover.1726827449.git.neox@gnu.org |
---|---|
Headers | show
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3D9E827BBEA; Fri, 20 Sep 2024 20:05:06 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,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 E6C1727BBE2 for <patchwork@mira.cbaines.net>; Fri, 20 Sep 2024 20:05:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1srivt-0003iQ-9L; Fri, 20 Sep 2024 15:04:45 -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 <Debian-debbugs@debbugs.gnu.org>) id 1srivr-0003hv-Q7 for guix-patches@gnu.org; Fri, 20 Sep 2024 15:04:43 -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 <Debian-debbugs@debbugs.gnu.org>) id 1srivr-0001lr-HD for guix-patches@gnu.org; Fri, 20 Sep 2024 15:04:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=yXif4oJN4C9gmdO7NVR4+1e321i6416lEyimYyLmlpM=; b=WgSOalmJFMiXiLQz0/5rb2yPEEbngxwEsHxzkVt3CJX2uQAlxL9PNRdon2o+29lEK1qJ/TjOArwPEXtr9x2cdkNf5LImhkrAoAd57mdXNR52KIS7G1l2U+4ny6A102nBAeS8EOJoJVeNiaHTG1yzgnEm+e96UscEt0IlNAgP0OI7ueGZ/ugwNvDgIQMj5K49CaQUVTql9NBZWdXUT59T5CseiLXz3HDtzppMYan7VDbSflytU6iVmwmfOg9EgzevjMheYfj747idBUkDeR8YHoXhh4V26EHZdLxAywaYJmtvhNsyx+wdtaZMwY7OpU+VUc0H3jNzWoKNDUjVek34Ww==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1sriwA-0005vE-Ii for guix-patches@gnu.org; Fri, 20 Sep 2024 15:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73391] [PATCH 0/2] SANE: fix a locking bug for plustek backend Resent-From: neox <neox@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 19:05:02 +0000 Resent-Message-ID: <handler.73391.B.172685906322662@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73391 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73391@debbugs.gnu.org Cc: Adrien 'neox' Bourmault <neox@gnu.org> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172685906322662 (code B ref -1); Fri, 20 Sep 2024 19:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Sep 2024 19:04:23 +0000 Received: from localhost ([127.0.0.1]:36356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1srivW-0005tS-Op for submit@debbugs.gnu.org; Fri, 20 Sep 2024 15:04:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:45228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <neox@gnu.org>) id 1srivU-0005tK-Vz for submit@debbugs.gnu.org; Fri, 20 Sep 2024 15:04:21 -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 <neox@gnu.org>) id 1srivB-0003f9-GX for guix-patches@gnu.org; Fri, 20 Sep 2024 15:04:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <neox@gnu.org>) id 1sriv9-0001jp-1H; Fri, 20 Sep 2024 15:03:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=yXif4oJN4C9gmdO7NVR4+1e321i6416lEyimYyLmlpM=; b=qth+QP+UZblQ5S lfCXuEarFl0tRBXjrkKqpQkhMgOQTPgnvvZA0GBNvo0Q1XtUs5sRkBIMpUhH3ClidbNzO9icle6lf XjZlCJxtpSd18IB6fDCFIJK4LyBvNQ2wOc/s3RMAFns/OyYLv9xkXuEQ5JdRxLdBkuntNvbTrCMKx ybh2ro4IM1eFcU2ieE3e96WLz3U2F0p3HqS8H9NMmUeV3eg2DOM+BTDvZb0cyPaPEY2h1ISIsLuph VNqUvjjF23Lg0pVv6mgxLJhSG2K9g8sM1tySUr581n+XikWuX7oIoHMcgfFaJRbLRCOEWdreaKm8Y G7Bfek1tHK2wFacGP+4g==; From: neox <neox@gnu.org> Date: Fri, 20 Sep 2024 21:03:31 +0200 Message-ID: <cover.1726827449.git.neox@gnu.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=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 |
Series |
SANE: fix a locking bug for plustek backend
|
expand
|
From: Adrien 'neox' Bourmault <neox@gnu.org> Hi. While attempting to use a Canon LiDE 30 scanner, which is supported by SANE in its current version, I noticed a malfunction with the plustek backend. No application seemed capable of detecting the scanner, even though the `sane-find-scanner` command indicated its presence, and the device IDs matched those in the plustek backend configuration. I investigated further using the following command: SANE_DEBUG_SANEI_USB=128 SANE_DEBUG_PLUSTEK=255 strace -fye open,openat scanimage -L Here is a summary of the output: [23:00:21.688008] [plustek] usbDev_open(auto,) - 0x1c1e5630 [pid 1209-20241] openat(AT_FDCWD</home/neox>, "/gnu/store/gzc1m4n79d1fgby8l58dsaq7nrzyhc14-sane-backends-1.3.1/var/lock/LCK..libusb:001:009", O_WRONLY|O_CREAT|O_EXCL, 0644) = -1 EROFS (Read-only file system) [23:00:21.688089] [plustek] sanei_access_lock failed: 11 [23:00:21.688131] [plustek] open failed: -1 It seems that the issue is the attempt to open a lock file in the store, which is not possible due to the read-only nature of the file system. To address this, there were two possible approaches: either move the lock file to another location or disable the locking mechanism altogether. After some research, I found that this bug has been resolved in both Debian [1] and nixOS [2], and it has also been reported to the upstream project [3]. Debian opted to disable the locking mechanism, while nixOS moved the lock file to a runtime-generated location using systemd (by patching the install phase to prevent the creation of the lock directory). However, since the locking mechanism allows the use of multiple devices simultaneously[4], which can be useful, nixOS's solution appears to be the better approach. I followed this method, proposing to create the lock directory during the activation of the sane service. I tested these patch with my Canon LiDE 30 and have been able to (finally) scan with it. [1] Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973490 [2] nixOS bug report: https://github.com/NixOS/nixpkgs/issues/273280 [3] Upstream issue: https://gitlab.com/sane-project/backends/-/issues/363 [4] https://gitlab.com/sane-project/backends/-/issues/363#note_443142177 Adrien 'neox' Bourmault (2): gnu: sane-backends-minimal: fix lock path for plustek backend services: sane-service-type: create lock path for plustek backend gnu/packages/scanner.scm | 9 ++++++++- gnu/services/desktop.scm | 13 +++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) base-commit: 1b6ce1796abdf497f61f426d61339318f4f4f23d