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.
This commit is contained in:
Ludovic Courtès 2015-06-04 12:49:43 +02:00
parent 696062b1f0
commit 67dfa1986d
3 changed files with 27 additions and 6 deletions

View File

@ -416,6 +416,7 @@ dist_patch_DATA = \
gnu/packages/patches/emacs-exec-path.patch \ gnu/packages/patches/emacs-exec-path.patch \
gnu/packages/patches/eudev-rules-directory.patch \ gnu/packages/patches/eudev-rules-directory.patch \
gnu/packages/patches/findutils-absolute-paths.patch \ gnu/packages/patches/findutils-absolute-paths.patch \
gnu/packages/patches/findutils-localstatedir.patch \
gnu/packages/patches/flashrom-use-libftdi1.patch \ gnu/packages/patches/flashrom-use-libftdi1.patch \
gnu/packages/patches/flex-bison-tests.patch \ gnu/packages/patches/flex-bison-tests.patch \
gnu/packages/patches/gawk-shell.patch \ gnu/packages/patches/gawk-shell.patch \

View File

@ -206,14 +206,20 @@ interactive means to merge two files.")
(sha256 (sha256
(base32 (base32
"0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3")) "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) (build-system gnu-build-system)
(arguments (arguments
;; Work around cross-compilation failure. `(#:configure-flags (list
;; See <http://savannah.gnu.org/bugs/?27299#comment1>. ;; Tell 'updatedb' to write to /var.
(if (%current-target-system) "--localstatedir=/var"
'(#:configure-flags '("gl_cv_func_wcwidth_works=yes"))
'())) ;; 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") (synopsis "Operating on files matching given criteria")
(description (description
"Findutils supplies the basic file directory searching utilities of the "Findutils supplies the basic file directory searching utilities of the

View File

@ -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)' > $@