<?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>Random and Irrelevant &#187; Debian</title>
	<atom:link href="http://sgp.me.uk/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://sgp.me.uk</link>
	<description>Sam Pearson&#039;s weblog - irrelevant content randomly updated</description>
	<lastBuildDate>Fri, 18 Nov 2011 18:06:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Hacking .deb files</title>
		<link>http://sgp.me.uk/2009/08/11/hacking-deb-files/</link>
		<comments>http://sgp.me.uk/2009/08/11/hacking-deb-files/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 19:22:38 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/?p=709</guid>
		<description><![CDATA[This is a follow-up to my previous post about <a href="http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/">downloading the Ubuntu Flash plugin package from behind a proxy</a>.  Rather than having to go through a failed installation, editing the <code>postinst</code> script then re-installing, here is an alternative method where the package is downloaded, unpacked, the script edited then the package rebuilt and installed in the normal way using <code>apt-get</code>. <a href="http://sgp.me.uk/2009/08/11/hacking-deb-files/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is a follow-up to my previous post about <a href="http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/">downloading the Ubuntu Flash plugin package from behind a proxy</a>.  Rather than having to go through a failed installation, editing the <code>postinst</code> script then re-installing, here is an alternative method where the package is downloaded, unpacked, the script edited then the package rebuilt and installed in the normal way using <code>apt-get</code>.</p>
<p>The procedure below uses <code>flashplugin-nonfree</code> as an example package, but this process could be used to edit any <code>.deb</code> with a little care &#8211; just change the package name.</p>
<p>Having said that, it&#8217;s a quick-and-dirty fix-up and as such only really suitable if you only need to make simple changes to the control scripts such as <code>postinst</code>, <code>prerm</code>, etc, in an existing package.  Major changes to a package&#8217;s structure or contents will need more care and you should take a look at the <a href="http://www.debian.org/doc/maint-guide/">Debian Maintainers Guide</a> or any of the other HOWTOs and FAQs available on the web for detailed information on how to do this.</p>
<p>Needless to say you&#8217;ll need to do much of this as <code>root</code>.  Have a care.</p>
<ol>
<li>Download the updated debian package using <code>apt-get -d install flashplugin-nonfree</code>.  This will place the latest version of the package in <code>/var/cache/apt/archives</code> without actually installing it.  Note that if you have multiple updates to do, you can use <code>apt-get -d upgrade</code> instead; this will also download any other packages that are currently due an upgrade at the same time &#8211; this is fine, they will be installed normally at the end of the process along with the modified package.</li>
<li>Change your working directory to <code>/var/cache/apt/archives</code> then make a backup: <code>cp flashplugin-nonfree_$version_i386.deb /root/</code></li>
<li>Create a tempory directory structure where you can unpack the archive: <code>mkdir -p /tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN</code></li>
<li>Extract the contents of the <code>.deb</code>: <code>ar -x flashplugin-nonfree_$version_i386.deb</code>.  This will result in three files, <code>debian-binary</code>, <code>data.tar.gz</code> and <code>control.tar.gz</code>.  You can delete the <code>debian-binary</code> file.</li>
<li>Move <code>data.tar.gz</code> into <code>/tmp/flashplugin-nonfree_$version_i386/debian/</code> and the <code>control.tar.gz</code> file into <code>/tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN</code>.  Unpack the archives in these locations and delete the tarballs.</li>
<li>You can now edit the <code>postinst</code> script in <code>/tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN</code> to include the proxy settings as outlined in <a href="http://sgp.me.uk/2008/12/29/installing-the-flash-plug-in-on-ubuntu-from-behind-a-proxy/">Installing the Flash plug-in on Ubuntu from behind a proxy</a>.</li>
<li>Now you are ready to rebuild the package.  Change directory to <code>/tmp/flashplugin-nonfree_$version_i386/</code> and run <code>dpkg-deb --build debian</code>.  This should create a file in the <code>debian/</code> subdirectory called <code>debian.deb</code>.  You may see some warnings about the <code>control</code> file containing user-defined fields &#8211; these can be safely ignored.</li>
<li>Now move the <code>debian.deb</code> file into <code>/var/cache/atp/archives</code> using the same filename as the original package: <code>mv debian.deb /var/cache/atp/archives/flashplugin-nonfree_$version_i386.deb</code>.</li>
<li>You should now be able to run <code>apt-get install flashplugin-nonfree</code> or <code>apt-get upgrade</code>and the package will be installed using the new <code>.deb</code> file complete with proxy information in the <code>postinst</code> script to enable downloading the binary.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2009/08/11/hacking-deb-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>non-us.debian.org</title>
		<link>http://sgp.me.uk/2005/06/08/non-us-debian/</link>
		<comments>http://sgp.me.uk/2005/06/08/non-us-debian/#comments</comments>
		<pubDate>Wed, 08 Jun 2005 17:35:33 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mepis]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/2005/06/08/non-us-debian</guid>
		<description><![CDATA[At <a href="http://www.stwerburghs.org.uk/" title="The St Werburghs Centre">work</a> we've got a load of <a href="http://mepis.com/" title="Mepis - an OS for the 21st Century">Mepis</a> installs, and attempting to <code>apt-get update</code> for the last couple of days has failed from the <code>non-us.debian.org</code> respositories with the error "Unable to fetch file, server said 'unable to open file.  '". <a href="http://sgp.me.uk/2005/06/08/non-us-debian/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.stwerburghs.org.uk/" title="The St Werburghs Centre">work</a> we&#8217;ve got a load of <a href="http://mepis.com/" title="Mepis - an OS for the 21st Century">Mepis</a> installs, and attempting to <code>apt-get update</code> for the last couple of days has failed from the <code>non-us.debian.org</code> respositories with the error &#8220;Unable to fetch file, server said &#8216;unable to open file.  &#8216;&#8221;.</p>
<p>Now I&#8217;m quite new to <a href="http://www.debian.org/" title="Debian GNU/Linux">Debian</a>-based distros (I learned on and still use Slackware for the most part) but this is obviously some kind of server issue (I&#8217;ve updated before without problems).  Thankfully there&#8217;s <a href="http://www.debian.org/mirror/list-non-US" title="Debian non-US mirror sites">a list of mirrors</a> available at the Debian website and <code>ftp.uk.debian.org/debian-non-us</code> works fine.  Maybe I&#8217;ll do a bit of digging when I&#8217;ve got the time.</p>
<h3>Update</h3>
<p>Solved: sounds this is due to <a href="http://www.debian.org/releases/sarge/i386/release-notes/ch-whats-new.en.html#s-non-us" title="Debian 3.1 Release Notes">non-us being obsoleted</a> with the <a href="http://www.debian.org/News/2005/20050606" title="Announcement at the Debian website">release two days ago of Debian 3.1</a>.  I assume the mirrors have yet to catch up.</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2005/06/08/non-us-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

