/usr/share/multistrap/setcrossarch.sh is in multistrap 2.2.0ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | #!/bin/sh
set -e
# Copyright (C) 2009, 2010 Neil Williams <codehelp@debian.org>
#
# This package is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# meant to be called from multistrap with directory arch variables.
dir=$1
hostarch=$2
if [ -z "$dir" ]; then
echo "No directory specified."
exit 1
fi
#run chroot script to ensure no unwanted system interactions (e.g. startup scripts)
if [ -x /usr/share/multistrap/chroot.sh ]; then
/usr/share/multistrap/chroot.sh $dir $hostarch
fi
cfg="/etc/pdebuild-cross/pdebuild-cross.rc"
if [ -f $cfg ]; then
. $cfg
fi
if [ -z "$CROSSARCH" ]; then
# get crossarch from dpkg-cross - check if it is not None
if [ -f /etc/dpkg-cross/cross-compile ]; then
DEFARCH=`grep "^default_arch" /etc/dpkg-cross/cross-compile|sed -e 's/default_arch *= *\(.*\)/\1/'`
if [ -n "$DEFARCH" -a "$DEFARCH" != "None" ]; then
CROSSARCH="$DEFARCH"
fi
else
echo "No CROSSARCH set in '$cfg' and no dpkg-cross default: using armel."
CROSSARCH="armel"
fi
fi
# set the value inside the chroot
echo "#!/bin/sh" > $dir/tmp/set.sh
echo >> $dir/tmp/set.sh
echo "export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C" >> $dir/tmp/set.sh
echo "echo debconf dpkg-cross/default-arch select $CROSSARCH|debconf-set-selections" >> $dir/tmp/set.sh
echo "Setting debconf dpkg-cross/default-arch to $CROSSARCH"
sudo chroot $dir sh /tmp/set.sh
sudo rm $dir/tmp/set.sh
|