GNU bug report logs -
#25775
Can't install packages after guix pull
Previous Next
Reported by: sirgazil <lizagris <at> protonmail.com>
Date: Fri, 17 Feb 2017 16:26:01 UTC
Severity: serious
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#25775: Can't install packages after guix pull
which was filed against the guix package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 25775 <at> debbugs.gnu.org.
--
25775: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25775
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hello,
Thanks Andy & Ricardo for the detailed explanations!
Andy Wingo <wingo <at> pobox.com> skribis:
> It seems that this bug is related to the introduction of
> url-fetch/reset-patch-level. It takes a #:guile kwarg but defaults to
> #f; if not given #:guile, that #f propagates through instead of a
> package object.
Nasty.
To reproduce the problem reported here, one can:
1. Revert the “band-aid commit”
9f05908fb1e3707cae593d94688748294717a546.
2. Change download.scm to force it to behave as when talking to an old
daemon.
This gives this:
[Message part 4 (text/x-patch, inline)]
diff --git a/guix/download.scm b/guix/download.scm
index 86f859881..811abe27b 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -418,10 +418,7 @@ GnuTLS itself and its dependencies. See <http://bugs.gnu.org/22774>."
;; hash of the expected result.
#:verify-certificate? #f)))))
- (mlet %store-monad ((guile (package->derivation
- (or guile
- (@@ (gnu packages bootstrap) %bootstrap-guile))
- system)))
+ (mlet %store-monad ((guile (package->derivation guile system)))
(gexp->derivation file-name builder
#:guile-for-build guile
#:system system
@@ -472,7 +469,7 @@ in the store."
(and uri (memq (uri-scheme uri) '(#f file))))
(interned-file (if uri (uri-path uri) url)
(or name file-name))
- (mlet* %store-monad ((builtins (built-in-builders*))
+ (mlet* %store-monad ((builtins -> '())
(download -> (if (member "download" builtins)
built-in-download
in-band-download)))
[Message part 5 (text/plain, inline)]
Then run something like:
guix gc -d /gnu/store/*-bash-4.4.tar.xz
./pre-inst-env guix build bash -S --no-substitutes
~~~~~~
To mirror what ‘url-fetch’ does, we should change the default value of
#:guile here:
[Message part 6 (text/x-patch, inline)]
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index c3b94391e..b4d0b6777 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -243,7 +243,8 @@ without modification.")
(define* (url-fetch/reset-patch-level url hash-algo hash
#:optional name
- #:key (system (%current-system)) guile)
+ #:key (system (%current-system))
+ (guile (default-guile)))
"Fetch the Bash patch from URL and reset its 'PATCHLEVEL' definition so it
can apply to a patch-level 0 Bash."
(mlet* %store-monad ((name -> (or name (basename url)))
[Message part 7 (text/plain, inline)]
However that leads to a stack overflow unless we patch
‘bootstrap-origin’ the way Andy suggests (which is not desirable IMO).
So, instead, we can simply force the use of the bootstrap Guile for
these derivations, which doesn’t make any difference functionally:
[Message part 8 (text/x-patch, inline)]
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -21,6 +21,7 @@
(define-module (gnu packages bash)
#:use-module (guix licenses)
#:use-module (gnu packages)
+ #:use-module (gnu packages bootstrap)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages bison)
@@ -243,14 +244,17 @@ without modification.")
(define* (url-fetch/reset-patch-level url hash-algo hash
#:optional name
- #:key (system (%current-system)) guile)
+ #:key (system (%current-system)))
"Fetch the Bash patch from URL and reset its 'PATCHLEVEL' definition so it
can apply to a patch-level 0 Bash."
+ ;; Note: Forcefully use %BOOTSTRAP-GUILE here to work around bootstrapping
+ ;; issues when using a daemon that lacks the "download" built-in. See
+ ;; <https://bugs.gnu.org/25775>.
(mlet* %store-monad ((name -> (or name (basename url)))
(patch (url-fetch url hash-algo hash
(string-append name ".orig")
#:system system
- #:guile guile)))
+ #:guile %bootstrap-guile)))
(gexp->derivation name
(with-imported-modules '((guix build utils))
#~(begin
@@ -259,7 +263,6 @@ can apply to a patch-level 0 Bash."
(substitute* #$output
(("PATCHLEVEL [0-6]+")
"PATCHLEVEL 0"))))
- #:guile-for-build guile
#:system system)))
(define bash/fixed ;CVE-2017-5932 (RCE with completion)
[Message part 9 (text/plain, inline)]
And it does the job.
Pushed as 6c5b56f9fa01b7fe9034bac47b20e08a2fdb2629. Let me know if
there are still fishy things!
Ludo’.
[Message part 10 (message/rfc822, inline)]
[Message part 11 (text/plain, inline)]
Hi,
I've been using the binary installation of Guix on Debian 8 for some time now. However, after a "guix pull", I can't install packages anymore.
Steps to reproduce
===============
- Run "guix pull" as a user
- Run "guix package -i guile"
Expected result
============
The latest stable version of GNU Guile is installed correctly.
Unexpected result
==============
I get the following error:
warning: failed to install locale: Invalid argument
Backtrace:
In guix/packages.scm:
982: 19 [bag-grafts # #]
966: 18 [fold-bag-dependencies #<procedure bbfa4f0 at guix/packages.scm:982:29 (package grafts)> ...]
983: 17 [#<procedure bbfa4f0 at guix/packages.scm:982:29 (package grafts)> # ()]
786: 16 [cache! #<weak-key-hash-table a01b060 0/223> # "i686-linux" ...]
910: 15 [thunk]
786: 14 [cache! #<weak-key-hash-table a01b280 167/223> # # ...]
1092: 13 [thunk]
1024: 12 [bag->derivation # # #]
In srfi/srfi-1.scm:
578: 11 [map #<procedure b73c510 at guix/packages.scm:1026:30 (t-1321339)> #]
In guix/packages.scm:
846: 10 [expand-input # # # ...]
In guix/store.scm:
1249: 9 [run-with-store # ...]
In guix/packages.scm:
480: 8 [#<procedure b7591e0 at guix/packages.scm:480:2 (state)> #]
485: 7 [#<procedure bbc9a80 at guix/packages.scm:485:34 (state)> #]
In gnu/packages/bash.scm:
249: 6 [#<procedure bbc9aa0 at gnu/packages/bash.scm:249:2 (state)> #]
In guix/download.scm:
421: 5 [#<procedure bafce38 at guix/download.scm:421:2 (state)> #]
In guix/store.scm:
1169: 4 [#<procedure b759138 at guix/store.scm:1168:28 (store)> #]
In guix/packages.scm:
786: 3 [cache! #<weak-key-hash-table a01b280 167/223> #f ...]
1092: 2 [thunk]
786: 1 [cache! #<weak-key-hash-table a01b100 169/223> #f ...]
871: 0 [thunk]
guix/packages.scm:871:27: In procedure thunk:
guix/packages.scm:871:27: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f
System information
===============
Guix (after pull): guix (GNU Guix) 20170216.20
Foreign distro:
Debian 8 (Linux makina 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1 (2016-12-30) i686 GNU/Linux)
Additional notes
=============
There is a related conversation about this problem in #guix log (https://gnunet.org/bot/log/guix/2017-02-17#T1295254) where amz3` reported the same problem on Ubuntu 16.10 (amd64). lfam couldn't reproduce the problem on x86_64 Guix on Debian.
It was suggested by lfam in the same conversation that the problem might be due to a very old guix-daemon, which is true for my system. However, there was no way for me to update the daemon because I get the same error described above when I run the second step of the following procedure (run as root):
- Run "guix pull"
- Run "guix package --upgrade"
- Restart guix-daemon
---
https://sirgazil.bitbucket.io/
[Message part 12 (text/html, inline)]
This bug report was last modified 8 years and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.