<?xml version="1.0" encoding="UTF-8"?>
<tricks type="array">
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2009-09-08T10:27:59+02:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">1333</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">1</nvotes>
    <permalink>howto_same_look_for_qt_gtk2_and_gtk1_applications_on_gentoo</permalink>
    <published-at type="datetime" nil="true"></published-at>
    <state>queued</state>
    <summary>This manual solves the problem with different looks of Qt, GTK2 and GTK1. This will help if you are using GTK applications from KDE or Qt applications from Gnome.</summary>
    <title>HOWTO: Same look for QT, GTK2 and GTK1 applications on Gentoo</title>
    <updated-at type="datetime">2009-09-08T10:27:59+02:00</updated-at>
    <updater-id type="integer">10</updater-id>
    <url>http://distro.ibiblio.org/pub/linux/distributions/amigolinux/download/DeskTop/Themes/HOWTO-Same-look-QT-GTK2-and-GTK1-apps-Gentoo.html</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">1</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2009-09-08T10:27:40+02:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">1332</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">1</nvotes>
    <permalink>howto_same_look_for_qt_gtk2_and_gtk1_applications_on_gentoo</permalink>
    <published-at type="datetime" nil="true"></published-at>
    <state>queued</state>
    <summary>This manual solves the problem with different looks of Qt, GTK2 and GTK1. This will help if you are using GTK applications from KDE or Qt applications from Gnome.</summary>
    <title>HOWTO: Same look for QT, GTK2 and GTK1 applications on Gentoo</title>
    <updated-at type="datetime">2009-09-08T10:27:40+02:00</updated-at>
    <updater-id type="integer">10</updater-id>
    <url>http://distro.ibiblio.org/pub/linux/distributions/amigolinux/download/DeskTop/Themes/HOWTO-Same-look-QT-GTK2-and-GTK1-apps-Gentoo.html</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;p style=&quot;color:blue;margin:30px;&quot;&gt;Tin Hat boots from CD, or optionally a pen drive, but it is not a LiveCD. It does not mount any file system from CD via unionfs or otherwise. Rather, Tin Hat is a massive image (approx. 2.3GB) which loads into tmpfs upon booting. One pays the prices of long boot times (5 minutes off CD, 2 minutes off pen drives), but the advantage afterwords is that there are no delays going back to the CD when starting applications. Needless to say, this has some rather extreme advantages and disadvantages, making Tin Hat a rather particular distribution.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://opensource.dyc.edu/tinhat&quot;&gt;Tin Hat&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://opensource.dyc.edu/tinhat-documentation&quot;&gt;Documentation&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://opensource.dyc.edu/node/221&quot;&gt;Tin Hat Screenshots&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://opensource.dyc.edu/tinhat-downloads&quot;&gt;Download&lt;/a&gt;&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>p{color:blue;margin:30px}. Tin Hat boots from CD, or optionally a pen drive, but it is not a LiveCD. It does not mount any file system from CD via unionfs or otherwise. Rather, Tin Hat is a massive image (approx. 2.3GB) which loads into tmpfs upon booting. One pays the prices of long boot times (5 minutes off CD, 2 minutes off pen drives), but the advantage afterwords is that there are no delays going back to the CD when starting applications. Needless to say, this has some rather extreme advantages and disadvantages, making Tin Hat a rather particular distribution.

&quot;Tin Hat&quot;:http://opensource.dyc.edu/tinhat

&quot;Documentation&quot;:http://opensource.dyc.edu/tinhat-documentation

&quot;Tin Hat Screenshots&quot;:http://opensource.dyc.edu/node/221

&quot;Download&quot;:http://opensource.dyc.edu/tinhat-downloads</content-textile>
    <created-at type="datetime">2009-07-29T11:15:23+02:00</created-at>
    <creator-id type="integer">69</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">1046</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">10</nvotes>
    <permalink>tin_hat</permalink>
    <published-at type="datetime">2009-07-31T00:38:32+02:00</published-at>
    <state>published</state>
    <summary>Tin Hat is a Linux distribution derived from hardened Gentoo which aims to provide a very secure, stable and fast Desktop environment that lives purely in RAM.</summary>
    <title>Tin Hat (hardened Gentoo)</title>
    <updated-at type="datetime">2009-12-06T01:19:45+01:00</updated-at>
    <updater-id type="integer">311</updater-id>
    <url>http://opensource.dyc.edu/tinhat</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">9</category-id>
    <comments type="integer"></comments>
    <content>&lt;h3&gt;Introduction&lt;/h3&gt;


	&lt;p&gt;Sometimes through over zealous unmasking of packages, sys-libs/glibc can be upgraded to a version not compatible with other bits of software. A particular version of glibc might be needed for certain 3rd party or hardware vendor tools. It could also be for consistency across a fleet of servers so that binary packages are more compatible.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://gentoo-portage.com/sys-libs/glibc&quot;&gt;Downgrade Glibc&lt;/a&gt;&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h3. Introduction

Sometimes through over zealous unmasking of packages, sys-libs/glibc can be upgraded to a version not compatible with other bits of software. A particular version of glibc might be needed for certain 3rd party or hardware vendor tools. It could also be for consistency across a fleet of servers so that binary packages are more compatible.

&quot;Downgrade Glibc&quot;:http://gentoo-portage.com/sys-libs/glibc</content-textile>
    <created-at type="datetime">2009-05-18T20:40:43+02:00</created-at>
    <creator-id type="integer">182</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">785</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">7</nvotes>
    <permalink>downgrade_glibc</permalink>
    <published-at type="datetime">2009-05-19T12:58:07+02:00</published-at>
    <state>published</state>
    <summary>A safe and tested method of downgrading glibc from ACCEPT_KEYWORDS in make.conf</summary>
    <title>Downgrade Glibc</title>
    <updated-at type="datetime">2009-05-21T19:12:11+02:00</updated-at>
    <updater-id type="integer">10</updater-id>
    <url>http://en.gentoo-wiki.com/wiki/Downgrade_Glibc</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;p&gt;The needed printer-files are located at: http://software.canon-europe.com/software/0024302.asp&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>The needed printer-files are located at: http://software.canon-europe.com/software/0024302.asp</content-textile>
    <created-at type="datetime">2009-04-29T21:55:42+02:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">704</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>gentoo_canon_pixma_series</permalink>
    <published-at type="datetime">2009-05-18T08:47:43+02:00</published-at>
    <state>published</state>
    <summary>A howto for Canon printers</summary>
    <title>Gentoo: Canon Pixma Series</title>
    <updated-at type="datetime">2009-05-18T10:47:45+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url>http://en.gentoo-wiki.com/wiki/Canon_Pixma_Series</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2009-03-23T08:50:48+01:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">540</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">5</nvotes>
    <permalink>gnome_replace_gnome_screensaver_with_xscreensaver</permalink>
    <published-at type="datetime">2009-03-24T16:51:43+01:00</published-at>
    <state>published</state>
    <summary>Gnome: Replace gnome-screensaver with xscreensaver</summary>
    <title>Gnome: Replace gnome-screensaver with xscreensaver</title>
    <updated-at type="datetime">2009-04-05T18:25:14+02:00</updated-at>
    <updater-id type="integer">108</updater-id>
    <url>http://ubuntuforums.org/showthread.php?t=195557</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">1</category-id>
    <comments type="integer"></comments>
    <content>If an error occurs starting the gnome-settings-daemon, then try this:
&lt;pre&gt;/usr/libexec/gnome-settings-daemon --no-daemon
   2  The program 'gnome-settings-daemon' received an X Window System error.
   3  This probably reflects a bug in the program.
   4  The error was 'BadClass, invalid event class'.
   5    (Details: serial 159 error_code 184 request_code 150 minor_code 6)
   6    (Note to programmers: normally, X errors are reported asynchronously;
   7     that is, you will receive the error a while after causing it.
   8     To debug your program, run it with the --sync command line
   9     option to change this behavior. You can then get a meaningful
  10     backtrace from your debugger if you break on the gdk_x_error() function.)
  11  [1237714027,000,xklavier.c:xkl_engine_start_listen/] 	The backend does not require manual layout management - but it is provided by the application&lt;/pre&gt;

&lt;a href=&quot;http://bugs.gentoo.org/show_bug.cgi?id=256016#c6&quot;&gt;Solution&lt;/a&gt;</content>
    <content-bbcode>If an error occurs starting the gnome-settings-daemon, then try this:
[code]/usr/libexec/gnome-settings-daemon --no-daemon
   2  The program 'gnome-settings-daemon' received an X Window System error.
   3  This probably reflects a bug in the program.
   4  The error was 'BadClass, invalid event class'.
   5    (Details: serial 159 error_code 184 request_code 150 minor_code 6)
   6    (Note to programmers: normally, X errors are reported asynchronously;
   7     that is, you will receive the error a while after causing it.
   8     To debug your program, run it with the --sync command line
   9     option to change this behavior. You can then get a meaningful
  10     backtrace from your debugger if you break on the gdk_x_error() function.)
  11  [1237714027,000,xklavier.c:xkl_engine_start_listen/] 	The backend does not require manual layout management - but it is provided by the application[/code]

[url=http://bugs.gentoo.org/show_bug.cgi?id=256016#c6]Solution[/url]</content-bbcode>
    <content-format>BBCode</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2009-03-22T10:56:35+01:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">539</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">4</nvotes>
    <permalink>gentoo_gnome_settings_daemon_does_not_start</permalink>
    <published-at type="datetime">2009-03-23T07:58:35+01:00</published-at>
    <state>published</state>
    <summary>If an error occurs starting the gnome-settings-daemon, then try this:</summary>
    <title>Gentoo: gnome-settings-daemon does not start</title>
    <updated-at type="datetime">2009-03-24T17:50:08+01:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-12-20T19:14:42+01:00</created-at>
    <creator-id type="integer">4</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">486</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">6</nvotes>
    <permalink>enable_real_media_support_on_gentoo_linux</permalink>
    <published-at type="datetime">2008-12-23T00:00:59+01:00</published-at>
    <state>published</state>
    <summary>How to enable real media support on Gentoo. It's disabled by default.</summary>
    <title>Enable real-media support on Gentoo Linux</title>
    <updated-at type="datetime">2009-01-02T04:38:00+01:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url>http://forums.gentoo.org/viewtopic-t-713051.html</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;p&gt;emerge&amp;#8212;keep-going&lt;/p&gt;


	&lt;p&gt;After installation it will give you a short summary of failed packages.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>emerge --keep-going

After installation it will give you a short summary of failed packages.</content-textile>
    <created-at type="datetime">2008-11-13T19:09:20+01:00</created-at>
    <creator-id type="integer">4</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">475</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">4</nvotes>
    <permalink>gentoo_linux_emerge_all_packages_at_once_even_with_failures</permalink>
    <published-at type="datetime">2009-03-18T05:47:54+01:00</published-at>
    <state>published</state>
    <summary>emerge --keep-going</summary>
    <title>Gentoo Linux: Emerge all packages at once even with failures</title>
    <updated-at type="datetime">2009-03-24T17:50:12+01:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-07-31T14:40:13+02:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">359</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">6</nvotes>
    <permalink>gentoo_printing_to_a_shared_windows_xp_printer_via_cups</permalink>
    <published-at type="datetime">2008-08-03T14:35:51+02:00</published-at>
    <state>published</state>
    <summary>This tutorial describes how to print from a Gentoo-Linux computer to a printer, that is shared at a Windows XP system, using CUPS (Common UNIX Printing System)</summary>
    <title>[Gentoo]: Printing to a shared Windows XP printer via CUPS</title>
    <updated-at type="datetime">2008-09-10T02:11:51+02:00</updated-at>
    <updater-id type="integer">107</updater-id>
    <url>http://forums.gentoo.org/viewtopic.php?t=88582&amp;highlight=windows+share+printer</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;h2&gt;Symptom&lt;/h2&gt;


	&lt;p&gt;Folgende Fehlermeldung kann viele Ursachen haben, aber sie tritt vor allem auch auf, wenn man binutils mit emerge -C binutils deinstalliert hat.&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
checking for C compiler default output file name... configure: error: C compiler cannot create executables
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;L&#246;sung&lt;/h2&gt;


	&lt;p&gt;Es wird ein vorkompiliertes Bin&#228;rpaket installiert:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
mkdir -p $(portageq envvar PKGDIR)/All
cd $(portageq envvar PKGDIR)/All
# F&#252;r amd64:
wget http://tinderbox.dev.gentoo.org/default-linux/amd64/sys-devel/binutils-2.18-r3.tbz2
# F&#252;r x86:
wget http://tinderbox.dev.gentoo.org/default-linux/x86/sys-devel/binutils-2.18-r3.tbz2
emerge -K binutils
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Danach sollte man nochmals binutils emergen, damit ein an das System angepasstes binutils gebaut wird:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
emerge binutils
&lt;/code&gt;
&lt;/pre&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. Symptom

p. Folgende Fehlermeldung kann viele Ursachen haben, aber sie tritt vor allem auch auf, wenn man binutils mit emerge -C binutils deinstalliert hat.


&lt;pre&gt;
&lt;code&gt;
checking for C compiler default output file name... configure: error: C compiler cannot create executables
&lt;/code&gt;
&lt;/pre&gt;


h2. L&#246;sung

p. Es wird ein vorkompiliertes Bin&#228;rpaket installiert:


&lt;pre&gt;
&lt;code&gt;
mkdir -p $(portageq envvar PKGDIR)/All
cd $(portageq envvar PKGDIR)/All
# F&#252;r amd64:
wget http://tinderbox.dev.gentoo.org/default-linux/amd64/sys-devel/binutils-2.18-r3.tbz2
# F&#252;r x86:
wget http://tinderbox.dev.gentoo.org/default-linux/x86/sys-devel/binutils-2.18-r3.tbz2
emerge -K binutils
&lt;/code&gt;
&lt;/pre&gt;

p. Danach sollte man nochmals binutils emergen, damit ein an das System angepasstes binutils gebaut wird:


&lt;pre&gt;
&lt;code&gt;
emerge binutils
&lt;/code&gt;
&lt;/pre&gt;</content-textile>
    <created-at type="datetime">2008-07-30T13:32:48+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">356</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">6</nvotes>
    <permalink>gentoo_binutils_deinstalliert_hier_die_rettung</permalink>
    <published-at type="datetime">2009-04-05T15:59:16+02:00</published-at>
    <state>published</state>
    <summary>Sollte man es aus irgendeinem Grund (wir reden lieber nicht dar&#252;ber) geschafft haben, das f&#252;r ein funktionierendes Gentoo-System essenzielle Paket binutils zu deinstallieren, dann sollte man diesem Trick folgen.</summary>
    <title>Gentoo: binutils deinstalliert? Hier die Rettung</title>
    <updated-at type="datetime">2009-04-16T04:43:43+02:00</updated-at>
    <updater-id type="integer">111</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-06-23T13:19:36+02:00</created-at>
    <creator-id type="integer">81</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">287</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">6</nvotes>
    <permalink>gentoo_booting_encrypted_system_from_usb_stick</permalink>
    <published-at type="datetime">2008-06-23T13:16:44+02:00</published-at>
    <state>published</state>
    <summary>A tutorial that shows you how to encrypt the entire hard drive with LUKS, partition it with LVM, and boot it from USB stick. All done manually, but it follows the KISS principle (tries to keep things as simple as possible). If you want a no-frills, do it yourself guide on how to encrypt your entire hard disk and boot it from an USB stick, this article may be of use to you.</summary>
    <title>Gentoo: Booting encrypted system from USB stick</title>
    <updated-at type="datetime">2008-09-25T19:54:38+02:00</updated-at>
    <updater-id type="integer">111</updater-id>
    <url>http://www.gentoo-wiki.com/Booting_encrypted_system_from_USB_stick</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer">#&lt;Comment:0x2ae48550f6d8&gt;#&lt;Comment:0x2ae48550f0e8&gt;</comments>
    <content>&lt;p&gt;emerge has the functionality to resume from the next package in line:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
emerge kde-meta # just an example

emerge --resume --skipfirst
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;If you do the following, a few more packages would be emerged unattended if a compile error occurs:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
emerge kde-meta ; emerge --resume --skipfirst ; emerge --resume --skipfirst ; emerge --resume-skipfirst
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Obviously, this isn&amp;#8217;t the perfect solution, so we should use an &lt;em&gt;until loop&lt;/em&gt;:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
emerge kde-meta || until emerge --resume --skipfirst; do emerge --resume --skipfirst; done
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;This way, the emerge is resumed until no further packages can be compiled successfully. When you wake up the next morning, you should check which packages failed with &lt;em&gt;emerge -pv kde-meta&lt;/em&gt;.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>p. emerge has the functionality to resume from the next package in line:


&lt;pre&gt;
&lt;code&gt;
emerge kde-meta # just an example

emerge --resume --skipfirst
&lt;/code&gt;
&lt;/pre&gt;

p. If you do the following, a few more packages would be emerged unattended if a compile error occurs:


&lt;pre&gt;
&lt;code&gt;
emerge kde-meta ; emerge --resume --skipfirst ; emerge --resume --skipfirst ; emerge --resume-skipfirst
&lt;/code&gt;
&lt;/pre&gt;


p. Obviously, this isn't the perfect solution, so we should use an _until loop_:


&lt;pre&gt;
&lt;code&gt;
emerge kde-meta || until emerge --resume --skipfirst; do emerge --resume --skipfirst; done
&lt;/code&gt;
&lt;/pre&gt;


p. This way, the emerge is resumed until no further packages can be compiled successfully. When you wake up the next morning, you should check which packages failed with _emerge -pv kde-meta_.</content-textile>
    <created-at type="datetime">2008-06-16T18:13:13+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">265</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">5</nvotes>
    <permalink>gentoo_resume_emerge_automatically</permalink>
    <published-at type="datetime">2008-06-16T16:45:43+02:00</published-at>
    <state>published</state>
    <summary>You know that: you entered something like  emerge kde-meta  , let it compile over-night only to realize the next morning that one of the first packages stopped the whole show with an error message. This trick might be a relieve.</summary>
    <title>Gentoo: Resume emerge automatically</title>
    <updated-at type="datetime">2008-06-24T05:17:15+02:00</updated-at>
    <updater-id type="integer">69</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;p&gt;Every Gentoo user knows the helpful tool &lt;em&gt;genlop&lt;/em&gt;, the emerge.log parser. With it, you can get the merge time of previously installed packages and the estimated merge time of a currently running emerge. Not everyone knows that it is also possible to get the estimated merge time for new packages.&lt;/p&gt;


	&lt;p&gt;Here, I&amp;#8217;m emerging a new package that has never been installed before on my machine. &lt;em&gt;genlop -c&lt;/em&gt; alone returns &lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;ETA&lt;/span&gt;: unknown&lt;/strong&gt;, but with the additional option &lt;strong&gt;-q&lt;/strong&gt; it queries an external database and returns a (very rough) estimation:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
noname ~ # genlop -c

 Currently merging 1 out of 2

 * app-admin/hddtemp-0.3_beta15-r3

       current merge time: 4 seconds.
       ETA: unknown.

noname ~ # genlop -cq

 Currently merging 1 out of 2

 * app-admin/hddtemp-0.3_beta15-r3

       current merge time: 8 seconds.
       ETA: any time now.
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;This also works with the &lt;strong&gt;-p&lt;/strong&gt; option, to get the estimated merge/update time of a pretending emerge:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
noname ~ # emerge -pv hddtemp | genlop -p
These are the pretended packages: (this may take a while; wait...)

[ebuild  N    ] app-admin/hddtemp-0.3_beta15-r3  USE=&quot;nls&quot; 0 kB

!!! Error: couldn't get previous merge of hddtemp; skipping...
!!! Error: hddtemp never merged; estimated time unknown.

noname ~ # emerge -pv hddtemp | genlop -pq
These are the pretended packages: (this may take a while; wait...)

[ebuild  N    ] app-admin/hddtemp-0.3_beta15-r3  USE=&quot;nls&quot; 0 kB

Estimated update time: less than a minute.
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;You can find more Gentoo tricks &lt;a href=&quot;http://howflow.com/tags/gentoo&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>p. Every Gentoo user knows the helpful tool _genlop_, the emerge.log parser. With it, you can get the merge time of previously installed packages and the estimated merge time of a currently running emerge. Not everyone knows that it is also possible to get the estimated merge time for new packages.


p. Here, I'm emerging a new package that has never been installed before on my machine. _genlop -c_ alone returns *ETA: unknown*, but with the additional option *-q* it queries an external database and returns a (very rough) estimation:


&lt;pre&gt;
&lt;code&gt;
noname ~ # genlop -c

 Currently merging 1 out of 2

 * app-admin/hddtemp-0.3_beta15-r3

       current merge time: 4 seconds.
       ETA: unknown.



noname ~ # genlop -cq

 Currently merging 1 out of 2

 * app-admin/hddtemp-0.3_beta15-r3

       current merge time: 8 seconds.
       ETA: any time now.
&lt;/code&gt;
&lt;/pre&gt;


p. This also works with the *-p* option, to get the estimated merge/update time of a pretending emerge:


&lt;pre&gt;
&lt;code&gt;
noname ~ # emerge -pv hddtemp | genlop -p
These are the pretended packages: (this may take a while; wait...)

[ebuild  N    ] app-admin/hddtemp-0.3_beta15-r3  USE=&quot;nls&quot; 0 kB

!!! Error: couldn't get previous merge of hddtemp; skipping...
!!! Error: hddtemp never merged; estimated time unknown.


noname ~ # emerge -pv hddtemp | genlop -pq
These are the pretended packages: (this may take a while; wait...)

[ebuild  N    ] app-admin/hddtemp-0.3_beta15-r3  USE=&quot;nls&quot; 0 kB


Estimated update time: less than a minute.
&lt;/code&gt;
&lt;/pre&gt;


p. You can find more Gentoo tricks &quot;here&quot;:http://howflow.com/tags/gentoo</content-textile>
    <created-at type="datetime">2008-06-16T01:32:54+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">260</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">5</nvotes>
    <permalink>gentoo_estimated_merge_time_for_previously_not_installed_packages</permalink>
    <published-at type="datetime">2008-06-16T01:40:54+02:00</published-at>
    <state>published</state>
    <summary>Tiny but handy trick to get the estimated merge time for packages which have never been installed before.</summary>
    <title>Gentoo: Estimated merge time for previously not installed packag</title>
    <updated-at type="datetime">2008-06-29T17:36:26+02:00</updated-at>
    <updater-id type="integer">4</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer">#&lt;Comment:0x2ae4854ee050&gt;#&lt;Comment:0x2ae4854eda88&gt;</comments>
    <content>&lt;h2&gt;Problem&lt;/h2&gt;


	&lt;p&gt;After unpacking the stage3 tar-ball, editing the &lt;span class=&quot;caps&quot;&gt;CHOST&lt;/span&gt; in /etc/make.conf, one of the first emerge stops with an error message &lt;em&gt;like&lt;/em&gt; this:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../crti.o: No such file or directory
g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/crtbeginS.o: No such file or directory
g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/crtendS.o: No such file or directory
g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../crtn.o: No such file or directory
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Basically, the compiler can&amp;#8217;t find some of its object files.&lt;/p&gt;


	&lt;h2&gt;Solution&lt;/h2&gt;


	&lt;p&gt;I&amp;#8217;m sorry, but the best solution is to start from scratch, reformat your partitions and this time take &lt;strong&gt;really good care&lt;/strong&gt; to download the &lt;strong&gt;correct&lt;/strong&gt; stage3 tar-ball! If you want to have a &lt;span class=&quot;caps&quot;&gt;CHOST&lt;/span&gt;=&amp;#8221;i686-pc-linux-gnu&amp;#8221;, you shouldn&amp;#8217;t download the x86 version of the stage3 tar-ball. Nowadays, the i686-stage3 is the best choice for most 32 bit systems. The current file is called &lt;strong&gt;stage3-i686-2007.0.tar.bz2&lt;/strong&gt; and the beta-version is called &lt;strong&gt;stage3-i686-2008.0_beta2.tar.bz2&lt;/strong&gt;.&lt;/p&gt;


	&lt;p&gt;Of course you could try to unpack the correct stage3 over the wrong installation, but there is absolutely no guarantee that it&amp;#8217;ll work flawlessly. Start from scratch as long as you haven&amp;#8217;t finished the Gentoo installation.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. Problem

p. After unpacking the stage3 tar-ball, editing the CHOST in /etc/make.conf, one of the first emerge stops with an error message _like_ this:


&lt;pre&gt;
&lt;code&gt;
g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../crti.o: No such file or directory
g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/crtbeginS.o: No such file or directory
g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/crtendS.o: No such file or directory
g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../crtn.o: No such file or directory
&lt;/code&gt;
&lt;/pre&gt;


p. Basically, the compiler can't find some of its object files.


h2. Solution


p. I'm sorry, but the best solution is to start from scratch, reformat your partitions and this time take *really good care* to download the *correct* stage3 tar-ball! If you want to have a CHOST=&quot;i686-pc-linux-gnu&quot;, you shouldn't download the x86 version of the stage3 tar-ball. Nowadays, the i686-stage3 is the best choice for most 32 bit systems. The current file is called *stage3-i686-2007.0.tar.bz2* and the beta-version is called *stage3-i686-2008.0_beta2.tar.bz2*.


p. Of course you could try to unpack the correct stage3 over the wrong installation, but there is absolutely no guarantee that it'll work flawlessly. Start from scratch as long as you haven't finished the Gentoo installation.</content-textile>
    <created-at type="datetime">2008-06-15T20:56:58+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">259</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>gentoo_installation_and_crti_o_no_such_file_or_directory</permalink>
    <published-at type="datetime">2008-06-22T21:15:00+02:00</published-at>
    <state>published</state>
    <summary>If you get the error message 'crti.o: No such file or directory' or something similar while you're installing Gentoo, here is the explaination.</summary>
    <title>Gentoo Installation and 'crti.o: No such file or directory'</title>
    <updated-at type="datetime">2008-06-22T23:15:00+02:00</updated-at>
    <updater-id type="integer">16</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;h2&gt;Prerequisites&lt;/h2&gt;


	&lt;p&gt;If you don&amp;#8217;t have the &lt;strong&gt;bash-completion&lt;/strong&gt; USE flag set, please do so now in your /etc/make.conf. After that, you have to rebuild the affected packages with the following command:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
emerge -uN world
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Installation&lt;/h2&gt;


	&lt;p&gt;We now have to install two packages: &lt;strong&gt;bash-completion&lt;/strong&gt; (&lt;em&gt;Programmable Completion for bash&lt;/em&gt;) and &lt;strong&gt;gentoo-bashcomp&lt;/strong&gt; (&lt;em&gt;Gentoo-specific bash command-line completions (emerge, ebuild, equery, etc)&lt;/em&gt;):&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
emerge bash-completion gentoo-bashcomp
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;The bash-completion package tells you to add a line to the &lt;strong&gt;~/.bashrc&lt;/strong&gt;. We want to have it system-wide, so let&amp;#8217;s add it to the file &lt;strong&gt;/etc/bash/bashrc&lt;/strong&gt;:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
echo &quot;[[ -f /etc/profile.d/bash-completion ]] &amp;#38;&amp;#38; source /etc/profile.d/bash-completion&quot; &amp;gt;&amp;gt;/etc/bash/bashrc
source /etc/bash/bashrc
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Configuration&lt;/h2&gt;


	&lt;p&gt;To disable the portage bash-completion for any user, except &lt;em&gt;root&lt;/em&gt;, execute the following commands:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
eselect bashcomp disable --global gentoo
eselect bashcomp enable gentoo
source /etc/bash/bashrc
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Usage&lt;/h2&gt;


	&lt;p&gt;If everything went well, we can now try out the new feature:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
emerge ap&amp;lt;tab&amp;gt;
emerge app-&amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;
emerge app-t&amp;lt;tab&amp;gt;
emerge app-text/&amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;
emerge app-text/pi&amp;lt;tab&amp;gt;
emerge app-text/pinfo
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;For more Gentoo tricks, click &lt;a href=&quot;http://howflow.com/tags/gentoo&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. Prerequisites

p. If you don't have the *bash-completion* USE flag set, please do so now in your /etc/make.conf. After that, you have to rebuild the affected packages with the following command:


&lt;pre&gt;
&lt;code&gt;
emerge -uN world
&lt;/code&gt;
&lt;/pre&gt;


h2. Installation

p. We now have to install two packages: *bash-completion* (_Programmable Completion for bash_) and *gentoo-bashcomp* (_Gentoo-specific bash command-line completions (emerge, ebuild, equery, etc)_):


&lt;pre&gt;
&lt;code&gt;
emerge bash-completion gentoo-bashcomp
&lt;/code&gt;
&lt;/pre&gt;


p. The bash-completion package tells you to add a line to the *~/.bashrc*. We want to have it system-wide, so let's add it to the file */etc/bash/bashrc*:


&lt;pre&gt;
&lt;code&gt;
echo &quot;[[ -f /etc/profile.d/bash-completion ]] &amp;&amp; source /etc/profile.d/bash-completion&quot; &gt;&gt;/etc/bash/bashrc
source /etc/bash/bashrc
&lt;/code&gt;
&lt;/pre&gt;


h2. Configuration

p. To disable the portage bash-completion for any user, except _root_, execute the following commands:


&lt;pre&gt;
&lt;code&gt;
eselect bashcomp disable --global gentoo
eselect bashcomp enable gentoo
source /etc/bash/bashrc
&lt;/code&gt;
&lt;/pre&gt;


h2. Usage

p. If everything went well, we can now try out the new feature:


&lt;pre&gt;
&lt;code&gt;
emerge ap&lt;tab&gt;
emerge app-&lt;tab&gt;&lt;tab&gt;
emerge app-t&lt;tab&gt;
emerge app-text/&lt;tab&gt;&lt;tab&gt;
emerge app-text/pi&lt;tab&gt;
emerge app-text/pinfo
&lt;/code&gt;
&lt;/pre&gt;


p. For more Gentoo tricks, click &quot;here&quot;:http://howflow.com/tags/gentoo</content-textile>
    <created-at type="datetime">2008-06-01T18:17:10+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">217</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">7</nvotes>
    <permalink>gentoo_enable_bash_tab_completion_for_portage_tools</permalink>
    <published-at type="datetime">2008-06-02T01:30:32+02:00</published-at>
    <state>published</state>
    <summary>If you like the bash tab-completion for files and directories, you might try out this trick to enable tab-completion for your portage tools (emerge, equery, revdep-rebuild, ...).</summary>
    <title>Gentoo: Enable Bash Tab-Completion for Portage Tools</title>
    <updated-at type="datetime">2009-04-18T04:19:55+02:00</updated-at>
    <updater-id type="integer">69</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-05-26T11:35:48+02:00</created-at>
    <creator-id type="integer">37</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">200</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">9</nvotes>
    <permalink>updating_microcode_on_intel_processors</permalink>
    <published-at type="datetime">2008-05-26T16:17:04+02:00</published-at>
    <state>published</state>
    <summary>This is a short howto about updating the intel processor microcode with gentoo.</summary>
    <title>Updating Microcode On Intel Processors</title>
    <updated-at type="datetime">2008-09-06T12:37:19+02:00</updated-at>
    <updater-id type="integer">111</updater-id>
    <url>http://psykil.livejournal.com/324031.html</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer">#&lt;Comment:0x2ae4854c8850&gt;#&lt;Comment:0x2ae4854c8260&gt;</comments>
    <content>&lt;h2&gt;Error Message&lt;/h2&gt;


&lt;pre&gt;
&lt;code&gt;
(chroot) livecd / # etc-update 
diff: %file1: No such file or directory
diff: %/var/tmp/etc-update-11759/.diff-test-2: No such file or directory
ERROR: 'diff -uN %file1 %file2' does not seem to work, aborting
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Solution&lt;/h2&gt;


	&lt;p&gt;Just don&amp;#8217;t run etc-update until at least the system is fully emerged. I told you, the solution is simple but Gentoo newbies can be very confused when they encounter the mentioned error message.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. Error Message

&lt;pre&gt;
&lt;code&gt;
(chroot) livecd / # etc-update 
diff: %file1: No such file or directory
diff: %/var/tmp/etc-update-11759/.diff-test-2: No such file or directory
ERROR: 'diff -uN %file1 %file2' does not seem to work, aborting
&lt;/code&gt;
&lt;/pre&gt;


h2. Solution

p. Just don't run etc-update until at least the system is fully emerged. I told you, the solution is simple but Gentoo newbies can be very confused when they encounter the mentioned error message.</content-textile>
    <created-at type="datetime">2008-05-23T17:40:27+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">196</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>gentoo_installation_diff_error_message</permalink>
    <published-at type="datetime">2008-05-27T20:50:09+02:00</published-at>
    <state>published</state>
    <summary>While installing Gentoo and doing an etc-update in between package updates, the error message &quot;diff: %file1: No such file or directory&quot; shows up. Here the &quot;solution&quot;. Well, it's just a tiny trick.</summary>
    <title>Gentoo Installation: diff Error Message</title>
    <updated-at type="datetime">2008-06-01T17:30:16+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;p&gt;With this small snippet a bash code, you should be able to easily sort &lt;strong&gt;&lt;em&gt;/etc/portage/package.*&lt;/em&gt;&lt;/strong&gt; :&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;CONFIGDIR=&amp;quot;/etc/portage&amp;quot;&lt;br /&gt;for i in keywords mask unmask use&lt;br /&gt;do&lt;br /&gt;&amp;nbsp; [[ -f ${CONFIGDIR}/package.${i} ]] &amp;amp;&amp;amp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TMPFILE=$(mktemp)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mv ${CONFIGDIR}/package.${i} ${CONFIGDIR}/package.${i}.backup&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sort -g &amp;lt; ${CONFIGDIR}/package.${i}.backup &amp;gt; ${TMPFILE}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mv ${TMPFILE} ${CONFIGDIR}/package.${i}&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;done&lt;/pre&gt;&lt;/blockquote&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>HTML</content-format>
    <content-html>&lt;p&gt;With this small snippet a bash code, you should be able to easily sort &lt;strong&gt;&lt;em&gt;/etc/portage/package.*&lt;/em&gt;&lt;/strong&gt; :&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;CONFIGDIR=&amp;quot;/etc/portage&amp;quot;&lt;br /&gt;for i in keywords mask unmask use&lt;br /&gt;do&lt;br /&gt;&amp;nbsp; [[ -f ${CONFIGDIR}/package.${i} ]] &amp;amp;&amp;amp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TMPFILE=$(mktemp)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mv ${CONFIGDIR}/package.${i} ${CONFIGDIR}/package.${i}.backup&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sort -g &amp;lt; ${CONFIGDIR}/package.${i}.backup &amp;gt; ${TMPFILE}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mv ${TMPFILE} ${CONFIGDIR}/package.${i}&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;done&lt;/pre&gt;&lt;/blockquote&gt;</content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-05-17T20:22:29+02:00</created-at>
    <creator-id type="integer">24</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file>/var/rails/howflow/public/trick/file/185/sortportagefiles.sh</file>
    <id type="integer">185</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">6</nvotes>
    <permalink>automatically_sort_your_gentoo_portage_files</permalink>
    <published-at type="datetime">2008-05-18T02:06:56+02:00</published-at>
    <state>published</state>
    <summary>Sometimes, you might just want to sort /etc/portage/package.* to make them more readable. This is how you can do it :)</summary>
    <title>Automatically sort your gentoo portage files</title>
    <updated-at type="datetime">2008-09-16T01:46:11+02:00</updated-at>
    <updater-id type="integer">17</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-05-12T21:44:01+02:00</created-at>
    <creator-id type="integer">4</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">171</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">4</nvotes>
    <permalink>gentoo_configure_the_powermanagment</permalink>
    <published-at type="datetime">2008-05-22T17:36:17+02:00</published-at>
    <state>published</state>
    <summary>A complete guide how to safe batterytime of your laptop. Also useful for other distributions</summary>
    <title>Gentoo: Configure the Powermanagment</title>
    <updated-at type="datetime">2008-05-26T18:25:23+02:00</updated-at>
    <updater-id type="integer">37</updater-id>
    <url>http://www.gentoo.org/doc/en/power-management-guide.xml</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">8</category-id>
    <comments type="integer">#&lt;Comment:0x2ae4854a5918&gt;</comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-05-04T22:42:34+02:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">143</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">4</nvotes>
    <permalink>configure_shoutcast_on_gentoo_linux</permalink>
    <published-at type="datetime">2008-05-08T09:05:26+02:00</published-at>
    <state>published</state>
    <summary>I looked a very long time for a good SHOUTcast-configuration-manual but this documentation lead me to a very good configuration.</summary>
    <title>Configure SHOUTcast on Gentoo Linux</title>
    <updated-at type="datetime">2008-07-19T14:24:47+02:00</updated-at>
    <updater-id type="integer">4</updater-id>
    <url>http://www.gentoo.org/doc/en/shoutcast-config.xml</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;h2&gt;Getting Screenie (on Gentoo)&lt;/h2&gt;


&lt;pre&gt;
&lt;code&gt;

  $ emerge screenie

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Launching screenie&lt;/h2&gt;


&lt;pre&gt;
&lt;code&gt;

  $ screenie

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Using screenie&lt;/h2&gt;


&lt;pre&gt;
&lt;code&gt;

  SCREENIE - terminal screen-session handler
  written by Marc O. Gloor &amp;lt;mgloor&amp;#38;fhzh.ch&amp;gt;

  a) add job
  q) quit

  select:

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Lets add a job called &amp;#8220;Systems&amp;#8221;. Once you hit a, enter the name. Hit enter unless you know the process id of existing screen sessions. Lets add a second job called &amp;#8220;Email&amp;#8221;. Now you should see:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  SCREENIE - terminal screen-session handler
  written by Marc O. Gloor &amp;lt;mgloor&amp;#38;fhzh.ch&amp;gt;

  1) 15468.Systems
  2) 15504.Email

  a) add job
  q) quit

  select:

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;You now have two screen sessions that you can go into and out of. Select one of the sessions. You are now inside of screen where you can do whatever you usually do.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Note: See the  tips and tricks describing screen.&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;To go to another screen session, press &lt;span class=&quot;caps&quot;&gt;CTRL&lt;/span&gt;+a+d (or however you usually exit your screen sessions). You should be back to the screenie menu and ready to choose to go to another screen session.&lt;/p&gt;


	&lt;p&gt;One use of screenie might be to have a screen session for every task and for every machine you have access to making multi-tasking much more organized. This should also make it much easier to start working again after a long break.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. Getting Screenie (on Gentoo)

&lt;pre&gt;
&lt;code&gt;

  $ emerge screenie

&lt;/code&gt;
&lt;/pre&gt;


h2. Launching screenie

&lt;pre&gt;
&lt;code&gt;

  $ screenie

&lt;/code&gt;
&lt;/pre&gt;


h2. Using screenie

&lt;pre&gt;
&lt;code&gt;

  SCREENIE - terminal screen-session handler
  written by Marc O. Gloor &lt;mgloor&amp;fhzh.ch&gt;

  a) add job
  q) quit

  select:

&lt;/code&gt;
&lt;/pre&gt;

p. Lets add a job called &quot;Systems&quot;. Once you hit a, enter the name. Hit enter unless you know the process id of existing screen sessions. Lets add a second job called &quot;Email&quot;. Now you should see:


&lt;pre&gt;
&lt;code&gt;

  SCREENIE - terminal screen-session handler
  written by Marc O. Gloor &lt;mgloor&amp;fhzh.ch&gt;

  1) 15468.Systems
  2) 15504.Email

  a) add job
  q) quit

  select:

&lt;/code&gt;
&lt;/pre&gt;


p. You now have two screen sessions that you can go into and out of. Select one of the sessions. You are now inside of screen where you can do whatever you usually do.


p. *Note: See the  tips and tricks describing screen.*


p. To go to another screen session, press CTRL+a+d (or however you usually exit your screen sessions). You should be back to the screenie menu and ready to choose to go to another screen session.


p. One use of screenie might be to have a screen session for every task and for every machine you have access to making multi-tasking much more organized. This should also make it much easier to start working again after a long break.</content-textile>
    <created-at type="datetime">2008-04-30T19:24:45+02:00</created-at>
    <creator-id type="integer">8</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">118</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>organize_your_command_line_screen_sessions_with_screenie</permalink>
    <published-at type="datetime">2008-05-01T16:41:38+02:00</published-at>
    <state>published</state>
    <summary>Want to organize your command line screen session or sessions better? Want to have a separate screen session for every task that you do? Want something that will organize you in general?</summary>
    <title>Organize your command line screen sessions with screenie</title>
    <updated-at type="datetime">2008-05-01T20:47:54+02:00</updated-at>
    <updater-id type="integer">4</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer">#&lt;Comment:0x2ae48548eb50&gt;#&lt;Comment:0x2ae48548e5d8&gt;</comments>
    <content>&lt;h2&gt;Tell Gentoo&amp;#8217;s startup system to turn on services in parallel&lt;/h2&gt;


&lt;pre&gt;
&lt;code&gt;

  $ nano -w /etc/conf.d/rc

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Change:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  RC_PARALLEL_STARTUP=&quot;no&quot; 

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;To:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  RC_PARALLEL_STARTUP=&quot;yes&quot; 

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Prevent the kernel from displaying status messages&lt;/h2&gt;


	&lt;p&gt;Assuming you are using &lt;span class=&quot;caps&quot;&gt;GRUB&lt;/span&gt; and /boot is mounted correctly&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  $ nano -w /boot/grub/grub.conf

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Append the &amp;#8216;quiet&amp;#8217; option to the kernel you use, for example:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  kernel /boot/vmlinuz-2.6.23.9 root=/dev/hda2 quiet

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Remove services that you do not need&lt;/h2&gt;


	&lt;p&gt;View what services are currently activated on boot:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  $ rc-status boot

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Check what is good with a default runlevel:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  $ rc-status default

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;For example, you probably won&amp;#8217;t need keymap if you&amp;#8217;re building a carputer:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  $ rc-update del keymap

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Don&amp;#8217;t forget to subscribe to the Gentoo Monthly Newsletter for more tricks.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. Tell Gentoo's startup system to turn on services in parallel

&lt;pre&gt;
&lt;code&gt;

  $ nano -w /etc/conf.d/rc

&lt;/code&gt;
&lt;/pre&gt;

p. Change:


&lt;pre&gt;
&lt;code&gt;

  RC_PARALLEL_STARTUP=&quot;no&quot;

&lt;/code&gt;
&lt;/pre&gt;

p. To:


&lt;pre&gt;
&lt;code&gt;

  RC_PARALLEL_STARTUP=&quot;yes&quot;

&lt;/code&gt;
&lt;/pre&gt;


h2. Prevent the kernel from displaying status messages

p. Assuming you are using GRUB and /boot is mounted correctly


&lt;pre&gt;
&lt;code&gt;

  $ nano -w /boot/grub/grub.conf

&lt;/code&gt;
&lt;/pre&gt;

p. Append the 'quiet' option to the kernel you use, for example:


&lt;pre&gt;
&lt;code&gt;

  kernel /boot/vmlinuz-2.6.23.9 root=/dev/hda2 quiet

&lt;/code&gt;
&lt;/pre&gt;


h2. Remove services that you do not need

p. View what services are currently activated on boot:


&lt;pre&gt;
&lt;code&gt;

  $ rc-status boot

&lt;/code&gt;
&lt;/pre&gt;

p. Check what is good with a default runlevel:

&lt;pre&gt;
&lt;code&gt;

  $ rc-status default

&lt;/code&gt;
&lt;/pre&gt;

p. For example, you probably won't need keymap if you're building a carputer:


&lt;pre&gt;
&lt;code&gt;

  $ rc-update del keymap

&lt;/code&gt;
&lt;/pre&gt;

p. Don't forget to subscribe to the Gentoo Monthly Newsletter for more tricks.</content-textile>
    <created-at type="datetime">2008-04-29T16:02:35+02:00</created-at>
    <creator-id type="integer">8</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">111</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">6</nvotes>
    <permalink>gentoo_speedup_boot_time</permalink>
    <published-at type="datetime">2008-04-30T00:10:27+02:00</published-at>
    <state>published</state>
    <summary>Are you impatient when booting your computer? If yes, try the following:</summary>
    <title>Gentoo: Speedup Boot Time</title>
    <updated-at type="datetime">2008-05-23T18:04:52+02:00</updated-at>
    <updater-id type="integer">37</updater-id>
    <url>http://www.gentoo.org/news/en/gmn/20080424-newsletter.xml</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-04-29T10:16:33+02:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">107</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>firefox_using_java_as_a_plugin_on_gentoo</permalink>
    <published-at type="datetime">2008-04-29T12:05:15+02:00</published-at>
    <state>published</state>
    <summary>Adding Java-Support to Firefox on Gentoo needs only a few commands. This WIKI describes them</summary>
    <title>FireFox: using Java as a plugin on Gentoo</title>
    <updated-at type="datetime">2008-05-01T18:52:17+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url>http://gentoo-wiki.com/HOWTO_Java_and_Firefox</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;h3&gt;Problem:&lt;/h3&gt;


&lt;pre&gt;
&lt;code&gt;
make[4]: Entering directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc/bcc'
ncc -Mn -O -D__LIBC__ -O2  -c -o __ldivmod.o __ldivmod.c
copt: can't open pattern file /var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/lib/rules.286
make[4]: *** [__ldivmod.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc/bcc'
make[3]: *** [/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc/libc.a] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc'
make[2]: *** [library] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17'
make: *** [all] Error 2
 *
 * ERROR: sys-devel/dev86-0.16.17-r5 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2104:  Called die
 * The specific snippet of code:
 *       emake -j1 DIST=&quot;${D}&quot; || die;
 *  The die message:
 *   (no error message)
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/sys-devel:dev86-0.16.17-r5:20080421-014407.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/dev86-0.16.17-r5/temp/environment'.
 *
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h3&gt;Solution:&lt;/h3&gt;


	&lt;p&gt;Temporarily remove any optimization from the &lt;span class=&quot;caps&quot;&gt;CFLAGS&lt;/span&gt; in &lt;em&gt;/etc/make.conf&lt;/em&gt;. Emerge dev86 and don&amp;#8217;t forget to reset your &lt;span class=&quot;caps&quot;&gt;CFLAGS&lt;/span&gt; afterwards.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h3. Problem:



&lt;pre&gt;
&lt;code&gt;
make[4]: Entering directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc/bcc'
ncc -Mn -O -D__LIBC__ -O2  -c -o __ldivmod.o __ldivmod.c
copt: can't open pattern file /var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/lib/rules.286
make[4]: *** [__ldivmod.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc/bcc'
make[3]: *** [/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc/libc.a] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc'
make[2]: *** [library] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17'
make: *** [all] Error 2
 *
 * ERROR: sys-devel/dev86-0.16.17-r5 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2104:  Called die
 * The specific snippet of code:
 *       emake -j1 DIST=&quot;${D}&quot; || die;
 *  The die message:
 *   (no error message)
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/sys-devel:dev86-0.16.17-r5:20080421-014407.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/dev86-0.16.17-r5/temp/environment'.
 *
&lt;/code&gt;
&lt;/pre&gt;




h3. Solution:


Temporarily remove any optimization from the CFLAGS in _/etc/make.conf_. Emerge dev86 and don't forget to reset your CFLAGS afterwards.</content-textile>
    <created-at type="datetime">2008-04-21T04:00:02+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">67</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">2</nvotes>
    <permalink>gentoo_how_to_compile_the_package_dev86</permalink>
    <published-at type="datetime" nil="true"></published-at>
    <state>queued</state>
    <summary>This trick might be helpful if emerge dev86 returns the error message &quot;ncc -Mn -O -D__LIBC__ -O2  -c -o __ldivmod.o __ldivmod.c make[4]: *** [__ldivmod.o] Error 1&quot;.</summary>
    <title>Gentoo: How to compile the package dev86</title>
    <updated-at type="datetime">2008-05-01T19:55:38+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">1</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format nil="true"></content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-04-17T13:00:00+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">31</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">2</nvotes>
    <permalink>a_complete_virtual_system</permalink>
    <published-at type="datetime">2008-04-18T14:41:28+02:00</published-at>
    <state>published</state>
    <summary>The purpose of this HOWTO is to establish a virtual mail system that can handle multiple domains with a variety of different interface options. This is not intended to be used by the average user who is looking for a mail client, this is a full-scale Mail Transfer Agent (MTA) intended for individuals who are hosting their own domains and/or need to provide support for virtual domains.</summary>
    <title>A Complete Virtual Mail System</title>
    <updated-at type="datetime">2008-05-01T19:35:42+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url>http://gentoo-wiki.com/HOWTO_Email:_A_Complete_Virtual_System</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;h2&gt;1. Background&lt;/h2&gt;


	&lt;h3&gt;What&amp;#8217;s baselayout?&lt;/h3&gt;


	&lt;p&gt;Baselayout provides a basic set of files that are necessary for all systems to function properly, such as /etc/hosts. It also provides the basic filesystem layout used by Gentoo (i.e. /etc, /var, /usr, /home directories).&lt;/p&gt;


	&lt;h3&gt;What&amp;#8217;s OpenRC?&lt;/h3&gt;


	&lt;p&gt;OpenRC is a dependency-based rc system that works with whatever init is provided by the system, normally /sbin/init. However, it is not a replacement for /sbin/init. The default init used by Gentoo Linux is sys-apps/sysvinit, while Gentoo/FreeBSD uses the FreeBSD init provided by sys-freebsd/freebsd-sbin.&lt;/p&gt;


	&lt;h3&gt;So why migrate?&lt;/h3&gt;


	&lt;p&gt;Originally Gentoo&amp;#8217;s rc system was built into baselayout 1 and written entirely in bash. This led to several limitations. For example, certain system calls need to be accessed during boot and this required C-based callouts to be added. These callouts were each statically linked, causing the rc system to bloat over time.&lt;/p&gt;


	&lt;p&gt;Additionally, as Gentoo expanded to other platforms like Gentoo/FreeBSD and Gentoo Embedded, it became impossible to require a bash-based rc system. This led to a development of baselayout 2, which is written in C and only requires a &lt;span class=&quot;caps&quot;&gt;POSIX&lt;/span&gt;-compliant shell. During the development of baselayout 2, it was determined that it was a better fit if baselayout merely provided the base files and filesystem layout for Gentoo and the rc system was broken off into its own package. Thus we have OpenRC.&lt;/p&gt;


	&lt;p&gt;OpenRC is primarily developed by Roy Marples and supports all current Gentoo variations (i.e. Gentoo Linux, Gentoo/FreeBSD, Gentoo Embedded, and Gentoo Vserver) and other platforms such as FreeBSD and NetBSD.&lt;/p&gt;


	&lt;h2&gt;2. Migration to OpenRC&lt;/h2&gt;


	&lt;p&gt;Migration to OpenRC is fairly straightforward; it will be pulled in as part of your regular upgrade process by your package manager. The most important step actually comes after you install the new &amp;gt;=sys-apps/baselayout-2 and sys-apps/openrc packages. It is critical that you run dispatch-conf and ensure your /etc is up to date before rebooting. Failure to do so will result in an unbootable system and will require the use of the Gentoo LiveCD to perform the steps below to repair your system.&lt;/p&gt;


	&lt;p&gt;Once you&amp;#8217;ve finished updating your config files, there are a few things to verify prior to rebooting.&lt;/p&gt;


	&lt;h3&gt;/etc/conf.d/rc&lt;/h3&gt;


	&lt;p&gt;/etc/conf.d/rc has been deprecated and any settings you have in there will need to be migrated to the appropriate settings in /etc/rc.conf. Please read through /etc/rc.conf and /etc/conf.d/rc and migrate the settings. Once you are complete, delete /etc/conf.d/rc.&lt;/p&gt;


	&lt;h3&gt;Kernel modules&lt;/h3&gt;


	&lt;p&gt;Normally, when you want certain kernel modules automatically loaded at boot, you place them into /etc/modules.autoload.d/kernel-2.6 along with any parameters you wanted to pass to them. In baselayout-2, this file is not used anymore. Instead, autoloaded modules and module parameters are placed in one file, /etc/conf.d/modules, no matter the kernel version.&lt;/p&gt;


	&lt;p&gt;An example old style configuration would be:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.1: /etc/modules.autoload.d/kernel-2.6

  ivtv
  cx88_dvb video_br=2

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Converting the above example would result in the following:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.2: /etc/conf.d/modules

  # Modules autoloaded at boot
  modules_2_6=&quot;ivtv cx88_dvb&quot; 
  # Module parameters
  module_cx88_dvb_args_2_6=&quot;video_br=2&quot; 

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;In the above examples, the modules and their parameters would only be passed to 2.6.x series kernels. The new configuration allows for fine grained control over the modules and parameters based on kernel version.&lt;/p&gt;


	&lt;p&gt;An in-depth example would be:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.3: detailed example of /etc/conf.d/modules

  # Always load ochi1394 and ieee1394, no matter the kernel version
  modules=&quot;ohci1394 ieee1394&quot; 
  # Only load tun and usbserial for 2.6.x series kernels
  modules_2_6=&quot;tun usbserial&quot; 
  # Only load cx88_dvb for 2.6.23 kernels
  modules_2_6_23=&quot;cx88_dvb&quot; 
  # Only load ivtv for 2.6.23-gentoo-r5
  modules_2_6_23_gentoo_r5=&quot;ivtv&quot; 

  # For 2.6.23-gentoo-r5, pass video_br=2 to cx88_dvb
  module_cx88_dvb_args_2_6_23_gentoo_r5=&quot;video_br=2&quot; 
  # For 2.6.x series kernels, always pass vendor and product
  module_usbserial_args_2_6=&quot;vendor=0x1410 product=0x2110&quot; 
  # Always pass debug to ieee1394
  module_ieee1394_args=&quot;debug&quot; 

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Note:  Please note the difference between module_ and modules_.&lt;/p&gt;


	&lt;h3&gt;Boot runlevel&lt;/h3&gt;


	&lt;p&gt;The boot runlevel performs several important steps for every machine. For example, making sure your root filesystem is mounted read/write, that your filesystems are checked for errors, that your mountpoints are available, and that the /proc pseudo-filesystem is started at boot.&lt;/p&gt;


	&lt;p&gt;With OpenRC, volume management services for your block storage devices are no longer run automatically at boot. This includes lvm, raid, swap, device-mapper (dm), dm-crypt, evms, and the like. You must ensure the appropriate initscript for these services is in the boot runlevel, otherwise it&amp;#8217;s possible that your system will not boot!&lt;/p&gt;


	&lt;p&gt;While the OpenRC ebuild will attempt to do this migration for you, you should verify that it migrated all the volume management services properly:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.4: Display all services in boot runlevel

  # ls -l /etc/runlevels/boot/

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;If you don&amp;#8217;t see root, procfs, mtab, swap, and fsck in the above listing, perform the following to add them to the boot runlevel:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.5: Adding missing volume management services to the boot runlevel

  # rc-update add root boot
  # rc-update add procfs boot
  # rc-update add mtab boot
  # rc-update add fsck boot
  # rc-update add swap boot

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;If you know you use mdraid and lvm but do not see them above, you would run the following to add initscripts to the boot runlevel:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.6: Adding raid and lvm to the boot runlevel

  # rc-update add raid boot
  # rc-update add lvm boot

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h3&gt;Clock&lt;/h3&gt;


	&lt;p&gt;Clock settings have been renamed from /etc/conf.d/clock to your system&amp;#8217;s native tool for adjusting the clock. This means on Linux it will be /etc/conf.d/hwclock and on FreeBSD it will be /etc/conf.d/adjkerntz. The initscript in /etc/init.d/ has also been renamed accordingly, so make sure it&amp;#8217;s in the appropriate runlevel.&lt;/p&gt;


	&lt;p&gt;Additionally, the &lt;span class=&quot;caps&quot;&gt;TIMEZONE&lt;/span&gt; variable is no longer in this file. Its contents are instead found in the /etc/timezone file. Please review both of these files to ensure their correctness.&lt;/p&gt;


	&lt;h3&gt;&lt;span class=&quot;caps&quot;&gt;XSESSION&lt;/span&gt;&lt;/h3&gt;


	&lt;p&gt;The &lt;span class=&quot;caps&quot;&gt;XSESSION&lt;/span&gt; variable is no longer found in /etc/rc.conf. The x11-apps/xinit package now provides /etc/env.d/90xsession, which can be used to set the &lt;span class=&quot;caps&quot;&gt;XSESSION&lt;/span&gt; variable.&lt;/p&gt;


	&lt;p&gt;This variable will &lt;span class=&quot;caps&quot;&gt;NOT&lt;/span&gt; be migrated for you by default, so you will need to edit /etc/env.d/90xsession.&lt;/p&gt;


	&lt;p&gt;Important:  You must run env-update after creating a file in /etc/env.d, and then logout and login for it to take effect.&lt;/p&gt;


	&lt;h3&gt;&lt;span class=&quot;caps&quot;&gt;EDITOR&lt;/span&gt;&lt;/h3&gt;


	&lt;p&gt;The &lt;span class=&quot;caps&quot;&gt;EDITOR&lt;/span&gt; variable is no longer found in /etc/rc.conf, and at this time is not provided by any other package. Users are encouraged to set it as needed in their ~/.bashrc file or create /etc/env.d/99editor and set it there.&lt;/p&gt;


	&lt;p&gt;Important:  You must run env-update after creating a file in /etc/env.d, and then logout and login for it to take effect. If you set the variable in ~/.bashrc, you can re-source the file with source ~/.bashrc.&lt;/p&gt;


	&lt;h3&gt;Finishing up&lt;/h3&gt;


	&lt;p&gt;Once you&amp;#8217;ve finished updating your config files and initscripts, the last thing to do is reboot. This is necessary because system state information is not preserved during the upgrade, so you&amp;#8217;ll need to provide it with a fresh boot.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. 1. Background

h3. What's baselayout?

p. Baselayout provides a basic set of files that are necessary for all systems to function properly, such as /etc/hosts. It also provides the basic filesystem layout used by Gentoo (i.e. /etc, /var, /usr, /home directories).


h3. What's OpenRC?

p. OpenRC is a dependency-based rc system that works with whatever init is provided by the system, normally /sbin/init. However, it is not a replacement for /sbin/init. The default init used by Gentoo Linux is sys-apps/sysvinit, while Gentoo/FreeBSD uses the FreeBSD init provided by sys-freebsd/freebsd-sbin.


h3. So why migrate?

p. Originally Gentoo's rc system was built into baselayout 1 and written entirely in bash. This led to several limitations. For example, certain system calls need to be accessed during boot and this required C-based callouts to be added. These callouts were each statically linked, causing the rc system to bloat over time.


p. Additionally, as Gentoo expanded to other platforms like Gentoo/FreeBSD and Gentoo Embedded, it became impossible to require a bash-based rc system. This led to a development of baselayout 2, which is written in C and only requires a POSIX-compliant shell. During the development of baselayout 2, it was determined that it was a better fit if baselayout merely provided the base files and filesystem layout for Gentoo and the rc system was broken off into its own package. Thus we have OpenRC.


p. OpenRC is primarily developed by Roy Marples and supports all current Gentoo variations (i.e. Gentoo Linux, Gentoo/FreeBSD, Gentoo Embedded, and Gentoo Vserver) and other platforms such as FreeBSD and NetBSD.


h2. 2. Migration to OpenRC

p. Migration to OpenRC is fairly straightforward; it will be pulled in as part of your regular upgrade process by your package manager. The most important step actually comes after you install the new &gt;=sys-apps/baselayout-2 and sys-apps/openrc packages. It is critical that you run dispatch-conf and ensure your /etc is up to date before rebooting. Failure to do so will result in an unbootable system and will require the use of the Gentoo LiveCD to perform the steps below to repair your system.


p. Once you've finished updating your config files, there are a few things to verify prior to rebooting. 


h3. /etc/conf.d/rc

p. /etc/conf.d/rc has been deprecated and any settings you have in there will need to be migrated to the appropriate settings in /etc/rc.conf. Please read through /etc/rc.conf and /etc/conf.d/rc and migrate the settings. Once you are complete, delete /etc/conf.d/rc.


h3. Kernel modules

p. Normally, when you want certain kernel modules automatically loaded at boot, you place them into /etc/modules.autoload.d/kernel-2.6 along with any parameters you wanted to pass to them. In baselayout-2, this file is not used anymore. Instead, autoloaded modules and module parameters are placed in one file, /etc/conf.d/modules, no matter the kernel version.


p. An example old style configuration would be:


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.1: /etc/modules.autoload.d/kernel-2.6


  ivtv
  cx88_dvb video_br=2

&lt;/code&gt;
&lt;/pre&gt;


p. Converting the above example would result in the following:


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.2: /etc/conf.d/modules


  # Modules autoloaded at boot
  modules_2_6=&quot;ivtv cx88_dvb&quot;
  # Module parameters
  module_cx88_dvb_args_2_6=&quot;video_br=2&quot;

&lt;/code&gt;
&lt;/pre&gt;



p. In the above examples, the modules and their parameters would only be passed to 2.6.x series kernels. The new configuration allows for fine grained control over the modules and parameters based on kernel version.


p. An in-depth example would be:


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.3: detailed example of /etc/conf.d/modules


  # Always load ochi1394 and ieee1394, no matter the kernel version
  modules=&quot;ohci1394 ieee1394&quot;
  # Only load tun and usbserial for 2.6.x series kernels
  modules_2_6=&quot;tun usbserial&quot;
  # Only load cx88_dvb for 2.6.23 kernels
  modules_2_6_23=&quot;cx88_dvb&quot;
  # Only load ivtv for 2.6.23-gentoo-r5
  modules_2_6_23_gentoo_r5=&quot;ivtv&quot;

  # For 2.6.23-gentoo-r5, pass video_br=2 to cx88_dvb
  module_cx88_dvb_args_2_6_23_gentoo_r5=&quot;video_br=2&quot;
  # For 2.6.x series kernels, always pass vendor and product
  module_usbserial_args_2_6=&quot;vendor=0x1410 product=0x2110&quot;
  # Always pass debug to ieee1394
  module_ieee1394_args=&quot;debug&quot; 

&lt;/code&gt;
&lt;/pre&gt;



p. Note:  Please note the difference between module_ and modules_.


h3. Boot runlevel

p. The boot runlevel performs several important steps for every machine. For example, making sure your root filesystem is mounted read/write, that your filesystems are checked for errors, that your mountpoints are available, and that the /proc pseudo-filesystem is started at boot.


p. With OpenRC, volume management services for your block storage devices are no longer run automatically at boot. This includes lvm, raid, swap, device-mapper (dm), dm-crypt, evms, and the like. You must ensure the appropriate initscript for these services is in the boot runlevel, otherwise it's possible that your system will not boot!


p. While the OpenRC ebuild will attempt to do this migration for you, you should verify that it migrated all the volume management services properly:


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.4: Display all services in boot runlevel


  # ls -l /etc/runlevels/boot/

&lt;/code&gt;
&lt;/pre&gt;



p. If you don't see root, procfs, mtab, swap, and fsck in the above listing, perform the following to add them to the boot runlevel:


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.5: Adding missing volume management services to the boot runlevel


  # rc-update add root boot
  # rc-update add procfs boot
  # rc-update add mtab boot
  # rc-update add fsck boot
  # rc-update add swap boot

&lt;/code&gt;
&lt;/pre&gt;



p. If you know you use mdraid and lvm but do not see them above, you would run the following to add initscripts to the boot runlevel:


&lt;pre&gt;
&lt;code&gt;

  Code Listing 2.6: Adding raid and lvm to the boot runlevel


  # rc-update add raid boot
  # rc-update add lvm boot

&lt;/code&gt;
&lt;/pre&gt;



h3. Clock

p. Clock settings have been renamed from /etc/conf.d/clock to your system's native tool for adjusting the clock. This means on Linux it will be /etc/conf.d/hwclock and on FreeBSD it will be /etc/conf.d/adjkerntz. The initscript in /etc/init.d/ has also been renamed accordingly, so make sure it's in the appropriate runlevel.


p. Additionally, the TIMEZONE variable is no longer in this file. Its contents are instead found in the /etc/timezone file. Please review both of these files to ensure their correctness. 


h3. XSESSION

p. The XSESSION variable is no longer found in /etc/rc.conf. The x11-apps/xinit package now provides /etc/env.d/90xsession, which can be used to set the XSESSION variable.


p. This variable will NOT be migrated for you by default, so you will need to edit /etc/env.d/90xsession.


p. Important:  You must run env-update after creating a file in /etc/env.d, and then logout and login for it to take effect.


h3. EDITOR


p. The EDITOR variable is no longer found in /etc/rc.conf, and at this time is not provided by any other package. Users are encouraged to set it as needed in their ~/.bashrc file or create /etc/env.d/99editor and set it there.


p. Important:  You must run env-update after creating a file in /etc/env.d, and then logout and login for it to take effect. If you set the variable in ~/.bashrc, you can re-source the file with source ~/.bashrc.


h3. Finishing up

p. Once you've finished updating your config files and initscripts, the last thing to do is reboot. This is necessary because system state information is not preserved during the upgrade, so you'll need to provide it with a fresh boot.</content-textile>
    <created-at type="datetime">2008-04-15T16:40:57+02:00</created-at>
    <creator-id type="integer">8</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">27</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">6</nvotes>
    <permalink>gentoo_baselayout_and_openrc_migration_guide</permalink>
    <published-at type="datetime">2008-04-15T18:00:02+02:00</published-at>
    <state>published</state>
    <summary>This is the official Gentoo OpenRC migration guide. Please make sure to visit the original site.</summary>
    <title>Gentoo: Baselayout and OpenRC Migration Guide</title>
    <updated-at type="datetime">2009-05-10T19:27:15+02:00</updated-at>
    <updater-id type="integer">17</updater-id>
    <url>http://www.gentoo.org/doc/en/openrc-migration.xml</url>
    <url-code nil="true"></url-code>
  </trick>
</tricks>
