From:             sagawa at sohgoh dot net
Operating system: Red Hat Linux 7.2
PHP version:      4.3.4
PHP Bug Type:     Feature/Change Request
Bug description:  [patch] needless execution flag in 
phpbuilddir(/usr/local/lib/php/build)

Description:
------------
I've found an issue on default file permission. BUILD_FILES in
scripts/Makefile.frags installed with needless excution flag except
shtool.

To fix this issue, I made a patch. This patch just change $(INSTALL) to
$(INSTALL_DATA) for non executable files.

--- php-4.3.4/scripts/Makefile.frag.orig        Fri Sep 19 14:35:21 2003
+++ php-4.3.4/scripts/Makefile.frag     Fri Dec  5 04:36:38 2003
@@ -6,10 +6,11 @@
 phpincludedir = $(includedir)/php
 phpbuilddir = $(prefix)/lib/php/build
 
-BUILD_FILES = \
+bin_BUILD_FILES = \
+       build/shtool
+data_BUILD_FILES = \
        scripts/phpize.m4 \
        build/mkdep.awk \
-       build/shtool \
        build/scan_makefile_in.awk \
        Makefile.global \
        acinclude.m4
@@ -20,7 +21,9 @@
 install-build:
        @echo "Installing build environment:    
$(INSTALL_ROOT)$(phpbuilddir)/"
        @$(mkinstalldirs) $(INSTALL_ROOT)$(phpbuilddir) $(INSTALL_ROOT)$(bindir)
&& \
-       (cd $(top_srcdir) && $(INSTALL) $(BUILD_FILES)
$(INSTALL_ROOT)$(phpbuilddir))
+       (cd $(top_srcdir) && \
+       $(INSTALL) $(bin_BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir) && \
+       $(INSTALL_DATA) $(data_BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir))
 
 HEADER_DIRS = \
        / \



Reproduce code:
---------------
./configure && make && make install
and ls -l /usr/local/lib/php/build


Expected result:
----------------
-rw-r--r--    1 root     root         3160 Dec  5 04:43 Makefile.global
-rw-r--r--    1 root     root        46325 Dec  5 04:43 acinclude.m4
-rw-r--r--    1 root     root         2277 Dec  5 04:43 mkdep.awk
-rw-r--r--    1 root     root         2231 Dec  5 04:43 phpize.m4
-rw-r--r--    1 root     root          410 Dec  5 04:43
scan_makefile_in.awk
-rwxr-xr-x    1 root     root        36075 Dec  5 04:43 shtool


Actual result:
--------------
-rwxr-xr-x    1 root     root         3160 Dec  5 04:21 Makefile.global
-rwxr-xr-x    1 root     root        46325 Dec  5 04:21 acinclude.m4
-rwxr-xr-x    1 root     root         2277 Dec  5 04:21 mkdep.awk
-rwxr-xr-x    1 root     root         2231 Dec  5 04:21 phpize.m4
-rwxr-xr-x    1 root     root          410 Dec  5 04:21
scan_makefile_in.awk
-rwxr-xr-x    1 root     root        36075 Dec  5 04:21 shtool


-- 
Edit bug report at http://bugs.php.net/?id=26525&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26525&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26525&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26525&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26525&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26525&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26525&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26525&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26525&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26525&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26525&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26525&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26525&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26525&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26525&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26525&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26525&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26525&r=float

Reply via email to