File tree 4 files changed +16
-0
lines changed
4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ RUN curl -O https://ci-mirrors.rust-lang.org/rustc/vexpress-v2p-ca15-tc1.dtb
78
78
COPY scripts/sccache.sh /scripts/
79
79
RUN sh /scripts/sccache.sh
80
80
81
+ COPY static/gitconfig /etc/gitconfig
82
+
81
83
ENV RUST_CONFIGURE_ARGS --qemu-armhf-rootfs=/tmp/rootfs
82
84
ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target arm-unknown-linux-gnueabihf
83
85
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ ENV TARGETS=wasm32-unknown-emscripten
48
48
# Use -O1 optimizations in the link step to reduce time spent optimizing.
49
49
ENV EMCC_CFLAGS=-O1
50
50
51
+ COPY static/gitconfig /etc/gitconfig
52
+
51
53
# Emscripten installation is user-specific
52
54
ENV NO_CHANGE_USER=1
53
55
Original file line number Diff line number Diff line change
1
+ [safe]
2
+ directory = *
Original file line number Diff line number Diff line change @@ -11,6 +11,16 @@ if [ "$NO_CHANGE_USER" = "" ]; then
11
11
useradd --shell /bin/bash -u $LOCAL_USER_ID -o -c " " -m user
12
12
export HOME=/home/user
13
13
unset LOCAL_USER_ID
14
+
15
+ # Ensure that runners are able to execute git commands in the worktree,
16
+ # overriding the typical git protections. In our docker container we're running
17
+ # as root, while the user owning the checkout is not root.
18
+ # This is only necessary when we change the user, otherwise we should
19
+ # already be running with the right user.
20
+ #
21
+ # For NO_CHANGE_USER done in the small number of Dockerfiles affected.
22
+ echo -e ' [safe]\n\tdirectory = *' > /home/user/gitconfig
23
+
14
24
exec su --preserve-environment -c " env PATH=$PATH \" $0 \" " user
15
25
fi
16
26
fi
You can’t perform that action at this time.
0 commit comments