summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-12-21apk, fetch: implement --no-check-certificateTimo Teräs4-2/+20
fixes #10650
2022-12-21pkg: increase index entry buffer sizeTimo Teräs1-1/+1
2022-12-20build: remove -WerrorTimo Teräs1-1/+1
2022-12-20solver: fix queue resolving orderTimo Teräs1-3/+3
It makes sense to not prioritize requirers anymore. It was originally intended to select early packages with multiple constraints seen. However, more important are the constraints that actually limit the choise. fixes #10843
2022-12-20solver, commit: handle install_if via provided names correctlyTimo Teräs2-43/+95
Correctly trigger install_ifs for provided names also. And fix the construction of error messages concerning such install_if packages. ref #10843
2022-12-20db: simplify reverse name list creationTimo Teräs1-12/+12
2022-12-20apk: improve interactive mode handlingTimo Teräs3-1/+10
- implement and document --no-interactive - improve --interactive documentation - treat EOF as Y fixes #10860
2022-12-20commit: correctly analyze virtual provides induced errorsTimo Teräs4-15/+83
The package list cannot be used to determine name state, as packages are not selected through all of their names, and that effects the status of unversioned provides. Thus the name state must be calculated in separate step via the dependency graphs. ref #10847
2022-06-06apk-tools-2.12.10v2.12.10Timo Teräs1-1/+1
2022-06-03fetch: implement --worldTimo Teräs2-5/+23
fixes #10838
2022-06-03add: allow specifying a version for --virtual packageTimo Teräs3-18/+36
fixes #10835
2022-06-03db: fix atfd for access repository indexTimo Teräs1-2/+3
fixes #10834
2022-06-03pkg: recursive create exec dirTimo Teräs1-2/+16
fixes #10825
2022-02-25io_gunzip: fix handling short reads near end-of-fileTimo Teräs1-8/+13
The gzip library can drain all of the input to internal buffers and still keep providing data even if avail_in is zero. Previously it was assumed that avail_in != 0 if there is still data expected out, but this logic breaks near end-of-file for multiple short reads. Adjust logic to not process end-of-file event too early. fixes #10809
2022-02-24pkg: use lib/apk/exec as the package script execution directoryTimo Teräs1-5/+13
var/cache is also reported to be mounted noexec on hardened systems. Document some of the issues, and use lib/apk/exec for the time being. Keep the scripts still in separate directory from lib/apk so we can just delete directory if needed. fixes #6591
2022-02-24solver: do not auto select virtual-only package with one providerTimo Teräs5-2/+12
This reverts most of 0dcbd933 which allowed automatic selection of package with a "virtual provides" having only one provider. While convenient, it creates problems if multiple versions of the same package exist, or if in future other providers would be added to one of the repositories. This restore the original behaviour, and improve the error message to tell the user to mention one of the providers explicitly. fixes #10810
2022-02-24tar: allow for space as numeric field terminatorptrcnull1-1/+1
2022-01-21cache: allow various flags, and addition of dependenciesTimo Teräs2-17/+67
Allow controlling 'cache download' more closely to 'upgrade' so it can be used to pre-download packages for ugprade.
2022-01-21genhelp: fix upper case substitionTimo Teräs1-1/+1
2022-01-17package: fail on invalid control dataTimo Teräs2-12/+13
Handle meta data error to produce hard failure. fixes #10806
2021-12-20io.c: add missing limits.hPaul Spooren1-0/+1
Fixes compilation on MacOS X
2021-12-20ci: strip static binaryKevin Daudt1-1/+1
To reduce the file size, strip the static binary.
2021-12-20ci: use arch-tagged images for static buildKevin Daudt1-1/+1
For 32-bits arches, we use 64-bit arches in 32-bit mode. Docker by default wants to pull the image for the native arch, so unless we take care, the binaries will be built for the wrong arch. Use the arch tagged images we build to make sure we get the correct image.
2021-12-17apk-tools-2.12.9v2.12.9Timo Teräs1-1/+1
2021-12-17libfetch: Allow special characters in http basic authJan Hendrik Farr1-14/+62
Currently, special characters in the username or password are not handled correctly (when set in $http_proxy and $https_proxy). They should be percent encoded in the environment variables then decoded by libfetch and reencoded using base64. This implementation is mainly taken from the current FreeBSD source and adapted to the apk-tools version of libfetch. fixes #10775
2021-12-14applet: suppress is_error warning on clangAriadne Conill1-2/+3
clang does not ignore inline functions when checking for unused functions ref #10794
2021-12-14applet: rework APK_DEFINE_APPLET to use constructor attributeAriadne Conill4-40/+29
this allows the applet registration to work in a portable way, without having to weird things with the linker. ref #10794 [TT: rebased for 2.12]
2021-12-14ci: create release from tagsKevin Daudt1-0/+47
2021-12-14ci: add job to build static binaryKevin Daudt1-0/+26
2021-12-14libfetch: use pkg-config to find openssl cflagsAriadne Conill1-0/+7
on mac, openssl is usually provided by Homebrew or some other third-party package management system, which means pkg-config is needed to find it. we already use pkg-config to find openssl when building apk itself. ref #10794
2021-12-14everywhere: use stdlib.h for malloc(3) definition, not GNU-specific malloc.hAriadne Conill7-7/+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-14lua: 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-14commit: print download size of packages in interactive modeTimo Teräs1-3/+12
ref #10788
2021-12-14fix 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-12apk-tools-2.12.8v2.12.8Timo Teräs1-1/+1
2021-11-12fetch: add --url option to print the download URLsTimo Teräs2-6/+17
2021-11-12db: 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-10-25version: increase number of digits supported in version componentTimo Teräs2-3/+7
Report also version numbers as invalid if there's more than 18 digits. fixes #10774
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-03apk-tools-2.12.7v2.12.7Timo Teräs1-1/+1
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-07-26apk-tools-2.12.6v2.12.6Timo Teräs1-1/+1
2021-07-26libfetch: fix range checking for http/ftp protocol parsingTimo Teräs5-61/+70
Various parsing of numeric strings were not having adequate range checking causing information leak or potential crash. CVE-2021-36159 fixes #10749 Co-authored-by: Ariadne Conill <ariadne@dereferenced.org> Reported-by: Samanta Navarro <ferivoz@riseup.net>
2021-07-26db: fix installed db writing with long namesSamanta Navarro1-6/+11
Packages containing files with path names longer than 1024 characters cannot fit into the buffer which is used to write "installed" database. This leads to bbuf being APK_BLOB_NULL in apk_db_write_fdb because apk_blob_push_blob notices the condition and correctly handles it. The problem occurs when arguments to apk_ostream_write are manually calculated by pointer arithmetics. Since bbuf.ptr is NULL in such a case, bbuf.ptr - buf leads to a huge size value while buf still points into the stack. fixes #10751 [TT: minor edit to commit and abbreviating the commit message]
2021-07-26Use __attribute__ ((format)) where possible and fix issues found by itTimo Teräs3-7/+10
2021-07-25io_archive: Use SOURCE_DATE_EPOCH for meta files instead of current timekpcyrd3-1/+18
[TT: minor stylistic changes]
2021-07-23db: allow read-only operations without cacheTimo Teräs4-11/+29
fixes #10748
2021-07-23libfetch: simplify code by merging protocol error handling branchesTimo Teräs2-36/+22
removes some code duplication