Package: smartmontools
Version: 7.1-1
Severity: normal
Tags: patch

Since the recent updates to debianutils 4.10 the tempfile program now
emits a run time deprecation warning.  This is now printed by the
smartmontools smartd-runner program whenever it is invoked.

Attached is the trivial and obvious patch.  Simply change tempfile to
mktemp.

[[ Although of course I want to improve the script with proper trap
handling for the temporary file and proper shell variable quoting too.
And it doesn't use any bash-isms so using portable shell would be
better.  But I will restrain myself. :-) ]]

Bob

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
--- smartd-runner.original      2019-10-09 04:11:03.000000000 -0600
+++ smartd-runner       2020-09-06 13:21:50.344560573 -0600
@@ -1,6 +1,6 @@
 #!/bin/bash -e
 
-tmp=$(tempfile)
+tmp=$(mktemp)
 cat >$tmp
 
 run-parts --report --lsbsysinit --arg=$tmp --arg="$1" \

Reply via email to