The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Metatools"
(Created page with "Metatools ([https://code.funtoo.org/bitbucket/users/drobbins/repos/funtoo-metatools/browse git]) ([https://pypi.org/project/funtoo-metatools/ pypi]) is the framework used by F...") |
|||
Line 4: | Line 4: | ||
The current version of metatools is 1.0.0, released on Jan 30, 2022. | The current version of metatools is 1.0.0, released on Jan 30, 2022. | ||
== Installation == | |||
To install metatools, emerge it: | To install metatools, emerge it: | ||
Line 20: | Line 19: | ||
}} | }} | ||
Autogen Setup | == Autogen Setup == | ||
The command in metatools that performs autogeneration locally is called {{c|doit}}. Prior to using this command locally, it's recommended to create an {{f|~/.autogen}} file under your user account that | The command in metatools that performs autogeneration locally is called {{c|doit}}. Prior to using this command locally, it's recommended to create an {{f|~/.autogen}} file under your user account that | ||
Line 35: | Line 33: | ||
For more information on setting up GitHub personal access tokens, see: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token | For more information on setting up GitHub personal access tokens, see: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token | ||
Autogen Usage | == Autogen Usage == | ||
Funtoo's meta-repo is defined in the kit-fixups repository ([https://code.funtoo.org/bitbucket/projects/CORE/repos/kit-fixups/browse git]), which is the starting point for all autogeneration of ebuilds. | Funtoo's meta-repo is defined in the kit-fixups repository ([https://code.funtoo.org/bitbucket/projects/CORE/repos/kit-fixups/browse git]), which is the starting point for all autogeneration of ebuilds. |
Revision as of 04:06, January 31, 2022
Metatools (git) (pypi) is the framework used by Funtoo Linux to create meta-repo and autogenerate ebuilds. It is a foundational tool for Funtoo Linux development.
The current version of metatools is 1.0.0, released on Jan 30, 2022.
Installation
To install metatools, emerge it:
root # emerge metatools
Once of the dependencies of metatools is MongoDB. Before using metatools, ensure mongodb
is started and running:
root # rc-update add mongodb default root # rc
Autogen Setup
The command in metatools that performs autogeneration locally is called doit
. Prior to using this command locally, it's recommended to create an ~/.autogen
file under your user account that
contains a GitHub personal access token. This will allow doit
to use it when querying GitHub and will prevent doit
from hitting API limits:
~/.autogen
authentication:
api.github.com:
username: danielrobbins
password: <insert access token string here>
For more information on setting up GitHub personal access tokens, see: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
Autogen Usage
Funtoo's meta-repo is defined in the kit-fixups repository (git), which is the starting point for all autogeneration of ebuilds.
To perform your first doit
run, enter into the appropriate kit-fixups directory and run the doit
command:
user $ cd development/kit-fixups/core-kit/curated user $ doit root ##g##[INFO 21:02:35]##!g## Fetched https://git-scm.com/download/linux 6042 bytes root ##g##[INFO 21:02:35]##!g## Created: dev-vcs/git/git-2.35.1.ebuild root ##g##[INFO 21:02:35]##!g## Fetched https://api.github.com/repos/hashicorp/vagrant_cloud/tags 9513 bytes root ##g##[INFO 21:02:36]##!g## Created: dev-ruby/vagrant_cloud/vagrant_cloud-2.0.3.ebuild root ##g##[INFO 21:02:36]##!g## Fetched https://api.github.com/repos/distcc/distcc/releases 34549 bytes root ##g##[INFO 21:02:36]##!g## Created: sys-devel/distcc/distcc-3.4.ebuild root ##g##[INFO 21:02:36]##!g## Fetched https://api.github.com/repos/dbrgn/tealdeer/releases 151336 bytes root ##g##[INFO 21:02:36]##!g## Fetched https://api.github.com/repos/tmux/tmux/releases 94211 bytes root ##g##[INFO 21:02:36]##!g## Created: app-misc/tmux/tmux-3.2a.ebuild root ##g##[INFO 21:02:36]##!g## Fetched https://api.github.com/repos/lotabout/skim/releases 225892 bytes root ##g##[INFO 21:02:36]##!g## Fetched https://ftp.debian.org/debian/pool/main/c/ca-certificates/ 7174 bytes root ##g##[INFO 21:02:36]##!g## Created: app-misc/ca-certificates/ca-certificates-20211016.ebuild root ##g##[INFO 21:02:36]##!g## Fetched https://api.github.com/repos/jarun/nnn/releases 564842 bytes root ##g##[INFO 21:02:36]##!g## Fetched https://api.github.com/repos/netwide-assembler/nasm/tags 13895 bytes root ##g##[INFO 21:02:36]##!g## Created: app-misc/nnn/nnn-4.4.ebuild root ##g##[INFO 21:02:36]##!g## Fetched https://api.github.com/repos/doxygen/doxygen/tags?per_page=100 46121 bytes
What you are seeing above is output from the doit
command, which will:
- Find all autogens (
autogen.yaml
andautogen.py
files) in the current directory tree - Execute them using multiple threads, which in turn will cause
doit
to: - Query upstream Web sites and APIs (like GitHub) for current versions of source code, and:
- Fetch all source code artifacts (distfiles), and:
- Auto-create ebuilds for these packages, along with Manifests.
Funtoo contributors will use the doit
command locally to test their autogens and ensure their proper operation before submitting a PR.