summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-12-14everywhere: use stdlib.h for malloc(3) definition, not GNU-specific malloc.hAriadne Conill8-8/+1
musl implements support for malloc.h, but it is only a stub. we do not use any of the GNU-specific malloc interfaces, so just use POSIX stdlib.h instead. ref #10794
2021-12-13lua: remove features.hAriadne Conill1-1/+0
features.h is a GNU-specific header, and is not required for POSIX-compatible code macOS does not provide features.h ref #10794
2021-12-09libfetch: avoid use of strdupa GNU extensionAriadne Conill1-1/+2
ref #10794
2021-12-03extract_v3: make sure empty file's hash is copied tooTimo Teräs1-2/+2
fixes #10785
2021-12-03db: convert v3 scripts to ipkg on installTimo Teräs4-9/+32
fixes #10796
2021-12-02extract: fix uvol to not be called for uvol directoryTimo Teräs1-2/+8
2021-11-22db: synthesize symlink hashes for v3 packagesTimo Teräs2-11/+18
The v3 format will not require the hash, but synthesize it to the DB so v3 packages can get installed properly. fixes #10785
2021-11-22db: fix regression in creating .apk-new filesTimo Teräs2-4/+6
The apk_fsdir_file_digest() servers dual purpose: to calculate the checksum, but also to determine if the file exists. Move it's error check where it originally was. fixes #10791
2021-11-15db: lazy create directories with --initdbTimo Teräs3-88/+73
fixes #10778
2021-11-15fs_fsys: fix extraction of symlinksTimo Teräs1-6/+8
Symlinks should use the real target filename instead of the temporary extraction name.
2021-11-15extract_v2: handle "untrusted package" as normal errorTimo Teräs1-1/+1
The "untrusted" error is higher priority than malformed package. But given that we expect valid .apk or index as argument, the untrusted error is likely more accurate than having malformed package.
2021-11-15commit: print download size of packages in interactive modeTimo Teräs1-3/+12
ref #10788
2021-11-15fix fetching of depdencies only packagesTimo Teräs4-16/+12
Remove the APK_REPOSITORY_CACHED bit from dependencies only packages (that is, installed_size == 0). For fetch, the problem is that apk_db_select_repo() would return the cache repository, but the package would not be there. Update also the locations needed to handle these packages correctly without the cached repository bit being set.
2021-11-12fetch: add --url option to print the download URLsTimo Teräs2-6/+17
2021-11-11pkg: fix reading of v3 package meta dataTimo Teräs1-1/+1
The adb object for apk_pkg_from_adb() was changed in commit 7d6de220 "database: support loading v3 indexes" which also addressed the broken site in question but omitted updating the argument. fixes #10783
2021-11-11pathbuilder: fix push return valueTimo Teräs1-2/+2
Always return the original length; not the one with trailing '/' amended. fixes c60b7424 "optimize apk_pathbuilder_pop to get the old length" ref #10784
2021-11-11extract_v3: fix extraction of zero length filesTimo Teräs1-2/+3
The apk_istream is null for zero length files, and needs special handling. fixes #10784
2021-11-09optimize apk_pathbuilder_pop to get the old lengthTimo Teräs5-21/+21
avoids memrchr
2021-11-09adbdump: fix dumping signaturesTimo Teräs1-1/+4
give a fake trust root allowing anything. adbdump code will verify and dump each signature individually.
2021-11-09database: support loading v3 indexesTimo Teräs5-20/+56
2021-11-09database: implement uvol supportTimo Teräs19-434/+710
by adding an abstraction layer to the file system
2021-11-03db: purge temporary files without explicit modification checkTimo Teräs1-1/+2
When extraction failed, the user has had no opportunity to edit any files. Just clean up.
2021-11-03extract: move uvol extraction code to extractTimo Teräs4-97/+99
fix also the progress callback on uvol extraction
2021-11-03db, extract: handle waitpid returning EINTRTimo Teräs2-3/+3
2021-11-03db, audit: support sha256-160 hashes for v3 pkg compatTimo Teräs6-13/+33
2021-10-27db, add: support adding v3 package filesTimo Teräs9-14/+144
2021-10-25mkpkg: make unique-id field a blobTimo Teräs4-2/+30
2021-10-25version: increase number of digits supported in version componentTimo Teräs3-3/+8
Report also version numbers as invalid if there's more than 18 digits. fixes #10774
2021-10-04enable uvol support by defaultTimo Teräs1-1/+1
2021-09-13adb: fix --allow-untrusted to work againTimo Teräs2-4/+11
and fix the error code if untrusted adb is seen
2021-09-03test: improve posix sh compatibilityAlex Xu (Hello71)3-5/+5
2021-09-03extract: remove redundant file unlink on failure pathTimo Teräs1-1/+0
apk_extract_file() already calls unlink if the error is fatal.
2021-09-03extract: pass root object instead of databaseTimo Teräs5-19/+19
2021-09-03add: warn when creating empty virtual packagesAlex Xu (Hello71)2-0/+3
see https://gitlab.alpinelinux.org/alpine/aports/-/issues/11736 [TT: minor stylistic change]
2021-08-24tar: include missing limits.hPaul Spooren1-0/+1
Without this header the build fails when used as a OpenWrt build dependency. Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-08-23mkpkg: add support for scripts and triggersTimo Teräs2-1/+37
2021-08-23trust: always use have valid struct apk_trust *Timo Teräs5-25/+26
Make sure we always have valid struct apk_trust * for code using it. Load the signing keys directly when being specified to produce sane error message if loading them fails.
2021-08-23remove IS_ERR_OR_NULLTimo Teräs11-22/+21
In most places where pointer can be an 'error' it cannot be null pointer. Further, in those cases just calling PTR_ERR() is not enough to handle the null case. Simplify code by removing this case. If NULL case needs to be handled, it's better to add separate check and return fixed error code in that case.
2021-08-23extract: support v3 index verificationTimo Teräs2-5/+29
2021-08-23tar: improve compatibilityTimo Teräs1-20/+30
- check magic field for 'ustar' on read - harden get_octal to report errors on non-octal characters (e.g. GNU base256 encoding), fixes #10757 - fix mtime and size octal fields to not have zero terminator
2021-08-23db: honor SOURCE_DATE_EPOCH for scriptdbTimo Teräs1-2/+0
fixes #10762
2021-08-23list: recognize both --upgradable and --upgradeableTimo Teräs2-2/+4
fixes #10759
2021-08-17extract: fix directory handlingTimo Teräs1-7/+8
'is' is null for directories
2021-08-03extract: fix --force-overwriteTimo Teräs1-1/+1
Directories are handled specially in package installation code, but extract applet uses also apk_extract_file() to create directories. These should not be unlinked as that fails with unexpected error code terminating the extraction.
2021-08-03libfetch: fix http chunked mode handlingTimo Teräs1-1/+1
Unbreak handling of base 16 in fetch_parseuint(). It is used only in http chunked mode handling. Fixes: "libfetch: fix range checking for http/ftp protocol parsing"
2021-08-03extract: fix extracting untrusted packageTimo Teräs2-3/+6
2021-07-30manifest: support v3 packagesTimo Teräs1-0/+42
2021-07-30verify: support v3 packagesTimo Teräs2-4/+24
2021-07-30mkndx: support v3 packagesTimo Teräs1-0/+14
2021-07-30extract: use extraction api, and implement it for v3 packagesTimo Teräs6-209/+298
The extract applet now works with both v2 and v3 packages.