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