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: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-05 17:05 UTC by Miroslav Lachman
Modified: 2019-02-18 20:30 UTC (History)
1 user (show)

See Also:
samm: maintainer-feedback+


Attachments

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 samm 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 samm 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"
PACKAGE="smartmontools"
VERSION="6.6"
prefix="/usr/local"
exec_prefix="${prefix}"
sbindir="${exec_prefix}/sbin"
datarootdir="${prefix}/share"
datadir="${datarootdir}"

I'll try 7.0 soon.
Comment 4 samm 2019-02-18 20:21:08 UTC
Please dont report bugs on outdated packages, always use latest one.
Comment 5 samm 2019-02-18 20:30:49 UTC
P.S. there is PATH on 7.0 but it has /usr/local/bin in it.