From 3b609a408c6a10890785e9824b0c8f3a78c0089f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 15 Aug 2011 16:45:26 -0400 Subject: When FreeBSD (not kfreebsd) is the host, don't chroot to mount special filesystems. That fails for reasons that I don't know, but part of this patch avoids the chroot. http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/debootstrap/files/patch-functions?rev=1.3;content-type=text%2Fplain With this patch, deamonkeeper has confirmed a successful debootstrap from a FreeBSD host. --- debian/changelog | 2 ++ functions | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 05bda1a..468f7b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ debootstrap (1.0.36) UNRELEASED; urgency=low * Search PATH for programs, rather than checking hardcoded locations. * Support using md5 and shaN programs, as found on FreeBSD, in addition to md5sum and shaNsum. + * When FreeBSD (not kfreebsd) is the host, don't chroot to mount special + filesystems. -- Joey Hess Mon, 15 Aug 2011 14:14:29 -0400 diff --git a/functions b/functions index e07ca69..aaeb7c5 100644 --- a/functions +++ b/functions @@ -968,7 +968,11 @@ setup_proc () { umount_on_exit /dev umount_on_exit /proc umount "$TARGET/proc" 2>/dev/null || true - in_target mount -t linprocfs proc /proc + if [ "$HOST_OS" = kfreebsd ]; then + in_target mount -t linprocfs proc /proc + else + mount -t linprocfs proc $TARGET/proc + fi ;; hurd*) ;; @@ -1003,8 +1007,10 @@ setup_devices () { fi case "$HOST_OS" in - *freebsd*) + kfreebsd*) in_target mount -t devfs devfs /dev ;; + freebsd) + mount -t devfs devfs $TARGET/dev ;; hurd*) setup_devices_hurd ;; *) -- cgit v0.12