GNU bug report logs - #36057
Fix for debootstrap

Previous Next

Package: guix-patches;

Reported by: Vagrant Cascadian <vagrant <at> debian.org>

Date: Sun, 2 Jun 2019 18:53:01 UTC

Severity: normal

Done: Vagrant Cascadian <vagrant <at> debian.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36057 in the body.
You can then email your comments to 36057 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36057; Package guix-patches. (Sun, 02 Jun 2019 18:53:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vagrant Cascadian <vagrant <at> debian.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 02 Jun 2019 18:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: guix-patches <at> gnu.org
Subject: Fix for debootstrap
Date: Sun, 02 Jun 2019 11:52:27 -0700
[Message part 1 (text/plain, inline)]
The attached patch includes a fix so that debootstrap can be run in a
single patch. Currently, this fails:

  debootstrap --arch=amd64 buster $(mktemp -d) http://deb.debian.org/debian

With this in the log:

/gnu/store/ah0rr88xmn28f32whhpbdcxwind0c74z-debootstrap-1.0.114/share/debootstrap/functions:
line 1056: chroot: command not found
/gnu/store/ah0rr88xmn28f32whhpbdcxwind0c74z-debootstrap-1.0.114/share/debootstrap/functions:
line 1062: grep: command not found
/gnu/store/ah0rr88xmn28f32whhpbdcxwind0c74z-debootstrap-1.0.114/share/debootstrap/functions:
line 1062: head: command not found
/gnu/store/ah0rr88xmn28f32whhpbdcxwind0c74z-debootstrap-1.0.114/share/debootstrap/functions:
line 1062: cut: command not found
/gnu/store/ah0rr88xmn28f32whhpbdcxwind0c74z-debootstrap-1.0.114/share/debootstrap/functions:
line 1062: sed: command not found

The workaround documented in the package description is to use
--foreign-arch and then follow up with a chroot call into to the newly
created chroot and finish up running /debootstrap/debootstrap, but this
fails for other reasons as well (/bin/sh in /debootstrap/debootstrap is
set to /gnu/store.../bin/sh which isn't present in the Debian
chroot)... and is a bit cumbersome for the end-user.


I *think* the best fix for this is to fix the hard-coded PATH in several
places places to also include $PATH, which I've proposed upstream:

  https://bugs.debian.org/929889


The attached patch approximates the proposed upstream patch for guix,
and works for me so you can do a single call to debootstrap without the
complicated chroot /debootstrap/debootstrap PATH-setting dance.


live well,
  vagrant

[0001-gnu-debootstrap-Workaround-for-PATH-issues.patch (text/x-diff, inline)]
From bb00c031e0037eb8edd9db2ab06f630109237d0a Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant <at> debian.org>
Date: Sun, 2 Jun 2019 11:34:33 -0700
Subject: [PATCH] gnu: debootstrap: Workaround for PATH issues.

* gnu/packages/debian (debootstrap):
  [arguments]: Substitute PATH to include $PATH.
  [description]: Remove obsolete workaround from description.
---
 gnu/packages/debian.scm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/debian.scm b/gnu/packages/debian.scm
index 1b401bc946..f94f49c51b 100644
--- a/gnu/packages/debian.scm
+++ b/gnu/packages/debian.scm
@@ -154,6 +154,11 @@ contains the archive keys used for that.")
                  (("/usr") ubuntu))
                (substitute* "debootstrap"
                  (("=/usr") (string-append "=" out)))
+               ;; Ensure PATH works both in guix and within the debian chroot
+               ;; workaround for: https://bugs.debian.org/929889
+               (substitute* "functions"
+                 (("PATH=/sbin:/usr/sbin:/bin:/usr/bin")
+                  "PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin"))
                (substitute* (find-files "scripts" ".")
                  (("/usr/share/zoneinfo") (string-append tzdata "/share/zoneinfo")))
                #t)))
@@ -184,9 +189,5 @@ contains the archive keys used for that.")
     (description "Debootstrap is used to create a Debian base system from
 scratch, without requiring the availability of @code{dpkg} or @code{apt}.
 It does this by downloading .deb files from a mirror site, and carefully
-unpacking them into a directory which can eventually be chrooted into.
-
-It is recommended to run @code{debootstrap --foreign --arch=...} and then
-@code{chroot} into the directory, set the PATH and run @code{debootstrap
---second-stage} after.")
+unpacking them into a directory which can eventually be chrooted into.")
     (license license:gpl2)))
-- 
2.20.1

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36057; Package guix-patches. (Wed, 05 Jun 2019 15:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 36057 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Vagrant Cascadian <vagrant <at> debian.org>
Cc: 36057 <at> debbugs.gnu.org
Subject: Re: [bug#36057] Fix for debootstrap
Date: Wed, 05 Jun 2019 17:16:30 +0200
Hi Vagrant,

Vagrant Cascadian <vagrant <at> debian.org> skribis:

> From bb00c031e0037eb8edd9db2ab06f630109237d0a Mon Sep 17 00:00:00 2001
> From: Vagrant Cascadian <vagrant <at> debian.org>
> Date: Sun, 2 Jun 2019 11:34:33 -0700
> Subject: [PATCH] gnu: debootstrap: Workaround for PATH issues.
>
> * gnu/packages/debian (debootstrap):
>   [arguments]: Substitute PATH to include $PATH.
>   [description]: Remove obsolete workaround from description.

It LGTM, and I think we can trust your judgment anyway.  ;-)

Thank you,
Ludo’.




Reply sent to Vagrant Cascadian <vagrant <at> debian.org>:
You have taken responsibility. (Wed, 05 Jun 2019 16:59:02 GMT) Full text and rfc822 format available.

Notification sent to Vagrant Cascadian <vagrant <at> debian.org>:
bug acknowledged by developer. (Wed, 05 Jun 2019 16:59:03 GMT) Full text and rfc822 format available.

Message #13 received at 36057-done <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36057-done <at> debbugs.gnu.org
Subject: Re: [bug#36057] Fix for debootstrap
Date: Wed, 05 Jun 2019 09:58:01 -0700
[Message part 1 (text/plain, inline)]
On 2019-06-05, Ludovic Courtès wrote:
> Vagrant Cascadian <vagrant <at> debian.org> skribis:
>
>> From bb00c031e0037eb8edd9db2ab06f630109237d0a Mon Sep 17 00:00:00 2001
>> From: Vagrant Cascadian <vagrant <at> debian.org>
>> Date: Sun, 2 Jun 2019 11:34:33 -0700
>> Subject: [PATCH] gnu: debootstrap: Workaround for PATH issues.
>>
>> * gnu/packages/debian (debootstrap):
>>   [arguments]: Substitute PATH to include $PATH.
>>   [description]: Remove obsolete workaround from description.
>
> It LGTM, and I think we can trust your judgment anyway.  ;-)

Ok, pushed to master!

live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 04 Jul 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 298 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.