lib-win64.dll \
lib-x86_64.so \
test-grep.txt \
- make-dummy-fedora-img.sh
+ guest-aux/make-fedora-img.sh \
+ guest-aux/fedora-name.db.txt \
+ guest-aux/fedora-name.db
noinst_DATA = test.iso
mv $@-t $@
# Make a (dummy) Fedora image.
-fedora.img: make-dummy-fedora-img.sh
+fedora.img: guest-aux/make-fedora-img.sh guest-aux/fedora-name.db
LIBGUESTFS_PATH=../appliance \
LD_LIBRARY_PATH=../src/.libs \
bash $<
+
+guest-aux/fedora-name.db: guest-aux/fedora-name.db.txt
+ db_load $@ < $<
export LANG=C
set -e
-rm -f fedora.img
-
+# fstab file.
cat > fstab.tmp <<EOF
LABEL=BOOT /boot ext2 default 0 0
LABEL=ROOT / ext2 default 0 0
# Create a disk image.
../fish/guestfish <<'EOF'
-sparse fedora.img- 512M
+sparse fedora.img.tmp 512M
run
# Format the disk.
# Phony /boot filesystem.
mkfs-b ext2 4096 /dev/sda1
set-e2label /dev/sda1 BOOT
+set-e2uuid /dev/sda1 01234567-0123-0123-0123-012345678901
# Phony root filesystem.
mkfs-b ext2 4096 /dev/VG/Root
set-e2label /dev/VG/Root ROOT
+set-e2uuid /dev/VG/Root 01234567-0123-0123-0123-012345678902
-# Enough to fool virt-inspector.
+# Enough to fool inspection API.
mount-options "" /dev/VG/Root /
mkdir /boot
mount-options "" /dev/sda1 /boot
mkdir /bin
mkdir /etc
+mkdir /etc/sysconfig
mkdir /usr
+mkdir-p /var/lib/rpm
+
upload fstab.tmp /etc/fstab
+write /etc/redhat-release "Fedora release 14 (Phony)"
+write /etc/fedora-release "Fedora release 14 (Phony)"
+write /etc/sysconfig/network "HOSTNAME=fedora.invalid"
+
+upload guest-aux/fedora-name.db /var/lib/rpm/Name
+
+upload bin-x86_64-dynamic /bin/ls
+
mkdir /boot/grub
touch /boot/grub/grub.conf
EOF
rm fstab.tmp
-mv fedora.img- fedora.img
+mv fedora.img.tmp fedora.img
uuid=868b1447-0ec5-41bf-a2e5-6a77a4c9b66f
# Read out the test directory using virt-ls.
-if [ "$(./virt-ls ../images/fedora.img /bin)" != "test1
+if [ "$(./virt-ls ../images/fedora.img /bin)" != "ls
+test1
test2
test3
test4