[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
Created attachment 109201 [details] log from stdin
Created attachment 109202 [details] log from temp file
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?
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%]
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 ...
Internal RFE bug #147521 entered; will be considered for future releases.
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.
any updates on this?
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.
Still an issue in RHEL 4.x
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.
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 ~]#
Created attachment 233581 [details] log from http
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 ...
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.
WONTFIX for RHEL 4, whether upstream implements it someday is another issue.
What/where is the upstream QA process or site?