[PATCH] gnu: smartmontools: Fix PATH in smartd_warning.sh.

  • Open
  • quality assurance status badge
Details
One participant
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal
T
T
Tomas Volf wrote on 15 Jan 00:40 +0100
(name . Tomas Volf)(address . ~@wolfsden.cz)
d7320ddeb1939ce0eeeea10f7267883692c269e7.1736898019.git.~@wolfsden.cz
The script started with reset of the $PATH to a value not suitable to Guix.
In addition, the script requires coreutils and sed, so add those into the
$PATH.

* gnu/packages/admin.scm (smartmontools)[arguments]<#:phases>: Add 'fix-path.

Change-Id: Ide97f572e6f369fe24337f945474dc7a65584eda
---
gnu/packages/admin.scm | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 7f50d5f4e9..098e21ff8a 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2921,8 +2921,19 @@ (define-public smartmontools
"0gcrzcb4g7f994n6nws26g6x15yjija1gyzd359sjv7r3xj1z9p9"))))
(build-system gnu-build-system)
(arguments
- (list #:make-flags
- #~(list "BUILD_INFO=\"(Guix)\"")))
+ (list
+ #:make-flags
+ #~(list "BUILD_INFO=\"(Guix)\"")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'fix-path
+ (lambda _
+ (substitute* (string-append #$output "/etc/smartd_warning.sh")
+ (("export PATH=.*$" all)
+ (string-append "PATH="
+ #$(file-append sed "/bin") ":"
+ #$(file-append coreutils "/bin") ":"
+ "$PATH\n"))))))))
(inputs (list libcap-ng))
(home-page "https://www.smartmontools.org/")
(synopsis "S.M.A.R.T. harddisk control and monitoring tools")
--
2.47.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75568@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75568
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch