<?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 blog of Chris &#187; rpm</title>
	<atom:link href="http://blog.christophersmart.com/tag/rpm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.christophersmart.com</link>
	<description>Fortiter Et Recte</description>
	<lastBuildDate>Wed, 28 Dec 2011 23:39:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>On becoming a Fedora maintainer</title>
		<link>http://blog.christophersmart.com/2011/03/12/on-becoming-a-fedora-maintainer/</link>
		<comments>http://blog.christophersmart.com/2011/03/12/on-becoming-a-fedora-maintainer/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 09:41:13 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[koji]]></category>
		<category><![CDATA[kororaa]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[maintainer]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2549</guid>
		<description><![CDATA[Recently, Rahul Sandaram (Fedora dev and creator of the Omega Fedora Remix) offered to sponsor me to become a Fedora maintainer, which I accepted. A day or so later I pushed my first updates into Fedora for deja-dup &#8211; the package I now co-maintain while I learn the ropes. Previously, one would become a maintainer [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, <a href="https://fedoraproject.org/wiki/User:Sundaram">Rahul Sandaram</a> (Fedora dev and creator of the <a href="http://omega.dgplug.org/">Omega Fedora Remix</a>) offered to sponsor me to become a Fedora maintainer, which I accepted. A day or so later I pushed my first updates into Fedora for <a href="https://launchpad.net/deja-dup">deja-dup</a> &#8211; the package I now co-maintain while I learn the ropes.</p>
<p>Previously, one would become a maintainer by first submitting a new package and thereby overtime demonstrating an understanding of the Fedora packaging process and guidelines. However recently a <a href="http://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group#Become_a_comaintainer">new system was approved</a> whereby one could become a co-maintainer of an existing package, instead. This requires being sponsored by an existing maintainer, which Rahul was for me.</p>
<p>It&#8217;s quite a big task, but Rahul was very helpful and patient while I learned about the process. There is a <a href="http://fedoraproject.org/wiki/Join_the_package_collection_maintainers">lot of information on the Fedora Wiki</a> but I found there wasn&#8217;t really a single place which provided a nice overview, broke down each section in detail, and then explained all the steps required. So that (along with my cautious nature) meant it took a dozen or so clarifying emails back and forth between Rahul and myself.</p>
<p>When I got my first understanding and taste of the system though, I&#8217;ve gotta say, <em>I was quite impressed</em>. The scale of the system and architecture and how it all works is amazing. The build files (RPM spec files) of all the packages in Fedora are kept under <a href="http://fedoraproject.org/wiki/Using_Fedora_GIT">their own git repository</a>. Hooks into this git system and special build tools manage the whole process. All in all, this automation makes it quite seamless.</p>
<p>So after reading and doing everything Rahul sent to me, I started on my journey.</p>
<p>There are two development systems to update now &#8211; rawhide (development tree) and F15 (the upcoming version). I wanted to update both of these to the latest upstream version, 17.90. I also wanted to update the stable Fedora 14 package to an upstream bug-fix release, version 16.1.1.</p>
<p>Cloning deja-dup from the git repo put me in the rawhide branch by default. I updated the spec file &#8211; increasing the version, adding python-cloudfiles as a new dependency, and putting in a detailed changelog. I then committed that to my local git repo with a comment linking to upstream. I then pulled those changes from rawhide into the f15 branch and updated f14.</p>
<p><code>commit bb1a5daa9feea74640fd84a0174e74e4e83ad34b<br />
Author: Christopher Smart<br />
Date:   Sat Mar 5 21:23:07 2011 +1100<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp; Updated to upstream bugfix version 16.1.1.<br />
&nbsp;&nbsp;&nbsp;&nbsp; "This release fixes a bug in the just-released 16.1 that caused help<br />
&nbsp;&nbsp;&nbsp;&nbsp; documentation to not be translated."<br />
&nbsp;&nbsp;&nbsp;&nbsp; https://launchpad.net/deja-dup/+announcement/7239</code></p>
<p>Next I needed to test these packages, so I built a source RPM from the spec for each version. I discovered that one can either <a href="https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds">do a mock build</a> on their local machine, or <a href="https://fedoraproject.org/wiki/Using_the_Koji_build_system#Scratch_Builds">use Koji to do a scratch build</a> on Fedora&#8217;s online build system. I did both, which worked well.</p>
<p>Using Koji meant I needed to first push my changes back to Fedora first though (or so I thought), so I was hesitant to do it without first checking with Rahul. This was the sort of thing that was emailed back and forth &#8211; I didn&#8217;t fully understand the system and didn&#8217;t want to break anything! For example, in order to test my F14 update I had to push back to the git repo &#8211; but what if I made a mistake in the process? Would my build on Koji push this broken package onto everyone&#8217;s system?</p>
<p>Fortunately, no. Once all the updating of the spec file and building is complete, the maintainer has to formally submit it into the update process before anything will happen. In addition, each package must then pass approval by other maintainers before it is approved and pushed out. You can see why it took some back and forth between Rahul and myself &#8211; I wanted to be sure I wasn&#8217;t going to do some damage <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Along the way I discovered new automated ways of doing things, such as validating a spec file, automatically downloading the source tarball to update the spec file, then uploading it to the Fedora build system.</p>
<p>In the end though, I think that I have a pretty good grasp of the overall process and am quite excited by the prospect of becoming a Fedora maintainer. I&#8217;m hoping that deja-dup comes out with a new update soon, so that I can do another update!</p>
<p>I&#8217;m still a little hesitant to go and change things &#8211; I don&#8217;t want to do the wrong thing or step on anyone&#8217;s toes. I did however create my <a href="https://fedoraproject.org/wiki/User:Csmart">own page on the Fedora Wiki</a>, complete with a hackergotchi, of course.</p>
<p>So once again, thanks to Rahul for his patience and guidance <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2011/03/12/on-becoming-a-fedora-maintainer/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to upgrade Fedora (using PreUpgrade)</title>
		<link>http://blog.christophersmart.com/2010/11/15/how-to-upgrade-fedora-using-preupgrade/</link>
		<comments>http://blog.christophersmart.com/2010/11/15/how-to-upgrade-fedora-using-preupgrade/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 12:48:21 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[preupgrade]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2383</guid>
		<description><![CDATA[Coming from a Debian background, upgrading to new releases is second nature. Unfortunately, Fedora doesn&#8217;t seem to have it quite as down pat. Nevertheless, it&#8217;s possible and works quite well (but there are pitfalls, so read on). While upgrading via PackageKit is coming, there&#8217;s a pretty decent way of doing it with PreUpgrade. For the [...]]]></description>
			<content:encoded><![CDATA[<p>Coming from a Debian background, upgrading to new releases is second nature. Unfortunately, Fedora doesn&#8217;t seem to have it quite as down pat. Nevertheless, it&#8217;s possible and works quite well (but there are pitfalls, so read on).</p>
<p>While upgrading via PackageKit is coming, there&#8217;s a pretty decent way of <a href="http://fedoraproject.org/wiki/PreUpgrade">doing it with PreUpgrade</a>.</p>
<p>For the impatient, the steps are:</p>
<ul>
<li>yum update</li>
<li>yum install preupgrade</li>
<li>preupgrade (reboot)</li>
<li>yum distro-sync</li>
<li>package-cleanup &#8211;orphans (be careful!)</li>
<li>package-cleanup &#8211;leaves (be careful!)</li>
</ul>
<p>Now the longer version. First, update your current system:<br />
<code>yum update</code></p>
<p>Install preupgrade:<br />
<code>yum install preupgrade</code></p>
<p>Run the preupgrade tool, and follow the prompts (remote upgrades over VNC also supported):<br />
<code>preupgrade</code></p>
<p>PreUpgrade will prompt to reboot your computer and will update your system automatically. All of your packages should be updated and your repositories configured for you (I also had RPMFusion, Chromium and yum-rawhide which all updated as expected). On one of my systems, even the NVIDIA driver was automatically updated and configured. Now you&#8217;re booted into your new Fedora 14 system.</p>
<p>OK, this is where things get a little tricky. Some packages might be no-longer supported, there might be removed dependencies and the like. So, there are two neat commands that we will use to identify these packages, so that you can remove them.</p>
<p><code>package-cleanup --orphans<br />
package-cleanup --leaves</code></p>
<p><strong><em>But wait</em></strong>.. I discovered that there&#8217;s a more important step to do first, or you&#8217;ll cause yourself a headache!</p>
<p>On my machine, this wanted to remove some pretty important packages, like <em>kdelibs</em>.<br />
<code>[chris@shem ~]$ sudo package-cleanup --orphans<br />
[sudo] password for chris:<br />
Loaded plugins: refresh-packagekit, remove-with-leaves<br />
akonadi-1.4.0-3.fc13.x86_64<br />
kdeedu-marble-4.5.2-2.fc13.x86_64<br />
kdeedu-marble-libs-4.5.2-2.fc13.x86_64<br />
kdelibs-4.5.2-8.fc13.x86_64<br />
kdelibs-common-4.5.2-8.fc13.x86_64<br />
schroedinger-1.0.10-1.fc13.x86_64<br />
xorg-x11-drv-wacom-0.10.8-2.fc13.x86_64</code></p>
<p>Fedora (unlike certain other distros I know) provides major updates to the latest versions of packages (like OpenOffice.org, KDE, GNOME, etc). Yay! It&#8217;s possible that your new Fedora system is running the same version of, say KDE, as your old one. This was indeed the case with my Fedora 13 to 14 upgrade (both run KDE 4.5.2 at time of F14 release).</p>
<p>Actually, the build of some important packages on Fedora 13 (like <em>kdelibs-4.5.2-8.fc13.x86_64</em>) were <strong>actually more recent</strong> than on the newer Fedora 14 system (<em>kdelibs-4.5.2-5.fc14.x86_64</em>).</p>
<p>The package-cleanup tool correctly lists <em>kdelibs-4.5.2-8.fc13.x86_64</em> as being an orphan and if you were to remove this, you&#8217;d break your system badly. In fact, if you&#8217;re running <a href="http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/">yum&#8217;s brilliant new autoremove deps feature</a>, as I am, you&#8217;ll lose most of your system. It makes sense &#8211; you are telling yum to remove kdelibs, so it goes and removes everything that relies on it! Yikes.</p>
<p>So first, we need to fix this by running the <em>yum distro-sync</em> command which recognises that we need to <strong><em>downgrade</em></strong> that kdelibs packages (and not remove it!).</p>
<p><code>[chris@shem ~]$ sudo yum distro-sync<br />
Loaded plugins: refresh-packagekit, remove-with-leaves<br />
Setting up Distribution Synchronization Process<br />
Resolving Dependencies<br />
--> Running transaction check<br />
---> Package akonadi.x86_64 0:1.4.0-1.fc14 will be a downgrade<br />
---> Package akonadi.x86_64 0:1.4.0-3.fc13 will be erased<br />
---> Package kdeedu-marble.x86_64 0:4.5.2-1.fc14 will be a downgrade<br />
---> Package kdeedu-marble.x86_64 0:4.5.2-2.fc13 will be erased<br />
---> Package kdeedu-marble-libs.x86_64 0:4.5.2-1.fc14 will be a downgrade<br />
---> Package kdeedu-marble-libs.x86_64 0:4.5.2-2.fc13 will be erased<br />
---> Package kdelibs.x86_64 6:4.5.2-5.fc14 will be a downgrade<br />
---> Package kdelibs.x86_64 6:4.5.2-8.fc13 will be erased<br />
---> Package kdelibs-common.x86_64 6:4.5.2-5.fc14 will be a downgrade<br />
---> Package kdelibs-common.x86_64 6:4.5.2-8.fc13 will be erased<br />
---> Package schroedinger.x86_64 0:1.0.9-2.fc14 will be a downgrade<br />
---> Package schroedinger.x86_64 0:1.0.10-1.fc13 will be erased<br />
---> Package xorg-x11-drv-wacom.x86_64 0:0.10.8-1.20100726.fc14 will be a downgrade<br />
---> Package xorg-x11-drv-wacom.x86_64 0:0.10.8-2.fc13 will be erased<br />
--> Finished Dependency Resolution<br />
--> Finding unneeded leftover dependencies<br />
Found and removing 0 unneeded dependencies<br />
----<br />
Dependencies Resolved<br />
=================================================<br />
 Package                               Arch                      Version                                     Repository                 Size<br />
=================================================<br />
Downgrading:<br />
 akonadi                               x86_64                    1.4.0-1.fc14                                fedora                    677 k<br />
 kdeedu-marble                         x86_64                    4.5.2-1.fc14                                fedora                     14 M<br />
 kdeedu-marble-libs                    x86_64                    4.5.2-1.fc14                                fedora                    902 k<br />
 kdelibs                               x86_64                    6:4.5.2-5.fc14                              fedora                     12 M<br />
 kdelibs-common                        x86_64                    6:4.5.2-5.fc14                              fedora                    1.7 M<br />
 schroedinger                          x86_64                    1.0.9-2.fc14                                fedora                    276 k<br />
 xorg-x11-drv-wacom                    x86_64                    0.10.8-1.20100726.fc14                      fedora                     73 k<br />
---<br />
Transaction Summary<br />
=============================================================================================================================================<br />
Downgrade     7 Package(s)<br />
---<br />
Total download size: 30 M<br />
Is this ok [y/N]</code></p>
<p>Once we downgrade these packages, we can then remove any other orphans we might have, with <em>package-cleanup &#8211;leaves</em> and <em>package-cleanup &#8211;orphans</em> (I didn&#8217;t have any). One last thing to note &#8211; Fedora will not replace packages from the newer release if they are exactly the same version. For this reason, you will probably have some F13 packages still installed on your computer &#8211; don&#8217;t worry, that&#8217;s correct. They will be upgraded in time (if required).</p>
<p>So, now I think I know how to successfully upgrade the system without breaking it <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  If anyone has some other tips or corrections, please let me know! Hope that&#8217;s helpful.</p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2010/11/15/how-to-upgrade-fedora-using-preupgrade/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Testing yum&#8217;s autoremove orphaned deps feature</title>
		<link>http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/</link>
		<comments>http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 01:53:19 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2349</guid>
		<description><![CDATA[Yesterday I wrote about yum&#8217;s new feature which can automatically remove unused dependencies when a package is uninstalled. Today I got my hands on a suitable build of yum (add the yum-rawhide repo and set clean_requirements_on_remove=1 under [main] in /etc/yum.conf) and I started to test it out on several packages, all of which introduced dependencies. [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I wrote about yum&#8217;s new feature which can <a href="http://blog.christophersmart.com/2010/11/10/yum-gets-autoremove-dependency-feature/">automatically remove unused dependencies</a> when a package is uninstalled.</p>
<p>Today I got my hands on a suitable build of yum (add the <a href="http://repos.fedorapeople.org/repos/james/yum-rawhide/">yum-rawhide repo</a> and set <em>clean_requirements_on_remove=1</em> under <em>[main]</em> in <em>/etc/yum.conf</em>) and I started to test it out on several packages, all of which introduced dependencies. My initial findings? It&#8217;s great.</p>
<p><strong>Single package with dependencies</strong><br />
I started with a single package with several dependencies. When I uninstalled the parent package, yum also removed all of its dependencies which were not needed by any other package (i.e. orphaned dependencies).</p>
<p>Let&#8217;s look at an example; installing Ekiga which pulls in 5 dependencies.<br />
<code><br />
yum install ekiga<br />
...<br />
Installed:<br />
  ekiga.x86_64 0:3.2.7-4.fc14<br />
Dependency Installed:<br />
  evolution-data-server.x86_64 0:2.32.0-3.fc14      libgdata.x86_64 0:0.6.4-4.fc14      libgweather.x86_64 0:2.30.3-1.fc14      opal.x86_64 0:3.6.8-1.fc14<br />
  ptlib.x86_64 0:2.6.7-1.fc14<br />
</code></p>
<p>OK, so we have Ekiga, and we have 5 dependencies installed. What happens if I remove Ekiga?<br />
<code><br />
yum erase ekiga<br />
...<br />
Removed:<br />
  ekiga.x86_64 0:3.2.7-4.fc14<br />
Dependency Removed:<br />
  evolution-data-server.x86_64 0:2.32.0-3.fc14      libgdata.x86_64 0:0.6.4-4.fc14      libgweather.x86_64 0:2.30.3-1.fc14      opal.x86_64 0:3.6.8-1.fc14<br />
  ptlib.x86_64 0:2.6.7-1.fc14<br />
</code></p>
<p>As I was hoping, yum removed all 5 dependencies along with Ekiga itself. Ta da!</p>
<p><em>Result:</em> Tick!</p>
<p><strong>Packages with shared dependencies</strong><br />
I then tested two packages which have shared dependencies. What I would expect is that only the dependencies which are unique to the application being removed, are uninstalled. Other shared dependencies remain, because the other program still requires them and is not being removed.</p>
<p>Let&#8217;s look at an example; mplayer and vlc. Both require the <em>libcaca</em> library and installing both packages pulled in this library.<br />
VLC needs libcaca:<br />
<code><br />
yum deplist vlc |grep libcaca<br />
  dependency: libcaca.so.0()(64bit)<br />
   provider: libcaca.x86_64 0.99-0.10.beta17.fc14<br />
  dependency: libcaca.so.0()(64bit)<br />
   provider: libcaca.x86_64 0.99-0.10.beta17.fc14<br />
</code></p>
<p>And mplayer needs libcaca:<br />
<code><br />
yum deplist mplayer |grep libcaca<br />
  dependency: libcaca.so.0()(64bit)<br />
   provider: libcaca.x86_64 0.99-0.10.beta17.fc14<br />
  dependency: libcaca.so.0()(64bit)<br />
   provider: libcaca.x86_64 0.99-0.10.beta17.fc14<br />
</code></p>
<p>When I want to remove mplayer, yum only removes those mplayer dependencies which vlc does not also require, and leaves the rest (including libcaca).</p>
<p><code><br />
yum erase mplayer<br />
...<br />
Removed:<br />
  mplayer.x86_64 0:1.0-0.119.20100703svn.fc14<br />
Dependency Removed:<br />
  libvdpau.x86_64 0:0.4.1-1.fc14.1                 lzo.x86_64 0:2.03-3.fc12                 mplayer-common.x86_64 0:1.0-0.119.20100703svn.fc14<br />
</code></p>
<p>Note that libcaca was <em>not</em> removed, which is the expected result.</p>
<p><em>Result:</em> Tick!</p>
<p><strong>Removing a package&#8217;s dependency</strong><br />
I then tried to remove a dependency, rather than the parent package. I would expect this to remove all parents which required that package, along with <em>their other</em> dependencies.</p>
<p>Let&#8217;s look at an example, gnash-plugin. This package pulls in three dependencies (including the actual gnash package).</p>
<p><code><br />
yum install gnash-plugin<br />
...<br />
Installed:<br />
  gnash-plugin.x86_64 1:0.8.8-4.fc14<br />
Dependency Installed:<br />
  agg.x86_64 0:2.5-9.fc13                        gnash.x86_64 1:0.8.8-4.fc14                        gtkglext-libs.x86_64 0:1.2.0-10.fc12</code></p>
<p>Now, let&#8217;s see what happens if I try and remove one of the dependencies.</p>
<p><code>yum erase agg<br />
...<br />
Removed:<br />
  agg.x86_64 0:2.5-9.fc13<br />
Dependency Removed:<br />
  gnash.x86_64 1:0.8.8-4.fc14                    gnash-plugin.x86_64 1:0.8.8-4.fc14                    gtkglext-libs.x86_64 0:1.2.0-10.fc12<br />
</code></p>
<p>As you can see, it correctly removed the parent package, which could no-longer operate without the dependency.</p>
<p>This is <strong><em>such</em></strong> a great advancement over remove-leaves, where last time I tried to remove gnash-plugin (after testing it out, I didn&#8217;t want it) yum <a href="http://blog.christophersmart.com/2009/07/13/fedora-removing-unwanted-deps/">wanted to remove Firefox!!</a> Fail.</p>
<p><em>Result:</em> Tick!</p>
<p><strong>Suggestion &#8211; clean up existing system</strong><br />
One thing I would like, is the ability to run a system wide cleanup using this code in yum, rather than other rpm orphan tools. Sort-of like an <em>apt-get autoremove</em>. Theoretically, if you&#8217;ve always removed any packages on your system with this new feature then you should be right, but it would be nice to sort-of do a clean up at any point (on any system) and get yum to remove any orphaned deps for you. Maybe this already exists.</p>
<p>If you want to clean up existing orphaned dependencies, then <em>package-cleanup</em> is your friend (from <em>yum-utils</em>).</p>
<p>Take a look at all the packages that are orphaned, and make sure it is sane.<br />
<code><br />
package-cleanup --leaves<br />
</code></p>
<p>If you&#8217;re happy with the list, you can just remove them all (after you&#8217;ve enabled yum&#8217;s new autoremove feature, of course!):</p>
<p><code><br />
yum erase $(package-cleanup --leaves)<br />
</code></p>
<p>You can instantly see the benefit of this new feature &#8211; on my machine this command also removes <em>brand new</em> orphaned dependencies, created by the orphans I&#8217;m removing! That&#8217;s 59 packages in total.</p>
<p>Without this yum feature, it would only remove 36 packages. You would need to run package-cleanup several times, until you&#8217;ve really removed all orphaned packages.</p>
<p>Similarly, this works for <em>package-cleanup &#8211;orphans</em> but it would be great it this was built into a single <em>yum cleanup</em> type function &#8211; one command to do it all.</p>
<p><strong>Summary</strong><br />
From my initial testing, this <em>works really well</em>, although I&#8217;ll continue to test it and see how we go. Hopefully this will find its way into Fedora 12, 13, and 14 rather than just 15.</p>
<p>I&#8217;m so grateful <a href="http://skvidal.wordpress.com/2010/11/09/orphaned-dep-cleanup-in-yum/">for this work</a> &#8211; it&#8217;s something I&#8217;ve been crying out for ever since I made the decision to stick with Fedora. Thank you, thank you, thank you!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Yum gets autoremove dependency feature</title>
		<link>http://blog.christophersmart.com/2010/11/10/yum-gets-autoremove-dependency-feature/</link>
		<comments>http://blog.christophersmart.com/2010/11/10/yum-gets-autoremove-dependency-feature/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 02:58:01 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[deps]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[leaves]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2330</guid>
		<description><![CDATA[Coming from a Gentoo/Debian background, one thing that has constantly bugged me on RPM based platforms like Fedora is the lack of decent, reliable dependency removal. It seems so simple (and Debian has done it since the dawn of time) &#8211; if I install package x which pulls in dependencies y and z, then when [...]]]></description>
			<content:encoded><![CDATA[<p>Coming from a Gentoo/Debian background, one thing that has constantly bugged me on RPM based platforms like Fedora is the lack of decent, reliable dependency removal.</p>
<p>It seems so simple (and Debian has done it since the dawn of time) &#8211; if I install package <em>x</em> which pulls in dependencies <em>y</em> and <em>z</em>, then when I remove package <em>x</em>, I want to remove dependencies <em>y</em> and <em>z</em>, if they are not required by any other package.</p>
<p>Yes, there is the remove-leaves plugin for Yum and various RPM orphan checking tools, but in my experience, they are <a href="http://blog.christophersmart.com/2009/07/13/fedora-removing-unwanted-deps/">just not reliable</a>.</p>
<p>So, I&#8217;m very happy to have discovered that Seth Vidal has merged <a href="http://skvidal.wordpress.com/2010/11/09/orphaned-dep-cleanup-in-yum/">orphaned dependency cleanup on removal into Yum</a>. Hallelujah!</p>
<p>It&#8217;s in rawhide yum-3.2.28-13, and I&#8217;ll do some testing soon&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2010/11/10/yum-gets-autoremove-dependency-feature/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Encrypted DVDs and Fedora</title>
		<link>http://blog.christophersmart.com/2010/10/25/encrypted-dvds-and-fedora/</link>
		<comments>http://blog.christophersmart.com/2010/10/25/encrypted-dvds-and-fedora/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 08:35:52 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[libdvdcss]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[livna]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[rpmfusion]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2306</guid>
		<description><![CDATA[The well known RPMFusion repository contains a lot of the useful software which Red Hat doesn&#8217;t ship by default (for licensing, patent or legal reasons). It is the amalgamation of several other repositories, including Dribble, Freshrpms, and Livna. One helpful package that RPMFusion does not package however, is libdvdcss, the free software library which enables [...]]]></description>
			<content:encoded><![CDATA[<p>The well known <a href="http://rpmfusion.org/">RPMFusion repository</a> contains a lot of the useful software which Red Hat doesn&#8217;t ship by default (for licensing, patent or legal reasons). It is the amalgamation of several other repositories, including Dribble, Freshrpms, and Livna.</p>
<p>One helpful package that RPMFusion does not package however, is <a href="http://www.videolan.org/developers/libdvdcss.html">libdvdcss</a>, the free software library which enables Linux to play encrypted DVDs.</p>
<p>Most users keep Livna around for this single purpose, but it is often offline (especially recently). So, here&#8217;s another solution &#8211; use <A href="http://atrpms.net/">ATrpms</a> &#8211; another third party repository that includes lots of handy software.</p>
<p>The problem is, ATrpms has lots of other software which you might not want to update and which could conflict with the packages from RPMFusion. The solution? Tell yum to only include libdvdcss* packages from that repository. Easy.</p>
<p>To do this, simply add a new repo file (<em>/etc/yum.repos.d/atrpms.repo</em>) for Yum to configure it.<br />
<code>[atrpms]<br />
name=Fedora Core $releasever - $basearch - ATrpms<br />
baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable<br />
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms<br />
gpgcheck=1<br />
includepkgs=libdvdcss* </code></p>
<p>Now, just run the following to update the repo and install libdvdcss (you may wish to remove the old package first, if you have it).<br />
<code>sudo yum check-update<br />
sudo yum install libdvdcss<br />
</code></p>
<p>That&#8217;s about it!</p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2010/10/25/encrypted-dvds-and-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yum still on the menu?</title>
		<link>http://blog.christophersmart.com/2009/06/24/yum-still-on-the-menu/</link>
		<comments>http://blog.christophersmart.com/2009/06/24/yum-still-on-the-menu/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:15:19 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[comparision]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=876</guid>
		<description><![CDATA[Update: I&#8217;ve tried to post my results back to Seth&#8217;s thread but it won&#8217;t work, so I&#8217;ve emailed him instead. In response to my article comparing Yum and Apt (at least I think it was my article, might have been someone else&#8217;s I guess), lead developer of Yum, Seth Vidal, wrote his own test script [...]]]></description>
			<content:encoded><![CDATA[<p><em>Update: I&#8217;ve tried to post my results back to Seth&#8217;s thread but it won&#8217;t work, so I&#8217;ve emailed him instead.</em></p>
<p>In response to my <a href="http://www.linux-mag.com/id/7382/">article comparing Yum and Apt</a> (at least I think it was my article, might have been someone else&#8217;s I guess), lead developer of Yum, <a href="http://skvidal.wordpress.com/">Seth Vidal</a>, wrote his own test script and performed <a href="http://skvidal.wordpress.com/2009/06/18/yum-benchmarks/">some Yum benchmarks of his own</a>.</p>
<p>He wrote:</p>
<blockquote><p>Always a fun comparison. It’d be even more fun if any of the numbers seemed accurate.</p></blockquote>
<p>His ran his test and concluded that Yum is &#8220;pretty good&#8221; and offers for others to run the test and post their results. So I did, on the same computer I used for the my article. I also compared the results to Ubuntu, as that&#8217;s really what my article was talking about <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So what did I find?</p>
<p><span id="more-876"></span><br />
<strong>Scripts</strong><br />
Firstly, here is the script he wrote:<br />
<a href="http://skvidal.fedorapeople.org/misc/yum-test.sh.txt">http://skvidal.fedorapeople.org/misc/yum-test.sh.txt</a></p>
<p>Here is the script I modified for Ubuntu:<br />
<a href="http://christophersmart.com/files/apt-test.sh">http://christophersmart.com/files/apt-test.sh</a></p>
<p><strong>Preparation</strong><br />
Before running the tests I first deleted all old repo data as I wanted as clean a system as possible. I then ran &#8220;yum check-update&#8221; and &#8220;yum install -y &#8211;downloadonly zziplib-utils&#8221; on Fedora so that I had an up-to-date package database and the files locally. I did the same thing on Ubuntu (but obviously not with &#8220;yum&#8221;).</p>
<p>Then I uninstalled &#8220;yum-plugin-downloadonly&#8221; and &#8220;yum-plugin-download-remove-with-leaves&#8221; and rebooted, so that it would not negatively affect the speed of Yum having to load extra plugins outside of the default.</p>
<p>I also ran the tests in <em>single user mode</em> so that other system processes such as PackageKit would not interfere.</p>
<p>After I had run both scripts, I also re-ran each of the tests <em>individually</em> (which below I call &#8220;freshboot&#8221;), rebooting in between each one so that memory caching would not manipulate the results. After all, running all those commands one after another is bound to overlap and I don&#8217;t think provides an accurate benchmark of each package management component.</p>
<p><strong>Results</strong><br />
Results for Fedora 11 are here, followed by results on a freshboot:<br />
<a href="http://christophersmart.com/files/simple-yum-results.txt">http://christophersmart.com/files/simple-yum-results.txt</a><br />
<a href="http://christophersmart.com/files/simple-yum-results-freshboot.txt">http://christophersmart.com/files/simple-yum-results-freshboot.txt</a></p>
<p>Ubuntu 9.04 results are here, followed by results on a freshboot:<br />
<a href="http://christophersmart.com/files/simple-apt-results.txt">http://christophersmart.com/files/simple-apt-results.txt</a><br />
<a href="http://christophersmart.com/files/simple-apt-results-freshboot.txt">http://christophersmart.com/files/simple-apt-results-freshboot.txt</a></p>
<p><strong>Analysis</strong></p>
<p><em><strong>Search by keyword</strong></em><br />
Yum provided 5 results and took 4.746s<br />
Apt provided 12 results and took 1.366s</p>
<p><em>Apt was 3.47 times faster.</em></p>
<p><em>Fresh boot</em><br />
Yum took 3.380s<br />
Apt took 1.240s</p>
<p><em>Apt was 2.73 times faster.</em><br />
NOTE: I don&#8217;t know why this results were faster on a freshboot, they should be about the same as the first test was on a fresh boot anyway!</p>
<p><strong><em>Search by file provide</em></strong><br />
Yum took 10.654s<br />
Apt took 2.291s</p>
<p><em>Apt was 4.65 times faster.</em><br />
NOTE: I have discovered that running &#8220;yum provides&#8221; builds a cache and so subsequent searches are much faster. Debian has two tools for this, apt-file and dpkg, but dpkg only works for installed packages while apt-file does the entire repository. Also, apt-file needs to be updated like apt-get does, so perhaps a better comparison is needed.</p>
<p><em>Fresh boot</em><br />
Yum took 10.903s<br />
Apt took 2.354s</p>
<p><em>Apt was 4.63 times faster.</em></p>
<p><em><strong>List installed pkgs</strong></em></p>
<p>Yum listed 1,092 packages and took 1.756s<br />
Apt listed 1,188 packages and took 0.191s</p>
<p><em>Apt was 9.19 times faster.</em></p>
<p><em>Fresh boot</em><br />
Yum took 3.924s<br />
Apt took 0.187s</p>
<p><em>Apt was 20.98 times faster.</em></p>
<p><em><strong>Install pkg + deps</strong></em><br />
Yum installed two programs and took 9.775s<br />
Apt installed two programs and took 4.868s</p>
<p><em>Apt was 2.01 times faster.</em><br />
NOTE: I didn&#8217;t install the same program for my tests, but in my article Apt was about 3 times faster.</p>
<p><em>Fresh boot</em><br />
Yum took 14.097s<br />
Apt took 5.671s</p>
<p><em>Apt was 2.49 times faster.</em></p>
<p><em><strong>Removing package</strong></em></p>
<p>Yum took 3.714s<br />
Apt took 2.337s</p>
<p><em>Apt was 1.56 times faster.</em><br />
NOTE: For the tests in my article I used yum with &#8220;&#8211;remove-leaves&#8221;, which checks to see if any other programs requires the dependencies of the package you&#8217;re using and if not, removes those too. This was not done here, which is most likely the cause of the big difference between these and the results in my article. In my article I used tomboy for my tests (after I had removed all mono applications and then re-installed tomboy) which had to remove 7 dependencies. The test used in this script is not really testing all that.</p>
<p><em>Fresh boot</em><br />
Yum took 10.137s<br />
Apt took 4.916s</p>
<p><em>Apt was 2.06 times faster.</em></p>
<p><strong>Conclusion</strong><br />
Seth&#8217;s test seem to confirm my own findings, with the exception of installing and removing packages. Naturally I installed different packages than were used here and I also used the remove-with-leaves plugin for Yum to make it remove no-longer needed dependencies.</p>
<p>These two tests probably caused the most eyebrow raising (as in my article it shows Ubuntu as being 3 and 5 times faster, respectively) but they aren&#8217;t really addressed in Seth&#8217;s script. The results from his script are in Ubuntu&#8217;s favour to a factor of 2.5 and 2, respectively so it&#8217;s not crazily out of proportion. I&#8217;d be interested to see some results on this. Also, a better test for searching by provides would be useful.</p>
<p>Of course it is hard to compare these when they all use different packages and pull in different dependencies. This is why I also had a test to install from a file rather than the database. My test installed Skype via an rpm and deb (ugly I know, but it was the only 3rd party application I could find which provided native packages for both distros), which had zero dependencies and was not in the local database. In my tests Ubuntu was faster than Fedora by a factor of 7. I&#8217;d like to see this included in his script too.</p>
<p>It is interesting to see that Apt is faster still, when running from a fresh boot.</p>
<p>Never-the-less, I would invite any others who wish to test to do so also and let me know how it went. Sure, Yum might have bucket loads more metadata and maybe it can do lots more fancy things, but at the end of the day it still comes in at second place here.</p>
<p>And while I&#8217;m writing all this up, I want to clarify that I&#8217;m not a Yum hater. I do agree with Seth that Yum is &#8220;pretty good&#8221;, but I just wish it would be better. Actually, I also <em>really</em> like Fedora.</p>
<p>As I concluded in my original article, maybe no-one cares how fast or slow their package manager is. Then again, maybe some people do. Personally, I&#8217;d love to see Yum become the best package manager on the planet <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>What I now want to know are all the <em>tweaks and configurations people do to their Yum systems</em> to get better performance. Tips anyone?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/06/24/yum-still-on-the-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Having Yum for Breakfast</title>
		<link>http://blog.christophersmart.com/2009/06/19/having-yum-for-breakfast/</link>
		<comments>http://blog.christophersmart.com/2009/06/19/having-yum-for-breakfast/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 22:52:23 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[managment]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=858</guid>
		<description><![CDATA[This week I decided to write a comparative article between Yum and Apt (the package managers). Using Fedora 11 and Ubuntu 9.04, I performed various tests and benchmarked both the time and CPU usage they took. But why? Let me explain. I really like the Fedora project. Really. I like their stance on proprietary drivers [...]]]></description>
			<content:encoded><![CDATA[<p>This week I decided to write a <a href="http://www.linux-mag.com/id/7382/">comparative article between Yum and Apt</a> (the package managers). Using Fedora 11 and Ubuntu 9.04, I performed various tests and benchmarked both the time and CPU usage they took. But why? Let me explain.</p>
<p>I really like the <a href="http://fedoraproject.org">Fedora project</a>. Really. I like their stance on proprietary drivers and codecs (and of course free software) and these days they seem to be pushing the technological envelope more than others. Sure Red Hat drives the direction of the project somewhat, but I don&#8217;t mind Red Hat either.</p>
<p>In fact, I wish I could use Fedora as my main distro! But every time I try it I just get so frustrated with <a href="http://yum.baseurl.org/">Yum</a>. Sure it&#8217;s better than up2date, but it&#8217;s so damn slow and annoying. That&#8217;s a problem for someone like me who manually updates his package database first thing every morning and checks to see what packages are available and updates the system by hand. Why do I do that? Cause I like to.</p>
<p>But every time I&#8217;ve tried to get into Fedora that damn package manager has stopped me. I get frustrated after a day or so. I think the longest I&#8217;ve had it on was 2 days before I switched.</p>
<p>Recently I installed Fedora 10 and 11 to see if there was any performance increase. Actually, to tell you the truth <em>I was completely surprised by Yum&#8217;s agility and speed</em>. The old Fedora I remember was not to be seen.. or so it felt like anyway.</p>
<p>Hence, I thought it might be good to run some tests to see.</p>
<p>Of course as the article points out, does any of this matter? Do we really need a fast a nimble package manager? Well for me it matters. It matters a great deal. For most users though they probably won&#8217;t care, as they just let the package manager do its thing in the background.</p>
<p>Still, it makes for some interesting thoughts. I think.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/06/19/having-yum-for-breakfast/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Yum, it&#8217;s starting to get tasty</title>
		<link>http://blog.christophersmart.com/2009/06/11/yum-its-starting-to-get-tasty/</link>
		<comments>http://blog.christophersmart.com/2009/06/11/yum-its-starting-to-get-tasty/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 05:35:21 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[11]]></category>
		<category><![CDATA[cambridge]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[leonidas]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=846</guid>
		<description><![CDATA[Matt will attest the fact that I eagerly download each and every new Fedora release, hoping that this release will be one I could see myself using long term. Fedora 11 Leonidas is out and one of the marked improvements is the release of RPM 4.7.0, which has much better memory management. I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oliver.net.au">Matt</a> will attest the fact that I eagerly download each and every new Fedora release, hoping that this release will be one I could see myself using long term. Fedora 11 Leonidas is out and one of the marked improvements is the release of RPM 4.7.0, which has much better memory management. I wanted to see if this translates into performance gains in every day computing and have <a href="http://www.linux-mag.com/id/7366/">written an article for Linux Magazine</a> with my findings.</p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/06/11/yum-its-starting-to-get-tasty/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

