<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>DNA of the TUX &#187; rpm</title>
	<atom:link href="http://tuxdna.wordpress.com/tag/rpm/feed/" rel="self" type="application/rss+xml" />
	<link>http://tuxdna.wordpress.com</link>
	<description>Organized thoughts</description>
	<lastBuildDate>Tue, 14 May 2013 18:00:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tuxdna.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>DNA of the TUX &#187; rpm</title>
		<link>http://tuxdna.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tuxdna.wordpress.com/osd.xml" title="DNA of the TUX" />
	<atom:link rel='hub' href='http://tuxdna.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A bug in RPM ? ( for rubygem-sprockets and rubygem-tilt )</title>
		<link>http://tuxdna.wordpress.com/2012/03/05/a-bug-in-rpm-for-rubygem-sprockets-and-rubygem-tilt/</link>
		<comments>http://tuxdna.wordpress.com/2012/03/05/a-bug-in-rpm-for-rubygem-sprockets-and-rubygem-tilt/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 12:48:23 +0000</pubDate>
		<dc:creator>tuxdna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://tuxdna.wordpress.com/?p=441</guid>
		<description><![CDATA[I packaged Rails 3.1.0 and its dependencies few days back for Fedora 16. The repository configuration file is as below: Now when I installed Rails 3.1.0, I got into a in issue: On the surface it seems that rubygem-sprockets wants rubygem-tilt with a version less than 1.3.0 ( we have only 1.3.3 and 1.3.2 available [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tuxdna.wordpress.com&#038;blog=10303502&#038;post=441&#038;subd=tuxdna&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I packaged<a href="http://tuxdna.fedorapeople.org/packaging/rubygems/f16/" target="_blank"> Rails 3.1.0 and its dependencies</a> few days back for Fedora 16. The repository configuration file is as below:</p>
<pre class="brush: plain; title: ; notranslate">
[rails3]
name=rails3
baseurl=http://tuxdna.fedorapeople.org/packaging/rubygems/f16/
enabled=1
gpgcheck=0
</pre>
<p>Now when I installed Rails 3.1.0, I got into a in issue:</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo yum install rubygem-rails-3.1.0
...OUTPUT SKIPPED...
--&gt; Running transaction check
---&gt; Package rubygem-polyglot.noarch 0:0.3.3-1.fc16 will be installed
---&gt; Package rubygem-sprockets.noarch 0:2.0.3-1.fc16 will be installed
--&gt; Processing Dependency: rubygem(tilt) &lt; 1.3.0 for package: rubygem-sprockets-2.0.3-1.fc16.noarch
--&gt; Finished Dependency Resolution
Error: Package: rubygem-sprockets-2.0.3-1.fc16.noarch (psb)
           Requires: rubygem(tilt) &lt; 1.3.0
           Installed: rubygem-tilt-1.3.3-1.fc16.noarch (@psb)
               rubygem(tilt) = 1.3.3
           Available: rubygem-tilt-1.3.2-1.fc16.noarch (fedora)
               rubygem(tilt) = 1.3.2
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
</pre>
<p>On the surface it seems that rubygem-sprockets wants rubygem-tilt with a version <strong>less than 1.3.0</strong> ( we have only 1.3.3 and 1.3.2 available here). However rubygem-sprockets also accepts rubygem-tilt with a version <strong>greater than 1.3.0</strong>, which is evident from the dependency list:</p>
<pre class="brush: bash; title: ; notranslate">
$ sudo yum deplist rubygem-sprockets-2.0.3-1.fc16.noarch 
Loaded plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit
Finding dependencies: 
package: rubygem-sprockets.noarch 2.0.3-1.fc16
...OUTPUT SKIPPED...
  dependency: rubygem(tilt) &gt;= 1.1
   provider: rubygem-tilt.noarch 1.3.3-1.fc16
  dependency: rubygem(tilt) &gt; 1.3.0
   provider: rubygem-tilt.noarch 1.3.3-1.fc16
  dependency: rubygem(tilt) &lt; 1.3.0
   Unsatisfied dependency
  dependency: rubygem(tilt) &lt; 2
   provider: rubygem-tilt.noarch 1.3.3-1.fc16
</pre>
<p>To verify that it is actually a problem specific to RPM, I downloaded the RPMs and tried installing with rpm command rather than yum:</p>
<pre class="brush: bash; title: ; notranslate">
$ yumdownloader rubygem-tilt-1.3.3-1.fc16.noarch
$ yumdownloader rubygem-sprockets-2.0.3-1.fc16.noarch
$ ls
rubygem-sprockets-2.0.3-1.fc16.noarch.rpm  rubygem-tilt-1.3.3-1.fc16.noarch.rpm
$ sudo rpm -i rubygem-sprockets-2.0.3-1.fc16.noarch.rpm 
error: Failed dependencies:
	rubygem(hike) &gt;= 1.2 is needed by rubygem-sprockets-2.0.3-1.fc16.noarch
	rubygem(hike) &lt; 2 is needed by rubygem-sprockets-2.0.3-1.fc16.noarch
	rubygem(tilt) &lt; 1.3.0 is needed by rubygem-sprockets-2.0.3-1.fc16.noarch
</pre>
<p>Cleary RPM doesn&#8217;t handle package version intervals well even though the information is available inside the package &#8211; rubygem-sprockets requires </p>
<pre class="brush: plain; title: ; notranslate">
rubygem-tilt: &gt;= 1.1, &lt; 1.3.0, &gt; 1.3.0, &lt; 2.0.0
</pre>
<p>I have RPM version 4.9.1.2 running on Linux 3.2.7-1.fc16.x86_64.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tuxdna.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tuxdna.wordpress.com/441/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tuxdna.wordpress.com&#038;blog=10303502&#038;post=441&#038;subd=tuxdna&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tuxdna.wordpress.com/2012/03/05/a-bug-in-rpm-for-rubygem-sprockets-and-rubygem-tilt/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/4a485e339c4de35684dfe31dc758041e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tuxdna</media:title>
		</media:content>
	</item>
		<item>
		<title>Problems with Ruby GEM to RPM</title>
		<link>http://tuxdna.wordpress.com/2012/03/04/problems-with-ruby-gem-to-rpm/</link>
		<comments>http://tuxdna.wordpress.com/2012/03/04/problems-with-ruby-gem-to-rpm/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 12:12:50 +0000</pubDate>
		<dc:creator>tuxdna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygem]]></category>

		<guid isPermaLink="false">http://tuxdna.wordpress.com/?p=415</guid>
		<description><![CDATA[I can&#8217;t emphasize more the importance of packaging RPMs ( or any other packaging system ), as I already did it in an earlier post. Same arguments apply to Ruby Gems as well. That is to say, Ruby Gems already have a gem command to install and update packages. However it is still not a [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tuxdna.wordpress.com&#038;blog=10303502&#038;post=415&#038;subd=tuxdna&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I can&#8217;t emphasize more the importance of packaging RPMs ( or any other packaging system ), as I already did it in an earlier <a href="http://tuxdna.wordpress.com/2012/01/27/packaging-java-jars-as-rpm-packages/" title="Packaging Java JARs as RPM packages " target="_blank">post</a>.</p>
<p>Same arguments apply to Ruby Gems as well. That is to say, Ruby Gems already have a <code>gem</code> command to install and update packages. However it is still not a complete packaging system in itself.</p>
<p>Consider the situation where you need to install a gem called A which dependes on B and C. So you will do:</p>
<p><code>gem install A</code></p>
<p><strong>Problem 1: Handling of install failure</strong></p>
<p>This would obviously install the gems in this order B, C and A. It does works for mostly perfect situations. However if C fails to install, &#8220;gem&#8221; won&#8217;t rollback ( i.e. uninstall B ) any steps till C&#8217;s failure. This is a problem.</p>
<p><strong>Problem 2: Creating RPM packages with ease</strong></p>
<p>If you ever happen to use <a href="http://docs.python.org/release/2.0/dist/creating-rpms.html" target="_blank">Python&#8217;s distutils</a>, you will find that it has ability to generate RPM packages from the setup.py itself. Which means an even wider adoption of Python packages.</p>
<p><code>python setup.py bdist_rpm</code></p>
<p>What takes for &#8220;gem&#8221; to support such a functionality? Since creating, installing, packaging and distributing Ruby gems is such a common activity for Ruby developers, I believe such should be available within the standard Ruby distribution.</p>
<p>For now I am using <a href="https://github.com/lutter/gem2rpm" target="_blank">gem2rpm</a> gem which requires a lot of manual intervention. Here is how it works ( as in my earlier <a href="http://tuxdna.wordpress.com/2012/02/22/ruby-gem-to-rpm-all-in-one-go/" title="Ruby GEM to RPM all in one go" target="_blank">post</a> ):</p>
<p><code><br />
gem fetch rubygem-my-favorite<br />
gem2rpm -s rubygem-my-favorite.gem<br />
</code></p>
<p>Checkout its <a href="https://github.com/lutter/gem2rpm" target="_blank">documentation</a> for more details.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tuxdna.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tuxdna.wordpress.com/415/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tuxdna.wordpress.com&#038;blog=10303502&#038;post=415&#038;subd=tuxdna&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tuxdna.wordpress.com/2012/03/04/problems-with-ruby-gem-to-rpm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/4a485e339c4de35684dfe31dc758041e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tuxdna</media:title>
		</media:content>
	</item>
		<item>
		<title>Packaging Java JARs as RPM packages</title>
		<link>http://tuxdna.wordpress.com/2012/01/27/packaging-java-jars-as-rpm-packages/</link>
		<comments>http://tuxdna.wordpress.com/2012/01/27/packaging-java-jars-as-rpm-packages/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 11:00:05 +0000</pubDate>
		<dc:creator>tuxdna</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://tuxdna.wordpress.com/?p=407</guid>
		<description><![CDATA[At JUDCon 2012, I had a discussion and argument with Jaikiran Pai and Ravi Maurya on &#8220;Packaging Java JARs as RPM packages&#8221;. Well it is not just RPM, it could be any package management system ( eg. dpkg, protage etc. ), doesn&#8217;t matter as long as it serves the purpose of: automatic dependency resolution installation [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tuxdna.wordpress.com&#038;blog=10303502&#038;post=407&#038;subd=tuxdna&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>At JUDCon 2012, I had a discussion and argument with <a href="http://jaitechwriteups.blogspot.com/" target="_blank">Jaikiran Pai</a> and <a href="http://www.linkedin.com/in/ravindramaurya" target="_blank">Ravi Maurya</a> on &#8220;Packaging Java JARs as RPM packages&#8221;.</p>
<p>Well it is not just RPM, it could be any package management system ( eg. dpkg, protage etc. ), doesn&#8217;t matter as long as it serves the purpose of:</p>
<ul>
<li>automatic dependency resolution</li>
<li>installation of dependencies</li>
<li>rollback an install step</li>
<li>install multiple versions of a (JAR) package</li>
<li>ensure the packages are authentic ( for security )</li>
</ul>
<p>How is all this achieved in Java world? Simple. Just package all the required JARs in a single JAR or WAR or an EAR for that matter. And trust the packager for its security. But:</p>
<ul>
<li>Is this a good practice?</li>
<li>What happens when you want to install the same package on multiple systems?</li>
<li>Can you roll back changes easily on multiple installations?</li>
<li>How are JARs shared across different kind of projects, some which use the same version of the same JAR package?</li>
</ul>
<p>Consider the case of Maven, with which you can easily specify the dependencies and Maven does all the work of dependency resolution.<br />
However, it solves the problem only at the developer&#8217;s level. JARs are still bundled inside the output application package (JAR / WAR / EAR). And everytime this application is distributed, it will contain &#8220;ALL&#8221; the dependencies. That is clearly an overhead.</p>
<p>That makes me think, why JARs don&#8217;t work like Shared Libraries, which can be shared across applications. Every classloader / JVM instance has its own version of the same JAR file on-disk! Can&#8217;t they be shared? That too is clearly an overhead. I am not aware of the reasons why it is so, which I would definitely like to know.</p>
<p>The point is, since a package manager has all the functionality, why not just leverage it? Java community is either unaware of it, or doesn&#8217;t care. </p>
<p>No problem. There are efforts already in place. </p>
<p>Anyway, of other things Jaikiran told me that, JBoss AS7 has how better and <a href="https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7" target="_blank">modular class loading</a> which is based on <a href="https://docs.jboss.org/author/display/MODULES/Home" target="_blank">JBoss Modules</a>. This appears to me similar to how Maven structures it JAR repositories.</p>
<p>Here are some resources:</p>
<ul>
<li><a href="http://stackoverflow.com/questions/1508762/what-is-the-proper-way-to-package-a-single-jar-file-as-rpm" target="_blank">What is the proper way to package a single jar file as rpm?</a></li>
<li><a href="http://blogs.oracle.com/arungupta/entry/packaging_java_apps_for_ubuntu" target="_blank">Packaging Java Apps for Ubuntu @ FOSS.IN</a></li>
<li><a href="http://fedoraproject.org/wiki/Packaging:Java" target="_blank">Java Packaging</a> in Fedora</li>
<li><a href="http://javaworkshop.wordpress.com/2008/10/22/rolling-up-an-rpm-for-a-java-application/" target="_blank">Creating an RPM for a Java Application</a></li>
<li><a href="http://mojo.codehaus.org/rpm-maven-plugin/" target="_blank">Maven plugin to create RPM packages</a></li>
</ul>
<p>Thats it folks!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tuxdna.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tuxdna.wordpress.com/407/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tuxdna.wordpress.com&#038;blog=10303502&#038;post=407&#038;subd=tuxdna&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tuxdna.wordpress.com/2012/01/27/packaging-java-jars-as-rpm-packages/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/4a485e339c4de35684dfe31dc758041e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tuxdna</media:title>
		</media:content>
	</item>
	</channel>
</rss>
