maav / guix-mirror (public) (License: GPLv3+) (since 2019-11-02) (hash sha1)
Mirror of GNU Guix (https://git.savannah.gnu.org/git/guix.git) with personal branches integrated into master branch.
List of commits:
Subject Hash Author Date (UTC)
http-client: 'http-fetch' and 'http-fetch/cached' accept #:timeout. d11f7f62b6ba2fbef8e4b00c7ae0d621f2d4281c Ludovic Courtès 2020-10-12 09:19:32
channels: Address test failure. 6c46e477eb50c6ee7c9b7c8199bdfb3708dc32b5 Ludovic Courtès 2020-10-12 08:10:03
gnu: rust-xz2-0.1: Fix building. 8608d40b2aeae69a6054b8e053b0474a58932ee0 Efraim Flashner 2020-10-12 09:21:35
gnu: rust-pq-sys-0.4: Fix building. 8203bf6c13e04760ed8d01062778bf1332a351f4 Efraim Flashner 2020-10-12 09:11:24
gnu: rust-crc-1: Downgrade to 1.8.1. 21233fca78fc08c933cd78a775c8b5bfc1f285a2 Efraim Flashner 2020-10-12 08:58:27
gnu: rust-core-foundation-0.6: Fix building. 7507db9dc7c4307c2b9d2fb8011677f323442f34 Efraim Flashner 2020-10-12 08:50:33
gnu: rust-as-slice-0.1: Update to 0.1.4. ade20696c9bcce73bc4ab3c4a8a986cd2ac30da7 Efraim Flashner 2020-10-12 08:40:20
gnu: rust-as-slice-0.1: Fix build. e1ef59f7f2ef82ed4b7bc97d9bfbaf27ef9396ce Efraim Flashner 2020-10-12 08:39:22
gnu: rust-mysqlclient-sys-0.2: Fix build. 0ee1f92985ee1d97fb455c009b8eda0c04b25545 Efraim Flashner 2020-10-12 08:34:58
gnu: rust-cloudabi-0.1: Skip build. 319f7eaf0f861de7450365e403d03f591d0520c4 Efraim Flashner 2020-10-12 08:26:47
gnu: rust-libmimalloc-sys-0.1: Update to 0.1.18. a812c2e8a3125877e3cf86505995cf9b1af6c472 Efraim Flashner 2020-10-12 08:05:39
gnu: rust-libmimalloc-sys-0.1: Fix building. 1d67ba6f3b6457ac335e3f389d997ed5ef9418aa Efraim Flashner 2020-10-12 08:03:57
gnu: rust-once-cell-1: Fix building. f013613406267077af473e461167cc06386f1dcf Efraim Flashner 2020-10-12 07:57:47
gnu: rust-criterion-plot-0.4: Fix building. ef421ee22b42c0911a8c12980625f43eb8e3120f Efraim Flashner 2020-10-12 07:48:23
gnu: rust-zstd-sys-1: Adjust crate imports. 86574608c7d030ea6298ca0b524cb7dd1c72d271 Efraim Flashner 2020-10-12 07:25:15
gnu: guile-squee: Update to 0-1.7dcd22b. f3e96671feed033532ba5bea2522bd869cdf05dc Christopher Baines 2020-10-12 08:01:56
news: Add 'es' translation. e746d30ec15852ec50e4247ea0a07ab2a9a69aa8 Miguel Ángel Arruga Vivas 2020-10-11 17:10:56
gnu: rtl8821ce-linux-module: Update to 0.0.0-1.fe97b500. 830c5479bbebbb89a65fac8dc6565207fa375a15 Zhu Zihao 2020-10-09 12:43:03
gnu: web.scm: Sort module imports alphabetically. 874979e8dfd961d1d791d201417d6b77a6ea2b74 Efraim Flashner 2020-10-12 06:46:27
gnu: Add esbuild. 5137c73e29929c892c9dbd143fd920014a2ef193 Ryan Prior via Guix-patches via 2020-10-11 16:16:29
Commit d11f7f62b6ba2fbef8e4b00c7ae0d621f2d4281c - http-client: 'http-fetch' and 'http-fetch/cached' accept #:timeout.
* guix/http-client.scm (http-fetch): Add #:timeout and pass it to
'guix:open-connection-for-uri'.
(http-fetch/cached): Add #:timeout parameter and pass it to
'http-fetch'.
Author: Ludovic Courtès
Author date (UTC): 2020-10-12 09:19
Committer name: Ludovic Courtès
Committer date (UTC): 2020-10-12 09:28
Parent(s): 6c46e477eb50c6ee7c9b7c8199bdfb3708dc32b5
Signer:
Signing key: 090B11993D9AEBB5
Signing status: E
Tree: d780f1c17487b1d01591753e44d86be981a4d0b1
File Lines added Lines deleted
guix/http-client.scm 13 5
File guix/http-client.scm changed (mode: 100644) (index 5a5a33b4c0..a767175d67)
71 71
72 72 (define* (http-fetch uri #:key port (text? #f) (buffered? #t) (define* (http-fetch uri #:key port (text? #f) (buffered? #t)
73 73 (verify-certificate? #t) (verify-certificate? #t)
74 (headers '((user-agent . "GNU Guile"))))
74 (headers '((user-agent . "GNU Guile")))
75 timeout)
75 76 "Return an input port containing the data at URI, and the expected number of "Return an input port containing the data at URI, and the expected number of
76 77 bytes available or #f. If TEXT? is true, the data at URI is considered to be bytes available or #f. If TEXT? is true, the data at URI is considered to be
77 78 textual. Follow any HTTP redirection. When BUFFERED? is #f, return an textual. Follow any HTTP redirection. When BUFFERED? is #f, return an
 
... ... extra HTTP headers.
80 81
81 82 When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates. When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates.
82 83
84 TIMEOUT specifies the timeout in seconds for connection establishment; when
85 TIMEOUT is #f, connection establishment never times out.
86
83 87 Raise an '&http-get-error' condition if downloading fails." Raise an '&http-get-error' condition if downloading fails."
84 88 (let loop ((uri (if (string? uri) (let loop ((uri (if (string? uri)
85 89 (string->uri uri) (string->uri uri)
86 90 uri))) uri)))
87 91 (let ((port (or port (guix:open-connection-for-uri uri (let ((port (or port (guix:open-connection-for-uri uri
88 92 #:verify-certificate? #:verify-certificate?
89 verify-certificate?)))
93 verify-certificate?
94 #:timeout timeout)))
90 95 (headers (match (uri-userinfo uri) (headers (match (uri-userinfo uri)
91 96 ((? string? str) ((? string? str)
92 97 (cons (cons 'Authorization (cons (cons 'Authorization
 
... ... Raise an '&http-get-error' condition if downloading fails."
155 160
156 161 (define* (http-fetch/cached uri #:key (ttl (%http-cache-ttl)) text? (define* (http-fetch/cached uri #:key (ttl (%http-cache-ttl)) text?
157 162 (write-cache dump-port) (write-cache dump-port)
158 (cache-miss (const #t)))
163 (cache-miss (const #t))
164 (timeout 10))
159 165 "Like 'http-fetch', return an input port, but cache its contents in "Like 'http-fetch', return an input port, but cache its contents in
160 166 ~/.cache/guix. The cache remains valid for TTL seconds. ~/.cache/guix. The cache remains valid for TTL seconds.
161 167
162 168 Call WRITE-CACHE with the HTTP input port and the cache output port to write Call WRITE-CACHE with the HTTP input port and the cache output port to write
163 169 the data to cache. Call CACHE-MISS with URI just before fetching data from the data to cache. Call CACHE-MISS with URI just before fetching data from
164 URI."
170 URI.
171
172 TIMEOUT specifies the timeout in seconds for connection establishment."
165 173 (let ((file (cache-file-for-uri uri))) (let ((file (cache-file-for-uri uri)))
166 174 (define (update-cache cache-port) (define (update-cache cache-port)
167 175 (define cache-time (define cache-time
 
... ... URI."
183 191 cache-port) cache-port)
184 192 (raise c)))) (raise c))))
185 193 (let ((port (http-fetch uri #:text? text? (let ((port (http-fetch uri #:text? text?
186 #:headers headers)))
194 #:headers headers #:timeout timeout)))
187 195 (cache-miss uri) (cache-miss uri)
188 196 (mkdir-p (dirname file)) (mkdir-p (dirname file))
189 197 (when cache-port (when cache-port
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/maav/guix-mirror

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/maav/guix-mirror

Clone this repository using git:
git clone git://git.rocketgit.com/user/maav/guix-mirror

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main