and when the box pops up, enter your password, wait a bit and a new window will come up. In that window you are root to everything and can edit anything. Pretty simple so far right? If you need help figuring out what options are available in the [http://www.sabayonlinux.org/forum/viewtopic.php?f=54&t=10578 make.conf] then refer to the Gentoo Handbook and Wiki often.

+

and when the box pops up, enter your password, wait a bit and a new window will come up. In that window you are root to everything and can edit anything. Pretty simple so far right? If you need help figuring out what options are available in the [http://www.gentoo-wiki.info/Make.conf.example make.conf] then refer to the Gentoo Handbook and Wiki often.

Revision as of 14:12, 23 February 2013

Portage (emerge) is not the primary package manager for Sabayon, this article is for advanced users only. In other words if this fails for you, its your fault. You have been warned.

Contents

World Update and Understanding Configs

Updating

First let me say that there is a several ways to doing things on SL. I am not saying that my way is the best way by any means. This is simply my way of how I do things with a fresh install to make a stable system. You should probably read the other articles below first to better understand things.

First thing - I alway buy my hardware that I know is linux supported and has good drivers. So get to know your hardware, I can't say that enough as it will save you a lot of headaches.

DO NOTE - I can not tell you what you can safely remove from your system as you need to know your hardware and what is safe to uninstall, remove from config files and remove from kernel. I am going to try and stay very basic here so you can get the idea.

Fresh install and everything is working great so now what?

Well I head to the /etc/make.conf file and edit that thing to my liking and double checking things over. I remove any unnecessary things. Remember to edit these files you must be root. If you like nano you can simple go into Konsole and punch in su than enter your password. You can edit the file by doing

# nano -w /etc/make.conf

or if you simply must have a GUI you can go to konsole and enter

$ kdesu konqueror

and when the box pops up, enter your password, wait a bit and a new window will come up. In that window you are root to everything and can edit anything. Pretty simple so far right? If you need help figuring out what options are available in the make.conf then refer to the Gentoo Handbook and Wiki often.

Ok, so now that I got that set I like to head to the kernel and add to it and remove things I don't need by doing in konsole:

This step is not necessary if you don't care that your kernel is big. I always need to enable some sound stuff and you may need to enable drivers, again, this is where knowing where your hardware is very important. You remove the wrong thing and your puter will not boot. Skip this step if you have a funny look on your face at this time.

NOTE: Before doing the following 'emerge -e' commands, you may want to customize your CFLAGS in make.conf so that it is optimized for your CPU type. The following two commands take very a long time, so it's worth it to optimize while you are taking the time to do this. Please refer to Gentoo Safe CFLAGS Guide for the correct setting for your specific CPU. Do not change your CHOST as described in that guide, changing CHOST is dangerous and not recommended. See this HOWTO if you wish to risk changing your CHOST.

Now some of you may totally think I am crazy here but as far as software removal I do that later. Yes I know I can remove software at this time that I will never use and save time when I recompile the system, but this is my unofficial stable system and I know it will work cause I have done it several times. So with that being said I want to now recompile just the system. Now I prefer to do :

Notice I have not done an emerge --sync yet and I don't want to do that yet, that will come later. So now several hours are going to go by. This a great thing to do when you are about to go to bed. After that is done, I like to do the world recompile:

So now I have finished recompiling everything and my processor is going Dude! Well now I punch in:

# emerge --sync && layman -S

to update my portage tree and overlays. First time syncs on SL are slow, I promise they will get faster after the first time. Once that is done I punch in:

# emerge -upDN world

this will pull up just under 400 packages, WOW!! Well lets get the show on the road.

# emerge -uN world

Now you look at that and go what happened to the D ?, again this is my guide and that will come later. Now you are probably sitting there thinking I thought SL doesn't recommend a world update. My feelings are this: no you don't need to, but SL 3.3 makes it a piece of cake to world update. Pre 3.3 I don't recommend, as you will be forever swamped with recompiling. Now with the world update you are going to run into bumps and this is where reading the ERROR MESSAGES is going to come to be Very Important. If you listen to what portage is telling you and use the Gentoo bugzilla and Gentoo forums for searching you can usually find the solution. Once a package fails I simply:

# emerge --resume --skipfirst

to continue on. I like to do this method to see what packages are failing. If you don't care:

then it will auto skip and keep on going till finished. Now I don't try and fix any packages till it is completely done. Once it is done I look look at

#emerge -upN world

and go through each package and install it with the fix needed to get it to install. At this time I will simple remove any packages that have failed that I know I don't need. So now we are done and

# emerge -upN world

shows no packages left in it, time I fire up

# emerge -upDN world

YAY more packages to compile! The amount of packages won't be that much. So we wait for that to finish and I usually fix the errors as it goes along since it isn't very many packages. Now we have the entire system rebuilt, well almost. It's time to run:

# revdep-rebuild

and if that fails do:

# revdep-rebuild

It will find more packages to recompile! Your processor is probably plotting some sort of revenge against you at this time. So now what? Well, you are gonna have some config files that are screaming for an update. Now I like to use:

# etc-update

There is several ways to update config files, this is my way of doing it. So I punch in etc-update and many will auto merge, which is great with me. I look over the remaining ones left and determine if they are safe or not to update. Off the top of my head I believe all changes in 3.3 are safe, but look and if you are unsure, don't do it. So we have recompiled everything after making changes to system, updated the config files. Are we done? Do we dare reboot? Let's live dangerously and reboot, I mean a reinstall is only 40 minutes to do anyway right?

So we rebooted, prayed and we made it back to our Desktop!! So now, I like all the multimedia features the web has to offer, so I want to experience it all, so I open up my konsole again and punch in:

Yes, I know you can add this to your package.use file, but this is my guide and you should add it to your /etc/portage/package.use file for future use. Now I can sit back and view all the goodness of web multimedia! I hate totem handling the web plugins cause it sucks at doing so. I don't uninstall totem I simply move all the totem plugins out of the plugins folder:
/usr/lib/nsbrowser/plugins
and put em in
/usr/lib/nsbrowser
Just in case I ever want to put them back.

Alrighty then, we are world updated now. You can continue to stay world update and SL updated with the overlay by:

Conclusion - my systems are rock solid no matter what I throw at them. It's a long process, but that's fine with me cause the results are worth it. Do keep in mind that it will take less time with the mini as there is less to deal with. It will require thinking and deciphering and good abilities of effective searching. No I can not help you world update your system as I have no idea what hardware you use or what you use your computer for. Is there a chance you may hose your system? Of course there is! It shouldn't happen if you pay attention. I can't stress enough to read the Gentoo Handbook, look at the Gentoo Wiki, look at the Gentoo Forum, look at the SL Wiki, look at the SL Forum and don't forget Google, bookmark them all!

That's it in a nutshell and I take NO and I mean NO Responsibilities for a hosed system. Your millage is going to vary of course depending on what hardware and software you use.

Above you will find a make.conf and is a vital component to your operating system. If you don't know this file you are defeating the purpose of this distro. One of the biggest things about gentoo based is being able to build the operating sytem to you. Using the default settings are going to work, but you are not taking full advantage of your potentials. You can ease our portage frustration also, like compiling issues.

Why do we need make.conf?
Portage uses this file to know how to build your entire system. All the settings you put here, portage reads and builds to them.

CFLAGS
CFLAGS are C compiler flags, usually GCC (GNU Compiler Collection) options.
CFLAGS are commonly used to specify the architecture of your computer, as well as the CPU you are using and any other special options you would like to enable or disable. This information is important to GCC because it tells it exactly how to customize the assembly instructions it creates from the application's source code.
http://gentoo-wiki.com/CFLAGS

CHOST
Variable declares the target build host for your system You don't want to change this value unless you know what you are doing. You simply can't change it to i686 and go about using your computer. There is situations that may cause you to have to change this. For instance, lets say you upgrade your cpu or need a certain package that won't work with your current architect. Gentoo has a guide for changing it. Follow it closely or you will have a hosed system.
http://www.gentoo.org/doc/en/change-chost.xml

USE
In Gentoo a USE flag is a representation of an option, a global setting for your final system. USE flags affect how many of the packages on your system will build. These depend on the software and your computer usage. It's important to know these and to thin the list down to your usage. You will see that I have a lot in mine, but that is because of testing I do for SL. All these USE settings are global, meaning they effect every package on your system. The more USE settings you have, the more conflicts you can encounter with portage when compiling software. There is a /etc/portage/package.use file that you can use to individually tell packages how you want them built.
http://gentoo-portage.com/USEhttp://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=2

PORTAGE_NICENESS
If you keep using your computer while compiling packages you will notice that your box is less responsive than usual. This is caused by having two "groups" of processes with the same nice priority: your usual running processes, and emerge (and its child processes). Now, if you could renice emerge and its children to a higher nice value (i.e. lower priority), compiling would take somewhat longer, but your workstation will be as responsive as before.
http://gentoo-wiki.com/Portage_Niceness

FEATURES
Portage has several additional features that makes your Gentoo experience even better. Many of these features rely on certain software tools that improve performance, reliability, security, ...
Parallel fetch:
When you are emerging a series of packages, Portage can fetch the source files for the next package in the list even while it is compiling another package, thus shortening compile times..
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=3

Extras that I have added, just for my own use. You will not see these in a default make.conf

PORTAGE_ELOG_CLASSES
Ebuild Logging -
Portage can create per-ebuild logfiles, but only when the PORT_LOGDIR variable is set to a location that is writable by Portage (the portage user). By default this variable is unset. If you don't set PORT_LOGDIR, then you won't receive any build logs with the current logging system, though you may receive some logs from the new elog. If you do have PORT_LOGDIR defined and you use elog, you will receive build logs and any logs saved by elog, as explained below.

Portage offers fine-grained control over logging through the use of elog:

PORTAGE_ELOG_CLASSES: This is where you set what kinds of messages to be logged. You can use any space-separated combination of info, warn, error, log, and qa.

o info: Logs "einfo" messages printed by an ebuild
o warn: Logs "ewarn" messages printed by an ebuild
o error: Logs "eerror" messages printed by an ebuild
o log: Logs the "elog" messages found in some ebuilds
o qa: Logs the "QA Notice" messages printed by an ebuild
PORTAGE_ELOG_SYSTEM: This selects the module(s) to process the log messages. If left empty, logging is disabled. You can use any space-separated combination of save, custom, syslog, mail, save_summary, and mail_summary. You must select at least one module in order to use elog.

save: This saves one log per package in $PORT_LOGDIR/elog, or /var/log/portage/elog if $PORT_LOGDIR is not defined.

custom: Passes all messages to a user-defined command in $PORTAGE_ELOG_COMMAND; this will be discussed later.

syslog: Sends all messages to the installed system logger.

mail: Passes all messages to a user-defined mailserver in $PORTAGE_ELOG_MAILURI; this will be discussed later. The mail features of elog require >=portage-2.1.1.

save_summary: Similar to save, but it merges all messages in $PORT_LOGDIR/elog/summary.log, or /var/log/portage/elog/summary.log if $PORT_LOGDIR is not defined.

mail_summary: Similar to mail, but it sends all messages in a single mail when emerge exits.

Do you see now why it is important to know this file? This file can make your gentoo based distro a much better experience. The gentoo handbook can help you set it up properly. Remember to take full advantage of changes, you need to be using certain flags like emerge --newuse foo. Recompiling your entire sytem and world is what you need to do to take advantage of your changes. Like for me I simple run emerge -uDN --world - that will update and make sure all packages are following my settings. If I changed a USE flag it will rebuild the packages effected and update packages to latest in portage.

Recompiling your system is not going to be easy if you are new to all of this. I recommend getting to know portage and how to work with portage before attempting it. It's something you just don't jump into. Your going to run into all sorts of issues and gonna have to search and find your answers. As of 3.4 you are gonna run into a python update, which requires taking care of first as things will break and need to get updated to the new python. Pending on your system - it can take several days to complete the process.
Learn your world file and cleaning it out before starting, this will save many hours of recompiling packages you don't need. The world file is a record of packages which have been specifically installed by the user. More specifically it's a list of packages which the user wants to keep installed and updated on their system. It will not record the dependencies of those packages, but instead uses the dependencies of the currently installed packages to keep track of this information. http://gentoo-wiki.com/HOWTO_Use_Portage_Correctly

You will also want to get yourself familiar with the files in your /etc/portage/ you will need to use them to mask and unmask needed packages. Also use em for telling how certain packages should be built.

Read thru the unofficial guide for a world update
viewtopic.php?f=54&t=5531

Best advice - Use the operating system till you know it, than start diving into the depths of the internal stuff. I know it is frustrating for people that are new, but if you give it time and stick with it, it will all come together. If all this information totally terrifies you, than stick with the default settings. Use the information for you knowledge. Topic is open for discussion.

Do not and I repeat, do not blindly auto merge config file updates. You can hose your system to the point it won't boot back up. Well there is so many, how do I know if it is safe to or not? Good question and the rule of thumb is - if you have not edited a config file than generally your are safe, but this isn't a sure fire way. Using dispatch-conf will keep a back up copy of you old config files in case you need to restore them. Get to know your config files so you can be aware of certain files.

Remember to edit the config files you need to be root, so you will want to open konsole, type su, enter password and than nano or vi the file. You can do this via GUI too, just open konsole and run kdesu konqueror and when the box comes up, enter you root password and than you will have a root file manager window, gnome users will use gksu nautilus.

/etc/modules.autoload.d/kernel-2.6 - You may have decided to compile some kernel components as modules (as opposed to compiled directly into the kernel) and would like to have them autoloaded on bootup like you did with 2.4. Also, if you installed any external modules from the portage tree you will probably want to autoload them too.
http://www.gentoo.org/doc/en/migration-to-2.6.xml

This hardly puts a dent in the amount of config files, but those are the ones I run across the most, plus trying to keep it friendly for people new to config files. I could of mentioned like local.start, but that is for experienced people.

Generally you can google and find some thing about the config file. Enter into google "gentoo xorg.conf" and you will find your answer. Feel free to add more that I may have missed here.