about summary refs log tree commit diff stats
path: root/core/scripts/install-core.sh
blob: d4d69832155aac4fbb432f11a5f3c498597a333e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
pre { line-height: 125%; }
td
#!/bin/bash

CHROOT="/mnt"
PORT_PKG="${CHROOT}/media/crux"

#echo "1.1.8. Install Handbook\n"
#cp ${PORT_PKG}/handbook.txt $CHROOT/root/

ConfirmOrExit()
{
    while true
    do
        echo -n "Please confirm (y or n) :"
        read CONFIRM
        case $CONFIRM in
            y|Y|YES|yes|Yes) break ;;
            n|N|no|NO|No)
                echo "Aborting - you entered $CONFIRM"
                exit
                ;;
            *) echo "Please enter only y or n"
        esac
    done
    echo "You entered $CONFIRM. Continuing ..."
}


install_core() {

    mkdir -p ${CHROOT}/var/lib/pkg
    touch ${CHROOT}/var/lib/pkg/db

    CORE_LS="${DATA_DIR}/core.pkg"

    if [ ! -f ${CORE_LS} ]; then
        CORE_LS=${CHROOT}/core.pkg
        echo "1.1.4 Create core.pkg and install pkgadd"
        for p in ${PORT_PKG}/core/*;
        do
            echo $(basename $p) >> ${CORE_LS};
        done
    fi

    tar xf "${PORT_PKG}/core/pkgutils#5.40-1.pkg.tar.xz" usr/bin/pkgadd -O > ${CHROOT}/pkgadd

    chmod +x ${CHROOT}/pkgadd

    echo "1.1.4 File core.pkg complete, review list of packages before continue..."
    read PAUSE
    vim ${CORE_LS}

    echo "1.1.4 Starting install"

    #cd $CHROOT
    while read line; do
        pkg=${PORT_PKG}/core/${line}
        echo "Installing ${pkg};\n"
        ${CHROOT}/pkgadd -f -r ${CHROOT} ${pkg}
    done < ${CORE_LS}

    rm ${CHROOT}/pkgadd

    if [ -f ${CHROOT}/core.pkg ]; then
        rm ${CHROOT}/core.pkg;
    fi
}

install_packages() {
    echo "Installing $CHROOT/media/crux/opt/fakeroot"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/fakeroot#*
    echo "Installing $CHROOT/media/crux/opt/dbus"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/dbus#*
    echo "Installing $CHROOT/media/crux/opt/expat"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/expat#*
    echo "Installing $CHROOT/media/crux/opt/libnl"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libnl#*
    echo "Installing $CHROOT/media/crux/opt/libpng"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libpng#*
    echo "Installing $CHROOT/media/crux/opt/freetype"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/freetype#*
    echo "Installing $CHROOT/media/crux/opt/libffi"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libffi#*
    echo "Installing $CHROOT/media/crux/opt/sqlite3"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/sqlite3#*
    echo "Installing $CHROOT/media/crux/opt/python"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/python#*
    echo "Installing $CHROOT/media/crux/opt/glib"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/glib#*
    echo "Installing $CHROOT/media/crux/opt/grub2"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/grub2#*
    echo "Installing $CHROOT/media/crux/opt/grub2-efi"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/grub2-efi#*
    echo "Installing $CHROOT/media/crux/opt/wireless-tools"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/wireless-tools#*
    echo "Installing $CHROOT/media/crux/opt/wpa_supplicant"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/wpa_supplicant#*
    echo "Installing $CHROOT/media/crux/opt/lvm2"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/lvm2#*
    echo "Installing $CHROOT/media/crux/opt/mdadm"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/mdadm#*
    echo "Installing $CHROOT/media/crux/opt/efivar"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/efivar#*
    echo "Installing $CHROOT/media/crux/opt/efibootmgr"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/efibootmgr#*
    echo "Installing $CHROOT/media/crux/opt/dosfstools"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/dosfstools#*
    echo "Installing $CHROOT/media/crux/opt/parted"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/parted#*
    echo "Installing $CHROOT/media/crux/opt/libgcrypt"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libgcrypt#*
    echo "Installing $CHROOT/media/crux/opt/cryptsetup"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/cryptsetup#*
    echo "Installing $CHROOT/media/crux/opt/popt"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/popt#*
    echo "Installing $CHROOT/media/crux/opt/libgpg-error"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libgpg-error#*
    echo "Installing $CHROOT/media/crux/opt/libevent"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libevent#*
    echo "Installing $CHROOT/media/crux/opt/libtirpc"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/libtirpc#*
    echo "Installing $CHROOT/media/crux/opt/git"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/git#*
    echo "Installing $CHROOT/media/crux/opt/tmux"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/tmux#*
    echo "Installing $CHROOT/media/crux/opt/prt-utils"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/prt-utils#*
    echo "Installing $CHROOT/media/crux/opt/elfutils"
    $CHROOT/usr/bin/pkgadd -f -r $CHROOT $CHROOT/media/crux/opt/elfutils#*
}

echo "PORT_PKG=${PORT_PKG}";
echo "CHROOT=$CHROOT";

ConfirmOrExit
install_core
install_packages
s="n">curr) != 0) { raise << maybe(current_recipe_name()) << "memory in free list was not zeroed out: " << curr << '/' << result << "; somebody wrote to us after free!!!\n" << end(); break; // always fatal } } return result; } :(scenario new_differing_size_no_reclaim) def main [ 1:&:num <- new number:type 2:num <- deaddress 1:&:num abandon 1:&:num 3:&:@:num <- new number:type, 2 # different size 4:num <- deaddress 3:&:@:num 5:bool <- equal 2:num, 4:num ] # no reuse +mem: storing 0 in location 5 :(scenario new_reclaim_array) def main [ 10:&:@:num <- new number:type, 2 20:num <- deaddress 10:&:@:num abandon 10:&:@:num 30:&:@:num <- new number:type, 2 # same size 40:num <- deaddress 30:&:@:num 50:bool <- equal 20:num, 40:num ] # both calls to new returned identical addresses +mem: storing 1 in location 50 :(scenario lookup_of_abandoned_address_raises_error) % Hide_errors = true; def main [ 1:&:num <- new num:type 3:&:num <- copy 1:&:num abandon 1:&:num 5:num/raw <- copy *3:&:num ] +error: main: address is already abandoned in '5:num/raw <- copy *3:&:num'