Commit Graph

673 Commits

Author SHA1 Message Date
Antony Dovgal
97c3dbaf56 this string should be freed later since path == free_path 2008-02-01 11:25:11 +00:00
Antony Dovgal
f6238ee664 fix compile warning (No newline at end of file) 2008-02-01 11:09:34 +00:00
Marcus Boerger
7d3758fa08 - SPL has been changed 2008-01-30 23:50:23 +00:00
Marcus Boerger
33dc86c435 - Fixed glob:// stream handling in (Recursive)DirectoryIterator. 2008-01-30 20:31:09 +00:00
Steph Fox
ed2785e2a5 OK so let's kill the bug-hider 2008-01-30 00:53:56 +00:00
Steph Fox
76640a615f - One last tweak (so Phar and no-phar work the same again now)
- Bunch of test fixes
- Note: I added a silencer to the unlink() call in zip/tarmaker to avoid system warnings here. If this messes up tests elsewhere we'll need to re-think.
2008-01-29 11:58:27 +00:00
Steph Fox
182519877b Job done. 2008-01-29 09:45:11 +00:00
Steph Fox
7e85b150a6 Rock'n'roll... just php includes to figure out now. 2008-01-29 07:10:22 +00:00
Steph Fox
a6abbfd55d 'It works on my box'.
Please test.
2008-01-28 21:23:02 +00:00
Greg Beaver
f4e4ad0cd1 fix PharFileInfo->setAlias (was wildly broken)
fix directory creation in zip archives
update zip tests to use phar to create the zip, and then copy to a new file
2008-01-28 20:18:15 +00:00
Steph Fox
618a29411d Get rid of zip requirement in the last few tests
@Greg: zip/tarmaker.inc needs a rewrite
2008-01-28 16:49:28 +00:00
Steph Fox
975a1b87af Get rid of zip requirement 2008-01-28 16:31:56 +00:00
Steph Fox
9fd5c0b438 - Moved phar_unixify_path_separators() to a single central point
- The last two VC 6 compiler warnings gone. Please test under *nix.
2008-01-28 14:39:17 +00:00
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
Steph Fox
6f95353e77 - Added is_writable() check on temp directory
- Regenerated stub and tests/nophar.phar
- Fixed tests
2008-01-26 00:12:00 +00:00
Steph Fox
ddc051cebe - Rewrite stub to take up slightly less space
- Fix tests
- Test phars should probably be regenerated, although only one fails here currently (nophar.phar in web context)
2008-01-25 17:26:18 +00:00
Steph Fox
69afbc1099 "What helly said" 2008-01-25 16:05:26 +00:00
Steph Fox
61c3a60815 Make all possible build combinations work under doze (external zip library) 2008-01-25 15:00:24 +00:00
Greg Beaver
29c5c804d0 initial work on more efficient zip implementation, read support working, write not implemented yet
This implementation will support read/write of extra field headers, both zlib/bzip2 compression read/write
it will also delay header comparison/crc32 check until file open, making opening a single file
within the zip much more efficient for large zip files
it also uses emalloc/php streams and is therefore less likely to leak.
this code is not yet built in config.m4/config.w32
2008-01-23 23:19:03 +00:00
Greg Beaver
47a60c4f16 fix 2 tests, add phar.readonly checks to rmdir/mkdir 2008-01-22 20:24:52 +00:00
Greg Beaver
f51bf6118c fix tests to match CVS 2008-01-22 05:26:38 +00:00
Greg Beaver
b2412c4568 fix problems found while documenting. Throw consistent exceptions, chmod is not allowed on
temporary directories, but is allowed on regular ones
allow uncompressAllFiles() to decompress a gzip/bzipped tar archive
fix some protos
2008-01-21 05:28:09 +00:00
Greg Beaver
117f5e2639 add web-based support for default stub, now phars written with webPhar() will work
out of the box regardless of server configuration with phar file format
split up stub.h strings into 2046 byte chunks because MS VC 6 is friggin stupid
2008-01-20 00:49:45 +00:00
Greg Beaver
34c1e6e112 s/1.3.0/2.0.0/ 2008-01-19 20:13:31 +00:00
Greg Beaver
d5fd042872 bump 1.3.0 to 2.0.0, this is a big feature addition release 2008-01-19 19:51:14 +00:00
Greg Beaver
d7ff13cf9a update package.xml 2008-01-19 18:39:49 +00:00
Greg Beaver
a5358c0725 bump API version if the created phar has directories in it, so that it won't load with older phar versions 2008-01-19 18:30:30 +00:00
Greg Beaver
d583fae0cc add Phar::createDefaultStub(), which can take as an argument the filename
that should be loaded as a "bootstrap" for the phar archive
2008-01-19 04:26:22 +00:00
Nuno Lopes
dc84b8b767 fix gcov build 2008-01-18 20:12:45 +00:00
Greg Beaver
7540adf058 major improvement:
the new default stub allows creation of phars that run identically
1) with Phar extension
2) without Phar extension
3) extracted to disk from the phar
this makes the default phar format quite interesting as it eliminates the only drawback of the extension
2008-01-18 05:42:16 +00:00
Greg Beaver
109cbc9f50 add needed define back into config.w32, make zip required mod on win32, remove lib/.cvsignore 2008-01-18 00:11:37 +00:00
Greg Beaver
ad23787e0c remove unneeded define, zip is required on windows 2008-01-17 20:21:55 +00:00
Greg Beaver
5689f3c9c6 add new test for opening a zip-based phar with no zip ext, update skipif for phar_convert test 2008-01-17 20:17:40 +00:00
Greg Beaver
e4c02a6b96 do fancy-shmancy zip dependency validation because ZEND_MOD_OPTIONAL_EX doesn't do any version validation 2008-01-17 05:52:18 +00:00
Greg Beaver
86fc96d86b update package.xml 2008-01-17 04:56:40 +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
0e934c70d7 add optional whole-file compression to convertToTar/convertToPhar 2008-01-16 21:09:32 +00:00
Greg Beaver
31ed60001c fix build on windows 2008-01-16 20:17:47 +00:00
Greg Beaver
d1eda9c8ac add Phar::convertToTar(), Phar::convertToZip(), and Phar::convertToPhar() 2008-01-16 07:24:39 +00:00
Greg Beaver
cb40b39b5b add support for creation of gzipped and bzipped tar-based phars 2008-01-15 23:41:44 +00:00
Marcus Boerger
9fe2dd5697 - cleanup and make build with HEAD 2008-01-14 18:06:05 +00:00
Greg Beaver
ba707bad4c fix test (make OS-agnostic) 2008-01-14 06:25:22 +00:00
Greg Beaver
505247b6ef fix test to be OS-agnostic
# steph - this is a different test from the one I fixed earlier, I think that's the confusion :)
2008-01-14 06:23:10 +00:00
Greg Beaver
34bb2d7e76 unixify path separators in tar-based phars, always use this value for duping alias
# found by delete.phpt unit test.  I love unit tests
2008-01-14 06:19:43 +00:00
Greg Beaver
0df060f18b add missing skip sections in zip tests 2008-01-14 05:25:11 +00:00
Greg Beaver
b4eecadd7c fix test (make OS-agnostic) 2008-01-14 05:19:23 +00:00