Archive for the ‘Packaging’ Category

Java 6 update 17 on Fedora 12

Friday, January 8th, 2010

A nice reader asked about the spec file for update 17 of the Sun Java virtual machine. I already had updated the spec file, which you can find here and then follow my previous post.
Right now, I am using Chromium (open source version of Google Chrome) and I will fix the Java plugin for that.
I Promise!

Building RPMs, part two – Pinax

Sunday, August 23rd, 2009

Ok, so now we have the environment complete. First thing I want to package is Pinax. This is a nice little collection of Django applications which add some required stuff for most of web based applications.

On the link above you will find all the info for the project, so let’s start. We will build the release version of Pinax (for development versions I have a side project, which I will show you at right time). Please note – all the release used are current for the day this entry has been written.

Download pinax version 0.5.1 from here and put it in rpmbuild/SOURCES. After that:

cd ~/rpmbuild/SPECS

rpmdev-newspec -t python pinax

Rpmdev-newspec creates the skeleton for a new spec file named pinax. The -t python option tells to create a skeleton with some python definitions in it (python definitions are laid out according to this wiki entry on the Fedora Project Wiki); you can see which skeletons are available looking in ‘\etc\rpmdevtools’.

Why Python? Well, my guess is that being DJango a Python framework, you know….

Let’s look at the spec file and put some info into that. You can use any editor for the file (I use geany, fast and lightweight).

# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c “from distutils.sysconfig import get_python_lib; print get_python_lib()”)}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c “from distutils.sysconfig import get_python_lib; print get_python_lib(1)”)}

Name: pinax
Version:
Release: 1%{?dist}
Summary:

Group: Development/Languages
License:
URL:
Source0:
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:
BuildRequires: python-devel

I am assuming that Pinax is a pure python package, so we use the sitelib for noarch packages (first line of the two provided). After that we have to insert some descriptive info of the Pinax project.

But, of course, before going ahead we must check some of the Pinax dependencies.

Continuing tomorrow…

Java 1.6u15 installation in Fedora 11

Friday, August 7th, 2009

Sometimes life is strange. Just 4 days ago I was releasing the spec file for Java 1.6u14, and now Sun releases the new patched vm. Anyway, go grab the new jdk bin package (check for update 15) and download the spec file from here . Follow the instructions from previous post and all should be ok.

Just in case, the older spec file can be found here .

A sidenote – the behaviour here is that fixes of major version will update the base package. So 1.6u15 will just upgrade 1.6u14. If you wish something different, let me know. But this is JPackage standard.

Update – please remove previous version of packages. I am studying the update path + alternatives issues which emerged.

Building RPMs, part one

Saturday, June 27th, 2009

The following is an excerpt from the IRC Packaging Lesson ; in red instructions for root (please use sudo – never use a system as root):

  • yum groupinstall development-tools
  • yum install rpm-build rpmdevtools
  • rpmdev-setuptree

The last command will setup the following directories:

rpmbuild directory tree

rpmbuild directory tree

BUILD

This directory will contain the build of the source code you want to package. Roughly equivalent to the directory where you tar xjf source.tarball.bz2 ; cd source.tarball ; .configure ; make

BUILDROOT

The directory where the package will be built.

RPMS

The rpm produced will end in this directory. This is the binary rpm, the one you want to install in the system to use that cute application of yours.

SOURCES

Tarballs will end up here. These are the .gz or bz2 downloaded to build the application; usually contains source files, in the common autotools format.

SPECS

Spec files are the files which define how to package software, which dependencies to look for, and some more stuff. It’s the only file you need (apart from source code) to really build a package.

SRPMS

SRPMS files are RPMS which contain source and SPEC file to rebuild packages with rpm.

OK, right now I will close the entry. A new one in a few days.

Getting lost

Thursday, June 25th, 2009

At Byte-code meetup I just launched the idea for a new projet to support the Prince2 project management methodology.

Right now, I just registered at sourceforge and nothing else. But the plan is clear (and will be managed in a Prince2 manner, by the way):

  • Django / Python powered
  • GPL v2
  • Integration with external tools ( trac comes to mind, but also taskjuggler )

Django is a little hazard – never programmed seriously in Python, and the Django world is a new one for me. Anyway, I am just willing to move away from the Java world for a while.

Now comes the best – I will try to do it using Fedora way . This means that every additional package (Python or Django) will be rpm’ed.

Django by itself it’s a no-brainer – just yum install Django (observe the capital ‘D’ here), but I was looking at Pinax and some more Django extensions, mostly hosted at google code.

Benefits of this plan:

  • Enhance package building knowledge
  • Easy installation
  • Really join fedora community

So I will create a new category, starting today, where I will summarize my steps. Stay tuned.