Bug 235533 - sysutils/smartmontools update-smart-drivedb does not work with gpg even if installed
Summary: sysutils/smartmontools update-smart-drivedb does not work with gpg even if in...
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
Depends on:
Reported: 2019-02-05 17:05 UTC by Miroslav Lachman
Modified: 2019-07-15 12:02 UTC (History)
1 user (show)

See Also:
samm: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2019-02-05 17:05:09 UTC
update-smart-drivedb does not work with gpg even if gnupg is installed
It shows:
/usr/local/sbin/update-smart-drivedb: gpg: not found ('--no-verify' to ignore)

The problem is this PATH in update-smart-drivedb script

export PATH="/usr/bin:/bin"

Script cannot find gpg executable installed in to /usr/local/bin/gpg

Adding /usr/local/bin to PATH should fix it.

export PATH="/usr/bin:/bin:/usr/local/bin"

If this script depends on gpg, then it should be listed as package dependency. (maybe optional)
Comment 1 Oleksii Samorukov freebsd_committer 2019-02-16 07:48:46 UTC
Thank you for the report. I will look on it next days to find an optimal solution. GPG is used only to validate updates.
Comment 2 Oleksii Samorukov freebsd_committer 2019-02-16 09:44:13 UTC
Just checked.

1. update-smart-drivedb does not set PATH variable and works fine if  /usr/local/bin/ is in it. So it is not a script issue but your env issue. And i dont want to override PATH from the script

2. Not sure if that dependency is really needed - this is only updater dependency and it could be skipped using --no-verify option

Anyway, if you feel that it needed - please propose a patch and reopen the ticket
Comment 3 Miroslav Lachman 2019-02-18 08:50:29 UTC
I am on smartmontools-6.6_2 and it definitely sets PATH:

# head -n 30 /usr/local/sbin/update-smart-drivedb | egrep -v '^#'

set -e

export PATH="/usr/bin:/bin"

I'll try 7.0 soon.
Comment 4 Oleksii Samorukov freebsd_committer 2019-02-18 20:21:08 UTC
Please dont report bugs on outdated packages, always use latest one.
Comment 5 Oleksii Samorukov freebsd_committer 2019-02-18 20:30:49 UTC
P.S. there is PATH on 7.0 but it has /usr/local/bin in it.
Comment 6 Oleksii Samorukov freebsd_committer 2019-07-15 11:24:01 UTC
Please close this pr. I am not able to reproduce this, reporter is not responding.