[PATCH] gnu: Fix plocate package

DoneSubmitted by ykonai.
Details
2 participants
  • Ludovic Courtès
  • ykonai
Owner
unassigned
Severity
normal
Y
Y
ykonai wrote on 1 Apr 23:32 +0200
(address . guix-patches@gnu.org)
20220401213204.29639-1-mail@ykonai.net
* gnu/packages/search.scm (plocate): Change build options.
---
Current plocate package sets the --sharedstatedir to a store directory, which
causes updatedb and plocate to fail by default since the store is immutable.
This will set the default database path to /var/cache/plocate.db instead.

gnu/packages/search.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm
index 6f8d673694..87f29c5424 100644
--- a/gnu/packages/search.scm
+++ b/gnu/packages/search.scm
@@ -487,8 +487,17 @@ (define-public plocate
     (arguments
      `(#:configure-flags
        (list
-        (string-append
-         "--sharedstatedir=" (assoc-ref %outputs "out") "/var"))))
+        ;; Put the database in /var/cache/plocate.db
+        "--sharedstatedir=/var"
+        "-Dinstall_systemd=false"
+        "-Ddbpath=cache/plocate.db")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-cachedirtag
+           (lambda _
+             (substitute* "meson.build"
+               ;; Remove the script adding a "cachedirtag"
+               (("meson.add_install_script") "#")))))))
     (inputs
      (list liburing
            `(,zstd "lib")))

base-commit: a27cef76c29ba6ef0d7c203783b758ea2d5331d7
-- 
2.34.0
L
L
Ludovic Courtès wrote on 5 Apr 20:32 +0200
(name . ykonai)(address . mail@ykonai.net)(address . 54676-done@debbugs.gnu.org)
87zgkzidoi.fsf@gnu.org
Hi,

ykonai <mail@ykonai.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/search.scm (plocate): Change build options.

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 54676@debbugs.gnu.org