Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Funtoo:Metro/pt-br"

From Funtoo
Jump to navigation Jump to search
(Updating to match new version of source page)
Tag: Replaced
 
(75 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{#layout:doc}}{{#widget:AddThis}}[[Metro]] é o build system para os stages Funtoo Linux e [[Gentoo Linux]]. Ele automatiza o processo de bootstrap.
{{Project
 
|summary=This project is focused on {{c|metro}}, the framework used to create new Funtoo Linux builds.
Esse tutorial te guiará através da instalação, configuração e execução do [[Metro]].
|leads=Drobbins
 
|subpages=Initial Setup, Manual Setup, Concepts and Terminology, Configuring Metro, Recipes, Automation, Data Model
Esses outros documentos do Metro também estão disponíveis:
|translate=yes
 
{{#ask: [[Category:Metro]]
|format=ul
}}
}}
<div class="mw-translate-fuzzy">
{{#layout:doc}}{{#widget:AddThis}}[[Metro]] é o sistema de compilação dos stages para Funtoo Linux e [[Gentoo Linux]]. Ele automatiza o processo de bootstrapping.
</div>


= Preface =
Metro is the tool used by Funtoo Linux to build new releases of Funtoo Linux. It is also available to the public and can be used to build custom versions of Funtoo Linux, or used by developers to perform build testing. This page documents how to install, configure and use Metro. Also note that there is various additional supplemental documentation available on sub-pages, with links above.
 
== Como o Metro Funciona ==
 
Metro é um sistema de construção automática do Funtoo, e é utilizado para construir  os tarballs do Linux stage tarballs.
 
[[Metro]] Não pode gerar um stage tarball vazio. Para gerar um novo stage tarball, o [[Pt-br/Metro|Metro]] precisa utilizar um stage tarball antigo existente chamado de um "seed" stage. Esse seed stage tipicamente é utilizando como o ''ambiente build'' para a criação do stage que queremos.
 
O [[Metro]] pode utilizar dois tipos de seed stages. Tradicionalmente, o [[Pt-br/Metro|Metro]] tem utilizando um stage3 como um seed stage. Esse stage3 é então utilizado para construir um novo stage1, que por sua vez é utilizado para construir um novo stage2, e depois um novo stage3. Esse é geralmente o mais confiável meio de construir [[Gentoo Linux]] ou Funtoo Linux, assim ele é a aproximação recomendada.
{{fancyimportant|'''Depois de carregar o metro builds no Funtoo profile, Gentoo stages não são mais fornecidos'''!}}
 
== Seeds e Build Isolation ==
 
um outro conceito importante a mencionar aqui é algo chamado de ''build isolation''. Porque o [[Pt-br/Metro|Metro]] gera um ambiente build isolado, e o ambiente build é explicitamente definido utilizando entidades tangíveis existentes -- um seed stage e um portage snapshot -- você obterá resultados repetíveis, consistentes. Em outras palavras, A mesma seed stage, portage snapshot e instruções de build gerarão um resultado essencialmente idêntico, mesmo se você desempenhar o build um mês depois na workstation de outra pessoa.
 
== Local Build ==
 
Digamos que você quisesse construir um novo stage3 tarball <tt>pentium4</tt>. O método recomendado de se fazer isso seria agarrar um stage3 tarball <tt>pentium4</tt>  existente para utilizar como seu seed stage. Será dito ao [[Metro]] que utilizr esse stage3 <tt>pentium4</tt> existente para construir um novo stage1 para o mesmo <tt>pentium4</tt>. Para esse processo, o stage3 <tt>pentium4</tt> genérico forneceria o ''build environment'' para a criação de nosso novo stage1. Depois, o novo stage1 serviria como o build environment para a criação de novo stage2 <tt>pentium4</tt>. E o novo stage2 <tt>pentium4</tt> serviria como build environment para a criação do novo stage3 <tt>pentium4</tt>.
 
Na terminologia [[Metro]] isso é chamado de um '''local build''', que significa que um stage3 de uma dada arquitetura é utilizada para semear (seed) um build novinho da mesma arquitetura. Incidentalmente esse será o primeiro exercício  que vamos realizar nesse tutorial.
 
Uma semana depois, você pode querer construir um stage34 tarball <tt>pentium4</tt> novo. Ao invés de iniciar a partir do stage3 <tt>pentium4</tt> original novamente, provavelmente você configuraria o [[Metro]] para utilizar o stage3 <tt>pentium4</tt> mais recentemente construído como a seed. [[Metro]] possui funcionalidade built-in para tornar isso fácil, permitindo facilmente encontrar e rastrear a stage3 seed mais recente disponível.
 
== Remote Build ==
 
[[Metro]] pode também desempenhar '''remote build''', onde um stage3 de uma arquitetura diferente, mas binariamente compatível, é utilizada como uma seed para construir um stage3 de arquitetura diferente. Consequentemente o segundo exercício que vamos realizar nesse tutorial será construir um stage3 tarball <tt>core2 32bit</tt> a partir do stage3 tarball do <tt>pentium4</tt> que acabamos de construir.
 
TODO: adicione ressalvas a respeito de qual archs podem ser semeadas e qual não pode (talvez uma tabela?)
 
== Build Adaptado ==
 
Por ultimo, de nada também vale a pena que ambos <tt>local</tt> e <tt>remote builds</tt>, [[Metro]] pode ser configurado para adicionar e/ou remover pacotes individuais ao tarball final.
Vamos dizer que você não possa viver sem <tt>app-misc/screen</tt>, no final desse tutorial, nós mostraremos como ter seu stage3 adaptado para incluí-lo.
 
== Instalando o Metro ==
 
'''O método recomendado e que possui suporte''' é utilizar o Git repository do [[Metro]]. 
 
Certifique-se de que o {{Package|dev-vcs/git}} e o {{Package|dev-python/boto}} (opcional; necessário para suporte EC2) estejam instalados no seu sistema:
 
<console>
# ##i##emerge dev-vcs/git
# ##i##emerge dev-python/boto
</console>
 
Depois, clone o master git repository como a seguir:
 
<console>
# ##i##cd /root
# ##i##git clone git://github.com/funtoo/metro.git
# ##i##cp /root/metro/metro.conf ~/.metro
</console>
 
Você agora terá um diretório chamado <tt>/root/metro</tt> que contem todo o código fonte do [[Metro]].
 
O Metro está agora instalado. É hora de personalizá-lo para seu sistema local.
 
= Configuring Metro =
 
{{Note|Metro is not currently able to build Gentoo stages. See {{Bug|FL-901}}.}}


[[User:Drobbins|Daniel Robbins]] maintains [[Metro]], so it comes pre-configured to successfully build Funtoo Linux releases. Before reading further, you might want to customize some basic settings like the number of concurrent jobs to fit your hardware's capabilities or the directory to use for produced stage archives. This is accomplished by editing <tt>~/.metro</tt> which is the [[Metro]]'s master configuration file.
Please see [[{{FULLPAGENAME}}/Initial Setup|Initial Setup]] for instructions on how to get Metro up and running on your system.
 
Please note that <code>path/install</code> must point to where metro was installed. Point <code>path/distfiles</code> to where your distfiles reside. Also set <code>path/mirror/owner</code> and <code>path/mirror/group</code> to the owner and group of all the files that will be written to the build repository directory, which by default (as per the configuration file) is at <code>/home/mirror/funtoo</code>. The cache directory normally resides inside the temp directory -- this can be modified as desired. The cache directory can end up holding many cached .tbz2 packages, and eat up a lot of storage. You may want to place the temp directory on faster storage, for faster compile times, and place the cache directory on slower, but more plentiful storage.
 
{{file|name=.metro|desc=Metro configuration|body=
# Main metro configuration file - these settings need to be tailored to your install:
 
[section path]
install: /root/metro
tmp: /var/tmp/metro
cache: $[path/tmp]/cache
distfiles: /var/src/distfiles
work: $[path/tmp]/work/$[target/build]/$[target/name]
 
[section path/mirror]
 
: /home/mirror/funtoo
owner: root
group: repomgr
dirmode: 775
 
[section portage]
 
MAKEOPTS: auto
 
[section emerge]
 
options: --jobs=4 --load-average=4 --keep-going=n
 
# This line should not be modified:
[collect $[path/install]/etc/master.conf]
}}
 
== Arch and Subarch ==
 
In the following example we are creating a pentium4 stage 3 compiled for x86-32bit binary compatibility. Pentium4 is a subarch of the x86-32bit architecture. Once you have metro installed you may find a full list of each subarch in your <tt>/root/metro/subarch</tt> directory each subarch will have the file extension .spec
Example:
<console>
###i## ls /root/metro/subarch
# ls subarch/
amd64-bulldozer-pure64.spec  armv7a.spec          core-avx-i.spec        i686.spec        pentium.spec
amd64-bulldozer.spec        armv7a_hardfp.spec  core2_32.spec          k6-2.spec        pentium2.spec
amd64-k10-pure64.spec        athlon-4.spec        core2_64-pure64.spec    k6-3.spec        pentium3.spec
amd64-k10.spec              athlon-mp.spec      core2_64.spec          k6.spec          pentium4.spec
amd64-k8+sse3.spec          athlon-tbird.spec    corei7-pure64.spec      native_32.spec    pentiumpro.spec
amd64-k8+sse3_32.spec        athlon-xp.spec      corei7.spec            native_64.spec    prescott.spec
amd64-k8-pure64.spec        athlon.spec          generic_32.spec        niagara.spec      ultrasparc.spec
amd64-k8.spec                atom_32.spec        generic_64-pure64.spec  niagara2.spec    ultrasparc3.spec
amd64-k8_32.spec            atom_64-pure64.spec  generic_64.spec        nocona.spec      xen-pentium4+sse3.spec
armv5te.spec                atom_64.spec        generic_sparcv9.spec    opteron_64.spec  xen-pentium4+sse3_64.spec
armv6j.spec                  btver1.spec          geode.spec              pentium-m.spec
armv6j_hardfp.spec          btver1_64.spec      i486.spec              pentium-mmx.spec
</console>
 
= First stages build (local build) =
 
To get this all started, we need to bootstrap the process by downloading an initial seed stage3 to use for building and place it in its proper location in <tt>/home/mirror/funtoo</tt>, so that [[Metro]] can find it. We will also need to create some special &quot;control&quot; files in <tt>/home/mirror/funtoo</tt>, which will allow [[Metro]] to understand how it is supposed to proceed.
 
== Step 1: Set up pentium4 repository (local build) ==
 
Assuming we're following the basic steps outlined in the previous section, and building an unstable funtoo (<tt>funtoo-current</tt>) build for the <tt>pentium4</tt>, using a generic <tt>pentium4</tt> stage3 as a seed stage, then here the first set of steps we'd perform:
 
<console>
# ##i##install -d /home/mirror/funtoo/funtoo-current/x86-32bit/pentium4
# ##i##install -d /home/mirror/funtoo/funtoo-current/snapshots
# ##i##cd /home/metro/mirror/funtoo/funtoo-current/x86-32bit/pentium4
# ##i##install -d 2011-12-13
# ##i##cd 2011-12-13
# ##i##wget -c http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-32bit/pentium4/2011-12-13/stage3-pentium4-funtoo-current-2011-12-13.tar.xz
# ##i##cd ..
# ##i##install -d .control/version
# ##i##echo "2011-12-13" > .control/version/stage3
# ##i##install -d .control/strategy
# ##i##echo local >  .control/strategy/build
# ##i##echo stage3 > .control/strategy/seed
</console>
 
OK, let's review the steps above. First, we create the directory <tt>/home/mirror/funtoo/funtoo-current/x86-32bit/pentium4</tt>, which is where Metro will expect to find unstable <tt>funtoo-current</tt> pentium4 builds -- it is configured to look here by default. Then we create a specially-named directory to house our seed x86 stage3. Again, by default, Metro expects the directory to be named this way. We enter this directory, and download our seed x86 stage3 from funtoo.org. Note that the <tt>2010-12-24</tt> version stamp matches. Make sure that your directory name matches the stage3 name too. Everything has been set up to match Metro's default filesystem layout.
 
Next, we go back to the <tt>/home/mirror/metro/funtoo-current/x86-32bit/pentium4</tt> directory, and inside it, we create a <tt>.control</tt> directory. This directory and its subdirectories contain special files that Metro references to determine certain aspects of its behavior. The <tt>.control/version/stage3</tt> file is used by Metro to track the most recently-built stage3 for this particular build and subarch. Metro will automatically update this file with a new version stamp after it successfully builds a new stage3. But because Metro didn't actually ''build'' this stage3, we need to set up the <tt>.control/version/stage3</tt> file manually. This will allow Metro to find our downloaded stage3 when we set up our pentium4 build to use it as a seed. Also note that Metro will create a similar <tt>.control/version/stage1</tt> file after it successfully builds an pentium4 funtoo-current stage1.
 
We also set up <tt>.control/strategy/build</tt> and <tt>.control/strategy/seed</tt> files with values of <tt>local</tt> and <tt>stage3</tt> respectively. These files define the building strategy Metro will use when we build pentium4 funtoo-current stages. With a build strategy of <tt>local</tt>, Metro will source its seed stage from funtoo-current pentium4, the current directory. And with a seed strategy of <tt>stage3</tt>, Metro will use a stage3 as a seed, and use this seed to build a new stage1, stage2 and stage3.
 
== Step 2: Building the pentium4 stages ==
 
Incidentally, if all you wanted to do at this point was to build a new pentium4 funtoo-current stage1/2/3 (plus openvz and vserver templates). You would begin the process by typing:
 
<console>
# ##i##cd /root/metro
# ##i##scripts/ezbuild.sh funtoo-current pentium4
</console>
 
If you have a slow machine, it could take several hours to be completed because several "heavy" components like gcc or glibc have to be recompiled in each stage. Once a stage has been successfully completed, it is placed in the <tt>"${METRO_MIRROR}/funtoo-current/x32-bit/pentium4/YYYY-MM-DD"</tt> subdirectory, where <tt>YYYY-MM-DD</tt> is today's date at the time the <tt>ezbuild.sh</tt> script was started or the date you put on the ezscript.sh command line.
 
= Building for another binary compatible architecture (remote build) =
 
As written above, [[Metro]] is able to perform '''remote build''' building different architecture stage3 from a binary compatible seeding stage3 (e.g. using a pentium4 stage3 to seed a <tt>Intel Core2 32bits</tt> stage3).
 
In the Metro terminology this is called a '''remote build''' (a stage 3 of a different, but binary compatible, architecture is used as a seed).
What's not compatible? You can't use a <tt>Sparc</tt> architecture to generate an <tt>x86</tt> or <tt>ARM</tt> based stage and vice-versa. If you use a 32bit stage then you don't want to seed a 64bit build from it. Be sure that you are using a stage from the same architecture that you are trying to seed. Check [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-current FTP Mirror] for a stage that is from the same Architecture that you will be building. 
 
{{Note|Often, one build (ie. funtoo-current) can be used as a seed for another build such as funtoo-stable. However, hardened builds require hardened stages as seeds in order for the build to complete successfully.}}
 
== Step 1: Set up Core_2 32bit repository ==
 
In this example, we're going to use this pentium4 funtoo-current stage3 to seed a new Core_2 32bit funtoo-current build. To get that done, we need to set up the pentium4 build directory as follows:
 
<console>
# ##i## cd /home/mirror/funtoo/funtoo-current/x86-32bit
# ##i##install -d core2_32
# ##i##cd core2_32
# ##i##install -d .control/strategy
# ##i##echo remote > .control/strategy/build
# ##i##echo stage3 > .control/strategy/seed
# ##i##install -d .control/remote
# ##i##echo funtoo-current > .control/remote/build
# ##i##echo x86-32bit > .control/remote/arch_desc
# ##i##echo pentium4 > .control/remote/subarch
</console>
 
The steps we follow are similar to those we performed for a ''local build'' to set up our pentium4 directory for local build. However, note the differences. We didn't download a stage, because we are going to use the pentium4 stage to build a new Core_2 32bit stage. We also didn't create the <tt>.control/version/stage{1,3}</tt> files because Metro will create them for us after it successfully builds a new stage1 and stage3. We are still using a <tt>stage3</tt> seed strategy, but we've set the build strategy to <tt>remote</tt>, which means that we're going to use a seed stage that's not from this particular subdirectory. Where are we going to get it from? The <tt>.control/remote</tt> directory contains this information, and lets Metro know that it should look for its seed stage3 in the <tt>/home/mirror/funtoo/funtoo-current/x86-32bit/pentium4</tt> directory. Which one will it grab? You guessed it -- the most recently built ''stage3'' (since our seed strategy was set to <tt>stage3</tt>) that has the version stamp of <tt>2010-12-24</tt>, as recorded in <tt>/home/mirror/funtoo-current/x86-32bit/pentium4/.control/version/stage</tt>. Now you can see how all those control files come together to direct Metro to do the right thing.
 
{{Note|<code>arch_desc</code> should be set to one of: <code>x86-32bit</code>, <code>x86-64bit</code> or <code>pure64</code> for PC-compatible systems. You must use a 32-bit build as a seed for other 32-bit builds, and a 64-bit build as a seed for other 64-bit builds.}}
 
== Step 2: Building the Core_2 32bit stages ==
 
Now, you could start building your new Core_2 32bit stage1/2/3 (plus openvz and vserver templates) by typing the following:
 
<console>
# ##i##/root/metro/scripts/ezbuild.sh funtoo-current core2_32
</console>
 
In that case, the produced stages are placed in the <tt>/home/mirror/funtoo/funtoo-current/x32-bit/core2_32/YYYY-MM-DD</tt> subdirectory.
 
== Step 3: The Next Build ==
 
At this point, you now have a new Core_2 32bit stage3, built using a "remote" pentium4 stage3. Once the first remote build completes successfully, metro will automatically change <code>.control/strategy/build</code> to be <code>local</code> instead of <code>remote</code>, so it will use the most recently-built Core_2 32bit stage3 as a seed for any new Core_2 32bit builds from now on.
 
= Build your own tailored stage3 =
 
Metro can be easily configured for building custom stage3 by including additional packages. Edit the following configuration file <tt>/root/metro/etc/builds/funtoo-current/build.conf</tt>:
{{file|name=funtoo-current/build.conf|body=
[collect ../../fslayouts/funtoo/layout.conf]
 
[section release]
 
author: Daniel Robbins <drobbins@funtoo.org>
 
[section target]
 
compression: xz
 
[section portage]
 
FEATURES:
SYNC: $[snapshot/source/remote]
USE:
 
[section profile]
 
format: new
path: gentoo:funtoo/1.0/linux-gnu
arch: $[:path]/arch/$[target/arch_desc]
build: $[:path]/build/current
flavor: $[:path]/flavor/core
mix-ins:
 
[section version]
 
python: 2.7
 
[section emerge]
 
 
[section snapshot]
 
type: live
compression: xz
 
[section snapshot/source]
 
type: git
branch: funtoo.org
# branch to have checked out for tarball:
branch/tar: origin/master
name: ports-2012
remote: git://github.com/funtoo/ports-2012.git
options: pull
 
[section metro]
 
options:
options/stage: cache/package
target: gentoo
 
[section baselayout]
 
services: sshd
 
[section multi]
 
snapshot: snapshot
 
[section files]
 
motd/trailer: [
 
>>> Send suggestions, improvements, bug reports relating to...
 
>>> This release:                  $[release/author]
>>> Funtoo Linux (general):        Funtoo Linux (http://www.funtoo.org)
>>> Gentoo Linux (general):        Gentoo Linux (http://www.gentoo.org)
]
 
[collect ../../multi-targets/$[multi/mode:zap]]
}}
 
= Building Gentoo stages =
 
Metro can also build Gentoo stages.  After switching to Funtoo profile, see http://www.funtoo.org/Funtoo_Profiles metro require additional steps for this. We have an open bug for this -- it is simply due to the fact that we focus on ensuring Funtoo Linux builds and building Gentoo is a lower priority. Historical note: Funtoo Linux originally started as a fork of Gentoo Linux so that metro could reliably build Gentoo stages.
http://www.funtoo.org/Funtoo_Profiles
 
= Advanced Features =
 
Metro also includes a number of advanced features that can be used to automate builds and set up distributed build servers. These features require you to {{c|emerge sqlalchemy}}, as SQLite is used as a dependency.
 
== Repository Management ==
 
Metro includes a script in the {{c|scripts}} directory called {{c|buildrepo}}. Buildrepo serves as the heart of Metro's advanced repository management features.
 
=== Initial Setup ===
 
To use {{c|buildrepo}}, you will first need to create a {{f|.buildbot}} configuration file. Here is the file I use on my AMD Jaguar build server:
 
{{file|name=/root/.buildbot|lang=python|body=
builds = (
"funtoo-current",
"funtoo-current-hardened",
"funtoo-stable",
)
 
arches = (
"x86-64bit",
"pure64"
)
 
subarches = (
"amd64-jaguar",
"amd64-jaguar-pure64",
)
 
def map_build(build, subarch, full, full_date):
# arguments refer to last build...
if full == True:
buildtype =  ( "freshen", )
else:
buildtype =  ("full", )
return buildtype
}}
 
This file is actually a python source file that defines the tuples {{c|builds}}, {{c|arches}} and {{c|subarches}}. These variables tell {{c|buildrepo}} which builds, arches and subarches it should manage. A {{c|map_build()}} function is also defined which {{c|buildbot}} uses to determine what kind of build to perform. The arguments passed to the function are based on the last successful build. The function can read these arguments and return a string to define the type of the next build. In the above example, the {{c|map_build()}} function will cause the next build after a freshen build to be a full build, and the next build after a full build to be a freshen build, so that the build will alternate between full and freshen.
 
== Automated Builds ==
 
Once the {{c|.buildbot}} file has been created, the {{c|buildrepo}} and {{c|buildbot.sh}} tools are ready to use. Here's how they work. These tools are designed to keep your repository ({{c|path/mirror}} in {{f|/root/.metro}} up-to-date by inspecting your repository and looking for stages that are out-of-date.
 
To list the next build that will be performed, do this -- this is from my ARM build server:
 
{{console|body=
# ##i##./buildrepo nextbuild
build=funtoo-current
arch_desc=arm-32bit
subarch=armv7a_hardfp
fulldate=2015-02-08
nextdate=2015-02-20
failcount=0
target=full
extras=''
}}
 
If no output is displayed, then all your builds are up-to-date.
 
To actually run the next build, run {{c|buildbot.sh}}:
 
{{console|body=
# ##i##./buildbot.sh
}}
 
If you're thinking that {{c|buildbot.sh}} would be a good candidate for a cron job, you've got the right idea!
 
=== List Builds ===
 
To get a quick look at our repository, let's run the {{c|buildrepo fails}} command:
 
{{console|body=
# ##i##./buildrepo fails
  0  2015-02-18 /home/mirror/funtoo/funtoo-current/x86-64bit/amd64-jaguar
  0  2015-02-18 /home/mirror/funtoo/funtoo-current/pure64/amd64-jaguar-pure64
  0  2015-02-18 /home/mirror/funtoo/funtoo-current-hardened/x86-64bit/amd64-jaguar
  0  2015-02-18 /home/mirror/funtoo/funtoo-current-hardened/pure64/amd64-jaguar-pure64
  0  2015-02-18 /home/mirror/funtoo/funtoo-stable/x86-64bit/amd64-jaguar
  0  2015-02-18 /home/mirror/funtoo/funtoo-stable/pure64/amd64-jaguar-pure64
}}
 
On my AMD Jaguar build server, on Feb 20, 2015, this lists all the builds that {{c|buildrepo}} has been configured to manage. The first number on each line is a '''failcount''', which is the number of consecutive times that the build has failed. A zero value indicates that everything's okay. The failcount is an important feature of the advanced repository management features. Here are a number of behaviors that are implemented based on failcount:
 
* If {{c|buildbot.sh}} tries to build a stage and the build fails, the failcount is incremented.
* If the build succeeds for a particular build, the failcount is reset to zero.
* Builds with the lowest failcount are prioritized by {{buildrepo}} to build next, to steer towards builds that are more likely to complete successfully.
* Once the failcount reaches 3 for a particular build, it is removed from the build rotation.
 
=== Resetting Failcount ===
 
If a build has issues, the failcount for a build will reach 3, at which point it will be pulled out of build rotation. To clear failcount, so that these builds are attempted again -- possibly fixed by new updates to the Portage tree -- use {{c|buildrepo zap}}:
 
{{console|body=
# /root/metro/scripts/buildrepo zap
Removing /mnt/data/funtoo/funtoo-current/arm-32bit/armv7a_hardfp/.control/.failcount...
Removing /mnt/data/funtoo/funtoo-current/arm-32bit/armv6j_hardfp/.control/.failcount...
Removing /mnt/data/funtoo/funtoo-current/arm-32bit/armv5te/.control/.failcount...
}}
 
== Repository Maintenance ==
 
A couple of repository maintenance tools are provided:
 
* {{c|buildrepo digestgen}} will generate hash files for the archives in your repository, and clean up stale hashes.
* {{c|buildrepo index.xml}} will create an index.xml file at the root of your repository, listing all builds available.
* {{c|buildrepo clean}} will output a shell script that will remove old stages. No more than the three most recent stage builds for each build/arch/subarch are kept.
 
== Distributed Repositories ==
 
In many situation, you will have a number of build servers, and each will build a subset of your master repository, and then upload builds to the master repository. This is an area of Metro that is being actively developed. For now, automated upload functionality is not enabled, but is expected to be implemented in the relatively near future. However, it is possible to have your master repository differentiate between subarches that are built locally, and thus should be part of that system's {{c|buildbot}} build rotation, and those that are stored locally and built remotely. These builds should be cleaned when {{c|buildrepo clean}} is run, but should not enter the local build rotation. To set this up, modify {{f|/root/.buildbot}} and use the {{c|subarches}} and {{c|all_subarches}} variables:
 
{{file|name=/root/.metro|desc=Excerpt of .metro config for master repository|body=
# subarches we are building locally:
 
subarches = (
        "pentium4",
        "athlon-xp",
        "corei7",
        "corei7-pure64",
        "generic_32",
        "i686",
        "amd64-k8",
        "amd64-k8-pure64",
        "core2_64",
        "core2_64-pure64",
        "generic_64",
        "generic_64-pure64",
)
 
# Things we need to clean, even if we may not be building:
 
all_subarches = subarches + (
        "atom_32",
        "atom_64",
        "atom_64-pure64",
        "amd64-k10",
        "amd64-k10-pure64",
        "amd64-bulldozer",
        "amd64-bulldozer-pure64",
        "amd64-steamroller",
        "amd64-steamroller-pure64",
        "amd64-piledriver",
        "amd64-piledriver-pure64",
        "amd64-jaguar",
        "amd64-jaguar-pure64",
        "intel64-haswell",
        "intel64-haswell-pure64",
        "intel64-ivybridge-pure64",
        "intel64-ivybridge",
        "armv7a_hardfp",
        "armv6j_hardfp",
        "armv5te"
)
}}


[[Category:HOWTO]]
[[Category:HOWTO]]
[[Category:Metro]]
[[Category:Metro]]
__TOC__
__TOC__
[[Category:Official Documentation]]
{{ProjectFooter}}

Latest revision as of 01:38, October 11, 2022

Other languages:
English • ‎Türkçe • ‎português do Brasil • ‎日本語
   Summary
This project is focused on metro, the framework used to create new Funtoo Linux builds.
   People
Leads

Warning: Display title "Funtoo Metro/pt-br Project" overrides earlier display title "Metro".

{{#layout:doc}}Metro é o sistema de compilação dos stages para Funtoo Linux e Gentoo Linux. Ele automatiza o processo de bootstrapping.

Metro is the tool used by Funtoo Linux to build new releases of Funtoo Linux. It is also available to the public and can be used to build custom versions of Funtoo Linux, or used by developers to perform build testing. This page documents how to install, configure and use Metro. Also note that there is various additional supplemental documentation available on sub-pages, with links above.

Please see Initial Setup for instructions on how to get Metro up and running on your system.