From 6d4815d3a4921219379bc9ec3cceead217668426 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 16 Nov 2010 15:41:16 +0000 Subject: [PATCH] images: Make a better phony Fedora image. This now includes a product string, major and minor version, hostname and even some applications. --- .gitignore | 1 + images/Makefile.am | 9 +++++++-- images/guest-aux/fedora-name.db.txt | 13 +++++++++++++ .../make-fedora-img.sh} | 22 +++++++++++++++++----- tools/test-virt-ls.sh | 3 ++- tools/test-virt-tar.sh | 1 + 6 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 images/guest-aux/fedora-name.db.txt rename images/{make-dummy-fedora-img.sh => guest-aux/make-fedora-img.sh} (80%) diff --git a/.gitignore b/.gitignore index b4cc493..9fe53f0 100644 --- a/.gitignore +++ b/.gitignore @@ -125,6 +125,7 @@ images/100krandom images/10klines images/abssymlink images/fedora.img +images/guest-aux/fedora-name.db images/hello.b64 images/initrd images/initrd-x86_64.img diff --git a/images/Makefile.am b/images/Makefile.am index b1b4855..a2eb199 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -37,7 +37,9 @@ EXTRA_DIST = \ 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 @@ -157,7 +159,10 @@ $(builddir)/test-grep.txt.gz: test-grep.txt 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 $@ < $< diff --git a/images/guest-aux/fedora-name.db.txt b/images/guest-aux/fedora-name.db.txt new file mode 100644 index 0000000..105b0fe --- /dev/null +++ b/images/guest-aux/fedora-name.db.txt @@ -0,0 +1,13 @@ +VERSION=3 +format=print +type=hash +h_nelem=3 +db_pagesize=4096 +HEADER=END + test1 + !\0b\00\00\00\00\00\00 + test2 + 7\0b\00\00\00\00\00\00 + test3 + \dd\0c\00\00\00\00\00\00 +DATA=END diff --git a/images/make-dummy-fedora-img.sh b/images/guest-aux/make-fedora-img.sh similarity index 80% rename from images/make-dummy-fedora-img.sh rename to images/guest-aux/make-fedora-img.sh index 635ad10..3198930 100755 --- a/images/make-dummy-fedora-img.sh +++ b/images/guest-aux/make-fedora-img.sh @@ -24,8 +24,7 @@ export LANG=C set -e -rm -f fedora.img - +# fstab file. cat > fstab.tmp <