...
 
Commits (691)
apk
apk.static
src/apk
src/apk-test
src/apk.static
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
- make -j$(nproc) check
tags:
- docker-alpine
test:debian:
image: debian
stage: test
script:
- apt-get update
- apt-get install -y make gcc git libssl-dev zlib1g-dev lua5.3-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>
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>
##
# 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,28 @@ 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
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 +378,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.10.4
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.
# 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*
Disables normal heuristics for choosing which repository to install a
package from, preferring only repositories from which the latest
version is available. This has no effect on pinned packages.
*-u, --upgrade*
When adding packages which are already installed, upgrade them rather
than considering the requirement fulfilled by the current installation.
*-t, --virtual* _NAME_
Instead of adding the specified packages to _world_, create a new
virtual package with the listed packages as its dependencies, then add
that package to _world_.
The packages requested are added as transitive dependencies of the
virtual package, and by deleting that package the *apk add* operation
may be easily reverted later.
# 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 specified directories for changes from the package
database. By default, the output format is one file per line, for each affected
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
*--check-permissions*
In addition to checking file contents, check the uid, gid, and file
mode as well.
*--packages*
Instead of printing each modified file, print the names and versions of
the packages which own the affected files.
*--system*
List all modified configuration files (in protected_paths.d) that need
to be backed up.
*-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
*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*
Disables normal heuristics for choosing which repository to install a
package from, preferring only repositories from which the latest
version is available. This has no effect on pinned packages.
*-u, --upgrade*
When caching packages which are already installed, prefer their upgrades
rather than considering the requirement fulfilled by the current
installation.
# 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* generates graphviz dependency graphs for packages matching the masks
specified, or for every known package if unspecified (this will generate a
large and unwieldy graph).
# OPTIONS
*--errors*
Graph only relationships considered erroneous, e.g. cycles 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.
# 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*
When fixing packages which are already installed, upgrade them rather
than considering the requirement fulfilled by the current installation.
*-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.
# 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 if the package is installed, printing its name and exiting with
status code zero if so, or exiting with a nonzero status code otherwise.
*-L, --contents*
List files included in the package.
*-i, --install-if*
List the package's install_if rule, if configured (i.e. the conditions
under which this 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* fetches the index from all configured package repositories. 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_>...]
# DESCRIPTION
*apk upgrade* upgrades installed packages to the latest version available from
configured package repositories (see *apk-repositories*(5)).
# OPTIONS
*apk upgrade* supports the commit options described in *apk*(8), as well as the
following options:
*-a, --available*
Resets version constraints in _world_ (see *apk-world*(5)) and prefers
replacing or downgrading packages if the currently installed package is
no longer available from any repository (instead of holding them).
*-l, --latest*
Disables normal heuristics for choosing which repository to install a
package from, preferring only repositories from which the latest
version is available. This has no effect on pinned packages.
*--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 _left_ _right_
*apk version* -I
# DESCRIPTION
*apk version* compares the versions of installed packages against package
versions available from repositories (see *apk-repositories*(5)). 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 output to packages whose comparison is among the given operands,
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 busybox version greater than or equal to 1.6.1.
*busybox<1.6.1*
Install a busybox version less than 1.6.1.
*busybox~=1.6*
Install any busybox version between 1.6.0 (inclusive) and 1.7.0
(exclusive).
# AUTHORS
Natanael Copa <ncopa@alpinelinux.org>++
Timo Teräs <_timo.teras@iki.fi_>
apk(8)
# NAME
apk - Alpine Package Keeper
# SYNOPSIS
*apk* [<_options_>...] _command_ [<_arguments_>...]
# DESCRIPTION
*apk* manages packages installed on the system. The set of installed packages
is called the _world_ (see *apk-world*(5)). *apk* supports various sub-commands
to query and manipulate _world_ and local & remote package repositories.
# COMMANDS
Each command is documented in detail on its manual page.
## PACKAGE INSTALLATION AND REMOVAL
|[ *apk-add*(8)
:< Add packages to _world_ and commit changes
| *apk-del*(1)
: Remove packages from _world_ and commit changes
## SYSTEM MAINTENANCE
|[ *apk-fix*(8)
:< Check _world_ against the system and ensure consistency
| *apk-update*(8)
: Update repository indexes
| *apk-upgrade*(8)
: Install upgrades available from repositories
| *apk-cache*(8)
: Commands related to the management of an offline package cache
## QUERYING PACKAGE INFORMATION
|[ *apk-info*(8)
:< Give detailed information about packages or repositories
| *apk-list*(8)
: List packages matching a pattern or other criteria
| *apk-dot*(8)
: Generate graphviz graphs
| *apk-policy*(8)
: Show repository policy for packages
## REPOSITORY MAINTENANCE
|[ *apk-index*(8)
:< Create repository index file from packages
| *apk-fetch*(8)
: Download packages from global repositories to a local directory
| *apk-manifest*(8)
: Show checksums of package contents
| *apk-verify*(8)
: Verify package integrity and signature
## MISCELLANEOUS
|[ *apk-audit*(8)
:< Audit directories for changes
| *apk-stats*(8)
: Show statistics about repositories and installations
| *apk-version*(8)
: Compare package versions or perform tests on version strings
# GLOBAL OPTIONS
The following options are available for all commands.
*-f, --force*
Enable selected --force-\* options (deprecated).
*-i, --interactive*