##// END OF EJS Templates
change qemu permissions in the chroot environment so that the _apt user can execute commands.
Justin Friel -
r151:2e44635ee733
parent child
Show More
@@ -1,47 +1,47
1 1 #
2 2 # Debootstrap basic system
3 3 #
4 4
5 5 # Load utility functions
6 6 . ./functions.sh
7 7
8 8 VARIANT=""
9 9 COMPONENTS="main"
10 10 EXCLUDES=""
11 11
12 12 # Use non-free Debian packages if needed
13 13 if [ "$ENABLE_NONFREE" = true ] ; then
14 14 COMPONENTS="main,non-free"
15 15 fi
16 16
17 17 # Use minbase bootstrap variant which only includes essential packages
18 18 if [ "$ENABLE_MINBASE" = true ] ; then
19 19 VARIANT="--variant=minbase"
20 20 fi
21 21
22 22 # Exclude packages if required by Debian release
23 23 if [ "$RELEASE" = "stretch" ] ; then
24 24 EXCLUDES="--exclude=init,systemd-sysv"
25 25 fi
26 26
27 27 # Base debootstrap (unpack only)
28 28 http_proxy=${APT_PROXY} debootstrap ${EXCLUDES} --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}/debian"
29 29
30 30 # Copy qemu emulator binary to chroot
31 install_exec "${QEMU_BINARY}" "${R}${QEMU_BINARY}"
31 install -m 755 -o root -g root "${QEMU_BINARY}" "${R}${QEMU_BINARY}"
32 32
33 33 # Copy debian-archive-keyring.pgp
34 34 mkdir -p "${R}/usr/share/keyrings"
35 35 install_readonly /usr/share/keyrings/debian-archive-keyring.gpg "${R}/usr/share/keyrings/debian-archive-keyring.gpg"
36 36
37 37 # Complete the bootstrapping process
38 38 chroot_exec /debootstrap/debootstrap --second-stage
39 39
40 40 # Mount required filesystems
41 41 mount -t proc none "${R}/proc"
42 42 mount -t sysfs none "${R}/sys"
43 43
44 44 # Mount pseudo terminal slave if supported by Debian release
45 45 if [ -d "${R}/dev/pts" ] ; then
46 46 mount --bind /dev/pts "${R}/dev/pts"
47 47 fi
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant