<?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>Pario TechnoBlob &#187; rpm</title>
	<atom:link href="http://pario.no/tag/rpm/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:17:58 +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>rpm command cheatsheet</title>
		<link>http://pario.no/2008/03/19/rpm-command-cheatsheet/</link>
		<comments>http://pario.no/2008/03/19/rpm-command-cheatsheet/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 07:44:39 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cheatsheet]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://pario.no/2008/03/19/rpm-cheatsheet-for-redhat-systems/</guid>
		<description><![CDATA[This is a simple cheatsheet for the rpm command and can be used on systems like RedHat that uses the command Syntax Description Example(s) rpm -ivh {rpm-file} Install the package rpm -ivh sendmail-cf-8.14.2-1.fc8.rpm rpm -ivh &#8211;test sendmail-8.14.2-1.fc8.rpm rpm -Uvh {rpm-file} Upgrade package rpm -Uvh sendmail-cf-8.14.2-1.fc8.rpm rpm -Uvh &#8211;test sendmail-8.14.2-1.fc8.rpm rpm -ev {package} Erase/remove/ an installed [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple cheatsheet for the rpm command and can be used on systems like RedHat that uses the command</p>
<table style="border-collapse: collapse" border="1">
<tr align="center">
<th><strong>Syntax</strong></th>
<th><strong>Description</strong></th>
<th><strong>Example(s)</strong></th>
</tr>
<tr>
<td>rpm -ivh {rpm-file}</td>
<td>Install the package</td>
<td>rpm -ivh sendmail-cf-8.14.2-1.fc8.rpm<br />
rpm -ivh &#8211;test sendmail-8.14.2-1.fc8.rpm</td>
</tr>
<tr>
<td>rpm -Uvh {rpm-file}</td>
<td>Upgrade package</td>
<td>rpm -Uvh  sendmail-cf-8.14.2-1.fc8.rpm<br />
rpm -Uvh &#8211;test sendmail-8.14.2-1.fc8.rpm</td>
</tr>
<tr>
<td>rpm -ev {package}</td>
<td>Erase/remove/ an installed package</td>
<td>rpm -ev sendmail</td>
</tr>
<tr>
<td>rpm -ev &#8211;nodeps {package}</td>
<td>Erase/remove/ an installed package without checking for dependencies</td>
<td>rpm -ev &#8211;nodeps sendmail</td>
</tr>
<tr>
<td>rpm -qa</td>
<td>Display list all installed packages</td>
<td>rpm -qa<br />
rpm -qa | less</td>
</tr>
<tr>
<td>rpm -qi {package}</td>
<td>Display installed information along with package version and short description</td>
<td>rpm -qi sendmail</td>
</tr>
<tr>
<td>rpm -qf {/path/to/file}</td>
<td>Find out what package a file belongs to i.e. find what package owns the file</td>
<td>rpm -qf /etc/passwd<br />
rpm -qf /bin/bash</td>
</tr>
<tr>
<td>rpm -qc {pacakge-name}</td>
<td>Display list of configuration file(s) for a package</td>
<td>rpm -qc httpd</td>
</tr>
<tr>
<td>rpm -qcf {/path/to/file}</td>
<td>Display list of configuration files for a command</td>
<td>rpm -qcf /usr/bin/locate</td>
</tr>
<tr>
<td>rpm -qa &#8211;last</td>
<td>Display list of all recently installed RPMs</td>
<td>rpm -qa &#8211;last<br />
rpm -qa &#8211;last | less</td>
</tr>
<tr>
<td>rpm -qpR {.rpm-file}<br />
rpm -qR {package}</td>
<td>Find out what dependencies a rpm file has</td>
<td>rpm -qpR sendmail-8.14.2-1.fc8.rpm<br />
rpm -qR bash</td>
</tr>
<tr>
<td>rpm &#8211;test {package}</td>
<td>Perform Installation Tests Only</td>
<td>rpm -i &#8211;test rpm-2.0.11-1.i386.rpm<br />
/bin/rpm conflicts with file from rpm-2.3-1<br />
/usr/bin/gendiff conflicts with file from rpm-2.3-1<br />
/usr/bin/rpm2cpio conflicts with file from rpm-2.3-1<br />
/usr/bin/rpmconvert conflicts with file from rpm-2.3-1<br />
/usr/man/man8/rpm.8 conflicts with file from rpm-2.3-1<br />
error: rpm-2.0.11-1.i386.rpm cannot be installed</td>
</tr>
<tr>
<td>rpm &#8211;replacepkgs</td>
<td>Install the Package Even If Already Installed. Is used to force RPM to install a package that it believes to be installed already. This option is normally used if the installed package has been damaged somehow and needs to be fixed up.</td>
<td>&nbsp;</td>
</tr>
</table>
<p>{package} &#8211; Replace with actual package name</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDMvMTkvcnBtLWNvbW1hbmQtY2hlYXRzaGVldC88d3B0Yj5ycG0gY29tbWFuZCBjaGVhdHNoZWV0PHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/03/19/rpm-command-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List rpm package content</title>
		<link>http://pario.no/2008/02/26/list-rpm-package-content/</link>
		<comments>http://pario.no/2008/02/26/list-rpm-package-content/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 08:04:48 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://pario.no/2008/02/26/list-rpm-package-content/</guid>
		<description><![CDATA[To list the contents of a package just run the command # rpm -ql packagename Example # rpm -ql nmap /usr/bin/nmap /usr/share/doc/nmap-3.70 /usr/share/doc/nmap-3.70/COPYING /usr/share/doc/nmap-3.70/COPYING.OpenSSL /usr/share/doc/nmap-3.70/README /usr/share/doc/nmap-3.70/nmap-fingerprinting-article.txt /usr/share/doc/nmap-3.70/nmap.deprecated.txt /usr/share/doc/nmap-3.70/nmap.usage.txt /usr/share/doc/nmap-3.70/nmap_doc.html /usr/share/doc/nmap-3.70/nmap_manpage.html /usr/share/man/man1/nmap.1.gz /usr/share/nmap /usr/share/nmap/nmap-mac-prefixes /usr/share/nmap/nmap-os-fingerprints /usr/share/nmap/nmap-protocols /usr/share/nmap/nmap-rpc /usr/share/nmap/nmap-service-probes /usr/share/nmap/nmap-services]]></description>
			<content:encoded><![CDATA[<p>To list the contents of a package just run the command</p>
<pre>
# rpm -ql packagename</pre>
<p>Example</p>
<pre>
# rpm -ql nmap

/usr/bin/nmap
/usr/share/doc/nmap-3.70
/usr/share/doc/nmap-3.70/COPYING
/usr/share/doc/nmap-3.70/COPYING.OpenSSL
/usr/share/doc/nmap-3.70/README
/usr/share/doc/nmap-3.70/nmap-fingerprinting-article.txt
/usr/share/doc/nmap-3.70/nmap.deprecated.txt
/usr/share/doc/nmap-3.70/nmap.usage.txt
/usr/share/doc/nmap-3.70/nmap_doc.html
/usr/share/doc/nmap-3.70/nmap_manpage.html
/usr/share/man/man1/nmap.1.gz
/usr/share/nmap
/usr/share/nmap/nmap-mac-prefixes
/usr/share/nmap/nmap-os-fingerprints
/usr/share/nmap/nmap-protocols
/usr/share/nmap/nmap-rpc
/usr/share/nmap/nmap-service-probes
/usr/share/nmap/nmap-services</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDgvMDIvMjYvbGlzdC1ycG0tcGFja2FnZS1jb250ZW50Lzx3cHRiPkxpc3QgcnBtIHBhY2thZ2UgY29udGVudDx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2008/02/26/list-rpm-package-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade from Fedora Core 7 to Core 8</title>
		<link>http://pario.no/2007/11/30/upgrade-from-fedora-core-7-to-core-8/</link>
		<comments>http://pario.no/2007/11/30/upgrade-from-fedora-core-7-to-core-8/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 11:40:17 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Core 7]]></category>
		<category><![CDATA[Core 8]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://pario.no/2007/11/30/upgrade-from-fedora-core-7-to-core-8/</guid>
		<description><![CDATA[This is the steps I took to upgrade a running Fedora Core 7 installation to Core 8 using yum from the command line. Please note that live upgrades are not recommended by the Fedora Project. Make a list of the systems current packages for later reference: rpm -qa --qf '%{NAME}\n' &#124; sort &#124; uniq &#62; [...]]]></description>
			<content:encoded><![CDATA[<p>This is the steps I took to upgrade a running Fedora Core 7 installation to Core 8 using yum from the command line. Please note that  live upgrades are not recommended by the Fedora Project.</p>
<p>Make a list of the systems current packages for later reference:</p>
<pre>
rpm -qa --qf '%{NAME}\n' | sort | uniq &gt; ~/new-pkgnames.txt</pre>
<p>Make a backup of any system configuration data (as root):</p>
<pre>
tar czf ~/etc-`date +%F`.tar.gz /etc</pre>
<p><code><br />
yum clean all</code></p>
<p>Make sure the new repo files isn&#8217;t placed as .rpmnew files, perhaps by</p>
<pre>
mv /etc/yum.repos.d/fedora-updates.repo.rpmnew /etc/yum.repos.d/fedora-updates.repo
mv /etc/yum.repos.d/fedora.repo.rpmnew /etc/yum.repos.d/fedora.repo</pre>
<p>Also make sure that all the 3rd party repos you normally use point to the repository for the new Fedora release.</p>
<p>Next the upgrade.<br />
Make sure you are in runlevel 3</p>
<pre>
telinit 3</pre>
<p>Run the following command to update the yum repo on your box:</p>
<pre>
rpm -Uhv rpm -Uvh rpm -Uvh http://mirror.anl.gov/pub/fedora/linux/releases/8/Everything/i386/os/Packages/fedora-release-8-3.noarch.rpm http://mirror.anl.gov/pub/fedora/linux/releases/8/Everything/i386/os/Packages/fedora-release-notes-8.0.0-3.noarch.rpm</pre>
<p><strong>yum</strong> might complain about conflicts or requirements. That is probably because you have used non-standard repositories or installed non-standard packages manually. Try to guess which packages cause the problem (or at least is a part of the dependency chain) &#8211; uninstall them and try again. Remember to install the packages again if they are essential.</p>
<p><strong>Tip: Find and review &#8220;lost&#8221; packages. </strong><br />
You can find orphaned packages (ie packages not in the repositories anymore) after the upgrade with the tool package-cleanup from the yum-utils package
<pre>yum install yum-utils; package-cleanup --orphans</pre>
<p>It&#8217;s often helpful to run this command before the update, too. For packages with a failing &#8220;%postun&#8221; script the old package will remain partly installed. Remove it with
<pre>rpm -e package-name-and-version</pre>
<p>If you forget to remove the avahi package it will refuse to be removed from the system with a error message &#8220;error: %postun(avahi-0.6.17-1.fc7.i386) scriptlet failed, exit status 1&#8243;. I haven&#8217;t looked up this error message any further.</p>
<p>I had to clean yum to make it aware of the recent package change, this might not be necessary.</p>
<pre>
yum clean all
yum upgrade</pre>
<p>Ensure that all (new) essential packages from the new version is installed with</p>
<pre>
yum groupupdate Base</pre>
<p>You might want to update other groups too, see</p>
<pre>
yum grouplist</pre>
<p>The system had to upgrade 937 packages before fedora Core 7 is a fedora Core 8 installation.</p>
<p>After the upgrade has finished a reboot is required and it was time to check for orphaned packages</p>
<pre>
package-cleanup --orphans</pre>
<p>The command for removing these packages is described earlier.</p>
<p>Source: <a href="http://docs.fedoraproject.org/install-guide/f8/en_US/sn-upgrade-tree.html">http://docs.fedoraproject.org/install-guide/f8/en_US/sn-upgrade-tree.html</a>,  <a href="http://www.ioncannon.net/system-administration/133/upgrading-from-fedora-7-to-fedora-8-with-yum/">http://www.ioncannon.net/system-administration/133/upgrading-from-fedora-7-to-fedora-8-with-yum/</a> and <a href="http://fedoraproject.org/wiki/YumUpgradeFaq">http://fedoraproject.org/wiki/YumUpgradeFaq</a></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/docs.fedoraproject.org\/install-guide\/f8\/en_US\/sn-upgrade-tree.html","http:\/\/www.ioncannon.net\/system-administration\/133\/upgrading-from-fedora-7-to-fedora-8-with-yum\/","http:\/\/fedoraproject.org\/wiki\/YumUpgradeFaq"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTEvMzAvdXBncmFkZS1mcm9tLWZlZG9yYS1jb3JlLTctdG8tY29yZS04Lzx3cHRiPlVwZ3JhZGUgZnJvbSBGZWRvcmEgQ29yZSA3IHRvIENvcmUgODx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/11/30/upgrade-from-fedora-core-7-to-core-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Query RPM database/packages and list their architecture</title>
		<link>http://pario.no/2007/11/26/query-rpm-databasepackages-and-list-their-architecture/</link>
		<comments>http://pario.no/2007/11/26/query-rpm-databasepackages-and-list-their-architecture/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 13:07:11 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://pario.no/2007/11/26/query-rpm-databasepackages-and-list-their-architecture/</guid>
		<description><![CDATA[If you use the &#8211;queryformat argument with rpm it is possible to query RPMs for different architectures installed # rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}\\n &#124; grep dbus-glib &#124; sort Result dbus-glib-0.22-12.EL.5-i386 dbus-glib-0.22-12.EL.5-x86_64 This can also be used in one of my previous posts: Remove duplicate packages when querying the rpm database.]]></description>
			<content:encoded><![CDATA[<p>If you use the &#8211;queryformat argument with <strong>rpm</strong> it is possible to query RPMs for different architectures installed<br />
<code><br />
# rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}\\n | grep dbus-glib | sort</code></p>
<p>Result<br />
<code><br />
dbus-glib-0.22-12.EL.5-i386<br />
dbus-glib-0.22-12.EL.5-x86_64</code></p>
<p>This can also be used in one of my previous posts: <a href="http://pario.no/2007/11/23/remove-duplicate-packages-when-querying-the-rpm-database/">Remove duplicate packages when querying the rpm database</a>.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTEvMjYvcXVlcnktcnBtLWRhdGFiYXNlcGFja2FnZXMtYW5kLWxpc3QtdGhlaXItYXJjaGl0ZWN0dXJlLzx3cHRiPlF1ZXJ5IFJQTSBkYXRhYmFzZS9wYWNrYWdlcyBhbmQgbGlzdCB0aGVpciBhcmNoaXRlY3R1cmU8d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/11/26/query-rpm-databasepackages-and-list-their-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove duplicate packages when querying the rpm database</title>
		<link>http://pario.no/2007/11/23/remove-duplicate-packages-when-querying-the-rpm-database/</link>
		<comments>http://pario.no/2007/11/23/remove-duplicate-packages-when-querying-the-rpm-database/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 13:59:54 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[RHEL4]]></category>
		<category><![CDATA[rhel5]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[up2date]]></category>

		<guid isPermaLink="false">http://pario.no/2007/11/23/duplicate-packages-when-querying-the-rpm-database/</guid>
		<description><![CDATA[Today I had to solve a RPM problem on a Red Hat Enterprise Linux WS release 4 (Nahant Update 6) system (RHEL4) where there were duplicate packages when querying the rpm database. This had happened after an upgrade to update 6 using up2date from the command line. It seemed like i386 and x64 packages had [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to solve a RPM problem on a Red Hat Enterprise Linux WS release 4 (Nahant Update 6) system (RHEL4) where there were duplicate packages when querying the rpm database. This had happened after an upgrade to update 6 using up2date from the command line.</p>
<p>It seemed like i386 and x64 packages had gotten installed on some packages and this caused some problems, like logon authentication and execution of some programs.</p>
<p>Trying to remove a duplicate rpm package</p>
<pre>
# rpm -e libtool-libs-1.5.6-4.El4.2</pre>
<p>gave the error message</p>
<pre>
error: "libtool-libs-1.5.6-4.El4.2" specifies multiple packages</pre>
<p>After searching the Red Hat knowledge base I located article <a href="http://kbase.redhat.com/faq/docs/DOC-2775">Why do I see duplicate packages when querying the rpm database?</a> where it says it is necessary to specify the architecture of the package to remove.</p>
<pre>
# rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}\\n</pre>
<p>If you add <strong>%{RELEASE}</strong> you can also determine if the package is from other package vendors like RPMForge.</p>
<p>Since this was a x64 system, I wanted to remove the i386 version</p>
<pre>
# rpm -e libtool-libs-1.5.6-4.El4.2.i386</pre>
<p>This had to be done with every duplicate package on the system.<br />
Locate the i386 packages that interfered with the x64 packages can be done using the command</p>
<pre>
rpm -qa | sort | uniq -d</pre>
<p>These packages have dependencies so you have to add these manually, really fun job to do.</p>
<p><strong>Edit:</strong><br />
In RHEL5 you can use yum to remove packages in a easy way</p>
<pre>
yum remove &lt;package&gt;.i386
yum remove &lt;package&gt;.x86_64</pre>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/kbase.redhat.com\/faq\/docs\/DOC-2775"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTEvMjMvcmVtb3ZlLWR1cGxpY2F0ZS1wYWNrYWdlcy13aGVuLXF1ZXJ5aW5nLXRoZS1ycG0tZGF0YWJhc2UvPHdwdGI%2BUmVtb3ZlIGR1cGxpY2F0ZSBwYWNrYWdlcyB3aGVuIHF1ZXJ5aW5nIHRoZSBycG0gZGF0YWJhc2U8d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/11/23/remove-duplicate-packages-when-querying-the-rpm-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

