Commit Graph

22 Commits (cute-signatures)

Author SHA1 Message Date
Timo Teräs a673653200 database: implement uvol support
by adding an abstraction layer to the file system
2021-11-09 21:50:11 +02:00
Timo Teräs 5c0c249b78 extract: move uvol extraction code to extract
fix also the progress callback on uvol extraction
2021-11-03 15:37:10 +02:00
Timo Teräs d821265865 db, extract: handle waitpid returning EINTR 2021-11-03 15:37:10 +02:00
Timo Teräs 984cd3e0b6 extract: remove redundant file unlink on failure path
apk_extract_file() already calls unlink if the error is fatal.
2021-09-03 13:47:04 +03:00
Timo Teräs fd42c073bf extract: pass root object instead of database 2021-09-03 13:44:48 +03:00
Timo Teräs a46043bcc4 extract: fix directory handling
'is' is null for directories
2021-08-17 13:58:20 +03:00
Timo Teräs aa44cfac05 extract: fix extracting untrusted package 2021-08-03 21:21:43 +03:00
Timo Teräs f61eba0627 extract: use extraction api, and implement it for v3 packages
The extract applet now works with both v2 and v3 packages.
2021-07-30 17:54:25 +03:00
Timo Teräs 9c843e4ecd Refactor .apk extraction code
This moves and isolates the tar code to tar.c. And the actual
file extraction to disk is moved to extract.c.

A new API is introduced and used for v2 file extraction. This
essentially moves and isolates the apk_sign_ctx_* beast into
extract_v2.c and offers a saner interface to handling packages.

A place holder is added for v3 extraction.
2021-07-27 14:09:38 +03:00
Timo Teräs 2d4e88aeb1 extract: fix handling of error of regular file extraction
fix the error checking, allow --force-overwrite to work and
do not delete existing file in case of error
2021-07-26 21:08:09 +03:00
Timo Teräs 003e713502 adb: fix some error handling paths 2021-07-26 14:23:49 +03:00
Timo Teräs a0e9c909f7 extract: rework uvol name logic
Add uvol_name to struct apk_file_info so it can be passed down
the extract callbacks in future work. Modify uvol name to not
include the path, but just the filename portion.
2021-07-23 13:51:12 +03:00
Daniel Golle 6c41c6f32e extract: fix uvol parameter order 2021-07-23 13:37:17 +03:00
Timo Teräs 33e85fb1f1 extract: remove unneeded argument from uvol_extract 2021-07-22 16:14:49 +03:00
Timo Teräs 796d298313 rework apk_istream_splice and apk_istream_tee
- apk_istream_splice usage is converted to apk_stream_copy which
  is the newer variant. With caching enabled by default, this
  makes more sense mmapping or using separate buffers.

- apk_istream_tee is reworked to write to apk_ostream, which simplifies
  quite a bit of various things
2021-07-22 15:30:08 +03:00
Timo Teräs 3b00c0dc80 adb: unify various interfaces to adb_m_process
Removes code duplication, and puts important checks in one place.
Support seamless decompression in adbdump.
2021-07-22 15:30:08 +03:00
Timo Teräs 69bcdd23b9 adbsign: support compressed adb files 2021-07-22 15:30:08 +03:00
Timo Teräs b2819a6d5a extract: fix integrity check failure to remove the bad file/volume 2021-07-16 10:16:32 +03:00
Timo Teräs 22a81e8fb5 mkpkg, extract: implement support for symlinks, devices and fifos 2021-06-23 20:21:29 +03:00
Timo Teräs d89c219173 reduce misuse of error codes from errno.h 2021-06-19 16:10:13 +03:00
Timo Teräs fb3d3c5e4a extract: add experimental support for uvol volumes 2021-06-11 13:35:32 +03:00
Timo Teräs 91cb2514e4 extract: new applet to extract v2 packages 2021-06-11 13:35:32 +03:00