I use smartd daemon on machines with root filesystem. /usr/sbin/update-smart-drivedb doesn't kill it's gpg-agent process and tries to remove it's home dir (line 494). On NFS it doesn't work. Directory cannot be removed because nfs preserves delete open sockets/files. (script would have to rm -rf the directory twice) This error causes stderr message which creates additional mail (false positive) when cron is configured to send mail. This small patch kills the gpg-agent and allows for error free $gnupgtmp deletion. -c backup /usr/sbin/update-smart-drivedb *** backup 2021-11-04 14:29:14.665707108 +0100 --- /usr/sbin/update-smart-drivedb 2021-11-04 14:31:08.927219722 +0100 *************** *** 491,496 **** --- 491,497 ---- echo "$out" >&2 fi + kill $(ps aux | awk '$11=="gpg-agent" && /smartmontools/{print $2}') rm -f -r "$gnupgtmp" return $r Reproducible: Always Steps to Reproduce: 1. run /etc/cron.monthly/smartmontools-update-drivedb on machine with root on NFS Actual Results: LC_ALL=C /etc/cron.monthly/smartmontools-update-drivedb rm: cannot remove '/var/db/smartmontools/.gnupg.139163.tmp': Directory not empty Script executes normal but has problem deleting it's gpg directory. Expected Results: There should be no stderr output when scripts executes normally. Script doesn't delete it's temporary directory.
Thanks for you bug report. This appears to be a non-gentoo specific issue, have you tried to create a bug report upstream at https://www.smartmontools.org/#BugReports ?
Sorry for the problem. I've just made bug report upstream. You can close or delete this bug.
(In reply to ev from comment #2) > Sorry for the problem. > I've just made bug report upstream. > > You can close or delete this bug. It's no problem -- telling us about things first so we can see if we should report it / it's our fault / ... is useful! Can you link us to the report?
Ok. This is the address of bug report I created upstream. https://www.smartmontools.org/ticket/1542 If upstream won't fix it in a few months, it would be nice if you could somehow add this fix to ebuild.
Fixed in 7.3.