summaryrefslogtreecommitdiff
path: root/setup-preimage
blob: 7892a0df359f51d993b397e447016a2ea5ebe458 (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
#!/bin/sh -e

set -x;

# these will require proper mounting when actually used
mkdir -p dev proc sys tmp;

# overwrite leftovers from mcmtools bootstrap
cat > root/.bashrc <<EOF
PATH="${PATH}";
EOF

# handle git backend issue (hardcoded paths)
# git config --global http.sslCAInfo /cacert.pem
cat > root/.gitconfig <<EOF
[http]
    sslCAInfo = "${CURL_CA_BUNDLE}"
EOF

# handle CA certificate issue (this or 'CURL_CA_BUNDLE' env var)
cat > root/.curlrc <<EOF
--cacert "${CURL_CA_BUNDLE}"
EOF

# hack to create abuild user and group
# FIXME: have to use a patched 'abuild' anyway, debug me!
cat > etc/group <<EOF
abuild:x:300:builder
EOF
cat > etc/passwd <<EOF
builder:x:1000:300::/usr/src:/bin/sh
EOF

# maybe not necessary?
chown -R 1000:300 root etc;