aboutsummaryrefslogtreecommitdiffstats
path: root/modules/Working/pages/apk.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/Working/pages/apk.adoc')
-rw-r--r--modules/Working/pages/apk.adoc26
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/Working/pages/apk.adoc b/modules/Working/pages/apk.adoc
index f77c470..91ef5ff 100644
--- a/modules/Working/pages/apk.adoc
+++ b/modules/Working/pages/apk.adoc
@@ -1,4 +1,4 @@
-// MAINT: apk-tools - whole page
+// COMBAK: apk-tools - whole page
= Working with the Alpine Package Keeper (`apk`)
`apk` is the Alpine Package Keeper - the distribution's package manager.
@@ -6,7 +6,7 @@ It is used to manage the packages (software and otherwise) of the system.
It is the primary method for installing additional software, and is available in the `apk-tools` package.
== Normal Usage
-// MAINT: repositories and versions
+// COMBAK: repositories and versions
=== Repositories and Mirrors
`apk` fetches information about available packages, as well as the packages themselves from various mirrors, which contain various repositories.
Sometimes, those terms are used interchangeably.
@@ -23,7 +23,7 @@ main:: Officially supported packages that are reasonable to expect to be in a ba
community:: Packages from testing that have been tested. Support cycles are 6 months long.
testing:: New, broken, or outdated packages that need testing. No support for this repository is implied. It is not present in release snapshots.
-// MAINT: versioning scheme, edge
+// COMBAK: versioning scheme, edge
// TODO: verify
Releases are versioned using a versioning scheme somewhat reminiscent of semantic versioning.
However, one special release exists called "edge" - this is a "rolling" release.
@@ -34,7 +34,7 @@ Repositories are configurable in the `/etc/apk/repositories` file.
Each line corresponds to a repository.
The format is as follows:
-// MAINT: dl-cdn.alpinelinux.org
+// COMBAK: dl-cdn.alpinelinux.org
[source]
----
[@tag] [protocol][/path][/release]/repository
@@ -52,7 +52,7 @@ NOTE: This example uses the `http://` protocol. `ftp://` and `https://` protocol
// TODO: xref to installation part that's relevant
NOTE: This file should already have been been partially populated when you installed alpine.
-// MAINT: apk-search and pkgs.alpinelinux.org
+// COMBAK: apk-search and pkgs.alpinelinux.org
=== Searching for Packages
In order to know what package to install, one must be able to find packages.
Alpine has a specialized https://pkgs.alpinelinux.org[web interface] dedicated to looking through various available packages.
@@ -75,7 +75,7 @@ apk search -e so:libsqlite3.so.* <4>
<3> You can exclude partial matches using `-e`.
<4> You can specify that what you're searching for is a library using the `so:` prefix (or the `cmd:` prefix for commands, and `pc:` prefix for pkg-config files) - it will work with `-e` (in fact, the prefix is required for this use-case if `-e` is used).
-// MAINT: apk-add
+// COMBAK: apk-add
=== Installing Packages
Once you know what package you want to install, you must know how to do that.
Apk's `add` command is more strict than the `search` command - wildcards are not available, for instance.
@@ -113,14 +113,14 @@ apk add pc:msgpack <5>
NOTE: If `apk add` finds multiple matching packages (for example multiple `cmd:` matches), it will select the one with the highest version number.
-// MAINT: apk-update, apk-upgrade
+// COMBAK: apk-update, apk-upgrade
=== Upgrading Packages
Updating the system using apk is very simple.
One need only run `apk upgrade`.
Technically, this is two steps: `apk update`, followed by `apk upgrade` proper.
The first step will download an updated package index from the repositories, while the second step will update all packages in <<_world>>, as well as their dependencies.
-// MAINT: update-conf
+// COMBAK: update-conf
`apk` will avoid overwriting files you may have changed.
These will usually be in the `/etc` directory.
Whenever `apk` wants to install a file, but realizes a potentially edited one is already present, it will write its file to that filename with `.apk-new` appended.
@@ -129,7 +129,7 @@ Simply invoking it normally with present you with the difference between the two
NOTE: `apk update` is only ran once your cache is invalidated, which by default happens every 4 hours.
-// MAINT: apk-info
+// COMBAK: apk-info
=== Querying Package Information
In some cases, it may be useful to inspect packages or files to see various details.
For this use, the `info` subcommand exists.
@@ -137,10 +137,10 @@ It may be used on any package, installed or not, though the information on the l
It may also be used with specific flags on files.
By default, `info` will list the package description, webpage and installed size.
// TODO: link manual for apk(1)
-// MAINT: apk-info: `apk info -h` output
+// COMBAK: apk-info: `apk info -h` output
For more details (such as a list of flags the subcommand supports), you can use the `apk info -h` output's "Info options" section or see the manual page.
-// MAINT: apk-del
+// COMBAK: apk-del
=== Removing Packages
Often, it is desirable to remove a package.
This can be done using the `del` subcommand, with a base syntax that is identical to the `add` subcommand.
@@ -148,7 +148,7 @@ This can be done using the `del` subcommand, with a base syntax that is identica
NOTE: If you added a package using the `cmd:`, `so:` or `pc:` virtual, you must specify the same virtual to remove them.
NOTE: Removing a package will automatically remove all of its dependencies that are otherwise not used.
-// MAINT: apk-del: apk del -r
+// COMBAK: apk-del: apk del -r
The `del` subcommand also supports the `-r` flag, which will remove all packages that depend on the package being removed as well, rather than error out due to the package being needed.
=== Cleanup
@@ -167,7 +167,7 @@ If you've edited it by hand, you may run `apk add` with no arguments to bring th
NOTE: Virtuals like `cmd:`, `so:` and `pc:` will appear as such in your world file - this is why using `so:` is discouraged - the soname might get bumped!
-// MAINT: apk-add -t
+// COMBAK: apk-add -t
=== Virtuals
While `cmd:`, `so:` and `pc:` packages are automatically created virtuals, you can create your own as well.
These allow for quick removal of purpose-specific packages.