[m-dev.] For review: Simplified installation of user libraries
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Oct 4 14:33:47 AEST 1999
On 04-Oct-1999, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
>
> Well, there was a snag during a test of the bindist stuff. vpath_find was
> missing. It seems there's a couple of other files missing too (info_to_mdb,
> sicstus_conv --- though I daresay you don't care about the latter any more?).
Right.
> While investigating this, I came up with a couple more questions. What's
> the difference between UTILS and SCRIPT_FILES? The obvious thing to me
> would be that the former refers to files in the util subdirectory (compiled
> binaries) whereas the latter refers to files in the scripts subdirectory
> (architecture independent). But there are a number of files from the
> scripts subdirectory mentioned in the UTILS variable.
The difference is that SCRIPT_FILES are named *.in and need to get
processed by autoconf, in case the bindist is installed with a different
`--prefix', whereas UTILS can just be copied directly.
Yes, the names are misleading; originally everything in the scripts
directory was named *.in... if you want to change them, I'd be happy.
> Now, the two are
> installed slightly differently: those in UTILS are just copied into place,
> while those in INSTALL_SCRIPTS have `chmod +w' run on them (the "normal"
> installation process [not bindist] also does a `chmod u+w' on installed
> scripts --- but everything from the scripts dir). Why the difference(s),
> and why `+w'?
>
> My guess is UTILS should be for util/* and *SCRIPTS* should be for
> scripts/*, and am happy to fix this. But I don't understand the `+w'. Is
> it meant to be `+x'? Or am I missing something here?
That is a bug. It should be `u+w'.
That bug was fixed for scripts/Mmake -- see the log message below --
but unfortunately I forgot to fix it for bindist/bindist.Makefile.in.
| Fix a security problem with the use of `chmod +w'.
|
| {scripts,runtime}/Mmake:
| Use `chmod u+w' rather than `chmod +w' on the installed files,
| since `chmod +w' has the wrong effect with some versions of chmod.
| When configure creates automatically-generated files, we do a
| `chmod -w' on them to make sure that you don't accidentally edit
| the automatically-generated file rather than the source `.in' file.
| However, if the installed copies are write-only, then it causes
| problems when installing a new copy on top of an old one.
| Hence we turn write permission back on again on the installed copies.
| The `chmod +w' command has the right effect on Solaris, OSF/1, and
| SunOS, where it takes into account the umask. However, on IRIX and
| ULTRIX, `chmod +w' does not take the umask into account, and so
| makes the files world-writable, which is a security problem.
| Hence, we now use `chmod u+w' instead.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list