[GRASS5] GRASS: make install problems

Glynn Clements glynn.clements at virgin.net
Wed Jan 9 14:15:37 EST 2002


Glynn Clements wrote:

> > a user reported that, when installing GRASS with 
> > make install
> > some permissions are wrong.
> > 
> > He compilied as "root" and installed (make install). 
> > The permissions for
> > /opt/grass5/tcltkgrass/script/gis_set.tcl
> > /opt/grass5/bin/tcltkgrass
> > 
> > were not right for the normal users. As I am installing
> > GRASS as normal user, I cannot verify this.
> > 
> > Does anyone know about this problem? Do we have
> > to fix a missing "chmod"?
> 
> I don't see any problem ("make" as user, "make install" as root). 
> However, note that "make install" mostly just copies the files to the
> installation directory. The installed files will have the same
> ownership and permissions as the versions in dist.<platform>.
> 
> For files which aren't generated by compilation (e.g. scripts), they
> will probably have the ownership and permissions resulting from
> installation (i.e. "tar x" or "cvs checkout/update").

Well, the build procedure for tcltkgrass is:

	make[1]: Entering directory `<SRC>/tcltkgrass'
	if [ ! -d <DST>/tcltkgrass ]; then mkdir <DST>/tcltkgrass; fi
	rm -f <DST>/bin/tcltkgrass
	tar cf - docs/Pro* docs/HIS* main/* module/* script/* | (cd <DST>/tcltkgrass; tar xf -)
	cp main/gis_set.tcl <DST>/tcltkgrass/script
	cp tcltkgrass <DST>/bin/tcltkgrass
	chmod ugo+x <DST>/tcltkgrass/main/tksys.tcl
	chmod ugo+x <DST>/bin/tcltkgrass
	chmod -R u+w <DST>/tcltkgrass
	make[1]: Leaving directory `<SRC>/tcltkgrass'

where <SRC> is the GRASS "src" directory and <DST> is the
dist.<platform> directory.

IOW, "make" simply copies everything into the staging directory, from
where "make install" will copy it to the final $GISBASE directory. So,
the ownership and permissions will be the same as the source files,
minus any permission bits which are cleared by way of the umask
setting.

It would probably suffice to add "chmod -R ugo+rX ${INST_DIR}" to the
end of the "install" target.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list