Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I get rpm to do a "run through' install?

2 views
Skip to first unread message

kd...@hotmail.com

unread,
Jun 1, 2005, 8:45:28 PM6/1/05
to
I'm considering installing a binary package on a system that is an .rpm
package. I have the rpm package manager on the machine (it's not Red
Hat though, nor even Linux, it's an AIX box).


How do I tell rpm to run through the install and not do anything, just
tell me exactly what it is *going* to do to what and where so I can
sanity check it first? You know, like the "make -n" option?

I can't believe I can't find this option in the help info-- such a
fundamental feature of any sane package manager. I presume it's there
but just using unfamiliar terminology...


Thanks,


--

KD

Moe Trin

unread,
Jun 1, 2005, 10:13:03 PM6/1/05
to
In article <1117673128.5...@o13g2000cwo.googlegroups.com>,
kd...@hotmail.com wrote:

>I'm considering installing a binary package on a system that is an .rpm
>package. I have the rpm package manager on the machine (it's not Red
>Hat though, nor even Linux, it's an AIX box).

OK - is the man page there?

>How do I tell rpm to run through the install and not do anything, just
>tell me exactly what it is *going* to do to what and where so I can
>sanity check it first? You know, like the "make -n" option?

man rpm look for the --test option

rpm -i --test /path/to/whatever-1.2.3-aix.rpm

>I can't believe I can't find this option in the help info-- such a
>fundamental feature of any sane package manager. I presume it's there
>but just using unfamiliar terminology...

Perhaps, though

[compton ~]$ rpm | grep test
rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]
rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]
[compton ~]$

Old guy

kd...@hotmail.com

unread,
Jun 2, 2005, 1:27:15 PM6/2/05
to
>OK - is the man page there?

Actually, no. Will look it up on the web though.

>man rpm look for the --test option

>rpm -i --test /path/to/whatever-1.2.3-aix.rpm

Test says that it will "report potential conflicts", or "tell if it
will work or not." But that's not what I'm looking for. I want to
know what it is going to *do* in advance, not simply if it thinks it's
an OK package or not. It is not completely qualified to decide what OK
is in this context.

I can run "rpm -vv -i --test" and find out what files it will copy, but
I see no way to find out what else it will do-- this particular
package installs a daemon, and I need to know exactly how it's going to
go about it. What it looks like I need to do is the above, AND a '-q
-i --scripts --triggers' on a package that is NOT already installed, as
it doesn't look like the -q options work on an uninstalled package (or
at least, that's what the error I get leads me to believe). Looks like
I have to install it first on an expendable and quarantined system
first, so I can run the query. Works, but really ugly...


--

KD

Ian Pilcher

unread,
Jun 2, 2005, 6:54:35 PM6/2/05
to
kd...@hotmail.com wrote:
> I can run "rpm -vv -i --test" and find out what files it will copy, but
> I see no way to find out what else it will do-- this particular
> package installs a daemon, and I need to know exactly how it's going to
> go about it. What it looks like I need to do is the above, AND a '-q
> -i --scripts --triggers' on a package that is NOT already installed, as
> it doesn't look like the -q options work on an uninstalled package (or
> at least, that's what the error I get leads me to believe). Looks like
> I have to install it first on an expendable and quarantined system
> first, so I can run the query. Works, but really ugly...

You can use any of the -q options on an RPM file by using the -p option.

--
========================================================================
Ian Pilcher i.pi...@comcast.net
========================================================================

Daniel Ganek

unread,
Jun 2, 2005, 2:56:13 PM6/2/05
to

You want to use "-qp"

/dan

Moe Trin

unread,
Jun 3, 2005, 5:29:45 PM6/3/05
to
In article <1117733235.3...@g47g2000cwa.googlegroups.com>,
kd...@hotmail.com wrote:

>Actually, no. Will look it up on the web though.

You might want to mention what version of rpm you are using. There have
been changes over the 9 years of existence.

>Test says that it will "report potential conflicts", or "tell if it
>will work or not." But that's not what I'm looking for. I want to
>know what it is going to *do* in advance, not simply if it thinks it's
>an OK package or not. It is not completely qualified to decide what OK
>is in this context.

OK, for that, you want to use the query options.

rpm -qpl /path/to/whatever-1.2.3-aix.rpm

will list all of the files the new package contains.

rpm -qp --triggers /path/to/whatever-1.2.3-aix.rpm

Display the trigger scripts, if any, which are contained in the package. I
don't know how that differs from

rpm -qp --triggerscripts /path/to/whatever-1.2.3-aix.rpm

Shows all the trigger scripts for the selected packages. and

rpm -qp --scripts /path/to/whatever-1.2.3-aix.rpm

List the package specific shell scripts that are used as part of the
installation and uninstallation processes, if there are any. I'd
recommend trying each of these options to see if they provide the
information you desire. I suspect they have to be run separately,
though you might be able to try

rpm -qp --triggers --triggerscripts --scripts /path/to/whatever-1.2.3-aix.rpm

to see if this reports all the scripts at once. rpm is actually able to
do a bit more than what the man page or Usage messages imply. For
example, I use 'rpm -Vf /etc/poobah' to have rpm do a security check of
the package that '/etc/poobah' belongs to. I've also used 'rpm -e --test
whatever' to see if removing the 'whatever' package is going to cause
grief. Neither combination is implied in the man page, but it works.

>it doesn't look like the -q options work on an uninstalled package (or
>at least, that's what the error I get leads me to believe). Looks like
>I have to install it first on an expendable and quarantined system
>first, so I can run the query.

No, that's what the -p flag is for. There are other combinations if you
are doing this over the net (FTP install) as well.

I understand that there probably aren't that many packages supplied by
IBM. Most of the time, users just blindly install stuff, a result of their
windoze heritage. More experienced users only install packages that are
supplied by their distribution source (Red Hat, Mandriva, SuSE, what-ever).
The more paranoid don't install the binary rpms, but instead build their
own binaries from source rpms. This allows them to audit the source code,
and would permit 'make -n' for example. Additionally, t<E8>ey audit the
<mumble>.spec file that is part of the source rpm - that has the
instructions to rpm or rpm-build that are used to tweak the build, and
to provide those installation instructions.

Old guy

kd...@hotmail.com

unread,
Jun 3, 2005, 8:30:37 PM6/3/05
to
Thanks, these examples were VERY useful (should get them into the man
pages, IMHO). The --help list shows a lot of option letters, but I've
found that many of them are contextual, you can't do a "-l" without a
"-q" or something like that-- I'd see an option I'd want to try and
couldn't figure out what context it was valid in, or what collection of
OTHER options were required to make it work. The man pages I later
found on the web were better, but I hadn't yet discovered the "-p"--
that does the trick, exactly what I was looking for...


--

KD

0 new messages