[Hackage] #93: Incorrect permissions on library install

Hackage trac at galois.com
Sat Jun 27 17:37:18 EDT 2009


#93: Incorrect permissions on library install
----------------------------+-----------------------------------------------
  Reporter:  guest          |        Owner:           
      Type:  defect         |       Status:  reopened 
  Priority:  normal         |    Milestone:  Cabal-1.8
 Component:  Cabal library  |      Version:  1.1.4    
  Severity:  normal         |   Resolution:           
  Keywords:                 |   Difficulty:  normal   
Ghcversion:  6.10.1         |     Platform:  Linux    
----------------------------+-----------------------------------------------
Changes (by GregoryWeber):

  * status:  closed => reopened
  * ghcversion:  6.4.2 => 6.10.1
  * resolution:  fixed =>

Comment:

 Replying to [comment:7 duncan]:
 > Fixed in cabal head and the 1.6 branch.
 >
 > The behavior now when installing is that we ignore the permissions the
 files had in the build tree and the user's umask. We explicitly set
 permissions for all files we install.
 >

 That seems to be working well for most files, but those listed in the
 data-files field of the Cabal package are still installed with permission
 rw for the owner (root), zero permission for group and others.

 {{{
 [root at squirrel cal3d-examples-0.1]# uname -a
 Linux squirrel.localdomain 2.6.27.25-170.2.72.fc10.i686 #1 SMP Sun Jun 21
 19:03:24 EDT 2009 i686 i686 i386 GNU/Linux
 [root at squirrel cal3d-examples-0.1]# ghc --version
 The Glorious Glasgow Haskell Compilation System, version 6.10.1
 [root at squirrel cal3d-examples-0.1]# ghc-pkg list Cabal
 /usr/lib/ghc-6.10.1/./package.conf:
     Cabal-1.6.0.1
 [root at squirrel cal3d-examples-0.1]# runghc Setup install
 Installing executable(s) in /opt/bin
 [root at squirrel cal3d-examples-0.1]# cd /opt/share/cal3d-examples-0.1/
 [root at squirrel cal3d-examples-0.1]# ls -l
 total 4
 drwxr-xr-x 2 root root 4096 2009-06-27 17:13 data
 [root at squirrel cal3d-examples-0.1]# ls -l data
 total 696
 -rw------- 1 root root   6400 2009-06-27 17:13 cally_calf_left.cmf
 -rw------- 1 root root   6464 2009-06-27 17:13 cally_calf_right.cmf
 -rw------- 1 root root  16968 2009-06-27 17:13 cally_chest.cmf
 -rw------- 1 root root    210 2009-06-27 17:13 cally_chest.xrf
 -rw------- 1 root root   3216 2009-06-27 17:13 cally.csf
 [snip]
 }}}

 I can work around this by doing
 {{{
 chmod -Rf g+rX,o+rX .
 }}}
 in the source directory where I am developing the package, __before__
 building the source tarballs for release.  Of course, likewise the
 installer can do so after unpacking the tarballs, or even after the files
 are installed.

 Seems like this might be a big nuisance for projects using darcs with
 multiple developers, since darcs does not preserve file permissions.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/93#comment:8>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list