#!/bin/sh # Setup a mock with the minimum to run a lmc --no-virt iso or disk image build MOCKCFG="fedora-23-x86_64" PACKAGES="lorax qemu kpartx anaconda-tui" if [ -z "$1" ]; then echo "Pass path to boot.iso" exit 1 fi BOOT_ISO="$1" if [ -z "$2" ]; then echo "Pass path to kickstart" exit 1 fi KS_FILE="$2" [ -z "$3" ] && mock -r $MOCKCFG --init for pkg in $PACKAGES; do mock -r $MOCKCFG --install "$pkg" done mock -r $MOCKCFG --copyin "$PWD" /builddir/lorax/ mock -r $MOCKCFG --copyin "$BOOT_ISO" /builddir/boot.iso mock -r $MOCKCFG --copyin "$KS_FILE" /builddir/ks.cfg # Create a live iso inside mock with qemu+kvm mock -r $MOCKCFG --chroot "mknod /dev/kvm c 10 232; cd /builddir/lorax; PYTHONPATH=./src/ ./src/sbin/livemedia-creator --make-iso --iso /builddir/boot.iso --ks /builddir/ks.cfg --ram 4096 --proxy http://proxy.notae.us:8123" # Create a disk image inside mock with qemu+kvm #mock -r $MOCKCFG --chroot "mknod /dev/kvm c 10 232; cd /builddir/lorax; PYTHONPATH=./src/ ./src/sbin/livemedia-creator --make-disk --image-name bcl-foo.img --iso /builddir/boot.iso --ks /builddir/ks.cfg --ram 4096 --proxy http://proxy.notae.us:8123" # Create live iso inside mock with --no-virt (koji cmdline) #mock -r $MOCKCFG --chroot "cd /builddir/lorax; PYTHONPATH=./src/ ./src/sbin/livemedia-creator --ks /builddir/ks.cfg --logfile /tmp/lmc-logs/livemedia-out.log --no-virt --resultdir /tmp/lmc --make-iso --volid Fedora-WS-Live-23-1 --iso-only --iso-name Fedora-Workstation-Live-x86_64-24-1.iso --releasever 23 --title Fedora-Workstation-Live --macboot"