Subject: pkg/18327: [sysutils/findutils] relocation problem
To: None <gnats-bugs@gnats.netbsd.org>
From: None <manuel.vacelet@st.com>
List: netbsd-bugs
Date: 09/18/2002 02:02:38
>Number:         18327
>Category:       pkg
>Synopsis:       [sysutils/findutils] relocation problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 18 02:03:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Manuel VACELET
>Release:        zoularis
>Organization:
STMicroelectronics
>Environment:
SunOS crx1103 5.7 Generic_106541-19 sun4u sparc SUNW,Ultra-5_10
>Description:
During the findutils install step the makefile try to write some files in /var. But there files should be put in the prefix directory, as all the other files of the package.
>How-To-Repeat:
the problem comes from the patch-aa :
+localstatedir = /var/run
and
+LOCATE_DB = /var/db/locate.database

>Fix:
new patch-aa:
--- locate/Makefile.in.orig	Sat Nov  5 15:44:08 1994
+++ locate/Makefile.in	Wed Sep 18 10:07:09 2002
@@ -29,7 +29,7 @@
 datadir = $(prefix)/share
 sysconfdir = $(prefix)/etc
 sharedstatedir = $(prefix)/com
-localstatedir = $(prefix)/var
+localstatedir = $(prefix)/var/run
 libdir = $(exec_prefix)/lib
 infodir = $(prefix)/info
 mandir = $(prefix)/man
@@ -38,6 +38,7 @@
 
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_DATA = @INSTALL_DATA@
 transform = @program_transform_name@
 
@@ -68,7 +69,7 @@
 DIST_FILES = $(DIST_CONF) $(SOURCES) $(TEXINFOS) $(INFOS) $(MANS) $(DIST_OTHER)
 
 # The default database to build and search.
-LOCATE_DB = $(localstatedir)/locatedb
+LOCATE_DB = $(prefix)/var/db/locate.database
 
 PROGRAMS = locate
 LIBPROGRAMS = frcode code bigram
@@ -96,8 +97,11 @@
 
 install-programs: $(PROGRAMS) $(SCRIPTS)
 	$(top_srcdir)/mkinstalldirs $(bindir)
-	for p in $(PROGRAMS) $(SCRIPTS); do \
+	for p in $(PROGRAMS); do \
 	  $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
+	done
+	for p in $(SCRIPTS); do \
+	  $(INSTALL_SCRIPT) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
 	done
 
 uninstall:: uninstall-programs

>Release-Note:
>Audit-Trail:
>Unformatted: