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

From Funtoo
Jump to navigation Jump to search
Line 9: Line 9:
# ##i##git clone git://github.com/funtoo/metro.git
# ##i##git clone git://github.com/funtoo/metro.git
}}
}}
=== Setting up ego===
Now, we will set the {{c|ego}}, administration tool of Funtoo/Linux. The way it is used with metro is independent from {{c|app-admin/ego}} installed on your box. Setup is easy as follows:
<console>
# ##i##cd /root
# ##i##git clone https://github.com/funtoo/ego,git
</console>
This way you will have {{c|/root/ego}} directory with {{c|ego}} binary that is then used by metro.


== Dependencies ==
== Dependencies ==

Revision as of 05:06, August 26, 2018

The autosetup script provides a fast and convenient way of quickly setting up and running metro builds.

Installing Metro

The recommended and supported method is to use the Git repository of Metro. Funtoo users should aleady have dev-vcs/git installed on there system. Users of other distros may need to install it. Clone the master git repository as follows (Assuming you wish to clone into '/root'. Feel free to change the location to suit your needs):

root # cd /root
root # git clone git://github.com/funtoo/metro.git

Setting up ego

Now, we will set the ego, administration tool of Funtoo/Linux. The way it is used with metro is independent from app-admin/ego installed on your box. Setup is easy as follows:

root # cd /root
root # git clone https://github.com/funtoo/ego,git

This way you will have /root/ego directory with ego binary that is then used by metro.

Dependencies

In order to use the autosetup script a few dependencies are required.

  • >=dev-lang/python-3.6
  • dev-python/requests
  • dev-python/lxml
root # emerge dev-python/requests dev-python/lxml
   Note

Changing python versions is outside the scope of this article as it requires changing branches in the python kit. Please see the ego manpages for information on how to do this if your not already using Python 3.6

Configuring Metro

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.

root # cp /root/metro/metro.conf ~/.metro

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.

root # /root/metro/scripts/autosetup

Configuring your build

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

Build

Currently there are only two types of builds, current and hardened.

Pick a type to build:
  1. funtoo-current
  2. funtoo-current-hardened
  Enter a number (or 'p' for previous menu, 'q' to quit):

Arch and Subarch

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

Current menu: funtoo-current-hardened
  Pick an arch to build:
  1. x86-64bit
  2. x86-32bit
  3. pure64
  4. arm-64bit
  5. arm-32bit
  Enter a number (or 'p' for previous menu, 'q' to quit):
Current menu: funtoo-current-hardened / x86-64bit
  Pick a subarch to build:
  1. amd64-bulldozer
  2. amd64-excavator
  3. amd64-jaguar
  4. amd64-k10
  5. amd64-k8
  6. amd64-k8+sse3
  7. amd64-piledriver
  8. amd64-steamroller
  9. atom_64
  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

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.
  • 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
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

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.

Current menu: funtoo-current-hardened / x86-64bit / intel64-westmere / new
  Pick what to build:
  1. full
  2. full+openvz
  3. full+lxd
  4. freshen
  5. freshen+openvz
  6. freshen+lxd
  Enter a number (or 'p' for previous menu, 'q' to quit):

Remote Subarch

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

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 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.

Current menu: funtoo-current-hardened / x86-64bit / intel64-westmere / remote / full+lxd / generic_64
  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):

Enjoy

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 Metro Documentation for more information on how metro works and other build options such as automatic building via the buildbot script.