mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 22:26:40 -05:00
gnu: opendoas: Fix restricted path "safepath".
* gnu/packages/admin.scm (opendoas)[phases]: Rename 'fix-install' phase to 'pre-configure', run it before 'configure' and add a substitution for safepath.
This commit is contained in:
parent
cae5f6e54b
commit
eb939109b9
1 changed files with 16 additions and 6 deletions
|
@ -41,6 +41,7 @@
|
||||||
;;; Copyright © 2021 Hyunseok Kim <lasnesne@lagunposprasihopre.org>
|
;;; Copyright © 2021 Hyunseok Kim <lasnesne@lagunposprasihopre.org>
|
||||||
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
|
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
|
||||||
;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
|
;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
|
||||||
|
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1700,18 +1701,27 @@ (define-public opendoas
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
(add-before 'configure 'pre-configure
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(substitute* "GNUmakefile"
|
||||||
|
(("^\tchown.*$") ""))
|
||||||
|
;; OpenDoas look for binaries in safepath when a rule specify a
|
||||||
|
;; relative command, such as “permit keepenv :wheel cmd guix”.
|
||||||
|
(substitute* "doas.c"
|
||||||
|
(("safepath =" match)
|
||||||
|
(string-append match " \""
|
||||||
|
"/run/setuid-programs:"
|
||||||
|
"/run/current-system/profile/bin:"
|
||||||
|
"/run/current-system/profile/sbin:"
|
||||||
|
"\" ")))
|
||||||
|
#t))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
;; The configure script doesn't accept most of the default flags.
|
;; The configure script doesn't accept most of the default flags.
|
||||||
(lambda* (#:key configure-flags #:allow-other-keys)
|
(lambda* (#:key configure-flags #:allow-other-keys)
|
||||||
;; The configure script can be told which compiler to use only
|
;; The configure script can be told which compiler to use only
|
||||||
;; through environment variables.
|
;; through environment variables.
|
||||||
(setenv "CC" ,(cc-for-target))
|
(setenv "CC" ,(cc-for-target))
|
||||||
(apply invoke "./configure" configure-flags)))
|
(apply invoke "./configure" configure-flags))))
|
||||||
(add-before 'install 'fix-makefile
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
(substitute* "GNUmakefile"
|
|
||||||
(("^\tchown.*$") ""))
|
|
||||||
#t)))
|
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(list (string-append "--prefix=" (assoc-ref %outputs "out"))
|
(list (string-append "--prefix=" (assoc-ref %outputs "out"))
|
||||||
"--with-timestamp")
|
"--with-timestamp")
|
||||||
|
|
Loading…
Reference in a new issue