<?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>apt-get install debian-wizard&#187; Ubuntu</title>
	<atom:link href="http://raphaelhertzog.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://raphaelhertzog.com</link>
	<description>Insider infos, master your Debian/Ubuntu distribution</description>
	<lastBuildDate>Fri, 18 May 2012 18:25:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>People Behind Debian: Mark Shuttleworth, Ubuntu&#8217;s founder</title>
		<link>http://raphaelhertzog.com/2011/11/17/people-behind-debian-mark-shuttleworth-ubuntus-founder/</link>
		<comments>http://raphaelhertzog.com/2011/11/17/people-behind-debian-mark-shuttleworth-ubuntus-founder/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 13:00:00 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Debian News]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Ubuntu News]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Mark Shuttleworth]]></category>
		<category><![CDATA[sabdfl]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=2253</guid>
		<description><![CDATA[In this interview, Mark Shuttleworth shares the reasons why he created Ubuntu and comes back on the history of the relationships between Ubuntu and Debian.]]></description>
			<content:encoded><![CDATA[<p><img src="http://raphaelhertzog.com/files/2011/11/markshuttleworth.jpg" alt="" title="Mark Shuttleworth" width="600" height="350" class="aligncenter size-full wp-image-2370" />I probably don&#8217;t have to present Mark Shuttleworth… he was already a Debian developer when he became millionaire after having sold Thawte to Verisign in 1999. Then in 2002 he became the first African (and first Debian developer) in space. 2 years later, he found another grandiose project to pursue: bring the Microsoft monopoly to an end with a new alternative operating system named Ubuntu (see <a href="http://bugs.launchpad.net/bugs/1">bug #1</a>).</p>
<p>I have met Mark during Debconf 6 in Oaxtepec (Mexico), we were both trying to find ways to enhance the collaboration between Debian and Ubuntu. The least I can say is that Mark is opinionated but any leader usually is, and in particular the self-appointed ones! <img src='http://raphaelhertzog.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Read on to discover his view on the Ubuntu-Debian relationship and much more.</p>
<p><strong>Raphael: Who are you?</strong></p>
<p>Mark: At heart I&#8217;m an explorer, inventor and strategist. Change in technology, society and business is what fascinates me, and I devote almost all of my time and wealth to the catalysis of change in a direction that I hope improves society and the environment.</p>
<p>I&#8217;m 38, studied information systems and finance at the University of Cape Town. My &#8216;hearts home&#8217; is Cape Town, and I&#8217;ve lived there and in Star City and in London, now I live in the Isle of Man with my girlfriend Claire and 14 precocious ducks. I joined Debian in around 1995 because I was helping to setup web servers for as many groups as possible, and I thought Debian&#8217;s approach to packaging was very sensible but there was no package for Apache. In those days, the NM process was a little easier <img src='http://raphaelhertzog.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Raphael: What was your initial motivation when you decided to create Ubuntu 7 years ago?</strong></p>
<p>Mark: Ubuntu is designed to fulfill a dream of change; a belief that the potential of free software was to have a profound impact on the economics of software as well as its technology. It&#8217;s obvious that the technology world is enormously influenced by Linux, GNU and the free software ecosystem, but the economics of software are still essentially unchanged.</p>
<p>Before Ubuntu, we have a two-tier world of Linux: there&#8217;s the community world (Debian, Fedora, Arch, Gentoo) where you support yourself, and the restricted, commercial world of RHEL and SLES/SLED. While the community distributions are wonderful in many regards, they don&#8217;t and can&#8217;t meet the needs of the whole of society; one can&#8217;t find them pre-installed, one can&#8217;t get certified and build a career around them, one can&#8217;t expect a school to deploy at scale a platform which is not blessed by a wide range of institutions. And the community distributions cannot create the institutions that would fix that.</p>
<p>Ubuntu brings those two worlds together, into one whole, with a commercial-grade release (inheriting the goodness of Debian) that is freely available but also backed by an institution.</p>
<p>The key to that dream is economics, and as always, a change in economics; it was clear to me that the flow of money around personal software would change from licensing (&#8220;buying Windows&#8221;) to services (&#8220;paying for your Ubuntu ONE storage&#8221;). If that change was coming, then there might be room for a truly free, free software distribution, with an institution that could make all the commitments needed to match the commercial Linux world. And that would be the achievement of a lifetime. So I decided to dedicate a chunk of my lifetime to the attempt, and found a number of wonderful people who shared that vision to help with the attempt.</p>
<p>It made sense to me to include Debian in that vision; I knew it well as both a user and insider, and believed that it would always be the most rigorous of the community distributions. I share Debian&#8217;s values and those values are compatible with those we set for Ubuntu.</p>
<blockquote class="highlight"><p>“Debian would always be the most rigorous of the community distributions.”</p></blockquote>
<p>Debian on its own, as an institution, could not be a partner for industry or enterprise. The bits are brilliant, but the design of an institution for independence implies making it difficult to be decisive counterparty, or contractual provider. It would be essentially impossible to achieve the goals of pre-installation, certification and support for third-party hardware and software inside an institution that is designed for neutrality, impartiality and independence.</p>
<p>However, two complementary institutions could cover both sides of this coin.</p>
<p>So Ubuntu is the second half of a complete Debian-Ubuntu ecosystem. Debian&#8217;s strengths complement Ubuntu&#8217;s, Ubuntu can achieve things that Debian cannot (not because its members are not capable, but because the institution has chosen other priorities) and conversely, Debian delivers things which Ubuntu cannot, not because its members are not capable, but because it chooses other priorities as an institution.</p>
<p>Many people are starting to understand this: Ubuntu is Debian&#8217;s arrow, Debian is Ubuntu&#8217;s bow. Neither instrument is particularly useful on its own, except in a museum of anthropology <img src='http://raphaelhertzog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<blockquote class="highlight"><p>“Ubuntu is Debian&#8217;s arrow, Debian is Ubuntu&#8217;s bow.”</p></blockquote>
<p>So the worst and most frustrating attitude comes from those who think Debian and Ubuntu compete. If you care about Debian, and want it to compete on every level with Ubuntu, you are going to be rather miserable; you will want Debian to lose some of its best qualities and change some of its most important practices. However, if you see the Ubuntu-Debian ecosystem as a coherent whole, you will celebrate the strengths and accomplishments of both, and more importantly, work to make Debian a better Debian and Ubuntu a better Ubuntu, as opposed to wishing Ubuntu was more like Debian and vice versa.</p>
<p><strong>Raphael: The Ubuntu-Debian relationship was rather hectic at the start, it took several years to &#8220;mature&#8221;. If you had to start over, would you do some things differently?</strong></p>
<p>Mark: Yes, there are lessons learned, but none of them are fundamental. Some of the tension was based on human factors that cannot really be altered: some of the harshest <acronym title="Debian Developer">DD</acronym> critics of Canonical and Ubuntu are folk who applied for but were not selected for positions at Canonical. I can&#8217;t change that, and wouldn&#8217;t change that, and would understand the consequences are, emotionally, what they are.</p>
<p>Nevertheless, it would have been good to be wiser about the way people would react to some approaches. We famously went to DebConf 5 in Porto Allegre and hacked in a room at the conference. It had an open door, and many people popped a head in, but I think the not-a-cabal collection of people in there was intimidating and the story became one of exclusion. If we&#8217;d wanted to be exclusive, we would have gone somewhere else! So I would have worked harder to make that clear at the time if I&#8217;d known how many times that story would be used to paint Canonical in a bad light.</p>
<p>As for engagement with Debian, I think the situation is one of highs and lows. As a high, it is generally possible to collaborate with any given maintainer in Debian on a problem in which there is mutual interest. There are exceptions, but those exceptions are as problematic within Debian as between Debian and outsiders. As a low, it is impossible to collaborate with Debian as an institution, because of the design of the institution.</p>
<blockquote class="highlight"><p>“It is generally possible to collaborate with any given maintainer […] [but] it is impossible to collaborate with Debian as an institution.”</p></blockquote>
<p>In order to collaborate, two parties must make and keep commitments. So while one Debian developer and one Ubuntu developer can make personal commitments to each other, Debian cannot make commitments to Ubuntu, because there is no person or body that can make such commitments on behalf of the institution, on any sort of agile basis. A <acronym title="General Resolution">GR</acronym> is not agile <img src='http://raphaelhertzog.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . I don&#8217;t say this as a critique of Debian; remember, I think Debian has made some very important choices, one of those is the complete independence of its developers, which means they are under no obligation to follow a decision made by anyone else.</p>
<p>It&#8217;s also important to understand the difference between collaboration and teamwork. When two people have exactly the same goal and produce the same output, that&#8217;s just teamwork. When two people have different goals and produce <strong>different</strong> product, but still find ways to improve one anothers product, that&#8217;s collaboration.</p>
<p>So in order to have great collaboration between Ubuntu and Debian, we need to start with mutual recognition of the value and importance of the <strong>differences</strong> in our approach. When someone criticises Ubuntu because it exists, or because it does not do things the same way as Debian, or because it does not structure every process with the primary goal of improving Debian, it&#8217;s sad. The differences between us are valuable: Ubuntu can take Debian places Debian cannot go, and Debian&#8217;s debianness brings a whole raft of goodness for Ubuntu.</p>
<p><strong>Raphael: What&#8217;s the biggest problem of Debian?</strong></p>
<p>Mark: Internal tension about the vision and goals of Debian make it difficult to create a harmonious environment, which is compounded by an unwillingness to censure destructive behaviour.</p>
<p>Does Debian measure its success by the number of installs? The number of maintainers? The number of flamewars? The number of packages? The number of messages to mailing lists? The quality of Debian Policy? The quality of packages? The &#8220;freshness&#8221; of packages? The length and quality of maintenance of releases? The frequency or infrequency of releases? The breadth of derivatives?</p>
<p>Many of these metrics are in direct tension with one another; as a consequence, the fact that different DD&#8217;s prioritise all of these (and other goals) differently makes for&#8230; interesting debate. The sort of debate that goes on and on because there is no way to choose between the goals when everyone has different ones. You know the sort of debate I mean <img src='http://raphaelhertzog.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Raphael: Do you think that the Debian community improved in the last 7 years? If yes, do you think that the <a href="http://en.wikipedia.org/wiki/Coopetition">coopetition</a> with Ubuntu partly explains it?</strong></p>
<p>Mark: Yes, I think some of the areas that concern me have improved. Much of this is to do with time giving people the opportunity to consider a thought from different perspectives, perhaps with the benefit of maturity. Time also allows ideas to flow and and of course introduces new people into the mix. There are plenty of DD&#8217;s now who became DD&#8217;s after Ubuntu existed, so it&#8217;s not as if this new supernova has suddenly gone off in their galactic neighbourhood. And many of them became DD&#8217;s <strong>because</strong> of Ubuntu. So at least from the perspective of the Ubuntu-Debian relationship, things are much healthier.</p>
<p>We could do much better. Now that we are on track for four consecutive Ubuntu LTS releases, on a two-year cadence, it&#8217;s clear we could collaborate beautifully if we shared a freeze date. Canonical offered to help with Squeeze on that basis, but institutional commitment phobia reared its head and scotched it. And with the proposal to put Debian&#8217;s first planned freeze exactly in the middle of Ubuntu&#8217;s LTS cycle, our alignment in interests will be at a minimum, not a maximum. Pure &lt;facepalm /&gt;.</p>
<p><strong>Raphael: What would you suggest to people (like me) who do not feel like joining Canonical and would like to be paid to work on improving Debian?</strong></p>
<p>Mark: We share the problem; I would like to be paid to work on improving Ubuntu, but that&#8217;s also a long term dream <img src='http://raphaelhertzog.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Raphael: What about using the earnings of the dormant Ubuntu Foundation to fund some Debian projects?</strong></p>
<p>Mark: The Foundation is there in the event of Canonical&#8217;s failure to ensure that commitments, like LTS maintenance, are met. It will hopefully be dormant for good <img src='http://raphaelhertzog.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Raphael: The <a href="http://debian-handbook.info/go/ulule-rh/">crowdfunding campaign for the Debian Administrator&#8217;s Handbook</a> is still going on and I briefly envisioned the possibility to create the <a href="http://raphaelhertzog.com/2011/10/18/what-about-creating-the-ubuntu-administrators-handbook/">Ubuntu Administrator&#8217;s Handbook</a>. What do you think of this project?</strong></p>
<p>Mark: Crowdfunding is a great match for free software and open content, so I hope this works out very well for you. I also think you&#8217;d find a bigger market for an Ubuntu book, not because Ubuntu is any more important than Debian but because it is likely to appeal to people who are more inclined to buy or download a book than to dive into the source.</p>
<p>Again, this is about understanding the difference in audiences, not judging the projects or the products.</p>
<p><strong>Raphael: Is there someone in Debian that you admire for their contributions?</strong></p>
<p>Mark: Zack is the best DPL since 1995; it&#8217;s an impossible job which he handles with grace and distinction. I hope praise from me doesn&#8217;t tarnish his reputation in the project!</p>
<hr/>
<p>Thank you to Mark for the time spent answering my questions. I hope you enjoyed reading his answers as I did.</p>
<p class="action-call"><a href="http://raphaelhertzog.com/email-newsletter/">Subscribe to my newsletter</a> to get my monthly summary of the Debian/Ubuntu news and to not miss further interviews. You can also follow along on <a href="http://identi.ca/raphaelhertzog">Identi.ca</a>, <a href="https://plus.google.com/111785500145924152411/">Google+</a>, <a href="http://twitter.com/raphaelhertzog">Twitter</a> and <a href="http://www.facebook.com/HertzogRaphael">Facebook</a></p>
<p>.</p>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/11/17/people-behind-debian-mark-shuttleworth-ubuntus-founder/#comments">37 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/11/17/people-behind-debian-mark-shuttleworth-ubuntus-founder/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>20 Things to Learn About APT With the Free Chapter of the Debian Administrator&#8217;s Handbook</title>
		<link>http://raphaelhertzog.com/2011/11/15/20-things-to-learn-with-the-free-chapter-of-the-debian-administrators-handbook/</link>
		<comments>http://raphaelhertzog.com/2011/11/15/20-things-to-learn-with-the-free-chapter-of-the-debian-administrators-handbook/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 09:56:39 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Debian News]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Ubuntu News]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Debian Handbook]]></category>
		<category><![CDATA[synaptic]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[update-manager]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=2353</guid>
		<description><![CDATA[We just released a sample chapter of the Debian Administrator's Handbook. It covers the APT family of tools: apt-get, aptitude, synaptic, update-manager, etc. This article highlights 20 things (among others) that you can learn in this chapter.]]></description>
			<content:encoded><![CDATA[<p><img src="http://debian-handbook.info/files/2011/11/debian-book-150x150.png" alt="" title="The Debian Administrator&#039;s Handbook" width="150" height="150" class="alignleft size-thumbnail wp-image-209" />We just released a <a href='http://raphaelhertzog.com/files/2011/11/chapter-apt-rh.pdf'>sample chapter</a> of the Debian Administrator&#8217;s Handbook. It covers the APT family of tools: apt-get, aptitude, synaptic, update-manager, etc.</p>
<p style="text-align: center"><a href='http://raphaelhertzog.com/files/2011/11/chapter-apt-rh.pdf'><img border="0" src="http://raphaelhertzog.com/wp-includes/images/crystal/document.png"></a><br/><a href='http://raphaelhertzog.com/files/2011/11/chapter-apt-rh.pdf'><strong>Click here to get your free sample chapter</strong></a></p>
<p>I&#8217;m sure you will enjoy it. There are many interesting things to learn:</p>
<ul>
<li>How to customize the sources.list file</li>
<li>The various APT repositories that Debian offers (Security Updates, Stable Updates, Proposed Updates, Backports, Experimental, etc.)</li>
<li>How to select the best Debian mirror for you</li>
<li>How to find old package versions</li>
<li>How to install the same selection of packages on multiple computers</li>
<li>How to install and remove a package on a single command-line</li>
<li>How to reinstall packages and how to install a specific version of a package</li>
<li>How to pass options to dpkg via APT</li>
<li>How to configure a proxy for APT</li>
<li>How to set priorities to various package sources (APT pinning)</li>
<li>How to safely mix packages from several distributions on a single system</li>
<li>How to use aptitude&#8217;s text-mode graphical interface</li>
<li>How to use the tracking of automatically installed packages to keep a clean system</li>
<li>How APT checks the authenticity of packages that it downloads</li>
<li>How to add supplementary GnuPG keys to APT&#8217;s trusted keyring</li>
<li>How to upgrade from one stable distribution to the next</li>
<li>How to handles problems after an upgrade</li>
<li>How to keep a system up-to-date</li>
<li>How to automate upgrades</li>
<li>How to find the package that you&#8217;re looking for</li>
</ul>
<p class="action-call">If you liked this chapter, <a href="http://debian-handbook.info/go/ulule-rh/">click here to contribute a few euros</a> towards the liberation of the whole book. That way you&#8217;ll get a copy of the ebook as soon as it&#8217;s available. Thank you!</p>
<p>I also invite you to share this sample chapter as widely as possible. We&#8217;re only at 40% of the liberation fund and there&#8217;s less than 2 weeks left. I hope this book extract will convince enough people that the book is going to be great, and that it really deserves to be liberated and bundled with Debian!</p>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/11/15/20-things-to-learn-with-the-free-chapter-of-the-debian-administrators-handbook/#comments">8 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/11/15/20-things-to-learn-with-the-free-chapter-of-the-debian-administrators-handbook/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Debian joins Dropbox&#8217;s officially supported platforms along with Fedora and Ubuntu</title>
		<link>http://raphaelhertzog.com/2011/10/28/debian-joins-dropboxs-officially-supported-platforms-along-with-fedora-and-ubuntu/</link>
		<comments>http://raphaelhertzog.com/2011/10/28/debian-joins-dropboxs-officially-supported-platforms-along-with-fedora-and-ubuntu/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 09:04:19 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Debian News]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Dropbox]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[nautilus-dropbox]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=2320</guid>
		<description><![CDATA[If you checkout Dropbox&#8217;s Linux download page, you will see that Debian packages are provided. Up to a few days ago, they only provided packages for Ubuntu and Fedora. I&#8217;m glad to see that packaging nautilus-dropbox for Debian and being in touch with them due to this led to this result. Another positive outcome is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://raphaelhertzog.com/files/2011/06/dropbox.png" alt="" title="Dropbox" width="231" height="60" class="alignright size-full wp-image-1837" />If you checkout <a href="https://www.dropbox.com/downloading?os=lnx">Dropbox&#8217;s Linux download page</a>, you will see that Debian packages are provided. Up to a few days ago, they only provided packages for Ubuntu and Fedora.</p>
<p>I&#8217;m glad to see that <a href="http://raphaelhertzog.com/2011/06/06/official-debian-ubuntu-packages-for-nautilus-dropbox/">packaging nautilus-dropbox for Debian</a> and being in touch with them due to this led to this result.</p>
<p>Another positive outcome is that the version 0.7.0 now ensures the origin of the downloaded binaries with GPG.</p>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/10/28/debian-joins-dropboxs-officially-supported-platforms-along-with-fedora-and-ubuntu/#comments">7 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/10/28/debian-joins-dropboxs-officially-supported-platforms-along-with-fedora-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>What about creating The Ubuntu Administrator&#8217;s Handbook?</title>
		<link>http://raphaelhertzog.com/2011/10/18/what-about-creating-the-ubuntu-administrators-handbook/</link>
		<comments>http://raphaelhertzog.com/2011/10/18/what-about-creating-the-ubuntu-administrators-handbook/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 15:26:16 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Action]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Ubuntu News]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Debian Handbook]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=2279</guid>
		<description><![CDATA[I am currently running a crowdfunding campaign whose ultimate goal is to liberate the English translation of a French book that I have written. This book will be named The Debian Administrator&#8217;s Handbook because it has primarily been written for Debian. Creating a new Ubuntu book based on The Debian Administrator&#8217;s Handbook But since Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently running a <a href="http://www.ulule.com/debian-handbook/">crowdfunding campaign</a> whose ultimate goal is to liberate the English translation of a French book that I have written. This book will be named <a href="http://debian-handbook.info">The Debian Administrator&#8217;s Handbook</a> because it has primarily been written for Debian.</p>
<p><a href="http://www.ulule.com/debian-handbook/"><img src="http://raphaelhertzog.com/files/2011/09/d-a-h-ulule-banner-300x168.png" alt="" title="The Debian Administrator&#039;s Handbook" width="300" height="168" class="aligncenter size-medium wp-image-2225" /></a></p>
<h3>Creating a new Ubuntu book based on The Debian Administrator&#8217;s Handbook</h3>
<p>But since Ubuntu is based on Debian, a large part of its content applies equally well to Ubuntu. While discussing with Mark Shuttleworth, he suggested me to reuse those parts and to create a new book dedicated to Ubuntu. It would also cover the latest cloud technologies that Ubuntu has been delivering (since this is a topic that the current book does not cover).</p>
<p>This is something that I have been envisioning for a while and something that I would be ready to try if we manage to complete the liberation of the current book. This project would then bring a truly free book to the Ubuntu ecosystem.</p>
<h3>Why? The official Ubuntu books are not really free</h3>
<p>There&#8217;s a policy in place that ensures that official Ubuntu books use a free software/culture license and they are effectively available under the terms of a Creative Commons Share Alike license. But try to create a derivative book&#8230; <strong>you won&#8217;t find the &#8220;sources&#8221;</strong> (LaTeX or DocBook usually with most big books). <strong>You can only find a few PDF copies</strong> if you google for it. But this is really not the preferred form of modification for such a book.</p>
<p>Those books are also not packaged. Ubuntu much like Debian deserves to have a good book embodying the values of free software that can be shipped together with its product.</p>
<p>When I speak of liberation of the book, I really mean it in the way that free software hackers are used to: a public Git repository containing the DocBook sources, the pictures and the .dia files for the various schemas.</p>
<h3>Help Ubuntu by spreading the word</h3>
<p>I understand that at this point this proposed Ubuntu book is really hypothetical (&#8220;vaporware&#8221; one could say) but we need to go step by step to make it a reality. And the first step is to ensure that we manage to liberate the Debian Administrator&#8217;s Handbook.</p>
<p>For this I am seeking the support of the Ubuntu community to promote the current fundraising campaign. If the perspective of the Ubuntu book is not enough to convince you, you&#8217;ll be glad to learn that <strong>I also commit to give back to Ubuntu 15% of the money raised</strong> via the link below (once VAT has been subtracted).</p>
<p><strong><a href="http://debian-handbook.info/go/ulule-ubuntu/">Click here to go to the crowdfunding campaign page</a> and pledge a few euros</strong>. Then share this article (or the link <a href="http://debian-handbook.info/go/ulule-ubuntu/">http://debian-handbook.info/go/ulule-ubuntu/</a>) and convince others to participate.</p>
<p>At this point, the liberation target is entirely reachable with your help and the help of the community: the remaining 18 K€ needed in the liberation fund represent 720 persons giving 25 EUR each or 1800 persons giving 10 EUR each.</p>
<p>Thank you very much for your support and your help in this project!</p>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/10/18/what-about-creating-the-ubuntu-administrators-handbook/#comments">2 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/10/18/what-about-creating-the-ubuntu-administrators-handbook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Understand dpkg and don&#8217;t get stuck with a maintainer script failure</title>
		<link>http://raphaelhertzog.com/2011/09/13/understand-dpkg-and-dont-get-stuck-with-a-maintainer-script-failure/</link>
		<comments>http://raphaelhertzog.com/2011/09/13/understand-dpkg-and-dont-get-stuck-with-a-maintainer-script-failure/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 12:11:00 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[User Documentation]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[maintainer scripts]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=2055</guid>
		<description><![CDATA[Continuing my series of articles on dpkg&#8217;s errors, this time I&#8217;ll cover a pretty common one which has several variations: Setting up acpid (1:2.0.12-1) ... rm: cannot remove `/etc/rc1.d/K20acpid': No such file or directory dpkg: error processing acpid (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: acpid Even [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing my <a href="http://raphaelhertzog.com/2011/06/27/deciphering-one-of-dpkgs-weirdest-errors-short-read-on-buffer-copy/">series</a> <a href="http://raphaelhertzog.com/2011/07/18/deciphering-one-of-dpkg-weirdest-errors-unable-to-open-pathtofoo-dpkg-new/">of</a> <a href="http://raphaelhertzog.com/2011/08/01/understanding-dpkgs-file-overwrite-error/">articles</a> on dpkg&#8217;s errors, this time I&#8217;ll cover a pretty common one which has several variations:</p>
<pre>
Setting up acpid (1:2.0.12-1) ...
rm: cannot remove `/etc/rc1.d/K20acpid': No such file or directory
dpkg: error processing acpid (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 acpid
</pre>
<p>Even if dpkg is failing and outputting the error message, the real problem is not in dpkg but in the installed package (acpid in the example above). As we <a href="http://raphaelhertzog.com/2010/11/08/5-reasons-why-a-debian-package-is-more-than-a-simple-file-archive/">already learned</a>, a package contains not only files but also &#8220;maintainer scripts&#8221; that are executed at various points of the installation process (see <a href="http://wiki.debian.org/MaintainerScripts">some useful graphics</a> to understand how they are called, thanks to <a href="http://raphaelhertzog.com/2011/08/07/people-behind-debian-margarita-manterola/">Margarita Manterola</a>).</p>
<div id="attachment_2173" class="wp-caption aligncenter" style="width: 310px"><a href="http://raphaelhertzog.com/files/2011/09/upgrade.png"><img src="http://raphaelhertzog.com/files/2011/09/upgrade-300x243.png" alt="" title="Maintainer scripts in a package upgrade" width="300" height="243" class="size-medium wp-image-2173" /></a><p class="wp-caption-text">Maintainer scripts in a package upgrade</p></div>
<p>In the introductory example it was acpid&#8217;s &#8220;post-installation script&#8221; that failed, and dpkg is only forwarding that failure back to the caller. The maintainer scripts are stored in <code>/var/lib/dpkg/info/</code>. You can thus inspect them and even modify them if you hit a bug and want to work around it (do this only if you understand what you do!).</p>
<p>One common modification is to add &#8220;<code>set -x</code>&#8221; at the start of the script and to retry the failing operation. That way you can see what&#8217;s executed exactly. Here&#8217;s what the output could look like after the addition of &#8220;<code>set -x</code>&#8221; to <code>/var/lib/dpkg/info/acpid.postinst</code>:</p>
<pre>
$ sudo dpkg --configure acpid
Setting up acpid (1:2.0.12-1) ...
+ dpkg --compare-versions 1:2.0.11-1 lt-nl 1.0.10-3
+ dpkg --compare-versions 1:2.0.11-1 lt-nl 1.0.6-16
+ dpkg --compare-versions 1:2.0.11-1 lt 1.0.6-6
+ rm /etc/rc1.d/K20acpid
rm: cannot remove `/etc/rc1.d/K20acpid': No such file or directory
dpkg: error processing acpid (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 acpid
</pre>
<p>This output helps you locate the command that is actually failing. Here&#8217;s it&#8217;s relatively easy since we have an error message from &#8220;rm&#8221;. And the fix is trivial too, we replace &#8220;rm&#8221; with &#8220;rm -f&#8221; so that it doesn&#8217;t fail when the file doesn&#8217;t exist (this is a fake bug I made up for this article—I just added a failing rm call—but it&#8217;s inspired by real bugs I experienced).</p>
<p>Maintainer scripts are supposed to be idempotent: we should be able to execute them several times in a row without bad consequences. It happens from time to time that the maintainer gets this wrong&#8230; on the first try it works, so he uploads his package and we discover the problem only later once someone ended up executing the same code twice for some reason.</p>
<p class="action-call">Follow me on <a href="http://identi.ca/raphaelhertzog">Identi.ca</a>, <a href="http://twitter.com/raphaelhertzog">Twitter</a>, <a href="http://www.facebook.com/HertzogRaphael">Facebook</a> and <a href="https://plus.google.com/111785500145924152411/">Google+</a>. Or subscribe to this blog by <a href="http://raphaelhertzog.com/feed/">RSS</a> or by <a href="http://raphaelhertzog.com/email-newsletter/">email</a>.</p>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/09/13/understand-dpkg-and-dont-get-stuck-with-a-maintainer-script-failure/#comments">14 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/09/13/understand-dpkg-and-dont-get-stuck-with-a-maintainer-script-failure/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Understanding dpkg&#8217;s file overwrite error</title>
		<link>http://raphaelhertzog.com/2011/08/01/understanding-dpkgs-file-overwrite-error/</link>
		<comments>http://raphaelhertzog.com/2011/08/01/understanding-dpkgs-file-overwrite-error/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 08:00:00 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[User Documentation]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[conflict]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[file overwrite]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=1918</guid>
		<description><![CDATA[This is probably one of the most common errors. You&#8217;re very likely to encounter it, in particular if you tend to mix packages from various origins/distributions, or if you&#8217;re using unstable. It looks like this: Unpacking gbonds-data (from .../gbonds-data_2.0.3-2_all.deb) ... dpkg: error processing /var/cache/apt/archives/gbonds-data_2.0.3-2_all.deb (--unpack): trying to overwrite '/usr/share/omf/gbonds/gbonds-C.omf', which is also in package gbonds [...]]]></description>
			<content:encoded><![CDATA[<p>This is probably one of the most common errors. You&#8217;re very likely to encounter it, in particular if you tend to mix packages from various origins/distributions, or if you&#8217;re using unstable. It looks like this:</p>
<pre>
Unpacking gbonds-data (from .../gbonds-data_2.0.3-2_all.deb) ...
dpkg: error processing /var/cache/apt/archives/gbonds-data_2.0.3-2_all.deb (--unpack):
 trying to overwrite '/usr/share/omf/gbonds/gbonds-C.omf', which is also in package gbonds 2.0.2-9
dpkg-deb: subprocess paste killed by signal (Broken pipe)
</pre>
<p>A given file can only be provided by a single package. So if you try to install a package that provides a file that is already part of another installed package, it will fail with a message similar to the above one.</p>
<p>Sometimes this failure will be meaningful because dpkg prevented you to install two unrelated packages that happen to have a real file conflict. In other cases, like in the example above, this failure is just the result of a mistake.</p>
<p><img src="http://raphaelhertzog.com/files/2010/11/file-folder-gears-dpkg-internals-150x150.jpg" alt="Folder with gears" title="Folder with gears" width="150" height="150" class="aligncenter wp-image-978" /></p>
<p>The version 2.0.3-1 of gbonds split the architecture independent files in a separate package called gbonds-data but the maintainer forgot to add the required control field in gbonds-data (<code>Replaces: gbonds (&lt;&lt; 2.0.3-1)</code>). That field allows dpkg to take over files from the listed packages.</p>
<p>If you want to ignore the file conflict and let dpkg take over the file (even without the Replaces), you can pass the <code>--force-overwrite</code> command-line option.</p>
<p>But you&#8217;re not using dpkg directly, you&#8217;re probably using an APT frontend (like apt-get or aptitude). Don&#8217;t worry, there&#8217;s a simple way to define custom dpkg options to use:</p>
<pre># apt-get -o Dpkg::Options::="--force-overwrite" install gbonds-data</pre>
<p>The syntax is a bit weird, but the &#8220;::&#8221; after &#8220;Options&#8221; is important, it&#8217;s the syntax that defines a list item value instead of a single value. And you can effectively pass multiple options to dpkg by putting multiple <code>-o Dpkg::Options::="…"</code>.</p>
<blockquote><p>If you want to read more articles like this one, <a href="http://raphaelhertzog.com/email-newsletter/">click here to subscribe to my free newsletter</a>. You can also follow me on <a href="http://identi.ca/raphaelhertzog">Identi.ca</a>, <a href="http://twitter.com/raphaelhertzog">Twitter</a> and <a href="http://www.facebook.com/HertzogRaphael">Facebook</a>.</p></blockquote>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/08/01/understanding-dpkgs-file-overwrite-error/#comments">3 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/08/01/understanding-dpkgs-file-overwrite-error/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Deciphering one of dpkg’s weirdest errors: unable to open ‘/path/to/foo.dpkg-new’</title>
		<link>http://raphaelhertzog.com/2011/07/18/deciphering-one-of-dpkg-weirdest-errors-unable-to-open-pathtofoo-dpkg-new/</link>
		<comments>http://raphaelhertzog.com/2011/07/18/deciphering-one-of-dpkg-weirdest-errors-unable-to-open-pathtofoo-dpkg-new/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 08:00:00 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[User Documentation]]></category>
		<category><![CDATA[conflict]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[symlink]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=1798</guid>
		<description><![CDATA[We already studied one weird error of dpkg, let&#8217;s do another one: Unpacking replacement libexo-common ... dpkg: error processing /var/cache/apt/archives/libexo-common_0.6.1-1_all.deb (--unpack): unable to open '/usr/share/doc/exo/html/C/images/exo-preferred-applications-internet.png.dpkg-new': No such file or directory Rather difficult to understand on the first look right? Let&#8217;s see in detail what&#8217;s usually happening when you get this error. The first hint comes [...]]]></description>
			<content:encoded><![CDATA[<p>We already <a href="http://raphaelhertzog.com/2011/06/27/deciphering-one-of-dpkgs-weirdest-errors-short-read-on-buffer-copy/">studied one weird error of dpkg</a>, let&#8217;s do another one:</p>
<pre>Unpacking replacement libexo-common ...
dpkg: error processing /var/cache/apt/archives/libexo-common_0.6.1-1_all.deb (--unpack):
 unable to open '/usr/share/doc/exo/html/C/images/exo-preferred-applications-internet.png.dpkg-new': No such file or directory
</pre>
<p>Rather difficult to understand on the first look right? Let&#8217;s see in detail what&#8217;s usually happening when you get this error.</p>
<p><img src="http://raphaelhertzog.com/files/2011/07/warning-gears-150x150.jpg" alt="" title="Warning, some internals ahead" width="150" height="150" class="alignleft size-thumbnail wp-image-2031" />The first hint comes from the file extension &#8220;.dpkg-new&#8221;. This extension is used by dpkg to unpack the updated files near the old files. When everything has been unpacked, they are renamed over the old files.</p>
<p>The failure happens precisely when dpkg tries to rename the file (in fact when it tries to fsync() it before the rename)&#8230; but why does it fail?</p>
<p>Usually because there are unexpected symlinks (or bind mounts) involved that resulted in two different files being installed in the same directory. For example consider package that provides <code>/dir1/a-file</code> and <code>/dir2/a-file</code>. Now imagine that on the target system, <code>/dir1</code> is a real directory but <code>/dir2</code> is a symbolic link that points to <code>/dir1</code>.</p>
<p>When dpkg processes <code>/dir1/a-file.dpkg-new</code> everything is fine, but when it tries to process <code>/dir2/a-file.dpkg-new</code> it will fail because that file is the same than <code>/dir1/a-file.dpkg-new</code> which has already been renamed.</p>
<p>Diagnosing further the problem requires to understand why there&#8217;s a symlink instead of a real directory. It might be two packages that were badly coordinated, or a problem in the package itself because it lacks some code that drops the symlink in the preinst (so that dpkg installs the real directory instead of keeping the symlink).</p>
<p>There might be variations in the way two files end up sharing the same directory, but this simple example should have clarified the nature of the underlying problem.</p>
<blockquote><p>Subscribe to this blog by <a href="http://raphaelhertzog.com/feed/">RSS</a>, by <a href="http://raphaelhertzog.com/email-newsletter/">email</a> or on <a href="http://www.facebook.com/HertzogRaphael">Facebook</a>.</p></blockquote>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/07/18/deciphering-one-of-dpkg-weirdest-errors-unable-to-open-pathtofoo-dpkg-new/#comments">No comment</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/07/18/deciphering-one-of-dpkg-weirdest-errors-unable-to-open-pathtofoo-dpkg-new/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to prepare patches for Debian packages</title>
		<link>http://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/</link>
		<comments>http://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 08:00:00 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Contributor Documentation]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Contributing]]></category>
		<category><![CDATA[debdiff]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[devscripts]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[nmudiff]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=1914</guid>
		<description><![CDATA[You want to start contributing to Debian and/or Ubuntu, you decided to help a package maintainer and you&#8217;re now looking for how to change a source package and how to submit your changes. 1. Retrieve the source package and install build-dependencies The first step is to retrieve the latest version of the source package and [...]]]></description>
			<content:encoded><![CDATA[<p>You want to <a href="http://raphaelhertzog.com/go/contributing/">start contributing</a> to Debian and/or Ubuntu, you decided to help a package maintainer and you&#8217;re now looking for how to change a source package and how to submit your changes.</p>
<h3>1. Retrieve the source package and install build-dependencies</h3>
<p>The first step is to retrieve the latest version of the source package and to install the required build-dependencies. I already covered how to do this with apt-get in the <a href="http://raphaelhertzog.com/2010/12/15/howto-to-rebuild-debian-packages/">article explaining how to rebuild a source package</a>.</p>
<p>If you prefer, you can use <code>dget</code> (from the devscripts package) to directly grab the source package. You can find the URL of the .dsc files in the <a href="http://packages.qa.debian.org">Package Tracking System</a> for example.</p>
<p>Sometimes apt-get will warn you that the source package is maintained in a VCS repository, like this:</p>
<pre>$ apt-get source wordpress
[...]
NOTICE: 'wordpress' packaging is maintained in the 'Git' version control system at:
git://git.debian.org/git/collab-maint/wordpress.git
[...]
</pre>
<p>In that case, you can use <code>debcheckout</code> to retrieve the VCS repository instead (provided that you have the corresponding VCS installed):</p>
<pre>$ debcheckout wordpress
declared git repository at git://git.debian.org/git/collab-maint/wordpress.git
git clone git://git.debian.org/git/collab-maint/wordpress.git wordpress ...
Cloning into wordpress...
</pre>
<p>Note however that some maintainers use their VCS in a way that&#8217;s not really compatible with the explanations that I will give below.</p>
<p>It&#8217;s also a good idea to install the package &#8220;packaging-dev&#8221;. It&#8217;s a meta-package depending on the most common tools that are used for Debian packaging work.</p>
<p><img src="http://raphaelhertzog.com/files/2011/07/modify-package-e1309263139826.jpg" alt="" title="Change the package" width="270" height="270" class="aligncenter size-full wp-image-1985" /></p>
<h3>2. Do the changes</h3>
<p>Execute <code>dch --nmu</code> to record the fact that you&#8217;re working on an update prepared by someone who is not the maintainer (NMU means Non Maintainer Upload). This also ensures that if we build the package, we won&#8217;t overwrite the original source package that we downloaded, thus making it possible to generate a &#8220;diff&#8221; between both versions.</p>
<h4>2.1. Modify Debian packaging files</h4>
<p>Now fire your text editor and do the required changes in the &#8220;debian&#8221; sub-directory. You will probably run <code>dch -a</code> multiple times to document each subsequent change.</p>
<h4>2.2. Modify upstream files</h4>
<p>If you have to modify upstream files, the proper way to do it depends on the source package format (&#8220;1.0&#8243; vs &#8220;3.0 (quilt)&#8221; vs &#8220;3.0 (native)&#8221;, see the <code>debian/source/format</code> file) and on the presence or not of a patch system (the <code>what-patch</code> can help you identify it). In this explanation, I&#8217;ll assume that the package is using the recommended format: &#8220;3.0 (quilt)&#8221;. (It also works for &#8220;1.0&#8243; if quilt is used and if you configured <code>~/.quiltrc</code> as recommended by <code>/usr/share/doc/quilt/README.source</code>).</p>
<p>First you should ensure that all patches have been applied with <code>quilt push -a</code>. If there&#8217;s no patch yet, you want to create the debian/patches directory (with <code>mkdir debian/patches</code>). Note that you should better invoke quilt from the root of the source package (and the examples below assume this).</p>
<h5>2.2.1. Import a patch</h5>
<p>If the upstream changes are already in a patch file (say /tmp/patch that you downloaded from the upstream VCS repository) you can import that patch like this:</p>
<pre>$ quilt import -P fix-foobar.patch /tmp/patch
Importing patch /tmp/patch (stored as fix-foobar.patch)
$ quilt push
Applying patch fix-foobar.patch
[...]
Now at patch fix-foobar.patch
</pre>
<p>The <code>-P</code> option allows to select the name of the patch file created in debian/patches/. As you see, the new patch file is recorded in debian/patches/series but not applied by default, we&#8217;re thus doing it with <code>quilt push</code>.</p>
<h5>2.2.1. Create a new patch</h5>
<p>If the upstream changes that you want to make are not in a patch yet, you should tell quilt that you&#8217;re going to create one:</p>
<pre>$ quilt new fix-foobar.patch
Patch fix-foobar.patch is now on top
</pre>
<p>Then you must record every file that you&#8217;re going to modify with a <code>quilt add</code> invocation. quilt then makes a backup of those files so that it can generate the patch later on. If you&#8217;re going to modify the files with your text editor you can just do <code>quilt edit <em>file-to-modify</em></code>, it&#8217;s the same than <code>quilt add <em>file-to-modify</em></code> followed by <code>sensible-editor <em>file-to-modify</em></code>.</p>
<pre>$ quilt edit foobar.c
File foobar.c added to patch fix-foobar.patch
</pre>
<p>The last step is tell quilt to generate the patch:</p>
<pre>$ quilt refresh
Refreshed patch fix-foobar.patch
</pre>
<h3>3. Test your changes</h3>
<p>You should build your modified package with &#8220;debuild -us -uc&#8221;. You can easily install the resulting package with &#8220;debi&#8221;. Verify that everything works as expected. If not, continue your modifications until you&#8217;re satisfied with the result.</p>
<h3>4. Generate a patch and mail it</h3>
<p>If you followed the instructions, you should have two .dsc files in the parent directory, like this:</p>
<pre>$ cd ..
$ ls wordpress_*.dsc
../wordpress_3.0.5+dfsg-1.1.dsc
../wordpress_3.0.5+dfsg-1.dsc
</pre>
<p>Generating the patch to send to the maintainer is then just a matter of running debdiff:</p>
<pre>$ debdiff wordpress_3.0.5+dfsg-1.dsc wordpress_3.0.5+dfsg-1.1.dsc >/tmp/wp-debdiff
</pre>
<p>You can send the /tmp/wp-debdiff file to the wordpress maintainer. Usually you send it via the bugreport that your update is fixing and you add the &#8220;patch&#8221; tag to the report.</p>
<p>This can be automated with the <code>nmudiff</code> utility. By default it assumes that you&#8217;re using mutt but it can also directly feed the resulting mail to sendmail. The default text that nmudiff proposes assumes that you&#8217;re actually performing an NMU and that the result has been uploaded. If that&#8217;s not the case, you should edit the text and make it clear that you&#8217;re just sending a patch.</p>
<p>If you have been working in a VCS repository, instead of using debdiff you can simply use the diff feature integrated in your VCS (git diff, svn diff, etc.). But note that with a distributed VCS (like git/bzr/mercurial, unlike svn) you should probably have committed all individual changes in separate changesets. And instead of sending a single patch, you&#8217;re probably going to send a series of patches (though it might be easier to just upload your branch in a public repository and give the corresponding URL to the maintainer).</p>
<blockquote><p>Found it useful? Be sure to not miss other packaging tips (or lessons), <a href="http://raphaelhertzog.com/email-newsletter/">click here to subscribe to my free newsletter</a> and get new articles by email.</p></blockquote>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/#comments">3 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Deciphering one of dpkg&#8217;s weirdest errors: short read on buffer copy</title>
		<link>http://raphaelhertzog.com/2011/06/27/deciphering-one-of-dpkgs-weirdest-errors-short-read-on-buffer-copy/</link>
		<comments>http://raphaelhertzog.com/2011/06/27/deciphering-one-of-dpkgs-weirdest-errors-short-read-on-buffer-copy/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 08:00:00 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[User Documentation]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[corruption]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=1810</guid>
		<description><![CDATA[As a Debian/Ubuntu user, you&#8217;re likely to be exposed at some point to an error reported by dpkg. In a series of articles, I&#8217;ll explain some of the errors that you might encounter. Some error messages can be confusing at times. Most of the error strings do not appear very often and developers thus tend [...]]]></description>
			<content:encoded><![CDATA[<p>As a Debian/Ubuntu user, you&#8217;re likely to be exposed at some point to an error reported by dpkg. In a series of articles, I&#8217;ll explain some of the errors that you might encounter.</p>
<p><img src="http://raphaelhertzog.com/files/2011/06/binary-corrupted-e1308578560557.jpg" alt="" title="Corrupted file" width="425" height="222" class="aligncenter size-full wp-image-1897" /></p>
<p>Some error messages can be confusing at times. Most of the error strings do not appear very often and developers thus tend to use very terse description of the underlying problem. In other cases the architecture of the software makes it difficult to pin-point the real problem because the part that displays the error is several layers above the one that generated the initial error.</p>
<p>This is for example the case with this error of dpkg:</p>
<pre>
Unpacking replacement xulrunner-1.9.2 ...
dpkg-deb (subprocess): data: internal gzip read error: '&lt;fd:0&gt;: too many length or distance symbols'
dpkg-deb: error: subprocess &lt;decompress&gt; returned error exit status 2
dpkg: error processing /var/cache/apt/archives/xulrunner-1.9.2_1.9.2.17+build3+nobinonly-0ubuntu1_amd64.deb (--unpack):
 short read on buffer copy for backend dpkg-deb during `./usr/lib/xulrunner-1.9.2.17/components/libdbusservice.so'
</pre>
<p>First, the decompression layer discovers something unexpected in the data read in the .deb file and dpkg-deb outputs the error message coming from zlib (&#8220;too many length or distance symbols&#8221;). This causes the premature end of <code>dpkg-deb --fsys-tarfile</code> that dpkg had executed to extract <a href="http://raphaelhertzog.com/2010/11/08/5-reasons-why-a-debian-package-is-more-than-a-simple-file-archive/">the .data.tar archive</a> from the deb file. In turn, dpkg informs us that dpkg-deb did not send all the data that were announced (and hence the &#8220;short read&#8221; in the error message) and that were meant to be part of the file &#8216;/usr/lib/xulrunner-1.9.2.17/components/libdbusservice.so&#8217;. </p>
<p>That&#8217;s all nice but it doesn&#8217;t help you much in general. What you must understand from the above is that the .deb file is corrupted (sometimes just truncated). In theory it should not happen since APT verifies the checksums of files when they are downloaded. But computers are not infallible and even if the downloaded data was good, it can have been corrupted when stored on disk (for example cheap SSD disks are known to not last very well).</p>
<p>Try removing the file (usually with <code>apt-get clean</code> since it&#8217;s stored in APT&#8217;s cache) and let APT download it again. Chances are that it will work on the second try. Otherwise consider doing a memory and HDD check as something is probably broken in your computer.</p>
<blockquote><p><a href="http://raphaelhertzog.com/email-newsletter/">Join my free newsletter</a> and learn more tips for users. <a href="https://flattr.com/thing/29919/Debian-Package-Manager-dpkg">Or click here</a> to support my work on dpkg with Flattr, consider subscribing for a few months.</p></blockquote>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/06/27/deciphering-one-of-dpkgs-weirdest-errors-short-read-on-buffer-copy/#comments">6 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/06/27/deciphering-one-of-dpkgs-weirdest-errors-short-read-on-buffer-copy/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>apt-get, aptitude, … pick the right Debian package manager for you</title>
		<link>http://raphaelhertzog.com/2011/06/20/apt-get-aptitude-%e2%80%a6-pick-the-right-debian-package-manager-for-you/</link>
		<comments>http://raphaelhertzog.com/2011/06/20/apt-get-aptitude-%e2%80%a6-pick-the-right-debian-package-manager-for-you/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 08:00:00 +0000</pubDate>
		<dc:creator>Raphaël Hertzog</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[User Documentation]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[cupt]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[package manager]]></category>
		<category><![CDATA[software-center]]></category>
		<category><![CDATA[synaptic]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wajig]]></category>

		<guid isPermaLink="false">http://raphaelhertzog.com/?p=1444</guid>
		<description><![CDATA[This is a frequently asked question: “What package manager shall I use?”. And my answer is “the one that suits your needs”. In my case, I even use different package managers depending on what I&#8217;m trying to do. APT vs dpkg, which one is the package manager? In the Debian world, we&#8217;re usually thinking of [...]]]></description>
			<content:encoded><![CDATA[<p>This is a frequently asked question: “What package manager shall I use?”. And my answer is “the one that suits your needs”. In my case, I even use different package managers depending on what I&#8217;m trying to do.</p>
<p><img src="http://raphaelhertzog.com/files/2011/06/road-sign-apt-get-aptitude.png" alt="" title="Apt-get or aptitude, pick your choice?" width="425" height="282" class="aligncenter size-full wp-image-1872" /></p>
<h3>APT vs dpkg, which one is the package manager?</h3>
<p>In the Debian world, we&#8217;re usually thinking of APT-based software when we&#8217;re referring to a &#8220;package manager&#8221;. But in truth, the real package manager is dpkg. It&#8217;s the low-level tool that takes a <a href="http://raphaelhertzog.com/2010/11/08/5-reasons-why-a-debian-package-is-more-than-a-simple-file-archive/">.deb file</a> and extracts its content on the disk, or that takes the name of a package to remove the associated files, etc.</p>
<p>APT is better known because it&#8217;s the part of the packaging infrastructure that matters to the user. APT makes collection of software available to the user and does the dirty work of downloading all the required packages and installing them by calling dpkg in the correct order to respect the dependencies.</p>
<p>But APT is not a simple program, it&#8217;s a library and several different APT frontends have been developed on top of that library. The most widely known is <code>apt-get</code> since it&#8217;s the oldest one, and it&#8217;s provided by APT itself.</p>
<h3>Graphical APT front-ends</h3>
<p><a href="http://packages.debian.org/sid/update-manager">update-manager</a> is a simple frontend useful to install security updates and other trivial daily upgrades (if you&#8217;re using testing or sid). It&#8217;s the one that you get when you click in the desktop notification that tells you that updates are available. In cases, where the upgrade is too complicated for update-manager, it will suggest to run <a href="http://packages.debian.org/sid/synaptic">synaptic</a> which is full featured package manager. You can browse the list on installed/available packages in numerous ways, you can mark packages for installation/upgrade/removal/purge and then run in one go all the recorded actions.</p>
<p><a href="http://packages.debian.org/sid/software-center">software-center</a> aims to be an easy to use application installer, it will hide most of the packaging details and will only present installed/available applications (as defined by a .desktop file). It&#8217;s very user friendly and has been developed by Ubuntu.</p>
<p>Of the graphical front-ends, I use mainly synaptic and only when I&#8217;m reviewing what I have installed to trim the system down.</p>
<h3>Console-based GUI APT front-ends</h3>
<p>In this category, I&#8217;ll cite only <a href="http://packages.debian.org/sid/aptitude">aptitude</a>. Run without parameter, it will start a powerful console-based GUI. Much like synaptic, you can have multiple views of the installed/available packages and mark packages for installation/upgrade/removal/purge before executing everything at once.</p>
<h3>Command-line based package managers and APT front-ends</h3>
<p>This is where the well known apt-get fits, but there are several other alternatives: aptitude, <a href="http://packages.debian.org/sid/cupt">cupt</a>, <a href="http://packages.debian.org/sid/wajig">wajig</a>. Wajig and cupt are special cases as they don&#8217;t use libapt: the former wraps several tools including apt-get, and the latter is a (partial) APT reimplementation (versions 1.x were in Perl, 2.x are now is C++).</p>
<p>You&#8217;re welcome to try them out and find out which one you prefer, but I have never felt the need to use something else than apt-get and aptitude.</p>
<h3>apt-get or aptitude?</h3>
<p>First I want to make it clear that you can use both and mix them without problems. It used to be annoying when apt-get did not track which packages were automatically installed while aptitude did, but now that both packages share this list, there&#8217;s no reason to avoid switching back and forth.</p>
<p>I would recommend apt-get for the big upgrades (i.e. dist-upgrade from one stable to the next) because it will always find quickly a relatively good solution while aptitude can find several convoluted solutions (or none) and it&#8217;s difficult to decide which one should be used.</p>
<p>On the opposite for regular upgrades in unstable (or testing), I would recommend &#8220;<code>aptitude safe-upgrade</code>&#8220;. It does a better job than apt-get at keeping on hold packages which are temporarily broken due to some not yet finished changes while still installing new packages when required. With aptitude it&#8217;s also possible to tweak dynamically the suggested operations while apt-get doesn&#8217;t allow this. And aptitude&#8217;s command line is probably more consistent: with apt-get you have to switch between apt-get and apt-cache depending on the operation that you want to do, aptitude on the other hand does everything by itself.</p>
<p>Take some time to read their respective documentation and to try them.</p>
<blockquote><p><a href="http://raphaelhertzog.com/email-newsletter/">Click here to subscribe to my free newsletter</a> and get my monthly analysis on what’s going on in Debian and Ubuntu. Or just follow along via the <a href="http://raphaelhertzog.com/feed/">RSS feed</a>, <a href="http://identi.ca/raphaelhertzog">Identi.ca</a>, <a href="http://twitter.com/raphaelhertzog">Twitter</a> or <a href="http://www.facebook.com/HertzogRaphael">Facebook</a>.</p></blockquote>
<p style="font-size: smaller"><a href="http://raphaelhertzog.com/2011/06/20/apt-get-aptitude-%e2%80%a6-pick-the-right-debian-package-manager-for-you/#comments">12 comments</a> | Liked this article? <a href="http://raphaelhertzog.com/support-my-work/">Click here</a>. | My blog is <a href="http://flattr.com/thing/26545/apt-get-install-debian-wizard">Flattr-enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphaelhertzog.com/2011/06/20/apt-get-aptitude-%e2%80%a6-pick-the-right-debian-package-manager-for-you/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

