aboutsummaryrefslogtreecommitdiffstats
path: root/src/gunzip.c
Commit message (Collapse)AuthorAgeFilesLines
* io, database: preserve [am]time for cached and fetched filesTimo Teräs2015-11-091-0/+8
| | | | | | | | | | | preserve [am]time for all packages and indexes. this fixes the caching error that 'apk update' is after new index is generated, but before the used mirror is synchronized. this caused local apkindex timestamp to be newer than file in mirror, when in fact it was outdated index. this also fixes fetched files to have build timestamp so that files going to .iso or custom images have proper timestamps (rsync with appropriate --modify-window now works)
* rework error handling for read streamsTimo Teräs2015-03-101-4/+3
|
* io,url,db: support for if-modified-sinceTimo Teräs2014-10-081-3/+2
|
* io: fix few error path leaksTimo Teräs2014-10-071-4/+2
|
* all: update copyright year statementTimo Teräs2011-09-131-1/+1
|
* gunzip: fix ordering of boundary callbacksTimo Teräs2010-12-171-8/+24
| | | | | | | | | | The boundary callback should not happen until all the uncompressed data has been consumed. This previously seems to have worked because normally gzip library returns "no error" instead of the "stream end" if we extract exactly the amount of bytes remaining in the archive. (Perhaps this was changed in new zlib.) In any case, verification was broken with some apks due to this callback ordering issue.
* io: enhance istream/bstreams with pipe to forked childTimo Teräs2010-12-091-2/+2
| | | | | * prunes the child pid to avoid zombies * handles the errors so e.g. file-not-found is reported properly
* io: better error handling when writing stuff outTimo Teras2009-08-121-4/+9
| | | | | | also have the output stream support writing to temporary file and do renameat/unlinkat on close depending on if all writes succeeded or not.
* pkg: cleanup the signing codeTimo Teras2009-07-221-3/+8
| | | | | smaller callback and less cases to check. also reintroduce the oneshot digest flag, hopefully correct this time.
* various: more informative error messagesTimo Teras2009-07-221-12/+12
|
* various: installation fixesTimo Teras2009-07-221-8/+8
| | | | | | | | - extract everything as .apk-new and overwrite only after data has been checksummed - url construction fixes (to work with simple http servers) - end of gunzip stream fixed - remove oneshot digesting flag for now as it's usage was broken
* pkg: fix indexing of multi-part apksTimo Teras2009-07-211-21/+27
|
* db: fixes to package checksumming while installing itTimo Teras2009-07-211-3/+10
|
* gzip: fix finalization of compressed outputTimo Teras2009-07-201-5/+8
| | | | | the unflushed data when closing file can be several thousand kiloes, loop until all is written out.
* digest: use oneshot context flag where approriateTimo Teras2009-07-171-25/+19
| | | | speeds up digest calculation on some cases.
* pkg: fix index generationTimo Teras2009-07-171-7/+10
| | | | that got broke during verify implementation.
* various: new style index generationTimo Teras2009-07-161-9/+89
| | | | | | change the index generation to do old index, or the new style index where package identity is sha1 of control block and it's contained within an .tar.gz to allow signing in future.
* gzip: always autoclose the inner streamTimo Teras2009-07-161-5/+2
|
* bstream: make tokenizable and load index using bstreamTimo Teras2009-07-141-1/+5
| | | | some fixes on index reading code too.
* io: move csumming away from bstream to gunzipTimo Teras2009-07-131-8/+41
| | | | | in future we want to checksum on gzip boundary basis, not the full file.
* gunzip: accept concatenated gzip streamsTimo Teras2009-07-101-1/+11
| | | | | allow .apk to consist of multiple separate gzip streams which are just concatenated together.
* io: fix some memory leaksTimo Teras2009-01-061-1/+5
|
* io: check inner stream existance before creating gunzip streamTimo Teras2009-01-061-0/+3
|
* io: apk_ostream stuffTimo Teras2008-11-281-1/+1
|
* db: checksum installed files, protect config filesTimo Teras2008-11-141-1/+0
| | | | | | | Checksum of installed is computed on the fly when extracting them and it'll be saved to fdb. When installing config files those are diverted with suffix .apk-new if earlier version of same file with local changes exist.
* use zlib internally to decompressTimo Teras2008-11-071-0/+93