<?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>The Troll-Range &#187; packaging</title>
	<atom:link href="http://blog.trollgod.org.uk/tag/packaging/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.trollgod.org.uk</link>
	<description>Ghworg&#039;s wibblings and geek projects.</description>
	<lastBuildDate>Sat, 12 Nov 2011 10:10:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Backporting new code to Debian packages</title>
		<link>http://blog.trollgod.org.uk/2009/11/backporting-new-code-to-debian-packages/</link>
		<comments>http://blog.trollgod.org.uk/2009/11/backporting-new-code-to-debian-packages/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 17:30:23 +0000</pubDate>
		<dc:creator>Ghworg</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[packaging]]></category>

		<guid isPermaLink="false">http://blog.trollgod.org.uk/?p=374</guid>
		<description><![CDATA[<p>I like Linux distros packaging systems, especially Debian&#8217;s. It makes it trivial to install, remove and change to different versions of programs. The only problem is that sometimes there is a delay in packaging the latest version of an app.</p> <p>Never fear though, if you are willing to do a little bit of work <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.trollgod.org.uk/2009/11/backporting-new-code-to-debian-packages/">Backporting new code to Debian packages</a></span>]]></description>
			<content:encoded><![CDATA[<p>I like Linux distros packaging systems, especially Debian&#8217;s.  It makes it trivial to install, remove and change to different versions of programs.  The only problem is that sometimes there is a delay in packaging the latest version of an app.</p>
<p>Never fear though, if you are willing to do a little bit of work you can shoehorn the latest code into a package yourself without needing any special knowledge of how to create packages.  Note this will only work with programs that already have been packaged since it re-uses the old packaging info with the new code.</p>
<p>I refer to Debian, but the exact same procedure will work on any deb based distro, such as Ubuntu.</p>
<p>Before starting make sure you have the devscripts and build-essential packages installed.  These will install all the tools needed to build debian packages.</p>
<p>First download the source package of the old version.</p>
<pre>apt-get source $NAME</pre>
<p>Then, as a sanity check cd into the created directory and run</p>
<pre>debuild -i -us -uc</pre>
<p>This will probably complain about missing packages needed for building, so go ahead and install them with apt-get or aptitude or whatever.  Then re-run the build command.  Assuming that works you should end up with some .deb files in the parent dir.</p>
<p>Now grab the code for the latest version from its website.  If it is not already in a tarball you&#8217;ll want to make one from it with</p>
<pre>tar czf application_version-1.orig.tar.gz applicationdir</pre>
<p>If it is a tarball already then just rename it to match the formatting application_version-1.orig.tar.gz.  For example when backporting mesa I name the tarball mesa_7.7.0-1.orig.tar.gz.</p>
<p>Next copy the debian dir from the old application directory to the new one.</p>
<pre>cp -a application-debianversion/debian application-newversion/</pre>
<p>Then cd into the new directory and run</p>
<pre>debchange -v version-1 "Updated code to latest version"</pre>
<p>It is vital that the version number used in this command matches the naming of the .orig.tar.gz file you created earlier.  For example for mesa I use 7.7.0-1.  This is the magic that will make everything work.</p>
<p>The final step is to build the new package.</p>
<pre>debuild -i -us -uc</pre>
<p>and tada!  With a bit of luck your shiny new version should be packaged up and ready to be installed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.trollgod.org.uk/2009/11/backporting-new-code-to-debian-packages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

