gnu: facter: Embed more absolute references.
* gnu/packages/admin.scm (facter)[arguments]: Rename the ‘embed-iproute-reference’ phase to ‘embed-absolute-references’ and make it generic. Implicit inputs like coreutils are captured. References depend on what's found, not a hard-coded list. [inputs]: Add dmidecode, inetutils, pciutils, and util-linux.master
parent
6a67aad88e
commit
c43c4d8b39
|
@ -455,7 +455,8 @@ graphs and can export its output to different formats.")
|
|||
"0bab3by926gavbhkvp0in82vim575ybj8z6av3b12jdvla1s9rmz"))))
|
||||
(build-system ruby-build-system)
|
||||
(arguments
|
||||
`(#:phases (modify-phases %standard-phases
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'delete-facter-ng-gemspec
|
||||
(lambda _
|
||||
;; XXX: ruby-build-system incorrectly finds
|
||||
|
@ -466,15 +467,14 @@ graphs and can export its output to different formats.")
|
|||
;; facter-ng->facter rename.
|
||||
(delete-file "agent/facter-ng.gemspec")
|
||||
#t))
|
||||
(add-after 'unpack 'embed-iproute-reference
|
||||
(add-after 'unpack 'embed-absolute-references
|
||||
;; Refer to absolute executable file names to avoid propagation.
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let ((iproute (assoc-ref inputs "iproute")))
|
||||
;; Provide an absolute reference to the 'ip' executable
|
||||
;; to avoid propagating it.
|
||||
(substitute* "lib/resolvers/networking_linux_resolver.rb"
|
||||
(("execute\\('ip")
|
||||
(string-append "execute('" iproute "/sbin/ip")))
|
||||
#t)))
|
||||
(substitute* (find-files "lib/resolvers" "\\.rb$")
|
||||
(("execute\\('(which |)([^ ']+)" _ _ name)
|
||||
(string-append "execute('" (or (which name)
|
||||
name))))
|
||||
#t))
|
||||
(delete 'check)
|
||||
(add-after 'wrap 'check
|
||||
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||
|
@ -492,10 +492,16 @@ graphs and can export its output to different formats.")
|
|||
(format #t "tests disabled~%"))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("iproute" ,iproute)
|
||||
("ruby-hocon" ,ruby-hocon)
|
||||
`(("ruby-hocon" ,ruby-hocon)
|
||||
("ruby-sys-filesystem" ,ruby-sys-filesystem)
|
||||
("ruby-thor" ,ruby-thor)))
|
||||
("ruby-thor" ,ruby-thor)
|
||||
|
||||
;; For ‘embed-absolute-references’.
|
||||
("dmidecode" ,dmidecode)
|
||||
("inetutils" ,inetutils) ; for ‘hostname’
|
||||
("iproute" ,iproute)
|
||||
("pciutils" ,pciutils)
|
||||
("util-linux" ,util-linux)))
|
||||
(synopsis "Collect and display system facts")
|
||||
(description
|
||||
"Facter is a tool that gathers basic facts about nodes (systems) such
|
||||
|
|
Reference in New Issue