Note

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

Difference between revisions of "Funtoo:Metro/Recipes"

From Funtoo
Jump to navigation Jump to search
 
m (FuzzyBot moved page Metro/Recipes to Funtoo:Metro/Recipes without leaving a redirect: Part of translatable page "Metro")
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== How do I build an OpenVZ template? ==
=== How do I build an OpenVZ template? ===
This can be done as follows:


<pre>
{{console|body=
# /root/git/metro/scripts/ezbuild.sh funtoo-current core2_64 openvz
###i## /root/git/metro/scripts/ezbuild.sh funtoo-current core2_64 openvz
</pre>
}}


== How do I build a VServer template? ==
=== How do I build a stage3 with custom packages? ===


The latest git version of metro supports vserver natively:
Metro can be easily configured for building custom stage3 by including additional packages. You can find following directory {{c|/etc/builds/packages}} in your copy of metro repository and a corresponding {{c|arch}} configuration files inside:
{{file|name=/etc/builds/packages/x86-64bit.conf|body=
[section emerge]


<pre>
packages: [
# /root/git/metro/scripts/ezbuild.sh funtoo-current core2_64 vserver
sys-kernel/debian-sources
</pre>
]
}}
Notice a {{c|debian-sources}} ebuild is added for all 64-bit stages. Modify the file to include (or exclude in case Funtoo add additional) packages of your choice. They will be included in your custom stage3 portage's world file.


== How do I build an Linux Containers (LXC) template? ==
=== How do I build an LXD template? ===


The latest git version of metro supports LXC natively:
The latest git version of metro supports LXD natively:


<pre>
{{console|body=
# /root/git/metro/scripts/ezbuild.sh funtoo-current core2_64 lxc
# ##i##/root/git/metro/scripts/ezbuild.sh funtoo-current x86-64bit core2_64 lxd
</pre>
}}


== How do I build stuff, plus an OpenVZ template? ==
=== How do I build stuff, plus an OpenVZ template? ===


Sometimes it's handy to be able to build a multi-target like "full" (the default stage1/2/3 build) or "freshen" ''plus'' an additional single target such as "openvz", "lxc" or "vserver". The advantage of using this approach is that the second target will only build if the first one completes successfully. Metro now accepts a "+(single-target)" to specify one additional extra target:
Sometimes it's handy to be able to build a multi-target like "full" (the default stage1/2/3 build) or "freshen" ''plus'' an additional single target such as "openvz", "lxc" or "vserver". The advantage of using this approach is that the second target will only build if the first one completes successfully. Metro now accepts a "+(single-target)" to specify one additional extra target:


<pre>
{{console|body=
# /root/git/metro/scripts/ezbuild.sh funtoo-current corei7 full+openvz
# ##i##/root/git/metro/scripts/ezbuild.sh funtoo-current corei7 full+openvz
</pre>
}}


This comes in handy for cron jobs.
This comes in handy for cron jobs.


== How do I build more than one stage a day? ==
=== How do I build more than one stage a day? ===


To build more than one stage a day, use the full syntax to <tt>ezbuild.sh</tt> as shown below, and specify the suffix of your preference to the datestamp. From Metro's perspective, the datestamp is just a string so anything will work -- "[today's date]-1", "test", "test-3", etc. will all be accepted by Metro. Metro will record the last stage3 built and use it as a seed stage.
To build more than one stage a day, use the full syntax to {{c|ezbuild.sh}} as shown below, and specify the suffix of your preference to the datestamp. From Metro's perspective, the datestamp is just a string so anything will work -- "[today's date]-1", "test", "test-3", etc. will all be accepted by Metro. Metro will record the last stage3 built and use it as a seed stage.


<pre>
{{console|body=
# /root/git/metro/scripts/ezbuild.sh funtoo-current generic_64 full 20111231-1
# ##i##/root/git/metro/scripts/ezbuild.sh funtoo-current generic_64 full 20111231-1
</pre>
}}


[[Category:Official Documentation]]
[[Category:Metro]]
[[Category:Metro]]

Latest revision as of 03:26, February 25, 2022

How do I build an OpenVZ template?

This can be done as follows:

root # /root/git/metro/scripts/ezbuild.sh funtoo-current core2_64 openvz

How do I build a stage3 with custom packages?

Metro can be easily configured for building custom stage3 by including additional packages. You can find following directory /etc/builds/packages in your copy of metro repository and a corresponding arch configuration files inside:

   /etc/builds/packages/x86-64bit.conf
[section emerge]

packages: [
	sys-kernel/debian-sources
]

Notice a debian-sources ebuild is added for all 64-bit stages. Modify the file to include (or exclude in case Funtoo add additional) packages of your choice. They will be included in your custom stage3 portage's world file.

How do I build an LXD template?

The latest git version of metro supports LXD natively:

root # /root/git/metro/scripts/ezbuild.sh funtoo-current x86-64bit core2_64 lxd

How do I build stuff, plus an OpenVZ template?

Sometimes it's handy to be able to build a multi-target like "full" (the default stage1/2/3 build) or "freshen" plus an additional single target such as "openvz", "lxc" or "vserver". The advantage of using this approach is that the second target will only build if the first one completes successfully. Metro now accepts a "+(single-target)" to specify one additional extra target:

root # /root/git/metro/scripts/ezbuild.sh funtoo-current corei7 full+openvz

This comes in handy for cron jobs.

How do I build more than one stage a day?

To build more than one stage a day, use the full syntax to ezbuild.sh as shown below, and specify the suffix of your preference to the datestamp. From Metro's perspective, the datestamp is just a string so anything will work -- "[today's date]-1", "test", "test-3", etc. will all be accepted by Metro. Metro will record the last stage3 built and use it as a seed stage.

root # /root/git/metro/scripts/ezbuild.sh funtoo-current generic_64 full 20111231-1