summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2017-02-20 20:22:43 (GMT)
committerAndrew Lee (李健秋) <ajqlee@debian.org>2017-02-21 13:52:51 (GMT)
commit6c96eb64f598947bbe301b6b8700196568119b61 (patch)
tree5df9f8bd898ca8b504fbd1d967fc54adb6a1db5b
parent25d915644c8d5e3461d6f12fdd76a0a1154217f3 (diff)
downloadobs-build-6c96eb64f598947bbe301b6b8700196568119b61.tar.gz
obs-build-6c96eb64f598947bbe301b6b8700196568119b61.tar.xz
Mount sysfs in debootstrapped build environment
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-rw-r--r--debian/patches/debootstrap-Also-mount-sysfs.patch32
-rw-r--r--debian/patches/series3
2 files changed, 33 insertions, 2 deletions
diff --git a/debian/patches/debootstrap-Also-mount-sysfs.patch b/debian/patches/debootstrap-Also-mount-sysfs.patch
new file mode 100644
index 0000000..2ab8f36
--- /dev/null
+++ b/debian/patches/debootstrap-Also-mount-sysfs.patch
@@ -0,0 +1,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
+
diff --git a/debian/patches/series b/debian/patches/series
index 7cb5a4c..c51d603 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,5 @@
0001-Use-obs-build-in-locations-and-executable-names-inst.patch
0010_find-perm_slash.diff
-
0001-Correct-debootstrap-log-path.patch
0002-deb-Force-unsafe-io-when-install-packages.patch
0003-snapcraft-Drop-duplicated-code.patch
@@ -9,4 +8,4 @@
0006-debootstrap-Mount-virtual-filesystems-in-the-deboots.patch
0007-debootstrap-Always-try-to-unmount-binfmt_misc.patch
0008-debootstrap-Improve-devpts-mounting.patch
-
+debootstrap-Also-mount-sysfs.patch