[libguestfs/f20] New stable branch version 1.24.6.
Richard W.M. Jones
rjones at fedoraproject.org
Wed Feb 12 21:58:28 UTC 2014
commit bf9044cd7add9d275ad95b641e4158a8a714380e
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Wed Feb 12 21:25:16 2014 +0000
New stable branch version 1.24.6.
...-Don-t-run-virt-resize-when-not-necessary.patch | 20 +-
...e-xzcat-binary-configurable-and-use-AC_PA.patch | 10 +-
...-pxzcat-optionally-to-speed-up-xzcat-step.patch | 8 +-
...-Add-no-sync-option-to-avoid-sync-on-exit.patch | 10 +-
...er-Add-mkdir-option-to-create-directories.patch | 10 +-
0006-builder-Allow-upload-to-a-directory.patch | 2 +-
...-Add-write-option-to-write-a-literal-file.patch | 10 +-
...ument-how-to-boot-VMs-directly-in-qemu-or.patch | 4 +-
...end-the-output-to-the-console-as-well-as-.patch | 2 +-
...dd-a-section-on-performance-to-the-manual.patch | 16 +-
...dd-m-memsize-and-smp-command-line-options.patch | 12 +-
...low-multiple-source-paths-to-be-specified.patch | 14 +-
...Add-a-real-scanner-parser-for-index-files.patch | 18 +-
0014-builder-Fix-missing-files-in-EXTRA_DIST.patch | 6 +-
...-website-Add-index-validation-test-script.patch | 2 +-
...ernal-implementation-of-parallel-xzcat-px.patch | 34 +-
...site-Add-validate.sh-test-script-to-EXTRA.patch | 2 +-
0018-builder-Add-missing-dependency.patch | 6 +-
...er-Add-some-generated-files-to-CLEANFILES.patch | 6 +-
...-dependency-from-index-parse.h-to-index-v.patch | 6 +-
...-dependencies-which-automake-doesn-t-gene.patch | 10 +-
0022-builder-Fail-if-bison-is-not-installed.patch | 4 +-
0023-builder-Fail-if-lex-is-not-installed.patch | 4 +-
...sprep-Allow-random-as-a-password-selector.patch | 8 +-
...prep-Allow-accounts-to-be-locked-RHBZ-102.patch | 8 +-
...e-is_block_device-function-into-common-ut.patch | 45 ---
...-a-planner-to-work-out-how-to-convert-the.patch | 59 ++--
...nner-Handle-no-format-in-source-case-corr.patch | 16 +-
...uilder-Flush-debug-info-after-printing-it.patch | 6 +-
...=> 0029-builder-Add-a-test-of-the-planner.patch | 10 +-
...uilder-tests-Fix-virt-builder-list-output.patch | 2 +-
...ts-Add-test-virt-builder-planner.sh-to-EX.patch | 4 +-
...-a-link-to-blog-posting-about-the-planner.patch | 6 +-
...y-use-virt-resize-no-sparse-when-writing-.patch | 6 +-
...use-to-write-to-a-char-device-or-dev-null.patch | 6 +-
...e.patch => 0035-builder-Remove-blank-line.patch | 6 +-
...-update-option-to-update-template-core-pa.patch | 14 +-
...irt-Don-t-default-to-using-NULL-for-libvi.patch | 2 +-
...38-builder-Fix-handling-of-size-parameter.patch | 8 +-
...h-Provide-a-friendlier-wrapper-around-vir.patch | 4 +-
...-regression-test-of-libvirt-authenticatio.patch | 6 +-
...-regression-test-for-libvirt-authenticati.patch | 39 +-
...lder-Add-timezone-option-to-set-timezone-.patch | 32 +-
...er-Document-how-to-change-keyboard-layout.patch | 4 +-
...d-link-option-for-creating-symbolic-links.patch | 10 +-
...ument-how-to-change-the-language-locale-o.patch | 4 +-
...ument-how-to-set-up-local-mirrors-for-per.patch | 4 +-
...ument-how-to-set-Japanese-language-suppor.patch | 4 +-
...tch => 0048-builder-Fix-virt-builder-test.patch | 2 +-
...-Document-how-to-set-Japanese-in-Debian-7.patch | 4 +-
...-no-delete-on-failure-option-to-aid-debug.patch | 10 +-
...-performance-recommend-using-the-no-sync-.patch | 6 +-
...=> 0052-builder-planner-Whitespace-change.patch | 2 +-
...r-simplify-the-enabling-of-the-linuxxattr.patch | 2 +-
...r-move-the-listxattrs-code-in-an-own-func.patch | 2 +-
... 0055-daemon-xattr-Remove-unused-variable.patch | 2 +-
...tes.patch => 0056-New-API-copy-attributes.patch | 6 +-
...nerated-files-for-new-copy-attributes-API.patch | 2 +-
...fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch | 2 +-
...059-builder-edit-fish-use-copy-attributes.patch | 96 +++---
...lder-test-virt-builder-check-some-results.patch | 2 +-
...builder-small-refactor-of-the-list-output.patch | 8 +-
...mat.patch => 0062-builder-add-list-format.patch | 4 +-
...> 0063-builder-add-a-JSON-output-for-list.patch | 4 +-
...-builder-Fix-unterminated-I-.-in-man-page.patch | 4 +-
...-index-struct.h-as-dependency-for-index-p.patch | 31 ++
...der-allow-more-empty-lines-in-index-files.patch | 48 +++
...er-proper-consider-subkeys-in-index-files.patch | 214 +++++++++++
...er-fix-small-regression-in-subkey-parsing.patch | 29 ++
0069-builder-small-code-simplification.patch | 35 ++
...ad-all-the-available-notes-from-the-index.patch | 136 +++++++
...-selinux-relabel-option-to-perform-SELinu.patch | 251 ++++++++++++
...-documentation-for-enabling-Puppet-agent-.patch | 48 +++
...-mount-sys-fs-selinux-into-sysroot-when-r.patch | 71 ++++
...elinux-exists-in-the-guest-bind-mount-sys.patch | 77 ++++
...a-note-about-how-mount-rbind-doesn-t-work.patch | 28 ++
0076-builder-output-translated-notes.patch | 404 ++++++++++++++++++++
0077-builder-remove-unused-variables.patch | 30 ++
...-isolate-C-libraries-in-an-own-OCAMLCLIBS.patch | 36 ++
...pare-for-different-per-protocol-download-.patch | 145 +++++++
...er-do-a-copy-when-downloading-local-files.patch | 38 ++
libguestfs.spec | 100 +++--
sources | 2 +-
83 files changed, 2001 insertions(+), 409 deletions(-)
---
diff --git a/0001-builder-Don-t-run-virt-resize-when-not-necessary.patch b/0001-builder-Don-t-run-virt-resize-when-not-necessary.patch
index a78434c..168c1cb 100644
--- a/0001-builder-Don-t-run-virt-resize-when-not-necessary.patch
+++ b/0001-builder-Don-t-run-virt-resize-when-not-necessary.patch
@@ -1,4 +1,4 @@
-From 33b3a097b4b7720d4d43ebe15e9881e976f70e4b Mon Sep 17 00:00:00 2001
+From b42b4f0cba8649a21b925f18b6819026a3cf6df0 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 22 Oct 2013 13:52:25 +0100
Subject: [PATCH] builder: Don't run virt-resize when not necessary.
@@ -16,10 +16,10 @@ the template directly to the output file.
1 file changed, 48 insertions(+), 22 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 25ab8c4..16005e1 100644
+index 18c07fc..5f6ff3b 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -232,7 +232,12 @@ let main () =
+@@ -234,7 +234,12 @@ let main () =
Sigchecker.verify_detached sigchecker template sigfile in
@@ -30,10 +30,10 @@ index 25ab8c4..16005e1 100644
+ * - did the user specify --size?
+ *)
+ let output, size, format, delete_output_file, do_resize, resize_sparse =
- let is_block_device file =
- try (stat file).st_kind = S_BLK
- with Unix_error _ -> false
-@@ -259,22 +264,22 @@ let main () =
+ let headroom = 256L *^ 1024L *^ 1024L in
+
+ match output with
+@@ -256,22 +261,22 @@ let main () =
(* Dummy: The output file is never deleted in this case. *)
let delete_output_file = ref false in
@@ -60,7 +60,7 @@ index 25ab8c4..16005e1 100644
(* Create the output file. *)
let output, format =
-@@ -285,6 +290,14 @@ let main () =
+@@ -282,6 +287,14 @@ let main () =
| Some output, None -> output, "raw"
| Some output, Some format -> output, format in
@@ -75,7 +75,7 @@ index 25ab8c4..16005e1 100644
msg (f_"Creating disk image: %s") output;
let cmd =
sprintf "qemu-img create -f %s%s %s %Ld%s"
-@@ -308,30 +321,42 @@ let main () =
+@@ -305,30 +318,42 @@ let main () =
in
at_exit delete_file;
@@ -133,7 +133,7 @@ index 25ab8c4..16005e1 100644
(match size with
| None ->
msg (f_"Running virt-resize to expand the disk")
-@@ -356,13 +381,14 @@ let main () =
+@@ -353,13 +378,14 @@ let main () =
(match lvexpand with
| None -> ""
| Some lvexpand -> sprintf " --lv-expand %s" (quote lvexpand))
diff --git a/0002-builder-Make-xzcat-binary-configurable-and-use-AC_PA.patch b/0002-builder-Make-xzcat-binary-configurable-and-use-AC_PA.patch
index 9344168..fb9d643 100644
--- a/0002-builder-Make-xzcat-binary-configurable-and-use-AC_PA.patch
+++ b/0002-builder-Make-xzcat-binary-configurable-and-use-AC_PA.patch
@@ -1,4 +1,4 @@
-From 65b953629686797239b33a8dff573390308fa0d4 Mon Sep 17 00:00:00 2001
+From 0adad887c70e26a578dd0809efd339c4b791a615 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 22 Oct 2013 14:09:20 +0100
Subject: [PATCH] builder: Make xzcat binary configurable and use AC_PATH_PROG.
@@ -11,10 +11,10 @@ Subject: [PATCH] builder: Make xzcat binary configurable and use AC_PATH_PROG.
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 16005e1..f6d0ad9 100644
+index 5f6ff3b..b1cc1f0 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -323,13 +323,18 @@ let main () =
+@@ -320,13 +320,18 @@ let main () =
output, Some size, format, delete_output_file, do_resize, true in
@@ -34,7 +34,7 @@ index 16005e1..f6d0ad9 100644
if debug then eprintf "%s\n%!" cmd;
msg (f_"Uncompressing: %s") file_uri;
let r = Sys.command cmd in
-@@ -345,7 +350,7 @@ let main () =
+@@ -342,7 +347,7 @@ let main () =
(* Uncompress it to a temporary file. *)
let { Index_parser.file_uri = file_uri } = entry in
let tmpfile = Filename.temp_file "vbsrc" ".img" in
@@ -44,7 +44,7 @@ index 16005e1..f6d0ad9 100644
msg (f_"Uncompressing: %s") file_uri;
let r = Sys.command cmd in
diff --git a/configure.ac b/configure.ac
-index 0b3980f..35f254d 100644
+index d7430db..a14d5d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -698,6 +698,10 @@ if test "x$WRESTOOL" != "xno"; then
diff --git a/0003-builder-Use-pxzcat-optionally-to-speed-up-xzcat-step.patch b/0003-builder-Use-pxzcat-optionally-to-speed-up-xzcat-step.patch
index 83b8583..48671e7 100644
--- a/0003-builder-Use-pxzcat-optionally-to-speed-up-xzcat-step.patch
+++ b/0003-builder-Use-pxzcat-optionally-to-speed-up-xzcat-step.patch
@@ -1,4 +1,4 @@
-From 71004a0d015b4d019324ec31b88a842bcad96fef Mon Sep 17 00:00:00 2001
+From 3deff9a2bceba2f1b14fbff316505a9ef9657698 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 22 Oct 2013 14:22:46 +0100
Subject: [PATCH] builder: Use pxzcat (optionally) to speed up xzcat step.
@@ -26,10 +26,10 @@ index d9c0219..0e442e1 100644
+--------------+-------------+---+-----------------------------------------+
| ocaml-gettext| | O | For localizing OCaml virt-* tools. |
diff --git a/builder/builder.ml b/builder/builder.ml
-index f6d0ad9..9951e71 100644
+index b1cc1f0..4fc8a71 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -323,9 +323,11 @@ let main () =
+@@ -320,9 +320,11 @@ let main () =
output, Some size, format, delete_output_file, do_resize, true in
@@ -44,7 +44,7 @@ index f6d0ad9..9951e71 100644
if not do_resize then (
diff --git a/configure.ac b/configure.ac
-index 35f254d..2e35252 100644
+index a14d5d6..a378be7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -702,6 +702,9 @@ dnl Check for xzcat (required).
diff --git a/0004-builder-Add-no-sync-option-to-avoid-sync-on-exit.patch b/0004-builder-Add-no-sync-option-to-avoid-sync-on-exit.patch
index fe31a17..76fe825 100644
--- a/0004-builder-Add-no-sync-option-to-avoid-sync-on-exit.patch
+++ b/0004-builder-Add-no-sync-option-to-avoid-sync-on-exit.patch
@@ -1,4 +1,4 @@
-From 7114f530f3c0ae0fda9f7888b426a813c292b071 Mon Sep 17 00:00:00 2001
+From 0c23a38468103dabd260f70397a4de21eda8a591 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 22 Oct 2013 22:28:27 +0100
Subject: [PATCH] builder: Add --no-sync option to avoid sync on exit.
@@ -11,10 +11,10 @@ Subject: [PATCH] builder: Add --no-sync option to avoid sync on exit.
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 9951e71..2394c76 100644
+index 4fc8a71..9e41d39 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -38,7 +38,7 @@ let main () =
+@@ -40,7 +40,7 @@ let main () =
attach, cache, check_signature, curl, debug, delete, edit, fingerprint,
firstboot, run, format, gpg, hostname, install, list_long, network, output,
password_crypto, quiet, root_password, scrub, scrub_logfile, size, source,
@@ -23,7 +23,7 @@ index 9951e71..2394c76 100644
parse_cmdline () in
(* Timestamped messages in ordinary, non-debug non-quiet mode. *)
-@@ -735,7 +735,8 @@ exec >>%s 2>&1
+@@ -732,7 +732,8 @@ exec >>%s 2>&1
* and therefore bypasses the host cache). In general you should not
* use cache=none.
*)
@@ -69,7 +69,7 @@ index 7bbde70..c8e9c46 100644
- upload
+ sync, upload
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 051b045..9dd86de 100644
+index d31640e..ee53a8a 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -410,6 +410,23 @@ You don't have a host network (eg. in secure/restricted environments).
diff --git a/0005-builder-Add-mkdir-option-to-create-directories.patch b/0005-builder-Add-mkdir-option-to-create-directories.patch
index 594f560..01a5df1 100644
--- a/0005-builder-Add-mkdir-option-to-create-directories.patch
+++ b/0005-builder-Add-mkdir-option-to-create-directories.patch
@@ -1,4 +1,4 @@
-From b66bbde1b08b768a5d47b9f515923caab3c9bc72 Mon Sep 17 00:00:00 2001
+From a2113988fab6479f4b912a0b7644fc7a9cb6e22d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 25 Oct 2013 13:35:51 +0100
Subject: [PATCH] builder: Add --mkdir option to create directories.
@@ -12,10 +12,10 @@ Subject: [PATCH] builder: Add --mkdir option to create directories.
4 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 2394c76..760c8a1 100644
+index 9e41d39..acd016d 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -36,9 +36,9 @@ let main () =
+@@ -38,9 +38,9 @@ let main () =
(* Command line argument parsing - see cmdline.ml. *)
let mode, arg,
attach, cache, check_signature, curl, debug, delete, edit, fingerprint,
@@ -28,7 +28,7 @@ index 2394c76..760c8a1 100644
parse_cmdline () in
(* Timestamped messages in ordinary, non-debug non-quiet mode. *)
-@@ -575,6 +575,13 @@ exec >>%s 2>&1
+@@ -572,6 +572,13 @@ exec >>%s 2>&1
do_run ~display:cmd cmd
);
@@ -96,7 +96,7 @@ index c8d2e58..6f76972 100755
--upload Makefile:/etc \
--delete /Makefile \
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 9dd86de..d8d3435 100644
+index ee53a8a..dc08a6d 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -19,6 +19,7 @@ virt-builder - Build virtual machine images quickly
diff --git a/0006-builder-Allow-upload-to-a-directory.patch b/0006-builder-Allow-upload-to-a-directory.patch
index 0420800..c4c0a49 100644
--- a/0006-builder-Allow-upload-to-a-directory.patch
+++ b/0006-builder-Allow-upload-to-a-directory.patch
@@ -1,4 +1,4 @@
-From 8053edc7bc64dc41655d55f8e4f4ef3242bb0b33 Mon Sep 17 00:00:00 2001
+From 3d26612fcac6ec51fe34822b07577fb415c00f85 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 26 Oct 2013 11:27:06 +0100
Subject: [PATCH] builder: Allow --upload to a directory.
diff --git a/0007-builder-Add-write-option-to-write-a-literal-file.patch b/0007-builder-Add-write-option-to-write-a-literal-file.patch
index ba1cea8..29477f6 100644
--- a/0007-builder-Add-write-option-to-write-a-literal-file.patch
+++ b/0007-builder-Add-write-option-to-write-a-literal-file.patch
@@ -1,4 +1,4 @@
-From 17c806003bb1d41f1a70c407991c8de1d48ed492 Mon Sep 17 00:00:00 2001
+From 5937b734dd6ac056766080a096a8a1060894a688 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 26 Oct 2013 11:40:48 +0100
Subject: [PATCH] builder: Add --write option to write a literal file.
@@ -12,10 +12,10 @@ Subject: [PATCH] builder: Add --write option to write a literal file.
4 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 760c8a1..a89b03f 100644
+index acd016d..f247cd2 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -38,7 +38,7 @@ let main () =
+@@ -40,7 +40,7 @@ let main () =
attach, cache, check_signature, curl, debug, delete, edit, fingerprint,
firstboot, run, format, gpg, hostname, install, list_long, mkdirs,
network, output, password_crypto, quiet, root_password, scrub,
@@ -24,7 +24,7 @@ index 760c8a1..a89b03f 100644
parse_cmdline () in
(* Timestamped messages in ordinary, non-debug non-quiet mode. *)
-@@ -582,6 +582,13 @@ exec >>%s 2>&1
+@@ -579,6 +579,13 @@ exec >>%s 2>&1
g#mkdir_p dir
) mkdirs;
@@ -97,7 +97,7 @@ index 30c3cf8..438f2e9 100755
--upload Makefile:/etc/foo/bar/baz \
--delete /Makefile \
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index d8d3435..766815d 100644
+index dc08a6d..e40dfd4 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -20,6 +20,7 @@ virt-builder - Build virtual machine images quickly
diff --git a/0008-builder-Document-how-to-boot-VMs-directly-in-qemu-or.patch b/0008-builder-Document-how-to-boot-VMs-directly-in-qemu-or.patch
index dae9b7c..7f592c5 100644
--- a/0008-builder-Document-how-to-boot-VMs-directly-in-qemu-or.patch
+++ b/0008-builder-Document-how-to-boot-VMs-directly-in-qemu-or.patch
@@ -1,4 +1,4 @@
-From f27194ce17e0806c3e3d917626c48b5f63e49928 Mon Sep 17 00:00:00 2001
+From 34d4789bf939b44e76af2f6ae2186e1638986aa2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 26 Oct 2013 14:45:30 +0100
Subject: [PATCH] builder: Document how to boot VMs directly in qemu or KVM.
@@ -9,7 +9,7 @@ Subject: [PATCH] builder: Document how to boot VMs directly in qemu or KVM.
1 file changed, 15 insertions(+)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 766815d..c8e1ad7 100644
+index e40dfd4..a5f766d 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -865,6 +865,21 @@ To boot up an instance of your image on a Nova compute node, do:
diff --git a/0009-firstboot-Send-the-output-to-the-console-as-well-as-.patch b/0009-firstboot-Send-the-output-to-the-console-as-well-as-.patch
index 9e3d734..6f818f4 100644
--- a/0009-firstboot-Send-the-output-to-the-console-as-well-as-.patch
+++ b/0009-firstboot-Send-the-output-to-the-console-as-well-as-.patch
@@ -1,4 +1,4 @@
-From e0a88763ad882bcbad2b66adeafee33be2179a2d Mon Sep 17 00:00:00 2001
+From 2bd65a4b80934dff8efaee2bfce6ccccc02e58e0 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 26 Oct 2013 17:09:06 +0100
Subject: [PATCH] firstboot: Send the output to the console as well as to the
diff --git a/0010-builder-Add-a-section-on-performance-to-the-manual.patch b/0010-builder-Add-a-section-on-performance-to-the-manual.patch
index 9c7bee3..b98401f 100644
--- a/0010-builder-Add-a-section-on-performance-to-the-manual.patch
+++ b/0010-builder-Add-a-section-on-performance-to-the-manual.patch
@@ -1,22 +1,21 @@
-From 269da752908ac9a8ba0ab6d12e5e020cd3179657 Mon Sep 17 00:00:00 2001
+From f3f0dc3c93a4ab0e5eb4b93e1e5515a69fc20f37 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sun, 27 Oct 2013 14:59:39 +0000
Subject: [PATCH] builder: Add a section on performance to the manual.
(cherry picked from commit 2937c035958f84986e84c47df49f79d19c4b5b59)
---
- builder/virt-builder.pod | 45 ++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 44 insertions(+), 1 deletion(-)
+ builder/virt-builder.pod | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 43 insertions(+)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index c8e1ad7..bcd3615 100644
+index a5f766d..cd20043 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
-@@ -1312,7 +1312,50 @@ etc are truly random when the guest boots.
+@@ -1330,6 +1330,49 @@ want clones to have duplicate identities.
- You should check digital signatures and not ignore any signing errors.
+ See also: L<virt-sysprep(1)>.
--=head2 USER MODE LINUX
+=head2 PERFORMANCE
+
+The most important aspect of getting good performance is caching.
@@ -60,10 +59,9 @@ index c8e1ad7..bcd3615 100644
+which is single-threaded. Currently this has to be compiled in,
+ie. virt-builder will probably need to be recompiled to use pxzcat.
+
-+=head3 User-Mode Linux
+ =head2 USER MODE LINUX
You can use virt-builder with the User-Mode Linux (UML) backend. This
- may be faster when running virt-builder inside a virtual machine
--
1.8.4.2
diff --git a/0011-builder-Add-m-memsize-and-smp-command-line-options.patch b/0011-builder-Add-m-memsize-and-smp-command-line-options.patch
index ed63419..e75a1e8 100644
--- a/0011-builder-Add-m-memsize-and-smp-command-line-options.patch
+++ b/0011-builder-Add-m-memsize-and-smp-command-line-options.patch
@@ -1,4 +1,4 @@
-From 6a3be2dbe7dcba8e0b0880168bfb880e74fbd9c3 Mon Sep 17 00:00:00 2001
+From f9fe74926f476cf12f81988f2dffb34bb77607cb Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 29 Oct 2013 19:23:33 +0000
Subject: [PATCH] builder: Add -m/--memsize and --smp command line options.
@@ -11,10 +11,10 @@ Subject: [PATCH] builder: Add -m/--memsize and --smp command line options.
3 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index a89b03f..85234e0 100644
+index f247cd2..2437d56 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -36,9 +36,9 @@ let main () =
+@@ -38,9 +38,9 @@ let main () =
(* Command line argument parsing - see cmdline.ml. *)
let mode, arg,
attach, cache, check_signature, curl, debug, delete, edit, fingerprint,
@@ -26,7 +26,7 @@ index a89b03f..85234e0 100644
parse_cmdline () in
(* Timestamped messages in ordinary, non-debug non-quiet mode. *)
-@@ -403,6 +403,8 @@ let main () =
+@@ -400,6 +400,8 @@ let main () =
let g = new G.guestfs () in
if debug then g#set_trace true;
@@ -102,7 +102,7 @@ index 28a1643..97ccd89 100644
- scrub_logfile, size, source, sync, upload, writes
+ scrub_logfile, size, smp, source, sync, upload, writes
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index bcd3615..7d486f7 100644
+index cd20043..66ed030 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -366,6 +366,18 @@ the image was built, use this option.
@@ -135,7 +135,7 @@ index bcd3615..7d486f7 100644
=item B<--source> URL
Set the source URL to look for templates. If not specified it
-@@ -1402,12 +1418,6 @@ are actually interpreted by L<curl(1)>, not virt-builder.
+@@ -1438,12 +1454,6 @@ are actually interpreted by L<curl(1)>, not virt-builder.
Used to determine the location of the template cache. See L</CACHING>.
diff --git a/0012-builder-Allow-multiple-source-paths-to-be-specified.patch b/0012-builder-Allow-multiple-source-paths-to-be-specified.patch
index 1e49d7d..38e1b22 100644
--- a/0012-builder-Allow-multiple-source-paths-to-be-specified.patch
+++ b/0012-builder-Allow-multiple-source-paths-to-be-specified.patch
@@ -1,4 +1,4 @@
-From ebf8c4404850977946904aae3f905479916fce21 Mon Sep 17 00:00:00 2001
+From 502027f0517a5ef6784dc09681ef1bca6cc35ad5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 1 Nov 2013 14:16:34 +0000
Subject: [PATCH] builder: Allow multiple source paths to be specified.
@@ -27,10 +27,10 @@ There is still only one built-in path, but we can add more later.
10 files changed, 143 insertions(+), 46 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 85234e0..a3a31e5 100644
+index 2437d56..b375de4 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -35,22 +35,27 @@ let prog = Filename.basename Sys.executable_name
+@@ -37,22 +37,27 @@ let () = Random.self_init ()
let main () =
(* Command line argument parsing - see cmdline.ml. *)
let mode, arg,
@@ -62,7 +62,7 @@ index 85234e0..a3a31e5 100644
(* Handle some modes here, some later on. *)
let mode =
match mode with
-@@ -125,19 +130,23 @@ let main () =
+@@ -127,19 +132,23 @@ let main () =
)
in
@@ -93,7 +93,7 @@ index 85234e0..a3a31e5 100644
exit 0
| `Print_cache -> (* --print-cache *)
-@@ -184,6 +193,7 @@ let main () =
+@@ -186,6 +195,7 @@ let main () =
eprintf (f_"%s: cannot find os-version '%s'.\nUse --list to list available guest types.\n")
prog arg;
exit 1 in
@@ -354,7 +354,7 @@ index 3a159bb..3077b23 100755
os-version: phony-debian
Full name: Phony Debian
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 7d486f7..bbcdb3a 100644
+index 66ed030..39729d6 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -264,10 +264,14 @@ Check that the index and templates are signed by the key with the
@@ -427,7 +427,7 @@ index 7d486f7..bbcdb3a 100644
=head3 Licensing of templates
You should be aware of the licensing of images that you distribute.
-@@ -1420,13 +1457,13 @@ Used to determine the location of the template cache. See L</CACHING>.
+@@ -1456,13 +1493,13 @@ Used to determine the location of the template cache. See L</CACHING>.
=item C<VIRT_BUILDER_FINGERPRINT>
diff --git a/0013-builder-Add-a-real-scanner-parser-for-index-files.patch b/0013-builder-Add-a-real-scanner-parser-for-index-files.patch
index 4fa5ad9..456f00b 100644
--- a/0013-builder-Add-a-real-scanner-parser-for-index-files.patch
+++ b/0013-builder-Add-a-real-scanner-parser-for-index-files.patch
@@ -1,4 +1,4 @@
-From 142ae72758d659df4a6a945c827b8dcffb2388f5 Mon Sep 17 00:00:00 2001
+From 3ff459f0e50cdf8aa26053b59b0a183636813241 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 4 Nov 2013 14:53:41 +0000
Subject: [PATCH] builder: Add a real scanner/parser for index files.
@@ -36,7 +36,7 @@ This adds a tool called virt-index-validate to validate index files.
create mode 100644 builder/virt-index-validate.pod
diff --git a/.gitignore b/.gitignore
-index ea42d28..4a77963 100644
+index 7bcd500..8f0cda3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,10 +58,16 @@ Makefile.in
@@ -80,7 +80,7 @@ index 0e442e1..dee3bd4 100644
+--------------+-------------+---+-----------------------------------------+
| genisoimage | | R | mkisofs may work. |
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index e3878dc..2a1e448 100644
+index b8bf6ac..ff27318 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -17,6 +17,12 @@
@@ -96,7 +96,7 @@ index e3878dc..2a1e448 100644
EXTRA_DIST = \
$(SOURCES) \
virt-builder.pod \
-@@ -42,6 +48,9 @@ SOURCES = \
+@@ -40,6 +46,9 @@ SOURCES = \
sigchecker.mli \
sigchecker.ml
@@ -106,7 +106,7 @@ index e3878dc..2a1e448 100644
if HAVE_OCAML
# Note this list must be in dependency order.
-@@ -59,6 +68,10 @@ OBJECTS = \
+@@ -58,6 +67,10 @@ OBJECTS = \
$(top_builddir)/mllib/fsync.cmx \
$(top_builddir)/mllib/password.cmx \
$(top_builddir)/mllib/config.cmx \
@@ -117,7 +117,7 @@ index e3878dc..2a1e448 100644
get_kernel.cmx \
downloader.cmx \
sigchecker.cmx \
-@@ -99,24 +112,10 @@ virt-builder: $(OBJECTS)
+@@ -97,24 +110,10 @@ virt-builder: $(OBJECTS)
.ml.cmx:
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -c $< -o $@
@@ -144,7 +144,7 @@ index e3878dc..2a1e448 100644
virt-builder.1 $(top_builddir)/html/virt-builder.1.html: stamp-virt-builder.pod
-@@ -172,3 +171,28 @@ endif
+@@ -170,3 +169,28 @@ endif
DISTCLEANFILES = .depend
.PHONY: depend docs
@@ -1037,7 +1037,7 @@ index 3077b23..ff16abe 100755
echo "$long_list"
exit 1
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index bbcdb3a..71569ec 100644
+index 39729d6..ce22920 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -1269,6 +1269,23 @@ For open source guests, provide a link to the source code in the
@@ -1163,7 +1163,7 @@ index 0000000..6b03703
+
+Copyright (C) 2013 Red Hat Inc.
diff --git a/configure.ac b/configure.ac
-index 2e35252..35d0879 100644
+index a378be7..732946f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -705,6 +705,10 @@ test "x$XZCAT" = "xno" && AC_MSG_ERROR([xzcat must be installed])
diff --git a/0014-builder-Fix-missing-files-in-EXTRA_DIST.patch b/0014-builder-Fix-missing-files-in-EXTRA_DIST.patch
index 2886812..fb20f4c 100644
--- a/0014-builder-Fix-missing-files-in-EXTRA_DIST.patch
+++ b/0014-builder-Fix-missing-files-in-EXTRA_DIST.patch
@@ -1,4 +1,4 @@
-From 48ee01ebe27fe3d5123f9ee70b478cd367df363a Mon Sep 17 00:00:00 2001
+From 9d625cbc7121ca518ddfe01d6a6705a2b86b9bfe Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 07:15:19 +0000
Subject: [PATCH] builder: Fix missing files in EXTRA_DIST.
@@ -11,7 +11,7 @@ This fixes commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633.
1 file changed, 2 insertions(+)
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 2a1e448..0af3f95 100644
+index ff27318..b892477 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -26,6 +26,7 @@ AM_CFLAGS = \
@@ -29,7 +29,7 @@ index 2a1e448..0af3f95 100644
+ index-parser-c.c \
list_entries.mli \
list_entries.ml \
- perl_edit.ml \
+ sigchecker.mli \
--
1.8.4.2
diff --git a/0015-builder-website-Add-index-validation-test-script.patch b/0015-builder-website-Add-index-validation-test-script.patch
index b892fe0..f905ebf 100644
--- a/0015-builder-website-Add-index-validation-test-script.patch
+++ b/0015-builder-website-Add-index-validation-test-script.patch
@@ -1,4 +1,4 @@
-From 2627de60b603630ba8be79707766d5631d56f714 Mon Sep 17 00:00:00 2001
+From 521414b8f2fcd33994c79e68f5324222d3c9530f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 07:25:46 +0000
Subject: [PATCH] builder/website: Add index validation test script.
diff --git a/0016-builder-Internal-implementation-of-parallel-xzcat-px.patch b/0016-builder-Internal-implementation-of-parallel-xzcat-px.patch
index 337a410..6b71282 100644
--- a/0016-builder-Internal-implementation-of-parallel-xzcat-px.patch
+++ b/0016-builder-Internal-implementation-of-parallel-xzcat-px.patch
@@ -1,4 +1,4 @@
-From 2eabacbc0d217ece0091dc754969f0c0df3c7eac Mon Sep 17 00:00:00 2001
+From 1fecdfb2a3f56bfc602d0cbcc489c04059cb672b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 10:21:32 +0000
Subject: [PATCH] builder: Internal implementation of parallel xzcat (pxzcat).
@@ -42,7 +42,7 @@ index dee3bd4..8192086 100644
+--------------+-------------+---+-----------------------------------------+
| findlib | | O | For the OCaml bindings. |
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 0af3f95..9430d62 100644
+index b892477..1c469ac 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -21,7 +21,9 @@ AM_YFLAGS = -d
@@ -56,17 +56,17 @@ index 0af3f95..9430d62 100644
EXTRA_DIST = \
$(SOURCES) \
-@@ -47,6 +49,9 @@ SOURCES = \
+@@ -45,6 +47,9 @@ SOURCES = \
+ index-parser-c.c \
+ list_entries.mli \
list_entries.ml \
- perl_edit.ml \
- perl_edit.mli \
+ pxzcat.ml \
+ pxzcat.mli \
+ pxzcat-c.c \
sigchecker.mli \
sigchecker.ml
-@@ -74,6 +79,8 @@ OBJECTS = \
+@@ -73,6 +78,8 @@ OBJECTS = \
index-struct.o \
index-parse.o \
index-parser-c.o \
@@ -75,7 +75,7 @@ index 0af3f95..9430d62 100644
get_kernel.cmx \
downloader.cmx \
sigchecker.cmx \
-@@ -103,7 +110,7 @@ OCAMLOPTFLAGS = $(OCAMLCFLAGS)
+@@ -101,7 +108,7 @@ OCAMLOPTFLAGS = $(OCAMLCFLAGS)
virt-builder: $(OBJECTS)
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
mlguestfs.cmxa -linkpkg $^ \
@@ -85,7 +85,7 @@ index 0af3f95..9430d62 100644
-o $@
diff --git a/builder/builder.ml b/builder/builder.ml
-index a3a31e5..7dba186 100644
+index b375de4..7cbc539 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -24,6 +24,7 @@ open Common_utils
@@ -96,7 +96,7 @@ index a3a31e5..7dba186 100644
open Unix
open Printf
-@@ -333,27 +334,14 @@ let main () =
+@@ -330,27 +331,14 @@ let main () =
output, Some size, format, delete_output_file, do_resize, true in
@@ -125,7 +125,7 @@ index a3a31e5..7dba186 100644
) else (
(* If none of the above apply, uncompress to a temporary file and
* run virt-resize on the result.
-@@ -362,14 +350,8 @@ let main () =
+@@ -359,14 +347,8 @@ let main () =
(* Uncompress it to a temporary file. *)
let { Index_parser.file_uri = file_uri } = entry in
let tmpfile = Filename.temp_file "vbsrc" ".img" in
@@ -860,10 +860,10 @@ index 0000000..a2830f0
+ implementation of parallel xzcat. Otherwise regular xzcat is
+ used. *)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 71569ec..a1b2a1f 100644
+index ce22920..e84d87f 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
-@@ -1420,10 +1420,9 @@ the output format is the same as the template format (usually raw).
+@@ -1438,10 +1438,9 @@ the output format is the same as the template format (usually raw).
=head3 pxzcat
@@ -875,10 +875,10 @@ index 71569ec..a1b2a1f 100644
+xzcat) if liblzma was found at build time. If liblzma was not found
+at build time, regular C<xzcat> is used which is single-threaded.
- =head3 User-Mode Linux
+ =head2 USER MODE LINUX
diff --git a/configure.ac b/configure.ac
-index 35d0879..7648977 100644
+index 732946f..56a7eb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -701,9 +701,15 @@ fi
@@ -926,13 +926,13 @@ index 5418a6b..1e831ff 100644
cat/filesystems.c
cat/ls.c
diff --git a/po/POTFILES-ml b/po/POTFILES-ml
-index 2ca1042..efeb75d 100644
+index eff4de4..a63b69a 100644
--- a/po/POTFILES-ml
+++ b/po/POTFILES-ml
-@@ -5,6 +5,7 @@ builder/get_kernel.ml
+@@ -4,6 +4,7 @@ builder/downloader.ml
+ builder/get_kernel.ml
builder/index_parser.ml
builder/list_entries.ml
- builder/perl_edit.ml
+builder/pxzcat.ml
builder/sigchecker.ml
mllib/common_gettext.ml
diff --git a/0017-builder-website-Add-validate.sh-test-script-to-EXTRA.patch b/0017-builder-website-Add-validate.sh-test-script-to-EXTRA.patch
index 7f1e8e7..d64a42f 100644
--- a/0017-builder-website-Add-validate.sh-test-script-to-EXTRA.patch
+++ b/0017-builder-website-Add-validate.sh-test-script-to-EXTRA.patch
@@ -1,4 +1,4 @@
-From e91cfd9900ec8efeff8692731608a1fc95917a64 Mon Sep 17 00:00:00 2001
+From 04bbe36875dd73533d8841b9435831480b922a70 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 15:15:17 +0000
Subject: [PATCH] builder/website: Add validate.sh test script to EXTRA_DIST.
diff --git a/0018-builder-Add-missing-dependency.patch b/0018-builder-Add-missing-dependency.patch
index 3cfa851..4062afc 100644
--- a/0018-builder-Add-missing-dependency.patch
+++ b/0018-builder-Add-missing-dependency.patch
@@ -1,4 +1,4 @@
-From b5889645e7c558b3d65206920235ac1ac990f509 Mon Sep 17 00:00:00 2001
+From 8c3b96d95efc6a91e99a7da6f1689adc2dcaa807 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 15:42:05 +0000
Subject: [PATCH] builder: Add missing dependency.
@@ -16,10 +16,10 @@ This fixes commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633.
1 file changed, 2 insertions(+)
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 9430d62..606ecc4 100644
+index 1c469ac..30741a0 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
-@@ -121,6 +121,8 @@ virt-builder: $(OBJECTS)
+@@ -119,6 +119,8 @@ virt-builder: $(OBJECTS)
.ml.cmx:
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -c $< -o $@
diff --git a/0019-builder-Add-some-generated-files-to-CLEANFILES.patch b/0019-builder-Add-some-generated-files-to-CLEANFILES.patch
index 2cc8668..1827dc7 100644
--- a/0019-builder-Add-some-generated-files-to-CLEANFILES.patch
+++ b/0019-builder-Add-some-generated-files-to-CLEANFILES.patch
@@ -1,4 +1,4 @@
-From 9a97ac527afdacc07007aa1f0ec84c2a6f95b608 Mon Sep 17 00:00:00 2001
+From 2129b9267c2a26a15a2128cd1f9086f7e659ccb9 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 15:43:24 +0000
Subject: [PATCH] builder: Add some generated files to CLEANFILES.
@@ -11,10 +11,10 @@ This updates commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633.
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 606ecc4..97550a8 100644
+index 30741a0..244214b 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
-@@ -206,4 +206,8 @@ stamp-virt-index-validate.pod: virt-index-validate.pod
+@@ -204,4 +204,8 @@ stamp-virt-index-validate.pod: virt-index-validate.pod
$<
touch $@
diff --git a/0020-builder-Add-dependency-from-index-parse.h-to-index-v.patch b/0020-builder-Add-dependency-from-index-parse.h-to-index-v.patch
index f28b038..9a1a5a3 100644
--- a/0020-builder-Add-dependency-from-index-parse.h-to-index-v.patch
+++ b/0020-builder-Add-dependency-from-index-parse.h-to-index-v.patch
@@ -1,4 +1,4 @@
-From 065d9527e1f694f99e31950b298eb5990c7c024d Mon Sep 17 00:00:00 2001
+From f334675344aec741d10d076835e202874f3adb33 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 15:56:34 +0000
Subject: [PATCH] builder: Add dependency from index-parse.h to index-validate.
@@ -13,10 +13,10 @@ rest of the build.
1 file changed, 2 insertions(+)
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 97550a8..3ad18cc 100644
+index 244214b..09401af 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
-@@ -193,6 +193,8 @@ virt_index_validate_SOURCES = \
+@@ -191,6 +191,8 @@ virt_index_validate_SOURCES = \
index-struct.c \
index-validate.c
diff --git a/0021-builder-Add-dependencies-which-automake-doesn-t-gene.patch b/0021-builder-Add-dependencies-which-automake-doesn-t-gene.patch
index 243ed56..a9b02b0 100644
--- a/0021-builder-Add-dependencies-which-automake-doesn-t-gene.patch
+++ b/0021-builder-Add-dependencies-which-automake-doesn-t-gene.patch
@@ -1,4 +1,4 @@
-From 0d06b917f7c8fa15e397f64d964326ce22631847 Mon Sep 17 00:00:00 2001
+From eee820fe7675ab79c33efe43684cef5c415b4ec7 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 17:40:20 +0000
Subject: [PATCH] builder: Add dependencies which automake doesn't generate
@@ -14,10 +14,10 @@ commit dfe97b352d6b398c3cb3ddb1c9984767722e514b
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 3ad18cc..30ada87 100644
+index 09401af..8e7f104 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
-@@ -121,8 +121,6 @@ virt-builder: $(OBJECTS)
+@@ -119,8 +119,6 @@ virt-builder: $(OBJECTS)
.ml.cmx:
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -c $< -o $@
@@ -26,7 +26,7 @@ index 3ad18cc..30ada87 100644
# Manual pages and HTML files for the website.
man_MANS += virt-builder.1
-@@ -193,8 +191,6 @@ virt_index_validate_SOURCES = \
+@@ -191,8 +189,6 @@ virt_index_validate_SOURCES = \
index-struct.c \
index-validate.c
@@ -35,7 +35,7 @@ index 3ad18cc..30ada87 100644
man_MANS += virt-index-validate.1
noinst_DATA += $(top_builddir)/html/virt-index-validate.1.html
-@@ -213,3 +209,10 @@ CLEANFILES += \
+@@ -211,3 +207,10 @@ CLEANFILES += \
index-parse.h \
index-scan.c \
stamp-virt-index-validate.pod
diff --git a/0022-builder-Fail-if-bison-is-not-installed.patch b/0022-builder-Fail-if-bison-is-not-installed.patch
index 5470ba1..bdf53be 100644
--- a/0022-builder-Fail-if-bison-is-not-installed.patch
+++ b/0022-builder-Fail-if-bison-is-not-installed.patch
@@ -1,4 +1,4 @@
-From 51e511ec86c0f35363721a8912b40fc0b9c200c3 Mon Sep 17 00:00:00 2001
+From 21eb78f2f655b34a6b55f0d3d76f2523732f2666 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 5 Nov 2013 22:25:59 +0000
Subject: [PATCH] builder: Fail if bison is not installed.
@@ -11,7 +11,7 @@ This partially fixes commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633.
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 7648977..59960c8 100644
+index 56a7eb5..f6a08c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -711,9 +711,14 @@ PKG_CHECK_MODULES([LIBLZMA], [liblzma],[
diff --git a/0023-builder-Fail-if-lex-is-not-installed.patch b/0023-builder-Fail-if-lex-is-not-installed.patch
index 6c33834..227dd3b 100644
--- a/0023-builder-Fail-if-lex-is-not-installed.patch
+++ b/0023-builder-Fail-if-lex-is-not-installed.patch
@@ -1,4 +1,4 @@
-From 50ba3ce108ccdeca327c904213094fcbdfcc51e7 Mon Sep 17 00:00:00 2001
+From 8f266bb2dbb769eecb30f5c1563b9e2c2fce533f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Wed, 6 Nov 2013 15:08:08 +0000
Subject: [PATCH] builder: Fail if lex is not installed.
@@ -11,7 +11,7 @@ This completes the fix for commit a4800e2d4fc50f372a8b626333c4fbb9b8ca9633.
1 file changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac
-index 59960c8..634f75d 100644
+index f6a08c9..872b9a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -716,6 +716,9 @@ dnl XXX Could be optional with some work.
diff --git a/0024-builder-sysprep-Allow-random-as-a-password-selector.patch b/0024-builder-sysprep-Allow-random-as-a-password-selector.patch
index 456c6cb..6908110 100644
--- a/0024-builder-sysprep-Allow-random-as-a-password-selector.patch
+++ b/0024-builder-sysprep-Allow-random-as-a-password-selector.patch
@@ -1,4 +1,4 @@
-From 6c102fd01dc1cfccc0805c76ed2c333f0f3e63ee Mon Sep 17 00:00:00 2001
+From 210795169c0ba03d9287f78a639e6d403a4b0c10 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Thu, 21 Nov 2013 17:34:44 +0000
Subject: [PATCH] builder/sysprep: Allow 'random' as a password selector.
@@ -15,10 +15,10 @@ This chooses a random password.
5 files changed, 53 insertions(+), 41 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 7dba186..473460c 100644
+index 7cbc539..57e903c 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -448,31 +448,19 @@ let main () =
+@@ -445,31 +445,19 @@ let main () =
* Note 'None' means that we randomize the root password.
*)
let () =
@@ -62,7 +62,7 @@ index 7dba186..473460c 100644
eprintf (f_"%s: warning: root password could not be set for this type of guest\n%!") prog in
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index a1b2a1f..f70802b 100644
+index e84d87f..2803142 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -712,6 +712,13 @@ Set the root password to the literal string C<PASSWORD>.
diff --git a/0025-builder-sysprep-Allow-accounts-to-be-locked-RHBZ-102.patch b/0025-builder-sysprep-Allow-accounts-to-be-locked-RHBZ-102.patch
index bd9773d..22cd122 100644
--- a/0025-builder-sysprep-Allow-accounts-to-be-locked-RHBZ-102.patch
+++ b/0025-builder-sysprep-Allow-accounts-to-be-locked-RHBZ-102.patch
@@ -1,4 +1,4 @@
-From 08ffde60906f113fa2c8d6c56efb7d7bd0b15015 Mon Sep 17 00:00:00 2001
+From fddbb679b27e45fa4ef83446670de48ce12466d4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Thu, 21 Nov 2013 17:13:22 +0000
Subject: [PATCH] builder/sysprep: Allow accounts to be locked (RHBZ#1028660).
@@ -27,10 +27,10 @@ probably not useful. The shadow password field will contain "!!*".
5 files changed, 100 insertions(+), 16 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 473460c..2050d10 100644
+index 57e903c..690f3e2 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -458,7 +458,7 @@ let main () =
+@@ -455,7 +455,7 @@ let main () =
pw
| None ->
msg (f_"Setting random root password [did you mean to use --root-password?]");
@@ -40,7 +40,7 @@ index 473460c..2050d10 100644
set_linux_passwords ~prog ?password_crypto g root password_map
| _ ->
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index f70802b..02b07e4 100644
+index 2803142..817ddd4 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -719,6 +719,27 @@ has approximately 120 bits of randomness.
diff --git a/0027-builder-Use-a-planner-to-work-out-how-to-convert-the.patch b/0026-builder-Use-a-planner-to-work-out-how-to-convert-the.patch
similarity index 97%
rename from 0027-builder-Use-a-planner-to-work-out-how-to-convert-the.patch
rename to 0026-builder-Use-a-planner-to-work-out-how-to-convert-the.patch
index eada8b5..1a0a07c 100644
--- a/0027-builder-Use-a-planner-to-work-out-how-to-convert-the.patch
+++ b/0026-builder-Use-a-planner-to-work-out-how-to-convert-the.patch
@@ -1,4 +1,4 @@
-From d2327e3eff07ed25e326c52f6e3c9d22b6a61547 Mon Sep 17 00:00:00 2001
+From 0eacd5a33820223d747f0a0f7f2a13c1e6d9f02b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 13 Dec 2013 13:18:47 +0000
Subject: [PATCH] builder: Use a planner to work out how to convert the
@@ -18,21 +18,21 @@ virt-builder.)
(cherry picked from commit 62cc7d3361127b4e007f8e23028213852be09124)
---
builder/Makefile.am | 1 +
- builder/builder.ml | 403 +++++++++++++++++++++++++++++++++-----------------
+ builder/builder.ml | 407 +++++++++++++++++++++++++++++++++-----------------
mllib/Makefile.am | 5 +-
mllib/common_utils.ml | 12 ++
mllib/planner.ml | 80 ++++++++++
mllib/planner.mli | 78 ++++++++++
po/POTFILES-ml | 1 +
- 7 files changed, 445 insertions(+), 135 deletions(-)
+ 7 files changed, 448 insertions(+), 136 deletions(-)
create mode 100644 mllib/planner.ml
create mode 100644 mllib/planner.mli
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 30ada87..ca4a254 100644
+index 8e7f104..0d9ea75 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
-@@ -74,6 +74,7 @@ OBJECTS = \
+@@ -73,6 +73,7 @@ OBJECTS = \
$(top_builddir)/mllib/fsync-c.o \
$(top_builddir)/mllib/fsync.cmx \
$(top_builddir)/mllib/password.cmx \
@@ -41,7 +41,7 @@ index 30ada87..ca4a254 100644
index-scan.o \
index-struct.o \
diff --git a/builder/builder.ml b/builder/builder.ml
-index 86e38f3..df82707 100644
+index 690f3e2..71dfe13 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -22,9 +22,9 @@ module G = Guestfs
@@ -55,7 +55,7 @@ index 86e38f3..df82707 100644
open Unix
open Printf
-@@ -243,148 +243,281 @@ let main () =
+@@ -245,146 +245,281 @@ let main () =
Sigchecker.verify_detached sigchecker template sigfile in
@@ -65,6 +65,11 @@ index 86e38f3..df82707 100644
- * - did the user specify --size?
- *)
- let output, size, format, delete_output_file, do_resize, resize_sparse =
+- let headroom = 256L *^ 1024L *^ 1024L in
+-
+- match output with
+- (* If the output file was specified and it exists and it's a block
+- * device, then we should skip the creation step.
+ (* Planner: Input tags. *)
+ let itags =
+ let { Index_parser.size = size; format = format } = entry in
@@ -73,11 +78,10 @@ index 86e38f3..df82707 100644
+ match detect_compression template with
+ | `XZ -> [ `XZ, "" ]
+ | `Unknown -> []
- in
++ in
+ [ `Template, ""; `Filename, template; `Size, Int64.to_string size;
+ `Format, format ] @ compression_tags in
-
-- let headroom = 256L *^ 1024L *^ 1024L in
++
+ (* Planner: Goal. *)
+ let output_size =
+ let { Index_parser.size = default_size } = entry in
@@ -90,10 +94,7 @@ index 86e38f3..df82707 100644
+ | Some output, None -> output, "raw"
+ | Some output, Some format -> output, format in
+ let output_is_block_dev = is_block_device output_filename in
-
-- match output with
-- (* If the output file was specified and it exists and it's a block
-- * device, then we should skip the creation step.
++
+ if output_is_block_dev && size <> None then (
+ eprintf (f_"%s: you cannot use --size option with block devices\n") prog;
+ exit 1
@@ -123,16 +124,16 @@ index 86e38f3..df82707 100644
+ (* XXX Weights are not very smartly chosen. At the moment I'm
+ * using a range [0..100] where 0 = free and 100 = expensive. We
+ * could estimate weights better by looking at file sizes.
-+ *)
-+
-+ (* Since the final plan won't run in parallel, we don't only need
-+ * to choose unique tempfiles per transition, so this is OK:
*)
- | Some output when is_block_device output ->
- if size <> None then (
- eprintf (f_"%s: you cannot use --size option with block devices\n")
- prog;
- exit 1
++
++ (* Since the final plan won't run in parallel, we don't only need
++ * to choose unique tempfiles per transition, so this is OK:
++ *)
+ let tempfile = Filename.temp_file "vb" ".img" in
+ unlink_on_exit tempfile;
+
@@ -467,7 +468,7 @@ index 86e38f3..df82707 100644
(* Now mount the output disk so we can make changes. *)
msg (f_"Opening the new disk");
-@@ -397,7 +530,7 @@ let main () =
+@@ -397,7 +532,7 @@ let main () =
g#set_network network;
(* The output disk is being created, so use cache=unsafe here. *)
@@ -476,7 +477,7 @@ index 86e38f3..df82707 100644
(* Attach ISOs, if we have any. *)
List.iter (
-@@ -690,7 +823,9 @@ exec >>%s 2>&1
+@@ -690,7 +825,9 @@ exec >>%s 2>&1
Some (
String.concat "\n" [
@@ -487,7 +488,7 @@ index 86e38f3..df82707 100644
sprintf (f_"Total usable space: %s")
(human_size total_bytes);
sprintf (f_"Free space: %s (%Ld%%)")
-@@ -729,7 +864,7 @@ exec >>%s 2>&1
+@@ -729,7 +866,7 @@ exec >>%s 2>&1
* use cache=none.
*)
if sync then
@@ -497,19 +498,19 @@ index 86e38f3..df82707 100644
(* Now that we've finished the build, don't delete the output file on
* exit.
diff --git a/mllib/Makefile.am b/mllib/Makefile.am
-index 1103ffb..67027d2 100644
+index 8c8d508..9719273 100644
--- a/mllib/Makefile.am
+++ b/mllib/Makefile.am
-@@ -40,6 +40,8 @@ SOURCES = \
- hostname.ml \
- password.mli \
+@@ -42,6 +42,8 @@ SOURCES = \
password.ml \
+ perl_edit.mli \
+ perl_edit.ml \
+ planner.mli \
+ planner.ml \
progress-c.c \
progress.mli \
progress.ml \
-@@ -81,7 +83,8 @@ OBJECTS = \
+@@ -84,7 +86,8 @@ OBJECTS = \
progress.cmx \
uRI.cmx \
crypt.cmx \
@@ -713,13 +714,13 @@ index 0000000..770a00f
+ Raises [Failure "plan"] if no plan was found within [max_depth]
+ transitions. *)
diff --git a/po/POTFILES-ml b/po/POTFILES-ml
-index efeb75d..8ae6ea9 100644
+index a63b69a..84211b6 100644
--- a/po/POTFILES-ml
+++ b/po/POTFILES-ml
-@@ -17,6 +17,7 @@ mllib/fsync.ml
- mllib/hostname.ml
+@@ -17,6 +17,7 @@ mllib/hostname.ml
mllib/libdir.ml
mllib/password.ml
+ mllib/perl_edit.ml
+mllib/planner.ml
mllib/progress.ml
mllib/random_seed.ml
diff --git a/0028-builder-planner-Handle-no-format-in-source-case-corr.patch b/0027-builder-planner-Handle-no-format-in-source-case-corr.patch
similarity index 92%
rename from 0028-builder-planner-Handle-no-format-in-source-case-corr.patch
rename to 0027-builder-planner-Handle-no-format-in-source-case-corr.patch
index 10731ef..aca4e38 100644
--- a/0028-builder-planner-Handle-no-format-in-source-case-corr.patch
+++ b/0027-builder-planner-Handle-no-format-in-source-case-corr.patch
@@ -1,4 +1,4 @@
-From 80671be3c32a4d95801448815435f4ee708b446b Mon Sep 17 00:00:00 2001
+From 5b5b2fbc97d47741d1684afd6435f1484ea900af Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 14 Dec 2013 15:49:25 +0000
Subject: [PATCH] builder: planner: Handle no format= in source case correctly.
@@ -9,10 +9,10 @@ Subject: [PATCH] builder: planner: Handle no format= in source case correctly.
1 file changed, 28 insertions(+), 16 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index df82707..f5a8df4 100644
+index 71dfe13..4176457 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -246,14 +246,16 @@ let main () =
+@@ -248,14 +248,16 @@ let main () =
(* Planner: Input tags. *)
let itags =
let { Index_parser.size = size; format = format } = entry in
@@ -35,7 +35,7 @@ index df82707..f5a8df4 100644
(* Planner: Goal. *)
let output_size =
-@@ -282,7 +284,7 @@ let main () =
+@@ -284,7 +286,7 @@ let main () =
] in
(* MUST NOT *)
@@ -44,7 +44,7 @@ index df82707..f5a8df4 100644
goal_must, goal_must_not in
-@@ -357,8 +359,11 @@ let main () =
+@@ -359,8 +361,11 @@ let main () =
*
* 'qemu-img resize' works on the file in-place and won't change
* the format. It must not be run on a template directly.
@@ -57,7 +57,7 @@ index df82707..f5a8df4 100644
tr `Disk_resize 60 ((`Size, Int64.to_string output_size) :: itags);
tr `Disk_resize 60 ((`Size, Int64.to_string output_size) :: itags);
);
-@@ -462,7 +467,8 @@ let main () =
+@@ -464,7 +469,8 @@ let main () =
| itags, `Virt_resize, otags ->
let ifile = List.assoc `Filename itags in
@@ -67,7 +67,7 @@ index df82707..f5a8df4 100644
let ofile = List.assoc `Filename otags in
let osize = Int64.of_string (List.assoc `Size otags) in
let osize = roundup64 osize 512L in
-@@ -479,10 +485,12 @@ let main () =
+@@ -481,10 +487,12 @@ let main () =
if debug then eprintf "%s\n%!" cmd;
if Sys.command cmd <> 0 then exit 1;
let cmd =
@@ -82,7 +82,7 @@ index df82707..f5a8df4 100644
(quote oformat)
(match expand with
| None -> ""
-@@ -507,13 +515,17 @@ let main () =
+@@ -509,13 +517,17 @@ let main () =
| itags, `Convert, otags ->
let ifile = List.assoc `Filename itags in
diff --git a/0029-builder-Flush-debug-info-after-printing-it.patch b/0028-builder-Flush-debug-info-after-printing-it.patch
similarity index 81%
rename from 0029-builder-Flush-debug-info-after-printing-it.patch
rename to 0028-builder-Flush-debug-info-after-printing-it.patch
index aa1a5e7..f3a1035 100644
--- a/0029-builder-Flush-debug-info-after-printing-it.patch
+++ b/0028-builder-Flush-debug-info-after-printing-it.patch
@@ -1,4 +1,4 @@
-From 2e7013906f7e1eb6f11fe63196eb07e414cc584a Mon Sep 17 00:00:00 2001
+From 6017ceac7a8b5b41863cb6901204153961b4ad30 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 14 Dec 2013 15:50:04 +0000
Subject: [PATCH] builder: Flush debug info after printing it.
@@ -9,10 +9,10 @@ Subject: [PATCH] builder: Flush debug info after printing it.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index f5a8df4..5106263 100644
+index 4176457..854093d 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -427,7 +427,7 @@ let main () =
+@@ -429,7 +429,7 @@ let main () =
eprintf "\n";
eprintf "%d: otags:" i;
print_tags otags;
diff --git a/0030-builder-Add-a-test-of-the-planner.patch b/0029-builder-Add-a-test-of-the-planner.patch
similarity index 95%
rename from 0030-builder-Add-a-test-of-the-planner.patch
rename to 0029-builder-Add-a-test-of-the-planner.patch
index 46bed19..9235d7b 100644
--- a/0030-builder-Add-a-test-of-the-planner.patch
+++ b/0029-builder-Add-a-test-of-the-planner.patch
@@ -1,4 +1,4 @@
-From b50e02ca9354ebd173bc47684eaec41fa250215f Mon Sep 17 00:00:00 2001
+From 1ca9b9ef1a0e8972420a2756fc39b401d61a8963 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 14 Dec 2013 15:50:37 +0000
Subject: [PATCH] builder: Add a test of the planner.
@@ -16,7 +16,7 @@ that the planner can deal with them.
create mode 100755 builder/test-virt-builder-planner.sh
diff --git a/.gitignore b/.gitignore
-index 4a77963..32b8662 100644
+index 8f0cda3..6e04072 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,6 +61,7 @@ Makefile.in
@@ -28,10 +28,10 @@ index 4a77963..32b8662 100644
/builder/stamp-virt-index-validate.pod
/builder/test-index
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index ca4a254..11967e9 100644
+index 0d9ea75..6ec4b2b 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
-@@ -143,15 +143,28 @@ CLEANFILES += stamp-virt-builder.pod
+@@ -141,15 +141,28 @@ CLEANFILES += stamp-virt-builder.pod
TESTS_ENVIRONMENT = $(top_builddir)/run --test
@@ -64,7 +64,7 @@ index ca4a254..11967e9 100644
TESTS = test-virt-builder-list.sh
-@@ -162,6 +175,9 @@ endif ENABLE_APPLIANCE
+@@ -160,6 +173,9 @@ endif ENABLE_APPLIANCE
check-valgrind:
$(MAKE) VG="$(top_builddir)/run @VG@" check
diff --git a/0031-builder-tests-Fix-virt-builder-list-output.patch b/0030-builder-tests-Fix-virt-builder-list-output.patch
similarity index 96%
rename from 0031-builder-tests-Fix-virt-builder-list-output.patch
rename to 0030-builder-tests-Fix-virt-builder-list-output.patch
index 425f185..c4137dd 100644
--- a/0031-builder-tests-Fix-virt-builder-list-output.patch
+++ b/0030-builder-tests-Fix-virt-builder-list-output.patch
@@ -1,4 +1,4 @@
-From 44cc06949962243ac0d262a9b1c6166a7840a147 Mon Sep 17 00:00:00 2001
+From 4c834e9703fea0bab32e2360c40caa7ca3a5a2c2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 14 Dec 2013 16:18:23 +0000
Subject: [PATCH] builder: tests: Fix virt-builder --list output.
diff --git a/0032-builder-tests-Add-test-virt-builder-planner.sh-to-EX.patch b/0031-builder-tests-Add-test-virt-builder-planner.sh-to-EX.patch
similarity index 89%
rename from 0032-builder-tests-Add-test-virt-builder-planner.sh-to-EX.patch
rename to 0031-builder-tests-Add-test-virt-builder-planner.sh-to-EX.patch
index 9beba6d..e415a62 100644
--- a/0032-builder-tests-Add-test-virt-builder-planner.sh-to-EX.patch
+++ b/0031-builder-tests-Add-test-virt-builder-planner.sh-to-EX.patch
@@ -1,4 +1,4 @@
-From c6a116452d896f8b164806ad440091732b8645f5 Mon Sep 17 00:00:00 2001
+From d0f2d9c2e1468e2761cdc89940e5f989d971483f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 14 Dec 2013 16:18:50 +0000
Subject: [PATCH] builder: tests: Add test-virt-builder-planner.sh to
@@ -12,7 +12,7 @@ This fixes commit a27963b67ba1140c29c145a1ce14dbfc05f8d7da.
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 11967e9..3f35cc6 100644
+index 6ec4b2b..f5e7d80 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -30,7 +30,8 @@ EXTRA_DIST = \
diff --git a/0033-builder-Add-a-link-to-blog-posting-about-the-planner.patch b/0032-builder-Add-a-link-to-blog-posting-about-the-planner.patch
similarity index 93%
rename from 0033-builder-Add-a-link-to-blog-posting-about-the-planner.patch
rename to 0032-builder-Add-a-link-to-blog-posting-about-the-planner.patch
index a779097..d0e5f2d 100644
--- a/0033-builder-Add-a-link-to-blog-posting-about-the-planner.patch
+++ b/0032-builder-Add-a-link-to-blog-posting-about-the-planner.patch
@@ -1,4 +1,4 @@
-From 86ac9a614d3791df16eb307f0c7fb6aef29ca0b8 Mon Sep 17 00:00:00 2001
+From 4842105b79ba74b18c926416e3dc02f978e7e80b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 14 Dec 2013 16:43:40 +0000
Subject: [PATCH] builder: Add a link to blog posting about the planner.
@@ -13,10 +13,10 @@ should help people to understand how this code works.
2 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 5106263..77b18ce 100644
+index 854093d..8951be5 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -243,6 +243,10 @@ let main () =
+@@ -245,6 +245,10 @@ let main () =
Sigchecker.verify_detached sigchecker template sigfile in
diff --git a/0034-builder-Only-use-virt-resize-no-sparse-when-writing-.patch b/0033-builder-Only-use-virt-resize-no-sparse-when-writing-.patch
similarity index 89%
rename from 0034-builder-Only-use-virt-resize-no-sparse-when-writing-.patch
rename to 0033-builder-Only-use-virt-resize-no-sparse-when-writing-.patch
index 7207020..1f485c1 100644
--- a/0034-builder-Only-use-virt-resize-no-sparse-when-writing-.patch
+++ b/0033-builder-Only-use-virt-resize-no-sparse-when-writing-.patch
@@ -1,4 +1,4 @@
-From 7b618e1d4da8407652f74a5a7d466ff50bcb71b7 Mon Sep 17 00:00:00 2001
+From 47b170768af8b09fb3185f1e21d129f06c44faff Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 14 Dec 2013 18:53:20 +0000
Subject: [PATCH] builder: Only use virt-resize --no-sparse when writing to a
@@ -16,10 +16,10 @@ device.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 77b18ce..5c2b27a 100644
+index 8951be5..148c9bf 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -491,7 +491,7 @@ let main () =
+@@ -493,7 +493,7 @@ let main () =
let cmd =
sprintf "virt-resize%s%s%s --output-format %s%s%s %s %s"
(if debug then " --verbose" else " --quiet")
diff --git a/0035-builder-Refuse-to-write-to-a-char-device-or-dev-null.patch b/0034-builder-Refuse-to-write-to-a-char-device-or-dev-null.patch
similarity index 86%
rename from 0035-builder-Refuse-to-write-to-a-char-device-or-dev-null.patch
rename to 0034-builder-Refuse-to-write-to-a-char-device-or-dev-null.patch
index f4a16ff..dbf24d7 100644
--- a/0035-builder-Refuse-to-write-to-a-char-device-or-dev-null.patch
+++ b/0034-builder-Refuse-to-write-to-a-char-device-or-dev-null.patch
@@ -1,4 +1,4 @@
-From 9fdc0f1303626742595e8d25a3359736037204df Mon Sep 17 00:00:00 2001
+From 26c861ed189888c1fa25e7a250d333a5cac257ba Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sat, 14 Dec 2013 18:54:56 +0000
Subject: [PATCH] builder: Refuse to write to a char device or /dev/null.
@@ -13,10 +13,10 @@ prevent it happening.
1 file changed, 5 insertions(+)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 5c2b27a..5947667 100644
+index 148c9bf..5d8ad09 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -279,6 +279,11 @@ let main () =
+@@ -281,6 +281,11 @@ let main () =
exit 1
);
diff --git a/0036-builder-Remove-blank-line.patch b/0035-builder-Remove-blank-line.patch
similarity index 79%
rename from 0036-builder-Remove-blank-line.patch
rename to 0035-builder-Remove-blank-line.patch
index c7938eb..3faf21b 100644
--- a/0036-builder-Remove-blank-line.patch
+++ b/0035-builder-Remove-blank-line.patch
@@ -1,4 +1,4 @@
-From aeebf2b7118591ed0588c394adfcb1c75f350cef Mon Sep 17 00:00:00 2001
+From 0331c729237b94df8db7a936aefde6c5270d4da0 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 16 Dec 2013 14:14:01 +0000
Subject: [PATCH] builder: Remove blank line.
@@ -9,10 +9,10 @@ Subject: [PATCH] builder: Remove blank line.
1 file changed, 1 deletion(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 5947667..f6e3595 100644
+index 5d8ad09..1551b72 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -56,7 +56,6 @@ let main () =
+@@ -58,7 +58,6 @@ let main () =
) sources
);
diff --git a/0037-builder-Add-update-option-to-update-template-core-pa.patch b/0036-builder-Add-update-option-to-update-template-core-pa.patch
similarity index 97%
rename from 0037-builder-Add-update-option-to-update-template-core-pa.patch
rename to 0036-builder-Add-update-option-to-update-template-core-pa.patch
index 3878e90..b15a2d0 100644
--- a/0037-builder-Add-update-option-to-update-template-core-pa.patch
+++ b/0036-builder-Add-update-option-to-update-template-core-pa.patch
@@ -1,4 +1,4 @@
-From ec21401178ef8ac0b1b2ebf5d9e4680bf16c4665 Mon Sep 17 00:00:00 2001
+From a7a1577b86da7b90de88d39431035fa92cc022f9 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Thu, 19 Dec 2013 11:17:43 +0000
Subject: [PATCH] builder: Add --update option to update template/core
@@ -12,10 +12,10 @@ Subject: [PATCH] builder: Add --update option to update template/core
3 files changed, 90 insertions(+), 22 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index f6e3595..0f8e069 100644
+index 1551b72..1cd007f 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -39,7 +39,7 @@ let main () =
+@@ -41,7 +41,7 @@ let main () =
attach, cache, check_signature, curl, debug, delete, edit,
firstboot, run, format, gpg, hostname, install, list_long, memsize, mkdirs,
network, output, password_crypto, quiet, root_password, scrub,
@@ -24,7 +24,7 @@ index f6e3595..0f8e069 100644
parse_cmdline () in
(* Timestamped messages in ordinary, non-debug non-quiet mode. *)
-@@ -667,6 +667,7 @@ exec >>%s 2>&1
+@@ -669,6 +669,7 @@ exec >>%s 2>&1
exit 1
in
@@ -32,7 +32,7 @@ index f6e3595..0f8e069 100644
let guest_install_command packages =
let quoted_args = String.concat " " (List.map quote packages) in
match g#inspect_get_package_management root with
-@@ -697,8 +698,45 @@ exec >>%s 2>&1
+@@ -699,8 +700,45 @@ exec >>%s 2>&1
eprintf (f_"%s: sorry, don't know how to use --install with the '%s' package manager\n")
prog pm;
exit 1
@@ -113,7 +113,7 @@ index b4e21fc..f25280c 100644
- scrub_logfile, size, smp, sources, sync, upload, writes
+ scrub_logfile, size, smp, sources, sync, update, upload, writes
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 02b07e4..f72e284 100644
+index 817ddd4..094f028 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -18,6 +18,7 @@ virt-builder - Build virtual machine images quickly
@@ -239,7 +239,7 @@ index 02b07e4..f72e284 100644
However these options will have access to the host's network and since
the template may contain untrusted code, the code might try to access
-@@ -1417,13 +1444,13 @@ Templates gets downloaded into the cache the first time they are used,
+@@ -1435,13 +1462,13 @@ Templates gets downloaded into the cache the first time they are used,
or if you use the I<--cache-all-templates> option. See L</CACHING>
above for further information.
diff --git a/0038-launch-libvirt-Don-t-default-to-using-NULL-for-libvi.patch b/0037-launch-libvirt-Don-t-default-to-using-NULL-for-libvi.patch
similarity index 98%
rename from 0038-launch-libvirt-Don-t-default-to-using-NULL-for-libvi.patch
rename to 0037-launch-libvirt-Don-t-default-to-using-NULL-for-libvi.patch
index 1fd5cf5..2e27f77 100644
--- a/0038-launch-libvirt-Don-t-default-to-using-NULL-for-libvi.patch
+++ b/0037-launch-libvirt-Don-t-default-to-using-NULL-for-libvi.patch
@@ -1,4 +1,4 @@
-From 5482bfb88f6c07675f4ca9073d0f3faca733fc15 Mon Sep 17 00:00:00 2001
+From acd1f5bde638bf8e9e8ed4f914a051e6f3d2e605 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Thu, 19 Dec 2013 14:22:26 +0000
Subject: [PATCH] launch: libvirt: Don't default to using NULL for libvirt
diff --git a/0039-builder-Fix-handling-of-size-parameter.patch b/0038-builder-Fix-handling-of-size-parameter.patch
similarity index 95%
rename from 0039-builder-Fix-handling-of-size-parameter.patch
rename to 0038-builder-Fix-handling-of-size-parameter.patch
index 78f8e57..bc7628f 100644
--- a/0039-builder-Fix-handling-of-size-parameter.patch
+++ b/0038-builder-Fix-handling-of-size-parameter.patch
@@ -1,4 +1,4 @@
-From 4a6606e18882c7dfd8de84b2a081e8c6caeadcd4 Mon Sep 17 00:00:00 2001
+From 9f1e955555f460c9cf1f89fcd6f6fad46eebe0db Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 7 Jan 2014 17:32:04 +0000
Subject: [PATCH] builder: Fix handling of --size parameter.
@@ -25,10 +25,10 @@ the output block device.
1 file changed, 34 insertions(+), 9 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 0f8e069..f007b46 100644
+index 1cd007f..0c1f1e0 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -261,9 +261,6 @@ let main () =
+@@ -263,9 +263,6 @@ let main () =
format_tag @ compression_tag in
(* Planner: Goal. *)
@@ -38,7 +38,7 @@ index 0f8e069..f007b46 100644
let output_filename, output_format =
match output, format with
| None, None -> sprintf "%s.img" arg, "raw"
-@@ -271,18 +268,46 @@ let main () =
+@@ -273,18 +270,46 @@ let main () =
| None, Some format -> sprintf "%s.%s" arg format, format
| Some output, None -> output, "raw"
| Some output, Some format -> output, format in
diff --git a/0040-libvirt-auth-Provide-a-friendlier-wrapper-around-vir.patch b/0039-libvirt-auth-Provide-a-friendlier-wrapper-around-vir.patch
similarity index 97%
rename from 0040-libvirt-auth-Provide-a-friendlier-wrapper-around-vir.patch
rename to 0039-libvirt-auth-Provide-a-friendlier-wrapper-around-vir.patch
index bf09a35..f2cccdf 100644
--- a/0040-libvirt-auth-Provide-a-friendlier-wrapper-around-vir.patch
+++ b/0039-libvirt-auth-Provide-a-friendlier-wrapper-around-vir.patch
@@ -1,4 +1,4 @@
-From a9da4193cf0c11b85d24f088458224be129cd550 Mon Sep 17 00:00:00 2001
+From 528be4e716fab77ab36258382bcb114c1acf277c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Thu, 2 Jan 2014 12:20:18 +0000
Subject: [PATCH] libvirt-auth: Provide a friendlier wrapper around
@@ -11,7 +11,7 @@ Subject: [PATCH] libvirt-auth: Provide a friendlier wrapper around
2 files changed, 46 insertions(+), 10 deletions(-)
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
-index 8888603..a1f3f02 100644
+index 3501ed5..cde1277 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -469,6 +469,7 @@ struct guestfs_h
diff --git a/0041-tests-Add-a-regression-test-of-libvirt-authenticatio.patch b/0040-tests-Add-a-regression-test-of-libvirt-authenticatio.patch
similarity index 98%
rename from 0041-tests-Add-a-regression-test-of-libvirt-authenticatio.patch
rename to 0040-tests-Add-a-regression-test-of-libvirt-authenticatio.patch
index 66b6f41..5a94925 100644
--- a/0041-tests-Add-a-regression-test-of-libvirt-authenticatio.patch
+++ b/0040-tests-Add-a-regression-test-of-libvirt-authenticatio.patch
@@ -1,4 +1,4 @@
-From 76ce46c587e5e8ec45acc10b6578a59b9651d454 Mon Sep 17 00:00:00 2001
+From aba8944fca9dbf366f64c0d9c41bf9a41ef0d0d4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Wed, 8 Jan 2014 19:36:00 +0000
Subject: [PATCH] tests: Add a regression test of libvirt authentication
@@ -18,10 +18,10 @@ https://www.redhat.com/archives/libvir-list/2014-January/msg00378.html
create mode 100644 tests/events/test-libvirt-auth-callbacks.c
diff --git a/.gitignore b/.gitignore
-index 32b8662..3d429de 100644
+index 6e04072..bce35f0 100644
--- a/.gitignore
+++ b/.gitignore
-@@ -462,6 +462,7 @@ Makefile.in
+@@ -463,6 +463,7 @@ Makefile.in
/tests/data/initrd-x86_64.img.gz
/tests/data/test-grep.txt.gz
/tests/data/test.iso
diff --git a/0042-tests-Add-a-regression-test-for-libvirt-authenticati.patch b/0041-tests-Add-a-regression-test-for-libvirt-authenticati.patch
similarity index 92%
rename from 0042-tests-Add-a-regression-test-for-libvirt-authenticati.patch
rename to 0041-tests-Add-a-regression-test-for-libvirt-authenticati.patch
index b6ca4e3..915d81b 100644
--- a/0042-tests-Add-a-regression-test-for-libvirt-authenticati.patch
+++ b/0041-tests-Add-a-regression-test-for-libvirt-authenticati.patch
@@ -1,4 +1,4 @@
-From 3323012c8d90c570770049d6f68f6fb686fa0166 Mon Sep 17 00:00:00 2001
+From bb6a15c77501b78ade92adb11c6fac93682a7944 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Wed, 8 Jan 2014 20:22:21 +0000
Subject: [PATCH] tests: Add a regression test for libvirt authentication
@@ -9,22 +9,22 @@ This tests the virConnectAuthPtrDefault wrapper path.
(cherry picked from commit 746a0b1f19667606ee63c8d3ab6a75531a8bd71c)
---
.gitignore | 2 ++
- tests/regressions/Makefile.am | 29 +++++++++++++++-
+ tests/regressions/Makefile.am | 28 ++++++++++++++++
tests/regressions/rhbz1044014.c | 69 ++++++++++++++++++++++++++++++++++++++
tests/regressions/rhbz1044014.in | 1 +
tests/regressions/rhbz1044014.sh | 70 +++++++++++++++++++++++++++++++++++++++
tests/regressions/rhbz1044014.xml | 5 +++
- 6 files changed, 175 insertions(+), 1 deletion(-)
+ 6 files changed, 175 insertions(+)
create mode 100644 tests/regressions/rhbz1044014.c
create mode 100644 tests/regressions/rhbz1044014.in
create mode 100755 tests/regressions/rhbz1044014.sh
create mode 100644 tests/regressions/rhbz1044014.xml
diff --git a/.gitignore b/.gitignore
-index 3d429de..985795f 100644
+index bce35f0..2d61d77 100644
--- a/.gitignore
+++ b/.gitignore
-@@ -484,6 +484,8 @@ Makefile.in
+@@ -485,6 +485,8 @@ Makefile.in
/tests/regressions/rhbz501893
/tests/regressions/rhbz790721
/tests/regressions/rhbz914931
@@ -34,10 +34,20 @@ index 3d429de..985795f 100644
/tests/rsync/rsyncd.pid
/tests/syslinux/extlinux-guest.img
diff --git a/tests/regressions/Makefile.am b/tests/regressions/Makefile.am
-index 97bc64e..3cd121a 100644
+index 15333b7..563f87f 100644
--- a/tests/regressions/Makefile.am
+++ b/tests/regressions/Makefile.am
-@@ -37,6 +37,10 @@ TESTS = \
+@@ -35,6 +35,9 @@ EXTRA_DIST = \
+ rhbz957772.sh \
+ rhbz975797.sh \
+ rhbz1001875.sh \
++ rhbz1044014.sh \
++ rhbz1044014.in \
++ rhbz1044014.xml \
+ test-noexec-stack.pl
+
+ TESTS = \
+@@ -57,6 +60,10 @@ TESTS = \
rhbz1055452 \
test-noexec-stack.pl
@@ -48,7 +58,7 @@ index 97bc64e..3cd121a 100644
tests_not_run = \
rhbz727178.sh \
rhbz909624.sh
-@@ -51,6 +55,10 @@ check_PROGRAMS = \
+@@ -71,6 +78,10 @@ check_PROGRAMS = \
rhbz914931 \
rhbz1055452
@@ -59,7 +69,7 @@ index 97bc64e..3cd121a 100644
rhbz501893_SOURCES = rhbz501893.c
rhbz501893_CPPFLAGS = \
-I$(top_srcdir)/src -I$(top_builddir)/src
-@@ -81,6 +89,23 @@ rhbz914931_CFLAGS = \
+@@ -101,6 +112,23 @@ rhbz914931_CFLAGS = \
rhbz914931_LDADD = \
$(top_builddir)/src/libguestfs.la
@@ -83,17 +93,6 @@ index 97bc64e..3cd121a 100644
rhbz1055452_SOURCES = rhbz1055452.c
rhbz1055452_CPPFLAGS = \
-I$(top_srcdir)/src -I$(top_builddir)/src \
-@@ -96,7 +121,9 @@ EXTRA_DIST = \
- $(TESTS) \
- $(tests_not_run) \
- rhbz557655-expected.stdout \
-- rhbz557655-expected.stderr
-+ rhbz557655-expected.stderr \
-+ rhbz1044014.in \
-+ rhbz1044014.xml
-
- check-slow:
- $(MAKE) TESTS="rhbz909624.sh" check
diff --git a/tests/regressions/rhbz1044014.c b/tests/regressions/rhbz1044014.c
new file mode 100644
index 0000000..18ce4a7
diff --git a/0043-sysprep-builder-Add-timezone-option-to-set-timezone-.patch b/0042-sysprep-builder-Add-timezone-option-to-set-timezone-.patch
similarity index 95%
rename from 0043-sysprep-builder-Add-timezone-option-to-set-timezone-.patch
rename to 0042-sysprep-builder-Add-timezone-option-to-set-timezone-.patch
index 3c44135..f44a5f2 100644
--- a/0043-sysprep-builder-Add-timezone-option-to-set-timezone-.patch
+++ b/0042-sysprep-builder-Add-timezone-option-to-set-timezone-.patch
@@ -1,4 +1,4 @@
-From 076cffb5802a01a2908fcc8d0f20b1331e3d4bf5 Mon Sep 17 00:00:00 2001
+From 7d813866eeefe02646de7ff2c73a2e31076a5afd Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 10 Jan 2014 12:12:30 +0000
Subject: [PATCH] sysprep, builder: Add --timezone option to set timezone of
@@ -28,22 +28,22 @@ You can use it like this:
create mode 100644 sysprep/sysprep_operation_timezone.ml
diff --git a/builder/Makefile.am b/builder/Makefile.am
-index 3f35cc6..fc4c552 100644
+index f5e7d80..d718c22 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
-@@ -69,6 +69,7 @@ OBJECTS = \
+@@ -67,6 +67,7 @@ OBJECTS = \
$(top_builddir)/mllib/urandom.cmx \
$(top_builddir)/mllib/random_seed.cmx \
$(top_builddir)/mllib/hostname.cmx \
+ $(top_builddir)/mllib/timezone.cmx \
$(top_builddir)/mllib/firstboot.cmx \
+ $(top_builddir)/mllib/perl_edit.cmx \
$(top_builddir)/mllib/crypt-c.o \
- $(top_builddir)/mllib/crypt.cmx \
diff --git a/builder/builder.ml b/builder/builder.ml
-index f007b46..90300a3 100644
+index 0c1f1e0..daf355c 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -39,7 +39,8 @@ let main () =
+@@ -41,7 +41,8 @@ let main () =
attach, cache, check_signature, curl, debug, delete, edit,
firstboot, run, format, gpg, hostname, install, list_long, memsize, mkdirs,
network, output, password_crypto, quiet, root_password, scrub,
@@ -53,7 +53,7 @@ index f007b46..90300a3 100644
parse_cmdline () in
(* Timestamped messages in ordinary, non-debug non-quiet mode. *)
-@@ -619,6 +620,15 @@ let main () =
+@@ -621,6 +622,15 @@ let main () =
eprintf (f_"%s: warning: hostname could not be set for this type of guest\n%!") prog
);
@@ -120,7 +120,7 @@ index 438f2e9..8d2766a 100755
--mkdir /etc/foo/bar/baz \
--write '/etc/foo/bar/baz/foo:Hello World' \
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index f72e284..3558119 100644
+index 094f028..f98ffdb 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -18,6 +18,7 @@ virt-builder - Build virtual machine images quickly
@@ -153,10 +153,10 @@ index f72e284..3558119 100644
=item *
diff --git a/mllib/Makefile.am b/mllib/Makefile.am
-index 67027d2..5568e02 100644
+index 9719273..67f0a0a 100644
--- a/mllib/Makefile.am
+++ b/mllib/Makefile.am
-@@ -47,6 +47,8 @@ SOURCES = \
+@@ -49,6 +49,8 @@ SOURCES = \
progress.ml \
random_seed.mli \
random_seed.ml \
@@ -165,14 +165,14 @@ index 67027d2..5568e02 100644
tty-c.c \
tTY.mli \
tTY.ml \
-@@ -77,6 +79,7 @@ OBJECTS = \
+@@ -79,6 +81,7 @@ OBJECTS = \
urandom.cmx \
random_seed.cmx \
hostname.cmx \
+ timezone.cmx \
firstboot.cmx \
+ perl_edit.cmx \
tTY.cmx \
- fsync.cmx \
diff --git a/mllib/timezone.ml b/mllib/timezone.ml
new file mode 100644
index 0000000..8b302d9
@@ -247,7 +247,7 @@ index 0000000..ad0d4b2
+ of the guest. Returns [true] if it was able to set the
+ timezone or [false] if not. *)
diff --git a/po/POTFILES-ml b/po/POTFILES-ml
-index 8ae6ea9..4c69258 100644
+index 84211b6..564404b 100644
--- a/po/POTFILES-ml
+++ b/po/POTFILES-ml
@@ -21,6 +21,7 @@ mllib/planner.ml
@@ -267,10 +267,10 @@ index 8ae6ea9..4c69258 100644
sysprep/sysprep_operation_udev_persistent_net.ml
sysprep/sysprep_operation_user_account.ml
diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
-index 621d2b6..835d4a6 100644
+index 24654cb..7ab2277 100644
--- a/sysprep/Makefile.am
+++ b/sysprep/Makefile.am
-@@ -65,6 +65,7 @@ operations = \
+@@ -66,6 +66,7 @@ operations = \
ssh_hostkeys \
ssh_userdir \
sssd_db_log \
@@ -278,7 +278,7 @@ index 621d2b6..835d4a6 100644
tmp_files \
udev_persistent_net \
user_account \
-@@ -92,6 +93,7 @@ OBJECTS = \
+@@ -93,6 +94,7 @@ OBJECTS = \
$(top_builddir)/mllib/password.cmx \
$(top_builddir)/mllib/random_seed.cmx \
$(top_builddir)/mllib/hostname.cmx \
diff --git a/0044-builder-Document-how-to-change-keyboard-layout.patch b/0043-builder-Document-how-to-change-keyboard-layout.patch
similarity index 96%
rename from 0044-builder-Document-how-to-change-keyboard-layout.patch
rename to 0043-builder-Document-how-to-change-keyboard-layout.patch
index 59063d5..34fcf73 100644
--- a/0044-builder-Document-how-to-change-keyboard-layout.patch
+++ b/0043-builder-Document-how-to-change-keyboard-layout.patch
@@ -1,4 +1,4 @@
-From 742a5e9fa5efdc5ba406687690c0d68a39fa7d45 Mon Sep 17 00:00:00 2001
+From 724d233849fe146761fe46b2499cec3a4aa9b729 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 10 Jan 2014 14:21:17 +0000
Subject: [PATCH] builder: Document how to change keyboard layout.
@@ -14,7 +14,7 @@ using --run-command, --edit etc.
1 file changed, 40 insertions(+)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 3558119..7d91daf 100644
+index f98ffdb..fc6ad40 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -783,6 +783,46 @@ The above command will create an C<rjones> account with no password,
diff --git a/0045-builder-Add-link-option-for-creating-symbolic-links.patch b/0044-builder-Add-link-option-for-creating-symbolic-links.patch
similarity index 96%
rename from 0045-builder-Add-link-option-for-creating-symbolic-links.patch
rename to 0044-builder-Add-link-option-for-creating-symbolic-links.patch
index 44621ee..414f775 100644
--- a/0045-builder-Add-link-option-for-creating-symbolic-links.patch
+++ b/0044-builder-Add-link-option-for-creating-symbolic-links.patch
@@ -1,4 +1,4 @@
-From 7087b9287f9381af0e16b14bcedefaa9b2776f0a Mon Sep 17 00:00:00 2001
+From 0f91372e5e6c4a8428918264574ac9ae874b622b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 10 Jan 2014 21:18:07 +0000
Subject: [PATCH] builder: Add --link option for creating symbolic links.
@@ -14,10 +14,10 @@ This is useful for configuring systemd services.
4 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 90300a3..16ffa7a 100644
+index daf355c..6105c75 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -37,7 +37,8 @@ let main () =
+@@ -39,7 +39,8 @@ let main () =
(* Command line argument parsing - see cmdline.ml. *)
let mode, arg,
attach, cache, check_signature, curl, debug, delete, edit,
@@ -27,7 +27,7 @@ index 90300a3..16ffa7a 100644
network, output, password_crypto, quiet, root_password, scrub,
scrub_logfile, size, smp, sources, sync, timezone, update, upload,
writes =
-@@ -837,6 +838,16 @@ exec >>%s 2>&1
+@@ -839,6 +840,16 @@ exec >>%s 2>&1
g#rm_rf file
) delete;
@@ -106,7 +106,7 @@ index 8d2766a..47d20a4 100755
--firstboot-install "minicom,inkscape"
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 7d91daf..3405c62 100644
+index fc6ad40..0fd865f 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -24,6 +24,7 @@ virt-builder - Build virtual machine images quickly
diff --git a/0046-builder-Document-how-to-change-the-language-locale-o.patch b/0045-builder-Document-how-to-change-the-language-locale-o.patch
similarity index 94%
rename from 0046-builder-Document-how-to-change-the-language-locale-o.patch
rename to 0045-builder-Document-how-to-change-the-language-locale-o.patch
index cfc21c7..0336459 100644
--- a/0046-builder-Document-how-to-change-the-language-locale-o.patch
+++ b/0045-builder-Document-how-to-change-the-language-locale-o.patch
@@ -1,4 +1,4 @@
-From fd4138919f32d4cc0b9d3fa0007b8c327afff29a Mon Sep 17 00:00:00 2001
+From d1660ab9ac97a4b173ee1a9dc5ce55a4144a00ff Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 10 Jan 2014 19:48:28 +0000
Subject: [PATCH] builder: Document how to change the language/locale of a new
@@ -10,7 +10,7 @@ Subject: [PATCH] builder: Document how to change the language/locale of a new
1 file changed, 30 insertions(+)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 3405c62..6d1e25f 100644
+index 0fd865f..4a86fd1 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -831,6 +831,36 @@ I<--edit> options. For example:
diff --git a/0047-builder-Document-how-to-set-up-local-mirrors-for-per.patch b/0046-builder-Document-how-to-set-up-local-mirrors-for-per.patch
similarity index 96%
rename from 0047-builder-Document-how-to-set-up-local-mirrors-for-per.patch
rename to 0046-builder-Document-how-to-set-up-local-mirrors-for-per.patch
index 612524d..cd658ec 100644
--- a/0047-builder-Document-how-to-set-up-local-mirrors-for-per.patch
+++ b/0046-builder-Document-how-to-set-up-local-mirrors-for-per.patch
@@ -1,4 +1,4 @@
-From 9170c90b419162ba3c234d83cb679c3dba801152 Mon Sep 17 00:00:00 2001
+From bfa71840cebd0af88e727207268bf00cdf31dc5f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 10 Jan 2014 19:49:02 +0000
Subject: [PATCH] builder: Document how to set up local mirrors for performance
@@ -10,7 +10,7 @@ Subject: [PATCH] builder: Document how to set up local mirrors for performance
1 file changed, 49 insertions(+), 3 deletions(-)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 6d1e25f..2ee6db9 100644
+index 4a86fd1..e539f2d 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -1431,6 +1431,8 @@ The index is always encoded in UTF-8.
diff --git a/0048-builder-Document-how-to-set-Japanese-language-suppor.patch b/0047-builder-Document-how-to-set-Japanese-language-suppor.patch
similarity index 95%
rename from 0048-builder-Document-how-to-set-Japanese-language-suppor.patch
rename to 0047-builder-Document-how-to-set-Japanese-language-suppor.patch
index dd6a7b0..f706009 100644
--- a/0048-builder-Document-how-to-set-Japanese-language-suppor.patch
+++ b/0047-builder-Document-how-to-set-Japanese-language-suppor.patch
@@ -1,4 +1,4 @@
-From 1db9c09f74eea29cc7b23469b3c711ff623744c3 Mon Sep 17 00:00:00 2001
+From 91c1ec932cbf768145c902a4da520d33c727ba16 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sun, 12 Jan 2014 17:06:02 +0000
Subject: [PATCH] builder: Document how to set Japanese language support in
@@ -12,7 +12,7 @@ This updates/fixes commit 7e8ad13e863a5c87e3da47288bcecdb88ca0e4cb.
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 2ee6db9..4f57d20 100644
+index e539f2d..38e26a8 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -835,31 +835,27 @@ See L<https://wiki.debian.org/Keyboard>.
diff --git a/0049-builder-Fix-virt-builder-test.patch b/0048-builder-Fix-virt-builder-test.patch
similarity index 95%
rename from 0049-builder-Fix-virt-builder-test.patch
rename to 0048-builder-Fix-virt-builder-test.patch
index 7343de7..03df79a 100644
--- a/0049-builder-Fix-virt-builder-test.patch
+++ b/0048-builder-Fix-virt-builder-test.patch
@@ -1,4 +1,4 @@
-From 43de2c5184fbc73ea6e2a9c0f057044a6d841c4b Mon Sep 17 00:00:00 2001
+From b0c988b0d9cb0bc176a673ae96a0e717e58f2d5f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sun, 12 Jan 2014 17:49:48 +0000
Subject: [PATCH] builder: Fix virt-builder test.
diff --git a/0050-builder-Document-how-to-set-Japanese-in-Debian-7.patch b/0049-builder-Document-how-to-set-Japanese-in-Debian-7.patch
similarity index 94%
rename from 0050-builder-Document-how-to-set-Japanese-in-Debian-7.patch
rename to 0049-builder-Document-how-to-set-Japanese-in-Debian-7.patch
index ead863a..2553452 100644
--- a/0050-builder-Document-how-to-set-Japanese-in-Debian-7.patch
+++ b/0049-builder-Document-how-to-set-Japanese-in-Debian-7.patch
@@ -1,4 +1,4 @@
-From 510ff9fec3653b54663749adc1dd653f170ba328 Mon Sep 17 00:00:00 2001
+From 0124cc39c8c82e5862898503f8b3e3c591404bff Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 13 Jan 2014 16:19:51 +0000
Subject: [PATCH] builder: Document how to set Japanese in Debian 7.
@@ -9,7 +9,7 @@ Subject: [PATCH] builder: Document how to set Japanese in Debian 7.
1 file changed, 21 insertions(+)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 4f57d20..3972391 100644
+index 38e26a8..ec41078 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -857,6 +857,27 @@ This section contains examples for some common Linux distributions.
diff --git a/0051-builder-Add-no-delete-on-failure-option-to-aid-debug.patch b/0050-builder-Add-no-delete-on-failure-option-to-aid-debug.patch
similarity index 95%
rename from 0051-builder-Add-no-delete-on-failure-option-to-aid-debug.patch
rename to 0050-builder-Add-no-delete-on-failure-option-to-aid-debug.patch
index 93b475a..980650b 100644
--- a/0051-builder-Add-no-delete-on-failure-option-to-aid-debug.patch
+++ b/0050-builder-Add-no-delete-on-failure-option-to-aid-debug.patch
@@ -1,4 +1,4 @@
-From 274c1063ef59156570196b55e1549cbecf216c38 Mon Sep 17 00:00:00 2001
+From 1eb009accb06dde100b390ad1b1aaabf12fe9927 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 13 Jan 2014 20:29:50 +0000
Subject: [PATCH] builder: Add --no-delete-on-failure option to aid debugging.
@@ -14,10 +14,10 @@ or installing packages fails.
3 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 16ffa7a..0160818 100644
+index 6105c75..79f82a2 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -36,8 +36,8 @@ let prog = Filename.basename Sys.executable_name
+@@ -38,8 +38,8 @@ let () = Random.self_init ()
let main () =
(* Command line argument parsing - see cmdline.ml. *)
let mode, arg,
@@ -28,7 +28,7 @@ index 16ffa7a..0160818 100644
memsize, mkdirs,
network, output, password_crypto, quiet, root_password, scrub,
scrub_logfile, size, smp, sources, sync, timezone, update, upload,
-@@ -467,9 +467,10 @@ let main () =
+@@ -469,9 +469,10 @@ let main () =
);
(* Delete the output file before we finish. However don't delete it
@@ -83,7 +83,7 @@ index 58e8a6b..67b142a 100644
network, output, password_crypto, quiet, root_password, scrub,
scrub_logfile, size, smp, sources, sync, timezone, update, upload,
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 3972391..81db516 100644
+index ec41078..f3ddce5 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -250,6 +250,15 @@ See also: I<--upload>, I<--scrub>.
diff --git a/0052-builder-For-performance-recommend-using-the-no-sync-.patch b/0051-builder-For-performance-recommend-using-the-no-sync-.patch
similarity index 84%
rename from 0052-builder-For-performance-recommend-using-the-no-sync-.patch
rename to 0051-builder-For-performance-recommend-using-the-no-sync-.patch
index c72bd89..6f12ad3 100644
--- a/0052-builder-For-performance-recommend-using-the-no-sync-.patch
+++ b/0051-builder-For-performance-recommend-using-the-no-sync-.patch
@@ -1,4 +1,4 @@
-From caaed7ea75b82f89aec818bf000fe476febe118f Mon Sep 17 00:00:00 2001
+From c6648611837833375447812ff97e34ad3d78930a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 13 Jan 2014 20:42:48 +0000
Subject: [PATCH] builder: For performance, recommend using the --no-sync
@@ -10,10 +10,10 @@ Subject: [PATCH] builder: For performance, recommend using the --no-sync
1 file changed, 5 insertions(+)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 81db516..9cbfbab 100644
+index f3ddce5..0d9b33f 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
-@@ -1616,6 +1616,11 @@ downloaded once. You can also try using a local package repository,
+@@ -1634,6 +1634,11 @@ downloaded once. You can also try using a local package repository,
although this can be complex to set up and varies according to which
Linux distro you are trying to install.
diff --git a/0053-builder-planner-Whitespace-change.patch b/0052-builder-planner-Whitespace-change.patch
similarity index 96%
rename from 0053-builder-planner-Whitespace-change.patch
rename to 0052-builder-planner-Whitespace-change.patch
index 3eaedec..de00208 100644
--- a/0053-builder-planner-Whitespace-change.patch
+++ b/0052-builder-planner-Whitespace-change.patch
@@ -1,4 +1,4 @@
-From f1690a36e0bf84d1ed2f85c209d4b0fd6c25f1a2 Mon Sep 17 00:00:00 2001
+From bc6de5b386ff250b9f5f5f1d703e7493283514cd Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 13 Jan 2014 20:58:08 +0000
Subject: [PATCH] builder: planner: Whitespace change.
diff --git a/0054-daemon-xattr-simplify-the-enabling-of-the-linuxxattr.patch b/0053-daemon-xattr-simplify-the-enabling-of-the-linuxxattr.patch
similarity index 98%
rename from 0054-daemon-xattr-simplify-the-enabling-of-the-linuxxattr.patch
rename to 0053-daemon-xattr-simplify-the-enabling-of-the-linuxxattr.patch
index 1800f5a..70f7bb2 100644
--- a/0054-daemon-xattr-simplify-the-enabling-of-the-linuxxattr.patch
+++ b/0053-daemon-xattr-simplify-the-enabling-of-the-linuxxattr.patch
@@ -1,4 +1,4 @@
-From aa4b2af3d6b1936b2fdd37290a6db4262ed115d0 Mon Sep 17 00:00:00 2001
+From 4769fd8c53a4a95313125995b36f65cc80facfdf Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano at redhat.com>
Date: Thu, 9 Jan 2014 18:59:19 +0100
Subject: [PATCH] daemon: xattr: simplify the enabling of the linuxxattrs
diff --git a/0055-daemon-xattr-move-the-listxattrs-code-in-an-own-func.patch b/0054-daemon-xattr-move-the-listxattrs-code-in-an-own-func.patch
similarity index 97%
rename from 0055-daemon-xattr-move-the-listxattrs-code-in-an-own-func.patch
rename to 0054-daemon-xattr-move-the-listxattrs-code-in-an-own-func.patch
index 3980f02..8185244 100644
--- a/0055-daemon-xattr-move-the-listxattrs-code-in-an-own-func.patch
+++ b/0054-daemon-xattr-move-the-listxattrs-code-in-an-own-func.patch
@@ -1,4 +1,4 @@
-From 3451e68c1599bb3ebd9cfb2be37be81a3a6d7774 Mon Sep 17 00:00:00 2001
+From bc846d70f3eab0752c0c49de20751daa5bca613c Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano at redhat.com>
Date: Fri, 10 Jan 2014 15:10:03 +0100
Subject: [PATCH] daemon: xattr: move the listxattrs code in an own function
diff --git a/0056-daemon-xattr-Remove-unused-variable.patch b/0055-daemon-xattr-Remove-unused-variable.patch
similarity index 91%
rename from 0056-daemon-xattr-Remove-unused-variable.patch
rename to 0055-daemon-xattr-Remove-unused-variable.patch
index 31d57bc..3702152 100644
--- a/0056-daemon-xattr-Remove-unused-variable.patch
+++ b/0055-daemon-xattr-Remove-unused-variable.patch
@@ -1,4 +1,4 @@
-From 3c3659fe2fe5e26d0daaf1e414cbbdfa5ae3064f Mon Sep 17 00:00:00 2001
+From 0d17b0b51b8f290941cfd2d80a4239d99134439a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Fri, 10 Jan 2014 21:19:43 +0000
Subject: [PATCH] daemon: xattr: Remove unused variable.
diff --git a/0057-New-API-copy-attributes.patch b/0056-New-API-copy-attributes.patch
similarity index 98%
rename from 0057-New-API-copy-attributes.patch
rename to 0056-New-API-copy-attributes.patch
index 7571aa0..6ed996e 100644
--- a/0057-New-API-copy-attributes.patch
+++ b/0056-New-API-copy-attributes.patch
@@ -1,4 +1,4 @@
-From 338301295f0c6180edb7702882aab600d339ef4d Mon Sep 17 00:00:00 2001
+From fc9329fe2c788a799c598b9c6f90ba9aeaf60082 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano at redhat.com>
Date: Mon, 13 Jan 2014 14:41:28 +0100
Subject: [PATCH] New API: copy-attributes.
@@ -377,10 +377,10 @@ index 0000000..78bd817
+
+rm test.out
diff --git a/generator/actions.ml b/generator/actions.ml
-index df59f44..6ed3afb 100644
+index c53c15d..1733c97 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
-@@ -11647,6 +11647,44 @@ This function is used internally when setting up the appliance." };
+@@ -11656,6 +11656,44 @@ This function is used internally when setting up the appliance." };
This function is used internally when closing the appliance. Note
it's only called when ./configure --enable-valgrind-daemon is used." };
diff --git a/0058-Update-generated-files-for-new-copy-attributes-API.patch b/0057-Update-generated-files-for-new-copy-attributes-API.patch
similarity index 96%
rename from 0058-Update-generated-files-for-new-copy-attributes-API.patch
rename to 0057-Update-generated-files-for-new-copy-attributes-API.patch
index 63a5b31..6bddb2c 100644
--- a/0058-Update-generated-files-for-new-copy-attributes-API.patch
+++ b/0057-Update-generated-files-for-new-copy-attributes-API.patch
@@ -1,4 +1,4 @@
-From b8c496a666647bfdf2b0bc54979ef06363868e93 Mon Sep 17 00:00:00 2001
+From cf76b7508cdc742ce9bb0a00fde8baa59cda6245 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 13 Jan 2014 19:26:01 +0000
Subject: [PATCH] Update generated files for new copy-attributes API.
diff --git a/0059-fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch b/0058-fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch
similarity index 91%
rename from 0059-fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch
rename to 0058-fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch
index 1a1666f..841fd9a 100644
--- a/0059-fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch
+++ b/0058-fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch
@@ -1,4 +1,4 @@
-From 7f3351b6c9731b553dea09244b5b0197268c0ae1 Mon Sep 17 00:00:00 2001
+From 29a1bf446af1d85ac0b55697ea3bd34b2790e964 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 13 Jan 2014 22:10:39 +0000
Subject: [PATCH] fish: Add test-file-attrs.sh to EXTRA_DIST.
diff --git a/0060-builder-edit-fish-use-copy-attributes.patch b/0059-builder-edit-fish-use-copy-attributes.patch
similarity index 94%
rename from 0060-builder-edit-fish-use-copy-attributes.patch
rename to 0059-builder-edit-fish-use-copy-attributes.patch
index 23c94c9..df2f5a4 100644
--- a/0060-builder-edit-fish-use-copy-attributes.patch
+++ b/0059-builder-edit-fish-use-copy-attributes.patch
@@ -1,4 +1,4 @@
-From ef90768b6c036885d2e572bf7ea7508512bd62a5 Mon Sep 17 00:00:00 2001
+From 420c70b64d289260b9707b37141d11f5f0e61bce Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano at redhat.com>
Date: Tue, 14 Jan 2014 11:08:25 +0100
Subject: [PATCH] builder, edit, fish: use copy-attributes
@@ -8,55 +8,11 @@ attributes from a file to the new version of it.
(cherry picked from commit b7bb1f6cee19da143996c13e6cc019a039f3ee4f)
---
- builder/perl_edit.ml | 29 +---------------------------
- edit/edit.c | 49 ++---------------------------------------------
- fish/edit.c | 54 ++--------------------------------------------------
+ edit/edit.c | 49 ++-----------------------------------------------
+ fish/edit.c | 54 ++----------------------------------------------------
+ mllib/perl_edit.ml | 29 +----------------------------
3 files changed, 5 insertions(+), 127 deletions(-)
-diff --git a/builder/perl_edit.ml b/builder/perl_edit.ml
-index aa4c2e6..28e5dea 100644
---- a/builder/perl_edit.ml
-+++ b/builder/perl_edit.ml
-@@ -42,7 +42,7 @@ let rec edit_file ~debug (g : Guestfs.guestfs) file expr =
- g#upload tmpfile file;
-
- (* However like virt-edit we do need to copy attributes. *)
-- copy_attributes g file_old file;
-+ g#copy_attributes ~all:true file_old file;
- g#rm file_old
-
- and do_perl_edit ~debug g file expr =
-@@ -76,30 +76,3 @@ and do_perl_edit ~debug g file expr =
- );
-
- Unix.rename (file ^ ".out") file
--
--and copy_attributes g src dest =
-- let has_linuxxattrs = g#feature_available [|"linuxxattrs"|] in
--
-- (* Get the mode. *)
-- let stat = g#stat src in
--
-- (* Get the SELinux context. XXX Should we copy over other extended
-- * attributes too?
-- *)
-- let selinux_context =
-- if has_linuxxattrs then (
-- try Some (g#getxattr src "security.selinux") with _ -> None
-- ) else None in
--
-- (* Set the permissions (inc. sticky and set*id bits), UID, GID. *)
-- let mode = Int64.to_int stat.G.mode
-- and uid = Int64.to_int stat.G.uid and gid = Int64.to_int stat.G.gid in
-- g#chmod (mode land 0o7777) dest;
-- g#chown uid gid dest;
--
-- (* Set the SELinux context. *)
-- match selinux_context with
-- | None -> ()
-- | Some selinux_context ->
-- g#setxattr "security.selinux"
-- selinux_context (String.length selinux_context) dest
diff --git a/edit/edit.c b/edit/edit.c
index e5e3a29..07790be 100644
--- a/edit/edit.c
@@ -207,6 +163,50 @@ index 754a34a..bd02f4b 100644
-
- return 0;
-}
+diff --git a/mllib/perl_edit.ml b/mllib/perl_edit.ml
+index aa4c2e6..28e5dea 100644
+--- a/mllib/perl_edit.ml
++++ b/mllib/perl_edit.ml
+@@ -42,7 +42,7 @@ let rec edit_file ~debug (g : Guestfs.guestfs) file expr =
+ g#upload tmpfile file;
+
+ (* However like virt-edit we do need to copy attributes. *)
+- copy_attributes g file_old file;
++ g#copy_attributes ~all:true file_old file;
+ g#rm file_old
+
+ and do_perl_edit ~debug g file expr =
+@@ -76,30 +76,3 @@ and do_perl_edit ~debug g file expr =
+ );
+
+ Unix.rename (file ^ ".out") file
+-
+-and copy_attributes g src dest =
+- let has_linuxxattrs = g#feature_available [|"linuxxattrs"|] in
+-
+- (* Get the mode. *)
+- let stat = g#stat src in
+-
+- (* Get the SELinux context. XXX Should we copy over other extended
+- * attributes too?
+- *)
+- let selinux_context =
+- if has_linuxxattrs then (
+- try Some (g#getxattr src "security.selinux") with _ -> None
+- ) else None in
+-
+- (* Set the permissions (inc. sticky and set*id bits), UID, GID. *)
+- let mode = Int64.to_int stat.G.mode
+- and uid = Int64.to_int stat.G.uid and gid = Int64.to_int stat.G.gid in
+- g#chmod (mode land 0o7777) dest;
+- g#chown uid gid dest;
+-
+- (* Set the SELinux context. *)
+- match selinux_context with
+- | None -> ()
+- | Some selinux_context ->
+- g#setxattr "security.selinux"
+- selinux_context (String.length selinux_context) dest
--
1.8.4.2
diff --git a/0061-builder-test-virt-builder-check-some-results.patch b/0060-builder-test-virt-builder-check-some-results.patch
similarity index 96%
rename from 0061-builder-test-virt-builder-check-some-results.patch
rename to 0060-builder-test-virt-builder-check-some-results.patch
index 9926749..51a2909 100644
--- a/0061-builder-test-virt-builder-check-some-results.patch
+++ b/0060-builder-test-virt-builder-check-some-results.patch
@@ -1,4 +1,4 @@
-From 10e2bc794e15a8d64d06e0fe79cc2a7b94d7c44a Mon Sep 17 00:00:00 2001
+From f3a0124fe2cc47c7ae3a0b40fc77de2a7203566e Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano at redhat.com>
Date: Tue, 14 Jan 2014 13:30:19 +0100
Subject: [PATCH] builder: test-virt-builder: check some results
diff --git a/0062-builder-small-refactor-of-the-list-output.patch b/0061-builder-small-refactor-of-the-list-output.patch
similarity index 97%
rename from 0062-builder-small-refactor-of-the-list-output.patch
rename to 0061-builder-small-refactor-of-the-list-output.patch
index ddb8c83..08ba66e 100644
--- a/0062-builder-small-refactor-of-the-list-output.patch
+++ b/0061-builder-small-refactor-of-the-list-output.patch
@@ -1,4 +1,4 @@
-From 5948434bbf95ed9f39aac705c9898f55d9294806 Mon Sep 17 00:00:00 2001
+From ef99a7924470caba8732cddd66ea1276214e341f Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano at redhat.com>
Date: Thu, 16 Jan 2014 11:49:05 +0100
Subject: [PATCH] builder: small refactor of the list output
@@ -16,10 +16,10 @@ function for easier maintaineance.
4 files changed, 54 insertions(+), 43 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
-index 0160818..0aaa287 100644
+index 79f82a2..7e1c614 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
-@@ -37,7 +37,7 @@ let main () =
+@@ -39,7 +39,7 @@ let main () =
(* Command line argument parsing - see cmdline.ml. *)
let mode, arg,
attach, cache, check_signature, curl, debug, delete, delete_on_failure,
@@ -28,7 +28,7 @@ index 0160818..0aaa287 100644
memsize, mkdirs,
network, output, password_crypto, quiet, root_password, scrub,
scrub_logfile, size, smp, sources, sync, timezone, update, upload,
-@@ -148,7 +148,7 @@ let main () =
+@@ -150,7 +150,7 @@ let main () =
let mode =
match mode with
| `List -> (* --list *)
diff --git a/0063-builder-add-list-format.patch b/0062-builder-add-list-format.patch
similarity index 97%
rename from 0063-builder-add-list-format.patch
rename to 0062-builder-add-list-format.patch
index 6c5ea43..deb8f73 100644
--- a/0063-builder-add-list-format.patch
+++ b/0062-builder-add-list-format.patch
@@ -1,4 +1,4 @@
-From 2067ada4285db0b22d5532681ab0d7f8c6f78af0 Mon Sep 17 00:00:00 2001
+From c02010a83a875aba61027c334daca9bd2957c763 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano at redhat.com>
Date: Thu, 16 Jan 2014 12:34:48 +0100
Subject: [PATCH] builder: add --list-format
@@ -42,7 +42,7 @@ index f199f03..6d6439f 100644
"--long-options", Arg.Unit display_long_options, " " ^ s_"List long options";
"-m", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size";
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 9cbfbab..05abcc6 100644
+index 0d9b33f..8e60d30 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -31,7 +31,7 @@ virt-builder - Build virtual machine images quickly
diff --git a/0064-builder-add-a-JSON-output-for-list.patch b/0063-builder-add-a-JSON-output-for-list.patch
similarity index 98%
rename from 0064-builder-add-a-JSON-output-for-list.patch
rename to 0063-builder-add-a-JSON-output-for-list.patch
index e00e590..bb4bc5c 100644
--- a/0064-builder-add-a-JSON-output-for-list.patch
+++ b/0063-builder-add-a-JSON-output-for-list.patch
@@ -1,4 +1,4 @@
-From 1ae52065ca3d8415ea81278224b04269e4221dab Mon Sep 17 00:00:00 2001
+From d0c8b9952c4d279475611926f4f1d07448f65ec5 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano at redhat.com>
Date: Thu, 16 Jan 2014 14:58:25 +0100
Subject: [PATCH] builder: add a JSON output for --list
@@ -198,7 +198,7 @@ index 083c035..c3b791f 100755
+ exit 1
+fi
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index 05abcc6..ded045b 100644
+index 8e60d30..6f835ed 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -31,7 +31,7 @@ virt-builder - Build virtual machine images quickly
diff --git a/0065-builder-Fix-unterminated-I-.-in-man-page.patch b/0064-builder-Fix-unterminated-I-.-in-man-page.patch
similarity index 87%
rename from 0065-builder-Fix-unterminated-I-.-in-man-page.patch
rename to 0064-builder-Fix-unterminated-I-.-in-man-page.patch
index 7cfc8a8..07505c3 100644
--- a/0065-builder-Fix-unterminated-I-.-in-man-page.patch
+++ b/0064-builder-Fix-unterminated-I-.-in-man-page.patch
@@ -1,4 +1,4 @@
-From 504bc13a693fd95fb2b97f18f4a6400250216145 Mon Sep 17 00:00:00 2001
+From 41c857fb7672379d7036cf73e4de9808a900bc22 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Thu, 16 Jan 2014 18:01:20 +0000
Subject: [PATCH] builder: Fix unterminated I<...> in man page.
@@ -10,7 +10,7 @@ Thanks: Lukas Zapletal.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
-index ded045b..9e433e4 100644
+index 6f835ed..918f372 100644
--- a/builder/virt-builder.pod
+++ b/builder/virt-builder.pod
@@ -1012,7 +1012,7 @@ Files are deleted (I<--delete>, I<--scrub>).
diff --git a/0065-builder-add-index-struct.h-as-dependency-for-index-p.patch b/0065-builder-add-index-struct.h-as-dependency-for-index-p.patch
new file mode 100644
index 0000000..8bd1f80
--- /dev/null
+++ b/0065-builder-add-index-struct.h-as-dependency-for-index-p.patch
@@ -0,0 +1,31 @@
+From 3d05b9c7d85f58b03a3949951be3a885a459129b Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Tue, 21 Jan 2014 10:54:19 +0100
+Subject: [PATCH] builder: add index-struct.h as dependency for
+ index-parser-c.c
+
+Just like with index-parse.h, also index-struct.h is a dependency of
+index-parser-c.c which automake cannot generate correctly.
+Thus, add it manually.
+
+(cherry picked from commit e2cc8b6465a400024fe2f0fcce0d0ff5f7e7719c)
+---
+ builder/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builder/Makefile.am b/builder/Makefile.am
+index d718c22..4777619 100644
+--- a/builder/Makefile.am
++++ b/builder/Makefile.am
+@@ -229,7 +229,7 @@ CLEANFILES += \
+
+ # Fix dependencies which automake doesn't generate correctly.
+ if HAVE_OCAML
+-index-parser-c.o: index-parse.h
++index-parser-c.o: index-parse.h index-struct.h
+ index-scan.o: index-parse.h
+ endif
+ index-validate.o: index-parse.h
+--
+1.8.4.2
+
diff --git a/0066-builder-allow-more-empty-lines-in-index-files.patch b/0066-builder-allow-more-empty-lines-in-index-files.patch
new file mode 100644
index 0000000..01cf117
--- /dev/null
+++ b/0066-builder-allow-more-empty-lines-in-index-files.patch
@@ -0,0 +1,48 @@
+From 773d8f3738d189bd710ff2c11976e913f870364d Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Tue, 21 Jan 2014 17:54:23 +0100
+Subject: [PATCH] builder: allow more empty lines in index files
+
+Improve the index grammar to allow more than one empty line between
+sections, and to allow any number of empty lines at the end of the file
+(after the last section).
+
+(cherry picked from commit 4505f61979a9737da53cdad419ae6d22538780d5)
+---
+ builder/index-parse.y | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/builder/index-parse.y b/builder/index-parse.y
+index f5e551b..a8d2f62 100644
+--- a/builder/index-parse.y
++++ b/builder/index-parse.y
+@@ -80,10 +80,10 @@ index:
+ { parsed_index = $2; }
+
+ sections:
+- section
++ section emptylines
+ { $$ = $1; }
+- | section EMPTY_LINE sections
+- { $$ = $1; $$->next = $3; }
++ | section EMPTY_LINE emptylines sections
++ { $$ = $1; $$->next = $4; }
+
+ section:
+ SECTION_HEADER fields
+@@ -113,6 +113,12 @@ continuations:
+ free ($1);
+ free ($2); }
+
++emptylines:
++ /* empty */
++ {}
++ | EMPTY_LINE emptylines
++ {}
++
+ %%
+
+ void
+--
+1.8.4.2
+
diff --git a/0067-builder-proper-consider-subkeys-in-index-files.patch b/0067-builder-proper-consider-subkeys-in-index-files.patch
new file mode 100644
index 0000000..ea51a00
--- /dev/null
+++ b/0067-builder-proper-consider-subkeys-in-index-files.patch
@@ -0,0 +1,214 @@
+From 7685b022e3fb49c69c8222950462ad4165d18133 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Tue, 21 Jan 2014 18:52:42 +0100
+Subject: [PATCH] builder: proper consider subkeys in index files
+
+The index files already allowed the 'key[subkey]=...' syntax for keys,
+but considering such string as whole key. Proper split the parsing and
+the handling of the subkeys, so they can be searched a bit easier.
+
+This causes no actual behaviour changes, it is just internal
+micro-refactoring. (Thanks Rich for the hints, too.)
+
+(cherry picked from commit 5cbdf35d651b6c730d62d9af4876039faa122efc)
+---
+ builder/index-parser-c.c | 15 +++++++++++----
+ builder/index-scan.l | 9 ++++++++-
+ builder/index-struct.c | 1 +
+ builder/index-struct.h | 1 +
+ builder/index_parser.ml | 44 +++++++++++++++++++++++++-------------------
+ 5 files changed, 46 insertions(+), 24 deletions(-)
+
+diff --git a/builder/index-parser-c.c b/builder/index-parser-c.c
+index 17e680b..fbbebff 100644
+--- a/builder/index-parser-c.c
++++ b/builder/index-parser-c.c
+@@ -49,7 +49,7 @@ value
+ virt_builder_parse_index (value filenamev)
+ {
+ CAMLparam1 (filenamev);
+- CAMLlocal4 (rv, v, sv, fv);
++ CAMLlocal5 (rv, v, sv, sv2, fv);
+ struct section *sections;
+ size_t i, nr_sections;
+
+@@ -83,11 +83,18 @@ virt_builder_parse_index (value filenamev)
+
+ for (j = 0, fields = sections->fields; fields != NULL;
+ j++, fields = fields->next) {
+- v = caml_alloc_tuple (2);
++ v = caml_alloc_tuple (3);
+ sv = caml_copy_string (fields->key);
+- Store_field (v, 0, sv); /* (key, value) */
+- sv = caml_copy_string (fields->value);
++ Store_field (v, 0, sv); /* (key, Some subkey, value) */
++ if (fields->subkey) {
++ sv2 = caml_copy_string (fields->subkey);
++ sv = caml_alloc (1, 0);
++ Store_field (sv, 0, sv2);
++ } else
++ sv = Val_int (0);
+ Store_field (v, 1, sv);
++ sv = caml_copy_string (fields->value);
++ Store_field (v, 2, sv);
+ Store_field (fv, j, v); /* assign to return array of fields */
+ }
+
+diff --git a/builder/index-scan.l b/builder/index-scan.l
+index 9a6a0e3..7a9618f 100644
+--- a/builder/index-scan.l
++++ b/builder/index-scan.l
+@@ -58,10 +58,17 @@ extern void yyerror (const char *);
+
+ /* field=value or field[subfield]=value */
+ ^[A-Za-z0-9_.]+("["[A-Za-z0-9_,.]+"]")?"=".*\n {
+- size_t i = strcspn (yytext, "=");
++ size_t i = strcspn (yytext, "=[");
+ yylval.field = malloc (sizeof (struct field));
+ yylval.field->next = NULL;
+ yylval.field->key = strndup (yytext, i);
++ if (yytext[i] == '[') {
++ size_t j = strcspn (yytext+i+1, "]");
++ yylval.field->subkey = strndup (yytext+i+1, j);
++ i += 1+j+2;
++ } else {
++ yylval.field->subkey = NULL;
++ }
+ /* Note we chop the final \n off here. */
+ yylval.field->value = strndup (yytext+i+1, yyleng-(i+2));
+ return FIELD;
+diff --git a/builder/index-struct.c b/builder/index-struct.c
+index 26bed24..fe5b0e3 100644
+--- a/builder/index-struct.c
++++ b/builder/index-struct.c
+@@ -52,6 +52,7 @@ free_field (struct field *field)
+ if (field) {
+ free_field (field->next);
+ free (field->key);
++ free (field->subkey);
+ free (field->value);
+ free (field);
+ }
+diff --git a/builder/index-struct.h b/builder/index-struct.h
+index ac8a3dd..f92e01d 100644
+--- a/builder/index-struct.h
++++ b/builder/index-struct.h
+@@ -32,6 +32,7 @@ struct section {
+ struct field {
+ struct field *next;
+ char *key;
++ char *subkey;
+ char *value;
+ };
+
+diff --git a/builder/index_parser.ml b/builder/index_parser.ml
+index 453a3a1..da44b21 100644
+--- a/builder/index_parser.ml
++++ b/builder/index_parser.ml
+@@ -101,7 +101,7 @@ let print_entry chan (name, { printable_name = printable_name;
+ type sections = section array
+ and section = string * fields (* [name] + fields *)
+ and fields = field array
+-and field = string * string (* key + value *)
++and field = string * string option * string (* key + subkey + value *)
+
+ (* Calls yyparse in the C code. *)
+ external parse_index : string -> sections = "virt_builder_parse_index"
+@@ -149,12 +149,17 @@ let get_index ~prog ~debug ~downloader ~sigchecker source =
+ fun (n, fields) ->
+ let fseen = Hashtbl.create 13 in
+ List.iter (
+- fun (field, _) ->
+- if Hashtbl.mem fseen field then (
+- eprintf (f_"virt-builder: index is corrupt: %s: field '%s' appears two or more times\n") n field;
++ fun (field, subkey, _) ->
++ let hashkey = (field, subkey) in
++ if Hashtbl.mem fseen hashkey then (
++ (match subkey with
++ | Some value ->
++ eprintf (f_"virt-builder: index is corrupt: %s: field '%s[%s]' appears two or more times\n") n field value
++ | None ->
++ eprintf (f_"virt-builder: index is corrupt: %s: field '%s' appears two or more times\n") n field);
+ corrupt_file ()
+ );
+- Hashtbl.add fseen field true
++ Hashtbl.add fseen hashkey true
+ ) fields
+ ) sections;
+
+@@ -162,25 +167,26 @@ let get_index ~prog ~debug ~downloader ~sigchecker source =
+ let entries =
+ List.map (
+ fun (n, fields) ->
++ let fields = List.map (fun (k, sk, v) -> (k, sk), v) fields in
+ let printable_name =
+- try Some (List.assoc "name" fields) with Not_found -> None in
++ try Some (List.assoc ("name", None) fields) with Not_found -> None in
+ let osinfo =
+- try Some (List.assoc "osinfo" fields) with Not_found -> None in
++ try Some (List.assoc ("osinfo", None) fields) with Not_found -> None in
+ let file_uri =
+- try make_absolute_uri (List.assoc "file" fields)
++ try make_absolute_uri (List.assoc ("file", None) fields)
+ with Not_found ->
+ eprintf (f_"virt-builder: no 'file' (URI) entry for '%s'\n") n;
+ corrupt_file () in
+ let signature_uri =
+- try Some (make_absolute_uri (List.assoc "sig" fields))
++ try Some (make_absolute_uri (List.assoc ("sig", None) fields))
+ with Not_found -> None in
+ let checksum_sha512 =
+- try Some (List.assoc "checksum[sha512]" fields)
++ try Some (List.assoc ("checksum", Some "sha512") fields)
+ with Not_found ->
+- try Some (List.assoc "checksum" fields)
++ try Some (List.assoc ("checksum", None) fields)
+ with Not_found -> None in
+ let revision =
+- try int_of_string (List.assoc "revision" fields)
++ try int_of_string (List.assoc ("revision", None) fields)
+ with
+ | Not_found -> 1
+ | Failure "int_of_string" ->
+@@ -188,9 +194,9 @@ let get_index ~prog ~debug ~downloader ~sigchecker source =
+ n;
+ corrupt_file () in
+ let format =
+- try Some (List.assoc "format" fields) with Not_found -> None in
++ try Some (List.assoc ("format", None) fields) with Not_found -> None in
+ let size =
+- try Int64.of_string (List.assoc "size" fields)
++ try Int64.of_string (List.assoc ("size", None) fields)
+ with
+ | Not_found ->
+ eprintf (f_"virt-builder: no 'size' field for '%s'\n") n;
+@@ -200,7 +206,7 @@ let get_index ~prog ~debug ~downloader ~sigchecker source =
+ n;
+ corrupt_file () in
+ let compressed_size =
+- try Some (Int64.of_string (List.assoc "compressed_size" fields))
++ try Some (Int64.of_string (List.assoc ("compressed_size", None) fields))
+ with
+ | Not_found ->
+ None
+@@ -209,13 +215,13 @@ let get_index ~prog ~debug ~downloader ~sigchecker source =
+ n;
+ corrupt_file () in
+ let expand =
+- try Some (List.assoc "expand" fields) with Not_found -> None in
++ try Some (List.assoc ("expand", None) fields) with Not_found -> None in
+ let lvexpand =
+- try Some (List.assoc "lvexpand" fields) with Not_found -> None in
++ try Some (List.assoc ("lvexpand", None) fields) with Not_found -> None in
+ let notes =
+- try Some (List.assoc "notes" fields) with Not_found -> None in
++ try Some (List.assoc ("notes", None) fields) with Not_found -> None in
+ let hidden =
+- try bool_of_string (List.assoc "hidden" fields)
++ try bool_of_string (List.assoc ("hidden", None) fields)
+ with
+ | Not_found -> false
+ | Failure "bool_of_string" ->
+--
+1.8.4.2
+
diff --git a/0068-builder-fix-small-regression-in-subkey-parsing.patch b/0068-builder-fix-small-regression-in-subkey-parsing.patch
new file mode 100644
index 0000000..4bb3375
--- /dev/null
+++ b/0068-builder-fix-small-regression-in-subkey-parsing.patch
@@ -0,0 +1,29 @@
+From 614ff644efc8d0e6a3da04663d4581fbf1c42f26 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Wed, 22 Jan 2014 15:34:22 +0100
+Subject: [PATCH] builder: fix small regression in subkey parsing
+
+Introduced in 5cbdf35d651b6c730d62d9af4876039faa122efc, it caused the
+first character of the value to be skipped if the key has a subkey.
+
+(cherry picked from commit 9e4357ca54282c1ab053dd5a8ebd64a323830cf4)
+---
+ builder/index-scan.l | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builder/index-scan.l b/builder/index-scan.l
+index 7a9618f..e43f82e 100644
+--- a/builder/index-scan.l
++++ b/builder/index-scan.l
+@@ -65,7 +65,7 @@ extern void yyerror (const char *);
+ if (yytext[i] == '[') {
+ size_t j = strcspn (yytext+i+1, "]");
+ yylval.field->subkey = strndup (yytext+i+1, j);
+- i += 1+j+2;
++ i += 1+j+1;
+ } else {
+ yylval.field->subkey = NULL;
+ }
+--
+1.8.4.2
+
diff --git a/0069-builder-small-code-simplification.patch b/0069-builder-small-code-simplification.patch
new file mode 100644
index 0000000..45b351e
--- /dev/null
+++ b/0069-builder-small-code-simplification.patch
@@ -0,0 +1,35 @@
+From 5e42538ac42393be1a161b7eca158d4256422067 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Wed, 22 Jan 2014 23:13:24 +0100
+Subject: [PATCH] builder: small code simplification
+
+No actual behaviour changes, just remove extra match statements.
+
+(cherry picked from commit 958e84d69960faf5b321bdec92283a0b37abd858)
+---
+ builder/list_entries.ml | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/builder/list_entries.ml b/builder/list_entries.ml
+index 7369e6c..9da7664 100644
+--- a/builder/list_entries.ml
++++ b/builder/list_entries.ml
+@@ -98,13 +98,11 @@ and list_entries_json ~sources index =
+ | c -> String.make 1 c)
+ done;
+ !res in
+- let json_optional_printf_string key value =
+- match value with
++ let json_optional_printf_string key = function
+ | None -> ()
+ | Some str ->
+ printf " \"%s\": \"%s\",\n" key (json_string_escape str) in
+- let json_optional_printf_int64 key value =
+- match value with
++ let json_optional_printf_int64 key = function
+ | None -> ()
+ | Some n ->
+ printf " \"%s\": \"%Ld\",\n" key n in
+--
+1.8.4.2
+
diff --git a/0070-builder-read-all-the-available-notes-from-the-index.patch b/0070-builder-read-all-the-available-notes-from-the-index.patch
new file mode 100644
index 0000000..bc190e3
--- /dev/null
+++ b/0070-builder-read-all-the-available-notes-from-the-index.patch
@@ -0,0 +1,136 @@
+From 017d19ea51dc47d7539f4d68ee823049f7687a3c Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Thu, 23 Jan 2014 15:36:15 +0100
+Subject: [PATCH] builder: read all the available notes from the index
+
+Switch the internal storage for the notes of each entry to a sorted list
+with all the subkeys available (which should represent the translations
+to various languages).
+The current outputs are the same (i.e. still the untranslated notes), so
+this is just internal refactoring/preparation.
+
+(cherry picked from commit b7cd63fc1dc031914e110a46de3faa431387d959)
+---
+ builder/builder.ml | 5 +++--
+ builder/index_parser.ml | 20 ++++++++++++++++----
+ builder/index_parser.mli | 2 +-
+ builder/list_entries.ml | 12 +++++++++---
+ 4 files changed, 29 insertions(+), 10 deletions(-)
+
+diff --git a/builder/builder.ml b/builder/builder.ml
+index 7e1c614..c0dc06d 100644
+--- a/builder/builder.ml
++++ b/builder/builder.ml
+@@ -202,9 +202,10 @@ let main () =
+ (match mode with
+ | `Notes -> (* --notes *)
+ (match entry with
+- | { Index_parser.notes = Some notes } ->
++ | { Index_parser.notes = ("", notes) :: _ } ->
+ print_endline notes;
+- | { Index_parser.notes = None } ->
++ | { Index_parser.notes = _ :: _ }
++ | { Index_parser.notes = [] } ->
+ printf (f_"There are no notes for %s\n") arg
+ );
+ exit 0
+diff --git a/builder/index_parser.ml b/builder/index_parser.ml
+index da44b21..d5b48ae 100644
+--- a/builder/index_parser.ml
++++ b/builder/index_parser.ml
+@@ -35,7 +35,7 @@ and entry = {
+ compressed_size : int64 option;
+ expand : string option;
+ lvexpand : string option;
+- notes : string option;
++ notes : (string * string) list;
+ hidden : bool;
+
+ sigchecker : Sigchecker.t;
+@@ -92,8 +92,9 @@ let print_entry chan (name, { printable_name = printable_name;
+ | Some lvexpand -> fp "lvexpand=%s\n" lvexpand
+ );
+ (match notes with
+- | None -> ()
+- | Some notes -> fp "notes=%s\n" notes
++ | ("", notes) :: _ -> fp "notes=%s\n" notes
++ | _ :: _
++ | [] -> ()
+ );
+ if hidden then fp "hidden=true\n"
+
+@@ -219,7 +220,18 @@ let get_index ~prog ~debug ~downloader ~sigchecker source =
+ let lvexpand =
+ try Some (List.assoc ("lvexpand", None) fields) with Not_found -> None in
+ let notes =
+- try Some (List.assoc ("notes", None) fields) with Not_found -> None in
++ let rec loop = function
++ | [] -> []
++ | (("notes", subkey), value) :: xs ->
++ let subkey = match subkey with
++ | None -> ""
++ | Some v -> v in
++ (subkey, value) :: loop xs
++ | _ :: xs -> loop xs in
++ List.sort (
++ fun (k1, _) (k2, _) ->
++ String.compare k1 k2
++ ) (loop fields) in
+ let hidden =
+ try bool_of_string (List.assoc ("hidden", None) fields)
+ with
+diff --git a/builder/index_parser.mli b/builder/index_parser.mli
+index 54f1807..3c679b3 100644
+--- a/builder/index_parser.mli
++++ b/builder/index_parser.mli
+@@ -29,7 +29,7 @@ and entry = {
+ compressed_size : int64 option;
+ expand : string option;
+ lvexpand : string option;
+- notes : string option;
++ notes : (string * string) list;
+ hidden : bool;
+
+ sigchecker : Sigchecker.t;
+diff --git a/builder/list_entries.ml b/builder/list_entries.ml
+index 9da7664..b947cc8 100644
+--- a/builder/list_entries.ml
++++ b/builder/list_entries.ml
+@@ -71,10 +71,11 @@ and list_entries_long ~sources index =
+ printf "%-24s %s\n" (s_"Download size:") (human_size size);
+ );
+ (match notes with
+- | None -> ()
+- | Some notes ->
++ | ("", notes) :: _ ->
+ printf "\n";
+ printf (f_"Notes:\n\n%s\n") notes
++ | _ :: _
++ | [] -> ()
+ );
+ printf "\n"
+ )
+@@ -106,6 +107,11 @@ and list_entries_json ~sources index =
+ | None -> ()
+ | Some n ->
+ printf " \"%s\": \"%Ld\",\n" key n in
++ let print_notes = function
++ | ("", notes) :: _ ->
++ printf " \"notes\": \"%s\",\n" (json_string_escape notes)
++ | _ :: _
++ | _ -> () in
+
+ printf "{\n";
+ printf " \"version\": %d,\n" 1;
+@@ -130,7 +136,7 @@ and list_entries_json ~sources index =
+ json_optional_printf_string "full-name" printable_name;
+ printf " \"size\": %Ld,\n" size;
+ json_optional_printf_int64 "compressed-size" compressed_size;
+- json_optional_printf_string "notes" notes;
++ print_notes notes;
+ printf " \"hidden\": %s\n" (json_string_of_bool hidden);
+ printf " }%s\n" (trailing_comma i (List.length index))
+ ) index;
+--
+1.8.4.2
+
diff --git a/0071-builder-Add-selinux-relabel-option-to-perform-SELinu.patch b/0071-builder-Add-selinux-relabel-option-to-perform-SELinu.patch
new file mode 100644
index 0000000..ad2d69a
--- /dev/null
+++ b/0071-builder-Add-selinux-relabel-option-to-perform-SELinu.patch
@@ -0,0 +1,251 @@
+From e3e211cd14cecf1b54205a03f04ac311f8ce1b5f Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Fri, 24 Jan 2014 19:38:26 +0000
+Subject: [PATCH] builder: Add --selinux-relabel option to perform SELinux
+ relabelling.
+
+This adds the --selinux-relabel option which enables selinux in the
+appliance and runs:
+
+ if load_policy && fixfiles restore; then
+ rm -f /.autorelabel
+ else
+ touch /.autorelabel
+ fi
+
+at the end of installation.
+
+When possible this fixes SELinux labels in the guest and makes the
+autorelabel step unnecessary.
+
+Notes:
+
+ - The previous commit is required so that load_policy works.
+
+ - During the build, SELinux is enabled but no policy is loaded. This
+ works because SELinux is in permissive mode.
+
+ - This flag does not work if the appliance kernel and the guest have
+ greatly differing versions, eg. a RHEL 6 guest with a Fedora 20
+ appliance. This is because SELinux changes the policy format and
+ breaks backwards compatibility. You would see errors like this:
+
+ libsepol.policydb_write: policy version 15 cannot support MLS
+ libsepol.policydb_to_image: could not compute policy length
+ libsepol.policydb_to_image: could not create policy image
+ SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.24, searching for an older version.
+ SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.24: No such file or directory
+
+ These errors are ignored (they go to the log file) and relabelling
+ is done at boot instead.
+
+ - It's not clear if loading guest policy is safe. You should trust
+ the virt-builder templates and to use libguestfs confinement for
+ additional protection.
+
+(cherry picked from commit 90e23b4e566f88595ac697b45d2531de851be6df)
+---
+ builder/builder.ml | 19 +++++++++++--
+ builder/cmdline.ml | 8 ++++--
+ builder/virt-builder.pod | 69 +++++++++++++++++++++++++++++++-----------------
+ 3 files changed, 68 insertions(+), 28 deletions(-)
+
+diff --git a/builder/builder.ml b/builder/builder.ml
+index c0dc06d..b43bc4f 100644
+--- a/builder/builder.ml
++++ b/builder/builder.ml
+@@ -42,8 +42,8 @@ let main () =
+ edit, firstboot, run, format, gpg, hostname, install, list_format, links,
+ memsize, mkdirs,
+ network, output, password_crypto, quiet, root_password, scrub,
+- scrub_logfile, size, smp, sources, sync, timezone, update, upload,
+- writes =
++ scrub_logfile, selinux_relabel, size, smp, sources, sync, timezone,
++ update, upload, writes =
+ parse_cmdline () in
+
+ (* Timestamped messages in ordinary, non-debug non-quiet mode. *)
+@@ -580,6 +580,8 @@ let main () =
+ (match smp with None -> () | Some smp -> g#set_smp smp);
+ g#set_network network;
+
++ g#set_selinux selinux_relabel;
++
+ (* The output disk is being created, so use cache=unsafe here. *)
+ g#add_drive_opts ~format:output_format ~cachemode:"unsafe" output_filename;
+
+@@ -892,6 +894,19 @@ exec >>%s 2>&1
+ do_run ~display:cmd cmd
+ ) run;
+
++ if selinux_relabel then (
++ msg (f_"SELinux relabelling");
++ let cmd = sprintf "
++ if load_policy && fixfiles restore; then
++ rm -f /.autorelabel
++ else
++ touch /.autorelabel
++ echo '%s: SELinux relabelling failed, will relabel at boot instead.'
++ fi
++ " prog in
++ do_run ~display:"load_policy && fixfiles restore" cmd
++ );
++
+ (* Clean up the log file:
+ *
+ * If debugging, dump out the log file.
+diff --git a/builder/cmdline.ml b/builder/cmdline.ml
+index e3b1484..a6cb6c5 100644
+--- a/builder/cmdline.ml
++++ b/builder/cmdline.ml
+@@ -180,6 +180,7 @@ let parse_cmdline () =
+ let add_scrub s = scrub := s :: !scrub in
+
+ let scrub_logfile = ref false in
++ let selinux_relabel = ref false in
+
+ let size = ref None in
+ let set_size arg = size := Some (parse_size ~prog arg) in
+@@ -287,6 +288,8 @@ let parse_cmdline () =
+ "--run", Arg.String add_run, "script" ^ " " ^ s_"Run script in disk image";
+ "--run-command", Arg.String add_run_cmd, "cmd+args" ^ " " ^ s_"Run command in disk image";
+ "--scrub", Arg.String add_scrub, "name" ^ " " ^ s_"Scrub a file";
++ "--selinux-relabel", Arg.Set selinux_relabel,
++ " " ^ s_"Relabel files with correct SELinux labels";
+ "--size", Arg.String set_size, "size" ^ " " ^ s_"Set output disk size";
+ "--smp", Arg.Int set_smp, "vcpus" ^ " " ^ s_"Set number of vCPUs";
+ "--source", Arg.String add_source, "URL" ^ " " ^ s_"Set source URL";
+@@ -351,6 +354,7 @@ read the man page virt-builder(1).
+ let root_password = !root_password in
+ let scrub = List.rev !scrub in
+ let scrub_logfile = !scrub_logfile in
++ let selinux_relabel = !selinux_relabel in
+ let size = !size in
+ let smp = !smp in
+ let sources = List.rev !sources in
+@@ -457,5 +461,5 @@ read the man page virt-builder(1).
+ edit, firstboot, run, format, gpg, hostname, install, list_format, links,
+ memsize, mkdirs,
+ network, output, password_crypto, quiet, root_password, scrub,
+- scrub_logfile, size, smp, sources, sync, timezone, update, upload,
+- writes
++ scrub_logfile, selinux_relabel, size, smp, sources, sync, timezone,
++ update, upload, writes
+diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
+index 918f372..52bf536 100644
+--- a/builder/virt-builder.pod
++++ b/builder/virt-builder.pod
+@@ -27,6 +27,7 @@ virt-builder - Build virtual machine images quickly
+ [--link TARGET:LINK[:LINK]]
+ [--edit FILE:EXPR]
+ [--delete FILE] [--scrub FILE]
++ [--selinux-relabel]
+ [--run SCRIPT] [--run-command 'CMD ARGS ...']
+ [--firstboot SCRIPT] [--firstboot-command 'CMD ARGS ...']
+ [--firstboot-install PKG,[PKG...]]
+@@ -136,6 +137,16 @@ To install packages from the ordinary (guest) software repository
+ (In Fedora, C<@> is used to install groups of packages. On Debian
+ you would install a meta-package instead.)
+
++To update the core packages to the latest version:
++
++ virt-builder debian-7 --update
++
++For guests which use SELinux, like Fedora and Red Hat Enterprise
++Linux, you may need to do SELinux relabelling after installing or
++updating packages (see L</SELINUX> below):
++
++ virt-builder fedora-20 --update --selinux-relabel
++
+ =head2 Customizing the installation
+
+ There are many options that let you customize the installation. These
+@@ -593,6 +604,12 @@ It cannot delete directories, only regular files.
+
+ =back
+
++=item B<--selinux-relabel>
++
++Relabel files in the guest so that they have the correct SELinux label.
++
++You should only use this option for guests which support SELinux.
++
+ =item B<--size> SIZE
+
+ Select the size of the output disk, where the size can be specified
+@@ -1029,6 +1046,10 @@ Scripts are run (I<--run>, I<--run-command>).
+
+ Scripts run in the order they appear on the command line.
+
++=item *
++
++SELinux relabelling is done (I<--selinux-relabel>).
++
+ =back
+
+ =head2 IMPORTING THE DISK IMAGE
+@@ -1714,30 +1735,29 @@ raw-format guests.
+ Guests which use SELinux (such as Fedora and Red Hat Enterprise Linux)
+ require that each file has a correct SELinux label.
+
+-Since virt-builder does not know how to give new files a correct
+-label, the guest templates have an empty file C</.autorelabel> and
+-this causes the guest to relabel itself at first boot.
+-
+-This usually means that these guests will reboot themselves once the
+-first time you use them. B<This is normal, and harmless.> However if
+-you want to perform the relabelling at build time instead of delaying
+-it to the first boot, you can boot the guest with the qemu
+-I<-no-reboot> option (which means it will shut down after the relabel
+-is complete without booting "for real"). Only do this if you are sure
+-it is an SELinux guest:
+-
+- qemu-system-x86_64 \
+- -no-reboot \
+- -nographic \
+- -machine accel=kvm:tcg \
+- -cpu host \
+- -m 2048 \
+- -drive file=disk.img,format=raw,if=virtio \
+- -serial stdio \
+- -monitor none
+-
+-(For further information on the topic of SELinux labelling, see:
+-L<https://www.redhat.com/archives/libguestfs/2014-January/msg00183.html>)
++Virt-builder does not know how to give new files a label, so there are
++two possible strategies it can use to ensure correct labelling:
++
++=over 4
++
++=item Using I<--selinux-relabel>
++
++This runs L<fixfiles(8)> just before finalizing the guest, which sets
++SELinux labels correctly in the disk image.
++
++Sometimes fixfiles is not possible during installation, in which case
++this option falls back on:
++
++=item Touching C</.autorelabel>
++
++Guest templates may already contain a file called C</.autorelabel>, or
++it is touched if I<--selinux-relabel> cannot run fixfiles.
++
++For guests that use SELinux, this causes fixfiles to run at first
++boot. Guests will reboot themselves once the first time you use them,
++which is normal and harmless.
++
++=back
+
+ =head1 ENVIRONMENT VARIABLES
+
+@@ -1795,6 +1815,7 @@ L<gpg(1)>,
+ L<curl(1)>,
+ L<virt-make-fs(1)>,
+ L<genisoimage(1)>,
++L<fixfiles(8)>,
+ L<http://libguestfs.org/>.
+
+ =head1 AUTHOR
+--
+1.8.4.2
+
diff --git a/0072-builder-Add-documentation-for-enabling-Puppet-agent-.patch b/0072-builder-Add-documentation-for-enabling-Puppet-agent-.patch
new file mode 100644
index 0000000..c347da9
--- /dev/null
+++ b/0072-builder-Add-documentation-for-enabling-Puppet-agent-.patch
@@ -0,0 +1,48 @@
+From 9e521a01b89b0adb4dfb662e274476049a7566f4 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Fri, 24 Jan 2014 19:43:05 +0000
+Subject: [PATCH] builder: Add documentation for enabling Puppet (agent) in a
+ guest.
+
+(cherry picked from commit 080300dfec1dd603da2f7d53e72dd3e056317fb8)
+---
+ builder/virt-builder.pod | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
+index 52bf536..ed08f3d 100644
+--- a/builder/virt-builder.pod
++++ b/builder/virt-builder.pod
+@@ -1121,6 +1121,29 @@ following could be used to boot the virtual machine:
+ As with libvirt, it is very important that the correct format is
+ chosen. It will be C<raw> unless the I<--format> option was used.
+
++=head2 CONFIGURATION MANAGEMENT
++
++=head3 Puppet
++
++To enable the Puppet agent in a guest, install the package, point
++the configuration at your Puppetmaster, and ensure the agent runs
++at boot.
++
++A typical virt-builder command would be:
++
++ virt-builder fedora-20 \
++ --hostname client.example.com \
++ --update \
++ --install puppet \
++ --edit '/etc/puppet/puppet.conf:
++ s/^\[agent\]/[agent]\n server = puppetmaster.example.com/' \
++ --run-command 'systemctl enable puppet' \
++ --selinux-relabel
++
++The precise instructions vary according to the Linux distro. For
++further information see:
++L<http://docs.puppetlabs.com/guides/installation.htm>
++
+ =head2 DEBUGGING BUILDS
+
+ If virt-builder itself fails, then enable debugging (I<-v>) and report
+--
+1.8.4.2
+
diff --git a/0073-daemon-Bind-mount-sys-fs-selinux-into-sysroot-when-r.patch b/0073-daemon-Bind-mount-sys-fs-selinux-into-sysroot-when-r.patch
new file mode 100644
index 0000000..58bfb1b
--- /dev/null
+++ b/0073-daemon-Bind-mount-sys-fs-selinux-into-sysroot-when-r.patch
@@ -0,0 +1,71 @@
+From a5b84503f41d715bed6573b61382cf5486673ced Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Fri, 24 Jan 2014 19:36:33 +0000
+Subject: [PATCH] daemon: Bind-mount /sys/fs/selinux into sysroot when running
+ commands.
+
+Even though we are already bind-mounting /sys, it is necessary to also
+bind-mount /sys/fs/selinux in order for SELinux commands (in
+particular, 'load_policy') to work.
+
+This fixes/reverts commit 7367729ec7a5d016878dd00b32cce45cec372931.
+
+(cherry picked from commit ab33653ef312e18042be08854aa0dec2c7254fc2)
+---
+ daemon/command.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/daemon/command.c b/daemon/command.c
+index 066c773..1aa1a52 100644
+--- a/daemon/command.c
++++ b/daemon/command.c
+@@ -48,7 +48,8 @@ struct bind_state {
+ char *sysroot_dev_pts;
+ char *sysroot_proc;
+ char *sysroot_sys;
+- bool dev_ok, dev_pts_ok, proc_ok, sys_ok;
++ char *sysroot_sys_fs_selinux;
++ bool dev_ok, dev_pts_ok, proc_ok, sys_ok, sys_fs_selinux_ok;
+ };
+
+ struct resolver_state {
+@@ -76,14 +77,17 @@ bind_mount (struct bind_state *bs)
+ bs->sysroot_dev_pts = sysroot_path ("/dev/pts");
+ bs->sysroot_proc = sysroot_path ("/proc");
+ bs->sysroot_sys = sysroot_path ("/sys");
++ bs->sysroot_sys_fs_selinux = sysroot_path ("/sys/fs/selinux");
+
+ if (bs->sysroot_dev == NULL || bs->sysroot_dev_pts == NULL ||
+- bs->sysroot_proc == NULL || bs->sysroot_sys == NULL) {
++ bs->sysroot_proc == NULL || bs->sysroot_sys == NULL ||
++ bs->sysroot_sys_fs_selinux == NULL) {
+ reply_with_perror ("malloc");
+ free (bs->sysroot_dev);
+ free (bs->sysroot_dev_pts);
+ free (bs->sysroot_proc);
+ free (bs->sysroot_sys);
++ free (bs->sysroot_sys_fs_selinux);
+ return -1;
+ }
+
+@@ -95,6 +99,8 @@ bind_mount (struct bind_state *bs)
+ bs->proc_ok = r != -1;
+ r = command (NULL, NULL, str_mount, "--bind", "/sys", bs->sysroot_sys, NULL);
+ bs->sys_ok = r != -1;
++ r = command (NULL, NULL, str_mount, "--bind", "/sys/fs/selinux", bs->sysroot_sys_fs_selinux, NULL);
++ bs->sys_fs_selinux_ok = r != -1;
+
+ bs->mounted = true;
+
+@@ -111,6 +117,8 @@ static void
+ free_bind_state (struct bind_state *bs)
+ {
+ if (bs->mounted) {
++ if (bs->sys_fs_selinux_ok) umount_ignore_fail (bs->sysroot_sys_fs_selinux);
++ free (bs->sysroot_sys_fs_selinux);
+ if (bs->sys_ok) umount_ignore_fail (bs->sysroot_sys);
+ free (bs->sysroot_sys);
+ if (bs->proc_ok) umount_ignore_fail (bs->sysroot_proc);
+--
+1.8.4.2
+
diff --git a/0074-daemon-If-selinux-exists-in-the-guest-bind-mount-sys.patch b/0074-daemon-If-selinux-exists-in-the-guest-bind-mount-sys.patch
new file mode 100644
index 0000000..7941d74
--- /dev/null
+++ b/0074-daemon-If-selinux-exists-in-the-guest-bind-mount-sys.patch
@@ -0,0 +1,77 @@
+From 65dbdeecdd248d7629ab8813f061b50cba8e4093 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Mon, 27 Jan 2014 20:22:23 +0000
+Subject: [PATCH] daemon: If /selinux exists in the guest, bind-mount
+ /sys/fs/selinux to there.
+
+Commit 72afcf450a78b7e58f65b4a7aaf94d71cd25fca5 was partially
+incorrect. If the guest userspace is expecting /selinux to exist,
+then we should bind-mount /sys/fs/selinux from the appliance kernel
+there.
+
+(cherry picked from commit 9df50877f8b61106248acd2375d011acc209c6b5)
+---
+ daemon/command.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/daemon/command.c b/daemon/command.c
+index 1aa1a52..939bf87 100644
+--- a/daemon/command.c
++++ b/daemon/command.c
+@@ -47,9 +47,10 @@ struct bind_state {
+ char *sysroot_dev;
+ char *sysroot_dev_pts;
+ char *sysroot_proc;
++ char *sysroot_selinux;
+ char *sysroot_sys;
+ char *sysroot_sys_fs_selinux;
+- bool dev_ok, dev_pts_ok, proc_ok, sys_ok, sys_fs_selinux_ok;
++ bool dev_ok, dev_pts_ok, proc_ok, selinux_ok, sys_ok, sys_fs_selinux_ok;
+ };
+
+ struct resolver_state {
+@@ -76,16 +77,18 @@ bind_mount (struct bind_state *bs)
+ bs->sysroot_dev = sysroot_path ("/dev");
+ bs->sysroot_dev_pts = sysroot_path ("/dev/pts");
+ bs->sysroot_proc = sysroot_path ("/proc");
++ bs->sysroot_selinux = sysroot_path ("/selinux");
+ bs->sysroot_sys = sysroot_path ("/sys");
+ bs->sysroot_sys_fs_selinux = sysroot_path ("/sys/fs/selinux");
+
+ if (bs->sysroot_dev == NULL || bs->sysroot_dev_pts == NULL ||
+- bs->sysroot_proc == NULL || bs->sysroot_sys == NULL ||
+- bs->sysroot_sys_fs_selinux == NULL) {
++ bs->sysroot_proc == NULL || bs->sysroot_selinux == NULL ||
++ bs->sysroot_sys == NULL || bs->sysroot_sys_fs_selinux == NULL) {
+ reply_with_perror ("malloc");
+ free (bs->sysroot_dev);
+ free (bs->sysroot_dev_pts);
+ free (bs->sysroot_proc);
++ free (bs->sysroot_selinux);
+ free (bs->sysroot_sys);
+ free (bs->sysroot_sys_fs_selinux);
+ return -1;
+@@ -97,6 +100,11 @@ bind_mount (struct bind_state *bs)
+ bs->dev_pts_ok = r != -1;
+ r = command (NULL, NULL, str_mount, "--bind", "/proc", bs->sysroot_proc, NULL);
+ bs->proc_ok = r != -1;
++ /* Note on the next line we have to bind-mount /sys/fs/selinux (appliance
++ * kernel) on top of /selinux (where guest is expecting selinux).
++ */
++ r = command (NULL, NULL, str_mount, "--bind", "/sys/fs/selinux", bs->sysroot_selinux, NULL);
++ bs->selinux_ok = r != -1;
+ r = command (NULL, NULL, str_mount, "--bind", "/sys", bs->sysroot_sys, NULL);
+ bs->sys_ok = r != -1;
+ r = command (NULL, NULL, str_mount, "--bind", "/sys/fs/selinux", bs->sysroot_sys_fs_selinux, NULL);
+@@ -121,6 +129,8 @@ free_bind_state (struct bind_state *bs)
+ free (bs->sysroot_sys_fs_selinux);
+ if (bs->sys_ok) umount_ignore_fail (bs->sysroot_sys);
+ free (bs->sysroot_sys);
++ if (bs->selinux_ok) umount_ignore_fail (bs->sysroot_selinux);
++ free (bs->sysroot_selinux);
+ if (bs->proc_ok) umount_ignore_fail (bs->sysroot_proc);
+ free (bs->sysroot_proc);
+ if (bs->dev_pts_ok) umount_ignore_fail (bs->sysroot_dev_pts);
+--
+1.8.4.2
+
diff --git a/0075-daemon-Add-a-note-about-how-mount-rbind-doesn-t-work.patch b/0075-daemon-Add-a-note-about-how-mount-rbind-doesn-t-work.patch
new file mode 100644
index 0000000..951557c
--- /dev/null
+++ b/0075-daemon-Add-a-note-about-how-mount-rbind-doesn-t-work.patch
@@ -0,0 +1,28 @@
+From 5bd9401f4a533b01fca4bee8cadc1e7f4ac85c87 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Mon, 27 Jan 2014 21:20:32 +0000
+Subject: [PATCH] daemon: Add a note about how 'mount --rbind' doesn't work.
+
+(cherry picked from commit d9cd2dc9b0e847fda3831c9ff13def616ca5043d)
+---
+ daemon/command.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/daemon/command.c b/daemon/command.c
+index 939bf87..1593de9 100644
+--- a/daemon/command.c
++++ b/daemon/command.c
+@@ -94,6 +94,10 @@ bind_mount (struct bind_state *bs)
+ return -1;
+ }
+
++ /* Note it is tempting to use --rbind here (to bind submounts).
++ * However I have not found a reliable way to unmount the same set
++ * of directories (umount -R does NOT work).
++ */
+ r = command (NULL, NULL, str_mount, "--bind", "/dev", bs->sysroot_dev, NULL);
+ bs->dev_ok = r != -1;
+ r = command (NULL, NULL, str_mount, "--bind", "/dev/pts", bs->sysroot_dev_pts, NULL);
+--
+1.8.4.2
+
diff --git a/0076-builder-output-translated-notes.patch b/0076-builder-output-translated-notes.patch
new file mode 100644
index 0000000..2442c27
--- /dev/null
+++ b/0076-builder-output-translated-notes.patch
@@ -0,0 +1,404 @@
+From 37752cbfebb999527f6877964ba01896831a696f Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Thu, 30 Jan 2014 17:05:34 +0100
+Subject: [PATCH] builder: output translated notes
+
+Output all the translations available for the notes in the "verbose"
+output and the JSON output, while trying to match the system langauge in
+the "show notes" output.
+
+The JSON output is slightly changed to handle translations, with the
+"untranslated" notes being matched as "C". The version is not bumped
+though, since there have been no stable releases with the former output
+yet.
+
+(cherry picked from commit 07ef60c63f5fd635306d199622d36f9089c75ecc)
+---
+ builder/Makefile.am | 5 ++++
+ builder/index_parser.ml | 11 ++++----
+ builder/list_entries.ml | 56 +++++++++++++++++++++++++++++++++----
+ builder/setlocale-c.c | 59 +++++++++++++++++++++++++++++++++++++++
+ builder/setlocale.ml | 29 +++++++++++++++++++
+ builder/setlocale.mli | 30 ++++++++++++++++++++
+ builder/test-virt-builder-list.sh | 28 ++++++++++++++-----
+ po/POTFILES | 1 +
+ po/POTFILES-ml | 1 +
+ 9 files changed, 202 insertions(+), 18 deletions(-)
+ create mode 100644 builder/setlocale-c.c
+ create mode 100644 builder/setlocale.ml
+ create mode 100644 builder/setlocale.mli
+
+diff --git a/builder/Makefile.am b/builder/Makefile.am
+index 4777619..2be495b 100644
+--- a/builder/Makefile.am
++++ b/builder/Makefile.am
+@@ -51,6 +51,9 @@ SOURCES = \
+ pxzcat.ml \
+ pxzcat.mli \
+ pxzcat-c.c \
++ setlocale.ml \
++ setlocale.mli \
++ setlocale-c.c \
+ sigchecker.mli \
+ sigchecker.ml
+
+@@ -83,6 +86,8 @@ OBJECTS = \
+ index-parser-c.o \
+ pxzcat-c.o \
+ pxzcat.cmx \
++ setlocale-c.o \
++ setlocale.cmx \
+ get_kernel.cmx \
+ downloader.cmx \
+ sigchecker.cmx \
+diff --git a/builder/index_parser.ml b/builder/index_parser.ml
+index d5b48ae..2d4a642 100644
+--- a/builder/index_parser.ml
++++ b/builder/index_parser.ml
+@@ -91,11 +91,12 @@ let print_entry chan (name, { printable_name = printable_name;
+ | None -> ()
+ | Some lvexpand -> fp "lvexpand=%s\n" lvexpand
+ );
+- (match notes with
+- | ("", notes) :: _ -> fp "notes=%s\n" notes
+- | _ :: _
+- | [] -> ()
+- );
++ List.iter (
++ fun (lang, notes) ->
++ match lang with
++ | "" -> fp "notes=%s\n" notes
++ | lang -> fp "notes[%s]=%s\n" lang notes
++ ) notes;
+ if hidden then fp "hidden=true\n"
+
+ (* Types returned by the C index parser. *)
+diff --git a/builder/list_entries.ml b/builder/list_entries.ml
+index b947cc8..7317cc7 100644
+--- a/builder/list_entries.ml
++++ b/builder/list_entries.ml
+@@ -21,6 +21,24 @@ open Common_utils
+
+ open Printf
+
++let split_locale loc =
++ let regex = Str.regexp "^\\([A-Za-z]+\\)\\(_\\([A-Za-z]+\\)\\)?\\(\\.\\([A-Za-z0-9-]+\\)\\)?\\(@\\([A-Za-z]+\\)\\)?$" in
++ let l = ref [] in
++ if Str.string_match regex loc 0 then (
++ let match_or_empty n =
++ try Str.matched_group n loc with
++ | Not_found -> ""
++ in
++ let lang = Str.matched_group 1 loc in
++ let territory = match_or_empty 3 in
++ (match territory with
++ | "" -> ()
++ | territory -> l := (lang ^ "_" ^ territory) :: !l);
++ l := lang :: !l;
++ );
++ l := "" :: !l;
++ List.rev !l
++
+ let rec list_entries ~list_format ~sources index =
+ match list_format with
+ | `Short -> list_entries_short index
+@@ -45,6 +63,10 @@ and list_entries_short index =
+ ) index
+
+ and list_entries_long ~sources index =
++ let langs = match Setlocale.setlocale Setlocale.LC_MESSAGES None with
++ | None -> [""]
++ | Some locale -> split_locale locale in
++
+ List.iter (
+ fun (source, fingerprint) ->
+ printf (f_"Source URI: %s\n") source;
+@@ -70,11 +92,23 @@ and list_entries_long ~sources index =
+ | Some size ->
+ printf "%-24s %s\n" (s_"Download size:") (human_size size);
+ );
++ let notes = List.fold_left (
++ fun acc lang ->
++ let res = List.filter (
++ fun (langkey, _) ->
++ match langkey with
++ | "C" -> lang = ""
++ | langkey -> langkey = lang
++ ) notes in
++ match res with
++ | (_, noteskey) :: _ -> noteskey :: acc
++ | [] -> acc
++ ) [] langs in
++ let notes = List.rev notes in
+ (match notes with
+- | ("", notes) :: _ ->
++ | notes :: _ ->
+ printf "\n";
+ printf (f_"Notes:\n\n%s\n") notes
+- | _ :: _
+ | [] -> ()
+ );
+ printf "\n"
+@@ -108,10 +142,20 @@ and list_entries_json ~sources index =
+ | Some n ->
+ printf " \"%s\": \"%Ld\",\n" key n in
+ let print_notes = function
+- | ("", notes) :: _ ->
+- printf " \"notes\": \"%s\",\n" (json_string_escape notes)
+- | _ :: _
+- | _ -> () in
++ | [] -> ()
++ | notes ->
++ printf " \"notes\": {\n";
++ iteri (
++ fun i (lang, langnotes) ->
++ let lang =
++ match lang with
++ | "" -> "C"
++ | x -> x in
++ printf " \"%s\": \"%s\"%s\n"
++ (json_string_escape lang) (json_string_escape langnotes)
++ (trailing_comma i (List.length notes))
++ ) notes;
++ printf " },\n" in
+
+ printf "{\n";
+ printf " \"version\": %d,\n" 1;
+diff --git a/builder/setlocale-c.c b/builder/setlocale-c.c
+new file mode 100644
+index 0000000..e1ad75d
+--- /dev/null
++++ b/builder/setlocale-c.c
+@@ -0,0 +1,59 @@
++/* virt-builder
++ * Copyright (C) 2014 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.
++ */
++
++#include <config.h>
++
++#include <locale.h>
++
++#include <caml/alloc.h>
++#include <caml/fail.h>
++#include <caml/memory.h>
++#include <caml/mlvalues.h>
++
++static const int lc_string_table[7] = {
++ LC_ALL,
++ LC_CTYPE,
++ LC_NUMERIC,
++ LC_TIME,
++ LC_COLLATE,
++ LC_MONETARY,
++ LC_MESSAGES
++};
++
++#define Val_none (Val_int (0))
++
++value
++virt_builder_setlocale (value val_category, value val_name)
++{
++ CAMLparam2 (val_category, val_name);
++ CAMLlocal2 (rv, rv2);
++ char *ret, *locstring;
++ int category;
++
++ category = lc_string_table[Int_val (val_category)];
++ locstring = val_name == Val_none ? NULL : String_val (Field (val_name, 0));
++ ret = setlocale (category, locstring);
++ if (ret) {
++ rv2 = caml_copy_string (ret);
++ rv = caml_alloc (1, 0);
++ Store_field (rv, 0, rv2);
++ } else
++ rv = Val_none;
++
++ CAMLreturn (rv);
++}
+diff --git a/builder/setlocale.ml b/builder/setlocale.ml
+new file mode 100644
+index 0000000..9b3289d
+--- /dev/null
++++ b/builder/setlocale.ml
+@@ -0,0 +1,29 @@
++(* virt-builder
++ * Copyright (C) 2014 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.
++ *)
++
++type localecategory =
++ | LC_ALL
++ | LC_CTYPE
++ | LC_NUMERIC
++ | LC_TIME
++ | LC_COLLATE
++ | LC_MONETARY
++ | LC_MESSAGES
++;;
++
++external setlocale : localecategory -> string option -> string option = "virt_builder_setlocale"
+diff --git a/builder/setlocale.mli b/builder/setlocale.mli
+new file mode 100644
+index 0000000..1e34204
+--- /dev/null
++++ b/builder/setlocale.mli
+@@ -0,0 +1,30 @@
++(* virt-builder
++ * Copyright (C) 2014 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.
++ *)
++
++type localecategory =
++ | LC_ALL
++ | LC_CTYPE
++ | LC_NUMERIC
++ | LC_TIME
++ | LC_COLLATE
++ | LC_MONETARY
++ | LC_MESSAGES
++;;
++
++val setlocale : localecategory -> string option -> string option
++(** [setlocale category newlocale] Tiny wrapper to the C [setlocale]. *)
+diff --git a/builder/test-virt-builder-list.sh b/builder/test-virt-builder-list.sh
+index c3b791f..634254d 100755
+--- a/builder/test-virt-builder-list.sh
++++ b/builder/test-virt-builder-list.sh
+@@ -119,49 +119,63 @@ if [ "$json_list" != "{
+ \"os-version\": \"phony-debian\",
+ \"full-name\": \"Phony Debian\",
+ \"size\": 536870912,
+- \"notes\": \"Phony Debian look-alike used for testing.\",
++ \"notes\": {
++ \"C\": \"Phony Debian look-alike used for testing.\"
++ },
+ \"hidden\": false
+ },
+ {
+ \"os-version\": \"phony-fedora\",
+ \"full-name\": \"Phony Fedora\",
+ \"size\": 1073741824,
+- \"notes\": \"Phony Fedora look-alike used for testing.\",
++ \"notes\": {
++ \"C\": \"Phony Fedora look-alike used for testing.\"
++ },
+ \"hidden\": false
+ },
+ {
+ \"os-version\": \"phony-fedora-qcow2\",
+ \"full-name\": \"Phony Fedora qcow2\",
+ \"size\": 1073741824,
+- \"notes\": \"Phony Fedora look-alike used for testing.\",
++ \"notes\": {
++ \"C\": \"Phony Fedora look-alike used for testing.\"
++ },
+ \"hidden\": false
+ },
+ {
+ \"os-version\": \"phony-fedora-qcow2-uncompressed\",
+ \"full-name\": \"Phony Fedora qcow2 uncompressed\",
+ \"size\": 1073741824,
+- \"notes\": \"Phony Fedora look-alike used for testing.\",
++ \"notes\": {
++ \"C\": \"Phony Fedora look-alike used for testing.\"
++ },
+ \"hidden\": false
+ },
+ {
+ \"os-version\": \"phony-fedora-no-format\",
+ \"full-name\": \"Phony Fedora\",
+ \"size\": 1073741824,
+- \"notes\": \"Phony Fedora look-alike used for testing.\",
++ \"notes\": {
++ \"C\": \"Phony Fedora look-alike used for testing.\"
++ },
+ \"hidden\": false
+ },
+ {
+ \"os-version\": \"phony-ubuntu\",
+ \"full-name\": \"Phony Ubuntu\",
+ \"size\": 536870912,
+- \"notes\": \"Phony Ubuntu look-alike used for testing.\",
++ \"notes\": {
++ \"C\": \"Phony Ubuntu look-alike used for testing.\"
++ },
+ \"hidden\": false
+ },
+ {
+ \"os-version\": \"phony-windows\",
+ \"full-name\": \"Phony Windows\",
+ \"size\": 536870912,
+- \"notes\": \"Phony Windows look-alike used for testing.\",
++ \"notes\": {
++ \"C\": \"Phony Windows look-alike used for testing.\"
++ },
+ \"hidden\": false
+ }
+ ]
+diff --git a/po/POTFILES b/po/POTFILES
+index 76c41ec..d702ef0 100644
+--- a/po/POTFILES
++++ b/po/POTFILES
+@@ -5,6 +5,7 @@ builder/index-scan.c
+ builder/index-struct.c
+ builder/index-validate.c
+ builder/pxzcat-c.c
++builder/setlocale-c.c
+ cat/cat.c
+ cat/filesystems.c
+ cat/ls.c
+diff --git a/po/POTFILES-ml b/po/POTFILES-ml
+index 564404b..d030258 100644
+--- a/po/POTFILES-ml
++++ b/po/POTFILES-ml
+@@ -5,6 +5,7 @@ builder/get_kernel.ml
+ builder/index_parser.ml
+ builder/list_entries.ml
+ builder/pxzcat.ml
++builder/setlocale.ml
+ builder/sigchecker.ml
+ mllib/common_gettext.ml
+ mllib/common_utils.ml
+--
+1.8.4.2
+
diff --git a/0077-builder-remove-unused-variables.patch b/0077-builder-remove-unused-variables.patch
new file mode 100644
index 0000000..7d0b4d9
--- /dev/null
+++ b/0077-builder-remove-unused-variables.patch
@@ -0,0 +1,30 @@
+From 9145966b07d09605ad026c217825cabaee1a5dea Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Thu, 30 Jan 2014 17:06:42 +0100
+Subject: [PATCH] builder: remove unused variables
+
+Leftovers of the list_entries_short+list_entries_long split done in
+commit 91aae893c70b3877b31803800ba77836fd7a45e8.
+
+(cherry picked from commit bed8a168c0ed76e784adcc046256432f615e3314)
+---
+ builder/list_entries.ml | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/builder/list_entries.ml b/builder/list_entries.ml
+index 7317cc7..27ea95e 100644
+--- a/builder/list_entries.ml
++++ b/builder/list_entries.ml
+@@ -48,9 +48,6 @@ let rec list_entries ~list_format ~sources index =
+ and list_entries_short index =
+ List.iter (
+ fun (name, { Index_parser.printable_name = printable_name;
+- size = size;
+- compressed_size = compressed_size;
+- notes = notes;
+ hidden = hidden }) ->
+ if not hidden then (
+ printf "%-24s" name;
+--
+1.8.4.2
+
diff --git a/0078-builder-isolate-C-libraries-in-an-own-OCAMLCLIBS.patch b/0078-builder-isolate-C-libraries-in-an-own-OCAMLCLIBS.patch
new file mode 100644
index 0000000..aad85c2
--- /dev/null
+++ b/0078-builder-isolate-C-libraries-in-an-own-OCAMLCLIBS.patch
@@ -0,0 +1,36 @@
+From 0097bb2e47c81700921d1580b61914530099274d Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Tue, 11 Feb 2014 10:40:31 +0100
+Subject: [PATCH] builder: isolate C libraries in an own OCAMLCLIBS
+
+Just moving stuff within Makefile.am, no functional changes.
+
+(cherry picked from commit c66cec6ffac2af400487b7fb4ff437eddc6e7aa7)
+---
+ builder/Makefile.am | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/builder/Makefile.am b/builder/Makefile.am
+index 2be495b..78a9e72 100644
+--- a/builder/Makefile.am
++++ b/builder/Makefile.am
+@@ -113,10 +113,15 @@ endif
+ OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
+ OCAMLOPTFLAGS = $(OCAMLCFLAGS)
+
++OCAMLCLIBS = \
++ $(LIBLZMA_LIBS) \
++ -pthread -lpthread \
++ -lncurses -lcrypt
++
+ virt-builder: $(OBJECTS)
+ $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
+ mlguestfs.cmxa -linkpkg $^ \
+- -cclib '-pthread $(LIBLZMA_LIBS) -lncurses -lcrypt -lpthread' \
++ -cclib '$(OCAMLCLIBS)' \
+ $(OCAML_GCOV_LDFLAGS) \
+ -o $@
+
+--
+1.8.4.2
+
diff --git a/0079-builder-prepare-for-different-per-protocol-download-.patch b/0079-builder-prepare-for-different-per-protocol-download-.patch
new file mode 100644
index 0000000..08bb70d
--- /dev/null
+++ b/0079-builder-prepare-for-different-per-protocol-download-.patch
@@ -0,0 +1,145 @@
+From d3cbd568906609d68933c46e73e142fa9ebf7627 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Tue, 11 Feb 2014 12:39:56 +0100
+Subject: [PATCH] builder: prepare for different per-protocol download actions
+
+Small refactor of Downloader.download_to to allow different download
+actions depending on the protocol of the URI (which is now parsed).
+
+No actual behaviour changes, just mostly code motion.
+
+(cherry picked from commit ba3569704cf5f381c618b6b07c8b001bac88e18a)
+---
+ builder/Makefile.am | 6 ++++
+ builder/downloader.ml | 84 ++++++++++++++++++++++++++++-----------------------
+ 2 files changed, 53 insertions(+), 37 deletions(-)
+
+diff --git a/builder/Makefile.am b/builder/Makefile.am
+index 78a9e72..9d2dbc5 100644
+--- a/builder/Makefile.am
++++ b/builder/Makefile.am
+@@ -80,6 +80,9 @@ OBJECTS = \
+ $(top_builddir)/mllib/password.cmx \
+ $(top_builddir)/mllib/planner.cmx \
+ $(top_builddir)/mllib/config.cmx \
++ $(top_builddir)/fish/guestfish-uri.o \
++ $(top_builddir)/mllib/uri-c.o \
++ $(top_builddir)/mllib/uRI.cmx \
+ index-scan.o \
+ index-struct.o \
+ index-parse.o \
+@@ -115,6 +118,9 @@ OCAMLOPTFLAGS = $(OCAMLCFLAGS)
+
+ OCAMLCLIBS = \
+ $(LIBLZMA_LIBS) \
++ $(LIBXML2_LIBS) \
++ -L../src/.libs -lutils \
++ -L../gnulib/lib/.libs -lgnu \
+ -pthread -lpthread \
+ -lncurses -lcrypt
+
+diff --git a/builder/downloader.ml b/builder/downloader.ml
+index 77f48ae..95b5817 100644
+--- a/builder/downloader.ml
++++ b/builder/downloader.ml
+@@ -69,50 +69,60 @@ let rec download ~prog t ?template ?progress_bar uri =
+ (filename, false)
+
+ and download_to ~prog t ?(progress_bar = false) uri filename =
+- (* Get the status code first to ensure the file exists. *)
+- let cmd = sprintf "%s%s -g -o /dev/null -I -w '%%{http_code}' %s"
+- t.curl
+- (if t.debug then "" else " -s -S")
+- (quote uri) in
+- if t.debug then eprintf "%s\n%!" cmd;
+- let lines = external_command ~prog cmd in
+- if List.length lines < 1 then (
+- eprintf (f_"%s: unexpected output from curl command, enable debug and look at previous messages\n") prog;
+- exit 1
+- );
+- let status_code = List.hd lines in
+- let bad_status_code = function
+- | "" -> true
+- | s when s.[0] = '4' -> true (* 4xx *)
+- | s when s.[0] = '5' -> true (* 5xx *)
+- | _ -> false
+- in
+- if bad_status_code status_code then (
+- eprintf (f_"%s: failed to download %s: HTTP status code %s\n")
+- prog uri status_code;
+- exit 1
+- );
++ let parseduri =
++ try URI.parse_uri uri
++ with Invalid_argument "URI.parse_uri" ->
++ eprintf (f_"Error parsing URI '%s'. Look for error messages printed above.\n") uri;
++ exit 1 in
+
+- (* Now download the file.
+- *
+- * Note because there may be parallel virt-builder instances running
++ (* Note because there may be parallel virt-builder instances running
+ * and also to avoid partial downloads in the cachedir if the network
+ * fails, we download to a random name in the cache and then
+ * atomically rename it to the final filename.
+ *)
+ let filename_new = filename ^ "." ^ string_random8 () in
+ unlink_on_exit filename_new;
+- let cmd = sprintf "%s%s -g -o %s %s"
+- t.curl
+- (if t.debug then "" else if progress_bar then " -#" else " -s -S")
+- (quote filename_new) (quote uri) in
+- if t.debug then eprintf "%s\n%!" cmd;
+- let r = Sys.command cmd in
+- if r <> 0 then (
+- eprintf (f_"%s: curl (download) command failed downloading '%s'\n")
+- prog uri;
+- exit 1
++
++ (match parseduri.URI.protocol with
++ | _ -> (* Any other protocol. *)
++ (* Get the status code first to ensure the file exists. *)
++ let cmd = sprintf "%s%s -g -o /dev/null -I -w '%%{http_code}' %s"
++ t.curl
++ (if t.debug then "" else " -s -S")
++ (quote uri) in
++ if t.debug then eprintf "%s\n%!" cmd;
++ let lines = external_command ~prog cmd in
++ if List.length lines < 1 then (
++ eprintf (f_"%s: unexpected output from curl command, enable debug and look at previous messages\n")
++ prog;
++ exit 1
++ );
++ let status_code = List.hd lines in
++ let bad_status_code = function
++ | "" -> true
++ | s when s.[0] = '4' -> true (* 4xx *)
++ | s when s.[0] = '5' -> true (* 5xx *)
++ | _ -> false
++ in
++ if bad_status_code status_code then (
++ eprintf (f_"%s: failed to download %s: HTTP status code %s\n")
++ prog uri status_code;
++ exit 1
++ );
++
++ (* Now download the file. *)
++ let cmd = sprintf "%s%s -g -o %s %s"
++ t.curl
++ (if t.debug then "" else if progress_bar then " -#" else " -s -S")
++ (quote filename_new) (quote uri) in
++ if t.debug then eprintf "%s\n%!" cmd;
++ let r = Sys.command cmd in
++ if r <> 0 then (
++ eprintf (f_"%s: curl (download) command failed downloading '%s'\n")
++ prog uri;
++ exit 1
++ )
+ );
+
+- (* Rename the file if curl was successful. *)
++ (* Rename the file if the download was successful. *)
+ rename filename_new filename
+--
+1.8.4.2
+
diff --git a/0080-builder-do-a-copy-when-downloading-local-files.patch b/0080-builder-do-a-copy-when-downloading-local-files.patch
new file mode 100644
index 0000000..193abbc
--- /dev/null
+++ b/0080-builder-do-a-copy-when-downloading-local-files.patch
@@ -0,0 +1,38 @@
+From 9b67e73e79b3f0bb329616c5f2f4ed265d00deb1 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <ptoscano at redhat.com>
+Date: Tue, 11 Feb 2014 12:52:10 +0100
+Subject: [PATCH] builder: do a copy when downloading local files
+
+Instead of spawning curl even to "download" file:// URIs, just copy
+them.
+
+(cherry picked from commit 76e3e15d031df77db71b11ac1c40199eff80fa4d)
+---
+ builder/downloader.ml | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/builder/downloader.ml b/builder/downloader.ml
+index 95b5817..e386c06 100644
+--- a/builder/downloader.ml
++++ b/builder/downloader.ml
+@@ -84,6 +84,17 @@ and download_to ~prog t ?(progress_bar = false) uri filename =
+ unlink_on_exit filename_new;
+
+ (match parseduri.URI.protocol with
++ | "file" ->
++ let path = parseduri.URI.path in
++ let cmd = sprintf "cp%s %s %s"
++ (if t.debug then " -v" else "")
++ (quote path) (quote filename_new) in
++ let r = Sys.command cmd in
++ if r <> 0 then (
++ eprintf (f_"%s: cp (download) command failed copying '%s'\n")
++ prog path;
++ exit 1
++ )
+ | _ -> (* Any other protocol. *)
+ (* Get the status code first to ensure the file exists. *)
+ let cmd = sprintf "%s%s -g -o /dev/null -I -w '%%{http_code}' %s"
+--
+1.8.4.2
+
diff --git a/libguestfs.spec b/libguestfs.spec
index 1e1f135..26f2e93 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -11,7 +11,7 @@
Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
-Version: 1.24.5
+Version: 1.24.6
Release: 1%{?dist}
License: LGPLv2+
@@ -50,46 +50,61 @@ Patch0022: 0022-builder-Fail-if-bison-is-not-installed.patch
Patch0023: 0023-builder-Fail-if-lex-is-not-installed.patch
Patch0024: 0024-builder-sysprep-Allow-random-as-a-password-selector.patch
Patch0025: 0025-builder-sysprep-Allow-accounts-to-be-locked-RHBZ-102.patch
-Patch0026: 0026-builder-Move-is_block_device-function-into-common-ut.patch
-Patch0027: 0027-builder-Use-a-planner-to-work-out-how-to-convert-the.patch
-Patch0028: 0028-builder-planner-Handle-no-format-in-source-case-corr.patch
-Patch0029: 0029-builder-Flush-debug-info-after-printing-it.patch
-Patch0030: 0030-builder-Add-a-test-of-the-planner.patch
-Patch0031: 0031-builder-tests-Fix-virt-builder-list-output.patch
-Patch0032: 0032-builder-tests-Add-test-virt-builder-planner.sh-to-EX.patch
-Patch0033: 0033-builder-Add-a-link-to-blog-posting-about-the-planner.patch
-Patch0034: 0034-builder-Only-use-virt-resize-no-sparse-when-writing-.patch
-Patch0035: 0035-builder-Refuse-to-write-to-a-char-device-or-dev-null.patch
-Patch0036: 0036-builder-Remove-blank-line.patch
-Patch0037: 0037-builder-Add-update-option-to-update-template-core-pa.patch
-Patch0038: 0038-launch-libvirt-Don-t-default-to-using-NULL-for-libvi.patch
-Patch0039: 0039-builder-Fix-handling-of-size-parameter.patch
-Patch0040: 0040-libvirt-auth-Provide-a-friendlier-wrapper-around-vir.patch
-Patch0041: 0041-tests-Add-a-regression-test-of-libvirt-authenticatio.patch
-Patch0042: 0042-tests-Add-a-regression-test-for-libvirt-authenticati.patch
-Patch0043: 0043-sysprep-builder-Add-timezone-option-to-set-timezone-.patch
-Patch0044: 0044-builder-Document-how-to-change-keyboard-layout.patch
-Patch0045: 0045-builder-Add-link-option-for-creating-symbolic-links.patch
-Patch0046: 0046-builder-Document-how-to-change-the-language-locale-o.patch
-Patch0047: 0047-builder-Document-how-to-set-up-local-mirrors-for-per.patch
-Patch0048: 0048-builder-Document-how-to-set-Japanese-language-suppor.patch
-Patch0049: 0049-builder-Fix-virt-builder-test.patch
-Patch0050: 0050-builder-Document-how-to-set-Japanese-in-Debian-7.patch
-Patch0051: 0051-builder-Add-no-delete-on-failure-option-to-aid-debug.patch
-Patch0052: 0052-builder-For-performance-recommend-using-the-no-sync-.patch
-Patch0053: 0053-builder-planner-Whitespace-change.patch
-Patch0054: 0054-daemon-xattr-simplify-the-enabling-of-the-linuxxattr.patch
-Patch0055: 0055-daemon-xattr-move-the-listxattrs-code-in-an-own-func.patch
-Patch0056: 0056-daemon-xattr-Remove-unused-variable.patch
-Patch0057: 0057-New-API-copy-attributes.patch
-Patch0058: 0058-Update-generated-files-for-new-copy-attributes-API.patch
-Patch0059: 0059-fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch
-Patch0060: 0060-builder-edit-fish-use-copy-attributes.patch
-Patch0061: 0061-builder-test-virt-builder-check-some-results.patch
-Patch0062: 0062-builder-small-refactor-of-the-list-output.patch
-Patch0063: 0063-builder-add-list-format.patch
-Patch0064: 0064-builder-add-a-JSON-output-for-list.patch
-Patch0065: 0065-builder-Fix-unterminated-I-.-in-man-page.patch
+Patch0026: 0026-builder-Use-a-planner-to-work-out-how-to-convert-the.patch
+Patch0027: 0027-builder-planner-Handle-no-format-in-source-case-corr.patch
+Patch0028: 0028-builder-Flush-debug-info-after-printing-it.patch
+Patch0029: 0029-builder-Add-a-test-of-the-planner.patch
+Patch0030: 0030-builder-tests-Fix-virt-builder-list-output.patch
+Patch0031: 0031-builder-tests-Add-test-virt-builder-planner.sh-to-EX.patch
+Patch0032: 0032-builder-Add-a-link-to-blog-posting-about-the-planner.patch
+Patch0033: 0033-builder-Only-use-virt-resize-no-sparse-when-writing-.patch
+Patch0034: 0034-builder-Refuse-to-write-to-a-char-device-or-dev-null.patch
+Patch0035: 0035-builder-Remove-blank-line.patch
+Patch0036: 0036-builder-Add-update-option-to-update-template-core-pa.patch
+Patch0037: 0037-launch-libvirt-Don-t-default-to-using-NULL-for-libvi.patch
+Patch0038: 0038-builder-Fix-handling-of-size-parameter.patch
+Patch0039: 0039-libvirt-auth-Provide-a-friendlier-wrapper-around-vir.patch
+Patch0040: 0040-tests-Add-a-regression-test-of-libvirt-authenticatio.patch
+Patch0041: 0041-tests-Add-a-regression-test-for-libvirt-authenticati.patch
+Patch0042: 0042-sysprep-builder-Add-timezone-option-to-set-timezone-.patch
+Patch0043: 0043-builder-Document-how-to-change-keyboard-layout.patch
+Patch0044: 0044-builder-Add-link-option-for-creating-symbolic-links.patch
+Patch0045: 0045-builder-Document-how-to-change-the-language-locale-o.patch
+Patch0046: 0046-builder-Document-how-to-set-up-local-mirrors-for-per.patch
+Patch0047: 0047-builder-Document-how-to-set-Japanese-language-suppor.patch
+Patch0048: 0048-builder-Fix-virt-builder-test.patch
+Patch0049: 0049-builder-Document-how-to-set-Japanese-in-Debian-7.patch
+Patch0050: 0050-builder-Add-no-delete-on-failure-option-to-aid-debug.patch
+Patch0051: 0051-builder-For-performance-recommend-using-the-no-sync-.patch
+Patch0052: 0052-builder-planner-Whitespace-change.patch
+Patch0053: 0053-daemon-xattr-simplify-the-enabling-of-the-linuxxattr.patch
+Patch0054: 0054-daemon-xattr-move-the-listxattrs-code-in-an-own-func.patch
+Patch0055: 0055-daemon-xattr-Remove-unused-variable.patch
+Patch0056: 0056-New-API-copy-attributes.patch
+Patch0057: 0057-Update-generated-files-for-new-copy-attributes-API.patch
+Patch0058: 0058-fish-Add-test-file-attrs.sh-to-EXTRA_DIST.patch
+Patch0059: 0059-builder-edit-fish-use-copy-attributes.patch
+Patch0060: 0060-builder-test-virt-builder-check-some-results.patch
+Patch0061: 0061-builder-small-refactor-of-the-list-output.patch
+Patch0062: 0062-builder-add-list-format.patch
+Patch0063: 0063-builder-add-a-JSON-output-for-list.patch
+Patch0064: 0064-builder-Fix-unterminated-I-.-in-man-page.patch
+Patch0065: 0065-builder-add-index-struct.h-as-dependency-for-index-p.patch
+Patch0066: 0066-builder-allow-more-empty-lines-in-index-files.patch
+Patch0067: 0067-builder-proper-consider-subkeys-in-index-files.patch
+Patch0068: 0068-builder-fix-small-regression-in-subkey-parsing.patch
+Patch0069: 0069-builder-small-code-simplification.patch
+Patch0070: 0070-builder-read-all-the-available-notes-from-the-index.patch
+Patch0071: 0071-builder-Add-selinux-relabel-option-to-perform-SELinu.patch
+Patch0072: 0072-builder-Add-documentation-for-enabling-Puppet-agent-.patch
+Patch0073: 0073-daemon-Bind-mount-sys-fs-selinux-into-sysroot-when-r.patch
+Patch0074: 0074-daemon-If-selinux-exists-in-the-guest-bind-mount-sys.patch
+Patch0075: 0075-daemon-Add-a-note-about-how-mount-rbind-doesn-t-work.patch
+Patch0076: 0076-builder-output-translated-notes.patch
+Patch0077: 0077-builder-remove-unused-variables.patch
+Patch0078: 0078-builder-isolate-C-libraries-in-an-own-OCAMLCLIBS.patch
+Patch0079: 0079-builder-prepare-for-different-per-protocol-download-.patch
+Patch0080: 0080-builder-do-a-copy-when-downloading-local-files.patch
# Add any non-git patches here.
# Use git for patch management.
@@ -1081,6 +1096,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
%changelog
+* Wed Feb 12 2014 Richard W.M. Jones <rjones at redhat.com> - 1:1.24.6-1
+- New stable branch version 1.24.6.
+
* Mon Jan 20 2014 Richard W.M. Jones <rjones at redhat.com> - 1:1.24.5-1
- New stable branch version 1.24.5.
- Backport more virt-builder patches from upstream to Fedora 20.
diff --git a/sources b/sources
index 6b9204b..53a6608 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-75d4e99b1fb57dd5dd5fc9be10a6c49d libguestfs-1.24.5.tar.gz
+91aebe8a6e4c6576e88af097e62705b0 libguestfs-1.24.6.tar.gz
More information about the scm-commits
mailing list