Bug 62011 - lang/cmucl permissions incorrect after install by regular user
Summary: lang/cmucl permissions incorrect after install by regular user
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-27 23:50 UTC by David Magda
Modified: 2004-01-28 20:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Magda 2004-01-27 23:50:21 UTC
If you install the lang/cmucl port as a regular (non-root) user,
the final permissions on many files are incorrect.

The distfile is un-tar(1)ed by the regular user, inheriting his permissions.
The 'install' target however uses tar(1) to copy many files to the
final destination in ${PREFIX}. The regular user permissions are also
transfered to the destination.

Fix: 

Instead of using tar(1) to copy the files use cpio(1). An
example can be seen in www/mozilla/Makefile:

do-install:
   ${MKDIR} ${PREFIX}/lib/${MOZILLA}
   ${CHMOD} 755 ${PREFIX}/lib/${MOZILLA}
   cd ${WRKSRC}/dist/bin && ${FIND} . | \
      ${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${MOZILLA}

cpio(1)'s "-R" option specifies the owner:group that will be used
at the destination.
How-To-Repeat: 	
As a regular user:
  . cd /usr/ports/lang/cmucl
  . make install
    <you will be asked for root password; enter it>
  . pkg_info -L cmucl-18e | grep local | xargs ls -l
    (Assuming the files are put into /usr/local; hence the local.)

After the last command you'll see files both owned by root, and by the
regular user who ran the 'make install'.
Comment 1 Martin Cracauer freebsd_committer freebsd_triage 2004-01-28 20:54:43 UTC
State Changed
From-To: open->closed

Fixed as suggested. 

Thanks!