Bug 143886 - RFE: rpm fails to install rpms from stdin
RFE: rpm fails to install rpms from stdin
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: rpm (Show other bugs)
4.5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
: FutureFeature, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-31 12:25 EST by Jason Pyeron
Modified: 2008-09-24 09:46 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-24 06:04:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log from stdin (2.06 KB, text/plain)
2004-12-31 12:25 EST, Jason Pyeron
no flags Details
log from temp file (3.71 KB, text/plain)
2004-12-31 12:26 EST, Jason Pyeron
no flags Details
log from http (3.91 KB, text/plain)
2007-10-20 22:35 EDT, Jason Pyeron
no flags Details

  None (edit)
Description Jason Pyeron 2004-12-31 12:25:04 EST
[root@testserver tmp]# curl -s \
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=109200 |\
rpm -ivv -- - 2> logstdin.txt
[root@testserver tmp]# rpm -q rpmbug143885
package rpmbug143885 is not installed
[root@testserver tmp]# curl -s \
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=109200 >\
test.rpm &&\
rpm -ivv test.rpm 2> log.txt
[root@testserver tmp]# diff -u logstdin.txt log.txt
--- logstdin.txt        2004-12-31 12:20:20.000000000 -0500
+++ log.txt     2004-12-31 12:16:35.000000000 -0500
@@ -1,7 +1,7 @@
-D: ============== -
+D: ============== test.rpm
 D: Expected size:         1543 = lead(96)+sigs(180)+pad(4)+data(1263)
-D:   Actual size:            0
-D: -: MD5 digest: OK (17b3fe7d063fb8b090d61733a9ce9a6b)
+D:   Actual size:         1543
+D: test.rpm: MD5 digest: OK (17b3fe7d063fb8b090d61733a9ce9a6b)
 D:     added binary package [0]
 D: found 0 source and 1 binary packages
 D: opening  db environment /var/lib/rpm/Packages joinenv
@@ -36,6 +36,36 @@
 D: computing 0 file fingerprints
 D: computing file dispositions
 D: ========== +++ rpmbug143885-1-0 noarch-linux 0x0
+D: Expected size:         1543 = lead(96)+sigs(180)+pad(4)+data(1263)
+D:   Actual size:         1543
+D:   install: rpmbug143885-1-0 has 0 files, test = 0
+D:   +++ h#     915 Header SHA1 digest: OK 
(52e352e9f37eb4fa64117470f64fe77f50a88ce9)
+D: adding "rpmbug143885" to Name index.
+D: opening  db index       /var/lib/rpm/Group create mode=0x42
+D: adding "N/A" to Group index.
+D: opening  db index       /var/lib/rpm/Requirename create mode=0x42
+D: opening  db index       /var/lib/rpm/Providename create mode=0x42
+D: adding "rpmbug143885" to Providename index.
+D: opening  db index       /var/lib/rpm/Requireversion create 
mode=0x42
+D: adding 2 entries to Requireversion index.
+D: opening  db index       /var/lib/rpm/Provideversion create 
mode=0x42
+D: adding "1-0" to Provideversion index.
+D: opening  db index       /var/lib/rpm/Installtid create mode=0x42
+D: adding 1 entries to Installtid index.
+D: opening  db index       /var/lib/rpm/Sigmd5 create mode=0x42
+D: adding 1 entries to Sigmd5 index.
+D: opening  db index       /var/lib/rpm/Sha1header create mode=0x42
+D: adding "52e352e9f37eb4fa64117470f64fe77f50a88ce9" to Sha1header 
index.
+D: opening  db index       /var/lib/rpm/Triggername create mode=0x42
+D: closed   db index       /var/lib/rpm/Sha1header
+D: closed   db index       /var/lib/rpm/Sigmd5
+D: closed   db index       /var/lib/rpm/Installtid
+D: closed   db index       /var/lib/rpm/Provideversion
+D: closed   db index       /var/lib/rpm/Requireversion
+D: closed   db index       /var/lib/rpm/Triggername
+D: closed   db index       /var/lib/rpm/Providename
+D: closed   db index       /var/lib/rpm/Requirename
+D: closed   db index       /var/lib/rpm/Group
 D: closed   db index       /var/lib/rpm/Name
 D: closed   db index       /var/lib/rpm/Packages
 D: closed   db environment /var/lib/rpm/Packages
Comment 1 Jason Pyeron 2004-12-31 12:25:52 EST
Created attachment 109201 [details]
log from stdin
Comment 2 Jason Pyeron 2004-12-31 12:26:30 EST
Created attachment 109202 [details]
log from temp file
Comment 3 Jason Pyeron 2004-12-31 12:29:49 EST
rpm is supposed to support the - package file.
it even tries to use it, but just fails to follow through?

does it not cache it?
Comment 4 Jason Pyeron 2004-12-31 12:50:19 EST
a disgusting workaround.

[root@testserver tmp]# TMPFILE=`mktemp $$.XXXXXX` && curl -s \
'https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=109200' >\
$TMPFILE && rpm -ivh $TMPFILE; rm -f $TMPFILE
Preparing...                
########################################### [100%]
   1:rpmbug143885           
########################################### [100%]
Comment 5 Jeff Johnson 2005-02-07 14:45:23 EST
FWIW, rpm has not permitted install from stdin
for quite some time, and certainly has never permitted
stdin installs in RHEL3 and later.

Nor is it likely to be possible to permit stdin installs
with the current rpm implementation, as each package is
read twice because of the reopen during a progress callback,
and changing that scheme introduces major incompatibilities
with existing applications that use rpmlib.

Marking as RFE ...
Comment 6 Suzanne Hillman 2005-02-08 14:21:16 EST
Internal RFE bug #147521 entered; will be considered for future releases.
Comment 7 Jason Pyeron 2005-02-08 16:07:00 EST
then shouldn't URL_IS_DASH be treated as URL_IS_HTTP?

that is make a temp file for the 'transfer' then open it.

As far as "rpm has not permitted install from stdin for quite some 
time" it should be [more] clearly noted in the docs.
Comment 8 Jason Pyeron 2006-10-09 18:23:53 EDT
any updates on this?
Comment 9 RHEL Product and Program Management 2007-10-19 15:10:18 EDT
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.
Comment 10 Jason Pyeron 2007-10-19 17:28:42 EDT
Still an issue in RHEL 4.x
Comment 11 Jeff Johnson 2007-10-19 19:58:08 EDT
This issue cannot be fixed without changing the progress bar callback
(which can't be changed until yum, and anaconda, and ... change) because
rpm opens every package twice, and cannot reliably store stdin in, say, /tmp
because /tmp may not exist.
Comment 12 Jason Pyeron 2007-10-20 22:34:11 EDT
no that is not an issue, as rpm supports install from stream such as ftp or 
http. see comment #7


proof is in the pudding


[root@statics23 ~]# rpm -ivv http://client.pdinc.us/rpmbug143885.rpm 2> http-
log.txt
Retrieving http://client.pdinc.us/rpmbug143885.rpm
Preparing packages for installation...
rpmbug143885-1-0
[root@statics23 ~]#
Comment 13 Jason Pyeron 2007-10-20 22:35:11 EDT
Created attachment 233581 [details]
log from http
Comment 14 Jeff Johnson 2007-10-20 23:34:53 EDT
There are different program paths being talked about.

For URL's, the file is downloaded and the install proceeds from there.

During install, the package file is opened twice.

(aside) What really needs doing in rpm is a one pass streaming install

If all you want is copying to temp file from stdin, and then installing the temp copy,
that's likely doable in under 10 lines of code.

But if you can type
   cat foo*.rpm | rpm -Uvh -
then surely you can also arrange to copy the file and invoke rpm on the copy.

Which is basically why an install from stdin has never been implemented ...
Comment 15 Jason Pyeron 2007-10-21 00:42:58 EDT
One would assume that more than one rpm at a time would not be permissible via 
stdin as there is no way to split the stream.

so "cat foo*.rpm | rpm -Uvh -" would still be invalid 
but "cat foo.rpm | rpm -ivh -" would be ok.
Comment 16 Panu Matilainen 2008-09-24 06:04:06 EDT
WONTFIX for RHEL 4, whether upstream implements it someday is another issue.
Comment 17 Jason Pyeron 2008-09-24 09:46:47 EDT
What/where is the upstream QA process or site?

Note You need to log in before you can comment on or make changes to this bug.