guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/08: gnu: findutils: Use /var as the localstatedir, for 'updatedb'.


From: Ludovic Courtès
Subject: 05/08: gnu: findutils: Use /var as the localstatedir, for 'updatedb'.
Date: Thu, 04 Jun 2015 16:08:40 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit 67dfa1986d7e8af9a42ffa7c9d2b40599857cf19
Author: Ludovic Courtès <address@hidden>
Date:   Thu Jun 4 12:49:43 2015 +0200

    gnu: findutils: Use /var as the localstatedir, for 'updatedb'.
    
    * gnu/packages/patches/findutils-localstatedir.patch: New file.
    * gnu-system.am (dist_patch_DATA): Add it.
    * gnu/packages/base.scm (findutils)[source]: Use it.
      [arguments]: Pass --localstatedir=/var.
---
 gnu-system.am                                      |    1 +
 gnu/packages/base.scm                              |   18 ++++++++++++------
 gnu/packages/patches/findutils-localstatedir.patch |   14 ++++++++++++++
 3 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 2641b9a..6b2b1c7 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -416,6 +416,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/emacs-exec-path.patch                   \
   gnu/packages/patches/eudev-rules-directory.patch             \
   gnu/packages/patches/findutils-absolute-paths.patch          \
+  gnu/packages/patches/findutils-localstatedir.patch           \
   gnu/packages/patches/flashrom-use-libftdi1.patch             \
   gnu/packages/patches/flex-bison-tests.patch                  \
   gnu/packages/patches/gawk-shell.patch                                \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 0a27093..e59abd0 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -206,14 +206,20 @@ interactive means to merge two files.")
             (sha256
              (base32
               "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3"))
-            (patches (list (search-patch "findutils-absolute-paths.patch")))))
+            (patches (map search-patch
+                          '("findutils-absolute-paths.patch"
+                            "findutils-localstatedir.patch")))))
    (build-system gnu-build-system)
    (arguments
-    ;; Work around cross-compilation failure.
-    ;; See <http://savannah.gnu.org/bugs/?27299#comment1>.
-    (if (%current-target-system)
-        '(#:configure-flags '("gl_cv_func_wcwidth_works=yes"))
-        '()))
+    `(#:configure-flags (list
+                         ;; Tell 'updatedb' to write to /var.
+                         "--localstatedir=/var"
+
+                         ;; Work around cross-compilation failure.  See
+                         ;; <http://savannah.gnu.org/bugs/?27299#comment1>.
+                         ,@(if (%current-target-system)
+                               '("gl_cv_func_wcwidth_works=yes")
+                               '()))))
    (synopsis "Operating on files matching given criteria")
    (description
     "Findutils supplies the basic file directory searching utilities of the
diff --git a/gnu/packages/patches/findutils-localstatedir.patch 
b/gnu/packages/patches/findutils-localstatedir.patch
new file mode 100644
index 0000000..c774303
--- /dev/null
+++ b/gnu/packages/patches/findutils-localstatedir.patch
@@ -0,0 +1,14 @@
+Do not try to create $localstatedir (aka. /var) since we don't have
+write access.
+
+--- findutils-4.4.2/locate/Makefile.in 2015-06-04 12:40:52.690935795 +0200
++++ findutils-4.4.2/locate/Makefile.in 2015-06-04 12:41:32.087286685 +0200
+@@ -1212,7 +1212,7 @@ updatedb: updatedb.sh Makefile
+       chmod +x $@
+ 
+ install-data-hook:
+-      $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
++      true
+ 
+ dblocation.texi: Makefile
+       echo '@set LOCATE_DB $(LOCATE_DB)' > $@



reply via email to

[Prev in Thread] Current Thread [Next in Thread]