From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QBxQEmLH7WakeAEAqHPOHw:P1 (envelope-from ) for ; Fri, 20 Sep 2024 19:05:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id QBxQEmLH7WakeAEAqHPOHw (envelope-from ) for ; Fri, 20 Sep 2024 21:05:06 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=WgSOalmJ; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qth+QP+U; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726859106; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yXif4oJN4C9gmdO7NVR4+1e321i6416lEyimYyLmlpM=; b=cnjNwe5cVyQNkcX4l8bepN4TLtegOF+4XWsxD4tSrlW6Cys3gpK+ij7zW/KCS6HflFvEmf Klhw8kwcb7nebBaeA0b7/BNbiUQG3IRkc1zq6ZBUzkwDD2nnUPLrNhtrR+a3kV8C43mCnI c+8YNkfg+pgNXjOVbP/YhkZ2FrDvWarnKSYKdnFdz2IgxadeNfZjPwNo9Sj8Pba1pfkitv MGKkDj9iZ0LJ+oL/QNEM5Uia0qMJ4FKmubfi9SojxTJrZRbJBX9k9RlZFg+JtAev1QAPwW pbcvjfRQh7klaEG7iPto4Uq1M1jlOmDppr5DdSAsXmxcTbhzLU/PYFoWaLHUcg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726859106; a=rsa-sha256; cv=none; b=mDSZnWm3SiHzQgUOTSOVGalzaFadwnkI2jhMofbO1/fYUXBfc0N8byJnnJdc3D9bzqDJx/ LatVDxNWVWp4AFpplvgPCwqjIAaboKVawvw3/wsoGo6EL1abgAfC1uM6GWuXxcGUN+R1x9 /Gu57DIZ79jVjhERMCrdK5i1sJSAKBVD3xAFufir6zTFQHDC4sbjFnrMzHMkx9/UZdg9bo x/U0DHRb7BzBdrFXCGYtyRWWRt1ibH7nXiuj3okNgKOcoNgDNgh91ONwcIYBsUutukovq6 XJe0bPw5k80fb3t/YFNtLH5MKA9XPaoyle7OR51Z7aaeLQtnC9CX91xoATHH4w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=WgSOalmJ; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qth+QP+U; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 292A86A7F4 for ; Fri, 20 Sep 2024 21:05:06 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) 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 ) 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 ) 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 ) 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 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 19:05:02 +0000 Resent-Message-ID: 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 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 ) 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 ) 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 ) 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 ) 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 Date: Fri, 20 Sep 2024 21:03:31 +0200 Message-ID: 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.51 X-Spam-Score: -5.51 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 292A86A7F4 X-TUID: tBrHu0vIS7Md From: Adrien 'neox' Bourmault 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, "/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 -- 2.46.0