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.
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.
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.
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
A new version of PostgreSQL, 8.4.2-r1, is available in Gentoo Portage, but be careful. It appears the server is compiled with HAVE_INT64_TIMESTAMP by default, something not true with previous versions. Because of this, after updating, you might get an error about the data cluster being incompatibile with the server when you restart, unless you were using the pg-intdatetime use flag in previous versions (which has been removed in the newest version).
Sometimes when working on projects in both Linux and Windows, a file will end up with Windows newline characters, which show up as ^M in Vim. Annoying as this is, there's a quick fix to remove them in Vim using a regular expression replace:
:%s/<control-v><control-m>//g
Magically, all the ugly Windows newline characters are gone.
I'm not afraid to admit it: I'm a fan of Gnome. I think KDE looks to cartoonish. I actually prefer using OpenBox with a slew of lightweight apps for window manager addons, but that because too much to maintain, and I have better things to do with my time.
It's hard to find a nice, clean set of decorations for Gnome that mesh well together. GDM theme, icons, wallpapers, GTK themes, etc that all blend well together to create a complete, polished look.
Recently I found the "Colors" theme set on Gnome Look.
GDM and Wallpapers: http://www.gnome-look.org/content/show.php/Arc-Colors+GDM-Walls?content=88305
GTK: http://www.gnome-look.org/content/show.php/Shiki-Colors?content=86717
Icons: http://www.gnome-look.org/content/show.php/GNOME-colors?content=82562
Nice and simple.
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 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
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:
I had one hell of a time when I copied my Ruby on Rails application from my development machine (Windows XP, Apache 2.2) to my production machine (Linux, Apache 1.3). I floundered through a series of errors and problems, but one error really stumped me, and unfortunately I couldn't find much help on the net for it:
Application error (Rails)
It took me forever to get past this problem, but I finally figured it out. The first line of a few files in the public/ folder contained a path to the Ruby binaries.
#!C:/ruby/bin
For obvious reasons, this wasn't going to fly well on a *nix server. So I had to change it in the following files: dispatch.cgi, dispatch.fcgi, dispatch.rb.
In my instance, it was changed to:
#!/usr/local/bin/ruby
But obviously your server might be different. Try exploring /usr/local and /usr/bin or using locate ruby to try to find the correct path to Ruby.
After I made this modification the application worked fine.