09-27-2010
Yes, RPMs can contain scripts for pre/post installation/removal. Those can only be added when building the package through the .spec file.
This User Gave Thanks to pludi For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an application for linux writen by me. and before use it, I have to install it. I 've writen a shell program to install it. Now how can I turn it to the *.rpm ? Is this can done by shell command rpm? How to do it?
thanks (1 Reply)
Discussion started by: murataht
1 Replies
2. Linux
Hey,
I've a problem installing a package. rpm -ivh brings the errors:
libjvm.so is needed by
libverify.so is needed by
But I have installed the Java SDK like requested and the files are on the disk. But I have no idea how to find out, why rpm cann't find them.
I have also... (2 Replies)
Discussion started by: mod
2 Replies
3. Linux
Hi,
I need to install an rpm file,but I only have '.src.rpm' version of it. I want to convert it to a binary rpm.
so I tried this
rpm --rebuild somethin.src.rpm
But I am gettin '--rebuild:Invalid option' as output
Is there another way to rebuild source rpm.?
Thanks in... (2 Replies)
Discussion started by: eamani_sun
2 Replies
4. Linux
Helo I have base system 4.0.0.0 installed.
I m using linux operating system.
right now I have following packages are installed
ADMIN-4.0.0.0
DBASE-4.0.0.0
I want to make my system 4.1.0.0
for this I upgrade the above packages to ADMIN-4.1.0.0 and DBASE-4.1.0.0
now I want that... (2 Replies)
Discussion started by: amitpansuria
2 Replies
5. SuSE
Hi,
I have got few RPM's from rpmfind.net ( mainly gcc ).
But it seems to be src files instead of the image.
so I think we have to build the src files according to target machine using rpmbuild.
Can any one help me with
1) Various options of rpm build that have to be taken care
2)... (3 Replies)
Discussion started by: Sivaswami
3 Replies
6. Shell Programming and Scripting
It's the end of the day and I just can't get my head around this. I'm trying to extract just the name of the RPM from the path to a .rpm file. So from:
/home/me/rpm/RPMS/i386/nagios-our-plugins-1.2-6.i386.rpmI need to extract 'nagios-our-plugins'.
I can't get the awk syntax right:
awk '{... (5 Replies)
Discussion started by: aussieos
5 Replies
7. Shell Programming and Scripting
How to make RPM not write to RPM database if RPM fails to deploy?
IE I create an rpm spec file that contains the following
if
then
exit 1
fi
My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies
8. Red Hat
Dear All
Can you please let me know where to obtain the rpm package of RADIUS for my RedHat Enterprise Linux ES release 3 (Taroon)?
Thank you (1 Reply)
Discussion started by: hadimotamedi
1 Replies
9. Red Hat
Hello,
From All of you GURU i have one query kindly tell me difference between below two rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
oracleasm-support-2.0.3-1.i386.rpm
I am waiting for your promt and brief reply
Thanks & Regards,
Umair (1 Reply)
Discussion started by: umair
1 Replies
10. AIX
dears
i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message .
P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm
error: failed dependencies:
m4 is needed by autoconf-2.63-1
P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 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)