Archive for the ‘Linux Gentoo’ Category

Portage and nice

Thursday, November 24th, 2005

While you are compiling packages and at the same time you are working with your box, probably you’ll notice the machine is less responsive than usual. Although this in principle is not necessarly an abnormal behaviour it could be very annoying.

To diminish the impact of such situation, you could reduce the priority that the kernel assigns to emerge.

Portage provides a configuration parameter that allows you to control this priority. Edit /etc/make.conf and add the following:

PORTAGE_NICENESS=”17″

This will pass “17″ as value to the nice command. Possible values range from “-20″ to “20″, being “-20″ the highest priority and “20″ the lowest. 0 is standard or normal priority.

See nice man page for more info.

udevfs or devfs

Friday, April 1st, 2005

If you want to use pure udevfs then don’t set boot devfs on boot time in kernel config.

CONFIG_DEVFS_FS is not set

(in .config)

To use udevfs linux device naming convention install udevfs and do this step:

# emerge udev

Then

kernel /bzImage root=/dev/hda3 boot=nodevfs

(in grub.conf)

now when system boots it’ll use udevfs.

Announcing Planet Gentoo

Sunday, March 13th, 2005

From Gentoo’s web site:

The user relations project is pleased to announce the launch of Planet Gentoo, a resource intended to improve communication between the user and development communities, as well as internally between developers. Planet Gentoo aggregates articles written by currently over 50 contributing developers and presents them in an easily readable news-like format.

Conflict between vcron and vixie-cron

Saturday, February 19th, 2005

Several months ago my system is issuing the following error message everytime I try to emerge:

* Caching service dependencies…
* Service ‘vcron’ already provide ‘cron’!;
* Not adding service ‘vixie-cron’…

Until now this was only an annoying error message as it did not affect the functionality of the server. But finally I’ve decided to solve the issue.

If you have the same issue proceed as follows:

Stop and unmerge vcron and delete the init script:

/etc/init.d/vcron stop
emerge unmerge vcron
rc-update del vcron
rm -f /etc/init.d/vcron

Now add vixie-cron script to init scripts and launch it:

rc-update add vixie-cron default
/etc/init.d/vixie-cron start

And you are done!

An alternative to etc-update: dispatch-conf

Sunday, January 23rd, 2005

When you emerge a new package, etc-update will check if there are updates to the configuration files and will allow you to keep, merge or delete these files according to your needs.

Portage provides us with another useful tool with more functionalities: dispatch-conf.

dispatch-conf has the same goal than etc-update: manage the configuration files after merging, but provides new useful features:

  • Ability to rollback changes
  • Automerge files
  • Versioning (rcs/cvs)
  • Log changes

More info:

genlop – parses portage logfiles for information

Tuesday, November 23rd, 2004

Detailed features include:

  • Nice colorful output.
  • Full Portage merge and unmerge history.
  • Display date, time and build time of every merge.
  • Display total and average build time of selected package[s].
  • Estimate upgrade time.
  • Watching current merge progress.
  • Use alternate portage logfile(s).
  • Match package names using regular expressions.
  • Log corruption detection.

To get complete detail of merged packages:

$ genlop –list
Sun Jul 11 23:22:16 2004 –> dev-util/ccache-2.3
Sun Jul 11 23:22:41 2004 –> sys-apps/portage-2.0.50-r9
Sun Jul 11 23:22:48 2004 –> sys-devel/gnuconfig-20040214
Sun Jul 11 23:24:57 2004 –> sys-devel/gettext-0.12.1
Sun Jul 11 23:25:20 2004 –> sys-apps/sed-4.0.9
Sun Jul 11 23:26:51 2004 –> sys-libs/ncurses-5.4-r1
Sun Jul 11 23:27:22 2004 –> sys-apps/texinfo-4.6
Sun Jul 11 23:29:47 2004 –> sys-devel/binutils-2.14.90.0.8-r1
Sun Jul 11 23:30:04 2004 –> sys-devel/m4-1.4.1
Sun Jul 11 23:30:31 2004 –> sys-devel/bison-1.875
Sun Jul 11 23:30:40 2004 –> sys-libs/zlib-1.2.1-r2
Sun Jul 11 23:44:16 2004 –> sys-devel/gcc-3.3.3-r6
Mon Jul 12 00:05:58 2004 –> sys-libs/glibc-2.3.3.20040420
Mon Jul 12 00:07:20 2004 –> sys-apps/baselayout-1.9.4-r3

To calculate merge time:

$genlop –time package_name

$genlop -t qt
* x11-libs/qt

Thu Oct 7 20:52:53 2004 –> x11-libs/qt-3.3.2
merge time: 25 seconds.

merged totally 1 ebuild in 25 seconds.

Search packages that match a regular expression:

genlop -s gen[lt]o

source: man genlop

Gentoo 2004.3 announced

Tuesday, November 16th, 2004

Gentoo Linux 2004.3 is now available!

Creating portage packages

Tuesday, November 16th, 2004

In gentoo linux quickpkg can be utilized to quickly create a package (tbz2 format) for portage by utilizing the files already on your filesystem. This package then can be emerged on any system.

It comes with gentoolkit package.

emerge -pv gentoolkit
man quickpkg

You can do the same thing with ‘emerge’ command

emerge -B package_name

–buildpkgonly (-B) Creates binary packages for all ebuilds processed without actually merging the packages. This comes with the caveat that all build time dependencies must already be emerged on the system.

All generated packages will be stored in

${PKGDIR}/All
${PKGDIR}/

Gentoo Linux 2004.2 released

Wednesday, July 28th, 2004

Gentoo Linux has announced the new 2004.2 release. According to Gentoo the improvements include:

  • LiveCD compatibility with SMP machines
  • x86 laptop PCMCIA support
  • SATA support
  • And more

Links

Protecting configuration files

Wednesday, June 30th, 2004

When you update packages in your Gentoo Linux system you should be careful to avoid the configuration files to be overriden by new ones during the emerge process. To protect the configuration files in your system portage provides a feature called config file protection.

Take a look at /etc/make.globals and find out the CONFIG_PROTECT variable. This variable contains a list of protected directories and it will look something like:

CONFIG_PROTECT=”/etc /usr/share/config”

Simply add your protected directories separated by white spaces. Now new files will not override existing files installed in a protected directory, instead they will be renamed as ._cfg0000_blah. In addition etc-update is available to assist you while merging these files.

Note that portage will not delete files in protected directories when a package is unmerged.

References:

  • emerge -h config
  • man etc-update