diff mbox series

[bug#73392,1/2] gnu: sane-backends-minimal: fix lock path for plustek backend

Message ID 5c51a9beba46c7f611fe90cc824f0fcbf2505600.1726827449.git.neox@gnu.org
State New
Headers show
Series SANE: fix a locking bug for plustek backend | expand

Commit Message

Adrien 'neox' Bourmault Sept. 20, 2024, 7:03 p.m. UTC
From: Adrien 'neox' Bourmault <neox@gnu.org>

* 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@gnu.org>
---
 gnu/packages/scanner.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Adrien 'neox' Bourmault Sept. 20, 2024, 7:21 p.m. UTC | #1
Hi, please close as this is a duplicate of #73391 due to a
misconfiguration on my part. Thanks a lot and sorry about this.
diff mbox series

Patch

diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index a2faaa2728..a20d27ad2a 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -136,7 +136,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 +146,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" " ")