non-owner-writable files generated in ghc build process?

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 When I was doing `rm -r` on a build tree it pointed out that driver/split/ghc-split.prl and driver/mangler/ghc-asm.prl were write-protected. Tacking this down, they're generated from .lprl with unlit... then (in mk/suffix.mk) they are `chmod 444`-ed. Is this a problem? Is the purpose to remind people that those are generated files, so don't change them? (hmm... if someone has a restrictive umask like 027, will this circumvent it? would `chmod -w` make more sense?) I know, I can use `rm -rf` in order to unquestioningly follow UNIX permissions model... Isaac -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGNJmgHgcxvIWYTTURAs5IAKCw5ND5vKLimSkIaclz5onqnNHVyACeKCPq bBtTcqD+/qoG3gnDcAtLHc0= =PUgp -----END PGP SIGNATURE-----

On Sun, Apr 29, 2007 at 09:12:00AM -0400, Isaac Dupree wrote:
When I was doing `rm -r` on a build tree it pointed out that driver/split/ghc-split.prl and driver/mangler/ghc-asm.prl were write-protected. Tacking this down, they're generated from .lprl with unlit... then (in mk/suffix.mk) they are `chmod 444`-ed. Is this a problem? Is the purpose to remind people that those are generated files, so don't change them? (hmm... if someone has a restrictive umask like 027, will this circumvent it? would `chmod -w` make more sense?)
umask only affects file creation, not chmod.
I know, I can use `rm -rf` in order to unquestioningly follow UNIX permissions model...
Stefan

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stefan O'Rear wrote:
On Sun, Apr 29, 2007 at 09:12:00AM -0400, Isaac Dupree wrote:
When I was doing `rm -r` on a build tree it pointed out that driver/split/ghc-split.prl and driver/mangler/ghc-asm.prl were write-protected. Tacking this down, they're generated from .lprl with unlit... then (in mk/suffix.mk) they are `chmod 444`-ed. Is this a problem? Is the purpose to remind people that those are generated files, so don't change them? (hmm... if someone has a restrictive umask like 027, will this circumvent it? would `chmod -w` make more sense?)
umask only affects file creation, not chmod.
that's what I meant - if a user doesn't even want any of their files world-readable, this use of chmod would make the file more readable, not even with a reason or trying to do that. Of course it won't really make much of a difference since it's inside a bunch of directories... I guess I don't really care, there are too many different open-source projects that do weird things with permissions Isaac -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGNK+UHgcxvIWYTTURAsSFAJ97nkPGguuojK1QeOQI8BcFHNUMkACcDHBT 3SmDlrN4rM7Fl0bbP97C8Jo= =BPjo -----END PGP SIGNATURE-----

On Sun, Apr 29, 2007 at 09:12:00AM -0400, Isaac Dupree wrote:
When I was doing `rm -r` on a build tree it pointed out that driver/split/ghc-split.prl and driver/mangler/ghc-asm.prl were write-protected. Tacking this down, they're generated from .lprl with unlit... then (in mk/suffix.mk) they are `chmod 444`-ed. Is this a problem? Is the purpose to remind people that those are generated files, so don't change them?
I assume so.
(hmm... if someone has a restrictive umask like 027, will this circumvent it? would `chmod -w` make more sense?)
Good point. I've changed this to do chmod a-w by default, and you can override it to do nothing with GENERATED_FILE=: in mk/build.mk. Thanks Ian
participants (3)
-
Ian Lynagh
-
Isaac Dupree
-
Stefan O'Rear