acl.scm 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
  3. ;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
  5. ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
  7. ;;;
  8. ;;; This file is part of GNU Guix.
  9. ;;;
  10. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  11. ;;; under the terms of the GNU General Public License as published by
  12. ;;; the Free Software Foundation; either version 3 of the License, or (at
  13. ;;; your option) any later version.
  14. ;;;
  15. ;;; GNU Guix is distributed in the hope that it will be useful, but
  16. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. ;;; GNU General Public License for more details.
  19. ;;;
  20. ;;; You should have received a copy of the GNU General Public License
  21. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  22. (define-module (gnu packages acl)
  23. #:use-module (guix licenses)
  24. #:use-module (gnu packages attr)
  25. #:use-module (gnu packages base)
  26. #:use-module (gnu packages gettext)
  27. #:use-module (gnu packages perl)
  28. #:use-module (guix packages)
  29. #:use-module (guix download)
  30. #:use-module (gnu packages)
  31. #:use-module (guix build-system gnu))
  32. (define-public acl
  33. (package
  34. (name "acl")
  35. (version "2.2.52")
  36. (source
  37. (origin
  38. (method url-fetch)
  39. (uri (string-append "mirror://savannah/acl/acl-"
  40. version ".src.tar.gz"))
  41. (sha256
  42. (base32
  43. "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"))
  44. (patches (search-patches "acl-fix-perl-regex.patch"
  45. "acl-hurd-path-max.patch"))))
  46. (build-system gnu-build-system)
  47. (arguments
  48. `(#:test-target "tests"
  49. #:modules ((ice-9 ftw)
  50. ,@%gnu-build-system-modules)
  51. #:phases
  52. (modify-phases %standard-phases
  53. ;; XXX After repacking the sources the timestamps are reset to the
  54. ;; epoch, which leads to a failure in gzipping the CHANGES file.
  55. (add-after 'unpack 'ensure-no-mtimes-pre-1980
  56. (lambda _
  57. (let ((early-1980 315619200)) ; 1980-01-02 UTC
  58. (ftw "." (lambda (file stat flag)
  59. (unless (<= early-1980 (stat:mtime stat))
  60. (utime file early-1980 early-1980))
  61. #t))
  62. #t)))
  63. (add-after 'build 'patch-exec-bin-sh
  64. (lambda _
  65. (substitute* "test/run"
  66. (("/bin/sh") (which "sh")))
  67. #t))
  68. (add-before 'check 'patch-tests
  69. (lambda _
  70. ;; The coreutils do not have an ACL bit to remove from their
  71. ;; output, so the sed expression that removes the bit is disabled.
  72. (substitute* "test/sbits-restore.test"
  73. (("\\| sed.*'") ""))
  74. ;; These tests require the existence of a user named "bin", but
  75. ;; this user does not exist within Guix's build environment.
  76. (for-each (lambda (file)
  77. (delete-file (string-append "test/" file)))
  78. '("setfacl-X.test" "cp.test" "misc.test"))
  79. #t))
  80. (replace 'install
  81. (lambda _
  82. (invoke "make" "install" "install-lib" "install-dev"))))))
  83. (inputs `(("attr" ,attr)))
  84. (native-inputs
  85. `(("gettext" ,gettext-minimal)
  86. ("perl" ,perl)))
  87. (home-page "https://savannah.nongnu.org/projects/acl")
  88. (synopsis
  89. "Library and tools for manipulating access control lists")
  90. (description
  91. "Library and tools for manipulating access control lists.")
  92. (license (list gpl2+ lgpl2.1+))))