Bug 247698

Summary: sysutils/debootstrap: doesn't work quite right
Product: Ports & Packages Reporter: Edward Tomasz Napierala <trasz>
Component: Individual Port(s)Assignee: Edward Tomasz Napierala <trasz>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (lifanov)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Log output diff none

Description Edward Tomasz Napierala freebsd_committer freebsd_triage 2020-07-01 20:26:06 UTC
Created attachment 216116 [details]
Log output diff

Trying to install Stretch (debootstrap --arch=amd64 --verbose stretch /tmp/stretch http://deb.debian.org/debian) results in what seems to an unfinished installation - for example the apt(1) binary is missing.  Attached is a diff from output from the same command ran in Bionic chroot (under 13-CURRENT with Linuxulator), and debootstrap installed from FreeBSD package.
Comment 1 Edward Tomasz Napierala freebsd_committer freebsd_triage 2020-07-02 14:38:58 UTC
Ok, found the culprit: it doesn't work with sh(1); replacing the shebang in /usr/local/sbin/debootstrap with '#!/usr/local/bin/bash' fixes it.
Comment 2 Edward Tomasz Napierala freebsd_committer freebsd_triage 2020-07-08 19:12:08 UTC
https://reviews.freebsd.org/D25594
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-07-19 12:56:02 UTC
A commit references this bug:

Author: trasz
Date: Sun Jul 19 12:55:01 UTC 2020
New revision: 542573
URL: https://svnweb.freebsd.org/changeset/ports/542573

Log:
  sysutils/deboostrap: make it use bash, mount fdescfs,
  ignore --configure errors

  For some reason, when run with stock sh(1) the script aborts just
  after 'Unpacking the base system'.

  The fdescfs mount fixes 'dpkg --configure' for rsyslog. Note that
  there are also some kernel patches required to make it work completely.

  The fdescfs is not enough to fix everything, though, so just ignore
  'dpkg --configure' errors for Bionic; they don't break anything important.

  PR:		ports/247698
  Reviewed by:	0mp (earlier version)
  Approved by:	maintainer timeout (2 weeks)
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D25594

Changes:
  head/sysutils/debootstrap/Makefile
  head/sysutils/debootstrap/files/patch-Makefile
  head/sysutils/debootstrap/files/patch-debootstrap
  head/sysutils/debootstrap/files/patch-functions
  head/sysutils/debootstrap/files/patch-scripts-bionic
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2020-08-17 03:01:50 UTC
Committed Jul 19 12:55:01 UTC 2020 as r542573.

^Triage: assign to committer that resolved.