diff --git a/fix-time-duration-issue-part1.patch b/fix-time-duration-issue-part1.patch new file mode 100644 index 0000000..56c8f4b --- /dev/null +++ b/fix-time-duration-issue-part1.patch @@ -0,0 +1,37 @@ +From 88bc3c89bf5145d24c2270d2192b7be547e0024f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= +Date: Sun, 2 Jun 2019 01:29:38 +0200 +Subject: progress: Provide the proper type for %PROGRESS-INTERVAL. + +The (srfi srfi-19) module of Guile 2.9.2 catches the wrong type. + +* guix/progress.scm (%progress-interval): Change type to TIME-DURATION. +--- + guix/progress.scm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/guix/progress.scm b/guix/progress.scm +index 65080bc..f150b08 100644 +--- a/guix/progress.scm ++++ b/guix/progress.scm +@@ -1,7 +1,7 @@ + ;;; GNU Guix --- Functional package management for GNU + ;;; Copyright © 2017 Sou Bunnbu + ;;; Copyright © 2015 Steve Sprang +-;;; Copyright © 2017, 2018 Ludovic Courtès ++;;; Copyright © 2017, 2018, 2019 Ludovic Courtès + ;;; Copyright © 2018 Clément Lassieur + ;;; + ;;; This file is part of GNU Guix. +@@ -229,7 +229,7 @@ throughput." + + (define %progress-interval + ;; Default interval between subsequent outputs for rate-limited displays. +- (make-time time-monotonic 200000000 0)) ++ (make-time time-duration 200000000 0)) + + (define* (progress-reporter/file file size + #:optional (log-port (current-output-port)) +-- +cgit v1.0-41-gc330 + diff --git a/fix-time-duration-issue-part2.patch b/fix-time-duration-issue-part2.patch new file mode 100644 index 0000000..a623f17 --- /dev/null +++ b/fix-time-duration-issue-part2.patch @@ -0,0 +1,32 @@ +From b6f5339dd0180fe73ab70d9c5b851ca0adc04193 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= +Date: Mon, 24 Jun 2019 23:10:13 +0200 +Subject: progress: Call 'time-difference' on times of the same type. + +Guile 2.2.5 and 2.9.2 would catch the issue. +This is a followup to 88bc3c89bf5145d24c2270d2192b7be547e0024f. + +* guix/progress.scm (display-download-progress)[elapsed]: Pass +'current-time' the same type as START-TIME. +--- + guix/progress.scm | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/guix/progress.scm b/guix/progress.scm +index f150b08..349637d 100644 +--- a/guix/progress.scm ++++ b/guix/progress.scm +@@ -197,7 +197,9 @@ object) and TRANSFERRED (a total number of bytes) to determine the + throughput." + (define elapsed + (duration->seconds +- (time-difference (current-time time-monotonic) start-time))) ++ (time-difference (current-time (time-type start-time)) ++ start-time))) ++ + (if (and (number? size) (not (zero? size))) + (let* ((% (* 100.0 (/ transferred size))) + (throughput (/ transferred elapsed)) +-- +cgit v1.0-41-gc330 + diff --git a/guix.changes b/guix.changes index 8816e91..7c2961a 100644 --- a/guix.changes +++ b/guix.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Jul 31 11:08:14 UTC 2019 - Jonathan Brielmaier + +- Build only with 3 threads, because more threads leading to a core + dump of guile during the build. Upstream bug: + https://issues.guix.gnu.org/issue/36811 +- Fix issue where guix fails during download of packages, which + makes guix unusable. Apply patches from upstream. + Add patches: + * fix-time-duration-issue-part1.patch + * fix-time-duration-issue-part2.patch + ------------------------------------------------------------------- Fri May 17 07:18:23 UTC 2019 - Jonathan Brielmaier diff --git a/guix.spec b/guix.spec index eec370c..1e2d916 100644 --- a/guix.spec +++ b/guix.spec @@ -44,6 +44,10 @@ Source12: aarch64-linux-guile-2.0.14.tar.xz Source13: aarch64-linux-guile-2.0.14.tar.xz.sig Source20: run_guix_daemon.sh Source21: run_guix_publish.sh +# PATCH-FIX-UPSTREAM 88bc3c89bf5145d24c2270d2192b7be547e0024f -- guix fails on downloading +Patch0: fix-time-duration-issue-part1.patch +# PATH-FIX-UPSTREAM b6f5339dd0180fe73ab70d9c5b851ca0adc04193 -- guix fails on downloading +Patch1: fix-time-duration-issue-part2.patch BuildRequires: gcc-c++ BuildRequires: gnutls-guile BuildRequires: guile-charting @@ -83,6 +87,8 @@ As a GNU distribution it contains only free software. %prep %setup -q +%patch0 -p1 +%patch1 -p1 # install service file to _unitdir sed -i 's@\$(libdir)/systemd/system@%{_unitdir}@' Makefile.in mkdir -p gnu/packages/bootstrap/{i686,x86_64,mips64el,armhf}-linux @@ -97,7 +103,8 @@ export GUILE_WARN_DEPRECATED %configure \ --disable-silent-rules \ --with-bash-completion-dir=%{_datadir}/bash-completion/completions -make %{?_smp_mflags} +# guile 2.2.6 core dumps while build guix with more then 3 threads. See https://issues.guix.gnu.org/issue/36811 +make -j3 %install %make_install