MOTU log entry #15: Where to begin and a tricky sync.

Once you get your tools ready, you are probably thing, What do I do now? To understand your role in this It would be good for you to read the Packaging Guide and then check out he packaging recipes that will give you a demonstration of how the tools work. This is essencial if you are just starting to contribute with packaging in Ubuntu. Once you have enough confidence with tools you can jump into more rutinary activities for Ubuntu Developers. Like Merges and Syncs.

Merging and Syncing is a practice that is necesary since we derivate from Debian. We often have changes from debian, either for bug fixing, or different versions of python or gcc, Once Debian implements these changes, I would say daily, Ubuntu developers check if the ubuntu specific changes are still needed after a new version of the base package lands in Debian Unstable. If the changes are needed, there needs to be a merge between the Debian package and the Ubuntu Package. To see an example of merges you can check  Nathan Handler’s packaging session on Merges and  to read a bit more, you can check  the Merges entry or a much older doc in Merges and Syncs. If the changes are not needed we are ready to sync the package from Debian to Ubuntu. I will give you an example of one I was doing yesterday.

The process of merging and syncing starts with you and checking the list at Once you are there, you will see a list of packages that have ubuntu changes in the previous upload to the ubuntu archive and debian has updated the package. Once Ubuntu begins pulling from debian, the ubuntu package with changes or “deltas” needs to be checked with the new package from debian. Finding a pacakge for you to work on is quite dawnting since most packages you are not familiar with them, and this is ok. Your goal is to help in Universe. Feel free to pick one that has no comments, or nobody is working on.

package “nstx” with nobody working on it

In the previous screenshot you can clearly see the versions and the oportunity you have. The version last uploaded by Stepfan Potyra is 1.1-beta6-5ubuntu2 and that has changes from the debian base 1.1-beta6-5, but now debian has a new version of the package 1.1-beta6-6. One feature Merge-o-Matic has now is the hability to comment inline, so feel free to write that you are working on it in the rest of the space in the line, right next to the new debian version.

I decided to work on  “ontv”, I wrote “Effie-jayx” on the comment space and here are the details:

  • I first prepared a directory specifically for this task. In my motu folder I created once called dev and then the package name. so It looks like this /home/keffie-jayx/motu/dev/ontv.
  • I got the script for grabbing merges as described in I saved in /home/keffie-jayx/motu/dev
  • I changed its permission so it could be executed:

chmod +x ~/motu/dev/

  • In /home/keffie-jayx/motu/dev/ontv,  I executed the script:

../ ontv

  • Once there I checked the contents in the “REPORT” file to see if there any conflicts in the package.


  • This files gives you a report of the packages described in the image above, and the differences and patches from each. There is a section of this file right at the end that lists the conflicts you might find.

Generated Result

No problems were encountered during the merge, so a source package has been produced along with a patch containing the differences from the Debian version to the new version.

This is a good sign that changes in the Ubuntu package may not be needed?.  well I checked the changelog located in ontv-3.0.0/debian/changelog.

ontv (3.0.0-4) unstable; urgency=low

* debian/rules:
– Don’t install *.la and *.a files.
* debian/
– Build depend on python-dev rather than on python2.5-dev.
– Standards-Version is 3.8.4, no changes needed.
* debian/patches/01_shebang.patch:
– Don’t hardcode python2.5 in the shebang to avoid a dependency on

— Emilio Pozuelo Monfort <>  Sat, 06 Mar 2010 21:36:07 +0100

ontv (3.0.0-3ubuntu2) lucid; urgency=low

* Use the unversioned python interpreter in the ontv script.

— Matthias Klose <>  Thu, 04 Feb 2010 02:19:00 +0100

ontv (3.0.0-3ubuntu1) lucid; urgency=low

* Build-depend on python-dev instead of python2.5-dev.

— Matthias Klose <>  Tue, 02 Feb 2010 02:02:01 +0100

ontv (3.0.0-3build1) lucid; urgency=low

You can see the two changes made by Matthias Klose:

  • Build-depend on python-dev instead of python2.5-dev
  • Use the unversioned python interpreter in the ontv script

And then the changes from the Debian maintainer’s changes.

* debian/rules:
– Don’t install *.la and *.a files.
* debian/
– Build depend on python-dev rather than on python2.5-dev.
– Standards-Version is 3.8.4, no changes needed.
* debian/patches/01_shebang.patch:
– Don’t hardcode python2.5 in the shebang to avoid a dependency on python2.5.

The highlihted entries make refenrece to the same changes Matthias had done before. so The changes in Ubuntu are clearly not needed. This indicates that we can Sync.

In my learning, I got a bit confused. I tried to make a new source package for ubuntu. and the dsc was created. However, when I tried to build the deb package, I got an error with the patch added my the debian maintainer and the changes made by the ubuntu developer, the pacakge FTBFS (Failed to build from source).

Emmet Hickory pointed out a tool that allows me to see the file diferences in each pacakge lsdiff. the -z option is for gzipped diffs.

This is the listing of chaged files in the debian package

$ lsdiff -z ontv_3.0.0-4.diff.gz

This is the listing of chaged files in the Ubuntu package

$ lsdiff -z ontv_3.0.0-3ubuntu2.diff.gz

the higlighted file indicates that the change was made in the source code directly, and that would conflict with the debian patch and resulting in FTBFS. The patch in ontv-3.0.0/debian/patches  01_shebang.patch was trying to patch a code that the ubuntu developer had changed without a patching system. The Ubuntu developer was in no position to include a patching system and made the changes directly in the source code.

Scott Kitterman suggested me to test if this was a Sync, He told me to built the unmodified debian source package:

sudo DIST=maverick pbuilder build ontv_3.0.0-4.dsc –logfile debiansync.buildlog

After this compiled I followed the steps in the on how to use the requestsync script in ubuntu-dev-tools. It was really simple and I am impressed at the beauty of this. At some point you will be asked to add a description

After this is done you will have a bug reported in launchpad,  the requestsync atuoatically subscribes ubuntu-sponsors to the bug for them to review the process. If you are an Ubuntu Developer, ubuntu-archive has to be suscribed. do not change the assignment or the status of the bug.

Back in the MoM (, you have to update the situation on the pacakge you were supposedly merging or syncing.  Change the comment in the line to something like Sync Bug #<numberofyourbug>. in my case it was:

Sync Bug #583624

This is what the line looks like after asigning the bug, It automatically links to Launchpad.

What did I learn:

  • Checking carefully the package changes.
  • reinforce on using mom
  • Using new tools:
    • lsdif -z: for checking differneces in files in a package
    • requestsync: an ubuntu-dev-tools script for automate the generation of the sync report.

Goals achieved:

  • helped Universe making sure Ubuntu could drop changes that are in debian already.


  • ASK, I did not know half of the stuff i know now 24 hours ago. You have to ask. I feel like I passed my ASKING QUOTA :P. Now that I have learned I am available on #ubuntu-motu and the Motu mentors mailing list.
  • When you ask make sure you are ready to understand the answers. once you receive and answer do some reading on the subject before followup questions.
  • Do not expect to fix all issues on your first try, it might take various atempts to do a merge before you can actually complete one. This is probably my 5 attempt :).
  • Do not get discoraged, keep at it, little by little this things become simple.

2 Replies to “MOTU log entry #15: Where to begin and a tricky sync.”

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s