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
45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
--- debootstrap.orig 2019-07-06 11:22:30 UTC
|
|
+++ debootstrap
|
|
@@ -1,4 +1,4 @@
|
|
-#!/bin/sh
|
|
+#!%%LOCALBASE%%/bin/bash
|
|
set -e
|
|
|
|
VERSION='@VERSION@'
|
|
@@ -14,7 +14,7 @@ if [ -z "$DEBOOTSTRAP_DIR" ]; then
|
|
if [ -x /debootstrap/debootstrap ]; then
|
|
DEBOOTSTRAP_DIR=/debootstrap
|
|
else
|
|
- DEBOOTSTRAP_DIR=/usr/share/debootstrap
|
|
+ DEBOOTSTRAP_DIR=%%DATADIR%%
|
|
fi
|
|
fi
|
|
|
|
@@ -498,13 +498,7 @@ fi
|
|
|
|
###########################################################################
|
|
|
|
-if in_path dpkg && \
|
|
- dpkg --print-architecture >/dev/null 2>&1; then
|
|
- HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
|
|
-elif in_path udpkg && \
|
|
- udpkg --print-architecture >/dev/null 2>&1; then
|
|
- HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
|
|
-elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
|
|
+if [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
|
|
HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
|
|
fi
|
|
HOST_OS="$HOST_ARCH"
|
|
@@ -524,6 +518,11 @@ if [ -z "$HOST_OS" ]; then
|
|
HOST_OS=freebsd
|
|
;;
|
|
esac
|
|
+fi
|
|
+
|
|
+if [ "$HOST_OS" = "freebsd" -a -z "$HOST_ARCH" ]; then
|
|
+ HOST_ARCH=kfreebsd-`/sbin/sysctl -n hw.machine_arch`
|
|
+ EXTRACTOR_OVERRIDE=ar
|
|
fi
|
|
|
|
if [ -z "$ARCH" ]; then
|