Skip to content

Commit 3c4e365

Browse files
committed
Updated debootstrap to v1.0.114
1 parent ad879ae commit 3c4e365

File tree

26 files changed

+892
-862
lines changed

26 files changed

+892
-862
lines changed

include/bootstrap/debian/debootstrap/debootstrap

Lines changed: 220 additions & 98 deletions
Large diffs are not rendered by default.

include/bootstrap/debian/debootstrap/functions

Lines changed: 323 additions & 307 deletions
Large diffs are not rendered by default.

include/bootstrap/debian/debootstrap/scripts/aequorea

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ first_stage_install () {
5454
setup_etc
5555
if [ ! -e "$TARGET/etc/fstab" ]; then
5656
echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
57-
chmod 644 "$TARGET/etc/fstab"
57+
chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
5858
fi
5959

6060
setup_devices
@@ -89,8 +89,8 @@ second_stage_install () {
8989
baseprog="$(($baseprog + ${1:-1}))"
9090
}
9191

92-
if doing_variant fakechroot; then
93-
setup_proc_fakechroot
92+
if doing_variant fakechroot || [ "$CONTAINER" = "docker" ]; then
93+
setup_proc_symlink
9494
else
9595
setup_proc
9696
in_target /sbin/ldconfig
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gutsy
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sid

include/bootstrap/debian/debootstrap/scripts/breezy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ mirror_style release
33
download_style apt
44
finddebs_style from-indices
55
variants - buildd
6+
force_md5
67

78
case $ARCH in
89
alpha|ia64) LIBC="libc6.1" ;;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gutsy

include/bootstrap/debian/debootstrap/scripts/dapper

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ mirror_style release
1010
download_style apt
1111
finddebs_style from-indices
1212
variants - buildd
13+
force_md5
1314

1415
case $ARCH in
1516
alpha|ia64) LIBC="libc6.1" ;;
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
if doing_variant fakechroot; then
2+
test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started"
3+
fi
4+
5+
case $ARCH in
6+
alpha|ia64) LIBC="libc6.1" ;;
7+
kfreebsd-*) LIBC="libc0.1" ;;
8+
hurd-*) LIBC="libc0.3" ;;
9+
*) LIBC="libc6" ;;
10+
esac
11+
12+
work_out_debs () {
13+
required="$(get_debs Priority: required)"
14+
15+
if doing_variant - || doing_variant fakechroot; then
16+
#required="$required $(get_debs Priority: important)"
17+
# ^^ should be getting debconf here somehow maybe
18+
base="$(get_debs Priority: important)"
19+
elif doing_variant buildd; then
20+
base="apt build-essential"
21+
elif doing_variant minbase; then
22+
base="apt"
23+
fi
24+
25+
if doing_variant fakechroot; then
26+
# ldd.fake needs binutils
27+
required="$required binutils"
28+
fi
29+
30+
case $MIRRORS in
31+
https://*)
32+
base="$base apt-transport-https ca-certificates"
33+
;;
34+
esac
35+
}
36+
37+
first_stage_install () {
38+
case "$CODENAME" in
39+
# "merged-usr" blacklist for past releases
40+
etch*|lenny|squeeze|wheezy|jessie*)
41+
[ -z "$MERGED_USR" ] && MERGED_USR="no"
42+
;;
43+
*)
44+
# see https://bugs.debian.org/838388
45+
EXTRACT_DEB_TAR_OPTIONS="$EXTRACT_DEB_TAR_OPTIONS -k"
46+
;;
47+
esac
48+
49+
if [ "$CODENAME" = "stretch" ] && [ -z "$MERGED_USR" ]; then
50+
MERGED_USR="no"
51+
fi
52+
53+
setup_merged_usr
54+
extract $required
55+
56+
mkdir -p "$TARGET/var/lib/dpkg"
57+
: >"$TARGET/var/lib/dpkg/status"
58+
: >"$TARGET/var/lib/dpkg/available"
59+
60+
setup_etc
61+
if [ ! -e "$TARGET/etc/fstab" ]; then
62+
echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
63+
chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
64+
fi
65+
66+
setup_devices
67+
68+
if doing_variant fakechroot || [ "$CONTAINER" = "docker" ]; then
69+
setup_proc_symlink
70+
fi
71+
}
72+
73+
second_stage_install () {
74+
in_target /bin/true
75+
76+
setup_dynamic_devices
77+
78+
x_feign_install () {
79+
local pkg="$1"
80+
local deb="$(debfor $pkg)"
81+
local ver="$(in_target dpkg-deb -f "$deb" Version)"
82+
83+
mkdir -p "$TARGET/var/lib/dpkg/info"
84+
85+
echo \
86+
"Package: $pkg
87+
Version: $ver
88+
Maintainer: unknown
89+
Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
90+
91+
touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
92+
}
93+
94+
x_feign_install dpkg
95+
96+
x_core_install () {
97+
smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
98+
}
99+
100+
p () {
101+
baseprog="$(($baseprog + ${1:-1}))"
102+
}
103+
104+
if ! doing_variant fakechroot; then
105+
setup_proc
106+
in_target /sbin/ldconfig
107+
fi
108+
109+
DEBIAN_FRONTEND=noninteractive
110+
DEBCONF_NONINTERACTIVE_SEEN=true
111+
export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
112+
113+
baseprog=0
114+
bases=7
115+
116+
p; progress $baseprog $bases INSTCORE "Installing core packages" #1
117+
info INSTCORE "Installing core packages..."
118+
119+
p; progress $baseprog $bases INSTCORE "Installing core packages" #2
120+
ln -sf mawk "$TARGET/usr/bin/awk"
121+
x_core_install base-passwd
122+
x_core_install base-files
123+
p; progress $baseprog $bases INSTCORE "Installing core packages" #3
124+
x_core_install dpkg
125+
126+
if [ ! -e "$TARGET/etc/localtime" ]; then
127+
ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
128+
fi
129+
130+
if doing_variant fakechroot; then
131+
install_fakechroot_tools
132+
fi
133+
134+
p; progress $baseprog $bases INSTCORE "Installing core packages" #4
135+
x_core_install $LIBC
136+
137+
p; progress $baseprog $bases INSTCORE "Installing core packages" #5
138+
x_core_install perl-base
139+
140+
p; progress $baseprog $bases INSTCORE "Installing core packages" #6
141+
rm "$TARGET/usr/bin/awk"
142+
x_core_install mawk
143+
144+
p; progress $baseprog $bases INSTCORE "Installing core packages" #7
145+
if doing_variant -; then
146+
x_core_install debconf
147+
fi
148+
149+
baseprog=0
150+
bases=$(set -- $required; echo $#)
151+
152+
info UNPACKREQ "Unpacking required packages..."
153+
154+
exec 7>&1
155+
156+
smallyes '' |
157+
(repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \
158+
dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) |
159+
dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING
160+
161+
info CONFREQ "Configuring required packages..."
162+
163+
echo \
164+
"#!/bin/sh
165+
exit 101" > "$TARGET/usr/sbin/policy-rc.d"
166+
chmod 755 "$TARGET/usr/sbin/policy-rc.d"
167+
168+
mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
169+
echo \
170+
"#!/bin/sh
171+
echo
172+
echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
173+
chmod 755 "$TARGET/sbin/start-stop-daemon"
174+
175+
setup_dselect_method apt
176+
177+
smallyes '' |
178+
(in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \
179+
dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 || echo EXITCODE $?) |
180+
dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING
181+
182+
baseprog=0
183+
bases="$(set -- $base; echo $#)"
184+
185+
info UNPACKBASE "Unpacking the base system..."
186+
187+
setup_available $required $base
188+
done_predeps=
189+
while predep=$(get_next_predep); do
190+
# We have to resolve dependencies of pre-dependencies manually because
191+
# dpkg --predep-package doesn't handle this.
192+
predep=$(without "$(without "$(resolve_deps $predep)" "$required")" "$done_predeps")
193+
# XXX: progress is tricky due to how dpkg_progress works
194+
# -- cjwatson 2009-07-29
195+
p; smallyes '' |
196+
in_target dpkg --force-overwrite --force-confold --skip-same-version --install $(debfor $predep)
197+
base=$(without "$base" "$predep")
198+
done_predeps="$done_predeps $predep"
199+
done
200+
201+
if [ -n "$base" ]; then
202+
smallyes '' |
203+
(repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \
204+
dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) |
205+
dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING
206+
207+
info CONFBASE "Configuring the base system..."
208+
209+
smallyes '' |
210+
(repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be re-attempted up to five times." "" \
211+
dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) |
212+
dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING
213+
fi
214+
215+
mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
216+
rm -f "$TARGET/usr/sbin/policy-rc.d"
217+
218+
progress $bases $bases CONFBASE "Configuring base system"
219+
info BASESUCCESS "Base system installed successfully."
220+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gutsy

0 commit comments

Comments
 (0)