Bug 1367234

Summary: smartmontools fails to update drive DB.
Product: Red Hat Enterprise Linux 6 Reporter: Keigo Noha <knoha>
Component: smartmontoolsAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED ERRATA QA Contact: Vaclav Danek <vdanek>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8CC: aizmaylov, christian.franke, mhlavink, psklenar, qe-baseos-daemons, vdanek
Target Milestone: rcKeywords: EasyFix
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: smartmontools-5.43-3.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1364830 Environment:
Last Closed: 2017-03-21 11:13:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1364830    
Bug Blocks:    

Description Keigo Noha 2016-08-16 02:04:41 UTC
+++ This bug was initially created as a clone of Bug #1364830 +++

Description of problem:
The current package version is 6.2 which uses HTTP for updating drive databases.
Sourceforge uses https but curl does not follow the redirect from http to https.

Version-Release number of selected component (if applicable):
6.2

How reproducible:
easily

Steps to Reproduce:
1. run /usr/sbin/update-smart-drivedb
2. see error message "/usr/sbin/update-smart-drivedb: download from trunk failed (HTTP error)"

Actual results:
Update failed

Expected results:
Update succeed

Additional info:
The problem was fixed in version 6.5, which was released 07.05.2016 but RedHat and Centos repos still contain v6.2

--- Additional comment from RHEL Product and Program Management on 2016-08-07 21:58:10 EDT ---

Since this bug report was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 1 Keigo Noha 2016-08-16 02:05:33 UTC
The issue occurs on RHEL6 latest smartmontools also.
The URL need to be updated.

Comment 2 Keigo Noha 2016-08-16 02:14:21 UTC
update-smart-drivedb shell script can not accept the latest drivedb.h.
The valid drivedb is https://sourceforge.net/p/smartmontools/code/HEAD/tree/tags/RELEASE_5_43/smartmontools/drivedb.h?format=raw

Comment 5 Christian Franke 2016-10-08 12:09:50 UTC
(In reply to Keigo Noha from comment #2)
> The valid drivedb is
> https://sourceforge.net/p/smartmontools/code/HEAD/tree/tags/RELEASE_5_43/
> smartmontools/drivedb.h?format=raw

This would downgrade drivedb.h to the original version from the 5.43 source tarball. Please use the branch URL instead:

https://sourceforge.net/p/smartmontools/code/HEAD/tree/branches/RELEASE_5_43_DRIVEDB/smartmontools/drivedb.h?format=raw

See also:
https://www.smartmontools.org/wiki/Download#Updatethedrivedatabase

The current (reworked) update script allows to select alternative URLs (SVN, Sourceforge, Trac). This script could be used also for older releases if BRANCH is set accordingly:

$ ./configure --with-PACKAGE_SPECIFIC_SETTINGS
$ make update-smart-drivedb
$ sed -i 's,RELEASE_.*_DRIVEDB,RELEASE_5_43_DRIVEDB,' update-smart-drivedb

Comment 6 Michal Hlavinka 2016-10-20 11:43:52 UTC
Hi Christian, thanks for your input, it's always appreciated. I have already prepared fix that uses backported update script as you've suggested.

Comment 7 Christian Franke 2016-10-20 12:42:48 UTC
You're welcome.  BTW, I'm working on a new script which improves security:
https://www.smartmontools.org/ticket/751
This script will also work with older releases.

Comment 11 errata-xmlrpc 2017-03-21 11:13:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0724.html