gnu: corkscrew: Update to 2.0-0.268b71e.

* gnu/packages/ssh.scm (corkscrew)[source]: Fetch from elsewhere.
[arguments]: Add #:configure-flags of ‘--enable-ssl’.
Add a new 'update-metadata phase.  Remove the custom 'configure phase.
[native-inputs]: Add autoconf, automake, and pkg-config.
[inputs]: Add openssl.
[description]: Update accordingly.
This commit is contained in:
Tobias Geerinckx-Rice 2021-04-04 13:11:40 +02:00
parent 719dd9b45f
commit b692a1bb45
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -403,48 +403,57 @@ libssh library.")
(deprecated-package "guile3.0-ssh" guile-ssh)) (deprecated-package "guile3.0-ssh" guile-ssh))
(define-public corkscrew (define-public corkscrew
;; The last 2.0 release hails from 2009. Use a fork (submitted upstream as
;; <https://github.com/patpadgett/corkscrew/pull/5>) that adds now-essential
;; IPv6 and TLS support.
(let ((revision "0")
(commit "268b71e88ee51fddceab96d665b327394f1feb12"))
(package (package
(name "corkscrew") (name "corkscrew")
(version "2.0") (version (git-version "2.0" revision commit))
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/patpadgett/corkscrew") (url "https://github.com/rtgill82/corkscrew")
(commit (string-append "v" version)))) (commit commit)))
(sha256 (sha256
(base32 "0g4pkczrc1zqpnxyyjwcjmyzdj5qqcpzwf1bm3965zdwp94bpppf")) (base32 "1rylbimlfig3ii4bqr4r058lkc43pqkxnxqpqdpm31blh3xs0dcw"))
(file-name (git-file-name name version)))) (file-name (git-file-name name version))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases `(#:configure-flags
(list "--enable-ssl")
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'configure (add-after 'unpack 'update-metadata
;; Replace configure phase as the ./configure script does not like (lambda _
;; CONFIG_SHELL and SHELL passed as parameters. (substitute* "configure.ac"
(lambda* (#:key outputs build target #:allow-other-keys) ;; Our version differs significantly.
(let* ((out (assoc-ref outputs "out")) (("2.0") (string-append ,version " (Guix)")))
(bash (which "bash")) (substitute* "corkscrew.c"
;; Set --build and --host flags as the provided config.guess ;; This domain's since been squat.
;; is not able to detect them. (("\\(agroman@agroman\\.net\\)")
(flags `(,(string-append "--prefix=" out) (format #f "<~a>" ,(package-home-page this-package))))))
,(string-append "--build=" build)
,(string-append "--host=" (or target build)))))
(setenv "CONFIG_SHELL" bash)
(apply invoke bash "./configure" flags))))
(add-after 'install 'install-documentation (add-after 'install 'install-documentation
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(doc (string-append out "/share/doc/" ,name "-" ,version))) (doc (string-append out "/share/doc/" ,name "-" ,version)))
(install-file "README.markdown" doc) (install-file "README.md" doc)
#t)))))) #t))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("pkg-config" ,pkg-config)))
(inputs
`(("openssl" ,openssl)))
(home-page "https://github.com/patpadgett/corkscrew") (home-page "https://github.com/patpadgett/corkscrew")
(synopsis "SSH tunneling through HTTP(S) proxies") (synopsis "SSH tunneling through HTTP(S) proxies")
(description (description
"Corkscrew tunnels SSH connections through most HTTP and HTTPS proxies. "Corkscrew tunnels SSH connections through most HTTP and HTTPS proxies.
Proxy authentication is only supported through the plain-text HTTP basic It supports proxy authentication through the HTTP basic authentication scheme
authentication scheme.") with optional @acronym{TLS, Transport-Level Security} to protect credentials.")
(license license:gpl2+))) (license license:gpl2+))))
(define-public mosh (define-public mosh
(package (package