The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Creating Profiles"
Line 6: | Line 6: | ||
** The version of [[Package:Eselect|eselect]] that supports Funtoo profiles (already integrated into Funtoo Linux) | ** The version of [[Package:Eselect|eselect]] that supports Funtoo profiles (already integrated into Funtoo Linux) | ||
* What your overlay need: | * What your overlay need: | ||
** | ** Directory <code><overlay_name>/profiles</code>: store your profiles in it. | ||
** | ** File <code><overlay_name>/profiles/repo_name</code>: store the name of your overlay | ||
** | ** File <code><overlay_name>/profiles/profiles.eselect.desc</code>: see <code>profiles.eselect.example</code> in your Funtoo portage tree for instruction. | ||
** If you're creating profiles of types arch, build, flavor, or mix-ins, your profile must be inside a directory with same name, such as <code><overlay_name>/profiles/<profile_name>/flavor/<flavor_name></code>, <code><overlay_name>/profiles/<profile_name>/mix-ins/<mix-ins_name></code> | ** If you're creating profiles of types arch, build, flavor, or mix-ins, your profile must be inside a directory with same name, such as <code><overlay_name>/profiles/<profile_name>/flavor/<flavor_name></code>, <code><overlay_name>/profiles/<profile_name>/mix-ins/<mix-ins_name></code> | ||
Revision as of 08:58, October 31, 2014
Want to create your own custom profiles? Thought up a mix-in that's not currently in the Funtoo profiles? Have an overlay with profiles and want to make it easy for people to use them? Well you've come to the right place. This article will show you how to easily add you own profiles. No more ugly hacking of parent files and other nonsense. Once you follow this guide, not only will portage easily recognize your profiles, they will also show up in eselect right along with the ones from the main tree.
How to do it
Rules to follow
- What your system need:
- The version of eselect that supports Funtoo profiles (already integrated into Funtoo Linux)
- What your overlay need:
- Directory
<overlay_name>/profiles
: store your profiles in it. - File
<overlay_name>/profiles/repo_name
: store the name of your overlay - File
<overlay_name>/profiles/profiles.eselect.desc
: seeprofiles.eselect.example
in your Funtoo portage tree for instruction. - If you're creating profiles of types arch, build, flavor, or mix-ins, your profile must be inside a directory with same name, such as
<overlay_name>/profiles/<profile_name>/flavor/<flavor_name>
,<overlay_name>/profiles/<profile_name>/mix-ins/<mix-ins_name>
- Directory
Currently, NoMix (see profiles.eselect.example
in the Funtoo portage tree) is only supported for profiles in the same tree.
Also:
profile-formats = portage-2set in
metadata/layout.conf
in order for portage to interpret the <repo_name>:<profile>
syntax.
Example of how to set up
For our example we will create a mix-ins profile called 'fake_pro' in a local overlay called 'local_overlay'. fake_pro will set the 'dummy' USE flag globally and also set the 'fake' USE flag on sys-apps/not-exist. We will then add the profile to eselect so it's visible when running 'eselect profile'.
Creating the profile
We will use ${OVERLAY_DIR}
as the path to local_overlay. These instructions assume the overlay exists.
If you haven't set a name for your overlay, do that first:
root # echo "local_overlay" > ${OVERLAY_DIR}/profiles/repo_name
Next lets create a directory to store our profile. Since we're creating a 'mix-ins' profile we need to make sure our profile is inside a 'mix-ins' subdirectory. This is a requirement in order to ensure that the profile will show up in eselect. If your not planning on using eselect then there's no requirement to use 'mix-ins'
root # install -d ${OVERLAY_DIR}/profiles/my_profiles/mix-ins/fake_pro
Now that we have a directory for our profile, lets go ahead and add our settings. Global USE settings go in make.defaults
, package specific USE settings go in package.use
:
root # cd ${OVERLAY_DIR}/profiles/my_profiles/mix-ins/fake_pro root # echo 'USE="$USE dummy"' >> make.defaults root # echo 'sys-apps/not-exist fake' >> package.use
Note that no matter if your using funtoo or gentoo, profile settings all work the same. For more information please check the portage man page.
Adding to eselect
eselect reads from the file profiles.eselect.desc
in your profiles/ directory. Format is "Type Name Status NoMix" space-separated. For more information look in /usr/portage/profiles/profiles.eselect.example
:
root # echo 'mix-ins my_profiles/mix-ins/fake_pro testing' >> ${OVERLAY_DIR}/profiles/profiles.eselect.desc
Watch the result:
root # eselect profile list