Repositories
The Alpine software repositories have three branches:
- main packages are the software that have direct support and updates from the Alpine core and main team. They also have official special documentation, are always available for all releases and will have substitutions if some are not continued from upstream. Commonly these packages are selected due to their responsibility and stability with respect to upstream availability. Packages from community or (rarely) testing, that are accepted go to the main branch.
- community packages are those made by users in team with the official developers and close to the Alpine package process. They are supported by those user(s) contributions and could end if the user(s) stops; they may also be removed in a future release due to lack of support by upstream authors. Packages from testing that are accepted go to the community branch.
- testing packages are where new packages go. These are made by any contributor to Alpine. Testing has no release linked. The testing repository is only available on edge. Packages from testing that are accepted go to the community branch or (rarely) the main branch.
Overview
To enable a repository, remove the # in front of the URL along with any blank space.
Example: Disabled
Contents of /etc/apk/repositories
Example: Enabled
Contents of /etc/apk/repositories
To edit the repositories, open the /etc/apk/repositories
file in a text editor:
# <editor> /etc/apk/repositories
The default will look something like:
Contents of /etc/apk/repositories
You should probably change the url's from http to https[1].
You can avoid having to manually update the version in /etc/apk/repositories
for each Alpine Linux release by changing v3.16
to latest-stable
.
Example:
Contents of /etc/apk/repositories
latest-stable
may initiate unexpected release upgrades.
Release Branches
There are several release branches for Alpine Linux available at the same time. Each May and November we make a release branch from edge. The main repository is typically supported for 2 years and the community repository is supported until next stable release.
Security fixes beyond that can be made on request when there are patches available.
Main
By default only the main repository is enabled. main has a support cycle of 2 years. We also try to limit the amount of packages in main to only include base system packages, in base you can think of packages which are needed by other packages or are needed to setup a basic system. Packages in main must not have dependencies in other repositories.
Community
The community repository was introduced with Alpine Linux version 3.3.0. community has a maximum support cycle of 6 months. After that you will need to update to the new release to continue to have support.
Enabling the community repository
To enable the repository, edit the file /etc/apk/repositories
and add (or uncomment) a line that points to the "community" directory.
Its format is:
https://<mirror-server>/alpine/<version>/community
After enabling the community repository, one needs to update the index of available packages with:
# apk update
And then it's possible to install packages from the community repository.
Edge
edge is the name given to the current development tree of Alpine Linux. It consists of an APK repository called edge and contains the latest build of all available Alpine Linux packages. Those packages are updated on a regular basis.
End users should not use edge as their main day-to-day workstation or as a productive system. Because edge is a development branch, many changes are not heavily tested (or tested at all) and packages in edge can and sometimes do break without warning.
However, testing edge is a very valuable activity which helps the Alpine Linux development to ensure that the quality of the stable releases is high. Testing edge is a great way to contribute to the Alpine Linux development.
Upgrading to edge
An upgrade of Alpine Linux from a stable version to the rolling development version edge basically requires the same steps as Upgrading to latest release.
The crucial difference is, that when editing the /etc/apk/repositories file, all referenced repository versions (such as v3.2
or latest-stable
) therein need to be pointing to edge
.
When using edge branch, testing repository can be added if the packages that one needs are available only in testing repository.
Contents of /etc/apk/repositories
After upgrading to edge, the currently installed edge version may be checked with
$ cat /etc/alpine-release
and referring to the build date that is attached to the release.
Testing
The testing repository was introduced with Alpine Linux edge development. No support (staging only) and only built for edge. If it stays here long enough it gets moved to unmaintained/purged (gets cleaned up every 6 months).
Before a package can move from testing to main or community, the following requirements must be met:
- Package must work correctly, including the init.d script (if provided) and default configuration.
- Packaging must be done correctly, with files installed in the right places, e.g. configs are in
/etc/
and not in/usr/etc
. - Package dependencies are handled correctly. Abuild can (and should) autodetect shared libs, for example sqlite-libs provides so:libsqlite3.so.0. Any package linked to sqlite should have an automatically (by abuild) added
depend=so:libsqlite3.so.0
and the user should not have to manually add adepend="sqlite-libs"
in the APKBUILD. - There is a maintainer who claims responsibility for the maintenance of the package and can help fix things if they break in the future.
Enabling the testing repository
To enable the repository, edit the file /etc/apk/repositories
and add (or uncomment) a line that points to the "testing" directory.
Its format is:
https://<mirror-server>/alpine/edge/testing
After enabling the testing repository, one needs to update the index of available packages with:
# apk update
And then it's possible to install packages from the testing repository.
Unmaintained
This material needs expanding ... Maybe also move this somewhere else? |
unmaintained packages are not built.