Merging virt-viewer

Now i’m gonna show you how i merged virt-viewer 0.0.3-2 from debian unstable. The first thing to do is to create a work directory and dowload the package:

$ mkdir virt-viewer
$ cd virt-viewer
virt-viewer$ ../grab-merge.sh virt-viewer

After the download is finished, we have to check the REPORT file to see the conflicts. This REPORT showed us that they were conflicts in debian/control. Now that we know where are the conflicts, we have to open debian/control and identify them. So first, we have to enter the directory containing the program files, which is called  virt-viewer-0.0.3-2ubuntu1. Once in there, we open debian/control and we will see this:

<<<<<<< virt-viewer-0.0.2-1ubuntu1 (ubuntu)
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
XSBC-Original-Maintainer: Guido Guenther <agx@sigxcpu.org>
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev, libxml2-dev, libgtk2.0-dev, dpatch, libxen3-dev
Standards-Version: 3.7.2
=======
Maintainer: Guido Guenther <agx@sigxcpu.org>
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev (>= 0.3.4), libxml2-dev,
libgtk2.0-dev (>= 2.10)
Standards-Version: 3.7.3
>>>>>>> virt-viewer-0.0.3-2 (debian)

Now we see where are the conflicts exactly. But, we have to identify the conflicts. So a quick look of this file will tell us that there the conflicts are in Build-Depends and Standards-Version. After identifying these conflicts, we have to look for the differences between the older Ubuntu version and the older Debian version and see exactly which packages have been modified or added by the older Ubuntu Version to Build-Depends.

1. So, to have a better look to these differences showed in debian/control, we have to open the file which contains the differences explained above, which is virt-viewer_0.0.2-1ubuntu1.patch:

virt-viewer-0.0.3-2ubuntu1$ gedit ../virt-viewer_0.0.2-1ubuntu1.patch

Now we have to look to the section were the Build-Depends are, and identify what changes have been made in the older Ubuntu Version. It will show this:

-Maintainer: Guido Guenther <agx@sigxcpu.org>
-Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev, libxml2-dev, libgtk2.0-dev
+Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
+XSBC-Original-Maintainer: Guido Guenther <agx@sigxcpu.org>
+Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev, libxml2-dev, libgtk2.0-dev, dpatch, libxen3-dev

So, we have identified that there were added two packages to Build-Depends by the older Ubuntu Version. We have to take note of all the packages here.

2. Now that we know the changes in the Older Ubuntu Version, we have to check for the differences between the older Debian version and the Newer Debian version. For that we open the file virt-viewer_0.0.3-2.patch:

virt-viewer-0.0.3-2ubuntu1$ gedit ../virt-viewer_0.0.3-2.patch

Now, we have to look for the Build-Depends section here:

-Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev, libxml2-dev, libgtk2.0-dev
-Standards-Version: 3.7.2
+Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev (>= 0.3.4), libxml2-dev, libgtk2.0-dev (>= 2.10)
+Standards-Version: 3.7.3

Here we’ve identified which packages were added or modified in the newer Debian version (that were 2) and I had to look for all of the packages in the Ubuntu repos. I did this because the name of the packages might have been changed in the Ubuntu repos. So i took note of all these packages, having identified that the version of 2 packages have changed in the Newer Debian Version. Also note, that the Standards-Version has changed, because we will use it later.

3. So after I identifying the changes in the Build-depends section, I took all of the packages from the Newer Debian Version, and the packages that were added in the Older Ubuntu Version and combined them in a single Build-Depends that looks like this:

Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
XSBC-Original-Maintainer: Guido Guenther <agx@sigxcpu.org>
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev (>= 0.3.4), libxml2-dev, libgtk2.0-dev (>= 2.10), dpatch, libxen3-dev
Standards-Version: 3.7.3

I also changed the Standards-Version because the newer Debian Version is Using it.

4. But, before making the changes to debian/control, we have to look to the changelog (debian/changelog). Here we have to check if something else is need to be done, or if something has been dropped, or if some changes made by Ubuntu in the older Version have already been included in the Newer Debian Version. After checking all the changelog we can determine that there are no additional changes. Note, that in a hardy changelog they say they’ve changed the Standards Version to 3.7.3, and the newer debian version is using it, so that will keep like that. Ok so, since there are no more changes, we have to create the changelog. We put the older Ubuntu Changes and the newer Ubuntu specific changes. Since there aren’t any, we leave our changelo like this:

virt-viewer (0.0.3-2ubuntu1) intrepid; urgency=low

* Merge from debian unstable, remaining changes:
– DebianMaintainerField.
– Add Ctrl-Alt-F9 to list of keystrokes to send.
– Add libxen3-dev to Build-Depends.

— Andres Rodriguez <andreserl@ubuntu-pe.org>  Wed, 07 May 2008 13:53:55 -0500

5. Ok, so having all the changes made, we have to build the source package and then build the binary. For that we do this:

$ debuild -S
$ cd ..
$ sudo pbuilder build virt-viewer_0.0.3-2ubuntu1.dsc

6. If the binary builds successfully that means that all was done correctly, and that we have to generate the debdiff. For that we do this:

$ debdiff blam_1.8.5-1.dsc blam_1.8.5-1ubuntu1.dsc > blam_1.8.5-1ubuntu1.tmp.debdiff

7. Now, we have to checked the debdiff, to see if there is something to cleanup:

$ lsdiff blam_1.8.5-1ubuntu1.tmp.debdiff

8. Since the last command didn’t show any *.po files or *.ex, there is nothing to clean up. Finally we report the bug in LP and updaload the debdiff. Then, we suscribe it to u-u-s and change the status to confirmed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: