Aports tree: Difference between revisions

From Alpine Linux
m (link to repositories page)
(moved content to Git and added links)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The [http://git.alpinelinux.org/cgit/aports/ aports] tree contains a directory with the corresponding [[APKBUILD_Reference|APKBUILD]] file for every package/program. ''[http://git.alpinelinux.org/cgit/abuild/tree/sample.APKBUILD APKBUILD]'' is a file containing "recipes" on how something should be built/compiled. These files are used when building Alpine from source.
The [https://git.alpinelinux.org/aports/ aports] tree is a repository which contains [[APKBUILD_Reference|APKBUILD]] files for every Alpine package. An ''[https://git.alpinelinux.org/abuild/tree/sample.APKBUILD 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.


When 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'. The [[Abuild|abuild]] script reads the APKBUILD and executes the steps needed to create a package.
The [[Abuild and Helpers|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 ==
== Directories ==
There are some directories placed in the [http://git.alpinelinux.org/cgit/aports/ aports] tree. A short description of every directory can be found in this section.
 
There are some directories placed in the [https://git.alpinelinux.org/aports/ aports] tree. Each directory represent a single package [[Repositories|repository]]. Currently, the aports tree contains the following directories:


=== main ===
=== main ===
''main'' contains the basic set of packages for Alpine Linux.
 
'''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'' contains the additional packages that, for various reasons, 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 go to ''testing'' first. Package will be moved to ''main'' if there is positive feedback or for other good reasons. Packages in ''testing'' are not included in stable builds, but are only built for [[Repositories#Edge|edge]].


=== non-free ===
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.
The packages in ''non-free'' are violating the standards of the [http://www.fsf.org/ Free Software Foundation] (FSF) about copying, redistributing, and modifying computer programs in one way or another.
 
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:


=== unmaintained ===
# Package must work correctly, including the init.d script (if provided) and sane default configuration.
When a package is no longer maintained and no longer builds, it is moved to ''unmaintained''. It is mostly in order to not break the build servers while still keeping the original APKBUILD available in case someone is willing to fix it.
# 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>.
# 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.
# There is a maintainer who claims responsibility for the maintenance of the package and can help fix things if they break in the future.


== Fetch latest APKBUILD files ==  
== See Also ==
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>
'''''Note:''' You only need to do these 2 steps once! Next time you can skip this part.''
{{Cmd|apk add alpine-sdk}}
{{Cmd|cd ~}}
{{Cmd|git clone git://git.alpinelinux.org/aports}}
When the above is done, you might be interested in fetching the latest updates:
{{Cmd|cd ~/aports}}
{{Cmd|git pull}}


=See Also=
* [[Developer Documentation]]
*[[Repositories#Edge|What is edge]]
* [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