Build your own packages easily with FPM

Building packages is a task that every system administrator will end up doing. Most of the time this is not a very interesting task but someone has to do it, right? Normally you will end up modifying and tweaking based on your own needs an existing package that was built by the maintainers of the Linux distribution that you are using. In time you might even become familiar with the packaging system you are using (rpm, deb, etc.) and you will be able to write a spec file and start from scratch and build a new package if you need to. Still, this process is complicated and requires a lot of work.

Luckily, Jordan Sissel has built a tool called FPM (Effing Package Management), exactly for this: to ease the pain of building new packages; packages that you will use for your own infrastructure and you want them customized based on your own needs; and you don’t care about upstream rules and standards and other limitations when building such packages. This can be very useful for people deploying their own applications as rpms (or debs) and can simplify a lot of the process of building those packages.

FPM can be easily installed on your build system using rubygems:
gem install fpm

Once installed you can use fpm to build packages (targets):

  • deb
  • rpm
  • solaris

from any of the following sources:

  • directory (of compiled source of some application)
  • gem
  • python eggs
  • rpm
  • node npm packages

Read the rest of this entry »

Tags: , , , ,

Xen error: stdin: is not a tty

After installing a clean Debian Lenny Xen system using xen-tools, I received this strange error when trying to connect using ssh to the machine:
PTY allocation request failed on channel 0
stdin: is not a tty

It looks like for some reason, xen-tools didn’t install the udev package. So in order to fix this issue, I had to connect (using the virtual console) to the xen machine:
xen console 1
and install udev:
apt-get install udev
strange enough the /dev/pts mount entry was present in /etc/fstab so all I had to do was to remount it with:
mount -a
(if you don’t have this entry make sure to add it in /etc/fstab:
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
and if the folder /dev/pts doesn’t exist create it first and after that mount -a).

This should fix the ssh problem and you should now be able to ssh into the xen machine. Next to see if this is fixed in xen-tools in Squeeze, and if not to file a bug for it.

Tags: , ,

HowTo upgrade from Debian Lenny to Squeeze

This post will show how to upgrade from Debian 5.0.x “Lenny” to the latest stable Debian release 6.0 “Squeeze”. One of the reasons I’ve liked Debian in the first place was the advantage of being able to do a live, in place updates from one major release to another, usually in a safe way. As always, if you do this, please take some time to backup your system if you care of your data, as this is a major upgrade and things can go wrong. Squeeze brings in a few big changes and I will outline some of them, but I would recommend to read the release notes and look for any incompatibilities (hardware or software) or changed things that could affect your particular setup.

1. Update apt sources.list

The first thing we will do (after the backup of course) is to edit the /etc/apt/sources.list file and replace “lenny” with “squeeze“. Originally, this might look like this (for a system using the main US mirrors; your file might use a different local one):

deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free

deb http://security.debian.org/ etch/updates lenny contrib non-free

after replacing lenny with squeeze the file will look like this:

deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free

deb http://security.debian.org/ squeeze/updates main contrib non-free

Read the rest of this entry »

Tags: , , ,

Debian News: Lenny 5.0.6, backports, stats.

Updated Debian GNU/Linux: 5.0.6 release

This week the Debian project released the 6th update to its stable release Lenny, 5.0.6. All recent security updates have been added, as well as some other fixes. The linux-2.6 package was also updated for increased hardware support.

Backports service is now official

I was very happy to hear that the debian backports project is now an official debian project. I always used (and liked) the backports.org repository to easily bring in updated software to the stable release. Now, after it become an official project and not just a fun project of three developers will hopefully be even better and have more software added into backports much faster. Don’t forget to change your apt sources config to point to backports.debian.org (old backports.org mirror will still work for a while).
deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free

Debian growth over time

Also on some unrelated news Romain Francoise published some interesting stats on the growth of the Debian archive over time:

  • woody (2002): 8273 packages
  • sarge (2005): 15195 packages (+83.7%)
  • etch (2007): 18043 packages (+18.7%)
  • lenny (2009): 22277 packages (+23.5%)
  • squeeze (2010?): 28870 packages (+29.6%)

Wow… now that is really impressive.

Tags: , , ,

Next Debian release will be called “Wheezy”

Squeeze has been frozen for some time now, and hopefully will be released by the end of the year, and today the Debian team has revealed the name of the next Debian release 7.0: Wheezy.

Just like all the previous releases, this is another character from Toy Storywheezy – a rubber squeeze toy penguin with a red bow tie (that appears only in the 2nd movie). This will be the first character selected as a Debian version name which has not appeared in all the movies.

Source: http://lists.debian.org/debian-devel-announce/2010/09/msg00000.html

Tags: , ,

Multiple java versions on debian

Debian has a nice way to handle multiple java installations on a the same machine. Let’s say that for some reason you want to have sun-java 1.5 and also 1.6 installed on the server, we can easily configure the default one with the update-java-alternatives command (part of the java-common package). Here is how it can be used:

To see what versions of java we have installed on the system (from debian packages):
update-java-alternatives -l
java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun
java-6-sun 63 /usr/lib/jvm/java-6-sun

We can see that the default version is 1.6 in my case (as it was the last installed):
java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

We can change the default version with: update-java-alternatives –jre -s <ver> , like:
update-java-alternatives --jre -s java-1.5.0-sun
and now the default is 1.5:
java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)

This is quite handy if you need to have multiple java versions installed, and need a quick way to change the default one (you can access any of them directly from their own path of course).

Tags: ,

Debian 6.0 “Squeeze” frozen

During the annual Debian Developer Conference “Debconf10” in New York, the Debian’s release managers have announced the freeze of the upcoming stable release Debian 6.0 Squeeze. Basically this means that no new features will be added and all work will now be concentrated on fixing existing bugs.

The upcoming debian stable release will include:
- Linux 2.6.32 kernel
- Apache 2.2.16, PHP 5.3.2, MySQL 5.1.48, PostgreSQL 8.4.4
- Python 2.6 and 3.1, Perl 5.10, Ruby 1.8.7.299 and 1.9.2~svn28788, GCC 4.4
- DKMS, a framework to generate Linux kernel modules whose sources do not reside in the Linux kernel source tree.
- Dependency-based ordering of init scripts using insserv, allowing parallel execution to shorten the time needed to boot the system.

Hopefully we will see Squeeze going stable in the next 4-6 months, ideally by the end of the year!

Release Announcement: http://www.debian.org/News/2010/20100806

Tags: , , ,

HowTo install reconnoiter on Debian Lenny

Ever since I sow the oscon presentation of reconnoiter I wanted to check it out and play with it. Yesterday, I finally had some time to do this and thought it would be a good idea to document it as a short howto. Most of the infos I used are from the readme (BUILDING), the wiki and the excellent writeup of Thomas Dudziak on how to install reconnoiter on ubuntu.

The daemons noitd and stratcond are written in C, and the database used is postgressql, while the web interface is written in php. We will need to install a few dependencies to be able to compile noitd/stratcond: Read the rest of this entry »

Tags:

Debian Lenny 5.0.5 updated

The Debian project just announced the fifth update for its stable distribution “lenny” 5.0.5. Those installing regular updates from security.debian.org will notice just a few new updates (base-files for the version change to 5.0.5, apache2, apt, bind9, linux-image, openssl, etc). Also the installer has been updated in this point release to correct an issue with the display of the “BIOS boot area” partitioner option when using GPT partitions and to update the list of available mirror servers for package installation.

“The Debian project is pleased to announce the fifth update of its stable distribution Debian GNU/Linux 5.0 (codename “lenny”). This update mainly adds corrections for security problems to the stable release, along with a few adjustment to serious problems.

Please note that this update does not constitute a new version of Debian GNU/Linux 5.0 but only updates some of the packages included. There is no need to throw away 5.0 CDs or DVDs but only to update via an up-to- date Debian mirror after an installation, to cause any out of date packages to be updated.

Those who frequently install updates from security.debian.org won’t have to update many packages and most updates from security.debian.org are included in this update.

New CD and DVD images containing updated packages and the regular installation media accompanied with the package archive respectively will be available soon at the regular locations.”

Release Announcement: http://www.debian.org/News/2010/20100626

Tags: , ,

Debian 6.0 Squeeze expected to be released by the end of the year… if all goes well

The Debian release team recently announced the current status of the next Debian release Squeeze. The team just finished the work on some major parts like completing the changes to run init scripts in parallel, transition to eglibc into testing, GNOME 2.30 and KDE 4.4.3. The next big step is to make Python 2.6 the default python version for sqeeeze and based on Adam Barratt estimation this could be finished sometime in late August, and at that time to freeze the release.

Squeeze freeze was planed for December 2009, meaning it is already way behind schedule, and it looks that it is not so easy for the Debian project to switch to a fixed 2 year release cycle (or freeze cycle). This was pushed back because of the high number of critical bugs for a release freeze. Based on past experiences there will be at least 4 months needed after the freeze to release the next stable version, meaning this could show up by the end of the year if everything works out fine. But realistically, this could take 6-8 months after the freeze, and push the release date in 2011.

Tags: , ,

Marius on Twitter