scsi.scm 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
  3. ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu packages scsi)
  21. #:use-module ((guix licenses)
  22. #:select (gpl2+ bsd-2 bsd-3 lgpl2.1+))
  23. #:use-module (guix packages)
  24. #:use-module (guix download)
  25. #:use-module (guix git-download)
  26. #:use-module (guix build-system gnu)
  27. #:use-module (gnu packages autotools))
  28. (define-public sg3-utils
  29. (package
  30. (name "sg3-utils")
  31. (version "1.47")
  32. (source (origin
  33. (method url-fetch)
  34. (uri (string-append "http://sg.danny.cz/sg/p/sg3_utils-"
  35. version ".tar.xz"))
  36. (sha256
  37. (base32
  38. "1ckj2kjcs23lbjfyl5mz2rb0aylnyq13yghg0bdv1n7dbywcmc6x"))))
  39. (build-system gnu-build-system)
  40. (arguments
  41. `(#:configure-flags
  42. (list "--disable-static")))
  43. (home-page "https://sg.danny.cz/sg/sg3_utils.html")
  44. (synopsis "SCSI device utilities")
  45. (description
  46. "sg3-utils is a collection of utilities for devices that use the Small
  47. Computer System Interface (@dfn{SCSI}) command set. It includes utilities to
  48. read data from, write data to, control, modify, and query the state of SCSI
  49. devices.
  50. For example, this package provides command-line tools to:
  51. @itemize
  52. @item copy data based on @code{dd} syntax and semantics (called @command{sg_dd},
  53. @command{sgp_dd}, and @command{sgm_dd})
  54. @item check @code{INQUIRY} data and @code{VPD pages} (@command{sg_inq})
  55. @item check mode and log pages (@command{sginfo}, @command{sg_modes}, and
  56. @command{sg_logs})
  57. @item spin up and down disks (@command{sg_start})
  58. @item do self-tests (@code{sg_senddiag})
  59. @item parse sense data (@code{sg_decode_sense})
  60. @item and perform various other functions.
  61. @end itemize
  62. In addition, this package includes a library, called libsgutils, which can be
  63. used in C and C++ programs to interact with SCSI devices.")
  64. ;; See README: "All utilities and libraries have either a "2 clause" BSD
  65. ;; license or are "GPL-2ed". [...] That BSD license was updated from the
  66. ;; "3 clause" to the newer "2 clause" version on 20180119. To save space
  67. ;; various source code files refer to a file called "BSD_LICENSE" [...]."
  68. ;; Some files (like sg_compare_and_write.c) retain their 3-clause headers!
  69. (license (list gpl2+ bsd-2 bsd-3))))
  70. (define-public libiscsi
  71. (package
  72. (name "libiscsi")
  73. (version "1.19.0")
  74. (source
  75. (origin
  76. (method git-fetch)
  77. (uri (git-reference
  78. (url "https://github.com/sahlberg/libiscsi")
  79. (commit version)))
  80. (sha256
  81. (base32
  82. "0ajrkkg5awmi8m4b3mha7h07ylg18k252qprvk1sgq0qbyd66zy7"))
  83. (file-name (git-file-name name version))))
  84. (build-system gnu-build-system)
  85. (native-inputs (list autoconf automake libtool))
  86. (synopsis "Client-side library for iSCSI")
  87. (description "Libiscsi is a client-side library to implement the iSCSI
  88. protocol that can be used to access the resources of an iSCSI target. It is
  89. fully asynchronous with regards to iSCSI commands and SCSI tasks, but a
  90. synchronous layer is also provided for ease of use for simpler applications.")
  91. (home-page "https://github.com/sahlberg/libiscsi")
  92. (license (list
  93. ;; For the src, examples and test-tool directories, except
  94. ;; src/ld_iscsi.c.
  95. gpl2+
  96. ;; For the lib and include directories.
  97. lgpl2.1+))))