From ac5128e9b3717987fa93e5392b4ba5ab1377dbc1 Mon Sep 17 00:00:00 2001 From: Wojtek Porczyk Date: Thu, 30 Jul 2015 13:43:11 +0200 Subject: [PATCH] livecd-creator: fix /dev in chroot --- live/qubes-live.spec | 8 +++++++- livecd-creator-qubes | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/live/qubes-live.spec b/live/qubes-live.spec index e26a4f1..caaac89 100644 --- a/live/qubes-live.spec +++ b/live/qubes-live.spec @@ -1,3 +1,7 @@ +%if 0%{?qubes_builder} +%define _builddir %(pwd)/live +%endif + Name: qubes-live Version: 1.0 Release: 1%{?dist} @@ -16,7 +20,9 @@ Various fixes for Qubes Live edition %install -install -D -m 0755 -t /etc/rc.d/init.d/ \ + +install -d -m 0755 $RPM_BUILD_ROOT/etc/rc.d/init.d/ +install -m 0755 -t $RPM_BUILD_ROOT/etc/rc.d/init.d/ \ livesys \ livesys-late diff --git a/livecd-creator-qubes b/livecd-creator-qubes index 34533c1..ee858ef 100755 --- a/livecd-creator-qubes +++ b/livecd-creator-qubes @@ -19,6 +19,7 @@ import os import os.path +import stat import sys import time import optparse @@ -208,6 +209,14 @@ def main(): try: creator.mount(options.base_on, options.cachedir) + + # fix /dev + os.mknod(os.path.join( + creator._instroot, 'dev/loop-control'), 0666 | stat.S_IFBLK, os.makedev(10, 237)) + for i in range(8): + os.mknod(os.path.join(creator._instroot, 'dev/loop{}'.format(i)), + 0666 | stat.S_IFBLK, os.makedev(7, i)) + creator.install() creator.configure() if options.give_shell: