<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>
<channel>
	<title>G-Loaded Journal &#187; Packaging</title>
	<atom:link href="http://www.g-loaded.eu/tag/packaging/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Mon, 05 Dec 2011 19:55:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>The kind of RPM dependencies I dislike</title>
		<link>http://www.g-loaded.eu/2009/10/12/the-kind-of-rpm-dependencies-i-dislike/</link>
		<comments>http://www.g-loaded.eu/2009/10/12/the-kind-of-rpm-dependencies-i-dislike/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 16:29:14 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Packaging]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/?p=1309</guid>
		<description><![CDATA[There are times that I strongly believe that the developers of software that aims to be included in a Linux distribution and also the packagers of that software should make sure that a command-line only application does not require the presence of a graphical application in order to run. By not doing so they cause [...]]]></description>
			<content:encoded><![CDATA[<p>There are times that I strongly believe that the developers of software that aims to be included in a Linux distribution and also the packagers of that software should make sure that a command-line only application does not require the presence of a graphical application in order to run. By not doing so they cause some serious trouble to those who wish to maintain a minimal installation of the operating system. Although the examples are many, here is the relevant part of the output of the command: <strong>yum install ImageMagick</strong><br />
<span id="more-1309"></span></p>
<pre class="codesnp">
Dependencies Resolved
====================================================================================================================================================================================
 Package                                          Arch                               Version                                              Repository                           Size
====================================================================================================================================================================================
Installing:
 ImageMagick                                      i386                               6.2.8.0-4.el5_1.1                                    base                                3.3 M
Installing for dependencies:
 GConf2                                           i386                               2.14.0-9.el5                                         base                                1.5 M
 ORBit2                                           i386                               2.14.3-5.el5                                         base                                252 k
 alsa-lib                                         i386                               1.0.17-1.el5                                         base                                412 k
 atk                                              i386                               1.12.2-1.fc6                                         base                                222 k
 audiofile                                        i386                               1:0.2.6-5                                            base                                107 k
 avahi                                            i386                               0.6.16-1.el5_2.1                                     updates                             250 k
 avahi-glib                                       i386                               0.6.16-1.el5_2.1                                     updates                              14 k
 cairo                                            i386                               1.2.4-5.el5                                          base                                394 k
 chkfontpath                                      i386                               1.10.1-1.1                                           base                                 15 k
 cryptsetup-luks                                  i386                               1.0.3-4.el5                                          base                                623 k
 cups-libs                                        i386                               1:1.3.7-8.el5_3.6                                    updates                             193 k
 dbus                                             i386                               1.1.2-12.el5                                         base                                234 k
 dbus-glib                                        i386                               0.73-8.el5                                           base                                160 k
 dbus-libs                                        i386                               1.1.2-12.el5                                         base                                123 k
 dbus-python                                      i386                               0.70-7.el5                                           base                                161 k
 dmidecode                                        i386                               1:2.7-1.28.2.el5                                     base                                 62 k
 esound                                           i386                               1:0.2.36-3                                           base                                129 k
 fontconfig                                       i386                               2.4.1-7.el5                                          base                                174 k
 gamin                                            i386                               0.1.7-8.el5                                          base                                118 k
 gd                                               i386                               2.0.33-9.4.el5_1.1                                   base                                157 k
 ghostscript                                      i386                               8.15.2-9.4.el5_3.7                                   updates                             5.9 M
 ghostscript-fonts                                noarch                             5.50-13.1.1                                          base                                801 k
 gnome-keyring                                    i386                               0.6.0-1.fc6                                          base                                170 k
 gnome-mime-data                                  i386                               2.4.2-3.1                                            base                                690 k
 gnome-mount                                      i386                               0.5-3.el5                                            base                                 70 k
 gnome-vfs2                                       i386                               2.16.2-4.el5                                         base                                1.3 M
 gnutls                                           i386                               1.4.1-3.el5_3.5                                      updates                             348 k
 gtk2                                             i386                               2.10.4-20.el5                                        base                                6.5 M
 hal                                              i386                               0.5.8.1-38.el5                                       base                                381 k
 hicolor-icon-theme                               noarch                             0.9-2.1                                              base                                 25 k
 hwdata                                           noarch                             0.213.11-1.el5                                       base                                357 k
 lcms                                             i386                               1.18-0.1.beta1.el5_3.2                               updates                             176 k
 libFS                                            i386                               1.0.0-3.1                                            base                                 30 k
 libICE                                           i386                               1.0.1-2.1                                            base                                 54 k
 libIDL                                           i386                               0.8.7-1.fc6                                          base                                 85 k
 libSM                                            i386                               1.0.1-3.1                                            base                                 27 k
 libXcursor                                       i386                               1.1.7-1.1                                            base                                 32 k
 libXext                                          i386                               1.0.1-2.1                                            base                                 35 k
 libXfixes                                        i386                               4.0.1-2.1                                            base                                 14 k
 libXfont                                         i386                               1.2.2-1.0.3.el5_1                                    base                                241 k
 libXft                                           i386                               2.1.10-1.1                                           base                                 44 k
 libXi                                            i386                               1.0.1-3.1                                            base                                 25 k
 libXinerama                                      i386                               1.0.1-2.1                                            base                                9.7 k
 libXpm                                           i386                               3.5.5-3                                              base                                 45 k
 libXrandr                                        i386                               1.1.1-3.1                                            base                                 15 k
 libXrender                                       i386                               0.9.1-3.1                                            base                                 27 k
 libXres                                          i386                               1.0.1-3.1                                            base                                 14 k
 libXt                                            i386                               1.0.2-3.1.fc6                                        base                                175 k
 libbonobo                                        i386                               2.16.0-1.fc6                                         base                                501 k
 libbonoboui                                      i386                               2.16.0-1.fc6                                         base                                389 k
 libcroco                                         i386                               0.6.1-2.1                                            base                                127 k
 libdaemon                                        i386                               0.10-5.el5                                           base                                 24 k
 libfontenc                                       i386                               1.0.2-2.2.el5                                        base                                 19 k
 libglade2                                        i386                               2.6.0-2                                              base                                 96 k
 libgnome                                         i386                               2.16.0-6.el5                                         base                                858 k
 libgnomecanvas                                   i386                               2.14.0-4.1                                           base                                222 k
 libgnomeui                                       i386                               2.16.0-5.el5                                         base                                978 k
 libgsf                                           i386                               1.14.1-6.1                                           base                                116 k
 libnotify                                        i386                               0.4.2-6.el5                                          base                                 37 k
 librsvg2                                         i386                               2.16.1-1.el5                                         base                                178 k
 libtiff                                          i386                               3.8.2-7.el5_3.4                                      updates                             306 k
 libutempter                                      i386                               1.1.4-4.el5                                          base                                 22 k
 libvolume_id                                     i386                               095-14.20.el5_3                                      updates                              40 k
 libwmf                                           i386                               0.2.8.4-10.2                                         updates                             834 k
 libwnck                                          i386                               2.16.0-4.fc6                                         base                                185 k
 libxml2-python                                   i386                               2.6.26-2.1.2.8                                       updates                             702 k
 notification-daemon                              i386                               0.3.5-9.el5                                          base                                 47 k
 pango                                            i386                               1.14.9-5.el5.centos                                  updates                             335 k
 pciutils                                         i386                               2.2.3-5                                              base                                 83 k
 pm-utils                                         i386                               0.99.3-10.el5.centos                                 base                                 67 k
 shared-mime-info                                 i386                               0.19-5.el5                                           base                                148 k
 startup-notification                             i386                               0.8-4.1                                              base                                 32 k
 ttmkfdir                                         i386                               3.0.9-23.el5                                         base                                 46 k
 urw-fonts                                        noarch                             2.3-6.1.1                                            base                                4.5 M
 xorg-x11-font-utils                              i386                               1:7.1-2                                              base                                 75 k
 xorg-x11-xfs                                     i386                               1:1.0.2-4                                            base                                 68 k
Transaction Summary
====================================================================================================================================================================================
Install     77 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total size: 37 M
Total download size: 37 M
Is this ok [y/N]:
</pre>
<p>Why should I require all of these if I only want to resize an image or do some other basic transformations?</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2009/10/12/the-kind-of-rpm-dependencies-i-dislike/">The kind of RPM dependencies I dislike</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2005/10/11/the-road-to-alexandria/" rel="bookmark">The road to Alexandria&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2009/04/09/yum-priorities-configuration-for-a-centos-desktop/" rel="bookmark">YUM-Priorities Configuration for a CentOS Desktop</a></li>
<li><a href="http://www.g-loaded.eu/2005/12/11/local-yum-repository/" rel="bookmark">Local YUM Repository</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/10/spec-file-directory/" rel="bookmark">SPEC File Directory</a></li>
<li><a href="http://www.g-loaded.eu/2007/11/18/problems-using-libnotify-for-user-to-user-notifications/" rel="bookmark">Problems using libnotify for User to User Notifications</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2009/10/12/the-kind-of-rpm-dependencies-i-dislike/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>How to extract RPM or DEB packages</title>
		<link>http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/</link>
		<comments>http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 00:30:32 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[DEB]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Shell]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/</guid>
		<description><![CDATA[RPM and DEB packages are both containers for other files. An RPM is some sort of cpio archive. On the other hand, a DEB file is a pure ar archive. So, it should be possible to unpack their contents using standard archiving tools, regardless of your distribution&#8217;s package format. Under normal conditions, you should use [...]]]></description>
			<content:encoded><![CDATA[<p>RPM and DEB packages are both containers for other files. An RPM is some sort of <strong>cpio</strong> archive. On the other hand, a DEB file is a pure <strong>ar</strong> archive. So, it should be possible to unpack their contents using standard archiving tools, regardless of your distribution&#8217;s package format. Under normal conditions, you should use your distribution&#8217;s standard package manager, <strong>rpm</strong> or <strong>dpkg</strong> and their frontends, to manage those files. But, if you need to be more generic, here is how to do it.<br />
<span id="more-482"></span></p>
<h4>RPM</h4>
<p>For RPMs you need two command line utilities, <strong>rpm2cpio</strong> and <strong>cpio</strong>. Extracting the contents of the RPM package is a <em>one step</em> process:</p>
<pre class="console">rpm2cpio mypackage.rpm | cpio -vid</pre>
<p>If you just need to list the contents of the package without extracting them, use the following:</p>
<pre class="console">rpm2cpio mypackage.rpm | cpio -vt</pre>
<p>The <strong>-v</strong> option is used in order to get verbose output to the stdout. If you don&#8217;t need it, you can safely omit this switch. For more information about the <code>cpio</code> options, please refer to the <code>cpio(1)</code> manual page.</p>
<h4>DEB</h4>
<p>DEB files are <em>ar archives</em>, which contain three files:</p>
<ul>
<li>debian-binary</li>
<li>control.tar.gz</li>
<li>data.tar.gz</li>
</ul>
<p>As you might have already guessed, the needed archived files exist in <code>data.tar.gz</code>. It is also obvious that unpacking this file is a <em>two-step</em> process.</p>
<p>First, extract the aforementioned three files from the DEB file (<strong>ar</strong> archive):</p>
<pre class="console">ar vx mypackage.deb</pre>
<p>Then extract the contents of <code>data.tar.gz</code> using <strong>tar</strong>:</p>
<pre class="console">tar -xzvf data.tar.gz</pre>
<p>Or, if you just need to get a <em>listing</em> of the files:</p>
<pre class="console">tar -tzvf data.tar.gz</pre>
<p>Again the <strong>-v</strong> option in both <strong>ar</strong> and <strong>tar</strong> is used in order to get verbose output. It is safe not to use it. For more information, read the man pages: <code>tar(1)</code> and <code>ar(1)</code>.</p>
<p><strike>If anyone knows a <em>one step process</em> to extract the contents of the <code>data.tar.gz</code>, I&#8217;d be very interested in it!</strike></p>
<p><strong>Update</strong></p>
<p>As Jon <a href="http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/comment-page-1/#comment-11671">suggested</a> in the comment area, the contents of data.tar.gz can be extracted from the DEB package in a one step process as shown below:</p>
<pre class="console">
ar p mypackage.deb data.tar.gz | tar zx
</pre>
<p>That will do it.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/">How to extract RPM or DEB packages</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2007/12/01/choosing-a-format-for-data-backups-tar-vs-cpio/" rel="bookmark">Choosing a format for data backups &#8211; tar vs cpio</a></li>
<li><a href="http://www.g-loaded.eu/2006/04/05/how-to-build-rpm-packages-on-fedora/" rel="bookmark">How To Build RPM Packages on Fedora</a></li>
<li><a href="http://www.g-loaded.eu/2007/12/01/veritar-verify-checksums-of-files-within-a-tar-archive/" rel="bookmark">VeriTAR &#8211; Verify checksums of files within a TAR archive</a></li>
<li><a href="http://www.g-loaded.eu/2006/10/07/verify-a-burned-cddvd-image-on-linux/" rel="bookmark">Verify a burned CD/DVD image on Linux</a></li>
<li><a href="http://www.g-loaded.eu/2006/04/08/linux-tips-pack-i/" rel="bookmark">Linux Tips &#8211; Pack I</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>SPEC File Directory</title>
		<link>http://www.g-loaded.eu/2006/09/10/spec-file-directory/</link>
		<comments>http://www.g-loaded.eu/2006/09/10/spec-file-directory/#comments</comments>
		<pubDate>Sat, 09 Sep 2006 22:45:47 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Compiling]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/09/10/spec-file-directory/</guid>
		<description><![CDATA[I started packaging linux software for my Fedora machines from the time I was using Fedora Rawhide (development version) as my primary system. There is no repository that is synced with Rawhide, so there was a huge amount of software I had to compile (mostly multimedia related). This is a very time-consuming task, so I [...]]]></description>
			<content:encoded><![CDATA[<p>I started packaging linux software for my Fedora machines from the time I was using Fedora Rawhide (development version) as my primary system. There is no repository that is synced with Rawhide, so there was a huge amount of software I had to compile (mostly multimedia related). This is a very time-consuming task, so I decided to end it. Now, I use Base, Extras and Livna repos for my system updates and I vowed never to use a development distro release as my primary system again (mainly because of lack of free time and performance issues).</p>
<p>Anyway, I still package a bunch of RPMs for my systems. I decided to upload some of the spec files. These are available in <a href="http://www.g-loaded.eu/packages/specs/">this directory</a>. There are many more, but they need a bit of polishing.</p>
<p>Some notes:</p>
<ul>
<li>The nvidia-legacy spec file generates RPMs for the OpenGL libraries and the NVidia Legacy driver (for GF2 for example). These packages <strong>do not</strong> replace any core Fedora files. The official installation script from NVidia replaces some files and it should not be used.</li>
<li>These spec files are completely unsupported. Don&#8217;t send me emails about them, unless you find any mistakes in them. For information about building RPMs on Fedora refer to my relevant <a href="http://www.g-loaded.eu/2006/04/05/how-to-build-rpm-packages-on-fedora/">small article</a>.</li>
<li>The spec files are for software that does not exist in the repos mentioned above (except for kernel modules, for which I don&#8217;t wish to wait until Livna releases new versions). I haven&#8217;t submitted any of them to Extras or Livna because I don&#8217;t have the time to update them in time. The files comply with the Fedora packaging guidelines and naming schemes.</li>
<li>Dependencies in the alexandria and ruby-related spec files were updated by Leeksoup for FC5. I don&#8217;t use this software anymore, so I appreciate it :-)</li>
</ul>
<p>Packaging is art :-)</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2006/09/10/spec-file-directory/">SPEC File Directory</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2006/04/02/fedora-core-5/" rel="bookmark">Fedora Core 5</a></li>
<li><a href="http://www.g-loaded.eu/2006/04/05/how-to-build-rpm-packages-on-fedora/" rel="bookmark">How To Build RPM Packages on Fedora</a></li>
<li><a href="http://www.g-loaded.eu/2007/08/06/file-and-directory-diff-in-color-in-midnight-commander/" rel="bookmark">File and Directory diff in color in Midnight Commander</a></li>
<li><a href="http://www.g-loaded.eu/2006/02/20/gnome-214-rawhide-suse-and-more/" rel="bookmark">GNOME 2.14, Rawhide, SUSE and more&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2009/04/07/sticking-with-centos-rpmforge-and-yum-priorities-for-now/" rel="bookmark">Sticking with CentOS, RPMforge and yum-priorities for now</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2006/09/10/spec-file-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>How To Build RPM Packages on Fedora</title>
		<link>http://www.g-loaded.eu/2006/04/05/how-to-build-rpm-packages-on-fedora/</link>
		<comments>http://www.g-loaded.eu/2006/04/05/how-to-build-rpm-packages-on-fedora/#comments</comments>
		<pubDate>Wed, 05 Apr 2006 00:37:42 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Compiling]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[RPM]]></category>
		<guid isPermaLink="false">http://www.g-loaded.eu/2006/04/05/how-to-build-rpm-packages-on-fedora/</guid>
		<description><![CDATA[These are some general guidelines and notes in order to assist the adventurous first-time Fedora user to get started with RPM package building on Fedora Core.]]></description>
			<content:encoded><![CDATA[<p>These are some general guidelines and notes in order to assist the adventurous first-time Fedora user to get started with RPM package building.<br />
<span id="more-182"></span></p>
<h4>What Is An RPM Package?</h4>
<p>In simple terms, an <abbr title="Red Hat Package Manager">RPM</abbr> package is an advanced form of a container for other files. Generally, it includes:</p>
<ol>
<li>The program to be installed plus all the necessary files that accompany this program.</li>
<li>Information about the program and the RPM package itself.</li>
<li>Information about the program&#8217;s dependencies, which means info about what other software needs to be installed, so your program to function correctly in the system.</li>
<li>Information about potential conflicts between the program and other software that is currently installed in the system.</li>
<li>Actions that need to be performed when the program is installed/upgraded/removed.</li>
</ol>
<p>But, this is enough with the theory. For more information, refer to the links at the <em>Further Reading</em> section of this article.</p>
<h4>Prerequisites</h4>
<p>The following are needed in order to build RPM Packages.</p>
<ul>
<li>The development tools. All the utilities that are needed to compile a program, including the compiler itself.</li>
<li>A <abbr title="Specification File">SPEC</abbr> file for the particular program you want to create an RPM package for. A SPEC file contains all the information regarding the program&#8217;s details, its dependencies, the compilation options etc. For more info on writing SPEC files, refer to the links at the <em>Further Reading</em> section of this article.</li>
</ul>
<h4>Things You Need To Do Once</h4>
<p>There are a couple of thing you need to do before starting building your RPMs. These mainly include the installation of the core development tools and the creation of the building environment for your <em>user</em>.</p>
<p>Install the core development tools using <abbr title="YellowDog Updater Modified">YUM</abbr>. As <em>root</em>:</p>
<pre class="console"># yum groupinstall "Development Tools"</pre>
<p>Next, create the building environment for your user. Fortunately, Fedora includes some neat utilities that greatly simplify this procedure. First, use YUM to install them (as <em>root</em>):</p>
<pre class="console"># yum install rpmdevtools</pre>
<p>Then, create the directory structure in your home directory by issuing the command (as a user):</p>
<pre class="console">$ rpmdev-setuptree</pre>
<p>That&#8217;s it.</p>
<h4>Build That RPM!</h4>
<p>Provided that you have a SPEC file for your program, you can build the binary RPM package by issuing the command:</p>
<pre class="console">$ rpmbuild -bb --clean myprogram.spec</pre>
<p>If you need to build the package for a different architecture, you can set the <code>--target</code> option, like in the example below:</p>
<pre class="console">$ rpmbuild -bb --clean --target i686 myprogram.spec</pre>
<p>Please note that you should never build RPM packages using <em>root</em>.</p>
<h5>Dependencies</h5>
<p>Some programs may need additional development libraries in order to be compiled. You can use YUM to install these needed libraries (<code>-devel</code> packages) or programs. If the operation finishes succesfully, you&#8217;ll find your RPM package in the <code>~/rpmbuild/RPMS/</code> directory.</p>
<h4>Further Reading</h4>
<p>This small article&#8217;s goal was to get you started with art of RPM packaging by setting up the environment for RPM building. It&#8217;s a &quot;<em>Batteries Not Included!</em>&quot; article though. Information about how to write SPEC files is not available here. It would be pointless, as there are some excellent resources for this purpose. So, prepare for some real reading ladies and gentlemen:</p>
<ol>
<li><a href="http://fedora.redhat.com/docs/developers-guide/ch-rpm-building.html">Chapter 4. Building RPM Packages</a> of the <a href="http://fedora.redhat.com/docs/developers-guide/index.html">Fedora Core Developer&#8217;s Guide</a> by Tammy Fox, Havoc Pennington &#8211; General information about the SPEC file sections.</li>
<li><a href="http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/">Chapter 8. Creating RPMs: An Overview</a> of the <a href="http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/">RPM Guide</a> by Eric Foster-Johnson &#8211; In depth information about SPEC files.</li>
<li><a href="http://fedoraproject.org/wiki/Packaging/Guidelines">Packaging Guidelines</a> by <a href="http://fedoraproject.org/wiki/TomCallaway">Tom &#8216;spot&#8217; Callaway</a> &#8211; Information specific to writing SPEC files for Fedora Core.</li>
<li><a href="http://fedoraproject.org/wiki/Packaging/NamingGuidelines">Package Naming Guidelines</a> by <a href="http://fedoraproject.org/wiki/TomCallaway">Tom &#8216;spot&#8217; Callaway</a> &#8211; Information specific to Fedora RPM naming scheme.</li>
<li><a href="http://fedoraproject.org/wiki/Packaging/ScriptletSnippets">RPM scriptlet recipes</a> &#8211; Some extremely useful notes regarding the actions that need to be performed when a package is installed/upgraded/removed from the system, which should be included in the relevant sections of the SPEC file.</li>
<li><a href="http://www.rpm.org/max-rpm-snapshot/">Maximum RPM &#8211; Taking the RPM Package Manager to the Limit</a> &#8211; An excellent book about the RPM Package Manager, by Edward C. Bailey, Paul Nasrat, Matthias Saou, Ville Skyttä.</li>
</ol>
<h4>Changes</h4>
<dl>
<dt>Wed 23 Jan, 2008</dt>
<dd>This article has been updated to reflect the changes in the package names for rpmdevtools. The old package, named <code>fedora-rpmdevtools</code>, is now known as <code>rpmdevtools</code>. Also, the utility that sets up the initial rpmbuild directory tree is now called <code>rpmdev-setuptree</code> (old name was: <code>fedora-buildrpmtree</code>).</dd>
</dl>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2006/04/05/how-to-build-rpm-packages-on-fedora/">How To Build RPM Packages on Fedora</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>
<h4>Related Articles</h4>
<ul><li><a href="http://www.g-loaded.eu/2005/12/20/build-a-single-native-kernel-module/" rel="bookmark">Build a single native kernel module</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/10/spec-file-directory/" rel="bookmark">SPEC File Directory</a></li>
<li><a href="http://www.g-loaded.eu/2005/12/14/the-complete-fedora-kernel-headers/" rel="bookmark">The Complete Fedora Kernel Headers</a></li>
<li><a href="http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/" rel="bookmark">How to extract RPM or DEB packages</a></li>
<li><a href="http://www.g-loaded.eu/2005/10/11/the-road-to-alexandria/" rel="bookmark">The road to Alexandria&#8230;</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2006/04/05/how-to-build-rpm-packages-on-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>

