diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2021-06-14 23:52:50 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2021-06-14 23:52:50 +0800 |
commit | f3a55a384658a91f757d4291210da3146f0439d7 (patch) | |
tree | 6aefba7e6ca55737f5859a2dbbd0d64fe7c6aafa /guix | |
parent | e8de44c1fe2fd357eb5f302b0e7d03502e553a27 (diff) | |
download | copr-rpm-spec-f3a55a384658a91f757d4291210da3146f0439d7.tar copr-rpm-spec-f3a55a384658a91f757d4291210da3146f0439d7.tar.gz copr-rpm-spec-f3a55a384658a91f757d4291210da3146f0439d7.tar.bz2 copr-rpm-spec-f3a55a384658a91f757d4291210da3146f0439d7.tar.lz copr-rpm-spec-f3a55a384658a91f757d4291210da3146f0439d7.tar.xz copr-rpm-spec-f3a55a384658a91f757d4291210da3146f0439d7.tar.zst copr-rpm-spec-f3a55a384658a91f757d4291210da3146f0439d7.zip |
guix: Guix 1.2.0 -> 1.3.0
Diffstat (limited to 'guix')
-rw-r--r-- | guix/guile-lib/guile-lib.spec | 138 | ||||
-rw-r--r-- | guix/guix/guix-1.2.0-guile-json-4.5.patch | 65 | ||||
-rw-r--r-- | guix/guix/guix-1.2.0-json-crate.patch | 84 | ||||
-rw-r--r-- | guix/guix/guix-1.2.0-json-cve-swh.patch | 44 | ||||
-rw-r--r-- | guix/guix/guix-1.2.0-revert-verify-swh-certificate.patch | 159 | ||||
-rw-r--r-- | guix/guix/guix-1.3.0-revert-display-download-progress-tty.patch | 125 | ||||
-rw-r--r-- | guix/guix/guix.spec | 59 |
7 files changed, 303 insertions, 371 deletions
diff --git a/guix/guile-lib/guile-lib.spec b/guix/guile-lib/guile-lib.spec new file mode 100644 index 0000000..ae0dcb5 --- /dev/null +++ b/guix/guile-lib/guile-lib.spec @@ -0,0 +1,138 @@ +%global debug_package %{nil} + +Name: guile-lib +Version: 0.2.7 +Release: 1%{?dist} +Summary: Guile-Lib is a repository of useful code written in Guile Scheme + +License: GPLv3+ +URL: https://www.nongnu.org/guile-lib +Source0: https://download.savannah.nongnu.org/releases/%{name}/%{name}-%{version}.tar.gz + +%global guile_source_dir %{_datadir}/guile/site/2.2 +%global guile_ccache_dir %{_libdir}/guile/2.2/site-ccache + +BuildRequires: gcc +BuildRequires: pkgconfig(guile-2.2) +Requires: guile22 + +%description +Guile-Lib is intended as an accumulation place for pure-scheme Guile modules, +allowing for people to cooperate integrating their generic Guile modules into a +coherent library. + +Guile-Lib modules are well-documented and well-supported. Particularly good +modules might migrate from Guile-Lib into Guile itself, at some point. + +Think "a down-scaled, limited-scope CPAN for Guile". + + +%prep +%autosetup -p1 +sed -i 's|"guile"|"guile2.2"|g' unit-tests/os.process.scm + + +%build +%configure GUILE=%{_bindir}/guile2.2 GUILD=%{_bindir}/guild2.2 +%make_build moddir=%{guile_source_dir} godir=%{guile_ccache_dir} + + +%check +%{__make} %{?_smp_mflags} check + + +%install +%make_install moddir=%{guile_source_dir} godir=%{guile_ccache_dir} + + +%post +/sbin/install-info %{_infodir}/guile-library.info.gz %{_infodir}/dir || : + + +%preun +if [ "$1" = 0 ]; then + /sbin/install-info --del %{_infodir}/guile-library.info.gz %{_infodir}/dir || : +fi + + +%files +%license COPYING COPYING.GPL COPYING.LGPL +%doc AUTHORS ChangeLog NEWS README TODO +%{guile_source_dir}/apicheck.scm +%{guile_ccache_dir}/apicheck.go +%dir %{guile_source_dir}/compat +%dir %{guile_ccache_dir}/compat +%{guile_source_dir}/compat/*.scm +%{guile_ccache_dir}/compat/*.go +%dir %{guile_source_dir}/config +%dir %{guile_ccache_dir}/config +%{guile_source_dir}/config/*.scm +%{guile_ccache_dir}/config/*.go +%dir %{guile_source_dir}/container +%dir %{guile_ccache_dir}/container +%{guile_source_dir}/container/*.scm +%{guile_ccache_dir}/container/*.go +%dir %{guile_source_dir}/debugging +%dir %{guile_ccache_dir}/debugging +%{guile_source_dir}/debugging/*.scm +%{guile_ccache_dir}/debugging/*.go +%dir %{guile_source_dir}/graph +%dir %{guile_ccache_dir}/graph +%{guile_source_dir}/graph/*.scm +%{guile_ccache_dir}/graph/*.go +%{guile_source_dir}/htmlprag.scm +%{guile_ccache_dir}/htmlprag.go +%dir %{guile_source_dir}/io +%dir %{guile_ccache_dir}/io +%{guile_source_dir}/io/*.scm +%{guile_ccache_dir}/io/*.go +%dir %{guile_source_dir}/logging +%dir %{guile_ccache_dir}/logging +%{guile_source_dir}/logging/*.scm +%{guile_ccache_dir}/logging/*.go +%{guile_source_dir}/match-bind.scm +%{guile_ccache_dir}/match-bind.go +%dir %{guile_source_dir}/math +%dir %{guile_ccache_dir}/math +%{guile_source_dir}/math/*.scm +%{guile_ccache_dir}/math/*.go +%{guile_source_dir}/md5.scm +%{guile_ccache_dir}/md5.go +%dir %{guile_source_dir}/os +%dir %{guile_ccache_dir}/os +%{guile_source_dir}/os/*.scm +%{guile_ccache_dir}/os/*.go +%dir %{guile_source_dir}/scheme +%dir %{guile_ccache_dir}/scheme +%{guile_source_dir}/scheme/*.scm +%{guile_ccache_dir}/scheme/*.go +%dir %{guile_source_dir}/search +%dir %{guile_ccache_dir}/search +%{guile_source_dir}/search/*.scm +%{guile_ccache_dir}/search/*.go +%dir %{guile_source_dir}/string +%dir %{guile_ccache_dir}/string +%{guile_source_dir}/string/*.scm +%{guile_ccache_dir}/string/*.go +%dir %{guile_source_dir}/term +%dir %{guile_ccache_dir}/term +%{guile_source_dir}/term/*.scm +%{guile_ccache_dir}/term/*.go +%dir %{guile_source_dir}/texinfo +%dir %{guile_ccache_dir}/texinfo +%{guile_source_dir}/texinfo/*.scm +%{guile_ccache_dir}/texinfo/*.go +%dir %{guile_source_dir}/text +%dir %{guile_ccache_dir}/text +%{guile_source_dir}/text/*.scm +%{guile_ccache_dir}/text/*.go +%{guile_source_dir}/unit-test.scm +%{guile_ccache_dir}/unit-test.go +%{_libdir}/pkgconfig/guile-lib-1.0.pc +%{_infodir}/guile-library.info.gz +%exclude %{_infodir}/dir + + +%changelog +* Mon Jun 14 2021 Ting-Wei Lan <lantw44@gmail.com> - 0.2.7-1 +- Initial packaging diff --git a/guix/guix/guix-1.2.0-guile-json-4.5.patch b/guix/guix/guix-1.2.0-guile-json-4.5.patch deleted file mode 100644 index 07f7140..0000000 --- a/guix/guix/guix-1.2.0-guile-json-4.5.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 3d43b7aef3d5b7ad2ba0418d2afd657e5fedeaf5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> -Date: Wed, 20 Jan 2021 11:35:10 +0100 -Subject: [PATCH] import, swh: Adjust to Guile-JSON 4.5.x unspecified value - handling. - -* guix/import/cpan.scm (<cpan-release>)[home-page]: Add 'unspecified?' -case. -* guix/import/gem.scm (<gem>)[licenses]: Likewise. -(json->gem-dependency-list): Likewise. -* guix/swh.scm (<directory-entry>)[checksums]: Likewise. ---- - guix/import/cpan.scm | 3 ++- - guix/import/gem.scm | 5 +++-- - guix/swh.scm | 3 ++- - 3 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm -index 514417f781..87abe9c2f1 100644 ---- a/guix/import/cpan.scm -+++ b/guix/import/cpan.scm -@@ -109,6 +109,7 @@ - (home-page cpan-release-home-page "resources" - (match-lambda - (#f #f) -+ ((? unspecified?) #f) - ((lst ...) (assoc-ref lst "homepage")))) - (dependencies cpan-release-dependencies "dependency" - (lambda (vector) -diff --git a/guix/import/gem.scm b/guix/import/gem.scm -index 1f6f94532e..418d716be6 100644 ---- a/guix/import/gem.scm -+++ b/guix/import/gem.scm -@@ -49,6 +49,7 @@ - ;; This is sometimes #nil (the JSON 'null' value). Arrange - ;; to always return a list. - (cond ((not licenses) '()) -+ ((unspecified? licenses) '()) - ((vector? licenses) (vector->list licenses)) - (else '())))) - (info gem-info) -@@ -69,7 +70,7 @@ - json->gem-dependency-list)) - - (define (json->gem-dependency-list vector) -- (if vector -+ (if (and vector (not (unspecified? vector))) - (map json->gem-dependency (vector->list vector)) - '())) - -diff --git a/guix/swh.scm b/guix/swh.scm -index 0b765cc743..f11b7ea2d5 100644 ---- a/guix/swh.scm -+++ b/guix/swh.scm -@@ -348,6 +348,7 @@ FALSE-IF-404? is true, return #f upon 404 responses." - (checksums directory-entry-checksums "checksums" - (match-lambda - (#f #f) -+ ((? unspecified?) #f) - (lst (json->checksums lst)))) - (id directory-entry-id "dir_id") - (length directory-entry-length) --- -2.29.2 - diff --git a/guix/guix/guix-1.2.0-json-crate.patch b/guix/guix/guix-1.2.0-json-crate.patch deleted file mode 100644 index 3677946..0000000 --- a/guix/guix/guix-1.2.0-json-crate.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 23862011c3d02814181399765a024c7fa3fadd97 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> -Date: Wed, 13 Jan 2021 22:42:49 +0100 -Subject: [PATCH] tests: Fix JSON syntax error in 'crate.scm'. - -This issue is caught with Guile-JSON 4.4.1, but not by 4.3.2. - -* tests/crate.scm (test-root-dependencies): Add missing comma. ---- - tests/crate.scm | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/crate.scm b/tests/crate.scm -index bb7032c344..b6c3a7ee2e 100644 ---- a/tests/crate.scm -+++ b/tests/crate.scm -@@ -36,8 +36,8 @@ - \"description\": \"summary\", - \"homepage\": \"http://example.com\", - \"repository\": \"http://example.com\", -- \"keywords\": [\"dummy\" \"test\"], -- \"categories\": [\"test\"] -+ \"keywords\": [\"dummy\", \"test\"], -+ \"categories\": [\"test\"], - \"actual_versions\": [ - { \"id\": \"foo\", - \"num\": \"1.0.0\", -@@ -68,7 +68,7 @@ - \"description\": \"summary\", - \"homepage\": \"http://example.com\", - \"repository\": \"http://example.com\", -- \"keywords\": [\"dummy\" \"test\"], -+ \"keywords\": [\"dummy\", \"test\"], - \"categories\": [\"test\"] - \"actual_versions\": [ - { \"id\": \"foo\", -@@ -92,7 +92,7 @@ - { - \"crate_id\": \"intermediate-2\", - \"kind\": \"normal\" -- } -+ }, - { - \"crate_id\": \"leaf-alice\", - \"kind\": \"normal\" -@@ -112,7 +112,7 @@ - \"description\": \"summary\", - \"homepage\": \"http://example.com\", - \"repository\": \"http://example.com\", -- \"keywords\": [\"dummy\" \"test\"], -+ \"keywords\": [\"dummy\", \"test\"], - \"categories\": [\"test\"] - \"actual_versions\": [ - { \"id\": \"intermediate-1\", -@@ -152,7 +152,7 @@ - \"description\": \"summary\", - \"homepage\": \"http://example.com\", - \"repository\": \"http://example.com\", -- \"keywords\": [\"dummy\" \"test\"], -+ \"keywords\": [\"dummy\", \"test\"], - \"categories\": [\"test\"] - \"actual_versions\": [ - { \"id\": \"intermediate-2\", -@@ -184,7 +184,7 @@ - \"description\": \"summary\", - \"homepage\": \"http://example.com\", - \"repository\": \"http://example.com\", -- \"keywords\": [\"dummy\" \"test\"], -+ \"keywords\": [\"dummy\", \"test\"], - \"categories\": [\"test\"] - \"actual_versions\": [ - { \"id\": \"leaf-alice\", -@@ -211,7 +211,7 @@ - \"description\": \"summary\", - \"homepage\": \"http://example.com\", - \"repository\": \"http://example.com\", -- \"keywords\": [\"dummy\" \"test\"], -+ \"keywords\": [\"dummy\", \"test\"], - \"categories\": [\"test\"] - \"actual_versions\": [ - { \"id\": \"leaf-bob\", --- -2.29.2 - diff --git a/guix/guix/guix-1.2.0-json-cve-swh.patch b/guix/guix/guix-1.2.0-json-cve-swh.patch deleted file mode 100644 index aff4c89..0000000 --- a/guix/guix/guix-1.2.0-json-cve-swh.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 9608f4003dedd8dfe99327c15668ca1a43ebd93b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> -Date: Mon, 21 Dec 2020 11:44:19 +0100 -Subject: [PATCH] tests: Fix malformed JSON. - -Guile-JSON 4.3.2 would parse in spite of these typos, but 4.4.1 is -stricter. - -* tests/swh.scm (%directory-entries): Add missing comma. -* tests/cve-sample.json: Likewise. ---- - tests/cve-sample.json | 2 +- - tests/swh.scm | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/cve-sample.json b/tests/cve-sample.json -index 39816f9dd4..11b71817bb 100644 ---- a/tests/cve-sample.json -+++ b/tests/cve-sample.json -@@ -49,7 +49,7 @@ - "vulnerable" : true, - "cpe23Uri" : "cpe:2.3:o:juniper:junos:16.1:*:*:*:*:*:*:*" - } ] -- } { -+ }, { - "operator" : "OR", - "cpe_match" : [ { - "vulnerable" : true, -diff --git a/tests/swh.scm b/tests/swh.scm -index aef68acbe7..06984b2a80 100644 ---- a/tests/swh.scm -+++ b/tests/swh.scm -@@ -33,7 +33,7 @@ - "[ { \"name\": \"one\", - \"type\": \"regular\", - \"length\": 123, -- \"dir_id\": 1 } -+ \"dir_id\": 1 }, - { \"name\": \"two\", - \"type\": \"regular\", - \"length\": 456, --- -2.29.2 - diff --git a/guix/guix/guix-1.2.0-revert-verify-swh-certificate.patch b/guix/guix/guix-1.2.0-revert-verify-swh-certificate.patch deleted file mode 100644 index 567896f..0000000 --- a/guix/guix/guix-1.2.0-revert-verify-swh-certificate.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 951f5cca43676dbdde2f5c01118bce63905f7444 Mon Sep 17 00:00:00 2001 -From: Ting-Wei Lan <lantw44@gmail.com> -Date: Wed, 17 Feb 2021 21:53:27 +0800 -Subject: [PATCH 1/2] Revert "git-download: Don't verify X.509 certificate of - SWH." - -This reverts commit a7696b9733d4ede9817a0a0accb5ce5b85d9a2d3. ---- - guix/git-download.scm | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/guix/git-download.scm b/guix/git-download.scm -index 8e575e3b5f..1267986fe8 100644 ---- a/guix/git-download.scm -+++ b/guix/git-download.scm -@@ -131,11 +131,9 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." - (download-nar #$output) - - ;; As a last resort, attempt to download from Software Heritage. -- ;; Disable X.509 certificate verification to avoid depending -- ;; on nss-certs--we're authenticating the checkout anyway. - ;; XXX: Currently recursive checkouts are not supported. - (and (not recursive?) -- (parameterize ((%verify-swh-certificate? #f)) -+ (begin - (format (current-error-port) - "Trying to download from Software Heritage...~%") - (swh-download (getenv "git url") (getenv "git commit") --- -2.29.2 - - -From bf6def8cc3bf569a93cb66dd76f0b78f06ed393b Mon Sep 17 00:00:00 2001 -From: Ting-Wei Lan <lantw44@gmail.com> -Date: Wed, 17 Feb 2021 21:53:28 +0800 -Subject: [PATCH 2/2] Revert "swh: Allow callers to disable X.509 certificate - verification." - -This reverts commit 722ad41c44a499d2250c79527ef7d069ca728de0. ---- - guix/swh.scm | 34 +++++++++------------------------- - 1 file changed, 9 insertions(+), 25 deletions(-) - -diff --git a/guix/swh.scm b/guix/swh.scm -index 0b765cc743..d9f7d6f508 100644 ---- a/guix/swh.scm -+++ b/guix/swh.scm -@@ -34,7 +34,6 @@ - #:use-module (ice-9 popen) - #:use-module ((ice-9 ftw) #:select (scandir)) - #:export (%swh-base-url -- %verify-swh-certificate? - %allow-request? - - request-rate-limit-reached? -@@ -126,10 +125,6 @@ - ;; Presumably we won't need to change it. - (make-parameter "https://archive.softwareheritage.org")) - --(define %verify-swh-certificate? -- ;; Whether to verify the X.509 HTTPS certificate for %SWH-BASE-URL. -- (make-parameter #t)) -- - (define (swh-url path . rest) - ;; URLs returned by the API may be relative or absolute. This has changed - ;; without notice before. Handle both cases by detecting whether the path -@@ -147,13 +142,6 @@ - url - (string-append url "/"))) - --;; XXX: Work around a bug in Guile 3.0.2 where #:verify-certificate? would --;; be ignored (<https://bugs.gnu.org/40486>). --(define* (http-get* uri #:rest rest) -- (apply http-request uri #:method 'GET rest)) --(define* (http-post* uri #:rest rest) -- (apply http-request uri #:method 'POST rest)) -- - (define %date-regexp - ;; Match strings like "2014-11-17T22:09:38+01:00" or - ;; "2018-09-30T23:20:07.815449+00:00"". -@@ -190,7 +178,7 @@ Software Heritage." - - (define %allow-request? - ;; Takes a URL and method (e.g., the 'http-get' procedure) and returns true -- ;; to keep going. This can be used to disallow requests when -+ ;; to keep going. This can be used to disallow a requests when - ;; 'request-rate-limit-reached?' returns true, for instance. - (make-parameter (const #t))) - -@@ -206,7 +194,7 @@ Software Heritage." - (string->uri url)) - - (define reset-time -- (if (and (eq? method http-post*) -+ (if (and (eq? method http-post) - (string-prefix? "/api/1/origin/save/" (uri-path uri))) - %save-rate-limit-reset-time - %general-rate-limit-reset-time)) -@@ -219,23 +207,21 @@ RESPONSE." - (let ((uri (string->uri url))) - (match (assq-ref (response-headers response) 'x-ratelimit-reset) - ((= string->number (? number? reset)) -- (if (and (eq? method http-post*) -+ (if (and (eq? method http-post) - (string-prefix? "/api/1/origin/save/" (uri-path uri))) - (set! %save-rate-limit-reset-time reset) - (set! %general-rate-limit-reset-time reset))) - (_ - #f)))) - --(define* (call url decode #:optional (method http-get*) -+(define* (call url decode #:optional (method http-get) - #:key (false-if-404? #t)) - "Invoke the endpoint at URL using METHOD. Decode the resulting JSON body - using DECODE, a one-argument procedure that takes an input port. When - FALSE-IF-404? is true, return #f upon 404 responses." - (and ((%allow-request?) url method) - (let*-values (((response port) -- (method url #:streaming? #t -- #:verify-certificate? -- (%verify-swh-certificate?)))) -+ (method url #:streaming? #t))) - ;; See <https://archive.softwareheritage.org/api/#rate-limiting>. - (match (assq-ref (response-headers response) 'x-ratelimit-remaining) - (#f #t) -@@ -480,7 +466,7 @@ directory entries; if it has type 'file, return its <content> object." - (define* (save-origin url #:optional (type "git")) - "Request URL to be saved." - (call (swh-url "/api/1/origin/save" type "url" url) json->save-reply -- http-post*)) -+ http-post)) - - (define-query (save-origin-status url type) - "Return the status of a /save request for URL and TYPE (e.g., \"git\")." -@@ -502,7 +488,7 @@ directory entries; if it has type 'file, return its <content> object." - to the vault. Return a <vault-reply>." - (call (swh-url "/api/1/vault" (symbol->string kind) id) - json->vault-reply -- http-post*)) -+ http-post)) - - (define* (vault-fetch id kind - #:key (log-port (current-error-port))) -@@ -521,10 +507,8 @@ revision, it is a gzip-compressed stream for 'git fast-import'." - ('done - ;; Fetch the bundle. - (let-values (((response port) -- (http-get* (swh-url (vault-reply-fetch-url reply)) -- #:streaming? #t -- #:verify-certificate? -- (%verify-swh-certificate?)))) -+ (http-get (swh-url (vault-reply-fetch-url reply)) -+ #:streaming? #t))) - (if (= (response-code response) 200) - port - (begin ;shouldn't happen --- -2.29.2 - diff --git a/guix/guix/guix-1.3.0-revert-display-download-progress-tty.patch b/guix/guix/guix-1.3.0-revert-display-download-progress-tty.patch new file mode 100644 index 0000000..29aeb07 --- /dev/null +++ b/guix/guix/guix-1.3.0-revert-display-download-progress-tty.patch @@ -0,0 +1,125 @@ +From 994bf9e014e33de7dcd31bd76bbae102e9b8189e Mon Sep 17 00:00:00 2001 +From: Ting-Wei Lan <lantw44@gmail.com> +Date: Mon, 14 Jun 2021 01:55:47 +0800 +Subject: [PATCH] Revert "status: Do not emit ANSI escapes when stderr is not a + tty." + +This reverts commit d613c1771a1986d3c0f1e034155fde41f32f9b8e. +--- + guix/progress.scm | 68 ++++++++++++++++++++--------------------------- + guix/status.scm | 4 --- + 2 files changed, 29 insertions(+), 43 deletions(-) + +diff --git a/guix/progress.scm b/guix/progress.scm +index 334bd40547..cd80ae620a 100644 +--- a/guix/progress.scm ++++ b/guix/progress.scm +@@ -184,54 +184,44 @@ move the cursor to the beginning of the line." + + (define* (display-download-progress file size + #:key +- (tty? #t) + start-time (transferred 0) + (log-port (current-error-port))) + "Write the progress report to LOG-PORT. Use START-TIME (a SRFI-19 time + object) and TRANSFERRED (a total number of bytes) to determine the +-throughput. When TTY? is false, assume LOG-PORT is not a tty and do not emit +-ANSI escape codes." ++throughput." + (define elapsed + (duration->seconds + (time-difference (current-time (time-type start-time)) + start-time))) + +- (cond ((and (not tty?) +- size (not (zero? size)) +- transferred) +- ;; Display a dot for at most every 10%. +- (when (zero? (modulo (round (* 100. (/ transferred size))) 10)) +- (display "." log-port) +- (force-output log-port))) +- ((and (number? size) (not (zero? size))) +- (let* ((% (* 100.0 (/ transferred size))) +- (throughput (/ transferred elapsed)) +- (left (format #f " ~a ~a" file +- (byte-count->string size))) +- (right (format #f "~a/s ~a ~a~6,1f%" +- (byte-count->string throughput) +- (seconds->string elapsed) +- (progress-bar %) %))) +- (erase-current-line log-port) +- (display (string-pad-middle left right +- (current-terminal-columns)) +- log-port) +- (force-output log-port))) +- (else +- ;; If we don't know the total size, the last transfer will have a 0B +- ;; size. Don't display it. +- (unless (zero? transferred) +- (let* ((throughput (/ transferred elapsed)) +- (left (format #f " ~a" file)) +- (right (format #f "~a/s ~a | ~a transferred" +- (byte-count->string throughput) +- (seconds->string elapsed) +- (byte-count->string transferred)))) +- (erase-current-line log-port) +- (display (string-pad-middle left right +- (current-terminal-columns)) +- log-port) +- (force-output log-port)))))) ++ (if (and (number? size) (not (zero? size))) ++ (let* ((% (* 100.0 (/ transferred size))) ++ (throughput (/ transferred elapsed)) ++ (left (format #f " ~a ~a" file ++ (byte-count->string size))) ++ (right (format #f "~a/s ~a ~a~6,1f%" ++ (byte-count->string throughput) ++ (seconds->string elapsed) ++ (progress-bar %) %))) ++ (erase-current-line log-port) ++ (display (string-pad-middle left right ++ (current-terminal-columns)) ++ log-port) ++ (force-output log-port)) ++ ;; If we don't know the total size, the last transfer will have a 0B ++ ;; size. Don't display it. ++ (unless (zero? transferred) ++ (let* ((throughput (/ transferred elapsed)) ++ (left (format #f " ~a" file)) ++ (right (format #f "~a/s ~a | ~a transferred" ++ (byte-count->string throughput) ++ (seconds->string elapsed) ++ (byte-count->string transferred)))) ++ (erase-current-line log-port) ++ (display (string-pad-middle left right ++ (current-terminal-columns)) ++ log-port) ++ (force-output log-port))))) + + (define %progress-interval + ;; Default interval between subsequent outputs for rate-limited displays. +diff --git a/guix/status.scm b/guix/status.scm +index 362ae2882c..d6f4387adf 100644 +--- a/guix/status.scm ++++ b/guix/status.scm +@@ -424,9 +424,6 @@ substitutes being downloaded." + (cute colorize-string <> (color RED BOLD)) + identity)) + +- (define tty? +- (isatty?* port)) +- + (define (report-build-progress phase %) + (let ((% (min (max % 0) 100))) ;sanitize + (erase-current-line port) +@@ -547,7 +544,6 @@ substitutes being downloaded." + (nar-uri-abbreviation uri) + (basename uri)))) + (display-download-progress uri size +- #:tty? tty? + #:start-time + (download-start download) + #:transferred transferred)))))) +-- +2.31.1 + diff --git a/guix/guix/guix.spec b/guix/guix/guix.spec index 569978e..4ba6e21 100644 --- a/guix/guix/guix.spec +++ b/guix/guix/guix.spec @@ -5,25 +5,21 @@ %global selinuxmodule guix-daemon Name: guix -Version: 1.2.0 -Release: 2%{?dist} +Version: 1.3.0 +Release: 1%{?dist} Summary: A purely functional package manager for the GNU system License: GPLv3+ URL: https://guix.gnu.org Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz -# Fix invalid JSON strings in tests. -Patch0: guix-1.2.0-json-cve-swh.patch -Patch1: guix-1.2.0-json-crate.patch - -# Make it compatible with Guile-JSON 4.5. -Patch2: guix-1.2.0-guile-json-4.5.patch - -# Revert changes using features unavailable in Guile 2.2. -# https://issues.guix.gnu.org/44745 -# https://issues.guix.gnu.org/44751 -Patch3: guix-1.2.0-revert-verify-swh-certificate.patch +# Revert the commit causing tests/guix-environment.sh to fail on Guile 2.2.7. +# The commit uses the expression +# zero? (modulo (round (* 100. (/ 65536 2656076))) 10)) +# in function display-download-progress, but it throws an error +# Wrong type (expecting exact integer): 2.0 +# when running on Guile 2.2.7. +Patch0: guix-1.3.0-revert-display-download-progress-tty.patch %global guix_user guixbuild %global guix_group guixbuild @@ -38,10 +34,6 @@ Patch3: guix-1.2.0-revert-verify-swh-certificate.patch %global fish_completion_dir %{_datadir}/fish/vendor_completions.d %endif -# We require Guile 2.2.7 here because Guile 2.2.6 is known to crash with -# mmap(PROT_NONE) failed -# during the build. - BuildRequires: gcc-c++ BuildRequires: autoconf, automake, gettext-devel, po4a, help2man, texinfo BuildRequires: bzip2-devel, libgcrypt-devel, pkgconfig(sqlite3) @@ -49,10 +41,14 @@ BuildRequires: gettext, help2man, graphviz BuildRequires: bash-completion, fish BuildRequires: selinux-policy, systemd +# We require Guile 2.2.7 here because Guile 2.2.6 is known to crash with +# mmap(PROT_NONE) failed +# during the build. + BuildRequires: pkgconfig(guile-2.2) >= 2.2.7 BuildRequires: guile-gcrypt >= 0.1.0 BuildRequires: guile-sqlite3 >= 0.1.0 -BuildRequires: guile-zlib +BuildRequires: guile-zlib >= 0.1.0 BuildRequires: guile-lzlib BuildRequires: guile-avahi BuildRequires: guile-git >= 0.3.0 @@ -60,6 +56,7 @@ BuildRequires: guile-json >= 4.3.0 BuildRequires: guile-ssh >= 0.13.0 BuildRequires: guile-zstd BuildRequires: guile-semver +BuildRequires: guile-lib %if 0%{?fedora} >= 31 BuildRequires: gnutls-guile %else @@ -69,7 +66,7 @@ BuildRequires: gnutls-guile22 Requires: guile22 >= 2.2.7 Requires: guile-gcrypt >= 0.1.0 Requires: guile-sqlite3 >= 0.1.0 -Requires: guile-zlib +Requires: guile-zlib >= 0.1.0 Requires: guile-lzlib Requires: guile-avahi Requires: guile-git >= 0.3.0 @@ -98,6 +95,7 @@ Requires(preun): info Recommends: guile-ssh >= 0.13.0 Recommends: guile-zstd Recommends: guile-semver +Recommends: guile-lib Suggests: emacs-guix %description @@ -200,6 +198,8 @@ rm %{buildroot}%{_libdir}/upstart/system/guix-daemon.conf rm %{buildroot}%{_libdir}/upstart/system/guix-publish.conf rmdir %{buildroot}%{_libdir}/upstart/system rmdir %{buildroot}%{_libdir}/upstart +# drop useless openrc service files +rm %{buildroot}%{_sysconfdir}/openrc/guix-daemon # drop useless sysvinit service files rm %{buildroot}%{_sysconfdir}/init.d/guix-daemon # own the configuration directory @@ -299,6 +299,7 @@ fi %{guile_source_dir}/gnu/packages/aux-files/chromium/master-preferences.json %dir %{guile_source_dir}/gnu/packages/aux-files/emacs %{guile_source_dir}/gnu/packages/aux-files/emacs/guix-emacs.el +%{guile_source_dir}/gnu/packages/aux-files/guix.vim %dir %{guile_source_dir}/gnu/packages/aux-files/linux-libre %{guile_source_dir}/gnu/packages/aux-files/linux-libre/*-arm.conf %{guile_source_dir}/gnu/packages/aux-files/linux-libre/*-arm64.conf @@ -335,8 +336,14 @@ fi %dir %{guile_ccache_dir}/gnu/system/images %{guile_source_dir}/gnu/system/images/hurd.scm %{guile_ccache_dir}/gnu/system/images/hurd.go +%{guile_source_dir}/gnu/system/images/novena.scm +%{guile_ccache_dir}/gnu/system/images/novena.go %{guile_source_dir}/gnu/system/images/pine64.scm %{guile_ccache_dir}/gnu/system/images/pine64.go +%{guile_source_dir}/gnu/system/images/pinebook-pro.scm +%{guile_ccache_dir}/gnu/system/images/pinebook-pro.go +%{guile_source_dir}/gnu/system/images/rock64.scm +%{guile_ccache_dir}/gnu/system/images/rock64.go %{guile_source_dir}/gnu/tests.scm %{guile_ccache_dir}/gnu/tests.go %dir %{guile_source_dir}/gnu/tests @@ -347,6 +354,8 @@ fi %{guile_ccache_dir}/guix.go %dir %{guile_source_dir}/guix %dir %{guile_ccache_dir}/guix +%{guile_source_dir}/guix/d3.v3.js +%{guile_source_dir}/guix/graph.js %{guile_source_dir}/guix/*.scm %{guile_ccache_dir}/guix/*.go %dir %{guile_source_dir}/guix/build @@ -400,11 +409,20 @@ fi %{_infodir}/%{name}.info* %{_infodir}/%{name}.de.info* %{_infodir}/%{name}.es.info* +%{_infodir}/%{name}.fa.info* %{_infodir}/%{name}.fr.info* +%{_infodir}/%{name}.it.info* +%{_infodir}/%{name}.ko.info* +%{_infodir}/%{name}.pt_BR.info* %{_infodir}/%{name}.ru.info* +%{_infodir}/%{name}.sk.info* %{_infodir}/%{name}.zh_CN.info* %{_infodir}/%{name}-cookbook.info* %{_infodir}/%{name}-cookbook.de.info* +%{_infodir}/%{name}-cookbook.fa.info* +%{_infodir}/%{name}-cookbook.fr.info* +%{_infodir}/%{name}-cookbook.ko.info* +%{_infodir}/%{name}-cookbook.zh_Hans.info* %dir %{_infodir}/images %{_infodir}/images/bootstrap-graph.png.gz %{_infodir}/images/bootstrap-packages.png.gz @@ -453,6 +471,9 @@ fi %changelog +* Mon Jun 14 2021 Ting-Wei Lan <lantw44@gmail.com> - 1.3.0-1 +- Update to 1.3.0 + * Sat Mar 13 2021 Ting-Wei Lan <lantw44@gmail.com> - 1.2.0-2 - Rebuilt for Fedora 34 and 35 |