From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +HMODb197mZxJwEAe85BDQ:P1 (envelope-from ) for ; Sat, 21 Sep 2024 08:03:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id +HMODb197mZxJwEAe85BDQ (envelope-from ) for ; Sat, 21 Sep 2024 10:03:09 +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=Pk7XeOWe; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=DkF8gq+I; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726905788; 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=TDkffOLoFLNL8/m3nfO/sXsGH9iP37fRGnT18WrYRHc=; b=XG5YFFnDojZfhVJFOCP1k3tiLfKplorH4zvHbU+6qAGOsI391mRvb9uHHyiXMpnFuNqD9j ojLmTNlAkf8YSd52/+ccgwJzojciQHDmmZ5ghiwOtBhA3bHrKaEDVTLQeu7rJoKwx5fIZT UcYw/sc2QQL85eWeS4r1Kfon2T9VrZWe3uP6mZDPENrNKcBtZPzI4uulIgOO44/DcVtXkb Db7ocW/HEgvxIBCnXzJ2faTPmm0UabEgz0QOWv9GFwONuHNRyHp1Gt8GtWH9btqgLZ2Qvw ytk2IkHGfYOyc7RV5XiE+IvEFOjcqPL9Q68Y9yyIFYdV6PIPVOr2rg9BN7bGMw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Pk7XeOWe; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=DkF8gq+I; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726905788; a=rsa-sha256; cv=none; b=qBki/ofCppcNabOIM8/3Jx0i8IFPa4Zmsh1F3w+WQnA6yK0435WfNfVxAaGp9MrHuBNk1/ SNUtr5F+gMz/brleUc4cOvIAUWGYaXZyYHnJiFn9/w8zJ1H8E0+Wr0Hrk94yQ1P5bewRpO RKQckcEWpE5Q9GCZT38a/48u+Cm9mskmkooeSz00q4F0dBvdo6rANqycpRUgC27KhsY81/ F5El57IQjVMmTD46cowg3v8+Y4YQJUZgANziWuyCW3pxgDIgEKymtqxKaeNEBpEyZDv7Pm +bFz6FhsatlhbFnRQoDBNgDy1zEUV1GENu5KyKCfKCyeDf7vahBc8Fq6iWpNBQ== 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 C3B325B88 for ; Sat, 21 Sep 2024 10:03:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srv4m-0001st-3f; Sat, 21 Sep 2024 04:02:44 -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 1srv4l-0001se-B5 for guix-patches@gnu.org; Sat, 21 Sep 2024 04:02: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 1srv4l-0007UD-2R for guix-patches@gnu.org; Sat, 21 Sep 2024 04:02: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=TDkffOLoFLNL8/m3nfO/sXsGH9iP37fRGnT18WrYRHc=; b=Pk7XeOWeBRDcKCjdXFk+3PJHPZKXnh/KAwk9T20yTkesC1+oxrJiixi/YOwd8dYgHsLNzROGcHE0y5DUtmiDba8beDcgYNF4mlickXkM899mzUAuGWY3rB90R8u3io4aqCRfz/hxuVz2BrKCvLvD7y6V2/zSsxl1uXTT309SqkEHQOXYUDJEUSq7Xkn9nhC6HZgb4HZzNf1XMvbE8TLKLeg07w7d54cK+yfLzds5S5jfwXLnopP7pg288Lt3/CQcbhprTwO/vd75gTHWK/WSe+0tkqrbaXnOnKqdLBuxJy1p1y2ptPlcPt46WMnpNrTQVWwCAjnEE7L6q0phFTuwRg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srv54-0006Sq-IQ for guix-patches@gnu.org; Sat, 21 Sep 2024 04:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73406] [PATCH v2 0/2] SANE: fix a locking bug for plustek backend Resent-From: Adrien 'neox' Bourmault Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 21 Sep 2024 08:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73406 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73406@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.172690572824725 (code B ref -1); Sat, 21 Sep 2024 08:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Sep 2024 08:02:08 +0000 Received: from localhost ([127.0.0.1]:36987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srv4B-0006Qh-E2 for submit@debbugs.gnu.org; Sat, 21 Sep 2024 04:02:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:42126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srv49-0006QX-Gp for submit@debbugs.gnu.org; Sat, 21 Sep 2024 04:02:06 -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 1srv3p-0001nI-Ae for guix-patches@gnu.org; Sat, 21 Sep 2024 04:01:45 -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 1srv3n-0007Qf-QF; Sat, 21 Sep 2024 04:01:43 -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=TDkffOLoFLNL8/m3nfO/sXsGH9iP37fRGnT18WrYRHc=; b=DkF8gq+IoZ2WeX 0QWDRoT5E4wM/6aG91fpTB3N8Bs9i/AN7v5C14XC7YjzNbs8m3BmOTMa+7AVAdeO2Zty9S4QktADN hqYX0C4OXS2TqJWrFwKNbTUJBXlsMyL4RU0wDYfe8qzAlv3luEvs/nRay3tuaTQMdhgjEulSWbIO/ ZN0zLbZdFB7RXHn82joWig1z8iM1ZGTh+6x0CM+mWXvmLWSs49b6QlVqMIYELwUdYoE2gW4Hqogew KSo2u+m+U2qkLZIyE/MJKAZBmtZEPlw0kFqted9qI1TPCGtw8vSYJRDnWVVvs+PsiQQNk/MYgx5PQ 1h4WoVTWlTff27cAN4Cw==; From: Adrien 'neox' Bourmault Date: Sat, 21 Sep 2024 10:01: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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: C3B325B88 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -5.31 X-Migadu-Spam-Score: -5.31 X-TUID: +/3S+DAShLm+ Message-ID: <20240921080131.ngqkYrpRAxb7taaAFSyZRO3wdwqgxyDw_H-qjKFHDIQ@z> 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-backend> [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. I realized I forgot to add my copyright notice in the files I modified. This v2 fixes this. [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 | 10 +++++++++- gnu/services/desktop.scm | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) base-commit: 1b6ce1796abdf497f61f426d61339318f4f4f23d -- 2.46.0