Debian Packaging

Once you’ve picked a Gem and filed the ITP, it is time for you to start packaging. For this first run the command:

gem2deb <Gem name>

gem2deb is actually the Ruby Debian packaging suite. It is a set of tools to create Debian packages from Ruby software distributed with RubyGems. It will automatically run the tests for Ruby1.8 and Ruby1.9 as well. For running these tests gem2deb look for a Rakefile or a .rb file or a .Yaml file inside the debian directory. Running these tests successfully has always been a headache for me. Still not at all good at it.

Okay, So once you have completed running gem2deb successfully, it is time for you to edit the changelog, copyright and control files. Inside the changelog file you will have to include the bug number of the filed ITP and the author’s name. In the copyright file, we have to include the copyright information like licence, author etc. of the actual gem as well as the debian package. Now the control file is the one I had real trouble dealing with. We have to include two neat descriptions about the Ruby library and its purpose. People decide whether to download that package or not reading this description, so make it catchy (I never could). Next check whether these files are clean using the command:

lintian -iIEcv –pedantic –color auto ruby-foo*.changes

Next step is to build the package using build package and pbuilder, that is, run the following commands:

dpkg-buildpackage

sudo pbuiler ruby-foo*.dsc

Once you have made sure that there are no errors and the tests are running perfectly, Yeah, that’s pretty much it. Next step is to upload it to the mentors. For this you need an account in https://alioth.debian.org/projects/pkg-ruby-extras/. Mine isn’t activated yet. So I just push it to my gitorious repo. Before pushing we will have to import the file using git-import-dsc. This one also has been a tough one for me, as my knowledge in git is too vague. For more info on this step or a  any previous ones, checking out the Diaspora packaging page in debian wiki would be your best bet. Okay, So once you’ve pushed your imported file to the repo you will find three branches there, if you did it right- master, pristine-tar and upstream. And now it’s time to wait for someone to review it for you.

I know this post would be of no use, because I’ve simply scribbled everything down in a rush. May be I’ll blog about the issues I faced at each step. But sometime later.

Advertisements

Diaspora packaging for Debian

Here are the steps I followed while  packaging diaspora for debian.

My ultimate guide for debian-diaspora packaging has been this piratepad document :
http://piratepad.net/tu0H1eU2vH

Diaspora is built on Ruby on Rails platform. In Ruby programming language, the software packages are called ‘RubyGems’ or simply ‘Gems’. Gems contain a packaged Ruby application or library. So basically our task is to convert this RubyGem into debian file format.
There are numerous number of gems upon which diaspora is depending. To complete the debian packaging of whole diaspora software we will have to package each and every one of these gems. So our first step towards packaging is select a gem which is a dependency for diaspora and that hasn’t been packaged yet. You can easily pick one from the above mentioned pirate pad document.
 Make sure you pick a gem that does not have any other gems as dependencies that aren’t packaged yet. If  the gem you picked has such dependencies, then package the latter gem first and then proceed with the former. 
Once you’ve selected your gem, it is time to file an ITP i.e. Intent To Package. A sample ITP is here:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691256. You’ll get all the information regarding your gem from rubygems.org or from the corresponding upstream file at github. We have to mail our ITP to the debian bug tracking system specifying the package name and a short description as the subject line. Never use rich text.
Once you’ve send in your ITP and you got the confirmation, you are good to go with your packaging. It is quite natural that you will end up sending a buggy ITP receiving an error message. But BTS is really easy to work with and I got all such information regarding BTS from http://www.debian.org/Bugs/server-control.
So here ends the preps regarding the gem, you need to do before getting started with packaging.
Will get to the fun stuff in my next post.
For more links on packaging go here!
Cheers.

Debian Packaging fun

NO CODING INVOLVED,WHATSOEVER… 🙂

I’ve been working on debian packaging of diaspora for a while now. At some places, I’m still not completely sure what I’m doing. Anyways, the journey so far, has been fun (and not to mention,Educational!).

Now I’d like to explain what I’ve been doing actually.In my last post, I described  diaspora. It is a free personalized social networking site. It is built in Ruby on Rails platform. What we are basically trying to do is, make a package of this software in debian so that if we run in terminal the command :
sudo apt-get install diaspora
voila!. Diaspora is  in your PC. 😀

This free software diaspora,obviously,depends on numerous of libraries or gems (so they are called in Ruby programming language). Our job is to  convert each and every single one of these gems into deb file format.And for doing so there is a debian ruby package suite called gem2deb. So to convert the gem into deb format we will have to run:
gem2deb <Gem name>
Sounds easy,huh?But not so easy actually. Now comes the fun part-‘tests’. :-).
In programming languages like C, we use many built-in libraries like stdio, conio, stdlib etc. To check if these libraries are working properly, We can simply make a program which  includes this library and implement functions that comes under the specified library.
For eg:
If you want to check if the stdio i.e standard I/O library is working properly a program like this can be used :
#include
int main(void)
{
char name;
printf(“Enter your name:”);
scanf(“%c”,&name);
printf(“Hello,%c\n”,name);
return 0;
}
If the above program gives the output:

Enter your name:Nandaja
Hello,Nandaja

Then we can say that yes our standard I/O library is working properly.AFAIK,similar is the concept of test files in Ruby. They check if the ruby gems are working properly for our package.If the tests run without failure in the first run itself,yay..kudos to you:). If the  test  fails,you will have to go looking for the dependencies,the test files used and whatever makes it work.

Once you’ve got the tests running successfully(No,don’t be happy yet…), you can say ‘Hey,I’ve started packaging!’:D. Yes,the interesting steps are yet to come. 🙂

I will  start writing the steps I followed,the problems I faced and my yet-to-be-cleared doubts  in my upcoming posts. It will definitely help me recollect what all I’ve done so far and also I can use them later to brush up my memory. Also, I can refer these posts if someone asks me about packaging. On second thought, No, I don’t think so.. 😀
If anyone want to know about packaging diaspora,I would refer to you the wonderful wiki page. It’s still under construction, But it has already started proving quite legible and clean. 🙂
https://wiki.debian.org/Diaspora/packaging/

Cioa.

Diaspora-I’m lovin’ it!

Howdy,
Social networking is an experience that most of us do love. The most recent addition to this colossal world of social networking is diaspora.

Diaspora is a free personalized web server that can be installed and implemented as a distributed social network. In simple words, we own our own social networking site (More or less) . Unlike the other social networking sites, where the members are treated as mere products,in diaspora we are our own masters. Many pods/servers are maintained by numerous private groups/ individuals all around the world. We can create our account in any one of them or we can opt to run our own pod. And as it is distributed, We can connect to people with account in any other pods. Pretty cool, huh?
So if you are fed up of  money sucking site maintainers manipulating our data, love open source or are looking for a new social networking experience then Knock yourselves out! My account is in joindiaspora.com. I opted this one because this is the pod maintained by the original debian developers themselves and I found the start page and all pretty cute.

As it is an open source project which has started only very recently, it definitely miss many features that are provided by many other social networking sites. But on the bright side, look at the privacy that diaspora provides us. We can choose which all data are to be gone public, which all data are to be shown in our profile and which all data we want to see rather than someone else choosing all of the above for us. It’s widget is quite similar to that of some popular social networking sites. So there won’t be any trouble getting started because the environment is quite familiar. Also the like, comment and share utilities are  available. It definitely miss the tagging images functionality. You can consider it as a hit or miss, but I think it’s a hit because if we want our picture to be seen then we can simply re-share it. No need of other people tagging in our name. See I get to decide that too. In diaspora, instead  of add friend or add to circle we have ‘Add contact’ option and we can choose there itself  which contact  list it goes to. Instead of  ‘Home’, here it is stream. Also the share box is much cooler and easier to work with.

Okay! May be I’m bragging, because I am a FOSS enthusiast. But still, you wouldn’t know unless you try it. So I recommend you all to try diaspora.
You can find my  profile  in joindiaspora.com :
https://joindiaspora.com/people/b172ada9583dd0c5
For more info about Diaspora:
http://en.wikipedia.org/wiki/Diaspora_%28software%29

So hail Diaspora.
Hail FOSS.

Cheers Ya all.. 🙂