|Anonymous | Login | Signup for a new account||2015-04-02 11:48 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005219||OCaml||OCaml internal build/install (Makefiles, configure)||public||2011-02-04 06:16||2014-09-24 20:21|
|Target Version||4.03.0+dev||Fixed in Version|
|Summary||0005219: use $(INSTALL) instead of 'cp' in Makefiles|
|Description||The "make install" target does not set proper file permissions on the installed files. Moreover, there is no easy way to fix the permissions once they are messed up.|
Suppose some user uses umask 0007, and root uses umask 0022. It is normal to compile the program as an ordinary user, and to install it later as root. Therefore, during compilation, files are generated with umask 0007. Since "make install" uses a simple "cp" to copy most files, this umask 0007 is preserved during installation, and root's umask 0022 is not used. The installed files (owned by root) are therefore not readable by non-root users.
Moreover, once installed, an attempt to correct this problem by re-compiling with a different umask will fail. Suppose the user changes her umask to 0022, and re-compiles from a fresh copy of the sources. Now "make install", run as root, will still use "cp", and since the target file already exists, the permissions of the target file, and not the source file, will be used!! Therefore the files will still not be readable.
Moreover, since there is no "make uninstall" target, there is no simple way to find all the installed files and correct their permissions manually.
Solution: the make system should use $(INSTALL) instead of 'cp', 'cp -f', etc.
By default this should be set to INSTALL=install, which will set permissions correctly. It could also be set to a shell script, or to 'cp -f', if an 'install' program is not available at the target system.
|Attached Files||ocaml-3.12.0-install.patch [^] (26,397 bytes) 2011-02-04 06:16 [Show Content]|
Will also need to update configure to autodetect a compatible version of install...
Note that there are several versions of install (still). Because of this one should at least have the option to set the path of the install binary in the configure script.
In GODI we added a godi_install program to handle this issue, which always provides a BSD-compatible install. Maybe this is also a way to get here around this difficulty, just add a comparable program to the ocaml distribution.
|2011-02-04 06:16||selinger||New Issue|
|2011-02-04 06:16||selinger||File Added: ocaml-3.12.0-install.patch|
|2011-05-17 16:37||doligez||Note Added: 0005901|
|2011-05-17 16:37||doligez||Status||new => acknowledged|
|2011-07-21 23:44||gerd||Note Added: 0006053|
|2012-01-27 15:54||doligez||Relationship added||related to 0001919|
|2012-07-10 17:04||doligez||Target Version||=> 4.01.0+dev|
|2012-07-31 13:36||doligez||Target Version||4.01.0+dev => 4.00.1+dev|
|2012-09-19 15:01||doligez||Target Version||4.00.1+dev => 4.01.0+dev|
|2013-08-12 16:20||doligez||Target Version||4.01.0+dev => 4.02.0+dev|
|2013-08-12 16:26||doligez||Target Version||4.02.0+dev => 4.01.1+dev|
|2013-10-08 15:23||doligez||Tag Attached: patch|
|2014-05-25 20:20||doligez||Target Version||4.01.1+dev => 4.02.0+dev|
|2014-07-30 23:12||doligez||Category||OCaml general => OCaml internal build/install (Makefiles, configure)|
|2014-07-30 23:12||doligez||Target Version||4.02.0+dev => 4.02.1+dev|
|2014-09-04 00:25||doligez||Target Version||4.02.1+dev => undecided|
|2014-09-24 20:21||doligez||Target Version||undecided => 4.03.0+dev|
|Copyright © 2000 - 2011 MantisBT Group|