5
if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then
11
required="base-files base-passwd bash bsdutils debconf debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname libcap1 libc6 libdb2 libdb3 libncurses5 libnewt0 libpam-modules libpam-runtime libpam0g libperl5.6 libpopt0 libreadline4 libstdc++2.10-glibc2.2 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed shellutils slang1 sysvinit tar textutils util-linux whiptail"
13
base="adduser apt apt-utils at base-config bsdmainutils console-common console-tools console-tools-libs console-data cpio cron dhcp-client ed exim fdutils gettext-base groff-base ifupdown info klogd libident libldap2 liblockfile1 libpcre3 libsasl7 libwrap0 logrotate mailx man-db manpages modconf nano net-tools netbase netkit-inetd netkit-ping nvi ppp pppconfig pppoe pppoeconf libpcap0 sysklogd tasksel tcpd telnet"
16
echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
23
required="$(without_package "libc6" "$required") libc6.1"
24
base="$base setserial aboot pciutils"
28
base="$base setserial libgpmg1"
29
IPFWTOOL="ipchains iptables"
32
required="$(without_package "libperl5.6" "$required") mbr"
33
base="$base lilo pciutils setserial syslinux psmisc pcmcia-cs"
34
IPFWTOOL="ipchains iptables"
37
required="$(without_package "libc6" "$required") libc6.1 gcc-2.96-base"
38
base="$base elilo efibootmgr dosfstools libparted1.4 parted"
41
base="$base atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross setserial vmelilo"
45
base="$base quik mac-fdisk amiga-fdisk psmisc powerpc-utils setserial pciutils hfsutils yaboot pcmcia-cs"
46
IPFWTOOL="ipchains iptables"
49
base="$base silo eject pciutils sparc-utils"
50
IPFWTOOL="ipchains iptables"
53
base="$base dvhtool pciutils setserial" # pcmcia-cs
56
base="$base delo pciutils setserial" # pcmcia-cs
59
base="$base palo libstdc++3 gcc-3.0-base"
60
required="$(without_package "libstdc++2.10-glibc2.2" "$required")"
63
# base-config depends on console-data and console-common
64
# so we can't exclude them although they are useless on s390
65
base="$base s390-tools telnetd devfsd"
66
base="$(without_package "console-tools" "$base")"
67
base="$(without_package "console-tools-libs" "$base")"
68
base="$(without_package "fdutils" "$base")"
69
base="$(without_package "ppp" "$base")"
70
base="$(without_package "pppconfig" "$base")"
71
base="$(without_package "pppoe" "$base")"
72
base="$(without_package "pppoeconf" "$base")"
79
base="$base $IPFWTOOL"
82
first_stage_install () {
85
mkdir -p "$TARGET/var/lib/dpkg"
86
: >"$TARGET/var/lib/dpkg/status"
87
echo >"$TARGET/var/lib/dpkg/available"
90
if [ ! -e "$TARGET/etc/fstab" ]; then
91
echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
92
chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
99
local deb="$(debfor $pkg)"
101
ar -p "$TARGET/$deb" control.tar.gz | zcat |
102
tar -O -xf - control ./control 2>/dev/null |
103
grep -i ^Version: | sed -e 's/[^:]*: *//' | head -n 1
106
mkdir -p "$TARGET/var/lib/dpkg/info"
111
Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
113
touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
119
second_stage_install () {
121
smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
125
baseprog="$(($baseprog + ${1:-1}))"
129
in_target /sbin/ldconfig
131
DEBIAN_FRONTEND=Noninteractive
132
export DEBIAN_FRONTEND
137
p; progress $baseprog $bases INSTBASE "Installing base system" #1
138
info INSTCORE "Installing core packages..."
140
p; progress $baseprog $bases INSTBASE "Installing base system" #2
141
ln -sf mawk "$TARGET/usr/bin/awk"
142
x_core_install base-files base-passwd
143
p; progress $baseprog $bases INSTBASE "Installing base system" #3
146
if [ ! -e "$TARGET/etc/localtime" ]; then
147
ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
150
p; progress $baseprog $bases INSTBASE "Installing base system" #4
153
p; progress $baseprog $bases INSTBASE "Installing base system" #5
154
x_core_install perl-base
155
p; progress $baseprog $bases INSTBASE "Installing base system" #6
156
rm "$TARGET/usr/bin/awk"
158
p; progress $baseprog $bases INSTBASE "Installing base system" #7
159
x_core_install debconf
161
info UNPACKREQ "Unpacking required packages..."
163
p; progress $baseprog $bases INSTBASE "Installing base system" #8
164
smallyes '' | repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --force-depends --unpack $(debfor $required)
165
p 10; progress $baseprog $bases INSTBASE "Installing base system" #18
167
info CONFREQ "Configuring required packages..."
169
mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
173
echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
174
chmod 755 "$TARGET/sbin/start-stop-daemon"
176
setup_dselect_method apt
178
p; progress $baseprog $bases INSTBASE "Installing base system" #19
179
smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends
180
p 10; progress $baseprog $bases INSTBASE "Installing base system" #29
182
if [ ! -e "$TARGET/etc/exim/exim.conf" ]; then
183
mkdir -p "$TARGET/etc/exim"
184
touch "$TARGET/etc/exim/exim.conf"
187
info INSTBASE "Installing base packages..."
189
p; progress $baseprog $bases INSTBASE "Installing base system" #30
190
smallyes '' | repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base)
192
rm -f "$TARGET/usr/sbin/sendmail"
193
ln -sf /bin/true "$TARGET/usr/sbin/sendmail"
195
smallyes '' | repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --force-confold --skip-same-version --configure -a
197
rm -f "$TARGET/usr/sbin/sendmail"
198
ln -sf exim "$TARGET/usr/sbin/sendmail"
200
p 9; progress $baseprog $bases INSTBASE "Installing base system" #39
202
mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
204
progress $bases $bases INSTBASE "Installing base system" #40
205
info BASESUCCESS "Base system installed successfully."