1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-17 04:20:44 +02:00

gnu: facter: Update to 4.4.1.

* gnu/packages/admin.scm (facter): Update to 4.4.1.
[arguments,inputs]: Update style.
[home-page]: Update.
This commit is contained in:
Christopher Baines 2023-06-29 10:22:28 +01:00
parent e0a2398559
commit 7ed11ca491
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -592,7 +592,7 @@ graphs and can export its output to different formats.")
(define-public facter (define-public facter
(package (package
(name "facter") (name "facter")
(version "4.0.52") (version "4.4.1")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -601,63 +601,61 @@ graphs and can export its output to different formats.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"05j4q87sak1f1isj7ngzr59h3j3xskfwjjwfv0xd7lhwcaxg3a3c")))) "080v0ml2svw2vbzfa659v8718pmhh2kav0l0q1jjvc6mm8sgnmmn"))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'delete-facter-ng-gemspec #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'delete-facter-ng-gemspec
;; XXX: ruby-build-system incorrectly finds (lambda _
;; facter-ng.gemspec from this directory and tries to ;; XXX: ruby-build-system incorrectly finds
;; build that instead of the proper facter.gemspec. ;; facter-ng.gemspec from this directory and tries to
;; Just delete it as a workaround, as it appears to ;; build that instead of the proper facter.gemspec.
;; only exist for backwards-compatibility after the ;; Just delete it as a workaround, as it appears to
;; facter-ng->facter rename. ;; only exist for backwards-compatibility after the
(delete-file "agent/facter-ng.gemspec") ;; facter-ng->facter rename.
#t)) (delete-file "agent/facter-ng.gemspec")))
(add-after 'unpack 'embed-absolute-references (add-after 'unpack 'embed-absolute-references
;; Refer to absolute executable file names to avoid propagation. ;; Refer to absolute executable file names to avoid propagation.
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* (find-files "lib/facter/resolvers" "\\.rb$") (substitute* (find-files "lib/facter/resolvers" "\\.rb$")
(("execute\\('(which |)([^ ']+)" _ _ name) (("execute\\('(which |)([^ ']+)" _ _ name)
(string-append "execute('" (or (which name) (string-append "execute('" (or (which name)
name)))) name))))))
#t)) (delete 'check)
(delete 'check) (add-after 'wrap 'check
(add-after 'wrap 'check (lambda* (#:key tests? outputs #:allow-other-keys)
(lambda* (#:key tests? outputs #:allow-other-keys) ;; XXX: The test suite wants to run Bundler and
;; XXX: The test suite wants to run Bundler and ;; complains that the gemspec is invalid. For now
;; complains that the gemspec is invalid. For now ;; just make sure that we can run the wrapped
;; just make sure that we can run the wrapped ;; executable directly.
;; executable directly. (if tests?
(if tests? (invoke (string-append (assoc-ref outputs "out")
(invoke (string-append (assoc-ref outputs "out") "/bin/facter")
"/bin/facter") ;; Many facts depend on /sys, /etc/os-release,
;; Many facts depend on /sys, /etc/os-release, ;; etc, so we only run a small sample.
;; etc, so we only run a small sample. "facterversion" "architecture"
"facterversion" "architecture" "kernel" "kernelversion")
"kernel" "kernelversion") (format #t "tests disabled~%")))))))
(format #t "tests disabled~%"))
#t)))))
(inputs (inputs
`(("ruby-hocon" ,ruby-hocon) (list ruby-hocon
("ruby-sys-filesystem" ,ruby-sys-filesystem) ruby-sys-filesystem
("ruby-thor" ,ruby-thor) ruby-thor
;; For embed-absolute-references. ;; For embed-absolute-references.
("dmidecode" ,dmidecode) dmidecode
("inetutils" ,inetutils) ; for hostname inetutils ; for hostname
("iproute" ,iproute) iproute
("pciutils" ,pciutils) pciutils
("util-linux" ,util-linux))) util-linux))
(synopsis "Collect and display system facts") (synopsis "Collect and display system facts")
(description (description
"Facter is a tool that gathers basic facts about nodes (systems) such "Facter is a tool that gathers basic facts about nodes (systems) such
as hardware details, network settings, OS type and version, and more. These as hardware details, network settings, OS type and version, and more. These
facts can be collected on the command line with the @command{facter} command facts can be collected on the command line with the @command{facter} command
or via the @code{facter} Ruby library.") or via the @code{facter} Ruby library.")
(home-page "https://github.com/puppetlabs/facter-ng") (home-page "https://github.com/puppetlabs/facter")
(license license:expat))) (license license:expat)))
(define-public ttyload (define-public ttyload