
#543: cabal requires root privileges in order to modify files in /usr/lib/ghc-6.8.2 ----------------------------+----------------------------------------------- Reporter: nr | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.1 Severity: normal | Keywords: ghc package.conf Difficulty: unknown | Ghcversion: 6.8.2 Platform: Linux | ----------------------------+----------------------------------------------- cabal requires root privileges in order to modify files in /usr/lib/ghc-6.8.2. I'm reporting this as a defect in the tool, since it was told to install in /usr/local/cabal, and it seems unreasonable that cabal should require root privileges when these are not required for installing into its target directory. I am less well informed about the Linux Filesystem Standard, but I believe that files in /usr/lib are supposed to be immutable. If I'm correct, cabal is violating that standard in a major way. If you must have a mutable {{{package.conf}}}, put it in {{{/var/lib/ghc-6.8.2}}}, and make it group writable by a suitable group (which you may need to create). I'm cc-ing ghc-devel on this one because the two groups will probably have to cooperate. {{{ : nr@homedog 5548 ; cabal install graphmod Resolving dependencies... Downloading dotgen-0.2... Configuring dotgen-0.2... Preprocessing library dotgen-0.2... Building dotgen-0.2... [1 of 1] Compiling Text.Dot ( Text/Dot.hs, dist/build/Text/Dot.o ) /usr/bin/ar: creating dist/build/libHSdotgen-0.2.a Installing library in /usr/local/cabal/lib/dotgen-0.2/ghc-6.8.2 Registering dotgen-0.2... Reading package info from "dist/installed-pkg-config" ... done. Unable to rename "/usr/lib/ghc-6.8.2/package.conf" to "/usr/lib/ghc-6.8.2/package.conf.old" Saving old package config file... ghc-pkg.bin: /usr/lib/ghc-6.8.2/package.conf: renameFile: permission denied (Permission denied) Downloading haskell-lexer-1.0... Configuring haskell-lexer-1.0... Preprocessing library haskell-lexer-1.0... Building haskell-lexer-1.0... [1 of 6] Compiling Language.Haskell.Lexer.Position ( Language/Haskell/Lexer/Position.hs, dist/build/Language/Haskell/Lexer/Position.o ) Language/Haskell/Lexer/Position.hs:25:4: Warning: Pattern match(es) are overlapped In a case alternative: '\n' -> ... [2 of 6] Compiling Language.Haskell.Lexer.Tokens ( Language/Haskell/Lexer/Tokens.hs, dist/build/Language/Haskell/Lexer/Tokens.o ) [3 of 6] Compiling Language.Haskell.Lexer.Utils ( Language/Haskell/Lexer/Utils.hs, dist/build/Language/Haskell/Lexer/Utils.o ) [4 of 6] Compiling Language.Haskell.Lexer.Lex ( Language/Haskell/Lexer/Lex.hs, dist/build/Language/Haskell/Lexer/Lex.o ) [5 of 6] Compiling Language.Haskell.Lexer.Layout ( Language/Haskell/Lexer/Layout.hs, dist/build/Language/Haskell/Lexer/Layout.o ) [6 of 6] Compiling Language.Haskell.Lexer ( Language/Haskell/Lexer.hs, dist/build/Language/Haskell/Lexer.o ) /usr/bin/ar: creating dist/build/libHShaskell-lexer-1.0.a Installing library in /usr/local/cabal/lib/haskell-lexer-1.0/ghc-6.8.2 Registering haskell-lexer-1.0... Reading package info from "dist/installed-pkg-config" ... done. Unable to rename "/usr/lib/ghc-6.8.2/package.conf" to "/usr/lib/ghc-6.8.2/package.conf.old" Saving old package config file... ghc-pkg.bin: /usr/lib/ghc-6.8.2/package.conf: renameFile: permission denied (Permission denied) cabal: Error: some packages failed to install: dotgen-0.2 failed during the final install step. The exception was: exit: ExitFailure 1 graphmod-1.1.3 depends on haskell-lexer-1.0 which failed to install. haskell-lexer-1.0 failed during the final install step. The exception was: exit: ExitFailure 1 : nr@homedog 5549 ; }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/543 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects