summaryrefslogtreecommitdiff
path: root/debian/patches/debootstrap-Also-mount-sysfs.patch
blob: 2ab8f36a7b3433c07a9f56ed9b63a00ced20d405 (plain)
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
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date: Mon, 20 Feb 2017 21:17:34 +0100
Subject: debootstrap: Also mount sysfs

At least the systemd testsuite assumes the build environment has /sys
mounted, so lets mount it.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
 build-recipe-debootstrap | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/build-recipe-debootstrap b/build-recipe-debootstrap
index 8d761bd..c1ef4ad 100644
--- a/build-recipe-debootstrap
+++ b/build-recipe-debootstrap
@@ -67,6 +67,7 @@ recipe_build_debootstrap() {
 
     # Mount special filesystem in the debootstrap build root
     mount -n -tproc none $BUILD_ROOT/$myroot/proc
+    mount -n -tsysfs -o ro none $BUILD_ROOT/$myroot/sys
     mount -n -tdevpts -omode=0620,ptmxmode=0666,gid=5,newinstance, none $BUILD_ROOT/$myroot/dev/pts
     mkdir -p $BUILD_ROOT/$myroot/dev/shm
     mount -n -ttmpfs none $BUILD_ROOT/$myroot/dev/shm
@@ -79,6 +80,7 @@ recipe_build_debootstrap() {
 
     umount -n $BUILD_ROOT/$myroot/proc/sys/fs/binfmt_misc 2>/dev/null || true
     umount -n $BUILD_ROOT/$myroot/proc
+    umount -n $BUILD_ROOT/$myroot/sys
     umount -n $BUILD_ROOT/$myroot/dev/pts
     umount -n $BUILD_ROOT/$myroot/dev/shm