[Bug 1209085] Re: update-smart-drivedb uses old download link
Andreas Hasenack
andreas at canonical.com
Mon Jul 16 19:34:57 UTC 2018
** Description changed:
[Impact]
Updating the smart driver db fails because the tool selected by the
script (curl) is not called with a parameter that allows it to follow
redirects. Since upstream changed the URL for that driver file, the
script now fails.
The fix is to just add -L to the curl command line.
[Test Case]
- sudo apt-get install smartmontools --no-install-recommends
- sudo update-smart-drivedb
+ $ sudo apt-get install smartmontools --no-install-recommends
+ $ sudo update-smart-drivedb
/var/lib/smartmontools/drivedb/drivedb.h.error: rejected by /usr/sbin/smartctl, probably no longer compatible
The file /var/lib/smartmontools/drivedb/drivedb.h.error contains the redirect notice:
<h1>302 Found</h1>
- The resource was found at <a href="https://sourceforge.net/p/smartmontools/code/HEAD/tree/branches/RELEASE_6_2_DRIVEDB/smartmontools/drivedb.h?format=raw">https://sourceforge.net/p/smartmontools/code/HEAD/tree/branches/RELEASE_6_2_DRIVEDB/smartmontools/drivedb.h?format=raw</a>;
+ The resource was found at <a href="https://sourceforge.net/p/smartmontools/code/HEAD/tree/branches/RELEASE_6_2_DRIVEDB/smartmontools/drivedb.h?format=raw">https://sourceforge.net/p/smartmontools/code/HEAD/tree/branches/RELEASE_6_2_DRIVEDB/smartmontools/drivedb.h?format=raw</a>;
you should be redirected automatically.
- Update the packages and run the command again, this time it will
- succeed:
-
+ Update the packages and run the command again, this time it will succeed:
+ $ sudo update-smart-drivedb
+ /var/lib/smartmontools/drivedb/drivedb.h updated from branches/RELEASE_6_2_DRIVEDB
[Regression Potential]
If there is a redirect loop, before it wouldn't be followed, and now it will. There is a default limit of 50, though (--max-redirs' default), so eventually it will stop and fail (correctly).
[Other Info]
Later supported releases of Ubuntu and Debian have dropped this script from the package, so no fix is necessary there.
Following the spirit of the smallest change possible, I chose to not
change the URL from where the file is downloaded.
-
[Original Description]
Package: smartmontools-6.1+svn3812-1 and older.
Due to sourceforge platform upgrades (http://sourceforge.net/blog
/upgrades-april22/), the smartmontools SVN repository was moved to a new
location. The update-smart-drivedb script from a smartmontools build
before r3814 downloads drivedb.h from the old respository which is still
present but set to R/O.
Possible fix:
- Update to smartmontools 6.2 (final, r3841), or
- Replace update-smart-drivedb with a new one generated from 6.2 tarball. Adjust the branch version number in line 'BRANCH="RELEASE_6_2_DRIVEDB"'. This should work for smartmontools 5.40 to 6.1. These drivedb.h branches are still maintained.
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to smartmontools in Ubuntu.
https://bugs.launchpad.net/bugs/1209085
Title:
update-smart-drivedb uses old download link
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/smartmontools/+bug/1209085/+subscriptions
More information about the Ubuntu-server-bugs
mailing list