From cadae8c54950ce79572dfab860122b624f6767e8 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 30 Mar 2009 12:06:04 -0700 Subject: [PATCH] revert Debian-specific changes -- this is supported via ~/.mk-sbuild-lv.sources, and should not have Debian-specific logic. especially should not change out which tool is being used to build the chroot --- mk-sbuild-lv | 56 ++++++++++------------------------------------------ 1 file changed, 10 insertions(+), 46 deletions(-) diff --git a/mk-sbuild-lv b/mk-sbuild-lv index a738482..c6631b4 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -2,7 +2,6 @@ # # Copyright 2006-2007 (C) Canonical Ltd. # Created by Kees Cook -# Copyright 2009 (C) Ryan Kavanagh # # ################################################################## # @@ -117,7 +116,6 @@ function usage() echo " --skip-updates Do not include -updates pocket in sources.list" echo " --source-template=FILE Use FILE as the sources.list template" echo " --debootstrap-mirror=URL Use URL as the debootstrap source" - echo " --debian Make a Debian schroot environment" echo "" echo "Configuration (via ~/.mk-sbuild-lv.rc)" echo " LV_SIZE Size of source LVs (default ${LV_SIZE})" @@ -131,7 +129,7 @@ function usage() if [ -z "$1" ]; then usage fi -OPTS=`getopt -o '' --long "help,debug,skip-updates,arch:,name:,source-template:,debootstrap-mirror:,personality:,debian" -- "$@"` +OPTS=`getopt -o '' --long "help,debug,skip-updates,arch:,name:,source-template:,debootstrap-mirror:,personality:" -- "$@"` eval set -- "$OPTS" name="" @@ -175,10 +173,6 @@ while :; do DEBOOTSTRAP_MIRROR="$2" shift 2 ;; - --debian) - DEBIAN=True - shift - ;; --) shift break @@ -232,7 +226,7 @@ else fi # are we doing an lpia build? -if [ -z "$DEBOOTSTRAP_MIRROR" ] && [ "$arch_opt" = "--arch lpia" ] && [ ! $DEBIAN ]; then +if [ -z "$DEBOOTSTRAP_MIRROR" ] && [ "$arch_opt" = "--arch lpia" ]; then DEBOOTSTRAP_MIRROR="http://ports.ubuntu.com/" fi @@ -243,11 +237,7 @@ sudo mkfs -t ext3 "$CHROOT_PATH" # Mount and debootstrap the chroot MNT=`mktemp -d -t schroot-XXXXXX` sudo mount "$CHROOT_PATH" "$MNT" -if [ $DEBIAN ]; then - sudo cdebootstrap -f build $arch_opt $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://ftp.debian.org/debian}" -else - sudo debootstrap --variant=buildd $arch_opt $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu}" -fi +sudo debootstrap $arch_opt $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu}" # Update the package sources TEMP_SOURCES=`mktemp -t sources-XXXXXX` if [ -z "$TEMPLATE_SOURCES" ]; then @@ -256,37 +246,20 @@ fi if [ -r "$TEMPLATE_SOURCES" ]; then cat "$TEMPLATE_SOURCES" > "$TEMP_SOURCES" else - # Start DEBIAN - if [ $DEBIAN ]; then - cat > "$TEMP_SOURCES" << EOM -deb ${DEBOOTSTRAP_MIRROR:-http://ftp.debian.org/debian} RELEASE main non-free contrib -deb-src ${DEBOOTSTRAP_MIRROR:-http://ftp.debian.org/debian} RELEASE main non-free contrib -EOM - if [ "$RELEASE" != "sid" ]; then - cat >> "$TEMP_SOURCES" << EOM -deb http://security.debian.org/ ${RELEASE}/updates main -deb-src http://security.debian.org/ ${RELEASE}/updates main -EOM - fi - # End Debian - else - # Start Ubuntu - cat > "$TEMP_SOURCES" < "$TEMP_SOURCES" <> "$TEMP_SOURCES" <> "$TEMP_SOURCES" <> "$TEMP_SOURCES" <> "$TEMP_SOURCES" < $MNT/etc/apt/sources.list" @@ -335,11 +308,7 @@ BUILD_PKGS="build-essential fakeroot devscripts apt-utils" if [ "$RELEASE" != "breezy" ] && [ "$RELEASE" != "dapper" ]; then # Disable recommends for a smaller chroot (gutsy and later only) # Add buildd tools - # No need to do this for debian, --flavour=build in cdebootstrap - # takes care of it. - if [ ! $DEBIAN ]; then - BUILD_PKGS="--no-install-recommends $BUILD_PKGS" - fi + BUILD_PKGS="--no-install-recommends $BUILD_PKGS pkg-create-dbgsym pkgbinarymangler" fi sudo bash -c "cat >> $MNT/finish.sh" <