livecd-creator: fix /dev in chroot

This commit is contained in:
Wojtek Porczyk 2015-07-30 13:43:11 +02:00 committed by Marek Marczykowski-Górecki
parent 5553b98e2f
commit ac5128e9b3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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: