Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
c0d56bb2 | 3 | ;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org> |
aa3d9011 | 4 | ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr> |
0f1adf45 | 5 | ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> |
4403030b | 6 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> |
e0267193 | 7 | ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> |
6693eac6 | 8 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
55685e45 | 9 | ;;; Copyright © 2021 Lars-Dominik Braun <ldb@leibniz-psychology.org> |
6ad2697d | 10 | ;;; |
233e7676 | 11 | ;;; This file is part of GNU Guix. |
6ad2697d | 12 | ;;; |
233e7676 | 13 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
6ad2697d NK |
14 | ;;; under the terms of the GNU General Public License as published by |
15 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
16 | ;;; your option) any later version. | |
17 | ;;; | |
233e7676 | 18 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
6ad2697d NK |
19 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;;; GNU General Public License for more details. | |
22 | ;;; | |
23 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
6ad2697d | 25 | |
1ffa7090 | 26 | (define-module (gnu packages acl) |
4a44e743 | 27 | #:use-module (guix licenses) |
1ffa7090 | 28 | #:use-module (gnu packages attr) |
3f2a7727 | 29 | #:use-module (gnu packages base) |
55685e45 | 30 | #:use-module (gnu packages check) |
6693eac6 | 31 | #:use-module (gnu packages hurd) |
1dba6407 | 32 | #:use-module (gnu packages gettext) |
3f2a7727 | 33 | #:use-module (gnu packages perl) |
6ad2697d NK |
34 | #:use-module (guix packages) |
35 | #:use-module (guix download) | |
561840b4 | 36 | #:use-module (gnu packages) |
55685e45 LDB |
37 | #:use-module (guix build-system gnu) |
38 | #:use-module (guix build-system python)) | |
6ad2697d NK |
39 | |
40 | (define-public acl | |
41 | (package | |
42 | (name "acl") | |
e0267193 | 43 | (version "2.2.53") |
6ad2697d NK |
44 | (source |
45 | (origin | |
46 | (method url-fetch) | |
47 | (uri (string-append "mirror://savannah/acl/acl-" | |
e0267193 | 48 | version ".tar.gz")) |
6ad2697d NK |
49 | (sha256 |
50 | (base32 | |
e0267193 | 51 | "1ir6my3w74s6nfbgbqgzj6w570sn0qjf3524zx8xh67lqrjrigh6")))) |
6ad2697d NK |
52 | (build-system gnu-build-system) |
53 | (arguments | |
e0267193 | 54 | `(#:modules ((ice-9 ftw) |
4403030b | 55 | ,@%gnu-build-system-modules) |
ecfe1537 | 56 | #:configure-flags '("--disable-static") |
559c134b MO |
57 | #:tests? ,(not (or (%current-target-system) |
58 | (hurd-target?))) | |
16755848 | 59 | #:phases |
79272039 | 60 | (modify-phases %standard-phases |
4403030b RW |
61 | ;; XXX After repacking the sources the timestamps are reset to the |
62 | ;; epoch, which leads to a failure in gzipping the CHANGES file. | |
63 | (add-after 'unpack 'ensure-no-mtimes-pre-1980 | |
64 | (lambda _ | |
65 | (let ((early-1980 315619200)) ; 1980-01-02 UTC | |
66 | (ftw "." (lambda (file stat flag) | |
67 | (unless (<= early-1980 (stat:mtime stat)) | |
68 | (utime file early-1980 early-1980)) | |
69 | #t)) | |
70 | #t))) | |
79272039 EF |
71 | (add-after 'build 'patch-exec-bin-sh |
72 | (lambda _ | |
73 | (substitute* "test/run" | |
74 | (("/bin/sh") (which "sh"))) | |
75 | #t)) | |
2d433b53 | 76 | (add-before 'check 'patch-tests |
7183c4bf LF |
77 | (lambda _ |
78 | ;; The coreutils do not have an ACL bit to remove from their | |
79 | ;; output, so the sed expression that removes the bit is disabled. | |
80 | (substitute* "test/sbits-restore.test" | |
81 | (("\\| sed.*'") "")) | |
82 | ;; These tests require the existence of a user named "bin", but | |
83 | ;; this user does not exist within Guix's build environment. | |
e0267193 MB |
84 | (substitute* "Makefile.in" |
85 | ((".*test/misc\\.test.*") "") | |
86 | ((".*test/cp\\.test.*") "") | |
87 | ((".*test/setfacl-X\\.test.*") "")) | |
88 | #t))))) | |
16755848 | 89 | (inputs `(("attr" ,attr))) |
2a552f11 | 90 | (native-inputs |
b94a6ca0 | 91 | `(("gettext" ,gettext-minimal) |
52f62492 | 92 | ("perl" ,perl))) |
340978d7 | 93 | (home-page "https://savannah.nongnu.org/projects/acl") |
6ad2697d NK |
94 | (synopsis |
95 | "Library and tools for manipulating access control lists") | |
96 | (description | |
97 | "Library and tools for manipulating access control lists.") | |
38bbd61d | 98 | (license (list gpl2+ lgpl2.1+)))) |
55685e45 LDB |
99 | |
100 | (define-public python-pylibacl | |
101 | (package | |
102 | (name "python-pylibacl") | |
103 | (version "0.6.0") | |
104 | (source | |
105 | (origin | |
106 | (method url-fetch) | |
107 | (uri (pypi-uri "pylibacl" version)) | |
108 | (sha256 | |
109 | (base32 | |
110 | "1zyrk2m20p5b6bdwxhrwib273i6i71zyr5hzssbxfqis5qra9848")))) | |
111 | (build-system python-build-system) | |
112 | (arguments | |
113 | `(#:phases | |
114 | (modify-phases %standard-phases | |
115 | (add-after 'unpack 'disable-tests | |
116 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
117 | ;; These tests operate on real files, but our tempfs does not support | |
118 | ;; ACLs | |
119 | (substitute* "tests/test_acls.py" | |
120 | (("( *)def test_applyto(_extended(_mixed)?)?" match indent) | |
121 | (string-append indent "@pytest.mark.skip(reason=\"guix\")\n" match))) | |
122 | #t)) | |
123 | (replace 'check | |
124 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) | |
125 | (when tests? | |
126 | (add-installed-pythonpath inputs outputs) | |
127 | (invoke "pytest" "tests")) | |
128 | #t))))) | |
129 | (inputs `(("acl" ,acl))) | |
130 | (native-inputs `(("python-pytest" ,python-pytest))) | |
131 | (home-page "https://pylibacl.k1024.org/") | |
132 | (synopsis "POSIX.1e ACLs for python") | |
133 | (description "Python 3.4+ extension module that allows you to manipulate | |
134 | the POSIX.1e Access Control Lists present in some OS/file-systems | |
135 | combinations.") | |
136 | (license lgpl2.1+))) |