Skip to content

Commit 82bd1a3

Browse files
build_container: uniform git clones
Let's clean up the git clones a bit, always using depth=1 to be faster and directly checkout the branch needed. Let's make the script a little more readable by also adding some comments, like the crate that needs the dependency. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
1 parent 69aeebd commit 82bd1a3

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

build_container.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,28 +86,37 @@ cargo install cargo-llvm-cov
8686
# support riscv64 too, let's skip them for now.
8787
if [ "$ARCH" != "riscv64" ]; then
8888
pushd /opt
89-
git clone https://android.googlesource.com/platform/hardware/google/aemu
89+
90+
# required by vhost-device-gpu
91+
git clone --depth 1 --branch v0.1.2-aemu-release \
92+
https://android.googlesource.com/platform/hardware/google/aemu
9093
pushd aemu
91-
git checkout v0.1.2-aemu-release
9294
cmake -DAEMU_COMMON_GEN_PKGCONFIG=ON \
9395
-DAEMU_COMMON_BUILD_CONFIG=gfxstream \
9496
-DENABLE_VKCEREAL_TESTS=OFF -B build
9597
cmake --build build -j
9698
cmake --install build
9799
popd
98100
rm -rf aemu
99-
git clone https://android.googlesource.com/platform/hardware/google/gfxstream
101+
102+
# required by vhost-device-gpu
103+
git clone --depth 1 --branch v0.1.2-gfxstream-release \
104+
https://android.googlesource.com/platform/hardware/google/gfxstream
100105
pushd gfxstream
101-
git checkout v0.1.2-gfxstream-release
102106
meson setup host-build/
103107
meson install -C host-build/
104108
popd
105109
rm -rf gfxstream
106-
git clone --depth 1 --branch v2.0 https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
110+
111+
# required by vhost-device-gpio
112+
git clone --depth 1 --branch v2.0 \
113+
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
107114
pushd libgpiod
108115
./autogen.sh --prefix=/usr && make && make install
109116
popd
110117
rm -rf libgpiod
118+
119+
# we can leave /opt at this point
111120
popd
112121

113122
# configure dynamic linker run-time bindings after installing new libraries

0 commit comments

Comments
 (0)