* [bug#36057] Fix for debootstrap
@ 2019-06-02 18:52 Vagrant Cascadian
2019-06-05 15:16 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Vagrant Cascadian @ 2019-06-02 18:52 UTC (permalink / raw)
To: 36057
[-- Attachment #1.1: Type: text/plain, Size: 1650 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-debootstrap-Workaround-for-PATH-issues.patch --]
[-- Type: text/x-diff, Size: 1985 bytes --]
From bb00c031e0037eb8edd9db2ab06f630109237d0a Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#36057] Fix for debootstrap
2019-06-02 18:52 [bug#36057] Fix for debootstrap Vagrant Cascadian
@ 2019-06-05 15:16 ` Ludovic Courtès
2019-06-05 16:58 ` bug#36057: " Vagrant Cascadian
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2019-06-05 15:16 UTC (permalink / raw)
To: Vagrant Cascadian; +Cc: 36057
Hi Vagrant,
Vagrant Cascadian <vagrant@debian.org> skribis:
> From bb00c031e0037eb8edd9db2ab06f630109237d0a Mon Sep 17 00:00:00 2001
> From: Vagrant Cascadian <vagrant@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’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#36057: Fix for debootstrap
2019-06-05 15:16 ` Ludovic Courtès
@ 2019-06-05 16:58 ` Vagrant Cascadian
0 siblings, 0 replies; 3+ messages in thread
From: Vagrant Cascadian @ 2019-06-05 16:58 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 36057-done
[-- Attachment #1: Type: text/plain, Size: 607 bytes --]
On 2019-06-05, Ludovic Courtès wrote:
> Vagrant Cascadian <vagrant@debian.org> skribis:
>
>> From bb00c031e0037eb8edd9db2ab06f630109237d0a Mon Sep 17 00:00:00 2001
>> From: Vagrant Cascadian <vagrant@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-05 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-02 18:52 [bug#36057] Fix for debootstrap Vagrant Cascadian
2019-06-05 15:16 ` Ludovic Courtès
2019-06-05 16:58 ` bug#36057: " Vagrant Cascadian
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.