...
 
Commits (719)
apk
apk.static
src/apk
src/apk-test
src/apk.static
src/help.h
test/*.got
test/repos.out
test/repos.stamp
test/test*.out
test/test*.ok
libfetch/*err.h
*.a
*.o
*.d
*.cmd
*.so
*.so*
*.5
*.8
*.pc
config.mk
stages:
- test
test:alpine:
image: alpine
stage: test
script:
- apk update
- apk add make gcc git musl-dev openssl-dev linux-headers zlib-dev lua5.3-dev lua5.3-lzlib
- make -j$(nproc) check
tags:
- docker-alpine
- x86_64
test:debian:
image: debian
stage: test
script:
- apt-get update
- apt-get install -y make gcc git libssl-dev zlib1g-dev lua5.3-dev lua5.2 lua-zlib-dev sudo
- unlink /bin/sh
- ln -s /bin/bash /bin/sh
- make -j$(nproc) check
tags:
- docker-alpine
- x86_64
A. Wilcox <AWilcox@Wilcox-Tech.com>
Ariadne Conill <ariadne@dereferenced.org> <nenolod@dereferenced.org>
Ariadne Conill <ariadne@dereferenced.org> <kaniini@dereferenced.org>
Natanael Copa <ncopa@alpinelinux.org> <natanael.copa@gmail.com>
Natanael Copa <ncopa@alpinelinux.org> <ncopa@ncopa-laptop.localdomain>
Natanael Copa <ncopa@alpinelinux.org> <ncopa@alpine-netbook.(none)>
Timo Teräs <timo.teras@iki.fi>
This diff is collapsed.
##
# A set of makefile rules loosely based on kbuild.
all: compile
default: compile
all: compile docs
test check:
ifndef build
......@@ -49,9 +53,15 @@ export srctree objtree
TAGPREFIX ?= v
GIT_REV := $(shell test -d .git && git describe || echo exported)
ifneq ($(GIT_REV), exported)
FULL_VERSION := $(patsubst $(TAGPREFIX)%,%,$(GIT_REV))
ifneq ($(CI_COMMIT_TAG),)
FULL_VERSION := $(CI_COMMIT_TAG)
else ifneq ($(CI_COMMIT_REF_NAME),)
# GitLab but no tag info, use the 'git describe' from environment variable
# once https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1633
# gets completed and merged upstream.
FULL_VERSION := $(VERSION)
else ifneq ($(wildcard .git),)
FULL_VERSION := $(patsubst $(TAGPREFIX)%,%,$(shell git describe))
else
FULL_VERSION := $(VERSION)
endif
......@@ -65,7 +75,11 @@ export FULL_VERSION RCS_FIND_IGNORE
CROSS_COMPILE ?=
CC := $(CROSS_COMPILE)gcc
AR := $(CROSS_COMPILE)ar
LD := $(CROSS_COMPILE)ld
LN := ln -sf
SCDOC := scdoc
SED := sed
INSTALL := install
INSTALLDIR := $(INSTALL) -d
......@@ -76,7 +90,7 @@ CFLAGS_ALL += $(CFLAGS)
LDFLAGS ?= -g
LDFLAGS_ALL += $(LDFLAGS)
export CC LD INSTALL INSTALLDIR CFLAGS_ALL LDFLAGS_ALL
export CC AR LD LN SCDOC SED INSTALL INSTALLDIR CFLAGS_ALL LDFLAGS_ALL
build :=
......@@ -84,9 +98,15 @@ endif
##
# Reset all variables.
ifneq ($(origin subdirs),file)
subdirs :=
endif
ifneq ($(origin targets),file)
targets :=
endif
ifneq ($(origin nontargets),file)
nontargets :=
endif
src :=
obj :=
......@@ -105,7 +125,7 @@ endif
##
# Rules and helpers
PHONY += all compile install clean FORCE
PHONY += all compile install clean docs FORCE
# Convinient variables
comma := ,
......@@ -174,10 +194,14 @@ if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \
#####
# Handle options to gcc.
c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS_ALL) $(CFLAGS_EXTRA) \
$(CFLAGS_$(notdir $@))
c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CPPFLAGS) \
$(CFLAGS_ALL) $(CFLAGS_EXTRA) $(CFLAGS_$(notdir $@))
ld_flags = $(LDFLAGS_ALL) $(LDFLAGS_EXTRA) $(LDFLAGS_$(notdir $@))
#####
# Generated targets
generate: $(addprefix $(obj)/,$(sort $(generate-y)))
#####
# Compile c-files.
quiet_cmd_cc_o_c = CC $@
......@@ -193,47 +217,96 @@ endef
$(obj)/%.o: override local-target-prereqs=%
$(obj)/%.o: $(src)/%.c FORCE
$(obj)/%.o: $(src)/%.c FORCE | generate
$(call if_changed_rule,cc_o_c)
#####
# Link static libraries
#
__arlibs := $(addprefix $(obj)/,$(sort $(libs-y)))
arobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(libs-y),$($(m)-objs))))
# link shared library
quiet_cmd_ar = AR $@
cmd_ar = $(AR) rcs $@ $(addprefix $(obj)/,$($(@F)-objs))
$(__arlibs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs))
$(__arlibs): $(obj)/%: $(arobjs) FORCE
$(call if_changed,ar)
targets += $(__arlibs) $(arobjs)
#####
# Link shared libraries
#
__shlibs := $(addprefix $(obj)/,$(sort $(shlibs-y)))
shobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(shlibs-y),$($(m)-objs))))
shobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(shlibs-y),$($(m)-objs)))) $(sort $(foreach m,$(shlibs-y),$($(m)-libs)))
# link shared library
quiet_cmd_shlib = LD -shared $@
cmd_shlib = $(CC) $(ld_flags) -shared -o $@ \
$(addprefix $(obj)/,$($(@F)-objs)) \
$(addprefix $(obj)/,$($(@F)-objs)) \
$($(@F)-libs) \
$(LIBS) $(LIBS_$(@F))
$(__shlibs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs))
$(__shlibs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs)) $($(*F)-libs)
$(__shlibs): $(obj)/%: $(shobjs) FORCE
$(call if_changed,shlib)
targets += $(__shlibs) $(shobjs)
#####
# Link programs
# Link an executable based on list of .o files, all plain c
# host-cmulti -> executable
__progs := $(addprefix $(obj)/,$(sort $(progs-y)))
cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(progs-y),$($(m)-objs))))
cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(progs-y),$($(m)-objs)))) $(sort $(foreach m,$(progs-y),$($(m)-libs)))
quiet_cmd_ld = LD $@
cmd_ld = $(CC) $(ld_flags) -o $@ \
$(addprefix $(obj)/,$($(@F)-objs)) \
$(addprefix $(obj)/,$($(@F)-objs)) $($(@F)-libs) \
$(LIBS) $(LIBS_$(@F))
$(__progs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs))
$(__progs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs)) $($(*F)-libs)
$(__progs): $(obj)/%: $(cobjs) FORCE
$(call if_changed,ld)
targets += $(__progs) $(cobjs)
#####
# Man pages
quiet_cmd_scdoc = SCDOC $@
cmd_scdoc = $(SCDOC) < $< > $@
__scdocs := $(addprefix $(obj)/,$(sort $(scdocs-y)))
nontargets += $(__scdocs)
docs += $(__scdocs)
$(__scdocs): $(obj)/%: $(src)/%.scd FORCE
$(call if_changed,scdoc)
####
# Template (.in) files
quiet_cmd_sed = SED $@
cmd_sed = $(SED) \
-e "s|@EXEC_DIR@|$(SBINDIR)|" \
-e "s|@LIB_DIR@|$(LIBDIR)|" \
-e "s|@INCLUDE_DIR@|$(INCLUDEDIR)|" \
-e "s|@VERSION@|$(VERSION)|" \
$< > $@
$(obj)/%: $(src)/%.in FORCE
$(call if_changed,sed)
nontargets += $(addprefix $(obj)/,$(sort $(generate-y)))
###
# why - tell why a a target got build
ifeq ($(VERBOSE),2)
......@@ -243,9 +316,9 @@ why = \
$(if $(strip $(any-prereq)),- due to: $(any-prereq), \
$(if $(arg-check), \
$(if $(cmd_$@),- due to command line change: $(arg-check), \
$(if $(filter $@, $(targets)), \
$(if $(filter $@, $(targets) $(nontargets)), \
- due to missing .cmd file, \
- due to $(notdir $@) not in $$(targets) \
- due to $(notdir $@) not in $$(targets) or $$(nontargets) \
) \
) \
) \
......@@ -263,18 +336,30 @@ endif
%/: FORCE
$(Q)$(MAKE) -f Make.rules build=$(build-dir) $(MAKECMDGOALS)
compile: $(targets)
compile: generate $(targets) $(subdirs)
@:
install: $(targets) FORCE
docs: $(docs) $(subdirs)
@:
install: compile docs $(subdirs) FORCE
tag:
generate:
clean: $(filter %/,$(targets))
clean: $(subdirs)
ifeq ($(toplevelrun),yes)
$(Q)find . $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '.*.cmd' -o -name '.*.d' \) \
-type f -print | xargs rm -f
endif
$(Q)rm -rf $(addprefix $(obj)/,$(sort $(progs-y) $(progs-n) $(progs-) $(shlibs-y) $(shlibs-n) $(shlibs-)))
$(Q)rm -rf $(addprefix $(obj)/, \
$(sort $(progs-y) $(progs-n) $(progs-) \
$(shlibs-y) $(shlibs-n) $(shlibs-) \
$(libs-y) $(libs-n) $(libs-) \
$(generate-y) $(generate-n) $(generate-) \
$(scdocs-y) $(scdocs-n) $(scdocs-)))
ifeq ($(origin VERSION),command line)
DIST_VERSION=$(VERSION)
......@@ -295,7 +380,8 @@ FORCE:
# exist, we will rebuild anyway in that case.
targets := $(wildcard $(sort $(targets)))
cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
docs := $(wildcard $(sort $(docs)))
cmd_files := $(wildcard $(foreach f,$(targets) $(nontargets),$(dir $(f)).$(notdir $(f)).cmd))
ifneq ($(cmd_files),)
include $(cmd_files)
......
......@@ -4,7 +4,9 @@
-include config.mk
PACKAGE := apk-tools
VERSION := 2.1.0
VERSION := 2.12.0_rc1
export VERSION
##
# Default directories
......@@ -15,14 +17,15 @@ LIBDIR := /lib
CONFDIR := /etc/apk
MANDIR := /usr/share/man
DOCDIR := /usr/share/doc/apk
LUA_LIBDIR := /usr/lib/lua/5.1
INCLUDEDIR := /usr/include
PKGCONFIGDIR := /usr/lib/pkgconfig
export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR LUA_LIBDIR
export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR INCLUDEDIR PKGCONFIGDIR
##
# Top-level rules and targets
# Top-level subdirs
targets := src/
subdirs := libfetch/ src/ doc/
##
# Include all rules and stuff
......@@ -34,7 +37,17 @@ include Make.rules
install:
$(INSTALLDIR) $(DESTDIR)$(DOCDIR)
$(INSTALL) README $(DESTDIR)$(DOCDIR)
$(INSTALL) README.md $(DESTDIR)$(DOCDIR)
check test: FORCE src/
$(Q)$(MAKE) TEST=y
$(Q)$(MAKE) -C test
static:
$(Q)$(MAKE) STATIC=y
tag: check
git commit . -m "apk-tools-$(VERSION)"
git tag -s v$(VERSION) -m "apk-tools-$(VERSION)"
src/: libfetch/
# Alpine Package Keeper
Alpine Package Keeper (apk) is a package manager developed for Alpine Linux.
Online documentation is available in the [doc/](doc/) directory in the form of man pages.
scdocs-y += \
apk-cache.5 \
apk-keys.5 \
apk-repositories.5 \
apk-world.5 \
apk.8 \
apk-add.8 \
apk-audit.8 \
apk-cache.8 \
apk-del.8 \
apk-dot.8 \
apk-fetch.8 \
apk-fix.8 \
apk-index.8 \
apk-info.8 \
apk-list.8 \
apk-manifest.8 \
apk-policy.8 \
apk-stats.8 \
apk-update.8 \
apk-upgrade.8 \
apk-verify.8 \
apk-version.8
install:
for page in $(scdocs-y); do \
section=$${page#*.}; \
$(INSTALLDIR) $(DESTDIR)$(MANDIR)/man$$section; \
$(INSTALL) $(obj)/$$page $(DESTDIR)$(MANDIR)/man$$section/; \
done
apk-add(8)
# NAME
apk add - add packages to _world_ and commit changes
# SYNOPSIS
*apk add* [<_options_>...] _packages_...
# DESCRIPTION
*apk add* adds the requested packages to _world_ and installs (or upgrades)
them if not already present, ensuring all dependencies are met.
To upgrade individual packages without modifying _world_ use *apk-fix*(8).
By default *apk* tries to select a set of packages so that all dependencies
are satisfied. This means that some packages can be held back in an older
version if there is direct or implicit dependencies to the older version.
# OPTIONS
*apk add* supports the commit options described in *apk*(8), as well as the
following options:
*--initdb*
Initialize a new package database.
*-l, --latest*
Always choose the latest package by version. However, the versions
considered are based on the package pinning. Primarily this overrides
the default heuristic and will cause an error to displayed if all
dependencies cannot be satisfied.
*-u, --upgrade*
Upgrade _packages_ and it's dependencies. Normally *apk add* will
avoid changing installed package unless it is required by the newly
added _packages_ or their dependencies. This changes the default
preference to upgrading the package to the latest installable version.
*-t, --virtual* _NAME_
Create virtual package _NAME_ with given dependencies. This new package
will get the _packages_ as dependencies instead of _world_. Finally the
_NAME_ is added to _world_.
One can use this to ensure that selected set of packages are installed,
and later the temporary modification be undone with *apk-del*(8) _NAME_
without removing packages that were installed earlier.
*--no-chown*
Do not change file owner or group. By default apk will manage the file
ownership when running as root. However, this option is turned on when
running as non-root user, as changing file ownership is not permitted
by the system then.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-audit(8)
# NAME
apk audit - audit directories for changes
# SYNOPSIS
*apk audit* [<_options_>...] _directories_...
# DESCRIPTION
*apk audit* audits the system or specified directories for changes compared to
the package database.
The audit can be done against configuration files only (--backup) to generate
list of files needed to be stored in the overlay in run-from-tmps configuration.
Alternatively, it can audit all installed files (--system) to e.g. detect
unauthorized modifications of system files.
By default, the output format is one file per line, for each modified file.
A character is printed indicating the change detected, followed by a space,
then the affected path. The changes detected are:
|[ A
:< File added
| d
: Directory added
| D
: Directory added (with non-listed files/subdirs)
| M
: File metadata changed (uid, gid, or mode)
| m
: Directory metadata changed
| U
: File contents modified
| X
: File deleted
| x
: xattrs changed
# OPTIONS
*--backup*
Audit configuration files only (default). The list of files to be
audited is generated from the masks in protected_paths.d.
*--check-permissions*
Check file permissions too. Namely, the uid, gid and file mode will
be checked in addition to the file content.
*--packages*
Print only the packages with changed files. Instead of the full output
each modification, the set of packages with at least one modified file
is printed.
To repair all packages with modified files, one could use:
apk audit --packages -q | xargs apk fix
*--system*
Audit all system files. All files provided by packages are verified
for integrity with the exception of configuration files (listed in
protected_paths.d). This is useful detecting unauthorized file changes.
*-r, --recursive*
Descend into directories and audit them as well.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-cache(5)
# NAME
*/etc/apk/cache* - local cache of package files
# DESCRIPTION
If */etc/apk/cache* is a symlink to a local directory, *apk*(8) will it as a
local cache for downloaded package files and repository indicies. The cache
must not reside on a tmpfs.
To enable the apk cache, run the following commands as root:
mkdir -p /var/cache/apk++
ln -s /var/cache/apk /etc/apk/cache
For information on cache maintenance, see *apk-cache*(8).
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-cache(8)
# NAME
apk cache - manage a local cache of package files
# SYNOPSIS
*apk cache* [<_options_>...] clean
*apk cache* [<_options_>...] download
*apk cache* [<_options_>...] sync
# DESCRIPTION
Manage local package cache by removing obsolete packages, or downloading
missing or newer packages from the repositories.
*apk cache download* will fetch package files from the repositories and store
them in the cache, which must be enabled upfront (see *apk-cache*(5)).
*apk cache clean* will remove package files which are no longer necessary,
having been made obsolete by new versions or no longer being transitively
depended on by packages in _world_.
*apk cache sync* performs both operations.
# OPTIONS
*-l, --latest*
Always choose the latest package by version. However, the versions
considered are based on the package pinning. Primarily this overrides
the default heuristic and will cause an error to displayed if all
dependencies cannot be satisfied.
*-u, --upgrade*
Upgrade _packages_ and it's dependencies. Normally *apk add* will
avoid changing installed package unless it is required by the newly
added _packages_ or their dependencies. This changes the default
preference to upgrading the package to the latest installable version.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-del(8)
# NAME
apk del - remove packages from _world_ and commit changes
# SYNOPSIS
*apk del* [<_options_>...] _packages_...
# DESCRIPTION
*apk del* removes packages from _world_ and uninstalls them if no longer
required by any other packages.
# OPTIONS
*apk del* supports the commit options described in *apk*(8), as well as the
following options:
*-r, --rdepends*
Recursively delete all top-level reverse dependencies, too.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-dot(8)
# NAME
apk dot - generate graphviz graphs
# SYNOPSIS
*apk dot* [<_options_>...] [_pkgmask_...]
# DESCRIPTION
*apk dot* renders package dependencies as graphviz graphs.
The graph is generated for the packages matching the masks given, or for every
known package if unspecified (this will generate a large and unwieldy graph).
# OPTIONS
*--errors*
Consider only packages with errors. This is useful for visually reporting
e.g. cyclic dependencies and missing packages.
*--installed*
Consider only installed packages.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-fetch(8)
# NAME
apk fetch - download packages from global repositories to a local directory
# SYNOPSIS
*apk fetch* [<_options_>...] _packages_...
# DESCRIPTION
*apk fetch* downloads the requested packages from the configured package
repositories (see *apk-repositories*(5)) to a local directory. The current
working directory is used as the destination directory unless *-o* is
specified.
# OPTIONS
*-L, --link*
Create hard links if possible.
*-o, --output* _DIR_
Write the downloaded file(s) to _DIR_.
*-R, --recursive*
Fetch packages and all of their dependencies.
*-s, --stdout*
Dump the .apk file(s) to stdout.
*Note*: this option is incompatible with *-o*, *-R*, and the global
*--progress* option.
*--simulate*
Simulate the requested operation without making any changes.
*Note*: this option is unreliable if needed indexes are not up-to-date
as this omits refresing or downloading of missing indexes.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-fix(8)
# NAME
apk fix - repair packages or system
# SYNOPSIS
*apk fix* [<_options_>...] [_packages_...]
# DESCRIPTION
*apk fix* applies repair strategies to correct errors in the installation of
the specified packages, or all installed packages if none are specified.
# OPTIONS
*apk fix* supports the commit options described in *apk*(8), as well as the
following options:
*-d, --depends*
Also fix dependencies of specified packages.
*-r, --reinstall*
Reinstall packages (default).
*-u, --upgrade*
Upgrade name _PACKAGE_ if an upgrade exists and does not break
dependencies.
*-x, --xattr*
Fix packages with broken xattrs.
*--directory-permissions*
Reset all directory permissions.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-index(8)
# NAME
apk index - create repository index file from packages
# SYNOPSIS
*apk index* [<_options_>...] _packages_...
# DESCRIPTION
*apk index* creates a repository index from a list of package files. See
*apk-repositories*(8) for more information on repository indicies.
Generally, the resulting index must be cryptographically signed before *apk*
will accept it. See *abuild-sign*(1) for details.
# OPTIONS
*-d, --description* _TEXT_
Add a description to the index. Upstream, this is used to add version
information based on the git commit SHA of aports HEAD at the time of
index generation.
*-o, --output* _FILE_
Output generated index to _FILE_.
*-x, --index* _INDEX_
Read an existing index from _INDEX_ to speed up the creation of the new
index by reusing data when possible.
*--no-warnings*
Disable the warning about missing dependencies. This happens when A,
depends on package B, that does not have a provider in the indexed
repository.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-info(8)
# NAME
apk info - print detailed information about packages
# SYNOPSIS
*apk info* [<_options_>...] _packages_...
*apk info* -W _file_
# DESCRIPTION
*apk info* prints information known about the listed packages. By default, it
prints the description, webpage, and installed size of the package (equivalent
to *apk info -dws*).
Each field printed is prefaced by the name of the package and its package
version, then the field to be displayed, and a newline. The following lines
display the appropriate information, then an empty line terminates that field.
*apk info -W* _file_ prints the package which owns the specified file.
# OPTIONS
*-a, --all*
List all information known about the package.
*-d, --description*
Print the package description.
*-e, --installed*
Check package installed status. For each installed package, print it's
name. The exit status is the number of given packages not installed.
Thus, zero (or success) is returned if all named packages are installed.
*-L, --contents*
List files included in the package.
*-i, --install-if*
List the package's install_if rule. When the dependencies in this list
are satisfied, the package will be installed automatically.
*-I, --rinstall-if*
List other packages whose install_if rules refer to this package.
*-r, --rdepends*
List reverse dependencies of the package (all other packages which
depend on the package).
*-R, --depends*
List the dependencies of the package.
*-s, --size*
Print the package's installed size.
*-w, --webpage*
Print the URL for the package's upstream webpage.
*-W, --who-owns*
Print the package which owns the specified file.
*--license*
Print the package SPDX license identifier.
*--replaces*
List the other packages for which this package is marked as a
replacement.
*--triggers*
Print active triggers for the package.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-keys(5)
# NAME
*/etc/apk/keys* - cryptographic keys trusted by apk
# DESCRIPTION
The */etc/apk/keys* directory stores RSA public keys which are trusted by apk
to verify cryptographic signatures for packages. To trust a new key, simply add
the armored public key to this directory. See *abuild-keygen*(1) for
information on generating new keys, *abuild-sign*(1) for using these keys to
sign files, and *apk-verify*(8) for verifying keys against the apk trust store.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-list(8)
# NAME
apk list - list packages matching a pattern or other criteria
# SYNOPSIS
*apk list* [<_options_>...] _pattern_...
# DESCRIPTION
*apk list* searches package indicies for packages matching the given patterns
and prints any matching packages.
The patterns are matched with *fnmatch*(3), which behaves similarly to shell
globbing.
# OPTIONS
*-I, --installed*
Consider only installed packages.
*-O, --orphaned*
Consider only orphaned packages.
*-a, --available*
Consider only available packages.
*-u, --upgradable*
Consider only upgradable packages.
*-o, --origin*
List packages by origin.
*-d, --depends*
List packages by dependency.
*-P, --depends*
List packages by provider.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-manifest(8)
# NAME
apk manifest - Show checksums of package contents
# SYNOPSIS
*apk manifest* [<_options_>...] _packages_...
# DESCRIPTION
*apk manifest* prints the checksums of files in the listed packages. One file
is printed per line, the checksum first, followed by a space, and then the path
to the file.
The checksum itself is printed in the format _algorithm_:_hash_. Supported
algorithms are:
- *md5*
- *sha1*
*sha1* is used for new packages.
# OPTIONS
*apk manifest* does not support any specific options. See *apk*(8) for global
options.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-policy(8)
# NAME
apk policy - show repository policy for packages
# SYNOPSIS
*apk policy* [<_options_>...] _packages_...
# DESCRIPTION
*apk policy* shows apk's repository policy for the specified packages. It
prints matching packages and their versions available from configured
repositories (see *apk-repositories*(5)), in order of installation preference.
# OPTIONS
*apk policy* does not support any specific options. See *apk*(8) for global
options.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-repositories(5)
# NAME
*/etc/apk/repositories* - list of package repositories
# DESCRIPTION
/etc/apk/repositories is the list of package repositories *apk*(8) uses to
retrieve package files for installation. Each line of this file specifies the
location of a package repository, and optionally a tag.
The location may be an _http://_, _https://_, or _ftp://_ URL, or the path to a
directory on the local filesystem. A tagged repository is prefixed with the
*@tag* specifier, followed by a space and the repository location. For more
information about repository tags, see *apk-world*(5).
# REPOSITORY LAYOUT
Each repository must store an index at *$repository/$arch/APKINDEX.tar.gz*. See
*apk-index*(8) for information about generating this file. The packages
themselves are stored at *$repository/$arch/$pkgname-$pkgver-r$pkgrel.apk*.
*apk*(8) verifies that each of these files has a valid cryptographic signature
unless explicitly told not to via the *--allow-untrusted* flag. See
*abuild-keygen*(1) for information about generating keys, *apk-keys*(5) to add
keys to the list of trusted keys, *abuild-sign*(1) for information about using
these keys to sign files, and *apk-verify*(8) for information about verifying
those signatures.
# UPDATING INDICIES
*apk*(8) fetches and stores the index for each package repository at
/var/lib/cache. To fetch fresh indicies for all configured repositories, use
*apk-update*(8).
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-stats(8)
# NAME
apk stats - show statistics about repositories and installations
# SYNOPSIS
*apk stats*
# DESCRIPTION
*apk stats* prints statistics about installed packages, package repositories,
and other information.
# OPTIONS
*apk stats* does not support any specific options. See *apk*(8) for global
options.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-update(8)
# NAME
apk update - update repository indexes
# SYNOPSIS
*apk update*
# DESCRIPTION
*apk update* forces updating of the indexes from all configured package
repositories. This command is not needed in normal operation as all applets
requiring indexes will automatically refresh them after caching time expires.
See *apk-repositories*(5) for more information on configuring package
repositories.
# OPTIONS
*apk update* does not support any specific options. See *apk*(8) for global
options.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-upgrade(8)
# NAME
apk upgrade - upgrade installed packages
# SYNOPSIS
*apk upgrade* [<_options_>...] [<_packages_>...]
# DESCRIPTION
*apk upgrade* upgrades installed packages to the latest version available from
configured package repositories (see *apk-repositories*(5)). When no packages
are specified, all packages are upgraded if possible. If list of packages is
provided, only those packages are upgraded along with needed dependencies.
# OPTIONS
*apk upgrade* supports the commit options described in *apk*(8), as well as the
following options:
*-a, --available*
Reset all packages to versions available from current repositories.
This resets all versioned dependencies in _world_ (see *apk-world*(5)).
Additionally, packages are selected from active repositories if possible
even if it means replacing or downgrading the package.
This is useful to reset system against new set of packages after updating
repositories.
*--ignore*
Upgrade all other packages than the ones listed. This inverts the given
package name list to mean packages that should not be upgraded.
*-l, --latest*
Always choose the latest package by version. However, the versions
considered are based on the package pinning. Primarily this overrides
the default heuristic and will cause an error to displayed if all
dependencies cannot be satisfied.
*--no-self-upgrade*
Do not do an early upgrade of the 'apk-tools' package.
*--self-upgrade-only*
Only perform a self-upgrade of the 'apk-tools' package.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-verify(8)
# NAME
apk verify - verify package integrity and signature
# SYNOPSIS
*apk verify* [<_options_>...] _files_...
# DESCRIPTION
*apk verify* verifies the integrity of the package files specified, validating
the checksums and cryptographic signature.
*apk verify* prints a summary of the results on stdout, and exits with status
code zero if all packages were successfully verified. If any failed, *apk
verify* exits with a nonzero status.
# OPTIONS
*apk verify* does not support any specific options. See *apk*(8) for global
options.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-version(8)
# NAME
apk version - compare package versions
# SYNOPSIS
*apk version* [<_options_>...] [_packages_...]
*apk version* -c _versions_...
*apk version* -t _version1_ _version2_
*apk version* -I
# DESCRIPTION
*apk version* compares the versions of installed packages against package
versions available from repositories (see *apk-repositories*(5)). It can also
be used to validate and compare version strings.
In default mode, if no packages are specified, all installed packages are
considered. Otherwise, the comparison is limited to the explicitly listed
packages. A summary is printed on stdout, with the difference between package
versions being represented as *>*, *=*, or *<*.
*apk version -c* tests the specified version string(s) for validity and prints
a list of _invalid_ version strings. If all version strings are valid, nothing
is printed and *apk version* exits with status code zero. If one or more
version strings are invalid, the exit code is nonzero.
*apk version -t* accepts two arbitrary version strings and compares them
without consulting the database, then prints the result as *>*, *=*, or *<*.
*apk version -I* prints the versions and descriptions of each repository's
index. See *apk-repositories*(5) for more information.
# OPTIONS
These options only apply when checking installed package versions against
packages available from the repositories (when neither *-c*, *-t*, nor *-I* are
specified).
*-a*
Consider packages from all repository tags.
*-l* _operand_
Limit to packages with output matching given _operand_. The _operand_
can be specified as any combination of *>*, *=*, and *<*.
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <timo.teras@iki.fi>
apk-world(5)
# NAME
*/etc/apk/world* - list of explicitly installed packages
# DESCRIPTION
At /etc/apk/world, apk maintains the _world_, or list of explicitly installed
packages. This is a plaintext file with one package spec per line.
If you edit this file manually, you should run *apk-fix*(8) to apply the
changes.
# PACKAGE SPECIFICATION
Specifying a package name with no other modifiers will install the latest
version of that package from the first repository in which it is available.
To pin a package to a tagged repository, use the format *pkgname@tagname*, e.g.
*busybox@edge*. See *apk-repositories*(5) for details on tagged package
repositories.
To constrain the acceptable versions of the package, use the *=*, *<*, *>*,
*>=*, or *~=* operators. Respectively, these require the package is equal to,
less than, greater than, or greater than or equal to the specified version. The
*~=* operator constrains the package to the version numbers specified, but will
not constrain any unspecified version numbers.
*busybox*
Installs busybox from the first repository from which it is available.
*busybox@edge*
Installs busybox from the first repository tagged "edge" from which
it's available. If busybox is _not_ available in repositories with this
tag, it will cause an error. When resolving dependencies of tagged
requirements, untagged repositories are preferred, but repositories
sharing the same tag will be considered if necessary.
*busybox=1.6.1*
Install busybox version 1.6.1.
*busybox>1.6.1*
Install a busybox version greater than 1.6.1.
*busybox>1.6.1*
Install a