Aports tree: Difference between revisions

From Alpine Linux
(moved content from Creating patches page)
(moved content to Git and added links)
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
=== main ===
=== main ===


''main'' contains the basic set of packages for Alpine Linux. Main repository is for packages that are either core of the linux system or are dependencies of other core packages. A package in main cannot have a dependency in community or testing and a package in community cannot have a dependency on packages in testing.
'''main''' contains the basic set of packages for Alpine Linux. Main repository is for packages that are either core of the linux system or are dependencies of other core packages. A package in main cannot have a dependency in community or testing and a package in community cannot have a dependency on packages in testing.
 
Packages in '''main''' repository 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'' can be accepted into the ''main'' repository.


=== community ===
=== community ===


''community'' contain community maintained packages. For various reasons, these are not guaranteed to be supported beyond six months.
'''community''' contain community maintained packages. Packages in '''community''' repository 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. For various reasons, these are not guaranteed to be supported beyond six months.
 
The '''community''' repository was introduced with Alpine Linux version [https://alpinelinux.org/posts/Alpine-3.3.0-released.html 3.3.0]. Packages from ''testing'' that are accepted go to the ''community'' repository.


=== testing ===
=== testing ===


All new packages should normally go to ''testing'' first.  After a reasonable testing period, if the package is complete i.e it has a working and sane default configuration, necessary init scripts (if applicable) and has a maintainer, there is positive feedback, then that package in the testing will be moved into community repository or very rarely to ''main'' repository for other good reasons. Packages in ''testing'' are not included in [[Repositories#Release Branches|stable builds]], but are only built for [[Repositories#Edge|edge]].  
All new packages should normally go to '''testing''' first. Packages in ''testing'' are not included in [[Repositories#Release Branches|stable builds]], but are only built for [[Repositories#Edge|edge]].  After a reasonable testing period, if there is positive feedback and the package meets certain [[#Requirements to move from testing|requirements]], then that package in the testing will be moved into community repository or very rarely to ''main'' repository for other good reasons.  
 
If a package stays in testing long enough, it gets moved to unmaintained/purged (gets cleaned up every 6 months).
 
==== Requirements to move from testing ====


== Fetch latest APKBUILD files ==
Before a package can move from ''testing'' to ''main'' or ''community'', the following requirements must be met:


While inside your [[Setting up the build environment 1.9|build environment]] you need to install some needed packages and you need to fetch the APKBUILD's from the server (fetch the aports tree).<BR>
# Package must work correctly, including the init.d script (if provided) and sane default configuration.
'''''Note:''' You only need to do these 2 steps once! Next time you can skip this part.''
# Packaging must be done correctly, with files installed in the right places, e.g. configs are in <code>/etc/</code> and not in <code>/usr/etc</code>.
{{Cmd|apk add alpine-sdk}}
# 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 <code>depend=so:libsqlite3.so.0</code> and the user should not have to manually add a <code>depend="sqlite-libs"</code> in the APKBUILD.
{{Cmd|cd ~}}
# There is a maintainer who claims responsibility for the maintenance of the package and can help fix things if they break in the future.
{{Cmd|git clone <nowiki>git://git.alpinelinux.org/aports</nowiki>}}
When the above is done, you might be interested in fetching the latest updates:
{{Cmd|cd ~/aports}}
{{Cmd|git pull}}


=See Also=
== See Also ==


*[[Repositories#Edge|What is edge]]
* [[Developer Documentation]]
* [https://git.alpinelinux.org/aports/ aports]
* [https://git.alpinelinux.org/aports/ readonly aports]


[[Category:Development]]
[[Category:Development]]

Latest revision as of 04:56, 6 October 2025

The aports tree is a repository which contains APKBUILD files for every Alpine package. An APKBUILD file contains a "recipe" instructing how a given software package should be built/compiled and packaged. These files are used when building Alpine from source.

The abuild script reads an APKBUILD and executes the steps needed to create a package. Once Alpine Linux is compiled, you will no longer see (or have use of) the APKBUILD. It is not included in the 'iso' or 'tar.gz'.

Directories

There are some directories placed in the aports tree. Each directory represent a single package repository. Currently, the aports tree contains the following directories:

main

main contains the basic set of packages for Alpine Linux. Main repository is for packages that are either core of the linux system or are dependencies of other core packages. A package in main cannot have a dependency in community or testing and a package in community cannot have a dependency on packages in testing.

Packages in main repository 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 can be accepted into the main repository.

community

community contain community maintained packages. Packages in community repository 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. For various reasons, these are not guaranteed to be supported beyond six months.

The community repository was introduced with Alpine Linux version 3.3.0. Packages from testing that are accepted go to the community repository.

testing

All new packages should normally go to testing first. Packages in testing are not included in stable builds, but are only built for edge. After a reasonable testing period, if there is positive feedback and the package meets certain requirements, then that package in the testing will be moved into community repository or very rarely to main repository for other good reasons.

If a package stays in testing long enough, it gets moved to unmaintained/purged (gets cleaned up every 6 months).

Requirements to move from testing

Before a package can move from testing to main or community, the following requirements must be met:

  1. Package must work correctly, including the init.d script (if provided) and sane default configuration.
  2. Packaging must be done correctly, with files installed in the right places, e.g. configs are in /etc/ and not in /usr/etc.
  3. 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 a depend="sqlite-libs" in the APKBUILD.
  4. There is a maintainer who claims responsibility for the maintenance of the package and can help fix things if they break in the future.

See Also