summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-05-02add: allow specifying a version for --virtual packagett-add-virtual-versionTimo Teräs2-19/+34
fixes #10835
2022-04-11portability: check for qsort_r which does not match POSIX-next definitionAriadne Conill2-0/+40
FreeBSD (and also Darwin) introduced its own qsort_r, which has different semantics than the one slated for inclusion in POSIX. Add a portability thunk to deal with translating between implementations. [TT: minor stylistic fixes]
2022-04-05io: move make_dirs as apk_make_dirs and use itTimo Teräs5-31/+22
2022-04-05db: fix atfd for access repository indexTimo Teräs1-2/+3
fixes #10834
2022-04-04mkpkg: use correct script counter when writing scripts to adbDaniel Kolesa1-1/+1
Previously this would result in post-upgrade scripts not being written at all.
2022-03-31package: respect version fuzziness when creating dep from adbDaniel Kolesa1-0/+1
2022-03-30keep APK_DEFAULT_ARCH as the define used in source codeAriadne Conill4-26/+26
2022-03-30use arch_prefix for this feature insteadAriadne Conill6-11/+11
2022-03-30use APK_DEFAULT_ABI_TAG everywhere APK_DEFAULT_ARCH was previously usedAriadne Conill3-4/+4
2022-03-30defines: introduce APK_DEFAULT_ABI_TAGAriadne Conill1-0/+6
for most cases, this replaces APK_DEFAULT_ARCH. if apk-tools is built without a configured abi-tag, the ABI tag is equivalent to APK_DEFAULT_ARCH, providing backwards compatibility with apk v2 the /etc/apk/arch configuration file is assumed to actually describe an ABI tag.
2022-03-30meson: support definition of a custom abi tagAriadne Conill2-0/+6
this is intended to allow for distributions to have alternate streams, such as glibc-x86_64 or darwin-aarch64
2022-03-29db: make --no-cache disable the cache completelytt-no-cacheTimo Teräs1-4/+11
Including using files found from the cache, or creating the cache directories with --initdb. Based on patch by Paul Spooren.
2022-03-29pkg: recursive create exec dirTimo Teräs1-15/+34
fixes #10825
2022-03-21mkndx: fix v3 package handlingTimo Teräs1-2/+0
remove incorrect intialization of the ctx->pkginfo fixes commit 950972a5 "mkndx: fix index generation for v2 and v3 packages"
2022-03-21package: fix error message when script fails to executeDaniel Kolesa1-1/+1
Related: https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10825
2022-03-21adb: use qsort_rTimo Teräs1-33/+35
2022-03-21portability: add qsort_rTimo Teräs3-0/+34
2022-03-21mkndx, adb: fix index searchingTimo Teräs4-78/+97
Additioal logic is needed to search objects on array: the object comparer needs separate modes to match index, template or exact object template. This should fix mkndx to be able to use old index. fixes #10828
2022-03-21mkndx: fix index generation for v2 and v3 packagesTimo Teräs3-36/+50
For v2 packages, the identity was never set. For v3 packages, the file size was never set. This fixes both issues.
2022-03-07portability, fetch: drop static_deps dependenciesDaniel Kolesa2-2/+0
This is not actually needed, and it results in both static and shared versions of zlib and openssl linked into libapk otherwise, which is bad.
2022-03-07adb: fix handling of conflictsDaniel Kolesa3-6/+14
Ensure not to mask away previously set APK_VERSION_CONFLICT when serializing. When deserializing, make sure to actually write out the conflict flag when no version part is set. When creating apk_dependency, ensure to set the conflict bit correctly and mask it off result_mask. Fixes https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10824
2022-03-07test: fix tests by setting sane active_layers without stateTimo Teräs1-0/+1
finally fixes #10821
2022-03-06db: fix APK_OPENF_NO_STATE checkDaniel Kolesa1-1/+1
fixes #10821
2022-03-06mkpkg: use -I for --infoTimo Teräs1-1/+1
-i is already global option fixes #10822
2022-03-06mkpkg: check apk_ostream_to_file/adb_compress errorTimo Teräs1-1/+6
fixes #10823
2022-03-06db: honor APK_OPENF_NO_STATE againTimo Teräs1-8/+10
Do not call apk_db_read_layer() or try to process the layer if APK_OPENF_NO_STATE is specified. It might fail because of non-existing database directory. Based on patch by Daniel. fixes commit 9e4dd29f "db: prepare database reading for layers" Fixes #10821 Reported-and-analyzed-by: Daniel Kolesa <daniel@octaforge.org>
2022-02-24pkg: use lib/apk/exec as the package script execution directoryTimo Teräs1-11/+15
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-22db, uvol: commit regular files before uvol volumesTimo Teräs4-4/+30
add priority to order fsdir commit sequence
2022-02-22db: fix apkindex path generationTimo Teräs1-1/+1
remove the left over apk_blob_push_fmt() call that corrupted uri and trim the path end from trailing slashes to get original functionality. fixes commit be4ce407 "support new index format without attaching arch"
2022-02-21io_gunzip: fix handling short reads near end-of-fileTimo Teräs1-12/+15
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-21fs_fsys: ignore mkdir EEXISTTimo Teräs1-1/+2
Be happy if the directory already exists.
2022-02-21tar: allow for space as numeric field terminatorptrcnull1-1/+1
2022-02-21solver: require package layer to be enabled for installTimo Teräs2-3/+7
2022-02-21adb: add layer to pkginfoTimo Teräs3-1/+4
2022-02-21db: sort world dependencies to layersTimo Teräs5-7/+27
2022-02-21db: prepare database writing for layersTimo Teräs1-135/+172
2022-02-21db: prepare database reading for layersTimo Teräs4-25/+58
2022-02-14support new index format without attaching archPaul Spooren1-8/+20
By default the package architecture is attached to the repository url. With this commit it is possible to define new indexes ending on `.adb`. If such index file is detected the packages must be in the same folder as the index. Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-02-14fs_uvol: take down volume before removalDaniel Golle1-0/+4
Make sure volume is in 'down' state before attempting to remove it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-02-13context: fix 'uvol' default pathDaniel Golle1-1/+1
'uvol' is installed to /usr/sbin by default. Assume that path if not set by APK_UVOL environment variable. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-02-03database: fix apk_db_cache_active returning true when cache not configuredAriadne Conill1-1/+1
this regression was caused by refactoring of the options handling into the apk_ctx struct in 354713d2, presumably a little too much innovation with sed fixes #10799
2022-02-01mkpkg, adb: validate version and dependency formatTimo Teräs6-11/+26
Fail if the package or dependency version format is not valid. fixes #10807
2022-01-24fix typo on apk-add.8.scdThiago Perrotta1-1/+1
2022-01-21genhelp: fix upper case substitionTimo Teräs1-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-17package: fail on invalid control dataTimo Teräs2-11/+18
Handle meta data error to produce hard failure. fixes #10806
2022-01-13support building with uncompressed help databasesAriadne Conill4-19/+41
2021-12-29package: factor out /dev initialization to linux-specific helper functionAriadne Conill1-8/+20
2021-12-29database: refactor mounting and unmounting /procAriadne Conill1-19/+44