Difference between revisions of "Funtoo:Metro/Initial Setup"

From Funtoo
Jump to navigation Jump to search
m (FuzzyBot moved page Metro/AutoSetup to Funtoo:Metro/AutoSetup without leaving a redirect: Part of translatable page "Metro")
Line 1: Line 1:
The autosetup script provides a fast and convenient way of quickly setting up the metro build repository with a ''seed stage'' (see [[Metro/How Metro Works]] for more information on seed stages) so that it is ready to start a metro build.
= Funtoo:Metro/AutoSetup =
 
The autosetup script provides a fast and convenient way of quickly setting up the metro build repository with a ''seed stage'' so that it is ready to start a metro build.
 
It is recommended to work from a container or an fchroot environment.  If you'd like to use a container, please follow the steps found at [[LXD]] to set up an lxd container from a Funtoo image. Or you can just use an fchroot environment, following the instructions.
 
{{important|If you are using an LXD container to build a stage tarball for an architecture incompatible with the host, you need to make sure that your LXD setup supports that architecture or the build will fail.}}
 
== Setting up an fchroot Environment ==
 
=== Installing sys-apps/fchroot ===
 
Funtoo offers a convenient tool called {{c|sys-apps/fchroot}} to work in chroot environments, which will take care of any mounts you need to set up and also setting up the network within the chroot environment. Fchroot actually goes well beyond what a regular chroot can do (see [[Frankenchroot]]). In order to install it, just emerge the package:
 
{{console|body=
# ##i##emerge -av sys-apps/fchroot
}}
 
=== Downloading the latest stage3 tarball  ===
 
Choose a stage3 tarball from https://build.funtoo.org. The "Next release" x86-64bit generic build is a good choice in most cases:
 
{{console|body=
# ##i##wget https://build.funtoo.org/next/x86-64bit/generic_64/2022-09-13/stage3-generic_64-next-2022-09-13.tar.xz
}}
 
Then, create a directory and unpack the tarball into it:
 
{{console|body=
$ ##i##mkdir metro-chroot
$ ##i##tar xJpvf stage3-generic_64-next-2022-09-13.tar.xz -C metro-chroot
}}
 
=== Entering and setting up the fchroot enviroment  ===
 
By using Funtoo's {{c|sys-apps/fchroot}}, you don't need to worry about mounting filesystems and setting up the network before chrooting.  That will be done automatically for you.  All you need to do after you entered the environment is to create a meta repository using {{c|ego sync}}:
 
{{console|body=
$ ##i##fchroot metro-chroot/
%fchroot% ##i##ego sync
}}
 
== Getting the necessary software ==
 
You will need git to clone Metro and some Python modules used by the scripts. If you are working from a stage3 tarball fchroot environment, {{c|dev-vcs/git}} and {{c|dev-python/requests}} are already provided for you. Please make sure you have the following packages installed in your system:
 
{{console|body=
%fchroot% ##i##emerge -av dev-vcs/git
%fchroot% ##i##emerge -av dev-python/lxml
%fchroot% ##i##emerge -av dev-python/requests
}}
 
== Cloning and configuring Metro ==
 
You can get the latest version of Metro from the git repository using git. Soon, it will also be available as an ebuild on your meta repository.
 
{{console|body=
%fchroot% ##i##cd /root
%fchroot% ##i##git clone https://code.funtoo.org/bitbucket/scm/core/metro.git
}}
 
=== Configuring Metro ==
The default options for metro are usually fine for most cases. If you are happy with the defaults, just copy the default configuration file to /root/.metro:
 
{{console|body=
%fchroot% ##i##cp /root/metro/metro.conf /root/.metro
}}
 
If you wish to tweak the settings then you should manually copy /path/to/metro/metro.conf to /root/.metro and edit accordingly (see [[Funtoo:Metro/Configuring_Metro|Configuring_Metro]]).
 
Now your system is ready to run Metro's automatic setup tool, which will take care of the rest of the preparation.
 
== Automatically setting up your build ==
 
Before you can start building your stage tarballs, you need to set up an independent {{c|ego}}, cloned from the git repository, install {{c|app-emulation/qemu}} with the correct USE flags for the architecture for which you are building the tarball.
 
These steps are done automatically by the {{c|setup}} script:
 
{{console|body=
%fchroot% ##i##/root/metro/scripts/setup
}}
 
=== Selecting a release ===
You can build a stage tarball for any of the available Funtoo releases.  Currently, these are the only releases available:
{{console|body=
.##i##www.funtoo.org / funtoo
 
  ##i##1. 1.4-release-std
  ##i##2. next
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.
}}
 
=== Selecting an Architecture ===
 
{{console|body=
.##i##www.funtoo.org / funtoo / next
 
 
  ##i##1. arm-64bit
  ##i##2. riscv-64bit
  ##i##3. x86-64bit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.
}}
 
=== Selecting a Subarchitecture ===


== Starting the script ==
The autosetup script is located at /path/to/metro/scripts/autosetup and is executable by default. Simply open up a shell and run it.
{{console|body=
{{console|body=
# ##i##/root/metro/scripts/autosetup
.##i##www.funtoo.org / funtoo / next / x86-64bit
 
  ##i##1. amd64-bulldozer
  ##i##2. amd64-excavator
  ##i##3. amd64-k10
  ##i##4. amd64-piledriver
  ##i##5. amd64-steamroller
  ##i##6. amd64-zen
  ##i##7. amd64-zen2
  ##i##8. amd64-zen3
  ##i##9. core2_64
  ##i##10. generic_64
  ##i##11. intel64-broadwell
  ##i##12. intel64-haswell
  ##i##13. intel64-ivybridge
  ##i##14. intel64-nehalem
  ##i##15. intel64-sandybridge
  ##i##16. intel64-silvermont
  ##i##17. intel64-skylake
  ##i##18. intel64-westmere
 
 
.
}}
}}


== Configuring your build ==
=== Wait for the Setup to Complete ===
The following sections will give examples of the menu options and an explanation of them where applicable.Your options may vary depending on changes to funtoo after the writing of this. At anytime you may enter 'q' to quit autosetup or 'p' to go back to the previous menu
The setup script will go through several steps to set up your build. If you are running it for the first time, these can include creating a new meta repository, installing supporting software and downloading a tarball, so it may take some time to complete.


=== Build ===
Here is a sample output:
Currently there are only two types of builds, current and hardened.
 
{{kernelop|desc=
{{console|body=
  Pick a type to build:
Created file /home/mirror/funtoo/next/x86-64bit/generic_64/.control/strategy/build with contents 'local'
  1. funtoo-current
Created file /home/mirror/funtoo/next/x86-64bit/generic_64/.control/strategy/seed with contents 'stage3'
  2. funtoo-current-hardened
Created file /home/mirror/funtoo/next/x86-64bit/generic_64/.control/version/stage3 with contents '2022-09-13'
  Enter a number (or 'p' for previous menu, 'q' to quit):
--2022-10-09 08:06:24--  https://build.funtoo.org/next/x86-64bit/generic_64/2022-09-13/stage3-generic_64-next-2022-09-13.tar.xz
Resolving build.funtoo.org... 89.187.187.14, 89.187.187.12, 89.187.187.19, ...
Connecting to build.funtoo.org|89.187.187.14|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 701542432 (669M) [application/octet-stream]
Saving to: ‘/home/mirror/funtoo/next/x86-64bit/generic_64/2022-09-13/stage3-generic_64-next-2022-09-13.tar.xz’
 
funtoo/next/x86-64bit/g  100%[==================================================>] 669.04M  95.5MB/s    in 7.3s
 
2022-10-09 08:06:32 (92.0 MB/s) - ‘/home/mirror/funtoo/next/x86-64bit/generic_64/2022-09-13/stage3-generic_64-next-2022-09-13.tar.xz’ saved [701542432/701542432]
 
Cloning into '/root/ego'...
remote: Enumerating objects: 3385, done.
remote: Counting objects: 100% (3385/3385), done.
remote: Compressing objects: 100% (1382/1382), done.
remote: Total 3385 (delta 2093), reused 2902 (delta 1727), pack-reused 0
Receiving objects: 100% (3385/3385), 760.96 KiB | 27.18 MiB/s, done.
Resolving deltas: 100% (2093/2093), done.
 
Metro build for release next, x86-64bit, generic_64 has been initialized.
To build a new release, use ezbuild (or set up buildbot):
 
scripts/ezbuild.sh next x86-64bit generic_64 freshen+gnome
}}
}}


=== Arch  and Subarch ===
== Building a new release ==
Arch and subarch are pretty self explanatory. Keep in mind that in order to build the selected arch/subarch your system must actually support it.  You can't for instance build an arm stage from a x86-64bit system
 
{{kernelop|desc=
In the example above, a "next x86-64bit generic_64" build has been set up to build a new Gnome stage3 tarball using an existing stage3 tarball downloaded from https://build.funtoo.org. If your satisfied with that, you can just go ahead and run the command as suggested:
  Current menu: funtoo-current-hardened
 
  Pick an arch to build:
{{console|body=
  1. x86-64bit
%fchroot% ##i##/root/metro/scripts/ezbuild.sh next x86-64bit generic_64 freshen+gnome
  2. x86-32bit
  3. pure64
  4. arm-64bit
  5. arm-32bit
  Enter a number (or 'p' for previous menu, 'q' to quit):
}}
}}
{{kernelop|desc=
 
  Current menu: funtoo-current-hardened / x86-64bit
Otherwise, continue reading to learn how to create a stage3 tarball with different specs.
  Pick a subarch to build:
 
  1. amd64-bulldozer
The first 3 arguments in the example above: 'next', 'x86-64bit' and 'intel64-ivybridge' correspond to the options chosen using the setup script. If you'd like to run {{c|ezbuild.sh}} for a different release, architecture or subarchitecture, you need to run the setup script again with the appropriate options.
  2. amd64-excavator
 
  3. amd64-jaguar
The 4th argument corresponds to a combination of the stages to build + the target spec for your stage tarball.
  4. amd64-k10
 
  5. amd64-k8
=== Checking the logs ===
  6. amd64-k8+sse3
{{c|ezbuild.sh}} is very quiet. If you were expecting it to give a lot of output like a usual {{c|emerge}} session, it may look like your computer froze. You can check what {{c|ezbuild.sh}} is doing by watching the logs, which can be found in a path with the following structure: {{c|/home/mirror/funtoo/<release>/<arch>/<subarch>/<date>/log/<stage>-<target>.txt}}.
  7. amd64-piledriver
 
  8. amd64-steamroller
{{console|body=
  9. atom_64
%fchroot% ##i##tail -f /home/mirror/funtoo/next/x86-64bit/intel64-skylake/2022-10-08/log/stage3-freshen.txt
  10. btver1_64
  11. core-avx-i
  12. core2_64
  13. corei7
  14. generic_64
  15. intel64-broadwell
  16. intel64-haswell
  17. intel64-ivybridge
  18. intel64-nehalem
  19. intel64-sandybridge
  20. intel64-silvermont
  21. intel64-westmere
  22. native_64
  23. nocona
  24. opteron_64
  25. xen-pentium4+sse3_64
  Enter a number (or 'p' for previous menu, 'q' to quit):
}}
}}


=== Build Option ===
Under the same directory, you will find a log file for every spec file involved in the build you chose. In the case of the example above, we had chose “freshen+gnome”, so we can expect to find {{c|stage3-freshen.txt}} and {{c|gnome.txt}}.
The build option menu allows you to choose how you want to build your new stage. There may be up to 3 different options:
 
* New build - This option is usually always present. Specifying it will instruct autosetup to automatically download an new stage3 tarball from the funtoo build mirror and setup metro to use that to build your new stage3.
If you'd like to know all the targets that are selected for that build, you can check the file {{c|.targets}} at (in our example):
* Local build - This option is available if you've previously built a stage3 for this arch/subarch. Metro will simply use the latest stage3 available for it to build a new one
 
* Remote build - This option is available if you have previously built a different subarch for the currently selected arch. Specifying this will instruct autosetup to configure metro to use the previously built stage3 from another subarch to build your new stage3
{{console|body=
{{kernelop|desc=
%fchroot% ##i##cat /home/mirror/funtoo/next/x86-64bit/intel64-skylake/2022-10-08/.targets
  Current menu: funtoo-current-hardened / x86-64bit / intel64-westmere
  Pick a build option to use:
  1. New build (Download a new stage3 for intel64-westmere from build.funtoo.org and build)
  2. Local build (Build from existing stage3 for intel64-westmere on system)
  3. Remote build (Build from another subarch on system)
  Enter a number (or 'p' for previous menu, 'q' to quit):
}}
}}


=== Stages to build ===
== Choosing a Target ==
This menu allows you to pick what type of stage(s) you wish to build. The current main options are either "full" or "freshen". Full will build a completely new stage3 by first building a new stage1, followed by a stage2, and finally your new stage3. Freshen will just 'freshen' the stage3 and is basically the equivalent of updating @world on the stage3 you are building from. You may also optionally build an openvz or lxd image at the same time. Note that if your are doing a 'remote' build there will be no 'freshen' options.
 
{{kernelop|desc=
=== Stages to Build ===
  Current menu: funtoo-current-hardened / x86-64bit / intel64-westmere / new
 
  Pick what to build:
There are 2 options for this argument: 'freshen' and 'full'.
  1. full
 
  2. full+openvz
“Freshen” will basically run a @world update on an existing stage3 tarball to generate a ''fresh'', updated version of the same tarball.
  3. full+lxd
 
  4. freshen
“Full” will build a stage3 from scratch, starting by building a stage1, then a stage2 and finally, from that, a fully new stage3 tarball, completely built from sources.
  5. freshen+openvz
 
  6. freshen+lxd
 
  Enter a number (or 'p' for previous menu, 'q' to quit):  
=== Build Targets ===
 
You can create different flavors of stage3, with the software and settings necessary for different purposes.  For example, a Gnome Desktop stage3 tarball, an LXD container image, an OpenVZ container image, etc. You can find the available targets at /root/metro/targets/gentoo. You can also create your custom targets. See [[Funtoo:Metro/Data Model|Metro Data Model]] to learn how to do that.
 
== Using Gnu Screen ==
Depending on the arguments you passed to {{c|ezbuild.sh}}, the build process may take several hours to complete.
 
If you are running {{c|ezbuild.sh}} from another machine through an ssh session, you might want to use a terminal multiplexer like {{c|app-misc/tmux}} or {{c|app-misc/screen}}, which will allow you to close the terminal and even log out from the remote machine machine.
 
Emerging {{c|app-misc/screen}}:
{{console|body=
# ##i##emerge -av app-misc/screen
}}
}}


=== Remote Subarch ===
Running {{c|app-misc/screen}}:
This menu will only appear if you've selected a 'remote' build. It allows you to pick which subarch you want to use as a seed for your new stage3. Only valid subarches that have previously built stage3s will appear in this menu
{{console|body=
{{kernelop|desc=
# ##i##screen -T ${TERM} -S Metro
  Current menu: funtoo-current-hardened / x86-64bit / intel64-westmere / remote / full+lxd
  Pick a remote subarch to use for building:
  1. generic_64
  Enter a number (or 'p' for previous menu, 'q' to quit):
}}
}}


=== Run Build ===
This will open a screen session, where you can run {{c|ezbuild.sh}} normally:
This menu allows you to choose whether you want to actually start building your new stage3 now. Picking 'Yes' will instruct metro to start building your new stage3 now. Picking 'No' will instruct autosetup to complete all setup steps for metro (including downloading a new stage3 if needed) but not actually start the build. This will allow you to manually start the build at a later time. If you wish to abort without completing setup then you must enter 'q' to quit.
 
{{kernelop|desc=
{{console|body=
  Current menu: funtoo-current-hardened / x86-64bit / intel64-westmere / remote / full+lxd / generic_64
# ##i##/home/root/metro/scripts/ezbuild.sh next x86-64bit intel64-ivybridge freshen+gnome
  Do you want to start the build now? (If 'No' setup will still run):
  1. Yes
  2. No
  Enter a number (or 'p' for previous menu, 'q' to quit):
}}
}}


==Configuring Metro ==
When you want to leave the terminal, just press Ctrl+A and then Ctrl+D to detach the screen session. Once you've detached, you are free to leave you ssh session and/or close your terminal. The script will keep running inside.
The default options for metro are usually fine for most cases. If you are happy with the defaults then you don't need to do anything. The first time you run the autosetup script it will copy the default configuration file to /root/.metro and automatically adjust the location setting to the current location of metro. If you wish to tweak the settings then you should manually copy /path/to/metro/metro.conf to /root/.metro and edit accordingly.
 
When you want to go back, just restore your session:
{{console|body=
{{console|body=
# ##i##cp /root/metro/metro.conf ~/.metro
# ##i##screen -T ${TERM} -r Metro
}}
}}


== Enjoy ==  
== Where is my Stage Tarball? ==
Congratulations, you have successfully setup your metro build. Hopefully you will find the autosetup script quite convenient for quickly setting up and running new builds. Please consult the [[:Category:Metro|Metro Documentation]] for more information on how metro works and other build options such as automatic building via the buildbot script.
 
When the build completes, the stage tarball can be found in a path with the following structure: {{c|/home/mirror/funtoo/<release>/<arch>/<subarch>/<date>/}}. In our example, it will be found at:
{{console|body=
%fchroot% ##i##ls /home/mirror/funtoo/next/x86-64bit/intel64-skylake/2022-10-08/
}}
 
== Where to Go From Here ==
 
 
Alternatively, you can set up a buildbot to do it:
 
{{console|body=
# ##i##
}}


[[Category:HOWTO]]
== Working with {{c|ezbuild.sh}} ==
[[Category:Metro]]
[[Category:Official Documentation]]

Revision as of 08:17, October 10, 2022

Funtoo:Metro/AutoSetup

The autosetup script provides a fast and convenient way of quickly setting up the metro build repository with a seed stage so that it is ready to start a metro build.

It is recommended to work from a container or an fchroot environment. If you'd like to use a container, please follow the steps found at LXD to set up an lxd container from a Funtoo image. Or you can just use an fchroot environment, following the instructions.

   Important

If you are using an LXD container to build a stage tarball for an architecture incompatible with the host, you need to make sure that your LXD setup supports that architecture or the build will fail.

Setting up an fchroot Environment

Installing sys-apps/fchroot

Funtoo offers a convenient tool called sys-apps/fchroot to work in chroot environments, which will take care of any mounts you need to set up and also setting up the network within the chroot environment. Fchroot actually goes well beyond what a regular chroot can do (see Frankenchroot). In order to install it, just emerge the package:

root # emerge -av sys-apps/fchroot

Downloading the latest stage3 tarball

Choose a stage3 tarball from https://build.funtoo.org. The "Next release" x86-64bit generic build is a good choice in most cases:

root # wget https://build.funtoo.org/next/x86-64bit/generic_64/2022-09-13/stage3-generic_64-next-2022-09-13.tar.xz

Then, create a directory and unpack the tarball into it:

user $ mkdir metro-chroot
user $ tar xJpvf stage3-generic_64-next-2022-09-13.tar.xz -C metro-chroot

Entering and setting up the fchroot enviroment

By using Funtoo's sys-apps/fchroot, you don't need to worry about mounting filesystems and setting up the network before chrooting. That will be done automatically for you. All you need to do after you entered the environment is to create a meta repository using ego sync:

user $ fchroot metro-chroot/
fchroot # ego sync

Getting the necessary software

You will need git to clone Metro and some Python modules used by the scripts. If you are working from a stage3 tarball fchroot environment, dev-vcs/git and dev-python/requests are already provided for you. Please make sure you have the following packages installed in your system:

fchroot # emerge -av dev-vcs/git
fchroot # emerge -av dev-python/lxml
fchroot # emerge -av dev-python/requests

Cloning and configuring Metro

You can get the latest version of Metro from the git repository using git. Soon, it will also be available as an ebuild on your meta repository.

fchroot # cd /root
fchroot # git clone https://code.funtoo.org/bitbucket/scm/core/metro.git

= Configuring Metro

The default options for metro are usually fine for most cases. If you are happy with the defaults, just copy the default configuration file to /root/.metro:

fchroot # cp /root/metro/metro.conf /root/.metro

If you wish to tweak the settings then you should manually copy /path/to/metro/metro.conf to /root/.metro and edit accordingly (see Configuring_Metro).

Now your system is ready to run Metro's automatic setup tool, which will take care of the rest of the preparation.

Automatically setting up your build

Before you can start building your stage tarballs, you need to set up an independent ego, cloned from the git repository, install app-emulation/qemu with the correct USE flags for the architecture for which you are building the tarball.

These steps are done automatically by the setup script:

fchroot # /root/metro/scripts/setup

Selecting a release

You can build a stage tarball for any of the available Funtoo releases. Currently, these are the only releases available:

.www.funtoo.org / funtoo

   1. 1.4-release-std
   2. next




















.

Selecting an Architecture

.www.funtoo.org / funtoo / next


   1. arm-64bit
   2. riscv-64bit
   3. x86-64bit




















.

Selecting a Subarchitecture

.www.funtoo.org / funtoo / next / x86-64bit

   1. amd64-bulldozer
   2. amd64-excavator
   3. amd64-k10
   4. amd64-piledriver
   5. amd64-steamroller
   6. amd64-zen
   7. amd64-zen2
   8. amd64-zen3
   9. core2_64
  10. generic_64
  11. intel64-broadwell
  12. intel64-haswell
  13. intel64-ivybridge
  14. intel64-nehalem
  15. intel64-sandybridge
  16. intel64-silvermont
  17. intel64-skylake
  18. intel64-westmere


.

Wait for the Setup to Complete

The setup script will go through several steps to set up your build. If you are running it for the first time, these can include creating a new meta repository, installing supporting software and downloading a tarball, so it may take some time to complete.

Here is a sample output:

Created file /home/mirror/funtoo/next/x86-64bit/generic_64/.control/strategy/build with contents 'local'
Created file /home/mirror/funtoo/next/x86-64bit/generic_64/.control/strategy/seed with contents 'stage3'
Created file /home/mirror/funtoo/next/x86-64bit/generic_64/.control/version/stage3 with contents '2022-09-13'
--2022-10-09 08:06:24--  https://build.funtoo.org/next/x86-64bit/generic_64/2022-09-13/stage3-generic_64-next-2022-09-13.tar.xz
Resolving build.funtoo.org... 89.187.187.14, 89.187.187.12, 89.187.187.19, ...
Connecting to build.funtoo.org

Building a new release

In the example above, a "next x86-64bit generic_64" build has been set up to build a new Gnome stage3 tarball using an existing stage3 tarball downloaded from https://build.funtoo.org. If your satisfied with that, you can just go ahead and run the command as suggested:

fchroot # /root/metro/scripts/ezbuild.sh next x86-64bit generic_64 freshen+gnome

Otherwise, continue reading to learn how to create a stage3 tarball with different specs.

The first 3 arguments in the example above: 'next', 'x86-64bit' and 'intel64-ivybridge' correspond to the options chosen using the setup script. If you'd like to run ezbuild.sh for a different release, architecture or subarchitecture, you need to run the setup script again with the appropriate options.

The 4th argument corresponds to a combination of the stages to build + the target spec for your stage tarball.

Checking the logs

ezbuild.sh is very quiet. If you were expecting it to give a lot of output like a usual emerge session, it may look like your computer froze. You can check what ezbuild.sh is doing by watching the logs, which can be found in a path with the following structure: /home/mirror/funtoo/<release>/<arch>/<subarch>/<date>/log/<stage>-<target>.txt.

fchroot # tail -f /home/mirror/funtoo/next/x86-64bit/intel64-skylake/2022-10-08/log/stage3-freshen.txt

Under the same directory, you will find a log file for every spec file involved in the build you chose. In the case of the example above, we had chose “freshen+gnome”, so we can expect to find stage3-freshen.txt and gnome.txt.

If you'd like to know all the targets that are selected for that build, you can check the file .targets at (in our example):

fchroot # cat /home/mirror/funtoo/next/x86-64bit/intel64-skylake/2022-10-08/.targets

Choosing a Target

Stages to Build

There are 2 options for this argument: 'freshen' and 'full'.

“Freshen” will basically run a @world update on an existing stage3 tarball to generate a fresh, updated version of the same tarball.

“Full” will build a stage3 from scratch, starting by building a stage1, then a stage2 and finally, from that, a fully new stage3 tarball, completely built from sources.


Build Targets

You can create different flavors of stage3, with the software and settings necessary for different purposes. For example, a Gnome Desktop stage3 tarball, an LXD container image, an OpenVZ container image, etc. You can find the available targets at /root/metro/targets/gentoo. You can also create your custom targets. See Metro Data Model to learn how to do that.

Using Gnu Screen

Depending on the arguments you passed to ezbuild.sh, the build process may take several hours to complete.

If you are running ezbuild.sh from another machine through an ssh session, you might want to use a terminal multiplexer like app-misc/tmux or app-misc/screen, which will allow you to close the terminal and even log out from the remote machine machine.

Emerging app-misc/screen:

root # emerge -av app-misc/screen

Running app-misc/screen:

root # screen -T ${TERM} -S Metro

This will open a screen session, where you can run ezbuild.sh normally:

root # /home/root/metro/scripts/ezbuild.sh next x86-64bit intel64-ivybridge freshen+gnome

When you want to leave the terminal, just press Ctrl+A and then Ctrl+D to detach the screen session. Once you've detached, you are free to leave you ssh session and/or close your terminal. The script will keep running inside.

When you want to go back, just restore your session:

root # screen -T ${TERM} -r Metro

Where is my Stage Tarball?

When the build completes, the stage tarball can be found in a path with the following structure: /home/mirror/funtoo/<release>/<arch>/<subarch>/<date>/. In our example, it will be found at:

fchroot # ls /home/mirror/funtoo/next/x86-64bit/intel64-skylake/2022-10-08/

Where to Go From Here

Alternatively, you can set up a buildbot to do it:

root # 

Working with ezbuild.sh