Archive for the ‘Linux Gentoo’ Category

Setting up a caching DNS resolver with djbdns

Friday, October 10th, 2003

As you know, a DNS server translates the domain names (.i.e. www.karkomaonline.com) into numerical values that computers recognize and also translates numerical values into domain names. The server stores previous queries so that later requests can be handled more quickly.

A DNS caching resolver performs the function of caching answers to previous queries so that there is no need to repeatedly query for the same information.

This tip will show you how to set up a caching DNS using the djbdns software package.

(more…)

Understanding USE flags

Sunday, September 28th, 2003

One of the great features that Gentoo Linux provides to its users is the ability to control how packages are treated by setting individual and global settings whenever you build them.

This means that you can enable or disable some options when you are compiling your applications so that unneeded features such as X support or XML support could be avoided. (more…)

epm (Emerge/Ebuild? Package Manager)

Monday, September 8th, 2003

If you come from an RPM based GNU/Linux distro, surely you are familiar with the RPM package manager. Gentoo Linux provides a similar tool for you to make the transition easier.

(more…)

Gentoo and masked packages

Wednesday, August 6th, 2003

Maybe you’ve found yourself trying to install a Gentoo package and you got something like this:

emerge -p portmon
These are the packages that I would merge, in order:

Calculating dependencies
!!! all ebuilds that could satisfy “portmon” have been masked.

!!! Error calculating dependencies. Please correct.

(more…)

What are those .keep files that appear everywhere?

Thursday, July 31st, 2003

Probably you have seen a hidden file in all your directory structure called .keep and wondered what this file is for.

(more…)

Why can’t I su to root?

Sunday, July 27th, 2003

As a security measure, the default configuration for Gentoo Linux requires a user to be a member of the wheel group to be allowed to execute the su command to become root.

(more…)

Privilege separation in Portage (from gentoo.org)

Sunday, July 6th, 2003

One nice feature of Portage is that it can drop privileges and compile as a less privileged user. It can also sandbox most phases of the installation. This tip shows you how to enable these features of Portage to increase the security of your system.

(more…)

Selecting mirrors (from gentoo.org)

Saturday, June 28th, 2003

As Gentoo’s userbase grows, a common complaint is the slowdown of its primary mirrors. Many people in the community have responded, adding more mirrors to help distribute the load.

(more…)

Disk Information utility

Monday, June 2nd, 2003

Recently I have discovered this little and cool utility, similar to df but with some extra features and a bit clear output. The utility is di, the disk information.

From the man pages…

di displays usage information on mounted filesystems. Block values are reported in megabytes (1024k bytes) by default, but may be changed. If file is specified, the usage information for the partition on which file is located is printed.

As usual, to install the utility emerge the package…

emerge di

For a basic usage simply type…

kranpak root # di
Filesystem Mount Megs Used Avail %used fs Type
/dev/hda1 / 4102.4 202.9 3899.4 5% reiserfs
tmpfs /dev/shm 376.7 0.0 376.7 0% tmpfs
/dev/hda3 /home 3106.2 1362.5 1743.7 44% reiserfs
tmpfs /mnt/.init.d 2.0 0.0 2.0 1% tmpfs
/dev/hda8 /tmp 2102.2 34.6 2067.6 2% reiserfs
/dev/hda2 /usr 5106.4 3246.0 1860.4 64% reiserfs
/dev/hda5 /var 6000.6 2621.8 3378.9 44% reiserfs

The first thing here is that, as opposed to df you have the info regarding your filesystem type at first sight (compare this with df -t reiserfs).

Here are some of the switches a like:

-s [ s|n|r ], output sorted/unsorted/reversed
-t, print totals
-A, print all fields

There are a lot more switches (i.e. to format the output -very nice), so take a look at man pages. As part of the packages you’ll find the mi utility that will display info on the mounted filesystem (man mi).

A little clarification using emerge

Sunday, June 1st, 2003

When I first start using emerge, I could not understand some of the behaviour of this tool. For example, when I tried to emerge OpenOffice…

kranpak root # emerge -p openoffice

These are the packages that I would merge, in order:

Calculating dependencies …done!
[ebuild N ] net-print/cups-1.1.18-r4
[ebuild N ] app-shells/tcsh-6.12-r2
[ebuild N ] app-office/openoffice-1.0.3-r1

And then I tried…

kranpak root # emerge -pu openoffice

These are the packages that I would merge, in order:

Calculating dependencies …done!
[ebuild N ] app-shells/tcsh-6.12-r2
[ebuild N ] net-print/cups-1.1.18-r4
[ebuild U ] x11-misc/ttmkfdir-3.0.9 [3.0.4]
[ebuild U ] dev-libs/expat-1.95.6-r1 [1.95.4]
[ebuild U ] media-libs/fontconfig-2.2.0-r2 [2.1]
[ebuild U ] x11-base/xfree-4.3.0-r2 [4.2.1-r2]
[ebuild N ] app-office/openoffice-1.0.3-r1

Why the difference? Is there any thing wrong? What is the difference between installing OpenOffice and updating it?

Well, here goes an explanation (thanks to spider from gentoo)…

The -pu option will check dependencies downwards from OpenOffice (as it should) and since you are updating it will note you have an older version than the currently available one, and update each package on its way down into the tree.

The “install” will only make sure you have at least the least possible version for satisfaction, not update them.