summaryrefslogtreecommitdiff
path: root/src/io.c
AgeCommit message (Collapse)AuthorFilesLines
2009-08-12io: better error handling when writing stuff outTimo Teras1-12/+56
also have the output stream support writing to temporary file and do renameat/unlinkat on close depending on if all writes succeeded or not.
2009-08-11db, audit: audit symlinks (by hash of the link target)Timo Teras1-1/+14
2009-08-05io: flag for following symlinks on fstatTimo Teras1-2/+6
usually we are interested on the actual file's length. but audit is interested about the link. so add a flag for this and use it in audit.
2009-07-31apk: use *at instead of chdir+normal file syscallTimo Teras1-16/+18
this way we never change cwd, and relative filenames are always parsed consistently. this also helps filename construction in many places. this patch also changes '--root' to override location of all configuration to be in the new root. previously it depended on the file which one was used.
2009-07-31io: fix corruption of big files on mmap writeTimo Teras1-14/+13
remember to increment destination pointer; and munmap the proper base address.
2009-07-30audit: protection mask for "symlinks only"Timo Teras1-1/+1
and use it for /etc/init.d by default. fixes #99.
2009-07-30io: keep static pointer to copying bufferTimo Teras1-6/+6
so we avoid some malloc/free calls.
2009-07-30io: fix mmap writing to actually workTimo Teras1-4/+6
apparently it needs to have both PROT_READ and PROT_WRITE. and it needs to be MAP_SHARED for the writing to be effective. oh, and the data needs to be preallocated with ftruncate; otherwise, one gets SIGBUS.
2009-07-29io: use mmap to write archive entries to diskTimo Teras1-11/+28
avoids some copying and system calls.
2009-07-22pkg: cleanup the signing codeTimo Teras1-0/+1
smaller callback and less cases to check. also reintroduce the oneshot digest flag, hopefully correct this time.
2009-07-22various: more informative error messagesTimo Teras1-17/+23
2009-07-17digest: use oneshot context flag where approriateTimo Teras1-0/+3
speeds up digest calculation on some cases.
2009-07-16various: new style index generationTimo Teras1-0/+39
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.
2009-07-16gzip: always autoclose the inner streamTimo Teras1-1/+1
2009-07-14db: live with sha1 and md5Timo Teras1-5/+9
this also convers scripts file to a tar archive.
2009-07-14bstream: make tokenizable and load index using bstreamTimo Teras1-30/+68
some fixes on index reading code too.
2009-07-13io: move csumming away from bstream to gunzipTimo Teras1-32/+16
in future we want to checksum on gzip boundary basis, not the full file.
2009-06-29cache: new applet (ref #49)Timo Teras1-1/+2
Administrative tool to download or delete files to/from the cache.
2009-06-29db: cache packages (ref #49)Timo Teras1-0/+58
If /etc/apk/cache is a symlink to directory, a copy of all installed packages is stored there, and the index of remote repositories will be there instead of /var/lib/apk. This enables to reconstruct running system during boot. Left as todo: remove cached copy when the package is removed, and additional apk applet to download missing packages to cache and/or remove extra items.
2009-06-11io: fix mmap bstream fd leakTimo Teras1-1/+2
We need to close the fd on destruction. This is what the corresponding istream variant does too.
2009-04-16pkg: clean up writing of dependenciesTimo Teras1-0/+10
2009-03-17io: implement write cacheTimo Teras1-4/+35
speeds up writing of package / file database.
2009-01-07various: make fancy progress bar and update todoTimo Teras1-1/+5
2009-01-06io: fix some memory leaksTimo Teras1-1/+1
2008-11-28io: apk_ostream stuffTimo Teras1-8/+82
2008-11-28io: prepartions for url handlingTimo Teras1-13/+22
2008-11-27db: compressed index fileTimo Teras1-0/+12
2008-11-27various: use apk_istream apiTimo Teras1-0/+29
2008-11-14db: checksum installed files, protect config filesTimo Teras1-17/+28
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.
2008-11-07pkg: speed up indexing of version 2 .apksTimo Teras1-2/+16
2008-11-07io: implement mmap(2) for reading pkgsTimo Teras1-9/+98
2008-11-07use zlib internally to decompressTimo Teras1-0/+221