mirror_style release download_style apt force_md5 global LIBC := 'libc6' if test $ARCH = "alpha" || test $ARCH = "ia64" { global LIBC := '"libc6.1'" } proc work_out_debs { global required := '"base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-wrapi18n-perl libtext-charwidth-perl debianutils diff dpkg dselect libblkid1 e2fsprogs e2fslibs libcomerr2 libss2 libuuid1 findutils grep gzip hostname libcap1 libc6 libdb1-compat libdb3 libncurses5 libnewt0.51 libpam-modules libpam-runtime libpam0g libperl5.8 libpopt0 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed slang1a-utf8 initscripts sysvinit sysv-rc tar util-linux whiptail libgcc1 gcc-3.3-base libstdc++5'" global base := '"adduser apt apt-utils libdb4.2 at base-config aptitude libsigc++-1.2-5c102 bsdmainutils console-common console-tools libconsole console-data cpio cron dhcp-client ed exim4 exim4-base exim4-config exim4-daemon-light libgcrypt11 libgnutls11 libgpg-error0 libopencdk8 libtasn1-2 fdutils gettext-base groff-base ifupdown info klogd libssl0.9.7 liblzo1 zlib1g liblockfile1 libpcre3 libwrap0 logrotate mailx man-db libgdbm3 manpages nano net-tools netbase netkit-inetd iputils-ping nvi ppp pppconfig pppoe pppoeconf libpcap0.7 sysklogd tasksel libtextwrap1 tcpd telnet libtext-iconv-perl wget'" proc without_package { echo $2 | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' } proc subst_package { echo $3 | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' } global IPFWTOOL := 'iptables' matchstr $ARCH { "alpha" { global required := $[subst_package "libc6" "libc6.1" $required] global base := ""$base pciutils"" global IPFWTOOL := '"ipchains'" } "arm" { global base := ""$base libgpmg1"" global IPFWTOOL := '"ipchains iptables'" } "i386" { global required := $[without_package "libperl5.8" $required] global base := ""$base pciutils psmisc"" global IPFWTOOL := '"ipchains iptables'" } "ia64" { global required := ""$[subst_package "libc6" "libc6.1" $required] libreadline4"" global base := ""$base elilo efibootmgr dosfstools libparted1.6-12 parted"" } "m68k" { global required := ""$required libreadline4"" global base := ""$base atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross vmelilo"" global IPFWTOOL := '"ipchains'" } "powerpc" { global required := ""$required libreadline4"" global base := ""$base mac-fdisk amiga-fdisk psmisc powerpc-utils pciutils hfsutils"" global IPFWTOOL := '"ipchains iptables'" } "sparc" { global base := ""$base silo eject pciutils sparc-utils"" global IPFWTOOL := '"ipchains iptables'" } "mips" { global base := ""$base dvhtool pciutils"" } "mipsel" { global base := ""$base pciutils"" } "hppa" { global base := ""$base palo pciutils"" global required := $[without_package "libstdc++2.10-glibc2.2" $required] } s390|s390x { # base-config depends on console-tools and console-data # so we can't exclude them although they are useless on s390 global base := ""$base s390-tools telnetd devfsd"" global base := $[without_package "console-tools-libs" $base] global base := $[without_package "fdutils" $base] global base := $[without_package "ppp" $base] global base := $[without_package "pppconfig" $base] global base := $[without_package "pppoe" $base] global base := $[without_package "pppoeconf" $base] } sh* { global base := ""$base libstdc++3 gcc-3.0-base"" global base := $[without_package "fdutils" $base] global required := ""$required libgcc1"" global required := $[without_package "libstdc++2.10-glibc2.2" $required] } "amd64" { global base := ""$base pciutils psmisc"" global IPFWTOOL := '"iptables'" } * { # who knows? } } global base := ""$base $IPFWTOOL"" } proc first_stage_install { extract $required mkdir -p "$TARGET/var/lib/dpkg" : >"$TARGET/var/lib/dpkg/status" echo >"$TARGET/var/lib/dpkg/available" setup_etc if test ! -e "$TARGET/etc/fstab" { echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" } setup_devices proc x_feign_install { var pkg = $1 var deb = $[debfor $pkg] var ver = $[extract_deb_field "$TARGET/$deb" Version] mkdir -p "$TARGET/var/lib/dpkg/info" echo \ "Package: $pkg Version: $ver Status: install ok installed" >> "$TARGET/var/lib/dpkg/status" touch "$TARGET/var/lib/dpkg/info/$(pkg).list" } x_feign_install dpkg } proc second_stage_install { proc x_core_install { smallyes '' | in_target dpkg --force-depends --install $[debfor @Argv] } proc p { global baseprog := "$($baseprog + ${1:-1})" } setup_proc in_target /sbin/ldconfig global DEBIAN_FRONTEND := 'noninteractive' global DEBCONF_NONINTERACTIVE_SEEN := 'true' export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN global baseprog := '0' global bases := '40' p; progress $baseprog $bases INSTBASE "Installing base system" #1 info INSTCORE "Installing core packages..." p; progress $baseprog $bases INSTBASE "Installing base system" #2 ln -sf mawk "$TARGET/usr/bin/awk" x_core_install base-files base-passwd p; progress $baseprog $bases INSTBASE "Installing base system" #3 x_core_install dpkg if test ! -e "$TARGET/etc/localtime" { ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" } p; progress $baseprog $bases INSTBASE "Installing base system" #4 x_core_install $LIBC p; progress $baseprog $bases INSTBASE "Installing base system" #5 x_core_install perl-base p; progress $baseprog $bases INSTBASE "Installing base system" #6 rm "$TARGET/usr/bin/awk" x_core_install mawk p; progress $baseprog $bases INSTBASE "Installing base system" #7 x_core_install debconf info UNPACKREQ "Unpacking required packages..." p; progress $baseprog $bases INSTBASE "Installing base system" #8 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] p 10; progress $baseprog $bases INSTBASE "Installing base system" #18 info CONFREQ "Configuring required packages..." mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL" echo \ "#!/bin/sh echo echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon" chmod 755 "$TARGET/sbin/start-stop-daemon" setup_dselect_method apt p; progress $baseprog $bases INSTBASE "Installing base system" #19 smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends p 10; progress $baseprog $bases INSTBASE "Installing base system" #29 # if [ ! -e "$TARGET/etc/exim/exim.conf" ]; then # mkdir -p "$TARGET/etc/exim" # touch "$TARGET/etc/exim/exim.conf" # fi info INSTBASE "Installing base packages..." p; progress $baseprog $bases INSTBASE "Installing base system" #30 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] rm -f "$TARGET/usr/sbin/sendmail" ln -sf /bin/true "$TARGET/usr/sbin/sendmail" 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 rm -f "$TARGET/usr/sbin/sendmail" ln -sf exim4 "$TARGET/usr/sbin/sendmail" p 9; progress $baseprog $bases INSTBASE "Installing base system" #39 mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" progress $bases $bases INSTBASE "Installing base system" #40 info BASESUCCESS "Base system installed successfully." } (CommandList children: [ (C {(mirror_style)} {(release)}) (C {(download_style)} {(apt)}) (C {(force_md5)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:LIBC) op:Equal rhs:{(libc6)} spids:[11])] spids: [11] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$ARCH"))} {(Lit_Other "=")} {(DQ (alpha))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$ARCH"))} {(Lit_Other "=")} {(DQ (ia64))} {(Lit_Other "]")} ) ] op_id: Op_DPipe ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:LIBC) op:Equal rhs:{(DQ (libc6.1))} spids:[50])] spids: [50] ) ] spids: [-1 47] ) ] spids: [-1 55] ) (FuncDef name: work_out_debs body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: { (DQ ( "base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-wrapi18n-perl libtext-charwidth-perl debianutils diff dpkg dselect libblkid1 e2fsprogs e2fslibs libcomerr2 libss2 libuuid1 findutils grep gzip hostname libcap1 libc6 libdb1-compat libdb3 libncurses5 libnewt0.51 libpam-modules libpam-runtime libpam0g libperl5.8 libpopt0 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed slang1a-utf8 initscripts sysvinit sysv-rc tar util-linux whiptail libgcc1 gcc-3.3-base libstdc++5" ) ) } spids: [67] ) ] spids: [67] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ ( "adduser apt apt-utils libdb4.2 at base-config aptitude libsigc++-1.2-5c102 bsdmainutils console-common console-tools libconsole console-data cpio cron dhcp-client ed exim4 exim4-base exim4-config exim4-daemon-light libgcrypt11 libgnutls11 libgpg-error0 libopencdk8 libtasn1-2 fdutils gettext-base groff-base ifupdown info klogd libssl0.9.7 liblzo1 zlib1g liblockfile1 libpcre3 libwrap0 logrotate mailx man-db libgdbm3 manpages nano net-tools netbase netkit-inetd iputils-ping nvi ppp pppconfig pppoe pppoeconf libpcap0.7 sysklogd tasksel libtextwrap1 tcpd telnet libtext-iconv-perl wget" ) ) } spids: [74] ) ] spids: [74] ) (FuncDef name: without_package body: (BraceGroup children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Number "$2"))}) (C {(tr)} {(SQ <" ">)} {(SQ <"\\n">)}) (C {(grep)} {(-v)} {(DQ ("^") ($ VSub_Number "$1") (Lit_Other "$"))}) (C {(tr)} {(SQ <"\\n">)} {(SQ <" ">)}) ] negated: False ) ] spids: [86] ) spids: [81 85] ) (FuncDef name: subst_package body: (BraceGroup children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Number "$3"))}) (C {(tr)} {(SQ <" ">)} {(SQ <"\\n">)}) (C {(sed)} { (DQ ("s/^") ($ VSub_Number "$1") (Lit_Other "$") (/) ($ VSub_Number "$2") (/)) } ) (C {(tr)} {(SQ <"\\n">)} {(SQ <" ">)}) ] negated: False ) ] spids: [140] ) spids: [135 139] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:IPFWTOOL) op:Equal rhs:{(iptables)} spids:[191])] spids: [191] ) (Case to_match: {($ VSub_Name "$ARCH")} arms: [ (case_arm pat_list: [{(DQ (alpha))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(subst_package)} {(DQ (libc6))} {(DQ (libc6.1))} {(DQ ($ VSub_Name "$required"))} ) ] ) left_token: spids: [211 225] ) ) } spids: [209] ) ] spids: [209] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" pciutils"))} spids: [229] ) ] spids: [229] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IPFWTOOL) op: Equal rhs: {(DQ (ipchains))} spids: [236] ) ] spids: [236] ) ] spids: [204 206 242 -1] ) (case_arm pat_list: [{(DQ (arm))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" libgpmg1"))} spids: [251] ) ] spids: [251] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IPFWTOOL) op: Equal rhs: {(DQ ("ipchains iptables"))} spids: [258] ) ] spids: [258] ) ] spids: [246 248 264 -1] ) (case_arm pat_list: [{(DQ (i386))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ (libperl5.8))} {(DQ ($ VSub_Name "$required"))} ) ] ) left_token: spids: [275 285] ) ) } spids: [273] ) ] spids: [273] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" pciutils psmisc"))} spids: [289] ) ] spids: [289] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IPFWTOOL) op: Equal rhs: {(DQ ("ipchains iptables"))} spids: [296] ) ] spids: [296] ) ] spids: [268 270 302 -1] ) (case_arm pat_list: [{(DQ (ia64))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(subst_package)} {(DQ (libc6))} {(DQ (libc6.1))} {(DQ ($ VSub_Name "$required"))} ) ] ) left_token: spids: [313 327] ) (" libreadline4") ) } spids: [311] ) ] spids: [311] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ ($ VSub_Name "$base") (" elilo efibootmgr dosfstools libparted1.6-12 parted") ) } spids: [332] ) ] spids: [332] ) ] spids: [306 308 339 -1] ) (case_arm pat_list: [{(DQ (m68k))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: {(DQ ($ VSub_Name "$required") (" libreadline4"))} spids: [348] ) ] spids: [348] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ ($ VSub_Name "$base") ( " atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross vmelilo" ) ) } spids: [355] ) ] spids: [355] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IPFWTOOL) op: Equal rhs: {(DQ (ipchains))} spids: [362] ) ] spids: [362] ) ] spids: [343 345 368 -1] ) (case_arm pat_list: [{(DQ (powerpc))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: {(DQ ($ VSub_Name "$required") (" libreadline4"))} spids: [377] ) ] spids: [377] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ ($ VSub_Name "$base") (" mac-fdisk amiga-fdisk psmisc powerpc-utils pciutils hfsutils") ) } spids: [384] ) ] spids: [384] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IPFWTOOL) op: Equal rhs: {(DQ ("ipchains iptables"))} spids: [391] ) ] spids: [391] ) ] spids: [372 374 397 -1] ) (case_arm pat_list: [{(DQ (sparc))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" silo eject pciutils sparc-utils"))} spids: [406] ) ] spids: [406] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IPFWTOOL) op: Equal rhs: {(DQ ("ipchains iptables"))} spids: [413] ) ] spids: [413] ) ] spids: [401 403 419 -1] ) (case_arm pat_list: [{(DQ (mips))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" dvhtool pciutils"))} spids: [428] ) ] spids: [428] ) ] spids: [423 425 435 -1] ) (case_arm pat_list: [{(DQ (mipsel))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" pciutils"))} spids: [444] ) ] spids: [444] ) ] spids: [439 441 451 -1] ) (case_arm pat_list: [{(DQ (hppa))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" palo pciutils"))} spids: [460] ) ] spids: [460] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ ("libstdc++2.10-glibc2.2"))} {(DQ ($ VSub_Name "$required"))} ) ] ) left_token: spids: [469 479] ) ) } spids: [467] ) ] spids: [467] ) ] spids: [455 457 483 -1] ) (case_arm pat_list: [{(s390)} {(s390x)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" s390-tools telnetd devfsd"))} spids: [500] ) ] spids: [500] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ (console-tools-libs))} {(DQ ($ VSub_Name "$base"))} ) ] ) left_token: spids: [509 519] ) ) } spids: [507] ) ] spids: [507] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ (fdutils))} {(DQ ($ VSub_Name "$base"))} ) ] ) left_token: spids: [525 535] ) ) } spids: [523] ) ] spids: [523] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ (ppp))} {(DQ ($ VSub_Name "$base"))}) ] ) left_token: spids: [541 551] ) ) } spids: [539] ) ] spids: [539] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ (pppconfig))} {(DQ ($ VSub_Name "$base"))} ) ] ) left_token: spids: [557 567] ) ) } spids: [555] ) ] spids: [555] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ (pppoe))} {(DQ ($ VSub_Name "$base"))} ) ] ) left_token: spids: [573 583] ) ) } spids: [571] ) ] spids: [571] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ (pppoeconf))} {(DQ ($ VSub_Name "$base"))} ) ] ) left_token: spids: [589 599] ) ) } spids: [587] ) ] spids: [587] ) ] spids: [486 489 603 -1] ) (case_arm pat_list: [{(sh) (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" libstdc++3 gcc-3.0-base"))} spids: [611] ) ] spids: [611] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ (fdutils))} {(DQ ($ VSub_Name "$base"))} ) ] ) left_token: spids: [620 630] ) ) } spids: [618] ) ] spids: [618] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: {(DQ ($ VSub_Name "$required") (" libgcc1"))} spids: [634] ) ] spids: [634] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:required) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(without_package)} {(DQ ("libstdc++2.10-glibc2.2"))} {(DQ ($ VSub_Name "$required"))} ) ] ) left_token: spids: [643 653] ) ) } spids: [641] ) ] spids: [641] ) ] spids: [606 608 657 -1] ) (case_arm pat_list: [{(DQ (amd64))}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" pciutils psmisc"))} spids: [666] ) ] spids: [666] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IPFWTOOL) op: Equal rhs: {(DQ (iptables))} spids: [673] ) ] spids: [673] ) ] spids: [661 663 679 -1] ) (case_arm pat_list:[{(Lit_Other "*")}] spids:[682683690-1]) ] spids: [196 200 693] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:base) op: Equal rhs: {(DQ ($ VSub_Name "$base") (" ") ($ VSub_Name "$IPFWTOOL"))} spids: [697] ) ] spids: [697] ) ] spids: [63] ) spids: [58 62] ) (FuncDef name: first_stage_install body: (BraceGroup children: [ (C {(extract)} {($ VSub_Name "$required")}) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$TARGET") (/var/lib/dpkg))}) (SimpleCommand words: [{(Lit_Other ":")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$TARGET") (/var/lib/dpkg/status))} spids: [733] ) ] ) (SimpleCommand words: [{(echo)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$TARGET") (/var/lib/dpkg/available))} spids: [742] ) ] ) (C {(setup_etc)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-e)} {(DQ ($ VSub_Name "$TARGET") (/etc/fstab))} {(Lit_Other "]")} ) terminator: ) ] action: [ (SimpleCommand words: [{(echo)} {(SQ <"# UNCONFIGURED FSTAB FOR BASE SYSTEM">)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$TARGET") (/etc/fstab))} spids: [778] ) ] ) (Sentence child: (C {(chown)} {(0) (Lit_Other ":") (0)} {(DQ ($ VSub_Name "$TARGET") (/etc/fstab))} ) terminator: ) (C {(chmod)} {(644)} {(DQ ($ VSub_Name "$TARGET") (/etc/fstab))}) ] spids: [-1 769] ) ] spids: [-1 808] ) (C {(setup_devices)}) (FuncDef name: x_feign_install body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:pkg) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [826] ) ] spids: [824] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:deb) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(debfor)} {($ VSub_Name "$pkg")})] ) left_token: spids: [836 840] ) ) } spids: [834] ) ] spids: [832] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ver) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(extract_deb_field)} {(DQ ($ VSub_Name "$TARGET") (/) ($ VSub_Name "$deb"))} {(Version)} ) ] ) left_token: spids: [848 858] ) ) } spids: [846] ) ] spids: [844] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$TARGET") (/var/lib/dpkg/info))}) (SimpleCommand words: [ {(echo)} { (DQ ("Package: ") ($ VSub_Name "$pkg") ("\n") ("Version: ") ($ VSub_Name "$ver") ("\n") ("Status: install ok installed") ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(DQ ($ VSub_Name "$TARGET") (/var/lib/dpkg/status))} spids: [887] ) ] ) (C {(touch)} {(DQ ($ VSub_Name "$TARGET") (/var/lib/dpkg/info/) (${ VSub_Name pkg) (.list))} ) ] spids: [821] ) spids: [816 820] ) (C {(x_feign_install)} {(dpkg)}) ] spids: [712] ) spids: [707 711] ) (FuncDef name: second_stage_install body: (BraceGroup children: [ (FuncDef name: x_core_install body: (BraceGroup children: [ (Pipeline children: [ (C {(smallyes)} {(SQ )}) (C {(in_target)} {(dpkg)} {(--force-depends)} {(--install)} { (CommandSubPart command_list: (CommandList children: [(C {(debfor)} {(DQ ($ VSub_At "$@"))})] ) left_token: spids: [950 956] ) } ) ] negated: False ) ] spids: [932] ) spids: [927 931] ) (FuncDef name: p body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:baseprog) op: Equal rhs: { (DQ (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{($ VSub_Name "$baseprog")}) right: (ArithWord w: { (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(1)} ) spids: [978 982] ) } ) ) spids: [973 984] ) ) } spids: [971] ) ] spids: [971] ) ] spids: [968] ) spids: [963 967] ) (C {(setup_proc)}) (C {(in_target)} {(/sbin/ldconfig)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DEBIAN_FRONTEND) op: Equal rhs: {(noninteractive)} spids: [1001] ) ] spids: [1001] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DEBCONF_NONINTERACTIVE_SEEN) op: Equal rhs: {(true)} spids: [1005] ) ] spids: [1005] ) (C {(export)} {(DEBIAN_FRONTEND)} {(DEBCONF_NONINTERACTIVE_SEEN)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:baseprog) op:Equal rhs:{(0)} spids:[1017])] spids: [1017] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:bases) op:Equal rhs:{(40)} spids:[1021])] spids: [1021] ) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(info)} {(INSTCORE)} {(DQ ("Installing core packages..."))}) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(ln)} {(-sf)} {(mawk)} {(DQ ($ VSub_Name "$TARGET") (/usr/bin/awk))}) (C {(x_core_install)} {(base-files)} {(base-passwd)}) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(x_core_install)} {(dpkg)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-e)} {(DQ ($ VSub_Name "$TARGET") (/etc/localtime))} {(Lit_Other "]")} ) terminator: ) ] action: [ (C {(ln)} {(-sf)} {(/usr/share/zoneinfo/UTC)} {(DQ ($ VSub_Name "$TARGET") (/etc/localtime))} ) ] spids: [-1 1134] ) ] spids: [-1 1149] ) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(x_core_install)} {($ VSub_Name "$LIBC")}) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(x_core_install)} {(perl-base)}) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(rm)} {(DQ ($ VSub_Name "$TARGET") (/usr/bin/awk))}) (C {(x_core_install)} {(mawk)}) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(x_core_install)} {(debconf)}) (C {(info)} {(UNPACKREQ)} {(DQ ("Unpacking required packages..."))}) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (Pipeline children: [ (C {(smallyes)} {(SQ )}) (C {(repeatn)} {(5)} {(in_target_failmsg)} {(UNPACK_REQ_FAIL_FIVE)} { (DQ ( "Failure while unpacking required packages. This will be attempted up to five times." ) ) } {(DQ )} {(dpkg)} {(--force-depends)} {(--unpack)} { (CommandSubPart command_list: (CommandList children: [(C {(debfor)} {($ VSub_Name "$required")})] ) left_token: spids: [1316 1320] ) } ) ] negated: False ) (Sentence child:(C {(p)} {(10)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(info)} {(CONFREQ)} {(DQ ("Configuring required packages..."))}) (C {(mv)} {(DQ ($ VSub_Name "$TARGET") (/sbin/start-stop-daemon))} {(DQ ($ VSub_Name "$TARGET") (/sbin/start-stop-daemon.REAL))} ) (SimpleCommand words: [ {(echo)} { (DQ ("#!/bin/sh\n") ("echo\n") ("echo ") (EscapedLiteralPart token:) ("Warning: Fake start-stop-daemon called, doing nothing") (EscapedLiteralPart token:) ) } ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$TARGET") (/sbin/start-stop-daemon))} spids: [1380] ) ] ) (C {(chmod)} {(755)} {(DQ ($ VSub_Name "$TARGET") (/sbin/start-stop-daemon))}) (C {(setup_dselect_method)} {(apt)}) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (Pipeline children: [ (C {(smallyes)} {(SQ )}) (C {(in_target_failmsg)} {(CONF_REQ_FAIL)} {(DQ ("Failure while configuring required packages."))} {(DQ )} {(dpkg)} {(--configure)} {(--pending)} {(--force-configure-any)} {(--force-depends)} ) ] negated: False ) (Sentence child:(C {(p)} {(10)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(info)} {(INSTBASE)} {(DQ ("Installing base packages..."))}) (Sentence child:(C {(p)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (Pipeline children: [ (C {(smallyes)} {(SQ )}) (C {(repeatn)} {(5)} {(in_target_failmsg)} {(INST_BASE_FAIL_FIVE)} { (DQ ( "Failure while installing base packages. This will be re-attempted up to five times." ) ) } {(DQ )} {(dpkg)} {(--force-auto-select)} {(--force-overwrite)} {(--force-confold)} {(--skip-same-version)} {(--unpack)} { (CommandSubPart command_list: (CommandList children:[(C {(debfor)} {($ VSub_Name "$base")})]) left_token: spids: [1551 1555] ) } ) ] negated: False ) (C {(rm)} {(-f)} {(DQ ($ VSub_Name "$TARGET") (/usr/sbin/sendmail))}) (C {(ln)} {(-sf)} {(/bin/true)} {(DQ ($ VSub_Name "$TARGET") (/usr/sbin/sendmail))}) (Pipeline children: [ (C {(smallyes)} {(SQ )}) (C {(repeatn)} {(5)} {(in_target_failmsg)} {(CONF_BASE_FAIL_FIVE)} { (DQ ("Failure while configuring base packages. This will be attempted 5 times.")) } {(DQ )} {(dpkg)} {(--force-confold)} {(--skip-same-version)} {(--configure)} {(-a)} ) ] negated: False ) (C {(rm)} {(-f)} {(DQ ($ VSub_Name "$TARGET") (/usr/sbin/sendmail))}) (C {(ln)} {(-sf)} {(exim4)} {(DQ ($ VSub_Name "$TARGET") (/usr/sbin/sendmail))}) (Sentence child:(C {(p)} {(9)}) terminator:) (C {(progress)} {($ VSub_Name "$baseprog")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(mv)} {(DQ ($ VSub_Name "$TARGET") (/sbin/start-stop-daemon.REAL))} {(DQ ($ VSub_Name "$TARGET") (/sbin/start-stop-daemon))} ) (C {(progress)} {($ VSub_Name "$bases")} {($ VSub_Name "$bases")} {(INSTBASE)} {(DQ ("Installing base system"))} ) (C {(info)} {(BASESUCCESS)} {(DQ ("Base system installed successfully."))}) ] spids: [924] ) spids: [919 923] ) ] )