48cbdd0f2a
PR: 295265 Approved by: nc (maintainer timeout)
59 lines
1.6 KiB
Plaintext
59 lines
1.6 KiB
Plaintext
--- debootstrap.orig 2025-10-14 09:32:18 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
|
|
|
|
@@ -385,8 +385,8 @@ if [ $# != 0 ] ; then
|
|
shift
|
|
;;
|
|
--keyring|--keyring=?*)
|
|
- if ! in_path sopv && ! in_path sqv && ! in_path gpgv; then
|
|
- error 1 NEEDPGPV "none of sopv, sqv or gpgv are installed, but required for Release verification"
|
|
+ if ! in_path sopv && ! in_path sqv && ! in_path gpgv2; then
|
|
+ error 1 NEEDPGPV "none of sopv, sqv or gpgv2 are installed, but required for Release verification"
|
|
fi
|
|
if [ "$1" = "--keyring" ] && [ -n "$2" ]; then
|
|
KEYRING="$2"
|
|
@@ -560,13 +560,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"
|
|
@@ -589,6 +583,14 @@ if [ -z "$HOST_OS" ]; then
|
|
HOST_OS=darwin
|
|
;;
|
|
esac
|
|
+fi
|
|
+
|
|
+if [ "$HOST_OS" = "freebsd" -a -z "$HOST_ARCH" ]; then
|
|
+ HOST_ARCH=`/sbin/sysctl -n hw.machine_arch`
|
|
+ if [ "$HOST_ARCH" = "aarch64" ]; then
|
|
+ HOST_ARCH=arm64
|
|
+ fi
|
|
+ EXTRACTOR_OVERRIDE=ar
|
|
fi
|
|
|
|
if [ -z "$ARCH" ]; then
|