Bug 814713 - curl --progress-bar is too verbose on s390 (x3270 terminal)
Summary: curl --progress-bar is too verbose on s390 (x3270 terminal)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: rawhide
Hardware: s390x
OS: Linux
medium
medium
Target Milestone: ---
Assignee: dracut-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 802788 806426
Blocks: 799508
TreeView+ depends on / blocked
 
Reported: 2012-04-20 14:00 UTC by Jesse Keating
Modified: 2013-03-12 14:23 UTC (History)
9 users (show)

Fixed In Version: dracut-018-26.git20120424.fc17
Clone Of: 806426
Environment:
Last Closed: 2012-11-30 07:41:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jesse Keating 2012-04-20 14:00:01 UTC
+++ This bug was initially created as a clone of Bug #806426 +++

Basically, if I understand correctly: on s390, TERM=dumb. And dumb terminals are so dumb they don't even understand "\r". So curl needs to do something smarter (or, perhaps, dumber) when TERM=dumb.

+++ This bug was initially created as a clone of Bug #802788 +++

Description of problem:
Downloading a rootfs image via http/ftp is too verbose when running on s390x via x3270 terminal. See attached boot log [in #802788] from the installation.

--- Additional comment from kdudka on 2012-04-02 07:24:53 EDT ---

raised upstream:

http://thread.gmane.org/gmane.comp.web.curl.general/12769

--- Additional comment from kdudka on 2012-04-06 09:09:51 EDT ---

Created attachment 575742 [details]
work in progress

The attached patch uses libtinfo to detect the $TERM capability to interpret the \r character, if compiled with --with-tinfo.  Some review comments are available here:

http://thread.gmane.org/gmane.comp.web.curl.general/12769/focus=12774
http://thread.gmane.org/gmane.comp.web.curl.general/12769/focus=12776

Now the problem is that the terminfo database lists a working \r for TERM=dumb.  Therefore, the attached patch does not solve the reported problem on its own.

An alternative approach would be to implement an option of curl to enable the simplified progress bar mode explicitly.

Comment 1 Jesse Keating 2012-04-20 14:02:59 UTC
I doubt this is going to get fixed in curl in time, so in the mean time we need to just not use --progress-bar when on the s390x platform.  I think that's easy enough to do in modules.d/45url-lib/url-lib.sh

Comment 2 Kamil Dudka 2012-04-20 15:41:33 UTC
(In reply to comment #1)
> I doubt this is going to get fixed in curl in time

Jesse, please specify what exactly you mean by "get fixed in curl".  There has been so far no valid proposal of a fix for curl...

Comment 3 Jesse Keating 2012-04-20 15:58:19 UTC
The "easy fix" is to ignore --progress-bar when the cms environment is detected.  No idea how to properly detect that environment though.

I honestly have no idea if there are any scan codes that are useful to do anything like a progress bar within cms.

Comment 4 Dan Horák 2012-04-20 16:15:47 UTC
Jesse, there is proposed solution for curl, but the problem is on the s390 side where it uses TERM=dumb which reports the capability of handling \r, while the console in fact doesn't handle it. And all that will need some time to resolve if possible at all.

In the meantime I'd prefer dracut to not use the --progress-bar option when on s390x.

Comment 5 Will Woods 2012-04-20 19:13:22 UTC
So: the TERM setting is wrong, since the terminal doesn't even fully support "dumb". Is there a TERM more appropriate (or dumb enough) for CMS?

(In the meantime, we can skip '--progress-bar' if TERM=dumb. The normal output still uses '\r', but it only updates once per second, so that's why it's less verbose..)

Comment 6 Kamil Dudka 2012-04-20 19:41:13 UTC
An alternative approach would be to introduce a new option in curl (e.g. --progress-simple) and let dracut use it.  With this option, we can simply forget about the problems with terminal detection and curl does not need to to build against the terminfo library at all.  A solution like this was also suggested by upstream meanwhile (independently on my original proposal):

http://thread.gmane.org/gmane.comp.web.curl.general/12769/focus=12786

Comment 7 Fedora Update System 2012-04-24 14:25:30 UTC
dracut-018-26.git20120424.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/dracut-018-26.git20120424.fc17

Comment 8 Fedora Update System 2012-04-25 04:48:21 UTC
Package dracut-018-26.git20120424.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-018-26.git20120424.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-6603/dracut-018-26.git20120424.fc17
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-05-02 04:37:35 UTC
dracut-018-26.git20120424.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Jesse Keating 2012-06-08 19:05:19 UTC
Well this was supposedly fixed by not using the --progress-bar option for all hosts.  However now it uses curl's built in progress thing, which is still too wide for x3270 causing a cascade of text wraps which is still pretty ugly.  I think we need to bite the bullet here and just operate curl in silent mode for s390x :(

Comment 11 Harald Hoyer 2012-11-29 15:59:21 UTC
still an issue?

Comment 12 Dan Horák 2012-11-29 20:02:30 UTC
(In reply to comment #11)
> still an issue?

no, all seems to work sufficiently good


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