[Ultramonkey-l7-users 217] Re: [Ultramonkey-l7-develop 514] UltraMonkey-L7 2.1.3-0/SSLProxy 1.0.2-0 リリースのお知らせ

Zurück zum Archiv-Index

TATEISHI Katsuyuki tatei****@oss*****
2009年 8月 25日 (火) 10:11:54 JST


立石です。

From: TATEISHI Katsuyuki <tatei****@oss*****>
Subject: Re: [Ultramonkey-l7-users 213] Re: [Ultramonkey-l7-develop 514] UltraMonkey-L7 2.1.3-0/SSLProxy 1.0.2-0 リリースのお知らせ
Date: Tue, 25 Aug 2009 09:53:15 +0900 (JST)

>>>       また,ディレクトリのパーミッションが 0777 となっているのは
>>>     意図があるのでしょうか.
>> 
>> root で展開すると確かに 0777になりますね・・・
>> 気づいてませんでした。
>> ビルド環境の umask は 002 で、other には書き込み権限はないの
>> ですが、なぜこうなっているかは不明です。調べてみます。
> 
> configure で生成した Makefile の配布物用ディレクトリを作るコー
> ド(distdirターゲット)に
> ============================================================
>         -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
>           ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
>           ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
>           ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
>         || chmod -R a+r $(distdir)
> ============================================================
> とありました。
> 
> 1行目を見ていただくとわかりますが、ディレクトリを777にするの
> はautotools の仕様のようです。
> 何故か?は autotools のドキュメントをあたってみます。

上記 Makefile (の元になったMakefile.in)の元になった
/usr/share/automake-1.9/am/distdir.am のコメントに以下の記述
を見つけました。ディレクトリのパーミッションを 777 としてい
る理由が書かれていますのでご確認下さい。
============================================================
## This complex find command will try to avoid changing the modes of
## links into the source tree, in case they're hard-linked.  It will
## also make directories writable by everybody, because some
## brain-dead tar implementations change ownership and permissions of
## a directory before extracting the files, thus becoming unable to
## extract them.
##
## Ignore return result from chmod, because it might give an error
## if we chmod a symlink.
##
## Another nastiness: if the file is unreadable by us, we make it
## readable regardless of the number of links to it.  This only
## happens in perverse cases.
##
## We use $(install_sh) because that is a known-portable way to modify
## the file in place in the source tree.
##
if %?TOPDIR_P%
        -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \;
 \
============================================================

--
TATEISHI Katsuyuki <tatei****@oss*****>





Ultramonkey-l7-users メーリングリストの案内
Zurück zum Archiv-Index