automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 1.8 and mkdir_p


From: Alexandre Duret-Lutz
Subject: Re: 1.8 and mkdir_p
Date: Sat, 03 Jan 2004 16:25:47 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Hi Harlan,

Happy new year. 

>>> "Harlan" == Harlan Stenn <address@hidden> writes:

 Harlan> This change:
 Harlan> - Makefiles will prefer `mkdir -p' over mkinstalldirs if it is
 Harlan> available.  This selection is achieved through the Makefile
 Harlan> variable $(mkdir_p) that is set by AM_INIT_AUTOMAKE to either
 Harlan> `mkdir -m 0755 -p --', `$(mkinstalldirs) -m 0755', or 
 Harlan> `$(install_sh) -m 0755 -d'.

 Harlan> sucks flaming red bugs.

I did this because someone complained that if the installer had
umask=077, the installation could create directories which were
not world readable.
http://sources.redhat.com/ml/bug-automake/2003/msg00190.html
(Note that the patch in the follow-up is not what has been applied.)

Since we are ignoring umask when installing files, it sounded
correct to ignore it too when installing directories.

Another point is that there are places in Automake where we have
to use `install_sh' even if `install' exists, because `install'
does not create leading directories by default and Automake
cannot create mkdir calls for directories it does not know
before hand (e.g., AC_SUBSTed nobase_ files).  `install_sh' is
slow, and in the future we would like to use `install -D'
instead when it is supported.  However `install -D' always
creates 755 directories (it will preserve special bits like SGID
though) and has no option to change that.

 Harlan> How can one change the '-m 0755'?  I haven't found
 Harlan> anything about this in the docs.

perl -pi -e 's/-m 0755//g' configure

sorry

 Harlan> I have a case where we want SGID and group-write.  In
 Harlan> the "old days" this was easy - the previous case simply
 Harlan> did whatever it did and we got SGID by default (because
 Harlan> the parent directory was SGID) and our umask setting
 Harlan> got us group-write.

This looks like a legitimate setup to me.  More legitimate than
umask=077 for installers, at least :)  Right now I think it's
better to remove all these `-m 0755' from Automake.

However, I'd really like to hear opinions about the related
issues:

 - is it normal to honor umask when creating directories and not 
   when installing files?

 - should we just drop the `install -D' idea (because it creates
   755 directories regardless of umask)?

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]