Posts Tagged Linux

Centos 5 – Adding extra sources for bleeding edge

Posted by on Wednesday, 6 May, 2009

So you got yourself say a Centos VPS or Server. Some guy comes along and develops you a website made in the latest and greated PHP version and yours isnt running it!.

Easily fixed. First of all to know, is Centos 5 is basicly RHEL 5 only free, you can use the same sources lists and rpms between the two.

So adding the first source would be the DAG/RPMForge lists. The FAQ is up here http://dag.wieers.com/rpm/FAQ.php which is pretty generic and basic.

Red Hat Enterprise Linux 5 / i386:

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Remembering that Centos 5 is the same as el5 (Red Hat Enterprise Linux … RHEL) this works nicely. You may find that you get the following error when using apt to update

E: Dynamic MMap ran out of room
E: Dynamic MMap ran out of room
E: Error occured while processing packagename
E: Problem with MergeList
/var/state/apt/lists/listname
E: msync
E: The package lists or status file could not be parsed or opened.

This can be fixed by putting the following line into the bottom of /etc/apt/apt.conf

APT::Cache-Limit 50000000;

At Rimuhosting where i work we usually default to Centos 5.3 which is pretty much the latest release. I found the DAG/RPMForge lists not quiet as up to date as the Remi lists at http://blog.famillecollet.com/pages/Config-en

The easy way to get these ones going is as follows

wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

By default the remi lists are not enabled, you can use them indevidually with yum –enablerepo remi install packagename . Or you can edit the /etc/yum.repos.d/remi.repo and change the enabled=0 to enabled=1

Now you can yum update and yum upgrade nicely!

Let me know any other mirrors you found handy.


Abusive and fun comments in source code

Posted by on Wednesday, 29 April, 2009

From time to time I have noticed you get some interesting comments in various programs. I thought I would share some of the more amusing comments I’ve found.

In http://code.google.com/p/xee/source/browse/trunk/XeePhotoshopLoader.m?spec=svn28&r=11 . Clearly a programmer whos had a bad day.

Change log

r11 by paracelsus on Sep 11, 2007 Diff
Photoshop loader is DONE for now, fuck you
Adobe

// At this point, I’d like to take a moment to speak to you about the Adobe PSD format.
// PSD is not a good format. PSD is not even a bad format. Calling it such would be an
// insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having
// worked on this code for several weeks now, my hate for PSD has grown to a raging fire
// that burns with the fierce passion of a million suns.
// If there are two different ways of doing something, PSD will do both, in different
// places. It will then make up three more ways no sane human would think of, and do those
// too. PSD makes inconsistency an art form. Why, for instance, did it suddenly decide
// that *these* particular chunks should be aligned to four bytes, and that this alignement
// should *not* be included in the size? Other chunks in other places are either unaligned,
// or aligned with the alignment included in the size. Here, though, it is not included.
// Either one of these three behaviours would be fine. A sane format would pick one. PSD,
// of course, uses all three, and more.
// Trying to get data out of a PSD file is like trying to find something in the attic of
// your eccentric old uncle who died in a freak freshwater shark attack on his 58th
// birthday. That last detail may not be important for the purposes of the simile, but
// at this point I am spending a lot of time imagining amusing fates for the people
// responsible for this Rube Goldberg of a file format.
// Earlier, I tried to get a hold of the latest specs for the PSD file format. To do this,
// I had to apply to them for permission to apply to them to have them consider sending
// me this sacred tome. This would have involved faxing them a copy of some document or
// other, probably signed in blood. I can only imagine that they make this process so
// difficult because they are intensely ashamed of having created this abomination. I
// was naturally not gullible enough to go through with this procedure, but if I had done
// so, I would have printed out every single page of the spec, and set them all on fire.
// Were it within my power, I would gather every single copy of those specs, and launch
// them on a spaceship directly into the sun.
//
// PSD is not my favourite file format.

Heres another amusing one.

* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!IF YOU CHANGE TABS TO SPACES, YOU WILL BE KILLED!!!!!!!
* !!!!!!!!!!!!!!DOING SO FUCKS THE BUILD PROCESS!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

At the top of a particularly convoluted and otherwise completely uncommented code:
// Abandon all hope, ye who enter here.
In some PHP code for a webpage :

// Since this file is loaded on every page, and since
// I want the following function on every page, I’m going to
// cheat and include it here even though it has nothing to
// do with the other things in this file.
// If you don’t like it, bite me!

Seen, and believed…

[some long and messy code] # too drubnk to make this workkkkj. debugg latter.

The source code of PerlLanguage’s Net::IRC modules has numerous chunks of funny conversation from the #perl IRC channel in it. My favorite:

# — #perl was here! —
# Larry Wall is a lot sexier than Richard Stallman
# But I’ve heard Stallman is better in bed.
# Does he leave the halo on?
# * aether cocks her head at skrew…uh…whatever?
# Stallman’s beard is a sex magnet.
# Larry’s moustache is moreso, Fimm.
# oh yeah…women all over the world are hot for stallman….
# Moustaches make my heart melt.
# I dunno, there’s something about a man in hawaiian shirts…

Spotted this in the source code for one of the ApacheAnt tasks:

: /*
: * build notes
: * The reference CD to listen to while editing this file is
: * Underworld Everything, Everything
: * variable naming policy from Fowler’s refactoring book.
: */

/usr/src/linux is full of fun.

/*
** “seek and ye shall find”…praying never hurts either…
** ggg sacrafices another 710 to the computer gods.
*/

* These chips are basically fucked by design, and getting this driver
* to work on every motherboard design that uses this screwed chip seems
* bloody well impossible. However, we’re still trying.
* skb to avoid No=0 (choose one: Ugly [ ] Tasteless [ ] VMS [ ]).

For an illuminating experience, try grep -ir word /usr/src/linux, where word is one of the following: fuck, shit, damn, hack, kludge, “:-(“, “no idea”, awful, stupid, and of course XXX… I’m sure you can think of your own candidates.

One could probably make some significant contributions to the Linux codebase simply by doing this, then seeing if they can figure out how to fix the problem the coder was griping about. Hell, there are probably several Linux kernel hackers who do just that, though admittedly a lot of the problems are related to bizarre hardware or outside software which the system has to interface with, which the coders can do much about. Even so, it would probably be a useful thing to do. KiboDebugging??

* Found at the beginning of a loop that could run forever:
/* And now, ladies and gentlemen, the chord from HELL! */

* Found near a particularly nasty fix for a fencepost error:

/* There are dumber f**ks than me out there, but not many */

* Found near a piece of code that handled memory resizing, it made the new generation of neural nets inside the space for the previous failures. If it didn’t have to realloc at all the branch that executed was labeled:

/* These clothes are a little tight, but the price was right */

* Finally, there was an error message in some of a test code that said:

“Nostradamus told me this would happen. Smug bastard.”

Here are excerpts from some code found whilst doing an upgrade to a new server structure.

#include <wchar.h> //I hate strings.
#include <tchar.h> //I HATE STRINGS!!!
#include <string> //I HAT TEH STRINGES!!! DIE! DIEDIE! DIE!!!!!!

/// A class for interfacing dotnet code with (product)’s plugin API.
/// As you may have noticed, making .NET code work with API code is a
/// pain in the ass, because it never occurred to Microsoft that .NET code
/// might one day have to exist on the same computer as API code. As
/// unbelievable as it is, programmers need to have their non-.NET software
/// [use] functions that were written in managed code. So, to better the meet the
/// needs of their developers, Microsoft made the process as inconvienient
/// as they possibly could. Enjoy.

/// This function converts stuff from a .NET String to an LPTSTR.
/// May whoever decided it should be this complicated be required to
/// write it 20,000 times on a tiny whiteboard with perfect penmanship,
/// rot in jail for two years, then have to try clean it all off using
/// nothing but his own saliva and a toilet brush without getting any
/// ink on his gloves.

Found in a depracated .c file:

/* fit round peg into square hole, if necessary… */
/* well, actually any damn peg into whatever hole we have to work with… */
/* use (the) force, if necessary */


Ubuntu 9.04 Released

Posted by on Friday, 24 April, 2009

The Ubuntu team is pleased to announce Ubuntu 9.04 Desktop and Server
editions and Ubuntu Netbook Remix, continuing Ubuntu’s tradition of
integrating the latest and greatest open source technologies into a
high-quality, easy-to-use Linux distribution.

Read more about the features of Ubuntu 9.04 in the following press releases:

Desktop edition http://www.ubuntu.com/news/ubuntu-9.04-desktop
Server edition http://www.ubuntu.com/news/ubuntu-9.04-server
Netbook Remix http://www.ubuntu.com/news/ubuntu-9.04-unr

Ubuntu 9.04 will be supported for 18 months on both desktops and servers.
Users requiring a longer support lifetime may choose to continue using
Ubuntu 8.04 LTS rather than upgrading to or installing 9.04.

Ubuntu 9.04 is also the basis for new 9.04 releases of Kubuntu, Xubuntu,
Edubuntu, UbuntuStudio, and Mythbuntu:

Kubuntu http://kubuntu.org/news/9.04-release
Xubuntu http://xubuntu.org/news/9.04-release
Edubuntu http://edubuntu.org/news/9.04-release
Mythbuntu http://mythbuntu.org/9.04/release
Ubuntu Studio http://ubuntustudio.org/downloads

To Get Ubuntu 9.04
——————

To download Ubuntu 9.04, or obtain CDs, visit:

http://www.ubuntu.com/getubuntu

Users of Ubuntu 8.10 will be offered an automatic upgrade to 9.04 via
Update Manager. For further information about upgrading, see:

http://www.ubuntu.com/getubuntu/upgrading

As always, upgrades to the latest version of Ubuntu are entirely free of
charge.

We recommend that all users read the release notes, which document
caveats and workarounds for known issues. They are available at:

http://www.ubuntu.com/getubuntu/releasenotes/904

Find out what’s new in this release with a graphical overview:

http://www.ubuntu.com/getubuntu/releasenotes/904overview

If you have a question, or if you think you may have found a bug but
aren’t sure, try asking on the #ubuntu IRC channel, on the Ubuntu Users
mailing list, or on the Ubuntu forums:

#ubuntu on irc.freenode.net
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
http://www.ubuntuforums.org/

Helping Shape Ubuntu
——————–

If you would like to help shape Ubuntu, take a look at the list of ways
you can participate at:

http://www.ubuntu.com/community/participate/

About Ubuntu
————

Ubuntu is a full-featured Linux distribution for desktops, laptops,
netbooks and servers, with a fast and easy install and regular releases. A
tightly-integrated selection of excellent applications is included, and an
incredible variety of add-on software is just a few clicks away.

Professional services, including support, are available from Canonical
Limited and hundreds of other companies around the world. For more
information about support, visit:

http://www.ubuntu.com/support

More Information
—————-

You can find out more about Ubuntu and about this release on our website:

http://www.ubuntu.com/