From 7b592840331ea07b4a609ee38783f58448a215e2 Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Tue, 15 Mar 2022 11:09:42 +0100 Subject: [PATCH] New upstream version 1.48.0 --- .gitignore | 4 +- HACKING | 15 + Makefile.am | 13 + Makefile.in | 39 +- aclocal.m4 | 71 +- align/Makefile.in | 13 +- align/scan.c | 2 - bash/Makefile.in | 13 +- bash/virt-alignment-scan | 4 +- bugs-in-changelog.sh | 58 + builder/Makefile.am | 5 +- builder/Makefile.in | 24 +- builder/builder.ml | 8 +- builder/downloader.ml | 2 +- builder/index_parser_tests.ml | 2 +- builder/pxzcat.ml | 2 +- builder/repository_main.ml | 2 +- builder/templates/Makefile.in | 11 +- builder/templates/alma-8.5.index-fragment | 19 + builder/templates/alma-8.5.ks | 29 + builder/templates/alma-8.5.virt-install-cmd | 20 + .../templates/centosstream-8.index-fragment | 19 + builder/templates/centosstream-8.ks | 29 + .../templates/centosstream-8.virt-install-cmd | 20 + builder/templates/debian-11.index-fragment | 24 + builder/templates/debian-11.virt-install-cmd | 20 + .../templates/fedora-34-armv7l.index-fragment | 26 + builder/templates/fedora-34-armv7l.ks | 35 + .../fedora-34-armv7l.virt-install-cmd | 21 + .../fedora-35-aarch64.index-fragment | 25 + builder/templates/fedora-35-aarch64.ks | 35 + .../fedora-35-aarch64.virt-install-cmd | 20 + builder/templates/fedora-35.index-fragment | 22 + builder/templates/fedora-35.ks | 45 + builder/templates/fedora-35.virt-install-cmd | 20 + builder/templates/make-template.ml | 105 +- builder/templates/rhel-8.3.ks | 29 + builder/templates/rhel-8.3.virt-install-cmd | 20 + builder/templates/rhel-8.4.ks | 29 + builder/templates/rhel-8.4.virt-install-cmd | 20 + builder/templates/rhel-8.5.ks | 29 + builder/templates/rhel-8.5.virt-install-cmd | 20 + builder/test-virt-builder-planner.sh | 1 - builder/test-virt-builder.sh | 14 +- builder/virt-builder-repository.pod | 6 + builder/virt-builder.pod | 21 +- cat/Makefile.am | 2 +- cat/Makefile.in | 15 +- cat/cat.c | 2 - cat/filesystems.c | 2 - cat/log.c | 2 - cat/ls.c | 2 - cat/tail.c | 2 - common/edit/Makefile.am | 3 +- common/edit/Makefile.in | 13 +- common/mlcustomize/Makefile.in | 13 +- common/mlgettext/Makefile.in | 10 +- common/mlpcre/Makefile.in | 13 +- common/mlprogress/Makefile.in | 10 +- common/mlprogress/progress-c.c | 4 +- common/mlprogress/progress.ml | 4 +- common/mlstdutils/Makefile.am | 16 +- common/mlstdutils/Makefile.in | 43 +- common/mlstdutils/std_utils.ml | 86 +- common/mlstdutils/std_utils.mli | 19 +- common/mltools/JSON_parser.ml | 5 + common/mltools/JSON_parser.mli | 4 + common/mltools/Makefile.am | 26 +- common/mltools/Makefile.in | 41 +- common/mltools/on_exit.ml | 111 ++ common/mltools/on_exit.mli | 67 + common/mltools/test-getopt.sh | 3 +- common/mltools/tools_utils-c.c | 4 +- common/mltools/tools_utils.ml | 187 ++- common/mltools/tools_utils.mli | 18 +- common/mlutils/Makefile.in | 13 +- common/mlutils/c_utils.ml | 14 +- common/mlutils/unix_utils-c.c | 16 +- common/mlutils/unix_utils.ml | 16 +- common/mlvisit/Makefile.am | 10 +- common/mlvisit/Makefile.in | 24 +- common/mlxml/Makefile.in | 10 +- common/options/Makefile.in | 10 +- common/options/decrypt.c | 210 ++- common/options/domain.c | 4 - common/options/inspect.c | 3 - common/options/options.h | 1 - common/parallel/Makefile.am | 1 + common/parallel/Makefile.in | 11 +- common/progress/Makefile.am | 1 + common/progress/Makefile.in | 11 +- common/structs/Makefile.am | 1 + common/structs/Makefile.in | 16 +- common/utils/Makefile.in | 10 +- common/utils/guestfs-utils.h | 1 + common/utils/utils.c | 25 + common/visit/Makefile.am | 1 + common/visit/Makefile.in | 11 +- common/windows/Makefile.am | 3 +- common/windows/Makefile.in | 13 +- configure | 75 +- configure.ac | 5 +- customize/Makefile.am | 2 + customize/Makefile.in | 21 +- customize/password.ml | 40 +- customize/password.mli | 4 +- customize/test-virt-customize.sh | 3 +- customize/virt-customize.pod | 6 + df/Makefile.in | 13 +- df/main.c | 2 - dib/Makefile.am | 1 + dib/Makefile.in | 14 +- dib/dib.ml | 2 +- dib/virt-dib.pod | 6 + diff/Makefile.in | 13 +- diff/diff.c | 2 - diff/test-virt-diff.sh | 1 - docs/Makefile.am | 37 + docs/Makefile.in | 814 ++++++++++ docs/guestfs-tools-release-notes-1.48.pod | 130 ++ edit/Makefile.in | 13 +- edit/edit.c | 2 - edit/test-virt-edit.sh | 2 - format/Makefile.in | 13 +- format/format.c | 2 - get-kernel/Makefile.am | 1 + get-kernel/Makefile.in | 14 +- get-kernel/virt-get-kernel.pod | 6 + gnulib/lib/Makefile.in | 10 +- inspector/Makefile.am | 11 +- inspector/Makefile.in | 37 +- inspector/expected-fedora-luks-on-lvm.img.xml | 242 +++ ...ml => expected-fedora-lvm-on-luks.img.xml} | 0 inspector/inspector.c | 2 - inspector/test-virt-inspector-luks-on-lvm.sh | 55 + ....sh => test-virt-inspector-lvm-on-luks.sh} | 2 +- inspector/virt-inspector.rng | 3 + m4/guestfs-ocaml.m4 | 23 +- make-fs/Makefile.in | 13 +- make-fs/make-fs.c | 1 - make-fs/test-virt-make-fs.sh | 13 +- po-docs/Makefile.in | 10 +- po-docs/ja/Makefile.in | 8 +- po-docs/ja/blocksize-option.pod | 6 +- po-docs/ja/customize-options.pod | 182 +-- .../ja/guestfs-tools-release-notes-1.48.pod | 115 ++ po-docs/ja/key-option.pod | 4 +- po-docs/ja/keys-from-stdin-option.pod | 6 +- po-docs/ja/sysprep-extra-options.pod | 204 +-- po-docs/ja/sysprep-operations.pod | 99 +- po-docs/ja/virt-alignment-scan.1 | 108 +- po-docs/ja/virt-alignment-scan.pod | 104 +- po-docs/ja/virt-builder-repository.pod | 89 +- po-docs/ja/virt-builder.1 | 1070 ++++--------- po-docs/ja/virt-builder.pod | 877 +++-------- po-docs/ja/virt-cat.1 | 82 +- po-docs/ja/virt-cat.pod | 78 +- po-docs/ja/virt-customize.1 | 287 ++-- po-docs/ja/virt-customize.pod | 102 +- po-docs/ja/virt-df.1 | 82 +- po-docs/ja/virt-df.pod | 78 +- po-docs/ja/virt-dib.1 | 324 ++-- po-docs/ja/virt-dib.pod | 321 ++-- po-docs/ja/virt-diff.1 | 84 +- po-docs/ja/virt-diff.pod | 84 +- po-docs/ja/virt-edit.1 | 132 +- po-docs/ja/virt-edit.pod | 128 +- po-docs/ja/virt-filesystems.1 | 99 +- po-docs/ja/virt-filesystems.pod | 95 +- po-docs/ja/virt-format.1 | 58 +- po-docs/ja/virt-format.pod | 54 +- po-docs/ja/virt-get-kernel.1 | 70 +- po-docs/ja/virt-get-kernel.pod | 67 +- po-docs/ja/virt-index-validate.1 | 24 +- po-docs/ja/virt-index-validate.pod | 20 +- po-docs/ja/virt-inspector.1 | 211 +-- po-docs/ja/virt-inspector.pod | 201 +-- po-docs/ja/virt-log.1 | 38 +- po-docs/ja/virt-log.pod | 34 +- po-docs/ja/virt-ls.1 | 133 +- po-docs/ja/virt-ls.pod | 129 +- po-docs/ja/virt-make-fs.1 | 91 +- po-docs/ja/virt-make-fs.pod | 91 +- po-docs/ja/virt-resize.1 | 446 ++---- po-docs/ja/virt-resize.pod | 431 ++---- po-docs/ja/virt-sparsify.1 | 195 +-- po-docs/ja/virt-sparsify.pod | 192 +-- po-docs/ja/virt-sysprep.1 | 560 ++----- po-docs/ja/virt-sysprep.pod | 253 +--- po-docs/ja/virt-tail.pod | 65 +- po-docs/ja/virt-win-reg.1 | 156 +- .../{virt-win-reg.pod => virt-win-reg.in.pod} | 150 +- po-docs/podfiles | 3 +- po-docs/uk/Makefile.in | 8 +- po-docs/uk/blocksize-option.pod | 6 +- po-docs/uk/customize-options.pod | 229 +-- .../uk/guestfs-tools-release-notes-1.48.pod | 115 ++ po-docs/uk/key-option.pod | 4 +- po-docs/uk/keys-from-stdin-option.pod | 7 +- po-docs/uk/sysprep-extra-options.pod | 249 +--- po-docs/uk/sysprep-operations.pod | 123 +- po-docs/uk/virt-alignment-scan.1 | 191 +-- po-docs/uk/virt-alignment-scan.pod | 191 +-- po-docs/uk/virt-builder-repository.pod | 115 +- po-docs/uk/virt-builder.1 | 1319 +++++------------ po-docs/uk/virt-builder.pod | 1040 ++++--------- po-docs/uk/virt-cat.1 | 143 +- po-docs/uk/virt-cat.pod | 143 +- po-docs/uk/virt-customize.1 | 393 ++--- po-docs/uk/virt-customize.pod | 153 +- po-docs/uk/virt-df.1 | 130 +- po-docs/uk/virt-df.pod | 126 +- po-docs/uk/virt-dib.1 | 379 ++--- po-docs/uk/virt-dib.pod | 370 ++--- po-docs/uk/virt-diff.1 | 126 +- po-docs/uk/virt-diff.pod | 126 +- po-docs/uk/virt-edit.1 | 215 +-- po-docs/uk/virt-edit.pod | 215 +-- po-docs/uk/virt-filesystems.1 | 199 +-- po-docs/uk/virt-filesystems.pod | 195 +-- po-docs/uk/virt-format.1 | 82 +- po-docs/uk/virt-format.pod | 78 +- po-docs/uk/virt-get-kernel.1 | 99 +- po-docs/uk/virt-get-kernel.pod | 96 +- po-docs/uk/virt-index-validate.1 | 27 +- po-docs/uk/virt-index-validate.pod | 23 +- po-docs/uk/virt-inspector.1 | 278 +--- po-docs/uk/virt-inspector.pod | 260 +--- po-docs/uk/virt-log.1 | 63 +- po-docs/uk/virt-log.pod | 59 +- po-docs/uk/virt-ls.1 | 259 +--- po-docs/uk/virt-ls.pod | 253 +--- po-docs/uk/virt-make-fs.1 | 113 +- po-docs/uk/virt-make-fs.pod | 113 +- po-docs/uk/virt-resize.1 | 575 ++----- po-docs/uk/virt-resize.pod | 538 ++----- po-docs/uk/virt-sparsify.1 | 270 +--- po-docs/uk/virt-sparsify.pod | 261 +--- po-docs/uk/virt-sysprep.1 | 730 +++------ po-docs/uk/virt-sysprep.pod | 336 ++--- po-docs/uk/virt-tail.pod | 115 +- po-docs/uk/virt-win-reg.1 | 192 +-- po-docs/uk/virt-win-reg.in.pod | 295 ++++ po-docs/uk/virt-win-reg.pod | 383 ----- po/Makefile.am | 4 +- po/Makefile.in | 16 +- po/POTFILES-ml | 2 + po/POTFILES-pl | 2 +- po/guestfs-tools.pot | 359 ++--- resize/Makefile.am | 1 + resize/Makefile.in | 14 +- resize/resize.ml | 10 +- resize/test-virt-resize.pl | 4 +- resize/virt-resize.pod | 6 + sparsify/Makefile.am | 1 + sparsify/Makefile.in | 14 +- sparsify/copying.ml | 6 +- sparsify/in_place.ml | 7 +- ...rt-sparsify-in-place-fstrim-unsupported.sh | 2 - sparsify/test-virt-sparsify-in-place.sh | 2 - sparsify/test-virt-sparsify.sh | 2 - sparsify/virt-sparsify.pod | 6 + sysprep/Makefile.am | 2 + sysprep/Makefile.in | 15 +- sysprep/sysprep_operation_net_nmconn.ml | 43 + sysprep/sysprep_operation_net_nmconn.mli | 2 + sysprep/test-virt-sysprep-backup-files.sh | 2 - sysprep/test-virt-sysprep-passwords.sh | 2 - sysprep/virt-sysprep.pod | 6 + test-data/Makefile.in | 10 +- test-data/binaries/Makefile.in | 8 +- test-data/blank-disks/Makefile.in | 8 +- test-data/files/Makefile.in | 8 +- test-data/phony-guests/Makefile.am | 15 +- test-data/phony-guests/Makefile.in | 23 +- test-data/phony-guests/fedora.db | Bin 3207168 -> 3207168 bytes test-data/phony-guests/guests.xml.in | 22 +- test-data/phony-guests/make-fedora-img.pl | 64 +- test-functions.sh | 2 +- valgrind-suppressions | 77 +- win-reg/Makefile.am | 6 - win-reg/Makefile.in | 48 +- win-reg/{virt-win-reg => virt-win-reg.in} | 5 +- 283 files changed, 9440 insertions(+), 15754 deletions(-) create mode 100644 HACKING create mode 100755 bugs-in-changelog.sh create mode 100644 builder/templates/alma-8.5.index-fragment create mode 100644 builder/templates/alma-8.5.ks create mode 100644 builder/templates/alma-8.5.virt-install-cmd create mode 100644 builder/templates/centosstream-8.index-fragment create mode 100644 builder/templates/centosstream-8.ks create mode 100644 builder/templates/centosstream-8.virt-install-cmd create mode 100644 builder/templates/debian-11.index-fragment create mode 100644 builder/templates/debian-11.virt-install-cmd create mode 100644 builder/templates/fedora-34-armv7l.index-fragment create mode 100644 builder/templates/fedora-34-armv7l.ks create mode 100644 builder/templates/fedora-34-armv7l.virt-install-cmd create mode 100644 builder/templates/fedora-35-aarch64.index-fragment create mode 100644 builder/templates/fedora-35-aarch64.ks create mode 100644 builder/templates/fedora-35-aarch64.virt-install-cmd create mode 100644 builder/templates/fedora-35.index-fragment create mode 100644 builder/templates/fedora-35.ks create mode 100644 builder/templates/fedora-35.virt-install-cmd create mode 100644 builder/templates/rhel-8.3.ks create mode 100644 builder/templates/rhel-8.3.virt-install-cmd create mode 100644 builder/templates/rhel-8.4.ks create mode 100644 builder/templates/rhel-8.4.virt-install-cmd create mode 100644 builder/templates/rhel-8.5.ks create mode 100644 builder/templates/rhel-8.5.virt-install-cmd create mode 100644 common/mltools/on_exit.ml create mode 100644 common/mltools/on_exit.mli create mode 100644 docs/Makefile.am create mode 100644 docs/Makefile.in create mode 100644 docs/guestfs-tools-release-notes-1.48.pod create mode 100644 inspector/expected-fedora-luks-on-lvm.img.xml rename inspector/{expected-fedora-luks.img.xml => expected-fedora-lvm-on-luks.img.xml} (100%) create mode 100755 inspector/test-virt-inspector-luks-on-lvm.sh rename inspector/{test-virt-inspector-luks.sh => test-virt-inspector-lvm-on-luks.sh} (96%) create mode 100644 po-docs/ja/guestfs-tools-release-notes-1.48.pod rename po-docs/ja/{virt-win-reg.pod => virt-win-reg.in.pod} (62%) create mode 100644 po-docs/uk/guestfs-tools-release-notes-1.48.pod create mode 100644 po-docs/uk/virt-win-reg.in.pod delete mode 100644 po-docs/uk/virt-win-reg.pod create mode 100644 sysprep/sysprep_operation_net_nmconn.ml create mode 100644 sysprep/sysprep_operation_net_nmconn.mli rename win-reg/{virt-win-reg => virt-win-reg.in} (99%) diff --git a/.gitignore b/.gitignore index 006042a..87040a7 100644 --- a/.gitignore +++ b/.gitignore @@ -151,7 +151,8 @@ Makefile.in /test-data/phony-guests/debian.img /test-data/phony-guests/fedora.img /test-data/phony-guests/fedora-btrfs.img -/test-data/phony-guests/fedora-luks.img +/test-data/phony-guests/fedora-luks-on-lvm.img +/test-data/phony-guests/fedora-lvm-on-luks.img /test-data/phony-guests/fedora-md1.img /test-data/phony-guests/fedora-md2.img /test-data/phony-guests/fedora.db @@ -163,3 +164,4 @@ Makefile.in /test-data/phony-guests/windows-software /test-data/phony-guests/windows-system /website/*.html +/win-reg/virt-win-reg diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..9820662 --- /dev/null +++ b/HACKING @@ -0,0 +1,15 @@ +To learn how to compile guestfs-tools from sources: + + guestfs-building(1) or http://libguestfs.org/guestfs-building.1.html + +To learn how to extend guestfs-tools: + + guestfs-hacking(1) http://libguestfs.org/guestfs-hacking.1.html + +Although the above documentation applies specifically to libguestfs, +this project was split from that repo, and similar steps and principles +apply. + +For example, replace libguestfs with guestfs-tools in commands like: + + dnf builddep guestfs-tools diff --git a/Makefile.am b/Makefile.am index 28d92ba..6d9a65e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,6 +61,9 @@ SUBDIRS += bash # Perl tools. SUBDIRS += win-reg +# Miscellaneous documentation. +SUBDIRS += docs + # After all source files were used we can generate the translation strings SUBDIRS += po if HAVE_PO4A @@ -68,8 +71,10 @@ SUBDIRS += po-docs endif EXTRA_DIST = \ + HACKING \ README \ .gitignore \ + bugs-in-changelog.sh \ check-mli.sh \ common/.gitignore \ common/README \ @@ -138,6 +143,14 @@ TESTS = check-mli.sh build-test-guests: $(MAKE) -C test-data/phony-guests check +check-valgrind: build-test-guests + @errors=0; \ + for f in `grep -l '^$@:' $(SUBDIRS:%=%/Makefile.am)`; do \ + echo $(MAKE) -C `dirname $$f` $@; \ + $(MAKE) -C `dirname $$f` $@ || (( errors++ )); \ + done; \ + exit $$(( $$errors ? 1 : 0 )) + check-slow: build-test-guests @errors=0; \ for f in `grep -l '^$@:' $(SUBDIRS:%=%/Makefile.am)`; do \ diff --git a/Makefile.in b/Makefile.in index 5198257..e499185 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -209,9 +209,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -394,6 +391,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test @@ -422,7 +420,7 @@ DIST_SUBDIRS = gnulib/lib common/utils common/structs \ common/mlvisit common/mlxml common/mltools common/mlcustomize \ test-data align cat diff df edit format inspector make-fs \ customize builder builder/templates get-kernel resize sparsify \ - sysprep dib bash win-reg po po-docs + sysprep dib bash win-reg docs po po-docs am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/config.sh.in $(srcdir)/ocaml-dep.sh.in \ $(srcdir)/ocaml-link.sh.in $(srcdir)/podwrapper.pl.in \ @@ -440,8 +438,9 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/builder/test-website/virt-builder/repos.d/libguestfs.conf.in \ $(top_srcdir)/common-rules.mk COPYING COPYING.LIB README \ build-aux/compile build-aux/config.guess \ - build-aux/config.rpath build-aux/config.sub \ - build-aux/install-sh build-aux/ltmain.sh build-aux/missing + build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/ltmain.sh build-aux/missing \ + build-aux/ylwrap DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -480,6 +479,8 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -500,6 +501,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -510,6 +513,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -733,6 +737,8 @@ ACLOCAL_AMFLAGS = -I m4 # Perl tools. +# Miscellaneous documentation. + # After all source files were used we can generate the translation strings SUBDIRS = gnulib/lib common/utils common/structs common/mlstdutils \ common/mlutils common/mlpcre common/edit common/options \ @@ -741,10 +747,12 @@ SUBDIRS = gnulib/lib common/utils common/structs common/mlstdutils \ common/mltools common/mlcustomize test-data align cat diff df \ edit format inspector make-fs customize builder \ builder/templates get-kernel resize sparsify sysprep dib bash \ - win-reg po $(am__append_1) + win-reg docs po $(am__append_1) EXTRA_DIST = \ + HACKING \ README \ .gitignore \ + bugs-in-changelog.sh \ check-mli.sh \ common/.gitignore \ common/README \ @@ -1055,7 +1063,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1110,7 +1118,6 @@ check-mli.sh.log: check-mli.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -1260,7 +1267,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -1493,6 +1500,14 @@ clean-local: build-test-guests: $(MAKE) -C test-data/phony-guests check +check-valgrind: build-test-guests + @errors=0; \ + for f in `grep -l '^$@:' $(SUBDIRS:%=%/Makefile.am)`; do \ + echo $(MAKE) -C `dirname $$f` $@; \ + $(MAKE) -C `dirname $$f` $@ || (( errors++ )); \ + done; \ + exit $$(( $$errors ? 1 : 0 )) + check-slow: build-test-guests @errors=0; \ for f in `grep -l '^$@:' $(SUBDIRS:%=%/Makefile.am)`; do \ diff --git a/aclocal.m4 b/aclocal.m4 index 1547e3c..23960de 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3649,7 +3649,7 @@ fi AC_SUBST([$1])dnl ]) -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3664,7 +3664,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.2], [], +m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -3680,14 +3680,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.2])dnl +[AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3739,7 +3739,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3770,7 +3770,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3961,7 +3961,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4029,7 +4029,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4057,6 +4057,10 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -4093,7 +4097,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -4145,6 +4149,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -4226,7 +4244,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4247,7 +4265,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2020 Free Software Foundation, Inc. +# Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4268,7 +4286,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4311,7 +4329,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4332,12 +4350,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -4350,7 +4363,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4379,7 +4392,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4426,7 +4439,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4445,7 +4458,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4526,7 +4539,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2020 Free Software Foundation, Inc. +# Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4586,7 +4599,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4614,7 +4627,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -4633,7 +4646,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2020 Free Software Foundation, Inc. +# Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/align/Makefile.in b/align/Makefile.in index eca0c40..150935f 100644 --- a/align/Makefile.in +++ b/align/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -280,8 +280,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -437,6 +435,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -479,6 +478,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -489,6 +490,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1127,7 +1129,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1196,7 +1198,6 @@ test-virt-alignment-scan-guests.sh.log: test-virt-alignment-scan-guests.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/align/scan.c b/align/scan.c index 9db7ad7..c507e44 100644 --- a/align/scan.c +++ b/align/scan.c @@ -62,7 +62,6 @@ static int scan_work (guestfs_h *g, size_t i, FILE *fp); guestfs_h *g; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -216,7 +215,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 0); - assert (live == 0); /* Must be no extra arguments on the command line. */ if (optind != argc) diff --git a/bash/Makefile.in b/bash/Makefile.in index 2404a84..8b132aa 100644 --- a/bash/Makefile.in +++ b/bash/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -366,6 +366,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -408,6 +409,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -418,6 +421,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -860,7 +864,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -915,7 +919,6 @@ test-complete-in-script.sh.log: test-complete-in-script.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -990,8 +993,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@HAVE_BASH_COMPLETION_FALSE@install-data-local: @HAVE_BASH_COMPLETION_FALSE@clean-local: +@HAVE_BASH_COMPLETION_FALSE@install-data-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am diff --git a/bash/virt-alignment-scan b/bash/virt-alignment-scan index 73e3f2a..17d883d 100644 --- a/bash/virt-alignment-scan +++ b/bash/virt-alignment-scan @@ -1,5 +1,5 @@ # virt-tools bash completion script -*- shell-script -*- -# Copyright (C) 2010-2020 Red Hat Inc. +# Copyright (C) 2010-2021 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 @@ -54,7 +54,7 @@ _guestfs_virttools () COMPREPLY=( $( compgen -W "short long json" -- "$cur") ) return ;; --password-crypto) - COMPREPLY=( $( compgen -W "md5 sha256 sha512" -- "$cur") ) + COMPREPLY=( $( compgen -W "md5 sha256 sha512 yescrypt" -- "$cur") ) return ;; --unknown-filesystems) COMPREPLY=( $( compgen -W "ignore warn error" -- "$cur") ) diff --git a/bugs-in-changelog.sh b/bugs-in-changelog.sh new file mode 100755 index 0000000..52430e5 --- /dev/null +++ b/bugs-in-changelog.sh @@ -0,0 +1,58 @@ +#!/bin/bash - +# bugs-in-changelog.sh +# Copyright (C) 2009-2020 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. + +# Used when preparing the release notes. This script looks at the +# bugs noted in the git changelog since the last stable release (or +# any release). To use it, the only parameter should be the git +# commit range, eg: +# +# ./bugs-in-changelog.sh "1.0.89.." + +if [ -z "$1" ]; then + echo "$0 git-commit-range" + exit 1 +fi + +# Comma-separated list of Bugzilla IDs. +bugids=$( + git log "$1" | + egrep -io 'RHBZ#[0-9]+|https?://bugzilla.redhat.com/[a-z\.\?/_=]*[0-9]+' | + sed 's/^[^0-9]*//' | + sort -u | + tr '\n' ',' | + sed 's/,$//' +) + +#echo bugids "$bugids" + +# Filter out any bugs which may still be in NEW or ASSIGNED. +# +# Ensure user is logged in, otherwise bugzilla will silently truncate +# the number of responses. To log in, see "API KEYS" in bugzilla(1). +bugzilla \ + --ensure-logged-in \ + query \ + -b "$bugids" \ + -s MODIFIED,POST,ON_QA,PASSES_QA,VERIFIED,RELEASE_PENDING,CLOSED \ + --outputformat='%{bug_id} %{short_desc}' | + sort -n -r | + perl -pe ' + s{([0-9]+)\s+(.*)}{ + sprintf ("=item L\n\n%s\n", + $1, $2) + }xe' diff --git a/builder/Makefile.am b/builder/Makefile.am index f49a3b0..7827442 100644 --- a/builder/Makefile.am +++ b/builder/Makefile.am @@ -149,6 +149,7 @@ virt_builder_CFLAGS = \ -pthread \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -Wno-unused-macros \ + $(LIBGUESTFS_CFLAGS) \ $(LIBLZMA_CFLAGS) \ $(LIBTINFO_CFLAGS) \ $(LIBXML2_CFLAGS) @@ -200,6 +201,7 @@ OCAMLCLIBS = \ -lutils \ $(LIBTINFO_LIBS) \ $(LIBCRYPT_LIBS) \ + $(LIBGUESTFS_LIBS) \ $(LIBLZMA_LIBS) \ $(LIBXML2_LIBS) \ $(JANSSON_LIBS) \ @@ -447,7 +449,8 @@ virt_index_validate_CPPFLAGS = \ -I$(top_srcdir)/include virt_index_validate_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ - -Wno-unused-macros + -Wno-unused-macros \ + $(LIBGUESTFS_CFLAGS) virt_index_validate_LDADD = \ $(LTLIBINTL) \ ../gnulib/lib/libgnu.la diff --git a/builder/Makefile.in b/builder/Makefile.in index d9a81e3..b286787 100644 --- a/builder/Makefile.in +++ b/builder/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -370,8 +370,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -527,6 +525,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -571,6 +570,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -581,6 +582,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -951,6 +953,7 @@ noinst_DATA = $(am__append_5) \ @HAVE_OCAML_TRUE@ -pthread \ @HAVE_OCAML_TRUE@ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ @HAVE_OCAML_TRUE@ -Wno-unused-macros \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBLZMA_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBTINFO_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBXML2_CFLAGS) @@ -994,6 +997,7 @@ noinst_DATA = $(am__append_5) \ @HAVE_OCAML_TRUE@ -lutils \ @HAVE_OCAML_TRUE@ $(LIBTINFO_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBCRYPT_LIBS) \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBLZMA_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ @HAVE_OCAML_TRUE@ $(JANSSON_LIBS) \ @@ -1134,7 +1138,8 @@ virt_index_validate_CPPFLAGS = \ virt_index_validate_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ - -Wno-unused-macros + -Wno-unused-macros \ + $(LIBGUESTFS_CFLAGS) virt_index_validate_LDADD = \ $(LTLIBINTL) \ @@ -1800,7 +1805,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1988,7 +1993,6 @@ index_parser_tests.log: index_parser_tests$(EXEEXT) @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -2037,7 +2041,8 @@ installdirs: done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -2183,7 +2188,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-man \ uninstall-man: uninstall-man1 -.MAKE: all check check-am install install-am install-strip +.MAKE: all check check-am install install-am install-exec \ + install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ diff --git a/builder/builder.ml b/builder/builder.ml index 6dbe7a1..2c9c830 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -182,7 +182,7 @@ let main () = * create. *) let tmpdir = Mkdtemp.temp_dir "virt-builder." in - rmdir_on_exit tmpdir; + On_exit.rmdir tmpdir; (* Download the sources. *) let downloader = Downloader.create ~curl:cmdline.curl ~cache ~tmpdir in @@ -305,7 +305,7 @@ let main () = let progress_bar = not (quiet ()) in Downloader.download downloader ~template ~progress_bar ~proxy file_uri in - if delete_on_exit then unlink_on_exit template; + if delete_on_exit then On_exit.unlink template; template in (* Check the signature of the file. *) @@ -331,7 +331,7 @@ let main () = | { Index.signature_uri = Some signature_uri } -> let sigfile, delete_on_exit = Downloader.download downloader signature_uri in - if delete_on_exit then unlink_on_exit sigfile; + if delete_on_exit then On_exit.unlink sigfile; Some sigfile in Sigchecker.verify_detached sigchecker template sigfile in @@ -473,7 +473,7 @@ let main () = * to choose unique tempfiles per transition, so this is OK: *) let tempfile = Filename.temp_file ~temp_dir:cache_dir "vb" ".img" in - unlink_on_exit tempfile; + On_exit.unlink tempfile; (* Always possible to copy from one place to another. The only * thing a copy does is to remove the template tag (since it's always diff --git a/builder/downloader.ml b/builder/downloader.ml index 424c9cd..5a55a49 100644 --- a/builder/downloader.ml +++ b/builder/downloader.ml @@ -78,7 +78,7 @@ and download_to t ?(progress_bar = false) ~proxy uri filename = * atomically rename it to the final filename. *) let filename_new = filename ^ "." ^ String.random8 () in - unlink_on_exit filename_new; + On_exit.unlink filename_new; (match parseduri.URI.protocol with (* Download (ie. copy) from a local file. *) diff --git a/builder/index_parser_tests.ml b/builder/index_parser_tests.ml index 2123f9b..39983fa 100644 --- a/builder/index_parser_tests.ml +++ b/builder/index_parser_tests.ml @@ -28,7 +28,7 @@ open Tools_utils let tmpdir = let tmpdir = Mkdtemp.temp_dir "guestfs-tests." in - rmdir_on_exit tmpdir; + On_exit.rmdir tmpdir; tmpdir let dummy_sigchecker = Sigchecker.create ~gpg:"gpg" diff --git a/builder/pxzcat.ml b/builder/pxzcat.ml index b34b436..fcd5793 100644 --- a/builder/pxzcat.ml +++ b/builder/pxzcat.ml @@ -17,4 +17,4 @@ *) external pxzcat : string -> string -> unit = "virt_builder_pxzcat" -external using_parallel_xzcat : unit -> bool = "virt_builder_using_parallel_xzcat" "noalloc" +external using_parallel_xzcat : unit -> bool = "virt_builder_using_parallel_xzcat" [@@noalloc] diff --git a/builder/repository_main.ml b/builder/repository_main.ml index 39250d9..c5b6563 100644 --- a/builder/repository_main.ml +++ b/builder/repository_main.ml @@ -420,7 +420,7 @@ let main () = (* Create a temporary folder to work in *) let tmpdir = Mkdtemp.temp_dir ~base_dir:cmdline.repo "virt-builder-repository." in - rmdir_on_exit tmpdir; + On_exit.rmdir tmpdir; let tmprepo = tmpdir // "repo" in mkdir_p tmprepo 0o700; diff --git a/builder/templates/Makefile.in b/builder/templates/Makefile.in index f565a3e..af8d3ec 100644 --- a/builder/templates/Makefile.in +++ b/builder/templates/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -368,6 +368,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -409,6 +410,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -419,6 +422,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -835,7 +839,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -890,7 +894,6 @@ validate.sh.log: validate.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/builder/templates/alma-8.5.index-fragment b/builder/templates/alma-8.5.index-fragment new file mode 100644 index 0000000..598741e --- /dev/null +++ b/builder/templates/alma-8.5.index-fragment @@ -0,0 +1,19 @@ +[alma-8.5] +name=AlmaLinux 8.5 +osinfo=almalinux8 +arch=x86_64 +file=alma-8.5.xz +checksum[sha512]=f5e50e4eeb56e0fe17436210bc1218a72999f581fff787e748b161646a38661722818455bdee3c1ffed81df3302d913b78de562f2095e1b9dd0539e6990a861d +format=raw +size=6442450944 +compressed_size=496571356 +expand=/dev/sda4 +notes=AlmaLinux 8.5 + + This AlmaLinux image contains only unmodified @Core group packages. + + This template was generated by a script in the libguestfs source tree: + builder/templates/make-template.ml + Associated files used to prepare this template can be found in the + same directory. + diff --git a/builder/templates/alma-8.5.ks b/builder/templates/alma-8.5.ks new file mode 100644 index 0000000..d926228 --- /dev/null +++ b/builder/templates/alma-8.5.ks @@ -0,0 +1,29 @@ +# Kickstart file for alma-8.5 +# Generated by libguestfs.git/builder/templates/make-template.ml + +install +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +# EOF diff --git a/builder/templates/alma-8.5.virt-install-cmd b/builder/templates/alma-8.5.virt-install-cmd new file mode 100644 index 0000000..76382ad --- /dev/null +++ b/builder/templates/alma-8.5.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'alma-8.5' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-pev56f7p' \ + '--ram=4096' \ + '--arch=x86_64' \ + '--cpu=host' \ + '--vcpus=4' \ + '--os-variant=almalinux8' \ + '--initrd-inject=alma-8.5.ks' \ + '--extra-args=inst.ks=file:/alma-8.5.ks inst.repo=http://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/ console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-pev56f7p.img,size=6,format=raw' \ + '--location=http://mirror.cov.ukservers.com/almalinux/8.5/BaseOS/x86_64/kickstart/' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/templates/centosstream-8.index-fragment b/builder/templates/centosstream-8.index-fragment new file mode 100644 index 0000000..13cbbea --- /dev/null +++ b/builder/templates/centosstream-8.index-fragment @@ -0,0 +1,19 @@ +[centosstream-8] +name=CentOS Stream 8 +osinfo=centosstream8 +arch=x86_64 +file=centosstream-8.xz +checksum[sha512]=73668d92f2b028820ed7ec01367f16cff12c4a62c2b9dcd3c56d7ea3aefa25f45f03d859a0f047dd264db3bfc69e8bc95aa48e6bd350b41e2353a97e5d95fdb1 +format=raw +size=6442450944 +compressed_size=471938880 +expand=/dev/sda4 +notes=CentOS Stream 8 + + This CentOS Stream image contains only unmodified @Core group packages. + + This template was generated by a script in the libguestfs source tree: + builder/templates/make-template.ml + Associated files used to prepare this template can be found in the + same directory. + diff --git a/builder/templates/centosstream-8.ks b/builder/templates/centosstream-8.ks new file mode 100644 index 0000000..098e33e --- /dev/null +++ b/builder/templates/centosstream-8.ks @@ -0,0 +1,29 @@ +# Kickstart file for centosstream-8 +# Generated by libguestfs.git/builder/templates/make-template.ml + +install +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +# EOF diff --git a/builder/templates/centosstream-8.virt-install-cmd b/builder/templates/centosstream-8.virt-install-cmd new file mode 100644 index 0000000..6b66b3f --- /dev/null +++ b/builder/templates/centosstream-8.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'centosstream-8' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-parkabak' \ + '--ram=4096' \ + '--arch=x86_64' \ + '--cpu=host' \ + '--vcpus=4' \ + '--os-variant=rhel8.0' \ + '--initrd-inject=centosstream-8.ks' \ + '--extra-args=ks=file:/centosstream-8.ks console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \ + '--disk=/data/src/guestfs-tools/builder/templates/tmp-parkabak.img,size=6,format=raw' \ + '--location=http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/templates/debian-11.index-fragment b/builder/templates/debian-11.index-fragment new file mode 100644 index 0000000..3460ff6 --- /dev/null +++ b/builder/templates/debian-11.index-fragment @@ -0,0 +1,24 @@ +[debian-11] +name=Debian 11 (bullseye) +osinfo=debian11 +arch=x86_64 +file=debian-11.xz +checksum[sha512]=c44a82bde9d7d5478ca9ed6ddbfd199237216f2c90896cb2cf07d3b9439f4bfcdc0b370d5e848d347bbd6f73b3f860f3c015901843b9756937a72d0505e0804a +format=raw +size=6442450944 +compressed_size=233468380 +expand=/dev/sda1 +notes=Debian 11 (bullseye) + + This is a minimal Debian install. + + This image is so very minimal that it only includes an ssh server + This image does not contain SSH host keys. To regenerate them use: + + --firstboot-command "dpkg-reconfigure openssh-server" + + This template was generated by a script in the libguestfs source tree: + builder/templates/make-template.ml + Associated files used to prepare this template can be found in the + same directory. + diff --git a/builder/templates/debian-11.virt-install-cmd b/builder/templates/debian-11.virt-install-cmd new file mode 100644 index 0000000..072831d --- /dev/null +++ b/builder/templates/debian-11.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'debian-11' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-cndg6a6p' \ + '--ram=4096' \ + '--arch=x86_64' \ + '--cpu=host' \ + '--vcpus=4' \ + '--os-variant=debian8' \ + '--initrd-inject=/tmp/fltk7gd4.tmp/preseed.cfg' \ + '--extra-args=auto mirror/http/proxy= console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-cndg6a6p.img,size=6,format=raw' \ + '--location=http://deb.debian.org/debian/dists/bullseye/main/installer-amd64' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/templates/fedora-34-armv7l.index-fragment b/builder/templates/fedora-34-armv7l.index-fragment new file mode 100644 index 0000000..4fd6620 --- /dev/null +++ b/builder/templates/fedora-34-armv7l.index-fragment @@ -0,0 +1,26 @@ +[fedora-34] +name=Fedora® 34 Server (armv7l) +osinfo=fedora34 +arch=armv7l +file=fedora-34-armv7l.xz +revision=2 +checksum[sha512]=99ea2c9c987d0bf78ceaceb729883969e49f3785e6508cee10259fa472721d2fa23bdcc98ec64d57a032b021292470061fd0d4652970a561562d89a8977eda81 +format=raw +size=6442450944 +compressed_size=396629488 +expand=/dev/sda3 +notes=Fedora® 34 Server (armv7l) + + This Fedora image contains only unmodified @Core group packages. + + Fedora and the Infinity design logo are trademarks of Red Hat, Inc. + Source and further information is available from http://fedoraproject.org/ + + You will need to use the associated UEFI NVRAM variables file: + http://libguestfs.org/download/builder/fedora-34-armv7l-nvram.xz + + This template was generated by a script in the libguestfs source tree: + builder/templates/make-template.ml + Associated files used to prepare this template can be found in the + same directory. + diff --git a/builder/templates/fedora-34-armv7l.ks b/builder/templates/fedora-34-armv7l.ks new file mode 100644 index 0000000..297efe9 --- /dev/null +++ b/builder/templates/fedora-34-armv7l.ks @@ -0,0 +1,35 @@ +# Kickstart file for fedora-34-armv7l +# Generated by libguestfs.git/builder/templates/make-template.ml + +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=tty0 console=ttyAMA0,115200 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +%post +# Ensure the installation is up-to-date. +# This makes Fedora >= 33 unbootable, see: +# https://bugzilla.redhat.com/show_bug.cgi?id=1911177 +#dnf -y --best upgrade +%end + +# EOF diff --git a/builder/templates/fedora-34-armv7l.virt-install-cmd b/builder/templates/fedora-34-armv7l.virt-install-cmd new file mode 100644 index 0000000..7b5a890 --- /dev/null +++ b/builder/templates/fedora-34-armv7l.virt-install-cmd @@ -0,0 +1,21 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'fedora-34-armv7l' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-wm0yz2f0' \ + '--ram=4096' \ + '--arch=armv7l' \ + '--machine=virt-2.11' \ + '--vcpus=1' \ + '--os-variant=fedora34' \ + '--boot' 'loader=/usr/share/edk2/arm/QEMU_EFI-pflash.raw,loader_ro=yes,loader_type=pflash,nvram=/home/rjones/d/guestfs-tools/builder/templates/tmp-wm0yz2f0.vars' \ + '--initrd-inject=fedora-34-armv7l.ks' \ + '--extra-args=inst.ks=file:/fedora-34-armv7l.ks console=tty0 console=ttyAMA0,115200 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-wm0yz2f0.img,size=6,format=raw' \ + '--location=https://mirror.bytemark.co.uk/fedora/linux/releases/34/Server/armhfp/os/' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/templates/fedora-35-aarch64.index-fragment b/builder/templates/fedora-35-aarch64.index-fragment new file mode 100644 index 0000000..da3901c --- /dev/null +++ b/builder/templates/fedora-35-aarch64.index-fragment @@ -0,0 +1,25 @@ +[fedora-35] +name=Fedora® 35 Server (aarch64) +osinfo=fedora35 +arch=aarch64 +file=fedora-35-aarch64.xz +checksum[sha512]=4315b72c67a00b7d3efb606145fcf648baf2a991228f47d57e64e17885ff93567b2510751e78ca749842b22d33ff704db545ba28b42b03f3683c042dceceb4bd +format=raw +size=6442450944 +compressed_size=473245720 +expand=/dev/sda3 +notes=Fedora® 35 Server (aarch64) + + This Fedora image contains only unmodified @Core group packages. + + Fedora and the Infinity design logo are trademarks of Red Hat, Inc. + Source and further information is available from http://fedoraproject.org/ + + You will need to use the associated UEFI NVRAM variables file: + http://libguestfs.org/download/builder/fedora-35-aarch64-nvram.xz + + This template was generated by a script in the libguestfs source tree: + builder/templates/make-template.ml + Associated files used to prepare this template can be found in the + same directory. + diff --git a/builder/templates/fedora-35-aarch64.ks b/builder/templates/fedora-35-aarch64.ks new file mode 100644 index 0000000..e1b6f9d --- /dev/null +++ b/builder/templates/fedora-35-aarch64.ks @@ -0,0 +1,35 @@ +# Kickstart file for fedora-35-aarch64 +# Generated by libguestfs.git/builder/templates/make-template.ml + +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel no_timer_check printk.time=1 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +%post +# Ensure the installation is up-to-date. +# This makes Fedora >= 33 unbootable, see: +# https://bugzilla.redhat.com/show_bug.cgi?id=1911177 +#dnf -y --best upgrade +%end + +# EOF diff --git a/builder/templates/fedora-35-aarch64.virt-install-cmd b/builder/templates/fedora-35-aarch64.virt-install-cmd new file mode 100644 index 0000000..b1744b5 --- /dev/null +++ b/builder/templates/fedora-35-aarch64.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'fedora-35-aarch64' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-fd1rfc4g' \ + '--ram=4096' \ + '--arch=aarch64' \ + '--vcpus=1' \ + '--os-variant=fedora34' \ + '--boot' 'loader=/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw,loader_ro=yes,loader_type=pflash,nvram=/home/rjones/d/guestfs-tools/builder/templates/tmp-fd1rfc4g.vars' \ + '--initrd-inject=fedora-35-aarch64.ks' \ + '--extra-args=inst.ks=file:/fedora-35-aarch64.ks console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel no_timer_check printk.time=1 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-fd1rfc4g.img,size=6,format=raw' \ + '--location=https://mirror.bytemark.co.uk/fedora/linux/releases/35/Server/aarch64/os/' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/templates/fedora-35.index-fragment b/builder/templates/fedora-35.index-fragment new file mode 100644 index 0000000..88d3c68 --- /dev/null +++ b/builder/templates/fedora-35.index-fragment @@ -0,0 +1,22 @@ +[fedora-35] +name=Fedora® 35 Server +osinfo=fedora35 +arch=x86_64 +file=fedora-35.xz +checksum[sha512]=bd5d6c1311463b7bee3c3743ab14ad05dfbfedc135933c519015e62ebd127d904be7222391fb73c4631044e44b5f70038a28d87b5a6be1508bca752517929415 +format=raw +size=6442450944 +compressed_size=474387772 +expand=/dev/sda3 +notes=Fedora® 35 Server + + This Fedora image contains only unmodified @Core group packages. + + Fedora and the Infinity design logo are trademarks of Red Hat, Inc. + Source and further information is available from http://fedoraproject.org/ + + This template was generated by a script in the libguestfs source tree: + builder/templates/make-template.ml + Associated files used to prepare this template can be found in the + same directory. + diff --git a/builder/templates/fedora-35.ks b/builder/templates/fedora-35.ks new file mode 100644 index 0000000..a7411cd --- /dev/null +++ b/builder/templates/fedora-35.ks @@ -0,0 +1,45 @@ +# Kickstart file for fedora-35 +# Generated by libguestfs.git/builder/templates/make-template.ml + +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +%post +# Ensure the installation is up-to-date. +# This makes Fedora >= 33 unbootable, see: +# https://bugzilla.redhat.com/show_bug.cgi?id=1911177 +#dnf -y --best upgrade +# Enable Xen domU support. +pushd /etc/dracut.conf.d +echo 'add_drivers+=" xen:vbd xen:vif "' > virt-builder-xen-drivers.conf +popd +# To make dracut config changes permanent, we need to rerun dracut. +# Rerun dracut for the installed kernel (not the running kernel). +# See commit 0fa52e4e45d80874bc5ea5f112f74be1d3f3472f and +# https://www.redhat.com/archives/libguestfs/2014-June/thread.html#00045 +KERNEL_VERSION="$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n' | sort -V | tail -1)" +dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION +%end + +# EOF diff --git a/builder/templates/fedora-35.virt-install-cmd b/builder/templates/fedora-35.virt-install-cmd new file mode 100644 index 0000000..09a47b3 --- /dev/null +++ b/builder/templates/fedora-35.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'fedora-35' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-4qrk2p3m' \ + '--ram=4096' \ + '--arch=x86_64' \ + '--cpu=host' \ + '--vcpus=4' \ + '--os-variant=fedora34' \ + '--initrd-inject=fedora-35.ks' \ + '--extra-args=inst.ks=file:/fedora-35.ks console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-4qrk2p3m.img,size=6,format=raw' \ + '--location=https://mirror.bytemark.co.uk/fedora/linux/releases/35/Server/x86_64/os/' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml index b7120a0..2e4b53d 100755 --- a/builder/templates/make-template.ml +++ b/builder/templates/make-template.ml @@ -1,6 +1,6 @@ #!/usr/bin/env ocaml (* libguestfs - * Copyright (C) 2016-2020 Red Hat Inc. + * Copyright (C) 2016-2022 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 @@ -75,7 +75,9 @@ let () = ;; type os = + | Alma of int * int (* major, minor *) | CentOS of int * int (* major, minor *) + | CentOSStream of int (* major *) | RHEL of int * int | Debian of int * string (* version, dist name like "wheezy" *) | Ubuntu of string * string @@ -138,6 +140,9 @@ let rec main () = | Aarch64 -> "/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw", "/usr/share/edk2/aarch64/vars-template-pflash.raw" + | Armv7 -> + "/usr/share/edk2/arm/QEMU_EFI-pflash.raw", + "/usr/share/edk2/arm/vars-template-pflash.raw" | _ -> assert false in let vars_out = Sys.getcwd () // sprintf "%s.vars" tmpname in @@ -345,13 +350,16 @@ Options: and os_of_string os ver = match os, ver with + | "alma", ver -> let maj, min = parse_major_minor ver in Alma (maj, min) | "centos", ver -> let maj, min = parse_major_minor ver in CentOS (maj, min) + | "centosstream", ver -> CentOSStream(int_of_string ver) | "rhel", ver -> let maj, min = parse_major_minor ver in RHEL (maj, min) | "debian", "6" -> Debian (6, "squeeze") | "debian", "7" -> Debian (7, "wheezy") | "debian", "8" -> Debian (8, "jessie") | "debian", "9" -> Debian (9, "stretch") | "debian", "10" -> Debian (10, "buster") + | "debian", "11" -> Debian (11, "bullseye") | "ubuntu", "10.04" -> Ubuntu (ver, "lucid") | "ubuntu", "12.04" -> Ubuntu (ver, "precise") | "ubuntu", "14.04" -> Ubuntu (ver, "trusty") @@ -421,9 +429,15 @@ and filename_of_os os arch ext = | Fedora ver -> if arch = X86_64 then sprintf "fedora-%d%s" ver ext else sprintf "fedora-%d-%s%s" ver (string_of_arch arch) ext + | Alma (major, minor) -> + if arch = X86_64 then sprintf "alma-%d.%d%s" major minor ext + else sprintf "alma-%d.%d-%s%s" major minor (string_of_arch arch) ext | CentOS (major, minor) -> if arch = X86_64 then sprintf "centos-%d.%d%s" major minor ext else sprintf "centos-%d.%d-%s%s" major minor (string_of_arch arch) ext + | CentOSStream ver -> + if arch = X86_64 then sprintf "centosstream-%d%s" ver ext + else sprintf "centosstream-%d-%s%s" ver (string_of_arch arch) ext | RHEL (major, minor) -> if arch = X86_64 then sprintf "rhel-%d.%d%s" major minor ext else sprintf "rhel-%d.%d-%s%s" major minor (string_of_arch arch) ext @@ -450,7 +464,9 @@ and string_of_os os arch = filename_of_os os arch "" (* This is what virt-builder called "os-version". *) and string_of_os_noarch = function | Fedora ver -> sprintf "fedora-%d" ver + | Alma (major, minor) -> sprintf "alma-%d.%d" major minor | CentOS (major, minor) -> sprintf "centos-%d.%d" major minor + | CentOSStream ver -> sprintf "centosstream-%d" ver | RHEL (major, minor) -> sprintf "rhel-%d.%d" major minor | Debian (ver, _) -> sprintf "debian-%d" ver | Ubuntu (ver, _) -> sprintf "ubuntu-%s" ver @@ -460,25 +476,27 @@ and string_of_os_noarch = function (* Does virt-sysprep know how to sysprep this OS? *) and can_sysprep_os = function - | RHEL _ | CentOS _ | Fedora _ | Debian _ | Ubuntu _ -> true + | RHEL _ | Alma _ | CentOS _ | CentOSStream _ | Fedora _ + | Debian _ | Ubuntu _ -> true | FreeBSD _ | Windows _ -> false and is_selinux_os = function - | RHEL _ | CentOS _ | Fedora _ -> true + | RHEL _ | Alma _ | CentOS _ | CentOSStream _ | Fedora _ -> true | Debian _ | Ubuntu _ | FreeBSD _ | Windows _ -> false and needs_uefi os arch = match os, arch with + | Fedora _, Armv7 | Fedora _, Aarch64 | RHEL _, Aarch64 -> true - | RHEL _, _ | CentOS _, _ | Fedora _, _ + | RHEL _, _ | Alma _, _ | CentOS _, _ | CentOSStream _, _ | Fedora _, _ | Debian _, _ | Ubuntu _, _ | FreeBSD _, _ | Windows _, _ -> false and get_virtual_size_gb os arch = match os with - | RHEL _ | CentOS _ | Fedora _ + | RHEL _ | Alma _ | CentOS _ | CentOSStream _ | Fedora _ | Debian _ | Ubuntu _ | FreeBSD _ -> 6 | Windows (10, _, _) -> 40 (* Windows 10 *) @@ -489,7 +507,7 @@ and get_virtual_size_gb os arch = and make_kickstart os arch = match os with (* Kickstart. *) - | Fedora _ | CentOS _ | RHEL _ -> + | Fedora _ | Alma _ | CentOS _ | CentOSStream _ | RHEL _ -> let ks_filename = filename_of_os os arch ".ks" in Some (make_kickstart_common ks_filename os arch) @@ -516,7 +534,8 @@ and make_kickstart_common ks_filename os arch = (* Fedora 34+ removes the "install" keyword. *) (match os with | Fedora n when n >= 34 -> () - | RHEL (n, _) | CentOS (n, _) when n >= 9 -> () + | RHEL (n, _) + | Alma (n, _) | CentOS (n, _) | CentOSStream n when n >= 9 -> () | _ -> bpf "install\n"; ); @@ -562,7 +581,7 @@ mouse generic *) (match os with | CentOS (8, _) -> - bpf "url --url=\"http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os\"\n" + bpf "url --url=\"https://vault.centos.org/8.5.2111/BaseOS/x86_64/os/\"\n" | _ -> () ); bpf "\n"; @@ -578,7 +597,7 @@ part /boot --fstype=%s --size=512 --asprimary part swap --size=1024 --asprimary part / --fstype=%s --size=1024 --grow --asprimary " bootfs rootfs; - | CentOS _ | RHEL _ | Fedora _ -> + | Alma _ | CentOS _ | CentOSStream _ | RHEL _ | Fedora _ -> bpf "\ zerombr clearpart --all --initlabel --disklabel=gpt @@ -836,6 +855,11 @@ and make_unattend_iso os arch = and make_boot_media os arch = match os, arch with + | Alma (major, minor), X86_64 -> + (* UK mirror *) + Location (sprintf "http://mirror.cov.ukservers.com/almalinux/%d.%d/BaseOS/x86_64/kickstart/" + major minor) + | CentOS (major, _), Aarch64 -> (* XXX This always points to the latest CentOS, so * effectively the minor number is always ignored. @@ -852,7 +876,11 @@ and make_boot_media os arch = Location "http://mirror.centos.org/centos-7/7/os/x86_64/" | CentOS (8, _), X86_64 -> - Location "http://mirror.centos.org/centos-8/8/BaseOS/x86_64/kickstart" + (* This is probably the last CentOS 8 release. *) + Location "https://vault.centos.org/8.5.2111/BaseOS/x86_64/kickstart/" + + | CentOSStream ver, X86_64 -> + Location (sprintf "http://mirror.centos.org/centos/%d-stream/BaseOS/x86_64/os" ver) | Debian (_, dist), arch -> Location (sprintf "http://deb.debian.org/debian/dists/%s/main/installer-%s" @@ -981,7 +1009,8 @@ The FreeBSD install is not automated. Select all defaults, except: (* If the install is not automated and we need a graphical console. *) and needs_graphics = function - | CentOS _ | RHEL _ | Debian _ | Ubuntu _ | Fedora _ -> false + | Alma _ | CentOS _ | CentOSStream _ | RHEL _ + | Debian _ | Ubuntu _ | Fedora _ -> false | FreeBSD _ | Windows _ -> true (* NB: Arguments do not need to be quoted, because we pass them @@ -1034,6 +1063,10 @@ and make_virt_install_command os arch ks tmpname tmpout tmpefivars add "--machine=pseries"; add "--cpu=power8"; add "--vcpus=1" + | Armv7 -> + add "--arch=armv7l"; + add "--machine=virt-2.11"; (* RHBZ#1633328, RHBZ#2003706 *) + add "--vcpus=1" | arch -> add (sprintf "--arch=%s" (string_of_arch arch)); add "--vcpus=1" @@ -1052,7 +1085,7 @@ and make_virt_install_command os arch ks tmpname tmpout tmpefivars (* --initrd-inject and --extra-args flags for Linux only. *) (match os with | Debian _ | Ubuntu _ - | Fedora _ | RHEL _ | CentOS _ -> + | Fedora _ | RHEL _ | Alma _ | CentOS _ | CentOSStream _ -> let ks = match ks with None -> assert false | Some ks -> ks in add (sprintf "--initrd-inject=%s" ks); @@ -1062,9 +1095,15 @@ and make_virt_install_command os arch ks tmpname tmpout tmpefivars | Debian _ | Ubuntu _ -> "auto" | Fedora n when n >= 34 -> sprintf "inst.ks=file:/%s" (Filename.basename ks) - | RHEL (n, _) | CentOS (n, _) when n >= 9 -> + | Alma (major, _) -> + (* This is only required because of missing osinfo-db data. + * https://bugs.almalinux.org/view.php?id=127 + * Once this is fixed, do the same as CentOS below. + *) + sprintf "inst.ks=file:/%s inst.repo=http://repo.almalinux.org/almalinux/%d/BaseOS/x86_64/os/" (Filename.basename ks) major + | RHEL (n, _) | CentOS (n, _) | CentOSStream n when n >= 9 -> sprintf "inst.ks=file:/%s" (Filename.basename ks) - | Fedora _ | RHEL _ | CentOS _ -> + | Fedora _ | RHEL _ | CentOS _ | CentOSStream _ -> sprintf "ks=file:/%s" (Filename.basename ks) | FreeBSD _ | Windows _ -> assert false in let proxy = @@ -1072,15 +1111,19 @@ and make_virt_install_command os arch ks tmpname tmpout tmpefivars match p with | None -> (match os with - | Fedora _ | RHEL _ | CentOS _ | Ubuntu _ -> "" + | Fedora _ | RHEL _ | Alma _ | CentOS _ | CentOSStream _ + | Ubuntu _ -> "" | Debian _ -> "mirror/http/proxy=" | FreeBSD _ | Windows _ -> assert false ) | Some p -> match os with | Fedora n when n >= 34 -> sprintf "inst.proxy=" ^ p - | RHEL (n, _) | CentOS (n, _) when n >= 9 -> "inst.proxy=" ^ p - | Fedora _ | RHEL _ | CentOS _ -> "proxy=" ^ p + | RHEL (n, _) + | Alma (n, _) | CentOS (n, _) | CentOSStream n when n >= 9 -> + "inst.proxy=" ^ p + | Fedora _ | RHEL _ | Alma _ | CentOS _ | CentOSStream _ -> + "proxy=" ^ p | Debian _ | Ubuntu _ -> "mirror/http/proxy=" ^ p | FreeBSD _ | Windows _ -> assert false in @@ -1137,7 +1180,9 @@ and os_variant_of_os ?(for_fedora = false) os arch = if not for_fedora then ( match os with | Fedora ver -> sprintf "fedora%d" ver + | Alma (major, _) -> sprintf "almalinux%d" major | CentOS (major, minor) -> sprintf "centos%d.%d" major minor + | CentOSStream ver -> sprintf "centosstream%d" ver | RHEL (major, minor) -> sprintf "rhel%d.%d" major minor | Debian (ver, _) -> sprintf "debian%d" ver | Ubuntu (ver, _) -> sprintf "ubuntu%s" ver @@ -1159,13 +1204,18 @@ and os_variant_of_os ?(for_fedora = false) os arch = | Fedora _, (PPC64|PPC64le) -> "fedora22" | Fedora ver, _ when ver <= 23 -> sprintf "fedora%d" ver - | Fedora _, _ -> "fedora26" (* max version known in Fedora 28 *) + | Fedora _, _ -> "fedora34" (* max version known in Fedora 34 *) + + | Alma (major, _), _ -> sprintf "almalinux%d" major | CentOS (8, _), _ -> "rhel8.0" (* temporary until osinfo updated *) | CentOS (major, minor), _ when (major, minor) <= (7,0) -> sprintf "centos%d.%d" major minor | CentOS _, _ -> "centos7.0" (* max version known in Fedora 31 *) + | CentOSStream 8, _ -> "rhel8.0" (* temporary until osinfo updated *) + | CentOSStream _, _ -> "rhel8.0" (* min known version is 8 *) + | RHEL (6, minor), _ when minor <= 8 -> sprintf "rhel6.%d" minor | RHEL (6, _), _ -> "rhel6.9" (* max version known in Fedora 29 *) @@ -1205,8 +1255,8 @@ and kernel_cmdline_of_os os arch = "console=tty0 console=ttyAMA0,115200 rd_NO_PLYMOUTH" | (Debian _|Fedora _|Ubuntu _), (PPC64|PPC64le) -> "console=tty0 console=hvc0 rd_NO_PLYMOUTH" - | (RHEL _|CentOS _), PPC64 - | (RHEL _|CentOS _), PPC64le -> + | (RHEL _ | Alma _ | CentOS _ | CentOSStream _), PPC64 + | (RHEL _ | Alma _ | CentOS _ | CentOSStream _), PPC64le -> "console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" | FreeBSD _, _ | Windows _, _ -> assert false @@ -1231,7 +1281,8 @@ and make_postinstall os arch = g#write "/etc/yum.repos.d/download.devel.redhat.com.repo" yum_conf ) - | RHEL _ | Fedora _ | CentOS _ | FreeBSD _ | Windows _ -> None + | RHEL _ | Fedora _ | Alma _ | CentOS _ | CentOSStream _ + | FreeBSD _ | Windows _ -> None and make_rhel_yum_conf major minor arch = let buf = Buffer.create 4096 in @@ -1379,10 +1430,18 @@ and make_index_fragment os arch index_fragment output nvram revision and long_name_of_os os arch = match os, arch with + | Alma (major, minor), X86_64 -> + sprintf "AlmaLinux %d.%d" major minor + | Alma (major, minor), arch -> + sprintf "AlmaLinux %d.%d (%s)" major minor (string_of_arch arch) | CentOS (major, minor), X86_64 -> sprintf "CentOS %d.%d" major minor | CentOS (major, minor), arch -> sprintf "CentOS %d.%d (%s)" major minor (string_of_arch arch) + | CentOSStream ver, X86_64 -> + sprintf "CentOS Stream %d" ver + | CentOSStream ver, arch -> + sprintf "CentOS Stream %d (%s)" ver (string_of_arch arch) | Debian (ver, dist), X86_64 -> sprintf "Debian %d (%s)" ver dist | Debian (ver, dist), arch -> @@ -1425,8 +1484,12 @@ and notes_of_os os arch nvram = add ""; (match os with + | Alma _ -> + add "This AlmaLinux image contains only unmodified @Core group packages." | CentOS _ -> add "This CentOS image contains only unmodified @Core group packages." + | CentOSStream _ -> + add "This CentOS Stream image contains only unmodified @Core group packages." | Debian _ -> add "This is a minimal Debian install." | Fedora _ -> diff --git a/builder/templates/rhel-8.3.ks b/builder/templates/rhel-8.3.ks new file mode 100644 index 0000000..185f485 --- /dev/null +++ b/builder/templates/rhel-8.3.ks @@ -0,0 +1,29 @@ +# Kickstart file for rhel-8.3 +# Generated by libguestfs.git/builder/templates/make-template.ml + +install +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +# EOF diff --git a/builder/templates/rhel-8.3.virt-install-cmd b/builder/templates/rhel-8.3.virt-install-cmd new file mode 100644 index 0000000..01120d1 --- /dev/null +++ b/builder/templates/rhel-8.3.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'rhel-8.3' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-n24u28xe' \ + '--ram=4096' \ + '--arch=x86_64' \ + '--cpu=host' \ + '--vcpus=4' \ + '--os-variant=rhel8.0' \ + '--initrd-inject=rhel-8.3.ks' \ + '--extra-args=ks=file:/rhel-8.3.ks console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-n24u28xe.img,size=6,format=raw' \ + '--location=http://download.eng.bos.redhat.com/released/rhel-6-7-8/rhel-8/RHEL-8/8.3.0/BaseOS/x86_64/os' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/templates/rhel-8.4.ks b/builder/templates/rhel-8.4.ks new file mode 100644 index 0000000..a5f74f6 --- /dev/null +++ b/builder/templates/rhel-8.4.ks @@ -0,0 +1,29 @@ +# Kickstart file for rhel-8.4 +# Generated by libguestfs.git/builder/templates/make-template.ml + +install +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +# EOF diff --git a/builder/templates/rhel-8.4.virt-install-cmd b/builder/templates/rhel-8.4.virt-install-cmd new file mode 100644 index 0000000..e8c0331 --- /dev/null +++ b/builder/templates/rhel-8.4.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'rhel-8.4' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-n44ma315' \ + '--ram=4096' \ + '--arch=x86_64' \ + '--cpu=host' \ + '--vcpus=4' \ + '--os-variant=rhel8.0' \ + '--initrd-inject=rhel-8.4.ks' \ + '--extra-args=ks=file:/rhel-8.4.ks console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-n44ma315.img,size=6,format=raw' \ + '--location=http://download.eng.bos.redhat.com/released/rhel-6-7-8/rhel-8/RHEL-8/8.4.0/BaseOS/x86_64/os' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/templates/rhel-8.5.ks b/builder/templates/rhel-8.5.ks new file mode 100644 index 0000000..202728e --- /dev/null +++ b/builder/templates/rhel-8.5.ks @@ -0,0 +1,29 @@ +# Kickstart file for rhel-8.5 +# Generated by libguestfs.git/builder/templates/make-template.ml + +install +text +reboot +lang en_US.UTF-8 +keyboard us +network --bootproto dhcp +rootpw builder +firewall --enabled --ssh +timezone --utc America/New_York +selinux --enforcing + +bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" + + +zerombr +clearpart --all --initlabel --disklabel=gpt +autopart --type=plain + +# Halt the system once configuration has finished. +poweroff + +%packages +@core +%end + +# EOF diff --git a/builder/templates/rhel-8.5.virt-install-cmd b/builder/templates/rhel-8.5.virt-install-cmd new file mode 100644 index 0000000..0f87b7b --- /dev/null +++ b/builder/templates/rhel-8.5.virt-install-cmd @@ -0,0 +1,20 @@ +# This is the virt-install command which was used to create +# the virt-builder template 'rhel-8.5' +# NB: This file is generated for documentation purposes ONLY! +# This script was never run, and is not intended to be run. + +'virt-install' \ + '--transient' \ + '--name=tmp-ntvwrorc' \ + '--ram=4096' \ + '--arch=x86_64' \ + '--cpu=host' \ + '--vcpus=4' \ + '--os-variant=rhel8.0' \ + '--initrd-inject=rhel-8.5.ks' \ + '--extra-args=ks=file:/rhel-8.5.ks console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \ + '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-ntvwrorc.img,size=6,format=raw' \ + '--location=http://download.eng.bos.redhat.com/released/rhel-6-7-8/rhel-8/RHEL-8/8.5.0/BaseOS/x86_64/os' \ + '--serial=pty' \ + '--nographics' + diff --git a/builder/test-virt-builder-planner.sh b/builder/test-virt-builder-planner.sh index 1353193..39634e7 100755 --- a/builder/test-virt-builder-planner.sh +++ b/builder/test-virt-builder-planner.sh @@ -21,7 +21,6 @@ set -e $TEST_FUNCTIONS slow_test skip_if_skipped -skip_if_backend uml export XDG_CONFIG_HOME= export VIRT_BUILDER_DIRS="$abs_builddir/test-config" diff --git a/builder/test-virt-builder.sh b/builder/test-virt-builder.sh index fe06071..705788a 100755 --- a/builder/test-virt-builder.sh +++ b/builder/test-virt-builder.sh @@ -31,18 +31,6 @@ fi output=phony-fedora.img -format=qcow2 -if [ "$(guestfish get-backend)" = "uml" ]; then - format=raw - - # XXX We specifically want virt-builder to work with the UML - # backend. However currently it fails with: - # error: uml backend does not support networking - # We should be able to make uml have a network backend, but in - # the meantime add this: - no_network=--no-network -fi - rm -f $output # Test as many options as we can! @@ -55,7 +43,7 @@ rm -f $output # on the multi-line parameters. (RHBZ#1420301) virt-builder phony-fedora \ -v --no-cache --no-check-signature $no_network \ - -o $output --size 2G --format $format \ + -o $output --size 2G --format qcow2 \ --arch x86_64 \ --hostname test.example.com \ --timezone Europe/London \ diff --git a/builder/virt-builder-repository.pod b/builder/virt-builder-repository.pod index e849892..1fdd263 100644 --- a/builder/virt-builder-repository.pod +++ b/builder/virt-builder-repository.pod @@ -169,6 +169,12 @@ your bug report. Display version number and exit. +=item B<--wrap> + +Wrap error, warning, and informative messages. This is the default +when the output is a tty. If the output of the program is redirected +to a file, wrapping is disabled unless you use this option. + =item B<-x> Enable tracing of libguestfs API calls. diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod index a56fa89..f7dd6cd 100644 --- a/builder/virt-builder.pod +++ b/builder/virt-builder.pod @@ -536,6 +536,12 @@ your bug report. Display version number and exit. +=item B<--wrap> + +Wrap error, warning, and informative messages. This is the default +when the output is a tty. If the output of the program is redirected +to a file, wrapping is disabled unless you use this option. + =item B<-x> Enable tracing of libguestfs API calls. @@ -1737,21 +1743,6 @@ Virt-builder uses an internal implementation of pxzcat (parallel xzcat) if liblzma was found at build time. If liblzma was not found at build time, regular C is used which is single-threaded. -=head3 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 -(eg. in the cloud). - -To enable the UML backend, read the instructions in -L. - -Currently you have to use the I<--no-network> option. This should be -fixed in a future version. - -The qcow2 output format is not supported by UML. You can only create -raw-format guests. - =head2 SELINUX Guests which use SELinux (such as Fedora and Red Hat Enterprise Linux) diff --git a/cat/Makefile.am b/cat/Makefile.am index 39d0d25..f1de5c8 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -139,7 +139,7 @@ virt_ls_CPPFLAGS = \ virt_ls_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ $(LIBXML2_CFLAGS) \ - $(LIBGUESTFS_LIBS) + $(LIBGUESTFS_CFLAGS) virt_ls_LDADD = \ $(top_builddir)/common/options/liboptions.la \ diff --git a/cat/Makefile.in b/cat/Makefile.in index 2f41b6b..4b96f43 100644 --- a/cat/Makefile.in +++ b/cat/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -326,8 +326,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -483,6 +481,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -525,6 +524,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -535,6 +536,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -897,7 +899,7 @@ virt_ls_CPPFLAGS = \ virt_ls_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ $(LIBXML2_CFLAGS) \ - $(LIBGUESTFS_LIBS) + $(LIBGUESTFS_CFLAGS) virt_ls_LDADD = \ $(top_builddir)/common/options/liboptions.la \ @@ -1385,7 +1387,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1475,7 +1477,6 @@ test-virt-tail.sh.log: test-virt-tail.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/cat/cat.c b/cat/cat.c index eaac445..5b51b7d 100644 --- a/cat/cat.c +++ b/cat/cat.c @@ -42,7 +42,6 @@ guestfs_h *g; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -233,7 +232,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 1 || mps != NULL); - assert (live == 0); /* User must specify at least one filename on the command line. */ if (optind >= argc || argc - optind < 1) diff --git a/cat/filesystems.c b/cat/filesystems.c index dcc357f..8ddb0a6 100644 --- a/cat/filesystems.c +++ b/cat/filesystems.c @@ -44,7 +44,6 @@ guestfs_h *g; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -300,7 +299,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 0); - assert (live == 0); /* Must be no extra arguments on the command line. */ if (optind != argc) { diff --git a/cat/log.c b/cat/log.c index 6944567..df7e2be 100644 --- a/cat/log.c +++ b/cat/log.c @@ -47,7 +47,6 @@ guestfs_h *g; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -200,7 +199,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 1); - assert (live == 0); /* User must not specify more arguments on the command line. */ if (optind != argc) { diff --git a/cat/ls.c b/cat/ls.c index cf46e1f..e062823 100644 --- a/cat/ls.c +++ b/cat/ls.c @@ -55,7 +55,6 @@ guestfs_h *g; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -343,7 +342,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 1 || mps != NULL); - assert (live == 0); CHECK_OPTION_format_consumed; CHECK_OPTION_blocksize_consumed; diff --git a/cat/tail.c b/cat/tail.c index 0f55e2a..1cf1d6e 100644 --- a/cat/tail.c +++ b/cat/tail.c @@ -48,7 +48,6 @@ guestfs_h *g; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -215,7 +214,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 1 || mps != NULL); - assert (live == 0); /* User must specify at least one filename on the command line. */ if (optind >= argc || argc - optind < 1) { diff --git a/common/edit/Makefile.am b/common/edit/Makefile.am index e45c9ba..dff8b8e 100644 --- a/common/edit/Makefile.am +++ b/common/edit/Makefile.am @@ -30,6 +30,7 @@ libedit_la_CPPFLAGS = \ -I$(top_srcdir)/lib -I$(top_builddir)/lib \ $(INCLUDE_DIRECTORY) libedit_la_CFLAGS = \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) libedit_la_LIBADD = \ $(top_builddir)/common/utils/libutils.la diff --git a/common/edit/Makefile.in b/common/edit/Makefile.in index 1ebe059..8ae1193 100644 --- a/common/edit/Makefile.in +++ b/common/edit/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -235,8 +235,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -257,6 +255,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -267,6 +267,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -524,7 +525,8 @@ libedit_la_CPPFLAGS = \ $(INCLUDE_DIRECTORY) libedit_la_CFLAGS = \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) libedit_la_LIBADD = \ $(top_builddir)/common/utils/libutils.la @@ -680,7 +682,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mlcustomize/Makefile.in b/common/mlcustomize/Makefile.in index 14c8da4..91ba77a 100644 --- a/common/mlcustomize/Makefile.in +++ b/common/mlcustomize/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -247,8 +247,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -431,6 +429,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -473,6 +472,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -483,6 +484,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1089,7 +1091,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1263,7 +1265,6 @@ test-selinuxrelabel.sh.log: test-selinuxrelabel.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mlgettext/Makefile.in b/common/mlgettext/Makefile.in index 726014f..21b368a 100644 --- a/common/mlgettext/Makefile.in +++ b/common/mlgettext/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -243,8 +243,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -265,6 +263,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -275,6 +275,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -704,7 +705,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mlpcre/Makefile.in b/common/mlpcre/Makefile.in index e65e931..b6db8eb 100644 --- a/common/mlpcre/Makefile.in +++ b/common/mlpcre/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -247,8 +247,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -431,6 +429,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -473,6 +472,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -483,6 +484,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1077,7 +1079,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1132,7 +1134,6 @@ pcre_tests.log: pcre_tests$(EXEEXT) @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mlprogress/Makefile.in b/common/mlprogress/Makefile.in index 2832de7..ed5bc01 100644 --- a/common/mlprogress/Makefile.in +++ b/common/mlprogress/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -242,8 +242,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -264,6 +262,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -274,6 +274,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -719,7 +720,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mlprogress/progress-c.c b/common/mlprogress/progress-c.c index d7cc8b7..5f0f91b 100644 --- a/common/mlprogress/progress-c.c +++ b/common/mlprogress/progress-c.c @@ -83,7 +83,7 @@ guestfs_int_mllib_progress_bar_init (value machine_readablev) CAMLreturn (barv); } -/* NB: "noalloc" function. */ +/* NB: [@@noalloc] function. */ value guestfs_int_mllib_progress_bar_reset (value barv) { @@ -94,7 +94,7 @@ guestfs_int_mllib_progress_bar_reset (value barv) return Val_unit; } -/* NB: "noalloc" function. */ +/* NB: [@@noalloc] function. */ value guestfs_int_mllib_progress_bar_set (value barv, value positionv, value totalv) diff --git a/common/mlprogress/progress.ml b/common/mlprogress/progress.ml index 4114259..b7843f6 100644 --- a/common/mlprogress/progress.ml +++ b/common/mlprogress/progress.ml @@ -25,9 +25,9 @@ type progress_bar external progress_bar_init : machine_readable:bool -> progress_bar = "guestfs_int_mllib_progress_bar_init" external progress_bar_reset : progress_bar -> unit - = "guestfs_int_mllib_progress_bar_reset" "noalloc" + = "guestfs_int_mllib_progress_bar_reset" [@@noalloc] external progress_bar_set : progress_bar -> int64 -> int64 -> unit - = "guestfs_int_mllib_progress_bar_set" "noalloc" + = "guestfs_int_mllib_progress_bar_set" [@@noalloc] let set_up_progress_bar ?(machine_readable = false) (g : Guestfs.guestfs) = (* Only display progress bars if the machine_readable flag is set or diff --git a/common/mlstdutils/Makefile.am b/common/mlstdutils/Makefile.am index 650f18c..2b73bc6 100644 --- a/common/mlstdutils/Makefile.am +++ b/common/mlstdutils/Makefile.am @@ -25,25 +25,13 @@ EXTRA_DIST = \ CONFIGURE_GENERATED_ML = \ guestfs_config.ml -SOURCES_MLI = - -if HAVE_BYTES_COMPAT_ML -SOURCES_MLI += bytes.mli -endif - -SOURCES_MLI += \ +SOURCES_MLI = \ guestfs_config.mli \ std_utils.mli \ stringMap.mli \ stringSet.mli -SOURCES_ML = - -if HAVE_BYTES_COMPAT_ML -SOURCES_ML += bytes.ml -endif - -SOURCES_ML += \ +SOURCES_ML = \ $(CONFIGURE_GENERATED_ML) \ stringMap.ml \ stringSet.ml \ diff --git a/common/mlstdutils/Makefile.in b/common/mlstdutils/Makefile.in index d759371..15be6c2 100644 --- a/common/mlstdutils/Makefile.in +++ b/common/mlstdutils/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -145,14 +145,12 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@HAVE_BYTES_COMPAT_ML_TRUE@am__append_1 = bytes.mli -@HAVE_BYTES_COMPAT_ML_TRUE@am__append_2 = bytes.ml -@HAVE_OCAMLOPT_TRUE@am__append_3 = mlstdutils.cmxa -@HAVE_OCAML_PKG_OUNIT_TRUE@am__append_4 = -package ounit2 +@HAVE_OCAMLOPT_TRUE@am__append_1 = mlstdutils.cmxa +@HAVE_OCAML_PKG_OUNIT_TRUE@am__append_2 = -package ounit2 TESTS = $(am__EXEEXT_1) check_PROGRAMS = $(am__EXEEXT_1) -@HAVE_OCAML_PKG_OUNIT_TRUE@am__append_5 = std_utils_tests -@HAVE_OCAML_PKG_OUNIT_TRUE@am__append_6 = std_utils_tests +@HAVE_OCAML_PKG_OUNIT_TRUE@am__append_3 = std_utils_tests +@HAVE_OCAML_PKG_OUNIT_TRUE@am__append_4 = std_utils_tests subdir = common/mlstdutils ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ @@ -253,8 +251,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -437,6 +433,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -479,6 +476,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -489,6 +488,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -739,10 +739,18 @@ EXTRA_DIST = \ CONFIGURE_GENERATED_ML = \ guestfs_config.ml -SOURCES_MLI = $(am__append_1) guestfs_config.mli std_utils.mli \ - stringMap.mli stringSet.mli -SOURCES_ML = $(am__append_2) $(CONFIGURE_GENERATED_ML) stringMap.ml \ - stringSet.ml std_utils.ml +SOURCES_MLI = \ + guestfs_config.mli \ + std_utils.mli \ + stringMap.mli \ + stringSet.mli + +SOURCES_ML = \ + $(CONFIGURE_GENERATED_ML) \ + stringMap.ml \ + stringSet.ml \ + std_utils.ml + # We pretend that we're building a C library. automake handles the # compilation of the C sources for us. At the end we take the C @@ -754,7 +762,7 @@ noinst_LIBRARIES = libmlstdutils.a # Just for this library, we need to build both bytecode and native # code because the generator always requires the bytecode version. -noinst_DATA = mlstdutils.cma $(am__append_3) +noinst_DATA = mlstdutils.cma $(am__append_1) libmlstdutils_a_SOURCES = dummy.c libmlstdutils_a_CPPFLAGS = \ -I. \ @@ -770,7 +778,7 @@ OCAMLPACKAGES = \ -package str,unix \ -I $(builddir) -OCAMLPACKAGES_TESTS = $(MLSTDUTILS_CMA) $(am__append_4) +OCAMLPACKAGES_TESTS = $(MLSTDUTILS_CMA) $(am__append_2) OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' @HAVE_OCAMLOPT_FALSE@OBJECTS = $(BOBJECTS) @HAVE_OCAMLOPT_TRUE@OBJECTS = $(XOBJECTS) @@ -1091,7 +1099,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1146,7 +1154,6 @@ std_utils_tests.log: std_utils_tests$(EXEEXT) @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml index 8847717..1a0cc57 100644 --- a/common/mlstdutils/std_utils.ml +++ b/common/mlstdutils/std_utils.ml @@ -323,14 +323,6 @@ module List = struct in List.rev (loop [] xs) - (* This is present in OCaml 4.04, so we can remove it when - * we depend on OCaml >= 4.04. - *) - let sort_uniq ?(cmp = Pervasives.compare) xs = - let xs = List.sort cmp xs in - let xs = uniq ~cmp xs in - xs - let remove_duplicates xs = let h = Hashtbl.create (List.length xs) in let rec loop = function @@ -544,41 +536,7 @@ let be64_of_int i = Bytes.unsafe_set b 7 (Char.unsafe_chr (Int64.to_int c0)); Bytes.to_string b -type wrap_break_t = WrapEOS | WrapSpace | WrapNL - -let rec wrap ?(chan = stdout) ?(indent = 0) str = - let len = String.length str in - _wrap chan indent 0 0 len str - -and _wrap chan indent column i len str = - if i < len then ( - let (j, break) = _wrap_find_next_break i len str in - let next_column = - if column + (j-i) >= 76 then ( - output_char chan '\n'; - output_spaces chan indent; - indent + (j-i) + 1 - ) - else column + (j-i) + 1 in - output chan (Bytes.of_string str) i (j-i); - match break with - | WrapEOS -> () - | WrapSpace -> - output_char chan ' '; - _wrap chan indent next_column (j+1) len str - | WrapNL -> - output_char chan '\n'; - output_spaces chan indent; - _wrap chan indent indent (j+1) len str - ) - -and _wrap_find_next_break i len str = - if i >= len then (len, WrapEOS) - else if String.unsafe_get str i = ' ' then (i, WrapSpace) - else if String.unsafe_get str i = '\n' then (i, WrapNL) - else _wrap_find_next_break (i+1) len str - -and output_spaces chan n = for i = 0 to n-1 do output_char chan ' ' done +let output_spaces chan n = for i = 0 to n-1 do output_char chan ' ' done let unique = let i = ref 0 in fun () -> incr i; !i @@ -591,21 +549,10 @@ let protect ~f ~finally = finally (); match r with Either ret -> ret | Or exn -> raise exn -type 'a return = { return: 'b. 'a -> 'b } (* OCaml >= 4.03: [@@unboxed] *) -(* This requires features in OCaml >= 4.04: +type 'a return = { return: 'b. 'a -> 'b } [@@unboxed] let with_return (type a) f = let exception Return of a in try f {return = fun ret -> raise (Return ret)} with Return ret -> ret -*) - -(* This should work for any version of OCaml, but it doesn't work - * properly for nested with_return statements. When we can assume - * OCaml >= 4.04 we should use the above definition instead. - *) -let with_return f = - let ret = ref None in - try f {return = fun r -> ret := Some r; raise Exit} - with Exit -> match !ret with None -> assert false | Some r -> r let failwithf fs = ksprintf failwith fs @@ -633,8 +580,8 @@ let which executable = (* Program name. *) let prog = Filename.basename Sys.executable_name -(* Stores the colours (--colours), quiet (--quiet), trace (-x) and - * verbose (-v) flags in a global variable. +(* Stores the colours (--colours), quiet (--quiet), trace (-x), verbose (-v) + * and wrap (--wrap) flags in a global variable. *) let colours = ref false let set_colours () = colours := true @@ -652,6 +599,10 @@ let verbose = ref false let set_verbose () = verbose := true let verbose () = !verbose +let wrap = ref false +let set_wrap () = wrap := true +let wrap () = !wrap + let with_open_in filename f = let chan = open_in filename in protect ~f:(fun () -> f chan) ~finally:(fun () -> close_in chan) @@ -738,27 +689,6 @@ let stringify_args args = | [] -> "" | app :: xs -> app ^ quote_args xs -(* Unlink a temporary file on exit. *) -let unlink_on_exit = - let files = ref [] in - let registered_handlers = ref false in - - let rec unlink_files () = - List.iter ( - fun file -> try Unix.unlink file with _ -> () - ) !files - and register_handlers () = - (* Unlink on exit. *) - at_exit unlink_files - in - - fun file -> - files := file :: !files; - if not !registered_handlers then ( - register_handlers (); - registered_handlers := true - ) - let is_block_device file = try (Unix.stat file).Unix.st_kind = Unix.S_BLK with Unix.Unix_error _ -> false diff --git a/common/mlstdutils/std_utils.mli b/common/mlstdutils/std_utils.mli index 3c78f02..d568c01 100644 --- a/common/mlstdutils/std_utils.mli +++ b/common/mlstdutils/std_utils.mli @@ -56,7 +56,6 @@ module String : sig val concat : string -> string list -> string val contains : string -> char -> bool val contains_from : string -> int -> char -> bool - val copy : string -> string val escaped : string -> string val get : string -> int -> char val index : string -> char -> int @@ -182,6 +181,7 @@ module List : sig val sort : ('a -> 'a -> int) -> 'a list -> 'a list val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list + val sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list val dropwhile : ('a -> bool) -> 'a list -> 'a list @@ -212,9 +212,6 @@ module List : sig val uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list (** Uniquify a list (the list must be sorted first). *) - val sort_uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list - (** Sort and uniquify a list. *) - val remove_duplicates : 'a list -> 'a list (** Remove duplicates from an unsorted list; useful when the order of the elements matter. @@ -318,9 +315,6 @@ val be64_of_int : int64 -> string On the OCaml side, 64 bit integers are always used so that you can use the [.^] operators on them for bit manipulation. *) -val wrap : ?chan:out_channel -> ?indent:int -> string -> unit -(** Wrap text. *) - val output_spaces : out_channel -> int -> unit (** Write [n] spaces to [out_channel]. *) @@ -342,7 +336,7 @@ val protect : f:(unit -> 'a) -> finally:(unit -> unit) -> 'a case, but requires a lot more work by the caller. Perhaps we will change this in future.) *) -type 'a return = { return: 'b. 'a -> 'b } (* OCaml >= 4.03: [@@unboxed] *) +type 'a return = { return: 'b. 'a -> 'b } [@@unboxed] val with_return : ('a return -> 'a) -> 'a (** {v with_return (fun {return} -> @@ -382,8 +376,10 @@ val set_trace : unit -> unit val trace : unit -> bool val set_verbose : unit -> unit val verbose : unit -> bool -(** Stores the colours ([--colours]), quiet ([--quiet]), trace ([-x]) and - verbose ([-v]) flags in global variables. *) +val set_wrap : unit -> unit +val wrap : unit -> bool +(** Stores the colours ([--colours]), quiet ([--quiet]), trace ([-x]), verbose + ([-v]) and wrap ([--wrap]) flags in global variables. *) val with_open_in : string -> (in_channel -> 'a) -> 'a (** [with_open_in filename f] calls function [f] with [filename] @@ -416,9 +412,6 @@ val stringify_args : string list -> string (** Create a "pretty-print" representation of a program invocation (i.e. executable and its arguments). *) -val unlink_on_exit : string -> unit -(** Unlink a temporary file on exit. *) - val is_block_device : string -> bool val is_char_device : string -> bool val is_directory : string -> bool diff --git a/common/mltools/JSON_parser.ml b/common/mltools/JSON_parser.ml index 7ef184f..9330572 100644 --- a/common/mltools/JSON_parser.ml +++ b/common/mltools/JSON_parser.ml @@ -41,6 +41,11 @@ let object_get_string key yv = | JSON.String s -> s | _ -> error (f_"the value for the key ‘%s’ is not a string") key +let object_get_bool key yv = + match object_find key yv with + | JSON.Bool b -> b + | _ -> error (f_"the value for the key ‘%s’ is not a bool") key + let object_find_object key yv = match object_find key yv with | JSON.Dict _ as o -> o diff --git a/common/mltools/JSON_parser.mli b/common/mltools/JSON_parser.mli index 8e62fa6..03f8d33 100644 --- a/common/mltools/JSON_parser.mli +++ b/common/mltools/JSON_parser.mli @@ -26,6 +26,10 @@ val object_get_string : string -> JSON.json_t -> string (** [object_get_string key yv] gets the value of the [key] field as a string in the [yv] structure *) +val object_get_bool : string -> JSON.json_t -> bool +(** [object_get_bool key yv] gets the value of the [key] field as a bool + in the [yv] structure *) + val object_find_object : string -> JSON.json_t -> JSON.json_t (** [object_get_object key yv] gets the value of the [key] field as a JSON value in the [yv] structure. diff --git a/common/mltools/Makefile.am b/common/mltools/Makefile.am index 5cec178..24167bc 100644 --- a/common/mltools/Makefile.am +++ b/common/mltools/Makefile.am @@ -38,6 +38,7 @@ SOURCES_MLI = \ getopt.mli \ JSON.mli \ JSON_parser.mli \ + on_exit.mli \ planner.mli \ regedit.mli \ registry.mli \ @@ -50,6 +51,7 @@ SOURCES_ML = \ getopt.ml \ JSON.ml \ tools_utils.ml \ + on_exit.ml \ URI.ml \ planner.ml \ registry.ml \ @@ -262,9 +264,15 @@ tools_utils_tests_DEPENDENCIES = \ ../mlpcre/mlpcre.$(MLARCHIVE) \ $(MLTOOLS_CMA) \ $(top_srcdir)/ocaml-link.sh +tools_utils_tests_OCAMLCLIBS = \ + -pthread -lpthread \ + -lutils \ + $(LIBXML2_LIBS) \ + -lgnu \ + $(LIBGUESTFS_LIBS) tools_utils_tests_LINK = \ $(top_srcdir)/ocaml-link.sh \ - -cclib '-pthread -lpthread -lutils $(LIBXML2_LIBS) -lgnu' -- \ + -cclib '$(tools_utils_tests_OCAMLCLIBS)' -- \ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ $(tools_utils_tests_THEOBJECTS) -o $@ @@ -276,9 +284,15 @@ getopt_tests_DEPENDENCIES = \ ../mlpcre/mlpcre.$(MLARCHIVE) \ $(MLTOOLS_CMA) \ $(top_srcdir)/ocaml-link.sh +getopt_tests_OCAMLCLIBS = \ + -pthread -lpthread \ + -lutils \ + $(LIBXML2_LIBS) \ + -lgnu \ + $(LIBGUESTFS_LIBS) getopt_tests_LINK = \ $(top_srcdir)/ocaml-link.sh \ - -cclib '-pthread -lpthread -lutils $(LIBXML2_LIBS) -lgnu' -- \ + -cclib '$(getopt_tests_OCAMLCLIBS)' -- \ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ $(getopt_tests_THEOBJECTS) -o $@ @@ -292,7 +306,7 @@ JSON_tests_DEPENDENCIES = \ $(top_srcdir)/ocaml-link.sh JSON_tests_LINK = \ $(top_srcdir)/ocaml-link.sh \ - -cclib '-pthread -lpthread' -- \ + -cclib '-pthread -lpthread $(LIBGUESTFS_LIBS)' -- \ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ $(JSON_tests_THEOBJECTS) -o $@ @@ -306,7 +320,7 @@ JSON_parser_tests_DEPENDENCIES = \ $(top_srcdir)/ocaml-link.sh JSON_parser_tests_LINK = \ $(top_srcdir)/ocaml-link.sh \ - -cclib '-pthread -lpthread $(OCAMLCLIBS)' -- \ + -cclib '-pthread -lpthread $(OCAMLCLIBS) $(LIBGUESTFS_LIBS)' -- \ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ $(JSON_parser_tests_THEOBJECTS) -o $@ @@ -320,7 +334,7 @@ machine_readable_tests_DEPENDENCIES = \ $(top_srcdir)/ocaml-link.sh machine_readable_tests_LINK = \ $(top_srcdir)/ocaml-link.sh \ - -cclib '-pthread -lpthread -lutils -lgnu' -- \ + -cclib '-pthread -lpthread -lutils -lgnu $(LIBGUESTFS_LIBS)' -- \ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ $(machine_readable_tests_THEOBJECTS) -o $@ @@ -334,7 +348,7 @@ tools_messages_tests_DEPENDENCIES = \ $(top_srcdir)/ocaml-link.sh tools_messages_tests_LINK = \ $(top_srcdir)/ocaml-link.sh \ - -cclib '-pthread -lpthread -lutils -lgnu' -- \ + -cclib '-pthread -lpthread -lutils -lgnu $(LIBGUESTFS_LIBS)' -- \ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ $(tools_messages_tests_THEOBJECTS) -o $@ diff --git a/common/mltools/Makefile.in b/common/mltools/Makefile.in index 92d8c7a..9ecab2a 100644 --- a/common/mltools/Makefile.in +++ b/common/mltools/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -315,8 +315,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -499,6 +497,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -541,6 +540,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -551,6 +552,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -814,6 +816,7 @@ SOURCES_MLI = \ getopt.mli \ JSON.mli \ JSON_parser.mli \ + on_exit.mli \ planner.mli \ regedit.mli \ registry.mli \ @@ -826,6 +829,7 @@ SOURCES_ML = \ getopt.ml \ JSON.ml \ tools_utils.ml \ + on_exit.ml \ URI.ml \ planner.ml \ registry.ml \ @@ -988,9 +992,16 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@ $(MLTOOLS_CMA) \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh +@HAVE_OCAML_TRUE@tools_utils_tests_OCAMLCLIBS = \ +@HAVE_OCAML_TRUE@ -pthread -lpthread \ +@HAVE_OCAML_TRUE@ -lutils \ +@HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ +@HAVE_OCAML_TRUE@ -lgnu \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_LIBS) + @HAVE_OCAML_TRUE@tools_utils_tests_LINK = \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh \ -@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread -lutils $(LIBXML2_LIBS) -lgnu' -- \ +@HAVE_OCAML_TRUE@ -cclib '$(tools_utils_tests_OCAMLCLIBS)' -- \ @HAVE_OCAML_TRUE@ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ @HAVE_OCAML_TRUE@ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ @HAVE_OCAML_TRUE@ $(tools_utils_tests_THEOBJECTS) -o $@ @@ -1003,9 +1014,16 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@ $(MLTOOLS_CMA) \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh +@HAVE_OCAML_TRUE@getopt_tests_OCAMLCLIBS = \ +@HAVE_OCAML_TRUE@ -pthread -lpthread \ +@HAVE_OCAML_TRUE@ -lutils \ +@HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ +@HAVE_OCAML_TRUE@ -lgnu \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_LIBS) + @HAVE_OCAML_TRUE@getopt_tests_LINK = \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh \ -@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread -lutils $(LIBXML2_LIBS) -lgnu' -- \ +@HAVE_OCAML_TRUE@ -cclib '$(getopt_tests_OCAMLCLIBS)' -- \ @HAVE_OCAML_TRUE@ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ @HAVE_OCAML_TRUE@ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ @HAVE_OCAML_TRUE@ $(getopt_tests_THEOBJECTS) -o $@ @@ -1020,7 +1038,7 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@JSON_tests_LINK = \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh \ -@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread' -- \ +@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread $(LIBGUESTFS_LIBS)' -- \ @HAVE_OCAML_TRUE@ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ @HAVE_OCAML_TRUE@ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ @HAVE_OCAML_TRUE@ $(JSON_tests_THEOBJECTS) -o $@ @@ -1035,7 +1053,7 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@JSON_parser_tests_LINK = \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh \ -@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread $(OCAMLCLIBS)' -- \ +@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread $(OCAMLCLIBS) $(LIBGUESTFS_LIBS)' -- \ @HAVE_OCAML_TRUE@ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ @HAVE_OCAML_TRUE@ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ @HAVE_OCAML_TRUE@ $(JSON_parser_tests_THEOBJECTS) -o $@ @@ -1050,7 +1068,7 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@machine_readable_tests_LINK = \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh \ -@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread -lutils -lgnu' -- \ +@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread -lutils -lgnu $(LIBGUESTFS_LIBS)' -- \ @HAVE_OCAML_TRUE@ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ @HAVE_OCAML_TRUE@ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ @HAVE_OCAML_TRUE@ $(machine_readable_tests_THEOBJECTS) -o $@ @@ -1065,7 +1083,7 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@tools_messages_tests_LINK = \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh \ -@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread -lutils -lgnu' -- \ +@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread -lutils -lgnu $(LIBGUESTFS_LIBS)' -- \ @HAVE_OCAML_TRUE@ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ @HAVE_OCAML_TRUE@ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ @HAVE_OCAML_TRUE@ $(tools_messages_tests_THEOBJECTS) -o $@ @@ -1543,7 +1561,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1633,7 +1651,6 @@ tools_utils_tests.log: tools_utils_tests$(EXEEXT) @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mltools/on_exit.ml b/common/mltools/on_exit.ml new file mode 100644 index 0000000..53ccb68 --- /dev/null +++ b/common/mltools/on_exit.ml @@ -0,0 +1,111 @@ +(* Common way to handle actions on exit. + * Copyright (C) 2010-2019 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. + *) + +open Std_utils +open Tools_utils +open Common_gettext.Gettext + +open Unix +open Printf + +(* List of files to unlink. *) +let files = ref [] + +(* List of directories to remove. *) +let rmdirs = ref [] + +(* List of PIDs to kill. *) +let kills = ref [] + +(* List of functions to call. *) +let fns = ref [] + +(* Perform a single exit action, printing any exception but + * otherwise ignoring failures. + *) +let do_action f arg = + try f arg with exn -> debug "%s" (Printexc.to_string exn) + +(* Make sure the actions are performed only once. *) +let done_actions = ref false + +(* Perform the exit actions. *) +let do_actions () = + if not !done_actions then ( + List.iter (do_action (fun f -> f ())) !fns; + List.iter (do_action (fun (signal, pid) -> kill pid signal)) !kills; + List.iter (do_action (fun file -> Unix.unlink file)) !files; + List.iter (do_action ( + fun dir -> + let cmd = sprintf "rm -rf %s" (Filename.quote dir) in + ignore (Tools_utils.shell_command cmd) + ) + ) !rmdirs; + ); + done_actions := true + +(* False until at least one function is called. Avoids registering + * the signal and at_exit handlers unnnecessarily. + *) +let registered = ref false + +(* Register signal and at_exit handlers. *) +let register () = + if not !registered then ( + List.iter ( + fun (signal, name) -> + let handler _ = + (* Try to get a final message out. This is helpful + * when debugging so we can tell if a program was killed + * or segfaulted. + *) + eprintf (f_"%s: Exiting on signal %s\n%!") prog name; + (* Do the cleanup actions. *) + do_actions (); + (* Call _exit instead of exit because the OCaml exit calls + * C exit which is probably not safe from a signal handler + * especially if we forked. + *) + Unix_utils.Exit._exit 1 + in + ignore (Sys.signal signal (Sys.Signal_handle handler)) + ) [ Sys.sigint, "SIGINT"; + Sys.sigquit, "SIGQUIT"; + Sys.sigterm, "SIGTERM"; + Sys.sighup, "SIGHUP" ]; + + (* Register the at_exit handler. *) + at_exit do_actions + ); + registered := true + +let f fn = + register (); + List.push_front fn fns + +let unlink filename = + register (); + List.push_front filename files + +let rmdir dir = + register (); + List.push_front dir rmdirs + +let kill ?(signal = Sys.sigterm) pid = + register (); + List.push_front (signal, pid) kills diff --git a/common/mltools/on_exit.mli b/common/mltools/on_exit.mli new file mode 100644 index 0000000..a02e3db --- /dev/null +++ b/common/mltools/on_exit.mli @@ -0,0 +1,67 @@ +(* Common way to handle actions on exit. + * Copyright (C) 2010-2021 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +(** This module allows you to register actions which + are mostly guaranteed to happen when the process + exits, even if it exits with a signal. Note that + segfaults, kill -9, etc. will not run these actions. + + The main problem with the {!Stdlib.at_exit} function + is that it is not called if the program exits with + a signal. A lesser problem is that it's hard to + use for common cases such as deleting a temp file or + killing another process, so we provide simple + wrappers for those common actions here. + + Note this module registers signal handlers for + SIGINT, SIGQUIT, SIGTERM and SIGHUP. This means + that any program that links with mltools.cmxa + will automatically have signal handlers pointing + to an internal function within this module. To + register your own signal handler function to be + called instead, you have to call {!register} + before using the ordinary {!Sys.signal} functions. + Your cleanup action might no longer run unless the + program calls {!Stdlib.exit}. *) + +val f : (unit -> unit) -> unit +(** Register a function [f] which runs when the program exits. + Similar to [Stdlib.at_exit] but also runs if the program is + killed with a signal that we can catch. *) + +val unlink : string -> unit +(** Unlink a single temporary file on exit. *) + +val rmdir : string -> unit +(** Recursively remove a temporary directory on exit (using [rm -rf]). *) + +val kill : ?signal:int -> int -> unit +(** Kill [PID] on exit. The signal sent defaults to [Sys.sigterm]. + + Use this with care since you can end up unintentionally killing + another process if [PID] goes away or doesn't exist before the + program exits. *) + +val register : unit -> unit +(** Force this module to register its at_exit function and signal + handlers now. You do {!i not} normally need to call this. + Calling the functions above implicitly calls register. However + you might need to call it if you want to register your own + signal handler. See above description for why and use with care. + Note that this is safe if at_exit and signal handlers have + already been registered - it does nothing in that case. *) diff --git a/common/mltools/test-getopt.sh b/common/mltools/test-getopt.sh index 2673d2a..b3a0d66 100755 --- a/common/mltools/test-getopt.sh +++ b/common/mltools/test-getopt.sh @@ -55,7 +55,7 @@ $t --help | grep -- '-x' $t --help | grep -F -- '-o, --optstr[=string]' # --version -$t --version | grep '^getopt_tests 1\.' +$t --version | grep '^getopt_tests [12]\.' # --short-options $t --short-options | grep '^-a' @@ -89,6 +89,7 @@ $t --long-options | grep '^--ii' $t --long-options | grep '^--is' $t --long-options | grep '^--version' $t --long-options | grep '^--verbose' +$t --long-options | grep '^--wrap' # -a/--add parameter. $t | grep '^adds = \[\]' diff --git a/common/mltools/tools_utils-c.c b/common/mltools/tools_utils-c.c index 6c43b8d..a479656 100644 --- a/common/mltools/tools_utils-c.c +++ b/common/mltools/tools_utils-c.c @@ -91,7 +91,7 @@ guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv) CAMLreturn (Val_unit); } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_set_echo_keys (value unitv) { @@ -99,7 +99,7 @@ guestfs_int_mllib_set_echo_keys (value unitv) return Val_unit; } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_set_keys_from_stdin (value unitv) { diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index d54ec58..695fda7 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -22,6 +22,12 @@ open Std_utils open Common_gettext.Gettext open Getopt.OptionName +(* For this file only, create a reference to prog so that the + * --program-name option can change the program name in error + * messages. + *) +let prog = ref prog + type key_store = { keys : (string, key_store_key) Hashtbl.t; } @@ -30,8 +36,8 @@ and key_store_key = | KeyFileName of string external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> unit = "guestfs_int_mllib_inspect_decrypt" -external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" "noalloc" -external c_set_keys_from_stdin : unit -> unit = "guestfs_int_mllib_set_keys_from_stdin" "noalloc" +external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" [@@noalloc] +external c_set_keys_from_stdin : unit -> unit = "guestfs_int_mllib_set_keys_from_stdin" [@@noalloc] external c_rfc3339_date_time_string : unit -> string = "guestfs_int_mllib_rfc3339_date_time_string" type machine_readable_fn = { @@ -116,19 +122,59 @@ let message fs = in ksprintf display fs +(* Wrap text. *) +type wrap_break_t = WrapEOS | WrapSpace | WrapNL + +let rec wrap ?(chan = stdout) ?(indent = 0) str = + if Std_utils.wrap () || istty chan then + let len = String.length str in + _wrap chan indent 0 0 len str + else ( + output_spaces chan indent; + output_string chan str + ) + +and _wrap chan indent column i len str = + if i < len then ( + let (j, break) = _wrap_find_next_break i len str in + let next_column = + if column + (j-i) >= 76 then ( + output_char chan '\n'; + output_spaces chan indent; + indent + (j-i) + 1 + ) + else column + (j-i) + 1 in + output chan (Bytes.of_string str) i (j-i); + match break with + | WrapEOS -> () + | WrapSpace -> + output_char chan ' '; + _wrap chan indent next_column (j+1) len str + | WrapNL -> + output_char chan '\n'; + output_spaces chan indent; + _wrap chan indent indent (j+1) len str + ) + +and _wrap_find_next_break i len str = + if i >= len then (len, WrapEOS) + else if String.unsafe_get str i = ' ' then (i, WrapSpace) + else if String.unsafe_get str i = '\n' then (i, WrapNL) + else _wrap_find_next_break (i+1) len str + (* Error messages etc. *) let error ?(exit_code = 1) fs = let display str = log_as_json "error" str; let chan = stderr in ansi_red ~chan (); - wrap ~chan (sprintf (f_"%s: error: %s") prog str); + wrap ~chan (sprintf (f_"%s: error: %s") !prog str); if not (verbose () && trace ()) then ( prerr_newline (); prerr_newline (); wrap ~chan (sprintf (f_"If reporting bugs, run %s with debugging enabled and include the complete output:\n\n %s -v -x [...]") - prog prog); + !prog !prog); ); ansi_restore ~chan (); prerr_newline (); @@ -141,7 +187,7 @@ let warning fs = log_as_json "warning" str; let chan = stdout in ansi_blue ~chan (); - wrap ~chan (sprintf (f_"%s: warning: %s") prog str); + wrap ~chan (sprintf (f_"%s: warning: %s") !prog str); ansi_restore ~chan (); print_newline (); in @@ -152,7 +198,7 @@ let info fs = log_as_json "info" str; let chan = stdout in ansi_magenta ~chan (); - wrap ~chan (sprintf (f_"%s: %s") prog str); + wrap ~chan (sprintf (f_"%s: %s") !prog str); ansi_restore ~chan (); print_newline (); in @@ -167,7 +213,8 @@ let debug fs = * (e.g. debug, tracing) already set. *) let open_guestfs ?identifier () = - let g = new Guestfs.guestfs () in + let g = new Guestfs.guestfs ~environment:false () in + g#parse_environment (); if trace () then g#set_trace true; if verbose () then g#set_verbose true; Option.may g#set_identifier identifier; @@ -203,11 +250,11 @@ let run_main_and_handle_errors main = * the OCaml tools. *) let print_version_and_exit () = - printf "%s %s\n%!" prog Guestfs_config.package_version_full; + printf "%s %s\n%!" !prog Guestfs_config.package_version_full; exit 0 let generated_by = - sprintf (f_"generated by %s %s") prog Guestfs_config.package_version_full + sprintf (f_"generated by %s %s") !prog Guestfs_config.package_version_full let virt_tools_data_dir = let dir = lazy ( @@ -293,12 +340,15 @@ let human_size i = type cmdline_options = { getopt : Getopt.t; ks : key_store; + debug_gc : bool ref; } -let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg = - (** Install an exit hook to check gc consistency for --debug-gc *) - let set_debug_gc () = - at_exit (fun () -> Gc.compact()) in +let create_standard_options argspec ?anon_fun ?(key_opts = false) + ?(machine_readable = false) ?(program_name = false) usage_msg = + (* Install an exit hook to check gc consistency for --debug-gc *) + let debug_gc = ref false in + let set_debug_gc () = at_exit Gc.compact; debug_gc := true in + let parse_machine_readable = function | None -> machine_readable_output := Channel stdout @@ -328,43 +378,57 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_read let ks = { keys = Hashtbl.create 13; } in - let argspec = [ - [ S 'V'; L"version" ], Getopt.Unit print_version_and_exit, s_"Display version and exit"; - [ S 'v'; L"verbose" ], Getopt.Unit set_verbose, s_"Enable libguestfs debugging messages"; - [ S 'x' ], Getopt.Unit set_trace, s_"Enable tracing of libguestfs calls"; - [ L"debug-gc" ], Getopt.Unit set_debug_gc, Getopt.hidden_option_description; - [ S 'q'; L"quiet" ], Getopt.Unit set_quiet, s_"Don’t print progress messages"; - [ L"color"; L"colors"; - L"colour"; L"colours" ], Getopt.Unit set_colours, s_"Use ANSI colour sequences even if not tty"; - ] @ argspec in - let argspec = - argspec @ - (if key_opts then - let parse_key_selector arg = - let parts = String.nsplit ~max:3 ":" arg in - match parts with - | [ device; "key"; key ] -> - Hashtbl.replace ks.keys device (KeyString key) - | [ device; "file"; file ] -> - Hashtbl.replace ks.keys device (KeyFileName file) - | _ -> - error (f_"invalid selector string for --key: %s") arg - in - [ - [ L"echo-keys" ], Getopt.Unit c_set_echo_keys, s_"Don’t turn off echo for passphrases"; - [ L"keys-from-stdin" ], Getopt.Unit c_set_keys_from_stdin, s_"Read passphrases from stdin"; - [ L"key" ], Getopt.String (s_"SELECTOR", parse_key_selector), s_"Specify a LUKS key"; - ] - else []) @ - (if machine_readable then - [ - [ L"machine-readable" ], Getopt.OptString ("format", parse_machine_readable), s_"Make output machine readable"; - ] - else []) in + let argspec = ref argspec in + let add_argspec = List.push_back argspec in + + add_argspec ([ S 'V'; L"version" ], Getopt.Unit print_version_and_exit, s_"Display version and exit"); + add_argspec ([ S 'v'; L"verbose" ], Getopt.Unit set_verbose, s_"Enable libguestfs debugging messages"); + add_argspec ([ S 'x' ], Getopt.Unit set_trace, s_"Enable tracing of libguestfs calls"); + add_argspec ([ L"debug-gc" ], Getopt.Unit set_debug_gc, Getopt.hidden_option_description); + add_argspec ([ S 'q'; L"quiet" ], Getopt.Unit set_quiet, s_"Don’t print progress messages"); + add_argspec ([ L"color"; L"colors"; + L"colour"; L"colours" ], Getopt.Unit set_colours, s_"Use ANSI colour sequences even if not tty"); + add_argspec ([ L"wrap" ], Getopt.Unit set_wrap, s_"Wrap log messages even if not tty"); + + if key_opts then ( + let parse_key_selector arg = + let parts = String.nsplit ~max:3 ":" arg in + match parts with + | [ device; "key"; key ] -> + Hashtbl.replace ks.keys device (KeyString key) + | [ device; "file"; file ] -> + Hashtbl.replace ks.keys device (KeyFileName file) + | _ -> + error (f_"invalid selector string for --key: %s") arg + in + + add_argspec ([ L"echo-keys" ], Getopt.Unit c_set_echo_keys, s_"Don’t turn off echo for passphrases"); + add_argspec ([ L"keys-from-stdin" ], Getopt.Unit c_set_keys_from_stdin, s_"Read passphrases from stdin"); + add_argspec ([ L"key" ], Getopt.String (s_"SELECTOR", parse_key_selector), s_"Specify a LUKS key"); + ); + + if machine_readable then ( + add_argspec ([ L"machine-readable" ], Getopt.OptString ("format", parse_machine_readable), s_"Make output machine readable"); + ); + + if program_name then ( + add_argspec ([ L"program-name" ], Getopt.Set_string ("prog", prog), s_"Set program name"); + ); + + let argspec = !argspec in + let getopt = Getopt.create argspec ?anon_fun usage_msg in - { - getopt; ks; - } + { getopt; ks; debug_gc } + +let key_store_to_cli { keys } = + Hashtbl.fold ( + fun k v acc -> + let arg = + match v with + | KeyString s -> sprintf "%s:key:%s" k s + | KeyFileName f -> sprintf "%s:file:%s" k f in + "--key" :: arg :: acc + ) keys [] (* Run an external command, slurp up the output as a list of lines. *) let external_command ?(echo_cmd = true) cmd = @@ -477,29 +541,6 @@ let uuidgen () = if String.length uuid < 10 then assert false; (* sanity check on uuidgen *) uuid -(* Remove a temporary directory on exit. *) -let rmdir_on_exit = - let dirs = ref [] in - let registered_handlers = ref false in - - let rec rmdirs () = - List.iter ( - fun dir -> - let cmd = sprintf "rm -rf %s" (Filename.quote dir) in - ignore (shell_command cmd) - ) !dirs - and register_handlers () = - (* Remove on exit. *) - at_exit rmdirs - in - - fun dir -> - dirs := dir :: !dirs; - if not !registered_handlers then ( - register_handlers (); - registered_handlers := true - ) - (* Using the libguestfs API, recursively remove only files from the * given directory. Useful for cleaning /var/cache etc in sysprep * without removing the actual directory structure. Also if 'dir' is @@ -587,7 +628,7 @@ let debug_augeas_errors g = flush stderr with - Guestfs.Error msg -> eprintf "%s: augeas: %s (ignored)\n" prog msg + Guestfs.Error msg -> eprintf "%s: augeas: %s (ignored)\n" !prog msg ) (* Detect type of a file. *) diff --git a/common/mltools/tools_utils.mli b/common/mltools/tools_utils.mli index 1d1ac8a..5018300 100644 --- a/common/mltools/tools_utils.mli +++ b/common/mltools/tools_utils.mli @@ -79,11 +79,12 @@ type key_store type cmdline_options = { getopt : Getopt.t; (** The actual {!Getopt} handle. *) ks : key_store; (** Container for keys read via [--key]. *) + debug_gc : bool ref; (** True if [--debug-gc] was used. *) } (** Structure representing all the data needed for handling command line options. *) -val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> cmdline_options +val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> ?program_name:bool -> Getopt.usage_msg -> cmdline_options (** Adds the standard libguestfs command line options to the specified ones, sorting them, and setting [long_options] to them. @@ -96,8 +97,20 @@ val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?k [machine_readable] specifies whether add the [--machine-readable] option. + [program_name] specifies whether to add the [--program-name] option + which allows another tool to run this tool and change the program + name used in error messages. + Returns a new {!cmdline_options} structure. *) +val key_store_to_cli : key_store -> string list +(** Convert a {!key_store} object back to a list of command line + options, essentially undoing the effect of Getopt parsing. + This is used in virt-v2v to pass the keystore to helpers. + It is not particularly secure, especially if you use the + [:key:] selector, although not any less secure than passing + them via the command line in the first place. *) + val external_command : ?echo_cmd:bool -> string -> string list (** Run an external command, slurp up the output as a list of lines. @@ -141,9 +154,6 @@ val shell_command : ?echo_cmd:bool -> string -> int val uuidgen : unit -> string (** Run uuidgen to return a random UUID. *) -val rmdir_on_exit : string -> unit -(** Remove a temporary directory on exit (using [rm -rf]). *) - val rm_rf_only_files : Guestfs.guestfs -> ?filter:(string -> bool) -> string -> unit (** Using the libguestfs API, recursively remove only files from the given directory. Useful for cleaning [/var/cache] etc in sysprep diff --git a/common/mlutils/Makefile.in b/common/mlutils/Makefile.in index e3713a7..8611b3d 100644 --- a/common/mlutils/Makefile.in +++ b/common/mlutils/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -252,8 +252,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -436,6 +434,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -478,6 +477,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -488,6 +489,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1119,7 +1121,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1174,7 +1176,6 @@ c_utils_unit_tests.log: c_utils_unit_tests$(EXEEXT) @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mlutils/c_utils.ml b/common/mlutils/c_utils.ml index c3bc7bc..6fa4a82 100644 --- a/common/mlutils/c_utils.ml +++ b/common/mlutils/c_utils.ml @@ -25,12 +25,12 @@ external drive_index : string -> int = "guestfs_int_mlutils_drive_index" external shell_unquote : string -> string = "guestfs_int_mlutils_shell_unquote" -external is_reg : int64 -> bool = "guestfs_int_mlutils_is_reg" "noalloc" -external is_dir : int64 -> bool = "guestfs_int_mlutils_is_dir" "noalloc" -external is_chr : int64 -> bool = "guestfs_int_mlutils_is_chr" "noalloc" -external is_blk : int64 -> bool = "guestfs_int_mlutils_is_blk" "noalloc" -external is_fifo : int64 -> bool = "guestfs_int_mlutils_is_fifo" "noalloc" -external is_lnk : int64 -> bool = "guestfs_int_mlutils_is_lnk" "noalloc" -external is_sock : int64 -> bool = "guestfs_int_mlutils_is_sock" "noalloc" +external is_reg : int64 -> bool = "guestfs_int_mlutils_is_reg" [@@noalloc] +external is_dir : int64 -> bool = "guestfs_int_mlutils_is_dir" [@@noalloc] +external is_chr : int64 -> bool = "guestfs_int_mlutils_is_chr" [@@noalloc] +external is_blk : int64 -> bool = "guestfs_int_mlutils_is_blk" [@@noalloc] +external is_fifo : int64 -> bool = "guestfs_int_mlutils_is_fifo" [@@noalloc] +external is_lnk : int64 -> bool = "guestfs_int_mlutils_is_lnk" [@@noalloc] +external is_sock : int64 -> bool = "guestfs_int_mlutils_is_sock" [@@noalloc] external full_path : string -> string option -> string = "guestfs_int_mlutils_full_path" diff --git a/common/mlutils/unix_utils-c.c b/common/mlutils/unix_utils-c.c index 8acf039..ee5a379 100644 --- a/common/mlutils/unix_utils-c.c +++ b/common/mlutils/unix_utils-c.c @@ -79,28 +79,28 @@ extern value guestfs_int_mllib_statvfs_statvfs (value pathv); extern value guestfs_int_mllib_statvfs_is_network_filesystem (value pathv); extern value guestfs_int_mllib_sysconf_nr_processors_online (value unitv); -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_dev_t_makedev (value majv, value minv) { return Val_int (makedev (Int_val (majv), Int_val (minv))); } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_dev_t_major (value devv) { return Val_int (major (Int_val (devv))); } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_dev_t_minor (value devv) { return Val_int (minor (Int_val (devv))); } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_unsetenv (value strv) { @@ -108,7 +108,7 @@ guestfs_int_mllib_unsetenv (value strv) return Val_unit; } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ int guestfs_int_mllib_exit (value rv) { @@ -152,7 +152,7 @@ guestfs_int_mllib_fnmatch (value patternv, value strv, value flagsv) } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_sync (value unitv) { @@ -341,7 +341,7 @@ guestfs_int_mllib_statvfs_statvfs (value pathv) CAMLreturn (rv); } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_statvfs_is_network_filesystem (value pathv) { @@ -370,7 +370,7 @@ guestfs_int_mllib_statvfs_is_network_filesystem (value pathv) #endif } -/* NB: This is a "noalloc" call. */ +/* NB: This is a [@@noalloc] call. */ value guestfs_int_mllib_sysconf_nr_processors_online (value unitv) { diff --git a/common/mlutils/unix_utils.ml b/common/mlutils/unix_utils.ml index 2bdda12..b79144a 100644 --- a/common/mlutils/unix_utils.ml +++ b/common/mlutils/unix_utils.ml @@ -19,17 +19,17 @@ open Std_utils module Dev_t = struct - external makedev : int -> int -> int = "guestfs_int_mllib_dev_t_makedev" "noalloc" - external major : int -> int = "guestfs_int_mllib_dev_t_major" "noalloc" - external minor : int -> int = "guestfs_int_mllib_dev_t_minor" "noalloc" + external makedev : int -> int -> int = "guestfs_int_mllib_dev_t_makedev" [@@noalloc] + external major : int -> int = "guestfs_int_mllib_dev_t_major" [@@noalloc] + external minor : int -> int = "guestfs_int_mllib_dev_t_minor" [@@noalloc] end module Env = struct - external unsetenv : string -> unit = "guestfs_int_mllib_unsetenv" "noalloc" + external unsetenv : string -> unit = "guestfs_int_mllib_unsetenv" [@@noalloc] end module Exit = struct - external _exit : int -> 'a = "guestfs_int_mllib_exit" "noalloc" + external _exit : int -> 'a = "guestfs_int_mllib_exit" [@@noalloc] end module Fnmatch = struct @@ -47,7 +47,7 @@ module Fnmatch = struct end module Fsync = struct - external sync : unit -> unit = "guestfs_int_mllib_sync" "noalloc" + external sync : unit -> unit = "guestfs_int_mllib_sync" [@@noalloc] external file : string -> unit = "guestfs_int_mllib_fsync_file" end @@ -82,10 +82,10 @@ module StatVFS = struct let free_space { f_bsize = bsize; f_bavail = bavail } = bsize *^ bavail external is_network_filesystem : string -> bool = - "guestfs_int_mllib_statvfs_is_network_filesystem" "noalloc" + "guestfs_int_mllib_statvfs_is_network_filesystem" [@@noalloc] end module Sysconf = struct external nr_processors_online : unit -> int = - "guestfs_int_mllib_sysconf_nr_processors_online" "noalloc" + "guestfs_int_mllib_sysconf_nr_processors_online" [@@noalloc] end diff --git a/common/mlvisit/Makefile.am b/common/mlvisit/Makefile.am index a727f4f..beff0bc 100644 --- a/common/mlvisit/Makefile.am +++ b/common/mlvisit/Makefile.am @@ -60,6 +60,7 @@ libmlvisit_a_CPPFLAGS = \ -I$(top_srcdir)/common/visit libmlvisit_a_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(LIBVIRT_CFLAGS) $(LIBXML2_CFLAGS) \ -fPIC @@ -114,9 +115,16 @@ visit_tests_DEPENDENCIES = \ ../mlutils/mlcutils.$(MLARCHIVE) \ $(MLVISIT_CMA) \ $(top_srcdir)/ocaml-link.sh +visit_tests_OCAMLCLIBS = \ + -pthread -lpthread \ + -lvisit \ + -lstructs \ + -lutils \ + $(LIBXML2_LIBS) \ + $(LIBGUESTFS_LIBS) visit_tests_LINK = \ $(top_srcdir)/ocaml-link.sh \ - -cclib '-pthread -lpthread -lvisit -lstructs -lutils $(LIBXML2_LIBS)' -- \ + -cclib '$(visit_tests_OCAMLCLIBS)' -- \ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ $(visit_tests_THEOBJECTS) -o $@ diff --git a/common/mlvisit/Makefile.in b/common/mlvisit/Makefile.in index 64d2b64..12e8738 100644 --- a/common/mlvisit/Makefile.in +++ b/common/mlvisit/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -250,8 +250,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -434,6 +432,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -476,6 +475,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -486,6 +487,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -764,6 +766,7 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@libmlvisit_a_CFLAGS = \ @HAVE_OCAML_TRUE@ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBVIRT_CFLAGS) $(LIBXML2_CFLAGS) \ @HAVE_OCAML_TRUE@ -fPIC @@ -802,9 +805,17 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@ $(MLVISIT_CMA) \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh +@HAVE_OCAML_TRUE@visit_tests_OCAMLCLIBS = \ +@HAVE_OCAML_TRUE@ -pthread -lpthread \ +@HAVE_OCAML_TRUE@ -lvisit \ +@HAVE_OCAML_TRUE@ -lstructs \ +@HAVE_OCAML_TRUE@ -lutils \ +@HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_LIBS) + @HAVE_OCAML_TRUE@visit_tests_LINK = \ @HAVE_OCAML_TRUE@ $(top_srcdir)/ocaml-link.sh \ -@HAVE_OCAML_TRUE@ -cclib '-pthread -lpthread -lvisit -lstructs -lutils $(LIBXML2_LIBS)' -- \ +@HAVE_OCAML_TRUE@ -cclib '$(visit_tests_OCAMLCLIBS)' -- \ @HAVE_OCAML_TRUE@ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \ @HAVE_OCAML_TRUE@ $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \ @HAVE_OCAML_TRUE@ $(visit_tests_THEOBJECTS) -o $@ @@ -1084,7 +1095,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1139,7 +1150,6 @@ visit_tests.log: visit_tests$(EXEEXT) @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/mlxml/Makefile.in b/common/mlxml/Makefile.in index 1aa49e7..0915157 100644 --- a/common/mlxml/Makefile.in +++ b/common/mlxml/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -242,8 +242,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -264,6 +262,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -274,6 +274,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -721,7 +722,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/options/Makefile.in b/common/options/Makefile.in index 1621dab..7f8e9d8 100644 --- a/common/options/Makefile.in +++ b/common/options/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -248,8 +248,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -270,6 +268,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -280,6 +280,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -770,7 +771,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/options/decrypt.c b/common/options/decrypt.c index 434b7d5..b899a00 100644 --- a/common/options/decrypt.c +++ b/common/options/decrypt.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "c-ctype.h" @@ -37,32 +38,144 @@ #include "options.h" +static void +append_char (size_t *idx, char *buffer, char c) +{ + /* bail out if the size of the string (including the terminating NUL, if any + * cannot be expressed as a size_t + */ + if (*idx == (size_t)-1) + error (EXIT_FAILURE, 0, _("string size overflow")); + + /* if we're not just counting, then actually write the character */ + if (buffer != NULL) + buffer[*idx] = c; + + /* advance */ + ++*idx; +} + /** - * Make a LUKS map name from the partition name, - * eg. C<"/dev/vda2" =E "cryptvda2"> + * Make a LUKS map name from the partition or logical volume name, eg. + * C<"/dev/vda2" =E "cryptvda2">, or C<"/dev/vg-ssd/lv-root7" =E + * "cryptvgssdlvroot7">. Note that, in logical volume device names, + * c_isalnum() eliminates the "/" separator from between the VG and the LV, so + * this mapping is not unique; but for our purposes, it will do. */ -static void -make_mapname (const char *device, char *mapname, size_t len) +static char * +make_mapname (const char *device) { - size_t i = 0; + bool strip_iprefix; + static const char iprefix[] = "/dev/"; + char *mapname; + enum { COUNT, WRITE, DONE } mode; + + strip_iprefix = STRPREFIX (device, iprefix); + + /* set to NULL in COUNT mode, flipped to non-NULL for WRITE mode */ + mapname = NULL; + + for (mode = COUNT; mode < DONE; ++mode) { + size_t ipos; + static const size_t iprefixlen = sizeof iprefix - 1; + size_t opos; + static const char oprefix[] = "crypt"; + static const size_t oprefixlen = sizeof oprefix - 1; + char ichar; + + /* skip the input prefix, if any */ + ipos = strip_iprefix ? iprefixlen : 0; + /* start producing characters after the output prefix */ + opos = oprefixlen; + + /* filter & copy */ + while ((ichar = device[ipos]) != '\0') { + if (c_isalnum (ichar)) + append_char (&opos, mapname, ichar); + ++ipos; + } + + /* terminate */ + append_char (&opos, mapname, '\0'); - if (len < 6) - abort (); - strcpy (mapname, "crypt"); - mapname += 5; - len -= 5; + /* allocate the output buffer when flipping from COUNT to WRITE mode */ + if (mode == COUNT) { + assert (opos >= sizeof oprefix); + mapname = malloc (opos); + if (mapname == NULL) + error (EXIT_FAILURE, errno, "malloc"); - if (STRPREFIX (device, "/dev/")) - i = 5; + /* populate the output prefix -- note: not NUL-terminated yet */ + memcpy (mapname, oprefix, oprefixlen); + } + } + + return mapname; +} - for (; device[i] != '\0' && len >= 1; ++i) { - if (c_isalnum (device[i])) { - *mapname++ = device[i]; - len--; +static bool +decrypt_mountables (guestfs_h *g, const char * const *mountables, + struct key_store *ks, bool name_decrypted_by_uuid) +{ + bool decrypted_some = false; + const char * const *mnt_scan = mountables; + const char *mountable; + + while ((mountable = *mnt_scan++) != NULL) { + CLEANUP_FREE char *type = NULL; + CLEANUP_FREE char *uuid = NULL; + CLEANUP_FREE_STRING_LIST char **keys = NULL; + CLEANUP_FREE char *mapname = NULL; + const char * const *key_scan; + const char *key; + + type = guestfs_vfs_type (g, mountable); + if (type == NULL) + continue; + + /* "cryptsetup luksUUID" cannot read a UUID on Windows BitLocker disks + * (unclear if this is a limitation of the format or cryptsetup). + */ + if (STREQ (type, "crypto_LUKS")) { + uuid = guestfs_luks_uuid (g, mountable); + } else if (STRNEQ (type, "BitLocker")) + continue; + + /* Grab the keys that we should try with this device, based on device name, + * or UUID (if any). + */ + keys = get_keys (ks, mountable, uuid); + assert (keys[0] != NULL); + + /* Generate a node name for the plaintext (decrypted) device node. */ + if (!name_decrypted_by_uuid || uuid == NULL || + asprintf (&mapname, "luks-%s", uuid) == -1) + mapname = make_mapname (mountable); + + /* Try each key in turn. */ + key_scan = (const char * const *)keys; + while ((key = *key_scan++) != NULL) { + int r; + + guestfs_push_error_handler (g, NULL, NULL); + r = guestfs_cryptsetup_open (g, mountable, key, mapname, -1); + guestfs_pop_error_handler (g); + + if (r == 0) + break; } + + if (key == NULL) + error (EXIT_FAILURE, 0, + _("could not find key to open LUKS encrypted %s.\n\n" + "Try using --key on the command line.\n\n" + "Original error: %s (%d)"), + mountable, guestfs_last_error (g), guestfs_last_errno (g)); + + decrypted_some = true; } - *mapname = '\0'; + return decrypted_some; } /** @@ -73,65 +186,22 @@ void inspect_do_decrypt (guestfs_h *g, struct key_store *ks) { CLEANUP_FREE_STRING_LIST char **partitions = guestfs_list_partitions (g); + CLEANUP_FREE_STRING_LIST char **lvs = NULL; + bool need_rescan; + if (partitions == NULL) exit (EXIT_FAILURE); - int need_rescan = 0, r; - size_t i, j; - - for (i = 0; partitions[i] != NULL; ++i) { - CLEANUP_FREE char *type = guestfs_vfs_type (g, partitions[i]); - if (type && - (STREQ (type, "crypto_LUKS") || STREQ (type, "BitLocker"))) { - bool is_bitlocker = STREQ (type, "BitLocker"); - char mapname[32]; - make_mapname (partitions[i], mapname, sizeof mapname); - -#ifdef GUESTFS_HAVE_LUKS_UUID - CLEANUP_FREE char *uuid = NULL; - - /* This fails for Windows BitLocker disks because cryptsetup - * luksUUID cannot read a UUID (unclear if this is a limitation - * of the format or cryptsetup). - */ - if (!is_bitlocker) - uuid = guestfs_luks_uuid (g, partitions[i]); -#else - const char *uuid = NULL; -#endif - - CLEANUP_FREE_STRING_LIST char **keys = get_keys (ks, partitions[i], uuid); - assert (guestfs_int_count_strings (keys) > 0); - - /* Try each key in turn. */ - for (j = 0; keys[j] != NULL; ++j) { - /* XXX Should we set GUESTFS_CRYPTSETUP_OPEN_READONLY if readonly - * is set? This might break 'mount_ro'. - */ - guestfs_push_error_handler (g, NULL, NULL); -#ifdef GUESTFS_HAVE_CRYPTSETUP_OPEN - r = guestfs_cryptsetup_open (g, partitions[i], keys[j], mapname, -1); -#else - r = guestfs_luks_open (g, partitions[i], keys[j], mapname); -#endif - guestfs_pop_error_handler (g); - if (r == 0) - goto opened; - } - error (EXIT_FAILURE, 0, - _("could not find key to open LUKS encrypted %s.\n\n" - "Try using --key on the command line.\n\n" - "Original error: %s (%d)"), - partitions[i], guestfs_last_error (g), - guestfs_last_errno (g)); - - opened: - need_rescan = 1; - } - } + need_rescan = decrypt_mountables (g, (const char * const *)partitions, ks, + false); if (need_rescan) { if (guestfs_lvm_scan (g, 1) == -1) exit (EXIT_FAILURE); } + + lvs = guestfs_lvs (g); + if (lvs == NULL) + exit (EXIT_FAILURE); + decrypt_mountables (g, (const char * const *)lvs, ks, true); } diff --git a/common/options/domain.c b/common/options/domain.c index 541face..03215ce 100644 --- a/common/options/domain.c +++ b/common/options/domain.c @@ -48,10 +48,6 @@ add_libvirt_drives (guestfs_h *g, const char *guest) optargs.bitmask |= GUESTFS_ADD_DOMAIN_READONLY_BITMASK; optargs.readonly = 1; } - if (live) { - optargs.bitmask |= GUESTFS_ADD_DOMAIN_LIVE_BITMASK; - optargs.live = 1; - } optargs.bitmask |= GUESTFS_ADD_DOMAIN_ALLOWUUID_BITMASK; optargs.allowuuid = 1; diff --git a/common/options/inspect.c b/common/options/inspect.c index 3de6d70..387b272 100644 --- a/common/options/inspect.c +++ b/common/options/inspect.c @@ -67,9 +67,6 @@ compare_keys (const void *p1, const void *p2) void inspect_mount_handle (guestfs_h *g, struct key_store *ks) { - if (live) - error (EXIT_FAILURE, 0, _("don’t use --live and -i options together")); - inspect_do_decrypt (g, ks); char **roots = guestfs_inspect_os (g); diff --git a/common/options/options.h b/common/options/options.h index 4716e6f..80df91a 100644 --- a/common/options/options.h +++ b/common/options/options.h @@ -28,7 +28,6 @@ /* Provided by guestfish or guestmount. */ extern guestfs_h *g; extern int read_only; -extern int live; extern int verbose; extern int inspector; extern int keys_from_stdin; diff --git a/common/parallel/Makefile.am b/common/parallel/Makefile.am index 73d3149..8cf3542 100644 --- a/common/parallel/Makefile.am +++ b/common/parallel/Makefile.am @@ -39,6 +39,7 @@ libparallel_la_CPPFLAGS = \ libparallel_la_CFLAGS = \ -pthread \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(LIBXML2_CFLAGS) \ $(LIBVIRT_CFLAGS) libparallel_la_LIBADD = \ diff --git a/common/parallel/Makefile.in b/common/parallel/Makefile.in index b19bfb3..1357f9d 100644 --- a/common/parallel/Makefile.in +++ b/common/parallel/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -245,8 +245,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -267,6 +265,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -277,6 +277,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -543,6 +544,7 @@ libparallel_la_CPPFLAGS = \ libparallel_la_CFLAGS = \ -pthread \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(LIBXML2_CFLAGS) \ $(LIBVIRT_CFLAGS) @@ -722,7 +724,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/progress/Makefile.am b/common/progress/Makefile.am index 1a5d119..beea95a 100644 --- a/common/progress/Makefile.am +++ b/common/progress/Makefile.am @@ -31,6 +31,7 @@ libprogress_la_CPPFLAGS = \ $(INCLUDE_DIRECTORY) libprogress_la_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(LIBTINFO_CFLAGS) libprogress_la_LIBADD = \ $(top_builddir)/common/utils/libutils.la \ diff --git a/common/progress/Makefile.in b/common/progress/Makefile.in index d9f919b..3452ad5 100644 --- a/common/progress/Makefile.in +++ b/common/progress/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -238,8 +238,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -260,6 +258,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -270,6 +270,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -528,6 +529,7 @@ libprogress_la_CPPFLAGS = \ libprogress_la_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(LIBTINFO_CFLAGS) libprogress_la_LIBADD = \ @@ -685,7 +687,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/structs/Makefile.am b/common/structs/Makefile.am index 32fd91c..5881a1c 100644 --- a/common/structs/Makefile.am +++ b/common/structs/Makefile.am @@ -40,4 +40,5 @@ libstructs_la_CPPFLAGS = \ $(INCLUDE_DIRECTORY) libstructs_la_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(GCC_VISIBILITY_HIDDEN) diff --git a/common/structs/Makefile.in b/common/structs/Makefile.in index a5e9410..51e5848 100644 --- a/common/structs/Makefile.in +++ b/common/structs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -239,8 +239,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -261,6 +259,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -271,6 +271,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -537,6 +538,7 @@ libstructs_la_CPPFLAGS = \ libstructs_la_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(GCC_VISIBILITY_HIDDEN) all: $(BUILT_SOURCES) @@ -699,7 +701,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -740,7 +741,8 @@ all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -845,7 +847,7 @@ ps-am: uninstall-am: -.MAKE: all check install install-am install-strip +.MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ diff --git a/common/utils/Makefile.in b/common/utils/Makefile.in index 59c2cb5..033db3c 100644 --- a/common/utils/Makefile.in +++ b/common/utils/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -243,8 +243,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -265,6 +263,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -275,6 +275,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -733,7 +734,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/utils/guestfs-utils.h b/common/utils/guestfs-utils.h index b5f5f3c..d568ed3 100644 --- a/common/utils/guestfs-utils.h +++ b/common/utils/guestfs-utils.h @@ -67,6 +67,7 @@ extern int guestfs_int_is_lnk (int64_t mode); extern int guestfs_int_is_sock (int64_t mode); extern char *guestfs_int_full_path (const char *dir, const char *name); extern void guestfs_int_hexdump (const void *data, size_t len, FILE *fp); +extern const char *guestfs_int_strerror (int errnum, char *buf, size_t buflen); /* Not all language bindings know how to deal with Pointer arguments. * Those that don't will use this macro which complains noisily and diff --git a/common/utils/utils.c b/common/utils/utils.c index 6f41087..70e55cb 100644 --- a/common/utils/utils.c +++ b/common/utils/utils.c @@ -640,3 +640,28 @@ guestfs_int_hexdump (const void *data, size_t len, FILE *fp) fprintf (fp, "|\n"); } } + +/** + * Thread-safe strerror_r. + * + * This is a wrapper around the two variants of L + * in glibc since it is hard to use correctly (RHBZ#2030396). + * + * The buffer passed in should be large enough to store the + * error message (256 chars at least) and should be non-static. + * Note that the buffer might not be used, use the return value. + */ +const char * +guestfs_int_strerror (int errnum, char *buf, size_t buflen) +{ +#ifdef _GNU_SOURCE + /* GNU strerror_r */ + return strerror_r (errnum, buf, buflen); +#else + /* XSI-compliant strerror_r */ + int err = strerror_r (errnum, buf, buflen); + if (err > 0) + snprintf (buf, buflen, "error number %d", errnum); + return buf; +#endif +} diff --git a/common/visit/Makefile.am b/common/visit/Makefile.am index e57cdfa..7a4be29 100644 --- a/common/visit/Makefile.am +++ b/common/visit/Makefile.am @@ -32,4 +32,5 @@ libvisit_la_CPPFLAGS = \ -I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs libvisit_la_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(GCC_VISIBILITY_HIDDEN) diff --git a/common/visit/Makefile.in b/common/visit/Makefile.in index 4d92b48..87b291f 100644 --- a/common/visit/Makefile.in +++ b/common/visit/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -235,8 +235,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -257,6 +255,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -267,6 +267,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -525,6 +526,7 @@ libvisit_la_CPPFLAGS = \ libvisit_la_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(GCC_VISIBILITY_HIDDEN) all: all-am @@ -678,7 +680,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/common/windows/Makefile.am b/common/windows/Makefile.am index 3f38ca6..7bdb7b8 100644 --- a/common/windows/Makefile.am +++ b/common/windows/Makefile.am @@ -31,7 +31,8 @@ libwindows_la_CPPFLAGS = \ -I$(top_srcdir)/lib -I$(top_builddir)/lib \ $(INCLUDE_DIRECTORY) libwindows_la_CFLAGS = \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) libwindows_la_LIBADD = \ $(top_builddir)/common/utils/libutils.la \ $(LTLIBINTL) diff --git a/common/windows/Makefile.in b/common/windows/Makefile.in index 00431a8..8e3e8c3 100644 --- a/common/windows/Makefile.in +++ b/common/windows/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -237,8 +237,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -259,6 +257,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -269,6 +269,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -527,7 +528,8 @@ libwindows_la_CPPFLAGS = \ $(INCLUDE_DIRECTORY) libwindows_la_CFLAGS = \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) libwindows_la_LIBADD = \ $(top_builddir)/common/utils/libutils.la \ @@ -684,7 +686,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/configure b/configure index d54fb4f..8adc36a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for guestfs-tools 1.46.1. +# Generated by GNU Autoconf 2.71 for guestfs-tools 1.48.0. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -618,8 +618,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='guestfs-tools' PACKAGE_TARNAME='guestfs-tools' -PACKAGE_VERSION='1.46.1' -PACKAGE_STRING='guestfs-tools 1.46.1' +PACKAGE_VERSION='1.48.0' +PACKAGE_STRING='guestfs-tools 1.48.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -809,6 +809,9 @@ AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V +CSCOPE +ETAGS +CTAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -1492,7 +1495,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures guestfs-tools 1.46.1 to adapt to many kinds of systems. +\`configure' configures guestfs-tools 1.48.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1563,7 +1566,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of guestfs-tools 1.46.1:";; + short | recursive ) echo "Configuration of guestfs-tools 1.48.0:";; esac cat <<\_ACEOF @@ -1732,7 +1735,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -guestfs-tools configure 1.46.1 +guestfs-tools configure 1.48.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2220,7 +2223,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by guestfs-tools $as_me 1.46.1, which was +It was created by guestfs-tools $as_me 1.48.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4405,12 +4408,7 @@ program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_scrip if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -4803,7 +4801,7 @@ fi # Define the identity of the package. PACKAGE='guestfs-tools' - VERSION='1.46.1' + VERSION='1.48.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -5064,6 +5062,20 @@ else fi +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi + + # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile @@ -19973,9 +19985,9 @@ else $as_nop fi -ocaml_ver_str=4.02 +ocaml_ver_str=4.04 ocaml_min_major=4 -ocaml_min_minor=2 +ocaml_min_minor=4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if OCaml version >= $ocaml_ver_str" >&5 printf %s "checking if OCaml version >= $ocaml_ver_str... " >&6; } ocaml_major="`echo $OCAMLVERSION | $AWK -F. '{print $1}'`" @@ -20098,7 +20110,6 @@ fi OCAML_PKG_gettext=no OCAML_PKG_ounit2=no ounit_is_v2=no -have_Bytes_module=no if test "x$OCAMLC" != "xno" then : @@ -20229,23 +20240,6 @@ printf "%s\n" "not found" >&6; } fi - # Check if we have the 'Bytes' module. If not (OCaml < 4.02) then - # we need to create a compatibility module. - # AC_CHECK_OCAML_MODULE is a bit broken, so open code this test. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OCaml module Bytes" >&5 -printf %s "checking for OCaml module Bytes... " >&6; } - rm -f conftest.ml - echo 'let s = Bytes.empty' > conftest.ml - if $OCAMLC -c conftest.ml >&5 2>&5 ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - have_Bytes_module=yes - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -printf "%s\n" "not found" >&6; } - have_Bytes_module=no - fi - fi if test "x$OCAML_PKG_gettext" != "xno"; then HAVE_OCAML_PKG_GETTEXT_TRUE= @@ -20345,7 +20339,7 @@ fi fi -OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3" +OCAML_WARN_ERROR="-warn-error +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3-6 -w -6" OCAML_FLAGS="-g -annot $safe_string_option" @@ -20995,8 +20989,10 @@ ac_config_files="$ac_config_files podwrapper.pl" ac_config_files="$ac_config_files run" +ac_config_files="$ac_config_files win-reg/virt-win-reg" + -ac_config_files="$ac_config_files Makefile align/Makefile bash/Makefile builder/Makefile builder/libguestfs.conf builder/opensuse.conf builder/templates/Makefile builder/test-config/virt-builder/repos.d/test-index.conf builder/test-simplestreams/virt-builder/repos.d/cirros.conf builder/test-website/virt-builder/repos.d/libguestfs.conf cat/Makefile common/edit/Makefile common/mlcustomize/Makefile common/mlgettext/Makefile common/mlpcre/Makefile common/mlprogress/Makefile common/mlstdutils/Makefile common/mlstdutils/guestfs_config.ml common/mltools/Makefile common/mlutils/Makefile common/mlvisit/Makefile common/mlxml/Makefile common/options/Makefile common/parallel/Makefile common/progress/Makefile common/structs/Makefile common/utils/Makefile common/visit/Makefile common/windows/Makefile config.sh customize/Makefile df/Makefile dib/Makefile diff/Makefile edit/Makefile format/Makefile get-kernel/Makefile gnulib/lib/Makefile inspector/Makefile make-fs/Makefile po-docs/Makefile po-docs/ja/Makefile po-docs/uk/Makefile po/Makefile resize/Makefile sparsify/Makefile sysprep/Makefile test-data/Makefile test-data/binaries/Makefile test-data/blank-disks/Makefile test-data/files/Makefile test-data/phony-guests/Makefile test-data/phony-guests/guests.xml win-reg/Makefile" +ac_config_files="$ac_config_files Makefile align/Makefile bash/Makefile builder/Makefile builder/libguestfs.conf builder/opensuse.conf builder/templates/Makefile builder/test-config/virt-builder/repos.d/test-index.conf builder/test-simplestreams/virt-builder/repos.d/cirros.conf builder/test-website/virt-builder/repos.d/libguestfs.conf cat/Makefile common/edit/Makefile common/mlcustomize/Makefile common/mlgettext/Makefile common/mlpcre/Makefile common/mlprogress/Makefile common/mlstdutils/Makefile common/mlstdutils/guestfs_config.ml common/mltools/Makefile common/mlutils/Makefile common/mlvisit/Makefile common/mlxml/Makefile common/options/Makefile common/parallel/Makefile common/progress/Makefile common/structs/Makefile common/utils/Makefile common/visit/Makefile common/windows/Makefile config.sh customize/Makefile docs/Makefile df/Makefile dib/Makefile diff/Makefile edit/Makefile format/Makefile get-kernel/Makefile gnulib/lib/Makefile inspector/Makefile make-fs/Makefile po-docs/Makefile po-docs/ja/Makefile po-docs/uk/Makefile po/Makefile resize/Makefile sparsify/Makefile sysprep/Makefile test-data/Makefile test-data/binaries/Makefile test-data/blank-disks/Makefile test-data/files/Makefile test-data/phony-guests/Makefile test-data/phony-guests/guests.xml win-reg/Makefile" cat >confcache <<\_ACEOF @@ -21582,7 +21578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by guestfs-tools $as_me 1.46.1, which was +This file was extended by guestfs-tools $as_me 1.48.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21650,7 +21646,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -guestfs-tools config.status 1.46.1 +guestfs-tools config.status 1.48.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -22076,6 +22072,7 @@ do "ocaml-link.sh") CONFIG_FILES="$CONFIG_FILES ocaml-link.sh" ;; "podwrapper.pl") CONFIG_FILES="$CONFIG_FILES podwrapper.pl" ;; "run") CONFIG_FILES="$CONFIG_FILES run" ;; + "win-reg/virt-win-reg") CONFIG_FILES="$CONFIG_FILES win-reg/virt-win-reg" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "align/Makefile") CONFIG_FILES="$CONFIG_FILES align/Makefile" ;; "bash/Makefile") CONFIG_FILES="$CONFIG_FILES bash/Makefile" ;; @@ -22107,6 +22104,7 @@ do "common/windows/Makefile") CONFIG_FILES="$CONFIG_FILES common/windows/Makefile" ;; "config.sh") CONFIG_FILES="$CONFIG_FILES config.sh" ;; "customize/Makefile") CONFIG_FILES="$CONFIG_FILES customize/Makefile" ;; + "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "df/Makefile") CONFIG_FILES="$CONFIG_FILES df/Makefile" ;; "dib/Makefile") CONFIG_FILES="$CONFIG_FILES dib/Makefile" ;; "diff/Makefile") CONFIG_FILES="$CONFIG_FILES diff/Makefile" ;; @@ -23480,6 +23478,7 @@ ltmain=$ac_aux_dir/ltmain.sh "ocaml-link.sh":F) chmod +x,-w ocaml-link.sh ;; "podwrapper.pl":F) chmod +x,-w podwrapper.pl ;; "run":F) chmod +x,-w run ;; + "win-reg/virt-win-reg":F) chmod +x,-w win-reg/virt-win-reg ;; esac done # for ac_tag diff --git a/configure.ac b/configure.ac index 56cfef5..250710a 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -AC_INIT([guestfs-tools], [1.46.1]) +AC_INIT([guestfs-tools], [1.48.0]) dnl The common/ subdirectory assumes this. In libguestfs it contains dnl the --with-extra parameter. Here we just define it to the version. @@ -99,6 +99,8 @@ AC_CONFIG_FILES([podwrapper.pl], [chmod +x,-w podwrapper.pl]) AC_CONFIG_FILES([run], [chmod +x,-w run]) +AC_CONFIG_FILES([win-reg/virt-win-reg], + [chmod +x,-w win-reg/virt-win-reg]) AC_CONFIG_FILES([Makefile align/Makefile @@ -131,6 +133,7 @@ AC_CONFIG_FILES([Makefile common/windows/Makefile config.sh customize/Makefile + docs/Makefile df/Makefile dib/Makefile diff/Makefile diff --git a/customize/Makefile.am b/customize/Makefile.am index d3f07d7..6bdd5fa 100644 --- a/customize/Makefile.am +++ b/customize/Makefile.am @@ -103,6 +103,7 @@ libcustomize_a_CPPFLAGS = \ -I$(top_srcdir)/common/edit libcustomize_a_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBGUESTFS_CFLAGS) \ $(LIBCRYPT_CFLAGS) \ $(LIBVIRT_CFLAGS) \ $(LIBXML2_CFLAGS) \ @@ -168,6 +169,7 @@ OCAMLCLIBS = \ -pthread -lpthread \ -lutils \ $(LIBTINFO_LIBS) \ + $(LIBGUESTFS_LIBS) \ $(LIBCRYPT_LIBS) \ $(LIBVIRT_LIBS) \ $(LIBXML2_LIBS) \ diff --git a/customize/Makefile.in b/customize/Makefile.in index 24ad291..d0a62d7 100644 --- a/customize/Makefile.in +++ b/customize/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -296,8 +296,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -453,6 +451,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -495,6 +494,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -505,6 +506,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -820,6 +822,7 @@ BUILT_SOURCES = \ @HAVE_OCAML_TRUE@libcustomize_a_CFLAGS = \ @HAVE_OCAML_TRUE@ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBCRYPT_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBVIRT_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBXML2_CFLAGS) \ @@ -861,6 +864,7 @@ BUILT_SOURCES = \ @HAVE_OCAML_TRUE@ -pthread -lpthread \ @HAVE_OCAML_TRUE@ -lutils \ @HAVE_OCAML_TRUE@ $(LIBTINFO_LIBS) \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBCRYPT_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBVIRT_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ @@ -1331,7 +1335,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1589,7 +1593,6 @@ test-settings-ubuntu-18.04.sh.log: test-settings-ubuntu-18.04.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -1634,7 +1637,8 @@ installdirs: done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -1750,7 +1754,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 -.MAKE: all check check-am install install-am install-strip +.MAKE: all check check-am install install-am install-exec \ + install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ check-am clean clean-binPROGRAMS clean-generic clean-libtool \ diff --git a/customize/password.ml b/customize/password.ml index 6f5a0a4..608bf95 100644 --- a/customize/password.ml +++ b/customize/password.ml @@ -1,5 +1,5 @@ (* virt-sysprep - * Copyright (C) 2012-2020 Red Hat Inc. + * Copyright (C) 2012-2021 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 @@ -22,7 +22,7 @@ open Common_gettext.Gettext open Printf -type password_crypto = [`MD5 | `SHA256 | `SHA512 ] +type password_crypto = [ `MD5 | `SHA256 | `SHA512 | `YESCRYPT ] type password_selector = { pw_password : password; @@ -46,8 +46,9 @@ let password_crypto_of_string = function | "md5" -> `MD5 | "sha256" -> `SHA256 | "sha512" -> `SHA512 + | "yescrypt" -> `YESCRYPT | arg -> - error (f_"password-crypto: unknown algorithm %s, use \"md5\", \"sha256\" or \"sha512\"") arg + error (f_"password-crypto: unknown algorithm %s, use \"md5\", \"sha256\", \"sha512\" or \"yescrypt\"") arg let rec parse_selector arg = parse_selector_list arg (String.nsplit ":" arg) @@ -125,13 +126,25 @@ let rec set_linux_passwords ?password_crypto (g : Guestfs.guestfs) root password * https://rwmj.wordpress.com/2013/07/09/setting-the-root-or-other-passwords-in-a-linux-guest/ *) and encrypt password crypto = - (* Get random characters from the set [A-Za-z0-9./] *) - let salt = Urandom.urandom_uniform 16 chars in + (* Get random characters from the set [A-Za-z0-9./] + * + * 24 characters gives a 144 bits (18 bytes) salt. Unlike the more + * traditional 128 bits (16 bytes) salt, this 144 bits salt is always + * represented by the same number of base64 characters without any + * padding issues, where 128 bits can be represented by 22 or 23 + * (depending on padding) base64-encoded characters, even with a + * non-standard base64 encoding scheme. + * + * We need it this way, because the yescrypt hashing methods requires + * at least 128 bits of salt to work properly. + *) + let salt = Urandom.urandom_uniform 24 chars in let salt = (match crypto with | `MD5 -> "$1$" | `SHA256 -> "$5$" - | `SHA512 -> "$6$") ^ salt ^ "$" in + | `SHA512 -> "$6$" + | `YESCRYPT -> "$y$j9T$") ^ salt ^ "$" in let r = Crypt.crypt password salt in (*printf "password: encrypt %s with salt %s -> %s\n" password salt r;*) r @@ -139,33 +152,40 @@ and encrypt password crypto = (* glibc 2.7 was released in Oct 2007. Approximately, all guests that * precede this date only support md5, whereas all guests after this * date can support sha512. + * + * Most distros released in 2020 or later ship with libxcrypt >= 4.3, + * and are able to handle yescrypt hashes. *) and default_crypto g root = let distro = g#inspect_get_distro root in let major = g#inspect_get_major_version root in match distro, major with + | ("rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based"), v when v >= 9 -> + `YESCRYPT | ("rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based"), v when v >= 6 -> `SHA512 | ("rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based"), _ -> `MD5 (* RHEL 5 does not appear to support SHA512, according to crypt(3) *) + | "fedora", v when v >= 30 -> `YESCRYPT | "fedora", v when v >= 9 -> `SHA512 | "fedora", _ -> `MD5 + | "debian", v when v >= 11 -> `YESCRYPT | "debian", v when v >= 5 -> `SHA512 | "debian", _ -> `MD5 - (* Very likely earlier versions of Ubuntu than 10.04 had new crypt, - * but Ubuntu 10.04 is the earliest version I have checked. - *) + | "ubuntu", v when v >= 20 -> `YESCRYPT | "ubuntu", v when v >= 10 -> `SHA512 | "ubuntu", _ -> `MD5 + | ("opensuse"|"sles"), v when v >= 15 -> `YESCRYPT | ("opensuse"|"sles"), v when v >= 11 -> `SHA512 | ("opensuse"|"sles"), _ -> `MD5 (* Rolling distributions, which hopefully should be updated enough. *) - | ("archlinux"|"voidlinux"|"kalilinux"), _ -> `SHA512 + | ("archlinux"|"kalilinux"), _ -> `YESCRYPT + | ("voidlinux"), _ -> `SHA512 | _, _ -> let minor = g#inspect_get_minor_version root in diff --git a/customize/password.mli b/customize/password.mli index f38197a..4130901 100644 --- a/customize/password.mli +++ b/customize/password.mli @@ -1,5 +1,5 @@ (* virt-sysprep - * Copyright (C) 2012-2020 Red Hat Inc. + * Copyright (C) 2012-2021 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 @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -type password_crypto = [ `MD5 | `SHA256 | `SHA512 ] +type password_crypto = [ `MD5 | `SHA256 | `SHA512 | `YESCRYPT ] val password_crypto_of_string : string -> password_crypto (** Parse --password-crypto parameter on command line. *) diff --git a/customize/test-virt-customize.sh b/customize/test-virt-customize.sh index 7817e67..4086aac 100755 --- a/customize/test-virt-customize.sh +++ b/customize/test-virt-customize.sh @@ -29,8 +29,7 @@ out=test-virt-customize.out rm -f $fq $out qemu-img create -f qcow2 -b $f -F raw $fq -# Add --no-network so UML works. -$VG virt-customize --format qcow2 -a $fq --no-network \ +$VG virt-customize --format qcow2 -a $fq \ --write /etc/motd:MOTD \ --write /etc/motd2:MOTD2 \ --write /etc/motd3:MOTD3 \ diff --git a/customize/virt-customize.pod b/customize/virt-customize.pod index 70c52d1..6a91f69 100644 --- a/customize/virt-customize.pod +++ b/customize/virt-customize.pod @@ -224,6 +224,12 @@ Enable verbose messages for debugging. Display version number and exit. +=item B<--wrap> + +Wrap error, warning, and informative messages. This is the default +when the output is a tty. If the output of the program is redirected +to a file, wrapping is disabled unless you use this option. + =item B<-x> Enable tracing of libguestfs API calls. diff --git a/df/Makefile.in b/df/Makefile.in index e628899..ecbcf74 100644 --- a/df/Makefile.in +++ b/df/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -280,8 +280,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -437,6 +435,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -480,6 +479,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -490,6 +491,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1161,7 +1163,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1230,7 +1232,6 @@ test-virt-df-guests.sh.log: test-virt-df-guests.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/df/main.c b/df/main.c index ff7f9de..479d27f 100644 --- a/df/main.c +++ b/df/main.c @@ -50,7 +50,6 @@ guestfs_h *g; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -252,7 +251,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 0); - assert (live == 0); /* Must be no extra arguments on the command line. */ if (optind != argc) diff --git a/dib/Makefile.am b/dib/Makefile.am index f607449..7581feb 100644 --- a/dib/Makefile.am +++ b/dib/Makefile.am @@ -92,6 +92,7 @@ OCAMLCLIBS = \ -pthread -lpthread \ -lutils \ $(LIBXML2_LIBS) \ + $(LIBGUESTFS_LIBS) \ $(LIBINTL) \ -lgnu diff --git a/dib/Makefile.in b/dib/Makefile.in index 638822e..3ee191d 100644 --- a/dib/Makefile.in +++ b/dib/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -276,8 +276,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -433,6 +431,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -475,6 +474,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -485,6 +486,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -794,6 +796,7 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@ -pthread -lpthread \ @HAVE_OCAML_TRUE@ -lutils \ @HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBINTL) \ @HAVE_OCAML_TRUE@ -lgnu @@ -1179,7 +1182,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1234,7 +1237,6 @@ test-virt-dib-docs.sh.log: test-virt-dib-docs.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/dib/dib.ml b/dib/dib.ml index 94ad300..f5ce604 100644 --- a/dib/dib.ml +++ b/dib/dib.ml @@ -550,7 +550,7 @@ let main () = let image_basename_d = image_basename ^ ".d" in let tmpdir = Mkdtemp.temp_dir "dib." in - rmdir_on_exit tmpdir; + On_exit.rmdir tmpdir; let auxtmpdir = tmpdir // "in_target.aux" in do_mkdir auxtmpdir; let hookstmpdir = auxtmpdir // "hooks" in diff --git a/dib/virt-dib.pod b/dib/virt-dib.pod index f6e27ae..c0119d2 100644 --- a/dib/virt-dib.pod +++ b/dib/virt-dib.pod @@ -448,6 +448,12 @@ Enable debugging messages. Display version number and exit. +=item B<--wrap> + +Wrap error, warning, and informative messages. This is the default +when the output is a tty. If the output of the program is redirected +to a file, wrapping is disabled unless you use this option. + =item B<-x> Enable tracing of libguestfs API calls. diff --git a/diff/Makefile.in b/diff/Makefile.in index adabee3..0ac367b 100644 --- a/diff/Makefile.in +++ b/diff/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -275,8 +275,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -432,6 +430,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -474,6 +473,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -484,6 +485,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1122,7 +1124,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1184,7 +1186,6 @@ test-virt-diff.sh.log: test-virt-diff.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/diff/diff.c b/diff/diff.c index e440d1a..6aae88e 100644 --- a/diff/diff.c +++ b/diff/diff.c @@ -62,7 +62,6 @@ static void free_tree (struct tree *); guestfs_h *g, *g2; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -370,7 +369,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 1); - assert (live == 0); CHECK_OPTION_format_consumed; CHECK_OPTION_blocksize_consumed; diff --git a/diff/test-virt-diff.sh b/diff/test-virt-diff.sh index 4984999..3140bb6 100755 --- a/diff/test-virt-diff.sh +++ b/diff/test-virt-diff.sh @@ -20,7 +20,6 @@ set -e $TEST_FUNCTIONS skip_if_skipped -skip_if_backend uml skip_unless_phony_guest fedora.img rm -f fedora.qcow2 diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 0000000..5f489d1 --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1,37 @@ +# guestfs-tools documentation +# Copyright (C) 2010-2022 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 $(top_srcdir)/subdir-rules.mk + +EXTRA_DIST = \ + guestfs-tools-release-notes-1.48.pod + +man_MANS = \ + guestfs-tools-release-notes-1.48.1 +noinst_DATA = \ + $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html + +guestfs-tools-release-notes-1.48.1 guestfs-tools-release-notes-1.48.txt $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html: stamp-guestfs-tools-release-notes-1.48.pod + +stamp-guestfs-tools-release-notes-1.48.pod: guestfs-tools-release-notes-1.48.pod + $(PODWRAPPER) \ + --section 1 \ + --man guestfs-tools-release-notes-1.48.1 \ + --html $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html \ + --license GPLv2+ \ + $< + touch $@ diff --git a/docs/Makefile.in b/docs/Makefile.in new file mode 100644 index 0000000..735988e --- /dev/null +++ b/docs/Makefile.in @@ -0,0 +1,814 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# guestfs-tools documentation +# Copyright (C) 2010-2022 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. + +# libguestfs +# Copyright (C) 2009-2020 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. + +# subdir-rules.mk should be included in every *subdirectory* Makefile.am. + +# libguestfs +# Copyright (C) 2013 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# 'common-rules.mk' should be included in every Makefile.am. +# cf. 'subdir-rules.mk' + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = docs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/ocaml.m4 $(top_srcdir)/m4/guestfs-progs.m4 \ + $(top_srcdir)/m4/guestfs-c.m4 \ + $(top_srcdir)/m4/guestfs-libraries.m4 \ + $(top_srcdir)/m4/guestfs-ocaml-gettext.m4 \ + $(top_srcdir)/m4/guestfs-ocaml.m4 \ + $(top_srcdir)/m4/guestfs-perl.m4 \ + $(top_srcdir)/m4/guestfs-misc-libraries.m4 \ + $(top_srcdir)/m4/guestfs-bash-completion.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" +NROFF = nroff +MANS = $(man_MANS) +DATA = $(noinst_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common-rules.mk \ + $(top_srcdir)/subdir-rules.mk +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASH_COMPLETIONS_DIR = @BASH_COMPLETIONS_DIR@ +BASH_COMPLETION_CFLAGS = @BASH_COMPLETION_CFLAGS@ +BASH_COMPLETION_LIBS = @BASH_COMPLETION_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +JANSSON_CFLAGS = @JANSSON_CFLAGS@ +JANSSON_LIBS = @JANSSON_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBCRYPT_CFLAGS = @LIBCRYPT_CFLAGS@ +LIBCRYPT_LIBS = @LIBCRYPT_LIBS@ +LIBGUESTFS_CFLAGS = @LIBGUESTFS_CFLAGS@ +LIBGUESTFS_LIBS = @LIBGUESTFS_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ +LIBLZMA_LIBS = @LIBLZMA_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ +LIBTINFO_LIBS = @LIBTINFO_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBVIRT_CFLAGS = @LIBVIRT_CFLAGS@ +LIBVIRT_LIBS = @LIBVIRT_LIBS@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKISOFS = @MKISOFS@ +MSGCAT = @MSGCAT@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ +NCURSES_CONFIG = @NCURSES_CONFIG@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OCAMLBEST = @OCAMLBEST@ +OCAMLBUILD = @OCAMLBUILD@ +OCAMLC = @OCAMLC@ +OCAMLCDOTOPT = @OCAMLCDOTOPT@ +OCAMLDEP = @OCAMLDEP@ +OCAMLDEP_ALL = @OCAMLDEP_ALL@ +OCAMLDEP_ONE_LINE = @OCAMLDEP_ONE_LINE@ +OCAMLDOC = @OCAMLDOC@ +OCAMLFIND = @OCAMLFIND@ +OCAMLLIB = @OCAMLLIB@ +OCAMLMKLIB = @OCAMLMKLIB@ +OCAMLMKTOP = @OCAMLMKTOP@ +OCAMLOPT = @OCAMLOPT@ +OCAMLOPTDOTOPT = @OCAMLOPTDOTOPT@ +OCAMLVERSION = @OCAMLVERSION@ +OCAML_FLAGS = @OCAML_FLAGS@ +OCAML_GETTEXT = @OCAML_GETTEXT@ +OCAML_PKG_gettext = @OCAML_PKG_gettext@ +OCAML_PKG_guestfs = @OCAML_PKG_guestfs@ +OCAML_PKG_ounit2 = @OCAML_PKG_ounit2@ +OCAML_RUNTIME_VARIANT_PIC_OPTION = @OCAML_RUNTIME_VARIANT_PIC_OPTION@ +OCAML_WARN_ERROR = @OCAML_WARN_ERROR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_FULL = @PACKAGE_VERSION_FULL@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE2_CFLAGS = @PCRE2_CFLAGS@ +PCRE2_CONFIG = @PCRE2_CONFIG@ +PCRE2_LIBS = @PCRE2_LIBS@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PO4A_GETTEXTIZE = @PO4A_GETTEXTIZE@ +PO4A_TRANSLATE = @PO4A_TRANSLATE@ +PODWRAPPER = @PODWRAPPER@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SQLITE3 = @SQLITE3@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VALGRIND = @VALGRIND@ +VERSION = @VERSION@ +VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMLLINT = @XMLLINT@ +XZCAT = @XZCAT@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libvirt_ro_uri = @libvirt_ro_uri@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +ounit_is_v2 = @ounit_is_v2@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Files that should universally be removed by 'make clean'. Note if +# there is any case in any subdirectory where a file should not be +# removed by 'make clean', it should not be listed here! + +# Editor backup files + +# Patch original and reject files. + +# OCaml intermediate and generated files. + +# OCaml -annot files (used for displaying types in some IDEs). + +# OCaml oUnit generated files. + +# Manual pages - these are all generated from *.pod, so the +# pages themselves should all be removed by 'make clean'. + +# Stamp files used when generating man pages. + +# Bindtests temporary files used in many language bindings. +CLEANFILES = *~ *.bak *.orig *.rej *.cmi *.cmo *.cma *.cmx *.cmxa \ + dll*.so *.a *.annot oUnit-*.cache oUnit-*.log *.1 *.3 *.5 *.8 \ + stamp-*.pod bindtests.tmp + +# Files that should be universally removed by 'make distclean'. +DISTCLEANFILES = .depend stamp-* + +# Special suffixes used by OCaml. + +# Special suffixes used by PO files. +SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly .po .gmo +LOG_DRIVER = env $(SHELL) $(top_srcdir)/build-aux/guestfs-test-driver + +# Rules for building OCaml objects. +# See also: +# guestfs-hacking(1) section "HOW OCAML PROGRAMS ARE COMPILED AND LINKED" +@HAVE_OCAMLOPT_FALSE@MLARCHIVE = cma +@HAVE_OCAMLOPT_TRUE@MLARCHIVE = cmxa +@HAVE_OCAMLOPT_FALSE@LINK_CUSTOM_OCAMLC_ONLY = -custom +@HAVE_OCAMLOPT_FALSE@BEST = c +@HAVE_OCAMLOPT_TRUE@BEST = opt + +# custom silent rules +guestfs_am_v_ocamlc = $(guestfs_am_v_ocamlc_@AM_V@) +guestfs_am_v_ocamlc_ = $(guestfs_am_v_ocamlc_@AM_DEFAULT_V@) +guestfs_am_v_ocamlc_0 = @echo " OCAMLC " $@; +guestfs_am_v_ocamlcmi = $(guestfs_am_v_ocamlcmi_@AM_V@) +guestfs_am_v_ocamlcmi_ = $(guestfs_am_v_ocamlcmi_@AM_DEFAULT_V@) +guestfs_am_v_ocamlcmi_0 = @echo " OCAMLCMI" $@; +guestfs_am_v_ocamlopt = $(guestfs_am_v_ocamlopt_@AM_V@) +guestfs_am_v_ocamlopt_ = $(guestfs_am_v_ocamlopt_@AM_DEFAULT_V@) +guestfs_am_v_ocamlopt_0 = @echo " OCAMLOPT" $@; +guestfs_am_v_javac = $(guestfs_am_v_javac_@AM_V@) +guestfs_am_v_javac_ = $(guestfs_am_v_javac_@AM_DEFAULT_V@) +guestfs_am_v_javac_0 = @echo " JAVAC " $@; +guestfs_am_v_erlc = $(guestfs_am_v_erlc_@AM_V@) +guestfs_am_v_erlc_ = $(guestfs_am_v_erlc_@AM_DEFAULT_V@) +guestfs_am_v_erlc_0 = @echo " ERLC " $@; +guestfs_am_v_podwrapper = $(guestfs_am_v_podwrapper_@AM_V@) +guestfs_am_v_podwrapper_ = $(guestfs_am_v_podwrapper_@AM_DEFAULT_V@) +guestfs_am_v_podwrapper_0 = @echo " POD " $@; +guestfs_am_v_jar = $(guestfs_am_v_jar_@AM_V@) +guestfs_am_v_jar_ = $(guestfs_am_v_jar_@AM_DEFAULT_V@) +guestfs_am_v_jar_0 = @echo " JAR " $@; +guestfs_am_v_po4a_translate = $(guestfs_am_v_po4a_translate_@AM_V@) +guestfs_am_v_po4a_translate_ = $(guestfs_am_v_po4a_translate_@AM_DEFAULT_V@) +guestfs_am_v_po4a_translate_0 = @echo " PO4A-T " $@; +EXTRA_DIST = \ + guestfs-tools-release-notes-1.48.pod + +man_MANS = \ + guestfs-tools-release-notes-1.48.1 + +noinst_DATA = \ + $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly .po .gmo +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/subdir-rules.mk $(top_srcdir)/common-rules.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign docs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; +$(top_srcdir)/subdir-rules.mk $(top_srcdir)/common-rules.mk $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(MANS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags-am uninstall uninstall-am uninstall-man \ + uninstall-man1 + +.PRECIOUS: Makefile + + +-include $(top_builddir)/localenv + +# Individual Makefile.am's should define generator_built if that +# subdirectory contains any files which are built by the generator. +# Set generator_built to the list of those files. + +$(generator_built): $(top_builddir)/generator/stamp-generator + +$(top_builddir)/generator/stamp-generator: $(top_builddir)/generator/generator + @if test -f $(top_builddir)/generator/Makefile; then \ + $(MAKE) -C $(top_builddir)/generator stamp-generator; \ + else \ + echo "warning: Run 'make' at the top level to build $(generator_built)"; \ + fi + +# If this file doesn't exist, just print a warning and continue. +# During 'make distclean' we can end up deleting this file. +$(top_builddir)/generator/generator: + @if test -f $(top_builddir)/generator/Makefile; then \ + $(MAKE) -C $(top_builddir)/generator generator; \ + else \ + echo "warning: Run 'make' at the top level to build $@"; \ + fi + +%.cmi: %.mli + $(guestfs_am_v_ocamlcmi)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ +%.cmo: %.ml + $(guestfs_am_v_ocamlc)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ +@HAVE_OCAMLOPT_TRUE@%.cmx: %.ml +@HAVE_OCAMLOPT_TRUE@ $(guestfs_am_v_ocamlopt)$(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ + +# Test shell scripts should use '$TEST_FUNCTIONS' to get a predefined +# set of helper functions for running tests (see test-functions.sh). +# +# Notes: +# +# (1) This is in fact a single command all on one line. The variables +# are evaluated in test-functions.sh. +# +# (2) We use absolute paths here and in test-functions.sh so that the +# test can change directory freely. But we also include the +# non-absolute values so they can be used by the test script itself. +export TEST_FUNCTIONS := \ + source $(abs_top_srcdir)/test-functions.sh \ + abs_srcdir="$(abs_srcdir)" \ + abs_builddir="$(abs_builddir)" \ + top_srcdir="$(top_srcdir)" \ + top_builddir="$(top_builddir)" \ + abs_top_srcdir="$(abs_top_srcdir)" \ + abs_top_builddir="$(abs_top_builddir)" + +guestfs-tools-release-notes-1.48.1 guestfs-tools-release-notes-1.48.txt $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html: stamp-guestfs-tools-release-notes-1.48.pod + +stamp-guestfs-tools-release-notes-1.48.pod: guestfs-tools-release-notes-1.48.pod + $(PODWRAPPER) \ + --section 1 \ + --man guestfs-tools-release-notes-1.48.1 \ + --html $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html \ + --license GPLv2+ \ + $< + touch $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/docs/guestfs-tools-release-notes-1.48.pod b/docs/guestfs-tools-release-notes-1.48.pod new file mode 100644 index 0000000..44f7e4f --- /dev/null +++ b/docs/guestfs-tools-release-notes-1.48.pod @@ -0,0 +1,130 @@ +=head1 NAME + +guestfs-tools-release-notes - guestfs tools release Notes + +=head1 RELEASE NOTES FOR GUESTFS TOOLS 1.48 + +These are the release notes for guestfs tools stable release 1.48. +This describes the major changes since 1.46. + +Guestfs tools 1.48.0 was released on B<14 March 2022>. + +=head2 virt-builder + +New templates: C, C, C, +C, C (armv7l), C C +(aarch64) +(Lars Kaiser, Stef Walter). + +New fedora-34 (armv7l) template is built to use UEFI. + +=head2 virt-customize + +The yescrypt password hashing method is now supported +(Björn Esser). + +=head2 virt-inspector + +Recognise C, C and C operating systems / +Linux distros (Laszlo Ersek). + +Inspection of LUKS encrypted filesystems placed directly on logical +volumes is now supported, but you will need libguestfs E 1.48 +(Laszlo Ersek). + +=head2 virt-sysprep + +Add a new default operation called C which removes +NetworkManager connection profiles (Laszlo Ersek). + +=head2 virt-win-reg + +C now prints both the version of guestfs tools +and the libguestfs library that it is linked with. + +=head2 Common changes + +All OCaml tools now suppress line wrapping when output is redirected +to a file (to make it easier to parse logs with external programs). +There is a new I<--wrap> option which can be used to reenable line +wrapping to files if needed (Laszlo Ersek). + +=head2 Build changes + +Multiple fixes to make it easier to build against either the system +installed libguestfs or a locally built libguestfs (Laszlo Ersek). + +Fix multiple OCaml warnings. Remove some deprecated OCaml features. +We now require OCaml E 4.04. + +Multiple fixes to valgrind support for glibc 2.35, OCaml 4.13 and +libvirt 7.7. C should now work. + +=head2 Internals + +New OCaml C module (from libguestfs-common) is used instead +of custom on-exit and signal handling. + +=head2 Bugs fixed + +=over 4 + +=item L + +virt-install armv7 guest on aarch64 host doesn't work, no LPAE support and no PCI devices + +=item L + +RFE: virt-inspector fails to detect the distro and applications on Kylin-Desktop-V10 image + +=item L + +virt-sysprep doesn't cleanup NetworkManager connection files + +=item L + +The version is incorrect when running 'virt-win-reg --version' + +=item L + +Log lines wrapping make log parsing difficult + +=item L + +Virt-v2v can't convert guest using LUKS-on-LV + +=item L + +Armv7 guest fails to boot with qemu-3.0.0-1 + +=back + +=head1 SEE ALSO + +L + +=head1 AUTHORS + +=begin comment + +git shortlog -s v1.46.0.. + +=end comment + +=over 4 + +=item Björn Esser + +=item Lars Kaiser + +=item Laszlo Ersek + +=item Richard W.M. Jones + +=item Stef Walter + +=back + +=head1 COPYRIGHT + +Copyright (C) 2009-2022 Red Hat Inc. diff --git a/edit/Makefile.in b/edit/Makefile.in index 90d4045..c97cd10 100644 --- a/edit/Makefile.in +++ b/edit/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -275,8 +275,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -432,6 +430,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -474,6 +473,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -484,6 +485,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1120,7 +1122,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1182,7 +1184,6 @@ test-virt-edit.sh.log: test-virt-edit.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/edit/edit.c b/edit/edit.c index d5df222..7f06bce 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -46,7 +46,6 @@ guestfs_h *g; int read_only = 0; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -257,7 +256,6 @@ main (int argc, char *argv[]) */ assert (read_only == 0); assert (inspector == 1 || mps != NULL); - assert (live == 0); /* User must specify at least one filename on the command line. */ if (optind >= argc || argc - optind < 1) diff --git a/edit/test-virt-edit.sh b/edit/test-virt-edit.sh index ad8c731..740f2e8 100755 --- a/edit/test-virt-edit.sh +++ b/edit/test-virt-edit.sh @@ -20,8 +20,6 @@ set -e $TEST_FUNCTIONS skip_if_skipped -# UML backend does not support qcow2. -skip_if_backend uml rm -f test.qcow2 diff --git a/format/Makefile.in b/format/Makefile.in index 1799091..dd6f9cc 100644 --- a/format/Makefile.in +++ b/format/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -274,8 +274,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -431,6 +429,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -473,6 +472,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -483,6 +484,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1117,7 +1119,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1179,7 +1181,6 @@ test-virt-format.sh.log: test-virt-format.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/format/format.c b/format/format.c index d9252fb..55677e7 100644 --- a/format/format.c +++ b/format/format.c @@ -42,7 +42,6 @@ guestfs_h *g; int read_only = 0; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -229,7 +228,6 @@ main (int argc, char *argv[]) */ assert (read_only == 0); assert (inspector == 0); - assert (live == 0); /* Must be no extra arguments on the command line. */ if (optind != argc) { diff --git a/get-kernel/Makefile.am b/get-kernel/Makefile.am index e0df00e..c81cb8b 100644 --- a/get-kernel/Makefile.am +++ b/get-kernel/Makefile.am @@ -74,6 +74,7 @@ OCAMLCLIBS = \ -pthread -lpthread \ -lutils \ $(LIBXML2_LIBS) \ + $(LIBGUESTFS_LIBS) \ $(LIBINTL) \ -lgnu diff --git a/get-kernel/Makefile.in b/get-kernel/Makefile.in index 0869197..bf3d8e8 100644 --- a/get-kernel/Makefile.in +++ b/get-kernel/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -275,8 +275,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -432,6 +430,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -474,6 +473,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -484,6 +485,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -773,6 +775,7 @@ noinst_DATA = $(am__append_4) @HAVE_OCAML_TRUE@ -pthread -lpthread \ @HAVE_OCAML_TRUE@ -lutils \ @HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ +@HAVE_OCAML_TRUE@ $(LIBGUESTFS_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBINTL) \ @HAVE_OCAML_TRUE@ -lgnu @@ -1154,7 +1157,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1209,7 +1212,6 @@ test-virt-get-kernel-docs.sh.log: test-virt-get-kernel-docs.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/get-kernel/virt-get-kernel.pod b/get-kernel/virt-get-kernel.pod index adea1b2..0e3eba2 100644 --- a/get-kernel/virt-get-kernel.pod +++ b/get-kernel/virt-get-kernel.pod @@ -158,6 +158,12 @@ Enable verbose messages for debugging. Display version number and exit. +=item B<--wrap> + +Wrap error, warning, and informative messages. This is the default +when the output is a tty. If the output of the program is redirected +to a file, wrapping is disabled unless you use this option. + =item B<-x> Enable tracing of libguestfs API calls. diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in index c6a11ff..e5e0e7b 100644 --- a/gnulib/lib/Makefile.in +++ b/gnulib/lib/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -240,8 +240,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -262,6 +260,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -272,6 +272,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -687,7 +688,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/inspector/Makefile.am b/inspector/Makefile.am index 3c7cc17..297887b 100644 --- a/inspector/Makefile.am +++ b/inspector/Makefile.am @@ -27,13 +27,15 @@ example_xml = \ EXTRA_DIST = \ expected-debian.img.xml \ expected-fedora.img.xml \ - expected-fedora-luks.img.xml \ + expected-fedora-luks-on-lvm.img.xml \ + expected-fedora-lvm-on-luks.img.xml \ expected-ubuntu.img.xml \ expected-archlinux.img.xml \ expected-coreos.img.xml \ expected-windows.img.xml \ test-virt-inspector.sh \ - test-virt-inspector-luks.sh \ + test-virt-inspector-luks-on-lvm.sh \ + test-virt-inspector-lvm-on-luks.sh \ test-virt-inspector-docs.sh \ test-xmllint.sh \ virt-inspector.pod @@ -95,14 +97,15 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test TESTS = \ test-virt-inspector-docs.sh \ test-virt-inspector.sh \ - test-virt-inspector-luks.sh + test-virt-inspector-luks-on-lvm.sh \ + test-virt-inspector-lvm-on-luks.sh if HAVE_XMLLINT TESTS += test-xmllint.sh endif check-valgrind: - $(MAKE) TESTS="test-virt-inspector.sh test-virt-inspector-luks.sh" VG="@VG@" check + $(MAKE) TESTS="test-virt-inspector.sh test-virt-inspector-luks-on-lvm.sh test-virt-inspector-lvm-on-luks.sh" VG="@VG@" check check-valgrind-local-guests: for g in $(GUESTS); do \ diff --git a/inspector/Makefile.in b/inspector/Makefile.in index 6ab0d34..3cdaf1c 100644 --- a/inspector/Makefile.in +++ b/inspector/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -279,8 +279,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -436,6 +434,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -478,6 +477,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -488,6 +489,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -740,13 +742,15 @@ example_xml = \ EXTRA_DIST = \ expected-debian.img.xml \ expected-fedora.img.xml \ - expected-fedora-luks.img.xml \ + expected-fedora-luks-on-lvm.img.xml \ + expected-fedora-lvm-on-luks.img.xml \ expected-ubuntu.img.xml \ expected-archlinux.img.xml \ expected-coreos.img.xml \ expected-windows.img.xml \ test-virt-inspector.sh \ - test-virt-inspector-luks.sh \ + test-virt-inspector-luks-on-lvm.sh \ + test-virt-inspector-lvm-on-luks.sh \ test-virt-inspector-docs.sh \ test-xmllint.sh \ virt-inspector.pod @@ -790,7 +794,8 @@ man_MANS = virt-inspector.1 noinst_DATA = $(top_builddir)/website/virt-inspector.1.html TESTS_ENVIRONMENT = $(top_builddir)/run --test TESTS = test-virt-inspector-docs.sh test-virt-inspector.sh \ - test-virt-inspector-luks.sh $(am__append_1) + test-virt-inspector-luks-on-lvm.sh \ + test-virt-inspector-lvm-on-luks.sh $(am__append_1) all: all-am .SUFFIXES: @@ -1160,7 +1165,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1208,9 +1213,16 @@ test-virt-inspector.sh.log: test-virt-inspector.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -test-virt-inspector-luks.sh.log: test-virt-inspector-luks.sh - @p='test-virt-inspector-luks.sh'; \ - b='test-virt-inspector-luks.sh'; \ +test-virt-inspector-luks-on-lvm.sh.log: test-virt-inspector-luks-on-lvm.sh + @p='test-virt-inspector-luks-on-lvm.sh'; \ + b='test-virt-inspector-luks-on-lvm.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-virt-inspector-lvm-on-luks.sh.log: test-virt-inspector-lvm-on-luks.sh + @p='test-virt-inspector-lvm-on-luks.sh'; \ + b='test-virt-inspector-lvm-on-luks.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ @@ -1236,7 +1248,6 @@ test-xmllint.sh.log: test-xmllint.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -1472,7 +1483,7 @@ stamp-virt-inspector.pod: virt-inspector.pod touch $@ check-valgrind: - $(MAKE) TESTS="test-virt-inspector.sh test-virt-inspector-luks.sh" VG="@VG@" check + $(MAKE) TESTS="test-virt-inspector.sh test-virt-inspector-luks-on-lvm.sh test-virt-inspector-lvm-on-luks.sh" VG="@VG@" check check-valgrind-local-guests: for g in $(GUESTS); do \ diff --git a/inspector/expected-fedora-luks-on-lvm.img.xml b/inspector/expected-fedora-luks-on-lvm.img.xml new file mode 100644 index 0000000..6e21591 --- /dev/null +++ b/inspector/expected-fedora-luks-on-lvm.img.xml @@ -0,0 +1,242 @@ + + + + /dev/mapper/luks-ROOTUUID + linux + x86_64 + fedora + Fedora release 14 (Phony) + 14 + 0 + rpm + yum + fedora.invalid + fedora14 + + / + /boot + + + + ext2 + + 01234567-0123-0123-0123-012345678902 + + + ext2 + + 01234567-0123-0123-0123-012345678901 + + + + + basesystem + 11 + 10.fc33 + noarch + (none) + The skeleton package which defines a simple Fedora system + Basesystem defines the components of a basic Fedora system +(for example, the package installation order to use during bootstrapping). +Basesystem should be in every installation of a system, and it +should never be removed. + + + bash + 5.0.17 + 2.fc33 + x86_64 + https://www.gnu.org/software/bash + The GNU Bourne Again shell + The GNU Bourne Again shell (Bash) is a shell or command language +interpreter that is compatible with the Bourne shell (sh). Bash +incorporates useful features from the Korn shell (ksh) and the C shell +(csh). Most sh scripts can be run by bash without modification. + + + fedora-gpg-keys + 33 + 3 + noarch + https://fedoraproject.org/ + Fedora RPM keys + This package provides the RPM signature keys. + + + fedora-release + 33 + 3 + noarch + https://fedoraproject.org/ + Fedora release files + Fedora release files such as various /etc/ files that define the release +and systemd preset files that determine which services are enabled by default. + + + fedora-release-common + 33 + 3 + noarch + https://fedoraproject.org/ + Fedora release files + Release files common to all Editions and Spins of Fedora + + + fedora-release-identity-basic + 33 + 3 + noarch + https://fedoraproject.org/ + Package providing the basic Fedora identity + Provides the necessary files for a Fedora installation that is not identifying +itself as a particular Edition or Spin. + + + fedora-repos + 33 + 3 + noarch + https://fedoraproject.org/ + Fedora package repositories + Fedora package repository files for yum and dnf along with gpg public keys. + + + filesystem + 3.14 + 3.fc33 + x86_64 + https://pagure.io/filesystem + The basic directory layout for a Linux system + The filesystem package is one of the basic packages that is installed +on a Linux system. Filesystem contains the basic directory layout +for a Linux operating system, including the correct permissions for +the directories. + + + glibc + 2.32 + 4.fc33 + x86_64 + http://www.gnu.org/software/glibc/ + The GNU libc libraries + The glibc package contains standard libraries which are used by +multiple programs on the system. In order to save disk space and +memory, as well as to make upgrading easier, common system code is +kept in one place and shared between programs. This particular package +contains the most important sets of shared libraries: the standard C +library and the standard math library. Without these two libraries, a +Linux system will not function. + + + glibc-all-langpacks + 2.32 + 4.fc33 + x86_64 + http://www.gnu.org/software/glibc/ + All language packs for glibc. + + + glibc-common + 2.32 + 4.fc33 + x86_64 + http://www.gnu.org/software/glibc/ + Common binaries and locale data for glibc + The glibc-common package includes common binaries for the GNU libc +libraries, as well as national language (locale) support. + + + gpg-pubkey + 9570ff31 + 5e3006fb + (none) + (none) + Fedora (33) <fedora-33-primary@fedoraproject.org> public key + -----BEGIN PGP PUBLIC KEY BLOCK----- +Version: rpm-4.16.1.2 (NSS-3) + +mQINBF4wBvsBEADQmcGbVUbDRUoXADReRmOOEMeydHghtKC9uRs9YNpGYZIB+bie +bGYZmflQayfh/wEpO2W/IZfGpHPL42V7SbyvqMjwNls/fnXsCtf4LRofNK8Qd9fN +kYargc9R7BEz/mwXKMiRQVx+DzkmqGWy2gq4iD0/mCyf5FdJCE40fOWoIGJXaOI1 +Tz1vWqKwLS5T0dfmi9U4Tp/XsKOZGvN8oi5h0KmqFk7LEZr1MXarhi2Va86sgxsF +QcZEKfu5tgD0r00vXzikoSjn3qA5JW5FW07F1pGP4bF5f9J3CZbQyOjTSWMmmfTm +2d2BURWzaDiJN9twY2yjzkoOMuPdXXvovg7KxLcQerKT+FbKbq8DySJX2rnOA77k +UG4c9BGf/L1uBkAT8dpHLk6Uf5BfmypxUkydSWT1xfTDnw1MqxO0MsLlAHOR3J7c +oW9kLcOLuCQn1hBEwfZv7VSWBkGXSmKfp0LLIxAFgRtv+Dh+rcMMRdJgKr1V3FU+ +rZ1+ZAfYiBpQJFPjv70vx+rGEgS801D3PJxBZUEy4Ic4ZYaKNhK9x9PRQuWcIBuW +6eTe/6lKWZeyxCumLLdiS75mF2oTcBaWeoc3QxrPRV15eDKeYJMbhnUai/7lSrhs +EWCkKR1RivgF4slYmtNE5ZPGZ/d61zjwn2xi4xNJVs8q9WRPMpHp0vCyMwARAQAB +tDFGZWRvcmEgKDMzKSA8ZmVkb3JhLTMzLXByaW1hcnlAZmVkb3JhcHJvamVjdC5v +cmc+iQI4BBMBAgAiBQJeMAb7AhsPBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK +CRBJ/XdJlXD/MZm2D/9kriL43vd3+0DNMeA82n2v9mSR2PQqKny39xNlYPyy/1yZ +P/KXoa4NYSCA971LSd7lv4n/h5bEKgGHxZfttfOzOnWMVSSTfjRyM/df/NNzTUEV +7ORA5GW18g8PEtS7uRxVBf3cLvWu5q+8jmqES5HqTAdGVcuIFQeBXFN8Gy1Jinuz +AH8rJSdkUeZ0cehWbERq80BWM9dhad5dW+/+Gv0foFBvP15viwhWqajr8V0B8es+ +2/tHI0k86FAujV5i0rrXl5UOoLilO57QQNDZH/qW9GsHwVI+2yecLstpUNLq+EZC +GqTZCYoxYRpl0gAMbDLztSL/8Bc0tJrCRG3tavJotFYlgUK60XnXlQzRkh9rgsfT +EXbQifWdQMMogzjCJr0hzJ+V1d0iozdUxB2ZEgTjukOvatkB77DY1FPZRkSFIQs+ +fdcjazDIBLIxwJu5QwvTNW8lOLnJ46g4sf1WJoUdNTbR0BaC7HHj1inVWi0p7IuN +66EPGzJOSjLK+vW+J0ncPDEgLCV74RF/0nR5fVTdrmiopPrzFuguHf9S9gYI3Zun +Yl8FJUu4kRO6JPPTicUXWX+8XZmE94aK14RCJL23nOSi8T1eW8JLW43dCBRO8QUE +Aso1t2pypm/1zZexJdOV8yGME3g5l2W6PLgpz58DBECgqc/kda+VWgEAp7rO2A== +=EPL3 +-----END PGP PUBLIC KEY BLOCK----- + + + + libgcc + 10.2.1 + 9.fc33 + x86_64 + http://gcc.gnu.org + GCC version 10 shared support library + This package contains GCC shared support library which is needed +e.g. for exception handling support. + + + ncurses-base + 6.2 + 3.20200222.fc33 + noarch + https://invisible-island.net/ncurses/ncurses.html + Descriptions of common terminals + This package contains descriptions of common terminals. Other terminal +descriptions are included in the ncurses-term package. + + + ncurses-libs + 6.2 + 3.20200222.fc33 + x86_64 + https://invisible-island.net/ncurses/ncurses.html + Ncurses libraries + The curses library routines are a terminal-independent method of +updating character screens with reasonable optimization. The ncurses +(new curses) library is a freely distributable replacement for the +discontinued 4.4 BSD classic curses library. + +This package contains the ncurses libraries. + + + setup + 2.13.7 + 2.fc33 + noarch + https://pagure.io/setup/ + A set of system configuration and setup files + The setup package contains a set of important system configuration and +setup files, such as passwd, group, and profile. + + + tzdata + 2021a + 1.fc33 + noarch + https://www.iana.org/time-zones + Timezone data + This package contains data files with rules for various timezones around +the world. + + + + diff --git a/inspector/expected-fedora-luks.img.xml b/inspector/expected-fedora-lvm-on-luks.img.xml similarity index 100% rename from inspector/expected-fedora-luks.img.xml rename to inspector/expected-fedora-lvm-on-luks.img.xml diff --git a/inspector/inspector.c b/inspector/inspector.c index bbfe874..25ee40f 100644 --- a/inspector/inspector.c +++ b/inspector/inspector.c @@ -49,7 +49,6 @@ guestfs_h *g; int read_only = 1; -int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -257,7 +256,6 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 1); - assert (live == 0); /* Must be no extra arguments on the command line. */ if (optind != argc) { diff --git a/inspector/test-virt-inspector-luks-on-lvm.sh b/inspector/test-virt-inspector-luks-on-lvm.sh new file mode 100755 index 0000000..334cef4 --- /dev/null +++ b/inspector/test-virt-inspector-luks-on-lvm.sh @@ -0,0 +1,55 @@ +#!/bin/bash - +# libguestfs virt-inspector test script +# Copyright (C) 2012-2020 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. + +# Test that virt-inspector can work on encrypted images when the +# right password is supplied. +# +# Regression test for https://bugzilla.redhat.com/show_bug.cgi?id=1658126 + +set -e +set -x + +$TEST_FUNCTIONS +skip_if_skipped + +# This test requires libguestfs >= 1.47.3. Just check the minor +# number because this is a development branch so we can expect +# everyone to be at the latest version. +if [ "$(guestfish version | grep minor | awk '{print $2}')" -lt 47 ]; then + echo "$0: test skipped because this requires libguestfs >= 1.47.3" + exit 77 +fi + +f=../test-data/phony-guests/fedora-luks-on-lvm.img +keys=(--key /dev/VG/Root:key:FEDORA-Root + --key /dev/VG/LV1:key:FEDORA-LV1 + --key /dev/VG/LV2:key:FEDORA-LV2 + --key /dev/VG/LV3:key:FEDORA-LV3) + +# Ignore zero-sized file. +if [ -s "$f" ]; then + uuid_root=$(guestfish --ro -i -a "$f" "${keys[@]}" luks-uuid /dev/VG/Root) + b=$(basename "$f") + $VG virt-inspector "${keys[@]}" --format=raw -a "$f" > "actual-$b.xml" + # Check the generated output validate the schema. + $XMLLINT --noout --relaxng "$srcdir/virt-inspector.rng" "actual-$b.xml" + # This 'diff' command will fail (because of -e option) if there + # are any differences. + sed -e "s/ROOTUUID/$uuid_root/" < "$srcdir/expected-$b.xml" \ + | diff -u - "actual-$b.xml" +fi diff --git a/inspector/test-virt-inspector-luks.sh b/inspector/test-virt-inspector-lvm-on-luks.sh similarity index 96% rename from inspector/test-virt-inspector-luks.sh rename to inspector/test-virt-inspector-lvm-on-luks.sh index 79adb1a..955ac63 100755 --- a/inspector/test-virt-inspector-luks.sh +++ b/inspector/test-virt-inspector-lvm-on-luks.sh @@ -27,7 +27,7 @@ set -x $TEST_FUNCTIONS skip_if_skipped -f=../test-data/phony-guests/fedora-luks.img +f=../test-data/phony-guests/fedora-lvm-on-luks.img # Ignore zero-sized file. if [ -s "$f" ]; then diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng index 7807e4d..5b460b3 100644 --- a/inspector/virt-inspector.rng +++ b/inspector/virt-inspector.rng @@ -87,10 +87,13 @@ freedos frugalware gentoo + kalilinux + kylin linuxmint mageia mandriva meego + msdos neokylin netbsd openbsd diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 index f5ac7ef..2a1a8ec 100644 --- a/m4/guestfs-ocaml.m4 +++ b/m4/guestfs-ocaml.m4 @@ -38,10 +38,10 @@ AC_ARG_ENABLE([ocaml], [], [enable_ocaml=yes]) -dnl OCaml >= 4.02 is required. -ocaml_ver_str=4.02 +dnl OCaml >= 4.04 is required. +ocaml_ver_str=4.04 ocaml_min_major=4 -ocaml_min_minor=2 +ocaml_min_minor=4 AC_MSG_CHECKING([if OCaml version >= $ocaml_ver_str]) ocaml_major="`echo $OCAMLVERSION | $AWK -F. '{print $1}'`" ocaml_minor="`echo $OCAMLVERSION | $AWK -F. '{print $2}' | sed 's/^0//'`" @@ -107,7 +107,6 @@ fi OCAML_PKG_gettext=no OCAML_PKG_ounit2=no ounit_is_v2=no -have_Bytes_module=no AS_IF([test "x$OCAMLC" != "xno"],[ # Create common/mlgettext/common_gettext.ml gettext functions or stubs. @@ -123,20 +122,6 @@ AS_IF([test "x$OCAMLC" != "xno"],[ if test "x$OCAML_PKG_ounit2" != "xno"; then AC_CHECK_OCAML_MODULE(ounit_is_v2,[OUnit.OUnit2],OUnit2,[+ounit2]) fi - - # Check if we have the 'Bytes' module. If not (OCaml < 4.02) then - # we need to create a compatibility module. - # AC_CHECK_OCAML_MODULE is a bit broken, so open code this test. - AC_MSG_CHECKING([for OCaml module Bytes]) - rm -f conftest.ml - echo 'let s = Bytes.empty' > conftest.ml - if $OCAMLC -c conftest.ml >&5 2>&5 ; then - AC_MSG_RESULT([yes]) - have_Bytes_module=yes - else - AC_MSG_RESULT([not found]) - have_Bytes_module=no - fi ]) AM_CONDITIONAL([HAVE_OCAML_PKG_GETTEXT], [test "x$OCAML_PKG_gettext" != "xno"]) @@ -166,7 +151,7 @@ EOF ]) dnl Flags we want to pass to every OCaml compiler call. -OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3" +OCAML_WARN_ERROR="-warn-error +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3-6 -w -6" AC_SUBST([OCAML_WARN_ERROR]) OCAML_FLAGS="-g -annot $safe_string_option" AC_SUBST([OCAML_FLAGS]) diff --git a/make-fs/Makefile.in b/make-fs/Makefile.in index 9ac6d33..d3c519c 100644 --- a/make-fs/Makefile.in +++ b/make-fs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -275,8 +275,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -432,6 +430,7 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -474,6 +473,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -484,6 +485,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -1120,7 +1122,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1182,7 +1184,6 @@ test-virt-make-fs.sh.log: test-virt-make-fs.sh @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c index 70865f2..efbb028 100644 --- a/make-fs/make-fs.c +++ b/make-fs/make-fs.c @@ -47,7 +47,6 @@ guestfs_h *g; const char *libvirt_uri; -int live; int read_only; int verbose; int in_guestfish = 0; diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh index 3a9faaf..95122b7 100755 --- a/make-fs/test-virt-make-fs.sh +++ b/make-fs/test-virt-make-fs.sh @@ -41,11 +41,6 @@ if [ -n "$SKIP_TEST_VIRT_MAKE_FS_BTRFS" ]; then btrfs_available= fi -# UML backend doesn't support qcow2. -if [ "$(guestfish get-backend)" != "uml" ]; then - qcow2_supported=yes -fi - declare -a choices # Return a random element from the array 'choices'. @@ -67,12 +62,8 @@ if [ "$btrfs_available" = "yes" ]; then fi type=`random_choice` -if [ "$qcow2_supported" = "yes" ]; then - choices=("" --format=raw --format=qcow2) - format=`random_choice` -else - format="--format=raw" -fi +choices=("" --format=raw --format=qcow2) +format=`random_choice` choices=(--partition --partition=gpt --partition=mbr) partition=`random_choice` diff --git a/po-docs/Makefile.in b/po-docs/Makefile.in index 97e20f7..e85682a 100644 --- a/po-docs/Makefile.in +++ b/po-docs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -216,8 +216,6 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/common-rules.mk \ $(top_srcdir)/subdir-rules.mk @@ -263,6 +261,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -273,6 +273,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -677,7 +678,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/po-docs/ja/Makefile.in b/po-docs/ja/Makefile.in index 0b0e6e5..4a3fb5c 100644 --- a/po-docs/ja/Makefile.in +++ b/po-docs/ja/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -227,6 +227,8 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -237,6 +239,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ @@ -559,7 +562,6 @@ ctags CTAGS: cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff --git a/po-docs/ja/blocksize-option.pod b/po-docs/ja/blocksize-option.pod index d237032..7c08c35 100644 --- a/po-docs/ja/blocksize-option.pod +++ b/po-docs/ja/blocksize-option.pod @@ -5,9 +5,5 @@ =item B<--blocksize> -This parameter sets the sector size of the disk image. It affects all -explicitly added subsequent disks after this parameter. Using -I<--blocksize> with no argument switches the disk sector size to the default -value which is usually 512 bytes. See also -L. +This parameter sets the sector size of the disk image. It affects all explicitly added subsequent disks after this parameter. Using I<--blocksize> with no argument switches the disk sector size to the default value which is usually 512 bytes. See also L. diff --git a/po-docs/ja/customize-options.pod b/po-docs/ja/customize-options.pod index 3a22439..c852704 100644 --- a/po-docs/ja/customize-options.pod +++ b/po-docs/ja/customize-options.pod @@ -29,21 +29,15 @@ libguestfs generated file =item B<--append-line> FILE:LINE -Append a single line of text to the C. If the file does not already -end with a newline, then one is added before the appended line. Also a -newline is added to the end of the C string automatically. +Append a single line of text to the C. If the file does not already end with a newline, then one is added before the appended line. Also a newline is added to the end of the C string automatically. For example (assuming ordinary shell quoting) this command: --append-line '/etc/hosts:10.0.0.1 foo' -will add either C<10.0.0.1 foo⏎> or C<⏎10.0.0.1 foo⏎> to the file, the -latter only if the existing file does not already end with a newline. +will add either C<10.0.0.1 foo⏎> or C<⏎10.0.0.1 foo⏎> to the file, the latter only if the existing file does not already end with a newline. -C<⏎> represents a newline character, which is guessed by looking at the -existing content of the file, so this command does the right thing for files -using Unix or Windows line endings. It also works for empty or non-existent -files. +C<⏎> represents a newline character, which is guessed by looking at the existing content of the file, so this command does the right thing for files using Unix or Windows line endings. It also works for empty or non-existent files. To insert several lines, use the same option several times: @@ -59,30 +53,24 @@ To insert a blank line before the appended line, do: Change the permissions of C to C. -I: C by default would be decimal, unless you prefix it -with C<0> to get octal, ie. use C<0700> not C<700>. +I: C by default would be decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not C<700>. =item B<--commands-from-file> FILENAME Read the customize commands from a file, one (and its arguments) each line. -Each line contains a single customization command and its arguments, for -example: +Each line contains a single customization command and its arguments, for example: delete /some/file install some-package password some-user:password:its-new-password -Empty lines are ignored, and lines starting with C<#> are comments and are -ignored as well. Furthermore, arguments can be spread across multiple -lines, by adding a C<\> (continuation character) at the of a line, for -example +Empty lines are ignored, and lines starting with C<#> are comments and are ignored as well. Furthermore, arguments can be spread across multiple lines, by adding a C<\> (continuation character) at the of a line, for example edit /some/file:\ s/^OPT=.*/OPT=ok/ -The commands are handled in the same order as they are in the file, as if -they were specified as I<--delete /some/file> on the command line. +The commands are handled in the same order as they are in the file, as if they were specified as I<--delete /some/file> on the command line. =item B<--copy> SOURCE:DEST @@ -92,19 +80,15 @@ Wildcards cannot be used. =item B<--copy-in> LOCALPATH:REMOTEDIR -Copy local files or directories recursively into the disk image, placing -them in the directory C (which must exist). +Copy local files or directories recursively into the disk image, placing them in the directory C (which must exist). Wildcards cannot be used. =item B<--delete> PATH -Delete a file from the guest. Or delete a directory (and all its contents, -recursively). +Delete a file from the guest. Or delete a directory (and all its contents, recursively). -You can use shell glob characters in the specified path. Be careful to -escape glob characters from the host shell, if that is required. For -example: +You can use shell glob characters in the specified path. Be careful to escape glob characters from the host shell, if that is required. For example: virt-customize --delete '/var/log/*.log'. @@ -122,71 +106,55 @@ See L. =item B<--firstboot> SCRIPT -Install C