Index: head/sysutils/debootstrap/Makefile =================================================================== --- head/sysutils/debootstrap/Makefile (revision 561449) +++ head/sysutils/debootstrap/Makefile (revision 561450) @@ -1,41 +1,41 @@ # Created by: Martin Matuska # $FreeBSD$ PORTNAME= debootstrap PORTVERSION= 1.0.123 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= DEBIAN/pool/main/d/${PORTNAME} DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= trasz@FreeBSD.org COMMENT= Install Debian or Ubuntu base system into a directory LICENSE= MIT LICENSE_FILE= ${WRKSRC}/debian/copyright RUN_DEPENDS= wget:ftp/wget \ bash:shells/bash WRKSRC= ${WRKDIR}/${PORTNAME} NO_BUILD= yes NO_ARCH= yes USES= gmake perl5 USE_PERL5= run post-patch: @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \ ${WRKSRC}/Makefile \ ${WRKSRC}/debootstrap @${REINPLACE_CMD} -e 's,%%DATADIR%%,${DATADIR},g' \ ${WRKSRC}/Makefile \ ${WRKSRC}/debootstrap @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \ ${WRKSRC}/Makefile \ ${WRKSRC}/debootstrap post-install: ${INSTALL_MAN} ${WRKSRC}/debootstrap.8 \ ${STAGEDIR}${MAN8PREFIX}/man/man8/debootstrap.8 .include Index: head/sysutils/debootstrap/files/patch-debootstrap =================================================================== --- head/sysutils/debootstrap/files/patch-debootstrap (revision 561449) +++ head/sysutils/debootstrap/files/patch-debootstrap (revision 561450) @@ -1,44 +1,44 @@ ---- debootstrap.orig 2019-07-06 11:22:30 UTC +--- debootstrap.orig 2020-03-13 02:03:08 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 +@@ -516,13 +516,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 +@@ -542,6 +536,11 @@ if [ -z "$HOST_OS" ]; then HOST_OS=freebsd ;; esac +fi + +if [ "$HOST_OS" = "freebsd" -a -z "$HOST_ARCH" ]; then + HOST_ARCH=`/sbin/sysctl -n hw.machine_arch` + EXTRACTOR_OVERRIDE=ar fi if [ -z "$ARCH" ]; then Index: head/sysutils/debootstrap/files/patch-functions =================================================================== --- head/sysutils/debootstrap/files/patch-functions (revision 561449) +++ head/sysutils/debootstrap/files/patch-functions (revision 561450) @@ -1,20 +1,20 @@ ---- functions.orig 2019-07-06 11:22:30 UTC +--- functions.orig 2020-03-14 00:53:38 UTC +++ functions -@@ -1139,6 +1139,7 @@ setup_proc () { +@@ -1157,6 +1157,7 @@ setup_proc () { case "$HOST_OS" in *freebsd*) umount_on_exit /dev + umount_on_exit /dev/fd umount_on_exit /proc umount "$TARGET/proc" 2>/dev/null || true if [ "$HOST_OS" = kfreebsd ]; then -@@ -1224,7 +1225,8 @@ setup_dynamic_devices () { +@@ -1242,7 +1243,8 @@ setup_dynamic_devices () { kfreebsd*) in_target mount -t devfs devfs /dev ;; freebsd) - mount -t devfs devfs "$TARGET/dev" ;; + mount -t devfs devfs "$TARGET/dev" + mount -t fdescfs -o linrdlnk fdescfs "$TARGET/dev/fd" ;; hurd*) # Use the setup-translators of the hurd package in_target /usr/lib/hurd/setup-translators -k ;; Index: head/sysutils/debootstrap/files/patch-scripts-gutsy =================================================================== --- head/sysutils/debootstrap/files/patch-scripts-gutsy (revision 561449) +++ head/sysutils/debootstrap/files/patch-scripts-gutsy (revision 561450) @@ -1,16 +1,38 @@ ---- scripts/gutsy.orig 2020-07-08 20:51:17.590645000 +0100 -+++ scripts/gutsy 2020-07-08 20:51:28.786509000 +0100 -@@ -249,10 +249,13 @@ echo \"Warning: Fake initctl called, doing nothing\"" +--- scripts/gutsy.orig 2020-03-13 02:04:21 UTC ++++ scripts/gutsy +@@ -242,10 +242,21 @@ echo \"Warning: Fake initctl called, doing nothing\"" + predep=$(without "$(without "$(resolve_deps $predep)" "$required")" "$done_predeps") + # XXX: progress is tricky due to how dpkg_progress works + # -- cjwatson 2009-07-29 ++ # This step sometimes fails due to some missing functionality in Linuxulator. Just ignore it. ++ set +e + p; smallyes '' | + in_target dpkg --force-overwrite --force-confold --skip-same-version --install $(debfor $predep) ++ rc=$? + base=$(without "$base" "$predep") + done_predeps="$done_predeps $predep" ++ ++ if [ $rc != 0 ]; then ++ warning FREEBSD_00 "Applying FreeBSD-specific workaround..." ++ # ... for "Failed to mount /etc/machine-id: Bad address" with Focal. ++ in_target truncate -s0 /var/lib/dpkg/info/systemd.postinst ++ in_target dpkg --configure systemd ++ fi ++ set -e + done + + if [ -n "$base" ]; then +@@ -256,10 +267,13 @@ echo \"Warning: Fake initctl called, doing nothing\"" info CONFBASE "Configuring the base system..." + # This step sometimes fails due to some missing functionality in Linuxulator. Just ignore it. + set +e smallyes '' | (repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be re-attempted up to five times." "" \ dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) | dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING + set -e fi if [ -x "$TARGET/sbin/initctl.REAL" ]; then Index: head/sysutils/debootstrap/files/patch-scripts_debian-common =================================================================== --- head/sysutils/debootstrap/files/patch-scripts_debian-common (nonexistent) +++ head/sysutils/debootstrap/files/patch-scripts_debian-common (revision 561450) @@ -0,0 +1,24 @@ +--- scripts/debian-common.orig 2021-01-12 21:19:09 UTC ++++ scripts/debian-common +@@ -200,10 +200,21 @@ echo \"Warning: Fake start-stop-daemon called, doing n + predep=$(without "$(without "$(resolve_deps $predep)" "$required")" "$done_predeps") + # XXX: progress is tricky due to how dpkg_progress works + # -- cjwatson 2009-07-29 ++ # This step sometimes fails due to some missing functionality in Linuxulator. Just ignore it. ++ set +e + p; smallyes '' | + in_target dpkg --force-overwrite --force-confold --skip-same-version --install $(debfor $predep) ++ rc=$? + base=$(without "$base" "$predep") + done_predeps="$done_predeps $predep" ++ ++ if [ $rc != 0 ]; then ++ warning FREEBSD_00 "Applying FreeBSD-specific workaround..." ++ # ... for "Failed to mount /etc/machine-id: Bad address" with Focal. ++ in_target truncate -s0 /var/lib/dpkg/info/systemd.postinst ++ in_target dpkg --configure systemd ++ fi ++ set -e + done + + if [ -n "$base" ]; then Property changes on: head/sysutils/debootstrap/files/patch-scripts_debian-common ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/debootstrap/pkg-message =================================================================== --- head/sysutils/debootstrap/pkg-message (revision 561449) +++ head/sysutils/debootstrap/pkg-message (revision 561450) @@ -1,10 +1,14 @@ [ { type: install message: <