Commit Graph

27 Commits

Author SHA1 Message Date
Greg Beaver
6cdabede4c remove ext/zip dependency entirely, write better native zip support
re-organize, create util.c, move entry_info/archive_data/entry_data access methods to this file
refactor entry->fp, now this is abstracted with phar_get_efp() and phar_seek_efp(), fixes all weird dependency issues
permanently solve the "millions of file pointers" issue for read access.  All compressed files are read into a single
temporary stream, and their constraints are controlled by the entry->fp abstraction

Improvements in this zip implementation over ext/zip:
 * full read/write support for bzip2 compressed files
 * much more efficient access for accessing only a few files within large zip files, as crc/header validation is
   done just-in-time
 * full stream support for opendir/rename/rmdir/mkdir as well as all of the other stream funcs
 * full support for setting file perms via Phar::chmod(), stored as zip-standard extra field
 * no problem with large zips and many open file pointers

# TODO: add big-endian system support for tar/zip file format headers, otherwise the implementation is complete
# TODO: test on windows and fix any windows-specific issues
# TODO: verify zips created work with unzip/winzip/windows explorer and so on
2008-01-28 08:52:08 +00:00
Greg Beaver
fa6027041d refine config.m4 to use the newly found zip headers 2008-01-17 04:04:30 +00:00
Greg Beaver
9a59e60657 remove HAVE_ZIP defines just as we removed HAVE_BZ2 defines and for the same reason
update outdated description of phar in config.m4
make zip extension mandatory on windows for compiling purposes
2008-01-17 03:59:07 +00:00
Greg Beaver
a3718dcfa3 no need to use conditional defines for bz2, we don't call it except indirectly through stream wrappers.
After removing HAVE_BZ2 conditionals, phar works even if bz2 is not present on installation through pecl
2008-01-17 03:48:29 +00:00
Greg Beaver
535865e908 give up on gpg signing because of non-existent windows support for gpg signing lib 2008-01-17 03:19:44 +00:00
Greg Beaver
ff076eb3cc update m4 to make zip support always enabled so zip headers must be installed, add dep to package.xml 2008-01-17 02:03:59 +00:00
Greg Beaver
4df43510b9 make zip optional 2008-01-12 05:17:12 +00:00
Greg Beaver
67a15e332f add missing defines, s/filename_len/filename_length/ (thanks steph) - now over to the windows box and debug this properly 2008-01-12 02:13:52 +00:00
Greg Beaver
8fb4205a8d add Phar::interceptFileFuncs()
To intercept fopen(), file_get_contents(), opendir(), and all the stat-based functions so that
code like "if (is_readable('./config.inc.php'))" actually works inside of a phar
[DOC]
2008-01-11 07:30:03 +00:00
Greg Beaver
4bce48417b split stream file handlers into stream.c and directory handlers into dirstream.c 2008-01-08 20:31:54 +00:00
Greg Beaver
63adb98f78 split out zip functions 2008-01-08 19:40:23 +00:00
Greg Beaver
8ee4266b3f initial tar support - a few kinks to work on in phar creation, but read works 2008-01-03 04:45:00 +00:00
Greg Beaver
652d39c330 add zip-based phar support. not quite working is webPhar(), not sure why yet 2007-12-31 22:42:40 +00:00
Greg Beaver
d757f6ee5e oops, need to make these things optional, not required 2007-12-18 05:32:11 +00:00
Greg Beaver
4bcb68a4e8 fix errors found in delMetaData(), add get/delMetaData() to MetaData read test 2007-11-25 05:04:40 +00:00
Greg Beaver
e34be4f8bc preliminary work on using gnupg to verify/create signatures - no implementation, just phpinfo() output and build rules 2007-11-24 04:30:08 +00:00
Greg Beaver
a72251be6e experimental support for optional bz2 extension - should make windows users a whole lot happier 2007-11-24 04:06:44 +00:00
Marcus Boerger
29cde76818 - Disallow stars in paths 2007-02-04 16:25:25 +00:00
Marcus Boerger
1c690cb9d4 - Add path sanitizer for new paths
- Add test for a few things we check with the sanitizer
# We might want to use the sanitizer for opening as well
2007-02-04 13:21:40 +00:00
Marcus Boerger
3066cfb3ef - Disable most of class Phar and all of class PharFileInfo if SPL is not present 2007-01-21 15:25:50 +00:00
Marcus Boerger
a3fcdf4f08 - Add OO interface to handling phar archieves and entries
- Add support for HEAD
- Cleanup
2006-02-28 01:36:30 +00:00
Marcus Boerger
42e3644d5b - Add bzip2 decompression support 2006-01-12 21:16:29 +00:00
Marcus Boerger
8166072ea3 - Change to use streams filters which simplifies decompression a lot and
easily allows to use other compression algos too
2006-01-11 23:55:57 +00:00
Marcus Boerger
e80363ae49 - Simplify and change to --enable-phar since zlib is optional 2006-01-01 21:42:55 +00:00
Greg Beaver
852eec498f add ability to detect zlib library when zlib ext is disabled 2005-12-05 01:07:02 +00:00
Greg Beaver
141aecfcdd attempt to locate zlib even if --with-zlib is disabled, so we can add library support in phar 2005-12-04 23:23:04 +00:00
Greg Beaver
9d4036ea7c initial import
# file handling needs to use streams, handle safe_mode/open_basedir
2005-12-04 20:35:38 +00:00