Sponsored Content
Full Discussion: Linux FAQ Items
Operating Systems Linux Gentoo Linux FAQ Items Post 302088357 by prashant_ohol on Monday 11th of September 2006 05:40:50 PM
Old 09-11-2006
Tools What Is The RPM?

Hello,

Do you know what is the RPM?

RPM is the RPM Package Manager. It is an open packaging system available for anyone to use. It allows users to take source code for new software and package it into source and binary form such that binaries can be easily installed and tracked and source can be rebuilt easily. It also maintains a database of all packages and their files that can be used for verifying packages and querying for information about files and/or packages.

Red Hat, Inc. encourages other distribution vendors to take the time to look at RPM and use it for their own distributions. RPM is quite flexible and easy to use, though it provides the base for a very extensive system. It is also completely open and available, though we would appreciate bug reports and fixes. Permission is granted to use and distribute RPM royalty free under the GPL.

RPM is an open packaging system that is available for anyone to use. It works on all Linux as well as currently on various other UNIX flavours: IRIX, Solaris, SunOS, AIX, HP/UX, AmigaOS, and FreeBSD.

Installing Packages

RPM packages typically have file names rpm -i prashant-1.1-1.i386.rpm which includes :-

package name prashant

version 1.1

release 1

architecture i386

How to install RPM?

rpm -ivh prashant-1.1-1.i386.rpm

uninstalling packages

rpm -e prashant-1.1-1.i386.rpm

Upgrading Packages

rpm -Uvh prashant-2.0.i386.rpm

Verifying Packages

rpm -v prashant

bingo Smilie

Prashant Ohol - System Administrator
 

3 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Unix for Dummies FAQ

I have created a small FAQ for the "Unix for Dummies" forum. Hopefully this will be useful, as there are questions which are asked (and answered) repeatedly. <A HREF="http://www.droflet.net/unix_dot_com_faq.html">http://www.droflet.net/unix_dot_com_faq.html (0 Replies)
Discussion started by: PxT
0 Replies

2. Shell Programming and Scripting

awk between items including items

OS=HP-UX ksh The following works, except I want to include the <start> and <end> in the output. awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log' The following work in bash but not in ksh sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
Discussion started by: Ikon
4 Replies

3. Post Here to Contact Site Administrators and Moderators

Dead link in FAQ

Dead link from FAQ, then Technical FAQ: Senior Advisor - https://www.unix.com (Was about to suggest that a O/P read this FAQ). (9 Replies)
Discussion started by: methyl
9 Replies
RPM2(3) 						User Contributed Perl Documentation						   RPM2(3)

NAME
RPM2 - Perl bindings for the RPM Package Manager API SYNOPSIS
use RPM2; my $db = RPM2->open_rpm_db(); my $i = $db->find_all_iter(); print "The following packages are installed (aka, 'rpm -qa'): "; while (my $pkg = $i->next) { print $pkg->as_nvre, " "; } $i = $db->find_by_name_iter("kernel"); print "The following kernels are installed (aka, 'rpm -q kernel'): "; while (my $pkg = $i->next) { print $pkg->as_nvre, " ", int($pkg->size()/1024), "k "; } $i = $db->find_by_provides_iter("kernel"); print "The following packages provide 'kernel' (aka, 'rpm -q --whatprovides kernel'): "; while (my $pkg = $i->next) { print $pkg->as_nvre, " ", int($pkg->size()/1024), "k "; } print "The following packages are installed (aka, 'rpm -qa' once more): "; foreach my $pkg ($db->find_by_file("/bin/sh")) { print $pkg->as_nvre, " "; } my $pkg = RPM2->open_package("/tmp/XFree86-4.1.0-15.src.rpm"); print "Package opened: ", $pkg->as_nvre(), ", is source: ", $pkg->is_source_package, " "; DESCRIPTION
The RPM2 module provides an object-oriented interface to querying both the installed RPM database as well as files on the filesystem. CLASS METHODS
Pretty much all use of the class starts here. There are two main entrypoints into the package -- either through the database of installed rpms (aka the rpmdb) or through a file on the filesystem (such as kernel-2.4.9-31.src.rpm or kernel-2.4.9-31.i386.rpm You can have multiple RPM databases open at once, as well as running multiple queries on each. open_rpm_db(-path => "/path/to/db") As it sounds, it opens the RPM database, and returns it as an object. open_package("foo-1.1-14.noarch.rpm") Opens a specific package (RPM or SRPM). Returns a Header object. RPM DB object methods find_all_iter() Returns an iterator object that iterates over the entire database. find_all() Returns an list of all of the results of the find_all_iter() method. find_by_file_iter($filename) Returns an iterator that returns all packages that contain a given file. find_by_file($filename) Ditto, except it just returns the list find_by_name_iter($package_name) You get the idea. This one is for iterating by package name. find_by_name($package_name) Ditto, except it returns a list. find_by_provides_iter($provides_string) This one iterates over provides. find_by_provides($provides_string) Ditto, except it returns a list. find_by_requires_iter($requires_string) This one iterates over requires. find_by_requires($requires_string) Ditto, except it returns a list. RPM Header object methods stuff goes here TODO
Package installation and removal. Signature validation. HISTORY
0.01 Initial release AUTHOR
Chip Turner <cturner@redhat.com> SEE ALSO
perl. The original RPM module. perl v5.8.0 2002-11-08 RPM2(3)
All times are GMT -4. The time now is 08:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy