summaryrefslogtreecommitdiffstats
path: root/images
diff options
context:
space:
mode:
Diffstat (limited to 'images')
-rw-r--r--images/Makefile.am44
-rw-r--r--images/README-binfiles13
-rwxr-xr-ximages/bin-i586-dynamicbin0 -> 4616 bytes
-rwxr-xr-ximages/bin-sparc-dynamicbin0 -> 5060 bytes
-rwxr-xr-ximages/bin-win32.exebin0 -> 21617 bytes
-rwxr-xr-ximages/bin-win64.exebin0 -> 44557 bytes
-rwxr-xr-ximages/bin-x86_64-dynamicbin0 -> 6484 bytes
-rwxr-xr-ximages/lib-i586.sobin0 -> 3834 bytes
-rwxr-xr-ximages/lib-sparc.sobin0 -> 4536 bytes
-rwxr-xr-ximages/lib-win32.dllbin0 -> 16402 bytes
-rwxr-xr-ximages/lib-win64.dllbin0 -> 34777 bytes
-rwxr-xr-ximages/lib-x86_64.sobin0 -> 5467 bytes
12 files changed, 54 insertions, 3 deletions
diff --git a/images/Makefile.am b/images/Makefile.am
index 56a22fd2..d4aed552 100644
--- a/images/Makefile.am
+++ b/images/Makefile.am
@@ -22,7 +22,18 @@ EXTRA_DIST = \
helloworld.tar \
helloworld.tar.gz \
mbr-ext2-empty.img.gz \
- empty known-1 known-2 known-3
+ empty known-1 known-2 known-3 \
+ bin-i586-dynamic \
+ bin-sparc-dynamic \
+ bin-win32.exe \
+ bin-win64.exe \
+ bin-x86_64-dynamic \
+ lib-i586.so \
+ lib-sparc.so \
+ lib-win32.dll \
+ lib-win64.dll \
+ lib-x86_64.so
+
noinst_DATA = test.sqsh
@@ -37,7 +48,17 @@ squash_files_src = \
$(srcdir)/empty \
$(srcdir)/known-1 \
$(srcdir)/known-2 \
- $(srcdir)/known-3
+ $(srcdir)/known-3 \
+ $(srcdir)/bin-i586-dynamic \
+ $(srcdir)/bin-sparc-dynamic \
+ $(srcdir)/bin-win32.exe \
+ $(srcdir)/bin-win64.exe \
+ $(srcdir)/bin-x86_64-dynamic \
+ $(srcdir)/lib-i586.so \
+ $(srcdir)/lib-sparc.so \
+ $(srcdir)/lib-win32.dll \
+ $(srcdir)/lib-win64.dll \
+ $(srcdir)/lib-x86_64.so
squash_files_build = \
$(builddir)/100kallzeroes \
@@ -45,7 +66,9 @@ squash_files_build = \
$(builddir)/100kallspaces \
$(builddir)/100krandom \
$(builddir)/10klines \
- $(builddir)/initrd
+ $(builddir)/initrd \
+ $(builddir)/initrd-x86_64.img \
+ $(builddir)/initrd-x86_64.img.gz
squash_files = $(squash_files_src) $(squash_files_build)
@@ -86,3 +109,18 @@ $(builddir)/initrd: empty known-1 known-2 known-3
rm -f $@ $@-t
for f in $^; do echo $$f; done | cpio -o -H newc | gzip --best > $@-t
mv $@-t $@
+
+# Create a dummy initrd with a single file called 'bin/nash' which
+# is used to test the Sys::Guestfs::Lib::file_architecture function.
+$(builddir)/initrd-x86_64.img: bin-x86_64-dynamic
+ rm -rf bin $@ $@-t
+ mkdir bin
+ cp $< bin/nash
+ echo bin/nash | cpio -o -H newc > $@-t
+ mv $@-t $@
+ rm -rf bin $@-t
+
+$(builddir)/initrd-x86_64.img.gz: initrd-x86_64.img
+ rm -f $@ $@-t
+ gzip --best -c $< > $@-t
+ mv $@-t $@
diff --git a/images/README-binfiles b/images/README-binfiles
new file mode 100644
index 00000000..f99fc847
--- /dev/null
+++ b/images/README-binfiles
@@ -0,0 +1,13 @@
+The bin-* and lib-* files are used for testing the
+Sys::Guestfs::Lib::file_architecture API.
+
+The bin-* files are generated from empty source files (ie.
+"main(){}") on the respective architectures.
+
+The lib-* files are generated from a (really) empty source file called
+lib.c which is linked into a library using gcc -shared on the
+respective architectures.
+
+If you are concerned that these binary files "lack source" then you
+can just remove them, but you may need to patch out tests in the perl/
+directory.
diff --git a/images/bin-i586-dynamic b/images/bin-i586-dynamic
new file mode 100755
index 00000000..4f770633
--- /dev/null
+++ b/images/bin-i586-dynamic
Binary files differ
diff --git a/images/bin-sparc-dynamic b/images/bin-sparc-dynamic
new file mode 100755
index 00000000..138839af
--- /dev/null
+++ b/images/bin-sparc-dynamic
Binary files differ
diff --git a/images/bin-win32.exe b/images/bin-win32.exe
new file mode 100755
index 00000000..db6d5758
--- /dev/null
+++ b/images/bin-win32.exe
Binary files differ
diff --git a/images/bin-win64.exe b/images/bin-win64.exe
new file mode 100755
index 00000000..98bddc02
--- /dev/null
+++ b/images/bin-win64.exe
Binary files differ
diff --git a/images/bin-x86_64-dynamic b/images/bin-x86_64-dynamic
new file mode 100755
index 00000000..033ac759
--- /dev/null
+++ b/images/bin-x86_64-dynamic
Binary files differ
diff --git a/images/lib-i586.so b/images/lib-i586.so
new file mode 100755
index 00000000..e82023a1
--- /dev/null
+++ b/images/lib-i586.so
Binary files differ
diff --git a/images/lib-sparc.so b/images/lib-sparc.so
new file mode 100755
index 00000000..7feec75e
--- /dev/null
+++ b/images/lib-sparc.so
Binary files differ
diff --git a/images/lib-win32.dll b/images/lib-win32.dll
new file mode 100755
index 00000000..e1a2d2e6
--- /dev/null
+++ b/images/lib-win32.dll
Binary files differ
diff --git a/images/lib-win64.dll b/images/lib-win64.dll
new file mode 100755
index 00000000..ca94485c
--- /dev/null
+++ b/images/lib-win64.dll
Binary files differ
diff --git a/images/lib-x86_64.so b/images/lib-x86_64.so
new file mode 100755
index 00000000..8cee4d20
--- /dev/null
+++ b/images/lib-x86_64.so
Binary files differ