Index: head/sysutils/debootstrap/Makefile =================================================================== --- head/sysutils/debootstrap/Makefile (revision 542572) +++ head/sysutils/debootstrap/Makefile (revision 542573) @@ -1,39 +1,44 @@ # Created by: Martin Matuska # $FreeBSD$ PORTNAME= debootstrap PORTVERSION= 1.0.115 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= DEBIAN/pool/main/d/${PORTNAME} DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= lifanov@FreeBSD.org COMMENT= Install Debian base system into a directory LICENSE= MIT LICENSE_FILE= ${WRKSRC}/debian/copyright -RUN_DEPENDS= wget:ftp/wget +RUN_DEPENDS= wget:ftp/wget \ + bash:shells/bash WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} NO_BUILD= yes NO_ARCH= yes USES= gmake perl5 USE_PERL5= run ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= Debian GNU/kFreeBSD available only for i386 and amd64 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-Makefile =================================================================== --- head/sysutils/debootstrap/files/patch-Makefile (revision 542572) +++ head/sysutils/debootstrap/files/patch-Makefile (revision 542573) @@ -1,21 +1,21 @@ ---- Makefile.orig 2016-09-09 12:30:20 UTC +--- Makefile.orig 2019-07-06 11:22:30 UTC +++ Makefile -@@ -6,14 +6,12 @@ all: +@@ -5,14 +5,12 @@ all: clean: -DSDIR=$(DESTDIR)/usr/share/debootstrap +DSDIR=$(DESTDIR)%%DATADIR%% install: mkdir -p $(DSDIR)/scripts - mkdir -p $(DESTDIR)/usr/sbin + mkdir -p $(DESTDIR)%%PREFIX%%/sbin cp -a scripts/* $(DSDIR)/scripts/ - install -o root -g root -m 0644 functions $(DSDIR)/ + cp -a functions $(DSDIR)/ - sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap - chown root:root $(DESTDIR)/usr/sbin/debootstrap - chmod 0755 $(DESTDIR)/usr/sbin/debootstrap + sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)%%PREFIX%%/sbin/debootstrap Index: head/sysutils/debootstrap/files/patch-debootstrap =================================================================== --- head/sysutils/debootstrap/files/patch-debootstrap (revision 542572) +++ head/sysutils/debootstrap/files/patch-debootstrap (revision 542573) @@ -1,38 +1,44 @@ ---- debootstrap.orig 2018-06-13 13:00:11 UTC +--- 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 -@@ -474,13 +474,7 @@ 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" -@@ -502,6 +496,11 @@ if [ -z "$HOST_OS" ]; then +@@ -524,6 +518,11 @@ if [ -z "$HOST_OS" ]; then + HOST_OS=freebsd + ;; esac - fi - ++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 - ARCH="$HOST_ARCH" fi + + if [ -z "$ARCH" ]; then Index: head/sysutils/debootstrap/files/patch-functions =================================================================== --- head/sysutils/debootstrap/files/patch-functions (nonexistent) +++ head/sysutils/debootstrap/files/patch-functions (revision 542573) @@ -0,0 +1,20 @@ +--- functions.orig 2019-07-06 11:22:30 UTC ++++ functions +@@ -1139,6 +1139,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 () { + 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 ;; Property changes on: head/sysutils/debootstrap/files/patch-functions ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1,2 ## +yes +\ No newline at end of property \ 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/files/patch-scripts-bionic =================================================================== --- head/sysutils/debootstrap/files/patch-scripts-bionic (nonexistent) +++ head/sysutils/debootstrap/files/patch-scripts-bionic (revision 542573) @@ -0,0 +1,16 @@ +--- scripts/bionic.orig 2020-07-08 20:51:17.590645000 +0100 ++++ scripts/bionic 2020-07-08 20:51:28.786509000 +0100 +@@ -249,10 +249,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 Property changes on: head/sysutils/debootstrap/files/patch-scripts-bionic ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1,2 ## +yes +\ No newline at end of property \ 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