Enable Community Repository: Difference between revisions

From Alpine Linux
m (Fixed a typo)
(redirect to Repositories#Enabling_the_community_repository)
Tag: New redirect
 
(12 intermediate revisions by 8 users not shown)
Line 1: Line 1:
#REDIRECT [[Repositories#Enabling_the_community_repository]]


Alpine software repositories have main packages and contributions made. Each Alpine release have two brach of repositories. The '''/community''' repository of each Alpine release contains community supported packages that were accepted from the '''/testing''' repository. Only '''/main''' repository of each version of Alpine release are supported for some Main Alpine Developers and Man Powers.
{{Delete|This should be covered in: https://wiki.alpinelinux.org/wiki/Repositories}}


* '''About the main packages''': Main packages are the Alpine package software that have direct support and updates from the Alpine core and main team, also have official special documentation. Are always available for all releases and will have almost substitutions if some are not continued from upstream. Commonly those packages are selected due their responsibility and stability respect upstream availability. Those are in ''testing'' and when performs well or are mature goes to ''main'' branch.
Alpine software repositories have main packages and contributions made. Each Alpine release has two branches of repositories. The '''/community''' repository of each Alpine release contains community supported packages that were accepted from the '''/testing''' repository. Only '''/main''' repository of each version of Alpine release are supported for some Main Alpine Developers and Man Powers.
* '''About the contribution ones''': User package contribution repositories are those made by users in team with the official developers and well near integrated to the Alpine packages. Those have supported by those user contributions and could end if the user also ends respect with Alpine work, by example could not have substitution in next release due lack of support by upstream author. Those are in ''testing'' and when accepted goes to ''community'' branch.
* '''About the testing ones''': New packages come into testing or edge repositories and are those made by any contributor or man power on Alpine, the edge, this branch of repository has no release linked or related of Alpine. Those are in ''edge'' and when accepted goes to ''testing''.


For detailed information check [[Alpine_newbie#APK|Alpine_newbie APK]] section wiki page.
* '''Main packages''' are the Alpine package software that have direct support and updates from the Alpine core and main team, also have official documentation. Are always available for all releases and will have substitutions if some are not continued from upstream. Commonly those packages are selected due their responsibility and stability respecting upstream availability. Packages from ''testing'' that performs well or are mature goes to ''main'' branch.


== Usig community repositories of my release version ==
* '''Community packages''' are those made by users in team with the official developers and well near integrated to the Alpine packages. Those have supported by those user contributions and could end if the user also ends respect with Alpine work, but may be removed in a future release due lack of support by upstream author. Packages from ''testing'' that are accept goes to ''community'' branch.


The '''community''' repository was introduced with Alpine Linux version 3.3. To enable the repository, edit the file {{Path|/etc/apk/repositories}} using an editor ({{Pkg|nano}} for instance) and add (or uncomment) a line that points to the "community" directory, formatted as in:
* '''Testing''' packages come into testing or edge repositories and are those made by any contributor on Alpine, the edge, this branch of repository has no release linked or related of Alpine. Those are in ''edge'' and when accepted goes to ''testing''.
 
== Using community repositories ==
 
The '''community''' repository was introduced with Alpine Linux version 3.3.
 
To enable the repository, edit the file {{Path|/etc/apk/repositories}} and add (or uncomment) a line that points to the "community" directory.
 
Its format is:


<code>'''https://<mirror-server>/alpine/<version>/community'''</code>
<code>'''https://<mirror-server>/alpine/<version>/community'''</code>


After enabling the community repository, one needs to obtain the latest index of available packages with:
{{Tip|A usable editor is {{Pkg|nano}}, and it can be installed with <code>apk add nano</code>.}}
 
After enabling the community repository, one needs to update the index of available packages with:
{{Cmd|apk update}}
{{Cmd|apk update}}
And then it's possible to install packages from the community repository.
=== Adding community repositories with a script ===
The following commands will add the main and community repositories for the Alpine version you're using. It will overwrite your existing repository settings.
{{cmd|cat > /etc/apk/repositories << EOF; $(echo)
<nowiki>
https://dl-cdn.alpinelinux.org/alpine/v$(cut -d'.' -f1,2 /etc/alpine-release)/main/
https://dl-cdn.alpinelinux.org/alpine/v$(cut -d'.' -f1,2 /etc/alpine-release)/community/
https://dl-cdn.alpinelinux.org/alpine/edge/testing/
</nowiki>
EOF
}}


For newer or newbie user please better use the [[Alpine_newbie_apk_packages#enable_repository_packages|enable_repository_packages of Alpine_newbie_apk_packages]] wiki page.
Dont forget to run this after:.
{{Cmd|apk update}}


=== Using specific version from testing or another version ===
== Using specific package versions ==


You can set "sticky" versions like this:
You can specify or pin "sticky" package versions like this:


* <code><nowiki>apk add packagename=1.2.3-suffix</nowiki></code>
* <code><nowiki>apk add packagename=1.2.3-suffix</nowiki></code>
* <code><nowiki>apk add 'packagename<1.2.3-suffix'</nowiki></code>
* <code><nowiki>apk add 'packagename<1.2.3-suffix'</nowiki></code>


That will upgrade packages only until the specified version. You can then safely use <code>apk upgrade</code> to upgrade all packages, while packages with versions will remain with their version. To set a minimum version just use …
That will upgrade these packages only until the specified version.
 
It's then safe to use <code>apk upgrade</code> to upgrade all packages, while packages with versions will remain on the specified version.


For newer or newbie user please better use the [[Alpine_newbie_apk_packages#enable_repository_packages|enable_repository_packages of Alpine_newbie_apk_packages]] wiki page.
To set a minimum version just add <code>…</code>.


{{Warning|Pinning a package to an exact version carries the risk that the package will be dropped from the repo, and at some time can't be downloaded anymore (e.g. during boot or Dockerfile build).


== Usig testing repositories of my release version ==
The official recommendation can be read here, citation below.
Alternately, you could simply set a minimum package version
instead of an exact version.
We don't at the moment have resources to store all built packages
indefinitely in our infrastructure. Thus we currently keep only
the latest for each stable branch.
}}
 
== Using testing repositories ==


The '''testing''' repository was introduced with Alpine Linux edge development. To enable the repository, edit the file {{Path|/etc/apk/repositories}} using an editor ({{Pkg|nano}} for instance) and add a line that points to the "testing" directory, formatted as in:
The '''testing''' repository was introduced with Alpine Linux edge development. To enable the repository, edit the file {{Path|/etc/apk/repositories}} using an editor ({{Pkg|nano}} for instance) and add a line that points to the "testing" directory, formatted as in:
Line 40: Line 76:
{{Cmd|apk update}}
{{Cmd|apk update}}


Inexperienced users must do not enable this, is prefer to go to the [[Alpine_newbie_apk_packages#enable_repository_packages|enable_repository_packages of Alpine_newbie_apk_packages]] wiki page.
Inexperienced users should not enable this.


=== Using packages from testing (edge) ===
=== Using packages from testing (edge) ===
Line 46: Line 82:
Never pin packages from the "edge" branch of the alpine package repo, as these are in test and may be revoked. (At pkgs.alpinelinux.org/packages, click "edge" and change it to the alpine image version you use, and click "search" again.)
Never pin packages from the "edge" branch of the alpine package repo, as these are in test and may be revoked. (At pkgs.alpinelinux.org/packages, click "edge" and change it to the alpine image version you use, and click "search" again.)


Inexperienced users must do not enable this, is prefer to go to the [[Alpine_newbie_apk_packages#enable_repository_packages|enable_repository_packages of Alpine_newbie_apk_packages]] wiki page.
Inexperienced users should not enable this.


== NOTES about using package versions ==


Pinning a package to an exact version carries the risk that the package will be dropped from the repo, and your Dockerfile will fail to build in the future. The official recommendation can be read here, citation below.
Alternately, you could simply set a minimum package version instead of an exact version.
We don't at the moment have resources to store all built packages indefinitely in our infra. Thus we currently keep only the latest for each stable branch, and has always been like that.


= See also =
= See also =
* [[Alpine_newbie#APK|Alpine_newbie APK]]


[[Category:Package Manager]]
[[Category:Package Manager]]

Latest revision as of 08:36, 31 July 2022

This material is proposed for deletion ...

This should be covered in: https://wiki.alpinelinux.org/wiki/Repositories (Discuss)
Make sure no other pages link here and check the page's history before deleting.

Alpine software repositories have main packages and contributions made. Each Alpine release has two branches of repositories. The /community repository of each Alpine release contains community supported packages that were accepted from the /testing repository. Only /main repository of each version of Alpine release are supported for some Main Alpine Developers and Man Powers.

  • Main packages are the Alpine package software that have direct support and updates from the Alpine core and main team, also have official documentation. Are always available for all releases and will have substitutions if some are not continued from upstream. Commonly those packages are selected due their responsibility and stability respecting upstream availability. Packages from testing that performs well or are mature goes to main branch.
  • Community packages are those made by users in team with the official developers and well near integrated to the Alpine packages. Those have supported by those user contributions and could end if the user also ends respect with Alpine work, but may be removed in a future release due lack of support by upstream author. Packages from testing that are accept goes to community branch.
  • Testing packages come into testing or edge repositories and are those made by any contributor on Alpine, the edge, this branch of repository has no release linked or related of Alpine. Those are in edge and when accepted goes to testing.

Using community repositories

The community repository was introduced with Alpine Linux version 3.3.

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

Tip: A usable editor is nano, and it can be installed with apk add nano.

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.

Adding community repositories with a script

The following commands will add the main and community repositories for the Alpine version you're using. It will overwrite your existing repository settings.

cat > /etc/apk/repositories << EOF; $(echo) https://dl-cdn.alpinelinux.org/alpine/v$(cut -d'.' -f1,2 /etc/alpine-release)/main/ https://dl-cdn.alpinelinux.org/alpine/v$(cut -d'.' -f1,2 /etc/alpine-release)/community/ https://dl-cdn.alpinelinux.org/alpine/edge/testing/ EOF

Dont forget to run this after:.

apk update

Using specific package versions

You can specify or pin "sticky" package versions like this:

  • apk add packagename=1.2.3-suffix
  • apk add 'packagename<1.2.3-suffix'

That will upgrade these packages only until the specified version.

It's then safe to use apk upgrade to upgrade all packages, while packages with versions will remain on the specified version.

To set a minimum version just add .

Warning: Pinning a package to an exact version carries the risk that the package will be dropped from the repo, and at some time can't be downloaded anymore (e.g. during boot or Dockerfile build).

The official recommendation can be read here, citation below.

Alternately, you could simply set a minimum package version
instead of an exact version.

We don't at the moment have resources to store all built packages
indefinitely in our infrastructure. Thus we currently keep only
the latest for each stable branch.


Using testing repositories

The testing repository was introduced with Alpine Linux edge development. To enable the repository, edit the file /etc/apk/repositories using an editor (nano for instance) and add a line that points to the "testing" directory, formatted as in:

https://<mirror-server>/alpine/edge/testing

After enabling the testing repository, one needs to obtain the latest index of available packages with:

apk update

Inexperienced users should not enable this.

Using packages from testing (edge)

Never pin packages from the "edge" branch of the alpine package repo, as these are in test and may be revoked. (At pkgs.alpinelinux.org/packages, click "edge" and change it to the alpine image version you use, and click "search" again.)

Inexperienced users should not enable this.


See also