Date: Wed, 13 Jan 2021 09:57:09 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r561450 - in head/sysutils/debootstrap: . files Message-ID: <202101130957.10D9v9ho063664@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Wed Jan 13 09:57:09 2021 New Revision: 561450 URL: https://svnweb.freebsd.org/changeset/ports/561450 Log: sysutils/debootstrap: add workarounds necessary for bootstrapping Ubuntu Focal and Debian Sid. Sponsored by: The FreeBSD Foundation Added: head/sysutils/debootstrap/files/patch-scripts_debian-common (contents, props changed) Modified: head/sysutils/debootstrap/Makefile head/sysutils/debootstrap/files/patch-debootstrap head/sysutils/debootstrap/files/patch-functions head/sysutils/debootstrap/files/patch-scripts-gutsy head/sysutils/debootstrap/pkg-message Modified: head/sysutils/debootstrap/Makefile ============================================================================== --- head/sysutils/debootstrap/Makefile Wed Jan 13 09:41:08 2021 (r561449) +++ head/sysutils/debootstrap/Makefile Wed Jan 13 09:57:09 2021 (r561450) @@ -3,7 +3,7 @@ PORTNAME= debootstrap PORTVERSION= 1.0.123 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= DEBIAN/pool/main/d/${PORTNAME} DISTNAME= ${PORTNAME}_${PORTVERSION} Modified: head/sysutils/debootstrap/files/patch-debootstrap ============================================================================== --- head/sysutils/debootstrap/files/patch-debootstrap Wed Jan 13 09:41:08 2021 (r561449) +++ head/sysutils/debootstrap/files/patch-debootstrap Wed Jan 13 09:57:09 2021 (r561450) @@ -1,4 +1,4 @@ ---- 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 @@ -15,7 +15,7 @@ fi fi -@@ -498,13 +498,7 @@ fi +@@ -516,13 +516,7 @@ fi ########################################################################### @@ -30,7 +30,7 @@ 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 Modified: head/sysutils/debootstrap/files/patch-functions ============================================================================== --- head/sysutils/debootstrap/files/patch-functions Wed Jan 13 09:41:08 2021 (r561449) +++ head/sysutils/debootstrap/files/patch-functions Wed Jan 13 09:57:09 2021 (r561450) @@ -1,6 +1,6 @@ ---- 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 @@ -8,7 +8,7 @@ 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) Modified: head/sysutils/debootstrap/files/patch-scripts-gutsy ============================================================================== --- head/sysutils/debootstrap/files/patch-scripts-gutsy Wed Jan 13 09:41:08 2021 (r561449) +++ head/sysutils/debootstrap/files/patch-scripts-gutsy Wed Jan 13 09:57:09 2021 (r561450) @@ -1,6 +1,28 @@ ---- 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..." Added: head/sysutils/debootstrap/files/patch-scripts_debian-common ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/debootstrap/files/patch-scripts_debian-common Wed Jan 13 09:57:09 2021 (r561450) @@ -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 Modified: head/sysutils/debootstrap/pkg-message ============================================================================== --- head/sysutils/debootstrap/pkg-message Wed Jan 13 09:41:08 2021 (r561449) +++ head/sysutils/debootstrap/pkg-message Wed Jan 13 09:57:09 2021 (r561450) @@ -2,9 +2,13 @@ { type: install message: <<EOM To successfully create an installation of Debian or Ubuntu -debootstrap requires the following kernel modules loaded: +debootstrap requires the following kernel modules to be loaded: -fdescfs linprocfs linsysfs tmpfs +linux64 fdescfs linprocfs linsysfs tmpfs + +To install Ubuntu Bionic into /compat/ubuntu, use: + +debootstrap --no-check-gpg bionic /compat/ubuntu EOM } ]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101130957.10D9v9ho063664>