<commit_before>#! /bin/sh -i 

if test -z "$INSTALL_TEST_RUNNING" ; then
    export INSTALL_TEST_RUNNING=1;
    export ORIGINAL_NAME="$0";
    sh -i < "$ORIGINAL_NAME";
    exit;
fi;

if ! eval ' ( sleep 0.1; exit 0; ) & fg ' ; then
    echo "Failing job control test";
    exit;
fi;

set -x 

echo "Installation starting.." > report

nix-build -o socat /etc/nixos/nixpkgs -A socat || { echo "Failed to build socat" >&2 ;  exit 2; };
nix-build -o qemu /etc/nixos/nixpkgs -A qemu || { echo "Failed to build qemu" >&2 ;  exit 2; };

echo "reboot" | ./socat/bin/socat tcp-listen:4424 stdio >> report &  

if ( ! [ -d dvd/iso ] ) || ( [ -z "$USE_LEFTOVER_DVD" ] ); then
    rm dvd
    nix-build -o dvd /etc/nixos/nixos/configuration/closed-install.nix || 
      { echo "Failed to build LiveDVD" >&2 ;  exit 2; };
fi;

if ( ! [ -f install-test.img ] ) || ( [ -z "$JUST_BOOT" ] ); then
    rm install-test.img
    ./qemu/bin/qemu-img create -f qcow2 install-test.img 5G<commit_msg>Reduce dependency of generated image on host configuration.<commit_after>#! /bin/sh -i 

if test -z "$INSTALL_TEST_RUNNING" ; then
    export INSTALL_TEST_RUNNING=1;
    export ORIGINAL_NAME="$0";
    sh -i < "$ORIGINAL_NAME";
    exit;
fi;

if ! eval ' ( sleep 0.1; exit 0; ) & fg ' ; then
    echo "Failing job control test";
    exit;
fi;

set -x 

echo "Installation starting.." > report

nix-build -o socat /etc/nixos/nixpkgs -A socat || { echo "Failed to build socat" >&2 ;  exit 2; };
nix-build -o qemu /etc/nixos/nixpkgs -A qemu || { echo "Failed to build qemu" >&2 ;  exit 2; };

echo "reboot" | ./socat/bin/socat tcp-listen:4424 stdio >> report &  

if ( ! [ -d dvd/iso ] ) || ( [ -z "$USE_LEFTOVER_DVD" ] ); then
    rm dvd
    # unset NIXPKGS_CONFIG to reduce host -> image configuration leak
    NIXPKGS_CONFIG= nix-build -o dvd /etc/nixos/nixos/configuration/closed-install.nix || 
      { echo "Failed to build LiveDVD" >&2 ;  exit 2; };
fi;

if ( ! [ -f install-test.img ] ) || ( [ -z "$JUST_BOOT" ] ); then
    rm install-test.img
    ./qemu/bin/qemu-img create -f qcow2 install-test.img 5G
{'fraction_non_alphanumeric': 0.15898174831892412, 'fraction_numerical': 0.01633045148895293, 'mean_word_length': 2.753153153153153, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6075459', 'n_tokens_mistral': 865, 'n_tokens_neox': 820, 'n_words': 229}