RPM installation via http

Stuart Sears stuart at sjsears.com
Fri Sep 8 08:41:58 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rick Stevens wrote:
> On Wed, 2006-09-06 at 11:36 -0600, redhat at buglecreek.com wrote:
>> Is anyone aware of a way to install multiple rpm packages via a http
>> server on a local lan.  For example, two systems running the same
>> version of redhat os. One server has apache running on it and has all
>> the packages in /var/www/html/up2date/ via a sym link to
>> /var/spool/up2date.  When I try to do rpm -Fvh
>> http://192.168.100.2/up2date/*.rpm I get the following error: "error:
>> File not found by glob: http://192.168.100.2/up2date/*.rpm"  When I try
>> this with a specific rpm package name it works fine.  When I connect a
>> browser to the http server all the packages are there.  I know I could
>> use a nfs mount to accomplish this, but would like to do this via http
>> if possible.  We have all the entitlements to cover the various boxes,
>> but due to bandwidth issues at field offices it would be nice to be able
>> to share these updates between like boxes on local lans without having
>> to hit rhn or
>> our HQ rhn proxy.
> 
> You have to remember that globbing on a command is processed by the
> shell BEFORE the command is executed.  The glob won't work on HTTP or
> FTP operations since the shell doesn't know how to use HTTP or FTP to
> get filelists.  I think rpm itself is smart enough to do what you need,
> so you might try the command:
<snip interesting bit about update...>

Actually, despite this, rpm installs over ftp do support wildcards. I
would expect this to be interfered with by the shell too, but I
regularly run commands like this:

rpm -Uvh  ftp://server/pub/RPMS/zsh-*.rpm
and it fetches all matching packages before attempting to install them
(of course the horrendous dependency chain then comes into operation...)

HTTP on the other hand does not work. I think this is because of the
command being run on the remote server - prolly a simple GET <filename>,
which would require a complete, existing remote filename or the http
server would respond with a 404 error.

I think the FTP command is running some form of mget <pattern> which is
why wildcards work.

I believe that bash is not interfering at all - there will be no logical
local completion for a path like "http://server/*.rpm" (or ftp://...) so
I would guess the * is passed verbatim to rpm - it seems the only
logical explanation to me.


Kind regards

Stuart

- --
Stuart Sears RHCA RHCX
"Quit worrying about your health. It'll go away."
- - Robert Orben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFFASzWamPtx1brPQ4RAinDAJ9aX85Gt2Qcdfbtv9DLQG0wVU4nNQCfWFHS
A2AwR2BfrGep5l4+UBgv+J4=
=mOck
-----END PGP SIGNATURE-----




More information about the Redhat-install-list mailing list