1diff --git a/usr/sbin/debootstrap b/usr/sbin/debootstrap
2index a0dacf3..6331b3d 100755
3--- a/usr/sbin/debootstrap
4+++ b/usr/sbin/debootstrap
5@@ -14,7 +14,7 @@ if [ "$DEBOOTSTRAP_DIR" = "" ]; then
6 fi
7 fi
8
9-if [ -x "/usr/bin/gettext" ]; then
10+if [ -x "@gettext@" ]; then
11 USE_GETTEXT_INTERACTION=yes
12 fi
13
14@@ -334,12 +334,12 @@ fi
15
16 if [ "$ARCH" != "" ]; then
17 true
18-elif [ -x /usr/bin/dpkg ] && \
19- /usr/bin/dpkg --print-installation-architecture >/dev/null 2>&1; then
20- ARCH=`/usr/bin/dpkg --print-installation-architecture`
21+elif [ -x @dpkg@ ] && \
22+ @dpkg@ --print-installation-architecture >/dev/null 2>&1; then
23+ ARCH=`@dpkg@ --print-installation-architecture`
24 elif type udpkg >/dev/null 2>&1 && \
25 udpkg --print-architecture >/dev/null 2>&1; then
26- ARCH=`/usr/bin/udpkg --print-architecture`
27+ ARCH=`@udpkg@ --print-architecture`
28 elif [ -e $DEBOOTSTRAP_DIR/arch ]; then
29 ARCH=`cat $DEBOOTSTRAP_DIR/arch`
30 else
31@@ -349,7 +349,7 @@ fi
32 export ARCH SUITE TARGET
33
34 if am_doing_phase first_stage second_stage; then
35- if [ -x /usr/bin/id ] && [ `id -u` -ne 0 ]; then
36+ if [ -x @id@ ] && [ `id -u` -ne 0 ]; then
37 error 1 NEEDROOT "debootstrap can only run as root"
38 fi
39 # Ensure that we can create working devices and executables on the target.
40diff --git a/usr/share/debootstrap/functions b/usr/share/debootstrap/functions
41index b9180ba..33feac3 100755
42--- a/usr/share/debootstrap/functions
43+++ b/usr/share/debootstrap/functions
44@@ -914,7 +914,7 @@ setup_dselect_method () {
45 # For the debootstrap udeb, pkgdetails is provided by the bootstrap-base
46 # udeb, so the pkgdetails API needs to be kept in sync with that.
47
48-if [ -x /usr/bin/perl ]; then
49+if [ -x @perl@ ]; then
50 PKGDETAILS=pkgdetails_perl
51
52 pkgdetails_field () {
53@@ -1264,7 +1264,7 @@ close LD_SO_CONF;
54
55 unshift @ld_library_path, split(/:/, $ENV{LD_LIBRARY_PATH});
56
57-$unamearch = `/bin/uname -m`;
58+$unamearch = `@uname -m`;
59 chomp $unamearch;
60
61 foreach my $file (@ARGV) {
62
63
64diff --git a/usr/share/debootstrap/functions b/usr/share/debootstrap/functions
65index 730df3a..197b2fb 100755
66--- a/usr/share/debootstrap/functions
67+++ b/usr/share/debootstrap/functions
68@@ -18,7 +18,7 @@ error () {
69 for x in "$@"; do echo "EA: $x"; done
70 echo "EF: $fmt") >&4
71 elif [ "$USE_GETTEXT_INTERACTION" ]; then
72- (printf "E: `LANG=$GETTEXT_LANG gettext debootstrap "$fmt"`\n" "$@") >&4
73+ (printf "E: `LANG=$GETTEXT_LANG @gettext@ debootstrap "$fmt"`\n" "$@") >&4
74 else
75 (printf "E: $fmt\n" "$@") >&4
76 fi
77@@ -35,7 +35,7 @@ warning () {
78 for x in "$@"; do echo "WA: $x"; done
79 echo "WF: $fmt") >&4
80 elif [ "$USE_GETTEXT_INTERACTION" ]; then
81- printf "W: `LANG=$GETTEXT_LANG gettext debootstrap "$fmt"`\n" "$@" >&4
82+ printf "W: `LANG=$GETTEXT_LANG @gettext@ debootstrap "$fmt"`\n" "$@" >&4
83 else
84 printf "W: $fmt\n" "$@" >&4
85 fi
86@@ -51,7 +51,7 @@ info () {
87 for x in "$@"; do echo "IA: $x"; done
88 echo "IF: $fmt") >&4
89 elif [ "$USE_GETTEXT_INTERACTION" ]; then
90- printf "I: `LANG=$GETTEXT_LANG gettext debootstrap "$fmt"`\n" "$@" >&4
91+ printf "I: `LANG=$GETTEXT_LANG @gettext@ debootstrap "$fmt"`\n" "$@" >&4
92 else
93 printf "I: $fmt\n" "$@" >&4
94 fi
95
96
97diff --git a/usr/share/debootstrap/functions b/usr/share/debootstrap/functions
98index 98d2056..c1d7430 100755
99--- a/usr/share/debootstrap/functions
100+++ b/usr/share/debootstrap/functions
101@@ -501,9 +501,9 @@ download_release_indices () {
102 local md=
103 if [ "$normmd" != "" ]; then
104 md="$normmd"
105- elif [ -x /bin/bunzip2 ] && [ "$bz2md" != "" ]; then
106+ elif [ -x @bunzip2@ ] && [ "$bz2md" != "" ]; then
107 md="$bz2md"
108- elif [ -x /bin/gunzip ] && [ "$gzmd" != "" ]; then
109+ elif [ -x @gunzip@ ] && [ "$gzmd" != "" ]; then
110 md="$gzmd"
111 fi
112 if [ "$md" != "" ]; then
113@@ -529,11 +529,11 @@ download_release_indices () {
114 ext="$ext $normmd ."
115 md="$normmd"
116 fi
117- if [ -x /bin/bunzip2 ] && [ "$bz2md" != "" ]; then
118+ if [ -x @bunzip2@ ] && [ "$bz2md" != "" ]; then
119 ext="$ext $bz2md bz2"
120 md="${md:-$bz2md}"
121 fi
122- if [ -x /bin/gunzip ] && [ "$gzmd" != "" ]; then
123+ if [ -x @gunzip@ ] && [ "$gzmd" != "" ]; then
124 ext="$ext $gzmd gz"
125 md="${md:-$gzmd}"
126 fi
127@@ -663,7 +663,7 @@ download_main_indices () {
128 for c in $COMPONENTS; do
129 local path="dists/$SUITE/$c/binary-$ARCH/Packages"
130 local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")"
131- if [ -x /bin/gunzip ] && get "$m/${path}.gz" "${pkgdest}.gz"; then
132+ if [ -x @gunzip@ ] && get "$m/${path}.gz" "${pkgdest}.gz"; then
133 rm -f "$pkgdest"
134 gunzip "$pkgdest.gz"
135 elif get "$m/$path" "$pkgdest"; then
136
137
138diff --git a/usr/share/debootstrap/functions b/usr/share/debootstrap/functions
139index 15051e8..a5de422 100755
140--- a/usr/share/debootstrap/functions
141+++ b/usr/share/debootstrap/functions
142@@ -70,13 +70,13 @@ wgetprogress () {
143 [ ! "$verbose" ] && QSWITCH="-q"
144 local ret=0
145 if [ "$USE_DEBIANINSTALLER_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then
146- wget "$@" 2>&1 >/dev/null | $PKGDETAILS "WGET%" $PROGRESS_NOW $PROGRESS_NEXT $PROGRESS_END >&3
147+ @wget@ "$@" 2>&1 >/dev/null | $PKGDETAILS "WGET%" $PROGRESS_NOW $PROGRESS_NEXT $PROGRESS_END >&3
148 ret=$?
149 elif [ "$USE_BOOTFLOPPIES_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then
150- wget "$@" 2>&1 >/dev/null | $PKGDETAILS "WGET%" $PROGRESS_NOW $PROGRESS_NEXT $PROGRESS_END "$PROGRESS_WHAT" >&3
151+ @wget@ "$@" 2>&1 >/dev/null | $PKGDETAILS "WGET%" $PROGRESS_NOW $PROGRESS_NEXT $PROGRESS_END "$PROGRESS_WHAT" >&3
152 ret=$?
153 else
154- wget $QSWITCH "$@"
155+ @wget@ $QSWITCH "$@"
156 ret=$?
157 fi
158 return $ret
159
160diff --git a/usr/share/debootstrap/functions b/usr/share/debootstrap/functions
161index 8d60d8e..e238644 100755
162--- a/usr/share/debootstrap/functions
163+++ b/usr/share/debootstrap/functions
164@@ -921,7 +921,7 @@ if [ -x ]; then
165
166 pkgdetails_field () {
167 # uniq field mirror Packages values...
168- perl -le '
169+ @perl@ -le '
170 $unique = shift @ARGV; $field = lc(shift @ARGV); $mirror = shift @ARGV;
171 $cnt = length(@ARGV);
172 %fields = map { $_, 0 } @ARGV;
173@@ -959,7 +959,7 @@ for $v (keys %fields) {
174 pkgdetails_perl () {
175 if [ "$1" = "WGET%" ]; then
176 shift;
177- perl -e '
178+ @perl@ -e '
179 $v = 0;
180 while (read STDIN, $x, 1) {
181 if ($x =~ m/\d/) {
182@@ -974,7 +974,7 @@ while (read STDIN, $x, 1) {
183 }' "$@"
184 elif [ "$1" = "GETDEPS" ]; then
185 local pkgdest="$2"; shift; shift
186- perl -e '
187+ @perl@ -e '
188 while (<STDIN>) {
189 chomp;
190 $in = 1 if (/^Package: (.*)$/ && grep {$_ eq $1} @ARGV);