gnu: openssh: Use G-expressions.
* gnu/packages/ssh.scm (openssh)[arguments]: Rewrite as G-expressions.master
parent
12971d26ef
commit
b56fe521de
|
@ -209,64 +209,44 @@ a server that supports the SSH-2 protocol.")
|
|||
(base32
|
||||
"1s3nqv57r3l7avsdkzwd575dvxra8h19xpqczl0z3cvcgwabw3i0"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs (list groff pkg-config))
|
||||
(inputs
|
||||
(cons* libedit
|
||||
openssl
|
||||
mit-krb5
|
||||
zlib
|
||||
xauth ; for 'ssh -X' and 'ssh -Y'
|
||||
(if (target-hurd?)
|
||||
'()
|
||||
(list linux-pam
|
||||
libfido2)))) ; fails to build on GNU/Hurd
|
||||
(arguments
|
||||
`(#:test-target "tests"
|
||||
;; Otherwise, the test scripts try to use a nonexistent directory and
|
||||
;; fail.
|
||||
#:make-flags '("REGRESSTMP=\"$${BUILDDIR}/regress\"")
|
||||
#:configure-flags `("--sysconfdir=/etc/ssh"
|
||||
|
||||
(list
|
||||
#:test-target "tests"
|
||||
;; Otherwise, the test scripts try to use a nonexistent directory and fail.
|
||||
#:make-flags
|
||||
#~(list "REGRESSTMP=\"$${BUILDDIR}/regress\"")
|
||||
#:configure-flags
|
||||
#~(append
|
||||
(list "--sysconfdir=/etc/ssh"
|
||||
;; Default value of 'PATH' used by sshd.
|
||||
"--with-default-path=/run/current-system/profile/bin"
|
||||
|
||||
;; configure needs to find krb5-config.
|
||||
,(string-append "--with-kerberos5="
|
||||
(assoc-ref %build-inputs "mit-krb5")
|
||||
(string-append "--with-kerberos5="
|
||||
#$(this-package-input "mit-krb5")
|
||||
"/bin")
|
||||
|
||||
;; libedit is needed for sftp completion.
|
||||
"--with-libedit"
|
||||
|
||||
"--with-libedit")
|
||||
;; Enable PAM support in sshd.
|
||||
,,@(if (target-hurd?)
|
||||
(if #$(target-hurd?)
|
||||
'()
|
||||
'("--with-pam"
|
||||
|
||||
;; Support creation and use of ecdsa-sk,
|
||||
;; ed25519-sk keys.
|
||||
(list "--with-pam"
|
||||
;; Support creation and use of ecdsa-sk, ed25519-sk keys.
|
||||
"--with-security-key-builtin"))
|
||||
|
||||
|
||||
|
||||
;; "make install" runs "install -s" by default,
|
||||
;; which doesn't work for cross-compiled binaries
|
||||
;; because it invokes 'strip' instead of
|
||||
;; "make install" runs "install -s" by default, which doesn't work for
|
||||
;; cross-compiled binaries because it invokes 'strip' instead of
|
||||
;; 'TRIPLET-strip'. Work around this.
|
||||
,,@(if (%current-target-system)
|
||||
'("--disable-strip")
|
||||
(if #$(%current-target-system)
|
||||
(list "--disable-strip")
|
||||
'()))
|
||||
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'configure 'reset-/var/empty
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(lambda _
|
||||
(substitute* "Makefile"
|
||||
(("PRIVSEP_PATH=/var/empty")
|
||||
(string-append "PRIVSEP_PATH=" out "/var/empty"))))))
|
||||
(string-append "PRIVSEP_PATH=" #$output "/var/empty")))))
|
||||
(add-after 'configure 'set-store-location
|
||||
(lambda* _
|
||||
(lambda _
|
||||
(substitute* "misc.c"
|
||||
(("@STORE_DIRECTORY@")
|
||||
(string-append "\"" (%store-directory) "\"")))))
|
||||
|
@ -281,18 +261,28 @@ a server that supports the SSH-2 protocol.")
|
|||
(("^(tests:.*) t-exec(.*)" all pre post)
|
||||
(string-append pre post)))))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
;; Install without host keys and system configuration files.
|
||||
;; This will install /var/empty to the store, which is needed
|
||||
;; by the system openssh-service-type.
|
||||
(lambda* (#:key (make-flags '()) #:allow-other-keys)
|
||||
;; Install without host keys and system configuration files. This
|
||||
;; will install /var/empty to the store, which is needed by the
|
||||
;; system openssh-service-type.
|
||||
(apply invoke "make" "install-nosysconf" make-flags)
|
||||
(with-directory-excursion "contrib"
|
||||
(chmod "ssh-copy-id" #o555)
|
||||
(install-file "ssh-copy-id"
|
||||
(string-append out "/bin/"))
|
||||
(string-append #$output "/bin/"))
|
||||
(install-file "ssh-copy-id.1"
|
||||
(string-append out "/share/man/man1/")))))))))
|
||||
(string-append #$output "/share/man/man1/"))))))))
|
||||
(native-inputs (list groff pkg-config))
|
||||
(inputs
|
||||
(cons* libedit
|
||||
openssl
|
||||
mit-krb5
|
||||
zlib
|
||||
xauth ; for 'ssh -X' and 'ssh -Y'
|
||||
(if (target-hurd?)
|
||||
'()
|
||||
(list linux-pam
|
||||
libfido2)))) ; fails to build on GNU/Hurd
|
||||
(synopsis "Client and server for the secure shell (ssh) protocol")
|
||||
(description
|
||||
"The SSH2 protocol implemented in OpenSSH is standardised by the
|
||||
|
|
Reference in New Issue