File: kernel_build_deb_qemu.sh

package info (click to toggle)
android-cuttlefish 1.0.1-0~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,192 kB
  • sloc: cpp: 39,149; sh: 2,523; javascript: 242; exp: 152; python: 125; makefile: 88
file content (49 lines) | stat: -rwxr-xr-x 1,154 bytes parent folder | download
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
#!/bin/sh

SELFPID=$$
renice 10 -p "$SELFPID"
ionice -c 3 -p "$SELFPID"

TDIR=`pwd`/kernel-build-space
mkdir -p ${TDIR}

cat <<EOF > ${TDIR}/buildscript1
#!/bin/sh

apt-get install -y sudo
apt-get install -y git ca-certificates less
apt-get install -y fakeroot
apt-get install -y devscripts equivs
apt-get install -y ubuntu-dev-tools

mkdir /tmp/r1
cd /tmp/r1
pull-debian-source repo
cd repo-*
mk-build-deps --install --root-cmd sudo --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
debuild
cd ..

sudo apt -o Apt::Get::Assume-Yes=true -o APT::Color=0 -o DPkgPM::Progress-Fancy=0 install ./*.deb

cd /root
EOF

if [ x"${CI_PIPELINE_ID}" != x ]; then
    cat <<EOF >> ${TDIR}/buildscript1
export CI_PIPELINE_ID="${CI_PIPELINE_ID}"
EOF
fi

cat kernel_dependencies.sh >> ${TDIR}/buildscript1
cat kernel_download.sh >> ${TDIR}/buildscript1
cat kernel_build_deb.sh >> ${TDIR}/buildscript1

cat <<EOF >> ${TDIR}/buildscript1
cp -f /root/kernel-build-space/buildresult/*.deb ${TDIR}
EOF

chmod a+rx ${TDIR}/buildscript1

cd ${TDIR}
pbuilder-dist stable arm64 execute --bindmounts "${TDIR}" -- buildscript1