diff options
Diffstat (limited to 'setup-preimage')
-rwxr-xr-x | setup-preimage | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/setup-preimage b/setup-preimage new file mode 100755 index 0000000..7892a0d --- /dev/null +++ b/setup-preimage @@ -0,0 +1,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; |