Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gentoo:repositories [2024/02/05 10:56] – willy | gentoo:repositories [2025/05/06 05:45] (current) – willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Reference [[https:// | + | ====== M) Custom Repositories ====== |
| - | <code bash | + | Portage (Gentoo' |
| + | |||
| + | Another great point of Gentoo is that it's really simple to create your own package repository and use it alongside the official one. | ||
| + | |||
| + | The following links are exhaustive information that you should read carefully and are the source of this page info: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | You can create it manually, but i think it's better to leverage the **eselect-repository** tools. Emerge the following packages if you odn't have them yet: | ||
| + | <code bash> | ||
| > emerge app-eselect/ | > emerge app-eselect/ | ||
| + | </ | ||
| + | |||
| + | Then use the //eselect repository// | ||
| + | <code bash> | ||
| > eselect repository create myrepo | > eselect repository create myrepo | ||
| + | </ | ||
| + | |||
| + | The repo will be created under **/ | ||
| + | <code bash> | ||
| > cd / | > cd / | ||
| > git init | > git init | ||
| Line 10: | Line 27: | ||
| </ | </ | ||
| - | Add a new eubild | + | I have encountered a bug in the repo creation that will not populare correctly the **/ |
| + | < | ||
| + | [gentoo] | ||
| + | location = / | ||
| + | </ | ||
| + | |||
| + | Add it, if missing. | ||
| + | |||
| + | Here you can also move your **myrepo** somewhere else if you prefer | ||
| + | |||
| + | Now, Gentoo package manager is based on **ebuild** files which are recipes to download and build your packages. You need to create | ||
| + | |||
| + | I will assume you have your ebuild called //myapp// under the //app-misc// category, this ebuild will have version 1.0.0, so it's filename will be: **myapp-1.0.0.ebuild** and you will need to copy it to **/ | ||
| + | |||
| + | At this point, you need to create the manifest for the ebuild, which includes downloading the associated sources/ | ||
| <code bash> | <code bash> | ||
| - | > mkdir -p / | + | > cd / |
| - | > vi / | + | |
| - | > cd / | + | |
| > pkgdev manifest | > pkgdev manifest | ||
| > chown -R portage: | > chown -R portage: | ||
| </ | </ | ||
| + | And don't forget to properly apply permissions to the entire repo: it needs to be owned by user and group // | ||
| - | + | That's it, you can now simply: | |
| - | add | + | <code bash> |
| - | <file - / | + | > emerge myapp |
| - | + | </code> | |
| - | [gentoo] | + | |
| - | location = / | + | |
| - | </file> | + | |