#348 openh264 binary rpms downloaded as html, but named as rpm
Opened by kparal. Modified

As shown in #755, there's an unfortunate situation with [[ https://fedoraproject.org/wiki/OpenH264 | OpenH264 ]] in Fedora - the binary rpms are [[ http://koji.fedoraproject.org/koji/packageinfo?packageID=21431 | built in our infra ]], but later made inaccessible, and only the source rpms can be downloaded. That of course confuses our tooling.

For example, currently, when task-rpmlint wants all openh264 rpms to be downloaded, koji_utils downloads everything including binary rpms, which in fact redirect to https://fedoraproject.org/wiki/Non-distributable-rpms . So we end up with file named like openh264-1.5.3-0.1.git2706e36.fc24.x86_64.rpm which are in fact HTML files, not RPM files. Rpmlint then complains like this:

(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/gstreamer1-plugin-openh264-1.8.1-1.fc24.armv7hl.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/gstreamer1-plugin-openh264-1.8.1-1.fc24.i686.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/gstreamer1-plugin-openh264-1.8.1-1.fc24.x86_64.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/mozilla-openh264-1.5.3-0.1.git2706e36.fc24.armv7hl.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/mozilla-openh264-1.5.3-0.1.git2706e36.fc24.i686.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/mozilla-openh264-1.5.3-0.1.git2706e36.fc24.x86_64.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/openh264-1.5.3-0.1.git2706e36.fc24.armv7hl.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/openh264-1.5.3-0.1.git2706e36.fc24.i686.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/openh264-1.5.3-0.1.git2706e36.fc24.x86_64.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/openh264-devel-1.5.3-0.1.git2706e36.fc24.armv7hl.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/openh264-devel-1.5.3-0.1.git2706e36.fc24.i686.rpm: error reading package header
(none): E: error while reading /var/tmp/taskotron/kparal/task-5Wi3dr/openh264-devel-1.5.3-0.1.git2706e36.fc24.x86_64.rpm: error reading package header
0 packages and 0 specfiles checked; 0 errors, 0 warnings.

Fortunately this is not a fatal issue for rpmlint, it just skips these files. However, that might not be true for all tasks.

We should figure out how to better handle this situation.
* One idea is to ask fedora infra to serve a specific HTTP code (like 404, or perhaps [[ https://en.wikipedia.org/wiki/HTTP_451 | 451 Unavailable For Legal Reasons ]], or some other) that we will recognize and process. They still can show a html page with an explanation and a link to that wiki page.
* Other idea is to determine target file names automatically and therefore save the wiki pages as page_name.html instead of nvr.rpm, which is easier to filter by tasks.
* The above can be combined with automatic deletion of non-rpm files inside the koji_utils code.
* Or we can filter it by content-type before actual download happens, but be aware that the actual download is performed outside of koji_utils in a generic download method.


Metadata