phup 'n stuff

Another Blog About Being a Developer

Posts Tagged ‘Gentoo’

An Epic Struggle With Portage

Tuesday, February 23rd, 2010

Today I embarked on an epic struggle with the Portage package manager attempting to update the packages on my system. After I ran into what can only be described as a phantom package.

(more…)

Gentoo Portage Alternative

Tuesday, February 2nd, 2010

I just came across an alternative to the http://gentoo-portage.com and http://packages.gentoo.org sites: http://znurt.org/

Nice, clean, beautiful and full of information.

The Sluggish Speed of Gentoo

Wednesday, January 20th, 2010

Gentoo, ffs, get PHP 5.3.1 in Portage ASAP. PHP 5.3 isn't even in there, yet. What's the use of your package manager if I just have to manually install stuff?

/rant

Failed Kernel Upgrade

Saturday, March 21st, 2009

The other day I upgraded my Gentoo kernel (after realizing I was about 7 kernel updates old). After compiling and setting up Grub, I rebooted and received this error:

RAMDISK: Compressed image found at block 0
RAMDISK: ran out of compressed data
invalid compressed format (err=1)
UDF-fs: No VRS found
List of all partitions:

No file system could mount root, tried: …
Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(1,0)

After painful research, I finally discovered the problem: I ran out of space on my boot partition.

Apparently genkernel does not complain when it runs out of space to compile the kernel. It just stops and outputs the same message it would it if succeeded.

A "quick" use of parted to allocate more space to the boot partition, and re-compiling the kernel solved the problem. It's just sad that genkernel doesn't bother reporting the fact that it ran out of space.

PostgreSQL 8.3 Permissions in Gentoo

Saturday, March 7th, 2009

PostgreSQL 8.3 in Gentoo now creates the socket in /var/run/postgresql with stricter permissions, meaning that regular users cannot connect to the PostgreSQL server via command line. Emerging this package outputs a message about this that I initially missed when installing:

Please note that the standard location of the socket has changed from /tmp to /var/run/postgresql and you have to be in the 'postgres' group to access the socket.

This means that regular users who need access to the PostgreSQL server need to be added to the postgres group:

gpasswd -a user postgres

Upgrading to PostgreSQL 8.3 on Gentoo

Wednesday, March 4th, 2009

Gentoo has taken a long time to unmask PostgreSQL 8.3 in Portage. Currently, the best version you can get is. 8.0.5, which, if you can tell, is pretty far away from 8.3.

This masking is largely due to the painful process of upgrading PostgreSQL (which usually involves dumping all your databases and restoring them afterwards). Here's what I did to get 8.3 up and running.

First, make sure you backup all your databases:

pg_dumpall > postgres-backup.dump

Run the following commands as root. This will add entries to your /etc/portage/package.keywords file:

echo "dev-db/postgresql-base ~amd64" >> /etc/portage/package.keywords
echo "dev-db/postgresql-server ~amd64" >> /etc/portage/package.keywords
echo "virtual/postgresql-server ~amd64" >> /etc/portage/package.keywords
echo "virtual/postgresql-base ~amd64" >> /etc/portage/package.keywords

Make sure to replace amd64 with your actual architecture.

Now, we're going to unemerge PostgreSQL so we can emerge the new version:

emerge --unmerge dev-db/postgresql dev-db/libpq

Emerge the new version, configure it, start it, and add it to startup:

emerge virtual/postgresql-base virtual/postgresql-server
emerge --config =dev-db/postgresql-server-8.3.5
/etc/init.d/postgresql-8.3 start
rc-update add postgresql-8.3 default

Make sure to replace the version above with the one you actually installed. Now restore your databases:

psql -U postgres -f postgres-backup.dump template1

And you should be all set.

Helpful Links:

PostgreSQL: Backup and Restore