the stat64 family of functions were provided as transitional functions,
but when building on glibc with _GNU_SOURCE, or any other supported system,
the stat functions are equivalent to their stat64 counterparts
This options is useful for (post)install scripts to run with the same
environment variables as apk is executed.
[TT: minor stylistic changes]
Signed-off-by: Paul Spooren <mail@aparcar.org>
print installed packages in `<name> <version>` format. The format is
currently used in OpenWrt and allows downstream tools to compare what's
installed in the firmware.
Signed-off-by: Paul Spooren <mail@aparcar.org>
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.
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
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
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
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
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.
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.
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
Always return the original length; not the one with trailing '/'
amended.
fixes c60b7424 "optimize apk_pathbuilder_pop to get the old length"
ref #10784