GNU bug report logs - #73393
[PATCH v2 0/2] SANE: fix a locking bug for plustek backend

Previous Next

Package: guix-patches;

Reported by: neox <neox <at> gnu.org>

Date: Fri, 20 Sep 2024 19:05:04 UTC

Severity: normal

Tags: patch

Merged with 73391, 73392, 73406

Full log


View this message in rfc822 format

From: Adrien 'neox' Bourmault <neox <at> gnu.org>
To: 73393 <at> debbugs.gnu.org
Cc: Adrien 'neox' Bourmault <neox <at> gnu.org>
Subject: [bug#73393] [PATCH v2 1/2] gnu: sane-backends-minimal: fix lock path for plustek backend
Date: Sun, 22 Sep 2024 11:07:57 +0200
* gnu/packages/scanner.scm (sane-backends-minimal)
[arguments]<#:configure-flags>: add "--with-lockdir=/var/lock/sane"
[arguments]<#:phases>: add disable-lockdir-creation to prevent creating the
 lockpath during install

Change-Id: I338c16cd4c0bfa0d165c9906b0f1f87ab79a4f75
Signed-off-by: Adrien 'neox' Bourmault <neox <at> gnu.org>
---
 gnu/packages/scanner.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index a2faaa2728..a346f004ae 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2017, 2019, 2020, 2022 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2018 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2022 João Gabriel <joaog.bastos <at> protonmail.ch>
+;;; Copyright © 2024 Adrien Bourmault <neox <at> gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -136,7 +137,8 @@ (define-public sane-backends-minimal
     (inputs
      (list libusb))
     (arguments
-     `(#:phases
+     `(#:configure-flags '("--with-lockdir=/var/lock/sane") ;; Avoid errors with plustek
+       #:phases
        (modify-phases %standard-phases
          (add-before 'bootstrap 'zap-unnecessary-git-dependency
            (lambda _
@@ -145,6 +147,12 @@ (define-public sane-backends-minimal
                (("/bin/sh") (which "sh")))
              (with-output-to-file ".tarball-version"
                (lambda _ (format #t ,version)))))
+         (add-before 'configure 'disable-lockdir-creation
+           (lambda _
+             ;; Modify the Makefile.am to prevent the creation of the lock dir
+             (substitute* "backend/Makefile.am"
+               (("^install-lockpath:.*$")
+                "install-lockpath: # pass"))))
          (add-before 'configure 'disable-backends
            (lambda _
              (setenv "BACKENDS" " ")
-- 
2.46.0





This bug report was last modified 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.