Jim Reisert AD1C wrote:
I can't control how the ZIP file gets created, but I do expect that
when I unzip a file, that the .exe will actually execute without
having to change permissions!
I guess it comes down to a question of whether *.exe implies chmod +x.
It doesn't in any "native" *ix packaging format, like tar or cpio.
Doing this would thus be a break from expected behavior for some. I can
see your point, Jim, but I don't think the answer is obvious.
Should unzip do this for *.sh? *.pl? *.insert-yfl-extension? Before
you answer, have you looked at a programming language list lately?
There are "only" about 750 on this index page in Wikipedia:
http://en.wikipedia.org/wiki/List_of_programming_languages
I've seen other lists that put the count at more like 2,500. Obviously
we don't have to handle them all, as some may re-use extensions, and
others aren't directly executable from a shell, like C code. We're
still left with hundreds, surely? If we don't have to handle them all,
what's the razor that describes which get this special treatment and
which don't? How do you deal with conflicts among file name extensions?
Now throw in shebang magic. Does unzip have to set the executable bit
on files with a shebang line at the start? What if it's binary data
that just happens to start with those two bytes? Now does unzip have to
parse the line and check for the existence of an interpreter?
Should unzip have this special-case code only if it doesn't see an ACL,
or does it override explicit settings?
This isn't Cygwin-specific. I use a package on Linux that uses zip for
its distributed binary packages (yeah, yech, I know), and has a bunch of
chmod hackery in its post-unpack installation instructions.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple