Bug 100541 - Bug in installing any php4-extension as non-root user: file that needs writing during install is set to mode 444 during install.
Summary: Bug in installing any php4-extension as non-root user: file that needs writin...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-19 15:40 UTC by boelaars
Modified: 2006-07-27 07:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description boelaars 2006-07-19 15:40:15 UTC
	installing any php4 extension (using lang/php4-extensions port or on its own) results in the same error:

whiter@bawls$ chown 644 /home/users/whiter/apps/include/php/ext/pcre/config.h
whiter@bawls$ ls -la /home/users/whiter/apps/include/php/ext/pcre/|grep config
-rw-r--r--  1 whiter  users  1699 Jul 19 14:04 config.h
whiter@bawls$ make install
===>  Installing for php4-pcre-4.4.2_2
(...)
cannot create /home/users/whiter/apps/include/php/ext/pcre/config.h: Permission denied
*** Error code 2
whiter@bawls$ ls -la /home/users/whiter/apps/include/php/ext/pcre/|grep config
-r--r--r--  1 whiter  users  1699 Jul 19 14:05 config.h

Fix: 

unknown
How-To-Repeat: 	set your env to be like mine, and do make install in the lang/php4-extensions port, or a specific php4 extension port dir.
	For information on how I configured my environment, see this posting on my website: http://www.white-russian.nl/index.php?page=/blog/2006/07/installing_free.html
Comment 1 boelaars 2006-07-20 00:21:55 UTC
The error occurs for www/lynx-ssl (and I guess the other lynx ports as well):

sed     -e '/^HELPFILE:http/s!^!#!'  -e '/^#HELPFILE:file/s!#!!'  -e
'/^HELPFILE:file/s!/PATH_TO/lynx_help!/home/users/whiter/apps/share/lynx_help!'
 -e
'/^[A-Z_]*:/s!/PATH_TO/lynx_doc!/home/users/whiter/apps/share/doc/lynx!' 
-e '/^HELPFILE:file/s!$!!'  -e '/^HELPFILE:file/s!$!!' 
/home/users/whiter/apps/etc/lynx.tmp
>/home/users/whiter/apps/etc/lynx.cfg.default
cannot create /home/users/whiter/apps/etc/lynx.cfg.default: Permission denied
*** Error code 2

It's a problem that doesn't occur when installing as root, since root
doesn't care about write permissions.
Comment 2 Tilman Keskinoz freebsd_committer freebsd_triage 2006-07-20 12:22:48 UTC
Responsible Changed
From-To: freebsd-i386->ale

Make this a ports PR and assign to maintainer
Comment 3 Alex Dupre freebsd_committer freebsd_triage 2006-07-24 07:16:41 UTC
Is this patch enough to fix your problem?

--- bsd.php.mk  5 Jul 2006 02:18:08 -0000       1.31
+++ bsd.php.mk  24 Jul 2006 06:09:59 -0000
@@ -169,6 +169,7 @@
               @${INSTALL_DATA} ${WRKSRC}/${header}/*.h \
                      ${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
 .      endfor
+       @${RM} -f ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
        @${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \
                > ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
        @${ECHO_CMD} \#include \"ext/${PHP_MODNAME}/config.h\" \
Comment 4 boelaars 2006-07-26 19:51:51 UTC
Yeap. That solves the problem. (For PHP extensions that is, not yet for lynx)
Comment 5 Alex Dupre freebsd_committer freebsd_triage 2006-07-27 07:21:35 UTC
State Changed
From-To: open->closed

Fixed, thanks!