[PATCH] builder: Rearrange how template-building scripts work.
by Richard W.M. Jones
Create a new directory (builder/template). Integrate all of the
scripts into a single program, so that templates are generated more
consistently.
This also changes how the index file is generated. The script now
generates the index file fragment and saves it under version control,
and then generates the final index file by concatenating these.
(Previously the index was written by hand which was tedious and
error-prone.)
The new script also saves the generated kickstart under version
control so it can be referenced later.
---
Makefile.am | 8 +-
builder/{website => templates}/Makefile.am | 42 +-
builder/templates/centos-6.index-fragment | 23 +
builder/templates/centos-7.0.index-fragment | 19 +
builder/templates/centos-7.1.index-fragment | 19 +
.../templates/centos-7.2-aarch64.index-fragment | 19 +
builder/templates/centos-7.2.index-fragment | 19 +
builder/templates/cirros-0.3.1.index-fragment | 19 +
builder/templates/debian-6.index-fragment | 32 +
builder/templates/debian-7-sparc64.index-fragment | 35 +
builder/templates/debian-7.index-fragment | 32 +
builder/templates/debian-8.index-fragment | 30 +
builder/{website => templates}/debian.preseed | 2 +-
builder/templates/fedora-18.index-fragment | 22 +
builder/templates/fedora-19.index-fragment | 23 +
builder/templates/fedora-20.index-fragment | 23 +
builder/templates/fedora-21-aarch64.index-fragment | 25 +
builder/templates/fedora-21-armv7l.index-fragment | 22 +
builder/templates/fedora-21-ppc64.index-fragment | 23 +
builder/templates/fedora-21-ppc64le.index-fragment | 23 +
builder/templates/fedora-21.index-fragment | 23 +
builder/templates/fedora-22-aarch64.index-fragment | 25 +
builder/templates/fedora-22-armv7l.index-fragment | 22 +
builder/templates/fedora-22-i686.index-fragment | 22 +
builder/templates/fedora-22.index-fragment | 22 +
builder/templates/fedora-23-aarch64.index-fragment | 25 +
builder/templates/fedora-23-armv7l.index-fragment | 22 +
builder/templates/fedora-23-i686.index-fragment | 23 +
builder/templates/fedora-23-ppc64.index-fragment | 22 +
builder/templates/fedora-23-ppc64le.index-fragment | 23 +
builder/templates/fedora-23.index-fragment | 23 +
builder/templates/fedora-24-aarch64.index-fragment | 25 +
builder/templates/fedora-24-armv7l.index-fragment | 22 +
builder/templates/fedora-24-i686.index-fragment | 22 +
builder/templates/fedora-24.index-fragment | 22 +
builder/templates/fedora-25-aarch64.index-fragment | 25 +
builder/templates/fedora-25-armv7l.index-fragment | 22 +
builder/templates/fedora-25-i686.index-fragment | 22 +
builder/templates/fedora-25-ppc64.index-fragment | 23 +
builder/templates/fedora-25-ppc64le.index-fragment | 23 +
builder/templates/fedora-25.index-fragment | 22 +
builder/templates/make-template.ml | 1014 ++++++++++++++++++++
builder/templates/scientificlinux-6.index-fragment | 23 +
builder/templates/ubuntu-10.04.index-fragment | 25 +
builder/templates/ubuntu-12.04.index-fragment | 25 +
builder/templates/ubuntu-14.04.index-fragment | 31 +
builder/templates/ubuntu-16.04.index-fragment | 38 +
builder/{website => templates}/ubuntu.preseed | 0
builder/{website => templates}/validate.sh | 6 +-
.../virt-builder/repos.d/libguestfs.conf.in | 2 +-
builder/virt-builder.pod | 4 +-
builder/website/.gitignore | 1 -
builder/website/centos-aarch64.sh | 93 --
builder/website/centos.sh | 101 --
builder/website/compress.sh | 42 -
builder/website/debian.sh | 84 --
builder/website/fedora-aarch64.sh | 109 ---
builder/website/fedora-armv7l.sh | 97 --
builder/website/fedora-i686.sh | 105 --
builder/website/fedora-ppc64.sh | 97 --
builder/website/fedora-ppc64le.sh | 97 --
builder/website/fedora-s390x.sh | 97 --
builder/website/fedora.sh | 105 --
builder/website/rhel-aarch64.sh | 165 ----
builder/website/rhel-ppc64.sh | 145 ---
builder/website/rhel-ppc64le.sh | 145 ---
builder/website/rhel.sh | 230 -----
builder/website/scientificlinux.sh | 91 --
builder/website/test-guest.sh | 90 --
builder/website/ubuntu-ppc64le.sh | 76 --
builder/website/ubuntu.sh | 80 --
configure.ac | 2 +-
.../website => website/download/builder}/README | 9 +-
.../website => website/download/builder}/index | 381 ++++----
.../website => website/download/builder}/index.asc | 0
75 files changed, 2265 insertions(+), 2285 deletions(-)
rename builder/{website => templates}/Makefile.am (66%)
create mode 100644 builder/templates/centos-6.index-fragment
create mode 100644 builder/templates/centos-7.0.index-fragment
create mode 100644 builder/templates/centos-7.1.index-fragment
create mode 100644 builder/templates/centos-7.2-aarch64.index-fragment
create mode 100644 builder/templates/centos-7.2.index-fragment
create mode 100644 builder/templates/cirros-0.3.1.index-fragment
create mode 100644 builder/templates/debian-6.index-fragment
create mode 100644 builder/templates/debian-7-sparc64.index-fragment
create mode 100644 builder/templates/debian-7.index-fragment
create mode 100644 builder/templates/debian-8.index-fragment
rename builder/{website => templates}/debian.preseed (99%)
create mode 100644 builder/templates/fedora-18.index-fragment
create mode 100644 builder/templates/fedora-19.index-fragment
create mode 100644 builder/templates/fedora-20.index-fragment
create mode 100644 builder/templates/fedora-21-aarch64.index-fragment
create mode 100644 builder/templates/fedora-21-armv7l.index-fragment
create mode 100644 builder/templates/fedora-21-ppc64.index-fragment
create mode 100644 builder/templates/fedora-21-ppc64le.index-fragment
create mode 100644 builder/templates/fedora-21.index-fragment
create mode 100644 builder/templates/fedora-22-aarch64.index-fragment
create mode 100644 builder/templates/fedora-22-armv7l.index-fragment
create mode 100644 builder/templates/fedora-22-i686.index-fragment
create mode 100644 builder/templates/fedora-22.index-fragment
create mode 100644 builder/templates/fedora-23-aarch64.index-fragment
create mode 100644 builder/templates/fedora-23-armv7l.index-fragment
create mode 100644 builder/templates/fedora-23-i686.index-fragment
create mode 100644 builder/templates/fedora-23-ppc64.index-fragment
create mode 100644 builder/templates/fedora-23-ppc64le.index-fragment
create mode 100644 builder/templates/fedora-23.index-fragment
create mode 100644 builder/templates/fedora-24-aarch64.index-fragment
create mode 100644 builder/templates/fedora-24-armv7l.index-fragment
create mode 100644 builder/templates/fedora-24-i686.index-fragment
create mode 100644 builder/templates/fedora-24.index-fragment
create mode 100644 builder/templates/fedora-25-aarch64.index-fragment
create mode 100644 builder/templates/fedora-25-armv7l.index-fragment
create mode 100644 builder/templates/fedora-25-i686.index-fragment
create mode 100644 builder/templates/fedora-25-ppc64.index-fragment
create mode 100644 builder/templates/fedora-25-ppc64le.index-fragment
create mode 100644 builder/templates/fedora-25.index-fragment
create mode 100755 builder/templates/make-template.ml
create mode 100644 builder/templates/scientificlinux-6.index-fragment
create mode 100644 builder/templates/ubuntu-10.04.index-fragment
create mode 100644 builder/templates/ubuntu-12.04.index-fragment
create mode 100644 builder/templates/ubuntu-14.04.index-fragment
create mode 100644 builder/templates/ubuntu-16.04.index-fragment
rename builder/{website => templates}/ubuntu.preseed (100%)
rename builder/{website => templates}/validate.sh (84%)
delete mode 100644 builder/website/.gitignore
delete mode 100755 builder/website/centos-aarch64.sh
delete mode 100755 builder/website/centos.sh
delete mode 100644 builder/website/compress.sh
delete mode 100755 builder/website/debian.sh
delete mode 100755 builder/website/fedora-aarch64.sh
delete mode 100755 builder/website/fedora-armv7l.sh
delete mode 100755 builder/website/fedora-i686.sh
delete mode 100755 builder/website/fedora-ppc64.sh
delete mode 100755 builder/website/fedora-ppc64le.sh
delete mode 100755 builder/website/fedora-s390x.sh
delete mode 100755 builder/website/fedora.sh
delete mode 100755 builder/website/rhel-aarch64.sh
delete mode 100755 builder/website/rhel-ppc64.sh
delete mode 100755 builder/website/rhel-ppc64le.sh
delete mode 100755 builder/website/rhel.sh
delete mode 100755 builder/website/scientificlinux.sh
delete mode 100755 builder/website/test-guest.sh
delete mode 100755 builder/website/ubuntu-ppc64le.sh
delete mode 100755 builder/website/ubuntu.sh
rename {builder/website => website/download/builder}/README (82%)
rename {builder/website => website/download/builder}/index (99%)
rename {builder/website => website/download/builder}/index.asc (100%)
diff --git a/Makefile.am b/Makefile.am
index 0756fbc..a477a97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -146,7 +146,7 @@ if HAVE_OCAML
SUBDIRS += \
mllib \
customize \
- builder builder/website \
+ builder builder/templates \
get-kernel \
resize \
sparsify \
@@ -248,12 +248,6 @@ EXTRA_DIST = \
zanata.xml \
zanata-pull.sh
-# XXX Eventually move builder/website under website/ top level directory.
-BUILDERFILES = \
- builder/website/README \
- builder/website/index \
- builder/website/index.asc
-
WEBSITEDIR = $(HOME)/d/websites/libguestfs
noinst_DATA = \
diff --git a/builder/website/Makefile.am b/builder/templates/Makefile.am
similarity index 66%
rename from builder/website/Makefile.am
rename to builder/templates/Makefile.am
index d79b9a0..d1b89f9 100644
--- a/builder/website/Makefile.am
+++ b/builder/templates/Makefile.am
@@ -1,5 +1,5 @@
# libguestfs virt-builder tool
-# Copyright (C) 2013 Red Hat Inc.
+# Copyright (C) 2013-2016 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,33 +17,25 @@
include $(top_srcdir)/subdir-rules.mk
+index_fragments = $(wildcard *.index-fragment)
+
EXTRA_DIST = \
- .gitignore \
- compress.sh \
- test-guest.sh \
- validate.sh \
- README \
- index \
- index.asc \
- centos.sh \
- centos-aarch64.sh \
+ $(index_fragments) \
+ *.ks \
debian.preseed \
- debian.sh \
- fedora.sh \
- fedora-aarch64.sh \
- fedora-armv7l.sh \
- fedora-i686.sh \
- fedora-ppc64.sh \
- fedora-ppc64le.sh \
- fedora-s390x.sh \
- rhel.sh \
- rhel-aarch64.sh \
- rhel-ppc64.sh \
- rhel-ppc64le.sh \
- scientificlinux.sh \
+ make-template.ml \
ubuntu.preseed \
- ubuntu.sh \
- ubuntu-ppc64le.sh
+ validate.sh
+
+# Create the index file under the top level website/ directory.
+noinst_DATA = $(top_builddir)/website/download/builder/index
+
+$(top_builddir)/website/download/builder/index: $(index_fragments)
+ rm -f $@ $@-t
+ cat *.index-fragment > $@-t
+ mv $@-t $@
+ @echo "NOTE: $@.asc must be updated by running:"
+ @echo " gpg --clearsign --armor $@"
# Validates the index file.
TESTS_ENVIRONMENT = $(top_builddir)/run --test
diff --git a/builder/templates/centos-6.index-fragment b/builder/templates/centos-6.index-fragment
new file mode 100644
index 0000000..8bda956
--- /dev/null
+++ b/builder/templates/centos-6.index-fragment
@@ -0,0 +1,23 @@
+[centos-6]
+name=CentOS 6.6
+osinfo=centos6.6
+arch=x86_64
+file=centos-6.xz
+revision=6
+checksum=fc403ea3555a5608a25ad30ce2514b67288311a7197ddf9fb664475820f26db2bd95a86be9cd6e3f772187b384a02e0965430456dd518d343a80457057bc5441
+format=raw
+size=6442450944
+compressed_size=199265736
+expand=/dev/sda3
+notes=CentOS 6.6
+
+ This CentOS image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/centos.sh
+
+ Note that `virt-builder centos-6' will always install the latest
+ 6.x release.
+
diff --git a/builder/templates/centos-7.0.index-fragment b/builder/templates/centos-7.0.index-fragment
new file mode 100644
index 0000000..77f06bb
--- /dev/null
+++ b/builder/templates/centos-7.0.index-fragment
@@ -0,0 +1,19 @@
+[centos-7.0]
+name=CentOS 7.0
+osinfo=centos7.0
+arch=x86_64
+file=centos-7.0.xz
+checksum=cf9ae295f633fbd04e575eeca16f372e933c70c3107c44eb06864760d04354aa94b4f356bfc9a598c138e687304a52e96777e4467e7db1ec0cb5b2d2ec61affc
+format=raw
+size=6442450944
+compressed_size=213203844
+expand=/dev/sda3
+notes=CentOS 7.0
+
+ This CentOS image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/centos.sh
+
diff --git a/builder/templates/centos-7.1.index-fragment b/builder/templates/centos-7.1.index-fragment
new file mode 100644
index 0000000..d8f7c18
--- /dev/null
+++ b/builder/templates/centos-7.1.index-fragment
@@ -0,0 +1,19 @@
+[centos-7.1]
+name=CentOS 7.1
+osinfo=centos7.1
+arch=x86_64
+file=centos-7.1.xz
+checksum=4bd2536710daa27a70ff69a96d8a694bde1ecf48d811e75d5e6881cfdcd214c0af6949d5a8252ace06e4e8b33337f65ccb16305c85ff88156d49ac559e840b5c
+format=raw
+size=6442450944
+compressed_size=238579176
+expand=/dev/sda3
+notes=CentOS 7.1
+
+ This CentOS image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/centos.sh
+
diff --git a/builder/templates/centos-7.2-aarch64.index-fragment b/builder/templates/centos-7.2-aarch64.index-fragment
new file mode 100644
index 0000000..dcd80b8
--- /dev/null
+++ b/builder/templates/centos-7.2-aarch64.index-fragment
@@ -0,0 +1,19 @@
+[centos-7.2]
+name=CentOS 7.2 (aarch64)
+osinfo=centos7.2
+arch=aarch64
+file=centos-7.2-aarch64.xz
+checksum=e61c5381026c419110ec42626c1cbb0e081240ae4d8c70f5bac2c80d771d5159b72dd3723068cf3cc9339e095b05b62d29ba9c22ef199f53a4e89c07e5615ca3
+format=raw
+size=6442450944
+compressed_size=248167668
+expand=/dev/sda4
+notes=CentOS 7.2 (aarch64)
+
+ This CentOS image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/centos-aarch64.sh
+
diff --git a/builder/templates/centos-7.2.index-fragment b/builder/templates/centos-7.2.index-fragment
new file mode 100644
index 0000000..a05a559
--- /dev/null
+++ b/builder/templates/centos-7.2.index-fragment
@@ -0,0 +1,19 @@
+[centos-7.2]
+name=CentOS 7.2
+osinfo=centos7.2
+arch=x86_64
+file=centos-7.2.xz
+checksum=b32e6003d1f15e3a97e3644e35bb3fdc345a9b2e7448655d951ec331af6cd2b5548d6acfc9d92f09ac3a8a6439069c27fa539997118cb8a3f77d3bfa45c659d0
+format=raw
+size=6442450944
+compressed_size=252158848
+expand=/dev/sda3
+notes=CentOS 7.2
+
+ This CentOS image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/centos.sh
+
diff --git a/builder/templates/cirros-0.3.1.index-fragment b/builder/templates/cirros-0.3.1.index-fragment
new file mode 100644
index 0000000..da9cdeb
--- /dev/null
+++ b/builder/templates/cirros-0.3.1.index-fragment
@@ -0,0 +1,19 @@
+[cirros-0.3.1]
+name=CirrOS 0.3.1
+arch=x86_64
+file=cirros-0.3.1.xz
+checksum=096209f00eb62d5722accf3d22ca3a4ee5baaac6d7d4ce0be93b56bbd1c8ab2e3eb4f5db1deffcb570e2c3d41f4d721798a1c499675346cee9546554a4b10388
+format=raw
+size=41126400
+compressed_size=11419004
+expand=/dev/sda1
+notes=CirrOS 0.3.1
+
+ CirrOS is a commonly used test image, ideal because it is very
+ small and boots into a minimally usable Linux system.
+
+ Note this is not a real Linux distribution, and several virt-builder
+ features such as installing packages will not (and cannot) work.
+
+ This CirrOS image comes from https://launchpad.net/cirros
+
diff --git a/builder/templates/debian-6.index-fragment b/builder/templates/debian-6.index-fragment
new file mode 100644
index 0000000..3b0c78d
--- /dev/null
+++ b/builder/templates/debian-6.index-fragment
@@ -0,0 +1,32 @@
+[debian-6]
+name=Debian 6 (Squeeze)
+osinfo=debian6
+arch=x86_64
+file=debian-6.xz
+revision=2
+checksum=bff9c28da0375fde65fa238d7a2ea644cbfad0ea3246783a2f44a98f2374850987679c3f1032a632d3c6238de8d9e43291d07a82efc1e824945000e206b9f6cc
+format=raw
+size=4294967296
+compressed_size=139615908
+expand=/dev/sda1
+notes=Debian 6 (Squeeze).
+
+ This is a default Debian install.
+
+ The preseed and virt-install scripts that produced this image
+ can be found in the libguestfs source tree:
+
+ builder/website/debian.preseed
+ builder/website/debian.sh
+
+ This image is so very minimal that it only includes an ssh
+ server and no virtual consoles. To enable virtual consoles
+ use this virt-builder option:
+
+ virt-builder debian-6 \
+ --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'
+
+ This image does not contain SSH host keys. To regenerate them use:
+
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
diff --git a/builder/templates/debian-7-sparc64.index-fragment b/builder/templates/debian-7-sparc64.index-fragment
new file mode 100644
index 0000000..31bd824
--- /dev/null
+++ b/builder/templates/debian-7-sparc64.index-fragment
@@ -0,0 +1,35 @@
+[debian-7]
+name=Debian 7 (Wheezy) (sparc64)
+osinfo=debian7
+arch=sparc64
+file=debian-7-sparc64.xz
+checksum=a81530ec2335d578e54fcf3c62b979a2985faee8e6480a49e7d24269097c89585f39a04b00d99e82aca00f3304c44dfbed843ce6ce5dcd7828256a51219b701f
+format=raw
+size=4294967296
+compressed_size=96292208
+expand=/dev/sda3
+notes=Debian 7 (Wheezy).
+
+ This is a Debian 7 (Wheezy) sparc64 image. This was not built using
+ a reproducible script, but by installing Debian by hand, so don't use
+ this in production.
+
+ There is also a 'debian' account which you should be aware of and
+ may need to remove.
+
+ To build the image, use:
+
+ virt-builder [...] \
+ --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,' \
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
+ Resizing the image will not work because virt-builder does not
+ understand the partition format.
+
+ To boot the image:
+
+ qemu-system-sparc64 -drive file=debian-7.img,format=raw -serial stdio
+
+ Console messages are lost after the bootconsole is disabled, but it
+ is still booting and will eventually give you a login prompt.
+
diff --git a/builder/templates/debian-7.index-fragment b/builder/templates/debian-7.index-fragment
new file mode 100644
index 0000000..7d868e6
--- /dev/null
+++ b/builder/templates/debian-7.index-fragment
@@ -0,0 +1,32 @@
+[debian-7]
+name=Debian 7 (Wheezy)
+osinfo=debian7
+arch=x86_64
+file=debian-7.xz
+revision=2
+checksum=c980a7d878c086b14619b3b9f644ab131c1f88b87729062f2832de12a938ba9e5a511c49402a9d02b740a30876f51889d20e7d0ed4997755f542650b8485f013
+format=raw
+size=4294967296
+compressed_size=150734028
+expand=/dev/sda1
+notes=Debian 7 (Wheezy).
+
+ This is a default Debian install.
+
+ The preseed and virt-install scripts that produced this image
+ can be found in the libguestfs source tree:
+
+ builder/website/debian.preseed
+ builder/website/debian.sh
+
+ This image is so very minimal that it only includes an ssh
+ server and no virtual consoles. To enable virtual consoles
+ use this virt-builder option:
+
+ virt-builder debian-7 \
+ --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'
+
+ This image does not contain SSH host keys. To regenerate them use:
+
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
diff --git a/builder/templates/debian-8.index-fragment b/builder/templates/debian-8.index-fragment
new file mode 100644
index 0000000..d8387c3
--- /dev/null
+++ b/builder/templates/debian-8.index-fragment
@@ -0,0 +1,30 @@
+[debian-8]
+name=Debian 8 (Jessie)
+osinfo=debian8
+arch=x86_64
+file=debian-8.xz
+checksum=67700928c435a7a3cd3b611a390ae3f3dfb1b4d882157b6617aa7ea5d693dff3eb4951e5968bdb6859b5f82aa6fe95cc636f053344867d34178ecd5acefe8e91
+format=raw
+size=4294967296
+compressed_size=229866456
+expand=/dev/sda1
+notes=Debian 8 (Jessie).
+
+ This is a default Debian install.
+
+ The preseed and virt-install scripts that produced this image
+ can be found in the libguestfs source tree:
+
+ builder/website/debian.preseed
+ builder/website/debian.sh
+
+ This image does not contain SSH host keys. To regenerate them use:
+
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
+ The serial console is not working in this image. To enable it, do:
+
+ --edit '/etc/default/grub:
+ s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"/' \
+ --run-command update-grub
+
diff --git a/builder/website/debian.preseed b/builder/templates/debian.preseed
similarity index 99%
rename from builder/website/debian.preseed
rename to builder/templates/debian.preseed
index faa4430..54d4253 100644
--- a/builder/website/debian.preseed
+++ b/builder/templates/debian.preseed
@@ -99,7 +99,7 @@ d-i netcfg/wireless_wep string
d-i mirror/country string manual
d-i mirror/http/hostname string ftp.uk.debian.org
d-i mirror/http/directory string /debian
-d-i mirror/http/proxy string @CACHE@
+#d-i mirror/http/proxy string
# Suite to install.
#d-i mirror/suite string testing
diff --git a/builder/templates/fedora-18.index-fragment b/builder/templates/fedora-18.index-fragment
new file mode 100644
index 0000000..d57e8b4
--- /dev/null
+++ b/builder/templates/fedora-18.index-fragment
@@ -0,0 +1,22 @@
+[fedora-18]
+name=Fedora® 18
+osinfo=fedora18
+arch=x86_64
+file=fedora-18.xz
+checksum=12435775193b69f6e22658aaa001d4ca9b15fd68a04b4b7e9be20b3b517e857e417dc3268a302979d4a702b20f25754025f7ae0e9fb7088419a4ca1669585e6f
+format=raw
+size=6442450944
+compressed_size=148947524
+expand=/dev/sda3
+notes=Fedora 18.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-19.index-fragment b/builder/templates/fedora-19.index-fragment
new file mode 100644
index 0000000..681c541
--- /dev/null
+++ b/builder/templates/fedora-19.index-fragment
@@ -0,0 +1,23 @@
+[fedora-19]
+name=Fedora® 19
+osinfo=fedora19
+arch=x86_64
+file=fedora-19.xz
+revision=2
+checksum=acecd8d4bca0d6a3f937e0c9386f3185c916df3eaf5f825988c73d41e946a6dc4fda06cdd74a12bc60932edd65846097547b11aca2309a61dd6d0e91ab9d16f3
+format=raw
+size=6442450944
+compressed_size=169531628
+expand=/dev/sda3
+notes=Fedora 19.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-20.index-fragment b/builder/templates/fedora-20.index-fragment
new file mode 100644
index 0000000..3c7071f
--- /dev/null
+++ b/builder/templates/fedora-20.index-fragment
@@ -0,0 +1,23 @@
+[fedora-20]
+name=Fedora® 20
+osinfo=fedora20
+arch=x86_64
+file=fedora-20.xz
+revision=2
+checksum=983a1b33c34cb311ea3a283f06312d24dc81041b64ebc90e40ef2fd7587362acd1a5654b13252f9f57001870aa95495065537e730d5225b49389c1a0478cb028
+format=raw
+size=6442450944
+compressed_size=181164220
+expand=/dev/sda3
+notes=Fedora 20.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-21-aarch64.index-fragment b/builder/templates/fedora-21-aarch64.index-fragment
new file mode 100644
index 0000000..7914b7a
--- /dev/null
+++ b/builder/templates/fedora-21-aarch64.index-fragment
@@ -0,0 +1,25 @@
+[fedora-21]
+name=Fedora® 21 Server (aarch64)
+osinfo=fedora21
+arch=aarch64
+file=fedora-21-aarch64.xz
+checksum=57026dd867cbc2e49894dd056ffdc1c397548f4f7e296f393a77ee55343a17f684ddcd3ff7661f514b54209c472f41fce809f2e36064fb66d4f92d8dce5e9b62
+format=raw
+size=6442450944
+compressed_size=186616612
+expand=/dev/sda4
+notes=Fedora 21 Server (aarch64)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-aarch64.sh
+
+ Please note you will need to use the associated EFI NVRAM variables:
+ http://libguestfs.org/download/builder/fedora-21-aarch64-nvram.xz
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-21-armv7l.index-fragment b/builder/templates/fedora-21-armv7l.index-fragment
new file mode 100644
index 0000000..8af4a3e
--- /dev/null
+++ b/builder/templates/fedora-21-armv7l.index-fragment
@@ -0,0 +1,22 @@
+[fedora-21]
+name=Fedora® 21 Server (armv7l)
+osinfo=fedora21
+arch=armv7l
+file=fedora-21-armv7l.xz
+checksum=eb44c66f04781064850380fa1747cadc8645c2f3fd8f2dc1b45cbf5b3f31b91383fa9b7b8b2c951556de2ca499a9251487845208aa1a3881ada6d15e49d24300
+format=raw
+size=6442450944
+compressed_size=199232964
+expand=/dev/sda3
+notes=Fedora 21 Server (armv7l)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-armv7l.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-21-ppc64.index-fragment b/builder/templates/fedora-21-ppc64.index-fragment
new file mode 100644
index 0000000..f79a778
--- /dev/null
+++ b/builder/templates/fedora-21-ppc64.index-fragment
@@ -0,0 +1,23 @@
+[fedora-21]
+name=Fedora® 21 Server (ppc64)
+osinfo=fedora21
+arch=ppc64
+file=fedora-21-ppc64.xz
+revision=3
+checksum=acdd9bbd2a434cae48b8f8cf715b00a0cedbb8d276d76a9d4a4f1d469c9522755e82dd03e5f499c1447e09d9bb5a33ada8a061a601d91c007704edfdd80cddb2
+format=raw
+size=6442450944
+compressed_size=233099788
+expand=/dev/sda3
+notes=Fedora 21 Server (ppc64 big endian)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-ppc64.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-21-ppc64le.index-fragment b/builder/templates/fedora-21-ppc64le.index-fragment
new file mode 100644
index 0000000..d12f579
--- /dev/null
+++ b/builder/templates/fedora-21-ppc64le.index-fragment
@@ -0,0 +1,23 @@
+[fedora-21]
+name=Fedora® 21 Server (ppc64le)
+osinfo=fedora21
+arch=ppc64le
+file=fedora-21-ppc64le.xz
+revision=3
+checksum=490aeb5f1bd8754a3c2ed705d3ca84ccec26f839492c6955f40289c4ce9754ad40f22710e24449aeda4177ae16541dc61c989e3c1751f657ffbd4740240c13c4
+format=raw
+size=6442450944
+compressed_size=233706980
+expand=/dev/sda3
+notes=Fedora 21 Server (ppc64le)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-ppc64le.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-21.index-fragment b/builder/templates/fedora-21.index-fragment
new file mode 100644
index 0000000..b899da7
--- /dev/null
+++ b/builder/templates/fedora-21.index-fragment
@@ -0,0 +1,23 @@
+[fedora-21]
+name=Fedora® 21 Server
+osinfo=fedora21
+arch=x86_64
+file=fedora-21.xz
+revision=1
+checksum=4dc92cbf540d3a0745ffe1fa01ffae15f17e7a8aa45c70ad975a1dda82b7f1ebe42f912be74d91a5866a91ee2ca3be3c2be274b5da29db930fe1ec8c2286575b
+format=raw
+size=6442450944
+compressed_size=209059864
+expand=/dev/sda3
+notes=Fedora 21 Server.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-22-aarch64.index-fragment b/builder/templates/fedora-22-aarch64.index-fragment
new file mode 100644
index 0000000..390e8fe
--- /dev/null
+++ b/builder/templates/fedora-22-aarch64.index-fragment
@@ -0,0 +1,25 @@
+[fedora-22]
+name=Fedora® 22 Server (aarch64)
+osinfo=fedora22
+arch=aarch64
+file=fedora-22-aarch64.xz
+checksum=a9606947c036d3aade6a0680857adf4bcfb31a62833475466ff4502087cc427926a28d89b684fbe882a65752be263c567b655a988ff5563fee002e2d6f1ccecb
+format=raw
+size=6442450944
+compressed_size=215050068
+expand=/dev/sda4
+notes=Fedora 22 Server (aarch64)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-aarch64.sh
+
+ Please note you will need to use the associated EFI NVRAM variables:
+ http://libguestfs.org/download/builder/fedora-22-aarch64-nvram.xz
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-22-armv7l.index-fragment b/builder/templates/fedora-22-armv7l.index-fragment
new file mode 100644
index 0000000..1a04c7a
--- /dev/null
+++ b/builder/templates/fedora-22-armv7l.index-fragment
@@ -0,0 +1,22 @@
+[fedora-22]
+name=Fedora® 22 Server (armv7l)
+osinfo=fedora22
+arch=armv7l
+file=fedora-22-armv7l.xz
+checksum=8c5c39890409e3fe6f0204834289776bb7a8dca95da2f4d3459a99282f5ed100d7ada1caac2234dd0b357ad4047ef441b128c9ba6256b76df79dee6b5c9e33f8
+format=raw
+size=6442450944
+compressed_size=242234088
+expand=/dev/sda3
+notes=Fedora 22 Server (armv7l)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-armv7l.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-22-i686.index-fragment b/builder/templates/fedora-22-i686.index-fragment
new file mode 100644
index 0000000..1f81fd8
--- /dev/null
+++ b/builder/templates/fedora-22-i686.index-fragment
@@ -0,0 +1,22 @@
+[fedora-22]
+name=Fedora® 22 Server (i686)
+osinfo=fedora22
+arch=i686
+file=fedora-22-i686.xz
+checksum=3547b94d5c418792e722786cfae41decd41f0725d529d65a2c719094c0b815eaa4fae195514a14d42fa19b57b895bcdbfdb305edf918b1b3722f30f338042d31
+format=raw
+size=6442450944
+compressed_size=225185592
+expand=/dev/sda3
+notes=Fedora 22 Server (i686)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-i686.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-22.index-fragment b/builder/templates/fedora-22.index-fragment
new file mode 100644
index 0000000..cc8ec3b
--- /dev/null
+++ b/builder/templates/fedora-22.index-fragment
@@ -0,0 +1,22 @@
+[fedora-22]
+name=Fedora® 22 Server
+osinfo=fedora22
+arch=x86_64
+file=fedora-22.xz
+checksum=59f8b32ba363b64ad37a4bd3d17abd049e80691b84ea9b6c4f0485bcc743b6c8dff5bacd4ed838c555487f750edfd132a22421976a0821d82f16811361d4d98d
+format=raw
+size=6442450944
+compressed_size=228011712
+expand=/dev/sda3
+notes=Fedora 22 Server.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-23-aarch64.index-fragment b/builder/templates/fedora-23-aarch64.index-fragment
new file mode 100644
index 0000000..72fb635
--- /dev/null
+++ b/builder/templates/fedora-23-aarch64.index-fragment
@@ -0,0 +1,25 @@
+[fedora-23]
+name=Fedora® 23 Server (aarch64)
+osinfo=fedora23
+arch=aarch64
+file=fedora-23-aarch64.xz
+checksum=aa1359b2a81841ac07e4e25bef9d3ef3b7cf10c171403505cbbd732644fe6c37938cf6c9e3251dae201b659b47033fb792cb29f587fd4d4816b6c0d100dc5be8
+format=raw
+size=6442450944
+compressed_size=216417776
+expand=/dev/sda4
+notes=Fedora 23 Server (aarch64)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-aarch64.sh
+
+ You may need to use the associated EFI NVRAM variables:
+ http://libguestfs.org/download/builder/fedora-23-aarch64-nvram.xz
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-23-armv7l.index-fragment b/builder/templates/fedora-23-armv7l.index-fragment
new file mode 100644
index 0000000..9c3199e
--- /dev/null
+++ b/builder/templates/fedora-23-armv7l.index-fragment
@@ -0,0 +1,22 @@
+[fedora-23]
+name=Fedora® 23 Server (armv7l)
+osinfo=fedora23
+arch=armv7l
+file=fedora-23-armv7l.xz
+checksum=e2c74544b3e9d25c92724536875a3cbcee0c4c4774bb3956ce6938fdbf1588781a1eb3b54a5fad8cc0d63f0af0c699f7e322c613e13552591eec641edf401d78
+format=raw
+size=6442450944
+compressed_size=241758696
+expand=/dev/sda3
+notes=Fedora 23 Server (armv7l)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-armv7l.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-23-i686.index-fragment b/builder/templates/fedora-23-i686.index-fragment
new file mode 100644
index 0000000..85ff268
--- /dev/null
+++ b/builder/templates/fedora-23-i686.index-fragment
@@ -0,0 +1,23 @@
+[fedora-23]
+name=Fedora® 23 Server (i686)
+osinfo=fedora23
+arch=i686
+file=fedora-23-i686.xz
+revision=2
+checksum=4b1badbb92f40ca1b3336e70b2564755d643bc00005fd6364c389a1f3078952968a6887c36c4f79fe3873cf42d41cb36dd226521fee32ed6e08c65d6d059af3c
+format=raw
+size=6442450944
+compressed_size=322831152
+expand=/dev/sda3
+notes=Fedora 23 Server (i686)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-i686.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-23-ppc64.index-fragment b/builder/templates/fedora-23-ppc64.index-fragment
new file mode 100644
index 0000000..db1e8f2
--- /dev/null
+++ b/builder/templates/fedora-23-ppc64.index-fragment
@@ -0,0 +1,22 @@
+[fedora-23]
+name=Fedora® 23 Server (ppc64)
+osinfo=fedora23
+arch=ppc64
+file=fedora-23-ppc64.xz
+checksum=99e0c8186b21525d49c0db074fd25bf6631d2fd2cef2ac22f1b1beb6cb492cfc9aed632a2ea091d39d8762fa892b6d2393fecbde7e140236ba4a88d8c54c3152
+format=raw
+size=6442450944
+compressed_size=280692072
+expand=/dev/sda3
+notes=Fedora 23 Server (ppc64 big endian)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-ppc64.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-23-ppc64le.index-fragment b/builder/templates/fedora-23-ppc64le.index-fragment
new file mode 100644
index 0000000..54873f3
--- /dev/null
+++ b/builder/templates/fedora-23-ppc64le.index-fragment
@@ -0,0 +1,23 @@
+[fedora-23]
+name=Fedora® 23 Server (ppc64le)
+osinfo=fedora23
+arch=ppc64le
+file=fedora-23-ppc64le.xz
+revision=2
+checksum=bb6a4cb02a4d7f99f3b8a0f73faa585a4c14e0120a4ace584e0c86062736302bd293072513510378ad30bbdb5fc905077f15ecb8fb5f2ab6ef50b0532af6b8a7
+format=raw
+size=6442450944
+compressed_size=278241384
+expand=/dev/sda3
+notes=Fedora 23 Server (ppc64le)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-ppc64le.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-23.index-fragment b/builder/templates/fedora-23.index-fragment
new file mode 100644
index 0000000..8982a43
--- /dev/null
+++ b/builder/templates/fedora-23.index-fragment
@@ -0,0 +1,23 @@
+[fedora-23]
+name=Fedora® 23 Server
+osinfo=fedora23
+arch=x86_64
+file=fedora-23.xz
+revision=3
+checksum=90cd606923e16e2c01a08eaa360e213cdd49462e259a04cc6efb1d2516215fb4ac3c62811dfd1646d89650f717da030fa6dec693571e027a644eee589accb78d
+format=raw
+size=6442450944
+compressed_size=317209280
+expand=/dev/sda3
+notes=Fedora 23 Server.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-24-aarch64.index-fragment b/builder/templates/fedora-24-aarch64.index-fragment
new file mode 100644
index 0000000..abf3b58
--- /dev/null
+++ b/builder/templates/fedora-24-aarch64.index-fragment
@@ -0,0 +1,25 @@
+[fedora-24]
+name=Fedora® 24 Server (aarch64)
+osinfo=fedora24
+arch=aarch64
+file=fedora-24-aarch64.xz
+checksum=d17a0ee0e5f661f9d2cbffe12dae306f295a0716ef440a12944d3d2805f5a5c637766c98267e914f588502d7ba7eca888edd93ae34a15e30faf907d8c55f4689
+format=raw
+size=6442450944
+compressed_size=287727544
+expand=/dev/sda4
+notes=Fedora 24 Server (aarch64)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-aarch64.sh
+
+ You may need to use the associated EFI NVRAM variables:
+ http://libguestfs.org/download/builder/fedora-24-aarch64-nvram.xz
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-24-armv7l.index-fragment b/builder/templates/fedora-24-armv7l.index-fragment
new file mode 100644
index 0000000..516168d
--- /dev/null
+++ b/builder/templates/fedora-24-armv7l.index-fragment
@@ -0,0 +1,22 @@
+[fedora-24]
+name=Fedora® 24 Server (armv7l)
+osinfo=fedora24
+arch=armv7l
+file=fedora-24-armv7l.xz
+checksum=7d9a5ce8e10c13e8d07ace42555183bfee5e561464e9fc439d0fefc3e85048bdc0c14d44d5584029d4015d0f3316c7583af8ae6d4c0ff8bcfcdb9037a37cacc0
+format=raw
+size=6442450944
+compressed_size=324231484
+expand=/dev/sda3
+notes=Fedora 24 Server (armv7l)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-armv7l.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-24-i686.index-fragment b/builder/templates/fedora-24-i686.index-fragment
new file mode 100644
index 0000000..8320113
--- /dev/null
+++ b/builder/templates/fedora-24-i686.index-fragment
@@ -0,0 +1,22 @@
+[fedora-24]
+name=Fedora® 24 Server (i686)
+osinfo=fedora24
+arch=i686
+file=fedora-24-i686.xz
+checksum=1461da1557327e0641987654919698a6b7c2df1c58f76a4a4d61fb66476dac1b19fe6e3650b82a246df7d241037725c7b8e57e73d3312e370dfb132f54b5cbf4
+format=raw
+size=6442450944
+compressed_size=319087504
+expand=/dev/sda3
+notes=Fedora 24 Server (i686)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-i686.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-24.index-fragment b/builder/templates/fedora-24.index-fragment
new file mode 100644
index 0000000..e0c1719
--- /dev/null
+++ b/builder/templates/fedora-24.index-fragment
@@ -0,0 +1,22 @@
+[fedora-24]
+name=Fedora® 24 Server
+osinfo=fedora24
+arch=x86_64
+file=fedora-24.xz
+checksum=907656be1f0bb4ed221a54f4339660d02071bdf79acd1644087e5ca20e315ba8e4b9008d7f0814a840904198a54499556f226db8b32f96a01ecd20370da8d03d
+format=raw
+size=6442450944
+compressed_size=321359432
+expand=/dev/sda3
+notes=Fedora 24 Server.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-25-aarch64.index-fragment b/builder/templates/fedora-25-aarch64.index-fragment
new file mode 100644
index 0000000..5eaa029
--- /dev/null
+++ b/builder/templates/fedora-25-aarch64.index-fragment
@@ -0,0 +1,25 @@
+[fedora-25]
+name=Fedora® 25 Server (aarch64)
+osinfo=fedora25
+arch=aarch64
+file=fedora-25-aarch64.xz
+checksum=ad8283c6ac4e0b297fd2413d3ffd231bdfbbb0609960d6fd1af45d8047652f7d515398d97345b0d837eca244a501279f9920c6149e00b6504bd08ab965ef19ac
+format=raw
+size=6442450944
+compressed_size=294070292
+expand=/dev/sda4
+notes=Fedora 25 Server (aarch64)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-aarch64.sh
+
+ You may need to use the associated EFI NVRAM variables:
+ http://libguestfs.org/download/builder/fedora-25-aarch64-nvram.xz
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-25-armv7l.index-fragment b/builder/templates/fedora-25-armv7l.index-fragment
new file mode 100644
index 0000000..9c18ea8
--- /dev/null
+++ b/builder/templates/fedora-25-armv7l.index-fragment
@@ -0,0 +1,22 @@
+[fedora-25]
+name=Fedora® 25 Server (armv7l)
+osinfo=fedora25
+arch=armv7l
+file=fedora-25-armv7l.xz
+checksum=3303230d3e907524817ed95504b7b7a5f6a3e167d9564193fdd0781207b1ca841b244d47778ea639e2af709bb8838256f18503b76f1ede06ca7bb9f72693c538
+format=raw
+size=6442450944
+compressed_size=270482468
+expand=/dev/sda3
+notes=Fedora 25 Server (armv7l)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-armv7l.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-25-i686.index-fragment b/builder/templates/fedora-25-i686.index-fragment
new file mode 100644
index 0000000..1027558
--- /dev/null
+++ b/builder/templates/fedora-25-i686.index-fragment
@@ -0,0 +1,22 @@
+[fedora-25]
+name=Fedora® 25 Server (i686)
+osinfo=fedora25
+arch=i686
+file=fedora-25-i686.xz
+checksum=17cdf048a3961a316ac32aa084b4b7d20d0ff4756bd5e942c1aae29c6e8b3cf2a41516e87e301ee1122643aca14ca252554ebbadbe468a582c10591edc56177a
+format=raw
+size=6442450944
+compressed_size=247412792
+expand=/dev/sda3
+notes=Fedora 25 Server (i686)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-i686.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-25-ppc64.index-fragment b/builder/templates/fedora-25-ppc64.index-fragment
new file mode 100644
index 0000000..6ffe3f3
--- /dev/null
+++ b/builder/templates/fedora-25-ppc64.index-fragment
@@ -0,0 +1,23 @@
+[fedora-25]
+name=Fedora® 25 Server (ppc64)
+osinfo=fedora25
+arch=ppc64
+file=fedora-25-ppc64.xz
+revision=2
+checksum=6cbe13eab5b4ece19c263163d947072c644ee234e3d116e6fdf517206b7bea10d870933b31f8ab970480aa5a09cd75b04858b46bbe85dcfc6820069523bd4b9d
+format=raw
+size=6442450944
+compressed_size=311245832
+expand=/dev/sda3
+notes=Fedora 25 Server (ppc64 big endian)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-ppc64.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-25-ppc64le.index-fragment b/builder/templates/fedora-25-ppc64le.index-fragment
new file mode 100644
index 0000000..b89c809
--- /dev/null
+++ b/builder/templates/fedora-25-ppc64le.index-fragment
@@ -0,0 +1,23 @@
+[fedora-25]
+name=Fedora® 25 Server (ppc64le)
+osinfo=fedora25
+arch=ppc64le
+file=fedora-25-ppc64le.xz
+revision=2
+checksum=b51f8ad21862db31540a489e0fd070054789be1c054f6d30d03d8284320bb84bc025ae71e7b4f7d386a5ff074dacbf84b9724eaf74d31b13bda8776756717bf4
+format=raw
+size=6442450944
+compressed_size=336716660
+expand=/dev/sda3
+notes=Fedora 25 Server (ppc64le)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-ppc64le.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/fedora-25.index-fragment b/builder/templates/fedora-25.index-fragment
new file mode 100644
index 0000000..3e21f2b
--- /dev/null
+++ b/builder/templates/fedora-25.index-fragment
@@ -0,0 +1,22 @@
+[fedora-25]
+name=Fedora® 25 Server
+osinfo=fedora25
+arch=x86_64
+file=fedora-25.xz
+checksum=fd7f8c9c7f6093b0c8c154ab12a116952745a00f5634ee8ded8c81d5f3b9b614558b11109de98f814f4f57fb2c0a394fba43d8a9ed127b99b78ff02c39957f7b
+format=raw
+size=6442450944
+compressed_size=337395436
+expand=/dev/sda3
+notes=Fedora 25 Server.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml
new file mode 100755
index 0000000..71940ff
--- /dev/null
+++ b/builder/templates/make-template.ml
@@ -0,0 +1,1014 @@
+#!/usr/bin/env ocaml
+(* libguestfs
+ * Copyright (C) 2016 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+(* This script is used to create the virt-builder templates hosted
+ * http://libguestfs.org/download/builder/
+ *
+ * Usage:
+ * ./make-template.ml os version [arch]
+ * eg:
+ * ./make-template.ml fedora 25
+ * ./make-template.ml rhel 7.3 ppc64le
+ *
+ * The arch defaults to x86_64. Note that i686 is a separate arch.
+ *
+ * Prior to November 2016, the templates were generated using
+ * shell scripts located in libguestfs.git/builder/website.
+ *)
+
+open Printf
+
+let prog = "make-template"
+
+(* Check we are being run from the correct directory. We must do this
+ * before attempting to load libraries below.
+ *)
+let () =
+ if not (Sys.file_exists "debian.preseed") then (
+ eprintf "%s: run this script from the builder/templates subdirectory\n"
+ prog;
+ exit 1
+ );;
+
+#load "str.cma";;
+#load "unix.cma";;
+#directory "../../ocaml";;
+#load "mlguestfs.cma";;
+
+type os =
+ | CentOS of int * int (* major, minor *)
+ | RHEL of int * int
+ | Debian of int * string (* version, dist name like "wheezy" *)
+ | Ubuntu of string * string
+ | Fedora of int (* version number *)
+type arch = X86_64 | Aarch64 | Armv7 | I686 | PPC64 | PPC64le | S390X
+
+let quote = Filename.quote
+let (//) = Filename.concat
+
+let virtual_size_gb = 6
+
+let rec main () =
+ assert (Sys.word_size = 64);
+ Random.self_init ();
+
+ (* Get the os, version, arch from the command line. *)
+ if Array.length Sys.argv < 3 || Array.length Sys.argv > 4 then (
+ eprintf "%s os version [arch]\n" prog;
+ exit 1
+ );
+
+ let os = os_of_string Sys.argv.(1) Sys.argv.(2)
+ and arch =
+ if Array.length Sys.argv <= 3 then X86_64
+ else arch_of_string Sys.argv.(3) in
+
+ (* Set the path to use locally built copies of the virt-* tools. *)
+ let () =
+ let orig_path = Unix.getenv "PATH" in
+ let paths = ["builder"; "customize"; "sparsify"; "sysprep"] in
+ let prefix = Sys.getcwd () // ".." // ".." in
+ let paths = List.map ((//) prefix) paths in
+ let new_path = String.concat ":" (paths @ [orig_path]) in
+ Unix.putenv "PATH" new_path in
+
+ (* For OSes which require a kickstart, this generates one.
+ * For OSes which require a preseed file, this returns one (we
+ * don't generate preseed files at the moment).
+ *)
+ let ks = make_kickstart_or_preseed os arch in
+
+ (* Find the virt-install --location for this OS. *)
+ let location = make_location os arch in
+
+ (* RHEL guests require alternate yum configuration pointing to
+ * Red Hat's internal servers.
+ *)
+ let yum_conf =
+ match os with
+ | RHEL (major, minor) when major >= 5 ->
+ Some (make_rhel_yum_conf major minor arch)
+ | _ -> None in
+
+ (* Choose a random temporary name for the libvirt domain. We will
+ * also have to clean this up after running virt-install.
+ *)
+ let tmpname = sprintf "tmp-%s" (random8 ()) in
+
+ (* Choose a random temporary disk name. *)
+ let tmpout = sprintf "%s.img" tmpname in
+
+ (* Some architectures need EFI boot. *)
+ let tmpefivars =
+ match os, arch with
+ | (Fedora _|RHEL _), Aarch64 ->
+ let vars = sprintf "%s.vars" tmpname in
+ let cmd =
+ sprintf "cp /usr/share/edk2/aarch64/vars-template-pflash.raw %s"
+ (quote vars) in
+ if Sys.command cmd <> 0 then exit 1;
+ Some ("/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw", vars)
+ | _ -> None in
+
+ (* Now construct the virt-install command. *)
+ let vi = make_virt_install_command os arch ks tmpname tmpout tmpefivars
+ location in
+ (* Make sure that temporary guest and temporary files are removed
+ * if we exit for any reason.
+ *)
+ let cleanup_libvirt_guest () =
+ let cmd =
+ sprintf "virsh undefine%s %s >&/dev/null"
+ (if tmpefivars = None then "" else " --nvram")
+ (quote tmpname) in
+ ignore (Sys.command cmd)
+ in
+ at_exit (
+ fun () ->
+ cleanup_libvirt_guest ();
+ (try Unix.unlink tmpout with _ -> ());
+ (match tmpefivars with
+ | Some (_, vars) -> (try Unix.unlink vars with _ -> ())
+ | None -> ());
+ );
+
+ (* Print the virt-install command just before we run it, because
+ * this is expected to be long-running.
+ *)
+ Array.iter (
+ fun arg ->
+ if arg.[0] = '-' then printf "\\\n %s " arg
+ else printf "%s " arg
+ ) vi;
+ printf "\n%!";
+
+ (* Run the virt-install command. *)
+ let pid = Unix.fork () in
+ if pid = 0 then Unix.execvp "virt-install" vi;
+ let _, pstat = Unix.waitpid [] pid in
+ check_process_status_for_errors pstat;
+ cleanup_libvirt_guest ();
+
+ (* Get the root filesystem which is the one which will be
+ * expanded. Since we never use LVM, this should return a
+ * plain partition. However virt-builder can deal with LVM
+ * so we may need to revisit this.
+ *)
+ let g = open_guest tmpout in
+ let roots = g#inspect_get_roots () in
+ let expandfs = g#canonical_device_name roots.(0) in
+ assert (String.sub expandfs 0 7 = "/dev/sd");
+
+ (* Some guests are special flowers. *)
+ (match os with
+ | Debian _ ->
+ (* Remove apt proxy configuration (thanks: Daniel Miranda). *)
+ g#rm_f "/etc/apt/apt.conf";
+ g#touch "/etc/apt/apt.conf";
+ | _ -> ()
+ );
+ (match yum_conf with
+ | Some yum_conf ->
+ g#write yum_conf "/etc/yum.repos.d/download.devel.redhat.com.repo";
+ | None -> ()
+ );
+
+ g#shutdown ();
+ g#close ();
+
+ (match os with
+ | Ubuntu (ver, _) when ver >= "14.04" ->
+ (* In Ubuntu >= 14.04 you can't complete the install without creating
+ * a user account. We create one called 'builder', but we also
+ * disable it. XXX Combine with virt-sysprep step.
+ *)
+ let cmd =
+ sprintf "virt-customize -a %s --password builder:disabled"
+ (quote tmpout) in
+ if Sys.command cmd <> 0 then exit 1
+ | _ -> ()
+ );
+
+ (* Sysprep. Relabel SELinux-using guests. *)
+ printf "Sysprepping ...\n";
+ let cmd =
+ sprintf "virt-sysprep --quiet -a %s%s"
+ (quote tmpout)
+ (if is_selinux_os os then " --selinux-relabel" else "") in
+ if Sys.command cmd <> 0 then exit 1;
+
+ (* Create the final output name (actually not quite final because
+ * we will xz-compress it).
+ *)
+ let output = filename_of_os os arch "" in
+
+ (* Sparsify and copy to output name. *)
+ printf "Sparsifying ...\n";
+ let cmd =
+ sprintf "virt-sparsify --quiet %s %s" (quote tmpout) (quote output) in
+ if Sys.command cmd <> 0 then exit 1;
+ Unix.unlink tmpout;
+
+ (* Compress the output. *)
+ printf "Compressing ...\n";
+ let cmd =
+ sprintf "xz -f --best --block-size=16777216 %s" (quote output) in
+ if Sys.command cmd <> 0 then exit 1;
+ let output = output ^ ".xz" in
+
+ (* If there were NVRAM variables, move them to the final name and
+ * compress them too.
+ *)
+ let nvram =
+ match tmpefivars with
+ | Some (_, vars) ->
+ let f = sprintf "%s-nvram" output in
+ let cmd = sprintf "mv %s %s-nvram" (quote vars) (quote f) in
+ if Sys.command cmd <> 0 then exit 1;
+ let cmd = sprintf "xz -f --best %s-nvram" (quote f) in
+ if Sys.command cmd <> 0 then exit 1;
+ Unix.unlink vars;
+ Some (f ^ ".xz")
+ | None -> None in
+ printf "Template completed: %s\n" output;
+
+ (* Construct the index fragment, but don't create this for the private
+ * RHEL images.
+ *)
+ (match os with
+ | RHEL _ -> ()
+ | _ ->
+ let index_fragment = filename_of_os os arch ".index-fragment" in
+ (* If there is an existing file, read the revision and increment it. *)
+ let revision = read_revision index_fragment in
+ let revision = match revision with None -> None | Some i -> Some (i+1) in
+ make_index_fragment os arch index_fragment output nvram revision expandfs;
+
+ (* Validate the fragment we have just created. *)
+ let cmd = sprintf "virt-index-validate %s" (quote index_fragment) in
+ if Sys.command cmd <> 0 then exit 1;
+ printf "Index fragment created: %s\n" index_fragment
+ )
+
+and os_of_string os ver =
+ match os, ver with
+ | "centos", ver -> let maj, min = parse_major_minor ver in CentOS (maj, min)
+ | "rhel", ver -> let maj, min = parse_major_minor ver in RHEL (maj, min)
+ | "debian", "6" -> Debian (6, "squeeze")
+ | "debian", "7" -> Debian (7, "wheezy")
+ | "debian", "8" -> Debian (8, "jessie")
+ | "ubuntu", "10.04" -> Ubuntu (ver, "lucid")
+ | "ubuntu", "12.04" -> Ubuntu (ver, "precise")
+ | "ubuntu", "14.04" -> Ubuntu (ver, "trusty")
+ | "ubuntu", "16.04" -> Ubuntu (ver, "xenial")
+ | "fedora", ver -> Fedora (int_of_string ver)
+ | _ ->
+ eprintf "%s: unknown or unsupported OS\n" prog; exit 1
+
+and parse_major_minor ver =
+ let rex = Str.regexp "^\\([0-9]+\\)\\.\\([0-9]+\\)$" in
+ if Str.string_match rex ver 0 then (
+ int_of_string (Str.matched_group 1 ver),
+ int_of_string (Str.matched_group 2 ver)
+ )
+ else (
+ eprintf "%s: cannot parse major.minor\n" prog;
+ exit 1
+ )
+
+and arch_of_string = function
+ | "x86_64" -> X86_64
+ | "aarch64" -> Aarch64
+ | "armv7l" -> Armv7
+ | "i686" -> I686
+ | "ppc64" -> PPC64
+ | "ppc64le" -> PPC64le
+ | "s390x" -> S390X
+ | _ ->
+ eprintf "%s: unknown or unsupported arch\n" prog; exit 1
+
+and string_of_arch = function
+ | X86_64 -> "x86_64"
+ | Aarch64 -> "aarch64"
+ | Armv7 -> "armv7l"
+ | I686 -> "i686"
+ | PPC64 -> "ppc64"
+ | PPC64le -> "ppc64le"
+ | S390X -> "s390x"
+
+and filename_of_os os arch ext =
+ match os with
+ | Fedora ver ->
+ if arch = X86_64 then sprintf "fedora-%d%s" ver ext
+ else sprintf "fedora-%d-%s%s" ver (string_of_arch arch) ext
+ | CentOS (major, minor) ->
+ if arch = X86_64 then sprintf "centos-%d.%d%s" major minor ext
+ else sprintf "centos-%d.%d-%s%s" major minor (string_of_arch arch) ext
+ | RHEL (major, minor) ->
+ if arch = X86_64 then sprintf "rhel-%d.%d%s" major minor ext
+ else sprintf "rhel-%d.%d-%s%s" major minor (string_of_arch arch) ext
+ | Debian (ver, _) ->
+ if arch = X86_64 then sprintf "debian-%d%s" ver ext
+ else sprintf "debian-%d-%s%s" ver (string_of_arch arch) ext
+ | Ubuntu (ver, _) ->
+ if arch = X86_64 then sprintf "ubuntu-%s%s" ver ext
+ else sprintf "ubuntu-%s-%s%s" ver (string_of_arch arch) ext
+
+and string_of_os os arch = filename_of_os os arch ""
+
+(* This is what virt-builder called "os-version". *)
+and string_of_os_noarch = function
+ | Fedora ver -> sprintf "fedora-%d" ver
+ | CentOS (major, minor) -> sprintf "centos-%d.%d" major minor
+ | RHEL (major, minor) -> sprintf "rhel-%d.%d" major minor
+ | Debian (ver, _) -> sprintf "debian-%d" ver
+ | Ubuntu (ver, _) -> sprintf "ubuntu-%s" ver
+
+and is_selinux_os = function
+ | RHEL _ | CentOS _ | Fedora _ -> true
+ | Debian _ | Ubuntu _ -> false
+
+and make_kickstart_or_preseed os arch =
+ match os with
+ (* Kickstart. *)
+ | Fedora _ | CentOS _ | RHEL _ ->
+ let ks_filename = filename_of_os os arch ".ks" in
+ make_kickstart_common ks_filename os arch
+
+ (* Preseed. *)
+ | Debian _ -> copy_preseed_to_temporary "debian.preseed"
+ | Ubuntu _ -> copy_preseed_to_temporary "ubuntu.preseed"
+
+and make_kickstart_common ks_filename os arch =
+ let buf = Buffer.create 4096 in
+ let bpf fs = bprintf buf fs in
+
+ bpf "\
+# Kickstart file for %s
+# Generated by libguestfs.git/builder/templates/make-template.ml
+
+install
+text
+reboot
+lang en_US.UTF-8
+keyboard us
+network --bootproto dhcp
+rootpw builder
+firewall --enabled --ssh
+timezone --utc America/New_York
+" (string_of_os os arch);
+
+ (match os with
+ | RHEL (3, _) ->
+ bpf "\
+langsupport en_US
+mouse generic
+";
+ | _ -> ()
+ );
+
+ (match os with
+ | RHEL (3, _) -> ()
+ | _ -> bpf "selinux --enforcing\n"
+ );
+
+ (match os with
+ | RHEL (5, _) -> bpf "key --skip\n"
+ | _ -> ()
+ );
+ bpf "\n";
+
+ bpf "bootloader --location=mbr --append=\"%s\"\n"
+ (kernel_cmdline_of_os os arch);
+ bpf "\n";
+
+ (match os with
+ | CentOS _ ->
+ bpf "\
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=512 --asprimary
+part swap --size=1024 --asprimary
+part / --fstype=ext4 --size=1024 --grow --asprimary
+";
+ | RHEL ((3|4), _) ->
+ bpf "\
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext2 --size=512 --asprimary
+part swap --size=1024 --asprimary
+part / --fstype=ext3 --size=1024 --grow --asprimary
+";
+ | RHEL (5, _) ->
+ bpf "\
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext2 --size=512 --asprimary
+part swap --size=1024 --asprimary
+part / --fstype=ext4 --size=1024 --grow --asprimary
+";
+ | RHEL (6, _) ->
+ bpf "\
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=512 --asprimary
+part swap --size=1024 --asprimary
+part / --fstype=ext4 --size=1024 --grow --asprimary
+";
+ | RHEL (7, _) ->
+ bpf "\
+zerombr
+clearpart --all --initlabel
+part /boot --fstype=ext4 --size=512 --asprimary
+part swap --size=1024 --asprimary
+part / --fstype=xfs --size=1024 --grow --asprimary
+";
+ | _ ->
+ bpf "\
+zerombr
+clearpart --all --initlabel
+autopart --type=plain
+";
+ );
+ bpf "\n";
+
+ (match os with
+ | RHEL (3, _) -> ()
+ | _ ->
+ bpf "\
+# Halt the system once configuration has finished.
+poweroff
+";
+ );
+ bpf "\n";
+
+ bpf "\
+%%packages
+@core
+";
+
+ (match os with
+ | RHEL ((3|4|5), _) -> ()
+ | _ ->
+ bpf "%%end\n"
+ );
+ bpf "\n";
+
+ (* Generate the %post script section. The previous scripts did
+ * many different things here. The current script tries to update
+ * the packages and enable Xen drivers only.
+ *)
+ (match os with
+ | Fedora _ ->
+ bpf "%%post\n";
+ bpf "\
+# Ensure the installation is up-to-date.
+dnf -y --best upgrade
+";
+ if arch = X86_64 then bpf "\
+# Enable Xen domU support.
+pushd /etc/dracut.conf.d
+echo 'add_drivers+=\"xen:vbd xen:vif\"' > virt-builder-xen-drivers.conf
+popd
+
+# To make the Xen change permanent, we need to rerun dracut.
+# Rerun dracut for the installed kernel (not the running kernel).
+# See commit 0fa52e4e45d80874bc5ea5f112f74be1d3f3472f and
+# https://www.redhat.com/archives/libguestfs/2014-June/thread.html#00045
+KERNEL_VERSION=$(rpm -q kernel --qf '%%{version}-%%{release}.%%{arch}\\n')
+dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
+";
+ bpf "%%end\n\n"
+ | _ -> ()
+ );
+
+ bpf "# EOF\n";
+
+ (* Write out the kickstart file. *)
+ let chan = open_out (ks_filename ^ ".new") in
+ Buffer.output_buffer chan buf;
+ close_out chan;
+ let cmd =
+ sprintf "mv %s %s" (quote (ks_filename ^ ".new")) (quote ks_filename) in
+ if Sys.command cmd <> 0 then exit 1;
+
+ (* Return the kickstart filename. *)
+ ks_filename
+
+and copy_preseed_to_temporary source =
+ (* d-i only works if the file is literally called "/preseed.cfg" *)
+ let d = "/tmp" // random8 () ^ ".tmp" in
+ let f = d // "preseed.cfg" in
+ Unix.mkdir d 0o700;
+ let cmd = sprintf "cp %s %s" (quote source) (quote f) in
+ if Sys.command cmd <> 0 then exit 1;
+ f
+
+and make_location os arch =
+ match os, arch with
+ | CentOS (major, _), Aarch64 ->
+ (* XXX This always points to the latest CentOS, so
+ * effectively the minor number is always ignored.
+ *)
+ sprintf "http://mirror.centos.org/altarch/%d/os/aarch64/" major
+
+ | CentOS (major, _), X86_64 ->
+ (* For 6.x we rebuild this every time there is a new 6.x release, and bump
+ * the revision in the index.
+ * For 7.x this always points to the latest CentOS, so
+ * effectively the minor number is always ignored.
+ *)
+ sprintf "http://mirror.centos.org/centos-7/%d/os/x86_64/" major
+
+ | Debian (_, dist), X86_64 ->
+ sprintf "http://ftp.uk.debian.org/debian/dists/%s/main/installer-amd64"
+ dist
+
+ | Fedora ver, Aarch64 ->
+ sprintf "https://download.fedoraproject.org/pub/fedora-secondary/releases/%d/Serve..." ver
+
+ | Fedora ver, Armv7 ->
+ sprintf "http://mirror.bytemark.co.uk/fedora/linux/releases/%d/Server/armhfp/os/" ver
+
+ | Fedora ver, X86_64 when ver < 21 ->
+ sprintf "http://mirror.bytemark.co.uk/fedora/linux/releases/%d/Fedora/x86_64/os/" ver
+
+ | Fedora ver, X86_64 ->
+ sprintf "http://mirror.bytemark.co.uk/fedora/linux/releases/%d/Server/x86_64/os/" ver
+
+ | Fedora ver, I686 when ver < 21 ->
+ sprintf "http://mirror.bytemark.co.uk/fedora/linux/releases/%d/Fedora/i386/os/" ver
+
+ | Fedora ver, I686 ->
+ sprintf "http://mirror.bytemark.co.uk/fedora/linux/releases/%d/Server/i386/os/" ver
+
+ | Fedora ver, PPC64 ->
+ sprintf "https://download.fedoraproject.org/pub/fedora-secondary/releases/%d/Serve..." ver
+
+ | Fedora ver, PPC64le ->
+ sprintf "https://download.fedoraproject.org/pub/fedora-secondary/releases/%d/Serve..." ver
+
+ | Fedora ver, S390X ->
+ sprintf "https://download.fedoraproject.org/pub/fedora-secondary/releases/%d/Serve..." ver
+
+ | RHEL (3, minor), X86_64 ->
+ sprintf "http://download.devel.redhat.com/released/RHEL-3/U%d/AS/x86_64/tree" minor
+
+ | RHEL (4, minor), X86_64 ->
+ sprintf "http://download.devel.redhat.com/released/RHEL-4/U%d/AS/x86_64/tree" minor
+
+ | RHEL (5, minor), X86_64 ->
+ sprintf "http://download.devel.redhat.com/released/RHEL-5-Server/U%d/x86_64/os" minor
+
+ | RHEL (6, minor), X86_64 ->
+ sprintf "http://download.devel.redhat.com/released/RHEL-6/6.%d/Server/x86_64/os" minor
+
+ | RHEL (7, minor), X86_64 ->
+ sprintf "http://download.devel.redhat.com/released/RHEL-7/7.%d/Server/x86_64/os" minor
+
+ | RHEL (7, minor), Aarch64 ->
+ sprintf "http://download.eng.bos.redhat.com/released/RHEL-7/7.%d/Server/aarch64/os" minor
+
+ | RHEL (7, minor), PPC64 ->
+ sprintf "http://download.devel.redhat.com/released/RHEL-7/7.%d/Server/ppc64/os" minor
+
+ | RHEL (7, minor), PPC64le ->
+ sprintf "http://download.devel.redhat.com/released/RHEL-7/7.%d/Server/ppc64le/os" minor
+
+ | Ubuntu (_, dist), X86_64 ->
+ sprintf "http://archive.ubuntu.com/ubuntu/dists/%s/main/installer-amd64"
+ dist
+
+ | Ubuntu (_, dist), PPC64le ->
+ sprintf "http://ports.ubuntu.com/ubuntu-ports/dists/%s/main/installer-ppc64el" dist
+
+ | _ ->
+ eprintf "%s: don't know how to calculate the --location for this OS and architecture\n" prog;
+ exit 1
+
+(* NB: Arguments do not need to be quoted, because we pass them
+ * directly to exec(2).
+ *)
+and make_virt_install_command os arch ks tmpname tmpout tmpefivars location =
+ let args = ref [] in
+ let add arg = args := arg :: !args in
+
+ add "virt-install";
+ add (sprintf "--name=%s" tmpname);
+
+ (*add "--print-xml";*)
+
+ (match arch with
+ | PPC64 | PPC64le -> add "--ram=4096"
+ | _ -> add "--ram=2048"
+ );
+
+ (match arch with
+ | X86_64 ->
+ (* XXX This assumes the host is always x86_64. *)
+ add "--cpu=host";
+ add "--vcpus=4"
+ | PPC64 ->
+ add "--arch=ppc64";
+ add "--machine=pseries";
+ add "--cpu=POWER7";
+ add "--vcpus=1"
+ | PPC64le ->
+ add "--arch=ppc64le";
+ add "--machine=pseries";
+ add "--cpu=POWER8";
+ add "--vcpus=1"
+ | arch ->
+ add (sprintf "--arch=%s" (string_of_arch arch));
+ add "--vcpus=1"
+ );
+
+ add "--os-type=linux";
+ add (sprintf "--os-variant=%s" (os_variant_of_os os arch));
+
+ (match tmpefivars with
+ | Some (code, vars) ->
+ add "--boot";
+ add (sprintf "loader=%s,loader_ro=yes,loader_type=pflash,nvram=%s"
+ code vars)
+ | _ -> ()
+ );
+
+ add (sprintf "--initrd-inject=%s" ks);
+ let os_extra =
+ match os with
+ | Debian _ | Ubuntu _ -> "auto"
+ | Fedora _ | RHEL _ | CentOS _ ->
+ sprintf "ks=file:/%s" (Filename.basename ks) in
+ add (sprintf "--extra-args=%s %s" (* sic: does NOT need to be quoted *)
+ os_extra (kernel_cmdline_of_os os arch));
+
+ add (sprintf "--disk=%s,size=%d,format=raw"
+ (Sys.getcwd () // tmpout) virtual_size_gb);
+
+ add "--serial=pty";
+ add (sprintf "--location=%s" location);
+ add "--nographics";
+ add "--noreboot";
+
+ (* Return the command line (list of arguments). *)
+ Array.of_list (List.rev !args)
+
+and os_variant_of_os os arch =
+ match os, arch with
+ (* This case is needed to workaround a bug in virt-install:
+ * https://bugzilla.redhat.com/show_bug.cgi?id=1399083
+ *)
+ | Fedora _, (PPC64|PPC64le) -> "fedora22"
+ | Fedora ver, _ when ver <= 23 ->
+ sprintf "fedora%d" ver
+ | Fedora _, _ -> "fedora23" (* max version known in Fedora 24 *)
+ | CentOS (major, minor), _ when (major, minor) <= (7,0) ->
+ sprintf "centos%d.%d" major minor
+ | CentOS _, _ -> "centos7.0" (* max version known in Fedora 24 *)
+ | RHEL (major, minor), _ when (major, minor) <= (7,2) ->
+ sprintf "rhel%d.%d" major minor
+ | RHEL _, _ -> "rhel7.2" (* max version known in Fedora 24 *)
+ | Debian (ver, _), _ -> sprintf "debian%d" ver
+ | Ubuntu (ver, _), _ -> sprintf "ubuntu%s" ver
+
+(* Same as the above, but we print the "true" os-variant, even
+ * if osinfo itself might not support it yet.
+ *)
+and true_os_variant_of_os = function
+ | Fedora ver -> sprintf "fedora%d" ver
+ | CentOS (major, minor) -> sprintf "centos%d.%d" major minor
+ | RHEL (major, minor) -> sprintf "rhel%d.%d" major minor
+ | Debian (ver, _) -> sprintf "debian%d" ver
+ | Ubuntu (ver, _) -> sprintf "ubuntu%s" ver
+
+and kernel_cmdline_of_os os arch =
+ match os, arch with
+ | _, X86_64
+ | _, I686
+ | _, S390X ->
+ "console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
+ | _, Aarch64 ->
+ "console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel no_timer_check printk.time=1 rd_NO_PLYMOUTH"
+ | _, Armv7 ->
+ "console=tty0 console=ttyAMA0,115200 rd_NO_PLYMOUTH"
+ | (Debian _|Fedora _|Ubuntu _), (PPC64|PPC64le) ->
+ "console=tty0 console=hvc0 rd_NO_PLYMOUTH"
+ | (RHEL _|CentOS _), PPC64
+ | (RHEL _|CentOS _), PPC64le ->
+ "console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
+
+and make_rhel_yum_conf major minor arch =
+ let buf = Buffer.create 4096 in
+ let bpf fs = bprintf buf fs in
+
+ let baseurl, srpms, optional =
+ match major, arch with
+ | 5, X86_64 ->
+ let topurl =
+ sprintf "http://download.devel.redhat.com/released/RHEL-5-Server/U%d"
+ minor in
+ sprintf "%s/x86_64/os/Server" topurl,
+ sprintf "%s/source/SRPMS" topurl,
+ None
+ | 6, X86_64 ->
+ let topurl =
+ sprintf "http://download.devel.redhat.com/released/RHEL-%d/%d.%d"
+ major major minor in
+ sprintf "%s/Server/%s/os" (string_of_arch arch) topurl,
+ sprintf "%s/source/SRPMS" topurl,
+ Some (sprintf "%s/Server/optional/%s/os" (string_of_arch arch) topurl,
+ sprintf "%s/Server/optional/source/SRPMS" topurl)
+ | 7, (X86_64|Aarch64|PPC64|PPC64le) ->
+ let topurl =
+ sprintf "http://download.devel.redhat.com/released/RHEL-%d/%d.%d"
+ major major minor in
+ sprintf "%s/Server/%s/os" (string_of_arch arch) topurl,
+ sprintf "%s/source/SRPMS" topurl,
+ Some (sprintf "%s/Server-optional/%s/os" (string_of_arch arch) topurl,
+ sprintf "%s/Server-optional/source/tree" topurl)
+ | _ -> assert false in
+
+ bpf "\
+# Yum configuration pointing to Red Hat servers.
+
+[rhel%d]
+name=RHEL %d Server
+baseurl=%s
+enabled=1
+gpgcheck=0
+keepcache=0
+
+[rhel%d-source]
+name=RHEL %d Server Source
+baseurl=%s
+enabled=0
+gpgcheck=0
+keepcache=0
+" major major baseurl major major srpms;
+
+ (match optional with
+ | None -> ()
+ | Some (optionalbaseurl, optionalsrpms) ->
+ bpf "\
+
+[rhel%d-optional]
+name=RHEL %d Server Optional
+baseurl=%s
+enabled=1
+gpgcheck=0
+keepcache=0
+
+[rhel%d-optional-source]
+name=RHEL %d Server Optional
+baseurl=%s
+enabled=0
+gpgcheck=0
+keepcache=0
+" major major optionalbaseurl major major optionalsrpms
+ );
+
+ Buffer.contents buf
+
+and make_index_fragment os arch index_fragment output nvram revision expandfs =
+ let chan = open_out (index_fragment ^ ".new") in
+ let fpf fs = fprintf chan fs in
+
+ fpf "[%s]\n" (string_of_os_noarch os);
+ fpf "name=%s\n" (long_name_of_os os arch);
+ fpf "osinfo=%s\n" (true_os_variant_of_os os);
+ fpf "arch=%s\n" (string_of_arch arch);
+ fpf "file=%s\n" output;
+ (match revision with
+ | None -> ()
+ | Some i -> fpf "revision=%d\n" i
+ );
+ fpf "checksum[sha512]=%s\n" (sha512sum_of_file output);
+ fpf "format=raw\n";
+ fpf "size=%d\n" (virtual_size_gb * 1024 * 1024 * 1024);
+ fpf "compressed_size=%d\n" (size_of_file output);
+ fpf "expand=%s\n" expandfs;
+
+ let notes = notes_of_os os arch nvram in
+ (match notes with
+ | first :: notes ->
+ fpf "notes=%s\n" first;
+ List.iter (fpf " %s\n") notes
+ | [] -> assert false
+ );
+ fpf "\n";
+
+ close_out chan;
+ let cmd =
+ sprintf "mv %s %s"
+ (quote (index_fragment ^ ".new")) (quote index_fragment) in
+ if Sys.command cmd <> 0 then exit 1
+
+and long_name_of_os os arch =
+ match os, arch with
+ | CentOS (major, minor), X86_64 ->
+ sprintf "CentOS %d.%d" major minor
+ | CentOS (major, minor), arch ->
+ sprintf "CentOS %d.%d (%s)" major minor (string_of_arch arch)
+ | Debian (ver, dist), X86_64 ->
+ sprintf "Debian %d (%s)" ver dist
+ | Debian (ver, dist), arch ->
+ sprintf "Debian %d (%s) (%s)" ver dist (string_of_arch arch)
+ | Fedora ver, X86_64 ->
+ sprintf "Fedora® %d Server" ver
+ | Fedora ver, arch ->
+ sprintf "Fedora® %d Server (%s)" ver (string_of_arch arch)
+ | RHEL (major, minor), X86_64 ->
+ sprintf "Red Hat Enterprise Linux® %d.%d" major minor
+ | RHEL (major, minor), arch ->
+ sprintf "Red Hat Enterprise Linux® %d.%d (%s)"
+ major minor (string_of_arch arch)
+ | Ubuntu (ver, dist), X86_64 ->
+ sprintf "Ubuntu %s (%s)" ver dist
+ | Ubuntu (ver, dist), arch ->
+ sprintf "Ubuntu %s (%s) (%s)" ver dist (string_of_arch arch)
+
+and notes_of_os os arch nvram =
+ let args = ref [] in
+ let add arg = args := arg :: !args in
+
+ add (long_name_of_os os arch);
+ add "";
+
+ (match os with
+ | CentOS _ ->
+ add "This CentOS image contains only unmodified @Core group packages."
+ | Debian _ ->
+ add "This is a minimal Debian install."
+ | Fedora _ ->
+ add "This Fedora image contains only unmodified @Core group packages.";
+ add "";
+ add "Fedora and the Infinity design logo are trademarks of Red Hat, Inc.";
+ add "Source and further information is available from http://fedoraproject.org/"
+ | RHEL _ -> assert false (* cannot happen, see caller *)
+ | Ubuntu _ ->
+ add "This is a minimal Ubuntu install."
+ );
+ add "";
+
+ (* Specific notes for particular versions. *)
+ let reconfigure_ssh_host_keys_debian () =
+ add "This image does not contain SSH host keys. To regenerate them use:";
+ add "";
+ add " --firstboot-command \"dpkg-reconfigure openssh-server\"";
+ add "";
+ in
+ let fix_serial_console_debian () =
+ add "The serial console is not working in this image. To enable it, do:";
+ add "";
+ add " --edit '/etc/default/grub:";
+ add " s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"console=tty0 console=ttyS0,115200n8\"/' \\";
+ add " --run-command update-grub";
+ add ""
+ in
+ let builder_account_warning () =
+ add "IMPORTANT WARNING:";
+ add "It seems to be impossible to create an Ubuntu >= 14.04 image using";
+ add "preseed without creating a user account. Therefore this image";
+ add "contains a user account 'builder'. I have disabled it, so that";
+ add "people who don't read release notes don't get caught out, but you";
+ add "might still wish to delete it completely.";
+ add ""
+ in
+ (match os with
+ | CentOS (6, _) ->
+ add "‘virt-builder centos-6’ will always install the latest 6.x release.";
+ add ""
+ | Debian (8, _) ->
+ reconfigure_ssh_host_keys_debian ();
+ fix_serial_console_debian ();
+ | Debian _ ->
+ add "This image is so very minimal that it only includes an ssh server";
+ add "and no virtual consoles. To enable virtual consoles use this";
+ add "virt-builder option:";
+ add "";
+ add " --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'\n";
+ add "";
+ reconfigure_ssh_host_keys_debian ();
+ | Ubuntu ("16.04", _) ->
+ builder_account_warning ();
+ fix_serial_console_debian ();
+ reconfigure_ssh_host_keys_debian ();
+ | Ubuntu (ver, _) when ver >= "14.04" ->
+ builder_account_warning ();
+ reconfigure_ssh_host_keys_debian ();
+ | Ubuntu _ ->
+ reconfigure_ssh_host_keys_debian ();
+ | _ -> ()
+ );
+
+ (match nvram with
+ | Some vars ->
+ add "You will need to use the associated UEFI NVRAM variables file:";
+ add (sprintf " http://libguestfs.org/download/builder/%s" vars);
+ add "";
+ | None -> ()
+ );
+
+ add "This template was generated by a script in the libguestfs source tree:";
+ add " builder/templates/make-template.ml";
+ add "Associated files used to prepare this template can be found in the";
+ add "same directory.";
+
+ List.rev !args
+
+and read_revision filename =
+ match (try Some (open_in filename) with Sys_error _ -> None) with
+ | None -> None
+ | Some chan ->
+ let r = ref None in
+ let rex = Str.regexp "^revision=\\([0-9]+\\)$" in
+ (try
+ let rec loop () =
+ let line = input_line chan in
+ if Str.string_match rex line 0 then (
+ r := Some (int_of_string (Str.matched_group 1 line));
+ raise End_of_file
+ );
+ loop ()
+ in
+ loop ()
+ with End_of_file -> ()
+ );
+ close_in chan;
+ !r
+
+and sha512sum_of_file filename =
+ let cmd = sprintf "sha512sum %s | awk '{print $1}'" (quote filename) in
+ let chan = Unix.open_process_in cmd in
+ let line = input_line chan in
+ let pstat = Unix.close_process_in chan in
+ check_process_status_for_errors pstat;
+ line
+
+and size_of_file filename = (Unix.stat filename).Unix.st_size
+
+and open_guest filename =
+ let g = new Guestfs.guestfs () in
+ g#add_drive_opts ~format:"raw" filename;
+ g#launch ();
+
+ let roots = g#inspect_os () in
+ if Array.length roots = 0 then (
+ eprintf "%s: cannot inspect this guest\n" prog;
+ exit 1
+ );
+ let root = roots.(0) in
+
+ let mps = g#inspect_get_mountpoints root in
+ let cmp (a,_) (b,_) = compare (String.length a) (String.length b) in
+ let mps = List.sort cmp mps in
+ List.iter (
+ fun (mp, dev) ->
+ try g#mount_ro dev mp
+ with Guestfs.Error msg -> eprintf "%s (ignored)\n" msg
+ ) mps;
+
+ g
+
+and check_process_status_for_errors = function
+ | Unix.WEXITED 0 -> ()
+ | Unix.WEXITED i ->
+ eprintf "command exited with %d\n%!" i;
+ exit 1
+ | Unix.WSIGNALED i ->
+ eprintf "command killed by signal %d\n%!" i;
+ exit 1
+ | Unix.WSTOPPED i ->
+ eprintf "command stopped by signal %d\n%!" i;
+ exit 1
+
+and random8 =
+ let chars = "abcdefghijklmnopqrstuvwxyz0123456789" in
+ fun () ->
+ String.concat "" (
+ List.map (
+ fun _ ->
+ let c = Random.int 36 in
+ let c = chars.[c] in
+ String.make 1 c
+ ) [1;2;3;4;5;6;7;8]
+ )
+
+let () = main ()
diff --git a/builder/templates/scientificlinux-6.index-fragment b/builder/templates/scientificlinux-6.index-fragment
new file mode 100644
index 0000000..e9d0cd0
--- /dev/null
+++ b/builder/templates/scientificlinux-6.index-fragment
@@ -0,0 +1,23 @@
+[scientificlinux-6]
+name=Scientific Linux 6.5
+osinfo=centos6.5
+arch=x86_64
+file=scientificlinux-6.xz
+revision=5
+checksum=be42b0e97d256ab5476079fe71411bebf59abe9c6ff4a7d27330aa5383fac9507472c06d11ef061d3c0e6695bec5ac9cfb7fbfd86fdbb5649e5cb535e2ac5b88
+format=raw
+size=6442450944
+compressed_size=191667880
+expand=/dev/sda3
+notes=Scientific Linux 6.5
+
+ This Scientific Linux image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/scientificlinux.sh
+
+ Note that `virt-builder scientificlinux-6' will always install the
+ latest 6.x release.
+
diff --git a/builder/templates/ubuntu-10.04.index-fragment b/builder/templates/ubuntu-10.04.index-fragment
new file mode 100644
index 0000000..f360261
--- /dev/null
+++ b/builder/templates/ubuntu-10.04.index-fragment
@@ -0,0 +1,25 @@
+[ubuntu-10.04]
+name=Ubuntu 10.04 (Lucid)
+osinfo=ubuntulucid
+arch=x86_64
+file=ubuntu-10.04.xz
+checksum=9e322782bc77c740ce956d57d0d89ec9ac9f2b890c474ac937f400db848df3e164683eaf4631b989f8b4771f64e0c0972452d1555a15c65714b5ceefb295fb7e
+format=raw
+size=4294967296
+compressed_size=149728112
+expand=/dev/sda1
+notes=Ubuntu 10.04 (Lucid).
+
+ This is a minimal Ubuntu 10.04 (Lucid) install.
+
+ Only the openssh-server package is selected in tasksel.
+ The preseed and virt-install scripts that produced this image
+ can be found in the libguestfs source tree:
+
+ builder/website/ubuntu.preseed
+ builder/website/ubuntu.sh
+
+ This image does not contain SSH host keys. To regenerate them use:
+
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
diff --git a/builder/templates/ubuntu-12.04.index-fragment b/builder/templates/ubuntu-12.04.index-fragment
new file mode 100644
index 0000000..23ee7b8
--- /dev/null
+++ b/builder/templates/ubuntu-12.04.index-fragment
@@ -0,0 +1,25 @@
+[ubuntu-12.04]
+name=Ubuntu 12.04 (Precise)
+osinfo=ubuntuprecise
+arch=x86_64
+file=ubuntu-12.04.xz
+checksum=15eab4610a44bf28423c08982cec47f6c3d43f29834791440249916ed76cc2dfeaf0405fddc8627086257bbbdaa4016c8982ad9b269f57f8f625b0e70d09e4e0
+format=raw
+size=4294967296
+compressed_size=168593316
+expand=/dev/sda1
+notes=Ubuntu 12.04 (Precise).
+
+ This is a minimal Ubuntu 12.04 (Precise) install.
+
+ Only the openssh-server package is selected in tasksel.
+ The preseed and virt-install scripts that produced this image
+ can be found in the libguestfs source tree:
+
+ builder/website/ubuntu.preseed
+ builder/website/ubuntu.sh
+
+ This image does not contain SSH host keys. To regenerate them use:
+
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
diff --git a/builder/templates/ubuntu-14.04.index-fragment b/builder/templates/ubuntu-14.04.index-fragment
new file mode 100644
index 0000000..7cf3b98
--- /dev/null
+++ b/builder/templates/ubuntu-14.04.index-fragment
@@ -0,0 +1,31 @@
+[ubuntu-14.04]
+name=Ubuntu 14.04 (Trusty)
+osinfo=ubuntutrusty
+arch=x86_64
+file=ubuntu-14.04.xz
+checksum=dbc5505c7cfbfb48275b09e91f781dfd7f8d521db577f0c31e0a70b13fbd18c8bcec97b1e274b28062ebc3aba70d68e64c84b9c9690ff7dfca9e81f813047e8a
+format=raw
+size=4294967296
+compressed_size=206250764
+expand=/dev/sda1
+notes=Ubuntu 14.04 (Trusty).
+
+ This is a minimal Ubuntu 14.04 (Trusty) install.
+
+ Only the openssh-server package is selected in tasksel.
+ The preseed and virt-install scripts that produced this image
+ can be found in the libguestfs source tree:
+
+ builder/website/ubuntu.preseed
+ builder/website/ubuntu.sh
+
+ This image does not contain SSH host keys. To regenerate them use:
+
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
+ IMPORTANT NOTE: It seems to be impossible to create an Ubuntu >= 14.04
+ image using preseed without creating a user account. Therefore this
+ image contains a user account 'builder'. I have disabled it, so that
+ people who don't read release notes don't get caught out, but you might
+ still wish to delete it completely.
+
diff --git a/builder/templates/ubuntu-16.04.index-fragment b/builder/templates/ubuntu-16.04.index-fragment
new file mode 100644
index 0000000..8c85963
--- /dev/null
+++ b/builder/templates/ubuntu-16.04.index-fragment
@@ -0,0 +1,38 @@
+[ubuntu-16.04]
+name=Ubuntu 16.04 (Xenial)
+osinfo=ubuntuxenial
+arch=x86_64
+file=ubuntu-16.04.xz
+checksum=56f9f7621fc5f60a01d0c2471fcddaa449979871aeaacb4d936b733f031dd40bb3c29fe73f8636dcaceb6c1413ebb1feff7381f1b24695e9750d106e243884d1
+format=raw
+size=4294967296
+compressed_size=232828552
+expand=/dev/sda1
+notes=Ubuntu 16.04 (Xenial).
+
+ This is a minimal Ubuntu 16.04 (Xenial) install.
+
+ Only the openssh-server package is selected in tasksel.
+ The preseed and virt-install scripts that produced this image
+ can be found in the libguestfs source tree:
+
+ builder/website/ubuntu.preseed
+ builder/website/ubuntu.sh
+
+ This image does not contain SSH host keys. To regenerate them use:
+
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
+ The serial console is not working in this image (apparently a bug
+ in Ubuntu). To enable it, do:
+
+ --edit '/etc/default/grub:
+ s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"/' \
+ --run-command update-grub
+
+ IMPORTANT NOTE: It seems to be impossible to create an Ubuntu >= 14.04
+ image using preseed without creating a user account. Therefore this
+ image contains a user account 'builder'. I have disabled it, so that
+ people who don't read release notes don't get caught out, but you might
+ still wish to delete it completely.
+
diff --git a/builder/website/ubuntu.preseed b/builder/templates/ubuntu.preseed
similarity index 100%
rename from builder/website/ubuntu.preseed
rename to builder/templates/ubuntu.preseed
diff --git a/builder/website/validate.sh b/builder/templates/validate.sh
similarity index 84%
rename from builder/website/validate.sh
rename to builder/templates/validate.sh
index 2a7ba32..9582611 100755
--- a/builder/website/validate.sh
+++ b/builder/templates/validate.sh
@@ -1,6 +1,6 @@
#!/bin/bash -
# libguestfs virt-builder validate index
-# Copyright (C) 2013 Red Hat Inc.
+# Copyright (C) 2013-2016 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,8 +24,8 @@ fn=test-filename-for-index-validate
rm -f $fn
touch $fn
-$VG virt-index-validate $srcdir/index
-$VG virt-index-validate $srcdir/index.asc
+$VG virt-index-validate ../../website/download/builder/index
+$VG virt-index-validate ../../website/download/builder/index.asc
$VG virt-index-validate $fn
rm $fn
diff --git a/builder/test-website/virt-builder/repos.d/libguestfs.conf.in b/builder/test-website/virt-builder/repos.d/libguestfs.conf.in
index 7bbc28d..7118529 100644
--- a/builder/test-website/virt-builder/repos.d/libguestfs.conf.in
+++ b/builder/test-website/virt-builder/repos.d/libguestfs.conf.in
@@ -1,3 +1,3 @@
[libguestfs.org]
-uri=file://@abs_top_srcdir@/builder/website/index.asc
+uri=file://@abs_top_srcdir@/website/download/builder/index.asc
gpgkey=file://@abs_top_srcdir@/builder/libguestfs.gpg
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
index 831c59f..76ad3b1 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -1235,7 +1235,7 @@ out the information in this index file.
The templates hosted on libguestfs.org were created using shell
scripts, kickstart files and preseed files which can be found in the
-libguestfs source tree, in C<builder/website>.
+libguestfs source tree, in C<builder/templates>.
=head3 Setting up the repository
@@ -1273,7 +1273,7 @@ Export your GPG public key:
There are many ways to create the templates. For example you could
clone existing guests (see L<virt-sysprep(1)>), or you could install a
guest by hand (L<virt-install(1)>). To see how the templates were
-created for virt-builder, look at the scripts in C<builder/website>
+created for virt-builder, look at the scripts in C<builder/templates>
For best results when compressing the templates, use the following xz
options (see L<nbdkit-xz-plugin(1)> for further explanation):
diff --git a/builder/website/.gitignore b/builder/website/.gitignore
deleted file mode 100644
index 65e1fc6..0000000
--- a/builder/website/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.xz
diff --git a/builder/website/centos-aarch64.sh b/builder/website/centos-aarch64.sh
deleted file mode 100755
index b70a4b4..0000000
--- a/builder/website/centos-aarch64.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-output=centos-$version-aarch64
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-case $version in
- 7.*)
- major=7
- # XXX This always points to the latest CentOS 7, so
- # effectively the minor number is always ignored.
- tree=http://mirror.centos.org/altarch/$major/os/aarch64/
- ;;
-esac
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel no_timer_check printk.time=1 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=plain
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=2048 \
- --cpu=cortex-a57 --vcpus=2 \
- --os-type=linux --os-variant=centos$major.0 \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` earlyprintk=pl011,0x9000000 ignore_loglevel console=ttyAMA0 no_timer_check printk.time=1 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/centos.sh b/builder/website/centos.sh
deleted file mode 100755
index 69670fe..0000000
--- a/builder/website/centos.sh
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-output=centos-$version
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-case $version in
- 6)
- # We rebuild this every time there is a new 6.x release, and bump
- # the revision in the index.
- tree=http://mirror.bytemark.co.uk/centos/$version/os/x86_64/
- major=6
- ;;
- 7.*)
- major=7
- # XXX This always points to the latest CentOS 7, so
- # effectively the minor number is always ignored.
- tree=http://mirror.centos.org/centos-7/$major/os/x86_64/
- ;;
-esac
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=512 --asprimary
-part swap --size=1024 --asprimary
-part / --fstype=ext4 --size=1024 --grow --asprimary
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=2048 \
- --cpu=host --vcpus=2 \
- --os-type=linux --os-variant=rhel$major \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/compress.sh b/builder/website/compress.sh
deleted file mode 100644
index 1036a60..0000000
--- a/builder/website/compress.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Common code which syspreps, sparsifies and compresses the templates.
-
-output=$1
-
-relabel_args=()
-
-if [ -n "$DO_RELABEL" ]; then
- relabel_args="--selinux-relabel"
-fi
-
-# Sysprep (removes logfiles and so on).
-virt-sysprep -a $output $relabel_args
-
-# Sparsify.
-mv $output $output.old
-virt-sparsify $output.old $output
-rm $output.old
-
-# Compress.
-xz --best --block-size=16777216 $output
-
-# Result. These can be copied into the index file directly.
-echo -n compressed_size= ; stat -c %s $output.xz
-echo -n checksum= ; sha512sum $output.xz | awk '{print $1}'
diff --git a/builder/website/debian.sh b/builder/website/debian.sh
deleted file mode 100755
index ca18f2d..0000000
--- a/builder/website/debian.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash -
-# libguestfs
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# The basic plan comes from:
-# http://honk.sigxcpu.org/con/Preseeding_Debian_virtual_machines_with_virt_...
-# https://wiki.debian.org/DebianInstaller/Preseed
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 2 ]; then
- echo "$0 VERSION DIST"
- exit 1
-fi
-
-# Some configuration.
-version=$1
-dist=$2
-if [ "$dist" = "jessie" ]; then
- # Until virt-install learns about debianjessie.
- osvariant=debianwheezy
-else
- osvariant=debian$dist
-fi
-location=http://ftp.uk.debian.org/debian/dists/$dist/main/installer-amd64
-output=debian-$version
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Make sure it's being run from the correct directory.
-if [ ! -f debian.preseed ]; then
- echo "You are running this script from the wrong directory."
- exit 1
-fi
-
-# Note that the injected file must be called "/preseed.cfg" in order
-# for d-i to pick it up.
-sed -e "s,@CACHE@,$http_proxy,g" < debian.preseed > preseed.cfg
-
-# Clean up function.
-cleanup ()
-{
- rm -f preseed.cfg
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=1024 \
- --os-type=linux --os-variant=$osvariant \
- --initrd-inject=$(pwd)/preseed.cfg \
- --extra-args="auto console=tty0 console=ttyS0,115200" \
- --disk=$(pwd)/$output,size=4,format=raw \
- --serial pty \
- --location=$location \
- --nographics \
- --noreboot
-
-# Remove apt proxy configuration (thanks: Daniel Miranda).
-guestfish -a $output -i <<EOF
- rm /etc/apt/apt.conf
- touch /etc/apt/apt.conf
-EOF
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/fedora-aarch64.sh b/builder/website/fedora-aarch64.sh
deleted file mode 100755
index cfa938d..0000000
--- a/builder/website/fedora-aarch64.sh
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Build Fedora images for aarch64 (secondary arch).
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-tree=https://download.fedoraproject.org/pub/fedora-secondary/releases/$version/Server/aarch64/os/
-output=fedora-$version-aarch64
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel no_timer_check printk.time=1 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=plain
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-
-%post
-# Rerun dracut for the installed kernel (not the running kernel):
-KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
-dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
-
-# Ensure the installation is up-to-date:
-dnf -y --best upgrade
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine --nvram $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-# virt-install nvram_template option is broken for non-root users
-# https://bugzilla.redhat.com/show_bug.cgi?id=1189143
-# work around it:
-vars=$(mktemp)
-cp /usr/share/edk2/aarch64/vars-template-pflash.raw $vars
-
-virt-install \
- --name=$tmpname \
- --ram=4096 \
- --vcpus=1 \
- --os-type=linux --os-variant=fedora21 \
- --arch aarch64 \
- --boot loader=/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw,loader_ro=yes,loader_type=pflash,nvram=$vars \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` earlyprintk=pl011,0x9000000 ignore_loglevel console=ttyAMA0 no_timer_check printk.time=1 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-# NB: We need to preserve the nvram after installation since
-# it contains the EFI boot variables set by grub.
-cp $vars $output-nvram
-xz --best $output-nvram
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/fedora-armv7l.sh b/builder/website/fedora-armv7l.sh
deleted file mode 100755
index 1ff7ec8..0000000
--- a/builder/website/fedora-armv7l.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Build Fedora images for armv7l.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-tree=http://mirror.bytemark.co.uk/fedora/linux/releases/$version/Server/armhfp/os/
-output=fedora-$version-armv7l
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=tty0 console=ttyAMA0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=plain
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-
-%post
-# Rerun dracut for the installed kernel (not the running kernel):
-KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
-dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
-
-# Ensure the installation is up-to-date:
-dnf -y --best upgrade
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=2048 \
- --vcpus=1 \
- --arch armv7l \
- --os-type=linux --os-variant=fedora22 \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyAMA0,115200 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/fedora-i686.sh b/builder/website/fedora-i686.sh
deleted file mode 100755
index 92d3f21..0000000
--- a/builder/website/fedora-i686.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# This script was used to create the Fedora templates used by
-# virt-builder.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-if [ $version -lt 21 ]; then
- tree=http://mirror.bytemark.co.uk/fedora/linux/releases/$version/Fedora/i386/os/
-else
- tree=http://mirror.bytemark.co.uk/fedora/linux/releases/$version/Server/i386/os/
-fi
-output=fedora-$version-i686
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=plain
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-
-%post
-# Enable Xen domU support:
-pushd /etc/dracut.conf.d
-echo 'add_drivers+="xen:vbd xen:vif"' > virt-builder-xen-drivers.conf
-popd
-# Rerun dracut for the installed kernel (not the running kernel):
-KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
-dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
-
-# Ensure the installation is up-to-date:
-dnf -y --best upgrade
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=2048 \
- --cpu=host --vcpus=2 \
- --os-type=linux --os-variant=fedora22 \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/fedora-ppc64.sh b/builder/website/fedora-ppc64.sh
deleted file mode 100755
index c8eafe2..0000000
--- a/builder/website/fedora-ppc64.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Build Fedora images for ppc64 big endian (secondary arch).
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-tree=https://download.fedoraproject.org/pub/fedora-secondary/releases/$version/Server/ppc64/os/
-output=fedora-$version-ppc64
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=tty0 console=hvc0 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=lvm
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-
-%post
-# Rerun dracut for the installed kernel (not the running kernel):
-KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
-dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
-
-# Ensure the installation is up-to-date:
-dnf -y --best upgrade
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=4096 \
- --vcpus=1 \
- --os-type=linux --os-variant=fedora22 \
- --arch ppc64 --machine pseries \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=hvc0 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/fedora-ppc64le.sh b/builder/website/fedora-ppc64le.sh
deleted file mode 100755
index 3b18c5b..0000000
--- a/builder/website/fedora-ppc64le.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Build Fedora images for ppc64le (secondary arch).
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-tree=https://download.fedoraproject.org/pub/fedora-secondary/releases/$version/Server/ppc64le/os/
-output=fedora-$version-ppc64le
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=tty0 console=hvc0 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=lvm
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-
-%post
-# Rerun dracut for the installed kernel (not the running kernel):
-KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
-dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
-
-# Ensure the installation is up-to-date:
-dnf -y --best upgrade
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=4096 \
- --vcpus=1 \
- --os-type=linux --os-variant=fedora22 \
- --arch ppc64le --machine pseries --cpu POWER8 \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=hvc0 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/fedora-s390x.sh b/builder/website/fedora-s390x.sh
deleted file mode 100755
index 8fb3120..0000000
--- a/builder/website/fedora-s390x.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Build Fedora images for s390x (secondary arch).
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-tree=https://dl.fedoraproject.org/pub/fedora-secondary/releases/$version/Server/s390x/os/
-output=fedora-$version-s390x
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=plain
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-
-%post
-# Rerun dracut for the installed kernel (not the running kernel):
-KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
-dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
-
-# Ensure the installation is up-to-date:
-dnf -y --best upgrade
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --arch=s390x \
- --ram=2048 \
- --vcpus=1 \
- --os-type=linux --os-variant=fedora23 \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/fedora.sh b/builder/website/fedora.sh
deleted file mode 100755
index 8911d14..0000000
--- a/builder/website/fedora.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# This script was used to create the Fedora templates used by
-# virt-builder.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-if [ $version -lt 21 ]; then
- tree=http://mirror.bytemark.co.uk/fedora/linux/releases/$version/Fedora/x86_64/os/
-else
- tree=http://mirror.bytemark.co.uk/fedora/linux/releases/$version/Server/x86_64/os/
-fi
-output=fedora-$version
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=plain
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-
-%post
-# Enable Xen domU support:
-pushd /etc/dracut.conf.d
-echo 'add_drivers+="xen:vbd xen:vif"' > virt-builder-xen-drivers.conf
-popd
-# Rerun dracut for the installed kernel (not the running kernel):
-KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
-dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
-
-# Ensure the installation is up-to-date:
-dnf -y --best upgrade
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=2048 \
- --cpu=host --vcpus=2 \
- --os-type=linux --os-variant=fedora22 \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/rhel-aarch64.sh b/builder/website/rhel-aarch64.sh
deleted file mode 100755
index 3a618c3..0000000
--- a/builder/website/rhel-aarch64.sh
+++ /dev/null
@@ -1,165 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-# Hack for RWMJ
-unset http_proxy
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-output=rhel-$version-aarch64
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-guestroot=/dev/sda4
-
-case $version in
- 7.*)
- major=7
- topurl=http://download.eng.bos.redhat.com/released/RHEL-7/$version/
- tree=$topurl/Server/aarch64/os
- baseurl=$tree
- srpms=$topurl/Server/source/tree
- optional=$topurl/Server-optional/x86_64/os
- optionalsrpms=$topurl/Server-optional/source/tree
- bootfs=ext4
- rootfs=xfs
- ;;
- *)
- echo "$0: version $version not supported by this script yet"
- exit 1
-esac
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel no_timer_check printk.time=1 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=plain
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-
-%post
-# Rerun dracut for the installed kernel (not the running kernel):
-KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
-dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
-%end
-EOF
-
-# Yum configuration.
-yum=$(mktemp)
-cat > $yum <<EOF
-[rhel$major]
-name=RHEL $major Server
-baseurl=$baseurl
-enabled=1
-gpgcheck=0
-keepcache=0
-
-[rhel$major-source]
-name=RHEL $major Server Source
-baseurl=$srpms
-enabled=0
-gpgcheck=0
-keepcache=0
-EOF
-
-if [ -n "$optional" ]; then
-cat >> $yum <<EOF
-[rhel$major-optional]
-name=RHEL $major Server Optional
-baseurl=$optional
-enabled=1
-gpgcheck=0
-keepcache=0
-
-[rhel$major-optional-source]
-name=RHEL $major Server Optional
-baseurl=$optionalsrpms
-enabled=0
-gpgcheck=0
-keepcache=0
-EOF
-fi
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- rm -f $yum
- virsh undefine --nvram $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-# virt-install nvram_template option is broken for non-root users
-# https://bugzilla.redhat.com/show_bug.cgi?id=1189143
-# work around it:
-vars=$(mktemp)
-cp /usr/share/edk2/aarch64/vars-template-pflash.raw $vars
-
-virt-install \
- --name=$tmpname \
- --ram=2048 \
- --vcpus=1 \
- --os-type=linux --os-variant=rhel$major \
- --arch aarch64 \
- --boot loader=/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw,loader_ro=yes,loader_type=pflash,nvram=$vars \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` earlyprintk=pl011,0x9000000 ignore_loglevel console=ttyAMA0 no_timer_check printk.time=1" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-# NB: We need to preserve the nvram after installation since
-# it contains the EFI boot variables set by grub.
-cp $vars $output-nvram
-
-# We have to replace yum config so it doesn't try to use RHN (it
-# won't be registered).
-guestfish --rw -a $output -m $guestroot \
- upload $yum /etc/yum.repos.d/download.devel.redhat.com.repo
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/rhel-ppc64.sh b/builder/website/rhel-ppc64.sh
deleted file mode 100755
index 32148ae..0000000
--- a/builder/website/rhel-ppc64.sh
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-# Hack for RWMJ
-unset http_proxy
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-output=rhel-$version-ppc64
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-guestroot=/dev/rhel/root
-
-case $version in
- 7.*)
- major=7
- topurl=http://download.devel.redhat.com/released/RHEL-$major/$version
- tree=$topurl/Server/ppc64/os
- baseurl=$tree
- srpms=$topurl/Server/source/tree
- optional=$topurl/Server-optional/ppc64/os
- optionalsrpms=$topurl/Server-optional/source/tree
- ;;
- *)
- echo "$0: version $version not supported by this script yet"
- exit 1
-esac
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<EOF
-install
-text
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-timezone --utc America/New_York
-selinux --enforcing
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=lvm
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-EOF
-
-# Yum configuration.
-yum=$(mktemp)
-cat > $yum <<EOF
-[rhel$major]
-name=RHEL $major Server
-baseurl=$baseurl
-enabled=1
-gpgcheck=0
-keepcache=0
-
-[rhel$major-source]
-name=RHEL $major Server Source
-baseurl=$srpms
-enabled=0
-gpgcheck=0
-keepcache=0
-EOF
-
-if [ -n "$optional" ]; then
-cat >> $yum <<EOF
-[rhel$major-optional]
-name=RHEL $major Server Optional
-baseurl=$optional
-enabled=1
-gpgcheck=0
-keepcache=0
-
-[rhel$major-optional-source]
-name=RHEL $major Server Optional
-baseurl=$optionalsrpms
-enabled=0
-gpgcheck=0
-keepcache=0
-EOF
-fi
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- rm -f $yum
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=4096 \
- --vcpus=1 \
- --os-type=linux --os-variant=rhel$major \
- --arch ppc64 --machine pseries \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-# We have to replace yum config so it doesn't try to use RHN (it
-# won't be registered).
-guestfish --rw -a $output -m $guestroot \
- upload $yum /etc/yum.repos.d/download.devel.redhat.com.repo
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/rhel-ppc64le.sh b/builder/website/rhel-ppc64le.sh
deleted file mode 100755
index 83e6391..0000000
--- a/builder/website/rhel-ppc64le.sh
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-# Hack for RWMJ
-unset http_proxy
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-output=rhel-$version-ppc64le
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-guestroot=/dev/rhel/root
-
-case $version in
- 7.*)
- major=7
- topurl=http://download.devel.redhat.com/released/RHEL-$major/$version
- tree=$topurl/Server/ppc64le/os
- baseurl=$tree
- srpms=$topurl/Server/source/tree
- optional=$topurl/Server-optional/ppc64le/os
- optionalsrpms=$topurl/Server-optional/source/tree
- ;;
- *)
- echo "$0: version $version not supported by this script yet"
- exit 1
-esac
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<EOF
-install
-text
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-timezone --utc America/New_York
-selinux --enforcing
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-autopart --type=lvm
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-EOF
-
-# Yum configuration.
-yum=$(mktemp)
-cat > $yum <<EOF
-[rhel$major]
-name=RHEL $major Server
-baseurl=$baseurl
-enabled=1
-gpgcheck=0
-keepcache=0
-
-[rhel$major-source]
-name=RHEL $major Server Source
-baseurl=$srpms
-enabled=0
-gpgcheck=0
-keepcache=0
-EOF
-
-if [ -n "$optional" ]; then
-cat >> $yum <<EOF
-[rhel$major-optional]
-name=RHEL $major Server Optional
-baseurl=$optional
-enabled=1
-gpgcheck=0
-keepcache=0
-
-[rhel$major-optional-source]
-name=RHEL $major Server Optional
-baseurl=$optionalsrpms
-enabled=0
-gpgcheck=0
-keepcache=0
-EOF
-fi
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- rm -f $yum
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=4096 \
- --vcpus=1 \
- --os-type=linux --os-variant=rhel$major \
- --arch ppc64le --machine pseries --cpu POWER8 \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-# We have to replace yum config so it doesn't try to use RHN (it
-# won't be registered).
-guestfish --rw -a $output -m $guestroot \
- upload $yum /etc/yum.repos.d/download.devel.redhat.com.repo
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/rhel.sh b/builder/website/rhel.sh
deleted file mode 100755
index fcb7315..0000000
--- a/builder/website/rhel.sh
+++ /dev/null
@@ -1,230 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-# Hack for RWMJ
-unset http_proxy
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-output=rhel-$version
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-guestroot=/dev/sda3
-
-case $version in
- 3.*)
- major=3
- minor=`echo $version | awk -F. '{print $2}'`
- topurl=http://download.devel.redhat.com/released/RHEL-$major/U$minor/AS
- tree=$topurl/x86_64/tree
- baseurl=$tree
- srpms=$topurl/x86_64/tree/SRPMS
- bootfs=ext2
- rootfs=ext3
- guestroot=/dev/sda2
- ;;
- 4.*)
- major=4
- minor=`echo $version | awk -F. '{print $2}'`
- topurl=http://download.devel.redhat.com/released/RHEL-$major/U$minor/AS
- tree=$topurl/x86_64/tree
- baseurl=$tree
- srpms=$topurl/x86_64/tree/SRPMS
- bootfs=ext2
- rootfs=ext3
- guestroot=/dev/sda2
- ;;
- 5.*)
- major=5
- minor=`echo $version | awk -F. '{print $2}'`
- topurl=http://download.devel.redhat.com/released/RHEL-$major-Server/U$minor
- tree=$topurl/x86_64/os
- baseurl=$tree/Server
- srpms=$topurl/source/SRPMS
- bootfs=ext2
- rootfs=ext4
- guestroot=/dev/sda2
- ;;
- 6.*)
- major=6
- topurl=http://download.devel.redhat.com/released/RHEL-$major/$version
- tree=$topurl/Server/x86_64/os
- baseurl=$tree
- srpms=$topurl/source/SRPMS
- optional=$topurl/Server/optional/x86_64/os
- optionalsrpms=$topurl/Server/optional/source/SRPMS
- bootfs=ext4
- rootfs=ext4
- ;;
- 7.*)
- major=7
- topurl=http://download.devel.redhat.com/released/RHEL-$major/$version
- tree=$topurl/Server/x86_64/os
- baseurl=$tree
- srpms=$topurl/Server/source/tree
- optional=$topurl/Server-optional/x86_64/os
- optionalsrpms=$topurl/Server-optional/source/tree
- bootfs=ext4
- rootfs=xfs
- ;;
- *)
- echo "$0: version $version not supported by this script yet"
- exit 1
-esac
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-timezone --utc America/New_York
-EOF
-
-if [ $major -le 4 ]; then
-cat >> $ks <<EOF
-langsupport en_US
-mouse generic
-EOF
-fi
-
-if [ $major -ge 4 ]; then
-cat >> $ks <<EOF
-selinux --enforcing
-EOF
-fi
-
-if [ $major -eq 5 ]; then
-cat >> $ks <<EOF
-key --skip
-EOF
-fi
-
-cat >> $ks <<EOF
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=$bootfs --size=512 --asprimary
-part swap --size=1024 --asprimary
-part / --fstype=$rootfs --size=1024 --grow --asprimary
-
-EOF
-
-if [ $major -ge 4 ]; then
-cat >> $ks <<EOF
-# Halt the system once configuration has finished.
-poweroff
-
-EOF
-fi
-
-cat >> $ks <<EOF
-%packages
-@core
-EOF
-
-# RHEL 5 didn't understand the %end directive, but RHEL >= 6
-# requires it.
-if [ $major -ge 6 ]; then
-cat >> $ks <<EOF
-%end
-EOF
-fi
-
-# Yum configuration.
-yum=$(mktemp)
-cat > $yum <<EOF
-[rhel$major]
-name=RHEL $major Server
-baseurl=$baseurl
-enabled=1
-gpgcheck=0
-keepcache=0
-
-[rhel$major-source]
-name=RHEL $major Server Source
-baseurl=$srpms
-enabled=0
-gpgcheck=0
-keepcache=0
-EOF
-
-if [ -n "$optional" ]; then
-cat >> $yum <<EOF
-[rhel$major-optional]
-name=RHEL $major Server Optional
-baseurl=$optional
-enabled=1
-gpgcheck=0
-keepcache=0
-
-[rhel$major-optional-source]
-name=RHEL $major Server Optional
-baseurl=$optionalsrpms
-enabled=0
-gpgcheck=0
-keepcache=0
-EOF
-fi
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- rm -f $yum
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=2048 \
- --cpu=host --vcpus=2 \
- --os-type=linux --os-variant=rhel$major \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-if [ $major -ge 5 ]; then
-# We have to replace yum config so it doesn't try to use RHN (it
-# won't be registered).
-guestfish --rw -a $output -m $guestroot \
- upload $yum /etc/yum.repos.d/download.devel.redhat.com.repo
-fi
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/scientificlinux.sh b/builder/website/scientificlinux.sh
deleted file mode 100755
index 2cd2c8f..0000000
--- a/builder/website/scientificlinux.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -ne 1 ]; then
- echo "$0 VERSION"
- exit 1
-fi
-
-version=$1
-output=scientificlinux-$version
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-major=$(echo $version | awk -F. '{print $1}')
-
-# We rebuild this every time there is a new 6.x release, and bump
-# the revision in the index.
-tree=http://www.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/$version/x86_64/os
-
-rm -f $output $output.old $output.xz
-
-# Generate the kickstart to a temporary file.
-ks=$(mktemp)
-cat > $ks <<'EOF'
-install
-text
-reboot
-lang en_US.UTF-8
-keyboard us
-network --bootproto dhcp
-rootpw builder
-firewall --enabled --ssh
-selinux --enforcing
-timezone --utc America/New_York
-bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
-zerombr
-clearpart --all --initlabel
-part /boot --fstype=ext4 --size=512 --asprimary
-part swap --size=1024 --asprimary
-part / --fstype=ext4 --size=1024 --grow --asprimary
-
-# Halt the system once configuration has finished.
-poweroff
-
-%packages
-@core
-%end
-EOF
-
-# Clean up function.
-cleanup ()
-{
- rm -f $ks
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=2048 \
- --cpu=host --vcpus=2 \
- --os-type=linux --os-variant=rhel$major \
- --initrd-inject=$ks \
- --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200 proxy=$http_proxy" \
- --disk $(pwd)/$output,size=6,format=raw \
- --serial pty \
- --location=$tree \
- --nographics \
- --noreboot
-
-DO_RELABEL=1
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/test-guest.sh b/builder/website/test-guest.sh
deleted file mode 100755
index 7854aeb..0000000
--- a/builder/website/test-guest.sh
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/bash -
-# virt-builder
-# Copyright (C) 2013 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# This is not part of the automated test suite. It's a manual test
-# run by the maintainer which must be run on each new guest to ensure
-# that all the virt-builder features work on the new guest.
-#
-# Usage:
-# ./run builder/website/test-guest.sh os-version [extra virt-builder args]
-# Then read the instructions ...
-
-export LANG=C
-set -e
-
-if ! virt-builder --help >/dev/null 2>&1 || [ ! -f builder/virt-builder.pod ]; then
- echo "$0: running the test from the wrong directory, or libguestfs has not been built"
- exit 1
-fi
-
-if [ $# -lt 1 ]; then
- echo "$0: missing os-version"
- echo "try: ./run virt-builder -l"
- exit 1
-fi
-
-osversion="$1"
-shift
-output="$osversion.img"
-
-virt-builder "$osversion" \
- --no-cache -v \
- --size 10G \
- --root-password password:123456 \
- --hostname test.example.com \
- --install scrub \
- --edit '/etc/issue: s/(.*)/$lineno: $1/' \
- --upload builder/virt-builder.pod:/virt-builder.pod \
- --run-command 'echo RUN COMMAND 1 >> /run-command.log' \
- --run-command 'echo RUN COMMAND 2 >> /run-command.log' \
- --run-command 'echo RUN COMMAND 3 >> /run-command.log' \
- --firstboot-command 'useradd -m -p "" rjones ; chage -d 0 rjones' \
- --firstboot-command 'echo FIRSTBOOT COMMAND 1' \
- --firstboot-command 'echo FIRSTBOOT COMMAND 2' \
- --firstboot-command 'echo FIRSTBOOT COMMAND 3' \
- "$@" |& tee "$osversion.log"
-
-# Boot the guest.
-qemu-system-x86_64 \
- -m 1024 \
- -drive "file=$output,format=raw,snapshot=on,if=ide" &
-
-cat <<EOF
-
- ========================================
-The "$osversion" guest is being booted.
-The trace file is here: "$osversion.log"
-
-Checklist:
-
- 1: Root password is 123456
- 2: Hostname is test.example.com
- 3: scrub package is installed
- 4: /etc/issue has line numbers
- 5: /virt-builder.pod exists and looks reasonable
- 6: /run-command.log exists and has 3 lines in correct order
- 7: /root/virt-sysprep-firstboot.log exists and has 3 entries in correct order
- 8: rjones account exists, with no password
- 9: rjones password must be changed at first login
-10: /home/rjones exists and is populated
-11: random-seed file was created or modified
- ========================================
-
-EOF
-
-#rm $output
diff --git a/builder/website/ubuntu-ppc64le.sh b/builder/website/ubuntu-ppc64le.sh
deleted file mode 100755
index a362547..0000000
--- a/builder/website/ubuntu-ppc64le.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash -
-# libguestfs
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# The basic plan comes from:
-# http://honk.sigxcpu.org/con/Preseeding_Debian_virtual_machines_with_virt_...
-# https://wiki.debian.org/DebianInstaller/Preseed
-# https://help.ubuntu.com/10.04/installation-guide/i386/preseed-using.html
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -lt 2 -o $# -gt 3 ]; then
- echo "$0 VERSION DIST [OSVARIANT]"
- exit 1
-fi
-
-# Some configuration.
-version=$1
-dist=$2
-osvariant=$3
-if [ -z "$osvariant" ]; then osvariant=ubuntu$dist; fi
-location=http://ports.ubuntu.com/ubuntu-ports/dists/$dist/main/installer-ppc64el
-output=ubuntu-$version-ppc64le
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Make sure it's being run from the correct directory.
-if [ ! -f ubuntu.preseed ]; then
- echo "You are running this script from the wrong directory."
- exit 1
-fi
-
-# Note that the injected file must be called "/preseed.cfg" in order
-# for d-i to pick it up.
-sed -e "s,@CACHE@,$http_proxy,g" < ubuntu.preseed > preseed.cfg
-
-# Clean up function.
-cleanup ()
-{
- rm -f preseed.cfg
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=1024 \
- --os-type=linux --os-variant=$osvariant \
- --arch ppc64le --machine pseries \
- --initrd-inject=$(pwd)/preseed.cfg \
- --extra-args="auto console=tty0 console=hvc0" \
- --disk=$(pwd)/$output,size=4,format=raw \
- --serial pty \
- --location=$location \
- --nographics \
- --noreboot
-
-source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/ubuntu.sh b/builder/website/ubuntu.sh
deleted file mode 100755
index bf0166c..0000000
--- a/builder/website/ubuntu.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash -
-# libguestfs
-# Copyright (C) 2013-2016 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# The basic plan comes from:
-# http://honk.sigxcpu.org/con/Preseeding_Debian_virtual_machines_with_virt_...
-# https://wiki.debian.org/DebianInstaller/Preseed
-# https://help.ubuntu.com/10.04/installation-guide/i386/preseed-using.html
-
-unset CDPATH
-export LANG=C
-set -e
-set -x
-
-if [ $# -lt 2 -o $# -gt 3 ]; then
- echo "$0 VERSION DIST [OSVARIANT]"
- exit 1
-fi
-
-# Some configuration.
-version=$1
-dist=$2
-osvariant=$3
-if [ -z "$osvariant" ]; then osvariant=ubuntu$dist; fi
-location=http://archive.ubuntu.com/ubuntu/dists/$dist/main/installer-amd64
-output=ubuntu-$version
-tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
-
-rm -f $output $output.old $output.xz
-
-# Make sure it's being run from the correct directory.
-if [ ! -f ubuntu.preseed ]; then
- echo "You are running this script from the wrong directory."
- exit 1
-fi
-
-# Note that the injected file must be called "/preseed.cfg" in order
-# for d-i to pick it up.
-sed -e "s,@CACHE@,$http_proxy,g" < ubuntu.preseed > preseed.cfg
-
-# Clean up function.
-cleanup ()
-{
- rm -f preseed.cfg
- virsh undefine $tmpname ||:
-}
-trap cleanup INT QUIT TERM EXIT ERR
-
-virt-install \
- --name=$tmpname \
- --ram=1024 \
- --os-type=linux --os-variant=$osvariant \
- --initrd-inject=$(pwd)/preseed.cfg \
- --extra-args="auto console=tty0 console=ttyS0,115200" \
- --disk=$(pwd)/$output,size=4,format=raw \
- --serial pty \
- --location=$location \
- --nographics \
- --noreboot
-
-# In Ubuntu >= 14.04 you can't complete the install without creating
-# a user account. We create one called 'builder', but we also
-# disable it.
-virt-customize -a $output --password builder:disabled
-
-source $(dirname "$0")/compress.sh $output
diff --git a/configure.ac b/configure.ac
index bc050a3..114110e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,10 +175,10 @@ AC_CONFIG_FILES([Makefile
builder/Makefile
builder/libguestfs.conf
builder/opensuse.conf
+ builder/templates/Makefile
builder/test-config/virt-builder/repos.d/test-index.conf
builder/test-simplestreams/virt-builder/repos.d/cirros.conf
builder/test-website/virt-builder/repos.d/libguestfs.conf
- builder/website/Makefile
cat/Makefile
csharp/Makefile
customize/Makefile
diff --git a/builder/website/README b/website/download/builder/README
similarity index 82%
rename from builder/website/README
rename to website/download/builder/README
index c8b6d8f..50eb380 100644
--- a/builder/website/README
+++ b/website/download/builder/README
@@ -12,16 +12,15 @@ templates. It has the canonical URL:
If you are looking at this file in the git repository
-----------------------------------------------------
-libguestfs.git/builder/website/ contains a copy of the website, minus
-the huge OS template files (because of their size, they are stored
-elsewhere and merged into the website when it is uploaded).
+libguestfs.git/builder/templates/ contains the program used to
+generate the template files, the source for the index, kickstart files
+and more.
When you use the ./run script to run virt-builder without installing,
the ./run script sets $VIRT_BUILDER_SOURCE to point to this directory.
If you actually want to use this configuration for anything except
simple testing, you will have to download one or more OS templates
-from the libguestfs website and put them into the builder/website/
-directory.
+from the libguestfs website and put them into this directory.
ie:
diff --git a/builder/website/index b/website/download/builder/index
similarity index 99%
rename from builder/website/index
rename to website/download/builder/index
index 82e8312..fffe580 100644
--- a/builder/website/index
+++ b/website/download/builder/index
@@ -60,25 +60,6 @@ notes=CentOS 7.1
builder/website/centos.sh
[centos-7.2]
-name=CentOS 7.2
-osinfo=centos7.2
-arch=x86_64
-file=centos-7.2.xz
-checksum=b32e6003d1f15e3a97e3644e35bb3fdc345a9b2e7448655d951ec331af6cd2b5548d6acfc9d92f09ac3a8a6439069c27fa539997118cb8a3f77d3bfa45c659d0
-format=raw
-size=6442450944
-compressed_size=252158848
-expand=/dev/sda3
-notes=CentOS 7.2
-
- This CentOS image contains only unmodified @Core group packages.
-
- It is thus very minimal. The kickstart and install script can be
- found in the libguestfs source tree:
-
- builder/website/centos.sh
-
-[centos-7.2]
name=CentOS 7.2 (aarch64)
osinfo=centos7.2
arch=aarch64
@@ -97,6 +78,25 @@ notes=CentOS 7.2 (aarch64)
builder/website/centos-aarch64.sh
+[centos-7.2]
+name=CentOS 7.2
+osinfo=centos7.2
+arch=x86_64
+file=centos-7.2.xz
+checksum=b32e6003d1f15e3a97e3644e35bb3fdc345a9b2e7448655d951ec331af6cd2b5548d6acfc9d92f09ac3a8a6439069c27fa539997118cb8a3f77d3bfa45c659d0
+format=raw
+size=6442450944
+compressed_size=252158848
+expand=/dev/sda3
+notes=CentOS 7.2
+
+ This CentOS image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/centos.sh
+
[cirros-0.3.1]
name=CirrOS 0.3.1
arch=x86_64
@@ -149,38 +149,6 @@ notes=Debian 6 (Squeeze).
--firstboot-command "dpkg-reconfigure openssh-server"
[debian-7]
-name=Debian 7 (Wheezy)
-osinfo=debian7
-arch=x86_64
-file=debian-7.xz
-revision=2
-checksum=c980a7d878c086b14619b3b9f644ab131c1f88b87729062f2832de12a938ba9e5a511c49402a9d02b740a30876f51889d20e7d0ed4997755f542650b8485f013
-format=raw
-size=4294967296
-compressed_size=150734028
-expand=/dev/sda1
-notes=Debian 7 (Wheezy).
-
- This is a default Debian install.
-
- The preseed and virt-install scripts that produced this image
- can be found in the libguestfs source tree:
-
- builder/website/debian.preseed
- builder/website/debian.sh
-
- This image is so very minimal that it only includes an ssh
- server and no virtual consoles. To enable virtual consoles
- use this virt-builder option:
-
- virt-builder debian-7 \
- --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'
-
- This image does not contain SSH host keys. To regenerate them use:
-
- --firstboot-command "dpkg-reconfigure openssh-server"
-
-[debian-7]
name=Debian 7 (Wheezy) (sparc64)
osinfo=debian7
arch=sparc64
@@ -215,6 +183,38 @@ notes=Debian 7 (Wheezy).
Console messages are lost after the bootconsole is disabled, but it
is still booting and will eventually give you a login prompt.
+[debian-7]
+name=Debian 7 (Wheezy)
+osinfo=debian7
+arch=x86_64
+file=debian-7.xz
+revision=2
+checksum=c980a7d878c086b14619b3b9f644ab131c1f88b87729062f2832de12a938ba9e5a511c49402a9d02b740a30876f51889d20e7d0ed4997755f542650b8485f013
+format=raw
+size=4294967296
+compressed_size=150734028
+expand=/dev/sda1
+notes=Debian 7 (Wheezy).
+
+ This is a default Debian install.
+
+ The preseed and virt-install scripts that produced this image
+ can be found in the libguestfs source tree:
+
+ builder/website/debian.preseed
+ builder/website/debian.sh
+
+ This image is so very minimal that it only includes an ssh
+ server and no virtual consoles. To enable virtual consoles
+ use this virt-builder option:
+
+ virt-builder debian-7 \
+ --edit '/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,'
+
+ This image does not contain SSH host keys. To regenerate them use:
+
+ --firstboot-command "dpkg-reconfigure openssh-server"
+
[debian-8]
name=Debian 8 (Jessie)
osinfo=debian8
@@ -314,29 +314,6 @@ notes=Fedora 20.
Source and further information is available from http://fedoraproject.org/
[fedora-21]
-name=Fedora® 21 Server
-osinfo=fedora21
-arch=x86_64
-file=fedora-21.xz
-revision=1
-checksum=4dc92cbf540d3a0745ffe1fa01ffae15f17e7a8aa45c70ad975a1dda82b7f1ebe42f912be74d91a5866a91ee2ca3be3c2be274b5da29db930fe1ec8c2286575b
-format=raw
-size=6442450944
-compressed_size=209059864
-expand=/dev/sda3
-notes=Fedora 21 Server.
-
- This Fedora image contains only unmodified @Core group packages.
-
- It is thus very minimal. The kickstart and install script can be
- found in the libguestfs source tree:
-
- builder/website/fedora.sh
-
- Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
- Source and further information is available from http://fedoraproject.org/
-
-[fedora-21]
name=Fedora® 21 Server (aarch64)
osinfo=fedora21
arch=aarch64
@@ -429,17 +406,18 @@ notes=Fedora 21 Server (ppc64le)
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
-[fedora-22]
-name=Fedora® 22 Server
-osinfo=fedora22
+[fedora-21]
+name=Fedora® 21 Server
+osinfo=fedora21
arch=x86_64
-file=fedora-22.xz
-checksum=59f8b32ba363b64ad37a4bd3d17abd049e80691b84ea9b6c4f0485bcc743b6c8dff5bacd4ed838c555487f750edfd132a22421976a0821d82f16811361d4d98d
+file=fedora-21.xz
+revision=1
+checksum=4dc92cbf540d3a0745ffe1fa01ffae15f17e7a8aa45c70ad975a1dda82b7f1ebe42f912be74d91a5866a91ee2ca3be3c2be274b5da29db930fe1ec8c2286575b
format=raw
size=6442450944
-compressed_size=228011712
+compressed_size=209059864
expand=/dev/sda3
-notes=Fedora 22 Server.
+notes=Fedora 21 Server.
This Fedora image contains only unmodified @Core group packages.
@@ -452,28 +430,6 @@ notes=Fedora 22 Server.
Source and further information is available from http://fedoraproject.org/
[fedora-22]
-name=Fedora® 22 Server (i686)
-osinfo=fedora22
-arch=i686
-file=fedora-22-i686.xz
-checksum=3547b94d5c418792e722786cfae41decd41f0725d529d65a2c719094c0b815eaa4fae195514a14d42fa19b57b895bcdbfdb305edf918b1b3722f30f338042d31
-format=raw
-size=6442450944
-compressed_size=225185592
-expand=/dev/sda3
-notes=Fedora 22 Server (i686)
-
- This Fedora image contains only unmodified @Core group packages.
-
- It is thus very minimal. The kickstart and install script can be
- found in the libguestfs source tree:
-
- builder/website/fedora-i686.sh
-
- Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
- Source and further information is available from http://fedoraproject.org/
-
-[fedora-22]
name=Fedora® 22 Server (aarch64)
osinfo=fedora22
arch=aarch64
@@ -520,48 +476,46 @@ notes=Fedora 22 Server (armv7l)
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
-[fedora-23]
-name=Fedora® 23 Server
-osinfo=fedora23
-arch=x86_64
-file=fedora-23.xz
-revision=3
-checksum=90cd606923e16e2c01a08eaa360e213cdd49462e259a04cc6efb1d2516215fb4ac3c62811dfd1646d89650f717da030fa6dec693571e027a644eee589accb78d
+[fedora-22]
+name=Fedora® 22 Server (i686)
+osinfo=fedora22
+arch=i686
+file=fedora-22-i686.xz
+checksum=3547b94d5c418792e722786cfae41decd41f0725d529d65a2c719094c0b815eaa4fae195514a14d42fa19b57b895bcdbfdb305edf918b1b3722f30f338042d31
format=raw
size=6442450944
-compressed_size=317209280
+compressed_size=225185592
expand=/dev/sda3
-notes=Fedora 23 Server.
+notes=Fedora 22 Server (i686)
This Fedora image contains only unmodified @Core group packages.
It is thus very minimal. The kickstart and install script can be
found in the libguestfs source tree:
- builder/website/fedora.sh
+ builder/website/fedora-i686.sh
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
-[fedora-23]
-name=Fedora® 23 Server (i686)
-osinfo=fedora23
-arch=i686
-file=fedora-23-i686.xz
-revision=2
-checksum=4b1badbb92f40ca1b3336e70b2564755d643bc00005fd6364c389a1f3078952968a6887c36c4f79fe3873cf42d41cb36dd226521fee32ed6e08c65d6d059af3c
+[fedora-22]
+name=Fedora® 22 Server
+osinfo=fedora22
+arch=x86_64
+file=fedora-22.xz
+checksum=59f8b32ba363b64ad37a4bd3d17abd049e80691b84ea9b6c4f0485bcc743b6c8dff5bacd4ed838c555487f750edfd132a22421976a0821d82f16811361d4d98d
format=raw
size=6442450944
-compressed_size=322831152
+compressed_size=228011712
expand=/dev/sda3
-notes=Fedora 23 Server (i686)
+notes=Fedora 22 Server.
This Fedora image contains only unmodified @Core group packages.
It is thus very minimal. The kickstart and install script can be
found in the libguestfs source tree:
- builder/website/fedora-i686.sh
+ builder/website/fedora.sh
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
@@ -614,6 +568,29 @@ notes=Fedora 23 Server (armv7l)
Source and further information is available from http://fedoraproject.org/
[fedora-23]
+name=Fedora® 23 Server (i686)
+osinfo=fedora23
+arch=i686
+file=fedora-23-i686.xz
+revision=2
+checksum=4b1badbb92f40ca1b3336e70b2564755d643bc00005fd6364c389a1f3078952968a6887c36c4f79fe3873cf42d41cb36dd226521fee32ed6e08c65d6d059af3c
+format=raw
+size=6442450944
+compressed_size=322831152
+expand=/dev/sda3
+notes=Fedora 23 Server (i686)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-i686.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
+[fedora-23]
name=Fedora® 23 Server (ppc64)
osinfo=fedora23
arch=ppc64
@@ -658,17 +635,18 @@ notes=Fedora 23 Server (ppc64le)
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
-[fedora-24]
-name=Fedora® 24 Server
-osinfo=fedora24
+[fedora-23]
+name=Fedora® 23 Server
+osinfo=fedora23
arch=x86_64
-file=fedora-24.xz
-checksum=907656be1f0bb4ed221a54f4339660d02071bdf79acd1644087e5ca20e315ba8e4b9008d7f0814a840904198a54499556f226db8b32f96a01ecd20370da8d03d
+file=fedora-23.xz
+revision=3
+checksum=90cd606923e16e2c01a08eaa360e213cdd49462e259a04cc6efb1d2516215fb4ac3c62811dfd1646d89650f717da030fa6dec693571e027a644eee589accb78d
format=raw
size=6442450944
-compressed_size=321359432
+compressed_size=317209280
expand=/dev/sda3
-notes=Fedora 24 Server.
+notes=Fedora 23 Server.
This Fedora image contains only unmodified @Core group packages.
@@ -681,50 +659,6 @@ notes=Fedora 24 Server.
Source and further information is available from http://fedoraproject.org/
[fedora-24]
-name=Fedora® 24 Server (i686)
-osinfo=fedora24
-arch=i686
-file=fedora-24-i686.xz
-checksum=1461da1557327e0641987654919698a6b7c2df1c58f76a4a4d61fb66476dac1b19fe6e3650b82a246df7d241037725c7b8e57e73d3312e370dfb132f54b5cbf4
-format=raw
-size=6442450944
-compressed_size=319087504
-expand=/dev/sda3
-notes=Fedora 24 Server (i686)
-
- This Fedora image contains only unmodified @Core group packages.
-
- It is thus very minimal. The kickstart and install script can be
- found in the libguestfs source tree:
-
- builder/website/fedora-i686.sh
-
- Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
- Source and further information is available from http://fedoraproject.org/
-
-[fedora-24]
-name=Fedora® 24 Server (armv7l)
-osinfo=fedora24
-arch=armv7l
-file=fedora-24-armv7l.xz
-checksum=7d9a5ce8e10c13e8d07ace42555183bfee5e561464e9fc439d0fefc3e85048bdc0c14d44d5584029d4015d0f3316c7583af8ae6d4c0ff8bcfcdb9037a37cacc0
-format=raw
-size=6442450944
-compressed_size=324231484
-expand=/dev/sda3
-notes=Fedora 24 Server (armv7l)
-
- This Fedora image contains only unmodified @Core group packages.
-
- It is thus very minimal. The kickstart and install script can be
- found in the libguestfs source tree:
-
- builder/website/fedora-armv7l.sh
-
- Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
- Source and further information is available from http://fedoraproject.org/
-
-[fedora-24]
name=Fedora® 24 Server (aarch64)
osinfo=fedora24
arch=aarch64
@@ -749,39 +683,39 @@ notes=Fedora 24 Server (aarch64)
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
-[fedora-25]
-name=Fedora® 25 Server
-osinfo=fedora25
-arch=x86_64
-file=fedora-25.xz
-checksum=fd7f8c9c7f6093b0c8c154ab12a116952745a00f5634ee8ded8c81d5f3b9b614558b11109de98f814f4f57fb2c0a394fba43d8a9ed127b99b78ff02c39957f7b
+[fedora-24]
+name=Fedora® 24 Server (armv7l)
+osinfo=fedora24
+arch=armv7l
+file=fedora-24-armv7l.xz
+checksum=7d9a5ce8e10c13e8d07ace42555183bfee5e561464e9fc439d0fefc3e85048bdc0c14d44d5584029d4015d0f3316c7583af8ae6d4c0ff8bcfcdb9037a37cacc0
format=raw
size=6442450944
-compressed_size=337395436
+compressed_size=324231484
expand=/dev/sda3
-notes=Fedora 25 Server.
+notes=Fedora 24 Server (armv7l)
This Fedora image contains only unmodified @Core group packages.
It is thus very minimal. The kickstart and install script can be
found in the libguestfs source tree:
- builder/website/fedora.sh
+ builder/website/fedora-armv7l.sh
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
-[fedora-25]
-name=Fedora® 25 Server (i686)
-osinfo=fedora25
+[fedora-24]
+name=Fedora® 24 Server (i686)
+osinfo=fedora24
arch=i686
-file=fedora-25-i686.xz
-checksum=17cdf048a3961a316ac32aa084b4b7d20d0ff4756bd5e942c1aae29c6e8b3cf2a41516e87e301ee1122643aca14ca252554ebbadbe468a582c10591edc56177a
+file=fedora-24-i686.xz
+checksum=1461da1557327e0641987654919698a6b7c2df1c58f76a4a4d61fb66476dac1b19fe6e3650b82a246df7d241037725c7b8e57e73d3312e370dfb132f54b5cbf4
format=raw
size=6442450944
-compressed_size=247412792
+compressed_size=319087504
expand=/dev/sda3
-notes=Fedora 25 Server (i686)
+notes=Fedora 24 Server (i686)
This Fedora image contains only unmodified @Core group packages.
@@ -793,6 +727,28 @@ notes=Fedora 25 Server (i686)
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
+[fedora-24]
+name=Fedora® 24 Server
+osinfo=fedora24
+arch=x86_64
+file=fedora-24.xz
+checksum=907656be1f0bb4ed221a54f4339660d02071bdf79acd1644087e5ca20e315ba8e4b9008d7f0814a840904198a54499556f226db8b32f96a01ecd20370da8d03d
+format=raw
+size=6442450944
+compressed_size=321359432
+expand=/dev/sda3
+notes=Fedora 24 Server.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
[fedora-25]
name=Fedora® 25 Server (aarch64)
osinfo=fedora25
@@ -841,6 +797,28 @@ notes=Fedora 25 Server (armv7l)
Source and further information is available from http://fedoraproject.org/
[fedora-25]
+name=Fedora® 25 Server (i686)
+osinfo=fedora25
+arch=i686
+file=fedora-25-i686.xz
+checksum=17cdf048a3961a316ac32aa084b4b7d20d0ff4756bd5e942c1aae29c6e8b3cf2a41516e87e301ee1122643aca14ca252554ebbadbe468a582c10591edc56177a
+format=raw
+size=6442450944
+compressed_size=247412792
+expand=/dev/sda3
+notes=Fedora 25 Server (i686)
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora-i686.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
+[fedora-25]
name=Fedora® 25 Server (ppc64)
osinfo=fedora25
arch=ppc64
@@ -886,6 +864,28 @@ notes=Fedora 25 Server (ppc64le)
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
+[fedora-25]
+name=Fedora® 25 Server
+osinfo=fedora25
+arch=x86_64
+file=fedora-25.xz
+checksum=fd7f8c9c7f6093b0c8c154ab12a116952745a00f5634ee8ded8c81d5f3b9b614558b11109de98f814f4f57fb2c0a394fba43d8a9ed127b99b78ff02c39957f7b
+format=raw
+size=6442450944
+compressed_size=337395436
+expand=/dev/sda3
+notes=Fedora 25 Server.
+
+ This Fedora image contains only unmodified @Core group packages.
+
+ It is thus very minimal. The kickstart and install script can be
+ found in the libguestfs source tree:
+
+ builder/website/fedora.sh
+
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
[scientificlinux-6]
name=Scientific Linux 6.5
osinfo=centos6.5
@@ -1027,3 +1027,4 @@ notes=Ubuntu 16.04 (Xenial).
image contains a user account 'builder'. I have disabled it, so that
people who don't read release notes don't get caught out, but you might
still wish to delete it completely.
+
diff --git a/builder/website/index.asc b/website/download/builder/index.asc
similarity index 100%
rename from builder/website/index.asc
rename to website/download/builder/index.asc
--
2.10.2
7 years, 11 months
[PATCH v2 0/6] Feature: Yara file scanning
by Matteo Cafasso
v2:
- Fix yara dependency in packagelist
- Use pkg-config where available
- Improve longdesc of yara_load API
- Fix libyara initialization and finalization
- Import CLEANUP_FCLOSE
- Add custom CLEANUP_DESTROY_YARA_COMPILER
- Add rules compilation error callback
- Other small fixes according to comments
Matteo Cafasso (6):
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am | 4 +-
daemon/cleanups.c | 28 +++
daemon/cleanups.h | 9 +
daemon/yara.c | 328 +++++++++++++++++++++++++++++++
generator/actions.ml | 62 ++++++
generator/structs.ml | 9 +
gobject/Makefile.inc | 2 +
java/Makefile.inc | 1 +
java/com/redhat/et/libguestfs/.gitignore | 1 +
m4/guestfs_daemon.m4 | 14 ++
src/MAX_PROC_NR | 2 +-
src/Makefile.am | 1 +
src/yara.c | 140 +++++++++++++
tests/yara/Makefile.am | 26 +++
tests/yara/test-yara-scan.sh | 72 +++++++
17 files changed, 702 insertions(+), 2 deletions(-)
create mode 100644 daemon/yara.c
create mode 100644 src/yara.c
create mode 100644 tests/yara/Makefile.am
create mode 100755 tests/yara/test-yara-scan.sh
--
2.10.2
7 years, 12 months
[jmracek@redhat.com: DNF-2-0 - release candidate]
by Richard W.M. Jones
----- Forwarded message from Jaroslav Mracek <jmracek(a)redhat.com> -----
Date: Tue, 22 Nov 2016 16:17:11 +0100
From: Jaroslav Mracek <jmracek(a)redhat.com>
To: bcl(a)redhat.com, dcantrell(a)redhat.com, "Lumens, Christopher"
<clumens(a)redhat.com>, pjones(a)redhat.com, sbueno(a)redhat.com,
christos.triantafyllidis(a)gmail.com, kevin(a)tigcc.ticalc.org,
clime(a)redhat.com, msuchy(a)redhat.com, bkabrda(a)redhat.com,
phracek(a)redhat.com, Michael Mraka <mmraka(a)redhat.com>,
alikins(a)redhat.com, awood <awood(a)redhat.com>, bkearney(a)redhat.com,
tla(a)rasmil.dk, thomas.moschny(a)gmx.de, nhorman(a)redhat.com,
jfilak(a)redhat.com, michal.toman(a)gmail.com, mkrizek(a)redhat.com,
wwoods(a)redhat.com, mgrepl(a)redhat.com, dwalsh(a)redhat.com,
sgallagh(a)redhat.com, twoerner(a)redhat.com, rjones(a)redhat.com,
nav007(a)gmail.com, anish.developer(a)gmail.com, psatpute(a)redhat.com,
pnemade(a)redhat.com
Subject: DNF-2-0 - release candidate
Dear administrator of components that requires DNF,
As a member of DNF team I would like to inform you about major release of
DNF in version 2. The major update solves a lot issues and provides
enchantments. The release candidate is so far available for Fedora rawhide
or in ours testing copr repository rpmsoftwaremanagement/dnf-nightly .
Unfortunatelly the release is accompanied with some incompatibilities with
dnf-1.1, therefore we would like to ask you for test your component with
new version. Any feedback from your side is more than welcome and can help
us with further DNF development.
The list of differences can be found here:
https://dnf.readthedocs.io/en/latest/dnf-1_vs_dnf-2.html
Or information about changes: https://fedoraproject.org/wiki/Changes/DNF-2.0
Thank you very much for any feedback
Jaroslav
----- End forwarded message -----
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
8 years
Re: [Libguestfs] [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
by Michal Skrivanek
> On 7 Nov 2016, at 22:16, Derek Atkins <derek(a)ihtfp.com> wrote:
>
> Hi,
>
> My last VM imported in 2 minutes. This one has been sitting for three
> hours. I think this is a bug.
well, some time it does take a long time. Are you sure it was hung?
No I/O going on?
adding libguestfs list
Thanks,
michal
>
> Just in case it helps, here's a larger piece of the virt-v2v log
> (see the end)
>
> -derek
>
> On Mon, November 7, 2016 12:54 pm, Derek Atkins wrote:
>> Hi,
>>
>> I've successfully imported several VMs already, so I thought I had the
>> process down. Each import completed relatively quickly. So that's why
>> this one was such a surprise.
>>
>> I've got a Fedora 21 VM packaged into an OVA. I copy it to my ovirt
>> host and then [Virtual Machines] -> Import -> [OVA] and select the ova
>> file. Follow the process, assign the correct storage location, and let
>> it go. Usually it takes only a few minutes, but it's been sitting in
>> the conversion process for over 20 minutes already (multiple attempts
>> end in the same place). It's only a 4GB disk; the other imports were
>> all around the same size and took significantly longer.
>>
>> I tried running virt-v2v by hand:
>>
>> LIBGUESTFS_BACKEND=direct virt-v2v -v -x -i ova fedora21.ova -of raw -o
>> null
>>
>> and it hung here:
>>
>> guestfsd: main_loop: new request, len 0x28
>> guestfsd: main_loop: proc 26 (aug_close) took 0.03 seconds
>> libguestfs: trace: v2v: aug_close = 0
>> libguestfs: trace: v2v: selinux_relabel
>> "/etc/selinux/targeted/contexts/files/file_contexts" "/" "force:true"
>> guestfsd: main_loop: new request, len 0x6c
>> commandrvf: stdout=n stderr=y flags=0x0
>> commandrvf: setfiles -F -e /sysroot/dev -e /sysroot/proc -e
>> /sysroot/selinux -e /sysroot/sys -r /sysroot -q
>> /sysroot/etc/selinux/targeted/contexts/files/file_contexts /sysroot/
>> Can't stat exclude path "/sysroot/selinux", No such file or directory -
>> ignoring.
>> ^C
>>
>> Any ideas why this VM is different from all the other VMs?
>>
>> -derek
>
> [snip]
> installed kernel packages in this guest:
> (kernel-core, 3.17.8-300.fc21, x86_64,
> /boot/vmlinuz-3.17.8-300.fc21.x86_64,
> /boot/initramfs-3.17.8-300.fc21.x86_64.img, virtio=true, xen=false,
> debug=false)
> (kernel-core, 3.17.4-301.fc21, x86_64,
> /boot/vmlinuz-3.17.4-301.fc21.x86_64,
> /boot/initramfs-3.17.4-301.fc21.x86_64.img, virtio=true, xen=false,
> debug=false)
> libguestfs: trace: v2v: glob_expand "/vmlinuz-*"
> guestfsd: main_loop: new request, len 0x3c
> guestfsd: main_loop: proc 113 (glob_expand) took 0.00 seconds
> libguestfs: trace: v2v: glob_expand = []
> libguestfs: trace: v2v: glob_expand "/boot/vmlinuz-*"
> guestfsd: main_loop: new request, len 0x40
> guestfsd: main_loop: proc 113 (glob_expand) took 0.00 seconds
> libguestfs: trace: v2v: glob_expand =
> ["/boot/vmlinuz-0-rescue-aebaf0a54c334c40a3f2a001266b032e",
> "/boot/vmlinuz-3.17.4-301.fc21.x86_64",
> "/boot/vmlinuz-3.17.8-300.fc21.x86_64"]
> libguestfs: trace: v2v: glob_expand "/boot/kernel-*"
> guestfsd: main_loop: new request, len 0x40
> guestfsd: main_loop: proc 113 (glob_expand) took 0.00 seconds
> libguestfs: trace: v2v: glob_expand = []
> libguestfs: trace: v2v: exists "/sbin/grubby"
> guestfsd: main_loop: new request, len 0x38
> libguestfs: trace: v2v: exists = 1
> libguestfs: trace: v2v: command "grubby --default-kernel"
> guestfsd: main_loop: proc 36 (exists) took 0.00 seconds
> guestfsd: main_loop: new request, len 0x4c
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /dev /sysroot/dev
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /dev/pts /sysroot/dev/pts
> mount: mount point /sysroot/dev/pts does not exist
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /proc /sysroot/proc
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys/fs/selinux /sysroot/selinux
> mount: mount point /sysroot/selinux does not exist
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys /sysroot/sys
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys/fs/selinux /sysroot/sys/fs/selinux
> mount: mount point /sysroot/sys/fs/selinux does not exist
> renaming /sysroot/etc/resolv.conf to /sysroot/etc/bojotzks
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: cp /etc/resolv.conf /sysroot/etc/resolv.conf
> commandrvf: stdout=y stderr=y flags=0x40000
> commandrvf: grubby --default-kernel
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/sys
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/proc
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/dev
> renaming /sysroot/etc/bojotzks to /sysroot/etc/resolv.conf
> guestfsd: main_loop: proc 50 (command) took 0.13 seconds
> libguestfs: trace: v2v: command = "/boot/vmlinuz-3.17.8-300.fc21.x86_64\n"
> libguestfs: trace: v2v: statns "/boot/vmlinuz-3.17.8-300.fc21.x86_64"
> guestfsd: main_loop: new request, len 0x50
> guestfsd: main_loop: proc 421 (statns) took 0.00 seconds
> libguestfs: trace: v2v: statns = <struct guestfs_statns = st_dev: 2049,
> st_ino: 340, st_mode: 33261, st_nlink: 1, st_uid: 0, st_gid: 0, st_rdev:
> 0, st_size: 5757864, st_blksize: 4096, st_blocks: 11248, st_atime_sec:
> 1420760440, st_atime_nsec: 0, st_mtime_sec: 1420760440, st_mtime_nsec: 0,
> st_ctime_sec: 1421863850, st_ctime_nsec: 600025468, st_spare1: 0,
> st_spare2: 0, st_spare3: 0, st_spare4: 0, st_spare5: 0, st_spare6: 0, >
> libguestfs: trace: v2v: statns
> "/boot/vmlinuz-0-rescue-aebaf0a54c334c40a3f2a001266b032e"
> guestfsd: main_loop: new request, len 0x64
> guestfsd: main_loop: proc 421 (statns) took 0.00 seconds
> libguestfs: trace: v2v: statns = <struct guestfs_statns = st_dev: 2049,
> st_ino: 23, st_mode: 33261, st_nlink: 1, st_uid: 0, st_gid: 0, st_rdev: 0,
> st_size: 5751144, st_blksize: 4096, st_blocks: 11240, st_atime_sec:
> 1421862777, st_atime_nsec: 612123495, st_mtime_sec: 1421862777,
> st_mtime_nsec: 801108478, st_ctime_sec: 1421862777, st_ctime_nsec:
> 801108478, st_spare1: 0, st_spare2: 0, st_spare3: 0, st_spare4: 0,
> st_spare5: 0, st_spare6: 0, >
> libguestfs: trace: v2v: statns "/boot/vmlinuz-3.17.4-301.fc21.x86_64"
> guestfsd: main_loop: new request, len 0x50
> guestfsd: main_loop: proc 421 (statns) took 0.00 seconds
> libguestfs: trace: v2v: statns = <struct guestfs_statns = st_dev: 2049,
> st_ino: 20, st_mode: 33261, st_nlink: 1, st_uid: 0, st_gid: 0, st_rdev: 0,
> st_size: 5751144, st_blksize: 4096, st_blocks: 11240, st_atime_sec:
> 1421862777, st_atime_nsec: 619122938, st_mtime_sec: 1417115668,
> st_mtime_nsec: 0, st_ctime_sec: 1421861378, st_ctime_nsec: 221208355,
> st_spare1: 0, st_spare2: 0, st_spare3: 0, st_spare4: 0, st_spare5: 0,
> st_spare6: 0, >
> libguestfs: trace: v2v: statns "/boot/vmlinuz-3.17.8-300.fc21.x86_64"
> guestfsd: main_loop: new request, len 0x50
> guestfsd: main_loop: proc 421 (statns) took 0.00 seconds
> libguestfs: trace: v2v: statns = <struct guestfs_statns = st_dev: 2049,
> st_ino: 340, st_mode: 33261, st_nlink: 1, st_uid: 0, st_gid: 0, st_rdev:
> 0, st_size: 5757864, st_blksize: 4096, st_blocks: 11248, st_atime_sec:
> 1420760440, st_atime_nsec: 0, st_mtime_sec: 1420760440, st_mtime_nsec: 0,
> st_ctime_sec: 1421863850, st_ctime_nsec: 600025468, st_spare1: 0,
> st_spare2: 0, st_spare3: 0, st_spare4: 0, st_spare5: 0, st_spare6: 0, >
> grub kernels in this guest (first in list is default):
> (kernel-core, 3.17.8-300.fc21, x86_64,
> /boot/vmlinuz-3.17.8-300.fc21.x86_64,
> /boot/initramfs-3.17.8-300.fc21.x86_64.img, virtio=true, xen=false,
> debug=false)
> (kernel-core, 3.17.4-301.fc21, x86_64,
> /boot/vmlinuz-3.17.4-301.fc21.x86_64,
> /boot/initramfs-3.17.4-301.fc21.x86_64.img, virtio=true, xen=false,
> debug=false)
> (kernel-core, 3.17.8-300.fc21, x86_64,
> /boot/vmlinuz-3.17.8-300.fc21.x86_64,
> /boot/initramfs-3.17.8-300.fc21.x86_64.img, virtio=true, xen=false,
> debug=false)
> libguestfs: trace: v2v: is_file "/var/lib/VBoxGuestAdditions/config"
> "followsymlinks:true"
> guestfsd: main_loop: new request, len 0x54
> guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
> libguestfs: trace: v2v: is_file = 0
> libguestfs: trace: v2v: is_file "/etc/init.d/kudzu" "followsymlinks:true"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
> libguestfs: trace: v2v: is_file = 0
> libguestfs: trace: v2v: is_file "/etc/sysconfig/kernel" "followsymlinks:true"
> guestfsd: main_loop: new request, len 0x48
> guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
> libguestfs: trace: v2v: is_file = 1
> libguestfs: trace: v2v: aug_match
> "/files/etc/sysconfig/kernel/DEFAULTKERNEL/value"
> guestfsd: main_loop: new request, len 0x5c
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match =
> ["/files/etc/sysconfig/kernel/DEFAULTKERNEL/value"]
> libguestfs: trace: v2v: aug_set
> "/files/etc/sysconfig/kernel/DEFAULTKERNEL/value" "kernel-core"
> guestfsd: main_loop: new request, len 0x6c
> guestfsd: main_loop: proc 20 (aug_set) took 0.00 seconds
> libguestfs: trace: v2v: aug_set = 0
> libguestfs: trace: v2v: aug_save
> guestfsd: main_loop: new request, len 0x28
> guestfsd: main_loop: proc 25 (aug_save) took 0.00 seconds
> libguestfs: trace: v2v: aug_save = 0
> libguestfs: trace: v2v: aug_match "/files/etc/inittab/*/process"
> guestfsd: main_loop: new request, len 0x48
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/securetty/*"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_save
> guestfsd: main_loop: new request, len 0x28
> guestfsd: main_loop: proc 25 (aug_save) took 0.00 seconds
> libguestfs: trace: v2v: aug_save = 0
> libguestfs: trace: v2v: aug_match
> "/files/etc/sysconfig/grub/GRUB_CMDLINE_LINUX"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match
> "/files/etc/default/grub/GRUB_CMDLINE_LINUX"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match =
> ["/files/etc/default/grub/GRUB_CMDLINE_LINUX"]
> libguestfs: trace: v2v: aug_match
> "/files/etc/default/grub/GRUB_CMDLINE_LINUX_DEFAULT"
> guestfsd: main_loop: new request, len 0x60
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_get "/files/etc/default/grub/GRUB_CMDLINE_LINUX"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
> libguestfs: trace: v2v: aug_get = ""rhgb quiet""
> libguestfs: trace: v2v: is_file "/etc/X11/xorg.conf" "followsymlinks:true"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
> libguestfs: trace: v2v: is_file = 0
> libguestfs: trace: v2v: is_file "/etc/X11/XF86Config" "followsymlinks:true"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
> libguestfs: trace: v2v: is_file = 0
> libguestfs: trace: v2v: aug_match "/files/etc/X11/xorg.conf/Device/Driver"
> guestfsd: main_loop: new request, len 0x54
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match
> "/files/etc/X11/xorg.conf/Device/VendorName"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/X11/xorg.conf/Device/BoardName"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_save
> guestfsd: main_loop: new request, len 0x28
> guestfsd: main_loop: proc 25 (aug_save) took 0.00 seconds
> libguestfs: trace: v2v: aug_save = 0
> block device map:
> sda -> vda
> xvda -> vda
> libguestfs: trace: v2v: aug_match "/files/etc/fstab/*/spec"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = ["/files/etc/fstab/1/spec",
> "/files/etc/fstab/2/spec", "/files/etc/fstab/3/spec"]
> libguestfs: trace: v2v: aug_match "/files/boot/grub2/grub.cfg/*/kernel/root"
> guestfsd: main_loop: new request, len 0x54
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match
> "/files/boot/grub2/grub.cfg/*/kernel/resume"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/boot/grub/device.map/*[label()
> != "#comment"]"
> guestfsd: main_loop: new request, len 0x60
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/sysconfig/grub/boot"
> guestfsd: main_loop: new request, len 0x4c
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match
> "/files/etc/sysconfig/grub/GRUB_CMDLINE_LINUX"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match
> "/files/etc/default/grub/GRUB_CMDLINE_LINUX"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match =
> ["/files/etc/default/grub/GRUB_CMDLINE_LINUX"]
> libguestfs: trace: v2v: aug_match
> "/files/etc/default/grub/GRUB_CMDLINE_LINUX_DEFAULT"
> guestfsd: main_loop: new request, len 0x60
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/boot/grub2/device.map/*[label()
> != "#comment"]"
> guestfsd: main_loop: new request, len 0x64
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = ["/files/boot/grub2/device.map/hd0",
> "/files/boot/grub2/device.map/hd1"]
> libguestfs: trace: v2v: aug_get "/files/etc/fstab/1/spec"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
> libguestfs: trace: v2v: aug_get = "UUID=88eeab88-7e17-4df7-b36e-876b6fc9c14f"
> libguestfs: trace: v2v: aug_get "/files/etc/fstab/2/spec"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
> libguestfs: trace: v2v: aug_get = "UUID=089a81b0-a74b-42dd-b145-ac54fa6e49a4"
> libguestfs: trace: v2v: aug_get "/files/etc/fstab/3/spec"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
> libguestfs: trace: v2v: aug_get = "UUID=bb65f0f7-7992-4a42-9b47-b952fa815207"
> libguestfs: trace: v2v: aug_get "/files/etc/default/grub/GRUB_CMDLINE_LINUX"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
> libguestfs: trace: v2v: aug_get = ""rhgb quiet""
> libguestfs: trace: v2v: aug_get "/files/boot/grub2/device.map/hd0"
> guestfsd: main_loop: new request, len 0x4c
> guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
> libguestfs: trace: v2v: aug_get = "/dev/sda"
> libguestfs: trace: v2v: aug_set "/files/boot/grub2/device.map/hd0" "/dev/vda"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 20 (aug_set) took 0.00 seconds
> libguestfs: trace: v2v: aug_set = 0
> libguestfs: trace: v2v: aug_get "/files/boot/grub2/device.map/hd1"
> guestfsd: main_loop: new request, len 0x4c
> guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
> libguestfs: trace: v2v: aug_get = "/dev/sda"
> libguestfs: trace: v2v: aug_set "/files/boot/grub2/device.map/hd1" "/dev/vda"
> guestfsd: main_loop: new request, len 0x58
> guestfsd: main_loop: proc 20 (aug_set) took 0.00 seconds
> libguestfs: trace: v2v: aug_set = 0
> libguestfs: trace: v2v: aug_save
> guestfsd: main_loop: new request, len 0x28
> libguestfs: trace: v2v: aug_save = 0
> libguestfs: trace: v2v: command "grub2-mkconfig -o /boot/grub2/grub.cfg"
> guestfsd: main_loop: proc 25 (aug_save) took 0.00 seconds
> guestfsd: main_loop: new request, len 0x60
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /dev /sysroot/dev
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /dev/pts /sysroot/dev/pts
> mount: mount point /sysroot/dev/pts does not exist
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /proc /sysroot/proc
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys/fs/selinux /sysroot/selinux
> mount: mount point /sysroot/selinux does not exist
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys /sysroot/sys
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys/fs/selinux /sysroot/sys/fs/selinux
> mount: mount point /sysroot/sys/fs/selinux does not exist
> renaming /sysroot/etc/resolv.conf to /sysroot/etc/6c3fqtab
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: cp /etc/resolv.conf /sysroot/etc/resolv.conf
> commandrvf: stdout=y stderr=y flags=0x40000
> commandrvf: grub2-mkconfig -o /boot/grub2/grub.cfg
> Generating grub configuration file ...
> Found linux image: /boot/vmlinuz-3.17.8-300.fc21.x86_64
> Found initrd image: /boot/initramfs-3.17.8-300.fc21.x86_64.img
> Found linux image: /boot/vmlinuz-3.17.4-301.fc21.x86_64
> Found initrd image: /boot/initramfs-3.17.4-301.fc21.x86_64.img
> Found linux image: /boot/vmlinuz-0-rescue-aebaf0a54c334c40a3f2a001266b032e
> Found initrd image:
> /boot/initramfs-0-rescue-aebaf0a54c334c40a3f2a001266b032e.img
> ERROR: mkdir /var/lock/dmraid
> ERROR: mkdir /var/lock/dmraid
> ERROR: mkdir /var/lock/dmraid
> done
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/sys
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/proc
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/dev
> renaming /sysroot/etc/6c3fqtab to /sysroot/etc/resolv.conf
> guestfsd: main_loop: proc 50 (command) took 0.57 seconds
> libguestfs: trace: v2v: command = ""
> libguestfs: trace: v2v: aug_load
> guestfsd: main_loop: new request, len 0x28
> guestfsd: main_loop: proc 27 (aug_load) took 0.01 seconds
> libguestfs: trace: v2v: aug_load = 0
> libguestfs: trace: v2v: aug_match "/augeas/files//error"
> guestfsd: main_loop: new request, len 0x40
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: rm_f "/etc/blkid/blkid.tab"
> guestfsd: main_loop: new request, len 0x40
> guestfsd: main_loop: proc 367 (rm_f) took 0.00 seconds
> libguestfs: trace: v2v: rm_f = 0
> libguestfs: trace: v2v: rm_f "/etc/blkid.tab"
> guestfsd: main_loop: new request, len 0x3c
> guestfsd: main_loop: proc 367 (rm_f) took 0.00 seconds
> libguestfs: trace: v2v: rm_f = 0
> libguestfs: trace: v2v: rm_f "/etc/lvm/cache/.cache"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 367 (rm_f) took 0.00 seconds
> libguestfs: trace: v2v: rm_f = 0
> libguestfs: trace: v2v: aug_match "/files/etc/conf.modules/alias[. =~
> regexp('eth[0-9]+')]"
> guestfsd: main_loop: new request, len 0x64
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/modules.conf/alias[. =~
> regexp('eth[0-9]+')]"
> guestfsd: main_loop: new request, len 0x64
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/modprobe.conf/alias[. =~
> regexp('eth[0-9]+')]"
> guestfsd: main_loop: new request, len 0x64
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/modprobe.d/*/alias[. =~
> regexp('eth[0-9]+')]"
> guestfsd: main_loop: new request, len 0x64
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/conf.modules/alias[. =~
> regexp('scsi_hostadapter.*')]"
> guestfsd: main_loop: new request, len 0x6c
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/modules.conf/alias[. =~
> regexp('scsi_hostadapter.*')]"
> guestfsd: main_loop: new request, len 0x6c
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/modprobe.conf/alias[. =~
> regexp('scsi_hostadapter.*')]"
> guestfsd: main_loop: new request, len 0x70
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match "/files/etc/modprobe.d/*/alias[. =~
> regexp('scsi_hostadapter.*')]"
> guestfsd: main_loop: new request, len 0x6c
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: is_dir "/etc/modprobe.d" "followsymlinks:true"
> guestfsd: main_loop: new request, len 0x40
> guestfsd: main_loop: proc 38 (is_dir) took 0.00 seconds
> libguestfs: trace: v2v: is_dir = 1
> libguestfs: trace: v2v: aug_set
> "/files/etc/modprobe.d/virt-v2v-added.conf/alias[last()+1]"
> "scsi_hostadapter"
> guestfsd: main_loop: new request, len 0x7c
> guestfsd: main_loop: proc 20 (aug_set) took 0.00 seconds
> libguestfs: trace: v2v: aug_set = 0
> libguestfs: trace: v2v: aug_set
> "/files/etc/modprobe.d/virt-v2v-added.conf/alias[last()]/modulename"
> "virtio_blk"
> guestfsd: main_loop: new request, len 0x80
> guestfsd: main_loop: proc 20 (aug_set) took 0.00 seconds
> libguestfs: trace: v2v: aug_set = 0
> libguestfs: trace: v2v: aug_match
> "/files/etc/conf.modules/alias[modulename =~
> regexp('xennet|xen-vnif|xenblk|xen-vbd')]"
> guestfsd: main_loop: new request, len 0x84
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match
> "/files/etc/modules.conf/alias[modulename =~
> regexp('xennet|xen-vnif|xenblk|xen-vbd')]"
> guestfsd: main_loop: new request, len 0x84
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match
> "/files/etc/modprobe.conf/alias[modulename =~
> regexp('xennet|xen-vnif|xenblk|xen-vbd')]"
> guestfsd: main_loop: new request, len 0x84
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_match
> "/files/etc/modprobe.d/*/alias[modulename =~
> regexp('xennet|xen-vnif|xenblk|xen-vbd')]"
> guestfsd: main_loop: new request, len 0x84
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_save
> guestfsd: main_loop: new request, len 0x28
> libguestfs: trace: v2v: aug_save = 0
> libguestfs: trace: v2v: mv "/boot/initramfs-3.17.8-300.fc21.x86_64.img"
> "/boot/initramfs-3.17.8-300.fc21.x86_64.img.pre-v2v"
> guestfsd: main_loop: proc 25 (aug_save) took 0.00 seconds
> guestfsd: main_loop: new request, len 0x90
> commandrvf: stdout=n stderr=y flags=0x0
> commandrvf: mv /sysroot/boot/initramfs-3.17.8-300.fc21.x86_64.img
> /sysroot/boot/initramfs-3.17.8-300.fc21.x86_64.img.pre-v2v
> libguestfs: trace: v2v: mv = 0
> libguestfs: trace: v2v: is_file "/sbin/dracut" "followsymlinks:true"
> guestfsd: main_loop: proc 89 (mv) took 0.00 seconds
> guestfsd: main_loop: new request, len 0x3c
> libguestfs: trace: v2v: is_file = 1
> libguestfs: trace: v2v: command "/sbin/dracut --verbose --add-drivers
> virtio virtio_ring virtio_blk virtio_net virtio_pci
> /boot/initramfs-3.17.8-300.fc21.x86_64.img 3.17.8-300.fc21.x86_64"
> guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
> guestfsd: main_loop: new request, len 0xe4
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /dev /sysroot/dev
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /dev/pts /sysroot/dev/pts
> mount: mount point /sysroot/dev/pts does not exist
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /proc /sysroot/proc
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys/fs/selinux /sysroot/selinux
> mount: mount point /sysroot/selinux does not exist
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys /sysroot/sys
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: mount --bind /sys/fs/selinux /sysroot/sys/fs/selinux
> mount: mount point /sysroot/sys/fs/selinux does not exist
> renaming /sysroot/etc/resolv.conf to /sysroot/etc/fvo9h3q7
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: cp /etc/resolv.conf /sysroot/etc/resolv.conf
> commandrvf: stdout=y stderr=y flags=0x40000
> commandrvf: /sbin/dracut --verbose --add-drivers "virtio virtio_ring
> virtio_blk virtio_net virtio_pci"
> /boot/initramfs-3.17.8-300.fc21.x86_64.img 3.17.8-300.fc21.x86_64
> No '/dev/log' or 'logger' included for syslog logging
> [ 13.635451] dracut[966] No '/dev/log' or 'logger' included for syslog
> logging
> Executing: /sbin/dracut --verbose --add-drivers "virtio virtio_ring
> virtio_blk virtio_net virtio_pci"
> /boot/initramfs-3.17.8-300.fc21.x86_64.img 3.17.8-300.fc21.x86_64
> [ 13.665763] dracut[966] Executing: /sbin/dracut --verbose --add-drivers
> "virtio virtio_ring virtio_blk virtio_net virtio_pci"
> /boot/initramfs-3.17.8-300.fc21.x86_64.img 3.17.8-300.fc21.x86_64
> dracut module 'busybox' will not be installed, because command 'busybox'
> could not be found!
> [ 13.783635] dracut[966] dracut module 'busybox' will not be installed,
> because command 'busybox' could not be found!
> dracut module 'fcoe' will not be installed, because command 'dcbtool'
> could not be found!
> [ 13.876843] dracut[966] dracut module 'fcoe' will not be installed,
> because command 'dcbtool' could not be found!
> dracut module 'fcoe' will not be installed, because command 'fipvlan'
> could not be found!
> [ 13.879013] dracut[966] dracut module 'fcoe' will not be installed,
> because command 'fipvlan' could not be found!
> dracut module 'fcoe' will not be installed, because command 'lldpad' could
> not be found!
> [ 13.881179] dracut[966] dracut module 'fcoe' will not be installed,
> because command 'lldpad' could not be found!
> dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool'
> could not be found!
> [ 13.885860] dracut[966] dracut module 'fcoe-uefi' will not be
> installed, because command 'dcbtool' could not be found!
> dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan'
> could not be found!
> [ 13.888081] dracut[966] dracut module 'fcoe-uefi' will not be
> installed, because command 'fipvlan' could not be found!
> dracut module 'fcoe-uefi' will not be installed, because command 'lldpad'
> could not be found!
> [ 13.890369] dracut[966] dracut module 'fcoe-uefi' will not be
> installed, because command 'lldpad' could not be found!
> dracut module 'iscsi' will not be installed, because command 'iscsistart'
> could not be found!
> [ 13.896999] dracut[966] dracut module 'iscsi' will not be installed,
> because command 'iscsistart' could not be found!
> dracut module 'iscsi' will not be installed, because command 'iscsi-iname'
> could not be found!
> [ 13.899112] dracut[966] dracut module 'iscsi' will not be installed,
> because command 'iscsi-iname' could not be found!
> dracut module 'nbd' will not be installed, because command 'nbd-client'
> could not be found!
> [ 13.903211] dracut[966] dracut module 'nbd' will not be installed,
> because command 'nbd-client' could not be found!
> dracut module 'biosdevname' will not be installed, because command
> 'biosdevname' could not be found!
> [ 13.938682] dracut[966] dracut module 'biosdevname' will not be
> installed, because command 'biosdevname' could not be found!
> dracut module 'busybox' will not be installed, because command 'busybox'
> could not be found!
> [ 14.007359] dracut[966] dracut module 'busybox' will not be installed,
> because command 'busybox' could not be found!
> dracut module 'fcoe' will not be installed, because command 'dcbtool'
> could not be found!
> [ 14.055331] dracut[966] dracut module 'fcoe' will not be installed,
> because command 'dcbtool' could not be found!
> dracut module 'fcoe' will not be installed, because command 'fipvlan'
> could not be found!
> [ 14.057940] dracut[966] dracut module 'fcoe' will not be installed,
> because command 'fipvlan' could not be found!
> dracut module 'fcoe' will not be installed, because command 'lldpad' could
> not be found!
> [ 14.059984] dracut[966] dracut module 'fcoe' will not be installed,
> because command 'lldpad' could not be found!
> dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool'
> could not be found!
> [ 14.063472] dracut[966] dracut module 'fcoe-uefi' will not be
> installed, because command 'dcbtool' could not be found!
> dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan'
> could not be found!
> [ 14.065623] dracut[966] dracut module 'fcoe-uefi' will not be
> installed, because command 'fipvlan' could not be found!
> dracut module 'fcoe-uefi' will not be installed, because command 'lldpad'
> could not be found!
> [ 14.067865] dracut[966] dracut module 'fcoe-uefi' will not be
> installed, because command 'lldpad' could not be found!
> dracut module 'iscsi' will not be installed, because command 'iscsistart'
> could not be found!
> [ 14.072897] dracut[966] dracut module 'iscsi' will not be installed,
> because command 'iscsistart' could not be found!
> dracut module 'iscsi' will not be installed, because command 'iscsi-iname'
> could not be found!
> [ 14.075040] dracut[966] dracut module 'iscsi' will not be installed,
> because command 'iscsi-iname' could not be found!
> dracut module 'nbd' will not be installed, because command 'nbd-client'
> could not be found!
> [ 14.078622] dracut[966] dracut module 'nbd' will not be installed,
> because command 'nbd-client' could not be found!
> *** Including module: bash ***
> [ 14.142802] dracut[966] *** Including module: bash ***
> *** Including module: i18n ***
> [ 14.148588] dracut[966] *** Including module: i18n ***
> *** Including module: network ***
> [ 14.336325] dracut[966] *** Including module: network ***
> *** Including module: ifcfg ***
> [ 16.015612] dracut[966] *** Including module: ifcfg ***
> *** Including module: drm ***
> [ 16.021035] dracut[966] *** Including module: drm ***
> *** Including module: plymouth ***
> [ 17.051328] dracut[966] *** Including module: plymouth ***
> *** Including module: kernel-modules ***
> [ 17.274162] dracut[966] *** Including module: kernel-modules ***
> *** Including module: rootfs-block ***
> [ 24.046556] dracut[966] *** Including module: rootfs-block ***
> *** Including module: terminfo ***
> [ 24.055831] dracut[966] *** Including module: terminfo ***
> *** Including module: udev-rules ***
> [ 24.069906] dracut[966] *** Including module: udev-rules ***
> Skipping udev rule: 91-permissions.rules
> [ 24.238349] dracut[966] Skipping udev rule: 91-permissions.rules
> Skipping udev rule: 80-drivers-modprobe.rules
> [ 24.240008] dracut[966] Skipping udev rule: 80-drivers-modprobe.rules
> *** Including module: systemd ***
> [ 24.258293] dracut[966] *** Including module: systemd ***
> *** Including module: usrmount ***
> [ 24.446001] dracut[966] *** Including module: usrmount ***
> *** Including module: base ***
> [ 24.449400] dracut[966] *** Including module: base ***
> *** Including module: fs-lib ***
> [ 24.506200] dracut[966] *** Including module: fs-lib ***
> *** Including module: shutdown ***
> [ 24.519959] dracut[966] *** Including module: shutdown ***
> *** Including modules done ***
> [ 24.554250] dracut[966] *** Including modules done ***
> *** Installing kernel module dependencies and firmware ***
> [ 24.583486] dracut[966] *** Installing kernel module dependencies and
> firmware ***
> *** Installing kernel module dependencies and firmware done ***
> [ 24.900621] dracut[966] *** Installing kernel module dependencies and
> firmware done ***
> *** Resolving executable dependencies ***
> [ 24.917031] dracut[966] *** Resolving executable dependencies ***
> *** Resolving executable dependencies done***
> [ 25.482622] dracut[966] *** Resolving executable dependencies done***
> *** Hardlinking files ***
> [ 25.495828] dracut[966] *** Hardlinking files ***
> *** Hardlinking files done ***
> [ 25.505896] dracut[966] *** Hardlinking files done ***
> *** Stripping files ***
> [ 25.507966] dracut[966] *** Stripping files ***
> *** Stripping files done ***
> [ 25.607024] dracut[966] *** Stripping files done ***
> *** Generating early-microcode cpio image ***
> [ 25.609139] dracut[966] *** Generating early-microcode cpio image ***
> *** Constructing GenuineIntel.bin ****
> [ 25.616820] dracut[966] *** Constructing GenuineIntel.bin ****
> *** Store current command line parameters ***
> [ 25.630768] dracut[966] *** Store current command line parameters ***
> *** Creating image file ***
> [ 25.633892] dracut[966] *** Creating image file ***
> *** Creating image file done ***
> [ 33.376016] dracut[966] *** Creating image file done ***
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/sys
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/proc
> commandrvf: stdout=n stderr=n flags=0x0
> commandrvf: umount /sysroot/dev
> renaming /sysroot/etc/fvo9h3q7 to /sysroot/etc/resolv.conf
> guestfsd: main_loop: proc 50 (command) took 22.81 seconds
> libguestfs: trace: v2v: command = ""
> libguestfs: trace: v2v: is_file "/usr/sbin/load_policy" "followsymlinks:true"
> guestfsd: main_loop: new request, len 0x48
> guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
> libguestfs: trace: v2v: is_file = 1
> libguestfs: trace: v2v: is_file "/etc/selinux/config" "followsymlinks:true"
> guestfsd: main_loop: new request, len 0x44
> guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
> libguestfs: trace: v2v: is_file = 1
> libguestfs: trace: v2v: feature_available "selinuxrelabel"
> libguestfs: trace: v2v: internal_feature_available "selinuxrelabel"
> guestfsd: main_loop: new request, len 0x3c
> guestfsd: main_loop: proc 458 (internal_feature_available) took 0.00 seconds
> libguestfs: trace: v2v: internal_feature_available = 0
> libguestfs: trace: v2v: feature_available = 1
> libguestfs: trace: v2v: aug_init "/" 48
> guestfsd: main_loop: new request, len 0x34
> guestfsd: main_loop: proc 16 (aug_init) took 0.33 seconds
> libguestfs: trace: v2v: aug_init = 0
> libguestfs: trace: v2v: aug_rm "/augeas/load/*["/etc/selinux/config/" !~
> regexp('^') + glob(incl) + regexp('/.*')]"
> guestfsd: main_loop: new request, len 0x80
> guestfsd: main_loop: proc 22 (aug_rm) took 0.01 seconds
> libguestfs: trace: v2v: aug_rm = 1329
> libguestfs: trace: v2v: aug_load
> guestfsd: main_loop: new request, len 0x28
> guestfsd: main_loop: proc 27 (aug_load) took 0.01 seconds
> libguestfs: trace: v2v: aug_load = 0
> libguestfs: trace: v2v: aug_match "/augeas/files//error"
> guestfsd: main_loop: new request, len 0x40
> guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
> libguestfs: trace: v2v: aug_match = []
> libguestfs: trace: v2v: aug_get "/files/etc/selinux/config/SELINUXTYPE"
> guestfsd: main_loop: new request, len 0x54
> guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
> libguestfs: trace: v2v: aug_get = "targeted"
> libguestfs: trace: v2v: aug_close
> guestfsd: main_loop: new request, len 0x28
> guestfsd: main_loop: proc 26 (aug_close) took 0.03 seconds
> libguestfs: trace: v2v: aug_close = 0
> libguestfs: trace: v2v: selinux_relabel
> "/etc/selinux/targeted/contexts/files/file_contexts" "/" "force:true"
> guestfsd: main_loop: new request, len 0x6c
> commandrvf: stdout=n stderr=y flags=0x0
> commandrvf: setfiles -F -e /sysroot/dev -e /sysroot/proc -e
> /sysroot/selinux -e /sysroot/sys -r /sysroot -q
> /sysroot/etc/selinux/targeted/contexts/files/file_contexts /sysroot/
> Can't stat exclude path "/sysroot/selinux", No such file or directory -
> ignoring.
> [HANG HERE]
>
> --
> Derek Atkins 617-623-3745
> derek(a)ihtfp.com <mailto:derek@ihtfp.com> www.ihtfp.com <http://www.ihtfp.com/>
> Computer and Internet Security Consultant
>
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org <mailto:Users@ovirt.org>
> http://lists.ovirt.org/mailman/listinfo/users <http://lists.ovirt.org/mailman/listinfo/users>
8 years
Libguestfs debugging issue
by Paul Braham
Hi. I am currently debugging an issue with libguestfs in Centos 7.2 (Kernel
3.10.0-327.36.3.el7.x86_64).
libguestfs is being called by SaltStack to access a qcow2 image, but it is
failing. I have narrowed the issue down to the command below:
guestmount -i -a /opt/vm-spinning/salt-mnt/salt-images/pb123/system.qcow2
--rw /tmp/guest/opt.vm-spinning.salt-mnt.salt-images.pb123.system.qcow2
I have run libguestfs-test-tool in debug as recommended in the faq but am
at a loss to explain the behavior, Libguestfs-test-tool dumps out when I
run the guestmount.
Please see log below:
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
LIBGUESTFS_DEBUG=1
LIBGUESTFS_TRACE=1
PATH=/root/perl5/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
SELinux: Disabled
libguestfs: trace: add_drive_scratch 104857600
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfs7oWVq5/scratch.1" "raw"
104857600
libguestfs: trace: disk_create = 0
libguestfs: trace: add_drive "/tmp/libguestfs7oWVq5/scratch.1" "format:raw"
"cachemode:unsafe"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive_scratch = 0
libguestfs: trace: get_append
libguestfs: trace: get_append = "NULL"
guestfs_get_append: (null)
libguestfs: trace: get_autosync
libguestfs: trace: get_autosync = 1
guestfs_get_autosync: 1
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
guestfs_get_backend: libvirt
libguestfs: trace: get_backend_settings
libguestfs: trace: get_backend_settings = []
guestfs_get_backend_settings: []
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
guestfs_get_cachedir: /var/tmp
libguestfs: trace: get_direct
libguestfs: trace: get_direct = 0
guestfs_get_direct: 0
libguestfs: trace: get_hv
libguestfs: trace: get_hv = "/usr/libexec/qemu-kvm"
guestfs_get_hv: /usr/libexec/qemu-kvm
libguestfs: trace: get_memsize
libguestfs: trace: get_memsize = 500
guestfs_get_memsize: 500
libguestfs: trace: get_network
libguestfs: trace: get_network = 0
guestfs_get_network: 0
libguestfs: trace: get_path
libguestfs: trace: get_path = "/usr/lib64/guestfs"
guestfs_get_path: /usr/lib64/guestfs
libguestfs: trace: get_pgroup
libguestfs: trace: get_pgroup = 0
guestfs_get_pgroup: 0
libguestfs: trace: get_program
libguestfs: trace: get_program = "libguestfs-test-tool"
guestfs_get_program: libguestfs-test-tool
libguestfs: trace: get_recovery_proc
libguestfs: trace: get_recovery_proc = 1
guestfs_get_recovery_proc: 1
libguestfs: trace: get_selinux
libguestfs: trace: get_selinux = 0
guestfs_get_selinux: 0
libguestfs: trace: get_smp
libguestfs: trace: get_smp = 1
guestfs_get_smp: 1
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
guestfs_get_tmpdir: /tmp
libguestfs: trace: get_trace
libguestfs: trace: get_trace = 1
guestfs_get_trace: 1
libguestfs: trace: get_verbose
libguestfs: trace: get_verbose = 1
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: trace: launch
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version *>
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.28.1rhel=7,release=1.55.el7.centos.4,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfs7oWVq5
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: libvirt version = 1002017 (1.2.17)
libguestfs: guest random name = guestfs-aooe4wmnlsfs1b60
libguestfs: [00000ms] connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth =
default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x7feb544f6c30
libguestfs: qemu version (reported by libvirt) = 1005003 (1.5.3)
libguestfs: [00002ms] get libvirt capabilities
libguestfs: [00008ms] parsing capabilities XML
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_label"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_imagelabel"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_norelabel_disks"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: [00008ms] build appliance
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: [00008ms] begin building supermin appliance
libguestfs: [00008ms] run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.10
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type
gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type
gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type
uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type
uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type
gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type
uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz
type gzip base image (tar)
supermin: build: 188 packages, including dependencies
supermin: build: 35821 files
supermin: build: 22640 files, after removing unreadable files
supermin: build: 13906 files, after matching excludefiles
supermin: build: 13911 files, after adding hostfiles
supermin: build: 13947 files, after munging
supermin: kernel: picked kernel vmlinuz-3.10.0-327.36.3.el7.x86_64
supermin: kernel: picked modules path
/lib/modules/3.10.0-327.36.3.el7.x86_64
supermin: kernel: kernel_version 3.10.0-327.36.3.el7.x86_64
supermin: kernel: modules /lib/modules/3.10.0-327.36.3.el7.x86_64
supermin: ext2: creating empty ext2 filesystem
'/var/tmp/.guestfs-0/appliance.d.o5v90gm5/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin5: ext2fs-c.c:584: ext2_copy_file: Assertion `n == 1 || dest[n-1]
!= '/'' failed.
libguestfs: error: /usr/bin/supermin5 killed by signal 6 (Aborted), see
debug messages above
libguestfs: clear_socket_create_context: setsockcreatecon failed: NULL:
Invalid argument [you can ignore this UNLESS using SELinux + sVirt]
libguestfs: trace: launch = -1 (error)
libguestfs-test-tool: failed to launch appliance
libguestfs: trace: close
libguestfs: closing guestfs handle 0x7feb544f6430 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfs7oWVq5
8 years
[PATCH v5 0/3] v2v and augeas
by Richard W.M. Jones
Augeas 1.7.0 was released a couple of days ago. By encouraging
everyone to upgrade to this we can drop several calls to aug_transform
and also our custom copies of two lenses, and a lot of related code.
Rich.
8 years
[PATCH] Add hppa, hppa64, ppc64el architectures
by Hilko Bengen
---
src/kernel.ml | 2 ++
src/utils.ml | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/kernel.ml b/src/kernel.ml
index 356ac4b..9b0e8a2 100644
--- a/src/kernel.ml
+++ b/src/kernel.ml
@@ -30,6 +30,8 @@ let patt_of_cpu host_cpu =
| "ppc" | "powerpc" | "powerpc64" -> ["ppc"; "powerpc"; "powerpc64"]
| "sparc" | "sparc64" -> ["sparc"; "sparc64"]
| "amd64" | "x86_64" -> ["amd64"; "x86_64"]
+ | "parisc" | "parisc64" -> ["hppa"; "hppa64"]
+ | "ppc64el" -> ["powerpc64le"]
| _ when host_cpu.[0] = 'i' && host_cpu.[2] = '8' && host_cpu.[3] = '6' -> ["?86"]
| _ when String.length host_cpu >= 5 && String.sub host_cpu 0 5 = "armv7" -> ["armmp"]
| _ -> [host_cpu]
diff --git a/src/utils.ml b/src/utils.ml
index 4223be4..e3b8742 100644
--- a/src/utils.ml
+++ b/src/utils.ml
@@ -183,6 +183,8 @@ let compare_architecture a1 a2 =
| a when string_prefix "armv6" a -> 32
| a when string_prefix "armv7" a -> 32
| a when string_prefix "armv8" a -> 64
+ | "hppa" | "parisc" -> 32
+ | "hppa64" | "parisc64" -> 64
| "ppc" | "ppc32" -> 32
| a when string_prefix "ppc64" a -> 64
| "sparc" | "sparc32" -> 32
--
2.10.2
8 years
[PATCH] configure: Look for dpkg* only in /usr/bin, /bin
by Hilko Bengen
dpkg used to ship with a symlink /usr/sbin/dpkg-divert ->
../bin/dpkg-divert that recently got removed nd caused
breakage (libguestfs build failures) because configure had chosen the
wrong binary.
---
configure.ac | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3a0d25d..72ffb92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,10 +110,10 @@ AC_PATH_PROG(URPMI,[urpmi],[no], [$PATH$PATH_SEPARATOR/usr/sbin])
dnl For Debian handler.
AC_PATH_PROG(APT_GET,[apt-get],[no])
-AC_PATH_PROG(DPKG,[dpkg],[no])
-AC_PATH_PROG(DPKG_DEB,[dpkg-deb],[no])
-AC_PATH_PROG(DPKG_QUERY,[dpkg-query],[no])
-AC_PATH_PROG(DPKG_DIVERT,[[dpkg-divert]],[no])
+AC_PATH_PROG(DPKG,[dpkg],[no],[/usr/bin:/bin])
+AC_PATH_PROG(DPKG_DEB,[dpkg-deb],[no],[/usr/bin:/bin])
+AC_PATH_PROG(DPKG_QUERY,[dpkg-query],[no],[/usr/bin:/bin])
+AC_PATH_PROG(DPKG_DIVERT,[[dpkg-divert]],[no],[/usr/bin:/bin])
dnl For FrugalWare handler (currently disabled).
AC_PATH_PROG(PACMAN_G2,[pacman-g2],[no])
--
2.10.2
8 years
FOSDEM 2017: Call For Proposals -- Virtualization & IaaS DevRoom
by Kashyap Chamarthy
=======================================================================
The call for proposals is now open for the Virtualization & IaaS devroom
at the upcoming FOSDEM 2017, to be hosted on February 4, 2017.
This year will mark FOSDEM’s 17th anniversary as one of the
longest-running free and open source software developer events,
attracting thousands of developers and users from all over the world.
FOSDEM will be held once again in Brussels, Belgium, on February 4 & 5,
2017.
---------------
Important Dates
---------------
Submission deadline: 18 November 2016
Acceptance notifications: 04 December 2016
Final schedule announcement: 11 December 2016
Devroom: 04 February 2017 (one day)
-----------------
About the Devroom
-----------------
The Virtualization & IaaS devroom will feature session topics such as
open source hypervisors and virtual machine managers such as Xen
Project, KVM, QEMU, bhyve, and VirtualBox, and
Infrastructure-as-a-Service projects such as Apache CloudStack,
OpenStack, oVirt, OpenNebula, and Ganeti.
This devroom will host presentations that focus on topics of shared
interest, such as KVM; libvirt; shared storage; virtualized networking;
cloud security; clustering and high availability; interfacing with
multiple hypervisors; hyperconverged deployments; and scaling across
hundreds or thousands of servers.
Presentations in this devroom will be aimed at developers working on
these platforms who are looking to collaborate and improve shared
infrastructure or solve common problems. We seek topics that encourage
dialog between projects and continued work post-FOSDEM.
--------------------
Submit Your Proposal
--------------------
All submissions must be made via the Pentabarf event planning site.
https://penta.fosdem.org/submission/FOSDEM17
If you have not used Pentabarf before, you will need to create an
account. If you submitted proposals for FOSDEM in previous years, you
can use your existing account.
After creating the account, select Create Event to start the submission
process. Make sure to select Virtualisation and IaaS devroom from the
Track list. Please fill out all the required fields, and provide a
meaningful abstract and description of your proposed session.
---------------------
Submission Guidelines
---------------------
- We expect more proposals than we can possibly accept, so it is vitally
important that you submit your proposal on or before the deadline.
Late submissions are unlikely to be considered.
- All presentation slots are 45 minutes, with 35 minutes planned for
presentations, and 10 minutes for Q&A.
- All presentations will be recorded and made available under Creative
Commons licenses. In the Submission notes field, please indicate that
you agree that your presentation will be licensed under the
CC-By-SA-4.0 or CC-By-4.0 license and that you agree to have your
presentation recorded. For example:
"If my presentation is accepted for FOSDEM, I hereby agree to
license all recordings, slides, and other associated materials under
the Creative Commons Attribution Share-Alike 4.0 International
License. Sincerely, <NAME>."
- In the Submission notes field, please also confirm that if your talk
is accepted, you will be able to attend FOSDEM and deliver your
presentation. We will not consider proposals from prospective speakers
who are unsure whether they will be able to secure funds for travel
and lodging to attend FOSDEM. (Sadly, we are not able to offer travel
funding for prospective speakers.)
-------------------
Call for Volunteers
-------------------
We are also looking for volunteers to help run the devroom. We need
assistance watching time for the speakers, and helping with video for
the devroom. Please contact Brian Proffitt (bkp at redhat.com), for more
information.
----------
Questions?
----------
If you have any questions about this devroom, please send your questions
to our devroom mailing list.
iaas-virt-devroom(a)lists.fosdem.org
You can also subscribe to the list to receive updates about important
dates, session announcements, and to connect with other attendees.
=======================================================================
--
/kashyap
8 years
[PATCH] upload: improve file write callback
by Matteo Cafasso
As noted by Pino in another patch, the logic passes the first member of
the struct which happens to be the right address to the callback
function.
This will break the callback if order of the members of the struct will
change.
As the callback is using the entire struct, better to pass the pointer
to the struct itself.
Signed-off-by: Matteo Cafasso <noxdafox(a)gmail.com>
---
daemon/upload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/upload.c b/daemon/upload.c
index f034627..8b4f600 100644
--- a/daemon/upload.c
+++ b/daemon/upload.c
@@ -84,7 +84,7 @@ upload (const char *filename, int flags, int64_t offset)
}
}
- r = receive_file (write_cb, &data.fd);
+ r = receive_file (write_cb, &data);
if (r == -1) { /* write error */
err = errno;
r = cancel_receive ();
--
2.10.2
8 years