From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 +Km2Lgbe7WY/dgEAqHPOHw:P1 (envelope-from ) for ; Fri, 20 Sep 2024 20:41:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id +Km2Lgbe7WY/dgEAqHPOHw (envelope-from ) for ; Fri, 20 Sep 2024 22:41:42 +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=bjoxzG92; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=MfjUL6M5; 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=1726864870; 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=4LWgZx1Noafn8UqfcXi1qKGOKUJF7oCOFV5ziWLLVHk=; b=LOVBT3gJPasqOQvGjbs7xQxl0bpEbzQzR45VNtNMEftM6nZoMx03pr/Dkjr59444MiiWa7 u1J7R+Qf6E2DydD1/YKL5UFeQWQW9OWTJ26aFkOtCAS6Q03k4sdf5fVKMPndOcygSHerPb 3yOwI8ah3hDEhyoonWYUFpk/PfnwZVfLKvKPQGu4XUxZbttZP+v+itXylP7CXbwvNXAsmD qlcpv9DHutfy2AS8XdGuEwO1hrG7AeopUrmgTMEXMiRb9JA6MFTJbQCJ9sfIahCg9YrH3s UOrEewwq09Jm/b2SKDePm/GVtcXEHT4hQreAwrzO5zhejI5k3maIHkX0uYkzrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=bjoxzG92; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=MfjUL6M5; 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=1726864870; a=rsa-sha256; cv=none; b=qTuv80rW8uuO7cq8550khBQg+i4afk89n6RrJn45hRaH5LgIsSTQftbhVHt/GXu5dqWA6V cAPuhGT7TOqdvXo/Ox9kvZ4kNuX+mWVp5oKAlBDyV+twS37Vvv0l5RLuowpsRa9ZSDZ9Nw swZi3TMGbW2cQZAuCNxsMGfgNTzek1FuWTcvdHdt3HAGTqQjvnzCJ3Fg2T8VCMWN1YM6wA 54Mgs3HTiGKME0UFHgKNA50g9nQfKGPNqUTa00uilCknvpF0jhpjEaw/jiaIwO/AGTaJz7 w+gTByrLkwlZJ/v6BJyqYRG+arRAiDmLbfgMjrVKYdw3QUizeRJJiiYxLYSFxw== 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 83B767F6FA for ; Fri, 20 Sep 2024 22:41:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srkQo-0007IX-3I; Fri, 20 Sep 2024 16:40:46 -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 1srkQl-0007HC-B5 for guix-patches@gnu.org; Fri, 20 Sep 2024 16:40: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 1srkQl-0005yn-1x for guix-patches@gnu.org; Fri, 20 Sep 2024 16:40: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:In-Reply-To:References:Subject; bh=4LWgZx1Noafn8UqfcXi1qKGOKUJF7oCOFV5ziWLLVHk=; b=bjoxzG92tLptelSPcjxz0KZButOeLkDaAmYzpJJrL78RveQtW2bzzV3vWSTX9gDRX7jpgb1a9o5uOnUyU7rpHUWaWFqXHcqTXmgj8cSfEJBjk6ac6pVN7zW952ibEGWJc/YQvc5Im8qnuAWSMzwvZQkbXNMbndJZVaG9eFMeuV7ObaKHKbmMcmIDPaKw5rHLiVFC60Vd5zj0+APg2KOsCykxixW/XbuGQqc7qGi2LrvkoZUFd247ehx6Ji+9zZUJsbEBxPiRy4+M11GMRYlLMtLHCzu4LE0nI52XjHHQonzdmh87uGBsCAVJMc5UBoLN0o7NZgbh3XA4TEzNhSBvrA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srkR3-0002t1-QS for guix-patches@gnu.org; Fri, 20 Sep 2024 16:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73391] [PATCH v2 0/2] SANE: fix a locking bug for plustek backend References: In-Reply-To: Resent-From: neox Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 20:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73391 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73391@debbugs.gnu.org Cc: Adrien 'neox' Bourmault Received: via spool by 73391-submit@debbugs.gnu.org id=B73391.172686484311034 (code B ref 73391); Fri, 20 Sep 2024 20:41:01 +0000 Received: (at 73391) by debbugs.gnu.org; 20 Sep 2024 20:40:43 +0000 Received: from localhost ([127.0.0.1]:36427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srkQl-0002ru-C9 for submit@debbugs.gnu.org; Fri, 20 Sep 2024 16:40:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srkQj-0002rf-Kr for 73391@debbugs.gnu.org; Fri, 20 Sep 2024 16:40:42 -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 1srkQJ-0005x6-9o; Fri, 20 Sep 2024 16:40:15 -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=4LWgZx1Noafn8UqfcXi1qKGOKUJF7oCOFV5ziWLLVHk=; b=MfjUL6M5ULXr/G hDJaQFG9OpLNVCCNoI2E7KVHmFLxPBLoE0w2iyQe2qML7BKkTubF4k8jtpll4AWPKBVMZOTGbxf0a WaFLfJx+d63YFLD4z+DGs+lekMKO7HnVtvYP8aAdf1v9i98myoGaWr6NKzdTBEnjscqYbyPJ8qZC9 dAfsku+o+EmCNOuIzROvNLWNWgkqZ6bLAPLM2+en3KAxew4yKFCO4uFPrmQH5Vn+oJxyJi240TLZQ oNt9RPcoXjT7MLQ7JEJGHkXuQAfk0UJGvFu+6ToIxFwImFkTSNyprYt2mqnZ88vgpwDquxx65NyMt Jrls49/HuiAn7CYvIl1Q==; From: neox Date: Fri, 20 Sep 2024 22:39:28 +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: 83B767F6FA X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -7.61 X-Migadu-Spam-Score: -7.61 X-TUID: kIVwKSdk1jVQ From: Adrien 'neox' Bourmault Hi, I just realized I forgot to add my copyright notice in the files I modified. This v2 fixes this. 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 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 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