aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive.c
Commit message (Collapse)AuthorAgeFilesLines
* archive: fix long symlink target namesTimo Teräs2016-02-091-2/+2
| | | | | don't overwrite the link_target if it was found from pax header. ref #5076
* io, database: preserve [am]time for cached and fetched filesTimo Teräs2015-11-091-0/+13
| | | | | | | | | | | 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)
* fix issue introduced in previous xattr error handling changesTimo Teräs2015-04-171-2/+2
|
* disable xattrs on symlinks for nowTimo Teräs2015-04-171-1/+1
| | | | | | there's no nice syscall to manipulate xattrs with atfd and or open the symlink without dereferencing it (and having fd that we can do xattrs with)
* make file install errors non-fatal, and xattr errors hiddenTimo Teräs2015-04-171-53/+58
| | | | | | | | | user xattrs on tmpfs are not supported no non-grsec kernels, and many times root fs is mounted without user_xattr. Thus to allow things to go smoothly on non-grsec kernels xattr unsupported errors are now hidden. xattrs can be fixed still now with "apk fix --xattrs"
* calculate and store checksum of xattrsTimo Teräs2015-03-111-1/+4
| | | | ref #3027
* rename file info related functions for consistencyTimo Teräs2015-03-101-2/+2
|
* extract xattrs from packagesTimo Teräs2015-03-101-0/+33
| | | | ref #3027
* support extended pax header in tar extractorTimo Teräs2014-11-011-38/+83
|
* archive: fix handling of name lengths of exactly 100 bytesTimo Teräs2013-09-201-0/+3
|
* various: applet help text and comment fixesDubiousjim2013-06-281-1/+1
| | | | Acked-by: Natanael Copa <ncopa@alpinelinux.org>
* io: get rid of APK_PROGRESS_SCALETimo Teräs2013-06-171-2/+1
| | | | | no need to muldiv all the time, just pass the current amount of bytes done, and let callbacks use that directly.
* *.c: malloc.h->stdlib.hPierre Carrier2013-04-181-1/+1
|
* all: update copyright year statementTimo Teräs2011-09-131-1/+1
|
* io, db: id cache should be specific to database root, not system rootTimo Teräs2010-10-081-3/+3
| | | | | Otherwise we end up using wrong uid/gid mappings when doing install to alternate system root. Fixes #434.
* archive: resolve uid, gid for file informationTimo Teräs2010-09-231-6/+3
| | | | | the uid and gid are used in other places than just changing file ownership on extraction.
* Fix building on eglibcNatanael Copa2010-08-301-0/+1
| | | | Seems like recent eglibc requires that you include sys/stat.h
* archive: honor username/groupname instead of uid/gidTimo Teräs2010-06-121-1/+4
| | | | Take the uid/gid from passwd and group.
* various: use O_CLOEXEC and add some error checkingTimo Teräs2010-06-111-1/+1
|
* First steps for libapkNatanael Copa2010-06-111-0/+1
|
* apk: remove the unneeded --never-overwriteTimo Teras2009-12-211-18/+1
| | | | | turns out the logic does not work with overlays as expected due to busybox symlinks being unmanaged. remove the useless option.
* archive: overwrite protection needs to use real filenameTimo Teras2009-11-061-1/+7
| | | | | otherwise we always extract the file as .apk-new and the database side just overwrites.
* apk: add --never-overwrite flag (ref #197)Timo Teras2009-11-061-2/+20
| | | | | | | to never ever overwrite a while in the filesystem the user knows about. it gives the impression of extraction succeeding even though nothing was done. this is inteded to be used only for bootstrapping with overlay.
* index, version: support for repository descriptions (fixes #141)Timo Teras2009-09-031-1/+2
| | | | | ability embed description information to repository indexes (e.g. repository name and version) and show it via "apk version -I".
* archive: update for new place of checksum in tar headerTimo Teras2009-08-111-9/+26
| | | | and take checksums for symlinks too.
* db, audit: audit symlinks (by hash of the link target)Timo Teras2009-08-111-1/+1
|
* archive: compile fixNatanael Copa2009-08-031-0/+1
| | | | We need the define for uint16
* apk: use *at instead of chdir+normal file syscallTimo Teras2009-07-311-26/+29
| | | | | | | | 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.
* io: fix mmap writing to actually workTimo Teras2009-07-301-1/+1
| | | | | | | 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.
* tar: make checksumming of inner files conditionalTimo Teras2009-07-291-4/+7
| | | | | and force checksumming only when unpacking archive. otherwise it's extra computation for nothing.
* tar: don't call digest finalization twiceTimo Teras2009-07-291-0/+3
| | | | | otherwise bad things happens. avoid this be checking end of stream at the beginning of read.
* archive: append .apk-new to hard link targetsNatanael Copa2009-07-231-1/+5
| | | | Otherwise will link(2) fail since it does not exist.
* various: more informative error messagesTimo Teras2009-07-221-10/+11
|
* various: installation fixesTimo Teras2009-07-221-1/+2
| | | | | | | | - 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
* various: fix installation of new style apksTimo Teras2009-07-211-1/+1
|
* pkg: fix indexing of multi-part apksTimo Teras2009-07-211-3/+3
|
* db: fixes to package checksumming while installing itTimo Teras2009-07-211-7/+12
|
* db: signed index loading (ref #46)Timo Teras2009-07-201-0/+5
| | | | prefer index in the new format as signed .tar.gz.
* archive: use the abuild-tar mangled checksum if availableTimo Teras2009-07-161-8/+28
| | | | to speed up apk installation avoid calculating checksums.
* various: new style index generationTimo Teras2009-07-161-12/+27
| | | | | | 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-13/+0
|
* db: live with sha1 and md5Timo Teras2009-07-141-9/+82
| | | | this also convers scripts file to a tar archive.
* blob: some helpers to replace snprintfTimo Teras2009-07-141-1/+1
| | | | | snprintf is dog slow. make the blob stuff have some helper functions so we can use them in code paths that are executed often.
* bstream: make tokenizable and load index using bstreamTimo Teras2009-07-141-1/+6
| | | | some fixes on index reading code too.
* io: move csumming away from bstream to gunzipTimo Teras2009-07-131-2/+2
| | | | | in future we want to checksum on gzip boundary basis, not the full file.
* archive: utimes modifies file, not link so don't use it for symlinksTimo Teras2009-01-171-7/+9
|
* archive: preserve mtime on extractionapk-tools-2.0_pre4Timo Teras2009-01-171-8/+27
|
* archive: set suid bit after chown if neededNatanael Copa2009-01-171-0/+6
| | | | chown will reset the suid bit so we need to set it again.
* various: make fancy progress bar and update todoTimo Teras2009-01-071-2/+4
|
* io: fix some memory leaksTimo Teras2009-01-061-1/+8
|