From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2MHQErre72YrVAAAqHPOHw:P1 (envelope-from ) for ; Sun, 22 Sep 2024 09:09:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2MHQErre72YrVAAAqHPOHw (envelope-from ) for ; Sun, 22 Sep 2024 11:09:14 +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=OUcIi20I; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=pEa6ziop; 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=1726996154; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=TDkffOLoFLNL8/m3nfO/sXsGH9iP37fRGnT18WrYRHc=; b=B8XRKVvNz8xcCMlz1q0oT6Pzg6gCsec3YM3AFmk/9l7zdQokJAU09xc4HOkVbJZXiTTitK NSP2R/22H2hL88yOxsY6drwh92PeqoGWCizPtbXLuP3SJ0Hc0Is+XbVOxzTFnBzBAM/oyf 4/IbXxbNOaDdNR8vkLMdyHc+a1DBqR9USm1MQ+qsJenxGVrxxo2r3xekt8Rvlf87DlaRny FfKqSLRslJMOW8DT+h4Zy0Iqcuwpl8vSj2MP1soSXwN7eG2WI0KWoaZWarllfSoJ8wOWnF QHVfZQk8TKJOjnMiFtdb/MVO7sooi4peHfXLCG4/1LxvucSNSDwKS5ugc412Bg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=OUcIi20I; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=pEa6ziop; 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=1726996154; a=rsa-sha256; cv=none; b=EVKuMZAFkg7CEAvr63N8rN4t+ebWJ/ac0+IqcAJZs5Kwm3iuAQaiq6wdKbFbVEFtnpl9B+ 8UrMsRTFpT1CQkst4VsO0KoTcra2efJrikP7HAyzJjcGoJB5LVAMnTHdZ/Bw+f6SHixVn/ Q3ZFpsWJR7MyK1vQxALhksJIA4Evay6gwWfzKXbTt3m3VQdISIksSsNmNuEJLGSO9B3YZP 581+XBZkOu1Ec4vp2DzBPRbhZaReh7j87HS9cYdpzSX8RUUEUdBcEXP6X5o+myyFp8gYJm 4LDq0qZ+nGPy2XXML4KRgtbX5Nilb9MrzHcwrUWBo8qUwQjdu/MqjfRZDFGh7A== 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 318C87E690 for ; Sun, 22 Sep 2024 11:09:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssIaC-0003Pu-No; Sun, 22 Sep 2024 05:08: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 1ssIa9-0003P4-2U for guix-patches@gnu.org; Sun, 22 Sep 2024 05:08:41 -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 1ssIa8-0002E3-I9 for guix-patches@gnu.org; Sun, 22 Sep 2024 05:08:40 -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:In-Reply-To:References:Subject; bh=TDkffOLoFLNL8/m3nfO/sXsGH9iP37fRGnT18WrYRHc=; b=OUcIi20INgZLdGtMnv3/bnHZiEpHT3zZl/v5VUTM0uOs1IG5joxN60PyOZmwHlFn2gBcyvM8P6O7rWLrufy1PdIW5UiUDaHstqMqcBVR5cA6/rHVWrCZ8gKspdd6PObkAnY+Z0yIXsfU+PZldnFtVCSchPXvo3mhvQ0g2c7clYVVbRE8iIlxsgC5V8zrNM6Yw3MFkHF1bVn1+VGy+ZdRGKtI4c+4s2TY1vMPTIROt5fUZWAcdeo0FO+53u9HdSlQKsJY5nphGyprs4codL6wjiDfxGrl7fX0hayUAPk7A0WIlfGrisAkbG9SJBaGO61ZCMK9ua75lk1LLacjHd5B9g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ssIaT-0005I1-Ra for guix-patches@gnu.org; Sun, 22 Sep 2024 05:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73393] [PATCH v2 0/2] SANE: fix a locking bug for plustek backend References: <3ad4ed8a692d86a9bef0b2ea56921ae2bf882957.1726827449.git.neox@gnu.org> In-Reply-To: <3ad4ed8a692d86a9bef0b2ea56921ae2bf882957.1726827449.git.neox@gnu.org> Resent-From: Adrien 'neox' Bourmault Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2024 09:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73393 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73393@debbugs.gnu.org Cc: Adrien 'neox' Bourmault Received: via spool by 73393-submit@debbugs.gnu.org id=B73393.172699612520283 (code B ref 73393); Sun, 22 Sep 2024 09:09:01 +0000 Received: (at 73393) by debbugs.gnu.org; 22 Sep 2024 09:08:45 +0000 Received: from localhost ([127.0.0.1]:40869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssIaD-0005H5-0W for submit@debbugs.gnu.org; Sun, 22 Sep 2024 05:08:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssIaA-0005Gn-V1 for 73393@debbugs.gnu.org; Sun, 22 Sep 2024 05:08:43 -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 1ssIZj-0002Bq-WF; Sun, 22 Sep 2024 05:08:16 -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=pEa6ziopKP4TXj OEKhekXLyDuF/2xcQcG50lObDy7b2mCUsymfdZm0Y7X8MGnvxn2HDYf9zOUMQngW4CEPZx/DJ3+QE VhcprKSNL9w5yrlA2sbuV6+h75dBaNCgqz0GphliXawuFSu/1uTvKyZUjQmAfTruGHuwM/yqSTvqP nhSq/rJRQg3PtOtp1TJtVjIUTv6cSb9FjJZgYswj75P3gka8It7gA6lQTKj1OsZwTW+ORTXlxiuTv sj/aovBZuXxU1hwJ+ByR7UFRU9RV4Y57Vxgt8yzVCg0OGu146RQWMGUlAycv4tNFksriDymAMvwb+ C/fe/pNQ5LfTXd1o1Z4A==; From: Adrien 'neox' Bourmault Date: Sun, 22 Sep 2024 11:07:56 +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-Spam-Score: -5.51 X-Spam-Score: -5.51 X-Migadu-Queue-Id: 318C87E690 X-Migadu-Scanner: mx10.migadu.com X-TUID: NVRLVDUrm+Hs Message-ID: <20240922090756.Vg_kOBSW4rsxEIhNt4Y93e6DH3yemuQ8tzXY99bv2Vo@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