aboutsummaryrefslogtreecommitdiffstats
path: root/src/apk_io.h
Commit message (Collapse)AuthorAgeFilesLines
* io: make io vtables const struct, and add accessors for themTimo Teräs2017-06-231-4/+48
| | | | | This reduces function pointers in heap, and unifies how the io functions are called.
* io, database: preserve [am]time for cached and fetched filesTimo Teräs2015-11-091-0/+7
| | | | | | | | | | | 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)
* audit xattrsTimo Teräs2015-04-081-0/+2
| | | | ref #3027
* calculate and store checksum of xattrsTimo Teräs2015-03-111-0/+2
| | | | ref #3027
* rename file info related functions for consistencyTimo Teräs2015-03-101-3/+3
|
* extract xattrs from packagesTimo Teräs2015-03-101-0/+8
| | | | ref #3027
* remove support for old database location in /varTimo Teräs2015-01-301-1/+0
| | | | | the location changed in apk-tools 2.1.0 (March 2011) which was used in Alpine Linux 2.2.
* io,url,db: support for if-modified-sinceTimo Teräs2014-10-081-4/+21
|
* url: fix fetching from local repositoriesNatanael Copa2013-06-181-2/+3
|
* cache: implement progress bar (ref #1170)Timo Teräs2013-06-171-1/+2
|
* url: remove unused apk_url_downloadTimo Teräs2013-06-171-1/+0
|
* io: fix splice for copying unknown lengthsTimo Teräs2013-06-171-2/+13
|
* libapk, apk(8): fix header inclusion issues with musl's headersWilliam Pitcock2013-06-121-0/+1
|
* db: keep architecture in $ROOT/etc/apk/archTimo Teräs2012-02-231-2/+5
| | | | This we use proper arch in case modifying chroot installation.
* db, io: load repositories also from etc/apk/repositories.d/*.listTimo Teräs2012-02-221-1/+1
| | | | | Load additional repositories from $ROOT/etc/apk/repositories.d/*.list unless --repositories-file is given as parameter.
* db, solver, io: scan cache items at startupTimo Teräs2012-02-221-0/+3
| | | | | | It is faster to just scan the cache directory for existing packages at startup than trying to faccessat() them on demand. It also makes quite a few parts of the code more readable and simpler.
* all: update copyright year statementTimo Teräs2011-09-131-1/+1
|
* db: relocate from /var/lib/apkTimo Teräs2011-03-161-0/+1
| | | | | | | | move all files therein to other places. this allows /var to be mounted from harddisk, but rest of system be run from ramdisk. this also removes support for historical version of the scripts database which was obsoleted in 2.0_pre16 (in July 2009).
* io: enhance istream/bstreams with pipe to forked childTimo Teräs2010-12-091-2/+12
| | | | | * prunes the child pid to avoid zombies * handles the errors so e.g. file-not-found is reported properly
* io, db: id cache should be specific to database root, not system rootTimo Teräs2010-10-081-5/+13
| | | | | Otherwise we end up using wrong uid/gid mappings when doing install to alternate system root. Fixes #434.
* archive: honor username/groupname instead of uid/gidTimo Teräs2010-06-121-0/+6
| | | | Take the uid/gid from passwd and group.
* io: better error handling when writing stuff outTimo Teras2009-08-121-3/+3
| | | | | | also have the output stream support writing to temporary file and do renameat/unlinkat on close depending on if all writes succeeded or not.
* io: flag for following symlinks on fstatTimo Teras2009-08-051-1/+3
| | | | | | 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.
* apk: use *at instead of chdir+normal file syscallTimo Teras2009-07-311-9/+10
| | | | | | | | 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.
* pkg: cleanup the signing codeTimo Teras2009-07-221-0/+1
| | | | | 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-2/+2
|
* digest: use oneshot context flag where approriateTimo Teras2009-07-171-4/+7
| | | | speeds up digest calculation on some cases.
* various: new style index generationTimo Teras2009-07-161-0/+1
| | | | | | 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-4/+3
|
* db: live with sha1 and md5Timo Teras2009-07-141-3/+4
| | | | this also convers scripts file to a tar archive.
* bstream: make tokenizable and load index using bstreamTimo Teras2009-07-141-1/+1
| | | | some fixes on index reading code too.
* io: move csumming away from bstream to gunzipTimo Teras2009-07-131-2/+15
| | | | | in future we want to checksum on gzip boundary basis, not the full file.
* csum: use openssl insteadTimo Teras2009-07-081-0/+1
| | | | | instead of having static md5 implemenation, use the openssl library for digest functions.
* db: cache packages (ref #49)Timo Teras2009-06-291-1/+2
| | | | | | | | | | | 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.
* db: cache index files, 'update' appletTimo Teras2009-04-161-0/+2
| | | | | | Cache non-local index files always locally. Introduce 'update' applet to force refresh of cached index files. Fixes #19.
* pkg: clean up writing of dependenciesTimo Teras2009-04-161-0/+1
|
* fetch: new applet to download .apk filesTimo Teras2009-04-151-0/+2
| | | | Fixes #24.
* db: index file location is a URLTimo Teras2009-01-151-0/+1
|
* various: make fancy progress bar and update todoTimo Teras2009-01-071-1/+2
|
* io: fix some memory leaksTimo Teras2009-01-061-1/+1
|
* io: apk_ostream stuffTimo Teras2008-11-281-3/+12
|
* io: prepartions for url handlingTimo Teras2008-11-281-0/+3
|
* db: compressed index fileTimo Teras2008-11-271-0/+4
|
* various: use apk_istream apiTimo Teras2008-11-271-0/+1
|
* db: checksum installed files, protect config filesTimo Teras2008-11-141-2/+15
| | | | | | | 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/+38