<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RoAkSoAx's Weblog &#187; merge</title>
	<atom:link href="http://www.roaksoax.com/tag/merge/feed" rel="self" type="application/rss+xml" />
	<link>http://www.roaksoax.com</link>
	<description>My Personal Blog</description>
	<lastBuildDate>Thu, 05 May 2011 15:20:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>My First Patch &#8211; Patching alsa-tools with Quilt</title>
		<link>http://www.roaksoax.com/2008/05/my-first-patch-patching-alsa-tools-with-quilt</link>
		<comments>http://www.roaksoax.com/2008/05/my-first-patch-patching-alsa-tools-with-quilt#comments</comments>
		<pubDate>Mon, 12 May 2008 04:08:01 +0000</pubDate>
		<dc:creator>roaksoax</dc:creator>
				<category><![CDATA[Merging]]></category>
		<category><![CDATA[Patching]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[motu]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[ubuntu motu]]></category>

		<guid isPermaLink="false">http://roaksoax.wordpress.com/?p=14</guid>
		<description><![CDATA[Today, i&#8217;m gonna show you how i did my first patch to alsa-tools using Quilt. I have to thank crimsum who helped me a lot with this package. Actually, this is not just only a Patch&#8230; it is a merge where i had to include a Patch. So i&#8217;m gonna show you how i did [...]]]></description>
			<content:encoded><![CDATA[<p>Today, i&#8217;m gonna show you how i did my first patch to alsa-tools using Quilt. I have to thank crimsum who helped me a lot with this package. Actually, this is not just only a Patch&#8230; it is a merge where i had to include a Patch.</p>
<p>So i&#8217;m gonna show you how i did the merge first and then how I patched it. First of all I download the package as usual and checked the REPORT to see where were the conflicts.</p>
<blockquote><p>mkdir alsa-tools<br />
cd alsa-tools<br />
../grab-merge.sh alsa-tools</p></blockquote>
<p><span id="more-14"></span></p>
<p>The conflicts with this package were here in these two files:</p>
<blockquote><p>C  debian/control<br />
C  debian/patches/series</p></blockquote>
<p>1. The first thing I did was to check the debian/patches/series file to see where were the conflicts and it showed me this:</p>
<blockquote><p>&lt;&lt;&lt;&lt;&lt;&lt;&lt; alsa-tools-1.0.15-2ubuntu4 (ubuntu)<br />
hammerfall.patch<br />
firmware_locations.patch<br />
=======<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; alsa-tools-1.0.16-1 (debian)</p></blockquote>
<p>This ment that there were conflicts with two patches that were in Ubuntu but not in Debian so I decided to take a look to the debian/changelog file to see why those patches were there. The first change i&#8217;ve noticed was that the hammerfall.patch was already added to the upstream version in Debian (at that moment i knew that i had to remove hammerfall.patch from the debian/patches/series file). The second thing i noticed is that Debian didn&#8217;t mention anything about the firmware_locations.patch, but Ubuntu did. The changelog told me that this patch was added only in Ubuntu, so i decided to keep that patch. Next thing i did, is to delete what was not necessary in debian/patches/series and i left it like this:</p>
<blockquote><p>usx2yloader_udev.patch<br />
as10k1_examples_Makefile.patch<br />
firmware_locations.patch</p></blockquote>
<p>Next, i verified if the hammerfall.patch was in debian/patches as well as the firmware_locations.patch. Hammerfall.patch was already removed so there was nothing more to do with that conflict.</p>
<p>2. So having resolved the first conflict, I proceeded to resolve the conflict in debian/control, so I openned the file and found this:</p>
<blockquote><p>&lt;&lt;&lt;&lt;&lt;&lt;&lt; alsa-tools-1.0.15-2ubuntu4 (ubuntu)<br />
Build-Depends: debhelper (&gt;= 5.0.37), quilt (&gt;= 0.40), autotools-dev, libasound2-dev (&gt;= 1.0.13), libfltk1.1-dev, libgtk2.0-dev, libqt3-mt-dev (&gt;= 3:3.3.4-4)<br />
Standards-Version: 3.7.3<br />
=======<br />
Build-Depends: debhelper (&gt;= 6), quilt (&gt;= 0.40), autotools-dev, libasound2-dev (&gt;= 1.0.13), libfltk1.1-dev, libgtk2.0-dev, libqt3-mt-dev (&gt;= 3:3.3.4-4)<br />
Standards-Version: 3.7.3<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; alsa-tools-1.0.16-1 (debian)</p></blockquote>
<p>So i realized quickly that it was a conflict with the dependencies (Build-Depends) and checked the alsa-tools_1.0.15-2ubuntu4.patch (Older Ubuntu and Debian version diff) and alsa-tools_1.0.16-1.patch (Newer Debian and Older Debian diff) files too see what I had to do (This is similar to the process did when merging virt-viewer). So after resolving the conflicts i left my debian/control file Build-depends like this (Which were the same Build-Depends as the Newer Debian Version):</p>
<blockquote><p>Maintainer: Ubuntu MOTU Developers &lt;ubuntu-motu@lists.ubuntu.com&gt;<br />
XSBC-Original-Maintainer: Debian ALSA Maintainers &lt;pkg-alsa-devel@lists.alioth.debian.org&gt;<br />
Uploaders: Jordi Mallach &lt;jordi@debian.org&gt;, Mikael Magnusson &lt;mikma@users.sourceforge.net&gt;, Elimar Riesebieter &lt;riesebie@lxtec.de&gt;<br />
Build-Depends: debhelper (&gt;= 6), quilt (&gt;= 0.40), autotools-dev, libasound2-dev (&gt;= 1.0.13), libfltk1.1-dev, libgtk2.0-dev, libqt3-mt-dev (&gt;= 3:3.3.4-4)<br />
Standards-Version: 3.7.3</p></blockquote>
<p>3. So, i thought i was done with this merge&#8230; but james_w (who was helping me with it) told me to talk to crimsum first. I did, and he told me to apply this patch: http://hg.alsa-project.org/alsa-tools/raw-rev/9d1e48f8dd5 . I didn&#8217;t know what to do until he finally told me to do it with quilt. So i started by myself and he ended up helping me. What I did is this:</p>
<p>First i had to export that bash variable specifying the directory where the patches were, and then pushing all the other patches (if any). This patching system works as an stack so that&#8217;s why it pushes the other patches.</p>
<blockquote><p>export QUILT_PATCHES=debian/patches<br />
quilt push -a</p></blockquote>
<p>Then i had to create the new patch specifying the name of the patch, like this:</p>
<blockquote><p>quilt new fix_channel_map_adat_speed_1.patch</p></blockquote>
<p>After doing that, i had to specify the file where i had to apply the patch, so i did this:</p>
<blockquote><p>quilt add hdspmixer/src/HDSPMixerCard.cxx</p></blockquote>
<p>After specifying the filename where the patch was to be applied, i had to make the changes&#8230; this really means applying the patch, so i did this:</p>
<blockquote><p>cd ..; wget http://hg.alsa-project.org/alsa-tools/raw-rev/9d1e48f8dd5d; cd -<br />
patch -p1 &#8211;dry-run &lt;../9d1e48f8dd5d;echo $?<br />
patch -p1 &lt;../9d1e48f8dd5d</p></blockquote>
<p>So to finish, i had to refresh the quilt stack and pop all the other patches, and the patch was added successfully, like this:</p>
<blockquote><p>quilt refresh<br />
quilt pop -a</p></blockquote>
<p>4. So now, after finishing all the changes i built the source and then built the binary to see if it compiles.. and after check that everything is done right, i created the debdiff (between the newer debian and ubuntu version) and reported the LP Bug (This is done as usual). A quick review:</p>
<blockquote><p>debuild -S<br />
sudo pbuilder build ../alsa-tools_1.0.16-1ubuntu1.dsc<br />
debdiff alsa-tools_1.0.16-1.dsc alsa-tools_1.0.16-1ubuntu1.dsc &gt; alsa-tools_1.0.16-1ubuntu1.debdiff</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.roaksoax.com/2008/05/my-first-patch-patching-alsa-tools-with-quilt/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merging virt-viewer</title>
		<link>http://www.roaksoax.com/2008/05/merging-virt-viewer</link>
		<comments>http://www.roaksoax.com/2008/05/merging-virt-viewer#comments</comments>
		<pubDate>Wed, 07 May 2008 19:00:17 +0000</pubDate>
		<dc:creator>roaksoax</dc:creator>
				<category><![CDATA[Merging]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[motu]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[ubuntu motu]]></category>

		<guid isPermaLink="false">http://roaksoax.wordpress.com/?p=13</guid>
		<description><![CDATA[Now i&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[<p>Now i&#8217;m gonna show you how i merged virt-viewer <span style="color:red;"><strong>0.0.3</strong></span>-2 from debian unstable. The first thing to do is to create a work directory and dowload the package:</p>
<blockquote><p>$ mkdir virt-viewer<br />
$ cd virt-viewer<br />
virt-viewer$ ../grab-merge.sh virt-viewer</p></blockquote>
<p><span id="more-13"></span></p>
<p>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 <em><strong>debian/control</strong></em>. Now that we know where are the conflicts, we have to open <em><strong>debian/control</strong></em> and identify them. So first, we have to enter the directory containing the program files, which is called  <strong><em>virt-viewer-0.0.3-2ubuntu1</em></strong>. Once in there, we open <em><strong>debian/control</strong></em> and we will see this:</p>
<blockquote><p>&lt;&lt;&lt;&lt;&lt;&lt;&lt; virt-viewer-0.0.2-1ubuntu1 (ubuntu)<br />
Maintainer: Ubuntu MOTU Developers &lt;ubuntu-motu@lists.ubuntu.com&gt;<br />
XSBC-Original-Maintainer: Guido Guenther &lt;agx@sigxcpu.org&gt;<br />
Build-Depends: cdbs, debhelper (&gt;= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev, libxml2-dev, libgtk2.0-dev, dpatch, libxen3-dev<br />
Standards-Version: 3.7.2<br />
=======<br />
Maintainer: Guido Guenther &lt;agx@sigxcpu.org&gt;<br />
Build-Depends: cdbs, debhelper (&gt;= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev (&gt;= 0.3.4), libxml2-dev,<br />
libgtk2.0-dev (&gt;= 2.10)<br />
Standards-Version: 3.7.3<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; virt-viewer-0.0.3-2 (debian)</p></blockquote>
<p>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.</p>
<p>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:</p>
<blockquote><p>virt-viewer-0.0.3-2ubuntu1$ gedit ../virt-viewer_0.0.2-1ubuntu1.patch</p></blockquote>
<p>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:</p>
<blockquote><p>-Maintainer: Guido Guenther &lt;agx@sigxcpu.org&gt;<br />
-Build-Depends: cdbs, debhelper (&gt;= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev, libxml2-dev, libgtk2.0-dev<br />
+Maintainer: Ubuntu MOTU Developers &lt;ubuntu-motu@lists.ubuntu.com&gt;<br />
+XSBC-Original-Maintainer: Guido Guenther &lt;agx@sigxcpu.org&gt;<br />
+Build-Depends: cdbs, debhelper (&gt;= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev, libxml2-dev, libgtk2.0-dev, dpatch, libxen3-dev</p></blockquote>
<p>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.</p>
<p>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:</p>
<blockquote><p>virt-viewer-0.0.3-2ubuntu1$ gedit ../virt-viewer_0.0.3-2.patch</p></blockquote>
<p>Now, we have to look for the Build-Depends section here:</p>
<blockquote><p>-Build-Depends: cdbs, debhelper (&gt;= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev, libxml2-dev, libgtk2.0-dev<br />
-Standards-Version: 3.7.2<br />
+Build-Depends: cdbs, debhelper (&gt;= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev (&gt;= 0.3.4), libxml2-dev, libgtk2.0-dev (&gt;= 2.10)<br />
+Standards-Version: 3.7.3</p></blockquote>
<p>Here we&#8217;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.</p>
<p>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:</p>
<blockquote><p>Maintainer: Ubuntu MOTU Developers &lt;ubuntu-motu@lists.ubuntu.com&gt;<br />
XSBC-Original-Maintainer: Guido Guenther &lt;agx@sigxcpu.org&gt;<br />
Build-Depends: cdbs, debhelper (&gt;= 5), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev (&gt;= 0.3.4), libxml2-dev, libgtk2.0-dev (&gt;= 2.10), dpatch, libxen3-dev<br />
Standards-Version: 3.7.3</p></blockquote>
<p>I also changed the Standards-Version because the newer Debian Version is Using it.</p>
<p>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&#8217;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&#8217;t any, we leave our changelo like this:</p>
<blockquote><p>virt-viewer (0.0.3-2ubuntu1) intrepid; urgency=low</p>
<p>* Merge from debian unstable, remaining changes:<br />
- DebianMaintainerField.<br />
- Add Ctrl-Alt-F9 to list of keystrokes to send.<br />
- Add libxen3-dev to Build-Depends.</p>
<p>&#8211; Andres Rodriguez &lt;andreserl@ubuntu-pe.org&gt;  Wed, 07 May 2008 13:53:55 -0500</p></blockquote>
<p>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:</p>
<blockquote><p>$ debuild -S<br />
$ cd ..<br />
$ sudo pbuilder build virt-viewer_0.0.3-2ubuntu1.dsc</p></blockquote>
<p>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:</p>
<blockquote><p>$ debdiff blam_1.8.5-1.dsc blam_1.8.5-1ubuntu1.dsc &gt; blam_1.8.5-1ubuntu1.tmp.debdiff</p></blockquote>
<p>7. Now, we have to checked the debdiff, to see if there is something to cleanup:</p>
<blockquote><p>$ lsdiff blam_1.8.5-1ubuntu1.tmp.debdiff</p></blockquote>
<p>8. Since the last command didn&#8217;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.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roaksoax.com/2008/05/merging-virt-viewer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

