gnu: libsepol: Update to 3.2.

* gnu/packages/selinux.scm (libsepol): Update to 3.2.
[source]: Use git-file-name.
[arguments]: Remove trailing #t.
(checkpolicy,libselinux, libsemanage, secilc policycoreutils
python-sepolgen)[arguments]: Same.
This commit is contained in:
Efraim Flashner 2021-04-12 12:08:23 +03:00
parent e9194f02e4
commit 545aeb708a
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -2,6 +2,7 @@
;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -47,17 +48,16 @@ (define-module (gnu packages selinux)
(define-public libsepol (define-public libsepol
(package (package
(name "libsepol") (name "libsepol")
(version "3.0") (version "3.2")
(source (let ((release "20191204")) (source (origin
(origin (method git-fetch)
(method git-fetch) (uri (git-reference
(uri (git-reference (url "https://github.com/SELinuxProject/selinux")
(url "https://github.com/SELinuxProject/selinux") (commit version)))
(commit release))) (file-name (git-file-name "selinux" version))
(file-name (string-append "selinux-" release "-checkout")) (sha256
(sha256 (base32
(base32 "03p3lmvrvkcvsmiczsjzhyfgxlxdkdyq0p8igv3s3hdak5n92jjn"))))
"05rpzm72cgprd0ccr6lvx9hm8j8b5nkqi4avshlsyg7s3sdlcxjs")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f ; tests require checkpolicy, which requires libsepol `(#:tests? #f ; tests require checkpolicy, which requires libsepol
@ -80,14 +80,13 @@ (define-public libsepol
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(add-after 'unpack 'enter-dir (add-after 'unpack 'enter-dir
(lambda _ (chdir ,name) #t)) (lambda _ (chdir ,name)))
(add-after 'enter-dir 'portability (add-after 'enter-dir 'portability
(lambda _ (lambda _
(substitute* "src/ibpkeys.c" (substitute* "src/ibpkeys.c"
(("#include \"ibpkey_internal.h\"" line) (("#include \"ibpkey_internal.h\"" line)
(string-append line "\n#include <inttypes.h>\n")) (string-append line "\n#include <inttypes.h>\n"))
(("%#lx") "%#\" PRIx64 \"")) (("%#lx") "%#\" PRIx64 \"")))))))
#t)))))
(native-inputs (native-inputs
`(("flex" ,flex))) `(("flex" ,flex)))
(home-page "https://selinuxproject.org/") (home-page "https://selinuxproject.org/")
@ -122,7 +121,7 @@ (define-public checkpolicy
(delete 'configure) (delete 'configure)
(delete 'portability) (delete 'portability)
(add-after 'unpack 'enter-dir (add-after 'unpack 'enter-dir
(lambda _ (chdir ,name) #t))))) (lambda _ (chdir ,name))))))
(inputs (inputs
`(("libsepol" ,libsepol))) `(("libsepol" ,libsepol)))
(native-inputs (native-inputs
@ -159,7 +158,7 @@ (define-public libselinux
`(modify-phases ,phases `(modify-phases ,phases
(delete 'portability) (delete 'portability)
(replace 'enter-dir (replace 'enter-dir
(lambda _ (chdir ,name) #t)) (lambda _ (chdir ,name)))
(add-after 'build 'pywrap (add-after 'build 'pywrap
(lambda* (#:key make-flags #:allow-other-keys) (lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "pywrap" make-flags))) (apply invoke "make" "pywrap" make-flags)))
@ -209,13 +208,12 @@ (define-public libsemanage
`(modify-phases ,phases `(modify-phases ,phases
(delete 'portability) (delete 'portability)
(replace 'enter-dir (replace 'enter-dir
(lambda _ (chdir ,name) #t)) (lambda _ (chdir ,name)))
(add-before 'install 'adjust-semanage-conf-location (add-before 'install 'adjust-semanage-conf-location
(lambda _ (lambda _
(substitute* "src/Makefile" (substitute* "src/Makefile"
(("DEFAULT_SEMANAGE_CONF_LOCATION=/etc") (("DEFAULT_SEMANAGE_CONF_LOCATION=/etc")
"DEFAULT_SEMANAGE_CONF_LOCATION=$(PREFIX)/etc")) "DEFAULT_SEMANAGE_CONF_LOCATION=$(PREFIX)/etc"))))
#t))
(add-after 'build 'pywrap (add-after 'build 'pywrap
(lambda* (#:key make-flags #:allow-other-keys) (lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "pywrap" make-flags))) (apply invoke "make" "pywrap" make-flags)))
@ -256,7 +254,7 @@ (define-public secilc
`(modify-phases ,phases `(modify-phases ,phases
(delete 'portability) (delete 'portability)
(replace 'enter-dir (replace 'enter-dir
(lambda _ (chdir ,name) #t)))))) (lambda _ (chdir ,name)))))))
(inputs (inputs
`(("libsepol" ,libsepol))) `(("libsepol" ,libsepol)))
(native-inputs (native-inputs
@ -279,7 +277,7 @@ (define-public python-sepolgen
`(modify-phases ,phases `(modify-phases ,phases
(delete 'portability) (delete 'portability)
(replace 'enter-dir (replace 'enter-dir
(lambda _ (chdir "python/sepolgen") #t)) (lambda _ (chdir "python/sepolgen")))
;; By default all Python files would be installed to ;; By default all Python files would be installed to
;; $out/gnu/store/...-python-.../, so we override the ;; $out/gnu/store/...-python-.../, so we override the
;; PACKAGEDIR to fix this. ;; PACKAGEDIR to fix this.
@ -301,8 +299,7 @@ (define-public python-sepolgen
(assoc-ref inputs "python")) (assoc-ref inputs "python"))
"/site-packages/sepolgen"))) "/site-packages/sepolgen")))
(substitute* "src/share/Makefile" (substitute* "src/share/Makefile"
(("\\$\\(DESTDIR\\)") (assoc-ref outputs "out")))) (("\\$\\(DESTDIR\\)") (assoc-ref outputs "out")))))))))))
#t)))))))
(inputs (inputs
`(("python" ,python-wrapper))) `(("python" ,python-wrapper)))
(native-inputs '()) (native-inputs '())
@ -401,9 +398,8 @@ (define-public policycoreutils
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(delete 'portability)
(add-after 'unpack 'enter-dir (add-after 'unpack 'enter-dir
(lambda _ (chdir ,name) #t)) (lambda _ (chdir ,name)))
(add-after 'enter-dir 'ignore-/usr-tests (add-after 'enter-dir 'ignore-/usr-tests
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Rewrite lookup paths for header files. ;; Rewrite lookup paths for header files.
@ -413,8 +409,7 @@ (define-public policycoreutils
(("/usr(/include/security/pam_appl.h)" _ file) (("/usr(/include/security/pam_appl.h)" _ file)
(string-append (assoc-ref inputs "pam") file)) (string-append (assoc-ref inputs "pam") file))
(("/usr(/include/libaudit.h)" _ file) (("/usr(/include/libaudit.h)" _ file)
(string-append (assoc-ref inputs "audit") file))) (string-append (assoc-ref inputs "audit") file))))))))
#t)))))
(inputs (inputs
`(("audit" ,audit) `(("audit" ,audit)
("pam" ,linux-pam) ("pam" ,linux-pam)