<commit_before>#!/bin/bash
set -x

source _helpers.sh

PACKAGES="build-essential,libssl-dev,lsof,strace,bind9-host,dnsutils,tcpdump,iputils-arping,curl,wget,libcurl3,bison,libreadline6-dev,libxml2,libxml2-dev,libxslt1.1,libxslt1-dev,zip,unzip,nfs-common,flex,psmisc,iptables,sysstat,rsync,openssh-server,libncurses5-dev,quota,libaio1,gdb,psmisc,dialog"
CHROOT=/tmp/chroot
[ -d $CHROOT ] && rm -rf $CHROOT && mkdir -p $CHROOT

## Check if stemcell_base.tar.gz already exists
[ -f $bosh_app_dir/stemcell_base.tar.gz ] && exit 0

pushd /tmp
    ARCH=$(dpkg --print-architecture)
    debootstrap --make-tarball=debootstrap-squeeze-tarball.tar --arch=$ARCH  --include=$PACKAGES squeeze $CHROOT
    debootstrap --variant=minbase --unpack-tarball=/tmp/debootstrap-squeeze-tarball.tar squeeze $CHROOT
    # Creates a pristine image to be run inside a warden container.
    hostname="ubuntu.defaultdomain ubuntu"
    rm -f $CHROOT/var/lib/apt/lists/{archive,security,lock}*

    # Reconfigure timezone and locale
    echo 'en_US.UTF-8 UTF-8' > $CHROOT/etc/locale.gen
    echo 'UTC' > $CHROOT/etc/timezone
    run_in_chroot $CHROOT "
    dpkg-reconfigure -fnoninteractive libc6
    dpkg-reconfigure -fnoninteractive locales
    dpkg-reconfigure -fnoninteractive tzdata
    "

    # Fix /etc/mtab
    run_in_chroot $CHROOT "ln -s /proc/mounts /etc/mtab"

   # configure the network using the dhcp
    cat <<EOF > $CHROOT/etc/network/interfaces
# This file describes the network interfaces available on your system<commit_msg>Fix bug remove useless packages<commit_after>#!/bin/bash
set -x

source _helpers.sh
source _variables.sh

PACKAGES="build-essential,libssl-dev,lsof,strace,bind9-host,dnsutils,iputils-arping,curl,wget,libcurl3,bison,libreadline6-dev,libxml2,libxml2-dev,libxslt1.1,libxslt1-dev,zip,unzip,nfs-common,flex,psmisc,iptables,sysstat,rsync,openssh-server,libncurses5-dev,quota,libaio1,psmisc,dialog"
CHROOT=/tmp/chroot
[ -d $CHROOT ] && rm -rf $CHROOT && mkdir -p $CHROOT

## Check if stemcell_base.tar.gz already exists
[ -f $bosh_app_dir/stemcell_base.tar.gz ] && exit 0

pushd /tmp
    ARCH=$(dpkg --print-architecture)
    debootstrap --make-tarball=debootstrap-squeeze-tarball.tar --arch=$ARCH  --include=$PACKAGES squeeze $CHROOT
    debootstrap --variant=minbase --unpack-tarball=/tmp/debootstrap-squeeze-tarball.tar squeeze $CHROOT
    # Creates a pristine image to be run inside a warden container.
    hostname="ubuntu.defaultdomain ubuntu"
    rm -f $CHROOT/var/lib/apt/lists/{archive,security,lock}*

    # Reconfigure timezone and locale
    echo 'en_US.UTF-8 UTF-8' > $CHROOT/etc/locale.gen
    echo 'UTC' > $CHROOT/etc/timezone
    run_in_chroot $CHROOT "
    dpkg-reconfigure -fnoninteractive libc6
    dpkg-reconfigure -fnoninteractive locales
    dpkg-reconfigure -fnoninteractive tzdata
    "

    # Fix /etc/mtab
    run_in_chroot $CHROOT "ln -s /proc/mounts /etc/mtab"

   # configure the network using the dhcp
    cat <<EOF > $CHROOT/etc/network/interfaces
# This file describes the network interfaces available on your system
{'fraction_non_alphanumeric': 0.11947626841243862, 'fraction_numerical': 0.009165302782324058, 'mean_word_length': 4.3426573426573425, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4533803', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1096, 'n_words': 213}