From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#25775: Can't install packages after guix pull Date: Mon, 20 Feb 2017 17:06:48 +0100 Message-ID: <87poiczw13.fsf@elephly.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfqUV-0000kI-ON for bug-guix@gnu.org; Mon, 20 Feb 2017 11:07:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfqUQ-0005bz-Qr for bug-guix@gnu.org; Mon, 20 Feb 2017 11:07:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49497) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cfqUQ-0005bu-N9 for bug-guix@gnu.org; Mon, 20 Feb 2017 11:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cfqUQ-0005b2-ED for bug-guix@gnu.org; Mon, 20 Feb 2017 11:07:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: sirgazil Cc: 25775@debbugs.gnu.org This problem was exposed by commit 50b8a527e, which adds a graft for bash and along with it a download method for bash patches. What happens is that for a reason I haven’t yet understood the download method procedure is called with “#f” instead of a package object for guile. This is no problem when the built-in downloader is used, because by design it doesn’t need Guile or GnuTLS. Older daemons do not have a built-in downloader and fall back to the “in-band-download”, which needs to be passed a Guile package. Because this doesn’t happen in this case, Guix at this commit or later abort when an old daemon is used. Since I lack an understanding of why the “guile” argument could ever purposefully be set to “#f” I cannot come up with a nice fix. Instead of a nice fix I have found a really gross fix: --8<---------------cut here---------------start------------->8--- diff --git a/guix/download.scm b/guix/download.scm index 813f51f48..86f859881 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -418,7 +418,10 @@ GnuTLS itself and its dependencies. See ." ;; hash of the expected result. #:verify-certificate? #f))))) - (mlet %store-monad ((guile (package->derivation guile system))) + (mlet %store-monad ((guile (package->derivation + (or guile + (@@ (gnu packages bootstrap) %bootstrap-guile)) + system))) (gexp->derivation file-name builder #:guile-for-build guile #:system system --8<---------------cut here---------------end--------------->8--- With this patch installed I can use the latest Guix with an ancient guix-daemon (I tested with 0.10.0). For those of you who are using Guix on top of a foreign distribution: you may find the following steps helpful in upgrading the daemon to a compatible version. --8<---------------cut here---------------start------------->8--- # become root su - # update to the last version of guix that works # with older daemons guix pull --url=http://git.savannah.gnu.org/cgit/guix.git/snapshot/afd532337.tar.gz # update root's profile to get a new "guix" package # including a new daemon guix package -u # edit the systemd unit to use the new daemon sed -i "s|ExecStart=.*|ExecStart=/root/.guix-profile/bin/guix-daemon --build-users-group=guixbuild" /etc/systemd/system/guix-daemon.service # reload the unit file systemctl daemon-reload # restart the daemon systemctl restart guix-daemon # now become a regular user and run "guix pull" exit guix pull --8<---------------cut here---------------end--------------->8--- Ideally, this wouldn’t be necessary, but I cannot install this ugly patch (or a prettier variant thereof) before someone who is more familiar with the code has looked over it. I hope this helps! -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net