On 11 Mar 2003, Piet van Oostrum wrote:

> >>>>> George White <[EMAIL PROTECTED]> (GW) wrote:
> 
> GW> Quoting Piet van Oostrum <[EMAIL PROTECTED]>:
> >> xdvizilla (in tetex-src-2.0.2/texk/xdvik/) appears to be missing the x
> >> permission. 
> 
> GW> On my linux system the x-permission was set (by install -- the default
> GW> is 755 which is why you need the -m 644 option to install
> GW> documentation) when the file was installed. Why does the permission in
> GW> the source tree matter? Are you using a funny version of install?
> 
> It was the only thing installed in bin that missed the x permission.
> The install is, I think, a home-brewn script. It says:
> 
> Usage: install [-c] [-s] [-o own] [-g grp] [-m mode] src dst
> Or:    install [-o own] [-g grp] [-m mode] -d dir
> option c : copy (obsolete)
> option s : try to strip dst
> option o : (possibly numeric) owner ident
> option g : (possibly numeric) group ident
> option m : mode (in octal eg 755 )

GNU install says:

  -m, --mode=MODE     set permission mode (as in chmod), instead of
                      rwxr-xr-x

I takes this to mean that the default mode is 755, so you must use '-m'
for non-executable files.  

SGI's /sbin/install is more explicit

  -m mode      Set the mode of created files to mode, interpreted as an
               octal number.  The default mode for regular files and
               directories is 755.  The default mode for devices and
               named pipes is 666.  This option is ignored if given with
               -ln or -lns.

Unless you are the only person whose install program preserves the mode of
the original file, then the makefiles should explicitly set the mode for
executable files as well as the others, or perhaps just supply a script
with the desired behaviour. 

> src : must be readable file
> dst : file or directory
> 
> The Makefile in xdvik doesn't give any mode parameters, so how should the
> install script know that it should add the x permission?
> 
>         $(INSTALL_SCRIPT) $(srcdir)/xdvizilla $(scriptdir)/xdvizilla
> $(INSTALL_SCRIPT) = install -c.

--
George White <[EMAIL PROTECTED]> 
Head of St. Margarets Bay, Nova Scotia

Reply via email to