Difference between pages "News:Testing GNOME 3.14" and "Creating Profiles"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
(Ref. FL-1694)
 
 
Line 1: Line 1:
{{News
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.
|Summary=GNOME 3.14 is now available in Funtoo, masked for testing. Help us test it!
|News Format=Extended
|News Category=General
|Author=Dantrell
|Publication Status=Published
|Publication Date=2014/10/22
|Icon=File:Gnome.jpg
}}
{{Note|This is a News item page, and you can comment using DISQUS at the bottom.}}


GNOME 3.14 is now available in Funtoo, masked for testing. Please help us test it. If you find bugs, or want more detailed information on what is included, please see  [https://bugs.funtoo.org/browse/FL-1637 FL-1637].
== How to do it ==
=== Rules to follow ===
#You will need a version of [[Package:Eselect|eselect]] that supports Funtoo profiles (already integrated into Funtoo Linux.)
#Your overlay must have a directory  called <code>profiles</code>. And this directory must include a file called <code>repo_name</code>. The name of your overlay is recorded in this file.
#Your profiles must be inside of the directory called <code>profiles</code>
#You need a file called <code>profiles.eselect.desc</code> inside the directory called <code>profiles</code>. See <code>profiles.eselect.example</code> in your Funtoo Portage tree for instructions.
#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 <tt>profiles/my_profile/flavor/new_profile</tt>, <tt>profiles/my_profile/mix-ins/subdir/profile</tt>.
# Currently <tt>NoMix</tt> (see <tt>profiles.eselect.example</tt>) is only supported for profiles in the same tree.
# If you're not using a standard Funtoo tree, you must ensure that your main Portage tree has <tt>profile-formats = portage-2</tt> set in <tt>metadata/layout.conf</tt> in order for portage to interpret the <repo_name>:<profile> syntax.


== Preparing ==
=== 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'.
=== sync ===
 
First, sync the tree if you haven't recently as you need access to a file in the tree:


==== Creating the profile ====
We will use ''<code>${OVERLAY_DIR}</code>'' 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:
<console>
<console>
###i## emerge --sync
###i## echo "local_overlay" > ${OVERLAY_DIR}/profiles/repo_name
</console>
</console>


=== unmask ===
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'
 
Now, reverse the GNOME 3.14 mask file:
 
==== package.mask (directory) ====
 
<console>
<console>
###i## cd /etc/portage/package.unmask
###i## install -d ${OVERLAY_DIR}/profiles/my_profiles/mix-ins/fake_pro
###i## ln -s /usr/portage/profiles/package.mask/funtoo-gnome .
</console>
</console>


==== package.mask (file) ====
Now that we have a directory for our profile, lets go ahead and add our settings. Global USE settings go in ''<code>make.defaults</code>'', package specific USE settings go in ''<code>package.use</code>'':
 
<console>
<console>
###i## cat /usr/portage/profiles/package.mask/funtoo-gnome >> /etc/portage/package.unmask
###i## cd ${OVERLAY_DIR}/profiles/my_profiles/mix-ins/fake_pro
###i## echo 'USE="$USE dummy"' >> make.defaults
###i## echo 'sys-apps/not-exist fake' >> package.use
</console>
</console>
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.


=== USE flags ===
==== Adding to eselect ====
 
eselect reads from the file ''<code>profiles.eselect.desc</code>'' in your profiles/ directory. Format is "Type Name Status NoMix" space-separated. For more information look in ''<code>/usr/portage/profiles/profiles.eselect.example</code>'':
Then to simplify matters, enable the gnome mix-in:
 
<console>
<console>
###i## eselect profile list
###i## echo 'mix-ins my_profiles/mix-ins/fake_pro testing' >> ${OVERLAY_DIR}/profiles/profiles.eselect.desc
##g##Currently available mix-ins profiles: 
  [11]  funtoo/1.0/linux-gnu/mix-ins/audio
  [12]  funtoo/1.0/linux-gnu/mix-ins/cinnamon
  [13]  funtoo/1.0/linux-gnu/mix-ins/console-extras
  [14]  funtoo/1.0/linux-gnu/mix-ins/dvd
  [15]  funtoo/1.0/linux-gnu/mix-ins/gnome
  [16]  funtoo/1.0/linux-gnu/mix-ins/kde
  [17]  funtoo/1.0/linux-gnu/mix-ins/mate
  [18]  funtoo/1.0/linux-gnu/mix-ins/media
  [19]  funtoo/1.0/linux-gnu/mix-ins/print
  [20]  funtoo/1.0/linux-gnu/mix-ins/python3-only
  [21]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat
  [22]  funtoo/1.0/linux-gnu/mix-ins/server-db
  [23]  funtoo/1.0/linux-gnu/mix-ins/server-mail
  [24]  funtoo/1.0/linux-gnu/mix-ins/server-web
  [25]  funtoo/1.0/linux-gnu/mix-ins/X
  [26]  funtoo/1.0/linux-gnu/mix-ins/xfce
  [27]  funtoo/1.0/linux-gnu/mix-ins/vmware-guest
  [28]  funtoo/1.0/linux-gnu/mix-ins/hardened
</console>
</console>
 
Watch the result:
<console>
<console>
###i## eselect profile add funtoo/1.0/linux-gnu/mix-ins/gnome
###i## eselect profile list
</console>
 
== Emerging ==
 
=== Installing GNOME 3.14 ===
 
===== gnome =====
 
To emerge ''gnome'' run the following command:
 
<console>
###i## emerge gnome
</console>
 
===== gnome-light =====
 
To emerge ''gnome-light'' run the following command:
 
<console>
###i## emerge gnome-light
</console>
 
=== Upgrading from GNOME 3.12 ===
 
To update "gnome" or "gnome-light" run the following command:
 
<console>
###i## emerge -vauDN world
</console>
</console>


== Finishing Touches ==
[[Category:Portage]]
 
[[Category:Labs]]
=== Verify the inode/directory MimeType Handler ===
[[Category:HOWTO]]
 
[[Category:Featured]]
In some odd instances, baobab might take priority over nautilus when handling the inode/directory MimeType. If this behavior is not desired, add the following to /home/~/.local/share/applications/mimeapps.list:
 
<pre>
[Added Associations]
inode/directory=org.gnome.Nautilus.desktop;org.gnome.baobab.desktop;
</pre>
 
{{NewsFooter}}

Revision as of 08:12, 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

  1. You will need a version of eselect that supports Funtoo profiles (already integrated into Funtoo Linux.)
  2. Your overlay must have a directory called profiles. And this directory must include a file called repo_name. The name of your overlay is recorded in this file.
  3. Your profiles must be inside of the directory called profiles
  4. You need a file called profiles.eselect.desc inside the directory called profiles. See profiles.eselect.example in your Funtoo Portage tree for instructions.
  5. 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 profiles/my_profile/flavor/new_profile, profiles/my_profile/mix-ins/subdir/profile.
  6. Currently NoMix (see profiles.eselect.example) is only supported for profiles in the same tree.
  7. If you're not using a standard Funtoo tree, you must ensure that your main Portage tree has profile-formats = portage-2 set 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