From 38b2b4e0dc52ab309c7c405a9ed032fb8126cb87 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 19 Jun 2007 15:14:52 +0000 Subject: * Reorganise scripts into scripts/debian/ and scripts/ubuntu/ directories in the source tree to declutter the top level. r47552 --- Makefile | 21 +--- breezy | 162 ----------------------------- dapper | 162 ----------------------------- debian/changelog | 2 + edgy | 162 ----------------------------- edgy.fakechroot | 170 ------------------------------ feisty | 162 ----------------------------- feisty.fakechroot | 173 ------------------------------- gutsy | 163 ----------------------------- gutsy.fakechroot | 174 ------------------------------- hoary | 178 ------------------------------- hoary.buildd | 161 ---------------------------- potato | 105 ------------------- sarge | 219 --------------------------------------- sarge.buildd | 168 ------------------------------ sarge.fakechroot | 174 ------------------------------- scripts/debian/potato | 105 +++++++++++++++++++ scripts/debian/sarge | 219 +++++++++++++++++++++++++++++++++++++++ scripts/debian/sarge.buildd | 168 ++++++++++++++++++++++++++++++ scripts/debian/sarge.fakechroot | 174 +++++++++++++++++++++++++++++++ scripts/debian/sid | 180 ++++++++++++++++++++++++++++++++ scripts/debian/woody | 204 ++++++++++++++++++++++++++++++++++++ scripts/debian/woody.buildd | 168 ++++++++++++++++++++++++++++++ scripts/ubuntu/breezy | 162 +++++++++++++++++++++++++++++ scripts/ubuntu/dapper | 162 +++++++++++++++++++++++++++++ scripts/ubuntu/edgy | 162 +++++++++++++++++++++++++++++ scripts/ubuntu/edgy.fakechroot | 170 ++++++++++++++++++++++++++++++ scripts/ubuntu/feisty | 162 +++++++++++++++++++++++++++++ scripts/ubuntu/feisty.fakechroot | 173 +++++++++++++++++++++++++++++++ scripts/ubuntu/gutsy | 163 +++++++++++++++++++++++++++++ scripts/ubuntu/gutsy.fakechroot | 174 +++++++++++++++++++++++++++++++ scripts/ubuntu/hoary | 178 +++++++++++++++++++++++++++++++ scripts/ubuntu/hoary.buildd | 161 ++++++++++++++++++++++++++++ scripts/ubuntu/warty | 169 ++++++++++++++++++++++++++++++ scripts/ubuntu/warty.buildd | 161 ++++++++++++++++++++++++++++ sid | 180 -------------------------------- warty | 169 ------------------------------ warty.buildd | 161 ---------------------------- woody | 204 ------------------------------------ woody.buildd | 168 ------------------------------ 40 files changed, 3219 insertions(+), 3234 deletions(-) delete mode 100644 breezy delete mode 100644 dapper delete mode 100644 edgy delete mode 100644 edgy.fakechroot delete mode 100644 feisty delete mode 100644 feisty.fakechroot delete mode 100644 gutsy delete mode 100644 gutsy.fakechroot delete mode 100644 hoary delete mode 100644 hoary.buildd delete mode 100644 potato delete mode 100644 sarge delete mode 100644 sarge.buildd delete mode 100644 sarge.fakechroot create mode 100644 scripts/debian/potato create mode 100644 scripts/debian/sarge create mode 100644 scripts/debian/sarge.buildd create mode 100644 scripts/debian/sarge.fakechroot create mode 100644 scripts/debian/sid create mode 100644 scripts/debian/woody create mode 100644 scripts/debian/woody.buildd create mode 100644 scripts/ubuntu/breezy create mode 100644 scripts/ubuntu/dapper create mode 100644 scripts/ubuntu/edgy create mode 100644 scripts/ubuntu/edgy.fakechroot create mode 100644 scripts/ubuntu/feisty create mode 100644 scripts/ubuntu/feisty.fakechroot create mode 100644 scripts/ubuntu/gutsy create mode 100644 scripts/ubuntu/gutsy.fakechroot create mode 100644 scripts/ubuntu/hoary create mode 100644 scripts/ubuntu/hoary.buildd create mode 100644 scripts/ubuntu/warty create mode 100644 scripts/ubuntu/warty.buildd delete mode 100644 sid delete mode 100644 warty delete mode 100644 warty.buildd delete mode 100644 woody delete mode 100644 woody.buildd diff --git a/Makefile b/Makefile index b925697..e907ffe 100644 --- a/Makefile +++ b/Makefile @@ -26,25 +26,8 @@ install: mkdir -p $(DSDIR)/scripts mkdir -p $(DESTDIR)/usr/sbin mkdir -p $(DESTDIR)/usr/share/man/man8 - install -o root -g root -m 0644 potato $(DSDIR)/scripts/ - install -o root -g root -m 0644 woody $(DSDIR)/scripts/ - install -o root -g root -m 0644 woody.buildd $(DSDIR)/scripts/ - install -o root -g root -m 0644 sarge $(DSDIR)/scripts/ - install -o root -g root -m 0644 sarge.buildd $(DSDIR)/scripts/ - install -o root -g root -m 0644 sarge.fakechroot $(DSDIR)/scripts/ - install -o root -g root -m 0644 sid $(DSDIR)/scripts/ - install -o root -g root -m 0644 warty $(DSDIR)/scripts/ - install -o root -g root -m 0644 warty.buildd $(DSDIR)/scripts/ - install -o root -g root -m 0644 hoary $(DSDIR)/scripts/ - install -o root -g root -m 0644 hoary.buildd $(DSDIR)/scripts/ - install -o root -g root -m 0644 breezy $(DSDIR)/scripts/ - install -o root -g root -m 0644 dapper $(DSDIR)/scripts/ - install -o root -g root -m 0644 edgy $(DSDIR)/scripts/ - install -o root -g root -m 0644 edgy.fakechroot $(DSDIR)/scripts/ - install -o root -g root -m 0644 feisty $(DSDIR)/scripts/ - install -o root -g root -m 0644 feisty.fakechroot $(DSDIR)/scripts/ - install -o root -g root -m 0644 gutsy $(DSDIR)/scripts/ - install -o root -g root -m 0644 gutsy.fakechroot $(DSDIR)/scripts/ + install -o root -g root -m 0644 scripts/debian/* $(DSDIR)/scripts/ + install -o root -g root -m 0644 scripts/ubuntu/* $(DSDIR)/scripts/ install -o root -g root -m 0644 functions $(DSDIR)/ # no special script for etch anymore diff --git a/breezy b/breezy deleted file mode 100644 index d0955da..0000000 --- a/breezy +++ /dev/null @@ -1,162 +0,0 @@ -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant -; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - # TODO: add Build-Essential: yes extraoverrides - #base="$(get_debs Build-Essential: yes)" - - add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } - - base="apt binutils cpio cpp cpp-4.0 dpkg-dev g++ g++-4.0 gcc gcc-4.0 gcc-4.0-base ${LIBC6}-dev libdb4.2 libgdbm3 libstdc++6 libstdc++6-4.0-dev linux-kernel-headers make patch perl perl-modules" - - add ia64 base "libunwind7-dev" - add sparc base "lib64gcc1" - add sparc base "libc6-dev-sparc64" - add sparc base "libc6-sparc64" - fi -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/dapper b/dapper deleted file mode 100644 index 75ea7f6..0000000 --- a/dapper +++ /dev/null @@ -1,162 +0,0 @@ -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant -; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - # TODO: add Build-Essential: yes extraoverrides - #base="$(get_debs Build-Essential: yes)" - - add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } - - base="apt binutils cpio cpp cpp-4.0 dpkg-dev g++ g++-4.0 gcc gcc-4.0 ${LIBC6}-dev libgdbm3 libstdc++6 libstdc++6-4.0-dev linux-kernel-headers make patch perl perl-modules" - - add ia64 base "libunwind7-dev" - add sparc base "lib64gcc1" - add sparc base "libc6-dev-sparc64" - add sparc base "libc6-sparc64" - fi -} - -first_stage_install () { - extract $required - - mkdir -p "$TARGET/var/lib/dpkg" - : >"$TARGET/var/lib/dpkg/status" - : >"$TARGET/var/lib/dpkg/available" - - setup_etc - if [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/debian/changelog b/debian/changelog index 17f12ef..fce1a2f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ debootstrap (0.4.0) UNRELEASED; urgency=low around the problem (thanks, Steven McCoy; https://launchpad.net/bugs/65003). * Fix formatting error in debootstrap(8) (.R is not a macro). + * Reorganise scripts into scripts/debian/ and scripts/ubuntu/ directories + in the source tree to declutter the top level. -- Joey Hess Sat, 16 Jun 2007 13:09:59 -0400 diff --git a/edgy b/edgy deleted file mode 100644 index eb5efa1..0000000 --- a/edgy +++ /dev/null @@ -1,162 +0,0 @@ -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant -; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - # TODO: add Build-Essential: yes extraoverrides - #base="$(get_debs Build-Essential: yes)" - - add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } - - base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" - - add ia64 base "libunwind7-dev" - add sparc base "lib64gcc1" - add sparc base "libc6-dev-sparc64" - add sparc base "libc6-sparc64" - fi -} - -first_stage_install () { - extract $required - - mkdir -p "$TARGET/var/lib/dpkg" - : >"$TARGET/var/lib/dpkg/status" - : >"$TARGET/var/lib/dpkg/available" - - setup_etc - if [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/edgy.fakechroot b/edgy.fakechroot deleted file mode 100644 index 0dea4af..0000000 --- a/edgy.fakechroot +++ /dev/null @@ -1,170 +0,0 @@ -test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" - -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd fakechroot - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant -; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - # TODO: add Build-Essential: yes extraoverrides - #base="$(get_debs Build-Essential: yes)" - - add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } - - base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" - - add ia64 base "libunwind7-dev" - add sparc base "lib64gcc1" - add sparc base "libc6-dev-sparc64" - add sparc base "libc6-sparc64" - elif doing_variant fakechroot; then - base="apt" - fi -} - -first_stage_install () { - extract $required - - mkdir -p "$TARGET/var/lib/dpkg" - : >"$TARGET/var/lib/dpkg/status" - : >"$TARGET/var/lib/dpkg/available" - - setup_etc - if [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices_fakechroot - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc_fakechroot - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - install_fakechroot_tools - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - info CONFREQ "Configuring required packages..." - - # fix initscripts postinst (no mounting possible, and wrong if condition) - sed -i '/dpkg.*--compare-versions/ s/\/lt-nl/' $TARGET/var/lib/dpkg/info/initscripts.postinst - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/feisty b/feisty deleted file mode 100644 index eb5efa1..0000000 --- a/feisty +++ /dev/null @@ -1,162 +0,0 @@ -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant -; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - # TODO: add Build-Essential: yes extraoverrides - #base="$(get_debs Build-Essential: yes)" - - add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } - - base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" - - add ia64 base "libunwind7-dev" - add sparc base "lib64gcc1" - add sparc base "libc6-dev-sparc64" - add sparc base "libc6-sparc64" - fi -} - -first_stage_install () { - extract $required - - mkdir -p "$TARGET/var/lib/dpkg" - : >"$TARGET/var/lib/dpkg/status" - : >"$TARGET/var/lib/dpkg/available" - - setup_etc - if [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/feisty.fakechroot b/feisty.fakechroot deleted file mode 100644 index 932cfa7..0000000 --- a/feisty.fakechroot +++ /dev/null @@ -1,173 +0,0 @@ -test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" - -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd fakechroot - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant -; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - # TODO: add Build-Essential: yes extraoverrides - #base="$(get_debs Build-Essential: yes)" - - add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } - - base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" - - add ia64 base "libunwind7-dev" - add sparc base "lib64gcc1" - add sparc base "libc6-dev-sparc64" - add sparc base "libc6-sparc64" - elif doing_variant fakechroot; then - base="apt" - fi -} - -first_stage_install () { - extract $required - - mkdir -p "$TARGET/var/lib/dpkg" - : >"$TARGET/var/lib/dpkg/status" - : >"$TARGET/var/lib/dpkg/available" - - setup_etc - if [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices_fakechroot - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc_fakechroot - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - install_fakechroot_tools - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - info CONFREQ "Configuring required packages..." - - # fix initscripts postinst (no mounting possible, and wrong if condition) - sed -i '/dpkg.*--compare-versions/ s/\/lt-nl/' $TARGET/var/lib/dpkg/info/initscripts.postinst - - # kill libdevmapper postinst; it tries to create /dev/mapper/ - rm $TARGET/var/lib/dpkg/info/libdevmapper1*.postinst - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/gutsy b/gutsy deleted file mode 100644 index 8177272..0000000 --- a/gutsy +++ /dev/null @@ -1,163 +0,0 @@ -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant -; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - # TODO: add Build-Essential: yes extraoverrides - #base="$(get_debs Build-Essential: yes)" - - add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } - - base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" - - add hppa base "libgcc4" - add ia64 base "libunwind7-dev" - add sparc base "lib64gcc1" - add sparc base "libc6-dev-sparc64" - add sparc base "libc6-sparc64" - fi -} - -first_stage_install () { - extract $required - - mkdir -p "$TARGET/var/lib/dpkg" - : >"$TARGET/var/lib/dpkg/status" - : >"$TARGET/var/lib/dpkg/available" - - setup_etc - if [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/gutsy.fakechroot b/gutsy.fakechroot deleted file mode 100644 index 826ff69..0000000 --- a/gutsy.fakechroot +++ /dev/null @@ -1,174 +0,0 @@ -test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" - -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd fakechroot - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant -; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - # TODO: add Build-Essential: yes extraoverrides - #base="$(get_debs Build-Essential: yes)" - - add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } - - base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" - - add hppa base "libgcc4" - add ia64 base "libunwind7-dev" - add sparc base "lib64gcc1" - add sparc base "libc6-dev-sparc64" - add sparc base "libc6-sparc64" - elif doing_variant fakechroot; then - base="apt" - fi -} - -first_stage_install () { - extract $required - - mkdir -p "$TARGET/var/lib/dpkg" - : >"$TARGET/var/lib/dpkg/status" - : >"$TARGET/var/lib/dpkg/available" - - setup_etc - if [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices_fakechroot - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc_fakechroot - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime" - fi - - install_fakechroot_tools - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - info CONFREQ "Configuring required packages..." - - # fix initscripts postinst (no mounting possible, and wrong if condition) - sed -i '/dpkg.*--compare-versions/ s/\/lt-nl/' $TARGET/var/lib/dpkg/info/initscripts.postinst - - # kill libdevmapper postinst; it tries to create /dev/mapper/ - rm $TARGET/var/lib/dpkg/info/libdevmapper1*.postinst - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/hoary b/hoary deleted file mode 100644 index e6207d5..0000000 --- a/hoary +++ /dev/null @@ -1,178 +0,0 @@ -mirror_style release -download_style apt - -work_out_debs () { - - required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-iconv-perl libtext-wrapi18n-perl libtext-charwidth-perl debianutils diff dpkg dselect libblkid1 e2fsprogs e2fslibs libcomerr2 libss2 libuuid1 findutils grep gzip hostname libcap1 libdb1-compat libdb3 libncurses5 libnewt0.51 libpam-modules libpam-runtime libpam0g libpopt0 login makedev mawk mount ncurses-base ncurses-bin passwd perl-base procps python-minimal python2.4-minimal sed slang1a-utf8 lsb-base initscripts sysvinit sysv-rc tar util-linux zlib1g whiptail libgcc1 gcc-3.3-base libstdc++5" - - base="adduser alsa-base alsa-utils apt apt-utils aptitude at base-config bind9-host bsdmainutils bzip2 console-common console-data console-tools cpio cramfsprogs cron dash dhcp3-client dhcp3-common discover1 discover1-data dmsetup dnsutils dosfstools ed eject ethtool evms evms-ncurses fdutils file ftp gettext-base gnupg grepmap groff-base hdparm hotplug ifrename ifupdown info initrd-tools iproute iptables iputils-arping iputils-ping iputils-tracepath jfsutils klogd less libasound2 libbz2-1.0 libconsole libdb4.2 libdevmapper1.00 libdiscover1 libdns16 libevms-2.5 libfribidi0 libgc1 libgcrypt11 libgdbm3 libgnutls11 libgpg-error0 libgpmg1 libidn11 libisc7 libiw27 libldap2 liblockfile1 liblwres1 liblzo1 libmagic1 libncursesw5 libopencdk8 libparted1.6-12 libpcap0.8 libreiserfs0.3-0 libsasl2 libsasl2-modules libsigc++-1.2-5c102 libssl0.9.7 libtasn1-2 libusb-0.1-4 libwrap0 locales logrotate lsb-release lshw lsof lvm-common lvm10 lvm2 mailx man-db manpages mdadm mii-diag mime-support module-init-tools mtr-tiny mutt nano net-tools netbase netcat netkit-inetd ntp ntpdate openssh-client parted pciutils popularity-contest postfix postfix-tls ppp pppconfig pppoeconf psmisc python python2.4 reiser4progs reiserfsprogs reportbug rsync strace sudo sysklogd tcpd tcpdump telnet time ubuntu-base ubuntu-keyring udev usbutils vim vim-common w3m wget wireless-tools xfsprogs" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - subst_package () { - echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' - } - - LIBC6=libc6 - - case $ARCH in - "i386") - required="$required libc6 libc6-i686" - base="$base dmidecode libelfg0 ltrace memtest86+ libreadline4" - ;; - "powerpc") - required="$required libc6 libreadline4" - base="$base hfsplus hfsutils libelfg0 libhfsp0 ltrace mac-fdisk pmac-fdisk powerpc-utils" - ;; - "amd64") - required="$required libc6" - base="$base dmidecode libelfg0 ltrace memtest86+ libreadline4" - ;; - "ia64") - required="$required libc6.1 libunwind7" - base="$base dmidecode libreadline4" - LIBC6="libc6.1" - ;; - "sparc") - required="$required libc6" - base="$base lib64gcc1 libc6-sparc64 libreadline4" - ;; - *) - # who knows? - ;; - esac -} - -install_debs () { - first_stage_install - second_stage_install -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - setup_proc - in_target /sbin/ldconfig - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - x_core_install debconf - - baseprog=0 - bases="$(set -- $required; echo $#)" - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - baseprog=0 - - 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 - #on_exit "(in_target_nofail umount /dev/pts) || true" - - smallyes '' | (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - baseprog=0 - - info CONFBASE "Configuring the base system..." - - mv "$TARGET/usr/sbin/sendmail" "$TARGET/usr/sbin/sendmail.REAL" - ln -s /bin/true "$TARGET/usr/sbin/sendmail" - - smallyes '' | (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - rm -f "$TARGET/usr/sbin/sendmail" - mv "$TARGET/usr/sbin/sendmail.REAL" "$TARGET/usr/sbin/sendmail" - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} - diff --git a/hoary.buildd b/hoary.buildd deleted file mode 100644 index 90937b6..0000000 --- a/hoary.buildd +++ /dev/null @@ -1,161 +0,0 @@ -mirror_style release -download_style apt - -work_out_debs () { - required="base-files base-passwd bash bsdutils build-essential coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs fakeroot findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login lsb-base mawk mount ncurses-base ncurses-bin passwd perl-base pkgstriptranslations python-minimal python2.4-minimal sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g" - - base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - subst_package () { - echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' - } - - LIBC6=libc6 - - case $ARCH in - "amd64") - ;; - "i386") - ;; - "powerpc") - ;; - "ia64") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" - base="$base libunwind7 libunwind7-dev" - LIBC6="libc6.1" - ;; - - # Unsupported architectures: - "alpha") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" - LIBC6="libc6.1" - ;; - *) - # who knows? - ;; - esac -} - -install_debs () { - first_stage_install - second_stage_install -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - DEBIAN_FRONTEND=noninteractive - export DEBIAN_FRONTEND - - baseprog=0 - bases=40 - - setup_proc - in_target /sbin/ldconfig - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - - info UNPACKREQ "Unpacking required packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #8 - smallyes '' | repeat 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 INSTCORE "Installing core packages" #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 - #on_exit "in_target_nofail umount /dev/pts" - - p; progress $baseprog $bases INSTCORE "Installing core packages" #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 INSTCORE "Installing core packages" #29 - - info INSTCORE "Installing base packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #30 - smallyes '' | repeat 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) - - smallyes '' | repeat 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 - - p 9; progress $baseprog $bases INSTCORE "Installing core packages" #39 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases INSTCORE "Installing core packages" #40 - info BASESUCCESS "Base system installed successfully." -} diff --git a/potato b/potato deleted file mode 100644 index f579ee2..0000000 --- a/potato +++ /dev/null @@ -1,105 +0,0 @@ -mirror_style release -download_style apt var-state - -work_out_debs () { - required="base-files base-passwd bash bsdutils debconf-tiny debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname ldso libc6 libdb2 libgdbmg1 libncurses5 libnewt0 libpam-modules libpam-runtime libpam0g libpopt0 libreadline4 libstdc++2.10 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-5.005-base perl-base procps sed shellutils slang1 sysklogd sysvinit tar textutils update util-linux whiptail" - - base="adduser ae apt base-config elvis-tiny fbset fdutils gettext-base console-data console-tools console-tools-libs libdb2 libwrap0 locales modconf netbase ftp ppp pppconfig pump tasksel tcpd textutils telnet xviddetect" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - - LIBC6=libc6 - - case $ARCH in - "alpha") - required="$(without_package "libc6" "$required") libc6.1" - LIBC6="libc6.1" - ;; - "i386") - base="$base fdflush isapnptools lilo mbr pciutils pcmcia-cs psmisc setserial syslinux" - ;; - *) - # other arches may have special needs not yet represented here - # oh well, Potato is old - esac -} - -first_stage_install () { - extract $required - - :> "$TARGET/var/lib/dpkg/status" - echo > "$TARGET/var/lib/dpkg/available" - - setup_etc - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - - setup_devices - - x_feign_install () { - local pkg=$1 - local deb="$(debfor $pkg)" - local ver="$( - ar -p $TARGET/$deb control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 - - if [ -e "$TARGET/usr/bin/perl-5.005.dist" ]; then - mv "$TARGET/usr/bin/perl-5.005.dist" "$TARGET/usr/bin/perl-5.005" - fi - if [ ! -e "$TARGET/usr/bin/perl" ]; then - ln -sf perl-5.005 "$TARGET/usr/bin/perl" - fi -} - -second_stage_install () { - x_core_install () { - in_target dpkg --force-depends --install $(debfor "$@") - } - - export DEBIAN_FRONTEND=Noninteractive - - setup_proc - ln "$TARGET/sbin/ldconfig.new" "$TARGET/sbin/ldconfig" - in_target /sbin/ldconfig - - x_core_install base-files base-passwd ldso - x_core_install dpkg - - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - x_core_install $LIBC6 - - smallyes '' | x_core_install perl-5.005-base - x_core_install mawk - x_core_install debconf-tiny - - in_target dpkg-preconfigure $(debfor $required $base) - - repeat 5 in_target dpkg --force-depends --unpack $(debfor $required) - - mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL" - cp "$TARGET/bin/true" "$TARGET/sbin/start-stop-daemon" - - setup_dselect_method apt - - in_target dpkg --configure --pending --force-configure-any --force-depends - - smallyes '' | repeat 5 in_target dpkg --force-auto-select --force-overwrite --skip-same-version --install $(debfor $base) - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" -} diff --git a/sarge b/sarge deleted file mode 100644 index e6d77e3..0000000 --- a/sarge +++ /dev/null @@ -1,219 +0,0 @@ -mirror_style release -download_style apt - -work_out_debs () { - - 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" - - 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" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - subst_package () { - echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' - } - - LIBC6=libc6 - IPFWTOOL=iptables - - case $ARCH in - "alpha") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$base pciutils" - LIBC6="libc6.1" - IPFWTOOL="ipchains" - ;; - "arm") - base="$base libgpmg1" - IPFWTOOL="ipchains iptables" - ;; - "i386") - required="$(without_package "libperl5.8" "$required")" - base="$base pciutils psmisc" - IPFWTOOL="ipchains iptables" - ;; - "ia64") - required="$(subst_package "libc6" "libc6.1" "$required") libreadline4" - base="$base elilo efibootmgr dosfstools libparted1.6-12 parted" - LIBC6="libc6.1" - ;; - "m68k") - required="$required libreadline4" - base="$base atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross vmelilo" - IPFWTOOL="ipchains" - ;; - "powerpc") - required="$required libreadline4" - base="$base mac-fdisk amiga-fdisk psmisc powerpc-utils pciutils hfsutils" - IPFWTOOL="ipchains iptables" - ;; - "sparc") - base="$base silo eject pciutils sparc-utils" - IPFWTOOL="ipchains iptables" - ;; - "mips") - base="$base dvhtool pciutils" - ;; - "mipsel") - base="$base pciutils" - ;; - "hppa") - base="$base palo pciutils" - 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 - base="$base s390-tools telnetd devfsd" - base="$(without_package "console-tools-libs" "$base")" - base="$(without_package "fdutils" "$base")" - base="$(without_package "ppp" "$base")" - base="$(without_package "pppconfig" "$base")" - base="$(without_package "pppoe" "$base")" - base="$(without_package "pppoeconf" "$base")" - ;; - sh*) - base="$base libstdc++3 gcc-3.0-base" - base="$(without_package "fdutils" "$base")" - required="$required libgcc1" - required="$(without_package "libstdc++2.10-glibc2.2" "$required")" - ;; - "amd64") - base="$base pciutils psmisc" - IPFWTOOL="iptables" - ;; - *) - # who knows? - ;; - esac - - base="$base $IPFWTOOL" -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - 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 [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTBASE "Installing base system" #4 - x_core_install $LIBC6 - - 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 '' | repeat 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 '' | repeat 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 '' | repeat 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." -} diff --git a/sarge.buildd b/sarge.buildd deleted file mode 100644 index ead74ca..0000000 --- a/sarge.buildd +++ /dev/null @@ -1,168 +0,0 @@ -mirror_style release -download_style apt - -work_out_debs () { - - required="base-files base-passwd bash bsdutils coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login mawk mount ncurses-base ncurses-bin passwd perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g" - - base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - subst_package () { - echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' - } - - LIBC6=libc6 - - case $ARCH in - "alpha") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" - LIBC6="libc6.1" - ;; - "arm") - ;; - "i386") - ;; - "ia64") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" - LIBC6="libc6.1" - ;; - "m68k") - ;; - "powerpc") - ;; - "sparc") - ;; - "mips") - ;; - "mipsel") - ;; - "hppa") - ;; - s390|s390x) - ;; - sh*) - ;; - *) - # who knows? - ;; - esac -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=noninteractive - export DEBIAN_FRONTEND - - baseprog=0 - 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 [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTBASE "Installing base system" #4 - x_core_install $LIBC6 - - 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 - - info UNPACKREQ "Unpacking required packages..." - - p; progress $baseprog $bases INSTBASE "Installing base system" #8 - smallyes '' | repeat 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 - - info INSTBASE "Installing base packages..." - - p; progress $baseprog $bases INSTBASE "Installing base system" #30 - smallyes '' | repeat 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) - - smallyes '' | repeat 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 - - 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." -} diff --git a/sarge.fakechroot b/sarge.fakechroot deleted file mode 100644 index 1001253..0000000 --- a/sarge.fakechroot +++ /dev/null @@ -1,174 +0,0 @@ -test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" - -mirror_style release -download_style apt - -work_out_debs () { - - required="base-files base-passwd bash bsdutils coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login mawk mount ncurses-base ncurses-bin passwd perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g" - - base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - subst_package () { - echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' - } - - required="$required binutils fakechroot" - base="$(without_package "binutils" "$base")" - - LIBC6=libc6 - - case $ARCH in - "alpha") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" - LIBC6="libc6.1" - ;; - "arm") - ;; - "i386") - ;; - "ia64") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" - LIBC6="libc6.1" - ;; - "m68k") - ;; - "powerpc") - ;; - "sparc") - ;; - "mips") - ;; - "mipsel") - ;; - "hppa") - ;; - s390|s390x) - ;; - sh*) - ;; - *) - # who knows? - ;; - esac -} - -first_stage_install () { - extract $required - - mkdir -p "$TARGET/var/lib/dpkg" - : >"$TARGET/var/lib/dpkg/status" - : >"$TARGET/var/lib/dpkg/available" - - setup_etc - if [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices_fakechroot - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc_fakechroot - - DEBIAN_FRONTEND=noninteractive - export DEBIAN_FRONTEND - - baseprog=0 - 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 [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - install_fakechroot_tools - - p; progress $baseprog $bases INSTBASE "Installing base system" #4 - x_core_install $LIBC6 - - 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 - - info UNPACKREQ "Unpacking required packages..." - - p; progress $baseprog $bases INSTBASE "Installing base system" #8 - smallyes '' | repeat 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 - - info INSTBASE "Installing base packages..." - - p; progress $baseprog $bases INSTBASE "Installing base system" #30 - smallyes '' | repeat 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) - - smallyes '' | repeat 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 - - 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." -} diff --git a/scripts/debian/potato b/scripts/debian/potato new file mode 100644 index 0000000..f579ee2 --- /dev/null +++ b/scripts/debian/potato @@ -0,0 +1,105 @@ +mirror_style release +download_style apt var-state + +work_out_debs () { + required="base-files base-passwd bash bsdutils debconf-tiny debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname ldso libc6 libdb2 libgdbmg1 libncurses5 libnewt0 libpam-modules libpam-runtime libpam0g libpopt0 libreadline4 libstdc++2.10 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-5.005-base perl-base procps sed shellutils slang1 sysklogd sysvinit tar textutils update util-linux whiptail" + + base="adduser ae apt base-config elvis-tiny fbset fdutils gettext-base console-data console-tools console-tools-libs libdb2 libwrap0 locales modconf netbase ftp ppp pppconfig pump tasksel tcpd textutils telnet xviddetect" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + + LIBC6=libc6 + + case $ARCH in + "alpha") + required="$(without_package "libc6" "$required") libc6.1" + LIBC6="libc6.1" + ;; + "i386") + base="$base fdflush isapnptools lilo mbr pciutils pcmcia-cs psmisc setserial syslinux" + ;; + *) + # other arches may have special needs not yet represented here + # oh well, Potato is old + esac +} + +first_stage_install () { + extract $required + + :> "$TARGET/var/lib/dpkg/status" + echo > "$TARGET/var/lib/dpkg/available" + + setup_etc + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + + setup_devices + + x_feign_install () { + local pkg=$1 + local deb="$(debfor $pkg)" + local ver="$( + ar -p $TARGET/$deb control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 + + if [ -e "$TARGET/usr/bin/perl-5.005.dist" ]; then + mv "$TARGET/usr/bin/perl-5.005.dist" "$TARGET/usr/bin/perl-5.005" + fi + if [ ! -e "$TARGET/usr/bin/perl" ]; then + ln -sf perl-5.005 "$TARGET/usr/bin/perl" + fi +} + +second_stage_install () { + x_core_install () { + in_target dpkg --force-depends --install $(debfor "$@") + } + + export DEBIAN_FRONTEND=Noninteractive + + setup_proc + ln "$TARGET/sbin/ldconfig.new" "$TARGET/sbin/ldconfig" + in_target /sbin/ldconfig + + x_core_install base-files base-passwd ldso + x_core_install dpkg + + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + x_core_install $LIBC6 + + smallyes '' | x_core_install perl-5.005-base + x_core_install mawk + x_core_install debconf-tiny + + in_target dpkg-preconfigure $(debfor $required $base) + + repeat 5 in_target dpkg --force-depends --unpack $(debfor $required) + + mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL" + cp "$TARGET/bin/true" "$TARGET/sbin/start-stop-daemon" + + setup_dselect_method apt + + in_target dpkg --configure --pending --force-configure-any --force-depends + + smallyes '' | repeat 5 in_target dpkg --force-auto-select --force-overwrite --skip-same-version --install $(debfor $base) + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" +} diff --git a/scripts/debian/sarge b/scripts/debian/sarge new file mode 100644 index 0000000..e6d77e3 --- /dev/null +++ b/scripts/debian/sarge @@ -0,0 +1,219 @@ +mirror_style release +download_style apt + +work_out_debs () { + + 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" + + 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" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + subst_package () { + echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' + } + + LIBC6=libc6 + IPFWTOOL=iptables + + case $ARCH in + "alpha") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$base pciutils" + LIBC6="libc6.1" + IPFWTOOL="ipchains" + ;; + "arm") + base="$base libgpmg1" + IPFWTOOL="ipchains iptables" + ;; + "i386") + required="$(without_package "libperl5.8" "$required")" + base="$base pciutils psmisc" + IPFWTOOL="ipchains iptables" + ;; + "ia64") + required="$(subst_package "libc6" "libc6.1" "$required") libreadline4" + base="$base elilo efibootmgr dosfstools libparted1.6-12 parted" + LIBC6="libc6.1" + ;; + "m68k") + required="$required libreadline4" + base="$base atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross vmelilo" + IPFWTOOL="ipchains" + ;; + "powerpc") + required="$required libreadline4" + base="$base mac-fdisk amiga-fdisk psmisc powerpc-utils pciutils hfsutils" + IPFWTOOL="ipchains iptables" + ;; + "sparc") + base="$base silo eject pciutils sparc-utils" + IPFWTOOL="ipchains iptables" + ;; + "mips") + base="$base dvhtool pciutils" + ;; + "mipsel") + base="$base pciutils" + ;; + "hppa") + base="$base palo pciutils" + 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 + base="$base s390-tools telnetd devfsd" + base="$(without_package "console-tools-libs" "$base")" + base="$(without_package "fdutils" "$base")" + base="$(without_package "ppp" "$base")" + base="$(without_package "pppconfig" "$base")" + base="$(without_package "pppoe" "$base")" + base="$(without_package "pppoeconf" "$base")" + ;; + sh*) + base="$base libstdc++3 gcc-3.0-base" + base="$(without_package "fdutils" "$base")" + required="$required libgcc1" + required="$(without_package "libstdc++2.10-glibc2.2" "$required")" + ;; + "amd64") + base="$base pciutils psmisc" + IPFWTOOL="iptables" + ;; + *) + # who knows? + ;; + esac + + base="$base $IPFWTOOL" +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + 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 [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTBASE "Installing base system" #4 + x_core_install $LIBC6 + + 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 '' | repeat 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 '' | repeat 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 '' | repeat 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." +} diff --git a/scripts/debian/sarge.buildd b/scripts/debian/sarge.buildd new file mode 100644 index 0000000..ead74ca --- /dev/null +++ b/scripts/debian/sarge.buildd @@ -0,0 +1,168 @@ +mirror_style release +download_style apt + +work_out_debs () { + + required="base-files base-passwd bash bsdutils coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login mawk mount ncurses-base ncurses-bin passwd perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g" + + base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + subst_package () { + echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' + } + + LIBC6=libc6 + + case $ARCH in + "alpha") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" + LIBC6="libc6.1" + ;; + "arm") + ;; + "i386") + ;; + "ia64") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" + LIBC6="libc6.1" + ;; + "m68k") + ;; + "powerpc") + ;; + "sparc") + ;; + "mips") + ;; + "mipsel") + ;; + "hppa") + ;; + s390|s390x) + ;; + sh*) + ;; + *) + # who knows? + ;; + esac +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=noninteractive + export DEBIAN_FRONTEND + + baseprog=0 + 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 [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTBASE "Installing base system" #4 + x_core_install $LIBC6 + + 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 + + info UNPACKREQ "Unpacking required packages..." + + p; progress $baseprog $bases INSTBASE "Installing base system" #8 + smallyes '' | repeat 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 + + info INSTBASE "Installing base packages..." + + p; progress $baseprog $bases INSTBASE "Installing base system" #30 + smallyes '' | repeat 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) + + smallyes '' | repeat 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 + + 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." +} diff --git a/scripts/debian/sarge.fakechroot b/scripts/debian/sarge.fakechroot new file mode 100644 index 0000000..1001253 --- /dev/null +++ b/scripts/debian/sarge.fakechroot @@ -0,0 +1,174 @@ +test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" + +mirror_style release +download_style apt + +work_out_debs () { + + required="base-files base-passwd bash bsdutils coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login mawk mount ncurses-base ncurses-bin passwd perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g" + + base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + subst_package () { + echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' + } + + required="$required binutils fakechroot" + base="$(without_package "binutils" "$base")" + + LIBC6=libc6 + + case $ARCH in + "alpha") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" + LIBC6="libc6.1" + ;; + "arm") + ;; + "i386") + ;; + "ia64") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" + LIBC6="libc6.1" + ;; + "m68k") + ;; + "powerpc") + ;; + "sparc") + ;; + "mips") + ;; + "mipsel") + ;; + "hppa") + ;; + s390|s390x) + ;; + sh*) + ;; + *) + # who knows? + ;; + esac +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices_fakechroot + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc_fakechroot + + DEBIAN_FRONTEND=noninteractive + export DEBIAN_FRONTEND + + baseprog=0 + 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 [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + install_fakechroot_tools + + p; progress $baseprog $bases INSTBASE "Installing base system" #4 + x_core_install $LIBC6 + + 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 + + info UNPACKREQ "Unpacking required packages..." + + p; progress $baseprog $bases INSTBASE "Installing base system" #8 + smallyes '' | repeat 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 + + info INSTBASE "Installing base packages..." + + p; progress $baseprog $bases INSTBASE "Installing base system" #30 + smallyes '' | repeat 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) + + smallyes '' | repeat 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 + + 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." +} diff --git a/scripts/debian/sid b/scripts/debian/sid new file mode 100644 index 0000000..76cca38 --- /dev/null +++ b/scripts/debian/sid @@ -0,0 +1,180 @@ +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd fakechroot + +if doing_variant fakechroot; then + test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" +fi + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant - || doing_variant fakechroot; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + base="$(get_debs Build-Essential: yes)" + fi + + if doing_variant fakechroot; then + # ldd.fake needs binutils + required="$required binutils" + fi +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + if [ -x $TARGET/usr/bin/md5sum.textutils -a \! -e $TARGET/usr/bin/md5sum ]; then + cp $TARGET/usr/bin/md5sum.textutils $TARGET/usr/bin/md5sum + fi + + if doing_variant fakechroot; then + setup_devices_fakechroot + else + setup_devices + fi + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + if doing_variant fakechroot; then + setup_proc_fakechroot + else + setup_proc + in_target /sbin/ldconfig + fi + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + if doing_variant fakechroot; then + install_fakechroot_tools + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + exec 7>&1 + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 \ + in_target_failmsg CONF_BASE_FAIL "Failure while configuring base packages." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/debian/woody b/scripts/debian/woody new file mode 100644 index 0000000..49da1f8 --- /dev/null +++ b/scripts/debian/woody @@ -0,0 +1,204 @@ +mirror_style release +download_style apt + +work_out_debs () { + + 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" + + 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" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + + LIBC6=libc6 + IPFWTOOL=iptables + + case $ARCH in + "alpha") + required="$(without_package "libc6" "$required") libc6.1" + base="$base setserial aboot pciutils" + LIBC6="libc6.1" + IPFWTOOL="ipchains" + ;; + "arm") + base="$base setserial libgpmg1" + IPFWTOOL="ipchains iptables" + ;; + "i386") + required="$(without_package "libperl5.6" "$required") mbr" + base="$base lilo pciutils setserial syslinux psmisc pcmcia-cs" + IPFWTOOL="ipchains iptables" + ;; + "ia64") + required="$(without_package "libc6" "$required") libc6.1 gcc-2.96-base" + base="$base elilo efibootmgr dosfstools libparted1.4 parted" + LIBC6="libc6.1" + ;; + "m68k") + base="$base atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross setserial vmelilo" + IPFWTOOL="ipchains" + ;; + "powerpc") + base="$base quik mac-fdisk amiga-fdisk psmisc powerpc-utils setserial pciutils hfsutils yaboot pcmcia-cs" + IPFWTOOL="ipchains iptables" + ;; + "sparc") + base="$base silo eject pciutils sparc-utils" + IPFWTOOL="ipchains iptables" + ;; + "mips") + base="$base dvhtool pciutils setserial" # pcmcia-cs + ;; + "mipsel") + base="$base delo pciutils setserial" # pcmcia-cs + ;; + "hppa") + base="$base palo libstdc++3 gcc-3.0-base" + required="$(without_package "libstdc++2.10-glibc2.2" "$required")" + ;; + s390|s390x) + # base-config depends on console-data and console-common + # so we can't exclude them although they are useless on s390 + base="$base s390-tools telnetd devfsd" + base="$(without_package "console-tools" "$base")" + base="$(without_package "console-tools-libs" "$base")" + base="$(without_package "fdutils" "$base")" + base="$(without_package "ppp" "$base")" + base="$(without_package "pppconfig" "$base")" + base="$(without_package "pppoe" "$base")" + base="$(without_package "pppoeconf" "$base")" + ;; + *) + # who knows? + ;; + esac + + base="$base $IPFWTOOL" +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=Noninteractive + export DEBIAN_FRONTEND + + baseprog=0 + 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 [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTBASE "Installing base system" #4 + x_core_install $LIBC6 + + 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 '' | repeat 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 '' | repeat 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 '' | repeat 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 exim "$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." +} diff --git a/scripts/debian/woody.buildd b/scripts/debian/woody.buildd new file mode 100644 index 0000000..21867de --- /dev/null +++ b/scripts/debian/woody.buildd @@ -0,0 +1,168 @@ +mirror_style release +download_style apt + +work_out_debs () { + + required="base-files base-passwd bash bsdutils debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname libc6 libcap1 libdb3 libgdbmg1 libncurses5 libpam-modules libpam-runtime libpam0g libperl5.6 libstdc++2.10-glibc2.2 login mawk mount ncurses-base ncurses-bin perl-base sed shellutils slang1 sysvinit tar textutils util-linux" + + base="apt binutils cpio cpp cpp-2.95 debconf dpkg-dev g++ g++-2.95 gcc gcc-2.95 libc6-dev libdb2 libstdc++2.10-dev make patch perl perl-modules" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + + LIBC6=libc6 + + case $ARCH in + "alpha") + required="$(without_package "libc6" "$required") libc6.1" + base="$(without_package "libc6-dev" "$base") libc6.1-dev" + LIBC6="libc6.1" + ;; + "arm") + ;; + "i386") + ;; + "ia64") + required="$(without_package "libc6" "$required") libc6.1 gcc-2.96-base libreadline4" + base="$(without_package "cpp-2.95" "$base") cpp-2.96" + base="$(without_package "gcc-2.95" "$base") gcc-2.96" + base="$(without_package "g++-2.95" "$base") g++-2.96" + base="$(without_package "libc6-dev" "$base") libc6.1-dev elilo efibootmgr dosfstools libparted1.4 parted" + LIBC6="libc6.1" + ;; + "m68k") + ;; + "powerpc") + ;; + "sparc") + ;; + "mips") + ;; + "mipsel") + ;; + "hppa") + ;; + s390|s390x) + ;; + sh*) + ;; + *) + # who knows? + ;; + esac +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=noninteractive + export DEBIAN_FRONTEND + + baseprog=0 + 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 [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTBASE "Installing base system" #4 + x_core_install $LIBC6 + + 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 + + info UNPACKREQ "Unpacking required packages..." + + p; progress $baseprog $bases INSTBASE "Installing base system" #8 + smallyes '' | repeat 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 + + info INSTBASE "Installing base packages..." + + p; progress $baseprog $bases INSTBASE "Installing base system" #30 + smallyes '' | repeat 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) + + smallyes '' | repeat 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 + + 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." +} diff --git a/scripts/ubuntu/breezy b/scripts/ubuntu/breezy new file mode 100644 index 0000000..d0955da --- /dev/null +++ b/scripts/ubuntu/breezy @@ -0,0 +1,162 @@ +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + # TODO: add Build-Essential: yes extraoverrides + #base="$(get_debs Build-Essential: yes)" + + add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } + + base="apt binutils cpio cpp cpp-4.0 dpkg-dev g++ g++-4.0 gcc gcc-4.0 gcc-4.0-base ${LIBC6}-dev libdb4.2 libgdbm3 libstdc++6 libstdc++6-4.0-dev linux-kernel-headers make patch perl perl-modules" + + add ia64 base "libunwind7-dev" + add sparc base "lib64gcc1" + add sparc base "libc6-dev-sparc64" + add sparc base "libc6-sparc64" + fi +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/dapper b/scripts/ubuntu/dapper new file mode 100644 index 0000000..75ea7f6 --- /dev/null +++ b/scripts/ubuntu/dapper @@ -0,0 +1,162 @@ +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + # TODO: add Build-Essential: yes extraoverrides + #base="$(get_debs Build-Essential: yes)" + + add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } + + base="apt binutils cpio cpp cpp-4.0 dpkg-dev g++ g++-4.0 gcc gcc-4.0 ${LIBC6}-dev libgdbm3 libstdc++6 libstdc++6-4.0-dev linux-kernel-headers make patch perl perl-modules" + + add ia64 base "libunwind7-dev" + add sparc base "lib64gcc1" + add sparc base "libc6-dev-sparc64" + add sparc base "libc6-sparc64" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/edgy b/scripts/ubuntu/edgy new file mode 100644 index 0000000..eb5efa1 --- /dev/null +++ b/scripts/ubuntu/edgy @@ -0,0 +1,162 @@ +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + # TODO: add Build-Essential: yes extraoverrides + #base="$(get_debs Build-Essential: yes)" + + add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } + + base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" + + add ia64 base "libunwind7-dev" + add sparc base "lib64gcc1" + add sparc base "libc6-dev-sparc64" + add sparc base "libc6-sparc64" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/edgy.fakechroot b/scripts/ubuntu/edgy.fakechroot new file mode 100644 index 0000000..0dea4af --- /dev/null +++ b/scripts/ubuntu/edgy.fakechroot @@ -0,0 +1,170 @@ +test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" + +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd fakechroot + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + # TODO: add Build-Essential: yes extraoverrides + #base="$(get_debs Build-Essential: yes)" + + add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } + + base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" + + add ia64 base "libunwind7-dev" + add sparc base "lib64gcc1" + add sparc base "libc6-dev-sparc64" + add sparc base "libc6-sparc64" + elif doing_variant fakechroot; then + base="apt" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices_fakechroot + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc_fakechroot + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + install_fakechroot_tools + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + info CONFREQ "Configuring required packages..." + + # fix initscripts postinst (no mounting possible, and wrong if condition) + sed -i '/dpkg.*--compare-versions/ s/\/lt-nl/' $TARGET/var/lib/dpkg/info/initscripts.postinst + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/feisty b/scripts/ubuntu/feisty new file mode 100644 index 0000000..eb5efa1 --- /dev/null +++ b/scripts/ubuntu/feisty @@ -0,0 +1,162 @@ +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + # TODO: add Build-Essential: yes extraoverrides + #base="$(get_debs Build-Essential: yes)" + + add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } + + base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" + + add ia64 base "libunwind7-dev" + add sparc base "lib64gcc1" + add sparc base "libc6-dev-sparc64" + add sparc base "libc6-sparc64" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/feisty.fakechroot b/scripts/ubuntu/feisty.fakechroot new file mode 100644 index 0000000..932cfa7 --- /dev/null +++ b/scripts/ubuntu/feisty.fakechroot @@ -0,0 +1,173 @@ +test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" + +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd fakechroot + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + # TODO: add Build-Essential: yes extraoverrides + #base="$(get_debs Build-Essential: yes)" + + add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } + + base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" + + add ia64 base "libunwind7-dev" + add sparc base "lib64gcc1" + add sparc base "libc6-dev-sparc64" + add sparc base "libc6-sparc64" + elif doing_variant fakechroot; then + base="apt" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices_fakechroot + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc_fakechroot + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + install_fakechroot_tools + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + info CONFREQ "Configuring required packages..." + + # fix initscripts postinst (no mounting possible, and wrong if condition) + sed -i '/dpkg.*--compare-versions/ s/\/lt-nl/' $TARGET/var/lib/dpkg/info/initscripts.postinst + + # kill libdevmapper postinst; it tries to create /dev/mapper/ + rm $TARGET/var/lib/dpkg/info/libdevmapper1*.postinst + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/gutsy b/scripts/ubuntu/gutsy new file mode 100644 index 0000000..8177272 --- /dev/null +++ b/scripts/ubuntu/gutsy @@ -0,0 +1,163 @@ +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + # TODO: add Build-Essential: yes extraoverrides + #base="$(get_debs Build-Essential: yes)" + + add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } + + base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" + + add hppa base "libgcc4" + add ia64 base "libunwind7-dev" + add sparc base "lib64gcc1" + add sparc base "libc6-dev-sparc64" + add sparc base "libc6-sparc64" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc + in_target /sbin/ldconfig + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/gutsy.fakechroot b/scripts/ubuntu/gutsy.fakechroot new file mode 100644 index 0000000..826ff69 --- /dev/null +++ b/scripts/ubuntu/gutsy.fakechroot @@ -0,0 +1,174 @@ +test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" + +mirror_style release +download_style apt +finddebs_style from-indices +variants - buildd fakechroot + +work_out_debs () { + LIBC6=libc6 + if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + + required="$(get_debs Priority: required)" + + if doing_variant -; then + #required="$required $(get_debs Priority: important)" + # ^^ should be getting debconf here somehow maybe + base="$(get_debs Priority: important)" + elif doing_variant buildd; then + # TODO: add Build-Essential: yes extraoverrides + #base="$(get_debs Build-Essential: yes)" + + add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; } + + base="apt binutils cpio cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 ${LIBC6}-dev libdb4.4 libgdbm3 libstdc++6 libstdc++6-4.1-dev linux-libc-dev make patch perl perl-modules" + + add hppa base "libgcc4" + add ia64 base "libunwind7-dev" + add sparc base "lib64gcc1" + add sparc base "libc6-dev-sparc64" + add sparc base "libc6-sparc64" + elif doing_variant fakechroot; then + base="apt" + fi +} + +first_stage_install () { + extract $required + + mkdir -p "$TARGET/var/lib/dpkg" + : >"$TARGET/var/lib/dpkg/status" + : >"$TARGET/var/lib/dpkg/available" + + setup_etc + if [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices_fakechroot + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + setup_proc_fakechroot + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime" + fi + + install_fakechroot_tools + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + if doing_variant -; then + x_core_install debconf + fi + + baseprog=0 + bases=$(set -- $required; echo $#) + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | + (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ + dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + info CONFREQ "Configuring required packages..." + + # fix initscripts postinst (no mounting possible, and wrong if condition) + sed -i '/dpkg.*--compare-versions/ s/\/lt-nl/' $TARGET/var/lib/dpkg/info/initscripts.postinst + + # kill libdevmapper postinst; it tries to create /dev/mapper/ + rm $TARGET/var/lib/dpkg/info/libdevmapper1*.postinst + + 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 + + smallyes '' | + (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ + dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ + dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | + dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + info CONFBASE "Configuring the base system..." + + smallyes '' | + (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \ + dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | + dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/hoary b/scripts/ubuntu/hoary new file mode 100644 index 0000000..e6207d5 --- /dev/null +++ b/scripts/ubuntu/hoary @@ -0,0 +1,178 @@ +mirror_style release +download_style apt + +work_out_debs () { + + required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-iconv-perl libtext-wrapi18n-perl libtext-charwidth-perl debianutils diff dpkg dselect libblkid1 e2fsprogs e2fslibs libcomerr2 libss2 libuuid1 findutils grep gzip hostname libcap1 libdb1-compat libdb3 libncurses5 libnewt0.51 libpam-modules libpam-runtime libpam0g libpopt0 login makedev mawk mount ncurses-base ncurses-bin passwd perl-base procps python-minimal python2.4-minimal sed slang1a-utf8 lsb-base initscripts sysvinit sysv-rc tar util-linux zlib1g whiptail libgcc1 gcc-3.3-base libstdc++5" + + base="adduser alsa-base alsa-utils apt apt-utils aptitude at base-config bind9-host bsdmainutils bzip2 console-common console-data console-tools cpio cramfsprogs cron dash dhcp3-client dhcp3-common discover1 discover1-data dmsetup dnsutils dosfstools ed eject ethtool evms evms-ncurses fdutils file ftp gettext-base gnupg grepmap groff-base hdparm hotplug ifrename ifupdown info initrd-tools iproute iptables iputils-arping iputils-ping iputils-tracepath jfsutils klogd less libasound2 libbz2-1.0 libconsole libdb4.2 libdevmapper1.00 libdiscover1 libdns16 libevms-2.5 libfribidi0 libgc1 libgcrypt11 libgdbm3 libgnutls11 libgpg-error0 libgpmg1 libidn11 libisc7 libiw27 libldap2 liblockfile1 liblwres1 liblzo1 libmagic1 libncursesw5 libopencdk8 libparted1.6-12 libpcap0.8 libreiserfs0.3-0 libsasl2 libsasl2-modules libsigc++-1.2-5c102 libssl0.9.7 libtasn1-2 libusb-0.1-4 libwrap0 locales logrotate lsb-release lshw lsof lvm-common lvm10 lvm2 mailx man-db manpages mdadm mii-diag mime-support module-init-tools mtr-tiny mutt nano net-tools netbase netcat netkit-inetd ntp ntpdate openssh-client parted pciutils popularity-contest postfix postfix-tls ppp pppconfig pppoeconf psmisc python python2.4 reiser4progs reiserfsprogs reportbug rsync strace sudo sysklogd tcpd tcpdump telnet time ubuntu-base ubuntu-keyring udev usbutils vim vim-common w3m wget wireless-tools xfsprogs" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + subst_package () { + echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' + } + + LIBC6=libc6 + + case $ARCH in + "i386") + required="$required libc6 libc6-i686" + base="$base dmidecode libelfg0 ltrace memtest86+ libreadline4" + ;; + "powerpc") + required="$required libc6 libreadline4" + base="$base hfsplus hfsutils libelfg0 libhfsp0 ltrace mac-fdisk pmac-fdisk powerpc-utils" + ;; + "amd64") + required="$required libc6" + base="$base dmidecode libelfg0 ltrace memtest86+ libreadline4" + ;; + "ia64") + required="$required libc6.1 libunwind7" + base="$base dmidecode libreadline4" + LIBC6="libc6.1" + ;; + "sparc") + required="$required libc6" + base="$base lib64gcc1 libc6-sparc64 libreadline4" + ;; + *) + # who knows? + ;; + esac +} + +install_debs () { + first_stage_install + second_stage_install +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + baseprog=0 + bases=7 + + setup_proc + in_target /sbin/ldconfig + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + x_core_install debconf + + baseprog=0 + bases="$(set -- $required; echo $#)" + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + baseprog=0 + + 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 + #on_exit "(in_target_nofail umount /dev/pts) || true" + + smallyes '' | (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + baseprog=0 + + info CONFBASE "Configuring the base system..." + + mv "$TARGET/usr/sbin/sendmail" "$TARGET/usr/sbin/sendmail.REAL" + ln -s /bin/true "$TARGET/usr/sbin/sendmail" + + smallyes '' | (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + rm -f "$TARGET/usr/sbin/sendmail" + mv "$TARGET/usr/sbin/sendmail.REAL" "$TARGET/usr/sbin/sendmail" + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} + diff --git a/scripts/ubuntu/hoary.buildd b/scripts/ubuntu/hoary.buildd new file mode 100644 index 0000000..90937b6 --- /dev/null +++ b/scripts/ubuntu/hoary.buildd @@ -0,0 +1,161 @@ +mirror_style release +download_style apt + +work_out_debs () { + required="base-files base-passwd bash bsdutils build-essential coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs fakeroot findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login lsb-base mawk mount ncurses-base ncurses-bin passwd perl-base pkgstriptranslations python-minimal python2.4-minimal sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g" + + base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + subst_package () { + echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' + } + + LIBC6=libc6 + + case $ARCH in + "amd64") + ;; + "i386") + ;; + "powerpc") + ;; + "ia64") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" + base="$base libunwind7 libunwind7-dev" + LIBC6="libc6.1" + ;; + + # Unsupported architectures: + "alpha") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" + LIBC6="libc6.1" + ;; + *) + # who knows? + ;; + esac +} + +install_debs () { + first_stage_install + second_stage_install +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + DEBIAN_FRONTEND=noninteractive + export DEBIAN_FRONTEND + + baseprog=0 + bases=40 + + setup_proc + in_target /sbin/ldconfig + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + + info UNPACKREQ "Unpacking required packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #8 + smallyes '' | repeat 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 INSTCORE "Installing core packages" #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 + #on_exit "in_target_nofail umount /dev/pts" + + p; progress $baseprog $bases INSTCORE "Installing core packages" #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 INSTCORE "Installing core packages" #29 + + info INSTCORE "Installing base packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #30 + smallyes '' | repeat 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) + + smallyes '' | repeat 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 + + p 9; progress $baseprog $bases INSTCORE "Installing core packages" #39 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases INSTCORE "Installing core packages" #40 + info BASESUCCESS "Base system installed successfully." +} diff --git a/scripts/ubuntu/warty b/scripts/ubuntu/warty new file mode 100644 index 0000000..6842589 --- /dev/null +++ b/scripts/ubuntu/warty @@ -0,0 +1,169 @@ +mirror_style release +download_style apt + +work_out_debs () { + + required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-iconv-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 libpopt0 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed slang1a-utf8 lsb-base initscripts sysvinit sysv-rc tar util-linux zlib1g whiptail libgcc1 gcc-3.3-base libstdc++5" + + base="adduser alsa-base alsa-utils apt apt-utils aptitude at base-config bind9-host bsdmainutils bzip2 console-common console-data console-tools cpio cramfsprogs cron dash dbus-1 dhcp3-client dhcp3-common discover1 discover1-data dmsetup dnsutils dosfstools ed eject evms evms-ncurses fdutils file ftp gettext-base gnupg groff-base hdparm hotplug ifrename ifupdown info initrd-tools iproute iptables iputils-arping iputils-ping iputils-tracepath jfsutils klogd less libasound2 libatm1 libbz2-1.0 libconsole libdb4.2 libdevmapper1.00 libdiscover1 libdns16 libevms-2.3 libexpat1 libfribidi0 libgc1 libgcrypt7 libgdbm3 libgnutls10 libgpg-error0 libgpmg1 libidn11 libisc7 libiw27 libldap2 liblockfile1 liblwres1 liblzo1 libmagic1 libncursesw5 libopencdk8 libparted1.6-0 libpcap0.7 libpcap0.8 libreiserfs0.3-0 libsasl2 libsigc++-1.2-5c102 libssl0.9.7 libtasn1-2 libusb-0.1-4 libwrap0 locales logrotate lshw lsof ltrace lvm-common lvm10 lvm2 mailx man-db manpages mdadm mii-diag mime-support module-init-tools mtr-tiny mutt nano net-tools netbase netcat netkit-inetd ntp ntpdate openssh-client parted pciutils popularity-contest postfix postfix-tls ppp pppconfig pppoeconf psmisc python python2.3 reiser4progs reiserfsprogs reportbug rsync strace sudo sysklogd tcpd tcpdump telnet time ubuntu-base udev usbutils vim vim-common w3m wget wireless-tools xfsprogs" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + subst_package () { + echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' + } + + LIBC6=libc6 + + case $ARCH in + "i386") + required="$required libc6-i686" + base="$base dmidecode memtest86+ libreadline4" + ;; + "powerpc") + required="$required libreadline4" + base="$base hfsplus hfsutils libhfsp0 mac-fdisk pmac-fdisk powerpc-utils" + ;; + "amd64") + base="$base dmidecode libreadline4" + ;; + *) + # who knows? + ;; + esac +} + +install_debs () { + first_stage_install + second_stage_install +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + DEBIAN_FRONTEND=noninteractive + DEBCONF_NONINTERACTIVE_SEEN=true + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + + setup_proc + in_target /sbin/ldconfig + + baseprog=0 + bases=7 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + x_core_install debconf + + baseprog=0 + bases="$(set -- $required; echo $#)" + + info UNPACKREQ "Unpacking required packages..." + + smallyes '' | (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 + + baseprog=0 + + 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 + #on_exit "(in_target_nofail umount /dev/pts) || true" + + smallyes '' | (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 + + baseprog=0 + bases="$(set -- $base; echo $#)" + + info UNPACKBASE "Unpacking the base system..." + + smallyes '' | (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 + + baseprog=0 + + info CONFBASE "Configuring the base system..." + + mv "$TARGET/usr/sbin/sendmail" "$TARGET/usr/sbin/sendmail.REAL" + ln -s /bin/true "$TARGET/usr/sbin/sendmail" + + smallyes '' | (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + + rm -f "$TARGET/usr/sbin/sendmail" + mv "$TARGET/usr/sbin/sendmail.REAL" "$TARGET/usr/sbin/sendmail" + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases CONFBASE "Configuring base system" + info BASESUCCESS "Base system installed successfully." +} + diff --git a/scripts/ubuntu/warty.buildd b/scripts/ubuntu/warty.buildd new file mode 100644 index 0000000..9019d8d --- /dev/null +++ b/scripts/ubuntu/warty.buildd @@ -0,0 +1,161 @@ +mirror_style release +download_style apt + +work_out_debs () { + + required="base-files base-passwd bash bsdutils build-essential coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs fakeroot findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login lsb-base mawk mount ncurses-base ncurses-bin perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g" + + base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules" + + without_package () { + echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' + } + subst_package () { + echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' + } + + LIBC6=libc6 + + case $ARCH in + "amd64") + ;; + "i386") + ;; + "powerpc") + ;; + + # Unsupported architectures: + "alpha") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" + LIBC6="libc6.1" + ;; + "ia64") + required="$(subst_package "libc6" "libc6.1" "$required")" + base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" + LIBC6="libc6.1" + ;; + *) + # who knows? + ;; + esac +} + +install_debs () { + first_stage_install + second_stage_install +} + +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 [ ! -e "$TARGET/etc/fstab" ]; then + echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" + chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" + fi + + setup_devices + + x_feign_install () { + local pkg="$1" + local deb="$(debfor $pkg)" + local ver="$( + ar -p "$TARGET/$deb" control.tar.gz | zcat | + tar -O -xf - control ./control 2>/dev/null | + sed -ne 's/^Version: *//Ip' | head -n 1 + )" + + 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 +} + +second_stage_install () { + x_core_install () { + smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") + } + p () { + baseprog="$(($baseprog + ${1:-1}))" + } + + DEBIAN_FRONTEND=noninteractive + export DEBIAN_FRONTEND + + baseprog=0 + bases=40 + + setup_proc + in_target /sbin/ldconfig + + p; progress $baseprog $bases INSTCORE "Installing core packages" #1 + info INSTCORE "Installing core packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #2 + ln -sf mawk $TARGET/usr/bin/awk + x_core_install base-files base-passwd + p; progress $baseprog $bases INSTCORE "Installing core packages" #3 + x_core_install dpkg + + if [ ! -e "$TARGET/etc/localtime" ]; then + ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" + fi + + p; progress $baseprog $bases INSTCORE "Installing core packages" #4 + x_core_install $LIBC6 + + p; progress $baseprog $bases INSTCORE "Installing core packages" #5 + x_core_install perl-base + p; progress $baseprog $bases INSTCORE "Installing core packages" #6 + rm $TARGET/usr/bin/awk + x_core_install mawk + p; progress $baseprog $bases INSTCORE "Installing core packages" #7 + + info UNPACKREQ "Unpacking required packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #8 + smallyes '' | repeat 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 INSTCORE "Installing core packages" #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 + #on_exit "in_target_nofail umount /dev/pts" + + p; progress $baseprog $bases INSTCORE "Installing core packages" #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 INSTCORE "Installing core packages" #29 + + info INSTCORE "Installing base packages..." + + p; progress $baseprog $bases INSTCORE "Installing core packages" #30 + smallyes '' | repeat 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) + + smallyes '' | repeat 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 + + p 9; progress $baseprog $bases INSTCORE "Installing core packages" #39 + + mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" + + progress $bases $bases INSTCORE "Installing core packages" #40 + info BASESUCCESS "Base system installed successfully." +} diff --git a/sid b/sid deleted file mode 100644 index 76cca38..0000000 --- a/sid +++ /dev/null @@ -1,180 +0,0 @@ -mirror_style release -download_style apt -finddebs_style from-indices -variants - buildd fakechroot - -if doing_variant fakechroot; then - test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" -fi - -work_out_debs () { - LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi - - required="$(get_debs Priority: required)" - - if doing_variant - || doing_variant fakechroot; then - #required="$required $(get_debs Priority: important)" - # ^^ should be getting debconf here somehow maybe - base="$(get_debs Priority: important)" - elif doing_variant buildd; then - base="$(get_debs Build-Essential: yes)" - fi - - if doing_variant fakechroot; then - # ldd.fake needs binutils - required="$required binutils" - fi -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - if [ -x $TARGET/usr/bin/md5sum.textutils -a \! -e $TARGET/usr/bin/md5sum ]; then - cp $TARGET/usr/bin/md5sum.textutils $TARGET/usr/bin/md5sum - fi - - if doing_variant fakechroot; then - setup_devices_fakechroot - else - setup_devices - fi - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - if doing_variant fakechroot; then - setup_proc_fakechroot - else - setup_proc - in_target /sbin/ldconfig - fi - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - if doing_variant fakechroot; then - install_fakechroot_tools - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - if doing_variant -; then - x_core_install debconf - fi - - baseprog=0 - bases=$(set -- $required; echo $#) - - info UNPACKREQ "Unpacking required packages..." - - exec 7>&1 - - smallyes '' | - (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ - dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) | - dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING - - 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 - - smallyes '' | - (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ - dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 || echo EXITCODE $?) | - dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | - (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ - dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) | - dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING - - info CONFBASE "Configuring the base system..." - - smallyes '' | - (repeat 5 \ - in_target_failmsg CONF_BASE_FAIL "Failure while configuring base packages." "" \ - dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) | - dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} diff --git a/warty b/warty deleted file mode 100644 index 6842589..0000000 --- a/warty +++ /dev/null @@ -1,169 +0,0 @@ -mirror_style release -download_style apt - -work_out_debs () { - - required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-iconv-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 libpopt0 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed slang1a-utf8 lsb-base initscripts sysvinit sysv-rc tar util-linux zlib1g whiptail libgcc1 gcc-3.3-base libstdc++5" - - base="adduser alsa-base alsa-utils apt apt-utils aptitude at base-config bind9-host bsdmainutils bzip2 console-common console-data console-tools cpio cramfsprogs cron dash dbus-1 dhcp3-client dhcp3-common discover1 discover1-data dmsetup dnsutils dosfstools ed eject evms evms-ncurses fdutils file ftp gettext-base gnupg groff-base hdparm hotplug ifrename ifupdown info initrd-tools iproute iptables iputils-arping iputils-ping iputils-tracepath jfsutils klogd less libasound2 libatm1 libbz2-1.0 libconsole libdb4.2 libdevmapper1.00 libdiscover1 libdns16 libevms-2.3 libexpat1 libfribidi0 libgc1 libgcrypt7 libgdbm3 libgnutls10 libgpg-error0 libgpmg1 libidn11 libisc7 libiw27 libldap2 liblockfile1 liblwres1 liblzo1 libmagic1 libncursesw5 libopencdk8 libparted1.6-0 libpcap0.7 libpcap0.8 libreiserfs0.3-0 libsasl2 libsigc++-1.2-5c102 libssl0.9.7 libtasn1-2 libusb-0.1-4 libwrap0 locales logrotate lshw lsof ltrace lvm-common lvm10 lvm2 mailx man-db manpages mdadm mii-diag mime-support module-init-tools mtr-tiny mutt nano net-tools netbase netcat netkit-inetd ntp ntpdate openssh-client parted pciutils popularity-contest postfix postfix-tls ppp pppconfig pppoeconf psmisc python python2.3 reiser4progs reiserfsprogs reportbug rsync strace sudo sysklogd tcpd tcpdump telnet time ubuntu-base udev usbutils vim vim-common w3m wget wireless-tools xfsprogs" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - subst_package () { - echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' - } - - LIBC6=libc6 - - case $ARCH in - "i386") - required="$required libc6-i686" - base="$base dmidecode memtest86+ libreadline4" - ;; - "powerpc") - required="$required libreadline4" - base="$base hfsplus hfsutils libhfsp0 mac-fdisk pmac-fdisk powerpc-utils" - ;; - "amd64") - base="$base dmidecode libreadline4" - ;; - *) - # who knows? - ;; - esac -} - -install_debs () { - first_stage_install - second_stage_install -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - DEBIAN_FRONTEND=noninteractive - DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN - - setup_proc - in_target /sbin/ldconfig - - baseprog=0 - bases=7 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - x_core_install debconf - - baseprog=0 - bases="$(set -- $required; echo $#)" - - info UNPACKREQ "Unpacking required packages..." - - smallyes '' | (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 - - baseprog=0 - - 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 - #on_exit "(in_target_nofail umount /dev/pts) || true" - - smallyes '' | (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 - - baseprog=0 - bases="$(set -- $base; echo $#)" - - info UNPACKBASE "Unpacking the base system..." - - smallyes '' | (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 - - baseprog=0 - - info CONFBASE "Configuring the base system..." - - mv "$TARGET/usr/sbin/sendmail" "$TARGET/usr/sbin/sendmail.REAL" - ln -s /bin/true "$TARGET/usr/sbin/sendmail" - - smallyes '' | (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 - - rm -f "$TARGET/usr/sbin/sendmail" - mv "$TARGET/usr/sbin/sendmail.REAL" "$TARGET/usr/sbin/sendmail" - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases CONFBASE "Configuring base system" - info BASESUCCESS "Base system installed successfully." -} - diff --git a/warty.buildd b/warty.buildd deleted file mode 100644 index 9019d8d..0000000 --- a/warty.buildd +++ /dev/null @@ -1,161 +0,0 @@ -mirror_style release -download_style apt - -work_out_debs () { - - required="base-files base-passwd bash bsdutils build-essential coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs fakeroot findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login lsb-base mawk mount ncurses-base ncurses-bin perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g" - - base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - subst_package () { - echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' - } - - LIBC6=libc6 - - case $ARCH in - "amd64") - ;; - "i386") - ;; - "powerpc") - ;; - - # Unsupported architectures: - "alpha") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" - LIBC6="libc6.1" - ;; - "ia64") - required="$(subst_package "libc6" "libc6.1" "$required")" - base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")" - LIBC6="libc6.1" - ;; - *) - # who knows? - ;; - esac -} - -install_debs () { - first_stage_install - second_stage_install -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - DEBIAN_FRONTEND=noninteractive - export DEBIAN_FRONTEND - - baseprog=0 - bases=40 - - setup_proc - in_target /sbin/ldconfig - - p; progress $baseprog $bases INSTCORE "Installing core packages" #1 - info INSTCORE "Installing core packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #2 - ln -sf mawk $TARGET/usr/bin/awk - x_core_install base-files base-passwd - p; progress $baseprog $bases INSTCORE "Installing core packages" #3 - x_core_install dpkg - - if [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTCORE "Installing core packages" #4 - x_core_install $LIBC6 - - p; progress $baseprog $bases INSTCORE "Installing core packages" #5 - x_core_install perl-base - p; progress $baseprog $bases INSTCORE "Installing core packages" #6 - rm $TARGET/usr/bin/awk - x_core_install mawk - p; progress $baseprog $bases INSTCORE "Installing core packages" #7 - - info UNPACKREQ "Unpacking required packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #8 - smallyes '' | repeat 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 INSTCORE "Installing core packages" #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 - #on_exit "in_target_nofail umount /dev/pts" - - p; progress $baseprog $bases INSTCORE "Installing core packages" #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 INSTCORE "Installing core packages" #29 - - info INSTCORE "Installing base packages..." - - p; progress $baseprog $bases INSTCORE "Installing core packages" #30 - smallyes '' | repeat 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) - - smallyes '' | repeat 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 - - p 9; progress $baseprog $bases INSTCORE "Installing core packages" #39 - - mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" - - progress $bases $bases INSTCORE "Installing core packages" #40 - info BASESUCCESS "Base system installed successfully." -} diff --git a/woody b/woody deleted file mode 100644 index 49da1f8..0000000 --- a/woody +++ /dev/null @@ -1,204 +0,0 @@ -mirror_style release -download_style apt - -work_out_debs () { - - 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" - - 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" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - - LIBC6=libc6 - IPFWTOOL=iptables - - case $ARCH in - "alpha") - required="$(without_package "libc6" "$required") libc6.1" - base="$base setserial aboot pciutils" - LIBC6="libc6.1" - IPFWTOOL="ipchains" - ;; - "arm") - base="$base setserial libgpmg1" - IPFWTOOL="ipchains iptables" - ;; - "i386") - required="$(without_package "libperl5.6" "$required") mbr" - base="$base lilo pciutils setserial syslinux psmisc pcmcia-cs" - IPFWTOOL="ipchains iptables" - ;; - "ia64") - required="$(without_package "libc6" "$required") libc6.1 gcc-2.96-base" - base="$base elilo efibootmgr dosfstools libparted1.4 parted" - LIBC6="libc6.1" - ;; - "m68k") - base="$base atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross setserial vmelilo" - IPFWTOOL="ipchains" - ;; - "powerpc") - base="$base quik mac-fdisk amiga-fdisk psmisc powerpc-utils setserial pciutils hfsutils yaboot pcmcia-cs" - IPFWTOOL="ipchains iptables" - ;; - "sparc") - base="$base silo eject pciutils sparc-utils" - IPFWTOOL="ipchains iptables" - ;; - "mips") - base="$base dvhtool pciutils setserial" # pcmcia-cs - ;; - "mipsel") - base="$base delo pciutils setserial" # pcmcia-cs - ;; - "hppa") - base="$base palo libstdc++3 gcc-3.0-base" - required="$(without_package "libstdc++2.10-glibc2.2" "$required")" - ;; - s390|s390x) - # base-config depends on console-data and console-common - # so we can't exclude them although they are useless on s390 - base="$base s390-tools telnetd devfsd" - base="$(without_package "console-tools" "$base")" - base="$(without_package "console-tools-libs" "$base")" - base="$(without_package "fdutils" "$base")" - base="$(without_package "ppp" "$base")" - base="$(without_package "pppconfig" "$base")" - base="$(without_package "pppoe" "$base")" - base="$(without_package "pppoeconf" "$base")" - ;; - *) - # who knows? - ;; - esac - - base="$base $IPFWTOOL" -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=Noninteractive - export DEBIAN_FRONTEND - - baseprog=0 - 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 [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTBASE "Installing base system" #4 - x_core_install $LIBC6 - - 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 '' | repeat 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 '' | repeat 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 '' | repeat 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 exim "$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." -} diff --git a/woody.buildd b/woody.buildd deleted file mode 100644 index 21867de..0000000 --- a/woody.buildd +++ /dev/null @@ -1,168 +0,0 @@ -mirror_style release -download_style apt - -work_out_debs () { - - required="base-files base-passwd bash bsdutils debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname libc6 libcap1 libdb3 libgdbmg1 libncurses5 libpam-modules libpam-runtime libpam0g libperl5.6 libstdc++2.10-glibc2.2 login mawk mount ncurses-base ncurses-bin perl-base sed shellutils slang1 sysvinit tar textutils util-linux" - - base="apt binutils cpio cpp cpp-2.95 debconf dpkg-dev g++ g++-2.95 gcc gcc-2.95 libc6-dev libdb2 libstdc++2.10-dev make patch perl perl-modules" - - without_package () { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' - } - - LIBC6=libc6 - - case $ARCH in - "alpha") - required="$(without_package "libc6" "$required") libc6.1" - base="$(without_package "libc6-dev" "$base") libc6.1-dev" - LIBC6="libc6.1" - ;; - "arm") - ;; - "i386") - ;; - "ia64") - required="$(without_package "libc6" "$required") libc6.1 gcc-2.96-base libreadline4" - base="$(without_package "cpp-2.95" "$base") cpp-2.96" - base="$(without_package "gcc-2.95" "$base") gcc-2.96" - base="$(without_package "g++-2.95" "$base") g++-2.96" - base="$(without_package "libc6-dev" "$base") libc6.1-dev elilo efibootmgr dosfstools libparted1.4 parted" - LIBC6="libc6.1" - ;; - "m68k") - ;; - "powerpc") - ;; - "sparc") - ;; - "mips") - ;; - "mipsel") - ;; - "hppa") - ;; - s390|s390x) - ;; - sh*) - ;; - *) - # who knows? - ;; - esac -} - -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 [ ! -e "$TARGET/etc/fstab" ]; then - echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" - chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - fi - - setup_devices - - x_feign_install () { - local pkg="$1" - local deb="$(debfor $pkg)" - local ver="$( - ar -p "$TARGET/$deb" control.tar.gz | zcat | - tar -O -xf - control ./control 2>/dev/null | - sed -ne 's/^Version: *//Ip' | head -n 1 - )" - - 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 -} - -second_stage_install () { - x_core_install () { - smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") - } - - p () { - baseprog="$(($baseprog + ${1:-1}))" - } - - setup_proc - in_target /sbin/ldconfig - - DEBIAN_FRONTEND=noninteractive - export DEBIAN_FRONTEND - - baseprog=0 - 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 [ ! -e "$TARGET/etc/localtime" ]; then - ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime" - fi - - p; progress $baseprog $bases INSTBASE "Installing base system" #4 - x_core_install $LIBC6 - - 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 - - info UNPACKREQ "Unpacking required packages..." - - p; progress $baseprog $bases INSTBASE "Installing base system" #8 - smallyes '' | repeat 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 - - info INSTBASE "Installing base packages..." - - p; progress $baseprog $bases INSTBASE "Installing base system" #30 - smallyes '' | repeat 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) - - smallyes '' | repeat 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 - - 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." -} -- cgit v0.12