Package policies: Difference between revisions

From Alpine Linux
(Category:Development)
m (reworded for added clarity)
 
(15 intermediate revisions by 11 users not shown)
Line 1: Line 1:
The Alpine Linux Package Policies describe some of the policies when creating packages.
The Alpine Linux Package Policies page describe some of the policies when creating packages based on the following references:
* [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/CODINGSTYLE.md?ref_type=heads aports/CODINGSTYLE.md]
* [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/COMMITSTYLE.md?ref_type=heads aports/COMMITSTYLE.md]


== Package Names ==
== Package Names ==
* All package names should be lowercase.
* All package names should be lowercase.
* Development files are placed in subpackages with ''-dev'' suffix (i.e uclibc-dev)
* Development files are placed in subpackages with ''-dev'' suffix (e.g. uclibc-dev)
* Documentation files are placed in subpackages with ''-doc'' suffix (i.e expat-doc)
* Documentation files (incl. man pages) are placed in subpackages with ''-doc'' suffix (e.g. expat-doc)
* Lua modules (not applications) are prefixed with ''lua-''. (i.e lua-posix)
* Lua modules (not applications) are prefixed with ''lua-''. (e.g. lua-posix)
* Perl modules (not applications) are prefixed with ''perl-''. (i.e perl-xml-parser)
* Perl modules (not applications) are prefixed with ''perl-''. (e.g. perl-xml-parser)
* Python modules (not applications) are prefixed with ''py-''. (i.e py-libxml2)
* Python 2 modules (not applications) are prefixed with ''py2-''. (e.g. py2-libxml2) (Python3 is used exclusively in current alpine versions)
* Kernels and 3rdparty modules should be suffixed with the kernel flavor. (i.e ''-grsec'' or ''-vserver'')
* Python 3 modules (not applications) are prefixed with ''py3-''. (e.g. py3-libxml2)
* Kernels and third party modules should be suffixed with the kernel flavor. (e.g., ''-grsec'', ''-vserver'').
# Don't use ''-'' sign in kernel flavor name.
# Specify ''KERNEL_FLAVOR_DEFAULT'' as your kernel flavor if you want boot your kernel by default.


== Package versions ==
== Package versions ==
* Package versions are similar to gentoo.
 
* Package versions are similar to gentoo or other distributions, e.g. 10.2.33, 4.5_alpha, 20200712-r0:
# See [https://semver.org Semantic Versioning]
# Alpha, release candidates (_rc2), etc are prefixed with underscore ''_'' not a hyphen.
# Subsequent package versions are ''-r0'', ''-r1'', and so on; the number is from $pkgver.
# Subsequent package fixes are ''_p0'', ''_p1''.
# Test your proposed version with ''apk'', for example ''apk version --check 3.2.1-rcN''.  The result is nothing if it is valid.


== Licensing ==
== Licensing ==
* The license of the program should be based on the licenses approved by the [http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses Free Software Foundation] or [http://www.opensource.org/licenses/ OSI].
 
* The license identifier used is the short-identifier [https://spdx.org/licenses/ SPDX].
* The license of the program should be based on the licenses approved by the [https://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses Free Software Foundation] or [https://www.opensource.org/licenses/ OSI].
* If you are unsure about the license, please ask in our [[IRC]] channel.
* If you are unsure about the license, please ask in our [[IRC]] channel.
== See also ==
* [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/COMMITSTYLE.md?ref_type=heads aports/COMMITSTYLE.md]
* [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/CODINGSTYLE.md?ref_type=heads aports/CODINGSTYLE.md]


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

Latest revision as of 16:41, 25 February 2025

The Alpine Linux Package Policies page describe some of the policies when creating packages based on the following references:

Package Names

  • All package names should be lowercase.
  • Development files are placed in subpackages with -dev suffix (e.g. uclibc-dev)
  • Documentation files (incl. man pages) are placed in subpackages with -doc suffix (e.g. expat-doc)
  • Lua modules (not applications) are prefixed with lua-. (e.g. lua-posix)
  • Perl modules (not applications) are prefixed with perl-. (e.g. perl-xml-parser)
  • Python 2 modules (not applications) are prefixed with py2-. (e.g. py2-libxml2) (Python3 is used exclusively in current alpine versions)
  • Python 3 modules (not applications) are prefixed with py3-. (e.g. py3-libxml2)
  • Kernels and third party modules should be suffixed with the kernel flavor. (e.g., -grsec, -vserver).
  1. Don't use - sign in kernel flavor name.
  2. Specify KERNEL_FLAVOR_DEFAULT as your kernel flavor if you want boot your kernel by default.

Package versions

  • Package versions are similar to gentoo or other distributions, e.g. 10.2.33, 4.5_alpha, 20200712-r0:
  1. See Semantic Versioning
  2. Alpha, release candidates (_rc2), etc are prefixed with underscore _ not a hyphen.
  3. Subsequent package versions are -r0, -r1, and so on; the number is from $pkgver.
  4. Subsequent package fixes are _p0, _p1.
  5. Test your proposed version with apk, for example apk version --check 3.2.1-rcN. The result is nothing if it is valid.

Licensing

  • The license identifier used is the short-identifier SPDX.
  • The license of the program should be based on the licenses approved by the Free Software Foundation or OSI.
  • If you are unsure about the license, please ask in our IRC channel.

See also